# Start here `cps1-python` will be a pure-Python board emulator of the Capcom CP System (CPS-1) and its QSound "CPS-1.5" variant. Phase 0 (this state) holds documents, pinned references and scripts; no emulator code. The plan is [handoff-brief.md](handoff-brief.md). ## The machine in one page - **A-board**: 68000 at 10 or 12 MHz; 64 KiB work RAM at `FF0000`; 192 KiB graphics RAM at `900000` holding the object list, three tile maps, a row-scroll table and the palette source; the **CPS-A-01** custom (addresses: it takes the 68000's bus to read graphics RAM, drives the graphics-ROM address, writes the sprite frame buffer); a 16 MHz crystal; on standard boards the sound section (Z80, YM2151, MSM6295). Decode by five PALs. [memory-map.md](memory-map.md), [cps-a.md](cps-a.md), [interrupts.md](interrupts.md). - **B-board**: the game's ROMs and the **mapper PAL** that decides which ROM bank answers a tile fetch, or none (transparent). [gfx-mapping.md](gfx-mapping.md). - **C-board**: the **CPS-B** custom (data: mixing, priority, palette paging, sync, ID, protection) in 14 variants, the last (CPS-B-21) keyed by a battery-backed 144-bit key. [cps-b.md](cps-b.md). - **D-board** (QSound games): Kabuki-encrypted Z80 at 8 MHz, the QSound DSP (DSP16A + program), 93C46 EEPROM. [sound.md](sound.md), [inputs.md](inputs.md). - 384 x 224 visible of 512 x 262 at 8 MHz pixel clock: 59.637 Hz by arithmetic. ## Machines as data One board; every game is a row: B-board type, ROM layout, mapper, CPS-B row, sound board, controls, clock ([sockets.md](sockets.md)). 168 sets, 39 parents ([census.md](census.md)); all present and verified locally. ## How we know things Tiered sources ([validation.md](validation.md)): a die-level hand trace of the two custom chips (tier 1, read as documents), the PAL fuse maps (decoded here and checked against MAME), Capcom's schematics (scans), board measurements by the jtcps author, Eduardo Cruz's keys; MAME and FBNeo as detectors with a working headless recipe ([mame-oracle.md](mame-oracle.md)). What emulators commonly get wrong: [quirks.md](quirks.md). How CPS-2 reuses the chips: [cps2-sharing.md](cps2-sharing.md). ## Working here ```sh python -I scripts/fetch_references.py --verify # pinned references in reference/ (git-ignored) python -I scripts/census.py # needs reference/census/mame0285-listxml.xml python -I scripts/decode_cpsb21_keys.py python -I scripts/mapper_table.py --summary python -I scripts/decode_gal16v8.py SET.zip PAL python -I scripts/check_pal_mapper.py SET.zip PAL --wiring 89624B-3 python -I scripts/mame_trace.py SET --cpu main --seconds 3 --trace-frames 1 ``` Python >= 3.11; PyPy must work. Never copy code from another repository (MAME, jtcps, FBNeo are cite-only). ROMs are read in place, never committed.