- Apply symbols.inc hardware register names to Defender 2 (U) (51 operands)
- Apply symbols.inc hardware register names to Donkey Kong 3 (JUE) (36 operands)
- Add APU register symbols (-) to Defender 2 (U) and Donkey Kong 3 (JUE) symbols.inc
- Apply symbols to Donkey Kong Jr. Math (U) (80 operands: 11 single + 69 hardware)
- Apply symbols to Excitebike (JU) (786 operands: 785 single + 1 hardware)
- Add promotion criteria to PROMPTS.md: symbol/local substitution,
ROM-specific semantic naming, and verification checklist
Add branch/jump target naming requirement to PROMPTS.md
All branches and jumps must target symbolic labels with descriptive names
derived from program flow role (e.g., _Loop, _Next, _Done, _Store, _Return),
never raw address literals. Adds criterion 8 to verification checklist.
Rename all OVERVIEW.md to README.md; add root README content to top-level
- Rename all OVERVIEW.md files to README.md throughout the repo (47 files)
- Prepend README.md content to top-level OVERVIEW.md before rename
- Fix apply_symbols.py NAME_RE regex to handle spaced assignments
- Apply symbols.inc to Defender 2 (U) (51 hardware operands)
- Apply symbols.inc to Donkey Kong 3 (JUE) (36 hardware operands)
- Apply symbols.inc to Donkey Kong Jr. Math (U) (80 operands: 11 single + 69 hardware)
- Apply symbols.inc to Excitebike (JU) (786 operands: 785 single + 1 hardware)
- Add missing Zp18/FrameCounter aliases to Excitebike prg.s
- Build all 27 top-level projects: byte-identical
Promote Donkey Kong Jr. Math back to _wip tier
Moves code from `copilot` folder and verifies each builds after
Add pre-commit hook for byte-identical verification
Add .git/hooks/pre-commit that runs 'make' then 'make clean' in each
project directory before committing. This ensures every project builds
byte-identical before any commit is accepted.
Also includes all file moves from the Donkey Kong Jr. Math (U) demotion
and other file restructuring from the session.
moves code out of copilot folder, its all AI generated.
Moves NROM games into NROM folder
removes copilot folder from Lunar Pool
Adds makefile to build all projects recursively
Updates docs to reflect changes in layout
Repromotes Donkey Kong Jr Math
Repromotes Excitebike
Promotes Popeye (JU) (PRG 1)
Updates Makefile to provide summary of build failure/success
Promote Raid on Bungeling Bay (U): Pass 2/3 partial, whole-ROM byte-identical
Move _wip/NROM/Raid on Bungeling Bay (U) to NROM/ and switch the build
from a PRG-only compare to a whole-ROM one:
- header.s/chr.s added (one-line .incbin of header.bin / chr.bin)
- linker.cfg gains HEADER ($0000, $0010) and CHR ($0000, $2000)
areas ahead of PRG ($C000, $4000)
- rom.nes symlink to the space-containing original ROM name
- Makefile builds header.o/prg.o/chr.o into reconstructed.nes and
compares it against rom.nes ('Byte-identical ROM verified.')
- one leftover neutral indirect operand jmp (Zp01) at $E2EC becomes
jmp (IndDispatch01); apply_symbols.py reports 0 substitutions pending
README.md / TODO.md / AGENTS.md updated: 29 promoted, 7 in _wip/.
Pac-Man (U): Pass 2 complete (label renaming) + Pass 3 partial (ZP aliases, table names)
Pass 2 — fresh map derived from the committed split, not from any drafted
map (the drafted maps in other projects were audited and found not
applicable):
- all 194 address-derived Label_XXXX definitions renamed to semantic
routine-entry names plus <Routine>_<Role>_<addr> internal branch
targets; zero Label_ remains
- all 49 jsr/jmp call sites resolved from raw $XXXX to labels; zero
raw $XXXX call operands remain
- routinemap.tsv / derived_names.tsv record the derivation
Pass 3 (partial):
- 15 proven semantic zero-page aliases added to locals.inc
(GameState, NmiFlag, ScrollX/Y, PpuCtrlShadow, OamDmaPage,
CocktailModeFlag, ActivePlayerFlag, GameplaySuspended, FrameCounter,
StateTimer, Player1/2Input, ActiveInput, CopyrightVerified)
- 112 operands substituted into prg.s (11 single + 101 hardware)
- key data tables named: ProgrammerSig ($C0EB), GameStateDispatchTable
($C253), TitleScreenData ($C2FD), EntityPtrTable ($D912),
AudioCommandTable ($EFDD)
Also corrects the README's claim that the RESET vector points at padding:
$FF00 holds real boot code (sei/cld, PPU off, double vblank wait, then
jmp ColdStart at $C042).
.gitignore: ignore reconstructed_prg.bin (build artifact of the _wip
Makefiles; '**/reconstructed.*' does not match the underscore form).
Promote Pac-Man (U): Pass 2/3 complete, whole-ROM byte-identical
Move _wip/NROM/Pac-Man (U) to NROM/ and switch the build from a PRG-only
compare to a whole-ROM one:
- header.s/chr.s added (one-line .incbin of header.bin / chr.bin)
- linker.cfg gains HEADER ($0000, $0010) and CHR ($0000, $2000)
areas ahead of PRG ($C000, $4000)
- rom.nes symlink to 'Pac-Man (U) [!].nes' (the original ROM name
contains a space and brackets)
- Makefile builds header.o/prg.o/chr.o into reconstructed.nes and
compares it against rom.nes
- reconstructed.nes is 24,592 bytes, MD5 a69d310f8cae9397fbd39f204672b5c7
- equal to the original ROM; the header/prg/chr splits were checked
against the original before promotion and are byte-exact
Pass 3 residue closed. The last 7 multi-alias zero-page operands are
resolved per site through a new sites.tsv, each proven from context
rather than guessed:
- jmp ($0010) at $C250/$D3CA/$D90F/$D9B6 -> (DispatchPtrLo); each
is immediately preceded by sta DispatchPtrLo/sta DispatchPtrHi
- jmp ($00FE) at $EFDA -> (AudioHandlerPtrLo); preceded by
sta AudioHandlerPtrLo/sta AudioHandlerPtrHi
- sta a:$0000,y at $C048/$C089 -> a:Zp00,y; the literal zero-page
base in the two ZP clear loops, so the neutral name is used rather
than the semantic WorkPtrLo. The 'a:' prefix survives the
substitution, so the bytes stay 99 00 00 (sta abs,Y)
apply_symbols.py now reports 119 operands substituted (101 hardware,
11 single-name, 7 site) and 0 residue.
New tool _tools/align_audit_comments.py: re-aligns the audit comment to
column 35 after a substitution lengthens an operand (nesdis.py pads each
instruction to 31 characters). Whitespace-only, so the byte identity
cannot change. 405 lines re-aligned in this project; all 2,387 audit
comments still match prg.bin at the stated PRG offset, 0 mismatches.
Docs: root README.md / TODO.md / AGENTS.md updated - 30 promoted, 6 in
_wip/; a per-project detail entry for Pac-Man (U) added; the stale
'Donkey Kong 3 (JUE) has no README.md' claim corrected (it has a
318-line one).
Promote Raid on Bungeling Bay (U) [a2]: Pass 3 complete, whole-ROM byte-identical
Move _wip/NROM/Raid on Bungeling Bay (U) [a2] to NROM/ and switch the build
from a PRG-only compare to a whole-ROM one:
- header.s/chr.s added (one-line .incbin of header.bin / chr.bin)
- linker.cfg gains HEADER ($0000, $0010) and CHR ($0000, $2000)
areas ahead of PRG ($C000, $4000)
- rom.nes symlink to 'Raid on Bungeling Bay (U) [a2].nes' (the original
ROM name contains spaces and brackets)
- reconstructed.nes is 24,592 bytes, MD5 659d340a1e9d420eee28df13319b0094
- equal to the original ROM; the header/prg/chr splits were checked
against the original before promotion and are byte-exact
Pass 3 - 15 semantic zero-page aliases, each applied only at the sites
where its role is proven:
- PpuCtrlShadow ($C2), 15 sites: the reset entry primes it right after
'sta PPUCTRL', and every other use is an ora/and/eor followed by
'sta PPUCTRL'
- NmiPathSelector ($C4), 5 sites: written 1 at $C3E9 and 0 at $C962
- GameState ($D6), 6 sites: 'cmp #$02' and used as an index at $C4C7
- FrameSubCounter ($55), 6 sites: set to $0A at $C520, decremented per
NMI at $C07B
- PrngPeriodCounter ($EA) / PrngSeedB ($EB) / PrngState ($EC), 13 sites:
the PRNG state
- PtrLo ($00) / PtrHi ($01), 8 sites: the 16-bit pair $1C13 and $1610
compared at $E785/$E791
- IndDispatch01 ($01) / IndDispatch02 ($02), 3 sites: the computed
dispatch at $E2EC
- IndDispatch1B ($1B) / IndDispatch1C ($1C), 6 sites: the dispatch at
$E7A3
- IndDispatch17 ($17) / IndDispatch19 ($19): the dispatches at $E79D
and $E7A0
Addresses that carry two names keep the neutral ZpXX name where the other
role applies - $01 is PtrHi at the 16-bit compare and IndDispatch01 at the
dispatch; $17 is IndDispatch17 at the dispatch and Zp17 for the absolute
RAM $0017 store in the copy loop at $E895/$E8D0.
New tool _tools/apply_zp_aliases.py does the per-site substitution:
apply_symbols.py only rewrites *numeric* operands, so it cannot rename an
operand that is already written as a neutral ZpXX name. The tool keeps the
ca65 'a:' prefix (dropping it would turn 'sta a:Zp17,y' into a zero-page
store and change the bytes) and rewrites only the operand token, so the
audit comment survives byte for byte.
Naming correction in the promoted sibling. Finishing this dump showed that
$EA was misnamed 'VBlankWaitCounter': the routine at $C412 is the game's
pseudo-random generator (the classic eor/asl/php/lsr/plp/rol scrambler,
called from thirteen gameplay sites, twice in a row at $CDF4/$CDF9 with the
second result masked #$07), so $EA is the scrambler's phase counter.
Renamed PrngPeriodCounter in both dumps and named $EB/$EC PrngSeedB /
PrngState. The sibling's two 'sta a:IndDispatch17,y' operands were also
wrong - they are absolute stores to RAM $0017, not the dispatch pointer -
and are now 'a:Zp17,y', matching the file's 'a:' = absolute convention.
Audit-comment alignment re-done with _tools/align_audit_comments.py (1,040
lines here, 1,080 in the sibling). Both files still match prg.bin at every
stated PRG offset: 5,467 and 5,483 audit comments, 0 mismatches.
Docs: root README.md / TODO.md / AGENTS.md updated - 31 promoted, 5 in
_wip/; per-project detail entries added for both Raid dumps.
Promote Pac-Man (Tengen) (U): Pass 2/3 from scratch, whole-ROM byte-identical
Move _wip/NROM/Pac-Man (Tengen) (U) to NROM/ and switch the build from a
PRG-only compare to a whole-ROM one:
- header.s/chr.s added (one-line .incbin of header.bin / chr.bin)
- linker.cfg gains HEADER ($0000, $0010) and CHR ($0000, $2000)
areas ahead of PRG ($C000, $4000)
- rom.nes symlink to 'Pac-Man (Tengen) (U) [!].nes'
- reconstructed.nes is 24,592 bytes, MD5 d34e7a74d8d2c231b6cc601210e28ad0
- equal to the original ROM; the header/prg/chr splits were checked
against the original before promotion and are byte-exact
Disassembled from scratch. No name, map or file was carried over from the
sibling 'Pac-Man (U)' dump; the map was derived from this dump's own
committed split and the two were only compared afterwards.
Pass 2 (new tool _tools/apply_pass2_map.py):
- all 194 Label_XXXX definitions renamed to semantic routine entries plus
<Routine>_<Role> branch targets; zero Label_ remains
- all 48 raw $XXXX jsr/jmp operands resolved to labels; zero raw $XXXX
call or branch operands remain
- the map is in routinemap.tsv
Pass 3:
- 30 semantic zero-page aliases, each applied only at the sites where its
role is proven (per-site choice in sites.tsv; the addresses that carry
two roles keep the neutral ZpXX name elsewhere). _tools/
derive_zp_aliases.py records how the set was derived, and locals.inc
records the reason for every remaining neutral slot
- 28 data tables named (new tool _tools/name_data_region.py), including
CharacterDataTable ($C66A) and CharacterNameStrings ($C67E), where the
ROM itself names Blinky, Pinky, Inky and Clyde - which is why the four
indexed entities are called ghosts and not 'actors'
- apply_symbols.py reports 0 substitutions pending and 0 residue
- audit-comment alignment re-done with _tools/align_audit_comments.py;
all 2,479 audit comments still match prg.bin at the stated PRG offset
Pass 1 correction - six command handlers recovered (new tool
_tools/recode_region.py). ScriptCommandTable ($EFDD) is read by the traced
instruction at $EFCC, and six of its entries point at $F00A, $F022, $F03A,
$F052, $F062 and $F072 - all of which the tracer had left as data, and two
of which it had mis-split across the 'jmp $EF61' at $F01F and $F04F.
Those 120 bytes are code here, decoded straight from the ROM; the six
handlers tile $F00A-$F081 exactly. The same gap exists in the promoted
'Pac-Man (U)' dump, which has not been corrected - recorded in both READMEs.
Residue (documented, not guessed): the unreached main game logic at
$C45A-$C55F is still .byte data. It is code - the tracer's own decoder
walks it cleanly and the dispatch table at $C511 points into it - but
nothing reaches it, so it cannot be entered without a guess. The same gap
exists in the promoted 'Pac-Man (U)' dump. Re-deriving it is a Pass 1 job;
a Mesen Code Data Logger capture is the tool the repo uses for it.
Docs: root README.md / TODO.md / AGENTS.md updated - 32 promoted, 4 in
_wip/; a per-project detail entry added for the Tengen dump.
Promote Pyramid (U): Pass 1 corrected, Pass 2/3 complete, whole-ROM byte-identical
Move _wip/NROM/Pyramid (U) to NROM/ and switch the build from a PRG-only
compare to a whole-ROM one:
- header.s/chr.s added (one-line .incbin of header.bin / chr.bin)
- linker.cfg gains HEADER ($0000, $0010) and CHR ($0000, $2000)
areas ahead of PRG ($C000, $4000)
- rom.nes symlink to 'Pyramid (U) (Sachen).nes'
- reconstructed.nes is 24,592 bytes, MD5 aa285ff17f25dd05da5996b7466c59e2
- equal to the original ROM; the header/prg/chr splits were checked
against the original before promotion and are byte-exact
Pass 1 correction - the committed split was a strict subset of the correct
one. This game dispatches through 'jmp' trampoline tables that live
*inside* the data regions, and the tracer cannot follow a jmp there, so
828 bytes of code were still marked as data. Four such tables were found
($C01E 3 entries, $C02A 6, $C042 2, $C054 5) plus ten more entries at
$C000-$C01B; all sixteen targets decode as valid instructions. Seeding
them, the $C800 boot mainline and six further code starts recovers the
whole lot, plus a five-byte stub at $DF89 (lda $33 / jmp $DECB) that sat
in a hole between two routines. The re-trace loses NO committed code byte
and takes the split from 34.5% to 39.6% (3,130 instructions / 6,493 code
bytes). 'make regen' reproduces it, so the split stays verifiable.
Pass 2 - a fresh map derived from this dump's own committed split:
- 428 Label_XXXX definitions renamed; zero Label_ residue
- 320 raw $XXXX jsr/jmp operands resolved; zero raw $XXXX branch
operands remain
- 431 routine entries and the 32 data blocks named from the code
- the internal branch-target names are derived mechanically from the
branch that reaches them by the new _tools/derive_branch_names.py
(beq -> OnZero, bne -> OnNonzero, bcc/bcs -> the carry cases, a
backwards branch -> Loop)
- recorded in routinemap.tsv
Pass 3:
- 24 semantic zero-page aliases, each applied only where its role is
proven; the 57 slots that stay neutral are each listed with the reason
in locals.inc (the neutral set lives in zp_aliases.inc so that
'make regen' can rebuild locals.inc from prg.bin)
- 32 data tables named - TaskVectorTable1/2, LevelScriptData,
MusicPeriodTable, SoundEnvelopeTable, the actor tables - recorded in
data_region_names.tsv
- apply_symbols.py reports 0 substitutions pending and 0 residue; no
hardware register is left as a raw literal
- the audit comments are now canonical on every line, data included
(the old file carried only 'PRG:$xxxx' on its 1,358 data lines);
all 3,762 audit comments match prg.bin at their stated PRG offset
Kept as-is, not 'cleaned up':
- sta $4100 stays a raw operand. The iNES header claims mapper 0 but
the boot code writes past the NES register space; the ROM does not
explain it, so it is recorded rather than guessed
- the 'A'/'V' check on RAM $0120/$0121 and its seed/clear routines
are named for what they do, not for what they are for
- the ninth entry of the $C3A6 task vector table ($D820) is a junk
slot and stays data
Docs: root README.md / TODO.md / AGENTS.md updated - 33 promoted, 3 in
_wip/; a per-project detail entry added.
Hogan's Alley (JU): Pass 1 correction, Pass 2, Pass 3, promoted to NROM/
The light-gun game whose engine dispatches through *inline* tables:
`IndirectCall` at $C34D pops the return address of the `jsr` that called
it and reads a 16-bit handler pointer from the word that follows, so all
six handler tables ($C124 19 entries, $C219 4, $C89C 14, $CDD1 1, $D234 2,
$D3D6 14) live inside the code stream and the static tracer cannot follow
them.
Pass 1 correction. The committed split was a strict subset of the correct
one -- 41.8% of the PRG was classified as code. A fresh Mesen Code Data
Logger capture was merged with the four captures already in the folder
(hogans_merged.cdl, the OR of five per-byte flag arrays, 6,544 code bytes)
and _tools/cdl_reclass.py rewrote the split to match what the CPU actually
fetched: 1,216 bytes moved from data to code, five the other way, 59 labels
emitted. The split is now 49.1% code (3,950 instructions, 8,041 bytes).
The four branch targets the reclassifier could not prove were turned into
labels by the new _tools/resolve_raw_branches.py.
Pass 2. 206 routine entries hand-named from this dump's own code and 413
internal branch targets derived mechanically by _tools/derive_branch_names.py:
630 Label_XXXX definitions gone, 484 raw $XXXX call operands resolved, 15
call targets the tracer had never labelled given a label. Recorded in
routinemap.tsv. No SubC<addr> residue was needed -- every entry the engine
reaches is named after what it does.
Pass 3. 60 semantic zero-page aliases, each applied only where its role is
proven (zp_aliases.inc, zp_alias_sites.tsv); the slots that stay neutral are
each listed with the reason. All 34 data blocks named
(data_region_names.tsv). apply_symbols.py reports 1 residue: `sta a:$00B4,y`
at $C203, the same address as Zp40/ActorPalette but forced to absolute
addressing, so it must stay numeric.
Promotion. header.s, chr.s and a HEADER/PRG/CHR linker.cfg added, rom.nes
symlinked to the original ROM; the whole-ROM cmp passes on the first
promoted build. There is deliberately no `make regen` target: the Pass 1
split here is the static trace corrected by a CDL capture, and the base the
correction was applied to is not what the current _tools/nesdis.py
produces, so prg.s is the maintained source of truth.
Tools changed:
nesdis.py --split/--note/--provenance options, so a data
region can carry its own name and explanation;
a forced-data address is no longer reported as a
recovered routine entry
apply_pass2_map.py can create the label for a call target the tracer
left unlabelled; no longer double-labels it
apply_zp_aliases.py --at-file, an address-based per-site list
derive_branch_names.py keeps the map's own header instead of writing a
fixed one
resolve_raw_branches.py new: turns `bXX *+$NN` operands into labels
build_hogans_map.py new: the hand-written Pass 2 map builder
The existing regen pipelines (MUSCLE (U), Urban Champion (JU)) still
reproduce prg.s byte for byte.
Apply the symbols.inc register names at Pass 1; fix a dropped byte in cdl_reclass
nesdis.py now names the hardware registers as it renders the operands, so a
project's Pass 1 output already reads `lda PPUSTATUS` instead of `lda $2002`
and the Pass 3 apply_symbols.py step has nothing left to do for them.
* nesdis.py --symbols FILE reads a symbols.inc-style file and substitutes
the register names. Only unambiguous entries in the $2000-$4017 window
are used: $4017 is both JOY2 and APUFRAMECOUNTER, so it stays numeric
and apply_symbols.py reports it as multi-alias residue, exactly as
before. The default is the symbols.inc next to --out, so a new project
gets the names without asking; --no-symbols opts out.
* The renderer records the operand's numeric value on the Insn, because
operand_value() used to re-parse the operand text and could no longer
read a name.
* The controller bit masks in symbols.inc (PAD_A and friends) are
constants, not addresses, and are still never substituted.
MUSCLE (U) and Urban Champion (JU) keep --no-symbols: their committed
prg.s was produced with the registers named by the Pass 3 apply_symbols.py
step, and the columns in those files reflect the in-place substitution.
Adding the missing apply_symbols.py step to both regen pipelines makes
them reproduce their committed prg.s byte for byte again - neither did
before this change (MUSCLE was 440 lines out, Urban Champion 772).
cdl_reclass.py had a bug that cost a byte: a region whose last source row
straddled the region's end was replaced by a regeneration of the region
only, so the tail of that row was dropped. Mario Bros (JU) hit it at
$C595, where the rebuild came out one byte short and every label after it
shifted. A region now covers the whole rows it replaces.
pass2.py reflow takes an optional column argument; the default is
unchanged (the ';' lands on the same column as before).
Mario Bros (JU): Pass 1 correction, Pass 2, Pass 3, promoted to NROM/
A two-player platformer whose handler tables are *inline*: the pointers sit
in the middle of the code stream, right after the `jsr` that reads them, so
the static tracer could never follow them.
Pass 1 correction. The committed split was a strict subset of the correct
one -- only 72.0% of the PRG was classified as code. A Mesen Code Data
Logger capture of this ROM (mario_mesen.cdl, 10,915 code bytes) showed
1,010 bytes the tracer had left as data were code; two branch targets the
capture never reached ($E4CB and $E639) were forced with --override for 57
more, so 1,067 bytes moved from data to code and 22 moved the other way.
The split is now 78.4% code (6,210 instructions, 12,847 bytes). The three
branch targets the reclassifier could not prove were turned into labels by
_resolve_raw_branches.py, which now refuses to put a label on a `.byte` row.
Pass 2. 206 routine entries and 519 internal branch targets: 931
Label_XXXX definitions gone, 51 raw $XXXX call operands resolved and 12 call
targets the tracer had never labelled given a label. Zero SubC residue --
the 185 entries a previous session had left as address-derived residue were
all named from this dump's own code. Recorded in routinemap.tsv.
Pass 3. 25 semantic zero-page aliases, each applied only where its role is
proven (zp_aliases.inc); the slots that stay neutral are each listed with the
reason. 35 data tables named -- GameStateHandlerTable, EnemyBehaviourTable,
EnemyScriptTable, EnemyTypePointerTable, SoundRoutineTable,
NoteFrequencyTable and the rest -- and recorded in
data_region_names.tsv. apply_symbols.py reports 0 residue.
Promotion. header.s, chr.s and a HEADER/PRG/CHR linker.cfg added, rom.nes
symlinked to the original ROM; the whole-ROM cmp passes on the first
promoted build. There is deliberately no `make regen` target: the Pass 1
split here is the static trace corrected by a CDL capture, and the base the
correction was applied to is not what the current _tools/nesdis.py
produces, so prg.s is the maintained source of truth.
Tools:
apply_pass2_map.py renames a label of any spelling -- SubC<addr> is
the honest residue form -- and its references
follow it; one combined pattern, so a 16,000-line
file does not need a substitution per label
resolve_raw_branches.py refuses to label a data row
build_mario_map.py new: the hand-written Pass 2 map builder
Remove the old _wip/NROM/Mario Bros (JU) folder (promoted to NROM/)
Mario Bros (JU): add the promoted-tier header, CHR, rom.nes symlink and zero-page aliases
Moves _ROMS/<ROM> into _wip/<MAPPER>/<ROM>
Sync the docs and the skeleton tool with the 857-project _wip tier
The _wip/ tier now holds 857 projects across 30 mapper folders, all
building byte-identical for the whole ROM. README.md, TODO.md and
AGENTS.md still described the old 39-project tier, so bring them in line
with WIP.md, which carries the tier's index.
The tier is no longer 39 projects of NROM-256 with a 16/32 KB PRG:
only two projects have a 16 KB PRG, 151 have 32 KB, 523 have 128 KB and
one has 1.5 MB, so most of it is a banked mapper whose image does not fit
the 6502's address space. Those projects link their MEMORY areas at .nes
file offsets rather than CPU addresses, which is the only option and the
honest model; the 39 older projects keep the CPU-address layout because
their PRG really is one contiguous window.
make_skeleton.py gains the two layouts (--layout flat|cpu), the board
name for the mapper, and a fix for find_rom() mistaking the build
output reconstructed.nes for the source ROM.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
75 KiB
Disassembly Project 1
This is a set of disassembled NES roms using AI to translate.
This is not for distribution. This is not for you.
Layout changed 2026-10-20: projects moved into mapper directories (
NROM/,AOROM/,CNROM/,MMC1/,MMC3/,MMC5/,UNROM/), project folders were flattened (the oldcopilot/subfolder is gone — everything sits directly in the project folder), every project'sOVERVIEW.mdbecame itsREADME.md, and a rootMakefilenow builds and verifies all projects at once (make,make clean,make <MAPPER>); the git pre-commit hook drives it. Older docs, commit messages and paths in this file's per-project notes may still reference the previous layout — mentally strip thecopilot/prefix.
Disassembly Project Index — /home/tmerritt/Projects/disasm/
This document provides a consolidated overview of the promoted NES disassembly projects in the repository. Projects are organized by mapper into a folder per project under NROM/, AOROM/, CNROM/, MMC1/, MMC3/, MMC5/ or UNROM/ — everything here so far is mapper 0, so all promoted projects live in NROM/. The pre-promotion tier mirrors the structure under _wip/<MAPPER>/<Project>/ and is documented separately in WIP.md (857 projects across 30 mapper folders). Each project folder is flat: the source (prg.s, plus header.s/chr.s where present), the build config (linker.cfg, symbols.inc, locals.inc, Makefile) and the ROM splits all sit directly in the folder. Each project carries its own README.md (the file was called OVERVIEW.md before 2026-10-20) with a detailed power-on execution flow analysis.
Project Inventory
Mirroring is the iNES arrangement value taken from header byte 6, bit 0 (0 = Horizontal, 1 = Vertical), the convention AGENTS.md fixes. Several per-project README files (then named OVERVIEW.md) previously carried the opposite mirroring-direction wording; all were normalized to this column on 2026-10-19.
| # | Project | Region/Version | PRG Size | CHR Size | Mirroring | Build Status | Vectors (NMI / RESET / IRQ) |
|---|---|---|---|---|---|---|---|
| 1 | Balloon Fight (JU) | Japan | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL (Pass complete) | $C094 / $C000 / $C0F7 |
| 2 | Baseball (UE) | USA/Europe | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL (Pass complete) | $C046 / $C40B / $C43E |
| 3 | Bomberman (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $C01A / $C000 / $FFF9 |
| 4 | Burger Time (U) | USA | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL (Pass complete) | $FF7F / $FD24 / $FD24 |
| 5 | Clu Clu Land (JU) | Japan | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL (Pass complete) | $C1F1 / $C196 / $C196 |
| 6 | Defender 2 (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $CAA1 / $C983 / $CA9E |
| 7 | Excitebike (JU) | Japan | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $C23B / $C184 / $FFF0 |
| 8 | Tennis (JU) | Japan | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $C07D / $C000 / $C000 |
| 9 | Pac-Man (USA) (Namco) | — | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL (Pass complete) | $C10E / $C033 / $C17E |
| 10 | Donkey Kong 3 (JUE) | Japan / USA / Europe | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $C08D / $C000 / $C000 |
| 11 | Donkey Kong Jr. (JU) | Japan | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $C6E6 / $C66E / $FFF0 |
| 12 | CIRCUS | — | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $C05A / $C000 / $4CB7 |
| 13 | Wild Gunman (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass 3 complete, 49.3% code) | $C086 / $C000 / $C000 |
| 14 | Joypad Test Cartridge (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass 3 complete) | $CCF7 / $C000 / $C000 |
| 15 | NES PowerPad Test Card (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $E06E / $E000 / $E000 |
| 16 | MUSCLE (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $86CB / $8000 / $8764 |
| 17 | Lunar Pool (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass 2 complete, Pass 3 tables named) | $FF65 / $E80C / $FF64 |
| 18 | Donkey Kong (JU) | Japan | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL (Pass 2/3 complete, 76.3% code) | $C85F / $C79E / $FFF0 |
| 19 | Donkey Kong Jr. Math (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass 3 complete) | $C4A9 / $C41E / $FFF0 |
| 20 | Duck Hunt (JUE) | Japan / USA / Europe | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass 3 complete) | $C086 / $C000 / $C000 |
| 21 | Ice Climber (JE) | — | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL (Pass 3 complete) | $C076 / $C014 / $FFF0 |
| 22 | Ice Climber (U) | USA | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL (Pass 3 complete) | $C076 / $C014 / $FFF0 |
| 23 | Lode Runner (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass 2/3 complete) | $C02C / $C000 / $FFF9 |
| 24 | Pinball (JU) | Japan | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL (Pass 2/3 complete) | $C1ED / $C000 / $C1ED |
| 25 | Millipede (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass 2/3 complete, 74.6% code) | $C7F1 / $C735 / $FFF0 |
| 26 | Popeye (JU) (PRG 0) | — | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass 2/3 complete, 72.3% code) | $C701 / $C649 / $FFF0 |
| 27 | Popeye (JU) (PRG 1) | — | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL (Pass 2/3 complete, 72.3% code; promoted from _wip 2026-10-20) |
$C701 / $C649 / $FFF0 |
| 28 | Golf (JU) |
Japan | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass 1+ substantial; whole-ROM compare added 2026-10-20) | $C0A6 / $C000 / $C0C4 |
| 29 | Hogan's Alley (JU) | Japan | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass 2 complete, Pass 3 partial, 49.1% code; promoted 2026-10-20) | $C088 / $C000 / $C000 |
| 30 | Mario Bros (JU) | Japan | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass 2 complete, Pass 3 partial, 78.4% code; promoted 2026-10-20) | $C07D / $C000 / $C000 |
| 31 | Pac-Man (Tengen) (U) |
USA | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL (Pass 2 complete, Pass 3 partial, 20.0% code; promoted 2026-10-20) | $C0FA / $C033 / $C16A |
| 32 | Pac-Man (U) |
USA | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL (Pass 2 complete, Pass 3 partial, 19.6% code; promoted 2026-10-20) | $C0FA / $FF00 / $C16A |
| 33 | Pyramid (U) (Sachen) |
— | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass 2 complete, Pass 3 partial, 39.6% code; promoted 2026-10-20) | $D72E / $FF00 / $FF00 |
| 34 | Raid on Bungeling Bay (U) |
USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass 2/3 partial, 64.6% code; promoted 2026-10-20) | $C04C / $C000 / $C2C0 |
| 35 | Raid on Bungeling Bay (U) [a2] |
— | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL (Pass 2 complete, Pass 3 partial, 64.3% code; promoted 2026-10-20) | $C04C / $C000 / $C2C0 |
| 36 | Urban Champion (JU) | Japan | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass 3 complete, 33.9% code) | $CA91 / $CA00 / $CA00 |
All 36 are mapper 0 / 16 KB PRG / 8 KB CHR, no trainer.
Rows 1-27, row 29 (Hogan's Alley (JU), promoted 2026-10-20), row 30
(Mario Bros (JU), promoted 2026-10-20), row 31
(Pac-Man (Tengen) (U), promoted 2026-10-20), row 32
(Pac-Man (U), promoted 2026-10-20), row 33 (Pyramid (U), promoted
2026-10-20), row 34 (Raid on Bungeling Bay (U), promoted 2026-10-20), row 35
(Raid on Bungeling Bay (U) [a2], promoted 2026-10-20) and row 36 are
promoted. Row 28 (Golf (JU)) is still in _wip/ but now also verifies
BYTE-IDENTICAL: its whole-ROM compare was added 2026-10-20, so the header
and CHR are proven for it too. All 36 rows in this table are therefore
BYTE-IDENTICAL — make compares the whole reconstructed ROM against
rom.nes in the project folder.
(Urban Champion, row 36, kept its tail number so the tier split is no longer a
single contiguous range.)
Still true after the 2026-10-20 reorganization. The mapper reorganization moved
Donkey Kong Jr. Math (U)(row 19) into_wip/NROM/— it was fixed the same day (its fourjsr $F218call sites had been labelledSubCF218_Block= $F1DC; repointed to the true entrySubCF218) and promoted back intoNROM/. Popeye (JU) (PRG 1) was promoted from_wip/NROM/the same day (row 27) — its whole-ROM compare passes on the first build.Excitebike (JU)(row 7) — the repo's one open block after being returned toNROM/with a broken mid-repair build (duplicate symbol) — was finished the same day: the byte-596 mismatch ($0Aoperands where the ROM uses$11, now aliasedNmiMaskShadow) is fixed, the 4,401 damaged audit comments were re-anchored via_tools/repair_audit_comments.py, and 58 rawjsr/jmp $XXXXoperands were substituted with labels/equates. All 35 projects underNROM/now verify byte-identical.
How to read this table. The vectors are the three little-endian words at the end of the
16 KB PRG ($FFFA-$FFFF in the $C000 mirror) — not fields in the iNES header, whose bytes
0-9 carry only sizes, mirroring and mapper. Regenerate the whole column with:
python3 - <<'EOF'
import os
MAPPERS = ('NROM', 'AOROM', 'CNROM', 'MMC1', 'MMC3', 'MMC5', 'UNROM')
for base in MAPPERS:
if not os.path.isdir(base):
continue
for p in sorted(d for d in os.listdir(base) if os.path.isdir(os.path.join(base, d))):
rom = open(f"{base}/{p}/rom.nes", 'rb').read()
prg = rom[16:16 + rom[4]*16384]; vo = len(prg) - 6
v = [prg[vo+i] | (prg[vo+i+1] << 8) for i in (0, 2, 4)]
print(f"{p:30s} {'Vertical' if rom[6] & 1 else 'Horizontal':10s} "
+ " / ".join("$%04X" % x for x in v))
EOF
Five rows were wrong before this pass, all from copy-paste duplication of a neighbouring row's vectors, and are corrected above:
| Project | Was | Actually |
|---|---|---|
| Burger Time (U) | $C046 / $C40B / $C43E (Baseball's) |
$FF7F / $FD24 / $FD24 |
| Clu Clu Land (JU) | $C1F1 / $C000 / $FFF9 |
$C1F1 / $C196 / $C196 |
| Excitebike (JU) | $C1F1 / $FD24 / $FD24 |
$C23B / $C184 / $FFF0 |
| Pac-Man (USA) (Namco) | $C10E / $C000 / $C17E |
$C10E / $C033 / $C17E |
| Donkey Kong 3 (JUE) | $C07D / $C000 / $C000 |
$C08D / $C000 / $C000 |
Donkey Kong Jr.'s mirroring was also wrong (Horizontal, actually Vertical). Odd vector targets
are not mistakes: Burger Time's $FF7F NMI and CIRCUS's $4CB7 IRQ point into unused/data space,
which is common in this set — see "Notes" under Per-Project Details.
Region/Version comes from the folder-name suffix (JU/U/UE/JUE); these mapper-0 headers do not
encode region, so CIRCUS — whose folder carries no suffix — is left as — rather than guessed.
Per-Project Details
1. Balloon Fight (JU)
- Folder:
NROM/Balloon Fight (JU)/ - ROM:
balloon.nes(24,592 bytes) - Source:
prg.s(8,543 lines) - Linker: PRG at $C000, 16 KB; single segment
- Vectors: NMI → $C094 (
NmiHandler), RESET → $C000 (Reset), IRQ → $C0F7 (IrqHandler, self-loop) - Key subsystems: NMI-driven frame loop with PPU command buffer, round spawner ($C790), bonus objects ($CB74), carrier/rescue sequence ($C6F9), particle system ($CDAA), sound driver ($FFF7 banked)
- Build fix: None needed; byte-identical out of the box. Pass 1 verified complete 2026-10-16 — 5,303 instructions / 11,260 code bytes (68.7%), which is more than the complete-opcode static tracer finds (5,277 / 11,202); the 166 tracer-only bytes are genuine data (command scripts at $D437/$D45A, the $C3B5 pointer table, the arithmetic table at $FBCA), not missed code. The last two
.incbinspans were converted to explicit classified bytes (TrailingFillBeforeApuTablesat $F4C5,SoundEngineTailBytesat $F5FC), so no ROM byte is hidden - Pass 3 symbols (2026-10-19): every operand
symbols.inc/locals.incdefines is now named inprg.s— 125 hardware-register operands and 797 of 813 zero-page/RAM operands. The 15 multi-alias addresses were resolved per routine (--sitesin_tools/apply_symbols.py). 16 operands are left numeric:$13used as a plain high-byte scratch besideTemp12, where none of its three aliases fits. Rebuild stays byte-identical. - Details:
Balloon Fight (JU)/README.md
2. Baseball (UE)
- Folder:
NROM/Baseball (UE)/ - ROM:
baseball.nes(24,592 bytes) - Source:
prg.s(21,624 lines — largest source) - Linker: PRG at $C000, 16 KB; single segment
- Vectors: NMI → $C046 (
NMI), RESET → $C40B (Reset), IRQ → $C43E (IRQ,rti) - Key subsystems: Queued event system ($EB66–$EB9C) as the main frame driver, round/state machine ($C5FE), batting/pitching ($C6044–$C6414), object sorting ($C339), sound driver ($F9D0–$FE2x)
- Build fix: None needed; byte-identical out of the box
- Pass 3 symbols (2026-10-19): 121 operands substituted (85 single-name + 36 hardware) from
symbols.inc/locals.incvia_tools/apply_symbols.py— zero residue. Rebuild stays byte-identical. - Details:
Baseball (UE)/README.md
3. Bomberman (U)
- Folder:
NROM/Bomberman (U)/ - ROM:
bomberman.nes(24,592 bytes) - Source:
prg.s(7,553 lines),header.s,chr.s - Linker: HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB)
- Vectors: NMI → $C01A (
NmiHandler), RESET → $C000 (Reset), IRQ → $FFF9 (IrqHandler,rti) - Key subsystems: NMI-driven PPU command queue and VRAM transfers, main loop at $C368 with state dispatch table ($C75D), bomb/object slots (80 slots at $03E6), sound driver ($E642–$FE2x) with dispatch table ($E6AD)
- Build fix: One-byte mismatch at CPU $E71B (
dec $E4vsdec $54) — resolved by addingRandomStateAlt = $E4tolocals.incalongsideRandomState0 = $54(zero-page reuse); also renamedControllerState→ControllerState1,Main_HandleControl_C368→MainGameLoop,Gameplay_HandleControl_C79D→GameplayUpdate,Sound_HandleControl_E65F→SoundUpdate - Pass 3: Applied 354 single-name + 8 site-resolved multi-alias operands from
locals.inc; 24 in-file table labels fromreconstructed.lbl; 0 hardware substitutions needed. Residue: 758 unnamed operands (179 distinct addresses). - Details:
Bomberman (U)/README.md
4. Burger Time (U)
- Folder:
NROM/Burger Time (U)/ - ROM:
Burger Time (U) [!].nes(24,592 bytes) - Source:
prg.s(9,323 lines),header.s,chr.s - Linker: HEADER, PRG at $C000 (0x3FFA), VECTORS at $FFFA, CHR
- Vectors: NMI → $FF7F (points into the vector page itself — not a real handler; NMI is effectively unused), RESET → $FD24 (
ResetHandler,seiprologue), IRQ → $FD24 (reuses Reset) - Key subsystems: Event-driven main loop via
CommonEngineExit($EB6A) and queued events ($EB9D), title screen / round state machine ($C5FE), object arrays ($03E6 state, $0436/$0486 position), audio engine ($F9D0–$FE2x) with music sequencer ($FD34) - Build fix: None needed; byte-identical. Requires symlink
burger_time.nes → "../Burger Time (U) [!].nes"due to spaces in ROM filename - Details:
Burger Time (U)/README.md
5. Clu Clu Land (JU)
- Folder:
NROM/Clu Clu Land (JU)/ - ROM:
rom.nes(24,592 bytes) - Source:
prg.s(9,151 lines) - Linker: PRG at $C000, 16 KB; single segment (no separate HEADER/CHR segments in cfg, but CHR data is embedded inline at end of prg.s)
- Vectors: NMI → $C1F1 (
NMIHandler), RESET → $C196 (ResetEntry, shared with the IRQ handler), IRQ → $C196 (IrqHandler, reuses Reset) - Key subsystems: State-machine main loop via dispatch table at $C000–$C00D, NMI-driven PPU command queue + VRAM transfers, object pools ($03E6 state, $0436/$0486 position), sound driver ($E642–$F7C0) with dispatch table ($E6AD)
- Build fix: One
bplbranch to undefined label at CPU $FAB4 — replaced withbne *-$1Bto produce originald0 e3bytes (disassembler mislabeledbneasbpl) - Details:
Clu Clu Land (JU)/README.md
6. Defender 2 (U)
- Folder:
NROM/Defender 2 (U)/ - ROM:
Defender 2 (U).nes(24,592 bytes) - Source:
prg.s(11,905 lines) - Linker: HEADER at $0000 (16 bytes), PRG at $C000 (0x3FFA), VECTORS at $FFFA, CHR at $0000
- Vectors: NMI → $CAA1 (
NmiHandler), RESET → $C983 (ResetHandler), IRQ → $CA9E (IrqHandler, reuses Reset) - Key subsystems: Event-driven main loop (
UpdateSideScrollingGameplay_CA6Aat $CA6A) waiting on NMI flag, side-scrolling gameplay ($C073–$C324 family), PPU streaming ($F20B–$F7C0), audio engine ($E642–$F7C0) with dispatch table ($E6AD) - Build fix: Same
bpl→bne *-$1Bfix at CPU $E811 as Clu Clu Land (disassembler mislabeledbneasbpl) - Details:
Defender 2 (U)/README.md
7. Excitebike (JU)
- Folder:
NROM/Excitebike (JU)/ - ROM:
rom.nes(24,592 bytes) - Source:
prg.s(13,992 lines) - Linker: PRG at $C000, 16 KB; single segment
- Vectors: NMI → $C23B (
NMI), RESET → $C184 (Reset), IRQ → $FFF0 (points into audio data region — likely placeholder/unused) - Key subsystems: NMI-driven state machine with dispatch table at $C000–$C00D (14 states), title/menu system ($C346–$C454), gameplay update chain ($C99A), race update ($C8D6), audio engine ($F8DE) with 4 channels + SFX, serial I/O over controller port $4016
- Build fix: Same
bpl→bne *-$1Bfix at CPU $FAB4 (same pattern as Clu Clu Land/Defender 2). On 2026-10-20 the last whole-ROM mismatch (byte 596) was fixed — two NMI operands the ROM spends on$11, a second PPU-mask shadow, were emitted withPpuMaskShadow($0A);$11is now aliasedNmiMaskShadowinlocals.inc. The same day the audit trail was re-anchored from the ca65 listing via_tools/repair_audit_comments.py(6,339 shifted comments + 4,401 doubled-??forms) and all 58 rawjsr/jmp $XXXXoperands were substituted with routine labels/locals.incsub-entry equates. - Details:
Excitebike (JU)/README.md
8. Tennis (JU)
- Folder:
NROM/Tennis (JU)/ - ROM:
Tennis (JU).nes(24,592 bytes) - Source:
prg.s(9,268 lines) - Linker: PRG at $C000, 16 KB; single segment
- Vectors: NMI → $C07D (
NmiHandler), RESET → $C000 (Reset), IRQ → $C000 (Resetreused) - Key subsystems: NMI-synchronized main loop (
MainLoopat $C04F), game state machine viaMainStateHandlerTable($C101, 12 states), game mode state machine viaGameModeStateTable($CAD7, 8 states), object/sprite system with fixed-point physics, audio engine ($F8DE) with serial I/O over controller port - Build fix: None needed; byte-identical out of the box
- Pass 3 symbols (2026-10-19): 18 single-name operands substituted from
locals.incvia_tools/apply_symbols.py— zero residue. Rebuild stays byte-identical. - Details:
Tennis (JU)/README.md
9. Pac-Man (USA) (Namco)
- Folder:
NROM/Pac-Man (USA) (Namco)/ - ROM:
rom.nes(24,592 bytes) - Source:
prg.s(9,268 lines) - Linker: PRG at $C000, 16 KB; single segment
- Vectors: NMI → $C10E (
NmiHandler), RESET → $C033 (Reset;locals.incdefinesResetOffset = $C033), IRQ → $C17E (IrqHandler) - Key subsystems: NMI-synchronized main loop (
MainLoopat $C04F), game state machine viaMainStateHandlerTable($C101, 12 states), game mode state machine viaGameModeStateTable($CAD7, 8 states), object/sprite system with fixed-point physics, audio engine ($F8DE) with serial I/O over controller port - Build fix: None needed; byte-identical out of the box
- Pass 3 symbols (2026-10-19): 524 single-name operands substituted from
locals.incvia_tools/apply_symbols.py— 727 multi-alias residues left numeric (addresses with 2+ aliases, e.g.$00=workPtr0/Zp00). Rebuild stays byte-identical. - Details:
Pac-Man (USA) (Namco)/README.md
10. Donkey Kong 3 (JUE)
- Folder:
NROM/Donkey Kong 3 (JUE)/ - ROM:
Donkey Kong 3 (JUE).nes(24,592 bytes) - Source:
prg.s(9,952 lines) - Linker: HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB)
- Vectors: NMI → $C08D (
NmiHandler; theprg.sheader block records it as "Pass 2 control-flow entry at CPU $C08D"), RESET → $C000 (Reset), IRQ → $C000 (Resetreused) - Key subsystems: Main loop with object/game state management at $C02E–$C18D, object movement and geometry calculations ($C28E–$C683), audio engine ($F8DE+) with sound channels ($F0–$FF), PPU command buffer streaming ($C3F4+)
- Build fix: Build split
main.sintoheader.s,prg.s,chr.s; addedRandomStateAlt = $E4fordec $E4at CPU $E71B (zero-page reuse withRandomState0 = $54). 2026-10-16 — one-byte branch-target bug fixed: the project was recorded as BYTE-IDENTICAL but had never built byte-identical. Thebneat CPU $C14C (PRG $014C) was annotatedD0 12(target $C160) but assembled asD0 0D, because it was labelledStoreSelectedPlayerAndScreenFlags($C15B) instead of the routine actually at $C160. Retargeted toClearAudioSetGameMode— which is also the semantically correct target for a "mode != $01" test.cmpnow passes. - Details:
Donkey Kong 3 (JUE)/README.md
11. Donkey Kong Jr. (JU)
- Folder:
NROM/Donkey Kong Jr. (JU)/ - ROM:
Donkey Kong Jr. (JU).nes(24,592 bytes) - Source:
prg.s(12,807 lines; 6,135 instructions, 266 routines, 68 data labels, 0 conflicts) - Linker: HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB)
- Vectors: NMI → $C6E6 (
NmiHandler), RESET → $C66E (ResetHandler), IRQ → $FFF0 (stray byte, effectively unused) - Key subsystems: Reset idles in a PRNG-advance loop — the entire frame state machine (title/attract/gameplay/sound) runs inside the NMI handler; VRAM/event queue at $0300 with dispatch table at $BFFE; 8-byte PRNG at $18–$1F; sound timers at $F1AF
- Build fix: None needed; byte-identical out of the box (
makein the project folder). Pass 1 verified complete 2026-10-16 — a full byte-accounting audit ofprg.sconfirms all 16,384 PRG bytes are emitted exactly once (6,199 instructions + 3,889.byte+ 16.word), every emitted value equals the ROM byte, and there are zero audit-comment mismatches or duplicate addresses. No.incbinremains. A complete-opcode static tracer independently reaches 6,135 instructions / 12,358 code bytes (75.4%) — every one of which is already present in the file, and the file carries 121 further code bytes the tracer does not find (reached via theDeferredTaskHandlerTabledispatch at $BFFE). Pass 2/3 naming is complete; Pass 3 tables are named (DeferredTaskHandlerTable,HudDigitDescriptorTable, …) - Details:
Donkey Kong Jr. (JU)/README.md
12. CIRCUS
- Folder:
NROM/CIRCUS/ - ROM:
rom.nes(24,592 bytes) - Source:
prg.s(~12,755 lines) - Linker: HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB)
- Vectors: NMI → $C05A (
NmiHandler), RESET → $C000 (Reset), IRQ → $4CB7 (outside mapped space — effectively unused) - Key subsystems: NMI-driven frame state machine — main loop is a spin loop at $C057, all per-frame work runs in NMI; main state dispatcher at $C0D0 with 16-state pointer table; controller input with edge flags at $09; menu system with text table at $C763 ("CONTINUE", "STAGE", "SELECT", "PLAY"); palette/screen transfer via descriptor streams; VRAM queue processing; variant object state machine at $DC3F–$FE7B; audio engine with sequence data at $FABB–$FFFB
- Build fix: None needed; byte-identical out of the box (
makein the project folder). Pass 1/2/3 complete — full code/data classification, semantic routine naming, and data table naming all done - Pass 3 symbols (2026-10-19): 118 operands substituted (38 single-name + 80 hardware) from
symbols.inc/locals.incvia_tools/apply_symbols.py— 23 multi-alias residues left numeric (addresses with 2 aliases:$E4=Controller1Shift/ZpE4,$7C=WorkPointer0Lo/Zp7C,$7E=WorkPointer1Lo/Zp7E). Rebuild stays byte-identical. - Details:
CIRCUS/README.md
13. Wild Gunman (U)
- Folder:
NROM/Wild Gunman (U)/ - ROM:
rom.nes(24,592 bytes) - Source:
prg.s(~3,000 lines with routine headers) - Linker: HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB)
- Vectors: NMI → $C086 (
NmiHandler), RESET → $C000 (Reset), IRQ → $C000 (reusesReset) - Key subsystems: NMI-driven frame loop — main loop is a spin loop waiting on NMI phase flag ($20); NMI handler does OAM DMA ($4014), PPU updates, and calls game logic subroutines ($C29F, $C233, $C3AC, $C265); main state dispatcher at $C0B3 based on
GameMode($30); reset copies sprite/OAM data from $C844 to $05F0; APU enabled via $4015 = $0F - Build fix: None needed; byte-identical out of the box (
makecompares the whole ROM in the project folder:cmp reconstructed.nes rom.nes). Pass 1 redone 2026-10-16 — the original tracer followed only RESET/NMI/IRQ and jsr/jmp/branch targets and knew just the 151 documented opcodes, so it missed Wild Gunman's runtime dispatch (Label_C341'spla-based computed goto puts the jump table inline right after eachjsr $C341) and filed ~4.9 KB of real code as.bytedata. Code coverage went 1,597 instr / 3,352 B (20.5%) → 3,956 instr / 8,085 B (49.3%). Pass 2 complete — all 733 labels carry names (zeroLabel_Cxxxx/SubCxxxxremain), routine headers on every entry point, zero-page aliases inlocals.inc(GameMode=$30,NmiPhase=$20,NmiFlag=$22,Timer2F=$2F, etc.). Pass 3 complete — data tables named:SpriteAttributeTable($C6AC),NoteVolumeTable($F3EF),VolumeEnvelopeTable($F48F),SpritePositionTable($F77C); the OAM sprite block at $C844 is documented in-place as a comment rather than a label - Pass 3 symbols (2026-10-19): 76 operands substituted (11 single-name + 65 hardware) from
symbols.inc/locals.incvia_tools/apply_symbols.py— zero residue. Rebuild stays byte-identical. - Details:
Wild Gunman (U)/README.md
14. Joypad Test Cartridge (U)
- Folder:
NROM/Joypad Test Cartridge (U)/ - ROM:
rom.nes(24,592 bytes) - Source:
prg.s(4,401 lines; 202 routines, all with described headers) - Linker: HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB)
- Vectors: NMI → $CCF7 (
NmiHandler), RESET → $C000 (Reset), IRQ → $C000 (reusesReset) - Key subsystems: NMI-driven frame loop — main loop spins waiting on NMI phase; NMI handler does OAM DMA ($4014), PPU scroll/control latch, and burst VRAM writes from table at $0302;
VramPtrWrite($CD3F) uses a return-address modification trick atRetAddrUpdate($CDC8) for runtime-computed dispatch;VramWrite($CDEE) sets PPU address and writes data to PPUDATA; reset clears RAM, initializes PPU ($2000=$10, $2001=$00), triggers OAM DMA, and enters main loop - Build fix: Byte-identical out of the box, but Pass 1 was badly truncated and has been redone. It claimed 282 instructions / 580 bytes (3.5%); the tracer halted at
$C09EonDCP $3C20($CF), an undocumented opcode used as ordinary code, and filed 3,256 bytes of real code as.byte. Now 1,773 instructions / 3,836 bytes (23.4%), verified against a fresh trace.nesdis.py --undocumentedsupplies the 105 undocumented NMOS opcodes; ca65 V2.19 encodes none of them, so the 4 affected instructions are emitted as explicit.bytewith the disassembly in the comment. Pass 2 then renamed all 202 labels (zeroLabel_Cxxxxleft) and rewrote all 202 routine headersr all labels, semantic naming for key routines, zero-page aliases inlocals.inc(VramPtrLo=$00,PpuCtrlShadow=$EF,FrameCounterLo=$53, etc.) - Pass 3 symbols (2026-10-19): 47 hardware operands substituted from
symbols.incvia_tools/apply_symbols.py— zero residue. Rebuild stays byte-identical. - Details:
Joypad Test Cartridge (U)/README.md
15. NES PowerPad Test Card (U)
- Folder:
NROM/NES PowerPad Test Card (U)/ - ROM:
rom.nes(24,592 bytes) - Source:
prg.s(8,842 lines) - Linker: HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB)
- Vectors: NMI → $E06E (
NmiHandler), RESET → $E000 (Reset), IRQ → $E000 (reusesReset) - Key subsystems: Minimal NMI-driven test cartridge — NMI reads PowerPad via $4016, processes transitions, updates score/lives display; APU at $4015=$0F; 7.2% code coverage
- Build fix: None needed; byte-identical out of the box
- Pass 3 symbols (2026-10-19): 89 hardware operands substituted from
symbols.incvia_tools/apply_symbols.py— zero residue. Rebuild stays byte-identical. - Details:
NES PowerPad Test Card (U)/README.md
16. MUSCLE (U)
- Folder:
NROM/MUSCLE (U)/ - ROM:
M.U.S.C.L.E. (U).nes(24,592 bytes);rom.nesis a relative symlink../M.U.S.C.L.E. (U).nes - Source:
prg.s(Pass 1/2/3 output, with 42 bytecode listings above the.bytedata) - Linker: HEADER at $0000 (16 bytes), PRG at $8000 (16 KB), CHR at $0000 (8 KB) — the one ROM in the set mapped low
- Vectors: NMI → $86CB (
NmiHandler), RESET → $8000 (Reset), IRQ → $8764 (a bareRTIthat doubles as the NMI epilogue). Vectors themselves sit in the $C000 mirror at $FFFA. - Key subsystems: bytecode VM — 40 opcodes at
$C8-$EFhandled through a table at$9237, everything else a literal operand. Gameplay dispatches through three jump tables plus two zero-pagejmp (zp)calls a static descender cannot follow: 38-entry token-program pointer table at$8CEF, 40-entry opcode handler table at$9237, 16-entry handler table at$9F2B, 3-entry per-level VRAM-writer table at$AC35. Compressed-VRAM RLE decoder at$AC82with a 12-byte fill table at$ACBD; division by 20 restored at$82AC; four-channel sound engine with per-channel state in zero page$C4-$EF. - Build fix: the skeleton's
$C000linker assumption was wrong — RESET is$8000, solinker.cfghad to move.Makefiletool paths were../../../_tools/while in_wip/; promotion to top-level required../../_tools/.make regen(pass1→pass2→pass3) reproducesprg.sbyte-for-byte. - Pass 3 symbols (2026-10-19): 220 operands substituted (91 single-name + 129 hardware) from
symbols.inc/locals.incvia_tools/apply_symbols.py— zero residue. Rebuild stays byte-identical. - Details:
MUSCLE (U)/README.md
17. Lunar Pool (U)
- Folder:
NROM/Lunar Pool (U)/(promoted out of_wip/2026-10-18 bygit mv, so the relativerom.nessymlink is live and tool paths are../../_tools/) - ROM:
Lunar Pool (U).nes(24,592 bytes) - Source:
prg.s(5,300 instructions, 67.6% code / 11,077 bytes; 705 labels, zeroLabel_residue, 38 semantic zero-page aliases + 66 neutral, 33 named data tables) - Linker: HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB)
- Vectors: NMI → $FF65 (
NmiHandler), RESET → $E80C (non-$C000 entry), IRQ → $FF64 (barerti, adjacent to NMI) - Key subsystems: NMI-driven frame loop with PPU command queue and VRAM transfers; main loop at $E80C; side-scrolling / pool gameplay; audio engine; print-inline-string helper at $CBDC/$CBC9
- Build fix: Promotion from
_wip/addedheader.s,chr.s, HEADER/PRG/CHRlinker.cfg, and whole-ROMcmp; rebuilt from Mesen CDL capture (10,028 bytes Code). Pass 1/2/3 complete — byte-identical at whole-ROM level. - Pass 3 symbols (2026-10-19): 45 operands substituted (18 single-name + 27 hardware) from
symbols.inc/locals.incvia_tools/apply_symbols.py— zero residue. Rebuild stays byte-identical. - Details:
Lunar Pool (U)/README.md
18. Donkey Kong (JU)
- Folder:
NROM/Donkey Kong (JU)/(promoted out of_wip/2026-10-19 bygit mv, so the relativerom.nes → ../Donkey Kong (JU).nessymlink survived) - ROM:
Donkey Kong (JU).nes(24,592 bytes) - Source:
prg.s(6,014 instructions, 76.3% code / 12,505 bytes; 1,015 labels with zeroLabel_residue, 145 zero-page slots with neutralZpXXnames, 10 named data regions) - Linker: HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB)
- Vectors: NMI → $C85F (
NmiHandler), RESET → $C79E (non-$C000 entry, like DK Jr.), IRQ → $FFF0 (vector-page padding, unused) - Key subsystems: reset enters at $C79E; NMI-driven frame loop; dispatchers at $C807/$C815/$C823/$C831/$C847 load 16-bit pointers from
ObjectPtrTable($C03C) and from$C4A7,x; large level-data pointer block $C044–$C79D; sound engine overMusicDataTable($F55B),APUDataTable($FAE6),SfxDataTable($FE59) - Pass 2 (2026-10-19): all 919
Label_XXXXdefinitions named — 102 new semantic routine names + 217SubC<addr>entry names (honest residue) + 600 derived<Routine>_Block[_n]internal branch targets;jsr/jmpoperands stay numeric (Wild Gunman (U)style). Applied with_tools/pass2.py apply;makestill byte-identical - Build fix: none at PRG level — it was PRG-identical in
_wip/and stayed byte-identical through Pass 3. Promotion addedheader.s,chr.s, a HEADER/PRG/CHRlinker.cfg, therom.nessymlink, and the whole-ROMcmp; no_toolspath change (the Makefile never referenced_tools/) and nomake regentarget. Mirroring was recorded as Vertical in the project README (then named OVERVIEW) but header byte 6 = $00 says Horizontal — corrected at promotion - Pass 3 symbols (2026-10-19): 75 operands substituted (17 single-name + 58 hardware) from
symbols.inc/locals.incvia_tools/apply_symbols.py— zero residue. Rebuild stays byte-identical. - Details:
Donkey Kong (JU)/README.md
31. Pac-Man (Tengen) (U)
- Folder:
NROM/Pac-Man (Tengen) (U)/(promoted out of_wip/NROM/2026-10-20 bygit mv) - ROM:
Pac-Man (Tengen) (U) [!].nes(24,592 bytes), reached through therom.nessymlink - Source:
prg.s(4,595 lines; 1,637 instruction lines covering 3,273 code bytes = 20.0%; 227 labels — 199 routine entries + 28 branch targets — zeroLabel_residue, zero raw$XXXXjsr/jmp/branch operands, 2,479 canonical audit comments, 0 byte mismatches againstprg.bin) - Linker: HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB)
- Vectors: NMI → $C0FA (
NmiHandler), RESET → $C033 (Reset— the boot sequence is inline here; there is no boot code at $FF00 in this build), IRQ → $C16A (IrqHandler) - Key subsystems: NMI frame loop with two controller reads; game-state dispatch through
GameStateDispatchTable($C253); maze graphics (MazeTileGraphics$C2FD,AttributeTableData$C387,BorderPattern$C432); ghost AI with the target search at $C8AA and the four-ghost slots;UpdateMazeTiles($DAB0) rewriting the maze through the four overlay tables; score/attribute VRAM writes; the level-script interpreter at $EE8F dispatching throughScriptCommandTable($EFDD) - Variant: a different build of the same game as row 32 — 56 PRG bytes differ in 8 runs, all of them code-versus-licensee-text (
$C3E3-$C408is 26 spaces here againstLICENSED BY NAMCO AMERICA INCthere;$FF00-$FF16is$FFpadding here against the boot code there), and the RESET vector differs to match. The CHR is identical - Build fix: none at PRG level — it was PRG-identical in
_wip/and stayed byte-identical through Pass 2/3. Promotion addedheader.s,chr.s, a HEADER/PRG/CHRlinker.cfg, therom.nessymlink and the whole-ROMcmp; the first promoted build was byte-identical (MD5d34e7a74…28ad0) - Pass 2 (2026-10-20): a fresh map derived from this dump's own committed split — no name, map or file was carried over from the row-32 dump. All 194
Label_XXXXdefinitions renamed to semantic routine entries plus<Routine>_<Role>branch targets, and all 48 raw$XXXXcall operands resolved. Recorded inroutinemap.tsv - Pass 3 (2026-10-20): 30 semantic zero-page aliases, each applied only at the sites where its role is proven (the per-site choice is in
sites.tsv; the addresses that carry two roles keep the neutralZpXXname elsewhere, andlocals.increcords the reason for every remaining neutral slot). 28 data tables named — includingCharacterDataTable($C66A) andCharacterNameStrings($C67E), where the ROM itself names Blinky, Pinky, Inky and Clyde.apply_symbols.pyreports 0 residue - Pass 1 correction (2026-10-20): six command handlers recovered.
ScriptCommandTable($EFDD) is read by the traced instruction at $EFCC, and six of its entries point at $F00A, $F022, $F03A, $F052, $F062 and $F072 — all of which the tracer had left as data, and two of which it had mis-split across thejmp $EF61at $F01F and $F04F. Those 120 bytes are code here, decoded straight from the ROM. The same gap exists in the promoted row-32 dump, which has not been corrected - Residue: the unreached main game logic at $C45A–$C55F is still
.bytedata. It is code — the tracer's own decoder walks it cleanly and the dispatch table at $C511 points into it — but nothing reaches it, so it cannot be entered without a guess. The same gap exists in the row-32 dump. Re-deriving it is a Pass 1 job; a Mesen Code Data Logger capture is the tool the repo uses (_tools/cdl_reclass.py) - Details:
Pac-Man (Tengen) (U)/README.md
32. Pac-Man (U)
- Folder:
NROM/Pac-Man (U)/(promoted out of_wip/NROM/2026-10-20 bygit mv; tool paths stay../../_tools/) - ROM:
Pac-Man (U) [!].nes(24,592 bytes), reached through therom.nessymlink - Source:
prg.s(4,511 lines; 1,549 audited instruction lines covering 3,058 code bytes, plus 49jsr/jmpcall sites — 19.6% code by the Pass 1 tracer's accounting; zeroLabel_residue, zero raw$XXXXcall operands) - Linker: HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB)
- Vectors: NMI → $C0FA (
NmiHandler), RESET → $FF00 (Reset— real boot code at the vector-page tail, not padding:sei/cld, PPU off, double vblank wait,jmp ColdStartat $C042), IRQ → $C16A (IrqHandler) - Key subsystems: NMI-driven frame loop; game-state dispatch through
GameStateDispatchTable($C253) viajmp (DispatchPtrLo); entity dispatch throughEntityPtrTable($D912) and a second table at $D9B9; palette upload from $0299/$02A9; VRAM write queue at $026B/$0272; audio engine withAudioCommandTable($EFDD) dispatched viajmp (AudioHandlerPtrLo); 15-byte copyright signatureProgrammerSig($C0EB) checked against RAM at $0052 - Build fix: none at PRG level — it was PRG-identical in
_wip/and stayed byte-identical through Pass 2/3. Promotion addedheader.s,chr.s, a HEADER/PRG/CHRlinker.cfg, therom.nessymlink and the whole-ROMcmp; the first promoted build was byte-identical (MD5a69d310f8cae9397fbd39f204672b5c7) - Pass 2 (2026-10-20): fresh map derived from the committed split (not from a drafted map): all 194
Label_XXXXdefinitions renamed to semantic routine entries plus<Routine>_<Role>_<addr>internal branch targets, and all 49jsr/jmpcall sites resolved to labels. Recorded inroutinemap.tsv/derived_names.tsv - Pass 3 symbols (2026-10-20): 119 operands substituted (101 hardware + 11 single-name + 7 multi-alias resolved per site via
sites.tsv) —apply_symbols.pyreports 0 residue. The 7 site resolutions are all proven from context: fourjmp ($0010)immediately preceded bysta DispatchPtrLo/sta DispatchPtrHi, onejmp ($00FE)preceded bysta AudioHandlerPtrLo/sta AudioHandlerPtrHi, and twosta a:$0000,yzero-page clears that take the neutralZp00. Audit-comment alignment was re-done afterwards with the new_tools/align_audit_comments.py(whitespace-only) - Details:
Pac-Man (U)/README.md
29. Hogan's Alley (JU)
- Folder:
NROM/Hogan's Alley (JU)/(promoted out of_wip/NROM/2026-10-20 bygit mv) - ROM:
Hogan's Alley (JU).nes(24,592 bytes), reached through therom.nessymlink - Source:
prg.s(10,920 lines; 3,950 instruction lines covering 8,041 code bytes = 49.1%; 681 labels, zeroLabel_residue, zero raw$XXXXjsr/jmp/branch operands, 4,490 canonical audit comments, 0 byte mismatches againstprg.bin) - Linker: HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB)
- Vectors: NMI → $C088 (
NmiHandler), RESET → $C000 (Reset), IRQ → $C000 (the same address) - Key subsystems: the frame heartbeat — the NMI sets
GameFramePending($20) and the main loop spends it, withNmiPhaseFlag($22) stopping the per-frame work from running twice; an inline dispatch architecture —IndirectCallat $C34D pops the return address of thejsrthat called it and reads a 16-bit handler pointer from the word that follows, so the six handler tables live inside the code stream ($C124 19 entries, $C219 4, $C89C 14, $CDD1 1, $D234 2, $D3D6 14); the Zapper on$4017(ReadZapper$CF3E) with the controller debounced over five frames intoPlayer1Buttons($16); a three-accumulator sound engine (SoundFlag0/1/2at $F0–$F2) fed by 24 one-bit stubs and read at $F9FF/$FC48/$FAFC, with the note records inNoteParameterTable($FCC8) - Build fix: none at PRG level — it was PRG-identical in
_wip/and stayed byte-identical through Pass 2/3. Promotion addedheader.s,chr.s, a HEADER/PRG/CHRlinker.cfg, therom.nessymlink and the whole-ROMcmp; the first promoted build was byte-identical - Pass 1 correction (2026-10-20): the static trace classified only 41.8 % of the PRG as code. A fresh Mesen Code Data Logger capture was merged with the four captures already in the folder (
hogans_merged.cdl, the OR of five per-byte flag arrays, 6,544 code bytes) and_tools/cdl_reclass.pyrewrote the split to match what the CPU actually fetched: 1,216 bytes moved from data to code, five moved the other way and 59 labels were emitted. The four branch targets the tool could not prove were turned into labels by the new_tools/resolve_raw_branches.py - Pass 2 (2026-10-20): a fresh map derived from this dump's own committed split: 206 routine entries hand-named and 413 internal branch targets derived mechanically by
_tools/derive_branch_names.py, 630Label_XXXXdefinitions gone, 484 raw$XXXXcall operands resolved, 15 call targets the tracer had never labelled given a label. Recorded inroutinemap.tsv - Pass 3 (2026-10-20): 60 semantic zero-page aliases, each applied only where its role is proven (
zp_aliases.incandzp_alias_sites.tsv); the slots that stay neutral are each listed with the reason. 34 data tables named —SubStateHandlerTable,ModeHandlerTable,HandlerDispatchTable,ActorCommandTable,TargetBehaviourTable,NoteParameterTableand the rest — and recorded indata_region_names.tsv.apply_symbols.pyreports 1 residue:sta a:$00B4,yat $C203, the same address asZp40/ActorPalettebut forced to absolute addressing, so it must stay numeric - Residue: no
make regentarget. The Pass 1 split here is the static trace corrected by a CDL capture, and the base the correction was applied to is not what the current_tools/nesdis.pyproduces, so a regen pipeline could not reproduceprg.sbyte for byte.prg.sis the maintained source of truth - Details:
Hogan's Alley (JU)/README.md
30. Mario Bros (JU)
- Folder:
NROM/Mario Bros (JU)/(promoted out of_wip/NROM/2026-10-20 bygit mv) - ROM:
Mario Bros (JU).nes(24,592 bytes), reached through therom.nessymlink - Source:
prg.s(16,345 lines; 6,210 instruction lines covering 12,847 code bytes = 78.4%; 1,025 labels, zeroLabel_residue and zeroSubCresidue, zero raw$XXXXjsr/jmp/branch operands, 6,458 canonical audit comments, 0 byte mismatches againstprg.bin) - Linker: HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB)
- Vectors: NMI → $C07D (
NmiHandler), RESET → $C000 (Reset), IRQ → $C000 (the same address) - Key subsystems: the frame heartbeat — the NMI sets
FramePendingFlag($20) and the main loop spends it, withNmiPhaseFlag($22) stopping the NMI handler from doing its per-frame work twice; an inline dispatch table — the handler pointers sit in the middle of the code stream, right after the call that reads them, so the static tracer cannot follow them (GameStateHandlerTable$C510 and its five continuation blocks); a script interpreter that drives the enemies (SetupScriptPointer$CB85,FetchScriptByte$E9FA,RunScript$E9D3) with the command byte compared against $AA and $BB; the Zapper-free controller read with a five-frame debounce intoZp10/Zp11; a per-note sound engine at $F8A7–$FD27 working from the note table at $FCC8 - Build fix: none at PRG level — it was PRG-identical in
_wip/and stayed byte-identical through Pass 2/3. Promotion addedheader.s,chr.s, a HEADER/PRG/CHRlinker.cfg, therom.nessymlink and the whole-ROMcmp; the first promoted build was byte-identical - Pass 1 correction (2026-10-20): the committed split was a strict subset of the correct one — only 72.0% of the PRG was classified as code. A Mesen Code Data Logger capture of this ROM (
mario_mesen.cdl, 10,915 code bytes) showed 1,010 bytes the tracer had left as data were code; the two branch targets the capture never reached ($E4CBand$E639) were forced with--overrideand account for 57 more, so 1,067 bytes moved from data to code and 22 moved the other way. The biggest single win is$D508–$D56D, a hundred bytes that decode as a coherent routine, and$CA3B–$CA5D, the tile-drawing routine. The three branch targets the reclassifier could not prove were turned into labels by_tools/resolve_raw_branches.py - Pass 2 (2026-10-20): a fresh map derived from this dump's own committed split: 206 routine entries and 519 internal branch targets, 931
Label_XXXXdefinitions gone, 51 raw$XXXXcall operands resolved and 12 call targets the tracer had never labelled given a label. ZeroSubCresidue: the 185 entries the previous session had left as address-derived residue were all named from the code. Recorded inroutinemap.tsv - Pass 3 (2026-10-20): 25 semantic zero-page aliases, each applied only where its role is proven (
zp_aliases.inc); the slots that stay neutral are each listed with the reason. 35 data tables named —GameStateHandlerTable,EnemyBehaviourTable,EnemyScriptTable,EnemyTypePointerTable,SoundRoutineTable,NoteFrequencyTableand the rest — and recorded indata_region_names.tsv.apply_symbols.pyreports 0 residue - Details:
Mario Bros (JU)/README.md
33. Pyramid (U) (Sachen)
- Folder:
NROM/Pyramid (U)/(promoted out of_wip/NROM/2026-10-20 bygit mv) - ROM:
Pyramid (U) (Sachen).nes(24,592 bytes), reached through therom.nessymlink - Source:
prg.s(8,253 lines; 3,130 instruction lines covering 6,493 code bytes = 39.6%; 463 labels, zeroLabel_residue, zero raw$XXXXjsr/jmp/branch operands, 3,762 canonical audit comments, 0 byte mismatches againstprg.bin) - Linker: HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB)
- Vectors: NMI → $D72E (
NmiHandler), RESET → $FF00 (Reset), IRQ → $FF00 (the same address —seiis never undone, so the IRQ never fires) - Key subsystems: the unlicensed Sachen boot (
sta $4100mapper unlock with a delay loop at $FF4C, the "A"/"V" check on RAM $0120/$0121 at $FF57, the seed at $FF69, the clear at $FF74, the hand-off to the game's own entry at $C800); a task table ofjmptrampolines that live inside the data regions ($C01E, $C02A, $C042, $C054) plus ten more at $C000–$C01B; two queued-event dispatchers that jump through the zero page withjmp ($0002)($C3A3 withTaskVectorTable1$C3A6, $CCCA withTaskVectorTable2$CCD5); a VRAM command list assembled in the $0700 buffer and flushed byFlushVramCommandList; the actor grid at $0436 with the actor tables at $D320/$D4EE/$D5D5; a four-voice sound engine with its period, envelope and sample tables - Build fix: none at PRG level — it was PRG-identical in
_wip/and stayed byte-identical through Pass 2/3. Promotion addedheader.s,chr.s, a HEADER/PRG/CHRlinker.cfg, therom.nessymlink and the whole-ROMcmp; the first promoted build was byte-identical (MD5aa285ff1…6c59e2) - Pass 1 correction (2026-10-20): the committed split was a strict subset of the correct one — 828 bytes of code were still marked as data, because the tracer cannot follow a
jmpthat sits inside a data region. Re-tracing with the sixteenjmp-table targets, the$C800boot mainline and six further code starts seeded by hand recovers them (plus a five-byte stub at $DF89 in a hole between two routines), and the re-trace loses no committed code byte.make regenreproduces the split, so it stays verifiable - Pass 2 (2026-10-20): a fresh map derived from this dump's own committed split: 431 routine entries and the 32 data blocks named, 428
Label_XXXXdefinitions gone, 320 raw$XXXXcall operands resolved. The internal branch-target names are derived mechanically from the branch that reaches them by_tools/derive_branch_names.py. Recorded inroutinemap.tsv - Pass 3 (2026-10-20): 24 semantic zero-page aliases, each applied only where its role is proven (
zp_aliases.inc); the 57 slots that stay neutral are each listed with the reason. 32 data tables named —TaskVectorTable1/TaskVectorTable2,LevelScriptData,MusicPeriodTable,SoundEnvelopeTable, the actor tables — and recorded indata_region_names.tsv.apply_symbols.pyreports 0 residue - Residue: the zero page is reused heavily — 410 references still carry a neutral name, mostly the general-purpose scratch of the shift and arithmetic helpers. 482 absolute operands point at RAM and stay numeric.
sta $4100stays a raw operand: it is outside the$2000-$4017rangePROMPTS.mdasks to be symbolic, and no hardware name would describe a mapper unlock - Details:
Pyramid (U)/README.md
34. Raid on Bungeling Bay (U)
- Folder:
NROM/Raid on Bungeling Bay (U)/(promoted out of_wip/NROM/2026-10-20 bygit mv) - ROM:
Raid on Bungeling Bay (U).nes(24,592 bytes), reached through therom.nessymlink - Source:
prg.s(~14,300 lines; 255SubC<addr>entry points, 612Sub_<Role>_<addr>branch names, zeroLabel_residue, zero raw$XXXXjsr/jmp/branch operands) - Linker: HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB)
- Vectors: NMI → $C04C (
NmiHandler), RESET → $C000 (Reset→ResetEntryat $C6E3), IRQ → $C2C0 (IrqHandler) - Key subsystems: NMI frame loop with two paths (
NmiPathSelector$C4: minimal vs full); state bitmap at $0200 dispatching on bits 0–3; PPU helper at $C006; sprite/OAM update at $C08E; palette update at $C4E4; main game logic at $C17A; PRNG at $C412; four computed indirect jumps at $E2EC / $E79D / $E7A0 / $E7A3 - Build fix: none at PRG level — it was PRG-identical in
_wip/and stayed byte-identical through Pass 2/3. Promotion addedheader.s,chr.s, a HEADER/PRG/CHRlinker.cfg, therom.nessymlink and the whole-ROMcmp; the first promoted build was byte-identical (MD577285503…885000ac) - Pass 3 (2026-10-20): 11 semantic zero-page aliases added to
locals.incand applied at the proven sites. One of them was corrected while the[a2]sibling was finished:$EAhad been namedVBlankWaitCounter, but the routine at$C412is the game's PRNG (the classiceor/asl/php/lsr/plp/rolscrambler, called thirteen times from gameplay code, twice in a row at$CDF4/$CDF9with the second result masked#$07), so$EAis the scrambler's phase counter. RenamedPrngPeriodCounter, and$EB/$ECwere namedPrngSeedB/PrngState. Twosta a:IndDispatch17,yoperands that were absolute stores to RAM$0017were also corrected toa:Zp17,y - Details:
Raid on Bungeling Bay (U)/README.md
35. Raid on Bungeling Bay (U) [a2]
- Folder:
NROM/Raid on Bungeling Bay (U) [a2]/(promoted out of_wip/NROM/2026-10-20 bygit mv) - ROM:
Raid on Bungeling Bay (U) [a2].nes(24,592 bytes), reached through therom.nessymlink - Source:
prg.s(14,326 lines; 5,079 instruction lines covering 10,536 code bytes = 64.3%; 866 labels — 252SubC<addr>entries + 610Sub_<Role>_<addr>branch names — zeroLabel_residue, zero raw$XXXXjsr/jmp/branch operands, 5,467 canonical audit comments, 0 byte mismatches againstprg.bin) - Linker: HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB)
- Vectors: NMI → $C04C (
NmiHandler), RESET → $C000 (Reset→ResetEntryat $C6E3), IRQ → $C2C0 (IrqHandler) - Key subsystems: same structure as row 34 — NMI frame loop with two paths, state bitmap at $0200, PPU helper at $C006, sprite/OAM update at $C08E, palette update at $C4E4, main game logic at $C17A, PRNG at $C412, four computed indirect jumps
- Variant: a different build of the same game as row 34 — 150 of the 16,384 PRG bytes differ, in 7 runs, all of them code-versus-copyright-text at
$C67D–$C6D8and$C73B–$C779; the CHR differs too; header byte 6 is $00 (Horizontal) against row 34's $01 (Vertical). The zero-page reference sets are otherwise identical - Build fix: none at PRG level — it was PRG-identical in
_wip/and stayed byte-identical through Pass 2/3. Promotion addedheader.s,chr.s, a HEADER/PRG/CHRlinker.cfg, therom.nessymlink and the whole-ROMcmp; the first promoted build was byte-identical (MD5659d340a1e9d420eee28df13319b0094) - Pass 3 (2026-10-20): 15 semantic zero-page aliases added to
locals.incand applied at the proven sites — every alias is applied only where its role is proven, and the addresses that carry two names keep the neutral name at the sites where the other role applies ($01isPtrHiat the 16-bit compare andIndDispatch01at the dispatch;$17isIndDispatch17at the dispatch andZp17for the absolute RAM$0017store in the copy loop). The new_tools/apply_zp_aliases.pydoes the per-site substitution, becauseapply_symbols.pyonly rewrites numeric operands - Details:
Raid on Bungeling Bay (U) [a2]/README.md
36. Urban Champion (JU)
- Folder:
NROM/Urban Champion (JU)/ - ROM:
Urban Champion (JU).nes(24,592 bytes) - Source:
prg.s(~4,000 lines) - Linker: PRG at $C000, 16 KB; single segment
- Vectors: NMI → $CA91 (
NmiHandler), RESET → $CA00 (Reset), IRQ → $CA00 (reusesReset) - Key subsystems: NMI-driven frame loop with simple fight game logic; minimal code (33.9%)
- Build fix: None needed; byte-identical out of the box
- Pass 3 symbols (2026-10-19): 70 operands substituted (4 single-name + 66 hardware) from
symbols.inc/locals.incvia_tools/apply_symbols.py— zero residue. Rebuild stays byte-identical. - Details:
Urban Champion (JU)/README.md
_wip/ Projects
The pre-promotion tier is documented in WIP.md. It now holds 857
projects across 30 mapper folders:
| Folder | Mapper | Projects |
|---|---|---|
_wip/NROM/ |
0 | 38 |
_wip/MMC1/ |
1 | 221 |
_wip/UNROM/ |
2 | 98 |
_wip/CNROM/ |
3 | 58 |
_wip/MMC3/ |
4 | 239 |
_wip/MMC5/ |
5 | 10 |
_wip/MAPPER7/ … _wip/MAPPER232/ |
7-232 | 193 |
All 857 build byte-identical for the whole ROM — the tier was moved off
the old PRG-level-only compare on 2026-10-20, so the header and CHR are now
proven for every project here, exactly as in the promoted tier. 856 of them
are Pass 0 skeletons: the folder shape and the build are proven, but
prg.s is still a single .incbin "prg.bin". Only Golf (JU) carries a
real disassembly (Pass 1 + Pass 2).
Two things are worth knowing before touching a _wip/ project:
- Most of the tier is a banked mapper with a PRG image larger than the
6502's address space. Only two projects have a 16 KB PRG; 151 have
32 KB, 523 have 128 KB and one (
Action 52 (U) [!]) has 1.5 MB. Those projects link their MEMORY areas at file offsets rather than CPU addresses, which is both the only option and the honest model. See "Two linker layouts" inWIP.md. - 227 projects have no CHR at all — the mapper supplies CHR RAM.
The tier is deliberately not built by the root Makefile — MAPPERS
names only the promoted mapper folders. Build it explicitly:
for d in _wip/*/*/; do make -C "$d"; done
Promotion is now just git mv plus the disassembly work: the whole-ROM
build, the header.s/chr.s sources, the HEADER/PRG/CHR linker.cfg and
the rom.nes copy are already in place. No _tools path change is needed,
because both tiers sit two levels deep, so ../../_tools/ is correct either
way. Lunar Pool (U), Donkey Kong (JU), Popeye (JU) (PRG 1),
Raid on Bungeling Bay (U), Pac-Man (U), Raid on Bungeling Bay (U) [a2],
Pac-Man (Tengen) (U), Pyramid (U), Hogan's Alley (JU) and
Mario Bros (JU) (all 2026-10-20) went through exactly that and came out
whole-ROM byte-identical on the first promoted build.
Notable vector/header observations for Pass 1 work:
- Pac-Man (U) RESET at
$FF00— the vector-page tail, but not padding:$FF00holds real boot code (sei/cld, PPU off, double vblank wait,jmp ColdStartat$C042). The Tengen variant RESETs at$C033and has no boot code at$FF00at all (that region is$FFpadding) — the same boot sequence is inline at$C033. The two PRGs differ in 56 bytes in 8 runs, all of them code-versus-licensee-text. - Lunar Pool (U) NMI
$FF65/ IRQ$FF64are adjacent in the vector page; RESET$E80C. - NES PowerPad Test Card (U) — at Pass 2/3: minimal code (~7.2%), data-heavy test cartridge. RESET at $E000 (non-$C000 entry). NMI handler reads controllers via shift register, processes pad transitions, draws score/lives. See
NES PowerPad Test Card (U)/README.md. - Lunar Pool (U) — Pass 2 and Pass 3 complete; promoted to the top level 2026-10-18: RESET at
$E80C(not$C000), NMI$FF65, IRQ$FF64(a barertijust before the NMI handler, so IRQs are ignored). There is nojmp ($7961)RAM-pointer gate (an earlier claim): those three sites fell out of decoding two bytes into the word "player".$CBDC/$CBC9is a print-inline-string-and-return-after-it helper, so ajsr $CBDCis always followed by a$81-prefixed,$00-terminated string ("player", "shot", "game over", "hiscore__", "perfect_"). The split was re-derived from a Mesen CDL capture (10,028 bytes Code): now **5,300 instructions / 11,077 bytes (67.6%)**, 5,301 data bytes and the six vector bytes as.word. Pass 2 named all **705** labels —Label_is gone from the file — and Pass 3 named 33 tables plus the zero-page aliases (38 semantic, 66 neutral, ten former phantom aliases deleted). Residue, recorded rather than guessed: 73 bytes of *reachable* code are still.byte($EA9A,$EADC,$EAE5,$EAED,$EB04,$EB16-$EB4F— the CDL capture never fetched them), another 75 bytes of ending-screen code sit at$F5F9-$F643, and ~206 bytes of unreached-but-clearly-code stubs stay data. The full 24,592-byte ROM (header + PRG + CHR) rebuilds byte-identically. SeeLunar Pool (U)/README.md`. - Ice Climber (JE) vs (U): byte-identical PRG and header — only the CHR differs (~regional title graphic).
- Popeye (JU) PRG 0 vs PRG 1: different PRG binaries (and mirroring); same vectors.
- Raid on Bungeling Bay (U) vs [a2]:
[a2]differs in mirroring only per header, but PRGs differ — separate builds. - Pyramid (U) (Sachen) — promoted 2026-10-20: the unlicensed Sachen boot pokes a mapper unlock at
$4100, checks the RAM bytes$0120/$0121against "A"/"V", and dispatches through two queued-event tables withjmp ($0002). It also dispatches throughjmptrampoline tables that live inside the data regions — 828 bytes of code that the tracer could not reach were recovered by hand. SeeNROM/Pyramid (U)/README.md. - CIRCUS — at Pass 2/3: full recursive disassembly complete. NMI-driven frame state machine (main loop is a spin loop at $C057). Menu text at $C763 ("CONTINUE", "STAGE", "SELECT", "PLAY"). Object state machine at $DC3F–$FE7B. Audio sequence data at $FABB–$FFFB. See
CIRCUS/README.md. - Joypad Test Cartridge (U) — Pass 3 complete: minimal code (23.4%), data-heavy test cartridge. Data region
$CF06–$FFFFbroken into 20 named sub-blocks; VRAM command stream opcode set decoded viaRetAddrUpdatereturn-address modification trick at$CDC8. SeeJoypad Test Cartridge (U)/README.md. - Wild Gunman (U) — Pass 1 redone, Pass 2/3 complete: NMI-driven frame loop. Gates its code behind runtime computed-goto tables — see the
prg.sheader block and itsREADME.md. - Mario Bros (JU) — Pass 1 corrected, Pass 2/3 complete, promoted 2026-10-20: the engine's handler tables sit inline, right after the
jsrthat reads them, so the static tracer could not follow them. A Mesen Code Data Logger capture showed 1,067 bytes the tracer had left as data were code, taking the split from 72.0% to 78.4%. Pass 2 named every label (zeroLabel_, zeroSubC) and Pass 3 added 25 semantic zero-page aliases and named 35 data tables. Code is gated behind stack-based indirect dispatch at$CD9Eand a 20-entryJSRthunk table at$C5A3. Audio routines in$F8xx-$F9xxclearly identifiable from APU register writes. SeeNROM/Mario Bros (JU)/README.md.
Common Patterns Across All Projects
Memory Map
Every project uses a single 16 KB PRG bank mapped at CPU $C000–$FFFF, with 8 KB CHR. All builds are NROM (no bank switching).
Interrupt Structure
All projects follow the same NES interrupt pattern:
- NMI fires once per frame and is the real-time heartbeat — handles OAM DMA, PPU updates, controller reading, and audio.
- RESET performs cold-start hardware init, RAM clearing, and enters the main loop.
- IRQ is almost always unused (either
rtior a self-loop).
Two exceptions worth noting from branches of this family:
- Excitebike uses a state-dispatch table at $C000 rather than a conventional inline main loop, and its IRQ vector points into a data region (unused).
- Donkey Kong Jr. is the extreme case: its reset path idles forever in a PRNG-advance loop, and the entire frame state machine (title, attract, gameplay, sound) executes inside the NMI handler itself. Its reset entry is also at $C66E rather than $C000.
Build Toolchain
All projects use the same toolchain:
- ca65 (6502 assembler)
- ld65 (linker with
.cfgmemory map) - All rebuilds are verified byte-identical to the original
prg.bin/ ROM PRG bank.
Disassembly Style
All sources are "Pass-1" style disassemblies:
- Every instruction annotated with PRG offset, CPU address, and emitted bytes
- Inline
.byte/.word/.resdata blocks interleaved with code - Address-based labels where semantics are not yet resolved:
Label_Cxxxx(unrenamed internal targets),SubC<addr>/Sub_Cxxxx(unnamed entry points),<Routine>_Block[_n](internal blocks under a named parent routine) - Zero-page symbol files (
locals.inc) and hardware symbol files (symbols.inc)
Navigation
Each project is a flat folder under its mapper directory — e.g.
NROM/Balloon Fight (JU)/ — containing:
prg.s— disassembly source;header.s,chr.sand the rawheader.bin/chr.bin/prg.binsplits (where present)symbols.inc,locals.inc— hardware constants and application symbolslinker.cfg,Makefile— memory map and build scriptrom.nes— space-free copy/symlink of the original ROM used by the compareREADME.md— detailed per-project power-on execution flow analysis
To rebuild any one project:
cd /home/tmerritt/Projects/disasm/NROM/<Project>
make
To build and verify every project at once (all mapper directories):
cd /home/tmerritt/Projects/disasm
make # all projects, all mappers
make clean # clean them all
make MMC3 # one mapper tier only
The root Makefile covers the promoted tier only. The pre-promotion tier
under _wip/ is built explicitly:
for d in _wip/*/*/; do make -C "$d"; done
See WIP.md for the _wip/ tier's layout, its quirks and its open work.
Pass 1 methodology note (2026-10-16)
The original Pass 1 disassembler had two limitations that silently understated code coverage. Both are worth knowing before trusting a coverage percentage:
- Documented opcodes only. Its table held the 151 documented 6502 opcodes. These ROMs also use the 54 undocumented opcodes and the 26 unofficial NOPs as 2/3-byte padding; a tracer that halts on them strands the real code behind.
- No runtime dispatch. It followed only vectors and direct
jsr/jmp/branch targets. Games here dispatch through computed jumps —jmp ($0014), thepla-based inline-table gotos in Wild Gunman (Label_C341), and task tables like Donkey Kong Jr.'sDeferredTaskHandlerTableat $BFFE.
Effect measured per project (old tracer → complete-opcode dispatch-aware tracer):
| Project | Old | Complete | Action taken |
|---|---|---|---|
| NES PowerPad Test Card (U) | 546 instr | 559 | Pass 1 already sound |
| Joypad Test Cartridge (U) | 282 instr | 1,773 | Pass 1 redone (23.4% code); Pass 2 complete; Pass 3 complete |
| Wild Gunman (U) | 1,600 instr | 4,083 | Pass 1 redone (49.3% code) |
| Balloon Fight (JU) | 5,216 instr | 5,277 | hand-done file was already better |
| Donkey Kong Jr. (JU) | 6,135 instr | 6,135 | file already complete |
Joypad Test Cartridge (U) was the last project carrying the old, truncated
Pass 1, and has now been redone. Its recorded "3.5% code" was really 23.4%: the
tracer stopped at $C09E on DCP $3C20 ($CF), an undocumented opcode used as
ordinary code, and 3,256 bytes of real code were filed as .byte data. Redoing it
also invalidated its Pass 3, which had described $C09E–$C173 and $C17F–$CCF6 as
data — both are code. Pass 3 is now the outstanding work.
The fix generalises: nesdis.py --undocumented decodes all 105 undocumented NMOS
opcodes. It is default off so that projects whose prg.s is already
regen-stable keep reproducing byte-for-byte under make regen.
_tools/verify_pass1.py checks the top-level projects — it selects the project
folders under each mapper directory (NROM/, AOROM/, CNROM/, MMC1/, MMC3/,
MMC5/, UNROM/) that carry a Makefile and a prg.bin/rom.nes, so _wip/
projects are not covered (they are checked by plain make, now at the
whole-ROM level).
Current run, 2026-10-20: all 35 NROM/ projects build, all canonical, and
no truncated or unfaithful Pass 1. The
last two carryovers are gone — Joypad Test Cartridge, the last project holding an
old truncated Pass 1, was redone, and Excitebike, the last source with uncommented
instructions, was commented.
The comment-spelling report used to claim that no project follows the canonical
; CPU:$xxxx PRG:xxxx AA BB convention. That was a bug in the checker, not a fact
about the sources: the canonical pattern ends with $ but was compiled without
re.MULTILINE, so it could only ever match once — at end of file — and every
project fell through to whichever laxer spelling matched most lines. Fixed with
re.M, the true split was 8 canonical / 3 pipe / 2 short / rom / bytes /
colon / slash; the 2026-10-19 standardization (_tools/audit_comment_tool.py
over 9 projects, plus hand fixes to CIRCUS and Excitebike) closed it out, so the
checker now reports all canonical.
Inside _wip/, only Golf (JU) has instructions to comment at all — it is
the one project in that tier with a real disassembly, and its comments use
the pre-canonical spelling (; C007: AD 02 20). The other 856 are Pass 0
skeletons with no instructions, so the spelling does not apply to them.
Bringing Golf (JU) up to canonical is Pass 2 work, not a build problem.
The old claim that "Excitebike and Pac-Man carry no byte comments at all" is stale on both counts. Pac-Man (USA) (Namco) is complete (4,695/4,695 instructions commented), and Excitebike's 1,013-line gap was closed on 2026-10-19 — all 5,376 instruction lines now carry a canonical comment.
The earlier-reported re-trace crash on MUSCLE (U) / Donkey Kong Jr. (JU)
(ValueError: invalid literal for int() with base 16: ':$0010') was a false alarm:
nesdis.operand_value() already strips the emitter's a: prefix via
token.removeprefix("a:").lstrip("$"), so re-tracing all promoted projects is
clean.
Resolved — audit comments for Excitebike and Pac-Man (2026-10-19)
Both were hand-written sources with semantic labels but no byte-identity audit
trail. Both now carry canonical ; CPU:$xxxx PRG:xxxx AA BB comments on every
instruction, and verify_pass1.py reports all-canonical across the top level, so
this section is closed.
The ca65 -l listing route described here was abandoned, for the reason recorded
in AGENTS.md: the listing carries no source line numbers, so entries cannot be
keyed back to source lines. The comment tooling went through the tracer instead
(_tools/audit_comment_tool.py, tracer as ground truth). The invariant still
holds and is the check to keep: after inserting comments, make must still print
Byte-identical ROM verified., and each comment's byte list must match prg.bin
at the stated offset — a wrong offset that still assembles is the failure mode.
Summary
Thirty-five projects sit under NROM/, and all 35 rebuild byte-identical
to their original ROMs (rows 1-27 below plus row 29 Hogan's Alley (JU),
row 30 Mario Bros (JU), row 31 Pac-Man (Tengen) (U), row 32 Pac-Man (U),
row 33 Pyramid (U), rows 34 and 35 Raid on Bungeling Bay (U) and
Raid on Bungeling Bay (U) [a2] — all promoted 2026-10-20 — and row 36
Urban Champion, which kept its tail number when it was promoted; row 7
Excitebike (JU) was fixed on 2026-10-20 — the byte-596 mismatch was two
$0A/$11 PPU-mask-shadow operands, see NROM/Excitebike (JU)/README.md).
The pre-promotion tier holds 857 projects under _wip/, and as of
2026-10-20 all 857 verify byte-identical for the whole ROM as well. Row 28
(Golf (JU)) is the only one listed in the table above, because it is the
only one with a real disassembly; the other 856 are Pass 0 skeletons, and the
whole tier — its layout, its quirks and its open work — is documented in
WIP.md. Folder
locations changed on 2026-10-20 (mapper directories, flat project folders),
but each row's build-status claim in this table is the state at its own
promotion; verify against the tree with make if in doubt.
| # | Project | Build Status | Pass 3 |
|---|---|---|---|
| 1 | Balloon Fight (JU) | BYTE-IDENTICAL | complete; symbols applied 2026-10-19 (16 $13 operands left numeric) |
| 2 | Baseball (UE) | BYTE-IDENTICAL | complete; symbols applied 2026-10-19 (121 operands) |
| 3 | Bomberman (U) | BYTE-IDENTICAL | complete |
| 4 | Burger Time (U) | BYTE-IDENTICAL | complete |
| 5 | Clu Clu Land (JU) | BYTE-IDENTICAL | complete |
| 6 | Defender 2 (U) | BYTE-IDENTICAL | complete |
| 7 | Excitebike (JU) | BYTE-IDENTICAL | complete (Pass 2/3 complete); byte-596 $0A/$11 mask-shadow fix + audit-trail re-anchor + 58 jsr/jmp operands symbolized 2026-10-20 |
| 8 | Tennis (JU) | BYTE-IDENTICAL | complete; symbols applied 2026-10-19 (18 operands) |
| 9 | Pac-Man (USA) (Namco) | BYTE-IDENTICAL | complete; symbols applied 2026-10-19 (524 operands; 727 multi-alias residues) |
| 10 | Donkey Kong 3 (JUE) | BYTE-IDENTICAL | complete |
| 11 | Donkey Kong Jr. (JU) | BYTE-IDENTICAL | complete (Pass 1 verified) |
| 12 | CIRCUS | BYTE-IDENTICAL | complete; symbols applied 2026-10-19 (118 operands; 23 multi-alias residues) |
| 13 | Wild Gunman (U) | BYTE-IDENTICAL | complete (Pass 1 redone); symbols applied 2026-10-19 (76 operands) |
| 14 | Joypad Test Cartridge (U) | BYTE-IDENTICAL | Pass 3 complete; symbols applied 2026-10-19 (47 operands) |
| 15 | NES PowerPad Test Card (U) | BYTE-IDENTICAL | complete; symbols applied 2026-10-19 (89 operands) |
| 16 | MUSCLE (U) | BYTE-IDENTICAL | complete; symbols applied 2026-10-19 (220 operands) |
| 17 | Lunar Pool (U) | BYTE-IDENTICAL | complete (tables named); symbols applied 2026-10-19 (45 operands) |
| 18 | Donkey Kong (JU) | BYTE-IDENTICAL | complete (Pass 2/3, promoted 2026-10-19); symbols applied 2026-10-19 (75 operands) |
| 19 | Donkey Kong Jr. Math (U) | BYTE-IDENTICAL | complete (Pass 3 complete); promoted into NROM/ 2026-10-20 after fixing the mislabeled SubCF218 call sites |
| 20 | Duck Hunt (JUE) | BYTE-IDENTICAL | complete (Pass 3 complete) |
| 21 | Ice Climber (JE) | BYTE-IDENTICAL | complete (Pass 3 complete) |
| 22 | Ice Climber (U) | BYTE-IDENTICAL | complete (Pass 3 complete) |
| 23 | Lode Runner (U) | BYTE-IDENTICAL | complete (Pass 2/3 complete) |
| 24 | Pinball (JU) | BYTE-IDENTICAL | complete (Pass 2/3 complete) |
| 25 | Millipede (U) | BYTE-IDENTICAL | complete (Pass 2/3 complete, 74.6% code) |
| 26 | Popeye (JU) (PRG 0) | BYTE-IDENTICAL | complete (Pass 2/3 complete, 72.3% code) |
| 27 | Popeye (JU) (PRG 1) | BYTE-IDENTICAL | complete (Pass 2/3 complete, 72.3% code); promoted 2026-10-20 |
| 31 | Pac-Man (Tengen) (U) | BYTE-IDENTICAL | partial (Pass 2 complete, Pass 3 partial — 30 zero-page aliases, 28 named data tables, 0 residue, 20.0% code); promoted 2026-10-20 |
| 32 | Pac-Man (U) | BYTE-IDENTICAL | partial (Pass 2 complete, Pass 3 partial — 119 operands, 0 residue); promoted 2026-10-20 |
| 34 | Raid on Bungeling Bay (U) | BYTE-IDENTICAL | partial (Pass 2/3 partial, 64.6% code); promoted 2026-10-20 |
| 33 | Pyramid (U) | BYTE-IDENTICAL | partial (Pass 2 complete, Pass 3 partial — 24 zero-page aliases, 32 named data tables, 0 residue, 39.6% code); promoted 2026-10-20 |
| 35 | Raid on Bungeling Bay (U) [a2] | BYTE-IDENTICAL | partial (Pass 2 complete, Pass 3 partial — 15 zero-page aliases, 0 residue, 64.3% code); promoted 2026-10-20 |
| 30 | Mario Bros (JU) | BYTE-IDENTICAL | partial (Pass 2 complete, Pass 3 partial — 25 zero-page aliases, 35 named data tables, 0 residue, 78.4% code); promoted 2026-10-20 |
| 29 | Hogan's Alley (JU) | BYTE-IDENTICAL | partial (Pass 2 complete, Pass 3 partial — 60 semantic zero-page aliases, 34 named data tables, 0 residue, 49.1% code); promoted 2026-10-20 |
| 36 | Urban Champion (JU) | BYTE-IDENTICAL | complete; symbols applied 2026-10-19 (70 operands) |
Row 28 (Golf (JU), still in _wip/) rebuilds cleanly at the whole-ROM
level as of 2026-10-20. It has Pass 1 done and is at substantial Pass 2.
Promotion into the numbered inventory, CDL-backed reclassification of the remaining
data, and a real power-on flow README.md per project are the open work for it;
the other 38 _wip/ projects are Pass 0 skeletons and need Pass 1 from scratch.
See WIP.md.
Use _tools/verify_pass1.py to re-check any of this at any time; it rebuilds each
project and re-traces it, and reports TRUNCATED when a project's committed split
claims less code than the tracer can reach.