FPGA Monolith Hardware
Museum-grade obsidian and gallery-white monolith framing, isometric SVG hardware diagrams, and live display-mode emulation.
Inspired by Analogue ↗
WHY THIS AESTHETIC IS UNIQUE
Elevates retro video game hardware to contemporary museum sculpture with stark Swiss-Japanese gallery contrast and authentic LCD/CRT display filter previews.
BEST FOR
TAGS
COLOR PALETTE (CLICK TO COPY HEX)
TYPOGRAPHY
- Display
- Plus Jakarta Sans
- Body
- Inter
- Mono
- IBM Plex Mono
- Scale
- Monumental centered grotesque titles paired with whisper-quiet 11px technical callouts and sharp 1px architectural spec tables.
ARCHITECTURE & MOBILE NOTES
LAYOUT
High-contrast alternating gallery-white and obsidian monolith bands showcasing a technical SVG handheld silhouette with an embedded interactive pixel screen.
INTERACTION
Interactive Display Mode switcher (Original DMG Green, Crisp Pocket LCD, Trinitron Scanline CRT, B&W Studio) that live-transforms the embedded pixel-art preview and subpixel specs.
MOBILE
Maintains clean centered hardware framing at 390px with full-width 44px display-mode toggles and stacked technical specification rows.
AI AGENT GUARDRAILS
DO
- Use stark black-and-white gallery contrast so the hardware silhouette commands full attention.
- Include crisp technical line art and exact pixel/resolution metrics (1600x1440, 615 PPI).
- Keep copy concise, authoritative, and free of hype adjectives.
DON'T
- Never clutter the frame with noisy gamer-RGB gradients or busy background patterns.
- Avoid inconsistent border radii; keep hardware cards disciplined and architectural.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>MONOLITH // Pocket FPGA Reference Hardware</title>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500&family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
<style>
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
--obsidian: #0a0a0b;
--graphite: #141417;
--gallery: #f8f8f7;
--white: #ffffff;
--ink: #111113;
--muted: #72727a;
--line-dark: #25252b;
--line-light: #e2e2e0;
--font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
--font-mono: 'IBM Plex Mono', ui-monospace, monospace;
}
html, body {
background: var(--obsidian);
color: var(--white);
font-family: var(--font-sans);
line-height: 1.5;
overflow-x: hidden;
-webkit-font-smoothing: antialiased;
}
/* Minimal Gallery Header */
header {
background: rgba(10, 10, 11, 0.92);
backdrop-filter: blur(10px);
border-bottom: 1px solid var(--line-dark);
position: sticky;
top: 0;
z-index: 40;
}
.nav-wrap {
max-width: 1160px;
margin: 0 auto;
padding: 14px 20px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
}
.logo {
text-decoration: none;
color: var(--white);
display: flex;
align-items: center;
gap: 10px;
font-weight: 600;
font-size: 0.92rem;
letter-spacing: 0.14em;
text-transform: uppercase;
}
.logo-square {
width: 18px;
height: 18px;
border: 2px solid var(--white);
display: inline-block;
position: relative;
}
.logo-square::after {
content: '';
position: absolute;
inset: 3px;
background: var(--white);
}
.nav-links {
display: none;
list-style: none;
gap: 28px;
}
.nav-links a {
color: #a1a1aa;
text-decoration: none;
font-size: 0.78rem;
letter-spacing: 0.08em;
text-transform: uppercase;
padding: 10px 0;
transition: color 0.15s;
}
.nav-links a:hover { color: var(--white); }
.menu-btn {
min-width: 44px;
min-height: 44px;
background: transparent;
border: 1px solid var(--line-dark);
color: var(--white);
font-family: var(--font-mono);
font-size: 0.72rem;
text-transform: uppercase;
padding: 0 12px;
cursor: pointer;
}
.mobile-drawer {
display: none;
flex-direction: column;
padding: 4px 20px 14px;
background: var(--obsidian);
border-bottom: 1px solid var(--line-dark);
}
.mobile-drawer.open { display: flex; }
.mobile-drawer a {
min-height: 44px;
display: flex;
align-items: center;
color: var(--white);
text-decoration: none;
font-size: 0.82rem;
letter-spacing: 0.08em;
text-transform: uppercase;
border-top: 1px solid var(--line-dark);
}
/* Hero Showcase (Obsidian) */
.hero {
max-width: 1160px;
margin: 0 auto;
padding: 36px 20px 64px;
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 36px;
align-items: center;
}
.eyebrow {
font-family: var(--font-mono);
font-size: 0.72rem;
letter-spacing: 0.16em;
text-transform: uppercase;
color: #9b9ba6;
margin-bottom: 12px;
}
h1 {
font-size: clamp(2.1rem, 5.4vw, 3.8rem);
font-weight: 600;
letter-spacing: -0.04em;
line-height: 1.03;
margin-bottom: 16px;
}
.hero-lead {
color: #a6a6b0;
font-size: 0.98rem;
max-width: 44ch;
margin-bottom: 28px;
}
/* Display Mode Switcher */
.switcher-label {
font-family: var(--font-mono);
font-size: 0.68rem;
letter-spacing: 0.14em;
text-transform: uppercase;
color: #8b8b96;
margin-bottom: 10px;
display: block;
}
.mode-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 8px;
margin-bottom: 18px;
}
.mode-btn {
min-height: 54px;
padding: 10px 12px;
background: var(--graphite);
border: 1px solid var(--line-dark);
color: #c8c8d0;
font-family: var(--font-sans);
font-size: 0.8rem;
font-weight: 500;
text-align: left;
cursor: pointer;
transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.mode-btn span {
display: block;
font-family: var(--font-mono);
font-size: 0.65rem;
color: #7c7c88;
margin-top: 2px;
}
.mode-btn.active {
background: var(--white);
border-color: var(--white);
color: var(--obsidian);
}
.mode-btn.active span { color: #52525b; }
.scene-row {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 20px;
}
.scene-btn {
min-height: 44px;
padding: 0 14px;
background: transparent;
border: 1px solid var(--line-dark);
color: #a1a1aa;
font-family: var(--font-mono);
font-size: 0.72rem;
letter-spacing: 0.06em;
text-transform: uppercase;
cursor: pointer;
}
.scene-btn.active {
border-color: var(--white);
color: var(--white);
}
.telemetry-strip {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 8px;
padding-top: 16px;
border-top: 1px solid var(--line-dark);
font-family: var(--font-mono);
}
.telemetry-item span {
display: block;
font-size: 0.62rem;
color: #7a7a85;
text-transform: uppercase;
}
.telemetry-item strong {
font-size: 0.78rem;
font-weight: 500;
color: var(--white);
}
/* Hardware Monolith Frame */
.monolith-stage {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
background: radial-gradient(circle at 50% 42%, #1d1d22 0%, #0a0a0b 72%);
border: 1px solid var(--line-dark);
padding: 28px 16px;
}
.device-shell {
position: relative;
width: 100%;
max-width: 280px;
aspect-ratio: 280 / 462;
}
.device-svg {
width: 100%;
height: 100%;
display: block;
}
/* Embedded Live Pixel-Art Screen inside the Hardware Bezel */
.screen-mount {
position: absolute;
top: 8.6%;
left: 12.1%;
width: 75.8%;
height: 41.5%;
border-radius: 3px;
overflow: hidden;
background: #0f380f;
box-shadow: inset 0 0 10px rgba(0,0,0,0.65);
}
canvas#pixelScreen {
width: 100%;
height: 100%;
display: block;
image-rendering: pixelated;
image-rendering: crisp-edges;
}
.screen-overlay {
pointer-events: none;
position: absolute;
inset: 0;
}
.screen-overlay.dmg {
background-image:
linear-gradient(to right, rgba(15, 56, 15, 0.22) 1px, transparent 1px),
linear-gradient(to bottom, rgba(15, 56, 15, 0.22) 1px, transparent 1px);
background-size: 4px 4px;
}
.screen-overlay.crt {
background:
repeating-linear-gradient(0deg, rgba(0,0,0,0.34) 0px, rgba(0,0,0,0.34) 1px, transparent 1px, transparent 3px),
radial-gradient(ellipse at center, transparent 58%, rgba(0,0,0,0.42) 100%);
}
.screen-overlay.pocket {
background-image:
linear-gradient(to right, rgba(0,0,0,0.06) 1px, transparent 1px),
linear-gradient(to bottom, rgba(0,0,0,0.06) 1px, transparent 1px);
background-size: 3px 3px;
}
.monolith-caption {
margin-top: 16px;
font-family: var(--font-mono);
font-size: 0.68rem;
letter-spacing: 0.12em;
color: #82828e;
text-transform: uppercase;
text-align: center;
}
/* Gallery White Section (Swiss-Japanese Contrast) */
.gallery-band {
background: var(--gallery);
color: var(--ink);
padding: 56px 20px 72px;
border-top: 1px solid var(--line-light);
}
.gallery-inner {
max-width: 1160px;
margin: 0 auto;
}
.band-head {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: baseline;
gap: 12px;
padding-bottom: 18px;
border-bottom: 1px solid var(--ink);
margin-bottom: 32px;
}
.band-head h2 {
font-size: clamp(1.45rem, 3.2vw, 2.2rem);
font-weight: 600;
letter-spacing: -0.03em;
}
.band-head span {
font-family: var(--font-mono);
font-size: 0.72rem;
color: var(--muted);
letter-spacing: 0.1em;
text-transform: uppercase;
}
/* Isometric Technical Drawing + Spec Matrix */
.arch-grid {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 32px;
margin-bottom: 48px;
}
.iso-card {
background: var(--white);
border: 1px solid var(--line-light);
padding: 24px;
}
.iso-card svg {
width: 100%;
max-width: 420px;
margin: 0 auto;
display: block;
}
.iso-meta {
margin-top: 16px;
padding-top: 12px;
border-top: 1px solid var(--line-light);
display: flex;
justify-content: space-between;
font-family: var(--font-mono);
font-size: 0.68rem;
color: var(--muted);
text-transform: uppercase;
}
.spec-matrix {
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 0;
border-top: 1px solid var(--line-light);
}
.spec-cell {
padding: 18px 0;
border-bottom: 1px solid var(--line-light);
display: grid;
grid-template-columns: minmax(0, 1fr);
gap: 4px;
}
.spec-k {
font-family: var(--font-mono);
font-size: 0.72rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--muted);
}
.spec-v {
font-size: 0.94rem;
font-weight: 500;
color: var(--ink);
}
footer {
background: var(--obsidian);
color: #7c7c88;
padding: 28px 20px;
text-align: center;
font-family: var(--font-mono);
font-size: 0.7rem;
letter-spacing: 0.14em;
text-transform: uppercase;
border-top: 1px solid var(--line-dark);
}
@media (min-width: 780px) {
.nav-links { display: flex; }
.menu-btn { display: none; }
.mobile-drawer { display: none !important; }
.hero { grid-template-columns: 1.05fr 0.95fr; gap: 48px; padding: 56px 20px 80px; }
.arch-grid { grid-template-columns: 1fr 1.15fr; align-items: start; }
.spec-cell { grid-template-columns: 180px minmax(0, 1fr); gap: 16px; }
}
</style>
</head>
<body>
<header>
<div class="nav-wrap">
<a href="#top" class="logo">
<span class="logo-square" aria-hidden="true"></span>
MONOLITH
</a>
<nav>
<ul class="nav-links">
<li><a href="#display">Display Modes</a></li>
<li><a href="#architecture">FPGA Architecture</a></li>
<li><a href="#matrix">Spec Matrix</a></li>
</ul>
</nav>
<button class="menu-btn" id="menuBtn" aria-expanded="false" aria-controls="mobileDrawer">Menu</button>
</div>
<div class="mobile-drawer" id="mobileDrawer">
<a href="#display">Display Mode Switcher</a>
<a href="#architecture">Isometric Hardware Diagram</a>
<a href="#matrix">Hardware Spec Matrix</a>
</div>
</header>
<main id="top">
<section class="hero" id="display">
<div>
<p class="eyebrow">Dual Altera Cyclone V FPGA · Zero Emulation</p>
<h1>Precision silicon for video game history.</h1>
<p class="hero-lead">
Engineered at the transistor level in hardware description language. A 3.5-inch 1600×1440 LTPS panel with 10× integer scaling reproduces original dot-matrix and CRT subpixel geometry without a single frame of lag.
</p>
<span class="switcher-label">Display Mode Switcher</span>
<div class="mode-grid" role="group" aria-label="Hardware Display Modes">
<button type="button" class="mode-btn active" data-mode="dmg">
Original DMG Green
<span>1989 Reflective STN</span>
</button>
<button type="button" class="mode-btn" data-mode="pocket">
Pocket Crisp LCD
<span>1996 Silver Monochrome</span>
</button>
<button type="button" class="mode-btn" data-mode="crt">
Trinitron Scanline CRT
<span>Aperture Grille RGB</span>
</button>
<button type="button" class="mode-btn" data-mode="bw">
B&W Studio
<span>1:1 Museum Reference</span>
</button>
</div>
<span class="switcher-label">Cartridge Framebuffer Scene</span>
<div class="scene-row" role="group" aria-label="Pixel art scene">
<button type="button" class="scene-btn active" data-scene="castle">01. Citadel</button>
<button type="button" class="scene-btn" data-scene="star">02. Starfield</button>
<button type="button" class="scene-btn" data-scene="core">03. FPGA Core</button>
</div>
<div class="telemetry-strip">
<div class="telemetry-item">
<span>Active Mask</span>
<strong id="telMask">DMG-01 Dot Matrix</strong>
</div>
<div class="telemetry-item">
<span>Resolution</span>
<strong id="telRes">1600 × 1440 (10×)</strong>
</div>
<div class="telemetry-item">
<span>Latency</span>
<strong>0.0 ms (Hardware)</strong>
</div>
</div>
</div>
<!-- Hardware Monolith Frame with Live Screen -->
<div class="monolith-stage">
<div class="device-shell">
<svg class="device-svg" viewBox="0 0 280 462" role="img" aria-label="Monolith FPGA portable hardware unit">
<defs>
<linearGradient id="chassisGrad" x1="0" y1="0" x2="1" y2="1">
<stop offset="0%" stop-color="#28282d"/>
<stop offset="50%" stop-color="#18181c"/>
<stop offset="100%" stop-color="#111114"/>
</linearGradient>
</defs>
<!-- Precision Milled Body -->
<rect x="6" y="6" width="268" height="450" rx="18" fill="url(#chassisGrad)" stroke="#383842" stroke-width="1.5"/>
<!-- Side Volume & Power Buttons -->
<rect x="2" y="106" width="4" height="32" rx="1" fill="#3a3a44"/>
<rect x="2" y="150" width="4" height="44" rx="1" fill="#3a3a44"/>
<!-- Gorilla Glass Bezel -->
<rect x="22" y="24" width="236" height="222" rx="9" fill="#070708" stroke="#2c2c34" stroke-width="1"/>
<!-- Status LED -->
<circle cx="34" cy="236" r="2.2" fill="#4ade80"/>
<text x="140" y="238" text-anchor="middle" font-family="IBM Plex Mono, monospace" font-size="6.5" letter-spacing="2.4" fill="#52525c">MONOLITH 615 PPI</text>
<!-- Tactile D-Pad -->
<g transform="translate(46, 286)">
<path d="M22,0 H42 V22 H64 V42 H42 V64 H22 V42 H0 V22 H22 Z" fill="#101013" stroke="#32323b" stroke-width="1.2"/>
<circle cx="32" cy="32" r="7" fill="#17171b"/>
</g>
<!-- A / B / X / Y Buttons -->
<g fill="#101013" stroke="#32323b" stroke-width="1.2">
<circle cx="204" cy="298" r="13"/>
<circle cx="232" cy="318" r="13"/>
<circle cx="176" cy="318" r="13"/>
<circle cx="204" cy="338" r="13"/>
</g>
<g font-family="IBM Plex Mono, monospace" font-size="7" fill="#636370" text-anchor="middle">
<text x="204" y="300.5">X</text>
<text x="232" y="320.5">A</text>
<text x="176" y="320.5">Y</text>
<text x="204" y="340.5">B</text>
</g>
<!-- Select / Home / Start -->
<rect x="94" y="388" width="24" height="7" rx="3.5" fill="#101013" stroke="#32323b" stroke-width="1"/>
<circle cx="140" cy="391.5" r="7" fill="#101013" stroke="#32323b" stroke-width="1"/>
<rect x="162" y="388" width="24" height="7" rx="3.5" fill="#101013" stroke="#32323b" stroke-width="1"/>
<!-- Milled Stereo Speaker Grille -->
<g fill="#0c0c0e" stroke="#292930" stroke-width="0.6">
<rect x="204" y="422" width="38" height="3" rx="1.5"/>
<rect x="204" y="430" width="38" height="3" rx="1.5"/>
<rect x="204" y="438" width="38" height="3" rx="1.5"/>
</g>
</svg>
<div class="screen-mount">
<canvas id="pixelScreen" width="80" height="72"></canvas>
<div class="screen-overlay dmg" id="screenOverlay"></div>
</div>
</div>
<p class="monolith-caption" id="monolithCaption">MODE 01 // ORIGINAL DMG-01 DOT MATRIX</p>
</div>
</section>
<!-- Gallery White Isometric & Spec Matrix -->
<section class="gallery-band" id="architecture">
<div class="gallery-inner">
<div class="band-head">
<h2>Hardware Architecture</h2>
<span>CNC 6061 Aluminum · Dual FPGA</span>
</div>
<div class="arch-grid">
<div class="iso-card">
<!-- Razor-sharp Isometric Technical Illustration -->
<svg viewBox="0 0 420 300" role="img" aria-label="Isometric technical drawing of FPGA hardware monolith">
<g fill="none" stroke="#111113" stroke-width="1.3" stroke-linejoin="round">
<!-- Outer Isometric Slab -->
<polygon points="210,24 358,98 210,172 62,98" fill="#ffffff"/>
<polygon points="62,98 210,172 210,204 62,130" fill="#efefef"/>
<polygon points="358,98 210,172 210,204 358,130" fill="#dcdcd8"/>
<!-- Recessed Glass Screen Plane -->
<polygon points="210,42 308,91 210,140 112,91" fill="#111113"/>
<polygon points="210,50 294,92 210,134 126,92" fill="#232329" stroke="#52525b" stroke-width="0.8"/>
<!-- Exploded Lower PCB Layer (Dashed Projection) -->
<line x1="62" y1="130" x2="62" y2="188" stroke="#a1a1aa" stroke-dasharray="3 3"/>
<line x1="210" y1="204" x2="210" y2="262" stroke="#a1a1aa" stroke-dasharray="3 3"/>
<line x1="358" y1="130" x2="358" y2="188" stroke="#a1a1aa" stroke-dasharray="3 3"/>
<polygon points="210,152 340,217 210,282 80,217" fill="#f8f8f7" stroke="#52525b"/>
<!-- Primary Altera Cyclone V FPGA Die -->
<polygon points="210,188 256,211 210,234 164,211" fill="#111113"/>
<polygon points="210,196 240,211 210,226 180,211" fill="none" stroke="#ffffff" stroke-width="0.9"/>
<!-- Dimension Callouts -->
<line x1="256" y1="211" x2="346" y2="211" stroke="#111113" stroke-width="0.9"/>
<circle cx="256" cy="211" r="2.5" fill="#111113"/>
</g>
<g font-family="IBM Plex Mono, monospace" font-size="9" fill="#111113">
<text x="16" y="34">FIG 01. ISOMETRIC EXPLODED STACK</text>
<text x="16" y="48" fill="#72727a">LTPS GLASS / CYCLONE V FPGA</text>
<text x="348" y="206">49K LE</text>
<text x="348" y="218" fill="#72727a">FPGA #1</text>
</g>
</svg>
<div class="iso-meta">
<span>TOLERANCE: ±0.02 MM</span>
<span>SCALE 1:2.2</span>
</div>
</div>
<div class="spec-matrix" id="matrix">
<div class="spec-cell">
<span class="spec-k">Primary Silicon</span>
<span class="spec-v">Altera Cyclone V 5CEBA4 (49,000 Logic Elements) + Secondary Cyclone V for OS</span>
</div>
<div class="spec-cell">
<span class="spec-k">Display Panel</span>
<span class="spec-v">3.5″ LTPS LCD · 1600×1440 resolution · 615 PPI · Gorilla Glass</span>
</div>
<div class="spec-cell">
<span class="spec-k">Refresh & Scaling</span>
<span class="spec-v">Variable 30–62 Hz refresh with exact hardware integer scaling</span>
</div>
<div class="spec-cell">
<span class="spec-k">Cartridge Bus</span>
<span class="spec-v">3.3V / 5V native cartridge slot with openFPGA developer core support</span>
</div>
<div class="spec-cell">
<span class="spec-k">Audio Architecture</span>
<span class="spec-v">Stereo speakers, 3.5 mm headphone out, dual-channel synthesizer DAC</span>
</div>
<div class="spec-cell">
<span class="spec-k">Power & Dimensions</span>
<span class="spec-v">4300 mAh Li-Ion (6–10 hrs) · 148.9 × 88.2 × 22.0 mm · 275 g</span>
</div>
</div>
</div>
</div>
</section>
</main>
<footer>
MONOLITH HARDWARE ARCHIVE · SEATTLE / TOKYO · ENGINEERED FOR PRESERVATION
</footer>
<script>
(function () {
// Mobile nav
const menuBtn = document.getElementById('menuBtn');
const mobileDrawer = document.getElementById('mobileDrawer');
menuBtn.addEventListener('click', () => {
const open = mobileDrawer.classList.toggle('open');
menuBtn.setAttribute('aria-expanded', String(open));
});
mobileDrawer.querySelectorAll('a').forEach(a => a.addEventListener('click', () => {
mobileDrawer.classList.remove('open');
menuBtn.setAttribute('aria-expanded', 'false');
}));
const canvas = document.getElementById('pixelScreen');
const ctx = canvas.getContext('2d');
const overlay = document.getElementById('screenOverlay');
const telMask = document.getElementById('telMask');
const telRes = document.getElementById('telRes');
const monolithCaption = document.getElementById('monolithCaption');
const modes = {
dmg: {
palette: ['#0f380f', '#306230', '#8bac0f', '#9bbc0f'],
overlay: 'dmg',
mask: 'DMG-01 Dot Matrix',
res: '1600 × 1440 (10×)',
caption: 'MODE 01 // ORIGINAL DMG-01 DOT MATRIX'
},
pocket: {
palette: ['#1a211b', '#526154', '#9aa89b', '#dce4db'],
overlay: 'pocket',
mask: 'MGB Crisp Silver',
res: '1600 × 1440 (10×)',
caption: 'MODE 02 // POCKET CRISP SILVER LCD'
},
crt: {
palette: ['#0d1021', '#2b4c7e', '#e63946', '#f4d35e'],
overlay: 'crt',
mask: 'Aperture Grille CRT',
res: '240p Scanline Mask',
caption: 'MODE 03 // TRINITRON APERTURE GRILLE CRT'
},
bw: {
palette: ['#0a0a0b', '#4d4d54', '#a8a8b2', '#ffffff'],
overlay: '',
mask: '1:1 Studio Raw',
res: '1600 × 1440 Raw',
caption: 'MODE 04 // B&W STUDIO REFERENCE'
}
};
let activeMode = 'dmg';
let activeScene = 'castle';
let frame = 0;
function px(x, y, w, h, colorIdx) {
ctx.fillStyle = modes[activeMode].palette[colorIdx];
ctx.fillRect(Math.round(x), Math.round(y), Math.round(w), Math.round(h));
}
function drawCastle(t) {
// Sky
px(0, 0, 80, 72, 3);
// Moon
px(60, 8, 8, 8, 2);
px(62, 10, 4, 4, 3);
// Moving pixel clouds
const cx = (t * 0.25) % 92 - 12;
px(cx, 12, 14, 3, 2);
px(cx + 3, 9, 8, 3, 2);
px((cx + 42) % 92 - 12, 18, 10, 3, 2);
// Distant Mountains
for (let i = 0; i < 80; i += 2) {
const mh = Math.floor(Math.sin(i * 0.09) * 6 + 10);
px(i, 52 - mh, 2, mh, 2);
}
// Castle Keep Silhouette
px(22, 28, 36, 28, 1);
px(16, 22, 10, 34, 0);
px(54, 22, 10, 34, 0);
// Battlements
for (let bx = 16; bx <= 60; bx += 4) {
px(bx, 19, 2, 3, 0);
}
// Windows & Gate
px(20, 28, 2, 4, 3);
px(58, 28, 2, 4, 3);
px(35, 42, 10, 14, 0);
px(37, 44, 6, 12, 3);
// Animated Banner Flag
const wave = Math.floor(t / 12) % 2;
px(39, 14, 1, 14, 0);
px(40, 14 + wave, 7, 4, 2);
// Foreground Ground & HUD
px(0, 56, 80, 16, 0);
px(0, 56, 80, 2, 1);
// Pixel Hearts / Score Bar
px(4, 62, 16, 4, 2);
px(6, 63, 10, 2, 3);
px(56, 62, 20, 4, 1);
}
function drawStarfield(t) {
px(0, 0, 80, 72, 0);
// Stars
for (let i = 0; i < 24; i++) {
const sx = ((i * 29 + t * (1 + (i % 3) * 0.4)) % 80);
const sy = (i * 17) % 64;
px(80 - sx, sy, i % 3 === 0 ? 2 : 1, 1, i % 2 === 0 ? 3 : 2);
}
// Pixel Starship
const shipY = 32 + Math.round(Math.sin(t * 0.08) * 6);
px(16, shipY, 14, 6, 3);
px(20, shipY - 3, 6, 3, 2);
px(20, shipY + 6, 6, 3, 2);
px(30, shipY + 2, 5, 2, 3);
// Thruster flame
px(11 - (Math.floor(t / 4) % 3), shipY + 2, 5, 2, 2);
// Laser pulse
const lx = (t * 2.2) % 52;
px(36 + lx, shipY + 2, 6, 2, 3);
// Bottom Cockpit Strip
px(0, 64, 80, 8, 1);
px(4, 66, 26, 4, 3);
px(58, 66, 18, 4, 2);
}
function drawCore(t) {
px(0, 0, 80, 72, 3);
// Die Frame
px(18, 14, 44, 44, 0);
px(21, 17, 38, 38, 1);
// Pins
for (let p = 22; p <= 56; p += 6) {
px(p, 8, 2, 6, 0);
px(p, 58, 2, 6, 0);
px(12, p - 4, 6, 2, 0);
px(62, p - 4, 6, 2, 0);
}
// Animated Logic Cell Matrix
for (let gx = 0; gx < 6; gx++) {
for (let gy = 0; gy < 6; gy++) {
const active = ((gx + gy + Math.floor(t / 10)) % 4 === 0);
px(24 + gx * 5.5, 20 + gy * 5.5, 4, 4, active ? 3 : 2);
}
}
}
function renderLoop() {
frame++;
if (activeScene === 'castle') drawCastle(frame);
else if (activeScene === 'star') drawStarfield(frame);
else drawCore(frame);
requestAnimationFrame(renderLoop);
}
function applyMode(key) {
activeMode = key;
const m = modes[key];
overlay.className = 'screen-overlay ' + m.overlay;
telMask.textContent = m.mask;
telRes.textContent = m.res;
monolithCaption.textContent = m.caption;
document.querySelectorAll('.mode-btn').forEach(b => b.classList.toggle('active', b.dataset.mode === key));
}
document.querySelectorAll('.mode-btn').forEach(b => b.addEventListener('click', () => applyMode(b.dataset.mode)));
document.querySelectorAll('.scene-btn').forEach(b => b.addEventListener('click', () => {
activeScene = b.dataset.scene;
document.querySelectorAll('.scene-btn').forEach(x => x.classList.toggle('active', x === b));
}));
applyMode('dmg');
requestAnimationFrame(renderLoop);
})();
</script>
</body>
</html>