# The cartridge EEPROM Sources: Atari's own driver and note, `reference/src/jaguar-sdk/jaguar/source/eeprom/eeprom.s` and `eedocs.asc` (1993-95, tier 2); **[TR10]** p.2, 14; MAME `jaguar.cpp` and Virtual Jaguar `eeprom.cpp` (tier 5); BigPEmu's release note on `-eeprombits` (tier 5, a search result, not read at source). ## The part and its wiring - "Standard Jaguar cartridge PCBs are currently equipped with a 128 byte E2PROM" (`eedocs.asc`): 64 words of 16 bits, a **93C46-class** serial EEPROM in 16-bit organisation. The driver names the part it was tested on as the National Semiconductor **NM93C14** "and equivalents" (Excel, Atmel, ISSI). MAME instantiates `EEPROM_93C46_16BIT`. Word 63 is by convention a checksum. - Three wires, all on existing decodes (`eeprom.s` l.48-73): | Line | Where | How | | --- | --- | --- | | DO (data out) | `JOYSTICK` `F14000`, read bit 0 | "do not rely on the readable status of JOYSTICK bit 0: it is random" without a cart [TR10 p.2] | | DI (data in) | GPIO0 `F14800`, write bit 0 | | | SK (clock) | **any access to GPIO0** pulses the clock (MAME: read or write of `F14801`) | inferred from MAME and Virtual Jaguar; the driver source implies it (each bit is one access) | | CS (chip select) | "pulsed low by any access to GPIO1" `F15000` | starts a new command | - Commands are 9 bits, start bit first: `110aaaaaa` read, `101aaaaaa` write, `10011xxxx` erase/write enable, `10000xxxx` disable (`eeprom.s` l.63-66); Virtual Jaguar's copy of the comment adds write-all `10001`, erase-all `10010`, erase `111aaaaaa`. A read shifts out a dummy 0 then 16 data bits, MSB first; a write is followed by a busy period the driver waits out with a delay ("modified to use delay rather than busy poll", 1994). ## Larger parts Retail carts use the 128-byte part. Aftermarket carts and flash carts use larger members of the family (93C56/66: 2 and 4 kbit with 8 address bits; 93C76/86: 8 and 16 kbit with 10), which differ only in the number of address bits clocked in. BigPEmu exposes this as a command-line option to set the EEPROM's address bits; Virtual Jaguar implements 64 words only. **Which images in the aftermarket set need which size was not determined** (**U16**): there is no header field for it; a database keyed by hash is the only way, to be filled from failures in the sweep. ## Model `jaguar_python.eeprom.Eeprom93Cxx(address_bits=6)`: a pure state machine with `cs_pulse()`, `clock(di)`, `do` and a `bytearray` image; saved as a `.eeprom` file beside the cart (git-ignored), big-endian words, erased state `$FFFF`. The MAME `nvram/jaguar/eeprom` file from a run is a detector for the image layout. The CD unit has its own EEPROM behind Butch (`$DFFF2C` in MAME's notes) and the Memory Track cartridge is a flash device: both belong to `jaguarcd-python`. ## Test Atari ships `test_e2.s` next to the driver: a program that exercises the part on a console (tier 2 source; needs `rmac`/`rln` to build: not built in this phase). The unit test of the state machine is the driver's own six functions run against it on the emulated 68000.