# Status Every rung, its command, its count, and the commit and date it was measured (the family's methodology, "Documents"). Tier `x-rust`: what is proved is "matches the Python"; how the Python stands against a 32X is sega32x-python's docs/claims.md. **Reference:** sega32x-python `0553957` (its main, merged locally 2026-11-26: the repin `5e9dee4`, `time-lanes` `be9011c`, decision B6 `68517fe`, docs; its src tree `d532709`), on PyPy 3.11.15 with its pins installed (`.venv-sh2-8824075`): megadrive-python `efd80fc`, sh2-python `8824075`, m68000-python `4454d54`, z80-python `b59c80b`, ym2612-python `3cf4afd`, sn76489-python `beb859b`. **Dependencies** (`scripts/external.sh`): megadrive-rust `sockets-32x` `ef621e6`, its `sockets` `0959147` for rung 1's base; sh2-rust `board-context` `c5634ef`; ym2612-rust `a3ae306`, sn76489-rust `ac95bea`, ssp1601-rust `7249814` (megadrive-rust's path dependencies). ## The ladder (`scripts/ladder.sh`), 2026-11-26 at `f9b6867` | Rung | Command | Count | | --- | --- | --- | | 0 | `scripts/external.sh --check`; `cargo build --release`; `cargo test --release` | 6 dependencies at their revisions; builds clean; tests pass (rung 2's replay) | | 1, ADEN = 0 | `python3 scripts/passive.py` | **87 of 87** of megadrive-rust's cases byte-identical three ways (`md-trace` at `0959147`, `md-trace` on `sockets-32x`, and with a passive 32X); **81** with the passive 32X (the 6 with a fake socket device or a save state of their own compare the first two). 78 of 87 before the /TIME fix (below) | | 2, units | `cargo test --release --test units` (vectors: `scripts/make_unit_vectors.py`, seed 32) | **6,000 of 6,000** calls identical: each answer and the CRC of the device's whole state after it, and the whole state every 64th call. 990 SH-2 bus cycles, 1,769 68000/Z80 accesses (the line table, the mode, PRI, the shift and the swap among them), 863 peeks, 1,395 catch-ups stepping both SH-2s through our own boot programs, 495 PWM sample takes, 488 socket-7 lines, the line records between | | 3, whole machine | `python3 scripts/lockstep.py` | **21 of 21** cases identical, 16,360 frames; the SH-2 bus streams compared for the first 1,590 frames of them. The reference's own gate (testpico cold, reset, warm; the Mars Check Program 760; the PWM demo; NFL Quarterback Club with presses), the Mars Check demo, Sega's run-length and texture samples, the 240p suite, Knuckles' Chaotix with the FM, and 12 of the smoke list (Spider-Man, Virtua Fighter, Metal Head, Soulstar X, BC Racers, Doom, Star Wars Arcade, Virtua Racing Deluxe on a PAL Mega Drive, Mortal Kombat II, Kolibri, NBA Jam TE with its EEPROM, Space Harrier). The reference ran each in 100-1,224 s, this board in 3-32 s | | 4, save states | `python3 scripts/state_rung.py` | **21 of 21** identical through three save states each (a third in at a frame's start, half way 1,777 steps in, two thirds 3 steps in), loaded into a fresh machine, against the reference's uninterrupted trace. 10 of 20 before the mixer's PWM resampling was saved (below) | | 5, faults | `FAULTS=1 scripts/ladder.sh` (`scripts/seeded_faults.py`) | **31 of 34** counted faults caught (36 seeded; 2 equivalent). Caught by: `cargo test` alone for 2 (RMD routing; the shift's $FF exception, after the unit vectors gained line-table calls), the lockstep, the state rung or rung 1 for the rest. **Equivalent** (not counted): the 68000's waits as `waits * 6` (the board rounds a hold up to the 68000's clock edge, 7 MCLK, so 6n and 7n agree for every wait the Manual gives, at most 3); the finished frame's composite rows left out of a state (every row is handed over again before that buffer is read: no read the gate makes, or a frame boundary, can see it; a frontend drawing the last frame right after a load would, so they stay saved). **Blind spots** (missed by every check, the whole case table included): a WAIT state the device drives when the BSC's programmed waits fall one short (`extra == 1` with WAIT sampled never arises under the boot ROMs' WCR); DREQ1 never dropped (no case drives PWM DMA); RV = 0 leaving $380000-$3FFFFF unclaimed (no case touches that open-bus range with ADEN = 1). First run 29 of 36 at `f9b6867` (2026-11-26); the state rung's cases widened from 2 to 5 and the line-table calls added, then 31 | Every Python run: PyPy 3.11.15, `nice`, `PYPY_GC_NURSERY=1M`, at most 7 at a time; the machine at load 10-20. The reference traces are in `external/reference-cache/src-d53270907ef9-cd85ebaedc63/`. ## Speed (2026-11-25, `8724df7`) `s32x-run --frames 900`, one core at load 15-20: Knuckles' Chaotix 49.6 fps with the FM (0.83x real time), 33.7 without; Virtua Racing Deluxe 48.8 / 47.7; Star Wars Arcade 45.1 / 40.4; Doom 30.7 / 31.6. About 13-20 times the reference on PyPy; not optimised. ## Step 0: the reference repinned to sh2-python 8824075 sega32x-python pinned sh2-python `884aa30`; sh2-rust transcribes `8824075` (complete save states, DMA address errors). On sega32x-python branch `repin-sh2-8824075` (`5e9dee4`), with a fresh PyPy venv (`.venv-sh2-8824075`), its `scripts/gate.sh` before (`.venv-after`) and after, board code `74d6007` both sides: **byte-identical** -- pytest 108 / 1 slow / ruff clean both; testpico's 6 PNGs, the Mars Check Program's 118 files (760 frames: test 51 of 161 reached, ERROR COUNT 0), the PWM demo's WAV (352,520 samples) and 12 PNGs, NFL Quarterback Club's 54 PNGs, the Castlevania MAME lockstep report, VDPFIFOTesting 122 read / 0 failing, the mini sweep 115 rows 0 moved with and without the 32X. The whole Mars Check Program on `8824075`: 161 of 161, "all finished normally" by frame 7,000 (7,100 frames, 4,600 s). Save states: the format stays 2, but states of `884aa30` are refused by the core revision check. Recorded in sega32x-python's docs/status.md; not yet merged to its main (below). ## Upstream: fixes and requests - **sega32x-python, /TIME through the 32X** (branch `time-lanes`, `be9011c`): a passive 32X passed $A130xx to the cartridge by bytes and through the board's low decoder, so a board that decodes /TIME itself (megadrive-python's `mappers.Board`) lost its writes and its reads' high byte. Found by rung 1 (9 of megadrive-rust's cases: A Bug's Life, KOF99, Pikachu, Rockman X3, Super Mario Bros. 1 and 2, the Wisdom Tree multicart, Pier Solar, Sonic & Knuckles with Sonic 3); repro in its tests/test_slot.py; fixed there first, then here (`Sega32X::time_write`, `time_read_word`). Its gate's 32X runs are byte-identical on it. - **megadrive-rust, branch `sockets-32x`** (on `sockets` `0959147`; five additions, each a no-op for every other device, `cargo test` passing): `Clocked::video_first` (the board brings its VDP to the device's clock before the device's call: the reference's devices run `board.vdp.sync` themselves); `BusDevice::peek_byte` lent the board; `Cartridge::sda_line` (the reference's `AcclaimEEPROMCartridge` subclass); `Renderer::picture_side` and `AudioPath::source_side` (what the board's state leaves to a device, for the device's own save state). A request: these belong in megadrive-python's sockets first if the Sega CD board needs the same (the reference's `video_lines_to` notes "megadrive-python has no socket method for it yet (a proposal)"). - **sh2-rust, branch `board-context`** (`c5634ef`): `BusContext` carries the BSC's `waits` and `wait_pin`, which the reference reads in its callbacks (`chip.bsc.waits`). Additive; its `cargo test` passes; its full ladder was not rerun. - **sega32x-python docs** (commits `68517fe`, `4284775`): decision B6 on the FTOA finding; the Mars Check "161/161" and "51/161" made explicit; claims.md's SDRAM row brought up to sh2-python 8755c3a. ## What is left - Pushes and merges are Aubrey's: sega32x-python's main (4 commits ahead of origin, merged locally), megadrive-rust `sockets-32x`, sh2-rust `board-context`; this repository has no remote. - Rung 5's three blind spots to close: a case or unit call with WCR programmed one wait short of the device's, a game that drives PWM DMA (DREQ1), an access to $380000-$3FFFFF with ADEN = 1 and RV = 0 through the board's decode. - More whole-machine cases: the 27-title smoke list has 12 here; the release and beta lists none; longer runs. Each costs about 15 minutes of reference time per 900 frames. - Not transcribed: the debugger hook `on_step`; the reference's runner, CLI and harness (tools). A `-fast` tier for speed (this tier runs at 0.5-0.8x real time).