# a2600-rust-fast **Lineage:** a2600-python → a2600-rust → **a2600-rust-fast** → play-2600, a2600-play · fixes start in a2600-python and flow down by merges · [family charter](https://github.com/alewman/emulator-lineage/blob/main/docs/charter.md) The speed fork (tier `x-rust-fast`) of [a2600-rust](https://github.com/alewman/a2600-rust), the Rust transcription of the Atari 2600 board in [a2600-python](https://github.com/alewman/a2600-python), on [6502-rust](https://github.com/alewman/6502-rust) (crate `sixfiveohtwo`). Forked with its history at a2600-rust `07dfaf0` (remote `upstream`), merged from it at **`4802263`** (a2600-python `c410e47`, the same code as `28fb095`; the last merge with Rust changes was `f9af024`). The package is `a2600-rust-fast`; the crate is still `a2600`, as the family's fast forks keep their parent's crate name, so a host changes one line of its Cargo.toml. It exists because play-2600 runs in a phone's browser (WebAssembly), where a2600-rust's 3x real time on this machine leaves too little headroom. **The rule.** A change is kept only if the whole gate (`scripts/ladder.sh`: the transcribed tests, the 39 die traces, the reference's judges, the per-slice lockstep of every bus cycle against a2600-rust's traces, which are a2600-python's, plain and with a save state taken half way) is identical and `scripts/ab.sh` shows a win on every one of three code layouts; every shortcut has a seeded fault the gate catches. What did not pay is in [docs/not-kept.md](docs/not-kept.md), with its numbers. **This repository replaces an archived one.** An earlier `a2600-rust-fast` forked a transcription of a specification that was archived on 2026-11-14. This one was forked from the restarted a2600-rust and written without reading the archived repository in any form ([docs/handoff-brief.md](docs/handoff-brief.md)). "Matches a2600-rust" is execution fidelity (charter axis C), not hardware accuracy: what the board knows about the hardware, and how well, is the reference's (its docs/status.md and docs/validation.md). ## Status Every rung with its command, count and commit: [docs/status.md](docs/status.md). In short: the 39 die traces replay natively with exactly the reference's results; the reference's timer ROMs (on every row), all 116,730 #699 serial-table cells, its ten recorded frame-hash runs and its three per-row Pitfall II music runs come out the same; the per-slice lockstep against the reference is identical on all 232 cases of `scripts/cases.tsv` (the reference's whole smoke list, every cartridge scheme, every controller by input script, PAL, SECAM and the #699 console rows, the timer ROMs on every row, two #699 serial ROMs, Pitfall II's music per row, mid-run CPU hand-overs), and again with a save state taken half way and loaded into a fresh console; seeded faults are caught, including one or more for every shortcut this fork adds. **Speed** (`scripts/ab.sh a9fc6e0`, five games, three layouts): **x1.883 / x1.987 / x1.958** over the fork point; merging a2600-rust `f9af024` cost nothing measurable (x0.997 / x0.998 / x0.985, then x1.011 on a rerun, all noise). On a P-core of this machine, loaded: 5.7-6.7x real time natively (a2600-rust: 3.4-3.7x) and 5.0-5.4x as WebAssembly in Node, with the native checksums. Kept: `TIA::step` compiled per edge and per write, quiet steps that skip the object sections, the object sections' plain form when nothing is held, early-out object outputs, and two small caches kept out of save states. Tried and dropped, with numbers: [docs/not-kept.md](docs/not-kept.md). ## Use Beside this repository: `../6502-rust` (the CPU, a path dependency) and, for the gate, `../a2600-python` with its references fetched. A host crate takes `a2600-rust-fast` as a package and uses the crate `a2600`. ```sh cargo build --release target/release/a2600 ROM --frames 600 --png out.png --wav out.wav # headless cargo run --release --features frontend --bin a2600-play -- ROM # the window (SDL2) target/release/a2600-gates die | timers [--every-row] | serial PAL_7800 | hashes | hashes-rows scripts/ladder.sh [--faults] # the whole gate scripts/quickgate.sh # its behaviour judges (2 min) target/release/a2600-bench ROM [--frames N] [--snapshots] # speed, CPU time, checksum scripts/ab.sh BASE_REV # A/B on three code layouts cargo run --release --features profile --bin a2600-profile -- ROM # then scripts/profile.py cargo build --release --target wasm32-unknown-unknown --example wasm_bench node scripts/wasm-bench.mjs target/wasm32-unknown-unknown/release/examples/wasm_bench.wasm ROM.a26 ``` `a2600-play` takes the reference window's keys: arrows and Space (left joystick; Space and Left/Right drive a Driving controller, Z and X are a Booster Grip's extra buttons), I J K L and Right Shift (right joystick), the mouse for paddles, 1 2 3 / Q W E / A S D / Z X C and the numeric keypad for keypads, F1 Select, F2 Reset, F3 colour, F4/F5 difficulties, Escape. It has been judged headless only; no human has looked at it yet. SaveKey saves go to `$XDG_DATA_HOME/a2600-rust/savekey.bin` (default `~/.local/share/...`), never beside a ROM. Romsets are found through `NO_INTRO_DIR` (and `MAME_HASHPATH` for MAME's software list), never a path in this repository. ## Licence MIT ([LICENSE](LICENSE)); [NOTICE](NOTICE) carries the reference's notices (MAME's BSD-3 palette tables, the CC0 software lists, the cited documents).