# Status Every rung, its command, its count, and the commit and date it was measured at (charter, methodology "Documents"). The reference is 65816-python at `71092a4` (its main on 2026-11-25, with 6502-python at `828b619` in its `.venv-pypy`); the frame is 6502-rust (`sixfiveohtwo`) at `71747eb`. Measured on Linux x86_64, rustc 1.93.1 (clippy and fmt from rustup stable 1.99), the reference on PyPy 7.3 (Python 3.11). "Identical" here is execution fidelity (this crate against the Python); the hardware confidence of each behaviour is the reference's docs/validation.md. The single gate is `scripts/ladder.sh` (rungs 0-7 in order; `FAULTS=1` adds rung 8). With the reference's caches full (`external/reference-cache/71092a4/`, made by the first run) it takes about 5 minutes on a loaded machine. Rungs 0-5 are the reference's own rungs, as its docs/validation.md "Results" lists them, each held to the reference's own result. | Rung | Command | Result | Measured at | | --- | --- | --- | --- | | 0 the bus schedule (the reference's rung 0) | `scripts/rung0.sh` | the opcode table: all 256 entries equal the reference's `OPCODES`; the reference's rung 0 states (its `tests/test_schedule.py` generator and seeds, 200 per opcode and mode: E = 1 and E = 0 with each M/X pair), **256,000 instructions, every cycle's address, value and the eight pins, the registers and the memory identical** to the reference's | `8129bf1`, 2026-11-25 | | 1 SingleStepTests 65816 @ `307c63f` (the reference's rung 1) | `scripts/rung1.sh` | all 512 files judged with the reference's readings (SH = $01, XH = YH = 0, the C1, C2 and C9 masks, C4 excluded): **5,080,136 pass, 264 excluded (C4), 0 fail**, the reference's line (`conformance/expected/sst.txt`) | `8129bf1`, 2026-11-25 | | 2 gilyon's cputest (the reference's rung 2) | `scripts/rung2.sh` | cputest-full "Success" at test $0649 after 4,886,625 cycles, cputest-basic "Success" at $0452 after 3,386,624; both lines the reference's (`conformance/expected/roms.txt`) | `8129bf1`, 2026-11-25 | | 3 krom's 23 CPU tests (the reference's rung 3) | `scripts/rung2.sh` (`rung3.sh` runs it) | all 23 spin at the reference's PC and cycle with **977 PASS rows** at the destinations the sources name and no FAIL; every line the reference's | `8129bf1`, 2026-11-25 | | 4 MAME 0.285 replay of seven games (the reference's rung 4) | `scripts/rung4.sh` | Super Mario World, Super Metroid, A Link to the Past, F-Zero, Chrono Trigger, Final Fantasy III, Donkey Kong Country: **55,576,306 instructions, 0 register divergences, 0 unexplained clocks**; each game's whole summary (interrupts, adjustments, the clock tallies by opcode) equal to the reference's (`conformance/expected/mame/`) | `8129bf1`, 2026-11-25 | | 5 the states P65C816 votes on (the reference's rung 5) | `scripts/rung5.sh` | the first 1,000 SingleStepTests cases of each file, C4's included, nothing masked: **508,400 cases, every cycle identical** to the reference's, so every vote its rung 5 recorded holds unchanged. The HDL (GPL) is not re-run: it judges the corpus and the core, not the transcription | `8129bf1`, 2026-11-25 | | 6 trace lockstep | `scripts/rung6.sh` | **42 of 42 scenarios byte-identical, 6,469,108 boundaries**: the harness DMA ROM (19), 4 interrupt workouts and 12 random-memory programs (20,000 boundaries each, random IRQ, NMI, ABORT and reset requests between steps and inside cycles, two in one cycle, RDY stalls with requests in held cycles; every boundary kind), and gilyon's two and krom's 23 ROMs in the harness from reset to their own end (cputest-full 1,398,798 boundaries) | `8129bf1`, 2026-11-25 | | 7 the frame carries the core | `scripts/rung7.sh` | `tests/interrupts.rs` (the reference's `tests/test_interrupts.py`, transcribed, plus a state round trip): 10 tests pass; no `Mos6502` symbol in any binary, every `sixfiveohtwo` symbol from its frame | `8129bf1`, 2026-11-25 | | 8 seeded faults | `scripts/rung8.sh` | see below | | ## Seeded faults `scripts/seeded_faults.py`: 38 one-line faults (the frame's confirmation on IO cycles, the operand wrap, note 2 and note 4's cycles, U1-U3, the emulation-mode stack, the modify cycle, the pins, the decimal adder, compare, BIT, the index widths, XBA, XCE, TXS, branches, CLI, REP and PLP's delayed I, the interrupt entry's pushes, B and its missing poll, WAI and ABORT, reset's stack cycles, RTL, JSL, the block moves, the opcode fetch's kind, the captured ABORT latch, the trace's boundary kind, and two in the harness), each built in a fresh copy and run through every judge. Result (2026-11-25, `scripts/rung8.sh`, 84 minutes on 2 jobs at load average 90): the control passes every judge; **37 of 38 caught** on the first run, caught by: tests 5, rung 0 25, rung 1 24, rungs 2-3 20, rung 4 11, rung 5 24, lockstep 34. Nine are caught by the lockstep alone (the frame's confirmation on IO cycles, CLI/REP/PLP's delayed I, the entry's missing poll, WAI and ABORT, the captured ABORT latch, the trace's boundary kind and others no single-instruction corpus can see). The one missed was in the harness: its DMA's transfer pattern, which no test ROM's DMA exercises beyond mode 0 (a blind spot, not an equivalent mutant). The fix is a scenario, `conformance/scenarios/rom-harness-dma` (a hand-assembled 32 KiB LoROM, own bytes: a mode 1 DMA into the WRAM port, whose second byte moves the port's address, then a load of what landed); with it the fault is caught by the lockstep (`seeded_faults.py --only`, the control passing again): **38 of 38**. The `tables` judge catches none by design. ## Speed Not a goal of this tier (charter: `-fast` is speed's). gilyon's cputest-full in the plain harness, reset to spin, 1,398,797 instructions and 4,886,625 cycles, one core (`taskset`), release build, on a shared machine with a load average of 76: **42.9 million instructions a second** (150 million cycles; best of 7, wall time, `target/release/bench`). The reference on PyPy 3.11 in its own harness: 3.4 million instructions a second (best of 3, process time, load average about 90): about 13 times. ## Not carried, and why - The reference's rung 5 tool (srg320's P65C816 VHDL, GPL, kept in emu-tools-gpl): not run here; rung 5 holds the crate to the reference on the same states instead. - The reference's rung 6 is the board's (snes-python); a Rust board will carry it. - The disassembler, debug session, console and command line: Python-side tooling. ## Open - **Provenance, branch `cleanroom-decimal` (unmerged):** the decimal adder (`src/alu.rs`) transcribes the reference's clean-room rewrite (its provenance item 2, branch of the same name). Gate on 2026-11-25: cargo test, fmt, clippy, rungs 0, 1, 2-3, 5 and 7 passed; rungs 0 and 5 judged against the reference caches of the pin `71092a4` (`ALLOW_OTHER_PIN=1`), which holds because the reference's old and new functions agree on every 8-bit input and 2,000,000 sampled 16-bit inputs per operation. Not run (shared machine): rung 4 (seven MAME replays), rung 6 (the lockstep) and rung 8 (seeded faults). Owed after the reference merges: repin `scripts/env.sh` to its new `main` commit, regenerate the rung 0 and 5 caches, run the whole ladder. - No remote: `gh repo create alewman/65816-rust --private --source . --push` is Aubrey's call.