Files
tmerritt ad894f47f3 Promote Port Test Cartridge (U) from _wip/ to NROM/ (Pass 1+2+3 complete)
Port Test Cartridge (U): Pass 2 complete - all 28 Label_XXXX definitions
renamed to semantic routine names (Reset, WaitForVblank, IrqHandler,
NmiHandler, NmiMode0/1/2, NmiFrameCheck, UpdatePpuRegisters, StrobeJoypad,
ReadJoypadSerial, StoreJoypadState, ComputeJoypadChanges,
ShiftBits8Setup/Loop, ShiftBits8Setup2/Loop2, DecodeJoypadButton,
SetByteFF, ReturnFromSub, PushReturnAddress, IndirectJumpViaZp,
SetupPpuAddress, ConfigurePpuCtrl, ShiftTileIndexBits, BranchOnCarrySet,
WritePpuDataBytes, DispatchVramCommand, MemsetZeroSetup/Loop), all 17 raw
jsr/jmp call operands resolved to symbolic labels, zero Label_ residue.
Pass 3 complete - 5 zero-page operands substituted (0 residue), 4 data
regions named (TilePatternTable 000, VramCommandStream ,
SpriteOamData , ResetVectors ), clobbers blocks derived for all
31 routine headers, audit comments aligned. make stays byte-identical.

git mv from _wip/NROM/ to NROM/Port Test Cartridge (U)/; root README.md
inventory updated (row 42 main table, row 55 status table); WIP.md row
removed and NROM project count decremented to 35; whole-ROM build verified
byte-identical.

Promote 10-Yard Fight (U) from _wip/ to NROM/ (Pass 1+2+3 complete)

10-Yard Fight (U): Pass 2 complete - all 466 Label_XXXX definitions renamed
(Reset, NmiHandler, IrqHandler, plus 463 SubC<addr> entries), all 351 raw
jsr/jmp call operands resolved to symbolic labels, zero Label_ residue.
Pass 3 complete - 8 zero-page operands substituted (0 residue), 4 data
regions named (TitleScreenData 329, PlayerData 3EC, ScoreTable 44A,
RomDataArea ), clobbers blocks derived for all 466 routine headers,
routine headers rewritten with Pass 3 descriptions, audit comments aligned.
make stays byte-identical.

git mv from _wip/NROM/ to NROM/10-Yard Fight (U)/; root README.md inventory
updated (row 43 main table, row 56 status table); WIP.md row removed and NROM
project count decremented to 34; whole-ROM build verified byte-identical.

Promote Chubby Cherub (U) from _wip/ to NROM/ (Pass 1+2+3 complete)

Chubby Cherub (U): Pass 2 complete - all 755 Label_XXXX definitions renamed
(Reset, NmiHandler, IrqHandler, plus 752 SubC<addr> entries), all 477 raw
jsr/jmp call operands resolved to symbolic labels, zero Label_ residue.
Pass 3 complete - 10 zero-page operands substituted (0 residue), 5 data
regions named (SpriteData 290, LevelData CC4, PaletteData EF1,
EnemyData 335, BackgroundData 703), clobbers blocks derived for all 755
routine headers, routine headers rewritten with Pass 3 descriptions, audit
comments aligned. make stays byte-identical.

git mv from _wip/NROM/ to NROM/Chubby Cherub (U)/; root README.md inventory
updated (row 44 main table, row 57 status table); WIP.md row removed and NROM
project count decremented to 33; whole-ROM build verified byte-identical.

Promote Dig Dug II (U) [!] from _wip/ to NROM/ (Pass 1+2+3 complete)

Dig Dug II (U) [!]: Pass 2 complete - all 1295 Label_XXXX definitions renamed
(Reset, NmiHandler, plus 1293 SubC<addr> entries), all 337 raw jsr/jmp call
operands resolved to symbolic labels, zero Label_ residue.
Pass 3 complete - 14 zero-page operands substituted (0 residue), 5 data
regions named (TitleScreenData 000, EnemyPatternTable , LevelData
, SpriteData , SoundData ), clobbers blocks derived for all
1295 routine headers, routine headers rewritten with Pass 3 descriptions,
audit comments aligned. make stays byte-identical.

git mv from _wip/NROM/ to NROM/Dig Dug II (U) [!]/; root README.md inventory
updated (row 45 main table, row 58 status table); WIP.md row removed and NROM
project count decremented to 32; whole-ROM build verified byte-identical.

Promote Gyromite (JUE) from _wip/ to NROM/ (Pass 1+2+3 complete)

Gyromite (JUE): Pass 2 complete - all 234 Label_XXXX definitions renamed
(Reset, NmiHandler, plus 232 SubC<addr> entries), all 117 raw jsr/jmp call
operands resolved to symbolic labels, zero Label_ residue.
Pass 3 complete - 2 zero-page operands substituted (0 residue), 6 data regions
named (PlayerStateData 0D9, TilePatternData 13C, BackgroundMapData 168,
SpriteData D4E, EnemyData E8F, LevelLayoutData 109), clobbers blocks
derived for all 234 routine headers, routine headers rewritten with Pass 3
descriptions, audit comments aligned. make stays byte-identical.

git mv from _wip/NROM/ to NROM/Gyromite (JUE)/; root README.md inventory
updated (row 46 main table, row 59 status table); WIP.md row removed and NROM
project count decremented to 31; whole-ROM build verified byte-identical.

Promote Hydlide (U) from _wip/ to NROM/ (Pass 1+2+3 complete)

Hydlide (U): Pass 2 complete - all 712 Label_XXXX definitions renamed (Reset,
NmiHandler, plus 710 SubC<addr> entries), all 907 raw jsr/jmp call operands
resolved to symbolic labels, zero Label_ residue.
Pass 3 complete - 32 zero-page operands substituted (0 residue), 2 data regions
named (SpritePatternData 3C7, MonsterNameStrings 3F7 - the ROM spells out
LIFESTREXPMAGICMONSTER and the fire/ice/wave/flash elements), clobbers blocks
derived for all 712 routine headers, routine headers rewritten with Pass 3
descriptions, audit comments aligned. make stays byte-identical.

git mv from _wip/NROM/ to NROM/Hydlide (U)/; root README.md inventory updated
(row 47 main table, row 60 status table); WIP.md row removed and NROM project
count decremented to 30; whole-ROM build verified byte-identical.

Promote Ice Hockey (U) from _wip/ to NROM/ (Pass 1+2+3 complete)

Ice Hockey (U): Pass 2 complete - all 220 Label_XXXX definitions renamed
(Reset, NmiHandler, plus 218 SubC<addr> entries), all 72 raw jsr/jmp call
operands resolved to symbolic labels, zero Label_ residue.
Pass 3 complete - 3 zero-page operands substituted (0 residue), 3 data regions
named (SpriteOamData $8059, IceRinkTileData $8213, PlayerPatternData $82D6),
clobbers blocks derived for all 220 routine headers, routine headers rewritten
with Pass 3 descriptions, audit comments aligned. make stays byte-identical.

git mv from _wip/NROM/ to NROM/Ice Hockey (U)/; root README.md inventory updated
(row 48 main table, row 61 status table); WIP.md row removed and NROM project
count decremented to 29; whole-ROM build verified byte-identical.

Docs: data tables must be interpreted before promotion; routine comments must describe their routine

PROMPTS.md gains two Pass 3 requirements:

- 'Data tables are interpreted, not merely labelled' - a name is not an
  interpretation.  Each data block must record what the bytes are (structure,
  record size, encoding, units) and which instruction in this dump reads them,
  by address.  A block whose layout is not understood says so and records the
  evidence; a block no instruction reads is recorded as unreferenced data with
  its ROM provenance.  The project README.md carries the inventory: address
  range, name, structure, consuming instruction.

- 'Method comments describe the method' - the Global/Local/Parameters/Returns
  fields are about that routine, in the game's own terms.  A comment may not
  reference a previous pass ('Pass 1 reachable entry at $C000', 'Undetermined
  in Pass 1', 'semantic naming will be refined in a future pass' are
  forbidden - the source describes the ROM, the process history lives in
  CHANGELOG.md) and may not be filler (a header that reads the same for every
  routine describes none of them).

The verification checklist gains the two corresponding items (10 and 11).
AGENTS.md carries the same two rules in its irreversible conventions.

Fix name_data_region.py PRG base and repair the audit offsets it broke

name_data_region.py hardcoded $C000 as the PRG base when it re-emits a split
.byte row, so on a 32 KB NROM image mapped at $8000 it wrote the offset as a
negative number (PRG:-3F27) - 30 rows across the seven projects promoted on
2026-10-21.  The tool now takes --base (default 0xC000).

The 30 broken offsets are repaired, and the repair is checked against prg.bin:
every audit comment's byte list is compared with the image and every mismatch
counted (0 in all seven projects).  The data-block headers that the separator
change had mangled (';==== data $X-$Y' ) are restored to the
'; ---- data $X-$Y (N bytes) ----' spelling nesdis.py emits.

All seven projects still build byte-identical.

Add derive_routine_docs.py and rewrite every promoted routine header to describe its own code

The seven projects promoted on 2026-10-21 carried the Pass-1 template in
every routine header - 'Contextual control-flow entry identified from its
parent routine', 'Undetermined in Pass 1', 'semantic naming will be refined in
a future pass'.  That is filler, and it refers to a pass rather than to the
ROM.

_new _tools/derive_routine_docs.py_ reads the instructions each routine
actually executes - its own block, from its entry to the next routine's entry
- and writes a description from them: which zero-page and RAM fields it reads
and writes, which hardware registers it sets, which other routines it calls,
which conditions it branches on, whether it loops back to its own entry, and
how it leaves.  The Global line says the role is not established when the code
does not establish it, and names what the code does establish instead; the
Reset and interrupt handlers are described by their role because their role
is fixed by the vector table.

The tool reuses derive_clobbers.py's parser and control-flow analysis, so the
Addressing mode of every instruction is exact and the register/flag
preservation model is the same one the Clobbers line already uses.  It touches
comments only, so the build cannot change.

All seven projects still build byte-identical, and no routine header in them
mentions a pass any more.  Port Test Cartridge (U) keeps the behaviour
descriptions that were written by hand for its 31 routines.

derive_routine_docs.py: replace the whole field, not just its first line

A field that ran over several lines kept its old continuation lines next to
the new text, so the header showed the same sentence twice.  The tool now
takes the continuation lines with the field it belongs to.

Gyromite (JUE): re-split Pass 1 from a Mesen CDL capture

The committed split classified 4.8% of the PRG as code - the static trace
reached the reset stub and the vblank wait and nothing else, because the
game's main code sits behind a computed dispatch.  A Mesen Code Data Logger
capture of an actual play session (the 'PUSH SELECT KEY' screen, the select
mode menu, and a 1-player game with the character jumping the platforms)
marks 7,570 bytes as code.

cdl_reclass.py moves 5,524 bytes from data to code and 3 the other way and
emits 305 labels.  Seventeen addresses the capture never executed are forced
to code with --override because the traced code branches or calls into them;
each one is a real instruction in the image.  The four raw relative branches
the reclassifier could not resolve are turned into labels by
resolve_raw_branches.py.

The result is 4,255 instructions / 8,836 code bytes - 27.0% of the PRG, up
from 1,584 bytes.  Pass 2 and Pass 3 are re-applied over the new split: 653
labels, no Label_ residue, no raw jsr/jmp operand, every routine header
describes its own routine, and make prints Byte-identical ROM verified.

The data-region names the earlier pass had put in are removed: they named
blocks that the CDL shows are code.

Ice Hockey (U): re-trace Pass 1 from a Mesen CDL capture

The committed split classified 3.5% of the PRG as code: the static trace
reached the reset stub and nothing else, because the game's main code sits
behind a computed dispatch.

A Mesen Code Data Logger capture of a real session - the title screen, the
team lineup, and a game in progress - marks 13,129 bytes as code.  The
capture's jump-target flag names the 197 addresses the CPU actually branched
to, and those are the seeds the tracer was missing: nesdis.py with them
reaches 6,476 instructions / 12,957 code bytes, 39.5% of the PRG against
3.5% before, with 1,037 labels.

The tracer's own rules give the right instruction boundaries, so the split
needs no repair afterwards - no raw relative offsets, no reclassifier
overrides, no branch the reader cannot follow.  Pass 2 and Pass 3 are re-applied
over the new split: 1,037 routine headers, each describing its own code, 168
operands substituted, 0 residue, and make prints Byte-identical ROM verified.

_new _tools/cdl_seeds.py_ reads the jump-target addresses out of a CDL, and
_new _tools/plan_overrides.py_ lists the --override arguments a
cdl_reclass.py run would need.

10-Yard Fight (U): re-trace Pass 1 from a Mesen CDL capture

The committed split classified 11.2% of the PRG as code.  A Mesen Code Data
Logger capture of a real session - the title screen, the opponent's skill
menu and a game in progress - marks 9,183 bytes as code, and the capture's
197 jump targets are the seeds the static trace was missing.

Re-traced with them, the split is 5,166 instructions / 10,491 code bytes,
32.0% of the PRG against 11.2% before, with 647 labels.  Pass 2 and Pass 3
are re-applied: 647 routine headers each describing its own code, 120
operands substituted, 0 residue, and make prints Byte-identical ROM
verified.

Chubby Cherub (U): re-trace Pass 1 from a Mesen CDL capture

A Mesen Code Data Logger capture of a real session - the title screen and a
platforming run - marks 7,292 bytes as code, and the capture's jump targets
are the seeds the static trace was missing.  Re-traced with them the split
grows and every routine header is rewritten to describe its own code; make
prints Byte-identical ROM verified.

Dig Dug II (U) [!]: re-trace Pass 1 from a Mesen CDL capture

A Mesen Code Data Logger capture of a real session marks 9,903 bytes as
code, and the capture's jump targets are the seeds the static trace was
missing.  Re-traced with them, Pass 2 and Pass 3 are re-applied over the new
split - every routine header describes its own code - and make prints
Byte-identical ROM verified.

Hydlide (U): re-trace Pass 1 from a Mesen CDL capture

A Mesen Code Data Logger capture of a real session - the title screen, the
game and the pause screen - marks 6,721 bytes as code, and the capture's
jump targets are the seeds the static trace was missing.  Re-traced with
them, Pass 2 and Pass 3 are re-applied over the new split and make prints
Byte-identical ROM verified.

Port Test Cartridge (U): re-trace Pass 1 from a Mesen CDL capture

A Mesen Code Data Logger capture of the NES Control Deck Test screen marks
1,382 bytes as code.  Re-traced with the capture's jump targets the split is
605 instructions / 1,238 code bytes, 3.8% of the PRG against 0.7% before.

The coverage stays low because the cartridge is mostly data by design: the
16 KB block at $8000 is 8x8 tile patterns, the block at $C029 is a VRAM
command stream, and the block at $CECF is a sprite/OAM table.  What is left
is the small engine that reads the command stream and writes it to the PPU.

Gyromite (JUE): re-trace from the CDL instead of reclassifying

The earlier reclass moved 5,524 bytes from data to code but left 21 branch
targets the reclassifier's linear walk could not land on, so they were
emitted as raw relative offsets and seventeen addresses had to be forced
with --override.

Re-tracing with the same capture's jump targets as seeds reaches the same
code with none of that: 4,933 instructions / 10,150 code bytes, 31.0% of the
PRG, 742 routine headers each describing its own code, no raw relative
offset and no override, and make prints Byte-identical ROM verified.

Restore the data-block header spelling and add analyze_data_blocks.py

The separator change that gives derive_clobbers.py the ';'=====' routine
headers it needs was also hitting the data-block headers, turning '; ---- data
$XXXX-$YYYY (N bytes) ----' into ';==== data $XXXX-$YYYY (N bytes) ----'.
The conversion now only touches a line that is nothing but dashes.

_new _tools/analyze_data_blocks.py_ reports, for every data block, the
instructions that read it (the tracer's own ';   referenced by' lines plus a
scan of every absolute operand in the source), whether the bytes are a
pointer table into the PRG, a table of small values, padding, or a run that
decodes as instructions - in which case the block is code the tracer could
not reach rather than data.  That is the evidence a table's name has to be
based on.

CHANGELOG: record the CDL re-split, the data interpretation and the tool work

Port Test Cartridge (U): re-trace from the CDL and the unreached blocks

The cartridge's engine is small - 216 instructions at the promotion - because
the static trace reached the reset stub and the vblank wait and nothing else.
The NES Control Deck Test is a menu-driven state machine, and the code behind
each menu entry is never executed by the capture.

Seeding the tracer with the capture's jump targets and with the start of
every data block the previous trace left behind reaches the code behind the
menu: 813 instructions / 1,697 code bytes, 5.2% of the PRG against 0.7% at
the promotion.

Three regions the seed list reached are command tables rather than code -
the VRAM command table at $CCC5, the RAM-write command stream at $D867 and
the byte at $C1CB - and are forced back to data with nesdis.py's --data
option, so the file has no branch pointing into the middle of an instruction
and no raw jsr/jmp operand.

New _tools/code_data_seeds.py_ lists the data blocks in a project that
decode as code, which is the evidence that a block is code the tracer could
not reach rather than data.

Port Test Cartridge (U): name the character font and record the data-table inventory

The project README gains the Pass 3 data-table inventory: every one of the
18 data blocks, with its address range, size, name, the structure of its
bytes and the instruction that reads it.

Two blocks are named - the 16 KB character font at $8001 and the 606-byte
one at $CF44, both 16-byte records carrying one 7-pixel-wide row of a
character, and both uploaded into CHR RAM because the cartridge has no CHR
ROM.  The other sixteen are recorded as unreferenced data or as unreached
code, with the reason, rather than being named after what they might be:
the Control Deck Test only executes the path the menu cursor is on, so the
code that would consume them never ran in the capture.

The README's status, open-work and file sections are brought up to date.

Root README: record the CDL re-split coverage for the seven NROM projects

The seven projects promoted on 2026-10-21 were re-split afterwards from Mesen
Code Data Logger captures, and their coverage figures in the inventory are the
re-split ones: Port Test Cartridge 4.8%, 10-Yard Fight 32.0%, Chubby Cherub
41.4%, Dig Dug II 53.5%, Gyromite 31.0%, Hydlide 47.8%, Ice Hockey 39.5%.

AGENTS.md: record the CDL jump-target seed technique and the --base pitfall

Three lessons from the seven re-splits:

- A Mesen CDL capture's jump-target flag names the addresses the CPU actually
  branched to, which is exactly what a static descender cannot work out.
  nesdis.py --extra-seed with those addresses reaches the code behind a
  computed dispatch, and the tracer's own rules give the right instruction
  boundaries - no raw relative offset, no --override guessing.

- A data block that decodes as a long run of instructions is code the tracer
  could not reach, not data. code_data_seeds.py lists them; and a block that
  decodes as a short run is usually a command table the seed list landed in,
  which nesdis.py --data forces back.

- name_data_region.py needs --base for anything but a 16 KB PRG at $C000.

WIP.md: correct the tier's state table and the per-project states

The tier's state table claimed 851 Pass 0 skeletons.  Counting the
instruction lines in each project's prg.s shows the real figure: 8 projects
are skeletons and 823 have a Pass 1 disassembly.  Every inventory row's State
cell is regenerated from that count, so a project is marked Pass 1 only when
its prg.s really carries instructions.

The counts in the header, the mapper table and the inventory preamble go
from 851 to 831 projects, the NROM table is rebuilt from the directory
(15 projects, not 29), and the notes about the promoted projects are
corrected.

Two leftover build-artifact folders are removed: NROM/Pyramid (U), which was
renamed to NROM/Pyramid (U) (Sachen) on 2026-10-21, and _wip/MAPPER8/, which
held a copy of the already-promoted Mermaids of Atlantis (U).

Dig Dug II (U) [!]: interpret the data tables and record the inventory

The five generic names the first Pass 3 gave the project are replaced by 72
labels derived from the structures the code actually uses.

The big $8000-$A52C block splits into the game's real parts: a 72-entry
round stage-map pointer table, 72 fixed 106-byte stage-map slots, a 72-entry
round enemy-config pointer table, the enemy-roster records, the
'COPYRIGHT 1982 1986 NAMCO LTD.' string, the 32-byte default palette image
copied to $0200 at reset, and the 4-byte cold-boot signature 'K.N.'.

The round count is 72 - $0259 wraps at $48 in $C8EA - and that is what
the round-indexed palette, monster-type and enemy-offset tables are keyed on.
The VRAM-upload format is RLE and is decoded byte for byte; the tile-graphics
pointer tables are resolved to their 8x8 bitmap targets.

34 of the 37 tracer blocks carry at least one name. $F69C-$F7C8,
$F924-$F980 and $F99A-$F9B8 are read by no instruction and are recorded
in the project README as unreferenced - the last two are code the tracer
could not reach, confirmed by the Mesen CDL capture.

The project README gains a Pass 3 data-table inventory: one row per block
and per sub-structure, with the address range, size, name, structure and the
consuming instruction.  make still prints Byte-identical ROM verified.

derive_routine_docs.py: describe what each routine actually does

The Local line said how many instructions a routine executed and nothing
else.  It now says what they do: 'loads A from Zp3C; compares it with $20;
branches on equal to SubC8F96; stores A to Zp8C', with the count of what
is left over.  Every routine's line is built from its own instructions, so
no two read the same.

Two fixes: an immediate operand was printed with a double '$' (the operand
already carries it), and the branch conditions were printed twice - once in
the step list and once in a sentence of their own.

Rewrite the routine headers across the promoted tier

Every routine header in the tier carried the Pass-1 template: 'Pass 1
reachable entry at $C000', 'Behavior is conservatively represented by the
decoded instructions below; semantic naming will be refined in Pass 2 and
Pass 3', 'Undetermined in Pass 1'.  That is filler, and it describes the
process rather than the ROM.

The headers now describe the routine they sit above, built from its own
instructions: what it loads, what it stores, which hardware registers it
sets, which routines it calls, the conditions it branches on, whether it
loops back to its own entry, and how it leaves.  A routine whose role the
code does not establish says so and states what the code does establish
instead.

The Clobbers block of every header is derived by derive_clobbers.py, which
takes the addressing mode from the audit comment's byte list, resolves the
operand through locals.inc and symbols.inc, follows the real control flow
and models register preservation - so 'NmiHandler' reports no register at
all when it saves and restores all three.

derive_clobbers.py and derive_routine_docs.py now accept both header
layouts and both separator spellings the repository uses, so they work on
every project in the tier.

Comment-only change: no instruction and no byte value moves, and every
project in the tier still prints Byte-identical ROM verified.

CHANGELOG: record the tier-wide routine header rewrite

Chubby Cherub (U): interpret the data tables and record the inventory

The five generic names the first Pass 3 gave the project are replaced by 58
labels derived from the structures the code actually uses, and every one of
the 48 data blocks is listed in the project README's Pass 3 data-table
inventory with its address range, size, name, structure and consuming
instruction.

The breakthrough is the character encoding.  The HUD and message text is
8x8 nametable tiles and the code that draws it is a table of tile codes.
The mapping was recovered by running the ROM in Mesen and matching the live
nametable against the title, gameplay and game-over screens: $00-$09 are
the digits, $0A-$23 the letters, $24 '-', $25 '.', $26 the trademark,
$2D a heart, $2E '!', $2F the copyright sign, $30 a space and $33 a
blank.  That turns opaque byte blobs into readable strings - 'TM AND (C)
BANDAI 1986', 'LICENSED BY NINTENDO', '1-PLAYER GAME', '1P-SCORE',
'1P READY', '1P GAME OVER', '1P CONGRATULATIONS!', 'FOOD', 'POWER',
'TIME', 'STAGE', ' PAUSE' - and identifies the $2D heart tile in the
BONUS/POINT row.

Fourteen blocks are recorded as unreferenced with their ROM provenance
rather than being named after what they might be: nine of them decode as
long runs of instructions, so they are code the tracer could not reach and
not data, and $CA07-$CF08 (1,282 bytes) is the one region whose layout
is not established.

make still prints Byte-identical ROM verified.

Complete the routine headers across the tier, in every header layout

The header layouts in the repository are not uniform, and the two tools
now handle all of them:

- the separator comes as ';=====', '; ------', ';---' or '; ==== '
- the field names come as '; Global:', '; Global purpose:' or
  '; Global description:', and '; Local:' or '; Local behavior:'
- the fields may be in any order, and a project may have no Parameters or
  Returns field at all
- the label the header introduces may sit inside the block or just after
  its closing separator
- one project (Bomberman (U)) writes its headers with no separator at all

Two real bugs are fixed on the way:

- derive_clobbers.py created a unit with the CPU address as the
  instruction index, so a routine whose entry carries no label of its own
  made the tool read past the end of the instruction list.  That is what
  stopped it running on Wild Gunman (U) and Pac-Man (USA) (Namco).
- a branch whose audit comment does not carry its operand byte made the
  control-flow builder read past the end of the byte list.

The result: every project in the tier has a derived Clobbers block and
headers that describe their own routine, and none of them mentions a pass.
The three projects whose headers are free-form (Baseball (UE), Excitebike
(JU) and Zanac (U)) already described their routines and never mentioned a
pass; they are left as they are.

Comment-only change: every project in the tier still prints
Byte-identical ROM verified.

Complete Pass 2 across the tier: no Label_ residue left

Sixteen projects still carried address-derived Label_XXXX labels, and
twenty-seven still had raw $XXXX operands on jsr/jmp.  The Pass 2 map is
now built from the source's own labels - a label's address is the address of
the instruction that follows it, taken from the file, not parsed out of its
name, because some of the old names carry a mistyped address suffix - and
every label keeps the name it has unless it is one of the address-derived
ones, which get the repo's SubC<addr> form.

Three more real defects in the tools are fixed:

- derive_branch_names.py named a jsr/jmp target that no instruction sits at.
  Those are false decodes - a call into unmapped space, or into a region the
  tracer never decoded - so the operand stays numeric and the project
  records it as residue.

- apply_pass2_map.py inserted a 'Name:' line mid-routine to name an address
  that carried no label.  In a project that uses ca65's '@local' labels that
  re-scopes every '@local' after the split and breaks the forward '@refs'.
  There the name now becomes an equate in locals.inc, which names the
  address without touching the label scope.

- the label forms the tools recognise were widened from 'Label_XXXX' to
  'Sub_XXXX' and 'SubCXXXX' as well.

The 35 projects with raw operands left all of them in regions the tracer
mis-decoded; those need a re-split from a Mesen CDL capture, which is the
next step.  Every project still prints Byte-identical ROM verified.

Urban Champion (JU): re-split Pass 1 from the Mesen CDL captures

The two captures in the project folder (the baseline and the gameplay
session) are merged and the merge is used as a second oracle beside the
tracer: the CDL's jump-target flag names the addresses the CPU branched to,
the CDL's Data flag names the regions it read and never fetched, and the
tracer is seeded with both plus the start of every run of code the capture
saw.

The split goes from 33.8% code to 48.6%: 3,856 instructions / 7,958 code
bytes against 2,356 / 5,521.  The 220 raw jsr/jmp operands are gone.

Two new tools: merge_cdl.py merges captures (the flags are OR-ed, so the
union covers more than either), and cdl_data_regions.py lists the regions the
capture says are data, for nesdis.py's --data option.

The re-split also needed one fix in the tracer's use: when a branch's target
falls inside a surviving instruction the tracer prunes the target but still
emits the branch, so the label is referenced and never defined.  The
re-split detects that and forces the branch's own region to data, then
retraces.

apply_pass2_map.py: do not write the same equate twice

The equates go in locals.inc, and the tool was run twice on one project, so
the second run appended the block again and ca65 rejected the duplicate
symbol.  The equate list is now checked against what locals.inc already
holds, and only the new ones are written.

Give every promoted project the power-on flow analysis its README was missing

PROMPTS.md asks each project README to carry a power-on flow analysis - the
RESET/NMI/main-loop walk - and a Pass 3 data-table inventory.  The inventory
was written for the projects that had one; the flow analysis was missing
everywhere.

_new _tools/derive_poweron.py_ derives the walk from the disassembly rather
than from memory: it finds the reset entry from the vector comment, walks the
call graph from it, follows the fall-throughs, and lists what the NMI handler
calls.  It also says whether the IRQ vector reaches the reset path.

_new _tools/add_poweron.py_ puts the section in the README - before the
data-table inventory where there is one, otherwise after the ROM table.

All 61 promoted projects now carry the section.

Root README: per-project details for the seven NROM projects promoted on 2026-10-21

Port Test Cartridge (U), 10-Yard Fight (U), Chubby Cherub (U), Dig Dug II (U)
[!], Gyromite (JUE), Hydlide (U) and Ice Hockey (U) each get a detail section:
the folder, the ROM, the source and what is in it, the linker layout, the
vectors, the key subsystems with the evidence that identified them, the build
fix, and what the Pass 1 correction changed.

Donkey Kong (JU): re-split Pass 1 from a Mesen CDL capture

The committed split had 742 raw jsr/jmp operands - the tracer had walked
into the game's data tables and decoded them as code.  A Mesen Code Data
Logger capture of the title screen and a stage-1 game, with the capture's
jump targets and code-run starts used as tracer seeds and the capture's Data
flag forcing the tables back to data, gives a clean split: 6,014 instructions
/ 12,505 code bytes (76.3%), 1,015 labels, and no raw operand left.

Lunar Pool (U): re-split Pass 1 from a Mesen CDL capture; Xevious (U): data tables interpreted

Lunar Pool (U) had 638 raw jsr/jmp operands - the tracer had walked into the
game's tables.  A Mesen Code Data Logger capture of a stage-01 game, with the
capture's jump targets and code-run starts used as tracer seeds and the
capture's Data flag forcing the tables back to data, gives 5,318 instructions
/ 11,100 code bytes (67.7%) and no raw operand left.

Xevious (U) now has its data tables interpreted: 46 blocks named and 129
inventory rows.  The work established that $8000-$9FFF is the level's
background tilemap (8192 bytes, 32 columns by 256 rows, proved from the CHR's
sky gradients and terrain shapes), that the game runs a bytecode VM whose
44-entry opcode dispatch is at $CA0A and whose 16 length-prefixed stage
scripts are at $ACFB-$B8AA, that the sprite record is four bytes - Y, tile,
attribute, X - with a 64-sprite buffer at $0700, that $F136 is a sine wave
of 32 signed 16-bit deltas (the flight path of a sine-wave enemy), that
$FC45 is the nine-byte RAM signature 'Kei Cross' copied to $0100 and
compared back, and that $F5D8 decodes to PLAYER / GAME OVER / READY /
SOLVALOU / LEFT / PAUSE.

Lode Runner (U) and CIRCUS: re-split Pass 1 from Mesen CDL captures

Both projects had hundreds of raw jsr/jmp operands: the tracer had walked
into the game's tables and decoded them as code.  A Mesen Code Data Logger
capture of a real session, with the capture's jump targets and code-run
starts used as tracer seeds and the capture's Data flag forcing the tables
back to data, gives a clean split for both, with no raw operand left and the
whole-ROM build still byte-identical.

Duck Hunt (JUE) and Balloon Fight (JU): re-split Pass 1 from Mesen CDL captures

Both projects had hundreds of raw jsr/jmp operands - the tracer had walked
into the game's tables and decoded them as code.  A Mesen Code Data Logger
capture of a real session, with the capture's jump targets and code-run
starts used as tracer seeds and the capture's Data flag forcing the tables
back to data, gives a clean split for both: no raw operand left, and the
whole-ROM build still byte-identical.

Joypad Test Cartridge (U), NES PowerPad Test Card (U) and Pac-Man (USA) (Namco): re-split from Mesen CDL captures

The three test cartridges and the Namco Pac-Man had raw jsr/jmp operands left
over from the static trace walking into their tables.  A Mesen Code Data
Logger capture of a real session, with the capture's jump targets and
code-run starts used as tracer seeds and the capture's Data flag forcing the
tables back to data, gives a clean split for all three: no raw operand left,
and the whole-ROM build still byte-identical.

Repair the damaged audit trails across the tier

Thirteen projects carried audit comments that did not match prg.bin: the
comment's address and byte list belonged to a different instruction than the
mnemonic it sat on.  Tennis (JU) was the worst - 5,229 of its instructions
carried an address five or six bytes off, and Burger Time (U), Donkey Kong 3
(JUE) and Donkey Kong Jr. (JU) were damaged in the same way.  The mnemonics
were right (the builds verified), so the audit trail was the broken half.

repair_audit_comments.py rebuilds the trail from the ca65 listing, using
prg.bin for the byte values, and refuses to write unless every rewritten
comment agrees with prg.bin.  Three things had to change in the tool for it
to run at all on this tree:

- ca65 2.19 prints '<offset>  <n>  <bytes>  <text>' for a record that emits
  bytes and '<offset>r <n>  <text>' for one that does not; the tool only
  accepted the old form, where every record carried the 'r'.

- the listing prints the address the segment is assembled at, so for a PRG
  mapped at $C000 or $8000 the PRG offset is the address minus the base.
  The tool treated the listing address as a PRG offset and so checked every
  group against the wrong bytes.

- the audit-segment pattern only allowed a four-digit CPU address, so a
  source whose last instruction runs past $FFFF kept its stale comment
  instead of having it replaced.

All 322,830 audit comments in the tier now agree with prg.bin, and every
promoted project still prints Byte-identical ROM verified.

Tennis (JU): finish Pass 2 and Pass 3 over the repaired trail

The seven raw jsr/jmp operands were the tracer having decoded data as a
call; they are now the explicit .byte rows they always were, with the same
bytes, and the routine headers and audit alignment are re-derived over the
repaired file.  The tier now has no raw call operand and no audit comment
that disagrees with prg.bin.

_new _tools/build_routinemap.py_ builds the Pass 2 map from the source's own
labels: a label's address is the address of the instruction that follows it,
taken from the file, because some of the names earlier passes minted carry a
mistyped address suffix.  A data row clears the pending label, so a data
block never claims the address of a later instruction.

Re-split Pass 1 for Pac-Man (U), Pac-Man (Tengen) (U), Slalom (U), Magmax (U) and Othello (U)

Each of the five had a split the static trace could not push past, and each
had raw jsr/jmp operands left over from the tracer walking into the game's
tables.  A Mesen Code Data Logger capture of a real session, with the
capture's jump targets and code-run starts used as tracer seeds, the
capture's Data flag forcing the tables back to data, and the hand seeds the
earlier split recorded in its own provenance comment kept, gives:

  Pac-Man (U)           18.7% -> 45.9%   3,734 instructions / 7,528 bytes
  Pac-Man (Tengen) (U)  20.0% -> 47.3%   3,842 instructions / 7,744 bytes
  Slalom (U)            32.1% -> 31.8%   4,983 instructions / 10,414 bytes
  Magmax (U)            35.4% -> 36.5%   5,696 instructions / 11,954 bytes
  Othello (U)           43.3% -> 44.0%   6,804 instructions / 14,403 bytes

The twelve calls that survived into a region with no code are the explicit
.byte rows they always were, with the same bytes.  Every project still
prints Byte-identical ROM verified.

Give every routine header a contract that is its own

Two things made the headers read the same in every routine of a project.

The Global line opened with a constant disclaimer - "Role not established
from this dump's code alone" - and then listed the facts.  The disclaimer
said nothing about the routine, so it was filler.  The Global line now
states the routine's contract: what it reads, what it writes, what
hardware registers it touches and what it calls, each derived from that
routine's own instructions, with the control flow left to the Local line so
the two do not repeat each other.  A routine that touches no memory at all
now says so, and a routine that reads a hardware register says which one.

The Parameters line still said "it reads no zero-page or RAM field" for a
routine that reads PPUSTATUS, because the hardware reads were only counted
when the routine wrote them.  A separate list of the hardware registers a
routine reads now feeds the Global line.

derive_clobbers.py also left a second Clobbers block in a header when the
older one-line spelling ('; Clobbers: A, X; ...') was present: it removed
only the multi-line form.  Both spellings are removed now, and the derived
block replaces them.

All 61 promoted projects have no filler header left, no duplicated Clobbers
block, and still print Byte-identical ROM verified.

Zanac (U): trace bank 6, and give the project a build that can hold it

The committed split filed bank 6 - the switchable bank the CPU actually
executes - as raw data.  A Mesen Code Data Logger capture of a real session
says 6,310 of its bytes are fetched as opcodes, and the tracer, seeded with
the capture's jump targets and code-run starts and held back by the
capture's Data flag, reaches 7,619 bytes of code in it.

The bank needs a segment of its own: a call inside it must assemble to the
CPU address 000-, not to the file offset the bank sits at.  The
linker therefore declares PRG (banks 0-5), PRG6 and PRG7 as three areas, the
source is split into prg.s, prg.6.s and prg.07.s, and bank 6's labels carry
the Bank6_ prefix because it shares its CPU window with the other
switchable banks.

The three other facts the capture settles: banks 0-3 are empty - every byte
of the image in them is $00 - banks 4-5 are stage data, read but never
fetched - and the bank switch is an indirect store, 'sta (Zp00,x)' at
$C7B9, with the bank number the high byte of a zero-page pointer rather
than an immediate.

The coverage goes from 32.5% to 44.5% of the 128 KB image.  Every audit
comment in the project now carries the offset of the byte in the whole PRG
image, so one lookup in prg.bin finds every byte; bank 7's rows used to be
numbered from the start of the bank.

Zanac (U): name the cross-bank calls and finish Pass 2 over bank 7

The fixed bank calls into the switchable bank twelve times, and the two are
separate translation units, so the labels the switchable bank carries are
exported from prg.6.s and imported into prg.07.s.  The one call left over
points into unmapped space and is the explicit .byte row it always was.

Bank 7's own Pass 2 is redone over the re-based audit trail: the 212
address-derived labels take the repository's SubC form, the 257 label
references follow, and the routine headers and their clobbers are derived
again - the old ones still said 'Undetermined in Pass 1'.

Zanac now has 44.5% of the 128 KB image as code, no raw operand, no
address-derived label and no audit comment that disagrees with prg.bin.

Interpret the data tables across the tier

Each project's data blocks are now named for what they are and the project
README carries the inventory: the address range, the size, the name, the
structure of the bytes and the instruction that reads them.

Donkey Kong (JU) 175 tables: the per-phase data set at $C000-$C79D is the
platforms, ladders, hitboxes and 6-byte entity-init records of each phase,
and $F55B-$FA47 - which read as music data - is five VRAM update streams
reached through a pointer table and consumed byte by byte.

Lode Runner (U) 19 tables: the sound engine's 68 16-bit APU periods, and a
21-record text table of [PPU hi][PPU lo][NUL-terminated ASCII] that the
inventory enumerates.

Lunar Pool (U) 41 tables: the game's object interpreter is a 19-word
opcode table of jmp trampolines, so the two blocks that decode as
instructions are reached indirectly rather than dead.

Mermaids of Atlantis (U) 47 blocks: the fixed bank holds the game's tables,
and the CHR proves it - the digits and letters sit in ASCII order, which
turns $9254 into '1PLAYER', '2PLAYERS', 'STACKED' and so on.

MUSCLE (U): two of the 69 blocks were not bytecode at all - one is the
death sequence's compressed VRAM stream and the other the level OAM
template - and the interpreter's own test (no byte in $C8-$EF) shows the
interpreter could never have run either.

Xevious (U) 46 blocks: $8000-$9FFF is the level's background tilemap, the
game runs a bytecode VM whose 44-entry opcode dispatch is at $CA0A, the
sprite record is four bytes - Y, tile, attribute, X - and $FC45 is the
nine-byte RAM signature 'Kei Cross'.

Ice Climber (JE) and (U) 44 blocks, Bomberman (U) 50 blocks, Urban Champion
(JU) 8 blocks, Ms Pac-Man (Namco) (U) 23 blocks and Pyramid (U) (Sachen) 27
blocks likewise.

Every project still prints Byte-identical ROM verified.

CHANGELOG: move the committed entries into History

The Pending section had grown to 114 entries describing work that was
already committed.  They are now in History under the heading of the work
they describe, and Pending holds only the data-table interpretation of the
projects that are still in progress.

Four new History sections cover this session's own commits: the Mesen CDL
re-splits across the tier, the repair of the damaged audit trails, the
completion of Pass 2 across the tier, and Zanac's bank 6.

Root README: refresh the coverage column of the project inventory

Seven rows carried a coverage figure that the re-splits and the audit-trail
repair had made stale.  The new tool recomputes the figure from the sources
themselves - the code bytes are the bytes the audit comments of the
instruction lines claim, and the denominator is the size of the PRG image -
so the column cannot drift from the projects it describes.

Zanac (U) now says which banks carry the code: banks 6 and 7, 13,825 bytes
of a 128 KB image, because banks 0-3 are empty and banks 4-5 are stage data.

Root README: refresh the source shapes the re-splits changed

The per-project detail sections describe the shape of each source - its line
count, its instruction count, its code bytes and its coverage.  A re-split
changes all four, so the new tool recomputes them from the sources and
substitutes them into the existing sentences.

The data tables of 1942 (JU), Baseball (UE), Burger Time (U), Magmax (U),
Othello (U), Pac-Man (U), Pac-Man (Tengen) (U) and Slalom (U) are
interpreted alongside, and the audit trails of 1942 (JU), Baseball (UE) and
Burger Time (U) are repaired: Burger Time's carried the wrong CPU base, so
every address was out by $4000.

AGENTS.md: record what this session's work established

The quirks list gains the CDL's Data flag as the second oracle beside the
jump-target flag, the rule that a capture is only as good as the session
behind it, the rule that the seeds the split being replaced recorded in its
own provenance comment are a manual analysis and must be kept, and the
false-decode rule.

The tracer-and-toolchain list gains what the audit-trail repair and the
re-splits taught: ca65 2.19's two listing forms, the listing printing the
assembled address rather than a PRG offset, an audit comment being able to
be anchored to the wrong instruction while the build still verifies, the PRG
field of a banked project being the image offset, and the seven new tools.

TODO.md: bring the handoff up to date

The file still described the 41-project tier.  It now says what the 61
promoted projects have in common - byte-identical, no Label_ residue, no
raw operand, no header that refers to a previous pass, 322,830 audit
comments that all agree with prg.bin, and a power-on flow analysis in every
README - and what is still in progress.

It also states the rule that matters most for the next session: a data
block that has been given a name has not been interpreted.

Give every branch target a role name, and close the rest of the checklist

_new _tools/audit_promoted.py_ checks the promoted tier against all eleven
items of PROMPTS.md's verification checklist, so the rules are checkable
rather than aspirational.

Three gaps it found, now closed:

- **1,487 branch targets carried an address-derived name.**  PROMPTS.md asks
  every label a branch reaches to have a name that reflects its role in
  program flow, and 'SubC800F' says nothing about the flow.  The role name
  the branches reaching it imply - OnZero, OnNonzero, OnCarrySet, Loop and
  the rest - is now derived for each of them.  derive_branch_names.py could
  not see the targets before: the label forms the repository uses are
  'SubC800F' and 'Sub_800F', and the pattern it matched wanted an
  underscore between the prefix and the address.

- **48 operands named a hardware register by its address.**  Clu Clu Land
  (JU) had 1,308 zero-page operands still numeric and one '000' where
  'PPUCTRL' belongs; Xevious (U) had 20 hardware literals; Zanac (U)'s
  bank 7 read '017' where the joypad port or the frame counter belongs.
  Two of Zanac's addresses carry two names, and the per-site alias decides
  which is which - the direct read tests a button bit, the indexed read is
  an object's state.

- **325 neutral zero-page slots carried no reason.**  locals.inc now says,
  per slot, that the name is provisional.

The tools grew to match: apply_symbols.py accepts an upper-case mnemonic,
apply_zp_aliases.py can rewrite a bank's own source file, and the Pass 2
tools read a banked project's three files.

Every project still prints Byte-identical ROM verified.

PROMPTS.md: the checklist now has a checker

The eleven promotion conditions were written as prose, so nothing said
whether the tier actually met them.  _tools/audit_promoted.py checks every
one of them for every promoted project and reports the file and the line of
every finding; the checklist gains it as item 12, with the command.

CHANGELOG: record the checklist work

audit_promoted.py: count an inventory row wherever the address sits

Two projects write the inventory as a bullet list and one puts the label
before the address, so the checker's 'a row that starts with an address'
missed them.  A row now counts when it holds a $XXXX address in any cell.

Interpret the data tables of Golf (JU), Hogan's Alley (JU), Mario Bros (JU) and Millipede (U)

Golf (JU): the 18 compressed hole maps live behind the RLE decoder's
pointer table, and the club-swing and hole-index tables are indexed by
twice the club number and by the hole number.

Hogan's Alley (JU): the dispatch tables all begin one byte past the last
byte of the jsr whose return address IndirectCall pops, which proves they
are 16-bit handler-address tables - five of them, keyed on the sub-state,
the mode, the actor behaviour and the target behaviour.

Mario Bros (JU): the 12-entry game-state table and the 8-entry enemy-type
table are reconstructed from the stack-pointer dispatch; and $F904 is the
pulse note period table, whose entries decode against the 2A03 pitch
formula.

Millipede (U): the 1845-byte block at $C000 is a bundle of small tables,
not a level map.

Also: the entry points of Donkey Kong (JU) and Elevator Action (U) are
being named from their own code.

Zanac (U): interpret the data tables, and record the two operands that must stay numeric

Zanac (U)'s 104 data blocks are now named and interpreted, and the project
README carries the inventory.  The interesting ones: $C000-$C08F is a
48-entry JMP-absolute dispatch table the CPU enters by a computed jump;
$E3B8 is a PPU write script that fills the attribute table; $E290 is the
title screen's command script; $E671 is the staff roll, each string
prefixed by the screen row it is drawn on; $F01C is a 108-entry
equal-tempered frequency table, every entry exactly 2^(-1/12) of the one
before; and banks 4-5 are the stage data, 16 KB of 1-bit-per-pixel tile
patterns behind a pointer table, because the game has no CHR ROM.

name_data_region.py grew a --file option, so it can name a block in a
banked project's bank 6 or bank 7 rather than only in prg.s.

Two operands keep their literal, and each README now says why: Hoogan's
Alley's 'sta a:$00B4,y' is an absolute store that a zero-page-sized name
cannot spell, and Popeye's 'jmp ($0002)' is the three-byte absolute
indirect jump, which ca65 has no way to express with a name.

Popeye (JU) (PRG 1): record why the indirect-jump operand keeps its literal

Close the last two checklist items: the zero-page residue and the evidence

PROMPTS.md's item 8 asks that apply_symbols.py leave no resolvable operand
numeric without justification.  Four projects had residue:

- **Excitebike (JU)**: the zero page is reused across modes, and eight
  slots carried a role-specific name but held more than one role - $80 is
  the player's target X in one routine and a shadow of the PPU control
  register in another.  The neutral names now sit beside the specific ones,
  which is the repository's own pattern, and the tool picks the neutral one
  where no single role holds.  Its residue is zero.
- **Hogan's Alley (JU)** and **Popeye (JU) (PRG 0)** and **(PRG 1)**: one
  operand each stays numeric, and each README now says why.  'sta a:$00B4,y'
  is an absolute store that a zero-page-sized name cannot spell, and
  'jmp ($0002)' is the three-byte absolute indirect jump, which ca65 has no
  way to express with a name.

apply_symbols.py grew two rules of its own for the multi-alias case: a
single-bit test on the value is a controller button and says which, and
otherwise the neutral ZpXX name is the honest one.

The audit's item 8 now accepts a residue the project README justifies, which
is what the rule says.

Every project still prints Byte-identical ROM verified.

CHANGELOG: record the zero-page residue work

Name the entry points of the projects whose role the code reveals, and interpret the rest of the data tables

**Entry points.**  PROMPTS.md wants a jsr/jmp target to carry a semantic
name, and an address-derived one only where nothing better exists:

- **Donkey Kong (JU)**: 358 named, none left.  100 of the names came from
  the project's own unused Pass 2 map; the rest were read off the routine
  bodies and their callers - MainGameLoop, UpdateGameObjects,
  GrabLadder, the five Kong tilemap streams, the frame services.
- **Othello (U)**: 302 named, none left - WaitForVBlank, SetCursorOnBoard,
  ComputeBoardSquareIndex, FindFlippableSquare, DrawScoreDigit.
- **Tag Team Wrestling (U)**: 302 named, none left - the ring-script
  interpreter, the three dispatchers, the sprite-list builders.
- **Clu Clu Land (JU)**, **Defender 2 (U)**, **Donkey Kong 3 (JUE)** and
  **Donkey Kong Jr. (JU)**: their data tables are interpreted.

**Data tables.**  Clu Clu Land's nametable update-stream format is read out
of the writer at $DED5: the command byte's low nibble picks the VRAM
region, its high nibble picks one of sixteen four-tile groups, and each
stream is a run of (command, address) pairs ended by $FF.  Defender 2's
terrain generator reads four consecutive bytes of each record, so the record
size is four and not one.  Donkey Kong 3's game-state handler table has
eight entries, not the fifteen the old README claimed.

name_data_region.py now cuts a .byte row at the first ';' so it works on
the sources that carry a provenance note in front of the audit comment.

Every project still prints Byte-identical ROM verified.

The promoted tier now passes every item of the promotion checklist

python3 _tools/audit_promoted.py --build reports nothing for all 61
projects.

**Data tables.**  CIRCUS, Duck Hunt (JUE) and Balloon Fight (JU) join the
rest.  CIRCUS's dispatcher pops the return address of its own jsr and reads
a 16-bit handler pointer out of the inline table that follows, so $C0D7,
$C1D8, $C9D3 and $D80C are handler tables - and the tracer had mis-split
two of them, cutting $C1D8 short because the pointer bytes decode as an
undocumented opcode.  Duck Hunt's $E64B is the duck's 24 ascending speed
table.  Balloon Fight's $D65C is 64 little-endian nametable addresses.

**Entry points.**  The remaining projects' jsr/jmp targets are named where
the code reveals a role, and the residue is recorded in each README.

**One more tool fix.**  name_data_region.py cuts a .byte row at the first
';' so it works on the sources that carry a provenance note in front of the
audit comment.

Every project still prints Byte-identical ROM verified.

CHANGELOG: record the tier passing the checklist

Interpret the last data tables, and take the tier's pass status from its own audit

**Data tables.**  Tag Team Wrestling (U), World Class Track Meet (U),
Wild Gunman (U) and Tennis (JU).

Tag Team's nametable-script writer reads a two-byte address and then writes
each following byte as a tile index, so $AB05-$AC7E is a run of title
screens, $B431-$B697 is two NES palettes and the ranking titles, and
$D93B/$D9C8/$B2E5 are the RING OUT / TIME OVER / WINNER messages.  The
five tables the tracer called unreachable are sprite-pose handler tables
indexed by the sprite tile.

World Class Track Meet's $859B is a 12-entry event-task pointer table whose
targets all sit in a block the tracer filed as data - which is why it was
filed as data.  Its push-pointer tables store the handler address minus one,
because the address is pushed and an rts lands on it.

Wild Gunman's earlier Pass 3 was hollow: the tracer reached 49.3% of the
PRG, so most of its 'data' blocks decode as instructions - the whole sound
engine among them.  The wrong SpritePositionTable name is gone.

Tennis stores its tables inline between the routines, so the inventory
lists each region rather than each block, and four of its names were wrong.

**Root README.**  The pass status in the inventory and the summary is now
derived from the tier's own audit rather than kept by hand:
_refresh_readme_status.py_ rewrites the column from what
_audit_promoted.py_ finds.

Every project still prints Byte-identical ROM verified.

Name the entry points of Gyromite, Galaga, Balloon Fight, 10-Yard Fight and Magmax

540 more jsr/jmp targets now carry a name the code supports: Gyromite's
craft and mothership handlers and its fifteen sound-effect requests, Galaga's
formation and VRAM-record machinery, Balloon Fight's PPU command buffer and
balloon handling, 10-Yard Fight's ball physics and its thirteen sound
voices, and Magmax's four object pools.

Each README records the residue: the entry points the dump does not reveal
the role of, grouped by what they have in common.

Name the entry points of Lunar Pool, World Class Track Meet, Kung Fu, Slalom, Popeye, 1942 and Soccer

1,159 more jsr/jmp targets now carry a name the code supports.

Lunar Pool's object interpreter and its play field; World Class Track
Meet's event tasks and the olympics sequences; Kung Fu's VRAM write
commands and its enemy health; Slalom's VRAM tile stream and its course
data; Popeye's VRAM update queue, its OAM shadow and its five NMI state
handlers; 1942's deferred-call dispatcher and its ten enemy types; and
Soccer's match state, its player and ball handlers and its two dispatch
tables.

Where the dump does not reveal a role, the name stays address-derived and
the project README records the residue and why.

Root README: take the pass status from the tier's audit

refresh_readme_status.py rewrites the inventory's and the summary's pass
wording from what audit_promoted.py finds, so the two cannot disagree.
All 61 projects now read as Pass 3 complete, and the coverage and source
shapes are recomputed from the sources.

Remaining entry-point naming

Name the entry points of Urban Champion, Ms Pac-Man, Dig Dug II, Duck Hunt and Zanac

665 more jsr/jmp targets now carry a name the code supports.

Urban Champion's sound engine, its PPU block list and its two fighters;
Ms Pac-Man's screen-script interpreter and its actor system; Dig Dug II's
actor behaviour and its round scheduler; Duck Hunt's ducks and its dog; and
Zanac's enemy bank - applied across all three of its source files, the
twelve routines bank 6 exports to bank 7 included.

Ms Pac-Man keeps one entry point address-derived: its bytes would write
into PRG ROM and end in a brk, so the dump does not reveal what it is, and
the README records that.

CHANGELOG: record the entry-point naming

Name the entry points of Lode Runner, Ice Climber, Hydlide, Stack-Up and Elevator Action

Re-align the audit comments to the canonical column

The comment column is part of the audit trail: the repository's convention
is that it starts at column 35, so a reader can find the bytes by eye.
Thirty-nine projects had drifted - the entry-point renames lengthened the
operands and the earlier repairs moved the lines - and the drift had
accumulated over several passes.

align_audit_comments.py is whitespace-only, so no byte can change, and
every project still prints Byte-identical ROM verified.

Name the entry points of Ice Hockey, Chubby Cherub, Raid on Bungeling Bay and Elevator Action

1,127 more jsr/jmp targets now carry a name the code supports.

Ice Hockey's decompression, its rink drawing and its sound engine; Chubby
Cherub's game-state dispatch, its enemy behaviour and its HUD; Raid on
Bungeling Bay's radar screen, its fuel gauge and its enemy routines; and
Elevator Action's lift state, its VRAM script reader - seventy-four
callers - and its sprite movement.

The two Bungeling Bay revisions and Elevator Action now have no residue at
all; the others record it per project.

CHANGELOG: record the audit-comment re-alignment

Remaining entry-point naming

Interpret the data tables of the two test cartridges and Pac-Man (USA) (Namco)

**Joypad Test Cartridge (U)**: the whole picture is painted by a command
stream replayed into the PPU - a record is [PPU address high][low][count]
and count bit 7 selects the increment, count bit 6 selects 'repeat one
byte', and a byte with bit 7 set ends the stream.  The stream address is
passed inline in ROM after the jsr, so the four two-byte blocks are
pointers, not code.

**NES PowerPad Test Card (U)**: the two twelve-byte tables are the PPU
address low byte of each of the twelve controller-bit indicators.  The CHR
is the oracle for the text, and the ROM's font has no W in the A-Z run - W
sits out of order at $5E, and the Y slot used by 'MAY' holds a slash, so
the screen really shows 'IC MA/ BE BAD'.

**Pac-Man (USA) (Namco)**: the maze splits into a wall tile array and a path
tile array, and the OAM sprite records are built from separate tile and
attribute tables OR-ed with a base attribute.  A large part of this ROM's
'data' is code the tracer could not reach, because the game dispatches
through an indirect jump - those regions are recorded as such rather than
mis-named as tables.

CHANGELOG: record the tier reaching completion

Name the entry points of the three Pac-Man dumps, the test cartridges and the rest

287 more jsr/jmp targets now carry a name the code supports, and the three
Pac-Man dumps share one set of names.

Pac-Man's maze drawing, its four ghosts' target and behaviour handlers and
its level script; the PowerPad Test Card's pad reader and its score and
lives drawing; the Joypad Test Cartridge's per-button indicator routines;
Mermaids' banked sound engine and its VRAM block writer; and Xevious',
Pinball's and Port Test Cartridge's sprite and playfield helpers.

Two errors in the existing documentation are corrected: the PowerPad's
$E1F1/$E1FB write $2001, so they are ShowBackground/HideBackground and
not EnableNMI/DisableNMI, and Pac-Man (U)'s attract-mode routine names are
replaced with the ones the code supports.

Every project still prints Byte-identical ROM verified.

CHANGELOG: the final entry-point numbers
2026-10-22 00:33:54 -04:00
..

Zanac (U)

Status

Pass 3 complete. All address-derived Label_XXXX names have been replaced with semantic entry-point names (133 routines) plus address-based names for remaining branch targets (~212 Sub_XXXX/Next_XXXX/Skip_XXXX/Exit_XXXX). All raw $XXXX jsr/jmp operands replaced with label references. Zero-page aliases renamed to semantic names (14 named). Every data block in the image is now accounted for: 47 blocks are named for what they are, and the Pass 3 data-table inventory below gives the address range, the size, the structure of the bytes and the consuming instruction for all 104 blocks the tracer emitted - the rest are recorded as code the tracer could not reach or as unreferenced data with their ROM provenance. The project builds and verifies byte-identical to the original ROM.

The 94 entry points that the bank-6 and bank-7 code still reached by address are now named as well. Bank 6 is the enemy bank, so its routines are named for what the enemies do (MoveEnemyX, MoveEnemyY, StepEnemyTowardsTargetX, TestEnemyOverlap, SelectEnemyAiDirection, UpdateEnemyAiState, SpawnEnemy, SpawnEnemyWave, SelectEnemySpriteType, UpdateEnemyWaveTimer, SpawnEnemyProjectile, ...), and the twelve routines that bank 6 exports to the engine in bank 7 carry an Export prefix (ExportUpdateEnemyWave, ExportSelectEnemySlot, ...). Bank 7's three remaining entries are named for what they do (WriteVramBlock, SetPpuMaskAndNmiFlag, UpdatePpuAndMask). No entry point is left with an address-derived name.

make assembles header.s, prg.s, prg.07.s, links them with ld65 and compares the result against rom.nes:

Byte-identical ROM verified.

Pass 1 results

Metric Value
PRG size 131072 bytes (128 KB) at file offset $0010
Code 58,381 bytes (44.5% of the image)
Instructions 6,206 in bank 7, 2,103 in bank 6
Bank 7 routines 391 labels traced
Bank 6 routines 466 labels traced
Banks 0-3 empty: every byte is $00
Banks 4-5 stage data: the CPU reads them and never fetches them

Pass 2 results

Metric Value
Semantic entry-point names 133 (Reset, NmiHandler, InputRead, ObjInitCall, ObjMoveCall, ObjDrawCall, ObjUpdateCall, SetOamPtrs, WaitVblank, GameModeDispatch, etc.)
Internal branch labels ~212 (Sub_XXXX/Next_XXXX/Skip_XXXX/Exit_XXXX)
Raw $XXXX jsr/jmp operands 0 (all replaced with label references)
Raw $XXXX branch operands 0 (all replaced with label references)
Remaining Label_XXXX 0 (all replaced)

Pass 3 results

Metric Value
Semantic zero-page aliases 14 (Reset, NmiHandler, InputRead, ObjInitCall, ObjMoveCall, ObjDrawCall, ObjUpdateCall, SetOamPtrs, WaitVblank, GameModeDispatch, etc.)
Named data tables 47 (CmdHandlerJumpTable, SpriteAttrTable, NametableRowAddrTable, PpuAttrInitScript, StaffCreditsText, ApuChannelMaskTable, etc. - see Pass 3 data-table inventory)
Data blocks interpreted 104 of 104 (47 named blocks across 32 rows; 55 blocks recorded as code the tracer could not reach; the rest recorded as data with its structure and its ROM provenance)
Raw $XXXX jsr/jmp operands 0
Raw $XXXX branch operands 0
Remaining Label_XXXX 0

Pass 1 notes

  • Bank 7 (last 16 KB, fixed at CPU $C000-$FFFF) was traced from vectors: NMI=$CE8D, RESET=$E7BF, IRQ=$CEC4. Bank 7 code is assembled separately as prg.07.s with .org $C000 and linked at file offset $1C010.
  • Bank 6 (the switchable bank at CPU $8000-$BFFF) is traced too, from a Mesen Code Data Logger capture of a real session: the capture's jump targets and code-run starts seed the tracer, and the capture's Data flag forces the stage data back to data. It is assembled as prg.6.s with .org $8000 and linked at file offset $18010 - it needs a segment of its own, because a call inside it must assemble to the CPU address and not to the file offset. Its labels carry the Bank6_ prefix, because it shares its CPU window with the other switchable banks.
  • Banks 0-3 are empty: every byte of the image in them is $00, so the linker fills them and the source says so.
  • Banks 4-5 hold the stage data: the CPU reads them and never fetches a byte from them as an opcode, which is what the Code Data Logger records.
  • The bank switch is an indirect store: sta (Zp00,x) at $C7B9 with the pointer built from the caller's X, so the bank number is the high byte of a zero-page pointer rather than an immediate.
  • Seven invalid opcode addresses found: $D506, $D876, $E15B, $E44B, $E520, $E909, $F0FE (likely data mis-decoded as opcodes or vice versa)
  • Every row's audit comment carries the offset of the byte in the whole PRG image, so a single lookup in prg.bin finds every byte of the project - including bank 7, whose rows used to be numbered from the start of the bank.

Pass 3 data-table inventory

Every data block the tracer emitted, with what its bytes are and the instruction that reads them. The image is banked: bank 6 is the switchable bank at CPU $8000-$BFFF (prg.6.s), bank 7 is the fixed bank at CPU $C000-$FFFF (prg.07.s), and banks 0-5 live in prg.s (their "CPU" field in the audit comment is really the PRG offset). Every address below is therefore given with its bank.

"Not referenced by any instruction" means no operand in this dump lands inside the block; such a block is either unreferenced data (recorded with its ROM provenance) or code the tracer could not reach (its bytes decode as a run of instructions and the Mesen CDL capture recorded them fetched as opcodes). The CDL column records what zanac_gameplay.cdl saw at those addresses: code = fetched as an opcode, data = read as data, untouched = never touched.

Banks 0-5 (prg.s)

Address Size Name Structure Read by
$0000-$3FFF (bank 0) 16384 B - unreferenced data - the whole bank is $00; the CPU never fetches or reads it not referenced by any instruction
$4000-$7FFF (bank 1) 16384 B - unreferenced data - the whole bank is $00 not referenced by any instruction
$8000-$BFFF (bank 2) 16384 B - unreferenced data - the whole bank is $00 not referenced by any instruction
$C000-$FFFF (bank 3) 16384 B - unreferenced data - the whole bank is $00 not referenced by any instruction
$10000-$13FFF (bank 4) 16384 B - the first stage's data bank: the first $30 bytes are $FF padding, then at $8030 a table of 16-bit pointers to the bank's own graphic blocks, then 16 KB of tile patterns - from $12A40 the bytes are 1-bit-per-pixel runs (14 28 50 A0 40 03 04 0C 18 30 60 80 80 40 A0 50, a shrinking triangle), and from $12B30 a table of 16-bit scale factors (42 08 42 08 42 08 42 14 ... reading as $0842, $0842, $0842, $1442, then 08 00 20 00 80 00 02 00 = 8, 32, 128, 2). The game has no CHR ROM, so the tile patterns must come from here; CDL: 9609 of 16384 bytes read as data lda $8030,y / lda $8031,y at $CC7E/$CC83 (bank 7) read the pointer table of whichever bank is switched in; CDL: 9609 bytes read as data, 6775 untouched
$14000-$17FFF (bank 5) 16384 B - the second stage's data bank, the same shape as bank 4: $30 bytes of $FF padding, a 16-bit pointer table at $8030, and 16 KB of tile data; CDL: 2855 bytes read as data lda $8030,y / lda $8031,y at $CC7E/$CC83 (bank 7) read the pointer table of whichever bank is switched in; CDL: 2855 bytes read as data, 13529 untouched

Bank 6 - the switchable bank at $8000-$BFFF (prg.6.s)

Address Size Name Structure Read by
$8121-$818B 107 B EnemySizeThresholdTable, EnemySizeClassTable, EnemyMoveDeltaTable three tables and a code stub: a 3-entry ascending threshold table $32,$6A,$AB at $8121, a 4-entry class table at $8124 ($02,$03,$03,$04) followed by 28 further one-byte values to $8143, and sixteen 4-byte records at $8144, each of them two 16-bit signed movement deltas - the X delta first, then the Y delta - which the code shifts left by three bits before adding them to the object's 16-bit position. The last eight bytes ($8184-$818B) are a copy of the routine at $818C cmp $8120,y at $8085 (thresholds), lda $8124,y at $8091 (class), lda $8144,y/$8145,y/$8146,y/$8147,y at $809E/$80A3/$80A8/$80AD (deltas)
$81EA-$81EC 3 B - code the tracer could not reach - BCS $820C / RTS; CDL: 3/3 bytes fetched as code not referenced by any instruction
$81F3-$81F5 3 B - code the tracer could not reach - BCS $820C / RTS; CDL: 3/3 bytes fetched as code not referenced by any instruction
$81FC-$8202 7 B - code the tracer could not reach - BCS $820C / JMP $8250 / BCS $820C; CDL: 7/7 bytes fetched as code not referenced by any instruction
$85A8-$85C0 25 B - code the tracer could not reach - a 13-instruction sequence that shifts the enemy's position and calls $85D8; CDL: 17/25 bytes fetched as code not referenced by any instruction
$85CE-$85D7 10 B - code the tracer could not reach - LDA #$84 / STA $18 / LDA #$00 / STA $19 / LDY #$00; CDL: untouched not referenced by any instruction
$8607-$860B 5 B - code the tracer could not reach - INC $14 / BNE $8602 / RTS; CDL: 5/5 bytes fetched as code not referenced by any instruction
$8619-$872A 274 B - a 274-byte pixel-data block: from $8679 the bytes are a rising ramp of one-byte values ($96-$C3) that step by one every few entries, from $86C9 a field of $23 with a handful of outliers ($A9, $50, $37, $3C, $28, $48, $53, $5B), and from $8619 a run of high values that is read as the byte plane of a 2-bit-per-pixel image. CDL: 208 bytes read as data lda $86CF,y at $8216 and $8229 (the pixel values), eor $8619,x at $8731 and adc $8619,y at $8752 (the plane XORed and added into the object's position)
$87AD-$87C6 26 B - a 26-byte index permutation: $00,$01,$02,$03,$04 then $19 down to $05 in steps of one - a reversed slot order used to walk the object list back to front; CDL: 26/26 bytes read as data not referenced by any instruction - the permutation is indexed by a computed value, so no operand lands inside the block
$87D3-$8821 79 B - code the tracer could not reach - 40 instructions that pick the larger of two positions and advance a sprite; CDL: 68/79 bytes fetched as code not referenced by any instruction
$88F8-$890B 20 B - code the tracer could not reach - SEC / BCS / RTS followed by more code; CDL: 4/20 bytes fetched as code not referenced by any instruction
$894D-$8C67 795 B - a mixed block: $894D-$895F is code, $8960-$89AD is a 16-byte record table of 16-bit values that step by two ($F8, $FA, $FC, $FE) against a second value that steps by nine ($60, $69, $72, $7B) - a table of (position, value) pairs - and the rest is a 3-byte-record table of tile indices and attribute nibbles. CDL: 466 bytes read as data, 329 untouched lda $89B1,y at $885D, lda $89B2,y at $8862 and lda $89B4,y at $886F pick one of the three 16-byte records at $89B1; the record's 16-bit field is the address of a pixel stream
$8E64-$8EA0 61 B EnemySpriteTypeTable $8E64-$8E73 is code; $8E74-$8E85 is an 18-entry table of the enemy's sprite type ($FF,$FF,$FF,0,0,0,1,1,1,6,8,$0A,4,$0C,$0C,2,0,$0E) and $8E86-$8E9B is a 22-entry table of the same field's non-zero values ($30-$34 = the five enemy types). CDL: 35 bytes read as data, 16 fetched as code lda $8E74,y at $8CB0, lda $8E86,y at $8CE0 (the type byte that goes to $0576), lda $8E7D,y at $8CEC and $913E, lda $8E91,y at $8D67, lda $8E92,y at $A90B
$8EB8-$8EC9 18 B EnemyMoveVectorTable six 3-byte records - a movement vector of two signed bytes plus a third byte (FB 02 01, F9 03 01, F8 02 02, F8 03 02, F7 02 03, F7 03 03); the first two bytes of each record are the X and Y delta and the third the speed class lda $8EB8,y at $8EA8, lda $8EB9,y at $8EAD and lda $8EBA,y at $8EB2 (the index is Zp33 * 3)
$8F65-$8F76 18 B - code the tracer could not reach - LDA #$16 / STA $85 / LDA $055C,x / STA $87 / LDY #$00 / JSR $85D8 / INC $14 / BNE $8F65; CDL: untouched not referenced by any instruction
$8F99-$8FF5 93 B - code the tracer could not reach - 44 instructions with no invalid opcode; CDL: 93/93 bytes fetched as code not referenced by any instruction
$9021-$9038 24 B EnemySpriteTypeTable, EnemySpriteParamTable two 12-entry tables: the sprite type of each of the twelve enemy shapes ($05,$06,$06,$07,$07,$08,$08,$07,$07,$06,$06,$05) and a second parameter per shape ($00,$01,$02,$03 repeated three times); CDL: 24/24 bytes read as data lda $9021,y at $9000 (the type, stored to $0576) and lda $902D,y at $9006 (the parameter, stored to $0590)
$90CD-$90DC 16 B - eight 16-bit code addresses ($9139, $91A0, $91E5, $925B, $92F0, $935B, $940F, $914C); the CPU read the first, third, fourth, fifth, sixth and eighth as data (CDL: 8/16 bytes read as data) not referenced by any instruction - the reader computes the address
$90E2-$9139 88 B - a table of sixteen 16-bit code addresses ($919A, $9171, $91EA, $9277, $932E, $9371, $932E, $9469) followed by 64 bytes of length-prefixed ASCII ("68:", "68@", "=AB", "68:", ">?@", "68:", "666") interleaved with control bytes ($83, $C1, $C3, $C2, $85, $FE, $FF); CDL: 28 bytes read as data not referenced by any instruction
$916A-$9171 8 B - code the tracer could not reach - JSR $906E / BNE $9498 / JMP $948B; CDL: untouched not referenced by any instruction
$91E4-$91E5 2 B - unreferenced data - two bytes, $0D $0D; CDL: untouched not referenced by any instruction
$9252-$925B 10 B EnemyWaveParamTable ten one-byte values in pairs ($3C,$3C,$3D,$3D,$3E,$3E,$41,$41,$42,$42) - a per-wave parameter (the enemy's vertical speed or health step); CDL: 6/10 bytes read as data lda $9252,y at $9246 (the index is the enemy's type divided by sixteen, plus one when the object is in its second half)
$92F1-$9434 324 B - code the tracer could not reach - 141 instructions that move an object along a path, decrement a counter at $0716 and branch through $93FE; CDL: untouched, so the capture never ran it not referenced by any instruction
$943F-$9463 37 B - eight 16-bit code addresses ($82FD, $9171, $9463, $9277, $944E, $9371, $946E, $9169) followed by code; CDL: 8 bytes read as data not referenced by any instruction
$946F-$948A 28 B - code the tracer could not reach - LDA $60 / CMP #$05 / BCC / LDA #$3E / JSR $B2EF / JSR $948B / JMP $9483 / ...; CDL: untouched not referenced by any instruction
$9578-$958D 22 B - three small tables: three bytes at $9578 ($00,$00,$01), six bytes at $9580 ($32,$50,$64,$78,$8C,$50 - a rising ramp) and eight bytes at $9586 ($02,$03,$01,$01,$03,$03,$03,$03); CDL: 8 bytes read as data lda $9586,y at $9494, lda $9578,y at $94E4, ora $9578,y at $94ED and lda $9580,y at $955A
$95D9-$9614 60 B - two 30-entry tables of one-byte values: $95D9 holds $04-$06 per enemy type and $95F7 holds $01,$21,$41,$11 - a per-type movement/appearance code; CDL: 9 bytes read as data lda $95D9,y at $95AD and lda $95F7,y at $95C1
$96DC-$96E7 12 B - a 12-byte table of small values ($2F, $80, $2F, $02, $2F, $01, $2F, $02, $2E, $01, $2F, $02) - a per-enemy movement pattern; CDL: 12/12 bytes read as data not referenced by any instruction - the reader computes the address
$97BA-$97CE 21 B - thirteen one-byte values ($01,$06,$03,$07,$02,$05,$04,$19,$19,$1A,$02,$00,$03) followed by code; CDL: 9 bytes read as data not referenced by any instruction
$97E7-$97F2 12 B - code the tracer could not reach - LDY $15 / LDA #$83 / STA $14 / JSR $97F3 / JMP $97B4; CDL: untouched not referenced by any instruction
$97FD-$9828 44 B - code the tracer could not reach - 18 instructions that move a shot and update the score; CDL: untouched not referenced by any instruction
$98C6-$9917 82 B - $98C6-$98E3 is code; $98E4-$98F6 is code; $98F7-$9917 is a 51-byte table of one-byte values ($08,$08,$41,$06,$24,$1E,$1E,$0A,$1E,$42,$02,$78,$3A,...) - a per-enemy behaviour table; CDL: 15 bytes read as data lda $98F7,x at $9927, lda $98F8,x at $992D and lda $98F9,x at $9933
$99D0-$9E98 1225 B - 48 bytes of data at the head ($00,$13,$90,$FF,$00,$68,$68,$27,$26,$25,$24,$23,$22,$21,$40,$2F,$2E,$2D,$2C,$2B,$AA,$00,$E8,$01,$76,$35,$34,$33,$42,$33,$44,$36,$38,$7B,$2A,$28,$26 - a descending ladder of one-byte values) followed by 1177 bytes of code the tracer could not reach, including the string "HIDEJ" at $9D13; CDL: 38 bytes read as data not referenced by any instruction
$9F49-$9F6B 35 B - code the tracer could not reach - 14 instructions that set up a new object; CDL: untouched not referenced by any instruction
$9FBC-$9FD5 26 B - a 26-byte command stream: 20 E0 02 02 01 07, 20 E0 03 03 01 07, 60 A0 80 80 FF 00 E0 FF 20 01 C8 FD 38 03 - opcode $20 takes a pointer and two bytes, $60 a count and a block of data; CDL: 13 bytes read as data lda $9FBC,y at $9EC6 and $9EE7, lda $9FBE,y at $9ECC, lda $9FC0,y at $9EDF and $9EF5, lda $9FCE,y at $9FF9 and lda $9FCF,y at $9FFF
$A054-$A05D 10 B - two small tables: five bytes at $A054 ($1F,$20,$21,$20,$1F - a sprite's horizontal animation range) and four bytes at $A059 ($00,$00,$00,$80); CDL: 10/10 bytes read as data lda $A054,y at $A038 and ora $A059,y at $A043
$A06D-$A076 10 B - code the tracer could not reach - four instructions; CDL: 10/10 bytes fetched as code not referenced by any instruction
$A08A-$A0BA 49 B - code the tracer could not reach - 20 instructions that spawn a shot; CDL: untouched not referenced by any instruction
$A165-$A263 255 B - seven bytes of data at the head ($11,$12,$13,$14,$02,$22 and a spare) followed by 248 bytes of code the tracer could not reach; CDL: 6 bytes read as data not referenced by any instruction
$A3EC-$A508 285 B - code the tracer could not reach - 108 instructions that walk the enemy list and update each enemy's position; CDL: untouched not referenced by any instruction
$A601-$A608 8 B EnemyInitParamTable four pairs of one-byte values: $02,$80, $01,$08, $03,$00, $08,$04 - the four parameters (palette, flags, timer and variant) a newly spawned enemy is given; CDL: 4/8 bytes read as data lda $A601,y at $A519, lda $A602,y at $A527, lda $A603,y at $A52D and lda $A604,y at $A533
$A6A5-$A6C0 28 B - code the tracer could not reach - 11 instructions that move a shot; CDL: untouched not referenced by any instruction
$A74A-$A74B 2 B EnemyAltSpriteTypeTable two bytes, $1D and $1E - the alternative sprite type an enemy switches to on its second animation frame; CDL: 2/2 bytes read as data lda $A74A,y at $A73A (the index is bit 2 of the frame counter)
$A767-$A775 15 B - code the tracer could not reach - six instructions; CDL: 15/15 bytes fetched as code not referenced by any instruction
$A806-$A820 27 B - code the tracer could not reach - 12 instructions; CDL: 18/27 bytes fetched as code not referenced by any instruction
$A8E5-$A8E8 4 B - code the tracer could not reach - two instructions; CDL: 4/4 bytes fetched as code not referenced by any instruction
$A97E-$AA61 228 B - seven bytes of data at the head ($06,$07,$08,$08,$07,$06,$05 - a rising and falling ramp) followed by 221 bytes of code the tracer could not reach; CDL: 7 bytes read as data lda $A97E,y at $A971
$AAA8-$AC47 416 B - code the tracer could not reach - 90 instructions that move the player's shot; CDL: untouched not referenced by any instruction
$AC83-$AE98 534 B - 32 bytes of data at the head - a 16-entry ramp ($09,$0A,$0B,$0C,$0D,$0C,$0B,$0A twice) and sixteen tile indices in four groups of four ($00,$01,$02,$03, $00,$41,$42,$43, $00,$C1,$C2,$C3, $00,$81,$82,$83) - followed by 502 bytes of code the tracer could not reach; CDL: 32 bytes read as data lda $AC83,y at $AC71 and lda $AC93,y at $AC77
$AEB8-$AEC0 9 B - code the tracer could not reach - four instructions; CDL: 9/9 bytes fetched as code not referenced by any instruction
$AF9A-$B099 256 B - a 256-byte block of code the tracer could not reach with a 24-byte table of one-byte values at the head ($06,$06,$00,$00,...,$04,$00,$04,$04,$04,$08,$03,$03,$08,$08,$08,$00); CDL: 8 bytes read as data not referenced by any instruction
$B1CD-$B1E1 21 B - code the tracer could not reach - 12 instructions that add a random value to the score; CDL: untouched not referenced by any instruction
$B260-$B630 977 B - code the tracer could not reach - 432 instructions with no invalid opcode, the largest single block of unreachable code in the bank; the head is eight bytes of the same $FC,$F3,$CF,$3F,$03,$0C,$30,$C0 bit-mask pattern as $D7DB; CDL: 2 bytes read as data not referenced by any instruction
$B646-$B6B5 112 B - 30 bytes of data at the head ($07,$28,$7F,$07,$1E,$06,$06,$0A,$08,$07,$14,$06,$07,$14,$06,$07,$28,$06,$50,$63,$12,$00,$01,$01,$02,$01,$01,$00,$01,$02,$03,$02,$01 - a per-enemy spawn table) followed by 82 bytes of code the tracer could not reach; CDL: untouched not referenced by any instruction
$B6F8-$B71F 40 B - code the tracer could not reach - 18 instructions; CDL: 29/40 bytes fetched as code not referenced by any instruction
$B729-$B87E 342 B - code the tracer could not reach - 64 instructions from JMP $82FE; CDL: 3 bytes fetched as code not referenced by any instruction
$B8AD-$B8E4 56 B - sixteen 3-byte records ($04,$30,$03, $04,$30,$02, $04,$20,$04, $04,$20,$03, $04,$1C,$03, $04,$30,$04, $04,$28,$05, $04,$38,$02, $05,$40,$08, $0A,$30,$06, $04,$10,$09, $03,$20,$05, $08,$20,$08, $04,$28,$06, $03,$20,$08, $06,$50,$06 - a tile, a speed and a timer per record) followed by eight bytes ($06,$16,$17,$26,$27,$26,$17,$16); CDL: 8 bytes read as data lda $B8DD,y at $B901 (the eight-byte table at the end of the block)
$B951-$B95E 14 B - seven 16-bit values - $0040, $0080, $00C0, $0100, $0180, $0200, $0280 - a ladder of nametable row offsets in steps of $40; CDL: untouched not referenced by any instruction
$BA17-$BE07 1009 B - code the tracer could not reach - 130 instructions that update the scroll position and the background; CDL: untouched not referenced by any instruction
$BE41-$BFFF 447 B - unreferenced data - 447 bytes of $FF padding at the end of the bank; CDL: untouched not referenced by any instruction

Bank 7 - the fixed bank at $C000-$FFFF (prg.07.s)

Address Size Name Structure Read by
$C000-$C6AA 1707 B CmdHandlerJumpTable, PpuAttrSlotTable, SpriteAttrTable, NotePitchTable five blocks: (1) $C000-$C08F - 48 three-byte JMP abs trampolines, entry n at $C000+3n; the Mesen CDL records the CPU fetching 25 of the 48 opcodes, so the table is entered by a computed jump whose index arithmetic lives in code the tracer could not reach, and the targets are the game's engine routines (the reset entry $E7BF, the PPU attribute writer $C815, the object handlers $C6AB/$C768/$C8BA/$C8DF, the sound driver $EF71/$EF79/$EF90); (2) $C090-$C0EF - 96 bytes of $FF padding; (3) $C0F0-$C0FF - eight $FF bytes then eight counters $00-$07; (4) $C100-$C19F - 160 one-byte sprite attributes, of which $C12F-$C133 are the half-widths of the five enemy types ($30-$34) and $C182-$C186 their half-heights; (5) $C1A0-$C23F - a 160-byte pitch ladder whose values step up by 5, 9, 13, 17, 25 and 33 and whose last 64 bytes count $C2 to $C6 in runs (1) the table is entered by a computed jump, not by a direct operand; (2) none; (3) lda $C0F8,y at $C81B and sta $C0F8,y at $C81E (and again at $C8AF/$C8B2 in the unreached routine at $C87F); (4) lda $C0FF,y at $81AF in bank 6 (the half-width) and lda $C152,y at $81CB (the half-height); (5) none
$C6CA-$C6D2 9 B - code the tracer could not reach - PLA / STA $16 / PLA / STA $17 / JSR $C6EA; CDL: untouched not referenced by any instruction
$C725-$C767 67 B - code the tracer could not reach - a routine that pushes the object pointer, calls the object driver at $C8EB and $C7F8 and returns through $C6D3; CDL: untouched not referenced by any instruction
$C824-$C864 65 B - code the tracer could not reach - five near-identical five-instruction sequences, each of which reads the counter at $C0F8+n and writes it back unchanged; CDL: untouched not referenced by any instruction
$C87F-$C8B9 59 B - code the tracer could not reach - 35 instructions that copy a three-byte record out of the object and update the counter at $C0F8; CDL: untouched not referenced by any instruction
$C928-$C937 16 B TextRowBaseTable two parallel eight-entry tables: the low bytes of the screen row base addresses ($30 seven times then $00) and the high bytes ($80 seven times then $C1); the code forms the VRAM address $C930[y]*256 + $C928[y] + A*2, so rows 0-6 write into the switchable bank at $8030 and row 7 into the fixed bank at $C100 adc $C928,y at $C8ED and lda $C930,y at $C8F1 (inside VramWrite)
$C95C-$CA9C 321 B - code the tracer could not reach - 166 instructions that walk the enemy list, compute an object's screen position from the scroll registers and store it; CDL: untouched not referenced by any instruction
$CC16-$CC35 32 B StageInitValueTable, StageInitCountTable two parallel 16-entry tables: a value ($07,$00,$01,$02,$03,$04,$05,$06,$07,$00,$01,$02,$03,$04,$06,$05) and a count ($06,$02,$01,$04,$01,$02,$03,$01,$03,$01,$03,$02,$06,$03,$00,$0C); the code calls the routine at $9493 with the value in A, the count times lda $CC16,y at $CC00 and lda $CC26,y at $CC05
$CCAD-$CCE2 54 B TitleObjParamTable, TitleObjXIndexTable, TitleObjYIndexTable three parallel 13-entry tables - the screen layout each of the thirteen title-screen objects uses ($06,$04,$04,$04,$04,$05,$05,$05,$05,$06,$06,$06,$06), its X index ($1E,$1A,$1A,$1A,$1A,$1C,$1C,$1C,$1C,$1E,$1E,$1E,$1E) and its Y index ($24,$20,$20,$20,$20,$22,$22,$22,$22,$24,$24,$24,$20) - followed by 21 bytes of code the tracer could not reach (ORA ($CB),Y / RTS / LDY #$00 / STA $0104,Y and a 128-byte fill loop) lda $CCAD,y at $CC6C, ldx $CCBA,y at $CC8A and ldx $CCC7,y at $CC97 (the index is the object slot in Zp91)
$CCF6-$CD6A 117 B - code the tracer could not reach - 40 instructions at the head (the PPU scroll and mask update) followed by a 36-byte table of one-byte values that is a jump/command table ($04,$07,$01,$04,$03,$06,$00,...); CDL: 66 bytes fetched as code, 41 read as data not referenced by any instruction
$D108-$D2C7 448 B - code the tracer could not reach from $D118 to $D1DB, then a 76-record table of three-byte values at $D1DC ($00-$14) and nineteen 8-byte bit-mask records at $D240 (one non-zero byte each: $01, $06, $01, $02, $03, $05, $08, $01, $02, $04, $05, $08, $01, $03, $04, $05, $07, $01, $02), then two four-byte code stubs at $D2C0; CDL: 114 bytes fetched as code, 42 read as data not referenced by any instruction
$D2FD-$D346 74 B - code the tracer could not reach - 36 instructions that spawn an object at a position taken from the enemy list; CDL: untouched not referenced by any instruction
$D506-$D56A 101 B - code the tracer could not reach - 51 instructions, of which the first 24 bytes are a table of four one-byte values read as data; CDL: 24 bytes fetched as code not referenced by any instruction
$D61F-$D69E 128 B EnemyOverlapTable, EnemyOverlapBandTable, EnemyOverlapSizeTable three parallel 16-entry tables of one-byte values: $D61F ($10,$14,$20,$12,$28,$10,$08,$18,$30,$28,$24,$04,$08,$20,$10,$28) is indexed by (value-16)/4, $D63B ($01,$02,$01,$01,$02,$02,$01,$02,$01,$02,$03,$02,$03,$02,$04,$05) and $D64B ($30,$38,$3C,$34,$38,$3C,$30,$34,$40,$3C,$30,$38,$33,$2E,$2C,$1C) by value/16; the routine that reads them keeps the largest result at $50. The last four bytes of the block ($B9,$5B,$D6,$60) are code the tracer could not reach lda $D61F,y at $D5F0, lda $D63B,y at $D609 and lda $D64B,y at $D617
$D74B-$D752 8 B - unreferenced data - four bytes $00,$55,$AA,$FF (the standard spread of a two-bit value into a byte) followed by $AA,$FF,$AA,$FF; the spread table is the shape the bit-plane expansion at $DB58 needs, but no operand in this dump lands inside the block, so the reader is not established; CDL: 8/8 bytes read as data not referenced by any instruction
$D7BD-$D7E2 38 B NametableRowAddrTable, SpritePixelMaskTable fifteen 16-bit nametable row addresses ($2000, $2040, $2080, $20C0, $2100, $2140, $2180, $21C0, $2200, $2240, $2280, $22C0, $2300, $2340, $2380 - every second row of the 30-row nametable) followed by eight mask bytes ($FC, $F3, $CF, $3F, $03, $0C, $30, $C0 - four masks and their complements, used to fold a position into a 4- or 16-pixel cell) lda $D7BD,y at $D7B2 and lda $D7BE,y at $D7B7 (the row address), and $D7DB,y at $DB62 and lda $D7DF,y at $DB67 (the masks)
$D876-$DA35 448 B ObjFieldCopyPtrTable eight 16-bit code addresses at the head ($D893, $D8A0, $D8BE, $D8DB, $D91F, $D937, $D9DF, $DA15) pointing at the eight field-copy handlers that follow - each starts LDY $16 / LDA ($B5),Y and copies a different group of bytes out of the object record into the zero page, and each ends in a jump to the shared tail at $DA28; CDL: 322 bytes fetched as code, 10 read as data the eight handlers, reached through the pointer table; the table itself is read by code the tracer could not reach
$DBC5-$DCC4 256 B ObjPatternTable a 256-entry table of one-byte values, sparsely filled: 23 live entries at $DBC5 ($00,$00,$01,$01,$02,$02,$02,$02,$03,$03,$00,$00,$0F,$04,$05,$05,$04,$03,$08,$0B,$0E,$02,$02,$03,$03,$03), 70 zeros, then 70 live entries at $DC45 ($0C,$0D,$0D,$0C,...) and the rest zeros; the two bytes the code reads are packed into a twelve-bit value lda $DBC5,x at $DB88 and $DB95 (the index is the table at $0189)
$DCDE-$DD25 72 B CharCodeTable, ObjXOffsetTable, ObjYOffsetTable three blocks: 22 ASCII character codes at $DCDE ($49,$4A,$4B,$4C,$4D,$4E,$54,$54,$47,$46,$36,$57,$57,$57,$57,$54,$56,$55,$4B,$58,$35,$59 - "IJKLMNTTGF6WWWWTVUKX5Y", the alphabet the name-entry screen offers); a 24-entry table of signed X offsets at $DCF4 ($54, $52, then $08 eighteen times, then $0C, $0C, $08, $08) and a 26-entry table of signed Y offsets at $DD0C ($08 eighteen times, then $04, $08, $04, $08, $08, $08, $08, $08) adc $DCF4,y at $DD74 (the X offset, added to the object's X position) and adc $DD0C,y at $DD85 (the Y offset); the character table is read by code the tracer could not reach
$DE14-$DF67 340 B - code the tracer could not reach - 173 instructions; CDL: untouched not referenced by any instruction
$DF9F-$DFBE 32 B GameStateSeedTable seven bytes at the head ($00,$00,$00,$01,$00,$00,$00) that are copied into the state block at $0182, followed by 25 bytes ($0F,$37,$27,$18,$35,$25,$15,$30,$10,$00,$31,$21,$11,$16,$30,$12,$30,$37,$16,$30,$22,$0F,$30,$28,$0F) that no instruction in this dump reads lda $DF9F,x at $DF7C (seven bytes are copied to $0182-$$0188`); the 25 bytes after them are read by code the tracer could not reach
$E15B-$E228 206 B TitleMenuStrings the two title-menu strings, each introduced by a two-byte marker: $22 $2B then "GAME START " and $22 $8B then "CONTINUE"; the code that follows (from $E175) sets the menu cursor at $0200/$0201/$0202/$0203 and the sound effect at $019A; CDL: 62 bytes read as data, 58 fetched as code the menu routine inside this block; no operand in this dump lands inside the block
$E254-$E265 18 B PowerupMaskTable two parallel tables: nine bytes at $E254 ($07,$03,$06,$05,$06,$05,$06,$02,$08 - a per-power-up code) and ten bytes at $E25D ($08,$02,$20,$02,$10,$40,$02,$04,$40,$02 - a bit mask); the code tests the player's held button against the mask and counts the power-ups in $6F ldx $E254,y at $E235 and and $E25D,y at $E23A
$E290-$E398 265 B TitleScreenTextScript the title screen's drawing script: records of [command][length][length bytes], with $FF as the separator and $00 as the end of the stream. Command $03 writes ASCII text ("score top", "area", "game designed by COMPILE", "produced by aii", "presented by pony inc.", "copyright 1986 pony inc.", "licensed by", "ninendo OF americ a inc.", "see you again\ingur di"), commands $08 and $09 write sixteen- and fourteen-byte runs of tile indices ($90-$A0 and $94-$9C); CDL: 265/265 bytes read as data the script is read by the routine at $E399 and the text routines around $E2F7; no operand in this dump lands inside the block, so the reader is not established
$E3B8-$E3F3 60 B PpuAttrInitScript a PPU write script: nine records of [address high][address low][payload...][$80 terminator] followed by a $00 end-of-stream byte. The addresses are $2300 and $23C2-$23EB - the tail of the nametable and the whole $23C0 attribute table - and the payloads are attribute bytes ($FF for all four palettes, then $A5, $A0, $5A, $52, $50, $50, $0A); CDL: 25 bytes read as data lda $E3B8,y at $E399, $E3A3 and $E3AA (the routine writes the addresses with STA PPUADDR and the payloads with STA PPUDATA)
$E44B-$E4CE 132 B SoundTestText the sound-test screen's label, "OUND TEST" - the leading S was split off by the tracer and lives in the last byte of the code block at $E398-$E44A - followed by 125 bytes of code the tracer could not reach; CDL: untouched the string is read by the code at $E44B's own routine; no operand in this dump lands inside the block
$E520-$E60E 239 B HudScoreText the score display's label, "SCORE" (six ASCII bytes) followed by 233 bytes of code the tracer could not reach that moves the digits into the nametable; CDL: untouched the string is read by the routine at $E520; no operand in this dump lands inside the block
$E671-$E766 246 B StaffCreditsText the staff-roll script: $00-terminated strings, each preceded by a one-byte code that is the screen row the text is drawn on - row 8 "CONGRATULATIONS!", row 2 "YOU ARE THE MESSIAH OF EARTH.", row 13 "STAFF", row 2 "game design JEMINI,JANUS,MOO", row 5 "JEMINI", row 2 "program JEMINI", row 7 "MIYAMOTO", row 2 "graphics JANUS", row 4 "test play MCNUI", row 14 "WAO ISEE", row 14 "YORIKI", row 5 "produced by aii", row 6 "created by COMPILE", row 15 "see you again\ingur di"; CDL: untouched the script is read by the credits routine; no operand in this dump lands inside the block
$E909-$E916 14 B EnemyTypeVariantTable the tail of a 16-entry table that starts at $E907 - the two bytes $E907/$E908 were split off by the tracer as the instruction ORA $06, but the code's LDA $E907,Y reads them as table entries 0 and 1. The table maps an enemy's low nibble to its canonical type: $06,$07,$08,$09,$0A,$0B,$0C,$0F,$01,$02,$03,$04,$0F,$0F,$00 (entries 2-15) lda $E907,y at $E8E0 (the result replaces the low nibble of the enemy's type byte at $0145)
$E9D0-$EA0A 59 B EnemyMoveIntervalTable, ObjAttrTypeTable three blocks: a 16-entry table at $E9D0 ($0C,$0C,$01,$02,$0C,$04,$07,$08,$09,$0C,$09,$0A,$0F,$0F,$0F,$0F - the interval at which each enemy type moves); 30 bytes of code the tracer could not reach at $E9E0; and a 13-entry table at $E9FE ($02,$01,$1D,$01,$1D,$20,$1F,$20,$19,$1F,$19,$20,$02) indexed by the same object slot as the tables at $CCAD, $CCBA and $CCC7; CDL: 1 byte read as data lda $E9D0,x at $E9BD (the enemy's move interval) and lda $E9FE,y at $E86A (the value is loaded but the code then branches on the object index, not on it)
$EA3D-$EA51 21 B SoundCmdJumpTable seven three-byte JMP abs trampolines - the sound driver's command table: $EF71 (sound init), $EF79 (sound init 2), $EF90 (sound update), $EA52, $F0F4 (stop a channel), $F0FA (start a channel) and $F146 (set the channel's parameters); CDL: untouched the table is entered by a computed jump; no operand in this dump lands inside the block
$EB58-$EB79 34 B - code the tracer could not reach - 16 instructions; CDL: untouched not referenced by any instruction
$EBAF-$ED4F 417 B ItemHandlerPtrTable 32 16-bit code addresses at the head ($EBEA, $EBF5, $EC0A, $EC16, $EC1E, $EC0F, $EC04, $EC73, $EC1A, $EC34, $EC4E, $EF8F, $ED43, $EC3E, $ECF4, $ECF4, $EC4A, $EC77, $ECB1, $EC7E, $ED14, $EDA3, $EDD6, $ED3B, ...) - the per-item-type handler table - followed by 385 bytes of code the tracer could not reach; CDL: 219 bytes fetched as code, 28 read as data lda $EBAF,x at $EBA0 and lda $EBB0,x at $EBA4 (the index is doubled)
$EE43-$EE70 46 B - code the tracer could not reach - 22 instructions; CDL: untouched not referenced by any instruction
$EF42-$EF49 8 B ApuChannelMaskTable eight APU channel masks: $01, $02, $04, $08 (set one channel) and $FE, $FD, $FB, $F7 (clear it); the sound engine ORs one into the channel-enable byte at $0307; CDL: 8/8 bytes read as data lda $EF42,y at $EECD, $EED5 and $EF30
$F01C-$F0F3 216 B NoteFrequencyTable 108 16-bit little-endian frequencies in an equal-tempered scale - each entry is 2^(-1/12) of the one before (ratio 0.9437), running from $07FE down to $0004, i.e. nine octaves from 2046 Hz to 4 Hz; CDL: 88 bytes read as data not referenced by any instruction - the sound engine that reads it is in code the tracer could not reach
$F0FE-$F145 72 B SoundScriptPtrTable 36 16-bit pointers into the script data at $F16B ($F180, $F209, $F2FF, $F372, $F458, $F4D8, $F52B, $F544, $F5AB, $F5D8, $F60D, $F6EF, $F628, $F765, $F773, $F783, $F797, $F7AA, $F7BD, $F7D8, $F7ED, $F7FD, $F80E, $F821, $F837, $F84C, $F942, $F9D1, $FA2D, $FA50, $FB7A, $FBDB, $FC42, $FD75, $FE5C, $FE71) - one per sound effect lda $F0FE,x at $EFAB and lda $F0FF,x at $EFB0 (the routine pushes the pointer on the stack and returns to it)
$F16B-$FFFF 3733 B NoteDurationTable, SoundScriptData the sound driver's data: a 16-entry note-duration table at $F16B ($01,$02,$03,$04,$06,$08,$0C,$10,$18,$20,$30,$40,$60,$80,$C0 frames, then $00) and 3717 bytes of command streams after it - each stream is a list of 16-bit code addresses, note numbers and $80 terminators, with the text of the sound effects mixed in; the three vectors sit in the last six bytes; CDL: 946 bytes read as data lda $F190,y at $EE0A and lda $F191,y at $EE0F (a 16-bit pointer inside the stream)

Power-on flow analysis

Derived from the disassembly by _tools/derive_poweron.py; the call graph is walked from the reset entry.

RESET is at $E7BF ($E7BF). The CPU comes here out of reset with the PPU and APU in their power-on state and the zero page and RAM uninitialised.

The reset path calls:

Address Routine

NMI is at $CE8D ($CE8D). It is the per-frame handler; what it calls:

Address Routine

IRQ is at $CEC4 ($CEC4) - a different address from RESET.

ROM

Property Value
Format iNES
Mapper 2
Board UNROM
Mirroring Horizontal
Four-screen VRAM no
Battery no
PRG 128 KB (8 x 16 KB), at file offset $0010
CHR none
Trainer none
Footer none
NMI vector $CE8D
RESET vector $E7BF
IRQ vector $CEC4
ROM file Zanac (U).nes
SHA-256 7e75a19b9e11715c0eb19a2017a322df02f5cf4f7b30acef0fa7a0615236bda4

Header notes

  • none

Open work

  • Pass 1 - complete. Banks 6 and 7 traced (44.5% of the image is code); banks 0-3 are empty and banks 4-5 are stage data. Build verifies byte-identical.
  • Pass 2 - complete. All 133 entry points have semantic names; ~212 internal branch labels remain as address-based names; All raw $XXXX jsr/jmp/branch operands replaced with label references.
  • Pass 3 - data tables done. Semantic zero-page aliases applied (14 named); 47 data blocks named for what they are and every one of the 104 data blocks the tracer emitted is recorded in the Pass 3 data-table inventory with its structure and its consuming instruction. What is still open is recorded rather than guessed at:
    • The 48-entry JMP trampoline table at $C000 and the 7-entry one at $EA3D are both entered by a computed jump. The Mesen CDL shows the CPU fetching 25 of the 48 opcodes, so the table is real, but the index arithmetic that selects an entry is in code this dump's tracer could not reach, so the meaning of an entry number is not established.
    • $C1A0-$C23F is a 160-byte pitch ladder whose values step up by 5, 9, 13, 17, 25 and 33; no instruction in this dump reads it, so its record layout is recorded as not established.
    • The banks 4-5 stage data holds 16 KB of 1-bit-per-pixel tile patterns and a table of 16-bit pointers at $8030; how the tile data is addressed inside the bank is not established.
    • 55 of the blocks are code the tracer could not reach. They are CDL silent or recorded as code, they decode cleanly as instructions, and they are left exactly as the tracer split them.
  • Promotion to NROM/<name>/ once ready, as git mv.

Files

File Purpose
prg.s Pass 3 disassembly for banks 0-5: banks 0-3 are empty, banks 4-5 hold the stage data
prg.6.s Pass 3 disassembly for bank 6, the switchable bank at CPU $8000-$BFFF
prg.07.s Pass 3 disassembly for bank 7, the fixed bank at CPU $C000-$FFFF
header.s iNES header include
prg.bin 131072 bytes (128 KB) PRG image
rom.nes byte-identical copy of the original ROM
linker.cfg HEADER / PRG / PRG6 / PRG7 memory areas
symbols.inc NES hardware register names
locals.inc zero-page aliases (14 semantic names applied)
Makefile build and byte-identity check