# Validation: the oracle ladder Tiers: 1 hardware-captured, 2 manufacturer documents, 3 hardware-corrected community work, 4 HDL reimplementations, 5 emulators. A low tier is a detector, never a judge. **No hardware-tier oracle exists for this machine in what was found**, except one community measurement (the Dragon 64 sound bus, CA) and m6809-python's hardware captures of the CPU's undocumented corners. We have no CoCo or Dragon hardware; Aubrey's probe queue is the place for any measurement this ladder asks for. ## Per subsystem: the best judge available | Subsystem | Top tier found | Judge | Detectors | What cannot be decided yet | | --- | --- | --- | --- | --- | | CPU (MC6809E) | 1 for undocumented corners (hoglet67, Flamand: m6809-python's validation.md), 2 otherwise | Motorola's data sheet and programming manual | `neetandev/m6809` vectors (MAME-derived), MAME trace | HALT and NMI timing details (m6809-python's U list) | | SAM (MC6883) | 2 | the SAM data sheet (figures 5, 6, 14-16; rate modes; VDG synchronisation) | MAME `coco` (SAM writes, cross-mode pictures) | line phase against E (U1, C2), rate-change stretch (U3) | | VDG (MC6847, T1) | 2 | the VDG data sheets (timing tables, figures 8 and 13, Table 1) | MAME pictures | artifact hues (U8), Dragon PAL padding (U6), exact colour levels on screen | | PIAs (MC6821) | 2 | the PIA data sheet | MAME's PIA write streams; williams-python's tests of the shared core when it exists | output-pin readback and flag timing against E (shared with williams-python's U10) | | Keyboard, joysticks | 2 (TRM wiring) | TRM, CA | MAME | matrices (U9), comparator behaviour (U10) | | DAC and sound bus | 1 (CA's Dragon 64 voltages, one unit) and 2 (TRM's formula and Table 4) | TRM; CA's table for the mixing | MAME's audio | CoCo mixing levels; filtering (host side) | | Cassette | 2 (TRM's format and circuit) | the real firmware decoding a synthesised `.cas` | MAME loading the same file | `.wav` thresholds (U13) | | Disk (FD1793, WD2797) | 2 (WD sheet, DSM) | WD's command and timing tables; the real Disk BASIC/DragonDOS reading images | MAME (but its CoCo controller is a WD1773: C6) | DragonDOS latch (U15) | | Firmware boot | (a whole-system check) | the player's own ROMs reaching their prompt | MAME lockstep: instruction stream, registers, `totalcycles`, PIA/SAM/FDC write order | none beyond the above | | Test programs | none found with hardware verdicts (U19) | | | | ## Test programs No CoCo or Dragon test suite with verdicts captured on real units was found in this phase (searches on GitHub for VDG/SAM/CoCo test programs returned FPGA and tool repositories only; community GIME timing tests exist for the CoCo 3, not studied). Recommendation (open decision 9): the board writes its own small MIT test programs (assembled with a permissive assembler, run from a cartridge image at C000 so no firmware is needed): SAM mode and offset walks, the cross modes, HS/FS interrupt counting per field, rate-mode cycle counting, PIA edge and flag tests, DAC/comparator joystick reads. Run on MAME they are detectors; each becomes a judge only if Aubrey or someone with hardware runs it, which goes on the probe queue. ## What ran in this phase - `python -I scripts/fetch_references.py --verify`: 25 pinned, 25 present and checked. - Firmware census: 49 of 49 ROMs by SHA-1; software census: no local sets, 1,414 entries in MAME's lists ([census.md](census.md)). - MAME: four runs (`coco` with and without the disk cartridge, `dragon32`, `dragon64`), two with 60-frame CPU traces (203,671 and 242,758 instructions) ([mame-oracle.md](mame-oracle.md)). ## The gate, when built (milestone 1 onward) Lockstep against MAME's `coco` trace from reset (instruction stream, registers, `totalcycles`, PIA/SAM/FDC write order) for the first 3 emulated seconds with 0 unexplained differences; the same for `dragon32`; unit tests of every documented fact (SAM figure 5 and the memory map, the PIA bits, the VDG's line and field counts, the TRM's DAC formula and Table 4); the board's own test programs under MAME as detectors. ## Seeded faults (for the gate) Each must be caught: SAM rate decode treating FF00-FF1F as fast; SAM mode 011 with Y=3 instead of 1; VDG field of 263 lines; PIA flag not cleared by a data read; PIA0 not mirrored at FF1C; FS edge polarity inverted; the DAC's PA2-PA7 shifted by one; the sound mux's SEL1/SEL2 swapped; CART level not following Q; the disk interface's HALT gate ignoring the wait-enable bit; DragonDOS registers at the Tandy addresses; the Dragon's PB2 read as a RAM-size jumper.