Metadata-Version: 2.5 Name: lynx-python Version: 0.1.0.dev0 Summary: Readable, pure-Python Atari Lynx board (Lynx I and Lynx II) on 65c02-python Author: alewman License: MIT License Copyright (c) 2026 alewman Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. License-File: LICENSE License-File: NOTICE Classifier: Development Status :: 2 - Pre-Alpha Classifier: License :: OSI Approved :: MIT License Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: System :: Emulators Requires-Python: >=3.11 Requires-Dist: w65c02-python @ git+https://github.com/alewman/w65c02-python@af0ad6b9c34045ccea90ca0fd6b6a3ec29e3f703 Provides-Extra: dev Requires-Dist: pytest>=8; extra == 'dev' Requires-Dist: ruff==0.16.8; extra == 'dev' Provides-Extra: frontend Requires-Dist: pygame-ce; extra == 'frontend' Description-Content-Type: text/markdown # lynx-python **Lineage:** lynx-python → (lynx-rust, planned) · fixes start in lynx-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 Lynx** (Lynx I and Lynx II), built as a board on the CPU core `w65c02-python` (`G65SC02` = the Lynx I's cell, `Lynx2Cell` = the Lynx II's). The core owns the instruction set; this repository owns everything around it: Mikey (timers, audio, video DMA and palette, UART, interrupts, the bus controller, the boot ROM overlay), Suzy (sprite engine, collision, math, inputs, the cart port), the 16 MHz tick timeline that ties them together, and the cartridge loader. This repository was restarted on 2026-11-14 under [docs/restart.md](docs/restart.md): no GPL, LGPL or unlicensed source is read; emulators are run as closed boxes only; every behaviour in the code names its evidence. What changed is in [docs/provenance.md](docs/provenance.md). ## Status Measured numbers, with the commit they were measured at, are in [docs/status.md](docs/status.md); how to resume is in [docs/build-progress.md](docs/build-progress.md). Milestones (from [docs/handoff-brief.md](docs/handoff-brief.md)): M0 formats passed; M1 the CPU through the boot ROM passed (5 titles in lockstep with MAME, host decryption: all 113 distinct frames of the licensed sets identical, 2026-11-19); M2 passed (52 of 52 hardware-test cases on each row, with the bus costs decoded from the logic-analyser captures); M3 passed (line and frame periods equal the captures to the tick on 15 of 15 measurable settings, and the four captured titles' frame periods equal theirs); M4 passed (the sprites1-5 CRCs 40 of 40 on each row); M5 partial, exit not met (15 of 40 sprite durations inside the hardware windows with Suzy's row timeline measured from a game capture, the default; 16 of 40 with the older fitted model behind `LYNX_SUZY_TIMELINE=paths`); M6 suites 32 of 34 on each row (audio 6/6, audio2 7/7, UART 15/17, constants fitted), the mix and `--wav`; M7 the cart EEPROM (three titles keep their saves across runs; AUDIN banking and the sweep not done); M8 `lynx-play` (pygame-ce), judged headless only: no human has looked at it. All hardware suites: 95 of 122 on each row. Measured 2026-11-14 at the commits named in status.md. The 2026-11-19 library sweep's four issues are settled (status.md): no bus read can crash the board, Mines 2 (Demo) boots from both its files, and BLL `.o` programs boot behind the BLL kit's own cart loader. Run a cart (bring your own boot ROM through `$MAME_ROMPATH`): python -m lynx_python CART --frames 600 --png out.png --wav out.wav lynx-play CART # needs pygame-ce: .venv-pypy/bin/pip install pygame-ce ## Scope | Machine | Phase | | --- | --- | | Lynx II (bit opcodes, stereo; the default row) and Lynx I (65SC02 subset, mono) | machine rows from the start | | Carts: 256/512/1024/2048-byte blocks, AUDIN banking, 93Cxx EEPROM | milestones 0 and 7 | | Formats: `.lnx`, `.lyx`, BLL `.o`, each loose or in `.zip`/`.7z` | milestone 0 | | ComLynx between two consoles | later; the UART and its own echo are in | What stands in for a console (there is none here): the Epyx/Atari specification, logic-analyser captures of a Lynx II published with Gearlynx (recordings of hardware), and drhelius' Lynx Hardware Tests, whose expected values were taken on real machines. No die-level model of Mikey or Suzy exists. ## Romsets and firmware Found through environment variables only, read in place: `NO_INTRO_DIR` (the cart sets `$NO_INTRO_DIR/Atari - Atari Lynx (...)`), `MAME_ROMPATH` (the boot ROM inside `lynx.zip`, found by hash), optionally `LYNX_BOOT_ROM`, `LYNX_EXTRA_SETS` and `LYNX_NOINTRO_DAT`. The boot ROM (`lynxboot.img`, SHA-1 `e4ed47fae31693e016b081c6bda48da5b70d7ccb`) and every cartridge are bring-your-own; without a boot ROM the loader frame is decrypted by the host. ## What is fetched Nothing third-party is committed. `scripts/fetch_references.py` rebuilds `reference/` and `tests/test_roms/` from `scripts/pinned_files.json` and `scripts/pinned_repos.json` (narrowed in the restart so nothing the rules forbid is fetched). `scripts/build_lynx_tests.py` builds the hardware tests from their MIT sources with the pinned cc65. ## Working on it python3 -m venv .venv && .venv/bin/pip install -e ".[dev]" pypy3.11 -m venv .venv-pypy && .venv-pypy/bin/pip install --upgrade pip && .venv-pypy/bin/pip install -e ".[dev]" .venv/bin/python -m pytest # the quick loop .venv/bin/ruff check . && .venv/bin/ruff format --check . ## Licence MIT (see `LICENSE` and `NOTICE`). The fetched material keeps its own terms, recorded per entry in the pin lists.