# Cartridges, the BIOS, and the library census ## The slot 30 pins: A0-A14, D0-D7, four chip selects (`$8000`, `$A000`, `$C000`, `$E000`), power [TM; SCH sheet 2; Dan Boris's tracing, sheet 7 "Cartridge Connector", pins 1-30: D0-D7, A0-A14, `EN_80`/`EN_A0`/`EN_C0`/`EN_E0`, +5 V and a shield, and no `WR`, `RD`, `M1`, `A15` or clock, which sit on the expansion connector of the same sheet]. No `/WR`, no `/RD`, no clock, no audio: **a cartridge sees an address and a chip select, and cannot tell a read from a write** (two tracings agree). The memory decoder that makes the selects is enabled by `/MREQ` and `/RFSH` only, so a write to `$8000-$FFFF` selects the cartridge too, with the CPU driving the data bus. Hence every bank-switching scheme switches on an *address*, and "a read of `$FFC0`" in the emulators' descriptions really means "an access" on the hardware as drawn (MAME and MiSTer gate the MegaCart's switch with a read; whether a write to `$FFC0-$FFFF` also switches banks on a real MegaCart is not in any source here). A15 is not on the connector either; the selects stand in for it. (The Activision board decodes "writes" in MAME; on this pinout it can only see accesses; see below.) An image has **no header stating its size or board**: only the two magic bytes at its start ([memory-map.md](memory-map.md)). ## Board types Rewritten clean-room on 2026-11-26 (docs/provenance.md, "Mapper rewrite"): this section and `cartridge.py`'s banked boards come only from the documents named here, with the tags of `cartridge.py`'s source list. No library image uses a banked board (the census below), so every rule is checked on synthetic images only (`tests/test_cartridges.py`). | Board | Size | Banking | From | | --- | --- | --- | --- | | **Plain** (Coleco, third parties) | 8K-32K | none: ROM from `$8000` | Technical Manual | | **MegaCart** (Bryan Edewaard) | 128K-1M in 16K banks; a 64K game is built doubled into 128K | `$8000-$BFFF` the image's last 16K (holds the header); `$C000-$FFFF` the selected bank, counted from the image's start; an access to `$FFC0-$FFFF` selects bank `address & (banks - 1)`; bank 0 at power-on | DOC: colecovision.dk's MegaCart page (16K + 16K, sizes); CVBasic's manual and output (layout, `$FFC0 \| n`, top 64 bytes unused); rc2014-cv-megacart-ram's README (bank 0 at boot); cvaddict.com (64K doubled). HYPOTHESIS: writes switch too (the slot has no /WR), the hotspot read returns the new bank's byte, the power-on bank on a real board (no reset on the slot) | | **Activision PCB** (Team Pixelboy's name; Black Onyx, Boxxle, Arcomage, Jewel Panic) | up to 64K in 16K banks + a 24Cxx save chip (Black Onyx 256 bytes, Boxxle 32K) | `$8000-$BFFF` bank 0; `$C000-$FFFF` the selected bank; `$FF90`/`$FFA0`/`$FFB0` select banks 1-3; `$FFC0`/`$FFD0` clear/set SCL; `$FFE0`/`$FFF0` clear/set SDA; a read of `$FF80` returns bank 2's or bank 3's byte as SDA is low or high | DOC (second-hand): kevtris's register list and Pixelboy's posts in AtariAge topics 327053 and others, reached through search extracts (AtariAge refuses scripted fetches). Microchip's 24LC02B and 24LC256 data sheets for the chip. HYPOTHESIS: reads decode like writes, 16-byte register rows, all of `$FF80-$FFFF` reads by SDA (kevtris's own unchecked guess), bank 0 at power-on, a 256-byte chip when none is named | | **Super Game Cartridge / MegaCart 2** | MegaCart with a save | colecovision.dk names it; no document in hand gives its registers | not modelled | | **X-in-1 multicarts** ("31 in 1", "63 in 1") | 1M-2M | no permitted document in hand describes their selection (the earlier model came from emulator sources) | **not modelled** since 2026-11-26; `cartridge_for(..., "xin1")` raises | | **Atarimax Ultimate SD / flash multicarts** | flash carts with a menu | loaders: a dump of the game they load is a plain or MegaCart image | not modelled | Choosing a board (`cartridge_for`): 32K or less is plain; larger, the header (`$AA55` or `$55AA`) is where each board's fixed bank sits at `$8000`: in the last 16K for a MegaCart, in the first for the Activision board (64K or less). Anything else is taken as a MegaCart (HYPOTHESIS). `ColecoVision(..., board_type=...)` names the board instead. MAME 0.285's software lists (data, read for the census) name the boards `megacart`, `xin1`, `sgc_1mbit` and `activision` variants; the library holds none of those images. ## The census (2026-11-11, `scripts/count_carts.py`, nothing was run) Outputs: `tests/detectors/census-nointro.txt`, `census-retrobat.txt`, and one row per image with CRC-32 and SHA-1 in `rows-nointro.tsv`, `rows-retrobat.tsv`. | | No-Intro `Coleco - ColecoVision` | `roms-retrobat/colecovision` | | --- | ---: | ---: | | images | 201 (200 cartridges + the BIOS) | 140 (145 directory entries: 3 folders, `gamelist.xml`, `media`) | | also in the other set | | **all 140**, by SHA-1: a strict subset | | 8K | 20 | 13 | | 12K (12,288 bytes) | 11 | 11 | | 16K | 104 | 79 | | 20K (20,480 bytes) | 10 | 9 | | 24K | 29 | 19 | | 32K | 24 | 9 | | other sizes | 3 (8,448; 17,408; 18,688 bytes) | 0 | | over 32K | **0** | 0 | | header `55 AA` (straight in, no title screen) | **124** | 81 | | header `AA 55` (BIOS title screen) | 75 | 59 | | neither | 2 (the BIOS; Monitor Test `F3 ED`) | 0 | | in MAME 0.285's lists, every chip CRC matching | 120 (118 `coleco`, 2 `coleco_homebrew`) | 77 | | not in the lists | 81 | 63 | | board | 200 plain | 140 plain | | flags | 153 release, 24 Proto, 14 Beta, 5 Demo, 5 Unl | 138 release, 2 Unl | | regions | 135 USA, 51 USA+Europe, 8 Europe, 5 Canada, 1 Brazil, 1 Taiwan | 92, 42, 5, 0, 1, 0 | `No-Intro/Coleco - ColecoVision (Aftermarket)` is **empty**: the library holds no MegaCart, no Activision-board image, no multicart and nothing that needs the Super Game Module. Those boards can only be tested with images Aubrey would have to add (open decision 9). Three things the census shows that common descriptions do not: 1. **62% of the cartridges skip the BIOS title screen** (124 of 200 start `55 AA`). The usual account ("a few third parties bypassed the 12-second logo") understates it. 2. **81 of 200 images are not in MAME's list** although most are ordinary releases. MAME's list stores each cartridge as separate 8K chips; all eleven 12K images and nine of the ten 20K images are among the unlisted (MAME's list has no 12K entry at all), which points at padding to a chip boundary, and 27 of the 104 16K images are unlisted too. Not investigated title by title. 3. **"ColecoVision Monitor Test" is not a cartridge image as it stands**: 16K, first bytes `F3 ED`, neither magic. An AtariAge thread on system test ROMs calls its origin unclear and says the 16K dump does not work; consistent, not investigated further. Test cartridges in the library: **Final Test Cartridge (USA)** (8K, CRC `3ae4b58c`, SHA-1 `cef53b9e...`, MAME `finaltst`), **Super Controller Tester (USA)** (16K, CRC `eb6cb4d8`), **ColecoVision Monitor Test** (above), plus five demos (Music Box, the Berenstain Bears...). ## BIOS dumps | Dump | Size | CRC-32 | SHA-1 | Have it? | | --- | ---: | --- | --- | --- | | **ColecoVision NTSC** (MAME `coleco`, `313_10031-4005_73108a.u2`; No-Intro `[BIOS] ColecoVision (USA, Europe)`) | 8,192 | `3aa93ef3` | `45bedc4cbdeac66c7df59e9e599195c778d86a92` | **yes**, four copies with this SHA-1: MAME `coleco.zip`, the No-Intro zip, `share/batocera/bios/Machines/COL - ColecoVision/coleco.rom`, `share/twilight-nds/roms/bios/coleco.rom` | | **ColecoVision PAL** (MAME `colecop`, `r72114a_8317.u2`, from an Italian console, board "(C) 1983 91162 rev D") | 8,192 | `d393c0cc` | `160077afb139943725c634d6539898db59f33657` | **yes**: MAME `colecop.zip` | | Onyx (Microdigital, Brazilian prototype clone) | 8,192 | `011c32e7` | `f44263221e330b2590dffc1a6f43ed2591fe19be` | yes: MAME `onyx.zip`; 619 bytes differ from NTSC; out of scope | | CZZ-50 / Dina / Personal Arcade (Bit Corporation clones) | 16,384 | `4999abc6` | `96aecec3712c94517103d894405bc98a7dafa440` | yes: MAME `czz50.zip`; another machine; out of scope | | ColecoVision Flashback (2014 plug-and-play) | 2 MiB flash | `f78849a2` | `d687b19dabcb404ae4787c798ae4cea69fa7acc7` | yes: `colecofl.zip`; out of scope | | "No delay", "short delay", "skip with fire" and font-swapped hacks | 8,192 | various | **not established** | **no**: none in the local sets; they are community patches (below) | Measured here on the two Coleco dumps: - **49 bytes differ** between NTSC and PAL, in four places: the filler between the restart vectors (`$0006-$0037`) and at `$0059-$0065` and `$1F5D-$1F5F` (`FF` in the NTSC ROM, other values in the PAL ROM); **`$0069` = `$3C` (60) against `$32` (50)**, the frame-rate byte games read; and **`$196A` = `$17` against `$06`**, the count of the title screen's delay loop (`21 00 17` / `21 00 06`: `LD HL,$1700` / `LD HL,$0600`). So the PAL ROM's logo delay is about a quarter of the NTSC one's: by the forum's figure for this byte (`$05` = 2.75 s) about 3.3 s against 12.7 s. Not timed here. The OS-7 listing's revision history says "Filler locations changed to 0FFH to reflect OS_7PRIME" (rev 4, 14 Feb 1983) and "Timing change to shorten LOGO delay" (rev 3, 24 Nov 1982) [CG], so several Coleco revisions existed; **only these two dumps are known to MAME and No-Intro**. A forum claim that every "PAL" BIOS online is the NTSC one is wrong for MAME's dump. - The Final Test Cartridge prints the ROM's 16-bit byte sum: **`D483`** for the NTSC ROM (computed here from the dump and shown on screen by both detectors). The PAL ROM sums to `BE86`. - **Delay hacks**: AtariAge threads describe patches that change the byte at `$196A` or skip the title; some later homebrew is reported not to start with a no-delay ROM. A "3.3 second" ROM offered there would be the PAL ROM's own value in an NTSC ROM (our inference). No hash list for these patches was found; if Aubrey wants one supported, it should be produced as a documented patch of the real ROM, not fetched (open decision 8). BIOS handling: bring your own, read in place by path (argument or `COLECO_BIOS`), verified by SHA-1 with a warning for unknown dumps, never committed.