# The CD-ROM, compared with pcenginecd-python Keys as in [start-here.md](start-here.md). ## What the PC-FX has - **The drive is a SCSI target on the KING's SCSI bus** (king.md: the initiator's signals as registers, DMA into KRAM, a subcode capture with an interrupt). MAME 0.285 models it as a `scsi` port with `cdrom` "SCSI CD" on connector 1 and connectors 2-7 free (OBSERVED, `-listdevices pcfx`). - **The drive's own electronics** (PFI's daughter-board data sheets): a NEC µPD78C10A microcontroller (the drive's firmware), a Sony CXD2500BQ CD signal processor, a Sony CXA1372BQ RF/servo amplifier, a Burr-Brown PCM1710 DAC, Rohm motor drivers, a 27C256 (32 KB) firmware EPROM and a TC514256 DRAM (OBSERVED: file names in PFI's `PC-FX/datasheets/DaughterBoard/`; PFI also has a KiCad schematic of the CD board under GPL-3.0, not fetched). So the drive is **an MCU-controlled unit with its own firmware**, like the PC Engine's: its SCSI behaviour is that firmware's, not a chip's. - The BIOS (1 MB) owns the disc protocol: it reads the TOC, looks for a data track whose first sector carries "PC-FX:Hu_CD-ROM" (census.md: in track 2 on 75 discs, track 4 or 5 on two, absent on the two PC-FXGA-only discs), then loads the program the next sector describes. The board need not know the format; the BIOS does. - Commands: SCSI-2-style READ, READ TOC, MODE SENSE and NEC vendor commands for audio play and subcode are expected (HYPOTHESIS: the PC Engine drive's D8-DE family, if the firmware lineage is shared; U14). **No document of the PC-FX drive's command set was found.** - Speed: double speed is the usual statement (HYPOTHESIS, U20); the seek and read timing is unknown (U13). ## What pcenginecd-python already has (read 2026-11-26 at 0b55419) | Module | What it is | For the PC-FX | | --- | --- | --- | | `scsi.py` (685 lines) | the drive as a SCSI-1 target on an 8-bit REQ/ACK bus: phases, selection, status/messages, the group-0 and NEC vendor commands (08, 00, 03, D8-DE), response times measured on a closed box (Geargrafx) | **the shape is right** (a target behind a bus of signals); the command set, the timing and the initiator side differ: the KING is a different initiator (DMA, its own registers), and the PC-FX drive's firmware may answer differently | | `disc.py` | bin/cue and CHD reading, sectors by LBA, the TOC | **directly reusable**: the same Redump formats (census.md) | | `cdda.py` | CD-DA playback to the audio list | reusable in shape; the PC-FX mixes CD-DA in the HuC6230 with its own volumes | | `seek.py` | Dave Shadoff's PCECD_seek model (MIT, with notice) for the single-speed drive | not applicable as is: a different, faster drive | | `adpcm.py` | the MSM5205 with 64 KB ADPCM RAM | **not reusable**: the PC-FX's ADPCM is the HuC6230's two channels fed from KRAM | | `unit.py`, `syscard.py`, `arcade.py` | the IFU-30 interface, the System Card, the Arcade Card | not applicable | **Recommendation (open decision 4):** do not extract a shared CD core now. The disc image reader (`disc.py`) is the one piece both boards need unchanged; it is a utility, not a chip, so the chip rule does not force a repository. The PC-FX board pins pcenginecd-python and imports `disc.py` if its interface fits (a reuse of a pinned sibling, not a copy), or a small `cdimage` library is extracted when a third disc board (Saturn, PlayStation, Sega CD already read discs their own ways) makes it worth it. The drive itself is a different unit with different firmware: a PC-FX `ScsiCdDrive` written from the PC-FX evidence, in pcenginecd-python's shape. ## Unknowns U13 SCSI and drive timing (selection, command, seek, read rate, DMA to KRAM); U14 the command set; U20 the drive's speed. Detectors: MAME (preliminary), Mednafen (closed, in emu-tools-gpl2 once built). A PC-FX owner with a logic analyser could settle them (the pcfx-devel organisation publishes a sigrok SCSI protocol decoder, `pcfx_scsi_sigrok_protocol_decoder`, MIT, built for such captures; no capture was found published): the probe queue.