# Status The restarted board (docs/restart.md, 2026-11-19). Every number names its commit and date. Where the build stands and what is next: [build-status.md](build-status.md). ## Gates | Rung | Command | Result | Commit, date | | --- | --- | --- | --- | | Unit tests (board, PPU, S-SMP, S-DSP) | `.venv-pypy/bin/python -m pytest -q -m "not slow" tests` | 66 passed, 1 skipped (63 before the tool move, plus 3 in `tests/test_emu_tools.py`) | 2026-11-24 (the tool-move commit) | | Milestone 1: gilyon `cputest-full` | `pytest -m slow tests/test_milestone1_roms.py` | **Success**, 649 tests | 40554f9, 2026-11-19 | | Milestone 1: gilyon `cputest-basic` | same | **Success**, 452 tests | 40554f9, 2026-11-19 | | Milestone 1: krom `CPUTest/CPU` (23) | same | **23/23 pass**, every PASS the source prints reached, 0 FAIL | 40554f9, 2026-11-19 | | Milestone 1: krom `BANK` (5) | same | **5/5 pass** | 40554f9, 2026-11-19 | | Milestone 1: the whole file | same | 30 passed in 130 s (PyPy 7.3.20) | 40554f9, 2026-11-19 | | Milestone 1: MAME lockstep (SMW + two HiROM games, 2M instructions) | `scripts/mame_trace.py` then `scripts/mame_lockstep.py` (docs/mame-oracle.md "The lockstep") | SMW 2,000,000 / Chrono Trigger 2,000,000 / DKC 1,853,731 MAME instructions compared; 54.2 / 80.1 / 90.8 % of aligned instructions with every register equal; every divergence named (S-SMP ports, frame/line timing, WAI with /IRQ held, power-on memory) but 1 in Chrono Trigger; every per-instruction clock difference is MAME's instruction timing against WDC's table (XBA, indexed X=0, STA abs,X page cross, JMP (a,X)) or open (RTI, 9 cases); no board correction | 51066de, 2026-11-23 | | Milestone 2: krom PPU pictures | `pytest -m slow tests/test_milestone2_pictures.py`; `scripts/ppu_pictures.py` | **26 of 43 exact** at 5 bits (+1 near); 30 of 41 equal to Mesen2 (closed box) at frame 60; the rest named in docs/ppu-status.md (U9 first hi-res column 6, animated/frame-dependent 9, WaveHDMA 1) | 3e30f1e, 2026-11-19 | | Milestone 2: gradient-test | same script | equal to Mesen2's frame; its own text satisfied | 3e30f1e, 2026-11-19 | | Milestone 3: S-DSP + S-SMP rungs 0-3 | `pytest tests/test_smp.py tests/dsp`; `scripts/dsp_compare.py` | 47 passed, 1 skipped; 13/14 synthetic .spc cases and 38/38 game tracks (19 games, 12.16 M samples) value-exact against snes_spc 0.9.0 run as a closed box; D1 (FIR saturation) recorded | 8d50a42, 2026-11-19 (docs/dsp/status.md) | | Milestone 3: gilyon `spctest` through the board | `pytest -m slow tests/test_milestone3_roms.py` (needs `SNES_IPL` or `MAME_ROMPATH`) | **Success**, 557 tests | 433f2de, 2026-11-19 | | Milestone 3: krom `CPUTest/SPC700` (7) | same | **7/7 pass**, every check reached (71 min on PyPy with the PPU drawing) | 433f2de, 2026-11-19 | | Milestone 4: header census over the licensed No-Intro set | `python -I scripts/header_census.py` | **2,852 of 2,854** plain boards map right against MAME's software list (CC0), 141/141 special boards; 2 probable list errors; SRAM size 2,844/2,854 (docs/cartridge.md "Header census") | 2026-11-23 (this commit) | | Milestone 4: SRAM saves (unit) | `pytest tests/test_board.py` | maps, mirrors, battery flag, `.srm` round trip pass | same | | Milestone 3: blargg spc_dsp6 through the board | scratch driver (docs/dsp/status.md rung 5) | **111 of 111, PASSED TESTS** (six S-DSP fixes, each in docs/dsp/status.md); Mesen2 passes 111 too (closed box) | 2026-11-23 (this commit) | | Milestone 3: blargg spc_timer, spc_smp, spc_mem_access_times | same | **PASSED TESTS** x 3 | 1a836e1, 2026-11-23 | | Milestone 3: S-DSP synthetic cases after the spc_dsp6 fixes | `python -I scripts/dsp_compare.py --samples 64000` | **16/16 value-exact** (kon-redecode, brr-wrap new; saturation exact since D1 was settled) | 2026-11-23 (this commit) | | Milestone 4: smoke list against Mesen2 (34 games, frames 300 and 900, Mesen2 at -6..+3) | `smoke.py mesen` then `smoke.py board` (below) | **16 exact at both checkpoints, 14 at one, 4 at neither**; 0 exceptions | 2026-11-23 (this commit) | | Milestone 4: smoke list, board frames +-30 around each checkpoint | `smoke.py board --window 30` | **28 exact at both checkpoints (phase only), 6 at one, 0 at neither**; the 6 left: U10 brightness curve 2, SRAM power-on 1, animation/RNG 3 (below) | 36bf2cf + DSP fixes, 2026-11-23 | | Milestone 4: smoke list, again (38 games: the 34 above and 4 from the full sweep) | `smoke.py board --window 30` | **27 exact at both checkpoints, 7 at one, 0 at neither** on the 34 (SF II Turbo's frame 300 is now one 5-bit step off, mid-fade: U10; the 28 of 36bf2cf counted it exact); the 4 added: 3 exact at both, Kawasaki at neither (below) | 0070aaf and f26826f (identical), 2026-11-24 | | Milestone 4: smoke list against **mesen2-runner** frames (38 games; Mesen2 via `run.py`, power-on zeros, every frame drawn: every picture repeats, validation.md "Moved to mesen2-runner") | `smoke.py mesen` then `smoke.py board --window 30` | **27 exact at both checkpoints, 7 at one, 0 at neither** on the 34; the 4 added: 3 exact at both, Kawasaki at neither. Same counts, two games moved: ActRaiser 900 now exact (Mesen2's SRAM powers on as zeros too), Pocky & Rocky 300 now near@+2 (one 5-bit step; not looked at by eye); the one-checkpoint 7 are SF II Turbo 300 (near), EarthBound 900, A.S.P. 900, Axelay 900, Rendering Ranger R2 300, Jaki Crush 300, Pocky & Rocky 300 | board fd45228 (unchanged), 2026-11-24 | | Milestone 4: **full compatibility sweep**, 4,089 images of the main No-Intro set, frame 300 against Mesen2 within +-30 frames | `sweep.py run --at 300 --jobs 32`, `sweep.py summary` ("The full sweep" below) | **3,514 exact, 339 one 5-bit step off (U10), 105 picture, 8 hang (blank), 0 crash, 123 unsupported**; licensed plain boards (the brief's set): 2,807 of 3,162 exact | f26826f, 2026-11-24 | | Mesen2 consumers on mesen2-runner 0.3.0 (one run per game with `--frames-at`; the probe suite ends at `--until`) | `smoke.py mesen`, `sweep.py mesen`, `suite_run.py --on mesen` (validation.md "One run per game") | smoke's 760 Mesen2 pictures byte-identical to the cache, verdict unchanged (27 / 7 / 0 on the 34), 774 s to 55 s wall; sweep's 76 smoke-list pictures identical, 74 s to 57 s; probe suite battery RAM SHA-1 `4d57989a` unchanged, 114.5 s to 26.6 s | 2026-11-24 (this commit) | | S-DSP referee from snes-spc (`$EMU_TOOLS_GPL/tools/snes-spc/build/spc_dump`); snes_spc's archive no longer fetched or kept | `dsp_compare.py`, `dsp_run_referee.py --regs`, `pytest tests/test_smp.py tests/dsp` | the same binary bytes; outputs identical on all 1,028 `.spc` files; 49 passed, 1 skipped | 1a9a66c, 2026-11-24 | | Domains and channels named ([domains.md](domains.md)); the APU ports one object, `smp.CPUPorts`, with no behaviour change | `pytest -m "not slow" tests` (adds `tests/test_domains.py`); `smoke.py board --window 30` before and after; `suite_run.py probe-pack/00-OURS/suite.sfc --on board --machine sfc-v1` before and after | unit tests 71 passed, 1 skipped (66 + 5); smoke list verdicts identical (27 / 7 / 0 on the 34; 30 of 38 exact at both) and all 76 `board-*.png` byte-identical; the board's probe-suite battery RAM SHA-1 `6bbd9702` before and after, with the IPL ROM and with the port stub (3,498 frames); Mesen2's `4d57989a` is not affected (no board code runs in it) | 2026-11-25 (this commit) | | S-CPU port writes posted at their own S-SMP cycle (`CPUPorts.cpu_post`/`settle`, `cleared`; timing.md "Two clock domains", port-race.md "The overshoot, measured") | the same gates as above, plus the three port-race games (`sweep.py run --rerun --at 300 --at 900`), `port_race_run.py --on board`, `header_census.py`, milestones 1-3 | unit tests **73 passed, 1 skipped** (71 + 2 new); milestone 1 30 passed; milestone 2 26 passed, 17 xfailed; milestone 3 (spctest, krom SPC700) 8 passed; census unchanged (2,852 / 141 / SRAM 2,844); probe-suite battery RAM SHA-1 **`6bbd9702` unchanged** (IPL and stub); smoke list **27 / 7 / 0 on the 34, unchanged**, the 4 added now **4 exact at both** (Kawasaki was at neither); 13 `board-*.png` of 11 games changed (Chrono Trigger 300 and 900, Combatribes 900, Cybernator 300, Home Alone 300 and 900, Mortal Kombat II beta 900, Jaki Crush 300, Pocky & Rocky 900, Super Punch-Out!! 900, Undercover Cops 900, Kawasaki 300 and 900): each looked at, the same scene at another animation or scroll phase, verdicts unchanged, and each game had S-SMP port reads the old code timed late; Kawasaki (USA, Europe) **exact at 300 and 900**, Zenki still blank; port-race window D cycles + 0 (was + 21); speed within noise (SMW 300 frames best of 3: 15.93 s before, 16.05 s after) | 2026-11-25 (this commit) | | Probe suite on the board vs the console's save (tier 1) | `scripts/suite_run.py probe-pack/00-OURS/suite.sfc --on board --machine sfc-v1` then `suite_results.py tests/console/suite-2026-10-25.srm BOARD.srm --diff` | see below | c9a22d2, 2026-11-19 | ### The probe suite against the console (c9a22d2, 2026-11-19) The console ran suite build 56b9443 (format 1); the board ran the current build (format 2), so a few tags' row layouts differ (MRFS, AJIR). 3,499 frames, 576 s on PyPy. | Agreement | Tags | | --- | --- | | **every row equal** | HVLT (the $2137 and WRIO latches, 6 rows), MULF, DIV0, WDMA (WRAM-to-WRAM DMA, including B-to-A's open-bus byte), LINE, HDOR, SCPA | | timing rows within one dot, the rest phase-dependent (the console's reset phase is random; the suite's rows depend on it) | IRQN: 20 of 49 rows equal, 28 of 49 at line 100; RFSH, AJT1, AJ*, HDLT, HDSW, DEND, CRSH | | known difference, recorded not fixed | MREP (WRMPYB rewritten 7 cycles in: console $0000), DRST | | need milestone 2 (the PPU draws nothing yet) | OBUS ($213E flags), MIDF, OAWA-OAWD, OAMR, CGWS, CGRS, PPUW, OBJF, DISP, HVFF (PPU2 open bus) | | need milestone 3 (the APU is a stub) | IPLS, CLKR | | not comparable | BOOT (reset position: the console's is random), MRFS (rows changed between formats) | What the suite changed in the board: STAT77 bits 4/5 (OBUS: the console overrules fullsnes), one more IRQ poll (FITTED to HVLT/IRQN), anomie's HTIME 0 rule (IRQN). The first build (archived) reported the same gilyon and krom results; the rewrite was not compared with it (rule 2). Speed: about 12 frames a second on PyPy for the CPU test ROMs (no pixels yet). ### The smoke list against Mesen2 (2026-11-23) `tests/smoke.txt`: the problem ROMs found by this build, 12 classics, and 14 games from the SNESdev wiki's "Tricky-to-emulate games" (coprocessor-free). Mesen2 b9fa69d is a closed box and randomises power-on memory, so its frames vary run to run; a difference is a lead. | Verdict | Games | | --- | --- | | exact at 300 and 900 | Battle Racers, Joe & Mac (Retro-Bit), Burn-in test cartridge, Zelda ALttP, F-Zero, Super Castlevania IV, Mega Man X, Secret of Mana, Gradius III, The Combatribes, Home Alone, Soul Blazer, Illusion of Gaia, Super Ghouls 'N Ghosts, The Lost Vikings, Krusty's Super Fun House | | exact at one | Super Mario World, DKC, Undercover Cops (Retro-Bit), Tales of Phantasia, Super Metroid, SF II Turbo, Final Fantasy III, EarthBound, Super Punch-Out!!, ActRaiser, Cybernator, Axelay, Jaki Crush, Pocky & Rocky | | neither | Chrono Trigger and Contra III (one side mid-fade: phase), A.S.P. (sprite positions), **Rendering Ranger R2** (the board's picture stays blank: the S-CPU polls `$2143` = `$FF` while the S-SMP runs code at `$FF28`; the wiki lists it as "infinite loop with SPC": a lead) | **Triage (2026-11-23).** Rendering Ranger R2 was a board bug: the S-SMP's port stores were visible to the S-CPU up to an instruction early, so its upload handshake read the wrong byte (fixed in 36bf2cf; the game now boots, equal to Mesen2 at 900). Then the board was run with `--window 30`: 28 games are exact at both checkpoints within +-30 frames of Mesen2's, so their differences are the reset phase (the board trails or leads by up to 26 frames; Home Alone by 8). The six checkpoints left, by eye and by pixel counts: | Game, frame | What differs | Lead | | --- | --- | --- | | Rendering Ranger R2, 300; Jaki Crush, 300 | mid-fade, every colour one 5-bit step off Mesen2's at every nearby frame (grey 21 against 22/20; blue 13 against 12) | U10, the brightness curve (board c(N+1)/16, Mesen2 floor(cN/15)); console photo queued (PROBE-QUEUE.md #4) | | ActRaiser, 900 | the board's title offers CONTINUE / NEW GAME, Mesen2's only START | the board's all-zero SRAM passes the game's save check (power-on SRAM: HYPOTHESIS zeros) | | EarthBound, 900 | the intro's static | random by design | | A.S.P., 900; Axelay, 900 | fireworks, a glint on the locket glass | animation phase beyond the window or RNG; the scenery is equal | No rendering fault is left in the smoke list. All six wiki "doesn't boot"/"crashes" games in the list boot to a picture equal to Mesen2's at one checkpoint at least (Combatribes, Soul Blazer, Illusion of Gaia, Home Alone, ActRaiser, Jaki Crush). ### The full sweep (2026-11-24) Every image in `$NO_INTRO_DIR/Nintendo - Super Nintendo Entertainment System` (4,089 zips; the Private, Aftermarket, Satellaview and Sufami Turbo folders not read), each from power-on with no input, its frame at 300 compared with Mesen2 b9fa69d's (run as a closed box, `--region ntsc` because the board is an NTSC console; OBSERVED) within +-30 board frames, by `scripts/sweep.py` (categories in its docstring). Results: `tests/mame_traces/sweep/` (local, gitignored); every failure, by category: [tests/sweep-failures.txt](../tests/sweep-failures.txt), the next quick-sweep list. Only frame 300 was compared: the machine ran at load 70-130 from other work, and one pass of 4,089 games took 6 to 10.5 hours of wall time with 32 workers; frame 900 waits for a quieter machine (672 of the exact games are black on both sides at 300). | Category | Before (board 0070aaf), all | After (f26826f), all | After, plain LoROM/HiROM boards | After, licensed plain boards | | --- | ---: | ---: | ---: | ---: | | exact | 3,503 | **3,514** | **3,407** | **2,807** | | step: every differing pixel one 5-bit step off | 338 | 339 | 339 | 272 | | picture: differs by more | 106 | 105 | 105 | 80 | | hang: board blank all through the window, Mesen2 not | 18 | 8 | 8 | 3 | | crash | 0 | 0 | 0 | 0 | | unsupported board, not exact | 124 | 123 | 0 | 0 | | total | 4,089 | 4,089 | 3,859 | 3,162 | "Before" is the first sweep's runs (0070aaf's board; the sweep tooling's commits on top change no board code) classified with the final classifier (it ranks the window's frames by pixels two steps or more off, and counts a matching STP as exact: four PAL games stop on an NTSC console on both sides); as first ranked it read 301 step and 143 picture. "After" is a full second run at f26826f, all 4,089 from scratch. As a check on determinism it was compared with the first sweep's results plus a rerun at f26826f of the 463 games that changed map or were not exact: 0 of 4,089 verdicts differ. A special board (by MAME's software list, CC0, or the header's chipset byte) counts as unsupported unless its frame 300 is exact anyway: 107 are (23 `hirom_dsp`, 19 SA-1, 13 other DSP, 9 `lorom_poke`, ...; a coprocessor is often idle or both pictures black that early), so "exact" in the second column overstates what the board runs; the plain-board column does not. Unsupported, not exact: Super FX 55, SA-1 30, Cx4 6, other custom chips 5, S-DD1 4, BS-X 4, DSP 2, pirate mappers 2, ST018 1, OBC1 1, 11 coprocessor firmware dumps and 2 adapters (not cartridges). What the failures are (by eye on 40 of them, by pixel counts on all): - **step (339)**: fades. Nearly all are boot logos mid-fade at frame 300; the board's brightness curve (c(N+1)/16, fullsnes) and Mesen2's (floor(cN/15)) put a colour one step apart. U10, the console photo is queued (PROBE-QUEUE.md #4); not changed. - **picture (105)**: mostly the same fades at low brightness, where the curves and a one-frame phase add up to two or three steps (Battle Clash, Hunt for Red October), animation beyond the window (ABC Monday Night Football, Crayon Shin-chan 2), and a group differing by 448 pixels, one column of a 512-wide picture: U9, the first hi-res column (Yu Yu Hakusho, World Cup Striker, Ninjawarriors Again, Titus the Fox; PROBE-QUEUE.md #3). None was traced to a rendering fault. - **hang (8)**, the board blank where Mesen2 shows a picture: *Kawasaki Superbike Challenge* (USA, Europe) and *Kishin Douji Zenki - Tenchi Meidou (Japan)*, the 3 licensed ones, are S-CPU/S-SMP port races (below); *Batman - Revenge of the Joker (Proto)* is a header question (cartridge.md); *Daffy Duck (Beta)*, *Wolfenstein 3D (Beta 1)* and two pirates are not looked at. Fixed (each verified on the game and with the census, the smoke list and the unit tests): 1. Header detection: the LoROM fallback needs a LoROM entry point, and gives way when only the HiROM vector lands on start-up code; a score tie goes to the start-up code (3155f3f, 0f59550, f26826f; docs/cartridge.md). 12 images change map, betas, protos and two unlicensed: 10 were blank, 1 wrong and 1 counted unsupported; now 11 are exact and 1 is one step off, mid-fade. No test ROM or probe-pack ROM changes map (281 + 119 checked), so the milestone 1-3 gates are untouched. 2. The sweep's own classification (region lockouts, firmware zips, adapters, fade ranking). **The port races (Kawasaki fixed 2026-11-25; Zenki open).** Since 2026-11-25 an S-CPU port write is posted at its own S-SMP cycle before the catch-up, so the S-SMP's reads and CONTROL clears inside the catch-up's last instruction see it at the right cycle (timing.md "Two clock domains"; the old code saw it 0-3 S-SMP cycles late, measured in port-race.md "The overshoot, measured"). Both *Kawasaki Superbike Challenge* images now boot and are exact against Mesen2 at frames 300 and 900 (and boot on the console's row at 24.576, 24.607 and 24.642 MHz). Why the greenlet experiment below did not fix Kawasaki is not known (its code was not kept). *Zenki* still hangs: the board's window is now exactly D S-SMP cycles, 167.8 master clocks for Zenki against a 166-clock refresh gap; reads sampled at mid-cycle (a scratch experiment, FITTED to Mesen2) reproduce Mesen2's probe grid cell for cell and boot Zenki, and wait for the console's save (port-race.md). The history: *Kishin Douji Zenki*: the S-SMP writes CONTROL to clear its input ports and then reads all four, looping until they read zero, while the S-CPU rewrites `$2141` = `$10` in a loop and waits for `$AA`. On the board the S-CPU's writes come every 6.01 S-SMP clocks (7.91 across a DRAM refresh) and the S-SMP's clear-to-read window is 8 clocks, so the S-SMP can never see zeros; the console evidently does. *Kawasaki* loses its upload handshake (the S-SMP ends in a crash at `$0000`) and boots or not depending on the S-SMP clock (it passes at 24.637 MHz on the reference row and fails at 24.576, 24.607 and the console's measured +2,700 ppm on its own row). Tried without fixing either (not kept): exact port timing in both directions (the S-SMP as a greenlet coroutine pausing before any access past the S-CPU's time: Zenki and Kawasaki still hang, 16 % slower), port reads sampled at the start of the S-SMP cycle, the console's measured S-SMP clock. The answer is below one S-SMP cycle (21 master clocks): where in each chip's cycle a port write lands and a read samples, and where the refresh falls. Both games are commercial releases, so a console boots them; the timing model is short somewhere. Next step: the console probe that measures the clear-to-read window against an S-CPU write loop, built 2026-11-24 as `00-OURS/port-race.sfc` and queued (PROBE-QUEUE.md #5; [port-race.md](port-race.md)). Predictions, not hardware: the board's window was D S-SMP cycles + 21 master clocks before 2026-11-25 and is D cycles + 0 now, Zenki's loop seeing the zero 0 times in 4096 either way; Mesen2's (closed box) is D cycles - 10.5 clocks, 26 times in 4096. ## Milestones 1 done (lockstep included); 2 built (picture gates above); 3 done through the board (spc_dsp6 111/111); 4 done: census, saves, smoke list and the full sweep (frame 300); 5-8 not started. Details in build-status.md.