# Status Every rung, its command, its count, and the commit and date it was measured (charter methodology, "Documents"). Tier: `x-rust`, the transcription of **a2600-python `28fb095`** on 6502-rust `129e742` (crate `sixfiveohtwo`, 6502-python `741419a`, the revision the reference pins too since `28fb095`; first transcribed at `9475aa1`, repinned 2026-11-14 in `149853e`). All counts are fidelity (this board against the reference) unless a row says the judge is hardware evidence carried over from the reference; "matches the Python" is not "matches the hardware". **Reference repinned 2026-11-22** (the same code): a2600-python `4ad24f2` (`28fb095` plus documents and its repin of 6502-python) and 6502-python `828b619` (`741419a` after that repository's history rewrite of 2026-11-21, the same tree; `741419a` is on no branch now). The hashes in the rows below are the ones they were measured at. **Reference repinned 2026-11-25** (the same code again): a2600-python `c410e47`, which is `4ad24f2` plus documents and its `pinned_repos.json` dropping the Stella and Gopher2600 source pins (closed boxes: their source is no longer fetched); `git diff 4ad24f2 c410e47` touches no source, test or gate script, so nothing was transcribed and the cached reference traces stay valid. Run live without the cache (serial, music, handover: 9 cases): 9 of 9 identical. `scripts/ladder.sh` at the repin (2026-11-25): passed end to end, every count as in the rows below (102 tests; 39 of 39 die traces; timers 14 of 14 and 140 of 140; 116,730 of 116,730 serial cells; hashes 10 of 10 and 3 of 3; lockstep 232 of 232, and 232 of 232 with the save half way). Seeded faults were not rerun (no source changed). ## Rungs | Rung | Command | Count | Commit, date | | --- | --- | --- | --- | | 1. Tests (the reference's behaviour tests, transcribed) | `cargo test --release` | 102 pass (board 10, cartridge 9, controllers 11, dpc_clock 5, inputs 5, misc 6, picture 9, revisions 7, riot 10, schemes 17 (one added here, for a gate blind spot), sockets 13); the data tests read the reference checkout's fetched references and skip without them | `149853e`, 2026-11-14 | | Whole ladder, rungs 1-6 | `scripts/ladder.sh` | passed end to end | `149853e`, 2026-11-14 | | fmt, clippy (rustup stable 1.99) | `cargo fmt --check`; `cargo clippy --release --all-targets -- -D warnings` (and `--features frontend --bin a2600-play`) | clean; four lints allowed in Cargo.toml to keep the reference's shape (index loops, tuples, `& 0xFF`, `(lo + hi + 1) // 2`) and one for run-time row checks | `149853e` | | 2. Die traces, natively | `a2600-gates die` | 39 of 39 (22 tia-fpga, 17 the reference's own; hmove_cycles and hmove_resp0 with exactly the reference's C27 departures) | `149853e`, 2026-11-14 | | 3. Timer ROMs (console results: TEST ROM) | `a2600-gates timers`; `timers --every-row` | 14 of 14 on NTSC; 140 of 140 on all ten rows (`MACHINES` and `HOSTED_MACHINES`: the NTSC result reproduced on each row, nothing more) | `149853e` | | #699 serial tables (six consoles: TEST ROM) | `a2600-gates serial CONSOLE` | 116,730 of 116,730 cells (19,455 per console) | `149853e` | | Frame hashes (the reference's tests/frame_hashes.tsv) | `a2600-gates hashes` | 10 of 10 identical to the reference's record (pixels, audio doubles, registers) | `149853e` | | Frame hashes per row (its tests/frame_hashes_rows.tsv: Pitfall II with music, NTSC, PAL, SECAM) | `a2600-gates hashes-rows` | 3 of 3 identical to the reference's record | `149853e` | | 4. Per-slice lockstep | `scripts/lockstep.py --reference-cache external/refcache` | 232 of 232 cases identical (table below) | `149853e`, 2026-11-14 | | 5. Save states in the gate | `scripts/lockstep.py --reference-cache external/refcache --save-at-half` | 232 of 232 identical | `149853e`, 2026-11-14 | | 6. The window, headless | `SDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=dummy a2600-play ROM --frames 120 --screenshot F` | runs and saves Pitfall!'s picture; no human has looked at the window | `149853e` | | 7. Seeded faults | `scripts/seeded_faults.py` | 50 of 51 caught at `149853e`/`7651aa2`, 2026-11-14: the reference's 37 all caught (its two new DPC-clock faults by `tests/dpc_clock.rs`, `hashes-rows` and the PAL music case); the 6 new Rust-specific ones all caught (CLOCKED gate shut: socket test and the PAL/SECAM music cases; `on_sample` silent; an adopted CPU reset: the hand-over test and the three handover cases; timer ROMs ignoring the row; the smoke list keeping comments); `api-name-gone` needed the gates binary to spell out the hosted rows to keep building (`7651aa2`), then caught by the API test; `state-forgets-data-bus` still missed, not counted (below). Before the repin: 43 of 44 caught: the reference's 35 all caught (by their transcribed tests, and by the lockstep or a native gate wherever the fault reaches one); 8 of 9 Rust-specific (save state, softlist reader, RIOT division, the COPIES table, the snoop flag, the DPC nibble swap). `dpc-nibble-swap` is a lockstep blind spot (Pitfall II never reads $1018-$101F), caught by a test added here; `state-forgets-data-bus` is missed by every judge, likely an equivalent mutant (after a save at an instruction boundary the next cycle is a driven opcode fetch), not counted | `0fc441d` (42 faults), `1ccbfbd` (the two rerun), 2026-11-14 | The whole gate: `scripts/ladder.sh` (`--faults` adds rung 7). ## The lockstep and its case table One line per slice of 19,912 CPU cycles (262 lines): the CPU's registers, board cycles, halted cycles, instructions, the TIA's line, step and frame, the RIOT's timer, flags and port A registers, a CRC-32 of every bus cycle (kind, address, value, cycle), a CRC-32 of every line the TIA finished (all 228 clocks, blank included) and a CRC-32 of the audio samples (doubles). Both sides read MAME's software list from the same `MAME_HASHPATH`; each trace's first line names the scheme the load chose. Both sides hand the row's CPU clock to the cartridge (`load(..., cpu_hz=)`, as `System.from_rom` does). `scripts/cases.tsv` (232 cases, about 23,800 slices): | Group | Cases | What | | --- | --- | --- | | smoke | 93 | the reference's tests/smoke_dumps.txt, every name, 60 slices, NTSC as its sweep runs them | | scheme | 26 | 2K, 4K, F8, F6, F4, F8SC, F6SC, F4SC, FA, E0 (2), 3F (2), FE (2), E7 (16K, 12K, 8K), CV (2), UA, F0, 32IN1, DPC (300 slices), AR, and an explicit `--scheme F8SC` | | input | 12 | joysticks (River Raid, Pitfall!, Combat with both), paddles (Kaboom!, Breakout, four in Warlords), Driving (Indy 500), Booster Grip (Omega Race), keypads (Codebreaker, BASIC Programming, Star Raiders), SaveKey (Go Fish!), with Reset, Select, B/W and difficulty switches | | row | 12 | PAL (5), SECAM (2), the #699 rows SECAM woody, PAL 7800, light sixer, Jr. '91, and the NTSC 7800 row (hosted) | | timer | 80 | Stella #108 (2) and #606 (6) ROMs on NTSC and on the nine other rows (PAL, SECAM, the five #699 consoles, both 7800 rows) | | serial | 2 | #699 early_HMOVE on the PAL 7800 row, HMOVE_RESPx_M1 on the Vader row, Reset held as `gates.serial_record` holds it | | music | 4 | Pitfall II with its DPC music on (`scripts/inputs/pitfall2-music.txt`: Reset at slices 30-39, fire at 100-109), 400 slices, on NTSC, PAL, SECAM and the PAL 7800 row: each row's clock reaching the oscillator | | handover | 3 | a running CPU handed mid-run to a new board on the running chips (`--hand-over SLICE`, `System(..., board=, cpu=)`): River Raid with the joystick script, Pitfall! on the NTSC 7800 row, Pitfall II's music on PAL | The reference side runs on `external/venv` (PyPy 3.11 with `external/a2600-python` at `c410e47` and `external/6502-python` at `828b619`, the revision the reference's pyproject pins; until 2026-11-22 `28fb095` and `741419a`, until 2026-11-25 `4ad24f2`, the same code); its traces are cached by case in `external/refcache` (move it aside, never delete it, when the reference pin moves: the `9475aa1` traces are in `external/refcache-9475aa1`). ## Speed (multiples of real time) `a2600 ROM --frames 1200` on this shared machine (load average about 8), release build: Pitfall! 3.3x, Combat 3.2x, Pitfall II (DPC) 2.65x real time. A reference board, not tuned: speed is a2600-rust-fast's job. The reference runs at about 0.18x on PyPy. ## Rust-forced differences Each module's header lists its own. In short: callbacks (`on_line`, `pad_source`, `on_vsync`, the RIOT's port A listener, bus observers) are boxed closures handed the chip they hang on; the RIOT is shared (`Rc>`) so a keypad can read its port when the TIA is read; controllers take the TIA and RIOT as arguments instead of holding them; the CPU owns the board as its bus (`system.board()`); keyword options are `Options`; dictionaries are arrays with lookup functions; the softlist is read by a small element reader keeping ElementTree's rules; Python's `round` is `round_half_even`; SaveKey saves live under `a2600-rust/` in the user's data directory (the reference uses its own name); `Audio.on_sample` is a boxed closure given the sample only (it cannot borrow the TIA mid-step to read `hclock`); `System(..., cpu=)` is `System::with_cpu`, which replaces a running `Mos6502`'s bus and hands the old board back. Additions the reference lacks: save states (`state.rs`), the trace tool, the native gates binary. ## Domains and channels The reference's: one domain (the colour clock drives the TIA, the 6507 at OSC/3 and the RIOT); channels the CPU bus, RDY, the RIOT ports, the TIA's pads and the audio and video pins. Transcribed in the same serial order (per CPU cycle, the TIA's six half clocks with the access on the sixth). No threads. ## Capabilities - Save states: yes (`state::save_state` / `load_state`), proven by rung 5. The cartridge's ROM image travels in the state (not yet measured or trimmed). - Threads: none. Concessions: none. ## Licences and provenance MIT; every source file carries an SPDX header; NOTICE carries the reference's notices. Written from the reference (MIT) and the family's documents only; no GPL, LGPL or unlicensed source and none of the archived Rust tiers were opened.