Metadata-Version: 2.5 Name: gsu-python Version: 0.1.0.dev0 Summary: Readable, pure-Python Super FX (Mario Chip 1, GSU-1, GSU-2) core for SNES boards 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 Classifier: Development Status :: 2 - Pre-Alpha Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: MIT License Classifier: Operating System :: OS Independent Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Topic :: Software Development :: Libraries Classifier: Topic :: System :: Emulators Requires-Python: >=3.11 Provides-Extra: dev Requires-Dist: pytest>=8; extra == 'dev' Requires-Dist: ruff==0.16.8; extra == 'dev' Description-Content-Type: text/markdown # gsu-python A readable, pure-Python **Super FX** core (Argonaut/Nintendo's Graphic Support Unit: Mario Chip 1, GSU-1, GSU-1A, GSU-2, GSU-2-SP1), for the Super Nintendo cartridges Star Fox, Stunt Race FX, Vortex, Dirt Trax FX, Doom, Yoshi's Island, Winter Gold and Star Fox 2. Its first user is the board `snes-python` (milestone 7). **Status (2026-11-06): Phase 0.** Documents, oracles, scripts and the handoff brief; **no core code yet**. The build session starts from [docs/handoff-brief.md](docs/handoff-brief.md), whose open decisions are Aubrey's. Python 3.11+ (PyPy), no dependencies, correct rather than fast. Local git only. **There is no hardware-captured data, console route or die model for this chip.** Nintendo's *SNES Development Manual Book II* documents it, including cycle counts; fullsnes corrects the manual in four places; krom's 31 self-checking tests give 1,226 expected values (which MAME and Mesen2 both pass); the emulators agree on values and disagree on time. [docs/validation.md](docs/validation.md) ranks every oracle. ## What is fetched Nothing third-party is committed. `scripts/fetch_references.py` fills `reference/` from `scripts/pinned_files.json` (Book II's scan and its archive.org OCR, fullsnes, the SNESdev wiki stub; by SHA-256) and `scripts/pinned_repos.json` (bsnes, ares, MAME 0.285, Mesen2, snes9x and the sd2snes FPGA GSU at full commit SHAs, sparse). A pin whose local copy elsewhere on this machine is at the pinned hash or revision is satisfied in place (snes-python's trees and fullsnes): nothing is cloned or copied. **Bring your own**: the game dumps (read in place from the No-Intro set) and krom's test ROMs (read in snes-python's checkout; pinned as `bring_your_own`, never fetched). Never commit a ROM, trace, save or screenshot. ## Scripts | Script | What | | --- | --- | | `fetch_references.py` | fetch, verify, or find in place the pinned documents and source trees | | `survey_games.py` | every GSU dump: header, chip family from MAME's PCB, slot, RAM size | | `mame_gsu_trace.py` | MAME 0.285's per-instruction GSU trace and the S-CPU's register/cache/RAM accesses (`--host-only`, `--ram`, `--krom`, `--dasm`, `--press`, `--snapshots`) | | `trace_coverage.py` | which instruction forms a trace executed, in which prefix state, from which banks | | `mesen_krom.py` | krom's 31 GSU tests on Mesen2 (through snes-python's `mesen_run.py`), PASS/FAIL per row | They need `git`, `curl`, `7z`, MAME 0.285 at `/usr/games/mame` with `snes.zip` on its rompath, and for `mesen_krom.py` famicom-python's `MesenCore.so`. Run them with `python -I`, one at a time, under `nice -n 19` (the MAME script does that itself). No sudo. ## Documents [docs/README.md](docs/README.md) is the index. MIT licensed ([LICENSE](LICENSE)).