- Apply symbols.inc hardware register names to Defender 2 (U) (51 operands)
- Apply symbols.inc hardware register names to Donkey Kong 3 (JUE) (36 operands)
- Add APU register symbols (-) to Defender 2 (U) and Donkey Kong 3 (JUE) symbols.inc
- Apply symbols to Donkey Kong Jr. Math (U) (80 operands: 11 single + 69 hardware)
- Apply symbols to Excitebike (JU) (786 operands: 785 single + 1 hardware)
- Add promotion criteria to PROMPTS.md: symbol/local substitution,
ROM-specific semantic naming, and verification checklist
Add branch/jump target naming requirement to PROMPTS.md
All branches and jumps must target symbolic labels with descriptive names
derived from program flow role (e.g., _Loop, _Next, _Done, _Store, _Return),
never raw address literals. Adds criterion 8 to verification checklist.
Rename all OVERVIEW.md to README.md; add root README content to top-level
- Rename all OVERVIEW.md files to README.md throughout the repo (47 files)
- Prepend README.md content to top-level OVERVIEW.md before rename
- Fix apply_symbols.py NAME_RE regex to handle spaced assignments
- Apply symbols.inc to Defender 2 (U) (51 hardware operands)
- Apply symbols.inc to Donkey Kong 3 (JUE) (36 hardware operands)
- Apply symbols.inc to Donkey Kong Jr. Math (U) (80 operands: 11 single + 69 hardware)
- Apply symbols.inc to Excitebike (JU) (786 operands: 785 single + 1 hardware)
- Add missing Zp18/FrameCounter aliases to Excitebike prg.s
- Build all 27 top-level projects: byte-identical
Promote Donkey Kong Jr. Math back to _wip tier
Moves code from `copilot` folder and verifies each builds after
Add pre-commit hook for byte-identical verification
Add .git/hooks/pre-commit that runs 'make' then 'make clean' in each
project directory before committing. This ensures every project builds
byte-identical before any commit is accepted.
Also includes all file moves from the Donkey Kong Jr. Math (U) demotion
and other file restructuring from the session.
moves code out of copilot folder, its all AI generated.
Moves NROM games into NROM folder
removes copilot folder from Lunar Pool
Adds makefile to build all projects recursively
Updates docs to reflect changes in layout
Repromotes Donkey Kong Jr Math
Repromotes Excitebike
Promotes Popeye (JU) (PRG 1)
Updates Makefile to provide summary of build failure/success
Promote Raid on Bungeling Bay (U): Pass 2/3 partial, whole-ROM byte-identical
Move _wip/NROM/Raid on Bungeling Bay (U) to NROM/ and switch the build
from a PRG-only compare to a whole-ROM one:
- header.s/chr.s added (one-line .incbin of header.bin / chr.bin)
- linker.cfg gains HEADER ($0000, $0010) and CHR ($0000, $2000)
areas ahead of PRG ($C000, $4000)
- rom.nes symlink to the space-containing original ROM name
- Makefile builds header.o/prg.o/chr.o into reconstructed.nes and
compares it against rom.nes ('Byte-identical ROM verified.')
- one leftover neutral indirect operand jmp (Zp01) at $E2EC becomes
jmp (IndDispatch01); apply_symbols.py reports 0 substitutions pending
README.md / TODO.md / AGENTS.md updated: 29 promoted, 7 in _wip/.
Pac-Man (U): Pass 2 complete (label renaming) + Pass 3 partial (ZP aliases, table names)
Pass 2 — fresh map derived from the committed split, not from any drafted
map (the drafted maps in other projects were audited and found not
applicable):
- all 194 address-derived Label_XXXX definitions renamed to semantic
routine-entry names plus <Routine>_<Role>_<addr> internal branch
targets; zero Label_ remains
- all 49 jsr/jmp call sites resolved from raw $XXXX to labels; zero
raw $XXXX call operands remain
- routinemap.tsv / derived_names.tsv record the derivation
Pass 3 (partial):
- 15 proven semantic zero-page aliases added to locals.inc
(GameState, NmiFlag, ScrollX/Y, PpuCtrlShadow, OamDmaPage,
CocktailModeFlag, ActivePlayerFlag, GameplaySuspended, FrameCounter,
StateTimer, Player1/2Input, ActiveInput, CopyrightVerified)
- 112 operands substituted into prg.s (11 single + 101 hardware)
- key data tables named: ProgrammerSig ($C0EB), GameStateDispatchTable
($C253), TitleScreenData ($C2FD), EntityPtrTable ($D912),
AudioCommandTable ($EFDD)
Also corrects the README's claim that the RESET vector points at padding:
$FF00 holds real boot code (sei/cld, PPU off, double vblank wait, then
jmp ColdStart at $C042).
.gitignore: ignore reconstructed_prg.bin (build artifact of the _wip
Makefiles; '**/reconstructed.*' does not match the underscore form).
Promote Pac-Man (U): Pass 2/3 complete, whole-ROM byte-identical
Move _wip/NROM/Pac-Man (U) to NROM/ and switch the build from a PRG-only
compare to a whole-ROM one:
- header.s/chr.s added (one-line .incbin of header.bin / chr.bin)
- linker.cfg gains HEADER ($0000, $0010) and CHR ($0000, $2000)
areas ahead of PRG ($C000, $4000)
- rom.nes symlink to 'Pac-Man (U) [!].nes' (the original ROM name
contains a space and brackets)
- Makefile builds header.o/prg.o/chr.o into reconstructed.nes and
compares it against rom.nes
- reconstructed.nes is 24,592 bytes, MD5 a69d310f8cae9397fbd39f204672b5c7
- equal to the original ROM; the header/prg/chr splits were checked
against the original before promotion and are byte-exact
Pass 3 residue closed. The last 7 multi-alias zero-page operands are
resolved per site through a new sites.tsv, each proven from context
rather than guessed:
- jmp ($0010) at $C250/$D3CA/$D90F/$D9B6 -> (DispatchPtrLo); each
is immediately preceded by sta DispatchPtrLo/sta DispatchPtrHi
- jmp ($00FE) at $EFDA -> (AudioHandlerPtrLo); preceded by
sta AudioHandlerPtrLo/sta AudioHandlerPtrHi
- sta a:$0000,y at $C048/$C089 -> a:Zp00,y; the literal zero-page
base in the two ZP clear loops, so the neutral name is used rather
than the semantic WorkPtrLo. The 'a:' prefix survives the
substitution, so the bytes stay 99 00 00 (sta abs,Y)
apply_symbols.py now reports 119 operands substituted (101 hardware,
11 single-name, 7 site) and 0 residue.
New tool _tools/align_audit_comments.py: re-aligns the audit comment to
column 35 after a substitution lengthens an operand (nesdis.py pads each
instruction to 31 characters). Whitespace-only, so the byte identity
cannot change. 405 lines re-aligned in this project; all 2,387 audit
comments still match prg.bin at the stated PRG offset, 0 mismatches.
Docs: root README.md / TODO.md / AGENTS.md updated - 30 promoted, 6 in
_wip/; a per-project detail entry for Pac-Man (U) added; the stale
'Donkey Kong 3 (JUE) has no README.md' claim corrected (it has a
318-line one).
Promote Raid on Bungeling Bay (U) [a2]: Pass 3 complete, whole-ROM byte-identical
Move _wip/NROM/Raid on Bungeling Bay (U) [a2] to NROM/ and switch the build
from a PRG-only compare to a whole-ROM one:
- header.s/chr.s added (one-line .incbin of header.bin / chr.bin)
- linker.cfg gains HEADER ($0000, $0010) and CHR ($0000, $2000)
areas ahead of PRG ($C000, $4000)
- rom.nes symlink to 'Raid on Bungeling Bay (U) [a2].nes' (the original
ROM name contains spaces and brackets)
- reconstructed.nes is 24,592 bytes, MD5 659d340a1e9d420eee28df13319b0094
- equal to the original ROM; the header/prg/chr splits were checked
against the original before promotion and are byte-exact
Pass 3 - 15 semantic zero-page aliases, each applied only at the sites
where its role is proven:
- PpuCtrlShadow ($C2), 15 sites: the reset entry primes it right after
'sta PPUCTRL', and every other use is an ora/and/eor followed by
'sta PPUCTRL'
- NmiPathSelector ($C4), 5 sites: written 1 at $C3E9 and 0 at $C962
- GameState ($D6), 6 sites: 'cmp #$02' and used as an index at $C4C7
- FrameSubCounter ($55), 6 sites: set to $0A at $C520, decremented per
NMI at $C07B
- PrngPeriodCounter ($EA) / PrngSeedB ($EB) / PrngState ($EC), 13 sites:
the PRNG state
- PtrLo ($00) / PtrHi ($01), 8 sites: the 16-bit pair $1C13 and $1610
compared at $E785/$E791
- IndDispatch01 ($01) / IndDispatch02 ($02), 3 sites: the computed
dispatch at $E2EC
- IndDispatch1B ($1B) / IndDispatch1C ($1C), 6 sites: the dispatch at
$E7A3
- IndDispatch17 ($17) / IndDispatch19 ($19): the dispatches at $E79D
and $E7A0
Addresses that carry two names keep the neutral ZpXX name where the other
role applies - $01 is PtrHi at the 16-bit compare and IndDispatch01 at the
dispatch; $17 is IndDispatch17 at the dispatch and Zp17 for the absolute
RAM $0017 store in the copy loop at $E895/$E8D0.
New tool _tools/apply_zp_aliases.py does the per-site substitution:
apply_symbols.py only rewrites *numeric* operands, so it cannot rename an
operand that is already written as a neutral ZpXX name. The tool keeps the
ca65 'a:' prefix (dropping it would turn 'sta a:Zp17,y' into a zero-page
store and change the bytes) and rewrites only the operand token, so the
audit comment survives byte for byte.
Naming correction in the promoted sibling. Finishing this dump showed that
$EA was misnamed 'VBlankWaitCounter': the routine at $C412 is the game's
pseudo-random generator (the classic eor/asl/php/lsr/plp/rol scrambler,
called from thirteen gameplay sites, twice in a row at $CDF4/$CDF9 with the
second result masked #$07), so $EA is the scrambler's phase counter.
Renamed PrngPeriodCounter in both dumps and named $EB/$EC PrngSeedB /
PrngState. The sibling's two 'sta a:IndDispatch17,y' operands were also
wrong - they are absolute stores to RAM $0017, not the dispatch pointer -
and are now 'a:Zp17,y', matching the file's 'a:' = absolute convention.
Audit-comment alignment re-done with _tools/align_audit_comments.py (1,040
lines here, 1,080 in the sibling). Both files still match prg.bin at every
stated PRG offset: 5,467 and 5,483 audit comments, 0 mismatches.
Docs: root README.md / TODO.md / AGENTS.md updated - 31 promoted, 5 in
_wip/; per-project detail entries added for both Raid dumps.
Promote Pac-Man (Tengen) (U): Pass 2/3 from scratch, whole-ROM byte-identical
Move _wip/NROM/Pac-Man (Tengen) (U) to NROM/ and switch the build from a
PRG-only compare to a whole-ROM one:
- header.s/chr.s added (one-line .incbin of header.bin / chr.bin)
- linker.cfg gains HEADER ($0000, $0010) and CHR ($0000, $2000)
areas ahead of PRG ($C000, $4000)
- rom.nes symlink to 'Pac-Man (Tengen) (U) [!].nes'
- reconstructed.nes is 24,592 bytes, MD5 d34e7a74d8d2c231b6cc601210e28ad0
- equal to the original ROM; the header/prg/chr splits were checked
against the original before promotion and are byte-exact
Disassembled from scratch. No name, map or file was carried over from the
sibling 'Pac-Man (U)' dump; the map was derived from this dump's own
committed split and the two were only compared afterwards.
Pass 2 (new tool _tools/apply_pass2_map.py):
- all 194 Label_XXXX definitions renamed to semantic routine entries plus
<Routine>_<Role> branch targets; zero Label_ remains
- all 48 raw $XXXX jsr/jmp operands resolved to labels; zero raw $XXXX
call or branch operands remain
- the map is in routinemap.tsv
Pass 3:
- 30 semantic zero-page aliases, each applied only at the sites where its
role is proven (per-site choice in sites.tsv; the addresses that carry
two roles keep the neutral ZpXX name elsewhere). _tools/
derive_zp_aliases.py records how the set was derived, and locals.inc
records the reason for every remaining neutral slot
- 28 data tables named (new tool _tools/name_data_region.py), including
CharacterDataTable ($C66A) and CharacterNameStrings ($C67E), where the
ROM itself names Blinky, Pinky, Inky and Clyde - which is why the four
indexed entities are called ghosts and not 'actors'
- apply_symbols.py reports 0 substitutions pending and 0 residue
- audit-comment alignment re-done with _tools/align_audit_comments.py;
all 2,479 audit comments still match prg.bin at the stated PRG offset
Pass 1 correction - six command handlers recovered (new tool
_tools/recode_region.py). ScriptCommandTable ($EFDD) is read by the traced
instruction at $EFCC, and six of its entries point at $F00A, $F022, $F03A,
$F052, $F062 and $F072 - all of which the tracer had left as data, and two
of which it had mis-split across the 'jmp $EF61' at $F01F and $F04F.
Those 120 bytes are code here, decoded straight from the ROM; the six
handlers tile $F00A-$F081 exactly. The same gap exists in the promoted
'Pac-Man (U)' dump, which has not been corrected - recorded in both READMEs.
Residue (documented, not guessed): the unreached main game logic at
$C45A-$C55F is still .byte data. It is code - the tracer's own decoder
walks it cleanly and the dispatch table at $C511 points into it - but
nothing reaches it, so it cannot be entered without a guess. The same gap
exists in the promoted 'Pac-Man (U)' dump. Re-deriving it is a Pass 1 job;
a Mesen Code Data Logger capture is the tool the repo uses for it.
Docs: root README.md / TODO.md / AGENTS.md updated - 32 promoted, 4 in
_wip/; a per-project detail entry added for the Tengen dump.
Promote Pyramid (U): Pass 1 corrected, Pass 2/3 complete, whole-ROM byte-identical
Move _wip/NROM/Pyramid (U) to NROM/ and switch the build from a PRG-only
compare to a whole-ROM one:
- header.s/chr.s added (one-line .incbin of header.bin / chr.bin)
- linker.cfg gains HEADER ($0000, $0010) and CHR ($0000, $2000)
areas ahead of PRG ($C000, $4000)
- rom.nes symlink to 'Pyramid (U) (Sachen).nes'
- reconstructed.nes is 24,592 bytes, MD5 aa285ff17f25dd05da5996b7466c59e2
- equal to the original ROM; the header/prg/chr splits were checked
against the original before promotion and are byte-exact
Pass 1 correction - the committed split was a strict subset of the correct
one. This game dispatches through 'jmp' trampoline tables that live
*inside* the data regions, and the tracer cannot follow a jmp there, so
828 bytes of code were still marked as data. Four such tables were found
($C01E 3 entries, $C02A 6, $C042 2, $C054 5) plus ten more entries at
$C000-$C01B; all sixteen targets decode as valid instructions. Seeding
them, the $C800 boot mainline and six further code starts recovers the
whole lot, plus a five-byte stub at $DF89 (lda $33 / jmp $DECB) that sat
in a hole between two routines. The re-trace loses NO committed code byte
and takes the split from 34.5% to 39.6% (3,130 instructions / 6,493 code
bytes). 'make regen' reproduces it, so the split stays verifiable.
Pass 2 - a fresh map derived from this dump's own committed split:
- 428 Label_XXXX definitions renamed; zero Label_ residue
- 320 raw $XXXX jsr/jmp operands resolved; zero raw $XXXX branch
operands remain
- 431 routine entries and the 32 data blocks named from the code
- the internal branch-target names are derived mechanically from the
branch that reaches them by the new _tools/derive_branch_names.py
(beq -> OnZero, bne -> OnNonzero, bcc/bcs -> the carry cases, a
backwards branch -> Loop)
- recorded in routinemap.tsv
Pass 3:
- 24 semantic zero-page aliases, each applied only where its role is
proven; the 57 slots that stay neutral are each listed with the reason
in locals.inc (the neutral set lives in zp_aliases.inc so that
'make regen' can rebuild locals.inc from prg.bin)
- 32 data tables named - TaskVectorTable1/2, LevelScriptData,
MusicPeriodTable, SoundEnvelopeTable, the actor tables - recorded in
data_region_names.tsv
- apply_symbols.py reports 0 substitutions pending and 0 residue; no
hardware register is left as a raw literal
- the audit comments are now canonical on every line, data included
(the old file carried only 'PRG:$xxxx' on its 1,358 data lines);
all 3,762 audit comments match prg.bin at their stated PRG offset
Kept as-is, not 'cleaned up':
- sta $4100 stays a raw operand. The iNES header claims mapper 0 but
the boot code writes past the NES register space; the ROM does not
explain it, so it is recorded rather than guessed
- the 'A'/'V' check on RAM $0120/$0121 and its seed/clear routines
are named for what they do, not for what they are for
- the ninth entry of the $C3A6 task vector table ($D820) is a junk
slot and stays data
Docs: root README.md / TODO.md / AGENTS.md updated - 33 promoted, 3 in
_wip/; a per-project detail entry added.
Hogan's Alley (JU): Pass 1 correction, Pass 2, Pass 3, promoted to NROM/
The light-gun game whose engine dispatches through *inline* tables:
`IndirectCall` at $C34D pops the return address of the `jsr` that called
it and reads a 16-bit handler pointer from the word that follows, so all
six handler tables ($C124 19 entries, $C219 4, $C89C 14, $CDD1 1, $D234 2,
$D3D6 14) live inside the code stream and the static tracer cannot follow
them.
Pass 1 correction. The committed split was a strict subset of the correct
one -- 41.8% of the PRG was classified as code. A fresh Mesen Code Data
Logger capture was merged with the four captures already in the folder
(hogans_merged.cdl, the OR of five per-byte flag arrays, 6,544 code bytes)
and _tools/cdl_reclass.py rewrote the split to match what the CPU actually
fetched: 1,216 bytes moved from data to code, five the other way, 59 labels
emitted. The split is now 49.1% code (3,950 instructions, 8,041 bytes).
The four branch targets the reclassifier could not prove were turned into
labels by the new _tools/resolve_raw_branches.py.
Pass 2. 206 routine entries hand-named from this dump's own code and 413
internal branch targets derived mechanically by _tools/derive_branch_names.py:
630 Label_XXXX definitions gone, 484 raw $XXXX call operands resolved, 15
call targets the tracer had never labelled given a label. Recorded in
routinemap.tsv. No SubC<addr> residue was needed -- every entry the engine
reaches is named after what it does.
Pass 3. 60 semantic zero-page aliases, each applied only where its role is
proven (zp_aliases.inc, zp_alias_sites.tsv); the slots that stay neutral are
each listed with the reason. All 34 data blocks named
(data_region_names.tsv). apply_symbols.py reports 1 residue: `sta a:$00B4,y`
at $C203, the same address as Zp40/ActorPalette but forced to absolute
addressing, so it must stay numeric.
Promotion. header.s, chr.s and a HEADER/PRG/CHR linker.cfg added, rom.nes
symlinked to the original ROM; the whole-ROM cmp passes on the first
promoted build. There is deliberately no `make regen` target: the Pass 1
split here is the static trace corrected by a CDL capture, and the base the
correction was applied to is not what the current _tools/nesdis.py
produces, so prg.s is the maintained source of truth.
Tools changed:
nesdis.py --split/--note/--provenance options, so a data
region can carry its own name and explanation;
a forced-data address is no longer reported as a
recovered routine entry
apply_pass2_map.py can create the label for a call target the tracer
left unlabelled; no longer double-labels it
apply_zp_aliases.py --at-file, an address-based per-site list
derive_branch_names.py keeps the map's own header instead of writing a
fixed one
resolve_raw_branches.py new: turns `bXX *+$NN` operands into labels
build_hogans_map.py new: the hand-written Pass 2 map builder
The existing regen pipelines (MUSCLE (U), Urban Champion (JU)) still
reproduce prg.s byte for byte.
Apply the symbols.inc register names at Pass 1; fix a dropped byte in cdl_reclass
nesdis.py now names the hardware registers as it renders the operands, so a
project's Pass 1 output already reads `lda PPUSTATUS` instead of `lda $2002`
and the Pass 3 apply_symbols.py step has nothing left to do for them.
* nesdis.py --symbols FILE reads a symbols.inc-style file and substitutes
the register names. Only unambiguous entries in the $2000-$4017 window
are used: $4017 is both JOY2 and APUFRAMECOUNTER, so it stays numeric
and apply_symbols.py reports it as multi-alias residue, exactly as
before. The default is the symbols.inc next to --out, so a new project
gets the names without asking; --no-symbols opts out.
* The renderer records the operand's numeric value on the Insn, because
operand_value() used to re-parse the operand text and could no longer
read a name.
* The controller bit masks in symbols.inc (PAD_A and friends) are
constants, not addresses, and are still never substituted.
MUSCLE (U) and Urban Champion (JU) keep --no-symbols: their committed
prg.s was produced with the registers named by the Pass 3 apply_symbols.py
step, and the columns in those files reflect the in-place substitution.
Adding the missing apply_symbols.py step to both regen pipelines makes
them reproduce their committed prg.s byte for byte again - neither did
before this change (MUSCLE was 440 lines out, Urban Champion 772).
cdl_reclass.py had a bug that cost a byte: a region whose last source row
straddled the region's end was replaced by a regeneration of the region
only, so the tail of that row was dropped. Mario Bros (JU) hit it at
$C595, where the rebuild came out one byte short and every label after it
shifted. A region now covers the whole rows it replaces.
pass2.py reflow takes an optional column argument; the default is
unchanged (the ';' lands on the same column as before).
Mario Bros (JU): Pass 1 correction, Pass 2, Pass 3, promoted to NROM/
A two-player platformer whose handler tables are *inline*: the pointers sit
in the middle of the code stream, right after the `jsr` that reads them, so
the static tracer could never follow them.
Pass 1 correction. The committed split was a strict subset of the correct
one -- only 72.0% of the PRG was classified as code. A Mesen Code Data
Logger capture of this ROM (mario_mesen.cdl, 10,915 code bytes) showed
1,010 bytes the tracer had left as data were code; two branch targets the
capture never reached ($E4CB and $E639) were forced with --override for 57
more, so 1,067 bytes moved from data to code and 22 moved the other way.
The split is now 78.4% code (6,210 instructions, 12,847 bytes). The three
branch targets the reclassifier could not prove were turned into labels by
_resolve_raw_branches.py, which now refuses to put a label on a `.byte` row.
Pass 2. 206 routine entries and 519 internal branch targets: 931
Label_XXXX definitions gone, 51 raw $XXXX call operands resolved and 12 call
targets the tracer had never labelled given a label. Zero SubC residue --
the 185 entries a previous session had left as address-derived residue were
all named from this dump's own code. Recorded in routinemap.tsv.
Pass 3. 25 semantic zero-page aliases, each applied only where its role is
proven (zp_aliases.inc); the slots that stay neutral are each listed with the
reason. 35 data tables named -- GameStateHandlerTable, EnemyBehaviourTable,
EnemyScriptTable, EnemyTypePointerTable, SoundRoutineTable,
NoteFrequencyTable and the rest -- and recorded in
data_region_names.tsv. apply_symbols.py reports 0 residue.
Promotion. header.s, chr.s and a HEADER/PRG/CHR linker.cfg added, rom.nes
symlinked to the original ROM; the whole-ROM cmp passes on the first
promoted build. There is deliberately no `make regen` target: the Pass 1
split here is the static trace corrected by a CDL capture, and the base the
correction was applied to is not what the current _tools/nesdis.py
produces, so prg.s is the maintained source of truth.
Tools:
apply_pass2_map.py renames a label of any spelling -- SubC<addr> is
the honest residue form -- and its references
follow it; one combined pattern, so a 16,000-line
file does not need a substitution per label
resolve_raw_branches.py refuses to label a data row
build_mario_map.py new: the hand-written Pass 2 map builder
Remove the old _wip/NROM/Mario Bros (JU) folder (promoted to NROM/)
Mario Bros (JU): add the promoted-tier header, CHR, rom.nes symlink and zero-page aliases
Moves _ROMS/<ROM> into _wip/<MAPPER>/<ROM>
Sync the docs and the skeleton tool with the 857-project _wip tier
The _wip/ tier now holds 857 projects across 30 mapper folders, all
building byte-identical for the whole ROM. README.md, TODO.md and
AGENTS.md still described the old 39-project tier, so bring them in line
with WIP.md, which carries the tier's index.
The tier is no longer 39 projects of NROM-256 with a 16/32 KB PRG:
only two projects have a 16 KB PRG, 151 have 32 KB, 523 have 128 KB and
one has 1.5 MB, so most of it is a banked mapper whose image does not fit
the 6502's address space. Those projects link their MEMORY areas at .nes
file offsets rather than CPU addresses, which is the only option and the
honest model; the 39 older projects keep the CPU-address layout because
their PRG really is one contiguous window.
make_skeleton.py gains the two layouts (--layout flat|cpu), the board
name for the mapper, and a fix for find_rom() mistaking the build
output reconstructed.nes for the source ROM.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
391 lines
29 KiB
PHP
391 lines
29 KiB
PHP
; Hogan's Alley (JU) application-specific RAM aliases - Pass 1
|
|
; Generated from every direct zero-page operand in reachable code:
|
|
; ref counts are reads/writes, `where` lists the referencing addresses.
|
|
; ZpXX names indicate storage with a role not yet unique enough for a behavioral name;
|
|
; Pass 2 replaces them with names derived from observed usage.
|
|
|
|
Zp00 = $00 ; 49 refs; reads=25 writes=24; used at $C01A, C01E, C22C, C23D, +44 more
|
|
Zp01 = $01 ; 34 refs; reads=13 writes=21; used at $C016, C023, C228, C239, +28 more
|
|
Zp02 = $02 ; 33 refs; reads=22 writes=11; used at $C31D, C421, C427, C44D, +29 more
|
|
Zp03 = $03 ; 21 refs; reads=4 writes=17; used at $C65E, C660, C67B, C69F, +17 more
|
|
Zp04 = $04 ; 19 refs; reads=13 writes=6; used at $C42D, C469, C48E, C4A0, +14 more
|
|
Zp05 = $05 ; 17 refs; reads=9 writes=8; used at $C425, C442, C4A9, C4D3, +11 more
|
|
Zp06 = $06 ; 22 refs; reads=12 writes=10; used at $C444, C452, C5B5, C5B8, +11 more
|
|
Zp07 = $07 ; 5 refs; reads=2 writes=3; used at $C5CC, C5D0, D731, D74E, +1 more
|
|
Zp08 = $08 ; 14 refs; reads=8 writes=6; used at $C052, C2DE, C2E9, C30B, +10 more
|
|
Zp09 = $09 ; 8 refs; reads=4 writes=4; used at $C056, C75B, C75F, C768, +4 more
|
|
Zp0A = $0A ; 12 refs; reads=9 writes=3; used at $C3A9, C5BA, CF8C, D02D, +5 more
|
|
Zp0B = $0B ; 3 refs; reads=3 writes=0; used at $C3C9, C5D8, D828
|
|
Zp0C = $0C ; 2 refs; reads=1 writes=1; used at $D449, D456
|
|
Zp0F = $0F ; 2 refs; reads=1 writes=1; used at $CCDD, CCF4
|
|
Zp10 = $10 ; 19 refs; reads=12 writes=7; used at $C506, C532, C536, C53B, +15 more
|
|
Zp11 = $11 ; 14 refs; reads=10 writes=4; used at $C4ED, C502, C508, C547, +10 more
|
|
Zp12 = $12 ; 13 refs; reads=9 writes=4; used at $C551, C557, C586, CE51, +8 more
|
|
Zp13 = $13 ; 16 refs; reads=8 writes=8; used at $C510, C515, C51E, C523, +9 more
|
|
Zp14 = $14 ; 4 refs; reads=2 writes=2; used at $C351, C356, C35A, C35E
|
|
Zp15 = $15 ; 5 refs; reads=1 writes=4; used at $C354, C35C, DB6A, DB76
|
|
Zp16 = $16 ; 3 refs; reads=2 writes=1; used at $C0BF, C173, C2AF
|
|
Zp18 = $18 ; 7 refs; reads=3 writes=4; used at $CE62, CE64, CE84, D689, +3 more
|
|
Zp19 = $19 ; 17 refs; reads=9 writes=8; used at $CEAD, CEBA, CEBC, CED3, +9 more
|
|
Zp1A = $1A ; 2 refs; reads=1 writes=1; used at $D26B, D270
|
|
Zp1C = $1C ; 2 refs; reads=1 writes=1; used at $C0FD, C272
|
|
Zp1D = $1D ; 3 refs; reads=1 writes=2; used at $C10C, C264
|
|
Zp1E = $1E ; 2 refs; reads=1 writes=1; used at $C3ED, D826
|
|
Zp1F = $1F ; 2 refs; reads=1 writes=1; used at $C3F2, D82A
|
|
Zp20 = $20 ; 10 refs; reads=6 writes=4; used at $C07A, C07E, C0AF, C27A, +6 more
|
|
Zp21 = $21 ; 6 refs; reads=1 writes=5; used at $C2BD, C302, C41E, C486, +2 more
|
|
Zp22 = $22 ; 5 refs; reads=1 writes=4; used at $C07C, C098, C0AD, C27E, +1 more
|
|
Zp23 = $23 ; 14 refs; reads=1 writes=13; used at $C24E, C260, C7F9, CA07, +10 more
|
|
Zp24 = $24 ; 7 refs; reads=5 writes=2; used at $C043, C065, C0B8, C184, +3 more
|
|
Zp25 = $25 ; 13 refs; reads=4 writes=9; used at $C0CE, C0FB, C101, C108, +9 more
|
|
Zp26 = $26 ; 9 refs; reads=7 writes=2; used at $C069, C15E, C17D, C199, +4 more
|
|
Zp27 = $27 ; 4 refs; reads=3 writes=1; used at $C3B6, C3BE, C3D0
|
|
Zp28 = $28 ; 3 refs; reads=2 writes=1; used at $C3DB, D841
|
|
Zp29 = $29 ; 5 refs; reads=2 writes=3; used at $C031, C407, D806, D80B, +1 more
|
|
Zp2A = $2A ; 6 refs; reads=2 writes=4; used at $C0E6, C190, C26D, C339, +1 more
|
|
Zp2B = $2B ; 4 refs; reads=2 writes=2; used at $C343, C347, DB35
|
|
Zp2D = $2D ; 7 refs; reads=2 writes=5; used at $C192, C1CD, C1D5, CDEB, +3 more
|
|
Zp2F = $2F ; 4 refs; reads=3 writes=1; used at $C076, C6C0, D520
|
|
Zp30 = $30 ; 1 refs; reads=1 writes=0; used at $D1CA
|
|
Zp3F = $3F ; 15 refs; reads=13 writes=2; used at $C3B0, C3FC, C781, C7C4, +11 more
|
|
Zp40 = $40 ; 6 refs; reads=2 writes=4; used at $CBE3, CBF0, D5EF, DC25, +1 more
|
|
Zp41 = $41 ; 23 refs; reads=6 writes=17; used at $CA2B, CA61, CA98, CB2F, +15 more
|
|
Zp42 = $42 ; 2 refs; reads=0 writes=2; used at $CB8E, DC10
|
|
Zp43 = $43 ; 3 refs; reads=0 writes=3; used at $CB90, DAD1, DC12
|
|
Zp44 = $44 ; 6 refs; reads=2 writes=4; used at $CB9E, CBA5, CBB1, CDC9, +2 more
|
|
Zp45 = $45 ; 32 refs; reads=5 writes=27; used at $C0F6, CA0C, CA5D, CA7D, +27 more
|
|
Zp46 = $46 ; 11 refs; reads=5 writes=6; used at $CDC1, CE78, D1A6, D9DC, +6 more
|
|
Zp47 = $47 ; 19 refs; reads=10 writes=9; used at $C916, C918, C937, CDC5, +13 more
|
|
Zp49 = $49 ; 1 refs; reads=1 writes=0; used at $DB60
|
|
Zp4A = $4A ; 6 refs; reads=3 writes=3; used at $C91A, DAE1, DAE8, DB66, +2 more
|
|
Zp4B = $4B ; 6 refs; reads=4 writes=2; used at $D599, D5AD, DAEA, DAF0, +2 more
|
|
Zp4C = $4C ; 6 refs; reads=4 writes=2; used at $D4E7, D52B, D59E, DB78, +2 more
|
|
Zp4D = $4D ; 4 refs; reads=3 writes=1; used at $D4B7, DB7D, DB7F, DB85
|
|
Zp4E = $4E ; 1 refs; reads=1 writes=0; used at $D525
|
|
Zp4F = $4F ; 3 refs; reads=1 writes=2; used at $DA77, DA7E, DBCD
|
|
Zp50 = $50 ; 6 refs; reads=4 writes=2; used at $D5F8, DA61, DA73, DA80, +1 more
|
|
Zp51 = $51 ; 5 refs; reads=3 writes=2; used at $C8B8, CA0E, CB28, DB9B
|
|
Zp52 = $52 ; 1 refs; reads=1 writes=0; used at $DB97
|
|
Zp53 = $53 ; 1 refs; reads=1 writes=0; used at $DBCF
|
|
Zp55 = $55 ; 1 refs; reads=1 writes=0; used at $DBCB
|
|
Zp57 = $57 ; 2 refs; reads=1 writes=1; used at $D9DA, DBD5
|
|
Zp59 = $59 ; 5 refs; reads=3 writes=2; used at $D9FF, DA33, DA37, DBB9
|
|
Zp5A = $5A ; 19 refs; reads=12 writes=7; used at $CAA7, CAB3, CB20, CC87, +12 more
|
|
Zp5B = $5B ; 11 refs; reads=7 writes=4; used at $CB12, D419, D422, D42A, +6 more
|
|
Zp5C = $5C ; 11 refs; reads=6 writes=5; used at $CA6B, CA83, CA85, CAEA, +5 more
|
|
Zp5D = $5D ; 12 refs; reads=6 writes=6; used at $CA6F, CA7F, CADB, CAF2, +8 more
|
|
Zp5E = $5E ; 4 refs; reads=2 writes=2; used at $CA57, DA07, DA0D
|
|
Zp5F = $5F ; 7 refs; reads=3 writes=4; used at $CA8B, DA09, DA12, DA31, +1 more
|
|
Zp72 = $72 ; 5 refs; reads=2 writes=3; used at $CA51, CA63, CB16, CB1E
|
|
Zp73 = $73 ; 7 refs; reads=4 writes=3; used at $CA53, CA94, D17C, D3A4, +1 more
|
|
Zp74 = $74 ; 3 refs; reads=1 writes=2; used at $CA66, D3B5, D3BB
|
|
Zp7C = $7C ; 3 refs; reads=0 writes=3; used at $C933, CA03, D17A
|
|
Zp7D = $7D ; 4 refs; reads=1 writes=3; used at $C913, D16A, D174, D181
|
|
Zp7E = $7E ; 3 refs; reads=1 writes=2; used at $D14E, D166, D17F
|
|
Zp7F = $7F ; 2 refs; reads=1 writes=1; used at $D152, D160
|
|
Zp80 = $80 ; 7 refs; reads=5 writes=2; used at $C92C, CABC, D372, D382, +2 more
|
|
Zp81 = $81 ; 3 refs; reads=2 writes=1; used at $CBDC, CBEC, DB3C
|
|
Zp83 = $83 ; 4 refs; reads=2 writes=2; used at $CBB9, CBC5, CBD9
|
|
Zp84 = $84 ; 3 refs; reads=2 writes=1; used at $CABF, CBD7, DC29
|
|
Zp85 = $85 ; 2 refs; reads=1 writes=1; used at $CBC7, CBD5
|
|
Zp86 = $86 ; 6 refs; reads=2 writes=4; used at $CA15, CA9C, CAC6, CACF, +1 more
|
|
Zp89 = $89 ; 2 refs; reads=1 writes=1; used at $D66D
|
|
Zp8A = $8A ; 1 refs; reads=1 writes=0; used at $DB38
|
|
Zp8B = $8B ; 3 refs; reads=2 writes=1; used at $DB2F, DB31, DC27
|
|
Zp8C = $8C ; 3 refs; reads=2 writes=1; used at $DA95, DC33
|
|
Zp90 = $90 ; 14 refs; reads=9 writes=5; used at $CF8A, CF96, CF9D, CFA4, +7 more
|
|
Zp91 = $91 ; 5 refs; reads=3 writes=2; used at $CE7A, CEDB, CF0C, D08A, +1 more
|
|
Zp92 = $92 ; 5 refs; reads=3 writes=2; used at $CE82, CEF6, CF10, D08F, +1 more
|
|
Zp93 = $93 ; 2 refs; reads=1 writes=1; used at $CECE, CEE9
|
|
Zp94 = $94 ; 8 refs; reads=4 writes=4; used at $CDAB, CDBD, CE3B, CEFE, +3 more
|
|
Zp95 = $95 ; 2 refs; reads=1 writes=1; used at $CF43, CF47
|
|
Zp96 = $96 ; 4 refs; reads=2 writes=2; used at $CF4B, CF4E, CF50
|
|
Zp97 = $97 ; 5 refs; reads=1 writes=4; used at $C7FD, CF62, CF70, CF73, +1 more
|
|
Zp98 = $98 ; 3 refs; reads=1 writes=2; used at $CF5A, CF5E, CF68
|
|
Zp99 = $99 ; 9 refs; reads=4 writes=5; used at $C15C, CA00, CF6C, D3AC, +2 more
|
|
Zp9A = $9A ; 1 refs; reads=1 writes=0; used at $CA45
|
|
Zp9D = $9D ; 1 refs; reads=1 writes=0; used at $CA49
|
|
ZpA6 = $A6 ; 3 refs; reads=2 writes=1; used at $CD55, CD5B
|
|
ZpA7 = $A7 ; 4 refs; reads=2 writes=2; used at $CC19, CC27, CC37, CC45
|
|
ZpA8 = $A8 ; 2 refs; reads=1 writes=1; used at $C903, C911
|
|
ZpA9 = $A9 ; 2 refs; reads=1 writes=1; used at $D7CB, D7D9
|
|
ZpAA = $AA ; 4 refs; reads=3 writes=1; used at $D057, D317, D3A8, D7DB
|
|
ZpAB = $AB ; 6 refs; reads=4 writes=2; used at $CD38, CD51, D7C3, D7C9, +1 more
|
|
ZpAC = $AC ; 10 refs; reads=4 writes=6; used at $D320, D343, D70F, D718, +5 more
|
|
ZpAD = $AD ; 2 refs; reads=1 writes=1; used at $D73B, D77B
|
|
ZpAE = $AE ; 4 refs; reads=2 writes=2; used at $D6EB, D6F6, D707
|
|
ZpAF = $AF ; 10 refs; reads=5 writes=5; used at $D7FA, D811, D839, D83F, +3 more
|
|
ZpB0 = $B0 ; 13 refs; reads=9 writes=4; used at $CC29, CC32, CC47, CC50, +8 more
|
|
ZpB1 = $B1 ; 7 refs; reads=5 writes=2; used at $CC11, CC13, CD12, CD68, +2 more
|
|
ZpB2 = $B2 ; 8 refs; reads=6 writes=2; used at $CC52, CC5C, CC6C, CD43, +3 more
|
|
ZpB3 = $B3 ; 7 refs; reads=6 writes=1; used at $CD06, CDE2, CE0B, CE15, +3 more
|
|
ZpB4 = $B4 ; 5 refs; reads=3 writes=2; used at $C7BD, C7CC, C7E6, CCE7, +1 more
|
|
ZpB5 = $B5 ; 4 refs; reads=3 writes=1; used at $CC96, CC9F, CCBA, CCC2
|
|
ZpB6 = $B6 ; 2 refs; reads=1 writes=1; used at $CC8E, CC94
|
|
ZpC1 = $C1 ; 10 refs; reads=5 writes=5; used at $F9A3, F9B2, F9BD, F9BF, +4 more
|
|
ZpC2 = $C2 ; 4 refs; reads=2 writes=2; used at $FBCD, FBE9, FBEB
|
|
ZpC3 = $C3 ; 5 refs; reads=2 writes=3; used at $FB53, FB68, FB6A, FB72
|
|
ZpC5 = $C5 ; 3 refs; reads=1 writes=2; used at $FB57, FB64, FB81
|
|
ZpC6 = $C6 ; 3 refs; reads=2 writes=1; used at $C219, FA4C, FAD9
|
|
ZpC7 = $C7 ; 4 refs; reads=2 writes=2; used at $FC0E, FC11, FC13
|
|
ZpC8 = $C8 ; 6 refs; reads=1 writes=5; used at $F9D5, FB0D, FB23, FB34, +2 more
|
|
ZpC9 = $C9 ; 4 refs; reads=2 writes=2; used at $FB55, FB79, FB7B
|
|
ZpCD = $CD ; 2 refs; reads=2 writes=0; used at $CDD1, CDD3
|
|
ZpD0 = $D0 ; 6 refs; reads=3 writes=3; used at $F7E0, F823, F825, F932, +1 more
|
|
ZpD1 = $D1 ; 7 refs; reads=4 writes=3; used at $F7E2, F85B, F85D, F866, +1 more
|
|
ZpD2 = $D2 ; 4 refs; reads=2 writes=2; used at $F7E4, F892, F894
|
|
ZpD3 = $D3 ; 4 refs; reads=2 writes=2; used at $F7E6, F8E5, F8E7
|
|
ZpD4 = $D4 ; 2 refs; reads=1 writes=1; used at $F930, F93F
|
|
ZpD8 = $D8 ; 3 refs; reads=1 writes=2; used at $F7D4, F813
|
|
ZpD9 = $D9 ; 4 refs; reads=1 writes=3; used at $F7D6, F855, F87C
|
|
ZpDA = $DA ; 3 refs; reads=1 writes=2; used at $F7D8, F882
|
|
ZpDB = $DB ; 3 refs; reads=1 writes=2; used at $F7DA, F8D5
|
|
ZpDC = $DC ; 1 refs; reads=0 writes=1; used at $F94D
|
|
ZpDD = $DD ; 1 refs; reads=1 writes=0; used at $F87A
|
|
ZpE0 = $E0 ; 6 refs; reads=3 writes=3; used at $F92A, F92E, F939, F93B
|
|
ZpE4 = $E4 ; 4 refs; reads=1 writes=3; used at $F9DF, FCB4, FCC3
|
|
ZpE5 = $E5 ; 2 refs; reads=1 writes=1; used at $F7A8, F947
|
|
ZpE6 = $E6 ; 5 refs; reads=2 writes=3; used at $F79F, F9DD, FA1A, FA22, +1 more
|
|
ZpE9 = $E9 ; 1 refs; reads=0 writes=1; used at $F7F1
|
|
ZpEA = $EA ; 2 refs; reads=1 writes=1; used at $F7F3, F875
|
|
ZpEB = $EB ; 5 refs; reads=2 writes=3; used at $FA48, FA4A, FA52, FAE8
|
|
ZpEC = $EC ; 4 refs; reads=2 writes=2; used at $FA7D, FA7F, FAEA
|
|
ZpED = $ED ; 3 refs; reads=1 writes=2; used at $FA54, FA65, FADB
|
|
ZpEE = $EE ; 4 refs; reads=2 writes=2; used at $FA94, FA96, FAEC
|
|
ZpEF = $EF ; 3 refs; reads=1 writes=2; used at $FA67, FA7A, FADD
|
|
ZpF0 = $F0 ; 6 refs; reads=4 writes=2; used at $D2AF, D2B1, F97F, F9FF, +2 more
|
|
ZpF1 = $F1 ; 4 refs; reads=2 writes=2; used at $D2D2, D2D4, F98D, FC48
|
|
ZpF2 = $F2 ; 6 refs; reads=4 writes=2; used at $D2F0, D2F2, F98F, FAFC, +2 more
|
|
ZpF3 = $F3 ; 33 refs; reads=18 writes=15; used at $F7DE, F9AA, F9B0, F9C5, +29 more
|
|
ZpF4 = $F4 ; 2 refs; reads=0 writes=2; used at $F784, F792
|
|
ZpF5 = $F5 ; 1 refs; reads=0 writes=1; used at $F788
|
|
ZpF6 = $F6 ; 2 refs; reads=1 writes=1; used at $F78A, F790
|
|
ZpF7 = $F7 ; 1 refs; reads=0 writes=1; used at $F78C
|
|
ZpF8 = $F8 ; 2 refs; reads=1 writes=1; used at $F7AD, F827
|
|
ZpF9 = $F9 ; 2 refs; reads=1 writes=1; used at $F7B2, F80F
|
|
ZpFA = $FA ; 3 refs; reads=2 writes=1; used at $F7B7, F85F, F86A
|
|
ZpFB = $FB ; 2 refs; reads=1 writes=1; used at $F7BC, F851
|
|
ZpFC = $FC ; 2 refs; reads=1 writes=1; used at $F7C1, F896
|
|
ZpFD = $FD ; 2 refs; reads=1 writes=1; used at $F7C6, F87E
|
|
ZpFE = $FE ; 2 refs; reads=1 writes=1; used at $F7CB, F8E9
|
|
ZpFF = $FF ; 2 refs; reads=1 writes=1; used at $F7D0, F8D1
|
|
; ---------------------------------------------------------------------------
|
|
; Semantic zero-page aliases (Pass 3)
|
|
;
|
|
; Every alias below was read out of this dump's own code. The neutral ZpXX
|
|
; name stays on the same line in locals.inc so the file keeps both readings.
|
|
;
|
|
; $04/$05/$06 the shape of the tile record the VRAM writer is drawing:
|
|
; $04 counts the lines, $05 the bytes per line and $06 the
|
|
; bytes still to write on the current line ($C425-$C469)
|
|
; $08/$09 the PPU register shadows: $08 is written back to $2000
|
|
; (PPUCTRL) at $C2E9 and $C312, $09 to $2001 (PPUMASK) at
|
|
; $C75F and $C76A
|
|
; $10-$13 the decoded tile byte: $11 is the packed byte read from the
|
|
; script, $10 the decoded value, $12 a copy of it and $13 the
|
|
; flip bits pulled out of $11 ($C4ED-$C55F)
|
|
; $14/$15 the 16-bit handler pointer the inline dispatch table hands
|
|
; to `jmp ($0014)` ($C351-$C35E)
|
|
; $16 the debounced controller buttons; $C0C1 tests bit 4 of it,
|
|
; which is PAD_START
|
|
; $1C the sub-state saved before the game switches to another one
|
|
; and restored afterwards ($C0FD saves, $C272 restores)
|
|
; $20 the game-frame-pending flag: the NMI sets it ($C0AF) and
|
|
; the main loop branches on it ($C07E)
|
|
; $21 the "the HUD is waiting to be drawn" flag ($C41E sets it,
|
|
; $C2BD tests it)
|
|
; $22 the NMI phase flag: it is set while the NMI handler is
|
|
; running so the handler does not run twice in a frame
|
|
; ($C098 tests it, $C0AD sets it)
|
|
; $23 the index into the display-list of 16-bit VRAM addresses
|
|
; at $E657 ($C24E reads it, $C260 clears it)
|
|
; $24 the game mode, tested by the state dispatcher at $C0B8
|
|
; $25 the sub-state index: it selects the word read from the
|
|
; inline dispatch table at $C124 ($C11F)
|
|
; $26 the mode index: it selects the word read from the inline
|
|
; dispatch table at $C219 ($C214)
|
|
; $29 the Y position of the attract-mode sprite, written to the
|
|
; OAM byte 0 at $0200 ($C409)
|
|
; $2A the frame countdown, reloaded with 10 when it underflows
|
|
; ($C339-$C33F); it is also the first byte of the six-byte
|
|
; round-parameter block copied to $0430
|
|
; $30 the attract-mode timer, reloaded with 2 ($C722) and
|
|
; decremented once a second ($C728)
|
|
; $3F the slot of the player the code is working on ($CC15)
|
|
; $40 the 32-byte OAM shadow that is copied to and from $0300
|
|
; ($CBE0-$CBF7)
|
|
; $41 the index that selects the word read from the inline
|
|
; dispatch tables ($C899, $CDCE, $D231, $D3D3)
|
|
; $42/$43 the X and Y position of the actor being placed, written
|
|
; together by SetActorPosition at $CB8E
|
|
; $45 the state byte of the current actor (32 references)
|
|
; $4A the Y position the actor animation counts towards; it is
|
|
; a copy of the table value written at $C8D1
|
|
; $5A the index of the actor being drawn ($CC87)
|
|
; $B0/$B1 the cursor into the 16-entry actor list ($CC29) and the
|
|
; frame counter that advances it ($CC11)
|
|
; $B2 the character code the converter works on ($CC52)
|
|
; $B4 the four palette bytes copied by CopyActorPalette ($C7BD)
|
|
; $F0/$F1/$F2 the three sound flag accumulators: the stub routines at
|
|
; $D291, $D2B4 and $D2D7 OR a single bit into them and the
|
|
; sound engine reads them at $F9FF, $FC48 and $FAFC
|
|
; $F4/$F5 the destination of the four-byte note copy ($F784)
|
|
; $F6/$F7 the source of that copy ($F78A)
|
|
; $F8-$FF the eight note parameters the sound engine reads from the
|
|
; table at $FCC8 ($F7AD-$F7D0)
|
|
; $E5 the first byte of the note record, the pitch byte ($F7A8)
|
|
; $E6 the note index the record was read for ($F79F)
|
|
; $E9/$EA the two values the APU sweep registers are loaded with
|
|
; ($F7F1-$F7F3)
|
|
;
|
|
; The slots that keep their neutral ZpXX name, and why:
|
|
;
|
|
; $00-$03 the general-purpose 16-bit working pointer. The same pair is
|
|
; reused as the RAM-clear pointer ($C01A), the OAM pointer
|
|
; ($C247), the VRAM write address ($C432, $C461) and the
|
|
; dispatch pointer ($D124), and $02/$03 is also the script
|
|
; pointer ($C421). No single role is provable, so the slot
|
|
; stays neutral rather than guessing one.
|
|
; $07 three references in the tile writer; the role is not
|
|
; separable from the neighbouring $06/$08 slots.
|
|
; $0A-$0C six references in the score/HUD conversion helpers; the
|
|
; values are computed from the score digits but the exact
|
|
; quantity is not established.
|
|
; $0F two references, both inside the actor event dispatcher.
|
|
; $17 never referenced directly; it is only written by
|
|
; `sta Zp16,x` with X=1.
|
|
; $19 the second byte of the target record; it is read and written
|
|
; by the target list scanner but its unit is not established.
|
|
; $1A two references in the sub-state synchroniser.
|
|
; $1D three references; the value is set once at the start of a
|
|
; round and never read back in a way that fixes its meaning.
|
|
; $1E/$1F two references each, set together with $0A/$0B in the
|
|
; attract-mode tick and never read back.
|
|
; $27/$28 the scroll registers' shadow pair; written in the scroll
|
|
; helper but the routine that reads them is not in the
|
|
; reachable set.
|
|
; $2B read with an index at $C343 and at $DB35; the array it
|
|
; belongs to is not established.
|
|
; $2D the shot counter, written by five routines; the exact
|
|
; quantity (remaining shots, or shots fired) is not proven.
|
|
; $2F three references, the high byte of the $2A-$2F round
|
|
; parameter block.
|
|
; $31-$3E never referenced.
|
|
; $44 the first byte of a four-byte buffer the fruit code moves
|
|
; around; the individual bytes are not separated.
|
|
; $46/$47 used both as an actor position and as the low bytes of the
|
|
; four-byte buffer at $44, so no single role is provable.
|
|
; $48/$49 one or two references each in the actor field helpers.
|
|
; $4B-$4F the actor's speed and acceleration fields; the routines that
|
|
; write them do not read them back in a way that fixes which
|
|
; is which.
|
|
; $50-$53 counters in the target movement code; the unit (frames or
|
|
; pixels) is not established.
|
|
; $55 one reference.
|
|
; $57 two references in the actor movement code.
|
|
; $59 the actor's sprite X; written next to $5A, which is the
|
|
; actor index, but the two are not separated by the code.
|
|
; $5B-$5F the actor's direction, speed and timers; each is read in
|
|
; more than one context, so the individual roles are not
|
|
; provable.
|
|
; $60-$71 never referenced.
|
|
; $72-$74 the actor's animation counters; the code reads and writes
|
|
; them from more than one routine.
|
|
; $75-$7B never referenced.
|
|
; $7C-$7F the actor's frame and animation fields, read and written by
|
|
; the same routine; the individual fields are not separated.
|
|
; $80-$86 the actor's tile index and the fruit's state; $81 is the
|
|
; fruit index, but $80 is used both as a tile index and as a
|
|
; "nothing to draw" flag.
|
|
; $87-$8F never referenced.
|
|
; $90-$99 the shot state block: the code reads and writes the bytes
|
|
; through different indices, so the individual fields are not
|
|
; separated.
|
|
; $9A-$9D the two sprite bytes copied out of the OAM shadow; each has
|
|
; a single reference.
|
|
; $9E-$A5 never referenced.
|
|
; $A6-$AF the target list counters and the tile parameters; each is
|
|
; used from more than one routine.
|
|
; $B3 the target list cursor; read and written by the list
|
|
; scanner, but the unit is not established.
|
|
; $B5/$B6 the two bytes after the palette; they are read with an
|
|
; index from the actor byte reader.
|
|
; $B7-$C0 never referenced.
|
|
; $C1-$C9 the sound engine's per-voice state; the voice layout is
|
|
; not separated by the code.
|
|
; $CA-$CC never referenced.
|
|
; $CD the two bytes the actor update routine subtracts from the
|
|
; score; the unit is not established.
|
|
; $CE-$CF never referenced.
|
|
; $D0-$DD the sound engine's per-note counters; the note layout is
|
|
; not separated by the code.
|
|
; $DE-$DF never referenced.
|
|
; $E0-$E3 never referenced.
|
|
; $E4 the APU envelope value the sound engine keeps; it is
|
|
; written and read by the envelope routine only.
|
|
; $E7/E8 never referenced.
|
|
; $EB-$EE the sound engine's envelope state; each is read and written
|
|
; by the same routine without a fixed unit.
|
|
; $EF the sound engine's envelope state; two references.
|
|
; $F3 the sound engine's main state byte, read and written by
|
|
; thirty-three different sites; the layout is not separated
|
|
; by the code.
|
|
; $F9-$FF the note parameters are named above where the table at
|
|
; $FCC8 shows their origin; the remaining bytes of that block
|
|
; are covered by the same names.
|
|
; ---------------------------------------------------------------------------
|
|
PpuMaskShadow = $09 ; semantic alias for Zp09 (the $2001 PPUMASK shadow)
|
|
LineCount = $04 ; semantic alias for Zp04 (the number of tile lines to write)
|
|
BytesPerLine = $05 ; semantic alias for Zp05 (the number of bytes per tile line)
|
|
ByteCount = $06 ; semantic alias for Zp06 (the bytes still to write on this line)
|
|
DecodedTileByte = $10 ; semantic alias for Zp10 (the decoded tile byte)
|
|
PackedTileByte = $11 ; semantic alias for Zp11 (the packed byte read from the script)
|
|
DecodedTileCopy = $12 ; semantic alias for Zp12 (a copy of the decoded tile byte)
|
|
TileFlipBits = $13 ; semantic alias for Zp13 (the flip bits out of the packed byte)
|
|
HandlerPtrLo = $14 ; semantic alias for Zp14 (the low byte of the dispatch handler pointer)
|
|
HandlerPtrHi = $15 ; semantic alias for Zp15 (the high byte of the dispatch handler pointer)
|
|
Player1Buttons = $16 ; semantic alias for Zp16 (the debounced controller buttons)
|
|
SavedSubState = $1C ; semantic alias for Zp1C (the sub-state saved across a mode switch)
|
|
GameFramePending = $20 ; semantic alias for Zp20 (the game-frame-pending flag)
|
|
DrawPendingFlag = $21 ; semantic alias for Zp21 (the HUD-draw-pending flag)
|
|
NmiPhaseFlag = $22 ; semantic alias for Zp22 (the NMI phase flag)
|
|
DisplayListIndex = $23 ; semantic alias for Zp23 (the index into the display list at $E657)
|
|
GameMode = $24 ; semantic alias for Zp24 (the game mode)
|
|
SubStateIndex = $25 ; semantic alias for Zp25 (the sub-state index)
|
|
ModeIndex = $26 ; semantic alias for Zp26 (the mode index)
|
|
AttractSpriteY = $29 ; semantic alias for Zp29 (the attract sprite's Y position)
|
|
AttractTimer = $30 ; semantic alias for Zp30 (the attract-mode timer)
|
|
PlayerSlot = $3F ; semantic alias for Zp3F (the player slot being worked on)
|
|
OamShadow = $40 ; semantic alias for Zp40 (the 32-byte OAM shadow at $40-$5F)
|
|
HandlerIndex = $41 ; semantic alias for Zp41 (the index into the inline dispatch tables)
|
|
ActorX = $42 ; semantic alias for Zp42 (the actor's X position)
|
|
ActorY = $43 ; semantic alias for Zp43 (the actor's Y position)
|
|
ActorState = $45 ; semantic alias for Zp45 (the current actor's state byte)
|
|
ActorIndex = $5A ; semantic alias for Zp5A (the index of the actor being drawn)
|
|
ActorListCursor = $B0 ; semantic alias for ZpB0 (the cursor into the 16-entry actor list)
|
|
ActorFrameCounter = $B1 ; semantic alias for ZpB1 (the frame counter that advances the cursor)
|
|
CharCode = $B2 ; semantic alias for ZpB2 (the character code being converted)
|
|
ActorPalette = $B4 ; semantic alias for ZpB4 (the four palette bytes)
|
|
SoundFlag0 = $F0 ; semantic alias for ZpF0 (the first sound flag accumulator)
|
|
SoundFlag1 = $F1 ; semantic alias for ZpF1 (the second sound flag accumulator)
|
|
SoundFlag2 = $F2 ; semantic alias for ZpF2 (the third sound flag accumulator)
|
|
PpuCtrlShadow = $08 ; semantic alias for Zp08 (the $2000 PPUCTRL shadow)
|
|
NoteDestLo = $F4 ; semantic alias for ZpF4 (the low byte of the note copy destination)
|
|
NoteDestHi = $F5 ; semantic alias for ZpF5 (the high byte of the note copy destination)
|
|
NoteSrcLo = $F6 ; semantic alias for ZpF6 (the low byte of the note copy source)
|
|
NoteSrcHi = $F7 ; semantic alias for ZpF7 (the high byte of the note copy source)
|
|
NoteParam0 = $F8 ; semantic alias for ZpF8 (the first note parameter from the table at $FCC8)
|
|
NoteParam1 = $F9 ; semantic alias for ZpF9 (the second note parameter)
|
|
NoteParam2 = $FA ; semantic alias for ZpFA (the third note parameter)
|
|
NoteParam3 = $FB ; semantic alias for ZpFB (the fourth note parameter)
|
|
NoteParam4 = $FC ; semantic alias for ZpFC (the fifth note parameter)
|
|
NoteParam5 = $FD ; semantic alias for ZpFD (the sixth note parameter)
|
|
NoteParam6 = $FE ; semantic alias for ZpFE (the seventh note parameter)
|
|
NoteParam7 = $FF ; semantic alias for ZpFF (the eighth note parameter)
|
|
NotePitch = $E5 ; semantic alias for ZpE5 (the note's pitch byte)
|
|
NoteIndex = $E6 ; semantic alias for ZpE6 (the index the note record was read for)
|
|
ApuSweepLo = $E9 ; semantic alias for ZpE9 (the low byte of the APU sweep value)
|
|
ApuSweepHi = $EA ; semantic alias for ZpEA (the high byte of the APU sweep value)
|
|
ActorYTarget = $4A ; semantic alias for Zp4A (the Y position the actor animation counts towards)
|
|
FrameCountdown = $2A ; semantic alias for Zp2A (the frame countdown)
|