# Provenance Audit of 2026-11-13 (provenance audit wave 1), against the family charter's "Licences and provenance" section and the rules of the November 2026 sound-core restart: GPL/LGPL code is never copied or transcribed; GPL/LGPL programs are used as closed boxes only; facts about the chip are usable with their source recorded; permissive sources keep their notice. ## What changed since the core was written The core and its documents were written (2026-11-06/07) from Nintendo's SNES Development Manual Book II (manufacturer) and fullsnes (research), with five emulator models open under the older rule "GPL sources are read and cited, never copied": bsnes (GPL-3), Mesen2 (GPL-3), MAME's `cpu/superfx/superfx.cpp` (GPL-2.0+, byuu), snes9x (non-commercial licence) and the sd2snes FPGA GSU (GPL-2). That rule is superseded: **all five are closed boxes; their source is not opened.** `docs/handoff-brief.md` still states the old rule (see "Owed"). What keeps this repository clean despite that history: - **The defaults rest on Book II.** Where Book II speaks (caches, buffers, plot, the multiplier, cycle counts, STOP), the core follows it, and emulator behaviours are non-default switches. - **byuu's GSU model is also published under ISC.** ares (`ares/component/processor/gsu`, ISC, "Copyright (c) 2004-2025 ares team, Near et al") carries the same core as bsnes (token similarity 0.987 after normalising type names, measured 2026-11-13 by a count-only comparison that printed no source; the board glue `sfc/coprocessor/superfx` 0.856, ares adding BRAMR gating and the banks-70-71 RAM decode). Every switch position attributed to "bsnes" is available from ares under ISC. - **MAME's behaviours were measured closed-box.** The MAME-switched core (`replay.py`, `MameCore`) is checked instruction by instruction against MAME 0.285 traces of six games (rung 4), so each MAME switch position is a closed-box measurement whatever was read. - **No copying found.** `pcengine-python/scripts/provenance_check.py` was run against ares' `gsu` (ISC) and MAME's `sfx_dasm.cpp` (BSD-3), and, because reading them was this project's documented practice when it was written, bsnes' `processor/gsu` and `sfc/coprocessor/superfx`, Mesen2's `Core/SNES/Coprocessors/GSU`, MAME's `superfx.cpp/.h` and snes9x's `fxemu`/`fxinst`. Hits: register-name lists (`sfr pbr rombr rambr cbr scbr scmr colr por bramr`) and mnemonic lists (`bne beq bpl ...`, `getc ramb romb ...`): Book II's names, facts. One ALU constant list (bit masks). One prose hit: `docs/timing.md` quotes a snes9x source comment (below). No code shape, no transcribed statement. Mesen2 and the bsnes board glue: no hits. ## Verdicts | Piece | Behaviour from | Licence of source | Verdict | |---|---|---|---| | `_decode.py` (2,048-cell decode, prefixes) | Book II; fullsnes opcode map (an independent transcription of the document's map, `claims.md`) | facts | clean | | `_alu.py`, `_multiply.py` (FMULT/LMULT partial products, C9) | Book II 2-8-16/17, 9.33; fullsnes | facts | clean | | `_cache.py`, `_memory.py`, `_plot.py`, `timing.py` (buffers, caches, pixel caches, cycle counts) | Book II chapters 5-9 and worked examples; fullsnes; byuu's model for the non-default "emulator" switch positions | facts / ISC | cite: re-point "bsnes" to ares (ISC) | | `_sfr.py`, `_jump.py` (STOP, IRQ, R15 after STOP, C1, C11) | Book II 2-5-3, 9.84; fullsnes; ares; MAME (measured, C1) | facts / ISC / closed box | cite | | `_jump.py` `STOP_CLEARS_POR = True` (C16, non-default) | snes9x `fx_stop`, read from source | snes9x licence (non-commercial, no MIT-compatible grant) | **rewrite**: remove, or re-establish by running snes9x closed-box | | `core.py` (host port; C6 write latch, C7 restricted access, U9, U15, WAIT on RON/RAN) | Book II ch.4, 5.3; fullsnes; ares; MAME (measured) | facts / ISC / closed box | cite: Mesen2 is named beside fullsnes (C6, C7) but never alone; drop it from the citations or mark it closed-box | | `model.py` (GSU-1/2, MARIO CHIP 1, VCR) | fullsnes "External Oscillators", games list; Book II | facts | clean | | `harness.py`, `replay.py`, `trace.py`, `state.py`, `debug.py`, `console.py`, `disasm.py`, `__main__.py` | own tooling; `replay.py` replays MAME traces (closed box) | own work | clean | | `scripts/mame_gsu_trace.py`, `mesen_krom.py`, `survey_games.py`, `trace_coverage.py`, `fetch_references.py` | MAME and Mesen2 run as closed boxes; game images read in place (BYOR) | own work | clean | | `tests/` (`gsu_asm.py` from Book II's opcodes; krom GSUTest rows; BK2 timing examples; MAME replays) | own; krom's ROMs and `.asm` read in place from snes-python's checkout, never committed | own work; krom has no licence (used as a test input, not copied) | clean | | `docs/timing.md` "Winter Gold (#533)" | quotes a snes9x source comment (`fxemu.cpp` l.177-187) | snes9x licence | cite: paraphrase without quoting; the hardware observation it reports ("on hardware the heavy course-load render keeps the GSU busy one frame longer") is a second-hand hardware fact (middle rule), better cited to snes9x issue #533 than to the source | | `docs/start-here.md`, `undocumented-behavior.md`, `validation.md`, `claims.md` | Book II, fullsnes; emulator entries cite bsnes/Mesen2/MAME/snes9x/sd2snes source | mixed | cite: re-point bsnes to ares; mark Mesen2, `superfx.cpp`, snes9x and sd2snes entries as read from source under the old rule (closed-box re-establishment owed only if a default ever rests on them; none does) | | `docs/handoff-brief.md` | policy text | n/a | **rewrite** the line "GPL sources are read and cited, never copied" | | `scripts/pinned_repos.json` | reference pins | n/a | cite: bsnes/Mesen2/MAME `superfx.cpp`/snes9x/sd2snes to "closed box only"; krom to "used in place, no licence" | Counts: clean 8, cite 8, rewrite 2 (one snes9x-only switch branch, one policy sentence), unclear 0. No ROM or program image is committed (game images and krom's ROMs are read in place). Book II's PDF and OCR text are fetched to a git-ignored `reference/`, not committed. Git history (13 commits, one branch, no remote): no file was ever deleted; nothing in history differs in provenance from the tree. ## Owed 1. `_jump.py`: remove or closed-box-re-establish `STOP_CLEARS_POR = True`. 2. `docs/handoff-brief.md`, `scripts/pinned_repos.json`: the closed-box rule; ares (ISC) as the citable form of byuu's model. 3. Keep the ares ISC notice ("Copyright (c) 2004-2025 ares team, Near et al", ISC permission text) with what was taken from byuu's model (this file suffices until code carries per-file headers). 4. `docs/timing.md`: paraphrase the snes9x comment. 5. SPDX headers: no source file has one yet (family-wide pass owed). 6. Not provenance, but a house rule: a mirror's name and machine paths appear in `docs/mame-oracle.md`, `scripts/mame_gsu_trace.py`, `scripts/survey_games.py` and `tests/conftest.py`; use `MAME_ROMPATH`. All six were done in wave 2 (below). ## Wave 2 (2026-11-19) In place, not a restart: the only code resting on a forbidden source was one non-default switch; everything else needed re-citation. Rules: the family's wave-2 rewrite rules (closed box only for bsnes, Mesen2, snes9x, MAME's `superfx.cpp`, sd2snes; ares ISC and MAME's BSD-3 files are the readable form of byuu's model). ares was read at the pinned `9408cb4` to find each re-citation; MAME's BSD-3 files only after checking each header; no closed-box source was opened. | Item | Was | Now | New source | Verdict | |---|---|---|---|---| | `_jump.py` `STOP_CLEARS_POR` (C16 switch) | non-default switch and a two-line branch, from snes9x's `fx_stop` read from source | **removed unread** (located by name, cut by line after checking each line's start); no test used it; default behaviour unchanged | none: re-establishing it needs snes9x run as a closed box, and no runnable snes9x build is on this machine. Whether snes9x clears POR at STOP is **unknown** here | clean (removed) | | C16 default (POR kept) | BK2 9.84 plus "bsnes, MAME, Mesen2" | BK2 9.84 (manufacturer); ares `instructions.cpp` l.2-10; MAME 0.285 OBSERVED (every replayed restart matched) | BK2, ares (ISC), closed-box MAME | clean | | Code comments citing bsnes (`core.py`, `_jump.py`, `_cache.py`, `_alu.py`, `_multiply.py`, `_memory.py`, `_sfr.py`, `_plot.py`, `_decode.py`, `timing.py`, `replay.py`) and tests (`test_timing_bk2`, `test_krom`, `test_jump`, `test_cache`, `test_host`, `test_plot`: class `Bsnes` renamed `Ares`) | "bsnes", sometimes with a bsnes code fragment | ares file and line; fragments are ares's own text (`timing.py`: `if(!regs.cfgr.ms0) step(regs.clsr ? 1 : 2)`, l.228) | ares (ISC, NOTICE) | cite (done) | | Code comments citing Mesen2/snes9x/sd2snes | named beside fullsnes or bsnes (C6, C7, C10, C11, C19, U9, U15, ...) | dropped where fullsnes, BK2 or ares carries the claim (all cases in `src/`); no default rests on them | fullsnes, BK2, ares | clean | | Docs (`start-here`, `undocumented-behavior`, `timing`, `validation`, `claims`, `mame-oracle`, `handoff-brief`, `docs/README`, `README`): bsnes citations | bsnes file/line and code fragments | ares file/line, verified in ares (e.g. `io.cpp` l.68, l.75-86, l.93-94; `instructions.cpp` l.256, l.378; `core.cpp` l.5-9, l.12-22; `memory.cpp` l.3-7, l.20, l.29; `bus.cpp` l.37, l.41-43; `sfc/cartridge/load.cpp` l.265, l.267); ares agrees with every re-pointed claim (its GSU differs from bsnes only in BRAMR gating and the 70-71 RAM decode, which the docs state as ares's) | ares (ISC) | cite (done) | | Docs: Mesen2, snes9x, sd2snes, MAME `superfx.cpp` statements read from source | cited plainly, some with quoted code or comments (`Step(HighSpeedMode ? 1 : 2)`, `vCostMem << 1`, "FIXME: this should be 8b", "starfox2 uses slow ms0 ...", `GSU.vPlotOptionReg = 0`, "can be 1 or 4?", `(int16)Sreg * (int16)R6`, `4 + (MS0 ? 4 : 0)`, line numbers into `fxemu.cpp`, `fxinst.cpp`, `gsu.v`, `superfx.cpp`) | marked † with a legend in each document: read from source under the old rule (before 2026-11-19), closed box from now on, never the basis of a default; quotations paraphrased, line numbers dropped. Defaults that named Mesen2 beside fullsnes (C6, C7, C19) now name fullsnes alone. Results from running Mesen2 or MAME (krom's rows, traces, replays) carry no mark | facts only as pointers; OBSERVED for runs | marked | | `docs/timing.md` Winter Gold | quoted a snes9x source comment (`fxemu.cpp` l.177-187: address, 312-line delay, "verified ... against Mesen") | paraphrase cited to snes9x issue #533 as a second-hand hardware report; the address and line count removed; still to be checked against the issue's own text | snes9x issue #533 (middle rule) | cite (partly: issue text not yet read) | | `docs/handoff-brief.md`, `README.md` policy | "GPL sources are read and cited, never copied" | closed box only for bsnes, Mesen2, MAME `superfx.cpp`, snes9x, sd2snes; ares and MAME BSD-3 named as the readable form | n/a | clean | | `scripts/pinned_repos.json` | licence notes "read and cite, never copy"; MAME sparse path `cpu/superfx/` (includes the GPL file); absolute `local` paths | closed boxes marked `"fetch": false` with a closed-box note; MAME sparse narrowed to BSD-3 files (`sfx_dasm.cpp/.h`, `bus/snes/sfx.*`, `snes_slot.cpp`, `snes.cpp`, `hash/snes.xml`); `local` relative to the repository (`../snes-python/...`); `fetch_references.py` resolves relative `local` against the root and skips `fetch: false` | n/a | clean | | `reference/src/sd2snes` (local, git-ignored sparse clone) | present | moved aside unread to the git-ignored `trash/` | n/a | clean | | Machine paths and mirror names | `scripts/mame_gsu_trace.py` (`MYRIENT`), `scripts/survey_games.py`, `scripts/mesen_krom.py`, `tests/conftest.py`, `docs/mame-oracle.md`, `pinned_files.json` | `MAME_ROMPATH` (';'-separated, as `-rompath`; the script stops with a message when unset), `NO_INTRO_DIR`, `SNES_PYTHON` or the sibling checkout, `GSU_KROM` or the sibling krom checkout (tests skip when absent) | n/a | clean | | `NOTICE` | none | ares ISC notice; MAME BSD-3-Clause with the holders of `sfx.cpp`, `snes_slot.cpp`, `snes.cpp`, `sfx_dasm.cpp` | n/a | done | | SPDX | none | `# SPDX-License-Identifier: MIT` on all 42 Python files (no file carries ares or MAME code) | n/a | done | Gates (before -> after): PyPy full suite 228 passed -> 228 passed (including the slow MAME replays of six games); CPython quick loop 221 passed, 7 deselected -> the same; ruff check and format clean before and after. No behaviour changed: the removed switch was off by default and no test set it. Still open: Winter Gold's wording against issue #533's text; snes9x's POR behaviour at STOP (unknown until snes9x can be run here). The sibling snes-python's MAME checkout still holds `superfx.cpp` (not this repository's to change; this repository no longer fetches it). ## Closed-box pins 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. The four closed boxes here were already never fetched (`"fetch": false`); their entries, which listed source paths, left `scripts/pinned_repos.json`, and they are cited by URL and commit only: - bsnes, https://github.com/bsnes-emu/bsnes @ `78474e5d39f58872dc21aca18cf9eb583b147fe7` (GPL-3.0) - Mesen2, https://github.com/SourMesen/Mesen2 @ `b9fa69ddc6d0a331fb103fdb5eef6904305703c2` (GPL-3.0; run as a closed box through emu-tools-gpl's mesen2-runner) - snes9x, https://github.com/snes9xgit/snes9x @ `1bcc369e89f08243e0a462882fb1f3e42e51de3a` (non-commercial) - sd2snes, https://github.com/mrehkopf/sd2snes @ `b081ff9b977f0417213c52eed1f84ffc0bcf639b` (GPL-2.0) Nothing was moved: no tree of theirs was ever in this repository. The dagger-marked statements stay as they are (already marked as read under the old rule). Later the same day snes-python applied the rule to the trees this repository reads in place: its MAME checkout no longer holds `superfx.cpp`/`superfx.h` (or its other GPL/LGPL files), so the note above about the sibling checkout is out of date. What this repository reads from snes-python's checkout is unchanged: ares (ISC), MAME's BSD-3 files and `hash/snes.xml` (CC0), fullsnes and krom's ROMs; `fetch_references.py --verify` and the test suite pass the same before and after (221 quick + 7 slow).