# The probe suite One ROM (`probes/suite/`) runs every console measurement the CPU can make by itself, one test after another, and writes the raw results to 32 KiB of battery RAM. Aubrey starts it on the Super Famicom through the EverDrive X5, holds B when the screen asks, powers off and on when it says ALL DONE, and sends the `.srm` from the SD card's `SAVE` folder. No screen is read off a photo. It replaces most of the probe pack (probe-pack.md): the pack's self-checking and picture ROMs are still there for what the CPU cannot measure. python -I scripts/build_probe_pack.py # the pack, with 00-OURS/suite.sfc python -I scripts/suite_run.py SUITE --on mesen --out mesen.srm # or --on mame (--on board: see below) python -I scripts/suite_results.py console.srm mesen.srm mame.srm board.srm [--diff] [--only TAG ...] `suite_results.py` sets any number of saves side by side, one column each, `*` on rows that differ. The emulator runs hold B the same way the tester does (the running test's flags are at WRAM `$1E10`). ## The framework (`probes/suite/suite.s`) - **Battery RAM:** a header (`SNESUITE`, format, run state, boot and run counts), a status byte per test (not run, started, done, hung), a boot log of 16 entries, a directory (tag, slot, length per test, so the decoder needs only the `.srm`) and the slots. - **Hangs:** a test is marked started before it runs. A boot that finds the run unfinished marks the started test hung and carries on with the next one, so a freeze costs the tester a press of reset (or a restart from the X5 menu). - **Reset position:** every boot latches the H/V counters as its first act and logs them with the version registers (undisbeliever's reset-position test). - **Interrupts** go through WRAM vectors (`NMI_VEC`, `IRQ_VEC`, `BRK_VEC`; `jml [abs]` trampolines in bank `$00`), so a test installs its own handler. - **Timed code** runs from the FastROM mirror (bank `$80`, `MEMSEL` = 1) as undisbeliever's tests do; handlers run from bank `$00` SlowROM, as theirs do (vectors are 16-bit). Every timed result also carries a latched H/V, so it does not depend on instruction counts being right. - **Resumable tests** (`F_RESUME | F_DIRECT`, only CRSH) keep their own progress in their slot and continue after a reset. ## The tests In running order; 37 tests (format 2; format 1, which the console ran on 2026-10-25, had 35), about 80 seconds on a console (4,671 frames on Mesen2), 12.5 KiB of results. Tags are the decoder's keys. | Tag | What | Settles | Family | | --- | --- | --- | --- | | OBUS | PPU open bus, 11 cases (probes/open_bus) | Q2 | ours | | HVLT | `$2137` latch against WRIO latch at H-IRQ dots 40, 150, 300 (probes/hv_latch) | U5, the board's latch offset | ours | | MIDF | where a CGRAM/OAM write lands, active / H-Blank / V-Blank (probes/midframe) | Q15, Q16 | ours | | OAWA, OAWB | the OAM write swept across line 100 every 4 dots, OAM filled `$F0` / byte i = i; every changed byte | Q15: the console's 2026-10-24 result (writes land near the PPU's position, 3-4 bytes change) | ours | | OAWC | (format 2) the OAM write swept with no OAMADD write before it | Q15: the PPU's own address | ours | | OAWD | (format 2) OAMADD written, then 0-31 delay loops, then the data | Q15: the console's format-1 sweep looked like OAMADD's sprite plus one sprite per 2 dots since that write | ours | | OAMR | what an OAM read returns, swept | Q15 | ours | | CGWS, CGRS | the CGRAM write and read, swept | Q16 | ours | | PPUW | VRAM, CGRAM, OAM bursts with the display on, address found by a marker | Q15, Q16, U2 | PPU | | OBJF | `$213E` range/time overflow, 7 layouts incl. X = 256 and X = -64 | Q17 | PPU | | DISP | sprite evaluation after a mid-frame display enable; the OAM address reload, 6 cases | Q15 | PPU | | IPLS | 32 KiB through the IPL ROM, three blocks, frames and latches | U8 (coarse) | ours | | CLKR | S-SMP timer 2 against the master clock, 3 x 600 frames, 60-frame steps (probes/clock_ratio) | U8 | ours | | MULF | multiply and divide step counts at k = 2..10 / 2..18 cycles, FastROM and SlowROM | Q5, C4 | ALU | | DIV0 | division by zero, finished and in flight | Q6, C5 | ALU | | MREP | undisbeliever's wrmpyb-in-flight | C4, U4 | ALU | | DRST | WRDIVB written twice | C4, U4 | ALU | | MRFS | does the refresh pause step the ALU (HTIME 104..135) | Q5, Q11 | ALU | | HVFF | `$213C/$213D` flip-flops and `$213F` | Q3 | timing | | WDMA | WRAM-to-WRAM DMA through `$2180`, 8 cases | C7, U3, Q19 | timing | | RFSH | free-running H sampler: the refresh pause and the short line | Q11, C2, C3, Q22 | timing | | IRQN | H/V IRQ landing for 31 HTIMEs, through the vector, the dot-153 rule, NMI from WAI, a NOP sled and after DMA | Q12, Q13 | timing | | LINE | lines per frame, progressive and interlaced | Q22 | timing | | AJT1 | where the auto-joypad read starts and ends | Q14 | auto-joypad | | AJCL | the enable cleared 0..512 clocks after the read starts (U11's console note is at 156-162) | Q14, U11 | auto-joypad | | AJBG, AJBP | the enable blipped: gap and delay sweeps | Q14 | auto-joypad | | AJLT | does a blip re-latch the pad | Q14 | auto-joypad | | AJIR | NMITIMEN/JOYSER0 written by an IRQ at 15 points of the read, 6 variants | Q14 | auto-joypad | | HDOR | do all HDMA channels transfer before any reloads | Q8 | DMA | | HDSW | HDMA's per-line and init cost, by stopwatch | Q8 | DMA | | HDLT | when an HDMAEN write takes effect (Mesen2 and MAME disagree) | Q8 | DMA | | SCPA | the S-CPU-A DMA failure (CPU version 2's: a control on version 1) | Q9 | DMA | | DEND | a DMA ending at HDMA init (undisbeliever's 1/1/1: "No crash. HDMA Failure detected.") | Q9 | DMA | | CRSH | CPU version 1's DMA/HDMA crash: 96 calibrations, 96 attempts, resumable; a `BRK` or a still-running CPU at the next NMI is recorded and soft-resets | Q9 | DMA | The families' full specs, with the reasoning behind every offset, what each permitted source says (anomie, fullsnes, the SNESdev wiki, undisbeliever's test sources, ares's ISC code as a model) and what the detectors showed when run as closed boxes (OBSERVED), are: - **Auto-joypad**: [probe-suite/autojoy.md](probe-suite/autojoy.md) - **Multiplier and divider**, **Timing**, **PPU**: [probe-suite/timing-alu-ppu.md](probe-suite/timing-alu-ppu.md) - **DMA and HDMA**: [probe-suite/dma.md](probe-suite/dma.md) (its note that our docs had the S-CPU-A bug's version backwards was acted on: Q9 now says version 2 fails a DMA, version 1 can crash) They were written before the code, from the documents and with GPL emulator source open beside them; on 2026-11-19 (docs/restart.md, rule 10) every statement resting on that source was re-sourced to ares (ISC) or struck. Their cycle estimates are unverified, which is why every timed result also stores a latched H/V. Departures from the specs: the reset-position spin counts, the exploratory INIDISP early-read check and the last-DMA-value sweep are left out; the HDMAEN latch sweep uses channels 0 and 7 at 1-dot steps rather than all eight at 2-clock steps. ## What still needs a photo Brightness (U10: krom's `RedSpace9BitHDMA`), the first hi-res column (U9: any hi-res screen, e.g. krom's `InterlaceRPG`), and the picture glitches the undisbeliever ROMs draw (INIDISP early read, mid-frame enable, forgot to force blank, which sprite slivers drop). They are in the pack's `00-OURS` and `03-`/`05-` folders. ## Checked so far - Mesen2 and MAME 0.285, run as closed boxes (OBSERVED), both run the suite to ALL DONE (4,671 and 4,283 frames). Their saves differ on most rows, which is what the console is for. - A reset in the middle of two crash attempts (Mesen2 Lua `emu.reset()`, a closed-box run): three boots logged, both attempts recorded "never came back", the run completes. A build with `-D CRASH_SELFTEST=1` that runs attempt 101 into `BRK`: recorded with its registers and stacked PC, soft-reset, completed. - The first build's board (archived) ran it, slowly, through `suite_run.py --on board`; that mode still calls the archived board's API and must be re-pointed at the new board (TODO in `scripts/suite_run.py`). ## Format 2 (2026-10-25, after the first console run) - AJIR stored rows past offset 255 in the wrong place (an 8-bit offset sum): fixed. The console's format-1 AJIR rows are not usable. - MRFS swept HTIME 104-135, which put every write after the refresh; now HTIME 10-41, straddling it. - OAWC and OAWD added, to separate the PPU's own OAM address from the CPU's OAMADD write (what the console's OAWA showed: two-byte writes land as a low-table word and two high-table bytes, around sprite 43-52 for most of the line, sweeping one sprite per 2 dots from sprite 0 near the line's start). - `suite_results.py` reads both formats (the save's format byte).