# Memory maps Source tags used in every document of this repository: | Tag | Source | Tier | | --- | --- | --- | | `[die]` | Loïc Petit's trace of DL-0311 / DL-0921 from die photographs (`reference/src/cps2-reverse`) | 1 by origin; read as a document, not simulated | | `[sch]` | Capcom's A-board and B-board schematics, scans (`reference/src/mad/machine/cps1/docs`) | 2 | | `[pal]` | PAL equations: dumps in the ROM sets, equations quoted in MAME's source comments | 1 (the fuse maps) / 3 (the quoted equations) | | `[pcb]` | a named observation on a real board, quoted where cited | 1-3 by how it was taken | | `[jt]` | jotego's jtcps1 (HDL) and its notes | 4 | | `[book]` | Sanglard, *The Book of CP-System* | 3 | | `[mame]` | MAME 0.285 `cps1.cpp` / `cps1_v.cpp` | 5 | | `[fbneo]` | FinalBurn Neo | 5 | ## 68000 (standard boards) 24-bit addresses. Decode is done by five PALs on the A-board (PRG1, IOA1, BUF1, ROM1, SOU1), the same on every A-board revision `[pal: equations in cps1.cpp l.485-580]`, and one or two on the B-board (LWIO or IOB1, later also BPRG1). | Range | What | Decode and notes | | --- | --- | --- | | `000000-3FFFFF` | program ROM (B-board) | ROM1 PAL: `/RDB` for `A23=A22=0`; seven chip selects PRG0-PRG6 cover `000000-27FFFF` in 256 KiB and 512 KiB steps `[pal]`. No game uses more than 2 MiB | | `800000-800007` | IN1: player 1 and 2 sticks and buttons (read) | IOA1 `[pal]`. Forgotten Worlds, Willow, Carrier Air Wing, Nemo and Varth also read `800010`, which IOA1 does not decode ("probably debug input leftover" `[mame]`) | | `800018-80001F` | IN0 (coins, start, service) and DIP switches A, B, C (read): one byte each on the **high** byte of the word at `800018, 80001A, 80001C, 80001E` | IOA1 `[pal]`; MAME returns `0xFF` in the low byte | | `800030-800037` | coin counters and lockouts (write, high byte) | IOA1 "outputs" `[pal]`; bit 15 "CPS-A custom reset?" `[mame]` (U6) | | `800040-80005F` | Forgotten Worlds only: uPD4701 dial counter on the B-board | LWIO PAL `[pal]`; [inputs.md](inputs.md) | | `800100-80013F` | **CPS-A-01** registers (write only) | IOA1 `/PPU1` `[pal]`; [cps-a.md](cps-a.md) | | `800140-80017F` | **CPS-B-xx** registers (read/write) | LWIO/IOB1 on the B-board `[pal]`; `8001C0-8001FF` on the two SF2 sets with the IOB2 PAL (CPS-B-18) `[mame]`; [cps-b.md](cps-b.md) | | `800174-80017B` | Pang! 3 only: the Mach215 security PLD on its unique 94916-10 B-board, inside the CPS-B window; the 93C46 EEPROM's serial lines at `80017A` (Pang! 3 is the only non-QSound set with an EEPROM) | `[mame: init_pang3]`; PAL CP1B8K sets the range; [inputs.md](inputs.md) | | `800180-800187` | sound latch 1: command (write, low byte) | IOA1 "sound 0B" `[pal]` | | `800188-80018F` | sound latch 2: "timer fade" (write, low byte) | IOA1 "sound 1B" `[pal]` | | `900000-92FFFF` | graphics RAM, 192 KiB: object list, scroll maps, row scroll table, palette source | BUF1 PAL: BUF0-BUF2 `[pal]`; `930000-96FFFF` decoded for the B-board, never populated | | `FF0000-FFFFFF` | work RAM, 64 KiB | PRG1 `/workram` is true for `FC0000-FFFFFF` `[pal]`: the 64 KiB should repeat four times. MAME maps `FF0000` only (U1). Ganbare! Marine Kun and Puchi Monster: the **low byte** of every word is also an M48T35 timekeeper (NVRAM and clock) on the B-board `[mame: ganbare_ram_r/w]` | Things the table does not show: - **Under `/IOCS` only A8-A3 are decoded** by IOA1 `[pal]`, so the I/O block should repeat through `800000-8FFFFF` every 512 bytes. FBNeo mirrors `800000-807FFF` (HYPOTHESIS: read from its non-commercial source in Phase 0; not fetched since 2026-11-24); MAME does not mirror. Which games depend on a mirror: none known (U1). - **CPS-A registers are write-only.** Pnickies reads `80010C-800116` at boot, which MAME logs as unmapped (measured here, [mame-oracle.md](mame-oracle.md)); what the bus returns is U2. - **Graphics RAM is ordinary RAM to the 68000.** Street Fighter II' CE runs code from it `[mame]`. The CPS-A reads it by taking the bus ([cps-a.md](cps-a.md), "Bus requests"); it has no port of its own. - **`/ONE WAIT`.** PRG1 pin 14 asserts for every cycle with `A23=1` or `A22=0`, which is ROM, I/O, graphics RAM and work RAM: every decoded region; only the empty `400000-7FFFFF` escapes `[pal]`. The equation was checked here against the fuse map itself: PRG1 and IOA1 from the `sf2ce` set decode with `scripts/decode_gal16v8.py` to exactly the equations MAME quotes ([gfx-mapping.md](gfx-mapping.md)). On the QSound A-board PRG2's term is `!A23 | !A22 | !A21 | !A20 | (A19 & A18 & A17 & A16)`: the wait is inserted everywhere except `F00000-FEFFFF`, so the sample-ROM read and the two shared-RAM windows run without it (they have their own timing, U3) `[pal: quoted, not decoded]`. jtcps1 implements it as one wait state on ROM and RAM cycles and calibrated the result against a loop counter run on a real board `[jt: DMA.md]` (the board measurement is the author's prose; that the HDL does it is HYPOTHESIS, read from its GPL source in Phase 0 and not fetched since 2026-11-24). MAME has no wait states. See [quirks.md](quirks.md) Q1 and C1. ## 68000 (QSound boards, "CPS-1.5") The A-board's PRG1 PAL is replaced by PRG2 and the sound section moves to a D-board `[mame]`. | Range | What | | --- | --- | | `000000-1FFFFF` | program ROM | | `800000-80017F` | as above: IN1, IN0 (the DIP positions read fixed values: settings live in the EEPROM), coin control, CPS-A, CPS-B | | `900000-92FFFF` | graphics RAM | | `F00000-F0FFFF` | read: the QSound sample ROM's first 64 KiB, one byte per word (Slam Masters reads it as a protection check) | | `F18000-F19FFF` | RAM shared with the Z80 (`C000-CFFF` there), low bytes | | `F1C000` / `F1C002` | IN2 (player 3) / IN3 (player 4) | | `F1C004` | second coin control (players 3 and 4) | | `F1C006` | 93C46 EEPROM: read bit 0 = DO; write bit 0 = DI, bit 6 = CLK, bit 7 = CS | | `F1E000-F1FFFF` | second RAM shared with the Z80 (`F000-FFFF` there), low bytes | | `FF0000-FFFFFF` | work RAM (PRG2 decodes it fully `[pal]`) | There are no sound latches: the 68000 writes commands into the shared RAM. All from `[mame: qsound_main_map]`; the D-board has four PALs (D7L1, D8L1, D9K1/D9K2, D10F1) whose fuse maps are in the ROM sets and were not decoded in this phase (U3). ## Z80 (standard sound section) Z80 at 3.579545 MHz (`[mame: "verified on pcb"]`, the same crystal clocks the YM2151). Its only interrupt source is the YM2151's `/IRQ` on the Z80's `/INT` `[mame: irq_handler]`; the interrupt mode is whatever the program sets. Decode by the SOU1 PAL `[pal: equations in cps1.cpp l.587-606]`. | Range | What | | --- | --- | | `0000-7FFF` | program ROM, fixed | | `8000-BFFF` | program ROM, banked: one bit at `F004` selects between two 16 KiB banks of the 64 KiB ROM (`0x8000` or `0xC000` in the file) | | `D000-D7FF` | RAM, 2 KiB (SOU1's `workram` select covers `D000-DFFF`; MAME maps 2 KiB, so a 2 KiB chip would repeat at `D800`: inference, chip size to read off the schematic) | | `F000-F001` | YM2151: address, data (read: status) | | `F002` | MSM6295 command / status | | `F004` | bank latch (write, bit 0) | | `F006` | MSM6295 pin 7 (write, bit 0): the sample-rate select | | `F008` | sound latch 1 (read) | | `F00A` | sound latch 2 (read) | Pang! 3 has a 128 KiB sound EPROM (census); MAME loads its first 32 KiB and ignores the rest (`ROM_IGNORE(0x18000)`), so its banked window reads an empty region. What the board does with the other 96 KiB is U4. ## Z80 (QSound D-board) Z80 at 8 MHz `[mame: "verified on pcb"]`, **Kabuki-encrypted** on all five QSound parents and on `wofch`: four keys, Slam Masters and Muscle Bomber Duo share one `[mame: kabuki.cpp, init_*]` ([sound.md](sound.md)). | Range | What | | --- | --- | | `0000-7FFF` | program ROM; opcode (M1) fetches and all other reads decode with different keys (Kabuki) | | `8000-BFFF` | banked ROM, 16 KiB banks selected by `D003` (low 4 bits); **not encrypted** `[mame]` | | `C000-CFFF` | RAM shared with the 68000 (`F18000`) | | `D000-D002` | QSound DSP: data high, data low, register/command (write) | | `D003` | bank select (write) | | `D007` | QSound DSP status (read): bit 7 = ready | | `F000-FFFF` | RAM shared with the 68000 (`F1E000`) | The Z80 is interrupted 250 times a second `[mame: set_periodic_int, "measured (cps2.cpp)"]`; which part of the D-board divides it down is not documented in what was read (U3). ## CPS Changer MAME runs `wofch` on the QSound map and `sfzch`/`sfach`/`sfzbch` on the standard map with different input ports (`sfzch` is `cps1_12MHz`; `wofch` is `qsound` with the Warriors of Fate Kabuki key). What the home console's own board changes (the controller ports, any BIOS-less boot, the audio/video output) was not researched from a hardware source in this phase (U5).