Promote Donkey Kong (JU): Pass 3 complete, whole-ROM byte-identical

Pass 3 named the 10 data regions in prg.s, then the project was promoted
out of _wip/ so `make` now proves header + PRG + CHR against the original
ROM instead of only the PRG bank.

Data regions named:
  LevelPtrTable        $C000-$C03B  (60 B)    level header data
  ObjectPtrTable       $C03C-$C043  (8 B)     4 pointer pairs
  LevelDataPtrTable    $C044-$C79D  (1882 B)  level data pointers
  SpriteInitPtrTable   labelled at $C4B0      see residue note
  UnreachedCode_D650   $D650-$D696  (71 B)    unreached code
  UnreachedCode_E144   $E144-$E165  (34 B)    unreached code
  MusicDataTable       $F55B-$FA47  (1261 B)  music/sound data
  APUDataTable         $FAE6-$FB74  (143 B)   APU pulse/noise tables
  SfxDataTable         $FE59-$FFEF  (407 B)   sound-effect data
  VectorTable          $FFF6-$FFFF  (10 B)    padding + NMI/RESET/IRQ

Promotion (per the AGENTS.md checklist):
  - git mv "_wip/Donkey Kong (JU)" "Donkey Kong (JU)"
  - add copilot/rom.nes -> ../Donkey Kong (JU).nes symlink
  - add header.s / chr.s (one-line .incbin of header.bin / chr.bin)
  - linker.cfg gains HEADER ($0000/16 B) and CHR ($0000/8 KB)
  - Makefile switched from `cmp reconstructed_prg.bin prg.bin` to
    `cmp reconstructed.nes rom.nes`
  - no _tools path change (this Makefile never referenced _tools/)
    and no `make regen` pipeline exists for it

Doc corrections:
  - project OVERVIEW.md said Mirroring Vertical; header byte 6 = $00
    means Horizontal (the root index was right) — fixed
  - root OVERVIEW.md: row 18 now BYTE-IDENTICAL, tier paragraph and
    summary table refreshed (they had drifted around the Lunar Pool and
    Urban Champion promotions), new per-project detail entry
  - counts corrected to 19 top-level / 17 _wip in OVERVIEW.md,
    TODO.md and AGENTS.md

Residue recorded rather than guessed:
  - Pass 2 is partial: 919 Label_ definitions remain (214 semantic
    labels applied); noted in TODO.md so nobody reads the promotion as
    full semantic naming
  - SpriteInitPtrTable's label sits at $C4B0: the routine at $C807 reads
    $C4A7,x/$C4A8,x, but that table starts mid-row and a label there
    would split the canonical 16-byte audit-comment line

Verification:
  make clean && make  -> "Byte-identical ROM verified."
  verify_pass1.py     -> 19/19 top-level build, Donkey Kong (JU) OK
                         (6014 instr / 12505 B), all comments canonical

Doc-drift sweep: build tiers, mirroring, and stale status tails

Reconciled the docs against verified reality after the Lunar Pool / Urban
Champion / Donkey Kong (JU) promotions and the 2026-10-19 audit-comment
standardization. No source behaviour changed except the two build fixes below.

Build tier (whole-ROM vs PRG-only)
  - AGENTS.md: the 17 `_wip/` projects are real disassemblies at the PRG-build
    tier, not "skeletons"; header.s/chr.s/rom.nes are promotion additions;
    verify_pass1.py covers the top-level projects.
  - Root OVERVIEW.md: `_wip` prose, audit-comment narrative and summary table
    refreshed (37.5% figure, SEEDED vs OK wording, re-trace false alarm).
  - Promoted projects whose build blocks still claimed `make` emits
    `reconstructed_prg.bin` compared to `prg.bin` (Balloon Fight, Baseball,
    CIRCUS, Clu Clu Land, Excitebike, NES PowerPad, Pac-Man (USA), Tennis):
    now describe the whole-ROM `reconstructed.nes` vs `rom.nes`.
  - Lunar Pool / Urban Champion / CIRCUS also had stale `cd "_wip/..."`
    build paths and "Promotion" items; retargeted to their top-level folders.

Mirroring (header byte 6 bit 0: 0 = Horizontal, 1 = Vertical)
  - Corrected DK Jr. prose "horizontal mirroring (flag 6 = $01)" -> vertical,
    and both `_wip/Pac-Man` variant notes "Both use vertical mirroring" ->
    horizontal (both are byte-6 = $00).
  - Re-audited every project OVERVIEW: 0 rows and 0 prose claims now disagree.

Stale status tails
  - Retitled/restatused the `_wip` OVERVIEWs to their real `prg.s` (Golf,
    Ice Climber (U), Lode Runner, Millipede, Pac-Man Tengen, Pac-Man (U),
    Popeye 0/1, Raid, Raid a2, Hogan's Alley, Mario Bros); Golf's
    skeleton-era contents rows and Next Steps corrected.
  - Dropped the skeleton-era "## Next Steps (per `PROMPTS.md`)" heading and
    the "(from the skeleton)" wording across all project OVERVIEWs.
  - Rewrote Lunar Pool / Urban Champion Next Steps (both already Pass 1-3
    complete and promoted; their tails still described pending Pass 2 and
    promotion); fixed root row 13 (Wild Gunman) and row 20 (Duck Hunt).

Also lands two code fixes carried with this sweep:
  - `_wip/Hogan's Alley (JU)`: $E9F1-$E9FD and $EA13-$EA14 reclassified as
    data with canonical audit comments (the seeded build had decoded a data
    table base as code, breaking the build since 2ae09f7). `make` ->
    BYTE-IDENTICAL again; reconstructed_prg.bin/.lbl refreshed.
  - `_wip/Pyramid (U)`: `Label_D72E` -> `NMI:` (byte-identical).

Verification:
  make (Hogan's Alley, Pyramid)      -> BYTE-IDENTICAL, BYTE-IDENTICAL
  _tools/verify_pass1.py             -> 19/19 build, all canonical,
                                        "No truncated or unfaithful Pass 1"
  mirroring audit (rows + prose)     -> 0 mismatches

Donkey Kong (JU): complete Pass 2 — all 919 Label_ definitions named

The last non-zero Label_ residue in the repo is now gone. Every one of the
919 address-derived definitions in copilot/prg.s is replaced:

* 319 routine entry points (jsr/jmp targets):
  - 102 named from observed behaviour (LoadSpriteInitPointerToZp00 $C807,
    CopyVramDataToBuffer $CBDF, CheckSpriteListCollision $D8AD,
    UpdateRandomSeed $F4ED, ReadControllers $F50E, UpdateSoundEngine $FA48, ...)
  - 217 left as SubC<addr> — honest residue where the body is too
    context-dependent to name without guessing (Golf: 108, Mario Bros: 223)
  - the 77 already-named entries untouched
* 600 internal branch targets named <Routine>_Block / <Routine>_Block_n in
  address order within their owning routine (DK Jr./Balloon Fight convention).
  Ownership is control-flow containment, so a loop that physically precedes
  its own entry lands correctly (FlushPpuBuffer_Block $F1EC under $F228).
* Two proposal collisions disambiguated by indexing zero-page slot:
  UpdateObjectListZp5D/DispatchObjectStateZp5E ($DA16/$DA4C) vs
  UpdateObjectListZpAE/DispatchObjectStateZpAF ($E1E9/$E250).

jsr/jmp operands stay numeric (Wild Gunman style); only branch operands are
symbolic. Applied with _tools/pass2.py apply (919 defs + 2,622 refs rewritten,
comments re-aligned); the ROM still rebuilds byte-identically and
verify_pass1.py reports 19/19 canonical with no truncated split.

Docs synced: project OVERVIEW.md gains a Pass 2 Details section, root
OVERVIEW.md rows + conventions, TODO.md section 4 closed. dk_full_map.tsv now
records the complete applied map (its zp rows remain unapplied proposals).

_wip status correction: five false "Pass 2 complete" claims + map audit

The `_wip` tier's "Pass 2 complete" headers counted their draft maps' rows, not
the names actually present in `prg.s`, and described the count of *neutral*
`ZpXX` slots in `locals.inc` as "zero-page semantic aliases". Verified against
the sources and corrected in the root inventory rows, the project OVERVIEWs and
TODO:

  project                named/total  Label_ left  drafted map
  Pinball (JU)           180 / 681    501          210 rows, 179 applied
  Ice Climber (JE)        76 / 973    897          255 rows,  76 applied
  Donkey Kong Jr. Math    64 / 1035   971          243 rows,  62 applied
  Duck Hunt (JUE)         31 / 472    441          272 rows,  31 applied
  Ice Climber (U)          2 / 973    971          none - Pass 2 not started

No `_wip` project is Pass 2 complete. Ice Climber (U) was the worst case: the
2026-10-19 sweep itself restated it "Pass 2 complete" while describing its 971
`Label_` definitions in the same paragraph - a copy-paste from (JE); (U) has no
map file at all.

Drafted maps audited row by row against the committed split: they are not
applicable. 100/243 (DK Jr. Math), 96/255 (Ice Climber (JE)) and 17/210
(Pinball) rows point at addresses that are not instruction boundaries - they
were built against an older code/data split - while most of the rest are
unlabelled boundaries that no operand references, or (Duck Hunt) competing
candidate names for one label (`Label_C2BF` alone carries 205). Rows that are
both insertable and corroborated by control flow: 0 in every map. Recorded as
stale and kept for provenance; Pass 2 here needs a fresh map derived from the
committed split.

Also corrected while verifying:
- Mario Bros entry counts (docs said 252 / 90 + 165 / 477 sites / 156 neutral
  slots; the file holds 262 distinct `jsr`/`jmp` targets = 39 semantic + 223
  `SubC<addr>`, 478 sites, 151 slots).
- root `_wip` prose line/label ranges (4,482-17,180 lines, 192-971 `Label_`,
  11,126 total) and the Ice Climber code figure (74.6% / 6,112 instr, not
  74.7% / 6,113).
- TODO §4 re-scoped to the promoted tier, with the `_wip` residue table added.

Verification: `make` across all 17 `_wip` projects -> BYTE-IDENTICAL (17/17);
`_tools/verify_pass1.py` -> 19/19 build, all canonical, "No truncated or
unfaithful Pass 1 found". No source bytes changed.

Balloon Fight (JU): apply locals.inc/symbols.inc names to prg.s (Pass 3)

Substitutes symbol names for 922 numeric operands: 125 hardware registers
(symbols.inc) and 797 of 813 zero-page/RAM operands (locals.inc). The 15
multi-alias addresses were resolved per routine; 16 operands stay numeric
because $13 is used there as a plain high-byte scratch beside Temp12 and
none of its three aliases fits.

- _tools/apply_symbols.py: the substitution tool (dry run by default;
  --sites supplies per-routine choices for multi-alias addresses, --report
  lists the residue). Only the operand token is rewritten, so the
  `; CPU:$.... PRG:....  XX XX` audit comments survive byte for byte.
- prg.s: operand tokens only. make prints "Byte-identical ROM verified."
- OVERVIEW.md (project): instruction quotes now match prg.s, new
  alias-reuse table, and section 10 rewritten from the stale "497 Label_"
  prose to the real naming state and the 16-site residue.
- OVERVIEW.md (root), TODO.md, AGENTS.md: status, counts, tool list.

verify_pass1.py: 19/19 OK, all audit comments canonical.

Bomberman (U): apply locals.inc/symbols.inc names to prg.s (Pass 3)

Substitutes 362 zero-page operands in copilot/prg.s with the names already
declared in copilot/locals.inc: 354 from single-name addresses and 8 from the
two multi-alias addresses, resolved per site:

  $E0/$E1  IndirectPtrLo/Hi in the RAM-clear loop
              (InitializeSystemAndRunMainLoop -> Main_WriteSoundDispatchIndex_C317,
              which writes $00 across $0100-$07FF via (ptr),y),
              SoundDelay0 (the base of the per-channel delay table, indexed by X)
              in the sound engine;

No symbols.inc substitution was needed: copilot/prg.s contains no numeric
hardware operands ($2000-$4017) at all. All 362 operands were already written
with two hex digits, so no ca65 `a:` prefix was required.

make -> Byte-identical ROM verified. Operand token only; mnemonics, spacing and
the trailing `; CPU:$.... PRG:....  XX XX` audit comments are untouched.

Remaining numeric operands (758) address bytes that no .inc file names:
505 zero-page (133 addresses), 171 RAM $0100-$07FF (46 addresses) and 82
table reads in $8000+ (54 addresses).

Bomberman (U): substitute 24 in-file table labels at ROM operand sites

Uses the new `--labels` option of `apply_symbols.py` with the
ld65 `-Ln` output (`reconstructed.lbl`). Only labels that prg.s
actually defines and that live in the PRG (+) are considered,
so CHR/header segment labels cannot leak in.

24 numeric operands (`lda ,x`, `adc ,y`, etc.) now read
`lda SystemPaletteData,x`, `adc GameplayObjectClassTable,y`, etc.
All 24 point at exact label addresses; the remaining 58 ROM-space
numeric operands point at interior bytes or unlabelled tables and
stay numeric.

make -> Byte-identical ROM verified.

Bomberman (U): update docs for Pass 3 symbol application

- Project OVERVIEW.md: corrected source file from main.s to prg.s/header.s/chr.s;
  output name from reconstructed_bomberman.nes to reconstructed.nes;
  rewritten §10 Zero-Page/RAM Symbols table to match locals.inc (with aliases
  and unnamed residue documented);
  fixed §4 step 1/4 to use IndirectPtrLo/Hi and SoundDelay0 names;
  fixed §11 InesHeader location (now header.s);
  added §2 Pass 3 summary table;
  added §13 notes on legacy main.s and Main_WriteSoundDispatchIndex_C317 misnomer.

- Root OVERVIEW.md §3: updated source line count (7,553), file list, and added
  Pass 3 summary.

Both builds verified byte-identical.

Pass 3 symbol application to all 19 top-level projects (2026-10-19)

Ran _tools/apply_symbols.py --write on all 19 promoted projects to substitute
symbolic names from symbols.inc (hardware registers) and locals.inc (zero-page
RAM aliases, forward references) into prg.s operands. The tool preserves the
canonical audit comments (; CPU:$XXXX PRG:XXXX AA BB) and preserves byte
identity — all projects still rebuild byte-identical to their original ROMs.

Per-project operand substitutions:
  Baseball (UE)             121  (85 single + 36 hardware)
  Tennis (JU)                18  (18 single)
  Pac-Man (USA) (Namco)     524  (524 single; 727 multi-alias residues)
  CIRCUS                    118  (38 single + 80 hardware; 23 multi-alias residues)
  Wild Gunman (U)            76  (11 single + 65 hardware)
  Joypad Test Cartridge (U)  47  (47 hardware)
  NES PowerPad Test Card (U) 89  (89 hardware)
  MUSCLE (U)                220  (91 single + 129 hardware)
  Lunar Pool (U)             45  (18 single + 27 hardware)
  Donkey Kong (JU)           75  (17 single + 58 hardware)
  Urban Champion (JU)        70  (4 single + 66 hardware)

Already had symbols applied: Balloon Fight, Bomberman, Burger Time,
Clu Clu Land, Defender 2, Donkey Kong 3, Donkey Kong Jr.

Skipped: Excitebike (JU) — inline prg.s definitions conflict with locals.inc
values and source operands don't match ROM byte encodings; automatic
substitution breaks byte identity.

Documentation updated:
  OVERVIEW.md — added Pass 3 symbol notes to all 19 project entries,
  added Urban Champion as section #36
  TODO.md — current state now reflects complete symbol application across
  the promoted tier

Verification: python3 _tools/verify_pass1.py reports all 19 projects OK/SEEDED,
all canonical comments, no truncated or unfaithful Pass 1.
This commit is contained in:
tmerritt committed 2026-10-19 14:55:08 -04:00
1 parent 53ad50ffb6
commit 71ada15de0
79 files changed
+9455 -7687

No files matched your search

+11 -11
View File
@@ -11,9 +11,9 @@ This document describes the execution flow of the disassembled Wild Gunman (U) P
| Format | iNES |
| PRG | 1 × 16 KB (mapped at CPU $C000–$FFFF) |
| CHR | 1 × 8 KB |
| Mirroring | Horizontal |
| Mirroring | Vertical |
| PRG bank start | CPU $C000 |
| Source file | `copilot/prg.s` (~3,000 lines with headers) |
| Source file | `copilot/prg.s` (11,544 lines with routine headers) |
| Output | `reconstructed.nes` (24,592 bytes) |
### Interrupt vectors (CPU $FFFA–$FFFF)
@@ -28,9 +28,9 @@ This document describes the execution flow of the disassembled Wild Gunman (U) P
## 2. Build Status
`make` in `copilot/` assembles `prg.s` with `ca65`, links with `ld65`, and verifies against `prg.bin`.
`make` in `copilot/` assembles `header.s`, `prg.s` and `chr.s` with `ca65`, links them with `ld65`, and compares the result against `rom.nes` (a relative symlink to `../Wild Gunman (U) [!].nes`).
**Verification result: BYTE-IDENTICAL** — `reconstructed_prg.bin` matches `prg.bin` exactly (all 16,384 bytes), and `prg.bin` matches the PRG bank of `Wild Gunman (U) [!].nes`.
**Verification result: BYTE-IDENTICAL** — `reconstructed.nes` (24,592 bytes: 16-byte header + 16,384-byte PRG + 8,192-byte CHR) matches `rom.nes` exactly, so the header and CHR are proven, not just the PRG bank.
---
@@ -38,9 +38,9 @@ This document describes the execution flow of the disassembled Wild Gunman (U) P
| Pass | Status | Description |
|------|--------|-------------|
| Pass 1 | Complete | Code/data split — entire PRG bank classified as traced code (~20%) or explicit `.byte` data (~80%) with `; CPU:$xxxx PRG:$xxxx` annotations |
| Pass 2 | Complete | Routine headers added for all labeled positions; key routines semantically named (`Reset`, `NmiHandler`, `MainStateDispatch`, `MainLoopBody`, etc.); zero-page aliases in `locals.inc` |
| Pass 3 | Complete | Data tables/structures identified and named (`SpriteOamTable` at $C844, `VramWriteParameterTable` at $C09E); remaining `Label_Cxxxx` references are internal branch targets within routines |
| Pass 1 | Complete | Code/data split — 3,956 traced instructions / 8,085 bytes (49.3%); the rest is explicit `.byte` data with `; CPU:$xxxx PRG:xxxx` audit comments |
| Pass 2 | Complete | Routine headers on every entry point; all 733 labels carry names (zero `Label_Cxxxx`/`SubCxxxx` remain); zero-page aliases in `locals.inc` |
| Pass 3 | Complete | Data tables named: `SpriteAttributeTable` ($C6AC), `NoteVolumeTable` ($F3EF), `VolumeEnvelopeTable` ($F48F), `SpritePositionTable` ($F77C); the OAM sprite block at $C844 is documented in-place |
---
@@ -144,10 +144,10 @@ make # → ca65 + ld65 + cmp reconstructed.nes rom.nes → "Byte-identica
## 10. Notes
- The PRG is approximately 20% code / 80% data. The large data portions include sprite/OAM tables, sound data, and game state tables.
- The NMI handler drives the per-frame game loop; the main loop (`Reset` at $C07C) spins waiting for NMI phase changes.
- The PRG is 49.3% code / 50.7% data. The large data portions include sprite/OAM tables, sound data, and game state tables.
- The NMI handler drives the per-frame game loop; `MainLoopBody` ($C573) spins on the NMI phase flag set by `NmiHandler` ($C086, phase check at $C07C).
- `GameMode` ($30) selects between different game states/modes.
- The vectors at $FFF4 and $FFF7 are indirect jump targets to sound routines at $F372 and $F40F respectively.
- Stray jump stubs at $FFF4 (`jmp $F372`) and $FFF7 (`jmp $F40F`) sit just before the real vector words; they are not vectors themselves. The actual $FFFA–$FFFF words are $C086 / $C000 / $C000 (NMI / RESET / IRQ).
- IRQ vector points to $C000 (Reset) and is effectively unused.
---
@@ -155,4 +155,4 @@ make # → ca65 + ld65 + cmp reconstructed.nes rom.nes → "Byte-identica
## 11. Next Steps
- **Promotion complete** — moved to top-level `Wild Gunman (U)/` folder with full ROM build (`header.s`, `chr.s`, `linker.cfg`, `Makefile`).
- **Optional deeper Pass 3 work** — extract sprite table at $C844 into its own labeled `.byte` block, name sound data tables in $E000–$FFFF range, refine remaining zero-page aliases.
- **Optional deeper Pass 3 work** — extract the sprite block at $C844 into its own labeled `.byte` block (currently documented in-place as a comment), and refine remaining zero-page aliases. The named sound tables (`NoteVolumeTable` $F3EF, `VolumeEnvelopeTable` $F48F, `SpritePositionTable` $F77C) already cover the $F000-range data.
+76 -76
View File
@@ -71,14 +71,14 @@ Reset:
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
WaitPpuVblank1:
lda $2002 ; CPU:$C002 PRG:0002 AD 02 20
lda PPUSTATUS ; CPU:$C002 PRG:0002 AD 02 20
bpl WaitPpuVblank1 ; CPU:$C005 PRG:0005 10 FB
ldx #$00 ; CPU:$C007 PRG:0007 A2 00
stx $2000 ; CPU:$C009 PRG:0009 8E 00 20
stx $2001 ; CPU:$C00C PRG:000C 8E 01 20
stx PPUCTRL ; CPU:$C009 PRG:0009 8E 00 20
stx PPUMASK ; CPU:$C00C PRG:000C 8E 01 20
dex ; CPU:$C00F PRG:000F CA
txs ; CPU:$C010 PRG:0010 9A
ldx $05EC ; CPU:$C011 PRG:0011 AE EC 05
ldx OAMBase ; CPU:$C011 PRG:0011 AE EC 05
ldy #$06 ; CPU:$C014 PRG:0014 A0 06
sty Zp01 ; CPU:$C016 PRG:0016 84 01
ldy #$00 ; CPU:$C018 PRG:0018 A0 00
@@ -112,19 +112,19 @@ ClearRamLoop:
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
ResetInitSub1:
stx $05EC ; CPU:$C02C PRG:002C 8E EC 05
stx OAMBase ; CPU:$C02C PRG:002C 8E EC 05
jsr $C20B ; CPU:$C02F PRG:002F 20 0B C2
jsr $C21B ; CPU:$C032 PRG:0032 20 1B C2
ldy #$00 ; CPU:$C035 PRG:0035 A0 00
sta $2005 ; CPU:$C037 PRG:0037 8D 05 20
sta $2005 ; CPU:$C03A PRG:003A 8D 05 20
sta PPUSCROLL ; CPU:$C037 PRG:0037 8D 05 20
sta PPUSCROLL ; CPU:$C03A PRG:003A 8D 05 20
ldy #$01 ; CPU:$C03D PRG:003D A0 01
sty GameMode ; CPU:$C03F PRG:003F 84 30
lda #$0F ; CPU:$C041 PRG:0041 A9 0F
sta $4015 ; CPU:$C043 PRG:0043 8D 15 40
sta APUSTATUS ; CPU:$C043 PRG:0043 8D 15 40
jsr $FFF7 ; CPU:$C046 PRG:0046 20 F7 FF
lda #$90 ; CPU:$C049 PRG:0049 A9 90
sta $2000 ; CPU:$C04B PRG:004B 8D 00 20
sta PPUCTRL ; CPU:$C04B PRG:004B 8D 00 20
sta Zp08 ; CPU:$C04E PRG:004E 85 08
lda #$02 ; CPU:$C050 PRG:0050 A9 02
sta Zp09 ; CPU:$C052 PRG:0052 85 09
@@ -141,7 +141,7 @@ InitSpriteDataFromTable:
; -----------------------------------------------------------------------------
CopySpriteDataLoop:
lda $C844,X ; CPU:$C056 PRG:0056 BD 44 C8
sta $05F0,X ; CPU:$C059 PRG:0059 9D F0 05
sta SpriteData,X ; CPU:$C059 PRG:0059 9D F0 05
dex ; CPU:$C05C PRG:005C CA
bpl CopySpriteDataLoop ; CPU:$C05D PRG:005D 10 F7
bmi NmiHandler_CheckPhase ; CPU:$C05F PRG:005F 30 1B
@@ -219,9 +219,9 @@ NmiHandler_1:
tya ; CPU:$C08A PRG:008A 98
pha ; CPU:$C08B PRG:008B 48
lda #$00 ; CPU:$C08C PRG:008C A9 00
sta $2003 ; CPU:$C08E PRG:008E 8D 03 20
sta OAMADDR ; CPU:$C08E PRG:008E 8D 03 20
lda #$02 ; CPU:$C091 PRG:0091 A9 02
sta $4014 ; CPU:$C093 PRG:0093 8D 14 40
sta OAMDMA ; CPU:$C093 PRG:0093 8D 14 40
lda NmiFlag ; CPU:$C096 PRG:0096 A5 22
bne NmiHandler_EarlyExit ; CPU:$C098 PRG:0098 D0 0C
jsr $C29F ; CPU:$C09A PRG:009A 20 9F C2
@@ -303,7 +303,7 @@ MainStateDispatch_CopySprites:
MainStateDispatch_Sub1:
and #$0E ; CPU:$C0DE PRG:00DE 29 0E
MainStateDispatch_Sub2:
sta $2001 ; CPU:$C0E0 PRG:00E0 8D 01 20
sta PPUMASK ; CPU:$C0E0 PRG:00E0 8D 01 20
sta Zp09 ; CPU:$C0E3 PRG:00E3 85 09
lda $33 ; CPU:$C0E5 PRG:00E5 A5 33
sta $3B ; CPU:$C0E7 PRG:00E7 85 3B
@@ -322,7 +322,7 @@ MainStateDispatch_Sub2:
MainStateDispatch_Sub2b:
lda Zp09 ; CPU:$C0F0 PRG:00F0 A5 09
ora #$10 ; CPU:$C0F2 PRG:00F2 09 10
sta $2001 ; CPU:$C0F4 PRG:00F4 8D 01 20
sta PPUMASK ; CPU:$C0F4 PRG:00F4 8D 01 20
sta Zp09 ; CPU:$C0F7 PRG:00F7 85 09
lda #$0B ; CPU:$C0F9 PRG:00F9 A9 0B
sta $33 ; CPU:$C0FB PRG:00FB 85 33
@@ -584,12 +584,12 @@ MainStateDispatch_Sub12:
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
MainStateDispatch_Sub13:
lda $05F0,X ; CPU:$C1CA PRG:01CA BD F0 05
lda SpriteData,X ; CPU:$C1CA PRG:01CA BD F0 05
and #$0F ; CPU:$C1CD PRG:01CD 29 0F
sta $0501,Y ; CPU:$C1CF PRG:01CF 99 01 05
Block_C1D2:
dey ; CPU:$C1D2 PRG:01D2 88
lda $05F0,X ; CPU:$C1D3 PRG:01D3 BD F0 05
lda SpriteData,X ; CPU:$C1D3 PRG:01D3 BD F0 05
lsr ; CPU:$C1D6 PRG:01D6 4A
lsr ; CPU:$C1D7 PRG:01D7 4A
lsr ; CPU:$C1D8 PRG:01D8 4A
@@ -801,10 +801,10 @@ NmiGameLogic1_Sub1:
NmiGameLogic2:
NmiGameLogic2_1:
ldx #$01 ; CPU:$C265 PRG:0265 A2 01
stx $4016 ; CPU:$C267 PRG:0267 8E 16 40
stx JOY1 ; CPU:$C267 PRG:0267 8E 16 40
dex ; CPU:$C26A PRG:026A CA
txa ; CPU:$C26B PRG:026B 8A
sta $4016 ; CPU:$C26C PRG:026C 8D 16 40
sta JOY1 ; CPU:$C26C PRG:026C 8D 16 40
jsr $C273 ; CPU:$C26F PRG:026F 20 73 C2
inx ; CPU:$C272 PRG:0272 E8
; -----------------------------------------------------------------------------
@@ -829,7 +829,7 @@ NmiGameLogic2_Sub1:
; -----------------------------------------------------------------------------
Block_C275:
pha ; CPU:$C275 PRG:0275 48
lda $4016,X ; CPU:$C276 PRG:0276 BD 16 40
lda JOY1,X ; CPU:$C276 PRG:0276 BD 16 40
sta Zp00 ; CPU:$C279 PRG:0279 85 00
lsr ; CPU:$C27B PRG:027B 4A
ora Zp00 ; CPU:$C27C PRG:027C 05 00
@@ -881,9 +881,9 @@ NmiGameLogic3_1:
sta Zp01 ; CPU:$C2A9 PRG:02A9 85 01
lda Zp08 ; CPU:$C2AB PRG:02AB A5 08
and #$FB ; CPU:$C2AD PRG:02AD 29 FB
sta $2000 ; CPU:$C2AF PRG:02AF 8D 00 20
sta PPUCTRL ; CPU:$C2AF PRG:02AF 8D 00 20
sta Zp08 ; CPU:$C2B2 PRG:02B2 85 08
ldx $2002 ; CPU:$C2B4 PRG:02B4 AE 02 20
ldx PPUSTATUS ; CPU:$C2B4 PRG:02B4 AE 02 20
ldy #$00 ; CPU:$C2B7 PRG:02B7 A0 00
beq Block_C2D4 ; CPU:$C2B9 PRG:02B9 F0 19
; -----------------------------------------------------------------------------
@@ -896,10 +896,10 @@ NmiGameLogic3_1:
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Block_C2BB:
sta $2006 ; CPU:$C2BB PRG:02BB 8D 06 20
sta PPUADDR ; CPU:$C2BB PRG:02BB 8D 06 20
iny ; CPU:$C2BE PRG:02BE C8
lda (Zp00),Y ; CPU:$C2BF PRG:02BF B1 00
sta $2006 ; CPU:$C2C1 PRG:02C1 8D 06 20
sta PPUADDR ; CPU:$C2C1 PRG:02C1 8D 06 20
iny ; CPU:$C2C4 PRG:02C4 C8
lda (Zp00),Y ; CPU:$C2C5 PRG:02C5 B1 00
and #$3F ; CPU:$C2C7 PRG:02C7 29 3F
@@ -916,7 +916,7 @@ Block_C2BB:
Block_C2CA:
iny ; CPU:$C2CA PRG:02CA C8
lda (Zp00),Y ; CPU:$C2CB PRG:02CB B1 00
sta $2007 ; CPU:$C2CD PRG:02CD 8D 07 20
sta PPUDATA ; CPU:$C2CD PRG:02CD 8D 07 20
dex ; CPU:$C2D0 PRG:02D0 CA
bne Block_C2CA ; CPU:$C2D1 PRG:02D1 D0 F7
iny ; CPU:$C2D3 PRG:02D3 C8
@@ -958,10 +958,10 @@ Block_C2E2:
; -----------------------------------------------------------------------------
NmiGameLogic4_1:
jsr $C25A ; CPU:$C2E3 PRG:02E3 20 5A C2
lda $2002 ; CPU:$C2E6 PRG:02E6 AD 02 20
lda PPUSTATUS ; CPU:$C2E6 PRG:02E6 AD 02 20
lda Zp08 ; CPU:$C2E9 PRG:02E9 A5 08
and #$FB ; CPU:$C2EB PRG:02EB 29 FB
sta $2000 ; CPU:$C2ED PRG:02ED 8D 00 20
sta PPUCTRL ; CPU:$C2ED PRG:02ED 8D 00 20
sta Zp08 ; CPU:$C2F0 PRG:02F0 85 08
lda #$1C ; CPU:$C2F2 PRG:02F2 A9 1C
clc ; CPU:$C2F4 PRG:02F4 18
@@ -979,9 +979,9 @@ Block_C2F5:
dec Zp01 ; CPU:$C2F7 PRG:02F7 C6 01
bne Block_C2F5 ; CPU:$C2F9 PRG:02F9 D0 FA
sta $02 ; CPU:$C2FB PRG:02FB 85 02
sta $2006 ; CPU:$C2FD PRG:02FD 8D 06 20
sta PPUADDR ; CPU:$C2FD PRG:02FD 8D 06 20
lda #$00 ; CPU:$C300 PRG:0300 A9 00
sta $2006 ; CPU:$C302 PRG:0302 8D 06 20
sta PPUADDR ; CPU:$C302 PRG:0302 8D 06 20
ldx #$04 ; CPU:$C305 PRG:0305 A2 04
ldy #$00 ; CPU:$C307 PRG:0307 A0 00
lda Zp00 ; CPU:$C309 PRG:0309 A5 00
@@ -995,16 +995,16 @@ Block_C2F5:
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Block_C30B:
sta $2007 ; CPU:$C30B PRG:030B 8D 07 20
sta PPUDATA ; CPU:$C30B PRG:030B 8D 07 20
dey ; CPU:$C30E PRG:030E 88
bne Block_C30B ; CPU:$C30F PRG:030F D0 FA
dex ; CPU:$C311 PRG:0311 CA
bne Block_C30B ; CPU:$C312 PRG:0312 D0 F7
lda $02 ; CPU:$C314 PRG:0314 A5 02
adc #$03 ; CPU:$C316 PRG:0316 69 03
sta $2006 ; CPU:$C318 PRG:0318 8D 06 20
sta PPUADDR ; CPU:$C318 PRG:0318 8D 06 20
lda #$C0 ; CPU:$C31B PRG:031B A9 C0
sta $2006 ; CPU:$C31D PRG:031D 8D 06 20
sta PPUADDR ; CPU:$C31D PRG:031D 8D 06 20
ldy #$40 ; CPU:$C320 PRG:0320 A0 40
lda #$00 ; CPU:$C322 PRG:0322 A9 00
; -----------------------------------------------------------------------------
@@ -1017,7 +1017,7 @@ Block_C30B:
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Block_C324:
sta $2007 ; CPU:$C324 PRG:0324 8D 07 20
sta PPUDATA ; CPU:$C324 PRG:0324 8D 07 20
dey ; CPU:$C327 PRG:0327 88
bne Block_C324 ; CPU:$C328 PRG:0328 D0 FA
rts ; CPU:$C32A PRG:032A 60
@@ -1108,10 +1108,10 @@ DispatchTableJump:
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
PpuWriteAddrAndData:
sta $2006 ; CPU:$C367 PRG:0367 8D 06 20
sta PPUADDR ; CPU:$C367 PRG:0367 8D 06 20
iny ; CPU:$C36A PRG:036A C8
lda (Zp00),Y ; CPU:$C36B PRG:036B B1 00
sta $2006 ; CPU:$C36D PRG:036D 8D 06 20
sta PPUADDR ; CPU:$C36D PRG:036D 8D 06 20
iny ; CPU:$C370 PRG:0370 C8
lda (Zp00),Y ; CPU:$C371 PRG:0371 B1 00
asl ; CPU:$C373 PRG:0373 0A
@@ -1130,7 +1130,7 @@ PpuWriteAddrAndData:
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
PpuWriteAddrData_Sub:
sta $2000 ; CPU:$C37D PRG:037D 8D 00 20
sta PPUCTRL ; CPU:$C37D PRG:037D 8D 00 20
sta Zp08 ; CPU:$C380 PRG:0380 85 08
pla ; CPU:$C382 PRG:0382 68
asl ; CPU:$C383 PRG:0383 0A
@@ -1173,7 +1173,7 @@ PpuWriteAddrData_Sub3:
; -----------------------------------------------------------------------------
PpuWriteAddrData_Sub4:
lda (Zp00),Y ; CPU:$C38F PRG:038F B1 00
sta $2007 ; CPU:$C391 PRG:0391 8D 07 20
sta PPUDATA ; CPU:$C391 PRG:0391 8D 07 20
dex ; CPU:$C394 PRG:0394 CA
bne PpuWriteAddrData_Sub3 ; CPU:$C395 PRG:0395 D0 F5
sec ; CPU:$C397 PRG:0397 38
@@ -1193,7 +1193,7 @@ PpuWriteAddrData_Sub4:
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Sub_C3A3:
ldx $2002 ; CPU:$C3A3 PRG:03A3 AE 02 20
ldx PPUSTATUS ; CPU:$C3A3 PRG:03A3 AE 02 20
ldy #$00 ; CPU:$C3A6 PRG:03A6 A0 00
lda (Zp00),Y ; CPU:$C3A8 PRG:03A8 B1 00
bne PpuWriteAddrAndData ; CPU:$C3AA PRG:03AA D0 BB
@@ -1210,9 +1210,9 @@ NmiGameLogic5:
NmiGameLogic5_1:
pha ; CPU:$C3AC PRG:03AC 48
lda $0A ; CPU:$C3AD PRG:03AD A5 0A
sta $2005 ; CPU:$C3AF PRG:03AF 8D 05 20
sta PPUSCROLL ; CPU:$C3AF PRG:03AF 8D 05 20
lda $0B ; CPU:$C3B2 PRG:03B2 A5 0B
sta $2005 ; CPU:$C3B4 PRG:03B4 8D 05 20
sta PPUSCROLL ; CPU:$C3B4 PRG:03B4 8D 05 20
pla ; CPU:$C3B7 PRG:03B7 68
rts ; CPU:$C3B8 PRG:03B8 60
; -----------------------------------------------------------------------------
@@ -1860,7 +1860,7 @@ Block_C570:
; -----------------------------------------------------------------------------
MainLoopBody:
MainLoopBody_1:
lda $05EC ; CPU:$C573 PRG:0573 AD EC 05
lda OAMBase ; CPU:$C573 PRG:0573 AD EC 05
and #$02 ; CPU:$C576 PRG:0576 29 02
sta $07 ; CPU:$C578 PRG:0578 85 07
lda $05ED ; CPU:$C57A PRG:057A AD ED 05
@@ -1879,11 +1879,11 @@ MainLoopBody_1:
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Block_C585:
ror $05EC ; CPU:$C585 PRG:0585 6E EC 05
ror OAMBase ; CPU:$C585 PRG:0585 6E EC 05
ror $05ED ; CPU:$C588 PRG:0588 6E ED 05
ror $05EE ; CPU:$C58B PRG:058B 6E EE 05
ror $05EF ; CPU:$C58E PRG:058E 6E EF 05
lda $05EC ; CPU:$C591 PRG:0591 AD EC 05
lda OAMBase ; CPU:$C591 PRG:0591 AD EC 05
rts ; CPU:$C594 PRG:0594 60
; ---- data $C595-$C5D0 (60 bytes) ----
; ---- data/code boundary region C595-C5D0 (60 bytes) ----
@@ -1973,7 +1973,7 @@ Sub_C5DF:
; -----------------------------------------------------------------------------
Block_C5E6:
sta Zp09 ; CPU:$C5E6 PRG:05E6 85 09
sta $2001 ; CPU:$C5E8 PRG:05E8 8D 01 20
sta PPUMASK ; CPU:$C5E8 PRG:05E8 8D 01 20
rts ; CPU:$C5EB PRG:05EB 60
; -----------------------------------------------------------------------------
; Routine: Sub_C5EC
@@ -2263,7 +2263,7 @@ Block_C841:
; -----------------------------------------------------------------------------
Block_C84A:
jsr $0000 ; CPU:$C84A PRG:084A 20 00 00
jsr a:Zp00 ; CPU:$C84A PRG:084A 20 00 00
ora (NmiPhase,X) ; CPU:$C84D PRG:084D 01 20
brk ; CPU:$C84F PRG:084F 00
jsr $D912 ; CPU:$C850 PRG:0850 20 12 D9
@@ -4835,7 +4835,7 @@ Block_D019:
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
MainLoop_Sub2:
lda $4017 ; CPU:$D01C PRG:101C AD 17 40
lda JOY2 ; CPU:$D01C PRG:101C AD 17 40
and #$10 ; CPU:$D01F PRG:101F 29 10
cmp $A0 ; CPU:$D021 PRG:1021 C5 A0
beq Block_D02C ; CPU:$D023 PRG:1023 F0 07
@@ -4983,7 +4983,7 @@ Block_D089:
lda NmiPhase ; CPU:$D089 PRG:1089 A5 20
Block_D08B:
bne Block_D097 ; CPU:$D08B PRG:108B D0 0A
lda $4017 ; CPU:$D08D PRG:108D AD 17 40
lda JOY2 ; CPU:$D08D PRG:108D AD 17 40
and #$08 ; CPU:$D090 PRG:1090 29 08
bne Block_D089 ; CPU:$D092 PRG:1092 D0 F5
jmp $D14E ; CPU:$D094 PRG:1094 4C 4E D1
@@ -5001,7 +5001,7 @@ Block_D097:
and #$E7 ; CPU:$D099 PRG:1099 29 E7
ora #$08 ; CPU:$D09B PRG:109B 09 08
sta Zp09 ; CPU:$D09D PRG:109D 85 09
sta $2001 ; CPU:$D09F PRG:109F 8D 01 20
sta PPUMASK ; CPU:$D09F PRG:109F 8D 01 20
lda #$00 ; CPU:$D0A2 PRG:10A2 A9 00
sta $1C ; CPU:$D0A4 PRG:10A4 85 1C
; -----------------------------------------------------------------------------
@@ -5033,7 +5033,7 @@ Block_D0A6:
Block_D0B6:
lda NmiPhase ; CPU:$D0B6 PRG:10B6 A5 20
bne Block_D0C3 ; CPU:$D0B8 PRG:10B8 D0 09
lda $4017 ; CPU:$D0BA PRG:10BA AD 17 40
lda JOY2 ; CPU:$D0BA PRG:10BA AD 17 40
and #$08 ; CPU:$D0BD PRG:10BD 29 08
bne Block_D0B6 ; CPU:$D0BF PRG:10BF D0 F5
beq Block_D0D1 ; CPU:$D0C1 PRG:10C1 F0 0E
@@ -6089,7 +6089,7 @@ Block_D44E:
; -----------------------------------------------------------------------------
Block_D45E:
lda $05F0,Y ; CPU:$D45E PRG:145E B9 F0 05
lda SpriteData,Y ; CPU:$D45E PRG:145E B9 F0 05
sta $C4,X ; CPU:$D461 PRG:1461 95 C4
iny ; CPU:$D463 PRG:1463 C8
inx ; CPU:$D464 PRG:1464 E8
@@ -6125,7 +6125,7 @@ Block_D474:
; -----------------------------------------------------------------------------
Block_D476:
sta $05F0,Y ; CPU:$D476 PRG:1476 99 F0 05
sta SpriteData,Y ; CPU:$D476 PRG:1476 99 F0 05
iny ; CPU:$D479 PRG:1479 C8
inx ; CPU:$D47A PRG:147A E8
cpx #$04 ; CPU:$D47B PRG:147B E0 04
@@ -10062,7 +10062,7 @@ Block_F35C:
; -----------------------------------------------------------------------------
SoundSub_Return:
lda #$C0 ; CPU:$F372 PRG:3372 A9 C0
sta $4017 ; CPU:$F374 PRG:3374 8D 17 40
sta JOY2 ; CPU:$F374 PRG:3374 8D 17 40
jsr $F440 ; CPU:$F377 PRG:3377 20 40 F4
jsr $F3C0 ; CPU:$F37A PRG:337A 20 C0 F3
jsr $F53F ; CPU:$F37D PRG:337D 20 3F F5
@@ -10151,13 +10151,13 @@ Block_F39D:
Block_F3A8:
jsr $F426 ; CPU:$F3A8 PRG:33A8 20 26 F4
lda #$4F ; CPU:$F3AB PRG:33AB A9 4F
sta $4013 ; CPU:$F3AD PRG:33AD 8D 13 40
sta APUDMCLENGTH ; CPU:$F3AD PRG:33AD 8D 13 40
lda #$E8 ; CPU:$F3B0 PRG:33B0 A9 E8
sta $4012 ; CPU:$F3B2 PRG:33B2 8D 12 40
sta APUDMCADDR ; CPU:$F3B2 PRG:33B2 8D 12 40
lda #$0E ; CPU:$F3B5 PRG:33B5 A9 0E
sta $4010 ; CPU:$F3B7 PRG:33B7 8D 10 40
sta APUDMCCTRL ; CPU:$F3B7 PRG:33B7 8D 10 40
lda #$1F ; CPU:$F3BA PRG:33BA A9 1F
sta $4015 ; CPU:$F3BC PRG:33BC 8D 15 40
sta APUSTATUS ; CPU:$F3BC PRG:33BC 8D 15 40
rts ; CPU:$F3BF PRG:33BF 60
; -----------------------------------------------------------------------------
; Routine: SoundSub5
@@ -10303,14 +10303,14 @@ SoundSub7:
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
SoundSub_Return_2:
sta $4008 ; CPU:$F42A PRG:342A 8D 08 40
sta $4011 ; CPU:$F42D PRG:342D 8D 11 40
sta APUTRIANGLECTRL ; CPU:$F42A PRG:342A 8D 08 40
sta APUDMCDIRECT ; CPU:$F42D PRG:342D 8D 11 40
sta $E6 ; CPU:$F430 PRG:3430 85 E6
sta $E4 ; CPU:$F432 PRG:3432 85 E4
lda #$10 ; CPU:$F434 PRG:3434 A9 10
sta $4000 ; CPU:$F436 PRG:3436 8D 00 40
sta $4004 ; CPU:$F439 PRG:3439 8D 04 40
sta $400C ; CPU:$F43C PRG:343C 8D 0C 40
sta APUPULSE1CTRL ; CPU:$F436 PRG:3436 8D 00 40
sta APUPULSE2CTRL ; CPU:$F439 PRG:3439 8D 04 40
sta APUNOISECTRL ; CPU:$F43C PRG:343C 8D 0C 40
rts ; CPU:$F43F PRG:343F 60
; -----------------------------------------------------------------------------
; Routine: SoundSub8
@@ -10346,7 +10346,7 @@ SoundSub8:
; -----------------------------------------------------------------------------
Block_F453:
lda #$00 ; CPU:$F453 PRG:3453 A9 00
sta $4011 ; CPU:$F455 PRG:3455 8D 11 40
sta APUDMCDIRECT ; CPU:$F455 PRG:3455 8D 11 40
sta $EC ; CPU:$F458 PRG:3458 85 EC
sta $ED ; CPU:$F45A PRG:345A 85 ED
ldx #$F3 ; CPU:$F45C PRG:345C A2 F3
@@ -10373,9 +10373,9 @@ Block_F468:
sta $EC ; CPU:$F472 PRG:3472 85 EC
ldy $ED ; CPU:$F474 PRG:3474 A4 ED
lda $F48F,Y ; CPU:$F476 PRG:3476 B9 8F F4
sta $400E ; CPU:$F479 PRG:3479 8D 0E 40
sta APUNOISEPERIOD ; CPU:$F479 PRG:3479 8D 0E 40
lda $F4BF,Y ; CPU:$F47C PRG:347C B9 BF F4
sta $400C ; CPU:$F47F PRG:347F 8D 0C 40
sta APUNOISECTRL ; CPU:$F47F PRG:347F 8D 0C 40
inc $ED ; CPU:$F482 PRG:3482 E6 ED
lda $ED ; CPU:$F484 PRG:3484 A5 ED
cmp #$30 ; CPU:$F486 PRG:3486 C9 30
@@ -10508,7 +10508,7 @@ Block_F51A:
sta $EE ; CPU:$F523 PRG:3523 85 EE
sta $EF ; CPU:$F525 PRG:3525 85 EF
lda #$10 ; CPU:$F527 PRG:3527 A9 10
sta $4004 ; CPU:$F529 PRG:3529 8D 04 40
sta APUPULSE2CTRL ; CPU:$F529 PRG:3529 8D 04 40
ldy #$05 ; CPU:$F52C PRG:352C A0 05
lda #$08 ; CPU:$F52E PRG:352E A9 08
bne Block_F53D ; CPU:$F530 PRG:3530 D0 0B
@@ -10862,10 +10862,10 @@ Block_F5FD:
tay ; CPU:$F5FD PRG:35FD A8
lda $F301,Y ; CPU:$F5FE PRG:35FE B9 01 F3
beq Block_F60E ; CPU:$F601 PRG:3601 F0 0B
sta $4002,X ; CPU:$F603 PRG:3603 9D 02 40
sta APUPULSE1TIMERLO,X ; CPU:$F603 PRG:3603 9D 02 40
lda $F300,Y ; CPU:$F606 PRG:3606 B9 00 F3
ora #$08 ; CPU:$F609 PRG:3609 09 08
sta $4003,X ; CPU:$F60B PRG:360B 9D 03 40
sta APUPULSE1TIMERHI,X ; CPU:$F60B PRG:360B 9D 03 40
; -----------------------------------------------------------------------------
; Routine: Block_F60E
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
@@ -10979,7 +10979,7 @@ Block_F650:
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Block_F652:
sty $4000 ; CPU:$F652 PRG:3652 8C 00 40
sty APUPULSE1CTRL ; CPU:$F652 PRG:3652 8C 00 40
lda $DC ; CPU:$F655 PRG:3655 A5 DC
sta $D8 ; CPU:$F657 PRG:3657 85 D8
; -----------------------------------------------------------------------------
@@ -11040,7 +11040,7 @@ Block_F67D:
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Block_F67F:
sty $4004 ; CPU:$F67F PRG:367F 8C 04 40
sty APUPULSE2CTRL ; CPU:$F67F PRG:367F 8C 04 40
lda $DD ; CPU:$F682 PRG:3682 A5 DD
sta $D9 ; CPU:$F684 PRG:3684 85 D9
; -----------------------------------------------------------------------------
@@ -11100,7 +11100,7 @@ Block_F6B1:
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Block_F6BC:
sta $4008 ; CPU:$F6BC PRG:36BC 8D 08 40
sta APUTRIANGLECTRL ; CPU:$F6BC PRG:36BC 8D 08 40
sta $E7 ; CPU:$F6BF PRG:36BF 85 E7
ldy $D2 ; CPU:$F6C1 PRG:36C1 A4 D2
inc $D2 ; CPU:$F6C3 PRG:36C3 E6 D2
@@ -11140,7 +11140,7 @@ Block_F6D0:
; Clobbers: Undetermined in Pass 1.
; -----------------------------------------------------------------------------
Block_F6D2:
sty $4008 ; CPU:$F6D2 PRG:36D2 8C 08 40
sty APUTRIANGLECTRL ; CPU:$F6D2 PRG:36D2 8C 08 40
lda $DE ; CPU:$F6D5 PRG:36D5 A5 DE
sta $DA ; CPU:$F6D7 PRG:36D7 85 DA
; -----------------------------------------------------------------------------
@@ -11211,11 +11211,11 @@ SoundSub14:
cmp #$02 ; CPU:$F70D PRG:370D C9 02
beq Block_F723 ; CPU:$F70F PRG:370F F0 12
lda $F400,Y ; CPU:$F711 PRG:3711 B9 00 F4
sta $400C ; CPU:$F714 PRG:3714 8D 0C 40
sta APUNOISECTRL ; CPU:$F714 PRG:3714 8D 0C 40
lda $F401,Y ; CPU:$F717 PRG:3717 B9 01 F4
sta $400E ; CPU:$F71A PRG:371A 8D 0E 40
sta APUNOISEPERIOD ; CPU:$F71A PRG:371A 8D 0E 40
lda $F402,Y ; CPU:$F71D PRG:371D B9 02 F4
sta $400F ; CPU:$F720 PRG:3720 8D 0F 40
sta APUNOISELENGTH ; CPU:$F720 PRG:3720 8D 0F 40
; -----------------------------------------------------------------------------
; Routine: Block_F723
; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.
@@ -11268,7 +11268,7 @@ SoundSub15:
sta $D1 ; CPU:$F765 PRG:3765 85 D1
sta $D2 ; CPU:$F767 PRG:3767 85 D2
sta $D3 ; CPU:$F769 PRG:3769 85 D3
sta $4011 ; CPU:$F76B PRG:376B 8D 11 40
sta APUDMCDIRECT ; CPU:$F76B PRG:376B 8D 11 40
rts ; CPU:$F76E PRG:376E 60
; -----------------------------------------------------------------------------
; Routine: SoundSub16
@@ -11281,8 +11281,8 @@ SoundSub15:
; -----------------------------------------------------------------------------
SoundSub16:
lda #$7F ; CPU:$F76F PRG:376F A9 7F
sta $4001 ; CPU:$F771 PRG:3771 8D 01 40
sta $4005 ; CPU:$F774 PRG:3774 8D 05 40
sta APUPULSE1SWEEP ; CPU:$F771 PRG:3771 8D 01 40
sta APUPULSE2SWEEP ; CPU:$F774 PRG:3774 8D 05 40
stx $E9 ; CPU:$F777 PRG:3777 86 E9
sty $EA ; CPU:$F779 PRG:3779 84 EA
rts ; CPU:$F77B PRG:377B 60