# Reuse: what carries over from the 5200, and what this board adds The 5200 SuperSystem is an Atari 400 rearranged as a console: the same CPU, ANTIC, GTIA and POKEY, without the PIA, keyboard, OS, BASIC or SIO devices ([AHRM] 13.2 lists the differences). a5200-python (local, Acid5200 46 of 48, 78 cartridge images identical to Atari800 at frame 900; its README and docs/status.md) is therefore most of this board's chip work, done. This page says precisely what carries over, what differs, and where each chip should live. ## Family cores and what each would need | Chip | Family core today | Used by | What this board needs from it | | --- | --- | --- | --- | | 6502 / 6502C SALLY | 6502-python (`sixfiveohtwo.MOS6502`, pinned by a5200-python at 828b619) | 2600, 5200, 7800, NES boards | nothing new for the computer: HALT as a held clock and RDY as a repeated read are the board's, as on the 5200 (a5200-python docs/sally-halt.md, "no 6502-python change needed"). For the drives, a 13-bit address mask (6507): the board can mask addresses itself, as a2600-python does | | ANTIC | inside a5200-python (`antic.py`, 736 lines) | 5200; **now the 8-bit computers** | extraction (below), then the computer-only inputs: the RNMI line (400/800 System Reset, NMIST bit 5, [AHRM] 2.4), the light-pen inputs (PENH/PENV are fixed values on the 5200), PAL timing (312 lines; `VSYNC_LINES` is NTSC-only today), the ANTIC revision's refresh counter (7 or 8 bits, [AHRM] 2.3) | | CTIA/GTIA | inside a5200-python (`gtia.py`, 495 lines; `pal` and `ctia` already chip fields "for a future computer board", its U14) | 5200; **now the 8-bit computers** | extraction, then: CONSOL as inputs as well as outputs (Start/Select/Option read through the lines GTIA can pull low, [AHRM] 6.11; on the 5200 they are outputs only), the PAL register and PAL colour encoding, TRIG2/TRIG3 wired to board lines (XL/XE cartridge sense, XEGS keyboard sense, [AHRM] 2.8), the CTIA row exercised for real | | POKEY | pokey-python (pin ea20096 / 6ed1ffa) | 5200, 7800 carts, AcidSAP | **the serial shift registers.** pokey-python's decision 2 built only the serial port's audio-affecting parts and left the shifters "stubbed idle ... the rest when the 8-bit computer board starts" (its handoff-brief, decision 2; status rung 7). SIO, the cassette and five Acid800 POKEY tests (`pokey_serclock`, `pokey_serdirect`, `pokey_sertiming`, `pokey_skstat`, `pokey_twotone`) need them. The keyboard scan (rung 6, built for the 5200 keypad) is the computer's keyboard scan unchanged; the pots work through its `rc.PotRC` | | 6520 PIA | none | (no other family board) | stays in this board (chip rule); see [pia-keyboard-console.md](pia-keyboard-console.md) | | 6532 RIOT (in the 810 and 1050 drives) | inside a2600-python (`riot.py`); a7800-python pins a2600-python whole | 2600, 7800 | only if the drive is built at chip level (decision D4); then a drive board is RIOT's second family consumer and `riot-python` extraction comes up | | WD FD1771 / WD2793 (drives) | none; msx-python's Phase 0 plans a functional WD2793 inside its board | MSX (planned) | only for a chip-level 1050/810; two consumers of the 279x family would justify a `wd179x-python` core then | | 65C816 (accelerators, Rapidus, etc.) | 65816-python | SNES | out of scope; Acid800's `cpu_65c816` is skipped on a 6502 | ## What carries over from a5200-python, precisely 1. **ANTIC, whole.** DMA per machine cycle, refresh, WSYNC/RDY, NMI timing, the playfield DMA clock and line buffer after [IJOR], the AN codes to GTIA. ANTIC is at $D400 on both machines ([AHRM] 13.2: "works the same as on the XL/XE"). Acid5200's 20 ANTIC tests are Acid800's 20 ANTIC tests relocated (the standalone list in `reference/test-roms/acid800/out/Release/Acid800/standalone/` has the same 20 names). 2. **GTIA, whole**, moved from $C000 to $D000. The 5200 cannot pass `gtia_vdelay` because that test writes $D000, which selects nothing on a 5200 (a5200-python C12); on the computers $D000 *is* GTIA, so the 800 row should pass all 11 GTIA tests. 3. **POKEY's adoption contract**: one `tick()` per machine cycle, halted cycles included, after the cycle's bus access; /IRQ handed to the CPU at the next cycle; audio from `mix()` (pokey-python docs/adoption.md, as a5200-python wires it). Moved from $E800 to $D200. 4. **The serial order of record** of one machine cycle (a5200-python docs/architecture.md): pending /IRQ, `ANTIC.begin()`, RDY, the bus access, `ANTIC.end`, GTIA's two colour clocks, `POKEY.tick()`, NMI, audio. This board adds the PIA (its control-line edges and IRQ on the same cycle boundary) and the SIO lines. 5. **The board's structure and tooling**: the machine-row dataclass, save states naming ROMs by hash, the Acid harness (`acid.py`), the Atari800 and MAME detector scripts, the floating data-bus latch (one per bus here: see 6 below). 6. **What does not carry over**: the 5200 memory map and its BIOS socket; the controllers module (the 5200's analog sticks and multiplexed keypads; the computers have digital joysticks on the PIA, paddles on POKEY and a real keyboard); the 5200 cartridge classes (one- and two-chip 16K, Bounty Bob); the trak-ball. And three things the 5200 simply does not have: the **800's second, split I/O data bus** (ROM, PIA, POKEY and cartridges on one side of transceivers, CPU/ANTIC/GTIA on the other, each with its own floating value: [AHRM] 2.3), the XL/XE **data-bus pull-ups** (unhandled reads give $FF on an XL and some XEs), and the **System Reset** wiring (RNMI on the 400/800, a real reset line from the 1200XL on). ## What this board adds (the scope of the 5200's absence) | Subject | Document | | --- | --- | | the 6520 PIA: joystick directions, SIO command and motor lines, PORTB banking and LEDs | [pia-keyboard-console.md](pia-keyboard-console.md) | | keyboard through POKEY, Shift/Control/Break, console keys through GTIA, the 1200XL function keys, the XEGS detachable keyboard | [pia-keyboard-console.md](pia-keyboard-console.md) | | memory maps: 400/800 decoding, the XL/XE MMU, OS/BASIC/self-test banking, the 130XE window with separate ANTIC access, the XEGS game ROM | [memory-map.md](memory-map.md) | | OS ROM, BASIC and drive firmware by SHA-1; AltirraOS | [firmware.md](firmware.md) | | cartridges: left/right slots, RD4/RD5, CCTL $D5xx, 8K/16K, OSS, Williams, SpartaDOS X, XEGS and the rest | [cartridges.md](cartridges.md) | | SIO bus, disk drives (810, 1050), cassette (410/1010), image formats | [sio-disk-cassette.md](sio-disk-cassette.md) | ## The chip rule: extract ANTIC and GTIA now a5200-python's open decision 2 (decided 2026-11-12, "yes to all the recommendations") chose: ANTIC and GTIA stay in the 5200 board behind pin-shaped interfaces, "extracted with history when an 8-bit-computer board starts", with PAL and CTIA kept as chip fields so that "extraction is a move, not a rewrite". The charter says the same: "A chip that a second project needs becomes its own core, extracted with history and pinned by both." This board is that second project. **Proposal (decision D2): extract both, as two cores, `antic-python` and `gtia-python`**, as this board's milestone 0. - **Two cores, not one.** They are separate parts (C012296 and C014805/C012295) with a narrow channel between them (the three AN lines per colour clock, plus HALT for P/M DMA latching), already separate modules with that channel explicit in a5200-python's architecture.md. CTIA/GTIA and ANTIC also vary independently (mixed NTSC ANTIC with PAL GTIA machines exist: [AHRM] 4.2, "Mixed PAL/NTSC systems"). - **How.** With history (a fresh clone, `git filter-repo` keeping `src/a5200_python/antic.py` and its tests; never on a working tree with uncommitted work, the family's lesson of the filter-repo hard reset), into `antic_python.ANTIC` and `gtia_python.GTIA`, then a5200-python repins to them in one commit whose gate is unchanged: Acid5200 46 of 48 (the same two misses) and the 78 images identical to Atari800 at frame 900. Only then are the computer-only inputs above added upstream in the cores, each with its own test. - **The Rust line follows.** a5200-rust transcribes the same modules; `antic-rust` and `gtia-rust` would be extracted the same way when the 8-bit computers reach the Rust tier. - **Why not leave them in a5200-python and import from it?** Boards pin cores, not other boards; importing a board's internals would freeze the 5200's file layout into this board's API and let a 5200 change break the computers silently. - **Why not one board repository with 5200 and computer rows (a5200-python's option (c))?** The 5200 already has its own lineage (a5200-rust, its docs and gates); folding it into a computer repository would rename and reshape a finished board. Extraction keeps both boards as they are. The judges move with the chips: Acid800's 20 ANTIC and 11 GTIA tests, run on the 800 row, become the cores' conformance cases beside Acid5200's; the cores' own harness runs them through a thin board (a CPU, RAM and the chip), because neither chip can be exercised without a bus master.