# Validation: the oracle ladder Tiers (Phase 0 rules): 1 hardware-captured > 2 manufacturer documents > 3 hardware-corrected community documents and tests verified on real units > 4 HDL > 5 emulators. A low tier is a **detector**, never a **judge**. "Matches MAME" is never a hardware claim. ## Per subsystem: the best judge available | Subsystem | Top tier in hand | Judge | Detectors (5) | What nothing decides yet | | --- | --- | --- | --- | --- | | 6502 | 6502-python's own ladder (Dormann, SingleStepTests, perfect6502 run by famicom-python) | the core | MAME | | | Memory map, decoding | 2 | SCH-E, PRG, VDS | MAME | both VIAs selected at $9130; VIC/VIA overlap (U6) | | Open bus | 3 | VICI ("the data fetched by the videochip on the previous clock cycle") | `VIC20/unconnected` (no hardware statement) | colour RAM's upper nybble; idle fetch address (U5) | | VIC timing (line, frame, write-to-effect) | **1** | `split-tests/timing` dumps from named machines (6560-101, 6561E, 6561-101); VICI measurements (3) | MAME, JVic | NTSC line count until the dump is replayed (C1) | | VIC picture corners | 3 | `vic_vert0`, `vic_9000test`, `vic_line0` (photographs, reference pictures, author's hardware runs) | MAME | interlace (U11) | | Light pen | **1** | `split-tests/lightpen` dumps | MAME | | | Sound frequencies | 3 | VICI (Hársfalvi's measurements) | MAME, JVic audio | | | Noise generator | none (a die reading reported second hand) | | MAME, JVic | U1 | | Sound output, volume DAC, analogue | none | | | U2 ("sound: good enough") | | Palette | none | | MAME's colours | U8 | | Paddles | 3 (behaviour seen on hardware: `paddlescope`) | | MAME | conversion constant (U9) | | VIAs | 3 | VICE `via_pb7`, `via_t1irqack`, `viavarious` (`*ref.bin`), `via_sr` (`dump*.bin`); data sheets (2) | MAME `6522via` | same-cycle races not covered by a test | | Keyboard, joystick | 3 | `VIC20/joystick` (values seen on hardware) | MAME | | | Power-on RAM | 1 | `raminitpattern` dumps (per machine) | | which machine is "default" (U7) | | KERNAL, BASIC | the ROMs themselves: running them is the test | | MAME boots to "3583 BYTES FREE" | | | Cartridges | the images (No-Intro) and MAME's CC0 list for block placement | | MAME | U13 | | Cassette | the KERNAL's tape routines (run) | | MAME | motor timing (U14) | | 1541 | 2 (DSM) and the DOS ROM (run); VICE `drive/*` (3) | in c1541-python | MAME's drive trace | | **Plainly:** there is no die-level model of the 6560/6561 or the 6522 in hand (Ewing's 6561 tracing is incomplete and unlicensed). The VIC's hardware-tier judges are the VICE-testprogs dumps captured on real VIC-20s; its sound and colours have no hardware judge at all. ## What ran in this phase | Run | Result | | --- | --- | | `scripts/fetch_references.py --verify` | 15 of 15 pinned files and 1 of 1 repository present and matching | | `scripts/census.py nointro` | 293 zips, 288 software, 5 BIOS; 296 images (295 distinct); 213 matched in MAME's CC0 list | | `scripts/census.py firmware` | all 27 known images (19 Commodore, 8 third-party replacements) found by SHA-1 (0 NOT FOUND) | | `scripts/mame_trace.py --snap 4` (vic20, vic20p) | BASIC banner, "3583 BYTES FREE" | | `scripts/mame_trace.py --frames 120` | 606,646 instructions, 2,045,451 cycles, 305 VIC/VIA writes | ## Seeded faults (for the board's gate later) Each comparison must catch one-line faults. Candidates particular to the VIC-20: the VIC's A13 not inverted (characters read from RAM instead of ROM); colour RAM select from the wrong $9002 bit; VIA1's IRQ wired to IRQ instead of NMI; NMI level-triggered instead of on the edge; the T1 high-latch write not clearing the flag (C4); 262 lines instead of 261 on NTSC; the VIC fetching expansion RAM; a 16K cartridge's second half at the wrong block.