Metadata-Version: 2.5 Name: upd7725-python Version: 0.1.0.dev0 Summary: Readable, pure-Python NEC uPD7725/uPD96050 DSP core (the SNES DSP-1..4 and ST010/ST011), instruction-exact 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 :: 1 - Planning 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 # upd7725-python A readable, pure-Python **NEC uPD7725 / uPD96050** DSP core, instruction-exact: the 16-bit fixed-point signal processor inside the Super Nintendo's DSP-1, DSP-1A, DSP-1B, DSP-2, DSP-3 and DSP-4 (the uPD7725: 2K x 24-bit program ROM, 1K x 16-bit data ROM, 256 words of RAM) and Seta's ST010 and ST011 (the uPD96050: 16K program words, 2K data ROM words, 2K words of battery-backed RAM). Its first user is the board `snes-python` (milestone 5). **Status (2026-11-05): Phase 0.** Research, documents and oracles; no core code yet. The build session starts from [docs/handoff-brief.md](docs/handoff-brief.md), which ends with the open decisions for the owner. **There is no hardware-captured data, test ROM or die model for this chip**; NEC's data sheets document the uPD7725, nothing documents the uPD96050, and the judges are the data sheets, the programs' own self-test commands, and emulator-tier detectors (MAME traces, bsnes/ares/Mesen2 sources, the HLE code). [docs/validation.md](docs/validation.md) ranks them. ## What is fetched Nothing third-party is committed. `scripts/fetch_references.py` fills `reference/` from `scripts/pinned_files.json` (NEC's 1997 uPD77C25 data sheet, NEC's 1992 DSP data book, fullsnes; by SHA-256) and `scripts/pinned_repos.json` (bsnes, ares, MAME 0.285, Mesen2, snes9x at full commit SHAs, sparse). A pin whose local copy elsewhere on this machine is at the pinned hash or revision (snes-python's emulator trees, spc700-python's fullsnes) is satisfied in place: nothing is cloned or copied. ```sh python -I scripts/fetch_references.py # the data sheet; the rest in place python -I scripts/fetch_references.py --all # also the 27 MB data book python -I scripts/fetch_references.py --verify ``` The DSP programs are **bring your own**: MAME's device sets (`sns_dsp1leg.zip` ... `sns_seta11leg.zip`) read in place from a MAME `ROMs (bios-devices)` directory. Never commit a program image, ROM or trace. ## Scripts | Script | What | | --- | --- | | `fetch_references.py` | fetch, verify, or find in place the pinned documents and source trees | | `survey_programs.py` | the seven programs: formats, SHA-1 against MAME's, instruction mix, every contested field combination | | `mame_dsp_trace.py` | MAME 0.285's per-instruction DSP trace and the host's DR/SR/RAM accesses (`--host-only`, `--dasm`) | They need `git`, `curl`, `7z` (for `.7z`/`.zip` cartridges) and MAME 0.285 at `/usr/games/mame`. Run anything that reads `reference/` or a ROM set with `python -I`. No sudo. ## Documents [docs/README.md](docs/README.md) is the index. MIT licensed ([LICENSE](LICENSE)).