# Handoff brief: a5200-rust **Lineage:** a5200-python → **a5200-rust** · fixes start in a5200-python and flow down by merges · [family charter](https://github.com/alewman/emulator-lineage/blob/main/docs/charter.md) Written first, 2026-11-14, by the Transcription role (charter tier `x-rust`). ## Goal Transcribe `a5200-python` (the Atari 5200 SuperSystem board) line by line into Rust, proven identical to it per slice (every bus cycle, every picture), so the 5200 can play at real speed and later get a `-fast` fork and a play site. ## The reference and the cores | What | Where | Pin | | --- | --- | --- | | reference board | `/data/emu/a5200-python` (private), cloned to `external/a5200-python` | `844355d` (the board on the restarted POKEY) | | reference interpreter | `/data/emu/a5200-python/.venv-pypy` (PyPy 3.11, 6502-python `741419a`, pokey-python `6ed1ffa`) | run with `sys.path` pointing at the clone's `src` | | CPU | `6502-rust`, crate `sixfiveohtwo`, by **git** (`github.com/alewman/6502-rust`, public) | `71747eb` (transcribes 6502-python `741419a`; `129e742` adds docs only) | | POKEY | `pokey-rust`, crate `pokey`, by **git** (`github.com/alewman/pokey-rust`, public), `serde` feature | `b37263d` (transcribes pokey-python `6ed1ffa`) | Git dependencies at pinned revisions (as famicom-rust does for 6502-rust), so CI needs no sibling checkouts and the build cannot drift with a local working tree. ## Scope 1. Crate `a5200`: module for module (`machine`, `board`, `antic`, `gtia`, `controllers`, `state`, `bios`, `system`, `media`, `debug`, `acid`, `cartridge/{mod,mappings,walk}`), same names, order, structure, comments and evidence tags; ANTIC and GTIA stay in the board. Rust-forced differences in each module header. 2. The gate `scripts/ladder.sh`: `scripts/a5200_trace.py` (reference) and `a5200-trace` (Rust) write one line per slice (one frame: `Console.run_frames(1)`): CPU state, board time, CRC of every bus cycle, CRC of the finished picture, audio CRC with `--audio`; `scripts/lockstep.py` compares them over case tables (both BIOS rows, Acid5200 standalone tests, the smoke list, every cartridge class, trak-ball and keypad scripts) plus `--save-at-half`. Reference traces cached by case (`external/refcache`). Unit tests transcribed where they test behaviour; Acid5200 natively (46/48 expected); seeded faults (`scripts/seeded_faults.py`). 3. `a5200-play` behind the `frontend` feature (SDL2). The reference has no window (its pygame-ce window is unbuilt), so the controls follow gameboy-play's conventions, mapped to the 5200 pad. 4. Charter obligations: LICENSE (MIT), SPDX headers, NOTICE, lineage line, docs/status.md, romsets by `NO_INTRO_DIR` / `MAME_ROMPATH` only, minimal CI (fmt, clippy, tests; lockstep local only). ## Rules Transcribe, do not redesign. A reference behaviour that looks wrong is reported upstream with a repro, never fixed here. Local git only. ROMs and BIOS read in place. Never modify the reference, the cores or their Python references. ## Models `/data/emu/gameboy-rust` (trace and lockstep scripts, case tables, reference cache, save-at-half, seeded faults) and `/data/emu/famicom-rust` (a 6502 board on 6502-rust).