# cps3-python A readable, pure-Python emulator of the **Capcom CP System III** (CPS-3, 1996-1999), to be built as a board on the family's SH-2 core, [sh2-python](../sh2-python). Six games ran on it: Red Earth / War-Zard, Street Fighter III: New Generation, 2nd Impact and 3rd Strike, JoJo's Venture and JoJo's Bizarre Adventure. This is a 32-bit machine, outside the family's usual pre-32-bit line. Aubrey asked for it by name alongside CPS-1 and CPS-2, and the family already owns its CPU (sh2-python, built for the 32X). **Status (2026-11-12): Phase 0 complete, groundwork only, no emulator code.** The documents in [`docs/`](docs/README.md) hold what the build needs, each fact with its source and tier; [docs/handoff-brief.md](docs/handoff-brief.md) is the plan (14 milestones, 31 unknowns, 15 contradictions, 12 open decisions). Measured or checked while gathering: - The published cipher, written out from MAME's driver, decrypts all six games' BIOS images from the local sets to the same reset vectors: PC `00000400`, SP `02080000`. - MAME 0.285 runs here headless: `redearthnr1` (NO CD) runs game code within one emulated second and shows its region warning at eight; `sfiii` (CD, blank SIMMs) reaches the "A New CD-ROM has been inserted" prompt in 8. - The CD of Street Fighter III holds the SIMM contents as plain files: file `10` is SIMM 1, byte for byte the four NO CD chip images interleaved; `30`, `31`, `40`, `41`, `50` are the graphics SIMMs as chip pairs (all six compared with `sfiiin`'s chip images). Pre-flashed SIMMs can be built from a CD without emulating the flashing; the other ten game discs were not opened. - All 60 MAME sets (52 game sets, 8 bootleg BIOS/CD sets), their 29 BIOS images and 19 CHDs (11 game discs, 8 bootleg) are present and complete locally. - **A hardware-tier oracle exists**, published three weeks ago: Dunkley and XeD's measurements on one physical CPS-3 (bus costs per device, interrupt order, clocks, the display pipeline). It is one board with a replacement CPU; [docs/validation.md](docs/validation.md) says what it decides. - **Two FPGA implementations exist** (JTCPS3 in jotego's jtcores, HDL dated from February 2026, and a second core written from MAME's driver). Neither is a judge. - sh2-python at the pin runs 160,000 (CPython) to 252,000 (PyPy) instructions per second here; a CPS-3 needs 8-12 million, so the board will run 30-75 times slower than real time. ## What is fetched Nothing third-party is committed; ROM sets, flash images, the BIOS and CDs are bring-your-own and are read in place. `scripts/fetch_references.py` rebuilds `reference/` (about 40 MB) from `scripts/pinned_files.json` (6 files by SHA-256: Dunkley's paper, note and data, the WD33C93A data book, two Capcom operator's manuals) and `scripts/pinned_repos.json` (6 repositories at full commit hashes, sparse where large: MAME 0.285's CPS-3 sources, FinalBurn Neo's, JTCPS3 with its schematics, the second FPGA core, the 3rd Strike decompilation, the dead-cart instruction table). ```sh python -I scripts/fetch_references.py # everything missing python -I scripts/fetch_references.py --verify # check what is present ``` It needs `git` and `curl`. No sudo. ## Scripts | Script | What | | --- | --- | | `scripts/fetch_references.py` | the pinned references | | `scripts/census.py` | every CPS-3 set MAME lists against the local libraries, BIOS SHA-1s, CHDs | | `scripts/mame_trace.py` | a set on MAME 0.285 headless: CPU symbols, an instruction trace, a last frame ([docs/mame-oracle.md](docs/mame-oracle.md)) | ## Licence MIT (see `LICENSE`), for what is in this repository. Fetched material keeps its own terms, recorded per entry in the pin lists.