Back to Lab
Edition № III · 2026

Defender A forensic reconstruction of the 1981 Williams cabinet — not a clone of it.

Prompt-to-Prompt
Sol 5.6 9 MDs
Coding
Opus 5
LOC
54,501 src + tests + tools
WAVs
33 rendered from the sound ROM
Defender
  • ← → Thrust left / right
  • ↑ ↓ Climb / dive
  • Space Fire
  • B Smart bomb
  • H Hyperspace

See how it was made

Thrust Left ← · Thrust Right → · Fire Space · Stick Up ↑ · Stick Down ↓ · Smart Bomb B · Hyperspace H

Preview assists: Smart Bomb unlimited · Hyperspace never kills you · Lives unlimited — mechanical changes the cabinet did not have. A run with them on is not score-valid.

This page boots with a laptop control scheme and those three assists on, so it can be picked up and played. The cabinet's own controls — discrete Thrust and Reverse, three bombs a life, hyperspace that kills you, three lives and out — are one click away in ⌨ Controls and Assists, and switch mid-flight. All are recorded as deviations.

Rebuilt from the recovered 6809 source and the hash-verified Red Label ROM set — 150 evidence entries, each cited by label. No emulator, no ROM shipped, no coins.

Defender needs a keyboard or a gamepad. A touchscreen cannot produce its controls, and inventing a way for it to try would change the game — so it isn’t offered. The rest of this page reads fine here; play it on a laptop.

Rebuilt from the bytes

01

Defender is the hardest game Williams ever shipped, and the most remembered. Nearly every port of it is a reconstruction from memory. This one is a reconstruction from evidence.

How it was built: a single gauntlet-loop prompt + 8 markdown files. One prompt to Sol 5.6 authored the eight scaffolded prompt files and the loop that runs them; Opus 5 built from those overnight. A few edits by hand. Scope set once and held: a desktop game.

Rebuilt by reading the recovered 6809 assembly against fourteen hash-verified ROM images, re-deriving every constant from the bytes rather than from a wiki. Where the source and the ROM disagreed, the ROM won. Where a behavior could not be established it was recorded as unresolved, not guessed — the ledger labels all 150 claims, and nothing marked inferred was implemented as fact.

What runs in the canvas is a deterministic, integer-only core: no floating point, no wall clock, no Math.random. One step() is one original video frame — 16.640 ms, the 8 MHz clock over 512 × 260. Same seed, same switch closures, and it replays byte for byte on a 30 Hz laptop or a 144 Hz monitor.

The renderer, the audio engine and this page are strangers to it: they read state and consume events, and never write back. That is why Classic and Enhanced are the same game, and why you can switch mid-flight without the ship flinching.

Defender in play, animated: the score band and scanner across the top, the ship flying and firing, a Lander rising with a humanoid, and the mountain terrain scrolling along the foot of the screen
14ROM images, hash-verified
150evidence entries, labeled
16.640 msone simulation frame
0dependencies

What “exact” had to mean

02

Six receipts. Each is a claim you can check against the original, and each one is a place where the convenient answer and the true answer differ.

The scanner lags, and we left it lagging

The radar band is redrawn once every eight frames — about 7.5 times a second — because its process sleeps 2, then 2, then 4, and the redraw sits on the third leg. On the cabinet you can watch a blip arrive late. Smoothing it to 60 Hz is a one-line change and it is the first thing a port does. Classic Mode refuses it outright; it is written down as a labeled deviation, D-HUD-5, and reserved for Enhanced, which has not shipped.

Sound $12 is silent — on purpose

The Lander-lift sound was never audible on any Defender ever built. A register bug loads the command into A where the transmitter reads B — and B is zero — so the write degenerates to the idle byte and the sound board never hears it. The instruction is the same in all four Williams revisions. The reconstruction reproduces the silence. Fixing it would be repairing a bug nobody who played the game ever heard.

The pixels are not square

292 × 240 scanned-out pixels across a landscape 4:3 tube gives a pixel aspect ratio of 80:73. A sprite is 9.6 % wider than it is tall. The stretch is applied once, at the very end, to the presented surface — never to the simulation, and never by squashing the picture into 16:9.

Smart bombs stack downward

The spare-ship indicators lay out horizontally at 6 byte-columns apart; the smart-bomb indicators lay out vertically at 4 scanlines apart. Almost every port gets this backwards. The two routines are built to the same shape and call the same blit, but LDSP steps the high byte of the screen address and SBDSP steps the low byte — ADDA #$06 against ADDB #4, one register apart.

The player cannot hit the ground

There is no terrain-table read on any player code path — the six that exist in the ROM belong to Landers, astronauts and the planet-destruction burst. The mountains are scenery to the ship. Adding a collision there would feel plausible, would make the game harder, and would be a mechanic Defender does not have.

Vertical speed is exactly one third of horizontal

And the horizontal clamp is unreachable: terminal velocity works out at 6 pixels per frame, not the 8 the clamp allows. The ship can never touch its own speed limit.

How it was made

03

This is the case study; the game is the artifact it produced. It was built by a fleet of AI agents working in phases, against an adversarial gate that repeatedly caught them agreeing with each other instead of with the ROM.

Phase 1

Research, and a ledger with confidence labels

Every load-bearing claim about the game written down exactly once, with its evidence and a confidence label — multi-source confirmed, single-source, inferred, unresolved. One file owns the labels; every other document cites an ID rather than re-asserting a label of its own. That rule exists because the first pass shipped three separate label drifts, and all three traced to the same cause.

The gate

The failure mode was agreement

An adversarial review found the same defect three times: a specification that was internally consistent, well cited, and quietly copied from a sibling document that had since been corrected. Stale agreement between agents reads exactly like corroboration. The fix was mechanical — labels have a single owner, citations point at the ROM, and a script checks both.

Phases 2–3

Specification, then a core that runs headlessly

The simulation was built and tested with no renderer, no audio and no browser — a command-line driver that can run a hundred thousand frames a second and print the exact per-phase execution order of any one of them. If a behavior cannot be asserted without a screen, it is not understood yet.

Phase 4

Presentation, in four parallel pieces

Renderer, audio, feedback and this shell, built simultaneously against the same frozen core API. The core could not be edited by any of them — a rule that turns "the renderer needs this" from a patch into a written request, and leaves a record of every one.

6809 disassembly ROM byte verification deterministic replay integer-only core adversarial review multi-agent orchestration no build step

Two skins, one simulation

04

Switching modes mid-flight does not touch the run. If you toggle while the ship is moving and it keeps moving, you have understood the architecture without reading a word of it.

Classic

The preservation baseline

Canvas 2D straight over the original framebuffer, the palette derived from the resistor ladder rather than eyeballed, 16.640 ms frames, nothing added.

  • Sixteen colors, exactly the sixteen it had
  • The scanner still lags
  • No filter may alter a simulation result
Enhanced

The same game, better lit

WebGL2 over the identical state: bloom, phosphor persistence, redundant feedback for events the original signaled with color alone. No mechanic changes, ever.

  • Presentation options only
  • Same seed, same replay, same score
  • Arrives after Classic is proven

Anything that would change a mechanic — a horizontal axis on the stick, analog thrust, aim assist, auto-fire — is either refused outright or offered as an explicitly labeled deviation, excluded from the regression corpus and flagged on the score screen. The accessibility options are graded by whether they change the input lines, the difficulty, or only the picture. Three of them are switched on above, which is what that rule looks like when it is used rather than quoted: directional thrust on (D-INP-3), unlimited smart bombs (D-ASSIST-1) and hyperspace that cannot kill you (D-ASSIST-2). All three are named, reversible from the strip, and switchable from the controls under the cabinet — the scheme in ⌨ Controls, the other two in Assists. The core ships with all three off; only this page turns them on, and the two assists mark the run not score-valid the first frame either one actually changes an outcome.

The work behind it

05

The documents the build was written against. They are the deliverable as much as the game is.

No ROM images are distributed with this page, and none are needed to run it: the simulation is source code, not an emulator with a cartridge. The research references hash-verified images the author owns.

Open in Lab mode to watch the game work: the frame clock against the host's, the raw switch bytes and the edges the hardware destroys, the RNG's three bytes, and a live tape of every event the simulation emits. It is off by default, because a visitor who presses a key by accident should not land in a debug view.

The instruction card

06

The cabinet split the work between the hands: one hand did nothing but the stick, the other did all five buttons. Two schemes are offered — the one that keeps that split exactly, and the one this page boots with, which does not. This card follows whichever is selected.

Fly left / right —

Hold an arrow and the ship goes that way. This is not what the game does, and the difference is the whole reason it is labeled: Defender has no left-right axis. It has a Thrust line that pushes wherever the ship already points and a separate Reverse line that flips it. So an arrow that agrees with the facing raises Thrust; an arrow that opposes it raises Reverse for exactly one frame first, then Thrust — the same two switch closures a player's hands would have made, in the same order, at a speed a hand can reach.

Thrust — Space

The only sustained hold in the game, so it goes on the thumb: the one digit that can hold indefinitely at no cost to the other four. It sat on the middle finger for three design iterations before someone noticed that put the game's signature move — flick Reverse while thrusting — on the worst finger pair the hand has.

Reverse — D

A flick, performed constantly while thrusting. Index-and-middle is the strongest independence pair on the hand. It has to be a different finger from Fire: a Reverse pressed on the same frame as Fire is silently destroyed by the switch scan, and that is original behavior we are required to keep.

Fire — Space

Hammered, up to twenty times a second, so it wants the fastest and most durable digit the hand has — the thumb on Space in the default scheme, the index finger on F in the arcade one, where the thumb is already holding Thrust. Holding it down gives you exactly one shot; that is the hardware, not a bug.

Up / Down —

A two-way stick, and nothing else. One finger rocks between the two arrows, which is exactly the motion the cabinet's stick made. There is no horizontal axis in Defender — the default scheme's and are not one, they are a shorthand for the Thrust and Reverse lines, and the simulation never sees them.

Smart Bomb — B · Hyperspace — H

Rare and expensive, kept well away from the flying hand where they are hard to hit by accident. Hyperspace kills you roughly a quarter of the time; that number comes from the ROM's own random draw, not from folklore — and it is the number the Assists button turns off.

Everything is rebindable

Physical key positions, not letters, so the layout survives AZERTY and Dvorak intact. Two schemes — the laptop one above and the cabinet's own grammar — and four layouts between them, plus gamepad support that keeps Thrust and Reverse on discrete buttons. Esc pauses; it can never be bound to anything.