Evidence at a glance
Loading source evidence…
What was done
A Python model of the SNES SPC7110 chip, implementing its decompressor and register interface with 100% test coverage and verified against snes9x and ares.
The snes-spc7110-python project provides a Python implementation of the SPC7110 chip, including its decompressor across all three output modes (1bpp, 2bpp, and 4bpp) and the register interface accessed by the console. The implementation is verified against snes9x for decompression and ares for register behavior. The author reports 833 tests with 100% statement and branch coverage. Verification includes 200 generated streams (102,400 bytes) and 619 cartridge streams (316,928 bytes) compared against the reference, alongside 619 cartridge streams and 231 register-driven cases read through the registers against ares, with zero reported disagreements. The package requires Python 3.12 or newer and has no dependencies, though a C++17 compiler (g++) is required if the user chooses to build the reference for differential checking. The interface allows for chip construction, register manipulation, and decompression operations, with specific error handling for unknown models, modes, or empty sources.
Reproduce it
git clone https://github.com/gufranco/snes-spc7110-python.git; cd snes-spc7110-python; python3 spc7110/doctor.py
Community
Ask a question, share what worked, or follow the next milestone.