# Validation: the oracle ladder and the rungs Tiers (Phase 0 rules): 1 hardware-captured > 2 manufacturer documents > 3 hardware-corrected community documents and tests verified on real units > 4 HDL reimplementations > 5 emulators. A low tier is a **detector**, never a **judge**. "Matches MAME" or "matches the corpus" is never a hardware claim. **Plainly: there is no hardware-tier oracle for the SH-4 in anything we hold.** No published per-instruction hardware captures, no die-level model, no test ROM with verdicts recorded on real Dreamcasts that we have found. The family owns no Dreamcast. ## Oracles | Oracle | Tier | Licence | Pin | Decides | Cannot decide | | --- | --- | --- | --- | --- | --- | | SH7750/S/R Hardware Manual, R01UH0456EJ0702 Rev. 7.02 | 2 | Renesas copyright, free download; facts only | SHA-256 `eaca2e6b...` | MMU, caches, SQs, exceptions, FPU rules, on-chip modules, pipelining (HM 8) | the SH7091's deviations (U1); FIPR/FTRV bits (U5) | | SH-4 Software Manual, REJ09B0318-0600 Rev. 6.00 | 2 | Renesas copyright; facts only | SHA-256 `577a998d...` | every instruction's operation (C pseudo-code), codes, groups, latencies, stall rules | memory penalties (U8); pairing at fetch boundaries (U7) | | SingleStepTests `sh4` | 5 | MIT (LICENSE file, read after fetch) | `48975cb` | nothing; detects differences in register and memory results per instruction, 116,500 cases (233 files x 500) | anything Reicast's interpreter got wrong (its README warns); FPU results (computed on an Apple M2 host); timing ("cycles" there are Reicast's bus actions); PREF, MAC.L, MAC.W (excluded by its README) | | sh2-python (pinned sibling) | 5 for the SH-4 (its own ladder for the SH-2) | MIT | `8824075` | nothing; a differential detector for the 142 shared encodings' memory-free semantics (reuse-sh2.md) | anything the SH-4 changes | | MAME 0.285 `dc` (SH7091) | 5 | BSD-3-Clause CPU files, LGPL-2.1+ driver; run only | the installed binary | nothing; detects instruction-stream differences against the real boot ROM (PC, SR, PR, R15 per instruction) | cycles; FPU approximations; caches | | The Dreamcast boot ROM itself | the program is the test | Sega's; never copied (dreamcast-python census) | SHA-1 `8951d1bb...` (v1.01d) | that the core runs it (with the board) | correctness of anything it does not exercise | | Homebrew built with KallistiOS (KOS License) | 3 at best, if its author ran it on hardware and says so | per project | not pinned yet | behaviour that homebrew relies on and that runs on real units | details no homebrew depends on | Not used: Flycast (GPL-2.0), reicast (GPL; its tree's licence is mixed), lxdream (GPL), WashingtonDC (GPL-3.0), Redream (closed): run as black boxes only, from the GPL tool repositories, if ever (none is built here). No source of theirs was fetched or opened. ## Rungs (each with its exit test) | Rung | Content | Judge (tier) | Exit | | --- | --- | --- | --- | | 0 | the decode table generated from SM 7 + SM table 8.3 (+ HM 7 cross-check), the readability and handler-subset lints | SM, HM (2) | 234 rows joined; every (opcode, PR, SZ) key decodes to at most one row; every sh2-python pattern present with the same mnemonic; the lint catches its seeded faults | | 1 | integer ISA, banks, privilege, delay slots, exceptions from instructions (illegal, slot illegal, address error, TRAPA), no MMU | SM 9 (2); SST and sh2-python (5) | SST's integer files: every difference triaged (SM wins); sh2-python differential: zero unexplained on the memory-free shared forms | | 2 | FPU: single, double, pair moves, FPSCR, exceptions, a soft-float in the subset; FIPR/FTRV per U5 | SM 6, 9; HM 6 (2) | SM 9's special-case tables as unit tests; HM 6.7.2's example as a test; SST FPU files as detector, differences listed, none "fixed to match" without SM text | | 3 | MMU and TLB, P4 arrays, SQs, cache control instructions, caches (functional), OC RAM mode | HM 3, 4 (2) | unit tests per HM paragraph; a Windows CE disc's boot path through dreamcast-python later | | 4 | timing: the issue model of timing.md, cache and SQ penalties, on-chip module timing (TMU, RTC, DMAC) | SM 8 (2); no measurement | SM figure 8.3's worked examples reproduced cycle for cycle (the sh2-python method with PM section 7's figures) | | 5 | the boot ROM, with dreamcast-python | the boot ROM (program), MAME stream (5) | the instruction stream equal to MAME's for the first N instructions, or a named reason for each difference | Seeded faults for the gate (the family rule): a decode that ignores PR; SZ pair moves moving one register; a bank switch on RB in user mode; RTE not restoring from SSR; an SQ burst to the wrong QACR; a cache that stays coherent with DMA; FTRV rounding four times; URC not counting accesses. ## What ran in this phase | Command | Result | | --- | --- | | `python -I scripts/fetch_references.py` then `--verify` | 2 of 2 files and 1 of 1 repository present and matching | | SM 7 parse against sh2-python `_decode.py` (scratch script, not committed) | 234 SH-4 forms; 138 identical patterns + 4 differing only in the field letter; 92 SH-4 only | | `python -I scripts/mame_trace.py --start 1000 --frames 1` | 2,605,142 instructions, 1.281 MAME cycles each (mame-oracle.md) | | SST corpus survey (file names, transcode script read) | 233 test files: 206 sz0/pr0, 16 sz1/pr0, 11 sz0/pr1 |