# Decisions waiting for Aubrey (2026-11-25)
Status: **for Aubrey**, prepared 2026-11-25 evening from the main session's running log
(/data/emu/HANDOFF-main-session-2026-11-23.md), the JIT proposal (2026-11-jit.md), the charter
and families.md, the emu-tools contract draft (emu-tools `c139c74`), megadrive-rust and
megadrive-rust-fast branch `sockets`, and the segacd-python, snes-python and s-dsp-python docs.
Nothing here is decided; nothing in the charter, families.md or CLAUDE.md was edited.
**How to answer.** Each decision has an ID (L1, C2, M1 ...). A reply like "yes L1 L2 M1, no J3,
C2 with the SNES line too" is enough; anything not mentioned stays open. Where a "yes" needs
a command from you (pushes, deploys), the exact command is given; everything else is a next
step the main session can brief.
**Already in progress tonight, not decisions:** the clean-room rewrite of gb-apu-python's AGB
wave row (then gb-apu-rust, gb-apu-rust-fast; branches `cleanroom-agb-wave`), and the
clean-room rewrite of 65816-python's decimal adder (then 65816-rust; branches
`cleanroom-decimal`). Both answer licence findings from 2026-11-25 (code written with mGBA,
NanoBoyAdvance or bsnes source open); you will see their results as merges to accept.
Also in progress: sega32x-python's repin to sh2-python `8824075` and the sega32x-rust start.
**Words used below, once.**
- *Closed box*: a program we run and measure but whose source we never open (sources.md's
"closed box only" verdict). Since 2026-11-24 an MIT repository also never fetches or keeps
such source; it is built and run from emu-tools-gpl or emu-tools-gpl2.
- *SPDX header*: the one-line licence tag at the top of each file (`SPDX-License-Identifier: MIT`).
- *Lockstep*: two implementations run side by side and compared on every bus cycle; the
*ladder* is a Rust tier's full gate (`scripts/ladder.sh`), rung by rung.
- *A/B*: `scripts/ab.sh` times two builds alternately on one core, so both see the same load;
the ratio (x1.000 = same speed) is the result. A *layout* is a code-placement setting
(`default`, `nf5`); a speed claim must hold on every one.
- *State format version*: the number a save state carries; a board refuses a state of
another version before touching anything.
- *JIT* (just-in-time compilation, or recompilation): turning a game's machine code into the
host's machine code while it runs. A *cached interpreter* decodes each instruction once and
replays the handlers, with no new machine code.
- *Domain*: a part of the machine that keeps its own time and meets the rest only at
*channels* (ports, shared memory, interrupt lines). A *sync point* is an access to a channel,
where the domains must agree on the time.
- *Provisional default*: a technical choice an agent made and marked as changeable (your
2026-11-12 rule: no chip-level questions to you). They are listed at the end, not asked.
---
## Licence
### L1. s-dsp-python's two unopened scripts in `trash/scripts/`
**Asked:** what to do with `dsp_schedule.py` and `dsp_gauss_tables.py` (and `hooks.h`), moved
aside unread on 2026-11-19 because they were built from snes_spc's LGPL-2.1 source.
What is known without opening them (s-dsp-python docs/provenance.md, the 2026-11-19 audit):
`dsp_schedule.py` parsed snes_spc's timing macro out of the pinned LGPL file and quoted one
LGPL code fragment in a comment; `dsp_gauss_tables.py` read ten tables from pinned GPL/LGPL
trees and evaluated ares's (ISC) formula. Both were replaced: the schedule is now written in
docs/dsp/timing.md from anomie's document, fullsnes and ares (verdict **clean**), and the table
comes from `scripts/dsp_gauss_formula.py` (ares's formula only, ISC notice kept). No output of
the old scripts was ever committed. `trash/` is git-ignored, so they are in no commit of the
current tree, but they **are in the history** (added `13b71b0`, removed `740e97b`). s-dsp-python
has no remote.
**Options:** (a) move the folder out of the checkout to /data/backup, unopened; (b) leave it in
the git-ignored `trash/`; (c) have an agent open and audit them.
**Recommendation: (a).** Nothing uses them, their replacements are clean, and opening them
would only re-expose an agent to LGPL-derived text for no gain. The history question belongs
to the day s-dsp-python is published: the publish checklist's history audit should drop the two
files then (with git-filter-repo on a clean tree only; it hard-resets a dirty one).
**After a yes:**
```
mkdir -p /data/backup/s-dsp-trash-2026-11-25
mv /data/emu/s-dsp-python/trash/scripts /data/backup/s-dsp-trash-2026-11-25/
```
(No repository doc should name the backup path; provenance.md already says "moved aside unread".)
### L2. The 240p Test Suite's SNES source in snes-python
**Asked:** the verdict for sources.md's open row: may snes-python keep fetching the 240p Test
Suite's SNES source (Artemio Urbina, GPL-2.0, `89adfdd`, pinned in
`scripts/pinned_repos.json`)? It is a test program, not an emulator; it has never been built
or run (it needs PVSnesLib), and no prebuilt ROM is in its tree.
**Options:** (a) drop the pin now; when the suite is wanted, build it in emu-tools-gpl
(`tools/240p-snes`) and run the ROM through `$EMU_TOOLS_GPL`, verdict "closed box only";
(b) allow MIT repositories to fetch GPL *test-program* source as an exception to the
2026-11-24 rule; (c) leave it pinned and decide later.
**Recommendation: (a).** One rule with no exceptions ("MIT repositories fetch no GPL source")
is easier to keep than a line between test programs and emulators, and the suite is unused, so
dropping the pin costs nothing today. Its results are judged by eye on your console anyway,
which needs only a built ROM.
**After a yes:** a small snes-python job: remove the 240p entry from `scripts/pinned_repos.json`,
move any fetched tree under `reference/` to /data/backup unopened, note it in
docs/provenance.md and docs/validation.md; sources.md row 175 becomes "closed box only: built
and run from emu-tools-gpl when wanted; source never opened".
### L3. Third-party notices on the live sites (play-md first)
**Asked:** fix now the gap found on 2026-11-25: play-md serves a build containing
ssp1601-rust's BSD-3-licensed code without serving its notice (deferred on 2026-11-19 as
"live-site notices").
**Options:** (a) add a notices page to every play-* site now, generated from each build's
dependencies' LICENSE/NOTICE files, linked from the page footer, then redeploy; (b) play-md
only, by hand; (c) keep deferring.
**Recommendation: (a), starting with play-md.** BSD-3's second clause requires the notice
"in the documentation and/or other materials provided with the distribution", and a served
WebAssembly build is a distribution, so this is a live breach of a licence we promised to
honour (charter, licences point 7); it is the one item on this page that is wrong *today*.
A generated page keeps it right as cores change (play-gb's SameBoy Expat notice, the MAME
BSD-3 notice in famicom-python, ares ISC notices travelling down).
**After a yes:** brief a play-md agent (then play-nes, play-gb, play-pce, play-2600): a
`scripts/notices.sh` that collects LICENSE/NOTICE from every path dependency into
`web/notices.html`, a footer link, a check in the build. Then your deploy:
`cd /data/emu/play-md && scripts/deploy.sh` (and the same per site).
### L4. Scripts in MIT repositories that read GPL or unlicensed source at run time
**Asked:** what to do with the closed-box sweep's (2026-11-24) second finding: scripts that
parse closed-box source when they run. Named: the jrisc opcode tables (including vasm's),
a7800's census decoder, jzIntv notes, and megadrive-python's BlastEm event-log readers
(huc6280's three now stop with a message).
**Options:** (a) each script either stops (as huc6280's did) and its table is rebuilt from
documentation, or moves into emu-tools-gpl as a tool whose *output* the MIT repository reads;
(b) allow mechanical parsing (no human reads the source); (c) leave them.
**Recommendation: (a).** A table extracted by a script from GPL source is still a
transcription of that source (charter, licences point 3), whoever does the reading. Reading a
closed box's *output* (BlastEm's event log, if that is what the readers parse) is fine and
stays; the job is to check each script for which of the two it is.
**After a yes:** one provenance job across those repositories (jaguar-python, a7800-python,
intellivision-python, megadrive-python), recorded in each docs/provenance.md.
### L5. Unlicensed material the sweep found kept
**Asked:** verdicts for: JagNetlists, the Atari SDK, the TMSS and Sega CD BIOS disassemblies,
mcd-verificator, unlicensed test-ROM repositories, the Fuse tarball.
**Recommendation, by kind** (one yes covers all):
- *Test ROMs and test programs without a licence* (unlicensed test-ROM repositories,
mcd-verificator, which restart.md now records as GPL-3.0): **run only**, fetched into a
git-ignored `reference/` and pinned by hash, never committed. This is your 2026-11-24 rule
("no LICENSE and no notice = unlicensed, run only") applied.
- *Disassemblies of console firmware* (TMSS, the Sega CD BIOS): **out of the repositories**,
to /data/backup. They are console makers' firmware in another form (charter, licences
point 9); facts already taken from them stay, cited as such.
- *Emulator source* (the Fuse tarball, GPL): **out**, to /data/backup, by the closed-box rule.
- *Chip netlists without a licence* (JagNetlists): **run only**, like a die model, through a
tool in emu-tools-gpl if one is ever built; not kept in an MIT repository.
- *Manufacturer documentation* (the Atari SDK's documents): **read as DOC**, kept only in a
git-ignored `reference/`, never redistributed; any code or tools in it are not used.
**After a yes:** the main session briefs one tidy job per repository, recorded in its
provenance.md.
### L6. jzIntv's documentation from its binary release
**Asked:** may intellivision-python read jzIntv's documentation as shipped in its binary
release (jzIntv is GPL-2.0)?
**Recommendation: yes, documents only.** Documentation states facts; reading it is not
transcribing code, and taking it from the binary release means the source tree is never
fetched. Cite it as DOC (jzIntv release, version) and keep the archive git-ignored.
**After a yes:** a sources.md row: "jzIntv (Joe Zbiciak), GPL-2.0: closed box; its shipped
documentation read as DOC".
### L7. PicoDrive: our own build, or the shipped one
**Asked:** sega32x-python's PicoDrive libretro core in `reference/build` was built by us from
source earlier. PicoDrive's licence is non-commercial (MAME-style), not GPL; "run as shipped"
prefers a binary someone else built.
**Options:** (a) replace it with the libretro buildbot's shipped core, pinned by SHA-256,
fetched into a git-ignored folder, our build moved to /data/backup; (b) keep our build.
**Recommendation: (a).** Building it meant fetching its source into an MIT repository, which
the 2026-11-24 rule now forbids; a shipped binary avoids the question entirely and is what a
closed box should be. Check the results are unchanged (the 32X triage's PicoDrive rows).
**After a yes:** a sega32x-python job (after sega32x-rust's agent hands the repository back).
### L8. SPDX identifier for the Expat licence
**Asked:** which identifier files carrying Expat-licensed material use.
**Recommendation:** `SPDX-License-Identifier: MIT`. SPDX has no `Expat` identifier; its `MIT`
entry is the Expat text. Name "the Expat (MIT) licence" in the notice beside the material, as
play-gb's SameBoy colour table does. `lineage.py`'s SPDX count should reject `Expat`.
**After a yes:** a one-line rule in methodology.md's SPDX section (yours to add) and a grep
fix where `Expat` was used as an identifier.
### L9. Quotations kept in m68000-python's docs
**Asked:** what to do with (1) prose quoted from WinUAE's readme and changelog (GPL-2.0), read
before the closed-box rule, and (2) a MAME System16 code fragment in docs/timing.md, labelled
BSD-3 but never checked.
**Recommendation:** paraphrase (1) with a citation and drop the quotations; drop (2)'s code
and keep the fact it supports with its citation. Short documentation quotes are arguably
fair, but removing them is cheap and leaves nothing to argue; an unchecked licence label on
code is a claim stronger than our evidence.
**After a yes:** a docs-only m68000-python commit.
### L10. ay8910-python's `old-history` branch and its trash file
**Asked:** keep the pre-reset branch `old-history` (it holds the GPL die model, "NEVER push")
and `trash/chip.py.20b0fe9` inside a public repository's checkout?
**Recommendation: move both out of the checkout.** ay8910-python is public; one
`git push --all` would publish the branch. A bundle keeps every object for the record.
**After a yes:**
```
git -C /data/emu/ay8910-python bundle create /data/backup/ay8910-old-history-2026-11-25.bundle old-history
git -C /data/emu/ay8910-python branch -D old-history
mkdir -p /data/backup/ay8910-trash-2026-11-25 && mv /data/emu/ay8910-python/trash/chip.py.20b0fe9 /data/backup/ay8910-trash-2026-11-25/
```
*Still deferred by you, not asked again:* the GitHub Support request to purge old pull-request
refs (/data/backup/history-rewrite-2026-11-20/github-support-pr-refs-request.md).
---
## Charter and families wording
The charter and families.md's shape statements are yours. The texts below are drafts to paste
or to change. C1 and C4 are "facts that move", which the charter lets whoever finds them
update; they are here because this task does not edit families.md.
### C1. families.md's Atari 2600 row is stale
**Asked:** replace the row, which still says the Rust tiers are "to rebuild" and play-2600 is
"live on the old build".
What is true (handoff, 2026-11-25; a2600-rust README): the Rust tiers were rewritten from an
empty directory against the restarted specification and play-2600 has been live on them since
2026-11-20 (redeployed 2026-11-23); on 2026-11-25 both were repinned to a2600-python `c410e47`
(docs and pins only) with ladders passing.
**Proposed row:**
> | Atari 2600 | 1 | a2600-python | a2600-rust | a2600-rust-fast | - | play-2600, a2600-play | one | **Restarted 2026-11-14** from milestone 4 (milestones 5-6 had been written from Stella's and Gopher2600's source; archived as zzz-a2600-python). 39 die traces kept. The Rust tiers were rewritten from an empty directory against the restarted specification (the old ones archived); play-2600 has run them since 2026-11-20. Repinned to a2600-python `c410e47` on 2026-11-25: a2600-rust `4802263` (die 39/39, lockstep 232/232, also through save states), a2600-rust-fast `ac4b2ed` (ladder passed, A/B within noise); play-2600's branch `rebuilt-tiers` builds WebAssembly byte-identical to the live site. The old fast fork's quiet-step skip stays the idea for era-1 fast work |
**Recommendation: yes** (it only states what happened). **After a yes:** the main session
commits the row in emulator-lineage.
### C2. families.md's Domains column for the Sega CD and the 32X (and "Where to go next")
**Asked:** update the column from what the three specifications now declare
(docs/domains.md and tests/test_domains.py in snes-python `1df1a76`, segacd-python `58edab8`,
sega32x-python `74d6007`).
What changed against the old defaults: in the Sega CD the PCM is part of the sub side (the sub
CPU writes it, the CDC's DMA fills its RAM, it is clocked from the sub crystal), and the drive,
a separate controller in hardware, is stepped on sub clocks in the specification. In the 32X
there is one clock (a PLL multiplies the 68000's: 7 master clocks = 1 68000 clock = 3 SH-2
states), so its four domains are *scheduling* domains, and the VDP's and PWM's events run
inside the SH-2 pair's catch-up. The SNES row matches as built.
**Proposed cells:**
> Sega CD: main (the Mega Drive); sub (68000, gate array, CDC, graphics unit, PCM); CD drive (stepped on sub clocks in the order of record). PCM and CD-DA are producer streams
> Sega 32X: one locked clock (a PLL on the 68000's) and four scheduling domains: Mega Drive side; the two SH-2s (one domain); 32X VDP; PWM. As built, the VDP's and PWM's events run inside the SH-2 pair's catch-up
> SNES (optional, more exact): S-CPU (with both PPUs, DMA, the cartridge); APU (SPC700 and S-DSP, one domain) behind the 4 ports; coprocessors per cartridge (none built yet)
**Proposed "Where to go next" item 3:**
> 3. Done 2026-11-25: domains and channels named in sega32x-python, segacd-python and
> snes-python (docs/domains.md, checked by tests/test_domains.py). Next: each board's sync
> points and memory kinds feed its fast tier (2026-11-jit.md, "Boundaries").
**Recommendation: yes.** The rows would otherwise send the next port's agent to the old split.
**After a yes:** the main session commits it in emulator-lineage.
### C3. The charter's definition of a domain does not fit the 32X
**Asked:** widen the charter's "Domains and channels" definition, which says domains are
"parts on their own clock". The 32X has no clock of its own, yet its SH-2 pair, VDP and PWM are
exactly what a threaded tier would run apart.
**Current text** (charter, "Domains and channels", first bullet):
> A specification states its machine's **domains** (parts on their own clock: a CPU and
> its bus, a sound subsystem, a CD drive) and the **channels** between them (ports, shared
> memory, interrupt lines, FIFOs) as first-class structure.
**Proposed text:**
> A specification states its machine's **domains** (parts that keep their own time and meet
> the others only at channels: usually parts on their own clock, such as a CPU and its bus, a
> sound subsystem, a CD drive; sometimes parts on one locked clock that can still be
> scheduled apart, such as the 32X's SH-2 pair, VDP and PWM, all driven from the 68000's
> clock) and the **channels** between them (ports, shared memory, interrupt lines, FIFOs) as
> first-class structure. A specification may step one domain inside another in its order of
> record (the Sega CD's drive on the sub CPU's clocks); it says so, and the channels stay the
> only place they meet.
**Proposed change-log line:**
> - **2026-11-xx** Domains: "parts that keep their own time and meet the others only at
> channels", own clock or not. Why: the 32X's parts share one PLL-locked clock but are
> scheduled apart, and the Sega CD's specification steps its drive on the sub CPU's clock;
> the first three domains.md files (2026-11-25) needed the wider wording.
**Recommendation: yes.** It changes no project; it makes the definition match what the
threading plan relies on (narrow channels, not separate crystals).
**After a yes:** you paste it (the charter is yours), or tell the main session to.
### C4. families.md's Sega CD row: "Owed: a referee, sound, drive timing" is out of date
**Proposed Notes cell:**
> A referee (Genesis Plus GX run as a libretro program, a closed box: 12 of 12 Sonic CD boot frames with 0 pixels different), PCM and CD-DA sound (the fader per the hardware manual p.31), and drive timing (a seek state machine FITTED to KRIKzz's drive logs: 3,004 of 11,256 exchanges replayed) built since 2026-11-19; mcd-verificator 17 of 18. Owed: milestone 2's refresh and wait states, mode 1 and the CD + 32X titles, a device-state socket in megadrive-python. Local, no remote. The main and sub CPUs share memory through defined gates: a real domain split
**Recommendation: yes** (facts only). **After a yes:** the main session commits it.
### C5. Write the closed-box rule into CLAUDE.md and the charter
**Asked:** your 2026-11-24 general rule ("MIT repositories never fetch or keep closed-box
source") lives in memory and sources.md, not in CLAUDE.md or the charter. CLAUDE.md says only
"run such projects as black boxes only". Every agent reads CLAUDE.md first; the sweep agent
found ~40 repositories that had kept such trees.
**Proposed CLAUDE.md line** (in "Honour every licence you touch", after the first sentence):
> MIT repositories never fetch, keep or build closed-box source (GPL, LGPL, unlicensed or
> non-commercial emulators and models): those are built and run from emu-tools-gpl or
> emu-tools-gpl2 (`$EMU_TOOLS_GPL`, `$EMU_TOOLS_GPL2`), and an MIT repository reads only
> their outputs.
**Proposed charter sentence** (licences, end of point 3):
> An MIT project does not fetch or keep such source either: closed boxes are built and run
> from the GPL tool repositories, and the MIT project reads their outputs.
**Recommendation: yes.** It is already your rule; written where agents read first, it stops
the next agent from re-creating what the sweep removed.
**After a yes:** you edit `docs/CLAUDE.md` in emulator-lineage and copy it to
/data/emu/CLAUDE.md (`python3 lineage.py` checks the copy), and add the change-log entry.
---
## Merges
### M1. megadrive-rust: merge branch `sockets` into `pin-2-od2`
**Asked:** accept the transcription of megadrive-python's expansion sockets (how the 32X and
Sega CD boards attach) into megadrive-rust's working line, with its four choices.
The branch: `d39b9bf` + `0959147`, 2 commits ahead of `pin-2-od2`, which can fast-forward. Gate
(re-run by the main session where noted): cargo test 53 (re-run); lockstep **87 of 87** (81
old cases + 6 with the reference's test-only socket devices); save-state rung **81 of 81**. No
repin needed (megadrive-python `efd80fc` already has the socket code). sega32x-rust is being
built on it now (worktree branch `sockets-32x`).
The choices it carries:
1. **State format version 2 → 3**: the state's header now names the devices in the wiring.
Older Rust states are refused (cleanly: the game keeps running). This reaches players only
at play-md's next deploy, through megadrive-rust-fast (M2): their F5 save states from
before are refused; battery saves are untouched.
2. **Devices are wiring, not saved**: a state names the plugged devices but holds none of
their side, as the reference does (it refuses to save a device from outside its own
packages). The Sega CD and 32X need a device-state socket upstream first (B3).
3. **rust-version 1.85 → 1.86** in Cargo.toml.
4. **The RESET instruction's clock is the core's fixed 128** (the bus cannot read the core's
count): a transcription constraint, listed in the README.
Not run: the seeded faults (`scripts/seeded_faults.py` is stale since pin-2-od2: it looks for
`Z80_BUSREQ_LAG_MCLK = 33`, now 32), and clippy.
**Options:** (a) merge now, accepting all four as provisional; (b) merge after the seeded-fault
script is fixed and run; (c) hold until B3's device-state socket exists, so the state format
moves once.
**Recommendation: (a), with the seeded-fault fix as the next job.** megadrive-rust is the
transcription tier: its gate is lockstep, which passed in full, and it carries no speed claim;
sega32x-rust needs it. Players see version 3 only when play-md redeploys, which (M2) should not
happen before B3, so they meet one refusal, not two.
**After a yes:**
```
git -C /data/emu/megadrive-rust switch pin-2-od2
git -C /data/emu/megadrive-rust merge --ff-only sockets
```
then the main session fixes `seeded_faults.py` (the 32-clock constant) and runs it.
### M2. megadrive-rust-fast: merge `sockets`, after a quiet A/B
**Asked:** the same sockets in the fast tier (branch `sockets`: merge `ad976bf`, `bf2c805`,
`9995ffb`; 5 commits ahead of `pin-2-od2`, fast-forward possible), where it costs speed.
Gate: rung 1 cargo test 56 + window 8; lockstep **87 of 87**; save states **81 of 81**. A/B
against `pin-2-od2`, 7 rounds, machine at load 75-100: **default layout x0.986** (Sonic x0.966,
Streets of Rage 2 x1.004, Gunstar Heroes x0.999, Overdrive 2 x0.981), **nf5 x1.003**. The agent's
own words: "not a clean no-slowdown result ... not shown to be noise; to be re-measured quiet."
**Options:** (a) re-measure on a quiet machine, merge if within noise; if the 1.4 % stays, try
more out-of-line paths, and if it still stays, accept it as the price of a needed feature,
recorded in docs/not-kept.md's sense (what it cost and why kept); (b) merge now; (c) hold.
**Recommendation: (a).** The sockets are not a speed change, so "must win on every layout"
does not strictly apply, but a 3.4 % loss on Sonic in the tier whose job is speed should be
known, not guessed. One quiet A/B takes about half an hour of one core.
**After a yes (when the machine is quiet, load under ~10):** build the base in the existing
worktree /data/emu/megadrive-rust-fast-abbase at `a291363` and the branch, then, from the
`sockets` checkout, `BIN_A= BIN_B= ROUNDS=9 nice scripts/ab.sh`
(as docs/build-record.md, "The expansion sockets merged", did). If within noise:
```
git -C /data/emu/megadrive-rust-fast switch pin-2-od2
git -C /data/emu/megadrive-rust-fast merge --ff-only sockets
```
Note: play-md builds by path from ../megadrive-rust-fast's checkout, so after this merge the next
play-md build carries state version 3. Hold play-md deploys until B3 (or accept two refusals).
### M3. play-2600: fast-forward `rebuilt-tiers` and deploy (optional)
**Asked:** play-2600's branch `rebuilt-tiers` (`1ace091`) builds WebAssembly byte-identical to
the live site; nothing visible changes. Until it is merged, play-2600's `main` does not build
without `BOARD_ANY=1`.
**Recommendation: yes, when you next deploy anything.** It removes a trap for the next build.
**After a yes (pushes first, in this order):**
```
git -C /data/emu/a2600-python push origin main
git -C /data/emu/a2600-rust push origin main
git -C /data/emu/a2600-rust-fast push origin main
cd /data/emu/play-2600 && git switch main && git merge --ff-only rebuilt-tiers && scripts/deploy.sh
```
### M4. The push list and new remotes
**Asked:** whether to push the 2026-11-25 push list (33 pushes to existing remotes; 37
repositories without remotes), and create remotes for the new Rust cores.
The list: /tmp/claude-1000/-data-emu/cc000e61-3622-4cfc-9314-fa336e875ddf/scratchpad/push-list/push-list.md
(snapshot 01:55; **in the scratchpad, which a reboot clears**: ask the main session to copy it
somewhere durable, and re-check each repository with `git -C REPO status -sb` before pushing).
Forced orders in it: a2600-python before its Rust tiers; z80-python branch
`m1-fetch-hook-rebased` before colecovision; ssp1601-python/-rust remotes first (megadrive pins
`c863a2c`); tms9918 before colecovision; 65816/spc700 before snes; megadrive-python pushes
`pin-2-od2` and `pin-2-od2:main`; sh2-python and arm7tdmi-python before their Rust tiers.
**Recommendation:** push the list now except two holds: (1) **65816-rust: no remote until the
clean-room decimal adder lands** (its `alu.rs` carries the bsnes-derived algorithm today; it
would be a new copy in a new place); (2) **gb-apu-python, gb-apu-rust, gb-apu-rust-fast: push
as listed** (they are already public with the AGB row; pushing does not make it worse), but no
new tags until the clean-room AGB row lands. Never push ay8910-python `old-history` (L10 moves it
out).
**After a yes, the new remotes** (private by default; pushes over SSH because the gh token lacks
the workflow scope):
```
git -C /data/emu/sh2-python push origin main
cd /data/emu/sh2-rust && gh repo create alewman/sh2-rust --private --source . --remote origin && git remote set-url origin git@github.com:alewman/sh2-rust.git && git push -u origin main
git -C /data/emu/arm7tdmi-python push origin main
cd /data/emu/arm7tdmi-rust && gh repo create alewman/arm7tdmi-rust --private --source . --remote origin && git remote set-url origin git@github.com:alewman/arm7tdmi-rust.git && git push -u origin main
cd /data/emu/spc700-rust && gh repo create alewman/spc700-rust --private --source . --remote origin && git remote set-url origin git@github.com:alewman/spc700-rust.git && git push -u origin main
```
(spc700-rust pins spc700-python `552b24a`, which has no remote either: create
spc700-python's first, the same way. ssp1601-python and ssp1601-rust also have no remote and
come first in the list, since megadrive-python's `svp` extra pins ssp1601-python `c863a2c`;
ssp1601-python has a CI workflow, so use the SSH form above. 65816-rust: after the clean-room
merge. The readiness pass of 2026-11-25 evening added commits to sh2-rust, arm7tdmi-rust,
spc700-rust, ssp1601-*, ay8910-*: re-check each with `git status -sb` first.)
---
## The JIT proposal (docs/proposals/2026-11-jit.md)
Since the proposal was written, two facts moved: sh2-rust exists and passes its ladder, and the
SH-2's real need is far smaller than the brief said (pair ceiling about 46 M instructions a
second, about 35 M with the cache on; sh2-rust runs 42-45 M native and 21-27 M in WebAssembly
on a busy machine). So **native needs no JIT for the 32X; the browser is at the edge**, which is
what the no-JIT-first plan expects. Tonight's sh2-rust-fast agent is prototyping the cached
interpreter.
### J1. Recompilation is a turbo fast path, with the interpreter as fallback
**Recommendation: yes.** It adds no tier and no exception: it is the existing turbo definition
applied, plus proof steps (lockstep at every block's exit, bus-stream equality where the
observable contract needs it, seeded faults aimed at JIT bugs, invalidation tests). Saying it
now keeps a future JIT from being built beside the specification.
**Proposed charter text** (the tiers' rules, after "Turbo is not a second specification"):
> - **Recompilation is a turbo fast path.** Block caching, and a code generator only if block
> caching does not pay, live in `x-rust-turbo`, with the inherited interpreter always present
> as the fallback and the host able to turn recompilation off. Besides turbo's obligation, a
> recompiler proves: the CPU state and time equal the interpreter's at every compiled block's
> exit; every read another domain can see, at the same cycle; seeded faults aimed at what
> JITs get wrong (lazy flags, stale blocks after self-modifying code, missed interrupts,
> delay slots, summed cycle counts), each caught; invalidation by self-modifying code, DMA,
> cache purges and other CPUs' writes. It is held to "prune what does not pay" like any
> speed claim.
**After a yes:** you paste it, with a change-log line; nothing is built until J4's order reaches
step 3.
### J2. What a specification declares for fast paths (sync points, memory kinds, timing data, CPU handler subset)
**Recommendation: yes, one specification at a time, starting with sh2-python, each step gated
byte-identical.** The first half already happened by another route: the three domains.md files
name sync points, memory kinds and who writes each region. For the SH-2 it is mostly naming the
subset its handlers already keep to and adding a lint test; nothing changes behaviour.
**After a yes:** an sh2-python job: docs/handler-subset.md and a test that walks each handler's
syntax tree; gate: byte-identical traces.
### J3. A generated `x-rust` interpreter instead of a hand transcription, per core
**Options:** (a) allow it now, per core, by your decision; (b) not yet: revisit when a core's
hand transcription is the bottleneck; (c) never.
**Recommendation: (b).** sh2-rust was hand-transcribed and passes every rung; a generator would
change what `x-rust` is ("a transcription") and bring its own code to gate, for no measured need
yet. The next big CPUs (R3000A, VR4300) are the place to weigh it, with the SH-2's lint in hand.
**After a yes to (b):** nothing; the proposal records it as deferred.
### J4. The SH-2 as the pilot, in the proposal's order
**Recommendation: yes.** Step 1 (sh2-rust, sh2-rust-fast) is under way; the 32X is the first
board where the need is real, and the SH-2's generated decode table makes it the easiest CPU to
start with.
**After a yes:** the next step after tonight's prototype: measure the cached interpreter in the
browser through a 32X build (after sega32x-rust exists).
### J5. The no-JIT path is the main plan (`recompile: native | wasm | none`)
**Recommendation: yes; it is your own 2026-11-25 ruling (iPhone forbids JIT).** The yes is to
write it into the charter's capability contract, so every board's speed plan is held to it.
**Proposed charter text** (Capabilities, after "what it can do: ..."):
> - whether it recompiles: `recompile: native | wasm | none`. Every board meets its stated
> target with `none`, or says plainly on which targets it cannot; some targets (native iOS
> apps) forbid creating executable memory, and the host chooses what a device allows.
**After a yes:** you paste it; the main session adds the field to the sites' capability numbers
as each board reports them.
### J6. The family-by-family boundaries as starting defaults
**Recommendation: yes, with the three confirmed rows corrected.** The SNES, Sega CD and 32X rows
have now been checked against code (C2): the Sega CD's PCM belongs to the sub side, and the 32X's
VDP and PWM run inside the SH-2 loop. The other rows stay defaults until each specification
names its domains.
**After a yes:** a small edit of the proposal's table (the main session, in this folder).
---
## Tools
### T1. The emu-tools contract draft (emu-tools `c139c74`)
**Asked:** accept the contract's additions: how a run ends early (`--frames` becomes the most a
run lasts; `--until log:TEXT`; a script's own stop such as Mesen2's `emu.stop(code)`) and the
manifest's new `end` field (`by`, `frame`, `stop_code`, `until`, `reached`,
`frames_not_reached`). Additions only; no existing field changes; the exit status keeps its
meaning (a stop code is read from the manifest, never from the exit status).
**Recommendation: yes.** mesen2-runner 0.3.0 already writes it, and consumers already rely on it
(snes-python's probe suite 114.5 s → 26.6 s, famicom-python's AccuracyCoin 90 s → 16 s, outputs
identical). Leaving it as a draft leaves the tool ahead of its contract.
**After a yes:** an emu-tools commit removing the "(draft, 2026-11-24)" marks and setting the
versions row's status.
### T2. A pinned MesenCE build in emu-tools-gpl
**Asked:** famicom-python keeps its own MesenCE build today (an MIT repository holding a GPL
build). Move it into emu-tools-gpl?
**Recommendation: yes**, as a second pinned upstream of `tools/mesen2` (one runner, two
cores), so the closed-box rule holds and AccuracyCoin's MesenCE column (143/147) keeps working.
Upstream's AI policy (MesenCE bans AI contributions) concerns contributing to it, not running
it; nothing would be posted there.
**After a yes:** an emu-tools-gpl job, then the famicom-python switch, outputs compared.
### T3. The remaining closed-box builds inside MIT repositories
**Asked:** the sweep's first finding: builds still kept in MIT repositories (SNES_MiSTer under
GHDL, Stella / ProSystem / Gearcoleco / MesenCore binaries, libatari800, NanoBoyAdvance and
mGBA, dmg-sim, the TurboGrafx VHDL, Mednafen, mednafenPceDev, jgenesis, 6502Decoder, MDFourier
and the TMSS build). Move them into emu-tools-gpl / -gpl2?
**Recommendation: yes, in waves, one tool folder per job**, each by its own licence
(GPL-2.0-only ones in -gpl2), each proved by identical outputs before and after, as was done for
Mesen2, snes_spc, Nuked-MD and WinUAE. A permissively licensed one (check each against
sources.md) may stay where it is, with its notice.
**After a yes:** the main session queues the waves (light compute: builds and identity runs, no
sweeps).
### T4. An environment variable for Sega CD disc images
**Asked:** the Sega CD agent wants a documented name for the folder of disc images (the
romset-by-variable rule has `NO_INTRO_DIR` for cartridges; discs come from Redump sets).
**Recommendation:** `REDUMP_DIR`, named for the set as `NO_INTRO_DIR` is, so every disc board
(Sega CD, PC Engine CD, later Saturn and PlayStation) shares it.
**After a yes:** a line in profile-env and segacd-python's README; the other disc boards adopt
it as they are touched.
---
## Per board
### B1. Sega CD: re-derive the Sonic CD recipe's presses to keep the better drive rules?
**Asked:** two drive rules (report 5 answered after 2 busy exchanges; stop going to state 0)
make the board replay more of KRIKzz's real-drive logs (3,004 → 3,054 of 11,256 from power-on;
3,704 → 4,076 started where the logs start; the stop logs become 215/215 and 164/164), but the
Sonic CD recipe then fails: the boot runs differently, so the fixed presses (Start at 4,830,
5,500, 6,200) leave Sonic on the zone card at frame 7,500. The agent reverted them, because the
gate's definition does not let an agent change a recipe on its own.
**Options:** (a) keep the rules and re-derive the presses (the recipe's verdict unchanged:
Palmtree Panic zone 1, timer running); (b) keep the recipe and drop the rules.
**Recommendation: (a).** The drive logs are hardware measurements; the recipe is a smoke
detector whose press frames are already known to move with boot timing (they moved once before,
at `b84d978`). The cost to weigh: against Genesis Plus GX the board trails by 53 frames at the
title instead of 50, but that referee is an emulator, not the hardware.
**After a yes:** a segacd-python job: apply the patch, find the new presses, rerun the recipe and
the referee, record the change in docs/status.md. **The patch is in the scratchpad**
(scratchpad/segacd-seek/r5stop/candidates-applied.patch), which a reboot clears: have it
committed to a segacd-python branch first, whatever the answer.
### B2. Sega CD: save states taken mid-seek before `322c662`
**Asked:** such states still load, but a drive saved while seeking arrives at once, and one saved
paused loops at sector 0 until its next seek. Refuse them by version, or accept the glitch?
**Recommendation: accept and document now; version properly with B3.** segacd-python is local and
has no site, so no player holds such a state; a version bump today would go through
megadrive-python's shared state version, which is the wrong place. When the device-state socket
(B3) exists, the Sega CD's own state gets its own version and refuses older ones.
**After a yes:** one paragraph in segacd-python docs/status.md (the build-status text already says
most of it).
### B3. megadrive-python: a socket for an expansion device's own state
**Asked:** brief the upstream change both the Sega CD and the 32X have asked for (segacd-python
docs/sockets.md §12): megadrive-python's state format has no place for a slot or port device's
state, so those boards borrow private names to save their side.
**Recommendation: yes, and soon.** It is the specification-side half of M1's "devices are wiring,
not saved", and it decides how many times play-md's players lose their states (once, if it lands
before play-md's next deploy). It is a megadrive-python change on `pin-2-od2`, gated by its own
state tests, then carried down to both Rust tiers (state version 4) and taken up by segacd-python
and sega32x-python.
**After a yes:** a megadrive-python job; the same job should take the owed repro
(VDPFIFOTesting 121/122 on `genesis`, test 16, where the docs claim 122/122).
### B4. SNES: run the console probe batch (the port-race lead waits on it)
**Asked:** not a choice but your time: the five Super Famicom probes in /data/emu/PROBE-QUEUE.md,
on your console and EverDrive X5.
Why it matters now: the S-SMP port fix (`04a9805`) made Kawasaki (USA and Europe) boot; Zenki is
still blank. A lead that *does* boot Zenki (port reads seeing a write up to mid-cycle) reproduces
Mesen2 in all 286 probe cells, but it was fitted to a closed box, so it is not committed. The
console's `port-race.srm` decides it: near -10 clocks says the lead is right, near 0 says the
board is. Probe #4 decides the fades class (~400 games).
**Recommendation: run it when you can.** It is the only evidence that can settle either question
(hardware outranks every emulator), and the board's sweep classes wait on it.
**After:** rebuild the pack in snes-python with `python -I scripts/build_probe_pack.py` (port-race
ROM SHA-1 `0e9669f6cea1878a2654c0419577aef77ae85e26`), run the entries as PROBE-QUEUE.md says, and
copy `SAVE/*.srm` and the photos into /data/emu/SPED/SAVE; the main session decodes
(`python -I scripts/port_race_results.py port-race.srm`) and briefs the fix.
### B5. Structure changes the domains pass proposed (each byte-identical)
**Asked:** three specification changes that make the declared domains real channels, with no
behaviour change: megadrive-python socket 6 "publish lines up to a clock" (the VDP's line records
to a device); the 32X's VDP and PWM scheduled outside `SH2Side.catch_up`; the Sega CD's gate array
taking a timestamp argument instead of reading `GateArray.now`.
**Recommendation: yes, each when its Rust tier needs it** (the 32X's first, since sega32x-rust has
started), each gated by byte-identical traces. They are what lets a threaded tier run the domains
apart; done earlier they only add churn.
**After a yes:** folded into the sega32x-rust track, and into B3's megadrive-python job for socket 6.
### B6. 32X: 19 early titles stall on the FTOA-to-/IRL0 tie
**Asked:** the board ties the SH-2's FTOA output to /IRL0 (32XDK wiki and the testpico test ROM),
which stalls 19 early titles (Gnu Sierra, Golf betas 2-10, Motocross betas 1-7, Doom betas 2/4):
they leave the interrupt mask at 0 with FTOA low and take an endless level-1 interrupt. Later
betas set the timer up at entry (Sega Technical Bulletin #10). Perhaps dev units differed
(HYPOTHESIS); you have no 32X, so no probe can settle it.
**Recommendation: keep the tie as built,** record the 19 as "expected: dev-unit HYPOTHESIS" in the
triage, and tag sh2-python's FTOA reset level (0, untagged today) as HYPOTHESIS. A switch per
machine would be a model without evidence.
**After a yes:** docs and a tag, in the next sega32x-python and sh2-python jobs.
---
## Quick actions for you (no decision; minutes each)
1. Add `source /data/emu/profile-env-2026-11-23.sh` to `~/.bashrc`, if not done yet.
2. Look at the GBA window once on a desktop (never seen on a screen):
`cd /data/emu/gba-python && python -m gba_python.window ROM --skip`.
3. Big Top Bounce round 3 playtest (variant B: `-D PUNCH_SPEED=6 -D BUMP_MAX=4`).
## Provisional defaults already taken (listed, not asked; say if you object)
- megadrive-rust: rust-version 1.86; RESET clock 128 (M1).
- mesen2-runner: Lua `io`/`os` enabled per run as the log needs; the tool-level `FDS_BIOS` stays
and consumers pass `--fds-bios` from their own variable.
- emu-tools-gpl harness: our own files keep GPL-2.0-or-later headers; the combined build is
GPL-2.0-only (you accepted on 2026-11-24).
- Sega CD: the LC8951's decoder interrupt pulse (CDC FLAGS 40 fails as Mike Pavone's LC8951 units
do; a CDX row would need LC8913 evidence); STAT3 still clears VALST (manual p.63 says not; scan
damaged there).
- sh2-python: R2's faulting access makes no bus cycle (HYPOTHESIS U15); arm7tdmi-python: the Thumb
decode after a T-setting MSR (HYPOTHESIS U16).
## Owed work, briefed when you say go (no decision)
- megadrive-rust: fix `scripts/seeded_faults.py` (constant 33 → 32) and run it (M1).
- arm7tdmi-python: docs/handoff-brief.md still describes the old U14 rule.
- famicom: PC10 save states never taken while the watchdog counts (`--bios-program` in
famicom-pc10-states); AccuracyCoin.nes mismatches its pin.
- 65816-python: 39 files without SPDX headers; a NOTICE for tests/mame_replay.py's MAME function
(after the clean-room decimal job hands the repository back).
- GPL-side tidies (emu-tools-gpl CHANGELOG "21 cases" is 20; build_winuae.py's old variable name).
- SNES: a frame-900 sweep pass (heavy: waits for a quiet machine); the sweep cache's old-driver
pictures regenerate with it.
- Worktrees to remove: scratchpad/domains/*, scratchpad/snes-portrace/wt, scratchpad/spec-fixes/sh2-old,
/data/emu/megadrive-rust-fast-abbase (after M2's A/B), famicom-rust-fast's `watchdog-merge`.