# Sockets: where the CPS-2 board reaches outside itself The family's add-on pattern (megadrive-python `docs/expansion-sockets.md`): a base board with a small number of explicit sockets, test-only fakes for each, and a gate that proves the board is byte-for-byte unchanged with nothing plugged in. CPS-2 has no add-on computer like a Sega CD; its "add-ons" are B-board daughter boards and a link cable, so the sockets are few. The interesting boundaries are the **shared chips** that come from other repositories. ## Hardware facts | Thing | What it adds | Source | | --- | --- | --- | | ROM extension (93646C, 93661G) | more graphics/sample ROM on CN5/CN6 | `cps2-reverse` README (not traced); data only | | QSound ROM extension (93646E) | sample ROM | `cps2-reverse` `93646E` (traced) | | Extra RAM (on an add-on board) | 16 KiB at `660000-663FFF`, word `664000`; `804030` bit 14 = 0 when present | MAME `cps2_map` | | Network board (93646D) | uPD71051 USART + routing PAL at `620000-620021`; `804030` bit 15 = 0 when present; used by `ssf2tb` (Tournament Battle link play) | MAME `cps2comm.cpp`, `cps2_comm_map` | | Flash single board (00716C) and the all-in-one black board | flash instead of mask ROM; no digital volume (MAME `init_singbrd`) | `cps2-reverse` README; MAME | | CN9 (B-board revision 5 on) / CN2 pins | security injection: the key bit stream | ArcadeHacker `.ino`; DL-1827 pins | ## Proposed sockets | Socket | Kind | With nothing attached | First user | | --- | --- | --- | --- | | `RomSet` | the loader's output: program words, opcode image (or key + cipher), graphics (unshuffled), Z80, samples, key, EEPROM image | n/a (mandatory) | every set; the decrypted-set path (Phoenix sets) uses the same socket with an all-`FF` key | | `ExtraRam` | 16 KiB + one word in `660000-664001`, presence bit in `804030` | unmapped, bit 14 reads 1 | games that keep high scores there | | `LinkPort` | the uPD71051 at `620000-620021`, presence bit in `804030` | unmapped, bit 15 reads 1 | `ssf2tb` family: a later network board, two board instances talking (no other computer) | | `SoundDevice` | the QSound device behind `D000-D007` of the Z80 and the volume at `804030`; samples out | must exist for a playable machine; a silent fake (ready always set) for video-only rungs | `qsound-python` (or wherever open decision 3 puts it) | | `VideoChips` | the CPS-A-01/CPS-B-21 package with the injection points of [video.md](video.md) (ROM mapper, object source absent, replaceable mixer, raster line to IPL2, bus-steal accounting) | n/a (mandatory) | `cps-video-python` (staged inside cps1-python first; open decision 1) | | `KeyLoader` | the CN9 serial protocol (unlock, 160 clocked bits) as an alternative way to set the key | key from the `.key` file | only for a test that replays the ArcadeHacker sequence; optional | | `Eeprom` | three lines out, one in, a 128-byte image | a blank (all `FF`) 93C46 | every set | `SoundDevice`, `VideoChips` and `Eeprom` are dependency boundaries rather than add-ons: they let the board pin the shared chips and let tests replace them with fakes (a silent QSound makes the video rungs fast; a recording QSound fake gives the Z80-side tests their oracle). ## The gate Before any optional socket is used, the base must be frozen at a tag with: rung 1's cipher check, the `spf2t` boot lockstep against MAME (`0 unexplained`), and the smoke list's picture records. Attaching `ExtraRam` or `LinkPort` to a set that does not use them must not move any of these.