# Provenance ## Licence provenance (audit 2026-11-13) An audit of where each part of this board's behaviour came from, and whether the repository can honestly carry the MIT licence (family charter, "Licences and provenance"). Judged from the repository's own records: comments, docstrings, docs, commit messages, `scripts/pinned_*.json` and the licence files of the pinned references. No GPL or LGPL source was opened for the audit. Branch audited: `new-psg` (the `main` branch differs only in the sound cores it pins, see "Dependencies"). Verdicts: **clean** (own work from facts or permissive sources, cited), **cite** (clean, but a notice or a source name is owed), **rewrite** (derived from code the family may not take), **unclear** (what would settle it is named). ### Summary | Verdict | Count | | --- | ---: | | clean | 10 | | cite | 6 | | rewrite | 0 | | unclear | 1 | No transcription from a GPL, LGPL or non-commercial emulator was found. The board's emulator-tier rules come from MAME 0.285 files that are all BSD-3-Clause; the notice is owed (see "What to add"). ### Per module | Part | Behaviour from | Licence of the source | Verdict | | --- | --- | --- | --- | | `vdp.py` | Charles MacDonald's msvdp, Sean Young's tms9918a.txt, the SMS Power wiki (Palette, VDPRegisters), the TI data manual; timing fitted to FluBBa's and enik2's hardware-run VDP tests. Emulator-tier choices (status low bits after overflow, fifth-sprite bookkeeping, register 9 latch, sprite zoom halving, GG TMS palette offset, render point) from MAME 0.285 `315_5124.cpp`, `tms9928a.cpp` | documents: facts; MAME files: BSD-3-Clause | **cite** (MAME BSD-3 notice) | | `vdp.py` palette tables | `TMS9918A_RGB` and `SMS_LEGACY_CRAM` from the wiki's Palette page (checked: the "Palette value" column matches entry for entry) | facts | clean | | `board.py` | wiki MemoryMap, Port3E, IOPortMap(GG), AudioControlPort, FMChipDetection; MacDonald's sc3000h notes; MAME `sms_m.cpp`, `sms.cpp`, `sg1000.cpp` for power-on $3E and the SG-1000 map | facts; BSD-3-Clause | **cite** | | `io.py` | wiki GearToGearCable; Game Gear EXT pins, reset values and serial transmitter as MAME `sega_md_ioport.cpp` / `sms_m.cpp` model them. Genesis Plus GX named only as agreeing on port $01 | BSD-3-Clause (MAME) | **cite** | | `cartridge.py` | wiki Mappers; sixteen Korean/Taiwanese/cheat boards "MAME 0.285's model (rom.cpp)"; board identification from MAME's software lists (read at run time from the installed MAME, not shipped) | BSD-3-Clause (`rom.cpp`, `sega8_slot.cpp`); software lists CC0-1.0 | **cite** | | `sf7000.py` | ports and 8255 pins from MAME `sg1000.cpp`; the uPD765A from NEC's data sheet (pinned); the IPL ROM's observed behaviour | BSD-3-Clause; data sheet: facts | **cite** | | `system.py`, `audio.py`, `frontend.py`, `png.py`, `wav.py`, `mame_log.py` | own work (MAME named only as the trace format and mix level it is compared with) | n/a | clean | | `state.py` | after famicom-python's `state.py` (family code, MIT) | MIT | clean | | `scripts/` | own tools; `mame_media.py` names `sega8_slot.cpp` (BSD-3) | n/a | clean | | `tests/` | own tests; fixtures are MAME logs generated locally and never committed | n/a | clean | | docs | own prose; quotes of SMS Power documents and FluBBa's readme, attributed | facts, attributed | clean | | Sound cores on `main` | see "Dependencies" | | **unclear** | The PSG used to live here (`psg.py`, 2026-09-18 to its move to sn76489-python): it was written from Maxim's SN76489 page on the wiki and its published noise patterns (commit `db518bd`), with no emulator source named; clean. ### Dependencies - z80-python (PyPI, `>=0.4.0`): audited separately. - **`main`** pins `sn76489-python@b0acbc8` and `ym2413-python@13df60c`, the archived Nuked-derived cores (translations of GPL/LGPL C models). `main` therefore cannot ship as MIT until it is moved to the restarted cores, as `new-psg` has done. **unclear** until merged. - **`new-psg`** uses the restarted sn76489-python (2026-11-12) and ym2413-python (2026-11-13), installed from local checkouts and not yet pinned by revision; pin them when they have public revisions. ### Process findings (not code) - `docs/handoff-brief.md` told the builder to read Genesis Plus GX and "cite it by file and line" (non-commercial licence, not MIT-compatible), and `docs/handoff-2026-11-12.md` says "Genesis Plus GX is read and cited, never copied ... Nuked-MD is run and read". Under the charter (rule 3) such sources are run as closed boxes, not opened while writing. No rule in the code is sourced from Genesis Plus GX: it appears only as agreeing with another source (`io.py`, docs). `provenance_check.py` against its tree found only a hardware palette table and a sentence of FluBBa's readme that both quote. Both handoff sentences were brought in line with the charter on 2026-11-19. - Gearsystem (GPL-3.0), openMSX (GPL-2.0) and Nuked-OPLL (GPL-2.0) are pinned in `reference/`; nothing in the code cites them (openMSX's YM2413 *measurements*, a research capture of a real chip, belong to the FM core). - DBIOS (furrtek, who objects to AI use of his work) was pinned as a test ROM and dropped in `8c49213`; only its URL and hash rows are in history, none of his work. - Nothing fetched (BIOS, ROMs, documents, traces) is or was ever committed: the history holds only text files of this project. ### What to add (cite items) A `NOTICE` (or a section of the README) carrying MAME's BSD-3-Clause notice for the behaviour taken from `315_5124.cpp` (Wilbert Pol, Enik Land), `tms9928a.cpp` (Sean Young, Nathan Woods, Aaron Giles, Wilbert Pol, hap), `sms.cpp`/`sms_m.cpp` (Wilbert Pol, Charles MacDonald et al.), `sg1000.cpp` (Curt Coder), `sega8/rom.cpp`, `sega8_slot.cpp` (Fabio Priuli), `sega_md_ioport.cpp` (Vas Crabb), and the SPDX header on each source file (owed family-wide). ### Check run `provenance_check.py` (pcengine-python) on this repository against `reference/src/mame` (BSD-3 files), `vrEmuTms9918` (MIT) and `f18a` (BSD-3): two prose hits, both a MAME comment phrase restated in the VDP docs ("at the end of the first logical line"); against `reference/src/Genesis-Plus-GX` (reading it is this repository's documented practice): three hits, the wiki palette table and FluBBa's readme sentence. No code-shape hit. ## Closed-box sources removed (2026-11-24) Aubrey's rule of 2026-11-24: an MIT repository does not download or keep the source of anything the family's `sources.md` marks closed box only. Pins removed from `scripts/pinned_repos.json`, trees moved aside unopened, out of the repository (not deleted): Gearsystem (https://github.com/drhelius/Gearsystem @ `0e35ec681bac7850d1518057aac38e4522066e16`, GPL-3.0), Genesis Plus GX (https://github.com/ekeeke/Genesis-Plus-GX @ `27426f00aa68f9f358c86919e8a40985326fa05b`, non-commercial), Nuked-OPLL (https://github.com/nukeykt/Nuked-OPLL @ `1269cf5a783b65583b50fa2464d08be75830aaa0`, GPL-2.0+) and openMSX's `src/sound` and `src/video` (https://github.com/openMSX/openMSX @ `621950b5bb3e47699b7c6b99dbe151ed110a1375`, GPL-2.0). The MAME pin became `sparse_patterns` that leave out its 76 GPL-2.0+/LGPL-2.1+ files in the fetched directories (each file's `license:` line); those files moved aside too, and `scripts/fetch_references.py` gained the `sparse_patterns` key. Nothing was built from the moved trees. Kept: andete's ym2413 measurements (prose and captures, facts), the TMS9918 document collection (with Hagerty's BSD F18A), vrEmuTms9918 (MIT), F18A (BSD-3). The earlier reading of Genesis Plus GX, Gearsystem and openMSX ("read and cite") stays visible in the documents as statements such as "Genesis Plus GX agrees"; validation.md's detector table now marks those as HYPOTHESIS (source-read), for review.