# Provenance This crate is a transcription of [65816-python](https://github.com/alewman/65816-python) at `71092a4` (MIT, same author), built on 6502-rust (`sixfiveohtwo`, MIT, same author) at `71747eb`. Its core inherits the reference's verdicts (65816-python `docs/provenance.md`); this file covers only what this repository adds. No emulator source was opened while writing it: the only files read were the reference's (its `src/`, `tests/`, `scripts/` and `docs/`), 6502-rust's and 6502-python's frame, and the family's other Rust ports (w65c02-rust, a5200-rust, z80-rust, huc6280-rust's layout) for the shape. MAME's `g65816.cpp` was opened only for its two licence lines (`license:BSD-3-Clause`, `copyright-holders:Karl Stenerud`), to write the notice. | Part | From | Licence | Verdict | | --- | --- | --- | --- | | `src/*.rs` (the core) | 65816-python's `w65c816/` and 6502-python's frame through 6502-rust, module by module, with their comments | MIT (same family) | clean (inherited), except `src/alu.rs` below | | `src/alu.rs` `add`, `subtract` and their decimal and binary helpers | the reference's clean-room rewrite of its `_alu.py` (branch `cleanroom-decimal`, `f5f8e37`, 2026-11-25), written there from Bruce Clark's *Decimal Mode* (6502.org, DOC); the rewrite replaced an adder its audit (item 2) had found translated from bsnes's GPL-3.0 code | MIT (same family) | clean. Transcribed on 2026-11-25 by splicing in new code without displaying the old bodies, which are gone; the old ones were never re-read. Said in the file's header | | `tests/decimal.rs` | the reference's `tests/test_decimal.py` (Clark's worked examples) | MIT | clean | | `src/dispatch.rs` table | generated from the reference's `OPCODES` by `scripts/gen_dispatch.py`, checked against it on every run | MIT | clean | | `src/harness.rs` | the reference's `w65c816/harness.py` | MIT | clean | | `src/bin/sst.rs`, `roms.rs` | the reference's `tests/single_step.py`, `scripts/run_single_step.py`, `tests/test_cputest.py`, `tests/test_krom.py` | MIT | clean | | `src/bin/mame_replay.rs` | the reference's `tests/mame_replay.py`, whose `burst()` is MAME's `bus_5A22_cycle_burst` (its provenance item 13) | MIT AND BSD-3-Clause | clean, with notice (`NOTICE.md`, the file's SPDX line) | | `src/bin/trace.rs`, `bench.rs`, `scripts/*.py`, `scripts/*.sh` | own work; the Python scripts run the reference's own session, trace writer, reader, harness and tests | MIT | clean | | `tests/interrupts.rs` | the reference's `tests/test_interrupts.py`, plus one state round-trip test of its own | MIT | clean | | `conformance/scenarios/*.json` | generated by `scripts/make_scenarios.py` (a hand-assembled program, seeded random bytes and events) | MIT | clean | | `conformance/expected/` | the reference's measured output (counts, cycle numbers, addresses, the names of the games traced) | MIT | clean | | `NOTICE.md` | the BSD-3-Clause text as famicom-python's NOTICE.md carries it, with MAME's holder named | BSD-3-Clause notice | kept | Outside data, all read in place from the reference's gitignored `reference/` and `tests/mame_traces/` by environment variable (`scripts/env.sh`), none committed, in the tree or in history: SingleStepTests 65816 (MIT); gilyon's snes-tests release (MIT); krom's (Peter Lemon's) SNES CPU tests (no licence stated: run only, nothing committed); the MAME 0.285 traces of seven commercial games, made by the reference's `scripts/mame_trace.py` (MAME run as a program; the cartridges are the user's own dumps and never leave the reference's gitignored directory). The reference's rung 5 tool, srg320's P65C816 VHDL (GPL), is neither opened nor run here; this crate's rung 5 runs the same states on both cores instead. All are in emulator-lineage `docs/sources.md`. Every source file carries an SPDX header (`MIT`, or `MIT AND BSD-3-Clause` on the one file above, with the source named on the line below it). ## For the reference (not changed here) 65816-python's source, test and script files carry no SPDX headers (39 files on 2026-11-25), and the repository has no NOTICE file for the MAME function in its `tests/mame_replay.py` (its docstring names the source and licence). Both are the methodology's "owed" items for that repository, reported, not fixed downstream. (Fixed in the reference on its branch `cleanroom-decimal`, 2026-11-25: SPDX lines on every file that takes a comment, and a NOTICE.md.)