# Memory cards (Credit Card Memory, CCM) ## What the TRG says (DOC, 2.3, 2.6, 3.3.2, 3.6) - Card types: static RAM with a lithium cell (32, 64, 128 KB), OTPROM (64, 128 KB, programmable at 12.5 V), mask ROM (128 KB). The BIOS supports larger cards made of 128 KB pages with a page register at offset 0Ah (2.3.5; 3.6.1 says offset 10 of the boot sector, which "DO NOT use"). - Pin-out (2.3.6): 32 pins, A0-A16 (17 address lines: 128 KB), D0-D7, CE, OE, WE (RAM; PGM on OTPROM), VBB/VPP, VCC, GND, and a short CDET pin "used to detect presence of card". - The card appears in the 128 KB window C0000-DFFFF in place of ROM B when the BIOS selects it (2.2.4); an external card on a peripheral uses NCC1/CDET (2.6.2). - Format: like a floppy, one sector per cluster (3.6.1); drives A: (internal slot) and B: (peripheral). AUTOEXEC.BAT on A:/B: runs in preference to C:'s; CONFIG.SYS always from C: (3.6.2). `.RUN` files execute in place from the card (3.6.3). Removing a card under a running program raises "ERROR: Card Access" (3.6.3), so card removal is an interrupt (the "critical error" source of 2.4.4). ## For the build - `cards.py`: a `Card` protocol (size, read, write when RAM, write-protect for ROM/OTPROM, present), images supplied by the player as raw byte files; card detect drives the ASIC's interrupt. The bus contract is a flat 17-bit byte device; the disk layout is the firmware's business, not the board's. - Unknowns: U16 the ASIC register that swaps ROM B for the card and the one that reports card presence (U3's register map); U17 the paging register's hardware (does a 256 KB card latch writes to offset 0Ah itself?); U18 card wait states. - Software: MAME's CC0 list `pofo.xml` has one card, the File Manager/Tutorial (`ca400702-001 rev. b`, 128 KB); no set for it on this machine (census.md).