# The expansion port, cartridges and memory expansions Tags as in [memory-map.md](memory-map.md). The census numbers are from `scripts/census.py nointro` ([census.md](census.md)). ## The port (PRG pp. 241-244) 44 contacts: data CD0-CD7, address CA0-CA13 (only 14 bits: "two bits are decoded into the BLOCK and I/O signals"), /RAM1-/RAM3 (1K each, $0400-$0FFF), /BLK1-/BLK3 (8K each, $2000-$7FFF), /BLK5 (8K, $A000), /I/O2 ($9800) and /I/O3 ($9C00) (C3 in memory-map.md), VR/W (the VIC's R/W) and CR/W (the CPU's), SΦ2, /IRQ, /NMI, /RESET, +5 V, ground. A cartridge is therefore **a set of memory chips on decoded selects**: no bank switching exists in the base design, and the board's socket is "these blocks answer reads (and writes, for RAM) from this device". ## What the No-Intro set needs - 288 software zips, 296 images (295 distinct by SHA-1); every image is plain ROM named by its load block (No-Intro's extension: `.a0` $A000, `.60` $6000, `.20`, `.40`, `.b0` the upper 4K of BLK5, `.70` the upper 4K of BLK3, `.80` a replacement character set, one `.bin`). - 231 zips fill BLK5 only; 32 BLK3 only; 6 BLK3 + BLK5; 5 BLK2; 4 BLK1; 2 BLK1 + BLK5; 5 the upper half of BLK5; one each the upper half of BLK3, a character ROM, a `.bin`. - 235 of the 239 $A000 images carry the KERNAL's autostart signature at $A004 (`A0CBM`, CBM in PETSCII); the other 4, and the 17 zips tagged `(SYS nnnnn)`, start by a BASIC `SYS` the player types (No-Intro puts the address in the name). - Sizes: 2K (3 images), 4K (63), 8K (192), 16K (38). The 16K images are 29 `.60`, 5 `.40` and 4 `.20`: two 8K chips in one file, the first at the block the extension names. By each half's SHA-1 against MAME's list (which names each chip's block): 25 `.60` are BLK3 + BLK5, 4 `.20` BLK1 + BLK5, 5 `.40` BLK2 + BLK3, and 4 `.60` images are not in MAME's list (1 has its second half there, at BLK5): OBSERVED for 34 of 38. Proposed rule for the rest: the second half goes to BLK5 when it carries the autostart signature, otherwise to the next block (HYPOTHESIS, U13). - MAME's CC0 cartridge list knows 213 of the 295 distinct images by SHA-1; among those only one needs a slot device (`3k`: a cartridge that needs the 3K RAM expansion). MAME lists six cartridges with special hardware (Final Expansion, Mega-Cart, IEEE-488, Video Pak, a 3K cart, `fp`); of the six only the `3k` one is among the No-Intro matches. So **milestone 3 is "map each image at the block its name says"**, with one small table of exceptions (the 16K images, the `.80` character ROM, the `.bin`, the cartridge that needs 3K RAM) filled from the images themselves and MAME's list (CC0, usable with attribution). ## Expansions (rows, not code paths) | Device | What it adds | Source | | --- | --- | --- | | VIC-1210 3K RAM | RAM1-RAM3 | its manual (funet, not pinned); MAME `3k` | | VIC-1110 8K RAM | one BLK (switch-selected) | MAME `8k` | | VIC-1111 16K RAM | two BLKs | MAME `16k` | | VIC-1211A Super Expander | 3K RAM + 4K ROM at BLK5 (the ROM is a No-Intro image) | PRG; funet manual | | VIC-1010 expansion module | six slots, a switch per slot | MAME `exp` | | Final Expansion 3, UltiMem, Mega-Cart | modern banked RAM/flash | out of scope (open decision 4); VICE-testprogs `fe3test`, `ultimem` record their hardware behaviour | ## Cartridge formats the host may meet No-Intro's raw images (the load block in the extension); VICE's `.crt` (with a header naming the type: community format, documented in VICE's manual, facts only); `.prg` (two-byte load address then data) for programs loaded into RAM. The board takes `{block: bytes}`; parsing a file format is the host's job, in one small module. ## Unknowns - U13: the four $A000 images without a signature and the `.bin` image: what hardware they expect (check against Cartzilla.txt and MAME's list when wiring). - What a write to a ROM block does (nothing, by the decoders on SCH-E: no write path in a ROM cartridge) and what a read of an empty block returns (open bus, U5).