# Validation: the oracles found, ranked, and pinned What may be read and what may only be run is set by [restart.md](restart.md) and the family's `emulator-lineage/docs/sources.md`; this document ranks the oracles by tier. Every emulator result below comes from running the emulator as a closed box (`OBSERVED`, emulator and pin named), never from reading its source. ## The tier rule The family's rule, as megadrive-python's `docs/validation.md` states it: **hardware-captured > die-derived > specification (manuals) > research > emulator-derived.** - **Hardware-captured**: output recorded from a real Sega CD (a logic-analyser capture, a protocol log, an audio recording, a photograph). A **hardware-corrected test program** -- one whose expected values its author established or checked on real hardware -- judges at the same level for what it checks, and is named as such. - **Die-derived**: a model transcribed from the chip's silicon. **None exists for any Sega CD chip** (the gate array 315-5548, the LC8951, the RF5C164, the CDD microcontroller); siliconpr0n returned 403 for everything and no other decap was found. Only the Mega Drive half of a "MegaCD_MiSTer-NukedMD" fork is die-derived, and that half is megadrive-python's business. - **Specification**: Sega's manuals and the chip datasheets. They define intent; hardware overrides them where they differ. - **Research**: write-ups and forum posts, only as strong as the measurement behind each statement; KRIKzz's notes sit beside his hardware logs and are cited statement by statement. - **Emulator-derived**: Genesis Plus GX, BlastEm, ares, jgenesis, clownmdemu, MAME, PicoDrive, and the FPGA cores (MiSTer's, KRIKzz's). FPGA cores are implementations, not evidence. Only ares (ISC) and MAME's BSD-3 files may be read; the rest are run as closed boxes or not used, and an emulator's comment that something was verified on hardware is not a hardware fact (owner's ruling, 2026-11-19). A lower tier is a **detector** (it finds where to look), never the **judge**. Where a detector and a judge disagree, the judge wins and the disagreement is written down (in the quirks document, `undocumented-behavior.md`, which is to be rewritten from permitted sources during the rebuild; until then, in the milestone record below). Where nothing above emulator-derived covers a question, the board's behaviour is a **documented choice**, claimed as such -- the CD has more of those than the Mega Drive had, because it has no die-derived models to fall back on. Everything below was downloaded and hashed on 2026-10-21 (`scripts/pinned_files.json`, `scripts/pinned_repos.json`); `scripts/fetch_references.py` rebuilds `reference/` (ignored). Live forum and wiki pages change on every fetch (session tokens); they are re-pinned to the snapshot the documents cite and only warn on mismatch. ## The oracles ### Hardware-captured | Oracle | What it covers | Why it is hardware | Pinned as | | --- | --- | --- | --- | | **MegaCD_MiSTer `docs/mcd logs`** (2019) | 37 SignalTap captures of a real Mega-CD's sub-68000 bus (`S68K_*`) and the word-RAM and PRG-RAM DRAM pins (`WR_*`, `PR_*`): CDC DMA to PCM, PRG RAM, word RAM and the sub CPU's host port (start, continue); PCM wave-RAM reads and writes; PRG-RAM refresh while the gate array, a halt, an interrupt or word RAM is active; word-RAM refresh; a sub read while the graphics unit is busy; graphics vs 68000 word-RAM access; interrupt 1-3 acknowledges; writes to `$FF8002`, `$FF8004`, `$FF8006`, `$FF800E`, `$FF8030`, `$FF8032`, `$FF8066` | an FPGA's SignalTap probing a real board's pins (screenshots show "log: Trig @ 2019/11/03"); instrument inferred, console model and capturer not stated (srg320's core). Screenshots: the clock is read off the ruler, not a file | `reference/src/MegaCD_MiSTer/docs/mcd logs/` (`a3a3da8`) | | **mcd-verificator `cd-log/`** (KRIKzz, 2019-20) | the CDD's 10-nibble status/command exchanges, one per 1/75 s: BIOS start, play, read sector, stop (`BI-mcd-tst/`); low-level read, seek, pause/resume, stop, TOC commands, a bad checksum (`LL-mcd-tst/`); Sonic CD's boot and its player states (`sonic-bios/`) | "cdd communication logs from real hardware" (its readme) | `reference/src/mcd-verificator/mcd-verificator/cd-log/` (`8b72838`) | ### Hardware-corrected test programs (judges for what they check) | Oracle | What it covers | Why it counts | Pinned as | | --- | --- | --- | --- | | **KRIKzz, mcd-verificator v1.02** (2020) | self-checking rows: RAM CART, COLOR CALC, VAR TESTS, IRQ TEST, REG X000, REG X002, REG 2006, REG X00C, REG 8030, CDC REGS, PROG RAM, WORD RAM, WRAM PMOD, CDC INIT, CDC FLAGS, CDC DMA1-3 (as BIOS); more in mode 1 | "mcd-verificator is fully based on real hardware researches" (readme); "Results valid only at NTSC systems"; tested on a CDX and a Mega-CD 2 (forum t=3166). Source GPL-3.0 (its repository's `LICENSE`): the binary is run, the source is never read, and what an error number checks is not looked up in it. Deleted from its repository's HEAD on 2026-05-10 | `.../mcd-verificator/mcd-verificator.bin` (`8b72838`); its `src/` is fetched but never opened | | Ti_, CPU speed test (2019) | effective main, Z80, sub-CPU and graphics-unit rates | results posted from real consoles (Model 2: sub 12,162,088; CDX: 12,222,928; "ASIC" 1,835,008) | the thread only (`reference/forum/t2981-...`); **the ROM is on Yandex Disk, not pinned** | | jvisser, md-mode1-mcd-asic-test | graphics-unit throughput in mode 1 | run by its author on a Mega EverDrive PRO and a real Mega CD; numbers in its README, no pass/fail | `reference/src/md-mode1-mcd-asic-test` (`c2f3a38`) | | 240p Test Suite, Sega CD build | PCM (sine, sweep) and CD-DA tracks, video patterns | written for and on hardware; visual and aural, not self-checking. Sega's security blocks left out of the checkout | `reference/src/240pTestSuite` (`89adfdd`, sparse) | ### Die-derived None. (See the tier rule.) ### Specification | Document | Covers | Pinned as | | --- | --- | --- | | Sega, Mega-CD Hardware Manual (scan, 97 pp; every known scan partial, pp. 4 and 45 reported missing) | memory maps, gate-array registers, CDC/CDD/timer/interrupts, the graphics unit, the expansion port | `reference/docs/sega/mega-cd-hardware-manual.pdf` | | Sega, 1999 HTML/GIF transcription of the English development set | the same, plus disc format, BIOS, bulletins, addendum: the cross-check for the scan's missing pages | `reference/docs/sega/sega-cd-manual-html-1999.zip` | | Sega, Software Development Manual (43 pp) | boot, IP/SP, conventions | `.../mega-cd-software-development-manual.pdf` | | Sega, PCM Sound Source (25 pp) | the RF5C164: the only specification of it | `.../mega-cd-hardware-manual-pcm-sound-source.pdf` | | Sega, BIOS Manual v2.00 (51 pp) | BIOS calls, CDD/CDC/subcode services | `.../mega-cd-bios-manual.pdf` | | Sega, Technical Bulletins and Software Standards (incomplete) | errata | `.../sega-cd-technical-bulletins.zip` | | Sega, Mega-CD Maintenance Manual (Model 1, 1992, 118 pp) | schematics, clocks, the chip list | `.../mega-cd-maintenance-manual-export-1992-reva.pdf` | | Sega, Sega CD 2 service manual 002 (1993, 43 pp) | the Model 2 board | `.../sega-cd-2-service-manual-002-1993.pdf` | | Sanyo LC8950/LC8951 datasheet, two independent scans | the CDC | `reference/docs/datasheets/` | | Sanyo LC7883 datasheet | the CD-DA digital filter and DAC | `.../sanyo-lc.zip` | | CDRWIN 3.8 manual, Appendix A | the CUE sheet | `reference/docs/formats/cdrwin-3.8-users-manual.pdf` | | libchdr (BSD-3), MAME `chd.cpp`/`cdrom.cpp` (BSD-3, checked by each file's first line) | CHD (specification by implementation) | `reference/src/libchdr`, `reference/src/mame` | ### Research | Source | Covers | Pinned as | | --- | --- | --- | | KRIKzz, mcd-verificator `notes/` (prose; code fragments in them stay unread) | the CDD command, TOC and status tables; the graphics unit's access order; memory-mode bit behaviour; the CDX's CDD connector; loop-count memory speeds | `.../mcd-verificator/notes/` | | SpritesMind "megasd" page | the CDD protocol, independently; its author's captures are lost | `reference/forum/spritesmind-megasd-cdd.html` | | Forum t=3020 (2019, 8 pages) | Near's emulator questions answered by Eke, Nemesis, TascoDLX, HardWareMan, Snake (Kega Fusion's only public Sega CD notes); hardware findings in prose only, emulator source quoted in posts stays unread | `reference/forum/t3020-...` | | Forum t=3166 (2 pages) | mcd-verificator's release; CDC registers 16-31; X'Eye's 32 KB CDC RAM | `reference/forum/t3166-...` | | Forum t=908 (6 pages) | the stamp unit and trace table | `reference/forum/t908-...` | | Forum t=2981 (2 pages) | Ti_'s speed test and results | `reference/forum/t2981-...` | | Plutiedev | sub CPU from mode 1; LEDs | `reference/forum/plutiedev-*` | | DarkMorford, US BIOS 2.00W disassembly (main side) | a derivative of Sega's firmware: interoperability facts only (the backup RAM format's marks), never shipped; the BIOS image in that repository is left out | not kept since 2026-11-25 (firmware in another form, decision L5; provenance.md); the facts already taken stay, cited to it | | sega-cd-asic-demo, megacdTest, SegaCDMode1PCM, msu-md, megadev | register descriptions, mode-1 drivers, small tests without hardware results | `reference/src/...` | ### Emulator-derived (detectors) | Emulator | Revision | Use | Note | | --- | --- | --- | --- | | **Genesis Plus GX** | `49c5847` | closed box (non-commercial licence) | passes every mcd-verificator row here (run, below) | | **BlastEm** (libretro mirror) | `ab74365` | closed box (GPL-3.0) | Sega CD since 1.0.0 (2026-09-11). Upstream hg tip `0755b6277a19` | | ares | `9408cb4` | readable (ISC), notice kept | Near's; `ares/md/mcd` | | jgenesis | `d41e2d9` | closed box (GPL) | Rust | | clownmdemu-core | `88ef45a` | closed box (AGPL) | its free boot ROM, `clownmdemu-mcd-boot`, is a separate 0BSD program | | MAME | `f379cd0` (0.285) | closed box; its BSD-3 Sega CD files readable | the only three-CPU tracer; fails most of mcd-verificator ([mame-oracle.md](mame-oracle.md)) | | PicoDrive | `26ecb2b` | closed box (non-commercial licence) | | | MiSTer core (rtl/MCD), KRIKzz's lib_mcd | `a3a3da8`, `23dbd5e` | HDL never read (GPL); the MiSTer repository's SignalTap captures are hardware data (above) | FPGA implementations | Since 2026-11-24 none of the closed boxes' source is fetched (Aubrey's rule): Genesis Plus GX (https://github.com/ekeeke/Genesis-Plus-GX), BlastEm (https://github.com/libretro/blastem), jgenesis (https://github.com/jsgroth/jgenesis), clownmdemu-core (https://github.com/Clownacy/clownmdemu-core), PicoDrive (https://github.com/notaz/picodrive), the MiSTer HDL and lib_mcd (https://github.com/krikzz/mega-ed-pub), each at the revision above. The Genesis Plus GX and BlastEm libretro cores built here before that date stay at `reference/build//` (sha1 `e2017db9`, `35798a9d`); a fresh checkout puts shipped cores there (`scripts/build_referees.py` checks, and no longer clones or builds). ## What ran here (2026-10-21) Built with `scripts/build_referees.py` (both cores built cleanly) and run with `scripts/libretro_run.py ... --bios-is-verificator` and `scripts/mame_cd.py --bios-is-verificator`: mcd-verificator v1.02 in the BIOS's place, Sonic CD (USA) from a local CHD folder in the drive, frame 7200 (MAME: frame 3600, where it had stalled since 2400). | Row | Genesis Plus GX | BlastEm | MAME 0.285 | | --- | --- | --- | --- | | RAM CART | OK | ERROR 04 | ERROR 01 | | COLOR CALC | OK | OK | ERROR 05 | | VAR TESTS | OK | OK | ERROR 02 | | IRQ TEST | OK | OK | ERROR 09 | | REG X000 | OK | OK | ERROR 05 | | REG X002 | OK | OK | ERROR 26 | | REG 2006 | OK | ERROR 02 | OK | | REG X00C | OK | OK | ERROR 02 | | REG 8030 | OK | OK | ERROR 02 | | CDC REGS | OK | OK | ERROR 01 | | PROG RAM | OK | OK | OK | | WORD RAM | OK | OK | ERROR 20 | | WRAM PMOD | OK | OK | OK | | CDC INIT | OK | OK | never finishes | | CDC FLAGS | OK | 25, ERROR 40 | -- | | CDC DMA2 | OK | OK | -- | | CDC DMA3 | OK | OK | -- | | CDC DMA1 | OK | OK | -- | All three are closed-box results (`OBSERVED`, at the revisions above): the rows and error numbers as mcd-verificator printed them on screen. GPGX takes 1.5 s for 7,200 frames; BlastEm 12.8 s. BlastEm's RAM CART failure may be the absence of a configured RAM cartridge rather than a fault (open). So: **GPGX is the strongest detector**, BlastEm a useful second opinion that disagrees on three rows, MAME a tracer only. MAME also booted Sonic CD with its own BIOS (v1.10) to the game's backup-RAM screen at frame 1500, and traced all three CPUs for 300 frames ([mame-oracle.md](mame-oracle.md)). ## What is *not* available - **No die-derived model** of any Sega CD chip; no die shots found. - **No hardware capture of seek time**, beyond the CDD logs' count of 1/75 s exchanges. - **No recording of the Sega CD's audio** (PCM, CD-DA, or the mix with the Mega Drive) for any model. Output levels and filters are labelled assumptions. - **No complete Mega-CD hardware manual** (forum t=3082) and no complete set of technical bulletins. - **No standalone RF5C164/RF5C68 datasheet** and **no official CDD protocol document**. - **No dump of the CDD microcontroller's program.** - **No free, self-checking test disc**: mcd-verificator runs as a BIOS or a cartridge. - **No PAL judgements**: mcd-verificator is NTSC only. - Not found: Devon Artmeier / Ralakimus BIOS or test repositories (no such GitHub users), krikzz "mcd-test"/"megasd" repositories, Ti_'s or HardWareMan's or ArcadeTV's CDD captures, Steve Snake's notes beyond two forum posts, jsgroth's "Emulator Bugs: Sega CD" articles (bot wall), segaretro's documentation index (bot wall; direct PDF links work). - Found and not pinned: six Mega CD 2 service-manual PDFs on archive.org (about 217 MB; open decision), the Model 2 schematics as PNGs, Ti_'s speed-test ROM (Yandex Disk), openfpga-megacd (AI-assisted port), oss-mcd-bios (no ROM yet). ## Local media (not fetched, not committed; listed, not modified) - **Discs**: `/data/emu/roms/megacd` (`segacd` links to it): 548 Redump BIN/CUE zips, 183 GB, including 13 Sega CD 32X discs and demos; `/data/emu/roms-retrobat/megacd`: 178 CHDs, 39 GB; a local copy of Redump's `Sega - Mega CD & Sega CD`: 545 entries, 178 GB; a local copy of the T-En Collection's `Sega - Mega Drive - Mode 1 CD`: mode-1 CD hacks (Pier Solar, Sonic, Road Rash, ...), 3.3 GB. - **BIOS**: inside `/data/emu/source/bios/PACK FULL BIOS BATOCERA V42 ... .zip`: `bios/bios_CD_E.bin` (CRC `529ac15a`, Mega-CD v1.00 EU), `bios/bios_CD_J.bin` (`9d2da8f2`, Mega-CD v1.00P JP), `bios/bios_CD_U.bin` (`9f6f6276`, Sega CD Model 2 v2.00W US); every MAME Sega CD BIOS set in `.../MAME/ROMs (non-merged)` (listed in [mame-oracle.md](mame-oracle.md)). A search by name found no Sega CD BIOS under `/data/emu/roms` or `/data/emu/roms-retrobat`. ## Certification record To be filled as milestones pass (handoff-brief.md). Each entry: what was run, against which judge, at what tier, and what differed. ### Milestone 0: prerequisites -- not started ### Milestone 1: gate array, memories, sub CPU (judge: mcd-verificator) -- in progress 2026-11-19: 18 unit tests from the manual; mcd-verificator v1.02 as BIOS (TEST ROM): 10 of 13 milestone-1 rows OK, then REG 2006 settled (11 of 13); IRQ TEST 06 and WORD RAM 20 open. Details in status.md. 2026-11-19, session 2: IRQ TEST and WORD RAM OK (13 of 13 milestone-1 rows). 29 unit tests. ### Milestone 2: time (judge: MiSTer captures; detector: MAME lockstep) -- not started ### Milestone 3: VDP DMA and the graphics unit -- not started ### Milestone 4: CDC, CDD, BIN/CUE (judge: mcd-verificator CDC rows, CDD logs) -- in progress 2026-11-19: CDC REGS, CDC INIT, CDC DMA1 OK; CDC FLAGS 22, CDC DMA2 04, CDC DMA3 04. KRIKzz's drive logs replayed: 2,503 of 11,256 exchanges identical. Your own BIOS (US v2.00W) boots Sonic CD (USA) to the game's licence screen. 2026-11-19, session 2: CDC DMA2 OK; CDC FLAGS 34, CDC DMA3 62 open (16 of 18 rows in all). With a backup RAM your BIOS formatted, Sonic CD (USA) plays into Palmtree Panic zone 1. Drive-log replay unchanged (2,503 of 11,256). 2026-11-23, session 3 (judge: KRIKzz's drive logs, hardware recordings): seek and play times measured in the logs (`scripts/cdd_seek_times.py`, 32 moves with a measurable arrival) and the model fitted to them: mean miss 19.4 -> 7.3 exchanges (ares's curve, OBSERVED, replaced); replay 2,503 -> 2,630 of 11,256 exchanges identical. FITTED, not measured on our own drive; the logs' own spread (the same seek, -150 to 50, took 32 exchanges in one log and 53 in another) bounds what any fit can do. The seek's visible statuses (busy exchanges, the landing short of the target) are found and not yet built (build-status.md). 2026-11-24, session 4 (judges: KRIKzz's drive logs; mcd-verificator's CDC rows): the seek's visible structure and the paused loop built and FITTED to the logs, step by step (worklog.md): replay 2,630 -> 3,004 of 11,256, seek-time mean miss 7.34 -> 7.16. CDC DMA3 OK ($FF8008 writes take a word; TEST ROM). CDC FLAGS 34 -> "25. ERROR: 40" with the decoder interrupt as the LC8951 manual's pulse (DOC): the result Mike Pavone reports on LC8951 and LC89515 units (forum t=3166), where KRIKzz's CDX (LC8913) passes; two kinds of unit, so a revision row, and the board follows the chip whose manual it has. 17 of 18 rows (9f16fe2). ### Milestone 5: sound -- in progress 2026-11-23, session 3: the RF5C164's rules read against Sega's PCM Sound Source manual (DOC; they agreed, no change); the CD-DA fader's gain from the hardware manual p.31 (DOC). Detector (Genesis Plus GX 49c5847, closed box, `scripts/compare_audio.py`): Sonic CD's title CD-DA waveform correlation median 0.971, the BIOS intro 0.928 (status.md). No hardware recording exists to judge levels or filters; the 240p suite's PCM tests are not built (its Sega CD disc needs an assembler and Sega's security block, left out). ### Milestone 6: mode 1, backup RAM, RAM cartridge -- in progress 2026-11-19: mcd-verificator as a mode-1 cartridge on your BIOS finds the CD at $400000, 16 of 18 rows OK (the same CDC rows open). The RAM cartridge's memory is not modelled (no permitted source for its layout; provisional default). ### Milestone 7: compatibility sweep and models -- not started ### Milestone 8: CD + 32X -- not started