Metadata-Version: 2.5 Name: supergrafx-python Version: 0.1.1 Summary: Readable, pure-Python NEC SuperGrafx: pcengine-python plus a second VDC and the HuC6202 VPC, through the base board's sockets Project-URL: Homepage, https://github.com/alewman/supergrafx-python Project-URL: Repository, https://github.com/alewman/supergrafx-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 Requires-Python: >=3.11 Requires-Dist: pcengine-python @ git+https://github.com/alewman/pcengine-python@03ac6998c812a291e5f91882552df5ae712ba870 Provides-Extra: dev Requires-Dist: pytest>=8; extra == 'dev' Requires-Dist: ruff==0.16.8; extra == 'dev' Description-Content-Type: text/markdown # supergrafx-python A readable, pure-Python **NEC SuperGrafx** (1989), built as an **add-on to [pcengine-python](https://github.com/alewman/pcengine-python)**: the base board runs the HuC6280, the VCE, the PSG and one VDC; this repository adds what the SuperGrafx has beyond a PC Engine, through the base board's documented sockets and nothing copied: a **second HuC6270 VDC** (an instance of the base board's own class), the **HuC6202 VPC** (windows, priority modes, VDC select for `ST0-ST2`, the video-area decode with the back-panel compatibility switch), and 32 KiB of work RAM. **Status (2026-11-12, release 0.1.0): built (milestone 6 of the PC Engine family).** The five library cards are row-identical to Beetle PCE and, but for one row of one card, to Mesen2; past the title, Daimakaimura's cutscene and first stage are identical to both. Save states are the base board's and cover this machine (a round trip on all five cards). Nothing here was run on a real console. See [docs/m6-record.md](docs/m6-record.md) for what was built, the judges, the picture results, the measured base-mode fallback and the U/C entries with their tiers (the priority labels, C-SGX1, were decided on 2026-11-12), and [CHANGELOG.md](CHANGELOG.md). Python floor 3.11 (PyPy supports it); this is a reference board, correct, not fast. ```sh python -m venv .venv-pypy # PyPy 3.11 is the platform; CPython works for the tests .venv-pypy/bin/python -m pip install -e ".[dev]" .venv-pypy/bin/python -m pytest -q ``` The base board is pinned by its git commit in `pyproject.toml` (on `main` now 03ac699, the base board's clean rewrite of 2026-11-19 (3318027) and the crop of a display that starts before the row, not yet pushed: install it from a local clone as [docs/restart.md](docs/restart.md) says); `docs/start-here.md` says which sockets are used and why a board change was needed. HuCards are bring-your-own, read in place by path, never committed. ```python from pcengine_python.cards import card_from_path from supergrafx_python import SuperGrafx sg = SuperGrafx(card=card_from_path("Daimakaimura (Japan) (En).sgx")) system = sg.build() # the real HuC6280 core on the board for _ in range(300): system.run_frame() rows = sg.board.capture.last_frame.rows # 242 rows of 9-bit palette values ``` Save states: `pcengine_python.state.save_state(system)` and `load_state` ([docs/start-here.md](docs/start-here.md) "Save states"). The picture scripts use the base board's `scripts/` from its checkout (`PCENGINE_PYTHON`, default the sibling `../pcengine-python`) and read the cards from `"$NO_INTRO_DIR/NEC - PC Engine SuperGrafx"`.