# atari800: the libatari800 driver in 5200 mode A driver of Atari800's library build (libatari800) through its public C API, loaded with Python's ctypes, for a5200-python: Atari800 as a second detector beside MAME. Moved here from `emu-tools-gpl` on 2026-11-24 (licence verdict in `../../docs/upstreams.md`). Not on the shared contract yet; command line and output are as they were. ## Path `$EMU_TOOLS_GPL2/tools/atari800/atari800_run.py` (old location: `emu-tools-gpl/tools/a5200-python/atari800_run.py`, now a link to this file). ## What it measures Atari800's picture, CPU state and sound for 5200 cartridges: per sampled frame the SHA-1 of the 384x240 screen of colour-register values (not RGB), the CPU's PC, A, X, Y, S and P, and ANTIC's DMACTL, as the library's state block reports them. **Every output is OBSERVED** (Atari800 at `98cc2dc`, via this driver): an emulator observed as a closed box, never a hardware fact. ## Command line python "$EMU_TOOLS_GPL2/tools/atari800/atari800_run.py" CART [--frames N] [--every N] [--bios orig|a] [--cart-type N] [--press FRAME:KEY:FRAMES] [--pgm FILE] [--wav FILE] [--work DIR] [--lib PATH] Run from an a5200-python checkout with its venv, or with that checkout named by `A5200_PYTHON_ROOT`: the driver imports that checkout's own census helpers (MIT) and, unless `--lib` says otherwise, loads this tool's own build, `build/libatari800.so` (since 2026-11-25, below; before, a5200-python's hand build in `reference/build-atari800/`). Without the library it exits 3. The cartridge is read in place (zip, 7z or loose) and handed to the library as a temporary copy under the checkout's ignored `tests/detector_runs/` (or `--work`); the BIOS is found by SHA-1 in the MAME set under `MAME_ROMPATH`. `--frames` (600 by default) frames are run and every `--every`-th (60) is reported, one line each after a header line naming the cartridge, its size, the cartridge type and the BIOS; `--cart-type` gives Atari800's type number where the size does not decide it; `--press` holds a key on port 1 (0-9, star, hash, start, pause, reset, trigger) from a frame for a number of frames; `--pgm` saves the last frame's index image, `--wav` the library's sound. The library prints its own log lines (cartridge and BIOS lookups) on standard output too. ## Build (atari800-build 0.1.0, 2026-11-25) `python3 -I build.py` fetches Atari800 at the pin (shallow git) into `upstream/atari800` and builds `build/libatari800.so` by a5200-python's recipe (its docs/validation.md, "Atari800 build recipe"), moved here on 2026-11-25 (decisions page T3): `./autogen.sh`; `configure --target=libatari800` with `CFLAGS="-O2 -fPIC"` in `build/obj`; `make CFLAGS="-O2 -fPIC -DNETSIO"` (which drops the `-Werror` configure adds); then a shared library from the archive's members, the eight from `src/libatari800/` first and the rest each by its first path (sorted) under `src`, with pthreads and libm. `JOBS` sets make's jobs (2 by default); `build/build-info.json` records the pin and the options; `--version` and the contract's exit codes; `tests/smoke.py`. Built here on 2026-11-25, the library is byte-identical to a5200-python's hand build (sha1 `61fb4f41`). Needs autoconf, automake, a C compiler and make. ## Upstream, licence and pin - **Atari800** (the Atari800 Development Team), , pinned at **`98cc2dc749867c9c7317a0271ba062a6c797f886`**. Its COPYING is the GPL-2.0 text. Most of its sources grant "version 2 or any later version", but `src/netsio.c` (compiled into the library as a5200-python builds it) and most headers, among them the public API header the driver declares, carry no licence statement; by the family's rule of 2026-11-24 they are GPL-2.0-only, and so is this driver, which loads the library into its own process. - **The driver:** our code (alewman), first published under MIT in a5200-python; it keeps that permission (`../../notices/MIT-emulator-family.txt`; its SPDX line says MIT). This repository is GPL-2.0-only (`../../LICENSE`). Atari800 is not committed here. - Checked against `emulator-lineage/docs/sources.md` (Atari800: closed box only).