# a5200-python **Lineage:** a5200-python → (a5200-rust, planned) · fixes start in a5200-python and flow down by merges · [family charter](https://github.com/alewman/emulator-lineage/blob/main/docs/charter.md) A readable, pure-Python emulator of the **Atari 5200 SuperSystem**, built as a board on [6502-python](https://github.com/alewman/6502-python) (the 6502C "SALLY", an NMOS 6502 with a HALT pin) and `pokey-python` (POKEY). This repository owns everything else: ANTIC's display list, DMA and interrupts, GTIA's picture, the 16K of RAM, the BIOS socket, the controllers, the cartridge port, the loader, and the one clock that ties them together. Correct and readable, not fast: Pac-Man runs at 2.6 frames per second on CPython 3.14 and 16.9 on PyPy 3.11 on this shared machine (real time is 60). ## Status (2026-11-12, session 3) | Milestone | Judge (tier) | Result | | --- | --- | --- | | 1. The CPU on the board | Acid5200 (3), MAME lockstep (detector) | passed: CPU tests 7/7; 10,000 cartridge instructions in lockstep on River Raid and Pac-Man | | 2. ANTIC's time | Acid5200 (3), [IJOR] (1, document) | passed: ANTIC 20/20; every [AHRM] DMA chart compared cell by cell (36 of 38,760 cells differ, C16) | | 3. The picture | Acid5200 (3), PAM (2), Atari800 (detector) | not met as written: GTIA 10/11 (`gtia_vdelay` writes $D000 and cannot pass on a 5200 as built, C12) | | 4. POKEY adopted, controllers | Acid5200 (3), PAM (2) | not met as written: POKEY 9/10 (`pokey_twotone`, filed on pokey-python); full suite 45 passed, 2 failed; PAM RAM pages now catch a seeded fault; Port Test needs loopback hardware | | 5. Every format, every dump | loader rules; detectors | all 286 local images load by default; the 39 unclassified 16K dumps settled by observed boots (13 one chip, 26 two); the 900-frame jam check ran on the smoke list and inside the milestone 7 sweep | | 6. 2-port row, BIOS revision A | ROM bytes (measured), [AHRM] F.2 (3) | passed | | 7. Trak-ball, frontend, sweep | detectors only | not met: CX53 model built (one title exercised); no pygame window; full Atari800 sweep: see validation.md | Acid5200 standalone: 46 of 48 (ANTIC 20/20, CPU 7/7, GTIA 10/11, POKEY 9/10). What is left: [docs/build-progress.md](docs/build-progress.md). Pins: 6502-python `741419a`, pokey-python `6ed1ffa` (`pyproject.toml`; the restarted core, adopted 2026-11-14: gates before and after in docs/status.md). Since 2026-11-22 the same code is pinned as 6502-python `828b619` (the history rewrite of 2026-11-21) and pokey-python `ea20096` (documents and its own repin since), both from GitHub. Measured status, every gate and what is left: [docs/status.md](docs/status.md). Every claim and its tier: [docs/claims.md](docs/claims.md); the record per milestone: [docs/validation.md](docs/validation.md). ## Use ```sh python -m venv .venv && .venv/bin/pip install -e '.[dev]' .venv/bin/python -m a5200_python "Pac-Man (USA).zip" --frames 600 --png out.png --wav out.wav .venv/bin/python -m a5200_python.acid cpu_ # Acid5200 tests (fetched, see below) ``` The BIOS is bring-your-own, found by SHA-1 (the 4-port CO19156 or revision A CO19156A) in `~/.local/share/a5200-python/bios/`, `$A5200_BIOS`, or the ROM sets the family's environment variables name: `$NO_INTRO_DIR/Atari - Atari 5200/[BIOS] Atari 5200 (USA).zip` and `$MAME_ROMPATH/a5200.zip` (`a5200a.zip` too in a non-merged set). Scripts read their cartridges from `$NO_INTRO_DIR/Atari - Atari 5200` and stop with a message when a variable is unset (`scripts/romsets.py`). Cartridges load from raw dumps or Atari800 `.car` files, loose or in zip/7z (`py7zr` if installed, else the `7z` program); the class comes from the size, a table built from MAME's CC0 hash files plus observed-boot rows measured here (`scripts/build_cart_table.py`), a CART header, or for an unknown 16K dump a labelled guess from a static walk ([docs/cartridge.md](docs/cartridge.md)). ## What is fetched Nothing third-party is committed. `scripts/fetch_references.py` rebuilds `reference/` from `scripts/pinned_files.json` (25 files by SHA-256) and `scripts/pinned_repos.json` (3 repositories at full commits). The Acid5200 ROMs are extracted from the pinned Acid800 archive into `tests/test_roms/` (ignored; see docs/build-progress.md). ## Licence MIT (see `LICENSE`), for what is in this repository; every source file carries `SPDX-License-Identifier: MIT`. Material kept from permissive sources (MAME's CC0 software list behind the cartridge table, facts from MAME's BSD-3 cartridge devices, the MIT Acid800 suite the harness reads) is listed with its notice in `NOTICE`; provenance per module in [docs/provenance.md](docs/provenance.md). The fetched material keeps its own terms, recorded per item in the pin lists.