From 71ada15de0aa4bc4c10a4f6cca83b985c2467613 Mon Sep 17 00:00:00 2001 From: Trevor Merritt Date: Mon, 19 Oct 2026 12:21:04 -0400 Subject: [PATCH] Promote Donkey Kong (JU): Pass 3 complete, whole-ROM byte-identical MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 — 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 _Block / _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`, 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. --- AGENTS.md | 16 +- Balloon Fight (JU)/OVERVIEW.md | 52 +- Balloon Fight (JU)/copilot/prg.s | 1844 +++--- Baseball (UE)/OVERVIEW.md | 4 +- Baseball (UE)/copilot/prg.s | 242 +- Bomberman (U)/OVERVIEW.md | 195 +- Bomberman (U)/copilot/prg.s | 772 +-- Bomberman (U)/copilot/reconstructed.lbl | 20 +- CIRCUS/OVERVIEW.md | 10 +- CIRCUS/copilot/prg.s | 236 +- Clu Clu Land (JU)/OVERVIEW.md | 6 +- .../Donkey Kong (JU).nes | Bin Donkey Kong (JU)/OVERVIEW.md | 104 + Donkey Kong (JU)/copilot/Makefile | 25 + .../copilot/chr.bin | Bin Donkey Kong (JU)/copilot/chr.s | 2 + Donkey Kong (JU)/copilot/dk_full_map.tsv | 1326 ++++ .../copilot/dk_label_map.tsv | 0 .../copilot/header.bin | Bin Donkey Kong (JU)/copilot/header.s | 2 + Donkey Kong (JU)/copilot/linker.cfg | 10 + .../copilot/locals.inc | 0 .../copilot/prg.bin | Bin .../copilot/prg.s | 5428 +++++++++-------- Donkey Kong (JU)/copilot/reconstructed.lbl | 1025 ++++ Donkey Kong (JU)/copilot/reconstructed.map | 32 + .../copilot/reconstructed.nes | Bin 16384 -> 24592 bytes Donkey Kong (JU)/copilot/rom.nes | 1 + .../copilot/symbols.inc | 0 Donkey Kong Jr. (JU)/OVERVIEW.md | 2 +- Excitebike (JU)/OVERVIEW.md | 6 +- Joypad Test Cartridge (U)/OVERVIEW.md | 2 +- Joypad Test Cartridge (U)/copilot/prg.s | 94 +- Lunar Pool (U)/OVERVIEW.md | 35 +- Lunar Pool (U)/copilot/prg.s | 90 +- MUSCLE (U)/OVERVIEW.md | 2 +- MUSCLE (U)/copilot/prg.s | 440 +- NES PowerPad Test Card (U)/OVERVIEW.md | 6 +- NES PowerPad Test Card (U)/copilot/prg.s | 178 +- OVERVIEW.md | 280 +- Pac-Man (USA) (Namco)/OVERVIEW.md | 8 +- Pac-Man (USA) (Namco)/copilot/prg.s | 1048 ++-- TODO.md | 186 +- Tennis (JU)/OVERVIEW.md | 6 +- Tennis (JU)/copilot/prg.s | 36 +- Urban Champion (JU)/OVERVIEW.md | 27 +- Urban Champion (JU)/copilot/prg.s | 140 +- Wild Gunman (U)/OVERVIEW.md | 22 +- Wild Gunman (U)/copilot/prg.s | 152 +- _tools/apply_symbols.py | 210 + _wip/Donkey Kong (JU)/OVERVIEW.md | 71 - _wip/Donkey Kong (JU)/copilot/Makefile | 10 - _wip/Donkey Kong (JU)/copilot/dk_full_map.tsv | 627 -- _wip/Donkey Kong (JU)/copilot/linker.cfg | 6 - .../copilot/reconstructed.lbl | 1015 --- _wip/Donkey Kong Jr. Math (U)/OVERVIEW.md | 63 +- _wip/Duck Hunt (JUE)/OVERVIEW.md | 61 +- _wip/Golf (JU)/OVERVIEW.md | 29 +- _wip/Hogan's Alley (JU)/OVERVIEW.md | 28 +- _wip/Hogan's Alley (JU)/copilot/prg.s | 46 +- .../copilot/reconstructed.lbl | 2 - .../copilot/reconstructed_prg.bin | Bin 16384 -> 16384 bytes _wip/Ice Climber (JE)/OVERVIEW.md | 67 +- _wip/Ice Climber (U)/OVERVIEW.md | 32 +- _wip/Lode Runner (U)/OVERVIEW.md | 28 +- _wip/Mario Bros (JU)/OVERVIEW.md | 40 +- _wip/Millipede (U)/OVERVIEW.md | 28 +- _wip/Pac-Man (Tengen) (U)/OVERVIEW.md | 30 +- _wip/Pac-Man (U)/OVERVIEW.md | 30 +- _wip/Pinball (JU)/OVERVIEW.md | 61 +- _wip/Popeye (JU) (PRG 0)/OVERVIEW.md | 28 +- _wip/Popeye (JU) (PRG 1)/OVERVIEW.md | 28 +- _wip/Pyramid (U)/OVERVIEW.md | 4 +- _wip/Pyramid (U)/copilot/prg.s | 4 +- _wip/Pyramid (U)/copilot/reconstructed.lbl | 426 ++ .../copilot/reconstructed.map | 0 .../Pyramid (U)/copilot/reconstructed_prg.bin | Bin 0 -> 16384 bytes .../OVERVIEW.md | 28 +- _wip/Raid on Bungeling Bay (U)/OVERVIEW.md | 28 +- 79 files changed, 9455 insertions(+), 7687 deletions(-) rename {_wip/Donkey Kong (JU) => Donkey Kong (JU)}/Donkey Kong (JU).nes (100%) create mode 100644 Donkey Kong (JU)/OVERVIEW.md create mode 100644 Donkey Kong (JU)/copilot/Makefile rename {_wip/Donkey Kong (JU) => Donkey Kong (JU)}/copilot/chr.bin (100%) create mode 100644 Donkey Kong (JU)/copilot/chr.s create mode 100644 Donkey Kong (JU)/copilot/dk_full_map.tsv rename {_wip/Donkey Kong (JU) => Donkey Kong (JU)}/copilot/dk_label_map.tsv (100%) rename {_wip/Donkey Kong (JU) => Donkey Kong (JU)}/copilot/header.bin (100%) create mode 100644 Donkey Kong (JU)/copilot/header.s create mode 100644 Donkey Kong (JU)/copilot/linker.cfg rename {_wip/Donkey Kong (JU) => Donkey Kong (JU)}/copilot/locals.inc (100%) rename {_wip/Donkey Kong (JU) => Donkey Kong (JU)}/copilot/prg.bin (100%) rename {_wip/Donkey Kong (JU) => Donkey Kong (JU)}/copilot/prg.s (91%) create mode 100644 Donkey Kong (JU)/copilot/reconstructed.lbl create mode 100644 Donkey Kong (JU)/copilot/reconstructed.map rename _wip/Donkey Kong (JU)/copilot/reconstructed_prg.bin => Donkey Kong (JU)/copilot/reconstructed.nes (65%) create mode 120000 Donkey Kong (JU)/copilot/rom.nes rename {_wip/Donkey Kong (JU) => Donkey Kong (JU)}/copilot/symbols.inc (100%) create mode 100644 _tools/apply_symbols.py delete mode 100644 _wip/Donkey Kong (JU)/OVERVIEW.md delete mode 100644 _wip/Donkey Kong (JU)/copilot/Makefile delete mode 100644 _wip/Donkey Kong (JU)/copilot/dk_full_map.tsv delete mode 100644 _wip/Donkey Kong (JU)/copilot/linker.cfg delete mode 100644 _wip/Donkey Kong (JU)/copilot/reconstructed.lbl create mode 100644 _wip/Pyramid (U)/copilot/reconstructed.lbl rename _wip/{Donkey Kong (JU) => Pyramid (U)}/copilot/reconstructed.map (100%) create mode 100644 _wip/Pyramid (U)/copilot/reconstructed_prg.bin diff --git a/AGENTS.md b/AGENTS.md index 359f6b1..46756d4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,40 +2,40 @@ ## What this repo is -Thirty-six AI-generated disassemblies of NES ROMs: 17 promoted to top-level folders and 19 skeletons still under `_wip/`. The contract (stated in `PROMPTS.md` and verified by `make` in every `copilot/` folder) is **byte-identical rebuilds**: `reconstructed.nes` must match the original ROM exactly. Not for distribution (`README.md`). +Thirty-six AI-generated disassemblies of NES ROMs: 19 promoted to top-level folders and 17 still under `_wip/`. All 36 carry real disassemblies (Pass 1 or beyond); the difference is the build tier — the 19 at top level verify **byte-identical for the whole ROM**, the 17 in `_wip/` verify at the PRG level only. The contract (stated in `PROMPTS.md` and verified by `make` in every `copilot/` folder) is **byte-identical rebuilds**: `reconstructed.nes` must match the original ROM exactly. Not for distribution (`README.md`). ## Layout -- Each project owns a folder with a `copilot/` build dir (`prg.s`, `header.s`, `chr.s`, `linker.cfg`, `symbols.inc`, `locals.inc`, `Makefile`, and a copy/symlink `rom.nes`) and a per-project `OVERVIEW.md` at the folder root (power-on flow analysis). Some older ones use `main.s` instead of `prg.s`, and a few lack `prg.bin` (carve the PRG out of `rom.nes` instead). +- Each project owns a folder with a `copilot/` build dir (`prg.s`, `linker.cfg`, `symbols.inc`, `locals.inc`, `Makefile`; promoted projects add `header.s`, `chr.s` and a copy/symlink `rom.nes`) and a per-project `OVERVIEW.md` at the folder root (power-on flow analysis). Some older ones use `main.s` instead of `prg.s`, and a few lack `prg.bin` (carve the PRG out of `rom.nes` instead). - Root `OVERVIEW.md` is the index: vectors, build fixes, and summary for all 36 projects. **Keep it in sync** when a project changes — its DK Jr. entries drifted badly before being corrected, and its vector column later turned out to have five rows wrong from copy-paste duplication. - `TODO.md` is the handoff: open work per project, plus the gotchas that cost real time. Read it before starting anything non-trivial. - `PROMPTS.md` is the workflow contract. `default_project.tar.gz` is the empty-project skeleton (prg.s, symbols.inc, linker.cfg, Makefile, locals.inc). `_ROMS/` is the master ROM store. -- `_tools/`: `nesdis.py` (Pass 1 tracer), `pass2.py` and `bytecode_dis.py` (Pass 2/3 emitters), `trace_stage_payload.py` (py65-based runtime tracer), `cdl_reclass.py` (Mesen-CDL-driven code/data split fix), `verify_pass1.py` (rebuild + re-trace check across all projects), `audit_comment_tool.py` (adds canonical audit comments using tracer as ground truth), `splitnes.py`, `chr2gif.py`. +- `_tools/`: `nesdis.py` (Pass 1 tracer), `pass2.py` and `bytecode_dis.py` (Pass 2/3 emitters), `apply_symbols.py` (substitutes `symbols.inc`/`locals.inc` names into `prg.s` operands), `trace_stage_payload.py` (py65-based runtime tracer), `cdl_reclass.py` (Mesen-CDL-driven code/data split fix), `verify_pass1.py` (rebuild + re-trace check across the top-level projects), `audit_comment_tool.py` (adds canonical audit comments using tracer as ground truth), `splitnes.py`, `chr2gif.py`. ## Commands ```bash cd "/copilot" && make # builds reconstructed.nes, then cmp vs rom.nes -python3 _tools/verify_pass1.py # rebuilds and re-traces every project +python3 _tools/verify_pass1.py # rebuilds + re-traces the 19 top-level projects ``` `make`'s default target includes the byte-identity `cmp` — a build that doesn't print "Byte-identical ROM verified." is a failure. Requires `ca65`/`ld65` on PATH. -**There are two build tiers, and the difference is real.** Top-level projects compare the whole ROM against `copilot/rom.nes`. The 20 `_wip/` projects only run `cmp reconstructed_prg.bin prg.bin`, so their **header and CHR are not proven** — do not describe them as byte-identical to the ROM. +**There are two build tiers, and the difference is real.** Top-level projects compare the whole ROM against `copilot/rom.nes`. The 17 `_wip/` projects only run `cmp reconstructed_prg.bin prg.bin`, so their **header and CHR are not proven** — do not describe them as byte-identical to the ROM. ## Promoting a project out of `_wip/` 1. `git mv "_wip/" ""` — the relative `copilot/rom.nes -> ../.nes` symlink survives untouched. 2. Add `copilot/rom.nes` (a space-free copy or symlink of the original) and switch the Makefile from `cmp reconstructed_prg.bin prg.bin` to `cmp reconstructed.nes rom.nes`. -2b. A Pass-0 skeleton has no `header.s`/`chr.s` and its `linker.cfg` declares only the PRG memory area, so add all three (copy the shape from `Burger Time (U)/copilot/`: two one-line `.incbin`s and `HEADER: start = $0000, size = $0010` ahead of PRG) or the whole-ROM compare has nothing to link. `Lunar Pool (U)` is the worked example (2026-10-18). -3. Change `../../../_tools/` to `../../_tools/` in the Makefile — the depth changed by one. +2b. A `_wip/` project has no `header.s`/`chr.s` and its `linker.cfg` declares only the PRG memory area, so add all three (copy the shape from `Burger Time (U)/copilot/`: two one-line `.incbin`s and `HEADER: start = $0000, size = $0010` ahead of PRG) or the whole-ROM compare has nothing to link. `Lunar Pool (U)` is the worked example (2026-10-18), and `Donkey Kong (JU)` (2026-10-19) the second — it also fixed a header-byte mirroring error in its project `OVERVIEW.md` (Vertical → Horizontal from byte 6 = `$00`). +3. Change `../../../_tools/` to `../../_tools/` in the Makefile — the depth changed by one. (No-op if the Makefile never referenced `_tools/` — `Donkey Kong (JU)` had none, and no `make regen` target either.) 4. Verify `make`, then `make regen` if a regen pipeline exists. 5. Add it to the root inventory table and re-number the `_wip` rows. ## Irreversible conventions (do not "clean up" past these) -- Every instruction carries a trailing audit comment with its CPU address, PRG offset and exact emitted bytes. **The canonical format is `; CPU:$C123 PRG:0123 AD 21 03` — all 18 top-level projects now use this exact format** (standardized 2026-10-19). This is the byte-identity audit trail — preserve it even while renaming labels or restructuring files. The earlier gap (6 variants, 1,013 uncommented lines in Excitebike) was closed 2026-10-19 via `_tools/audit_comment_tool.py`. +- Every instruction carries a trailing audit comment with its CPU address, PRG offset and exact emitted bytes. **The canonical format is `; CPU:$C123 PRG:0123 AD 21 03` — all 19 top-level projects now use this exact format** (standardized 2026-10-19; Donkey Kong (JU) confirmed canonical at its promotion the same day). This is the byte-identity audit trail — preserve it even while renaming labels or restructuring files. The earlier gap (6 variants, 1,013 uncommented lines in Excitebike) was closed 2026-10-19 via `_tools/audit_comment_tool.py`. - Unreached/unresolved bytes stay as data (`Label_/Data/` `.byte` or `.incbin` blocks with ROM provenance), never deleted or reformatted. - Routine headers follow the template in `prg.s`: global + local description, parameters, returns, clobbers. - Two separate symbol files: `symbols.inc` = NES hardware constants only; `locals.inc` = zero-page and forward references. Unresolved zero-page bytes keep neutral `ZpXX` names rather than speculative names. Proven semantic names may sit *beside* the generated `ZpXX` entries as aliases. diff --git a/Balloon Fight (JU)/OVERVIEW.md b/Balloon Fight (JU)/OVERVIEW.md index bbe7ebd..11c09f8 100644 --- a/Balloon Fight (JU)/OVERVIEW.md +++ b/Balloon Fight (JU)/OVERVIEW.md @@ -19,9 +19,9 @@ On power-on or reset, the 6502 jumps to `$C000`. The reset routine performs cold | 8 | `ldx #$FF / txs` | Initialize stack pointer | | 9–13 | Clear Zero Page | Zero all of RAM $00–$FF | | 14–21 | Warm-start signature check | Compare RAM `$07FA`–`$07FC` against `"HAL"` ($C082–$C084). If valid, skip full memory clear | -| 22–31 | Initialize memory | Clear zero page + stack page ($0700–$07FF), set `$15 = $32`, run block-init loop (`jsr $D6DE` 50 times), `jsr $C579` | +| 22–31 | Initialize memory | Clear zero page + stack page ($0700–$07FF via `SortedRecordTable`, x = 0), set `SpawnPixelPosition` = $32, run block-init loop (`jsr InitializeOrQueueObject` 50 times), `jsr SortOrInitializeRecords` | | 32–44 | Copy initialization data | Copy 15 bytes from $C085 to $0629 (initial game state table) | -| 45–51 | Clear local variables | Zero $03–$06 | +| 45–51 | Clear local variables | Zero the five-byte `CurrentRecord` at $03–$07 | | 52–56 | Copy saved signature | Re-store `"HAL"` to $07FA–$07FC | | 57 | `jmp MainInitialization` | Transfer control to $F1D4 | @@ -43,7 +43,7 @@ Located at the end of the bank (PRG offset $3FFA): |--------|---------|---------| | NMI | $C094 | `NmiHandler` | | RESET | $C000 | `Reset` | -| IRQ | $C0F7 | `IrqHandler` (self-loop `jmp $C0F7` — unused) | +| IRQ | $C0F7 | `IrqHandler` (self-loop `jmp IrqHandler` — unused) | --- @@ -52,12 +52,12 @@ Located at the end of the bank (PRG offset $3FFA): The NMI fires once per frame and drives the frame pacing. It: 1. **Preserves registers** (A, X, Y on stack) -2. **OAM DMA**: writes `$00` to `$2003`, then `$02` to `$4014` (DMA from $0200–$02FF) +2. **OAM DMA**: writes `$00` to `OAMADDR`, then `$02` to `OAMDMA` (DMA from $0200–$02FF) 3. **PPU command buffer flush**: compares read/write offsets at $52/$53; if data pending, calls `FlushPpuCommandPreserved` ($C17C) 4. **Transfer sources**: `jsr UpdatePpuTransferSources` ($D60D) 5. **Build OAM**: `jsr BuildFrameOam` ($D798) 6. **Frame counter**: `inc FrameCounter` ($19) -7. **Scroll/rendering setup**: sets $2006/$2005 scroll registers, conditionally waits for VBlank if rendering disabled, writes $2000 +7. **Scroll/rendering setup**: sets the `PPUADDR`/`PPUSCROLL` registers, conditionally waits for VBlank if rendering disabled (polling `PPUSTATUS`), writes `PPUCTRL` 8. **Audio**: `jsr UpdateAudioFrame` ($FFF7 bank call → `Sound_F758`) 9. **Sets `NmiCompletedFlag`** ($02 = $01) 10. **Restores registers, `rti`** @@ -167,7 +167,7 @@ Routines: | $00 | `PpuControlShadow` | $2000 mirror | | $01 | `PpuMaskShadow` | $2001 mirror | | $02 | `NmiCompletedFlag` | VBlank sync flag | -| $12–$13 | `RecordIndex` / `ReverseRecordIndex` | Sorted-record insertion | +| $12–$13 | `RecordIndex` / `ReverseRecordIndex` | Sorted-record insertion (see reuse note below) | | $14–$15 | `SpawnParameter` / `SpawnPixelPosition` | Spawn args | | $16 | `RenderingDisabledFlag` | Rendering state | | $17 | `PpuScrollX` | Scroll X | @@ -196,6 +196,19 @@ Routines: | $0700–$07F9 | Sorted record table | 50 × 5-byte OAM sort records | | $07FA–$07FC | Warm-start signature | "HAL" | +**Alias reuse.** Several zero-page addresses serve more than one subsystem, so `locals.inc` +defines several names per address; `prg.s` uses whichever fits the routine reading it: + +| Address | Names used in `prg.s` | +|---------|---------| +| $12 | `RecordIndex` (sort), `Temp12` (generic scratch), `CollisionDeltaX`, `MotionDeltaLo` | +| $13 | `ReverseRecordIndex` (sort), `CollisionDeltaY`, `MotionDeltaHi` | +| $23–$26 | `SpawnCommandPointerLo/Hi` + `DispatchPointerLo/Hi`, `BoundsLeftPtrLo/Hi` + `BoundsRightPtrLo/Hi` (stage-collision bounds) | +| $27–$2A | `BoundsTopPtrLo/Hi` + `BoundsBottomPtrLo/Hi` (stage-collision bounds) | +| $3E | `SequencePlayerIndex` (bonus accumulation) / `CurrentObjectIndex` (object loops) | +| $57–$5A | `PpuCommandData0/1/2` (PPU command buffer) / `HudCommandTile0`; `RoundHudCommandAddressHi/Lo` + `RoundHudCommandLength` + `RoundHudTile` in `DrawRoundStatusPanel` | +| $55D/$567/$57B | `EffectObjectState` / `EffectObjectPosX` / `EffectObjectPosY` (spawn effects) vs `ParticleState` / `ParticlePosX` / `ParticlePosY` (particles) | + --- ## 8. Object Pools @@ -251,15 +264,34 @@ NMI ($C094) [once per frame] --- -## 10. Notes on Provisional Areas +## 10. Naming and Residue -Some routines in the disassembly still carry placeholder names (`Label_Cxxxx`, `Sound_FBxx`) and some data blocks were previously marked "undecoded." These have been cleaned up in this review: +Pass 2 (2026-10-19) replaced every address-derived definition with a semantic name — +`Sub_Cxxx` for the routines that had no behavioural name yet, `_Block[_n]` for +internal branch targets — so `prg.s` now contains **zero** `Label_` definitions. The 77 +`Sound_Fxxx` entry points keep their addresses as names in the banked audio region. + +Pass 3 applies the two symbol tables to the instruction stream: + +- `symbols.inc` — the NES hardware constants (`PPUCTRL` … `APUFRAMECNT`). All **125** + numeric register operands are now symbolic. +- `locals.inc` — zero-page/RAM names plus forward-reference aliases for routine + addresses (`AbsoluteDifference` = $F08E, `MainInitialization` = $F1D4, …). All but + **16** numeric operands are now symbolic. + +Placeholder names renamed during the same work: - `Sub_C154` → **`BuildPpuCommand`** - `Sub_C17C` → **`FlushPpuCommandPreserved`** - `Sub_C40C` → **`SpawnRandomObject`** - `SpawnCommandStreamData_C4AD` → **`RoundSpawnCommandStream`** (format documented) -The 497 `Label_` branch targets are local intra-routine labels; none are subroutine entry points (confirmed against all `jsr`/`jmp` targets in the source). The 77 `Sound_FBxx` labels are sound-driver entry points in the banked audio region. +**Residue.** `$13` carries three aliases (`ReverseRecordIndex`, `CollisionDeltaY`, +`MotionDeltaHi`), none of which fits the **16** sites where it is used as an ordinary +high-byte scratch beside `Temp12` — in `LoadStageObjectData`, `ReadPpuStreamByte`, +`CreateBonusResultSprites`, `RenderObjectSprites_Load`, `ResolveObjectCollisionPair` +and `SwapObjectIndexes`. Those operands are deliberately left numeric rather than given +a speculative name; a neutral `$13` companion to `Temp12` would close them. -Build verification: `make` in `copilot/` produces `reconstructed_prg.bin` that is **byte-identical** to `prg.bin` and to the PRG bank of `balloon.nes`. \ No newline at end of file +Build verification: `make` in `copilot/` produces `reconstructed.nes`, compared whole-ROM +against `rom.nes` (byte-identical). \ No newline at end of file diff --git a/Balloon Fight (JU)/copilot/prg.s b/Balloon Fight (JU)/copilot/prg.s index 00c7be2..4c7235c 100644 --- a/Balloon Fight (JU)/copilot/prg.s +++ b/Balloon Fight (JU)/copilot/prg.s @@ -45,7 +45,7 @@ WaitForSecondVBlank: lda #$00 ; CPU:$C01E PRG:001E A9 00 ClearZeroPage: - sta $00,x ; CPU:$C020 PRG:0020 95 00 + sta PpuControlShadow,x ; CPU:$C020 PRG:0020 95 00 inx ; CPU:$C022 PRG:0022 E8 bne ClearZeroPage ; CPU:$C023 PRG:0023 D0 FB @@ -64,21 +64,21 @@ InitializeMemory: txa ; CPU:$C036 PRG:0036 8A ClearZeroPageAndStackPage: - sta $00,x ; CPU:$C037 PRG:0037 95 00 - sta $0700,x ; CPU:$C039 PRG:0039 9D 00 07 + sta PpuControlShadow,x ; CPU:$C037 PRG:0037 95 00 + sta SortedRecordTable,x ; CPU:$C039 PRG:0039 9D 00 07 inx ; CPU:$C03C PRG:003C E8 bne ClearZeroPageAndStackPage ; CPU:$C03D PRG:003D D0 F8 lda #$32 ; CPU:$C03F PRG:003F A9 32 - sta $15 ; CPU:$C041 PRG:0041 85 15 + sta SpawnPixelPosition ; CPU:$C041 PRG:0041 85 15 InitializeBlockLoop: lda #$32 ; CPU:$C043 PRG:0043 A9 32 - jsr $D6DE ; CPU:$C045 PRG:0045 20 DE D6 + jsr InitializeOrQueueObject ; CPU:$C045 PRG:0045 20 DE D6 lda #$00 ; CPU:$C048 PRG:0048 A9 00 - sta $46 ; CPU:$C04A PRG:004A 85 46 - jsr $C579 ; CPU:$C04C PRG:004C 20 79 C5 - dec $15 ; CPU:$C04F PRG:004F C6 15 + sta SequenceStep ; CPU:$C04A PRG:004A 85 46 + jsr SortOrInitializeRecords ; CPU:$C04C PRG:004C 20 79 C5 + dec SpawnPixelPosition ; CPU:$C04F PRG:004F C6 15 bne InitializeBlockLoop ; CPU:$C051 PRG:0051 D0 F0 ldx #$0E ; CPU:$C053 PRG:0053 A2 0E @@ -93,12 +93,12 @@ CopyInitializationData: ClearLocalVariables: lda #$00 ; CPU:$C060 PRG:0060 A9 00 - sta $03,x ; CPU:$C062 PRG:0062 95 03 + sta CurrentRecord,x ; CPU:$C062 PRG:0062 95 03 dex ; CPU:$C064 PRG:0064 CA bpl ClearLocalVariables ; CPU:$C065 PRG:0065 10 F9 lda #$00 ; CPU:$C067 PRG:0067 A9 00 - jsr $D6DE ; CPU:$C069 PRG:0069 20 DE D6 + jsr InitializeOrQueueObject ; CPU:$C069 PRG:0069 20 DE D6 ldx #$02 ; CPU:$C06C PRG:006C A2 02 CopySavedSignature: @@ -109,9 +109,9 @@ CopySavedSignature: SavedSignatureValid: lda #$1E ; CPU:$C077 PRG:0077 A9 1E - sta $01 ; CPU:$C079 PRG:0079 85 01 + sta PpuMaskShadow ; CPU:$C079 PRG:0079 85 01 lda #$90 ; CPU:$C07B PRG:007B A9 90 - sta $00 ; CPU:$C07D PRG:007D 85 00 + sta PpuControlShadow ; CPU:$C07D PRG:007D 85 00 ; Decoded PRG block $007F-$046A. EnterMainInitialization: @@ -148,9 +148,9 @@ NmiHandler: tya ; CPU:$C095 PRG:0095 98 pha ; CPU:$C096 PRG:0096 48 lda #$00 ; CPU:$C097 PRG:0097 A9 00 - sta $2003 ; CPU:$C099 PRG:0099 8D 03 20 + sta OAMADDR ; CPU:$C099 PRG:0099 8D 03 20 lda #$02 ; CPU:$C09C PRG:009C A9 02 - sta $4014 ; CPU:$C09E PRG:009E 8D 14 40 + sta OAMDMA ; CPU:$C09E PRG:009E 8D 14 40 lda PpuBufferReadOffset ; CPU:$C0A1 PRG:00A1 A5 52 cmp PpuBufferWriteOffset ; CPU:$C0A3 PRG:00A3 C5 53 beq NmiHandler_Block ; CPU:$C0A5 PRG:00A5 F0 03 @@ -160,19 +160,19 @@ NmiHandler_Block: jsr BuildFrameOam ; CPU:$C0AD PRG:00AD 20 98 D7 inc FrameCounter ; CPU:$C0B0 PRG:00B0 E6 19 lda #$20 ; CPU:$C0B2 PRG:00B2 A9 20 - sta $2006 ; CPU:$C0B4 PRG:00B4 8D 06 20 + sta PPUADDR ; CPU:$C0B4 PRG:00B4 8D 06 20 lda #$00 ; CPU:$C0B7 PRG:00B7 A9 00 - sta $2006 ; CPU:$C0B9 PRG:00B9 8D 06 20 + sta PPUADDR ; CPU:$C0B9 PRG:00B9 8D 06 20 lda #$00 ; CPU:$C0BC PRG:00BC A9 00 - sta $2005 ; CPU:$C0BE PRG:00BE 8D 05 20 - sta $2005 ; CPU:$C0C1 PRG:00C1 8D 05 20 + sta PPUSCROLL ; CPU:$C0BE PRG:00BE 8D 05 20 + sta PPUSCROLL ; CPU:$C0C1 PRG:00C1 8D 05 20 jsr UpdateAudioFrame ; CPU:$C0C4 PRG:00C4 20 F7 FF lda #$01 ; CPU:$C0C7 PRG:00C7 A9 01 sta NmiCompletedFlag ; CPU:$C0C9 PRG:00C9 85 02 lda RenderingDisabledFlag ; CPU:$C0CB PRG:00CB A5 16 beq NmiHandler_Block_3 ; CPU:$C0CD PRG:00CD F0 20 NmiHandler_Block_1: - lda $2002 ; CPU:$C0CF PRG:00CF AD 02 20 + lda PPUSTATUS ; CPU:$C0CF PRG:00CF AD 02 20 bmi NmiHandler_Block_1 ; CPU:$C0D2 PRG:00D2 30 FB ldx #$04 ; CPU:$C0D4 PRG:00D4 A2 04 ldy #$C6 ; CPU:$C0D6 PRG:00D6 A0 C6 @@ -183,11 +183,11 @@ NmiHandler_Block_2: bne NmiHandler_Block_2 ; CPU:$C0DC PRG:00DC D0 FA lda PpuControlBase ; CPU:$C0DE PRG:00DE A5 18 ora PpuControlShadow ; CPU:$C0E0 PRG:00E0 05 00 - sta $2000 ; CPU:$C0E2 PRG:00E2 8D 00 20 + sta PPUCTRL ; CPU:$C0E2 PRG:00E2 8D 00 20 lda PpuScrollX ; CPU:$C0E5 PRG:00E5 A5 17 - sta $2005 ; CPU:$C0E7 PRG:00E7 8D 05 20 + sta PPUSCROLL ; CPU:$C0E7 PRG:00E7 8D 05 20 lda #$00 ; CPU:$C0EA PRG:00EA A9 00 - sta $2005 ; CPU:$C0EC PRG:00EC 8D 05 20 + sta PPUSCROLL ; CPU:$C0EC PRG:00EC 8D 05 20 NmiHandler_Block_3: pla ; CPU:$C0EF PRG:00EF 68 tay ; CPU:$C0F0 PRG:00F0 A8 @@ -241,7 +241,7 @@ DisableNmi: lda PpuControlShadow ; CPU:$C0F8 PRG:00F8 A5 00 and #$7F ; CPU:$C0FA PRG:00FA 29 7F DisableNmi_Block: - sta $2000 ; CPU:$C0FC PRG:00FC 8D 00 20 + sta PPUCTRL ; CPU:$C0FC PRG:00FC 8D 00 20 sta PpuControlShadow ; CPU:$C0FF PRG:00FF 85 00 rts ; CPU:$C101 PRG:0101 60 ;=============================================================================== @@ -294,7 +294,7 @@ SetPpuControl_Block: pha ; CPU:$C10A PRG:010A 48 jsr WaitForFrame ; CPU:$C10B PRG:010B 20 65 F4 pla ; CPU:$C10E PRG:010E 68 - sta $2001 ; CPU:$C10F PRG:010F 8D 01 20 + sta PPUMASK ; CPU:$C10F PRG:010F 8D 01 20 rts ; CPU:$C112 PRG:0112 60 ;=============================================================================== ; SetPpuMask @@ -343,7 +343,7 @@ WaitForFrameAndSetPpuMask: jsr BuildPpuCommand ; CPU:$C117 PRG:0117 20 54 C1 ldy #$00 ; CPU:$C11A PRG:011A A0 00 WaitForFrameAndSetPpuMask_Block: - lda $0057,y ; CPU:$C11C PRG:011C B9 57 00 + lda a:PpuCommandData0,y ; CPU:$C11C PRG:011C B9 57 00 sta $0300,x ; CPU:$C11F PRG:011F 9D 00 03 inx ; CPU:$C122 PRG:0122 E8 iny ; CPU:$C123 PRG:0123 C8 @@ -561,7 +561,7 @@ PreserveXYAndFinalizePpuCommand: lda $0300,x ; CPU:$C188 PRG:0188 BD 00 03 inx ; CPU:$C18B PRG:018B E8 sta PpuDestinationHi ; CPU:$C18C PRG:018C 85 50 - sta $2006 ; CPU:$C18E PRG:018E 8D 06 20 + sta PPUADDR ; CPU:$C18E PRG:018E 8D 06 20 ;=============================================================================== ; FlushPpuCommandBuffer ; @@ -585,24 +585,24 @@ PreserveXYAndFinalizePpuCommand: FlushPpuCommandBuffer: lda $0300,x ; CPU:$C191 PRG:0191 BD 00 03 inx ; CPU:$C194 PRG:0194 E8 - sta $2006 ; CPU:$C195 PRG:0195 8D 06 20 + sta PPUADDR ; CPU:$C195 PRG:0195 8D 06 20 ldy $0300,x ; CPU:$C198 PRG:0198 BC 00 03 inx ; CPU:$C19B PRG:019B E8 FlushPpuCommandBuffer_Block: lda $0300,x ; CPU:$C19C PRG:019C BD 00 03 inx ; CPU:$C19F PRG:019F E8 - sta $2007 ; CPU:$C1A0 PRG:01A0 8D 07 20 + sta PPUDATA ; CPU:$C1A0 PRG:01A0 8D 07 20 dey ; CPU:$C1A3 PRG:01A3 88 bne FlushPpuCommandBuffer_Block ; CPU:$C1A4 PRG:01A4 D0 F6 lda PpuDestinationHi ; CPU:$C1A6 PRG:01A6 A5 50 cmp #$3F ; CPU:$C1A8 PRG:01A8 C9 3F bne FlushPpuCommandBuffer_Block_1 ; CPU:$C1AA PRG:01AA D0 10 lda #$3F ; CPU:$C1AC PRG:01AC A9 3F - sta $2006 ; CPU:$C1AE PRG:01AE 8D 06 20 + sta PPUADDR ; CPU:$C1AE PRG:01AE 8D 06 20 lda #$00 ; CPU:$C1B1 PRG:01B1 A9 00 - sta $2006 ; CPU:$C1B3 PRG:01B3 8D 06 20 - sta $2006 ; CPU:$C1B6 PRG:01B6 8D 06 20 - sta $2006 ; CPU:$C1B9 PRG:01B9 8D 06 20 + sta PPUADDR ; CPU:$C1B3 PRG:01B3 8D 06 20 + sta PPUADDR ; CPU:$C1B6 PRG:01B6 8D 06 20 + sta PPUADDR ; CPU:$C1B9 PRG:01B9 8D 06 20 FlushPpuCommandBuffer_Block_1: stx PpuBufferReadOffset ; CPU:$C1BC PRG:01BC 86 52 cpx PpuBufferWriteOffset ; CPU:$C1BE PRG:01BE E4 53 @@ -610,35 +610,35 @@ FlushPpuCommandBuffer_Block_1: rts ; CPU:$C1C2 PRG:01C2 60 FlushPpuCommandBuffer_Block_2: lda #$20 ; CPU:$C1C3 PRG:01C3 A9 20 - sta $F2 ; CPU:$C1C5 PRG:01C5 85 F2 + sta SoundRequestFlags2 ; CPU:$C1C5 PRG:01C5 85 F2 jsr $C527 ; CPU:$C1C7 PRG:01C7 20 27 C5 jsr $C539 ; CPU:$C1CA PRG:01CA 20 39 C5 lda #$FF ; CPU:$C1CD PRG:01CD A9 FF - sta $CD ; CPU:$C1CF PRG:01CF 85 CD + sta BoundsCandidateIndex ; CPU:$C1CF PRG:01CF 85 CD lda #$AD ; CPU:$C1D1 PRG:01D1 A9 AD sta SpawnCommandPointerLo ; CPU:$C1D3 PRG:01D3 85 23 lda #$C4 ; CPU:$C1D5 PRG:01D5 A9 C4 sta SpawnCommandPointerHi ; CPU:$C1D7 PRG:01D7 85 24 lda #$80 ; CPU:$C1D9 PRG:01D9 A9 80 - sta $91 ; CPU:$C1DB PRG:01DB 85 91 + sta PlayerPosX ; CPU:$C1DB PRG:01DB 85 91 sta $0488 ; CPU:$C1DD PRG:01DD 8D 88 04 lda #$70 ; CPU:$C1E0 PRG:01E0 A9 70 - sta $9A ; CPU:$C1E2 PRG:01E2 85 9A + sta PlayerPosY ; CPU:$C1E2 PRG:01E2 85 9A jsr InitializeParticleSlots ; CPU:$C1E4 PRG:01E4 20 4A CD lda #$00 ; CPU:$C1E7 PRG:01E7 A9 00 - sta $41 ; CPU:$C1E9 PRG:01E9 85 41 + sta PlayerActiveFlags ; CPU:$C1E9 PRG:01E9 85 41 sta $C9 ; CPU:$C1EB PRG:01EB 85 C9 sta $CA ; CPU:$C1ED PRG:01ED 85 CA - sta $BA ; CPU:$C1EF PRG:01EF 85 BA + sta SpawnSelector ; CPU:$C1EF PRG:01EF 85 BA sta $C5 ; CPU:$C1F1 PRG:01F1 85 C5 sta $C8 ; CPU:$C1F3 PRG:01F3 85 C8 jsr InitializeAudio ; CPU:$C1F5 PRG:01F5 20 A5 F4 ldx #$13 ; CPU:$C1F8 PRG:01F8 A2 13 FlushPpuCommandBuffer_Block_3: lda #$FF ; CPU:$C1FA PRG:01FA A9 FF - sta $0530,x ; CPU:$C1FC PRG:01FC 9D 30 05 + sta GameplayObjectState,x ; CPU:$C1FC PRG:01FC 9D 30 05 lda #$F0 ; CPU:$C1FF PRG:01FF A9 F0 - sta $04A4,x ; CPU:$C201 PRG:0201 9D A4 04 + sta GameplayObjectPosY,x ; CPU:$C201 PRG:0201 9D A4 04 dex ; CPU:$C204 PRG:0204 CA bpl FlushPpuCommandBuffer_Block_3 ; CPU:$C205 PRG:0205 10 F3 FlushPpuCommandBuffer_Block_4: @@ -694,49 +694,49 @@ RunGameplayFrame_Block: lda #$00 ; CPU:$C240 PRG:0240 A9 00 sta $0488 ; CPU:$C242 PRG:0242 8D 88 04 RunGameplayFrame_Block_1: - lda $BD ; CPU:$C245 PRG:0245 A5 BD + lda PlayerCollisionDisable ; CPU:$C245 PRG:0245 A5 BD beq RunGameplayFrame_Block_2 ; CPU:$C247 PRG:0247 F0 02 - inc $91 ; CPU:$C249 PRG:0249 E6 91 + inc PlayerPosX ; CPU:$C249 PRG:0249 E6 91 RunGameplayFrame_Block_2: ldx #$07 ; CPU:$C24B PRG:024B A2 07 RunGameplayFrame_Block_3: - lda $055D,x ; CPU:$C24D PRG:024D BD 5D 05 + lda EffectObjectState,x ; CPU:$C24D PRG:024D BD 5D 05 bmi RunGameplayFrame_Block_4 ; CPU:$C250 PRG:0250 30 19 - inc $0567,x ; CPU:$C252 PRG:0252 FE 67 05 - lda $0567,x ; CPU:$C255 PRG:0255 BD 67 05 + inc EffectObjectPosX,x ; CPU:$C252 PRG:0252 FE 67 05 + lda EffectObjectPosX,x ; CPU:$C255 PRG:0255 BD 67 05 cmp #$F8 ; CPU:$C258 PRG:0258 C9 F8 bne RunGameplayFrame_Block_4 ; CPU:$C25A PRG:025A D0 0F lda #$FF ; CPU:$C25C PRG:025C A9 FF - sta $055D,x ; CPU:$C25E PRG:025E 9D 5D 05 + sta EffectObjectState,x ; CPU:$C25E PRG:025E 9D 5D 05 lda #$F0 ; CPU:$C261 PRG:0261 A9 F0 - sta $057B,x ; CPU:$C263 PRG:0263 9D 7B 05 + sta EffectObjectPosY,x ; CPU:$C263 PRG:0263 9D 7B 05 lda #$00 ; CPU:$C266 PRG:0266 A9 00 - sta $05CE ; CPU:$C268 PRG:0268 8D CE 05 + sta PlayerParticleHitCount2 ; CPU:$C268 PRG:0268 8D CE 05 RunGameplayFrame_Block_4: dex ; CPU:$C26B PRG:026B CA bpl RunGameplayFrame_Block_3 ; CPU:$C26C PRG:026C 10 DF ldx #$13 ; CPU:$C26E PRG:026E A2 13 RunGameplayFrame_Block_5: - lda $0530,x ; CPU:$C270 PRG:0270 BD 30 05 + lda GameplayObjectState,x ; CPU:$C270 PRG:0270 BD 30 05 bmi RunGameplayFrame_Block_6 ; CPU:$C273 PRG:0273 30 12 - inc $0490,x ; CPU:$C275 PRG:0275 FE 90 04 - lda $0490,x ; CPU:$C278 PRG:0278 BD 90 04 + inc GameplayObjectPosX,x ; CPU:$C275 PRG:0275 FE 90 04 + lda GameplayObjectPosX,x ; CPU:$C278 PRG:0278 BD 90 04 cmp #$F8 ; CPU:$C27B PRG:027B C9 F8 bcc RunGameplayFrame_Block_6 ; CPU:$C27D PRG:027D 90 08 lda #$F0 ; CPU:$C27F PRG:027F A9 F0 - sta $04A4,x ; CPU:$C281 PRG:0281 9D A4 04 - sta $0530,x ; CPU:$C284 PRG:0284 9D 30 05 + sta GameplayObjectPosY,x ; CPU:$C281 PRG:0281 9D A4 04 + sta GameplayObjectState,x ; CPU:$C284 PRG:0284 9D 30 05 RunGameplayFrame_Block_6: dex ; CPU:$C287 PRG:0287 CA bpl RunGameplayFrame_Block_5 ; CPU:$C288 PRG:0288 10 E6 lda PpuScrollX ; CPU:$C28A PRG:028A A5 17 and #$07 ; CPU:$C28C PRG:028C 29 07 bne RunGameplayFrame_Block_8 ; CPU:$C28E PRG:028E D0 3E - ldx $88 ; CPU:$C290 PRG:0290 A6 88 + ldx PlayerSlotState ; CPU:$C290 PRG:0290 A6 88 dex ; CPU:$C292 PRG:0292 CA bmi RunGameplayFrame_Block_8 ; CPU:$C293 PRG:0293 30 39 lda #$00 ; CPU:$C295 PRG:0295 A9 00 - sta $3E ; CPU:$C297 PRG:0297 85 3E + sta CurrentObjectIndex ; CPU:$C297 PRG:0297 85 3E lda #$01 ; CPU:$C299 PRG:0299 A9 01 jsr InitializeOrQueueObject ; CPU:$C29B PRG:029B 20 DE D6 inc $C9 ; CPU:$C29E PRG:029E E6 C9 @@ -749,11 +749,11 @@ RunGameplayFrame_Block_6: bne RunGameplayFrame_Block_7 ; CPU:$C2AC PRG:02AC D0 0C lda #$02 ; CPU:$C2AE PRG:02AE A9 02 sta $CA ; CPU:$C2B0 PRG:02B0 85 CA - ldy $BA ; CPU:$C2B2 PRG:02B2 A4 BA + ldy SpawnSelector ; CPU:$C2B2 PRG:02B2 A4 BA iny ; CPU:$C2B4 PRG:02B4 C8 tya ; CPU:$C2B5 PRG:02B5 98 and #$03 ; CPU:$C2B6 PRG:02B6 29 03 - sta $BA ; CPU:$C2B8 PRG:02B8 85 BA + sta SpawnSelector ; CPU:$C2B8 PRG:02B8 85 BA RunGameplayFrame_Block_7: ldx $CA ; CPU:$C2BA PRG:02BA A6 CA lda SpawnPatternIndexTable,x ; CPU:$C2BC PRG:02BC BD BF C3 @@ -767,16 +767,16 @@ RunGameplayFrame_Block_7: RunGameplayFrame_Block_8: ldx #$07 ; CPU:$C2CE PRG:02CE A2 07 RunGameplayFrame_Block_9: - lda $055D,x ; CPU:$C2D0 PRG:02D0 BD 5D 05 + lda EffectObjectState,x ; CPU:$C2D0 PRG:02D0 BD 5D 05 bmi RunGameplayFrame_Block_10 ; CPU:$C2D3 PRG:02D3 30 18 jsr $CECE ; CPU:$C2D5 PRG:02D5 20 CE CE - lda $05CD ; CPU:$C2D8 PRG:02D8 AD CD 05 + lda PlayerParticleHitCount ; CPU:$C2D8 PRG:02D8 AD CD 05 beq RunGameplayFrame_Block_10 ; CPU:$C2DB PRG:02DB F0 10 - dec $05CD ; CPU:$C2DD PRG:02DD CE CD 05 - inc $05CE ; CPU:$C2E0 PRG:02E0 EE CE 05 + dec PlayerParticleHitCount ; CPU:$C2DD PRG:02DD CE CD 05 + inc PlayerParticleHitCount2 ; CPU:$C2E0 PRG:02E0 EE CE 05 txa ; CPU:$C2E3 PRG:02E3 8A pha ; CPU:$C2E4 PRG:02E4 48 - lda $0559 ; CPU:$C2E5 PRG:02E5 AD 59 05 + lda ParticleSequenceValue ; CPU:$C2E5 PRG:02E5 AD 59 05 jsr InitializeOrQueueObject ; CPU:$C2E8 PRG:02E8 20 DE D6 pla ; CPU:$C2EB PRG:02EB 68 tax ; CPU:$C2EC PRG:02EC AA @@ -786,12 +786,12 @@ RunGameplayFrame_Block_10: bpl RunGameplayFrame_Block_9 ; CPU:$C2F1 PRG:02F1 10 DD ldx #$13 ; CPU:$C2F3 PRG:02F3 A2 13 RunGameplayFrame_Block_11: - lda $0530,x ; CPU:$C2F5 PRG:02F5 BD 30 05 + lda GameplayObjectState,x ; CPU:$C2F5 PRG:02F5 BD 30 05 bmi RunGameplayFrame_Block_14 ; CPU:$C2F8 PRG:02F8 30 1B lda $C5 ; CPU:$C2FA PRG:02FA A5 C5 bne RunGameplayFrame_Block_13 ; CPU:$C2FC PRG:02FC D0 14 jsr $C9B6 ; CPU:$C2FE PRG:02FE 20 B6 C9 - lda $04A4,x ; CPU:$C301 PRG:0301 BD A4 04 + lda GameplayObjectPosY,x ; CPU:$C301 PRG:0301 BD A4 04 cmp #$02 ; CPU:$C304 PRG:0304 C9 02 bcs RunGameplayFrame_Block_12 ; CPU:$C306 PRG:0306 B0 03 jsr ReflectObjectYVelocity ; CPU:$C308 PRG:0308 20 4F CA @@ -821,23 +821,23 @@ RunGameplayFrame_Block_15: tay ; CPU:$C32D PRG:032D A8 pla ; CPU:$C32E PRG:032E 68 sta $02B1,y ; CPU:$C32F PRG:032F 99 B1 02 - lda $04A4,x ; CPU:$C332 PRG:0332 BD A4 04 + lda GameplayObjectPosY,x ; CPU:$C332 PRG:0332 BD A4 04 sta $02B0,y ; CPU:$C335 PRG:0335 99 B0 02 - lda $0490,x ; CPU:$C338 PRG:0338 BD 90 04 + lda GameplayObjectPosX,x ; CPU:$C338 PRG:0338 BD 90 04 sta $02B3,y ; CPU:$C33B PRG:033B 99 B3 02 lda #$00 ; CPU:$C33E PRG:033E A9 00 sta $02B2,y ; CPU:$C340 PRG:0340 99 B2 02 dex ; CPU:$C343 PRG:0343 CA bpl RunGameplayFrame_Block_11 ; CPU:$C344 PRG:0344 10 AF - lda $05CE ; CPU:$C346 PRG:0346 AD CE 05 + lda PlayerParticleHitCount2 ; CPU:$C346 PRG:0346 AD CE 05 cmp #$14 ; CPU:$C349 PRG:0349 C9 14 bcc RunGameplayFrame_Block_16 ; CPU:$C34B PRG:034B 90 20 - inc $47 ; CPU:$C34D PRG:034D E6 47 + inc SequenceValueLo ; CPU:$C34D PRG:034D E6 47 lda #$00 ; CPU:$C34F PRG:034F A9 00 jsr InitializeOrQueueObject ; CPU:$C351 PRG:0351 20 DE D6 - dec $47 ; CPU:$C354 PRG:0354 C6 47 + dec SequenceValueLo ; CPU:$C354 PRG:0354 C6 47 lda #$10 ; CPU:$C356 PRG:0356 A9 10 - sta $F2 ; CPU:$C358 PRG:0358 85 F2 + sta SoundRequestFlags2 ; CPU:$C358 PRG:0358 85 F2 inc $C8 ; CPU:$C35A PRG:035A E6 C8 jsr $D3ED ; CPU:$C35C PRG:035C 20 ED D3 jsr $C527 ; CPU:$C35F PRG:035F 20 27 C5 @@ -845,14 +845,14 @@ RunGameplayFrame_Block_15: ldx #$64 ; CPU:$C364 PRG:0364 A2 64 jsr $F45E ; CPU:$C366 PRG:0366 20 5E F4 lda #$20 ; CPU:$C369 PRG:0369 A9 20 - sta $F2 ; CPU:$C36B PRG:036B 85 F2 + sta SoundRequestFlags2 ; CPU:$C36B PRG:036B 85 F2 RunGameplayFrame_Block_16: ldx #$F0 ; CPU:$C36D PRG:036D A2 F0 lda $0488 ; CPU:$C36F PRG:036F AD 88 04 beq RunGameplayFrame_Block_17 ; CPU:$C372 PRG:0372 F0 02 ldx #$88 ; CPU:$C374 PRG:0374 A2 88 RunGameplayFrame_Block_17: - stx $0200 ; CPU:$C376 PRG:0376 8E 00 02 + stx OamBuffer ; CPU:$C376 PRG:0376 8E 00 02 stx $0204 ; CPU:$C379 PRG:0379 8E 04 02 sta $0203 ; CPU:$C37C PRG:037C 8D 03 02 clc ; CPU:$C37F PRG:037F 18 @@ -866,16 +866,16 @@ RunGameplayFrame_Block_17: stx $0201 ; CPU:$C391 PRG:0391 8E 01 02 inx ; CPU:$C394 PRG:0394 E8 stx $0205 ; CPU:$C395 PRG:0395 8E 05 02 - lda $88 ; CPU:$C398 PRG:0398 A5 88 + lda PlayerSlotState ; CPU:$C398 PRG:0398 A5 88 bmi RunGameplayFrame_Block_18 ; CPU:$C39A PRG:039A 30 03 jmp FlushPpuCommandBuffer_Block_4 ; CPU:$C39C PRG:039C 4C 09 C2 RunGameplayFrame_Block_18: jsr SortOrInitializeRecords ; CPU:$C39F PRG:039F 20 79 C5 lda #$01 ; CPU:$C3A2 PRG:03A2 A9 01 - sta $F0 ; CPU:$C3A4 PRG:03A4 85 F0 + sta SoundRequestFlags0 ; CPU:$C3A4 PRG:03A4 85 F0 jsr WaitForFrame ; CPU:$C3A6 PRG:03A6 20 65 F4 lda #$02 ; CPU:$C3A9 PRG:03A9 A9 02 - sta $F2 ; CPU:$C3AB PRG:03AB 85 F2 + sta SoundRequestFlags2 ; CPU:$C3AB PRG:03AB 85 F2 jmp $F36A ; CPU:$C3AD PRG:03AD 4C 6A F3 ;=============================================================================== ; DispatchSpawnPattern @@ -898,7 +898,7 @@ RunGameplayFrame_Block_18: ;=============================================================================== DispatchSpawnPattern: - jmp ($0025) ; CPU:$C3B0 PRG:03B0 6C 25 00 + jmp (DispatchPointerLo) ; CPU:$C3B0 PRG:03B0 6C 25 00 SpawnPatternHandlerTable: .word SpawnFromCommandStream ; CPU:$C3B3 PRG:03B3 C9 C3 .word SpawnAtRandomPosition ; CPU:$C3B5 PRG:03B5 F7 C3 @@ -1023,7 +1023,7 @@ SpawnRandomObject: sta SpawnPixelPosition ; CPU:$C41A PRG:041A 85 15 jsr GetRandomValue ; CPU:$C41C PRG:041C 20 B3 F1 and #$3F ; CPU:$C41F PRG:041F 29 3F - ldx $BA ; CPU:$C421 PRG:0421 A6 BA + ldx SpawnSelector ; CPU:$C421 PRG:0421 A6 BA adc SpawnSelectorAdjustmentTable,x ; CPU:$C423 PRG:0423 7D 3A C4 sta SpawnParameter ; CPU:$C426 PRG:0426 85 14 jsr $C486 ; CPU:$C428 PRG:0428 20 86 C4 @@ -1060,17 +1060,17 @@ SpawnPatternNone: jsr GetRandomValue ; CPU:$C43C PRG:043C 20 B3 F1 and #$CF ; CPU:$C43F PRG:043F 29 CF bne SpawnAtRandomPosition ; CPU:$C441 PRG:0441 D0 B2 - ldy $89 ; CPU:$C443 PRG:0443 A4 89 + ldy CarrierPhase ; CPU:$C443 PRG:0443 A4 89 iny ; CPU:$C445 PRG:0445 C8 bne SpawnAtRandomPosition ; CPU:$C446 PRG:0446 D0 AD lda #$E6 ; CPU:$C448 PRG:0448 A9 E6 - sta $9B ; CPU:$C44A PRG:044A 85 9B + sta Player0PosY ; CPU:$C44A PRG:044A 85 9B lda RandomState ; CPU:$C44C PRG:044C A5 1B and #$7F ; CPU:$C44E PRG:044E 29 7F adc #$40 ; CPU:$C450 PRG:0450 69 40 - sta $92 ; CPU:$C452 PRG:0452 85 92 + sta Player0PosX ; CPU:$C452 PRG:0452 85 92 lda #$80 ; CPU:$C454 PRG:0454 A9 80 - sta $89 ; CPU:$C456 PRG:0456 85 89 + sta CarrierPhase ; CPU:$C456 PRG:0456 85 89 lda #$00 ; CPU:$C458 PRG:0458 A9 00 sta $80 ; CPU:$C45A PRG:045A 85 80 ;=============================================================================== @@ -1119,7 +1119,7 @@ InitializeSpecialObject: jsr SpawnRandomObject ; CPU:$C45D PRG:045D 20 0C C4 jsr GetRandomValue ; CPU:$C460 PRG:0460 20 B3 F1 and #$7F ; CPU:$C463 PRG:0463 29 7F - sta $0508,x ; CPU:$C465 PRG:0465 9D 08 05 + sta GameplayObjectParameter,x ; CPU:$C465 PRG:0465 9D 08 05 rts ; CPU:$C468 PRG:0468 60 ;=============================================================================== @@ -1658,9 +1658,9 @@ BeginCarrierTargetSequence_Block: bne BeginCarrierTargetSequence_Block_2 ; CPU:$C6EA PRG:06EA D0 0A BeginCarrierTargetSequence_Block_1: lda PlayerPosX,x ; CPU:$C6EC PRG:06EC B5 91 - sta $99 ; CPU:$C6EE PRG:06EE 85 99 - lda $0448,x ; CPU:$C6F0 PRG:06F0 BD 48 04 - sta $0450 ; CPU:$C6F3 PRG:06F3 8D 50 04 + sta CarrierTargetX ; CPU:$C6EE PRG:06EE 85 99 + lda PlayerVariantTable,x ; CPU:$C6F0 PRG:06F0 BD 48 04 + sta CarrierSavedValue ; CPU:$C6F3 PRG:06F3 8D 50 04 BeginCarrierTargetSequence_Block_2: rts ; CPU:$C6F6 PRG:06F6 60 ;=============================================================================== @@ -1856,9 +1856,9 @@ UpdateRoundSpawner_Block_3: sta GameplayObjectVelocityIntY,x ; CPU:$C7B7 PRG:07B7 9D CC 04 lda #$00 ; CPU:$C7BA PRG:07BA A9 00 sta GameplayObjectState,x ; CPU:$C7BC PRG:07BC 9D 30 05 - lda $00B2,y ; CPU:$C7BF PRG:07BF B9 B2 00 + lda a:RoundSpawnBaseX,y ; CPU:$C7BF PRG:07BF B9 B2 00 sta GameplayObjectPosX,x ; CPU:$C7C2 PRG:07C2 9D 90 04 - lda $00B5,y ; CPU:$C7C5 PRG:07C5 B9 B5 00 + lda a:RoundSpawnBaseY,y ; CPU:$C7C5 PRG:07C5 B9 B5 00 sta GameplayObjectPosY,x ; CPU:$C7C8 PRG:07C8 9D A4 04 ldy SpawnSelector ; CPU:$C7CB PRG:07CB A4 BA jsr GetRandomValue ; CPU:$C7CD PRG:07CD 20 B3 F1 @@ -2070,11 +2070,11 @@ UpdateRoundObjectSpritesAndPhysics_Block: sta $02EB ; CPU:$C8D4 PRG:08D4 8D EB 02 lda RoundSpawnBaseY,x ; CPU:$C8D7 PRG:08D7 B5 B5 adc RoundObjectYOffsetTable,y ; CPU:$C8D9 PRG:08D9 79 F5 C9 - sta $02E0 ; CPU:$C8DC PRG:08DC 8D E0 02 + sta OamEntryE0Y ; CPU:$C8DC PRG:08DC 8D E0 02 adc RoundObjectVerticalSpacingTable,y ; CPU:$C8DF PRG:08DF 79 05 CA - sta $02E4 ; CPU:$C8E2 PRG:08E2 8D E4 02 + sta OamEntryE4Y ; CPU:$C8E2 PRG:08E2 8D E4 02 adc RoundObjectVerticalSpacingTable,y ; CPU:$C8E5 PRG:08E5 79 05 CA - sta $02E8 ; CPU:$C8E8 PRG:08E8 8D E8 02 + sta OamEntryE8Y ; CPU:$C8E8 PRG:08E8 8D E8 02 tya ; CPU:$C8EB PRG:08EB 98 and #$03 ; CPU:$C8EC PRG:08EC 29 03 tax ; CPU:$C8EE PRG:08EE AA @@ -2447,29 +2447,29 @@ TestGameplayObjectAgainstBounds_Block_13: ResolveGameplayObjectInteraction: ldy #$01 ; CPU:$CB1A PRG:0B1A A0 01 ResolveGameplayObjectInteraction_Block: - lda $0088,y ; CPU:$CB1C PRG:0B1C B9 88 00 + lda a:PlayerSlotState,y ; CPU:$CB1C PRG:0B1C B9 88 00 bmi ResolveGameplayObjectInteraction_Block_1 ; CPU:$CB1F PRG:0B1F 30 4D beq ResolveGameplayObjectInteraction_Block_1 ; CPU:$CB21 PRG:0B21 F0 4B - lda $00BD,y ; CPU:$CB23 PRG:0B23 B9 BD 00 + lda a:PlayerCollisionDisable,y ; CPU:$CB23 PRG:0B23 B9 BD 00 bne ResolveGameplayObjectInteraction_Block_1 ; CPU:$CB26 PRG:0B26 D0 46 lda GameplayObjectPosX,x ; CPU:$CB28 PRG:0B28 BD 90 04 sec ; CPU:$CB2B PRG:0B2B 38 - sbc $0091,y ; CPU:$CB2C PRG:0B2C F9 91 00 + sbc a:PlayerPosX,y ; CPU:$CB2C PRG:0B2C F9 91 00 jsr AbsoluteDifference ; CPU:$CB2F PRG:0B2F 20 8E F0 cmp #$08 ; CPU:$CB32 PRG:0B32 C9 08 bcs ResolveGameplayObjectInteraction_Block_1 ; CPU:$CB34 PRG:0B34 B0 38 lda GameplayObjectPosY,x ; CPU:$CB36 PRG:0B36 BD A4 04 sec ; CPU:$CB39 PRG:0B39 38 - sbc $009A,y ; CPU:$CB3A PRG:0B3A F9 9A 00 + sbc a:PlayerPosY,y ; CPU:$CB3A PRG:0B3A F9 9A 00 sec ; CPU:$CB3D PRG:0B3D 38 sbc #$08 ; CPU:$CB3E PRG:0B3E E9 08 jsr AbsoluteDifference ; CPU:$CB40 PRG:0B40 20 8E F0 cmp #$0C ; CPU:$CB43 PRG:0B43 C9 0C bcs ResolveGameplayObjectInteraction_Block_1 ; CPU:$CB45 PRG:0B45 B0 27 lda #$00 ; CPU:$CB47 PRG:0B47 A9 00 - sta $0088,y ; CPU:$CB49 PRG:0B49 99 88 00 + sta a:PlayerSlotState,y ; CPU:$CB49 PRG:0B49 99 88 00 lda #$01 ; CPU:$CB4C PRG:0B4C A9 01 - sta $007F,y ; CPU:$CB4E PRG:0B4E 99 7F 00 + sta a:PlayerLifecycleState,y ; CPU:$CB4E PRG:0B4E 99 7F 00 sta $00C1,y ; CPU:$CB51 PRG:0B51 99 C1 00 lda #$0B ; CPU:$CB54 PRG:0B54 A9 0B sta PlayerAnimationState,y ; CPU:$CB56 PRG:0B56 99 51 04 @@ -2577,7 +2577,7 @@ FindActiveBonusObject: ;=============================================================================== TestBonusObjectPlayerOverlap: - lda $0088,y ; CPU:$CBB0 PRG:0BB0 B9 88 00 + lda a:PlayerSlotState,y ; CPU:$CBB0 PRG:0BB0 B9 88 00 bmi TestBonusObjectPlayerOverlap_Block_4 ; CPU:$CBB3 PRG:0BB3 30 78 beq TestBonusObjectPlayerOverlap_Block_4 ; CPU:$CBB5 PRG:0BB5 F0 76 cpy #$02 ; CPU:$CBB7 PRG:0BB7 C0 02 @@ -2585,7 +2585,7 @@ TestBonusObjectPlayerOverlap: cmp #$01 ; CPU:$CBBB PRG:0BBB C9 01 beq TestBonusObjectPlayerOverlap_Block_4 ; CPU:$CBBD PRG:0BBD F0 6E TestBonusObjectPlayerOverlap_Block: - lda $0091,y ; CPU:$CBBF PRG:0BBF B9 91 00 + lda a:PlayerPosX,y ; CPU:$CBBF PRG:0BBF B9 91 00 clc ; CPU:$CBC2 PRG:0BC2 18 adc #$08 ; CPU:$CBC3 PRG:0BC3 69 08 sec ; CPU:$CBC5 PRG:0BC5 38 @@ -2594,7 +2594,7 @@ TestBonusObjectPlayerOverlap_Block: jsr AbsoluteDifference ; CPU:$CBCB PRG:0BCB 20 8E F0 cmp #$12 ; CPU:$CBCE PRG:0BCE C9 12 bcs TestBonusObjectPlayerOverlap_Block_4 ; CPU:$CBD0 PRG:0BD0 B0 5B - lda $009A,y ; CPU:$CBD2 PRG:0BD2 B9 9A 00 + lda a:PlayerPosY,y ; CPU:$CBD2 PRG:0BD2 B9 9A 00 clc ; CPU:$CBD5 PRG:0BD5 18 adc #$0C ; CPU:$CBD6 PRG:0BD6 69 0C sec ; CPU:$CBD8 PRG:0BD8 38 @@ -2684,7 +2684,7 @@ RequestCollisionSound: ;=============================================================================== TestBonusObjectCollection: - lda $0088,y ; CPU:$CC38 PRG:0C38 B9 88 00 + lda a:PlayerSlotState,y ; CPU:$CC38 PRG:0C38 B9 88 00 bmi TestBonusObjectCollection_Block_2 ; CPU:$CC3B PRG:0C3B 30 79 beq TestBonusObjectCollection_Block_2 ; CPU:$CC3D PRG:0C3D F0 77 cpy #$02 ; CPU:$CC3F PRG:0C3F C0 02 @@ -2695,29 +2695,29 @@ TestBonusObjectCollection: lda BonusObjectPosX,x ; CPU:$CC4A PRG:0C4A BD D2 05 sec ; CPU:$CC4D PRG:0C4D 38 sbc #$0A ; CPU:$CC4E PRG:0C4E E9 0A - cmp $0091,y ; CPU:$CC50 PRG:0C50 D9 91 00 + cmp a:PlayerPosX,y ; CPU:$CC50 PRG:0C50 D9 91 00 bcs TestBonusObjectCollection_Block ; CPU:$CC53 PRG:0C53 B0 1C adc #$04 ; CPU:$CC55 PRG:0C55 69 04 - cmp $0091,y ; CPU:$CC57 PRG:0C57 D9 91 00 + cmp a:PlayerPosX,y ; CPU:$CC57 PRG:0C57 D9 91 00 bcc TestBonusObjectCollection_Block ; CPU:$CC5A PRG:0C5A 90 15 lda BonusObjectPosY,x ; CPU:$CC5C PRG:0C5C BD DC 05 sec ; CPU:$CC5F PRG:0C5F 38 sbc #$1C ; CPU:$CC60 PRG:0C60 E9 1C - cmp $009A,y ; CPU:$CC62 PRG:0C62 D9 9A 00 + cmp a:PlayerPosY,y ; CPU:$CC62 PRG:0C62 D9 9A 00 bcs TestBonusObjectCollection_Block ; CPU:$CC65 PRG:0C65 B0 0A adc #$04 ; CPU:$CC67 PRG:0C67 69 04 - cmp $009A,y ; CPU:$CC69 PRG:0C69 D9 9A 00 + cmp a:PlayerPosY,y ; CPU:$CC69 PRG:0C69 D9 9A 00 bcc TestBonusObjectCollection_Block ; CPU:$CC6C PRG:0C6C 90 03 jsr TriggerBonusObjectEffect ; CPU:$CC6E PRG:0C6E 20 BF CC TestBonusObjectCollection_Block: - lda $0091,y ; CPU:$CC71 PRG:0C71 B9 91 00 + lda a:PlayerPosX,y ; CPU:$CC71 PRG:0C71 B9 91 00 clc ; CPU:$CC74 PRG:0C74 18 adc #$08 ; CPU:$CC75 PRG:0C75 69 08 sec ; CPU:$CC77 PRG:0C77 38 sbc BonusObjectPosX,x ; CPU:$CC78 PRG:0C78 FD D2 05 jsr AbsoluteDifference ; CPU:$CC7B PRG:0C7B 20 8E F0 sta CollisionDeltaX ; CPU:$CC7E PRG:0C7E 85 12 - lda $009A,y ; CPU:$CC80 PRG:0C80 B9 9A 00 + lda a:PlayerPosY,y ; CPU:$CC80 PRG:0C80 B9 9A 00 clc ; CPU:$CC83 PRG:0C83 18 adc #$0C ; CPU:$CC84 PRG:0C84 69 0C sec ; CPU:$CC86 PRG:0C86 38 @@ -3179,12 +3179,12 @@ ParticleAnimationAttributeMaskTable: TestParticlePlayerOverlap: ldy #$01 ; CPU:$CECC PRG:0ECC A0 01 TestParticlePlayerOverlap_Block: - lda $0088,y ; CPU:$CECE PRG:0ECE B9 88 00 + lda a:PlayerSlotState,y ; CPU:$CECE PRG:0ECE B9 88 00 bmi TestParticlePlayerOverlap_Block_1 ; CPU:$CED1 PRG:0ED1 30 3A beq TestParticlePlayerOverlap_Block_1 ; CPU:$CED3 PRG:0ED3 F0 38 lda ParticleState,x ; CPU:$CED5 PRG:0ED5 BD 5D 05 bmi TestParticlePlayerOverlap_Block_2 ; CPU:$CED8 PRG:0ED8 30 36 - lda $009A,y ; CPU:$CEDA PRG:0EDA B9 9A 00 + lda a:PlayerPosY,y ; CPU:$CEDA PRG:0EDA B9 9A 00 cmp #$C0 ; CPU:$CEDD PRG:0EDD C9 C0 bcs TestParticlePlayerOverlap_Block_1 ; CPU:$CEDF PRG:0EDF B0 2C sec ; CPU:$CEE1 PRG:0EE1 38 @@ -3192,7 +3192,7 @@ TestParticlePlayerOverlap_Block: jsr AbsoluteDifference ; CPU:$CEE5 PRG:0EE5 20 8E F0 cmp #$18 ; CPU:$CEE8 PRG:0EE8 C9 18 bcs TestParticlePlayerOverlap_Block_1 ; CPU:$CEEA PRG:0EEA B0 21 - lda $0091,y ; CPU:$CEEC PRG:0EEC B9 91 00 + lda a:PlayerPosX,y ; CPU:$CEEC PRG:0EEC B9 91 00 sec ; CPU:$CEEF PRG:0EEF 38 sbc ParticlePosX,x ; CPU:$CEF0 PRG:0EF0 FD 67 05 jsr AbsoluteDifference ; CPU:$CEF3 PRG:0EF3 20 8E F0 @@ -3248,18 +3248,18 @@ RunParticleBonusSequence_Block_1: stx PlayerCollisionDisable ; CPU:$CF29 PRG:0F29 86 BD stx SequenceState ; CPU:$CF2B PRG:0F2B 86 BE lda #$14 ; CPU:$CF2D PRG:0F2D A9 14 - sta $05CB ; CPU:$CF2F PRG:0F2F 8D CB 05 + sta ParticleSpawnRemaining ; CPU:$CF2F PRG:0F2F 8D CB 05 RunParticleBonusSequence_Block_2: jsr $F470 ; CPU:$CF32 PRG:0F32 20 70 F4 inc $4C ; CPU:$CF35 PRG:0F35 E6 4C jsr $D8DD ; CPU:$CF37 PRG:0F37 20 DD D8 - jsr $E691 ; CPU:$CF3A PRG:0F3A 20 91 E6 - lda $05CB ; CPU:$CF3D PRG:0F3D AD CB 05 + jsr UpdateGameplayObjects ; CPU:$CF3A PRG:0F3A 20 91 E6 + lda ParticleSpawnRemaining ; CPU:$CF3D PRG:0F3D AD CB 05 beq RunParticleBonusSequence_Block_3 ; CPU:$CF40 PRG:0F40 F0 03 jsr SpawnTimedParticle ; CPU:$CF42 PRG:0F42 20 5A CD RunParticleBonusSequence_Block_3: jsr UpdateParticleSystem ; CPU:$CF45 PRG:0F45 20 AA CD - lda $05CB ; CPU:$CF48 PRG:0F48 AD CB 05 + lda ParticleSpawnRemaining ; CPU:$CF48 PRG:0F48 AD CB 05 bne RunParticleBonusSequence_Block_2 ; CPU:$CF4B PRG:0F4B D0 E5 ldx #$09 ; CPU:$CF4D PRG:0F4D A2 09 RunParticleBonusSequence_Block_4: @@ -3289,11 +3289,11 @@ RunParticleBonusSequence_Block_5: lda $D19E,x ; CPU:$CF80 PRG:0F80 BD 9E D1 sta PlayerPosY,x ; CPU:$CF83 PRG:0F83 95 9A lda #$03 ; CPU:$CF85 PRG:0F85 A9 03 - sta $7F,x ; CPU:$CF87 PRG:0F87 95 7F + sta PlayerLifecycleState,x ; CPU:$CF87 PRG:0F87 95 7F lda #$01 ; CPU:$CF89 PRG:0F89 A9 01 - sta $0448,x ; CPU:$CF8B PRG:0F8B 9D 48 04 + sta PlayerVariantTable,x ; CPU:$CF8B PRG:0F8B 9D 48 04 jsr $F3B0 ; CPU:$CF8E PRG:0F8E 20 B0 F3 - jsr $E3A4 ; CPU:$CF91 PRG:0F91 20 A4 E3 + jsr BuildObjectMetasprite ; CPU:$CF91 PRG:0F91 20 A4 E3 dex ; CPU:$CF94 PRG:0F94 CA bpl RunParticleBonusSequence_Block_5 ; CPU:$CF95 PRG:0F95 10 E5 lda #$44 ; CPU:$CF97 PRG:0F97 A9 44 @@ -3378,7 +3378,7 @@ RunParticleBonusSequence_Block_10: lda #$70 ; CPU:$D041 PRG:1041 A9 70 ldy #$D1 ; CPU:$D043 PRG:1043 A0 D1 jsr $C131 ; CPU:$D045 PRG:1045 20 31 C1 - jsr $F465 ; CPU:$D048 PRG:1048 20 65 F4 + jsr WaitForFrame ; CPU:$D048 PRG:1048 20 65 F4 ldx #$1A ; CPU:$D04B PRG:104B A2 1A RunParticleBonusSequence_Block_11: lda $D184,x ; CPU:$D04D PRG:104D BD 84 D1 @@ -3478,7 +3478,7 @@ LoadParticleSequenceData: lda ParticleSequenceIndexTable,x ; CPU:$D0E3 PRG:10E3 BD 0D D1 sta ParticleSequenceValue ; CPU:$D0E6 PRG:10E6 8D 59 05 lda ParticleSequenceValueTableA,x ; CPU:$D0E9 PRG:10E9 BD 12 D1 - sta $055A ; CPU:$D0EC PRG:10EC 8D 5A 05 + sta ParticleScrollDelta ; CPU:$D0EC PRG:10EC 8D 5A 05 lda ParticleSequenceValueTableB,x ; CPU:$D0EF PRG:10EF BD 17 D1 sta SequenceDataLo ; CPU:$D0F2 PRG:10F2 8D 5B 05 lda ParticleSequenceValueTableC,x ; CPU:$D0F5 PRG:10F5 BD 1C D1 @@ -3504,9 +3504,9 @@ ParticleSequenceValueTableC: ; Sum player particle-hit totals SumParticleHitCounts: - lda $05CD ; CPU:$D11F PRG:111F AD CD 05 + lda PlayerParticleHitCount ; CPU:$D11F PRG:111F AD CD 05 clc ; CPU:$D122 PRG:1122 18 - adc $05CE ; CPU:$D123 PRG:1123 6D CE 05 + adc PlayerParticleHitCount2 ; CPU:$D123 PRG:1123 6D CE 05 cmp #$14 ; CPU:$D126 PRG:1126 C9 14 rts ; CPU:$D128 PRG:1128 60 @@ -3537,17 +3537,17 @@ DrawParticleBonusResults: ldx #$1C ; CPU:$D19E PRG:119E A2 1C DrawParticleBonusResults_Block: lda ParticleResultsPpuTemplate,x ; CPU:$D1A0 PRG:11A0 BD 3E D1 - sta $57,x ; CPU:$D1A3 PRG:11A3 95 57 + sta PpuCommandData0,x ; CPU:$D1A3 PRG:11A3 95 57 dex ; CPU:$D1A5 PRG:11A5 CA bpl DrawParticleBonusResults_Block ; CPU:$D1A6 PRG:11A6 10 F8 ldx #$04 ; CPU:$D1A8 PRG:11A8 A2 04 - ldy $05CD ; CPU:$D1AA PRG:11AA AC CD 05 + ldy PlayerParticleHitCount ; CPU:$D1AA PRG:11AA AC CD 05 jsr AddParticleResultDigits ; CPU:$D1AD PRG:11AD 20 DC D1 ldx #$12 ; CPU:$D1B0 PRG:11B0 A2 12 - ldy $05CE ; CPU:$D1B2 PRG:11B2 AC CE 05 + ldy PlayerParticleHitCount2 ; CPU:$D1B2 PRG:11B2 AC CE 05 jsr AddParticleResultDigits ; CPU:$D1B5 PRG:11B5 20 DC D1 jsr $C12D ; CPU:$D1B8 PRG:11B8 20 2D C1 - lda $40 ; CPU:$D1BB PRG:11BB A5 40 + lda PlayerCountMinusOne ; CPU:$D1BB PRG:11BB A5 40 bne DrawParticleBonusResults_Block_1 ; CPU:$D1BD PRG:11BD D0 01 rts ; CPU:$D1BF PRG:11BF 60 DrawParticleBonusResults_Block_1: @@ -3563,39 +3563,39 @@ ConvertValueToDecimalDigits_Block: sbc #$0A ; CPU:$D1CE PRG:11CE E9 0A jmp ConvertValueToDecimalDigits_Block ; CPU:$D1D0 PRG:11D0 4C CB D1 ConvertValueToDecimalDigits_Block_1: - sty $5A ; CPU:$D1D3 PRG:11D3 84 5A - sta $5B ; CPU:$D1D5 PRG:11D5 85 5B + sty HudCommandTile0 ; CPU:$D1D3 PRG:11D3 84 5A + sta HudCommandTile1 ; CPU:$D1D5 PRG:11D5 85 5B jmp $C119 ; CPU:$D1D7 PRG:11D7 4C 19 C1 AddParticleResultDigits: dey ; CPU:$D1DA PRG:11DA 88 bmi AddParticleResultDigits_Block_2 ; CPU:$D1DB PRG:11DB 30 1F - lda $0559 ; CPU:$D1DD PRG:11DD AD 59 05 + lda ParticleSequenceValue ; CPU:$D1DD PRG:11DD AD 59 05 clc ; CPU:$D1E0 PRG:11E0 18 - adc $59,x ; CPU:$D1E1 PRG:11E1 75 59 + adc PpuCommandData2,x ; CPU:$D1E1 PRG:11E1 75 59 cmp #$0A ; CPU:$D1E3 PRG:11E3 C9 0A bcc AddParticleResultDigits_Block ; CPU:$D1E5 PRG:11E5 90 04 sbc #$0A ; CPU:$D1E7 PRG:11E7 E9 0A - inc $58,x ; CPU:$D1E9 PRG:11E9 F6 58 + inc PpuCommandData1,x ; CPU:$D1E9 PRG:11E9 F6 58 AddParticleResultDigits_Block: - sta $59,x ; CPU:$D1EB PRG:11EB 95 59 - lda $58,x ; CPU:$D1ED PRG:11ED B5 58 + sta PpuCommandData2,x ; CPU:$D1EB PRG:11EB 95 59 + lda PpuCommandData1,x ; CPU:$D1ED PRG:11ED B5 58 cmp #$0A ; CPU:$D1EF PRG:11EF C9 0A bcc AddParticleResultDigits_Block_1 ; CPU:$D1F1 PRG:11F1 90 06 sbc #$0A ; CPU:$D1F3 PRG:11F3 E9 0A - inc $57,x ; CPU:$D1F5 PRG:11F5 F6 57 - sta $58,x ; CPU:$D1F7 PRG:11F7 95 58 + inc PpuCommandData0,x ; CPU:$D1F5 PRG:11F5 F6 57 + sta PpuCommandData1,x ; CPU:$D1F7 PRG:11F7 95 58 AddParticleResultDigits_Block_1: jmp AddParticleResultDigits ; CPU:$D1F9 PRG:11F9 4C DC D1 AddParticleResultDigits_Block_2: ldy #$00 ; CPU:$D1FC PRG:11FC A0 00 AddParticleResultDigits_Block_3: - lda $57,x ; CPU:$D1FE PRG:11FE B5 57 + lda PpuCommandData0,x ; CPU:$D1FE PRG:11FE B5 57 beq AddParticleResultDigits_Block_4 ; CPU:$D200 PRG:1200 F0 04 cmp #$24 ; CPU:$D202 PRG:1202 C9 24 bne AddParticleResultDigits_Block_5 ; CPU:$D204 PRG:1204 D0 0A AddParticleResultDigits_Block_4: lda #$24 ; CPU:$D206 PRG:1206 A9 24 - sta $57,x ; CPU:$D208 PRG:1208 95 57 + sta PpuCommandData0,x ; CPU:$D208 PRG:1208 95 57 inx ; CPU:$D20A PRG:120A E8 iny ; CPU:$D20B PRG:120B C8 cpy #$04 ; CPU:$D20C PRG:120C C0 04 @@ -3603,32 +3603,32 @@ AddParticleResultDigits_Block_4: AddParticleResultDigits_Block_5: rts ; CPU:$D210 PRG:1210 60 DecrementDecimalDigits: - lda $59,x ; CPU:$D211 PRG:1211 B5 59 + lda PpuCommandData2,x ; CPU:$D211 PRG:1211 B5 59 cmp #$24 ; CPU:$D213 PRG:1213 C9 24 beq DecrementDecimalDigits_Block_2 ; CPU:$D215 PRG:1215 F0 2A tay ; CPU:$D217 PRG:1217 A8 bne DecrementDecimalDigits_Block_1 ; CPU:$D218 PRG:1218 D0 1C - lda $58,x ; CPU:$D21A PRG:121A B5 58 + lda PpuCommandData1,x ; CPU:$D21A PRG:121A B5 58 cmp #$24 ; CPU:$D21C PRG:121C C9 24 beq DecrementDecimalDigits_Block_2 ; CPU:$D21E PRG:121E F0 21 - lda $58,x ; CPU:$D220 PRG:1220 B5 58 + lda PpuCommandData1,x ; CPU:$D220 PRG:1220 B5 58 bne DecrementDecimalDigits_Block ; CPU:$D222 PRG:1222 D0 0C - lda $57,x ; CPU:$D224 PRG:1224 B5 57 + lda PpuCommandData0,x ; CPU:$D224 PRG:1224 B5 57 cmp #$24 ; CPU:$D226 PRG:1226 C9 24 beq DecrementDecimalDigits_Block_2 ; CPU:$D228 PRG:1228 F0 17 lda #$0A ; CPU:$D22A PRG:122A A9 0A - sta $58,x ; CPU:$D22C PRG:122C 95 58 - dec $57,x ; CPU:$D22E PRG:122E D6 57 + sta PpuCommandData1,x ; CPU:$D22C PRG:122C 95 58 + dec PpuCommandData0,x ; CPU:$D22E PRG:122E D6 57 DecrementDecimalDigits_Block: lda #$0A ; CPU:$D230 PRG:1230 A9 0A - sta $59,x ; CPU:$D232 PRG:1232 95 59 - dec $58,x ; CPU:$D234 PRG:1234 D6 58 + sta PpuCommandData2,x ; CPU:$D232 PRG:1232 95 59 + dec PpuCommandData1,x ; CPU:$D234 PRG:1234 D6 58 DecrementDecimalDigits_Block_1: - dec $59,x ; CPU:$D236 PRG:1236 D6 59 + dec PpuCommandData2,x ; CPU:$D236 PRG:1236 D6 59 txa ; CPU:$D238 PRG:1238 8A pha ; CPU:$D239 PRG:1239 48 lda #$0A ; CPU:$D23A PRG:123A A9 0A - jsr $D6DE ; CPU:$D23C PRG:123C 20 DE D6 + jsr InitializeOrQueueObject ; CPU:$D23C PRG:123C 20 DE D6 pla ; CPU:$D23F PRG:123F 68 tax ; CPU:$D240 PRG:1240 AA DecrementDecimalDigits_Block_2: @@ -3637,9 +3637,9 @@ ClearPpuAndOamBuffers: jsr $C10A ; CPU:$D244 PRG:1244 20 0A C1 jsr $C0FA ; CPU:$D247 PRG:1247 20 FA C0 lda #$20 ; CPU:$D24A PRG:124A A9 20 - sta $2006 ; CPU:$D24C PRG:124C 8D 06 20 + sta PPUADDR ; CPU:$D24C PRG:124C 8D 06 20 lda #$00 ; CPU:$D24F PRG:124F A9 00 - sta $2006 ; CPU:$D251 PRG:1251 8D 06 20 + sta PPUADDR ; CPU:$D251 PRG:1251 8D 06 20 jsr ClearNametable ; CPU:$D254 PRG:1254 20 75 D2 jsr ClearNametable ; CPU:$D257 PRG:1257 20 75 D2 jsr $C104 ; CPU:$D25A PRG:125A 20 04 C1 @@ -3649,7 +3649,7 @@ ClearPpuAndOamBuffers: sty $4C ; CPU:$D264 PRG:1264 84 4C ClearPpuAndOamBuffers_Block: lda #$F0 ; CPU:$D266 PRG:1266 A9 F0 - sta $0200,y ; CPU:$D268 PRG:1268 99 00 02 + sta OamBuffer,y ; CPU:$D268 PRG:1268 99 00 02 iny ; CPU:$D26B PRG:126B C8 iny ; CPU:$D26C PRG:126C C8 iny ; CPU:$D26D PRG:126D C8 @@ -3661,145 +3661,145 @@ ClearNametable: ldx #$F0 ; CPU:$D273 PRG:1273 A2 F0 lda #$24 ; CPU:$D275 PRG:1275 A9 24 ClearNametable_Block: - sta $2007 ; CPU:$D277 PRG:1277 8D 07 20 - sta $2007 ; CPU:$D27A PRG:127A 8D 07 20 - sta $2007 ; CPU:$D27D PRG:127D 8D 07 20 - sta $2007 ; CPU:$D280 PRG:1280 8D 07 20 + sta PPUDATA ; CPU:$D277 PRG:1277 8D 07 20 + sta PPUDATA ; CPU:$D27A PRG:127A 8D 07 20 + sta PPUDATA ; CPU:$D27D PRG:127D 8D 07 20 + sta PPUDATA ; CPU:$D280 PRG:1280 8D 07 20 dex ; CPU:$D283 PRG:1283 CA bne ClearNametable_Block ; CPU:$D284 PRG:1284 D0 F1 ldx #$40 ; CPU:$D286 PRG:1286 A2 40 lda #$00 ; CPU:$D288 PRG:1288 A9 00 ClearNametable_Block_1: - sta $2007 ; CPU:$D28A PRG:128A 8D 07 20 + sta PPUDATA ; CPU:$D28A PRG:128A 8D 07 20 dex ; CPU:$D28D PRG:128D CA bne ClearNametable_Block_1 ; CPU:$D28E PRG:128E D0 FA rts ; CPU:$D290 PRG:1290 60 LoadStageObjectData: jsr $C10A ; CPU:$D291 PRG:1291 20 0A C1 jsr $C0FA ; CPU:$D294 PRG:1294 20 FA C0 - lda $16 ; CPU:$D297 PRG:1297 A5 16 + lda RenderingDisabledFlag ; CPU:$D297 PRG:1297 A5 16 beq LoadStageObjectData_Block ; CPU:$D299 PRG:1299 F0 03 jmp $D572 ; CPU:$D29B PRG:129B 4C 72 D5 LoadStageObjectData_Block: ldy $3B ; CPU:$D29E PRG:129E A4 3B lda StageStreamPointerLoTable,y ; CPU:$D2A0 PRG:12A0 B9 2A DB - sta $1D ; CPU:$D2A3 PRG:12A3 85 1D + sta RecordPtrLo ; CPU:$D2A3 PRG:12A3 85 1D lda StageStreamPointerHiTable,y ; CPU:$D2A5 PRG:12A5 B9 3A DB - sta $1E ; CPU:$D2A8 PRG:12A8 85 1E + sta RecordPtrHi ; CPU:$D2A8 PRG:12A8 85 1E jsr $D497 ; CPU:$D2AA PRG:12AA 20 97 D4 ldx #$00 ; CPU:$D2AD PRG:12AD A2 00 LoadStageObjectData_Block_1: jsr $D4E5 ; CPU:$D2AF PRG:12AF 20 E5 D4 cmp #$FF ; CPU:$D2B2 PRG:12B2 C9 FF beq LoadStageObjectData_Block_4 ; CPU:$D2B4 PRG:12B4 F0 6A - sta $54 ; CPU:$D2B6 PRG:12B6 85 54 + sta PpuCommandAddressHi ; CPU:$D2B6 PRG:12B6 85 54 jsr $D4E5 ; CPU:$D2B8 PRG:12B8 20 E5 D4 - sta $55 ; CPU:$D2BB PRG:12BB 85 55 + sta PpuCommandAddressLo ; CPU:$D2BB PRG:12BB 85 55 ldy #$03 ; CPU:$D2BD PRG:12BD A0 03 LoadStageObjectData_Block_2: jsr $D4FB ; CPU:$D2BF PRG:12BF 20 FB D4 lda #$04 ; CPU:$D2C2 PRG:12C2 A9 04 - sta $12 ; CPU:$D2C4 PRG:12C4 85 12 + sta Temp12 ; CPU:$D2C4 PRG:12C4 85 12 lda $D493,y ; CPU:$D2C6 PRG:12C6 B9 93 D4 LoadStageObjectData_Block_3: - sta $2007 ; CPU:$D2C9 PRG:12C9 8D 07 20 + sta PPUDATA ; CPU:$D2C9 PRG:12C9 8D 07 20 clc ; CPU:$D2CC PRG:12CC 18 adc #$04 ; CPU:$D2CD PRG:12CD 69 04 - dec $12 ; CPU:$D2CF PRG:12CF C6 12 + dec Temp12 ; CPU:$D2CF PRG:12CF C6 12 bne LoadStageObjectData_Block_3 ; CPU:$D2D1 PRG:12D1 D0 F6 - inc $55 ; CPU:$D2D3 PRG:12D3 E6 55 + inc PpuCommandAddressLo ; CPU:$D2D3 PRG:12D3 E6 55 dey ; CPU:$D2D5 PRG:12D5 88 bpl LoadStageObjectData_Block_2 ; CPU:$D2D6 PRG:12D6 10 E7 - lda $55 ; CPU:$D2D8 PRG:12D8 A5 55 + lda PpuCommandAddressLo ; CPU:$D2D8 PRG:12D8 A5 55 sec ; CPU:$D2DA PRG:12DA 38 sbc #$04 ; CPU:$D2DB PRG:12DB E9 04 - sta $55 ; CPU:$D2DD PRG:12DD 85 55 + sta PpuCommandAddressLo ; CPU:$D2DD PRG:12DD 85 55 jsr $D51C ; CPU:$D2DF PRG:12DF 20 1C D5 sta $A6,x ; CPU:$D2E2 PRG:12E2 95 A6 - inc $54 ; CPU:$D2E4 PRG:12E4 E6 54 - inc $54 ; CPU:$D2E6 PRG:12E6 E6 54 + inc PpuCommandAddressHi ; CPU:$D2E4 PRG:12E4 E6 54 + inc PpuCommandAddressHi ; CPU:$D2E6 PRG:12E6 E6 54 jsr $D51C ; CPU:$D2E8 PRG:12E8 20 1C D5 sta $A9,x ; CPU:$D2EB PRG:12EB 95 A9 - inc $55 ; CPU:$D2ED PRG:12ED E6 55 - inc $55 ; CPU:$D2EF PRG:12EF E6 55 + inc PpuCommandAddressLo ; CPU:$D2ED PRG:12ED E6 55 + inc PpuCommandAddressLo ; CPU:$D2EF PRG:12EF E6 55 jsr $D51C ; CPU:$D2F1 PRG:12F1 20 1C D5 sta $AF,x ; CPU:$D2F4 PRG:12F4 95 AF - dec $54 ; CPU:$D2F6 PRG:12F6 C6 54 - dec $54 ; CPU:$D2F8 PRG:12F8 C6 54 + dec PpuCommandAddressHi ; CPU:$D2F6 PRG:12F6 C6 54 + dec PpuCommandAddressHi ; CPU:$D2F8 PRG:12F8 C6 54 jsr $D51C ; CPU:$D2FA PRG:12FA 20 1C D5 sta $AC,x ; CPU:$D2FD PRG:12FD 95 AC - stx $A4 ; CPU:$D2FF PRG:12FF 86 A4 + stx SelectedSpawnIndex ; CPU:$D2FF PRG:12FF 86 A4 lda #$03 ; CPU:$D301 PRG:1301 A9 03 jsr $C856 ; CPU:$D303 PRG:1303 20 56 C8 jsr $C17C ; CPU:$D306 PRG:1306 20 7C C1 - ldx $A4 ; CPU:$D309 PRG:1309 A6 A4 - lda $54 ; CPU:$D30B PRG:130B A5 54 + ldx SelectedSpawnIndex ; CPU:$D309 PRG:1309 A6 A4 + lda PpuCommandAddressHi ; CPU:$D30B PRG:130B A5 54 asl a ; CPU:$D30D PRG:130D 0A asl a ; CPU:$D30E PRG:130E 0A asl a ; CPU:$D30F PRG:130F 0A clc ; CPU:$D310 PRG:1310 18 adc #$10 ; CPU:$D311 PRG:1311 69 10 - sta $B2,x ; CPU:$D313 PRG:1313 95 B2 - lda $55 ; CPU:$D315 PRG:1315 A5 55 + sta RoundSpawnBaseX,x ; CPU:$D313 PRG:1313 95 B2 + lda PpuCommandAddressLo ; CPU:$D315 PRG:1315 A5 55 asl a ; CPU:$D317 PRG:1317 0A asl a ; CPU:$D318 PRG:1318 0A asl a ; CPU:$D319 PRG:1319 0A - sta $B5,x ; CPU:$D31A PRG:131A 95 B5 + sta RoundSpawnBaseY,x ; CPU:$D31A PRG:131A 95 B5 inx ; CPU:$D31C PRG:131C E8 jmp LoadStageObjectData_Block_1 ; CPU:$D31D PRG:131D 4C B1 D2 LoadStageObjectData_Block_4: dex ; CPU:$D320 PRG:1320 CA - stx $A3 ; CPU:$D321 PRG:1321 86 A3 + stx RoundSpawnRandomLimit ; CPU:$D321 PRG:1321 86 A3 ldx #$00 ; CPU:$D323 PRG:1323 A2 00 LoadStageObjectData_Block_5: jsr $D4E5 ; CPU:$D325 PRG:1325 20 E5 D4 cmp #$FF ; CPU:$D328 PRG:1328 C9 FF beq LoadStageObjectData_Block_6 ; CPU:$D32A PRG:132A F0 50 - sta $54 ; CPU:$D32C PRG:132C 85 54 + sta PpuCommandAddressHi ; CPU:$D32C PRG:132C 85 54 jsr $D4E5 ; CPU:$D32E PRG:132E 20 E5 D4 - sta $55 ; CPU:$D331 PRG:1331 85 55 + sta PpuCommandAddressLo ; CPU:$D331 PRG:1331 85 55 jsr $D4E5 ; CPU:$D333 PRG:1333 20 E5 D4 - sta $05FA,x ; CPU:$D336 PRG:1336 9D FA 05 - lda $54 ; CPU:$D339 PRG:1339 A5 54 + sta BonusObjectPhase,x ; CPU:$D336 PRG:1336 9D FA 05 + lda PpuCommandAddressHi ; CPU:$D339 PRG:1339 A5 54 asl a ; CPU:$D33B PRG:133B 0A asl a ; CPU:$D33C PRG:133C 0A asl a ; CPU:$D33D PRG:133D 0A adc #$0C ; CPU:$D33E PRG:133E 69 0C - sta $05D2,x ; CPU:$D340 PRG:1340 9D D2 05 - lda $55 ; CPU:$D343 PRG:1343 A5 55 + sta BonusObjectPosX,x ; CPU:$D340 PRG:1340 9D D2 05 + lda PpuCommandAddressLo ; CPU:$D343 PRG:1343 A5 55 asl a ; CPU:$D345 PRG:1345 0A asl a ; CPU:$D346 PRG:1346 0A asl a ; CPU:$D347 PRG:1347 0A adc #$0C ; CPU:$D348 PRG:1348 69 0C - sta $05DC,x ; CPU:$D34A PRG:134A 9D DC 05 + sta BonusObjectPosY,x ; CPU:$D34A PRG:134A 9D DC 05 lda #$00 ; CPU:$D34D PRG:134D A9 00 - sta $0604,x ; CPU:$D34F PRG:134F 9D 04 06 + sta BonusObjectTimer,x ; CPU:$D34F PRG:134F 9D 04 06 jsr $D4FB ; CPU:$D352 PRG:1352 20 FB D4 - sta $05E6,x ; CPU:$D355 PRG:1355 9D E6 05 + sta BonusHudAddressLo,x ; CPU:$D355 PRG:1355 9D E6 05 lda $13 ; CPU:$D358 PRG:1358 A5 13 - sta $05F0,x ; CPU:$D35A PRG:135A 9D F0 05 + sta BonusHudAddressHi,x ; CPU:$D35A PRG:135A 9D F0 05 jsr $D56C ; CPU:$D35D PRG:135D 20 6C D5 jsr $D53C ; CPU:$D360 PRG:1360 20 3C D5 - inc $54 ; CPU:$D363 PRG:1363 E6 54 - inc $54 ; CPU:$D365 PRG:1365 E6 54 + inc PpuCommandAddressHi ; CPU:$D363 PRG:1363 E6 54 + inc PpuCommandAddressHi ; CPU:$D365 PRG:1365 E6 54 jsr $D53C ; CPU:$D367 PRG:1367 20 3C D5 - inc $55 ; CPU:$D36A PRG:136A E6 55 - inc $55 ; CPU:$D36C PRG:136C E6 55 + inc PpuCommandAddressLo ; CPU:$D36A PRG:136A E6 55 + inc PpuCommandAddressLo ; CPU:$D36C PRG:136C E6 55 jsr $D53C ; CPU:$D36E PRG:136E 20 3C D5 - dec $54 ; CPU:$D371 PRG:1371 C6 54 - dec $54 ; CPU:$D373 PRG:1373 C6 54 + dec PpuCommandAddressHi ; CPU:$D371 PRG:1371 C6 54 + dec PpuCommandAddressHi ; CPU:$D373 PRG:1373 C6 54 jsr $D53C ; CPU:$D375 PRG:1375 20 3C D5 inx ; CPU:$D378 PRG:1378 E8 jmp LoadStageObjectData_Block_5 ; CPU:$D379 PRG:1379 4C 27 D3 LoadStageObjectData_Block_6: dex ; CPU:$D37C PRG:137C CA - stx $05D1 ; CPU:$D37D PRG:137D 8E D1 05 + stx ActiveBonusObjectIndex ; CPU:$D37D PRG:137D 8E D1 05 jsr $D4E5 ; CPU:$D380 PRG:1380 20 E5 D4 - sta $1F ; CPU:$D383 PRG:1383 85 1F + sta DestinationPtrLo ; CPU:$D383 PRG:1383 85 1F jsr $D4E5 ; CPU:$D385 PRG:1385 20 E5 D4 - sta $20 ; CPU:$D388 PRG:1388 85 20 + sta DestinationPtrHi ; CPU:$D388 PRG:1388 85 20 ldy #$00 ; CPU:$D38A PRG:138A A0 00 - lda ($1F),y ; CPU:$D38C PRG:138C B1 1F + lda (DestinationPtrLo),y ; CPU:$D38C PRG:138C B1 1F tax ; CPU:$D38E PRG:138E AA dex ; CPU:$D38F PRG:138F CA bpl LoadStageObjectData_Block_7 ; CPU:$D390 PRG:1390 10 05 @@ -3808,13 +3808,13 @@ LoadStageObjectData_Block_6: LoadStageObjectData_Block_7: iny ; CPU:$D397 PRG:1397 C8 LoadStageObjectData_Block_8: - lda ($1F),y ; CPU:$D398 PRG:1398 B1 1F + lda (DestinationPtrLo),y ; CPU:$D398 PRG:1398 B1 1F iny ; CPU:$D39A PRG:139A C8 sta $93,x ; CPU:$D39B PRG:139B 95 93 - lda ($1F),y ; CPU:$D39D PRG:139D B1 1F + lda (DestinationPtrLo),y ; CPU:$D39D PRG:139D B1 1F iny ; CPU:$D39F PRG:139F C8 sta $9C,x ; CPU:$D3A0 PRG:13A0 95 9C - lda ($1F),y ; CPU:$D3A2 PRG:13A2 B1 1F + lda (DestinationPtrLo),y ; CPU:$D3A2 PRG:13A2 B1 1F iny ; CPU:$D3A4 PRG:13A4 C8 sta $0453,x ; CPU:$D3A5 PRG:13A5 9D 53 04 lda #$02 ; CPU:$D3A8 PRG:13A8 A9 02 @@ -3827,22 +3827,22 @@ LoadStageObjectData_Block_8: bpl LoadStageObjectData_Block_8 ; CPU:$D3B6 PRG:13B6 10 E0 LoadStageObjectData_Block_9: jsr $D4E5 ; CPU:$D3B8 PRG:13B8 20 E5 D4 - sta $CD ; CPU:$D3BB PRG:13BB 85 CD + sta BoundsCandidateIndex ; CPU:$D3BB PRG:13BB 85 CD jsr $D4E5 ; CPU:$D3BD PRG:13BD 20 E5 D4 - sta $23 ; CPU:$D3C0 PRG:13C0 85 23 + sta BoundsLeftPtrLo ; CPU:$D3C0 PRG:13C0 85 23 jsr $D4E5 ; CPU:$D3C2 PRG:13C2 20 E5 D4 tay ; CPU:$D3C5 PRG:13C5 A8 - sta $24 ; CPU:$D3C6 PRG:13C6 85 24 - lda $23 ; CPU:$D3C8 PRG:13C8 A5 23 + sta BoundsLeftPtrHi ; CPU:$D3C6 PRG:13C6 85 24 + lda BoundsLeftPtrLo ; CPU:$D3C8 PRG:13C8 A5 23 jsr $D48C ; CPU:$D3CA PRG:13CA 20 8C D4 - sta $25 ; CPU:$D3CD PRG:13CD 85 25 - sty $26 ; CPU:$D3CF PRG:13CF 84 26 + sta BoundsRightPtrLo ; CPU:$D3CD PRG:13CD 85 25 + sty BoundsRightPtrHi ; CPU:$D3CF PRG:13CF 84 26 jsr $D48C ; CPU:$D3D1 PRG:13D1 20 8C D4 - sta $27 ; CPU:$D3D4 PRG:13D4 85 27 - sty $28 ; CPU:$D3D6 PRG:13D6 84 28 + sta BoundsTopPtrLo ; CPU:$D3D4 PRG:13D4 85 27 + sty BoundsTopPtrHi ; CPU:$D3D6 PRG:13D6 84 28 jsr $D48C ; CPU:$D3D8 PRG:13D8 20 8C D4 - sta $29 ; CPU:$D3DB PRG:13DB 85 29 - sty $2A ; CPU:$D3DD PRG:13DD 84 2A + sta BoundsBottomPtrLo ; CPU:$D3DB PRG:13DB 85 29 + sty BoundsBottomPtrHi ; CPU:$D3DD PRG:13DD 84 2A jsr $D5D9 ; CPU:$D3DF PRG:13DF 20 D9 D5 jsr BuildStagePpuCommands ; CPU:$D3E2 PRG:13E2 20 ED D3 jsr $C104 ; CPU:$D3E5 PRG:13E5 20 04 C1 @@ -3851,7 +3851,7 @@ BuildStagePpuCommands: ldx #$22 ; CPU:$D3EB PRG:13EB A2 22 BuildStagePpuCommands_Block: lda StagePaletteAndTileData,x ; CPU:$D3ED PRG:13ED BD 37 D4 - sta $57,x ; CPU:$D3F0 PRG:13F0 95 57 + sta PpuCommandData0,x ; CPU:$D3F0 PRG:13F0 95 57 dex ; CPU:$D3F2 PRG:13F2 CA bpl BuildStagePpuCommands_Block ; CPU:$D3F3 PRG:13F3 10 F8 lda $C8 ; CPU:$D3F5 PRG:13F5 A5 C8 @@ -3863,31 +3863,31 @@ BuildStagePpuCommands_Block: ldx #$03 ; CPU:$D400 PRG:1400 A2 03 BuildStagePpuCommands_Block_1: lda $D45A,y ; CPU:$D402 PRG:1402 B9 5A D4 - sta $5A,x ; CPU:$D405 PRG:1405 95 5A + sta HudCommandTile0,x ; CPU:$D405 PRG:1405 95 5A dey ; CPU:$D407 PRG:1407 88 dex ; CPU:$D408 PRG:1408 CA bpl BuildStagePpuCommands_Block_1 ; CPU:$D409 PRG:1409 10 F7 BuildStagePpuCommands_Block_2: jmp $C12D ; CPU:$D40B PRG:140B 4C 2D C1 BuildStagePpuCommands_Block_3: - ldx $0558 ; CPU:$D40E PRG:140E AE 58 05 + ldx ParticleSequenceIndex ; CPU:$D40E PRG:140E AE 58 05 lda $D46A,x ; CPU:$D411 PRG:1411 BD 6A D4 - sta $1D ; CPU:$D414 PRG:1414 85 1D + sta RecordPtrLo ; CPU:$D414 PRG:1414 85 1D lda $D46F,x ; CPU:$D416 PRG:1416 BD 6F D4 - sta $1E ; CPU:$D419 PRG:1419 85 1E + sta RecordPtrHi ; CPU:$D419 PRG:1419 85 1E ldx #$03 ; CPU:$D41B PRG:141B A2 03 ldy #$07 ; CPU:$D41D PRG:141D A0 07 BuildStagePpuCommands_Block_4: - lda ($1D),y ; CPU:$D41F PRG:141F B1 1D + lda (RecordPtrLo),y ; CPU:$D41F PRG:141F B1 1D sta $72,x ; CPU:$D421 PRG:1421 95 72 dey ; CPU:$D423 PRG:1423 88 dex ; CPU:$D424 PRG:1424 CA bpl BuildStagePpuCommands_Block_4 ; CPU:$D425 PRG:1425 10 F8 - lda $16 ; CPU:$D427 PRG:1427 A5 16 + lda RenderingDisabledFlag ; CPU:$D427 PRG:1427 A5 16 bne BuildStagePpuCommands_Block_2 ; CPU:$D429 PRG:1429 D0 E0 BuildStagePpuCommands_Block_5: - lda ($1D),y ; CPU:$D42B PRG:142B B1 1D - sta a:$005A,y ; CPU:$D42D PRG:142D 99 5A 00 + lda (RecordPtrLo),y ; CPU:$D42B PRG:142B B1 1D + sta a:HudCommandTile0,y ; CPU:$D42D PRG:142D 99 5A 00 dey ; CPU:$D430 PRG:1430 88 bpl BuildStagePpuCommands_Block_5 ; CPU:$D431 PRG:1431 10 F8 bmi BuildStagePpuCommands_Block_2 ; CPU:$D433 PRG:1433 30 D6 @@ -3906,7 +3906,7 @@ StagePaletteAndTileData: .byte $1C, $0F, $15, $30, $26 ; CPU:$D485 PRG:1485 1C 0F 15 30 26 AddOffsetToStreamPointer: sec ; CPU:$D48A PRG:148A 38 - adc $CD ; CPU:$D48B PRG:148B 65 CD + adc BoundsCandidateIndex ; CPU:$D48B PRG:148B 65 CD bcc AddOffsetToStreamPointer_Block ; CPU:$D48D PRG:148D 90 01 iny ; CPU:$D48F PRG:148F C8 AddOffsetToStreamPointer_Block: @@ -3915,9 +3915,9 @@ StreamPointerAdjustmentTable: .byte $7F, $7E, $7D, $7C ; CPU:$D491 PRG:1491 7F 7E 7D 7C DecodePpuCommandStream: jsr ReadStageStreamByte ; CPU:$D495 PRG:1495 20 E5 D4 - sta $1F ; CPU:$D498 PRG:1498 85 1F + sta DestinationPtrLo ; CPU:$D498 PRG:1498 85 1F jsr ReadStageStreamByte ; CPU:$D49A PRG:149A 20 E5 D4 - sta $20 ; CPU:$D49D PRG:149D 85 20 + sta DestinationPtrHi ; CPU:$D49D PRG:149D 85 20 tax ; CPU:$D49F PRG:149F AA beq DecodePpuCommandStream_Block_4 ; CPU:$D4A0 PRG:14A0 F0 40 DecodePpuCommandStream_Block: @@ -3925,11 +3925,11 @@ DecodePpuCommandStream_Block: tax ; CPU:$D4A5 PRG:14A5 AA beq DecodePpuCommandStream ; CPU:$D4A6 PRG:14A6 F0 ED and #$7F ; CPU:$D4A8 PRG:14A8 29 7F - sta $2006 ; CPU:$D4AA PRG:14AA 8D 06 20 + sta PPUADDR ; CPU:$D4AA PRG:14AA 8D 06 20 jsr ReadPpuStreamByte ; CPU:$D4AD PRG:14AD 20 F0 D4 - sta $2006 ; CPU:$D4B0 PRG:14B0 8D 06 20 + sta PPUADDR ; CPU:$D4B0 PRG:14B0 8D 06 20 jsr ReadPpuStreamByte ; CPU:$D4B3 PRG:14B3 20 F0 D4 - sta $12 ; CPU:$D4B6 PRG:14B6 85 12 + sta Temp12 ; CPU:$D4B6 PRG:14B6 85 12 txa ; CPU:$D4B8 PRG:14B8 8A and #$80 ; CPU:$D4B9 PRG:14B9 29 80 lsr a ; CPU:$D4BB PRG:14BB 4A @@ -3937,97 +3937,97 @@ DecodePpuCommandStream_Block: lsr a ; CPU:$D4BD PRG:14BD 4A lsr a ; CPU:$D4BE PRG:14BE 4A lsr a ; CPU:$D4BF PRG:14BF 4A - ora $00 ; CPU:$D4C0 PRG:14C0 05 00 - sta $2000 ; CPU:$D4C2 PRG:14C2 8D 00 20 + ora PpuControlShadow ; CPU:$D4C0 PRG:14C0 05 00 + sta PPUCTRL ; CPU:$D4C2 PRG:14C2 8D 00 20 txa ; CPU:$D4C5 PRG:14C5 8A and #$40 ; CPU:$D4C6 PRG:14C6 29 40 bne DecodePpuCommandStream_Block_2 ; CPU:$D4C8 PRG:14C8 D0 0C DecodePpuCommandStream_Block_1: jsr ReadPpuStreamByte ; CPU:$D4CA PRG:14CA 20 F0 D4 - sta $2007 ; CPU:$D4CD PRG:14CD 8D 07 20 - dec $12 ; CPU:$D4D0 PRG:14D0 C6 12 + sta PPUDATA ; CPU:$D4CD PRG:14CD 8D 07 20 + dec Temp12 ; CPU:$D4D0 PRG:14D0 C6 12 bne DecodePpuCommandStream_Block_1 ; CPU:$D4D2 PRG:14D2 D0 F6 beq DecodePpuCommandStream_Block ; CPU:$D4D4 PRG:14D4 F0 CC DecodePpuCommandStream_Block_2: jsr ReadPpuStreamByte ; CPU:$D4D6 PRG:14D6 20 F0 D4 DecodePpuCommandStream_Block_3: - sta $2007 ; CPU:$D4D9 PRG:14D9 8D 07 20 - dec $12 ; CPU:$D4DC PRG:14DC C6 12 + sta PPUDATA ; CPU:$D4D9 PRG:14D9 8D 07 20 + dec Temp12 ; CPU:$D4DC PRG:14DC C6 12 bne DecodePpuCommandStream_Block_3 ; CPU:$D4DE PRG:14DE D0 F9 beq DecodePpuCommandStream_Block ; CPU:$D4E0 PRG:14E0 F0 C0 DecodePpuCommandStream_Block_4: rts ; CPU:$D4E2 PRG:14E2 60 ReadStageStreamByte: ldy #$00 ; CPU:$D4E3 PRG:14E3 A0 00 - lda ($1D),y ; CPU:$D4E5 PRG:14E5 B1 1D - inc $1D ; CPU:$D4E7 PRG:14E7 E6 1D + lda (RecordPtrLo),y ; CPU:$D4E5 PRG:14E5 B1 1D + inc RecordPtrLo ; CPU:$D4E7 PRG:14E7 E6 1D bne ReadStageStreamByte_Block ; CPU:$D4E9 PRG:14E9 D0 02 - inc $1E ; CPU:$D4EB PRG:14EB E6 1E + inc RecordPtrHi ; CPU:$D4EB PRG:14EB E6 1E ReadStageStreamByte_Block: rts ; CPU:$D4ED PRG:14ED 60 ReadPpuStreamByte: ldy #$00 ; CPU:$D4EE PRG:14EE A0 00 - lda ($1F),y ; CPU:$D4F0 PRG:14F0 B1 1F - inc $1F ; CPU:$D4F2 PRG:14F2 E6 1F + lda (DestinationPtrLo),y ; CPU:$D4F0 PRG:14F0 B1 1F + inc DestinationPtrLo ; CPU:$D4F2 PRG:14F2 E6 1F bne ReadPpuStreamByte_Block ; CPU:$D4F4 PRG:14F4 D0 02 - inc $20 ; CPU:$D4F6 PRG:14F6 E6 20 + inc DestinationPtrHi ; CPU:$D4F6 PRG:14F6 E6 20 ReadPpuStreamByte_Block: rts ; CPU:$D4F8 PRG:14F8 60 ReadPpuStreamByte_Block_1: - lda $55 ; CPU:$D4F9 PRG:14F9 A5 55 - sta $12 ; CPU:$D4FB PRG:14FB 85 12 + lda PpuCommandAddressLo ; CPU:$D4F9 PRG:14F9 A5 55 + sta Temp12 ; CPU:$D4FB PRG:14FB 85 12 lda #$00 ; CPU:$D4FD PRG:14FD A9 00 - asl $12 ; CPU:$D4FF PRG:14FF 06 12 - asl $12 ; CPU:$D501 PRG:1501 06 12 - asl $12 ; CPU:$D503 PRG:1503 06 12 - asl $12 ; CPU:$D505 PRG:1505 06 12 + asl Temp12 ; CPU:$D4FF PRG:14FF 06 12 + asl Temp12 ; CPU:$D501 PRG:1501 06 12 + asl Temp12 ; CPU:$D503 PRG:1503 06 12 + asl Temp12 ; CPU:$D505 PRG:1505 06 12 rol a ; CPU:$D507 PRG:1507 2A - asl $12 ; CPU:$D508 PRG:1508 06 12 + asl Temp12 ; CPU:$D508 PRG:1508 06 12 rol a ; CPU:$D50A PRG:150A 2A ora #$20 ; CPU:$D50B PRG:150B 09 20 - sta $2006 ; CPU:$D50D PRG:150D 8D 06 20 + sta PPUADDR ; CPU:$D50D PRG:150D 8D 06 20 sta $13 ; CPU:$D510 PRG:1510 85 13 - lda $12 ; CPU:$D512 PRG:1512 A5 12 - ora $54 ; CPU:$D514 PRG:1514 05 54 - sta $2006 ; CPU:$D516 PRG:1516 8D 06 20 + lda Temp12 ; CPU:$D512 PRG:1512 A5 12 + ora PpuCommandAddressHi ; CPU:$D514 PRG:1514 05 54 + sta PPUADDR ; CPU:$D516 PRG:1516 8D 06 20 rts ; CPU:$D519 PRG:1519 60 SetTileAddressFromCoordinates: - lda $55 ; CPU:$D51A PRG:151A A5 55 + lda PpuCommandAddressLo ; CPU:$D51A PRG:151A A5 55 and #$FC ; CPU:$D51C PRG:151C 29 FC asl a ; CPU:$D51E PRG:151E 0A - sta $12 ; CPU:$D51F PRG:151F 85 12 - lda $54 ; CPU:$D521 PRG:1521 A5 54 + sta Temp12 ; CPU:$D51F PRG:151F 85 12 + lda PpuCommandAddressHi ; CPU:$D521 PRG:1521 A5 54 lsr a ; CPU:$D523 PRG:1523 4A lsr a ; CPU:$D524 PRG:1524 4A - ora $12 ; CPU:$D525 PRG:1525 05 12 + ora Temp12 ; CPU:$D525 PRG:1525 05 12 ora #$C0 ; CPU:$D527 PRG:1527 09 C0 pha ; CPU:$D529 PRG:1529 48 - lda $55 ; CPU:$D52A PRG:152A A5 55 + lda PpuCommandAddressLo ; CPU:$D52A PRG:152A A5 55 and #$02 ; CPU:$D52C PRG:152C 29 02 - sta $12 ; CPU:$D52E PRG:152E 85 12 - lda $54 ; CPU:$D530 PRG:1530 A5 54 + sta Temp12 ; CPU:$D52E PRG:152E 85 12 + lda PpuCommandAddressHi ; CPU:$D530 PRG:1530 A5 54 and #$02 ; CPU:$D532 PRG:1532 29 02 lsr a ; CPU:$D534 PRG:1534 4A - ora $12 ; CPU:$D535 PRG:1535 05 12 + ora Temp12 ; CPU:$D535 PRG:1535 05 12 tay ; CPU:$D537 PRG:1537 A8 pla ; CPU:$D538 PRG:1538 68 rts ; CPU:$D539 PRG:1539 60 ReadModifyAttributeByte: lda #$23 ; CPU:$D53A PRG:153A A9 23 - sta $2006 ; CPU:$D53C PRG:153C 8D 06 20 + sta PPUADDR ; CPU:$D53C PRG:153C 8D 06 20 jsr SetTileAddressFromCoordinates ; CPU:$D53F PRG:153F 20 1C D5 - sta $2006 ; CPU:$D542 PRG:1542 8D 06 20 - lda $2007 ; CPU:$D545 PRG:1545 AD 07 20 - lda $2007 ; CPU:$D548 PRG:1548 AD 07 20 + sta PPUADDR ; CPU:$D542 PRG:1542 8D 06 20 + lda PPUDATA ; CPU:$D545 PRG:1545 AD 07 20 + lda PPUDATA ; CPU:$D548 PRG:1548 AD 07 20 and AttributeClearMaskTable,y ; CPU:$D54B PRG:154B 39 64 D5 ora AttributeSetMaskTable,y ; CPU:$D54E PRG:154E 19 68 D5 pha ; CPU:$D551 PRG:1551 48 lda #$23 ; CPU:$D552 PRG:1552 A9 23 - sta $2006 ; CPU:$D554 PRG:1554 8D 06 20 + sta PPUADDR ; CPU:$D554 PRG:1554 8D 06 20 jsr SetTileAddressFromCoordinates ; CPU:$D557 PRG:1557 20 1C D5 - sta $2006 ; CPU:$D55A PRG:155A 8D 06 20 + sta PPUADDR ; CPU:$D55A PRG:155A 8D 06 20 pla ; CPU:$D55D PRG:155D 68 - sta $2007 ; CPU:$D55E PRG:155E 8D 07 20 + sta PPUDATA ; CPU:$D55E PRG:155E 8D 07 20 rts ; CPU:$D561 PRG:1561 60 AttributeClearMaskTable: .byte $FC, $F3, $CF, $3F ; CPU:$D562 PRG:1562 FC F3 CF 3F @@ -4052,12 +4052,12 @@ InitializeNametablePatterns_Block: inc $C8 ; CPU:$D58C PRG:158C E6 C8 jmp $D3E1 ; CPU:$D58E PRG:158E 4C E1 D3 WriteNametableHeaderPattern: - sty $2006 ; CPU:$D591 PRG:1591 8C 06 20 - sta $2006 ; CPU:$D594 PRG:1594 8D 06 20 + sty PPUADDR ; CPU:$D591 PRG:1591 8C 06 20 + sta PPUADDR ; CPU:$D594 PRG:1594 8D 06 20 ldx #$00 ; CPU:$D597 PRG:1597 A2 00 WriteNametableHeaderPattern_Block: lda $DCAE,x ; CPU:$D599 PRG:1599 BD AE DC - sta $2007 ; CPU:$D59C PRG:159C 8D 07 20 + sta PPUDATA ; CPU:$D59C PRG:159C 8D 07 20 inx ; CPU:$D59F PRG:159F E8 cpx #$08 ; CPU:$D5A0 PRG:15A0 E0 08 bne WriteNametableHeaderPattern_Block ; CPU:$D5A2 PRG:15A2 D0 F5 @@ -4067,26 +4067,26 @@ WriteNametableHeaderPattern_Block: lda #$AA ; CPU:$D5AB PRG:15AB A9 AA ldx #$10 ; CPU:$D5AD PRG:15AD A2 10 FillPpuBytes: - sta $2007 ; CPU:$D5AF PRG:15AF 8D 07 20 + sta PPUDATA ; CPU:$D5AF PRG:15AF 8D 07 20 dex ; CPU:$D5B2 PRG:15B2 CA bne FillPpuBytes ; CPU:$D5B3 PRG:15B3 D0 FA rts ; CPU:$D5B5 PRG:15B5 60 WriteNametableAttributePattern: - sty $2006 ; CPU:$D5B6 PRG:15B6 8C 06 20 - sta $2006 ; CPU:$D5B9 PRG:15B9 8D 06 20 + sty PPUADDR ; CPU:$D5B6 PRG:15B6 8C 06 20 + sta PPUADDR ; CPU:$D5B9 PRG:15B9 8D 06 20 ldx #$20 ; CPU:$D5BC PRG:15BC A2 20 lda #$58 ; CPU:$D5BE PRG:15BE A9 58 jsr WriteAttributeQuadrants ; CPU:$D5C0 PRG:15C0 20 C9 D5 ldx #$40 ; CPU:$D5C3 PRG:15C3 A2 40 lda #$5C ; CPU:$D5C5 PRG:15C5 A9 5C WriteAttributeQuadrants: - sta $12 ; CPU:$D5C7 PRG:15C7 85 12 + sta Temp12 ; CPU:$D5C7 PRG:15C7 85 12 WriteAttributeQuadrants_Block: txa ; CPU:$D5C9 PRG:15C9 8A and #$03 ; CPU:$D5CA PRG:15CA 29 03 eor #$03 ; CPU:$D5CC PRG:15CC 49 03 - ora $12 ; CPU:$D5CE PRG:15CE 05 12 - sta $2007 ; CPU:$D5D0 PRG:15D0 8D 07 20 + ora Temp12 ; CPU:$D5CE PRG:15CE 05 12 + sta PPUDATA ; CPU:$D5D0 PRG:15D0 8D 07 20 dex ; CPU:$D5D3 PRG:15D3 CA bne WriteAttributeQuadrants_Block ; CPU:$D5D4 PRG:15D4 D0 F3 rts ; CPU:$D5D6 PRG:15D6 60 @@ -4106,11 +4106,11 @@ ScanNametableTiles_Block: rts ; CPU:$D5EE PRG:15EE 60 ClassifyNametableTile: lda $51 ; CPU:$D5EF PRG:15EF A5 51 - sta $2006 ; CPU:$D5F1 PRG:15F1 8D 06 20 - lda $50 ; CPU:$D5F4 PRG:15F4 A5 50 - sta $2006 ; CPU:$D5F6 PRG:15F6 8D 06 20 - lda $2007 ; CPU:$D5F9 PRG:15F9 AD 07 20 - lda $2007 ; CPU:$D5FC PRG:15FC AD 07 20 + sta PPUADDR ; CPU:$D5F1 PRG:15F1 8D 06 20 + lda PpuDestinationHi ; CPU:$D5F4 PRG:15F4 A5 50 + sta PPUADDR ; CPU:$D5F6 PRG:15F6 8D 06 20 + lda PPUDATA ; CPU:$D5F9 PRG:15F9 AD 07 20 + lda PPUDATA ; CPU:$D5FC PRG:15FC AD 07 20 cmp #$24 ; CPU:$D5FF PRG:15FF C9 24 bne ClassifyNametableTile_Block ; CPU:$D601 PRG:1601 D0 07 txa ; CPU:$D603 PRG:1603 8A @@ -4131,11 +4131,11 @@ ClassifyNametableTile_Block_1: tax ; CPU:$D61A PRG:161A AA jsr GetNametableAddressForIndex ; CPU:$D61B PRG:161B 20 51 D6 lda $51 ; CPU:$D61E PRG:161E A5 51 - sta $2006 ; CPU:$D620 PRG:1620 8D 06 20 - lda $50 ; CPU:$D623 PRG:1623 A5 50 - sta $2006 ; CPU:$D625 PRG:1625 8D 06 20 - lda $2007 ; CPU:$D628 PRG:1628 AD 07 20 - lda $2007 ; CPU:$D62B PRG:162B AD 07 20 + sta PPUADDR ; CPU:$D620 PRG:1620 8D 06 20 + lda PpuDestinationHi ; CPU:$D623 PRG:1623 A5 50 + sta PPUADDR ; CPU:$D625 PRG:1625 8D 06 20 + lda PPUDATA ; CPU:$D628 PRG:1628 AD 07 20 + lda PPUDATA ; CPU:$D62B PRG:162B AD 07 20 ldy #$03 ; CPU:$D62E PRG:162E A0 03 ClassifyNametableTile_Block_2: cmp NametableTileClassTable,y ; CPU:$D630 PRG:1630 D9 4C D6 @@ -4146,17 +4146,17 @@ ClassifyNametableTile_Block_3: rts ; CPU:$D638 PRG:1638 60 ClassifyNametableTile_Load: lda $51 ; CPU:$D639 PRG:1639 A5 51 - sta $2006 ; CPU:$D63B PRG:163B 8D 06 20 - lda $50 ; CPU:$D63E PRG:163E A5 50 - sta $2006 ; CPU:$D640 PRG:1640 8D 06 20 + sta PPUADDR ; CPU:$D63B PRG:163B 8D 06 20 + lda PpuDestinationHi ; CPU:$D63E PRG:163E A5 50 + sta PPUADDR ; CPU:$D640 PRG:1640 8D 06 20 lda $D64D,y ; CPU:$D643 PRG:1643 B9 4D D6 - sta $2007 ; CPU:$D646 PRG:1646 8D 07 20 + sta PPUDATA ; CPU:$D646 PRG:1646 8D 07 20 rts ; CPU:$D649 PRG:1649 60 NametableTileClassTable: .byte $24, $ED, $EE, $EF, $24 ; CPU:$D64A PRG:164A 24 ED EE EF 24 GetNametableAddressForIndex: lda NametableAddressPairTable,x ; CPU:$D64F PRG:164F BD 5C D6 - sta $50 ; CPU:$D652 PRG:1652 85 50 + sta PpuDestinationHi ; CPU:$D652 PRG:1652 85 50 lda NametableAddressPairTable+1,x ; CPU:$D654 PRG:1654 BD 5D D6 sta $51 ; CPU:$D657 PRG:1657 85 51 rts ; CPU:$D659 PRG:1659 60 @@ -4181,40 +4181,40 @@ NametableAddressPairTable: UpdateBonusScoreTotals: lda #$00 ; CPU:$D6DA PRG:16DA A9 00 AccumulatePlayerBonusScore: - sta $43 ; CPU:$D6DC PRG:16DC 85 43 + sta SelectedRecordIndex ; CPU:$D6DC PRG:16DC 85 43 lda $3A ; CPU:$D6DE PRG:16DE A5 3A beq AccumulatePlayerBonusScore_Block_1 ; CPU:$D6E0 PRG:16E0 F0 01 AccumulatePlayerBonusScore_Block: rts ; CPU:$D6E2 PRG:16E2 60 AccumulatePlayerBonusScore_Block_1: - ldx $3E ; CPU:$D6E3 PRG:16E3 A6 3E + ldx SequencePlayerIndex ; CPU:$D6E3 PRG:16E3 A6 3E cpx #$02 ; CPU:$D6E5 PRG:16E5 E0 02 bcs AccumulatePlayerBonusScore_Block ; CPU:$D6E7 PRG:16E7 B0 F9 - lda $41,x ; CPU:$D6E9 PRG:16E9 B5 41 + lda PlayerActiveFlags,x ; CPU:$D6E9 PRG:16E9 B5 41 bmi AccumulatePlayerBonusScore_Block ; CPU:$D6EB PRG:16EB 30 F5 ldy #$64 ; CPU:$D6ED PRG:16ED A0 64 jsr DivideBonusValue ; CPU:$D6EF PRG:16EF 20 7C D7 clc ; CPU:$D6F2 PRG:16F2 18 - adc $48 ; CPU:$D6F3 PRG:16F3 65 48 + adc SequenceValueHi ; CPU:$D6F3 PRG:16F3 65 48 sta $45 ; CPU:$D6F5 PRG:16F5 85 45 ldy #$0A ; CPU:$D6F7 PRG:16F7 A0 0A jsr DivideBonusValue ; CPU:$D6F9 PRG:16F9 20 7C D7 sta $44 ; CPU:$D6FC PRG:16FC 85 44 ldx $3F ; CPU:$D6FE PRG:16FE A6 3F lda BonusScoreWeightTable,x ; CPU:$D700 PRG:1700 BD 79 D7 - sta $21 ; CPU:$D703 PRG:1703 85 21 + sta PpuSourcePtrLo ; CPU:$D703 PRG:1703 85 21 lda #$06 ; CPU:$D705 PRG:1705 A9 06 - sta $22 ; CPU:$D707 PRG:1707 85 22 - lda $3E ; CPU:$D709 PRG:1709 A5 3E + sta PpuSourcePtrHi ; CPU:$D707 PRG:1707 85 22 + lda SequencePlayerIndex ; CPU:$D709 PRG:1709 A5 3E asl a ; CPU:$D70B PRG:170B 0A asl a ; CPU:$D70C PRG:170C 0A - ora $3E ; CPU:$D70D PRG:170D 05 3E + ora SequencePlayerIndex ; CPU:$D70D PRG:170D 05 3E tax ; CPU:$D70F PRG:170F AA clc ; CPU:$D710 PRG:1710 18 - lda $03,x ; CPU:$D711 PRG:1711 B5 03 - adc $43 ; CPU:$D713 PRG:1713 65 43 + lda CurrentRecord,x ; CPU:$D711 PRG:1711 B5 03 + adc SelectedRecordIndex ; CPU:$D713 PRG:1713 65 43 jsr ClampDecimalDigit ; CPU:$D715 PRG:1715 20 8F D7 - sta $03,x ; CPU:$D718 PRG:1718 95 03 + sta CurrentRecord,x ; CPU:$D718 PRG:1718 95 03 lda $04,x ; CPU:$D71A PRG:171A B5 04 adc $44 ; CPU:$D71C PRG:171C 65 44 jsr ClampDecimalDigit ; CPU:$D71E PRG:171E 20 8F D7 @@ -4224,7 +4224,7 @@ AccumulatePlayerBonusScore_Block_1: jsr ClampDecimalDigit ; CPU:$D727 PRG:1727 20 8F D7 sta $05,x ; CPU:$D72A PRG:172A 95 05 lda $06,x ; CPU:$D72C PRG:172C B5 06 - adc $47 ; CPU:$D72E PRG:172E 65 47 + adc SequenceValueLo ; CPU:$D72E PRG:172E 65 47 jsr ClampDecimalDigit ; CPU:$D730 PRG:1730 20 8F D7 sta $06,x ; CPU:$D733 PRG:1733 95 06 lda $07,x ; CPU:$D735 PRG:1735 B5 07 @@ -4237,8 +4237,8 @@ AccumulatePlayerBonusScore_Block_1: inx ; CPU:$D741 PRG:1741 E8 ldy #$04 ; CPU:$D742 PRG:1742 A0 04 AccumulatePlayerBonusScore_Block_2: - lda $03,x ; CPU:$D744 PRG:1744 B5 03 - cmp ($21),y ; CPU:$D746 PRG:1746 D1 21 + lda CurrentRecord,x ; CPU:$D744 PRG:1744 B5 03 + cmp (PpuSourcePtrLo),y ; CPU:$D746 PRG:1746 D1 21 bcc AccumulatePlayerBonusScore_Block_5 ; CPU:$D748 PRG:1748 90 19 bne AccumulatePlayerBonusScore_Block_3 ; CPU:$D74A PRG:174A D0 04 dex ; CPU:$D74C PRG:174C CA @@ -4246,14 +4246,14 @@ AccumulatePlayerBonusScore_Block_2: bpl AccumulatePlayerBonusScore_Block_2 ; CPU:$D74E PRG:174E 10 F4 AccumulatePlayerBonusScore_Block_3: ldy #$00 ; CPU:$D750 PRG:1750 A0 00 - lda $3E ; CPU:$D752 PRG:1752 A5 3E + lda SequencePlayerIndex ; CPU:$D752 PRG:1752 A5 3E asl a ; CPU:$D754 PRG:1754 0A asl a ; CPU:$D755 PRG:1755 0A - ora $3E ; CPU:$D756 PRG:1756 05 3E + ora SequencePlayerIndex ; CPU:$D756 PRG:1756 05 3E tax ; CPU:$D758 PRG:1758 AA AccumulatePlayerBonusScore_Block_4: - lda $03,x ; CPU:$D759 PRG:1759 B5 03 - sta ($21),y ; CPU:$D75B PRG:175B 91 21 + lda CurrentRecord,x ; CPU:$D759 PRG:1759 B5 03 + sta (PpuSourcePtrLo),y ; CPU:$D75B PRG:175B 91 21 inx ; CPU:$D75D PRG:175D E8 iny ; CPU:$D75E PRG:175E C8 cpy #$05 ; CPU:$D75F PRG:175F C0 05 @@ -4261,12 +4261,12 @@ AccumulatePlayerBonusScore_Block_4: AccumulatePlayerBonusScore_Block_5: ldy #$04 ; CPU:$D763 PRG:1763 A0 04 AccumulatePlayerBonusScore_Block_6: - lda ($21),y ; CPU:$D765 PRG:1765 B1 21 + lda (PpuSourcePtrLo),y ; CPU:$D765 PRG:1765 B1 21 sta a:$000D,y ; CPU:$D767 PRG:1767 99 0D 00 dey ; CPU:$D76A PRG:176A 88 bpl AccumulatePlayerBonusScore_Block_6 ; CPU:$D76B PRG:176B 10 F8 - inc $46 ; CPU:$D76D PRG:176D E6 46 - lda $16 ; CPU:$D76F PRG:176F A5 16 + inc SequenceStep ; CPU:$D76D PRG:176D E6 46 + lda RenderingDisabledFlag ; CPU:$D76F PRG:176F A5 16 beq AccumulatePlayerBonusScore_Block_7 ; CPU:$D771 PRG:1771 F0 03 jsr $C539 ; CPU:$D773 PRG:1773 20 39 C5 AccumulatePlayerBonusScore_Block_7: @@ -4274,17 +4274,17 @@ AccumulatePlayerBonusScore_Block_7: BonusScoreWeightTable: .byte $29, $2E, $33 ; CPU:$D777 PRG:1777 29 2E 33 DivideBonusValue: - sty $12 ; CPU:$D77A PRG:177A 84 12 + sty Temp12 ; CPU:$D77A PRG:177A 84 12 ldx #$FF ; CPU:$D77C PRG:177C A2 FF - lda $43 ; CPU:$D77E PRG:177E A5 43 + lda SelectedRecordIndex ; CPU:$D77E PRG:177E A5 43 DivideBonusValue_Block: sec ; CPU:$D780 PRG:1780 38 - sbc $12 ; CPU:$D781 PRG:1781 E5 12 + sbc Temp12 ; CPU:$D781 PRG:1781 E5 12 inx ; CPU:$D783 PRG:1783 E8 bcs DivideBonusValue_Block ; CPU:$D784 PRG:1784 B0 FA clc ; CPU:$D786 PRG:1786 18 - adc $12 ; CPU:$D787 PRG:1787 65 12 - sta $43 ; CPU:$D789 PRG:1789 85 43 + adc Temp12 ; CPU:$D787 PRG:1787 65 12 + sta SelectedRecordIndex ; CPU:$D789 PRG:1789 85 43 txa ; CPU:$D78B PRG:178B 8A rts ; CPU:$D78C PRG:178C 60 ClampDecimalDigit: @@ -4296,99 +4296,99 @@ ClampDecimalDigit_Block: sbc #$0A ; CPU:$D793 PRG:1793 E9 0A rts ; CPU:$D795 PRG:1795 60 DrawBonusResultScreen: - ldy $46 ; CPU:$D796 PRG:1796 A4 46 + ldy SequenceStep ; CPU:$D796 PRG:1796 A4 46 dey ; CPU:$D798 PRG:1798 88 beq DrawBonusResultScreen_Block ; CPU:$D799 PRG:1799 F0 03 bpl DrawBonusResultScreen_Block_5 ; CPU:$D79B PRG:179B 10 66 rts ; CPU:$D79D PRG:179D 60 DrawBonusResultScreen_Block: lda #$20 ; CPU:$D79E PRG:179E A9 20 - sta $2006 ; CPU:$D7A0 PRG:17A0 8D 06 20 + sta PPUADDR ; CPU:$D7A0 PRG:17A0 8D 06 20 lda #$43 ; CPU:$D7A3 PRG:17A3 A9 43 - sta $2006 ; CPU:$D7A5 PRG:17A5 8D 06 20 + sta PPUADDR ; CPU:$D7A5 PRG:17A5 8D 06 20 lda #$8E ; CPU:$D7A8 PRG:17A8 A9 8E - sta $2007 ; CPU:$D7AA PRG:17AA 8D 07 20 + sta PPUDATA ; CPU:$D7AA PRG:17AA 8D 07 20 ldx #$04 ; CPU:$D7AD PRG:17AD A2 04 DrawBonusResultScreen_Block_1: - lda $03,x ; CPU:$D7AF PRG:17AF B5 03 - sta $2007 ; CPU:$D7B1 PRG:17B1 8D 07 20 + lda CurrentRecord,x ; CPU:$D7AF PRG:17AF B5 03 + sta PPUDATA ; CPU:$D7B1 PRG:17B1 8D 07 20 dex ; CPU:$D7B4 PRG:17B4 CA bpl DrawBonusResultScreen_Block_1 ; CPU:$D7B5 PRG:17B5 10 F8 lda #$00 ; CPU:$D7B7 PRG:17B7 A9 00 - sta $2007 ; CPU:$D7B9 PRG:17B9 8D 07 20 + sta PPUDATA ; CPU:$D7B9 PRG:17B9 8D 07 20 lda #$24 ; CPU:$D7BC PRG:17BC A9 24 - sta $2007 ; CPU:$D7BE PRG:17BE 8D 07 20 - sta $2007 ; CPU:$D7C1 PRG:17C1 8D 07 20 + sta PPUDATA ; CPU:$D7BE PRG:17BE 8D 07 20 + sta PPUDATA ; CPU:$D7C1 PRG:17C1 8D 07 20 ldx #$8C ; CPU:$D7C4 PRG:17C4 A2 8C - stx $2007 ; CPU:$D7C6 PRG:17C6 8E 07 20 + stx PPUDATA ; CPU:$D7C6 PRG:17C6 8E 07 20 inx ; CPU:$D7C9 PRG:17C9 E8 - stx $2007 ; CPU:$D7CA PRG:17CA 8E 07 20 + stx PPUDATA ; CPU:$D7CA PRG:17CA 8E 07 20 ldx #$04 ; CPU:$D7CD PRG:17CD A2 04 DrawBonusResultScreen_Block_2: lda $0D,x ; CPU:$D7CF PRG:17CF B5 0D - sta $2007 ; CPU:$D7D1 PRG:17D1 8D 07 20 + sta PPUDATA ; CPU:$D7D1 PRG:17D1 8D 07 20 dex ; CPU:$D7D4 PRG:17D4 CA bpl DrawBonusResultScreen_Block_2 ; CPU:$D7D5 PRG:17D5 10 F8 lda #$00 ; CPU:$D7D7 PRG:17D7 A9 00 - sta $2007 ; CPU:$D7D9 PRG:17D9 8D 07 20 + sta PPUDATA ; CPU:$D7D9 PRG:17D9 8D 07 20 lda #$24 ; CPU:$D7DC PRG:17DC A9 24 - sta $2007 ; CPU:$D7DE PRG:17DE 8D 07 20 - sta $2007 ; CPU:$D7E1 PRG:17E1 8D 07 20 - lda $16 ; CPU:$D7E4 PRG:17E4 A5 16 + sta PPUDATA ; CPU:$D7DE PRG:17DE 8D 07 20 + sta PPUDATA ; CPU:$D7E1 PRG:17E1 8D 07 20 + lda RenderingDisabledFlag ; CPU:$D7E4 PRG:17E4 A5 16 bne DrawBonusValueDigits ; CPU:$D7E6 PRG:17E6 D0 6A - lda $40 ; CPU:$D7E8 PRG:17E8 A5 40 + lda PlayerCountMinusOne ; CPU:$D7E8 PRG:17E8 A5 40 beq DrawBonusResultScreen_Block_4 ; CPU:$D7EA PRG:17EA F0 14 lda #$8F ; CPU:$D7EC PRG:17EC A9 8F - sta $2007 ; CPU:$D7EE PRG:17EE 8D 07 20 + sta PPUDATA ; CPU:$D7EE PRG:17EE 8D 07 20 ldx #$04 ; CPU:$D7F1 PRG:17F1 A2 04 DrawBonusResultScreen_Block_3: lda $08,x ; CPU:$D7F3 PRG:17F3 B5 08 - sta $2007 ; CPU:$D7F5 PRG:17F5 8D 07 20 + sta PPUDATA ; CPU:$D7F5 PRG:17F5 8D 07 20 dex ; CPU:$D7F8 PRG:17F8 CA bpl DrawBonusResultScreen_Block_3 ; CPU:$D7F9 PRG:17F9 10 F8 lda #$00 ; CPU:$D7FB PRG:17FB A9 00 - sta $2007 ; CPU:$D7FD PRG:17FD 8D 07 20 + sta PPUDATA ; CPU:$D7FD PRG:17FD 8D 07 20 DrawBonusResultScreen_Block_4: - dec $46 ; CPU:$D800 PRG:1800 C6 46 + dec SequenceStep ; CPU:$D800 PRG:1800 C6 46 rts ; CPU:$D802 PRG:1802 60 DrawBonusResultScreen_Block_5: - dec $46 ; CPU:$D803 PRG:1803 C6 46 + dec SequenceStep ; CPU:$D803 PRG:1803 C6 46 lda #$20 ; CPU:$D805 PRG:1805 A9 20 - sta $2006 ; CPU:$D807 PRG:1807 8D 06 20 + sta PPUADDR ; CPU:$D807 PRG:1807 8D 06 20 lda #$62 ; CPU:$D80A PRG:180A A9 62 - sta $2006 ; CPU:$D80C PRG:180C 8D 06 20 - lda $41 ; CPU:$D80F PRG:180F A5 41 + sta PPUADDR ; CPU:$D80C PRG:180C 8D 06 20 + lda PlayerActiveFlags ; CPU:$D80F PRG:180F A5 41 jsr DrawBonusMeter ; CPU:$D811 PRG:1811 20 26 D8 - lda $40 ; CPU:$D814 PRG:1814 A5 40 + lda PlayerCountMinusOne ; CPU:$D814 PRG:1814 A5 40 beq DrawBonusMeter_Block_3 ; CPU:$D816 PRG:1816 F0 20 lda #$20 ; CPU:$D818 PRG:1818 A9 20 - sta $2006 ; CPU:$D81A PRG:181A 8D 06 20 + sta PPUADDR ; CPU:$D81A PRG:181A 8D 06 20 lda #$75 ; CPU:$D81D PRG:181D A9 75 - sta $2006 ; CPU:$D81F PRG:181F 8D 06 20 + sta PPUADDR ; CPU:$D81F PRG:181F 8D 06 20 lda $42 ; CPU:$D822 PRG:1822 A5 42 DrawBonusMeter: bmi DrawBonusMeter_Block_4 ; CPU:$D824 PRG:1824 30 13 DrawBonusMeter_Block: - sta $50 ; CPU:$D826 PRG:1826 85 50 + sta PpuDestinationHi ; CPU:$D826 PRG:1826 85 50 ldx #$06 ; CPU:$D828 PRG:1828 A2 06 DrawBonusMeter_Block_1: lda #$24 ; CPU:$D82A PRG:182A A9 24 - cpx $50 ; CPU:$D82C PRG:182C E4 50 + cpx PpuDestinationHi ; CPU:$D82C PRG:182C E4 50 bcs DrawBonusMeter_Block_2 ; CPU:$D82E PRG:182E B0 02 lda #$2A ; CPU:$D830 PRG:1830 A9 2A DrawBonusMeter_Block_2: - sta $2007 ; CPU:$D832 PRG:1832 8D 07 20 + sta PPUDATA ; CPU:$D832 PRG:1832 8D 07 20 dex ; CPU:$D835 PRG:1835 CA bpl DrawBonusMeter_Block_1 ; CPU:$D836 PRG:1836 10 F2 DrawBonusMeter_Block_3: rts ; CPU:$D838 PRG:1838 60 DrawBonusMeter_Block_4: - lda $40 ; CPU:$D839 PRG:1839 A5 40 + lda PlayerCountMinusOne ; CPU:$D839 PRG:1839 A5 40 beq DrawBonusMeter_Block ; CPU:$D83B PRG:183B F0 E9 ldx #$08 ; CPU:$D83D PRG:183D A2 08 DrawBonusMeter_Block_5: lda BonusLabelTiles,x ; CPU:$D83F PRG:183F BD 4B D8 - sta $2007 ; CPU:$D842 PRG:1842 8D 07 20 + sta PPUDATA ; CPU:$D842 PRG:1842 8D 07 20 dex ; CPU:$D845 PRG:1845 CA bpl DrawBonusMeter_Block_5 ; CPU:$D846 PRG:1846 10 F7 rts ; CPU:$D848 PRG:1848 60 @@ -4399,21 +4399,21 @@ DrawBonusValueDigits: ldy #$04 ; CPU:$D852 PRG:1852 A0 04 DrawBonusValueDigits_Block: lda BonusDigitOffsetTable,y ; CPU:$D854 PRG:1854 B9 6C D8 - sta $2007 ; CPU:$D857 PRG:1857 8D 07 20 + sta PPUDATA ; CPU:$D857 PRG:1857 8D 07 20 dey ; CPU:$D85A PRG:185A 88 bpl DrawBonusValueDigits_Block ; CPU:$D85B PRG:185B 10 F7 - lda $4A ; CPU:$D85D PRG:185D A5 4A - sta $2007 ; CPU:$D85F PRG:185F 8D 07 20 - lda $49 ; CPU:$D862 PRG:1862 A5 49 - sta $2007 ; CPU:$D864 PRG:1864 8D 07 20 - dec $46 ; CPU:$D867 PRG:1867 C6 46 + lda ScaledRecordValue ; CPU:$D85D PRG:185D A5 4A + sta PPUDATA ; CPU:$D85F PRG:185F 8D 07 20 + lda SelectedRecordIndexCopy ; CPU:$D862 PRG:1862 A5 49 + sta PPUDATA ; CPU:$D864 PRG:1864 8D 07 20 + dec SequenceStep ; CPU:$D867 PRG:1867 C6 46 rts ; CPU:$D869 PRG:1869 60 BonusDigitOffsetTable: .byte $FB, $FA, $F9, $F8, $F7 ; CPU:$D86A PRG:186A FB FA F9 F8 F7 CreateBonusResultSprites: - sta $12 ; CPU:$D86F PRG:186F 85 12 + sta Temp12 ; CPU:$D86F PRG:186F 85 12 stx $13 ; CPU:$D871 PRG:1871 86 13 - sty $14 ; CPU:$D873 PRG:1873 84 14 + sty SpawnParameter ; CPU:$D873 PRG:1873 84 14 ldx #$01 ; CPU:$D875 PRG:1875 A2 01 CreateBonusResultSprites_Block: lda $061A,x ; CPU:$D877 PRG:1877 BD 1A 06 @@ -4428,7 +4428,7 @@ CreateBonusResultSprites_Block: CreateBonusResultSprites_Block_1: lda #$64 ; CPU:$D88A PRG:188A A9 64 sta $0618,x ; CPU:$D88C PRG:188C 9D 18 06 - lda $12 ; CPU:$D88F PRG:188F A5 12 + lda Temp12 ; CPU:$D88F PRG:188F A5 12 sta $061A,x ; CPU:$D891 PRG:1891 9D 1A 06 tay ; CPU:$D894 PRG:1894 A8 txa ; CPU:$D895 PRG:1895 8A @@ -4441,22 +4441,22 @@ CreateBonusResultSprites_Block_1: lda BonusSpriteTileTableB,y ; CPU:$D8A0 PRG:18A0 B9 D7 D8 sta $02F5,x ; CPU:$D8A3 PRG:18A3 9D F5 02 ldy $13 ; CPU:$D8A6 PRG:18A6 A4 13 - lda a:$009A,y ; CPU:$D8A8 PRG:18A8 B9 9A 00 + lda a:PlayerPosY,y ; CPU:$D8A8 PRG:18A8 B9 9A 00 sec ; CPU:$D8AB PRG:18AB 38 sbc #$08 ; CPU:$D8AC PRG:18AC E9 08 sta $02F0,x ; CPU:$D8AE PRG:18AE 9D F0 02 sta $02F4,x ; CPU:$D8B1 PRG:18B1 9D F4 02 - lda a:$0091,y ; CPU:$D8B4 PRG:18B4 B9 91 00 + lda a:PlayerPosX,y ; CPU:$D8B4 PRG:18B4 B9 91 00 sta $02F3,x ; CPU:$D8B7 PRG:18B7 9D F3 02 clc ; CPU:$D8BA PRG:18BA 18 adc #$08 ; CPU:$D8BB PRG:18BB 69 08 sta $02F7,x ; CPU:$D8BD PRG:18BD 9D F7 02 - lda $3E ; CPU:$D8C0 PRG:18C0 A5 3E + lda CurrentObjectIndex ; CPU:$D8C0 PRG:18C0 A5 3E sta $02F2,x ; CPU:$D8C2 PRG:18C2 9D F2 02 sta $02F6,x ; CPU:$D8C5 PRG:18C5 9D F6 02 - ldy $14 ; CPU:$D8C8 PRG:18C8 A4 14 + ldy SpawnParameter ; CPU:$D8C8 PRG:18C8 A4 14 ldx $13 ; CPU:$D8CA PRG:18CA A6 13 - lda $12 ; CPU:$D8CC PRG:18CC A5 12 + lda Temp12 ; CPU:$D8CC PRG:18CC A5 12 rts ; CPU:$D8CE PRG:18CE 60 BonusSpriteTileTableA: .byte $F4, $F5, $F6, $F7, $F8, $F9 ; CPU:$D8CF PRG:18CF F4 F5 F6 F7 F8 F9 @@ -4496,12 +4496,12 @@ ClearBonusResultSprites_Block: ClearBonusResultSprites_Block_1: jsr $D246 ; CPU:$D90D PRG:190D 20 46 D2 jsr $C10A ; CPU:$D910 PRG:1910 20 0A C1 - jsr $F465 ; CPU:$D913 PRG:1913 20 65 F4 + jsr WaitForFrame ; CPU:$D913 PRG:1913 20 65 F4 jsr $C0FA ; CPU:$D916 PRG:1916 20 FA C0 lda #$2C ; CPU:$D919 PRG:1919 A9 2C - sta $1D ; CPU:$D91B PRG:191B 85 1D + sta RecordPtrLo ; CPU:$D91B PRG:191B 85 1D lda #$D9 ; CPU:$D91D PRG:191D A9 D9 - sta $1E ; CPU:$D91F PRG:191F 85 1E + sta RecordPtrHi ; CPU:$D91F PRG:191F 85 1E jsr $D497 ; CPU:$D921 PRG:1921 20 97 D4 jsr $C104 ; CPU:$D924 PRG:1924 20 04 C1 jmp $C115 ; CPU:$D927 PRG:1927 4C 15 C1 @@ -4563,10 +4563,10 @@ RunTitleMenuLoop: jsr $C104 ; CPU:$DABF PRG:1ABF 20 04 C1 jsr $D90F ; CPU:$DAC2 PRG:1AC2 20 0F D9 lda #$00 ; CPU:$DAC5 PRG:1AC5 A9 00 - sta $19 ; CPU:$DAC7 PRG:1AC7 85 19 + sta FrameCounter ; CPU:$DAC7 PRG:1AC7 85 19 RunTitleMenuLoop_Block: - jsr $F465 ; CPU:$DAC9 PRG:1AC9 20 65 F4 - lda $19 ; CPU:$DACC PRG:1ACC A5 19 + jsr WaitForFrame ; CPU:$DAC9 PRG:1AC9 20 65 F4 + lda FrameCounter ; CPU:$DACC PRG:1ACC A5 19 beq RunTitleMenuLoop_Block_3 ; CPU:$DACE PRG:1ACE F0 1F jsr ApplySelectedGameMode ; CPU:$DAD0 PRG:1AD0 20 08 DB jsr $E768 ; CPU:$DAD3 PRG:1AD3 20 68 E7 @@ -4577,7 +4577,7 @@ RunTitleMenuLoop_Block: and #$20 ; CPU:$DADC PRG:1ADC 29 20 beq RunTitleMenuLoop_Block_1 ; CPU:$DADE PRG:1ADE F0 0B lda #$00 ; CPU:$DAE0 PRG:1AE0 A9 00 - sta $19 ; CPU:$DAE2 PRG:1AE2 85 19 + sta FrameCounter ; CPU:$DAE2 PRG:1AE2 85 19 ldx $3F ; CPU:$DAE4 PRG:1AE4 A6 3F lda GameModePlayerCountTable,x ; CPU:$DAE6 PRG:1AE6 BD 05 DB sta $3F ; CPU:$DAE9 PRG:1AE9 85 3F @@ -4587,31 +4587,31 @@ RunTitleMenuLoop_Block_2: rts ; CPU:$DAEE PRG:1AEE 60 RunTitleMenuLoop_Block_3: inc $3A ; CPU:$DAEF PRG:1AEF E6 3A - inc $40 ; CPU:$DAF1 PRG:1AF1 E6 40 + inc PlayerCountMinusOne ; CPU:$DAF1 PRG:1AF1 E6 40 lda #$00 ; CPU:$DAF3 PRG:1AF3 A9 00 - sta $4015 ; CPU:$DAF5 PRG:1AF5 8D 15 40 - sta $16 ; CPU:$DAF8 PRG:1AF8 85 16 + sta APUCTRL ; CPU:$DAF5 PRG:1AF5 8D 15 40 + sta RenderingDisabledFlag ; CPU:$DAF8 PRG:1AF8 85 16 jsr $F1F2 ; CPU:$DAFA PRG:1AFA 20 F2 F1 lda #$00 ; CPU:$DAFD PRG:1AFD A9 00 sta $3A ; CPU:$DAFF PRG:1AFF 85 3A beq RunTitleMenuLoop ; CPU:$DB01 PRG:1B01 F0 BC GameModePlayerCountTable: - ora ($02,x) ; CPU:$DB03 PRG:1B03 01 02 + ora (NmiCompletedFlag,x) ; CPU:$DB03 PRG:1B03 01 02 brk ; CPU:$DB05 PRG:1B05 00 ApplySelectedGameMode: lda $3F ; CPU:$DB06 PRG:1B06 A5 3F lsr a ; CPU:$DB08 PRG:1B08 4A - sta $16 ; CPU:$DB09 PRG:1B09 85 16 + sta RenderingDisabledFlag ; CPU:$DB09 PRG:1B09 85 16 lda $3F ; CPU:$DB0B PRG:1B0B A5 3F tax ; CPU:$DB0D PRG:1B0D AA and #$01 ; CPU:$DB0E PRG:1B0E 29 01 - sta $40 ; CPU:$DB10 PRG:1B10 85 40 + sta PlayerCountMinusOne ; CPU:$DB10 PRG:1B10 85 40 lda StageDataPointerTableLo,x ; CPU:$DB12 PRG:1B12 BD 27 DB - sta $057B ; CPU:$DB15 PRG:1B15 8D 7B 05 + sta ParticlePosY ; CPU:$DB15 PRG:1B15 8D 7B 05 lda #$2C ; CPU:$DB18 PRG:1B18 A9 2C - sta $0567 ; CPU:$DB1A PRG:1B1A 8D 67 05 + sta ParticlePosX ; CPU:$DB1A PRG:1B1A 8D 67 05 ldx #$00 ; CPU:$DB1D PRG:1B1D A2 00 - stx $055D ; CPU:$DB1F PRG:1B1F 8E 5D 05 + stx ParticleState ; CPU:$DB1F PRG:1B1F 8E 5D 05 jmp $CE2F ; CPU:$DB22 PRG:1B22 4C 2F CE ;=============================================================================== @@ -4965,16 +4965,16 @@ StageSetupPointerHiTable: ; Returns: selected OAM buffer updated; A/Y modified; X restored. RenderObjectSprites: lda StageSetupPointerLoTable,x ; CPU:$E3A2 PRG:23A2 BD 92 E3 - sta $1F ; CPU:$E3A5 PRG:23A5 85 1F - lda $19 ; CPU:$E3A7 PRG:23A7 A5 19 + sta DestinationPtrLo ; CPU:$E3A5 PRG:23A5 85 1F + lda FrameCounter ; CPU:$E3A7 PRG:23A7 A5 19 lsr a ; CPU:$E3A9 PRG:23A9 4A bcc RenderObjectSprites_Block ; CPU:$E3AA PRG:23AA 90 05 lda StageSetupPointerHiTable,x ; CPU:$E3AC PRG:23AC BD 9B E3 - sta $1F ; CPU:$E3AF PRG:23AF 85 1F + sta DestinationPtrLo ; CPU:$E3AF PRG:23AF 85 1F RenderObjectSprites_Block: lda #$02 ; CPU:$E3B1 PRG:23B1 A9 02 - sta $20 ; CPU:$E3B3 PRG:23B3 85 20 - lda $88,x ; CPU:$E3B5 PRG:23B5 B5 88 + sta DestinationPtrHi ; CPU:$E3B3 PRG:23B3 85 20 + lda PlayerSlotState,x ; CPU:$E3B5 PRG:23B5 B5 88 bpl RenderObjectSprites_Block_3 ; CPU:$E3B7 PRG:23B7 10 14 cmp #$FF ; CPU:$E3B9 PRG:23B9 C9 FF beq RenderObjectSprites_Block_1 ; CPU:$E3BB PRG:23BB F0 03 @@ -4983,7 +4983,7 @@ RenderObjectSprites_Block_1: ldy #$14 ; CPU:$E3C0 PRG:23C0 A0 14 RenderObjectSprites_Block_2: lda #$F0 ; CPU:$E3C2 PRG:23C2 A9 F0 - sta ($1F),y ; CPU:$E3C4 PRG:23C4 91 1F + sta (DestinationPtrLo),y ; CPU:$E3C4 PRG:23C4 91 1F dey ; CPU:$E3C6 PRG:23C6 88 dey ; CPU:$E3C7 PRG:23C7 88 dey ; CPU:$E3C8 PRG:23C8 88 @@ -4993,52 +4993,52 @@ RenderObjectSprites_Block_2: RenderObjectSprites_Block_3: cpx #$08 ; CPU:$E3CD PRG:23CD E0 08 beq RenderObjectSprites_Block_5 ; CPU:$E3CF PRG:23CF F0 48 - lda $7F,x ; CPU:$E3D1 PRG:23D1 B5 7F + lda PlayerLifecycleState,x ; CPU:$E3D1 PRG:23D1 B5 7F asl a ; CPU:$E3D3 PRG:23D3 0A asl a ; CPU:$E3D4 PRG:23D4 0A adc $0436,x ; CPU:$E3D5 PRG:23D5 7D 36 04 cpx #$02 ; CPU:$E3D8 PRG:23D8 E0 02 bcs RenderObjectSprites_Block_4 ; CPU:$E3DA PRG:23DA B0 2A - ldy $88,x ; CPU:$E3DC PRG:23DC B4 88 + ldy PlayerSlotState,x ; CPU:$E3DC PRG:23DC B4 88 adc $E34C,y ; CPU:$E3DE PRG:23DE 79 4C E3 tay ; CPU:$E3E1 PRG:23E1 A8 lda $E24C,y ; CPU:$E3E2 PRG:23E2 B9 4C E2 - sta $1D ; CPU:$E3E5 PRG:23E5 85 1D + sta RecordPtrLo ; CPU:$E3E5 PRG:23E5 85 1D lda $E298,y ; CPU:$E3E7 PRG:23E7 B9 98 E2 - sta $1E ; CPU:$E3EA PRG:23EA 85 1E - lda $BD,x ; CPU:$E3EC PRG:23EC B5 BD + sta RecordPtrHi ; CPU:$E3EA PRG:23EA 85 1E + lda PlayerCollisionDisable,x ; CPU:$E3EC PRG:23EC B5 BD beq RenderObjectSprites_Load ; CPU:$E3EE PRG:23EE F0 37 - ldy $88,x ; CPU:$E3F0 PRG:23F0 B4 88 + ldy PlayerSlotState,x ; CPU:$E3F0 PRG:23F0 B4 88 lda $E34F,y ; CPU:$E3F2 PRG:23F2 B9 4F E3 adc $0436,x ; CPU:$E3F5 PRG:23F5 7D 36 04 tay ; CPU:$E3F8 PRG:23F8 A8 lda $E2E4,y ; CPU:$E3F9 PRG:23F9 B9 E4 E2 - sta $1D ; CPU:$E3FC PRG:23FC 85 1D + sta RecordPtrLo ; CPU:$E3FC PRG:23FC 85 1D lda $E2EC,y ; CPU:$E3FE PRG:23FE B9 EC E2 - sta $1E ; CPU:$E401 PRG:2401 85 1E + sta RecordPtrHi ; CPU:$E401 PRG:2401 85 1E jmp RenderObjectSprites_Load ; CPU:$E403 PRG:2403 4C 29 E4 RenderObjectSprites_Block_4: - ldy $88,x ; CPU:$E406 PRG:2406 B4 88 + ldy PlayerSlotState,x ; CPU:$E406 PRG:2406 B4 88 clc ; CPU:$E408 PRG:2408 18 adc $E352,y ; CPU:$E409 PRG:2409 79 52 E3 tay ; CPU:$E40C PRG:240C A8 lda $E2F4,y ; CPU:$E40D PRG:240D B9 F4 E2 - sta $1D ; CPU:$E410 PRG:2410 85 1D + sta RecordPtrLo ; CPU:$E410 PRG:2410 85 1D lda $E320,y ; CPU:$E412 PRG:2412 B9 20 E3 - sta $1E ; CPU:$E415 PRG:2415 85 1E + sta RecordPtrHi ; CPU:$E415 PRG:2415 85 1E bne RenderObjectSprites_Load ; CPU:$E417 PRG:2417 D0 0E RenderObjectSprites_Block_5: - ldy $7F,x ; CPU:$E419 PRG:2419 B4 7F + ldy PlayerLifecycleState,x ; CPU:$E419 PRG:2419 B4 7F bmi RenderObjectSprites_Block_1 ; CPU:$E41B PRG:241B 30 A3 lda $E384,y ; CPU:$E41D PRG:241D B9 84 E3 - sta $1D ; CPU:$E420 PRG:2420 85 1D + sta RecordPtrLo ; CPU:$E420 PRG:2420 85 1D lda $E38B,y ; CPU:$E422 PRG:2422 B9 8B E3 - sta $1E ; CPU:$E425 PRG:2425 85 1E + sta RecordPtrHi ; CPU:$E425 PRG:2425 85 1E RenderObjectSprites_Load: - lda $91,x ; CPU:$E427 PRG:2427 B5 91 - sta $15 ; CPU:$E429 PRG:2429 85 15 - lda $9A,x ; CPU:$E42B PRG:242B B5 9A - sta $12 ; CPU:$E42D PRG:242D 85 12 + lda PlayerPosX,x ; CPU:$E427 PRG:2427 B5 91 + sta SpawnPixelPosition ; CPU:$E429 PRG:2429 85 15 + lda PlayerPosY,x ; CPU:$E42B PRG:242B B5 9A + sta Temp12 ; CPU:$E42D PRG:242D 85 12 txa ; CPU:$E42F PRG:242F 8A beq RenderObjectSprites_Block_7 ; CPU:$E430 PRG:2430 F0 10 cpx #$01 ; CPU:$E432 PRG:2432 E0 01 @@ -5046,24 +5046,24 @@ RenderObjectSprites_Load: lda #$01 ; CPU:$E436 PRG:2436 A9 01 bne RenderObjectSprites_Block_7 ; CPU:$E438 PRG:2438 D0 08 RenderObjectSprites_Block_6: - lda $0451,x ; CPU:$E43A PRG:243A BD 51 04 + lda PlayerAnimationState,x ; CPU:$E43A PRG:243A BD 51 04 clc ; CPU:$E43D PRG:243D 18 adc #$02 ; CPU:$E43E PRG:243E 69 02 and #$03 ; CPU:$E440 PRG:2440 29 03 RenderObjectSprites_Block_7: - ldy $0448,x ; CPU:$E442 PRG:2442 BC 48 04 + ldy PlayerVariantTable,x ; CPU:$E442 PRG:2442 BC 48 04 beq RenderObjectSprites_Block_8 ; CPU:$E445 PRG:2445 F0 02 ora #$40 ; CPU:$E447 PRG:2447 09 40 RenderObjectSprites_Block_8: - ldy $88,x ; CPU:$E449 PRG:2449 B4 88 + ldy PlayerSlotState,x ; CPU:$E449 PRG:2449 B4 88 cpy #$02 ; CPU:$E44B PRG:244B C0 02 bne RenderObjectSprites_Block_9 ; CPU:$E44D PRG:244D D0 08 - ldy $7F,x ; CPU:$E44F PRG:244F B4 7F + ldy PlayerLifecycleState,x ; CPU:$E44F PRG:244F B4 7F cpy #$05 ; CPU:$E451 PRG:2451 C0 05 bne RenderObjectSprites_Block_9 ; CPU:$E453 PRG:2453 D0 02 eor #$40 ; CPU:$E455 PRG:2455 49 40 RenderObjectSprites_Block_9: - ldy $9A,x ; CPU:$E457 PRG:2457 B4 9A + ldy PlayerPosY,x ; CPU:$E457 PRG:2457 B4 9A cpy #$C9 ; CPU:$E459 PRG:2459 C0 C9 bcs RenderObjectSprites_Block_10 ; CPU:$E45B PRG:245B B0 04 cpx #$09 ; CPU:$E45D PRG:245D E0 09 @@ -5071,68 +5071,68 @@ RenderObjectSprites_Block_9: RenderObjectSprites_Block_10: ora #$20 ; CPU:$E461 PRG:2461 09 20 RenderObjectSprites_Block_11: - sta $14 ; CPU:$E463 PRG:2463 85 14 + sta SpawnParameter ; CPU:$E463 PRG:2463 85 14 lda #$43 ; CPU:$E465 PRG:2465 A9 43 - sta $21 ; CPU:$E467 PRG:2467 85 21 + sta PpuSourcePtrLo ; CPU:$E467 PRG:2467 85 21 lda #$E0 ; CPU:$E469 PRG:2469 A9 E0 - sta $22 ; CPU:$E46B PRG:246B 85 22 - lda $0448,x ; CPU:$E46D PRG:246D BD 48 04 + sta PpuSourcePtrHi ; CPU:$E46B PRG:246B 85 22 + lda PlayerVariantTable,x ; CPU:$E46D PRG:246D BD 48 04 beq RenderObjectSprites_Block_12 ; CPU:$E470 PRG:2470 F0 08 lda #$79 ; CPU:$E472 PRG:2472 A9 79 - sta $21 ; CPU:$E474 PRG:2474 85 21 + sta PpuSourcePtrLo ; CPU:$E474 PRG:2474 85 21 lda #$E0 ; CPU:$E476 PRG:2476 A9 E0 - sta $22 ; CPU:$E478 PRG:2478 85 22 + sta PpuSourcePtrHi ; CPU:$E478 PRG:2478 85 22 RenderObjectSprites_Block_12: ldy #$00 ; CPU:$E47A PRG:247A A0 00 - lda ($1D),y ; CPU:$E47C PRG:247C B1 1D - inc $1D ; CPU:$E47E PRG:247E E6 1D + lda (RecordPtrLo),y ; CPU:$E47C PRG:247C B1 1D + inc RecordPtrLo ; CPU:$E47E PRG:247E E6 1D bne RenderObjectSprites_Block_13 ; CPU:$E480 PRG:2480 D0 02 - inc $1E ; CPU:$E482 PRG:2482 E6 1E + inc RecordPtrHi ; CPU:$E482 PRG:2482 E6 1E RenderObjectSprites_Block_13: asl a ; CPU:$E484 PRG:2484 0A sta $13 ; CPU:$E485 PRG:2485 85 13 asl a ; CPU:$E487 PRG:2487 0A adc $13 ; CPU:$E488 PRG:2488 65 13 - adc $21 ; CPU:$E48A PRG:248A 65 21 - sta $21 ; CPU:$E48C PRG:248C 85 21 + adc PpuSourcePtrLo ; CPU:$E48A PRG:248A 65 21 + sta PpuSourcePtrLo ; CPU:$E48C PRG:248C 85 21 bcc RenderObjectSprites_Block_14 ; CPU:$E48E PRG:248E 90 02 - inc $22 ; CPU:$E490 PRG:2490 E6 22 + inc PpuSourcePtrHi ; CPU:$E490 PRG:2490 E6 22 RenderObjectSprites_Block_14: txa ; CPU:$E492 PRG:2492 8A pha ; CPU:$E493 PRG:2493 48 ldx #$05 ; CPU:$E494 PRG:2494 A2 05 ldy #$00 ; CPU:$E496 PRG:2496 A0 00 RenderObjectSprites_Block_15: - lda $12 ; CPU:$E498 PRG:2498 A5 12 + lda Temp12 ; CPU:$E498 PRG:2498 A5 12 clc ; CPU:$E49A PRG:249A 18 adc $E03D,x ; CPU:$E49B PRG:249B 7D 3D E0 - sta ($1F),y ; CPU:$E49E PRG:249E 91 1F - sta $12 ; CPU:$E4A0 PRG:24A0 85 12 + sta (DestinationPtrLo),y ; CPU:$E49E PRG:249E 91 1F + sta Temp12 ; CPU:$E4A0 PRG:24A0 85 12 iny ; CPU:$E4A2 PRG:24A2 C8 sty $13 ; CPU:$E4A3 PRG:24A3 84 13 ldy #$00 ; CPU:$E4A5 PRG:24A5 A0 00 - lda ($1D),y ; CPU:$E4A7 PRG:24A7 B1 1D - inc $1D ; CPU:$E4A9 PRG:24A9 E6 1D + lda (RecordPtrLo),y ; CPU:$E4A7 PRG:24A7 B1 1D + inc RecordPtrLo ; CPU:$E4A9 PRG:24A9 E6 1D bne RenderObjectSprites_Block_16 ; CPU:$E4AB PRG:24AB D0 02 - inc $1E ; CPU:$E4AD PRG:24AD E6 1E + inc RecordPtrHi ; CPU:$E4AD PRG:24AD E6 1E RenderObjectSprites_Block_16: ldy $13 ; CPU:$E4AF PRG:24AF A4 13 - sta ($1F),y ; CPU:$E4B1 PRG:24B1 91 1F + sta (DestinationPtrLo),y ; CPU:$E4B1 PRG:24B1 91 1F iny ; CPU:$E4B3 PRG:24B3 C8 - lda $14 ; CPU:$E4B4 PRG:24B4 A5 14 - sta ($1F),y ; CPU:$E4B6 PRG:24B6 91 1F + lda SpawnParameter ; CPU:$E4B4 PRG:24B4 A5 14 + sta (DestinationPtrLo),y ; CPU:$E4B6 PRG:24B6 91 1F iny ; CPU:$E4B8 PRG:24B8 C8 sty $13 ; CPU:$E4B9 PRG:24B9 84 13 ldy #$00 ; CPU:$E4BB PRG:24BB A0 00 - lda $15 ; CPU:$E4BD PRG:24BD A5 15 + lda SpawnPixelPosition ; CPU:$E4BD PRG:24BD A5 15 clc ; CPU:$E4BF PRG:24BF 18 - adc ($21),y ; CPU:$E4C0 PRG:24C0 71 21 - inc $21 ; CPU:$E4C2 PRG:24C2 E6 21 + adc (PpuSourcePtrLo),y ; CPU:$E4C0 PRG:24C0 71 21 + inc PpuSourcePtrLo ; CPU:$E4C2 PRG:24C2 E6 21 bne RenderObjectSprites_Block_17 ; CPU:$E4C4 PRG:24C4 D0 02 - inc $22 ; CPU:$E4C6 PRG:24C6 E6 22 + inc PpuSourcePtrHi ; CPU:$E4C6 PRG:24C6 E6 22 RenderObjectSprites_Block_17: ldy $13 ; CPU:$E4C8 PRG:24C8 A4 13 - sta ($1F),y ; CPU:$E4CA PRG:24CA 91 1F + sta (DestinationPtrLo),y ; CPU:$E4CA PRG:24CA 91 1F iny ; CPU:$E4CC PRG:24CC C8 dex ; CPU:$E4CD PRG:24CD CA bpl RenderObjectSprites_Block_15 ; CPU:$E4CE PRG:24CE 10 C8 @@ -5146,9 +5146,9 @@ RenderObjectSprites_Block_17: RenderLargeObjectSprites: txa ; CPU:$E4D3 PRG:24D3 8A pha ; CPU:$E4D4 PRG:24D4 48 - ldy $1F ; CPU:$E4D5 PRG:24D5 A4 1F - lda $9A,x ; CPU:$E4D7 PRG:24D7 B5 9A - sta $0200,y ; CPU:$E4D9 PRG:24D9 99 00 02 + ldy DestinationPtrLo ; CPU:$E4D5 PRG:24D5 A4 1F + lda PlayerPosY,x ; CPU:$E4D7 PRG:24D7 B5 9A + sta OamBuffer,y ; CPU:$E4D9 PRG:24D9 99 00 02 sta $0204,y ; CPU:$E4DC PRG:24DC 99 04 02 clc ; CPU:$E4DF PRG:24DF 18 adc #$08 ; CPU:$E4E0 PRG:24E0 69 08 @@ -5157,21 +5157,21 @@ RenderLargeObjectSprites: lda #$F0 ; CPU:$E4E8 PRG:24E8 A9 F0 sta $0210,y ; CPU:$E4EA PRG:24EA 99 10 02 sta $0214,y ; CPU:$E4ED PRG:24ED 99 14 02 - lda $91,x ; CPU:$E4F0 PRG:24F0 B5 91 + lda PlayerPosX,x ; CPU:$E4F0 PRG:24F0 B5 91 sta $0203,y ; CPU:$E4F2 PRG:24F2 99 03 02 sta $020B,y ; CPU:$E4F5 PRG:24F5 99 0B 02 clc ; CPU:$E4F8 PRG:24F8 18 adc #$08 ; CPU:$E4F9 PRG:24F9 69 08 sta $0207,y ; CPU:$E4FB PRG:24FB 99 07 02 sta $020F,y ; CPU:$E4FE PRG:24FE 99 0F 02 - lda $9A,x ; CPU:$E501 PRG:2501 B5 9A + lda PlayerPosY,x ; CPU:$E501 PRG:2501 B5 9A cmp #$D0 ; CPU:$E503 PRG:2503 C9 D0 lda #$03 ; CPU:$E505 PRG:2505 A9 03 bcc RenderLargeObjectSprites_Block ; CPU:$E507 PRG:2507 90 02 lda #$23 ; CPU:$E509 PRG:2509 A9 23 RenderLargeObjectSprites_Block: sta $0202,y ; CPU:$E50B PRG:250B 99 02 02 - lda $7F,x ; CPU:$E50E PRG:250E B5 7F + lda PlayerLifecycleState,x ; CPU:$E50E PRG:250E B5 7F bne RenderLargeObjectSprites_Block_3 ; CPU:$E510 PRG:2510 D0 3F lda $0202,y ; CPU:$E512 PRG:2512 B9 02 02 sta $0206,y ; CPU:$E515 PRG:2515 99 06 02 @@ -5185,14 +5185,14 @@ RenderLargeObjectSprites_Block: sta $0209,y ; CPU:$E52A PRG:252A 99 09 02 lda #$DD ; CPU:$E52D PRG:252D A9 DD sta $020D,y ; CPU:$E52F PRG:252F 99 0D 02 - ldx $1F ; CPU:$E532 PRG:2532 A6 1F - lda $19 ; CPU:$E534 PRG:2534 A5 19 + ldx DestinationPtrLo ; CPU:$E532 PRG:2532 A6 1F + lda FrameCounter ; CPU:$E534 PRG:2534 A5 19 and #$20 ; CPU:$E536 PRG:2536 29 20 beq RenderLargeObjectSprites_Block_2 ; CPU:$E538 PRG:2538 F0 14 - lda $19 ; CPU:$E53A PRG:253A A5 19 + lda FrameCounter ; CPU:$E53A PRG:253A A5 19 and #$40 ; CPU:$E53C PRG:253C 29 40 bne RenderLargeObjectSprites_Block_1 ; CPU:$E53E PRG:253E D0 08 - inc $0200,x ; CPU:$E540 PRG:2540 FE 00 02 + inc OamBuffer,x ; CPU:$E540 PRG:2540 FE 00 02 inc $0204,x ; CPU:$E543 PRG:2543 FE 04 02 bne RenderLargeObjectSprites_Block_2 ; CPU:$E546 PRG:2546 D0 06 RenderLargeObjectSprites_Block_1: @@ -5215,14 +5215,14 @@ RenderLargeObjectSprites_Block_3: sta $0205,y ; CPU:$E568 PRG:2568 99 05 02 sta $0209,y ; CPU:$E56B PRG:256B 99 09 02 sta $020D,y ; CPU:$E56E PRG:256E 99 0D 02 - dec $045A,x ; CPU:$E571 PRG:2571 DE 5A 04 + dec PlayerStateTimer,x ; CPU:$E571 PRG:2571 DE 5A 04 bpl RenderLargeObjectSprites_Block_4 ; CPU:$E574 PRG:2574 10 0C lda #$FF ; CPU:$E576 PRG:2576 A9 FF - sta $88,x ; CPU:$E578 PRG:2578 95 88 + sta PlayerSlotState,x ; CPU:$E578 PRG:2578 95 88 lda #$F0 ; CPU:$E57A PRG:257A A9 F0 - sta $9A,x ; CPU:$E57C PRG:257C 95 9A + sta PlayerPosY,x ; CPU:$E57C PRG:257C 95 9A lda #$04 ; CPU:$E57E PRG:257E A9 04 - sta $F1 ; CPU:$E580 PRG:2580 85 F1 + sta SoundRequestFlags1 ; CPU:$E580 PRG:2580 85 F1 RenderLargeObjectSprites_Block_4: pla ; CPU:$E582 PRG:2582 68 tax ; CPU:$E583 PRG:2583 AA @@ -5235,14 +5235,14 @@ CopyOverlaySpriteStream: ldx $BB ; CPU:$E585 PRG:2585 A6 BB bmi CopyOverlaySpriteStream_Block_3 ; CPU:$E587 PRG:2587 30 39 lda OverlaySpriteStreamLoTable,x ; CPU:$E589 PRG:2589 BD C5 E5 - sta $1D ; CPU:$E58C PRG:258C 85 1D + sta RecordPtrLo ; CPU:$E58C PRG:258C 85 1D lda OverlaySpriteStreamHiTable,x ; CPU:$E58E PRG:258E BD CA E5 - sta $1E ; CPU:$E591 PRG:2591 85 1E + sta RecordPtrHi ; CPU:$E591 PRG:2591 85 1E ldy #$00 ; CPU:$E593 PRG:2593 A0 00 ldx #$00 ; CPU:$E595 PRG:2595 A2 00 CopyOverlaySpriteStream_Block: - lda ($1D),y ; CPU:$E597 PRG:2597 B1 1D - sta $02E0,x ; CPU:$E599 PRG:2599 9D E0 02 + lda (RecordPtrLo),y ; CPU:$E597 PRG:2597 B1 1D + sta OamEntryE0Y,x ; CPU:$E599 PRG:2599 9D E0 02 iny ; CPU:$E59C PRG:259C C8 inx ; CPU:$E59D PRG:259D E8 cmp #$F0 ; CPU:$E59E PRG:259E C9 F0 @@ -5255,16 +5255,16 @@ CopyOverlaySpriteStream_Block_1: bne CopyOverlaySpriteStream_Block ; CPU:$E5A7 PRG:25A7 D0 EE ldy #$0F ; CPU:$E5A9 PRG:25A9 A0 0F CopyOverlaySpriteStream_Block_2: - lda $02E0,y ; CPU:$E5AB PRG:25AB B9 E0 02 + lda OamEntryE0Y,y ; CPU:$E5AB PRG:25AB B9 E0 02 clc ; CPU:$E5AE PRG:25AE 18 adc $BC ; CPU:$E5AF PRG:25AF 65 BC - sta $02E0,y ; CPU:$E5B1 PRG:25B1 99 E0 02 + sta OamEntryE0Y,y ; CPU:$E5B1 PRG:25B1 99 E0 02 dey ; CPU:$E5B4 PRG:25B4 88 dey ; CPU:$E5B5 PRG:25B5 88 dey ; CPU:$E5B6 PRG:25B6 88 dey ; CPU:$E5B7 PRG:25B7 88 bpl CopyOverlaySpriteStream_Block_2 ; CPU:$E5B8 PRG:25B8 10 F1 - lda $19 ; CPU:$E5BA PRG:25BA A5 19 + lda FrameCounter ; CPU:$E5BA PRG:25BA A5 19 and #$03 ; CPU:$E5BC PRG:25BC 29 03 bne CopyOverlaySpriteStream_Block_3 ; CPU:$E5BE PRG:25BE D0 02 dec $BB ; CPU:$E5C0 PRG:25C0 C6 BB @@ -5326,7 +5326,7 @@ UpdateAllObjects: jsr $EE25 ; CPU:$E68F PRG:268F 20 25 EE ldx #$07 ; CPU:$E692 PRG:2692 A2 07 UpdateAllObjects_Block: - lda $88,x ; CPU:$E694 PRG:2694 B5 88 + lda PlayerSlotState,x ; CPU:$E694 PRG:2694 B5 88 bpl UpdateAllObjects_Block_1 ; CPU:$E696 PRG:2696 10 0A cmp #$FF ; CPU:$E698 PRG:2698 C9 FF beq UpdateAllObjects_Block_5 ; CPU:$E69A PRG:269A F0 44 @@ -5337,12 +5337,12 @@ UpdateAllObjects_Block_1: bcc UpdateAllObjects_Block_2 ; CPU:$E6A4 PRG:26A4 90 10 cmp #$01 ; CPU:$E6A6 PRG:26A6 C9 01 bne UpdateAllObjects_Block_2 ; CPU:$E6A8 PRG:26A8 D0 0C - lda $7F,x ; CPU:$E6AA PRG:26AA B5 7F + lda PlayerLifecycleState,x ; CPU:$E6AA PRG:26AA B5 7F cmp #$02 ; CPU:$E6AC PRG:26AC C9 02 bcs UpdateAllObjects_Block_2 ; CPU:$E6AE PRG:26AE B0 06 - lda $F1 ; CPU:$E6B0 PRG:26B0 A5 F1 + lda SoundRequestFlags1 ; CPU:$E6B0 PRG:26B0 A5 F1 ora #$20 ; CPU:$E6B2 PRG:26B2 09 20 - sta $F1 ; CPU:$E6B4 PRG:26B4 85 F1 + sta SoundRequestFlags1 ; CPU:$E6B4 PRG:26B4 85 F1 UpdateAllObjects_Block_2: dec $043F,x ; CPU:$E6B6 PRG:26B6 DE 3F 04 bne UpdateAllObjects_Block_4 ; CPU:$E6B9 PRG:26B9 D0 1C @@ -5353,18 +5353,18 @@ UpdateAllObjects_Block_2: dec $BF,x ; CPU:$E6C4 PRG:26C4 D6 BF bne UpdateAllObjects_Block_3 ; CPU:$E6C6 PRG:26C6 D0 04 lda #$00 ; CPU:$E6C8 PRG:26C8 A9 00 - sta $BD,x ; CPU:$E6CA PRG:26CA 95 BD + sta PlayerCollisionDisable,x ; CPU:$E6CA PRG:26CA 95 BD UpdateAllObjects_Block_3: jsr $EA18 ; CPU:$E6CC PRG:26CC 20 18 EA - stx $3E ; CPU:$E6CF PRG:26CF 86 3E + stx CurrentObjectIndex ; CPU:$E6CF PRG:26CF 86 3E jsr $EBC4 ; CPU:$E6D1 PRG:26D1 20 C4 EB jsr $E796 ; CPU:$E6D4 PRG:26D4 20 96 E7 UpdateAllObjects_Block_4: jsr $EA58 ; CPU:$E6D7 PRG:26D7 20 58 EA jsr $ED28 ; CPU:$E6DA PRG:26DA 20 28 ED - jsr $E983 ; CPU:$E6DD PRG:26DD 20 83 E9 + jsr ApplyBonusEffect ; CPU:$E6DD PRG:26DD 20 83 E9 UpdateAllObjects_Block_5: - jsr $E3A4 ; CPU:$E6E0 PRG:26E0 20 A4 E3 + jsr BuildObjectMetasprite ; CPU:$E6E0 PRG:26E0 20 A4 E3 dex ; CPU:$E6E3 PRG:26E3 CA bpl UpdateAllObjects_Block ; CPU:$E6E4 PRG:26E4 10 AE rts ; CPU:$E6E6 PRG:26E6 60 @@ -5375,10 +5375,10 @@ UpdateAllObjects_Block_5: UpdatePlayerInputState: cpx #$02 ; CPU:$E6E7 PRG:26E7 E0 02 bcs UpdatePlayerInputState_Block_2 ; CPU:$E6E9 PRG:26E9 B0 18 - lda $19 ; CPU:$E6EB PRG:26EB A5 19 + lda FrameCounter ; CPU:$E6EB PRG:26EB A5 19 and #$0F ; CPU:$E6ED PRG:26ED 29 0F bne UpdatePlayerInputState_Block ; CPU:$E6EF PRG:26EF D0 05 - jsr $F1B3 ; CPU:$E6F1 PRG:26F1 20 B3 F1 + jsr GetRandomValue ; CPU:$E6F1 PRG:26F1 20 B3 F1 sta $31,x ; CPU:$E6F4 PRG:26F4 95 31 UpdatePlayerInputState_Block: lda $3A ; CPU:$E6F6 PRG:26F6 A5 3A @@ -5389,7 +5389,7 @@ UpdatePlayerInputState_Block: UpdatePlayerInputState_Block_1: rts ; CPU:$E702 PRG:2702 60 UpdatePlayerInputState_Block_2: - lda $9A,x ; CPU:$E703 PRG:2703 B5 9A + lda PlayerPosY,x ; CPU:$E703 PRG:2703 B5 9A cmp #$A0 ; CPU:$E705 PRG:2705 C9 A0 bcc UpdatePlayerInputState_Block_3 ; CPU:$E707 PRG:2707 90 07 lda $31,x ; CPU:$E709 PRG:2709 B5 31 @@ -5397,37 +5397,37 @@ UpdatePlayerInputState_Block_2: sta $31,x ; CPU:$E70D PRG:270D 95 31 rts ; CPU:$E70F PRG:270F 60 UpdatePlayerInputState_Block_3: - dec $045A,x ; CPU:$E710 PRG:2710 DE 5A 04 + dec PlayerStateTimer,x ; CPU:$E710 PRG:2710 DE 5A 04 bne UpdatePlayerInputState_Block_1 ; CPU:$E713 PRG:2713 D0 ED - jsr $F1B3 ; CPU:$E715 PRG:2715 20 B3 F1 - ldy $0451,x ; CPU:$E718 PRG:2718 BC 51 04 + jsr GetRandomValue ; CPU:$E715 PRG:2715 20 B3 F1 + ldy PlayerAnimationState,x ; CPU:$E718 PRG:2718 BC 51 04 and ObjectAnimationPeriodTable,y ; CPU:$E71B PRG:271B 39 62 E7 adc ControllerBitMaskTable,y ; CPU:$E71E PRG:271E 79 65 E7 - sta $045A,x ; CPU:$E721 PRG:2721 9D 5A 04 - stx $12 ; CPU:$E724 PRG:2724 86 12 - lda $19 ; CPU:$E726 PRG:2726 A5 19 + sta PlayerStateTimer,x ; CPU:$E721 PRG:2721 9D 5A 04 + stx Temp12 ; CPU:$E724 PRG:2724 86 12 + lda FrameCounter ; CPU:$E726 PRG:2726 A5 19 rol a ; CPU:$E728 PRG:2728 2A rol a ; CPU:$E729 PRG:2729 2A - eor $12 ; CPU:$E72A PRG:272A 45 12 + eor Temp12 ; CPU:$E72A PRG:272A 45 12 and #$01 ; CPU:$E72C PRG:272C 29 01 tay ; CPU:$E72E PRG:272E A8 - lda a:$0088,y ; CPU:$E72F PRG:272F B9 88 00 + lda a:PlayerSlotState,y ; CPU:$E72F PRG:272F B9 88 00 bmi UpdatePlayerInputState_Block_4 ; CPU:$E732 PRG:2732 30 13 - lda a:$00BD,y ; CPU:$E734 PRG:2734 B9 BD 00 + lda a:PlayerCollisionDisable,y ; CPU:$E734 PRG:2734 B9 BD 00 bne UpdatePlayerInputState_Block_4 ; CPU:$E737 PRG:2737 D0 0E lda #$00 ; CPU:$E739 PRG:2739 A9 00 sta $31,x ; CPU:$E73B PRG:273B 95 31 - lda a:$009A,y ; CPU:$E73D PRG:273D B9 9A 00 + lda a:PlayerPosY,y ; CPU:$E73D PRG:273D B9 9A 00 sec ; CPU:$E740 PRG:2740 38 sbc #$04 ; CPU:$E741 PRG:2741 E9 04 - cmp $9A,x ; CPU:$E743 PRG:2743 D5 9A + cmp PlayerPosY,x ; CPU:$E743 PRG:2743 D5 9A bcs UpdatePlayerInputState_Block_5 ; CPU:$E745 PRG:2745 B0 04 UpdatePlayerInputState_Block_4: lda #$40 ; CPU:$E747 PRG:2747 A9 40 sta $31,x ; CPU:$E749 PRG:2749 95 31 UpdatePlayerInputState_Block_5: - lda $91,x ; CPU:$E74B PRG:274B B5 91 - cmp a:$0091,y ; CPU:$E74D PRG:274D D9 91 00 + lda PlayerPosX,x ; CPU:$E74B PRG:274B B5 91 + cmp a:PlayerPosX,y ; CPU:$E74D PRG:274D D9 91 00 bcs UpdatePlayerInputState_Block_6 ; CPU:$E750 PRG:2750 B0 07 lda $31,x ; CPU:$E752 PRG:2752 B5 31 ora #$01 ; CPU:$E754 PRG:2754 09 01 @@ -5456,15 +5456,15 @@ PollControllers: ldx #$00 ; CPU:$E766 PRG:2766 A2 00 ReadControllerPort: lda #$01 ; CPU:$E768 PRG:2768 A9 01 - sta $4016 ; CPU:$E76A PRG:276A 8D 16 40 + sta JOY1 ; CPU:$E76A PRG:276A 8D 16 40 lda #$00 ; CPU:$E76D PRG:276D A9 00 - sta $4016 ; CPU:$E76F PRG:276F 8D 16 40 + sta JOY1 ; CPU:$E76F PRG:276F 8D 16 40 ldy #$07 ; CPU:$E772 PRG:2772 A0 07 ReadControllerPort_Block: - lda $4016,x ; CPU:$E774 PRG:2774 BD 16 40 - sta $12 ; CPU:$E777 PRG:2777 85 12 + lda JOY1,x ; CPU:$E774 PRG:2774 BD 16 40 + sta Temp12 ; CPU:$E777 PRG:2777 85 12 lsr a ; CPU:$E779 PRG:2779 4A - ora $12 ; CPU:$E77A PRG:277A 05 12 + ora Temp12 ; CPU:$E77A PRG:277A 05 12 lsr a ; CPU:$E77C PRG:277C 4A rol $061C,x ; CPU:$E77D PRG:277D 3E 1C 06 dey ; CPU:$E780 PRG:2780 88 @@ -5481,19 +5481,19 @@ ReadControllerPort_Block: ; Inputs: X = object slot. ; Returns: per-object fixed-point motion values updated. UpdateObjectMotionState: - lda $88,x ; CPU:$E794 PRG:2794 B5 88 + lda PlayerSlotState,x ; CPU:$E794 PRG:2794 B5 88 bne UpdateObjectMotionState_Block_1 ; CPU:$E796 PRG:2796 D0 09 UpdateObjectMotionState_Block: lda #$00 ; CPU:$E798 PRG:2798 A9 00 sta $0424,x ; CPU:$E79A PRG:279A 9D 24 04 - sta $042D,x ; CPU:$E79D PRG:279D 9D 2D 04 + sta PlayerVerticalImpulse,x ; CPU:$E79D PRG:279D 9D 2D 04 rts ; CPU:$E7A0 PRG:27A0 60 UpdateObjectMotionState_Block_1: cmp #$02 ; CPU:$E7A1 PRG:27A1 C9 02 beq UpdateObjectVelocity_Block ; CPU:$E7A3 PRG:27A3 F0 41 cpx #$02 ; CPU:$E7A5 PRG:27A5 E0 02 bcc UpdateObjectVelocity_Block ; CPU:$E7A7 PRG:27A7 90 3D - lda $7F,x ; CPU:$E7A9 PRG:27A9 B5 7F + lda PlayerLifecycleState,x ; CPU:$E7A9 PRG:27A9 B5 7F cmp #$02 ; CPU:$E7AB PRG:27AB C9 02 bcs UpdateObjectMotionState_Block ; CPU:$E7AD PRG:27AD B0 E9 ; UpdateObjectVelocity @@ -5502,54 +5502,54 @@ UpdateObjectMotionState_Block_1: ; Returns: state $7F,X, facing $0448,X, and velocity $0424/$042D updated. UpdateObjectVelocity: lda $0424,x ; CPU:$E7AF PRG:27AF BD 24 04 - sta $12 ; CPU:$E7B2 PRG:27B2 85 12 - lda $042D,x ; CPU:$E7B4 PRG:27B4 BD 2D 04 - sta $13 ; CPU:$E7B7 PRG:27B7 85 13 - jsr $F1A6 ; CPU:$E7B9 PRG:27B9 20 A6 F1 + sta MotionDeltaLo ; CPU:$E7B2 PRG:27B2 85 12 + lda PlayerVerticalImpulse,x ; CPU:$E7B4 PRG:27B4 BD 2D 04 + sta MotionDeltaHi ; CPU:$E7B7 PRG:27B7 85 13 + jsr UpdateSignedMotionAccumulator ; CPU:$E7B9 PRG:27B9 20 A6 F1 lda $0463,x ; CPU:$E7BC PRG:27BC BD 63 04 clc ; CPU:$E7BF PRG:27BF 18 - adc $12 ; CPU:$E7C0 PRG:27C0 65 12 + adc MotionDeltaLo ; CPU:$E7C0 PRG:27C0 65 12 sta $0463,x ; CPU:$E7C2 PRG:27C2 9D 63 04 - sta $12 ; CPU:$E7C5 PRG:27C5 85 12 + sta MotionDeltaLo ; CPU:$E7C5 PRG:27C5 85 12 lda $046C,x ; CPU:$E7C7 PRG:27C7 BD 6C 04 - adc $13 ; CPU:$E7CA PRG:27CA 65 13 + adc MotionDeltaHi ; CPU:$E7CA PRG:27CA 65 13 sta $046C,x ; CPU:$E7CC PRG:27CC 9D 6C 04 - sta $13 ; CPU:$E7CF PRG:27CF 85 13 - jsr $F1A6 ; CPU:$E7D1 PRG:27D1 20 A6 F1 + sta MotionDeltaHi ; CPU:$E7CF PRG:27CF 85 13 + jsr UpdateSignedMotionAccumulator ; CPU:$E7D1 PRG:27D1 20 A6 F1 lda $0424,x ; CPU:$E7D4 PRG:27D4 BD 24 04 sec ; CPU:$E7D7 PRG:27D7 38 - sbc $12 ; CPU:$E7D8 PRG:27D8 E5 12 + sbc MotionDeltaLo ; CPU:$E7D8 PRG:27D8 E5 12 sta $0424,x ; CPU:$E7DA PRG:27DA 9D 24 04 - lda $042D,x ; CPU:$E7DD PRG:27DD BD 2D 04 - sbc $13 ; CPU:$E7E0 PRG:27E0 E5 13 - sta $042D,x ; CPU:$E7E2 PRG:27E2 9D 2D 04 + lda PlayerVerticalImpulse,x ; CPU:$E7DD PRG:27DD BD 2D 04 + sbc MotionDeltaHi ; CPU:$E7E0 PRG:27E0 E5 13 + sta PlayerVerticalImpulse,x ; CPU:$E7E2 PRG:27E2 9D 2D 04 rts ; CPU:$E7E5 PRG:27E5 60 UpdateObjectVelocity_Block: - lda $7F,x ; CPU:$E7E6 PRG:27E6 B5 7F + lda PlayerLifecycleState,x ; CPU:$E7E6 PRG:27E6 B5 7F cmp #$06 ; CPU:$E7E8 PRG:27E8 C9 06 bcc UpdateObjectVelocity_Block_1 ; CPU:$E7EA PRG:27EA 90 01 rts ; CPU:$E7EC PRG:27EC 60 UpdateObjectVelocity_Block_1: - lda $7F,x ; CPU:$E7ED PRG:27ED B5 7F + lda PlayerLifecycleState,x ; CPU:$E7ED PRG:27ED B5 7F cmp #$04 ; CPU:$E7EF PRG:27EF C9 04 bne UpdateObjectVelocity_Block_4 ; CPU:$E7F1 PRG:27F1 D0 1C lda $31,x ; CPU:$E7F3 PRG:27F3 B5 31 and #$02 ; CPU:$E7F5 PRG:27F5 29 02 beq UpdateObjectVelocity_Block_2 ; CPU:$E7F7 PRG:27F7 F0 07 - lda $0448,x ; CPU:$E7F9 PRG:27F9 BD 48 04 + lda PlayerVariantTable,x ; CPU:$E7F9 PRG:27F9 BD 48 04 beq UpdateObjectVelocity_Block_4 ; CPU:$E7FC PRG:27FC F0 11 bne UpdateObjectVelocity_Block_3 ; CPU:$E7FE PRG:27FE D0 0B UpdateObjectVelocity_Block_2: lda $31,x ; CPU:$E800 PRG:2800 B5 31 and #$01 ; CPU:$E802 PRG:2802 29 01 beq UpdateObjectVelocity_Block_4 ; CPU:$E804 PRG:2804 F0 09 - lda $0448,x ; CPU:$E806 PRG:2806 BD 48 04 + lda PlayerVariantTable,x ; CPU:$E806 PRG:2806 BD 48 04 bne UpdateObjectVelocity_Block_4 ; CPU:$E809 PRG:2809 D0 04 UpdateObjectVelocity_Block_3: lda #$05 ; CPU:$E80B PRG:280B A9 05 - sta $7F,x ; CPU:$E80D PRG:280D 95 7F + sta PlayerLifecycleState,x ; CPU:$E80D PRG:280D 95 7F UpdateObjectVelocity_Block_4: - lda $7F,x ; CPU:$E80F PRG:280F B5 7F + lda PlayerLifecycleState,x ; CPU:$E80F PRG:280F B5 7F cmp #$02 ; CPU:$E811 PRG:2811 C9 02 bne UpdateObjectVelocity_Block_8 ; CPU:$E813 PRG:2813 D0 1B lda $31,x ; CPU:$E815 PRG:2815 B5 31 @@ -5563,41 +5563,41 @@ UpdateObjectVelocity_Block_5: beq UpdateObjectVelocity_Block_7 ; CPU:$E823 PRG:2823 F0 07 lda #$01 ; CPU:$E825 PRG:2825 A9 01 UpdateObjectVelocity_Block_6: - cmp $0448,x ; CPU:$E827 PRG:2827 DD 48 04 + cmp PlayerVariantTable,x ; CPU:$E827 PRG:2827 DD 48 04 beq UpdateObjectVelocity_Block_8 ; CPU:$E82A PRG:282A F0 04 UpdateObjectVelocity_Block_7: lda #$04 ; CPU:$E82C PRG:282C A9 04 - sta $7F,x ; CPU:$E82E PRG:282E 95 7F + sta PlayerLifecycleState,x ; CPU:$E82E PRG:282E 95 7F UpdateObjectVelocity_Block_8: - lda $7F,x ; CPU:$E830 PRG:2830 B5 7F + lda PlayerLifecycleState,x ; CPU:$E830 PRG:2830 B5 7F cmp #$04 ; CPU:$E832 PRG:2832 C9 04 bcc UpdateObjectVelocity_Block_11 ; CPU:$E834 PRG:2834 90 1C lda $31,x ; CPU:$E836 PRG:2836 B5 31 and #$02 ; CPU:$E838 PRG:2838 29 02 beq UpdateObjectVelocity_Block_9 ; CPU:$E83A PRG:283A F0 07 - lda $0448,x ; CPU:$E83C PRG:283C BD 48 04 + lda PlayerVariantTable,x ; CPU:$E83C PRG:283C BD 48 04 bne UpdateObjectVelocity_Block_11 ; CPU:$E83F PRG:283F D0 11 beq UpdateObjectVelocity_Block_10 ; CPU:$E841 PRG:2841 F0 0B UpdateObjectVelocity_Block_9: lda $31,x ; CPU:$E843 PRG:2843 B5 31 and #$01 ; CPU:$E845 PRG:2845 29 01 beq UpdateObjectVelocity_Block_11 ; CPU:$E847 PRG:2847 F0 09 - lda $0448,x ; CPU:$E849 PRG:2849 BD 48 04 + lda PlayerVariantTable,x ; CPU:$E849 PRG:2849 BD 48 04 beq UpdateObjectVelocity_Block_11 ; CPU:$E84C PRG:284C F0 04 UpdateObjectVelocity_Block_10: lda #$02 ; CPU:$E84E PRG:284E A9 02 - sta $7F,x ; CPU:$E850 PRG:2850 95 7F + sta PlayerLifecycleState,x ; CPU:$E850 PRG:2850 95 7F UpdateObjectVelocity_Block_11: - lda $7F,x ; CPU:$E852 PRG:2852 B5 7F + lda PlayerLifecycleState,x ; CPU:$E852 PRG:2852 B5 7F cmp #$03 ; CPU:$E854 PRG:2854 C9 03 bne UpdateObjectVelocity_Block_12 ; CPU:$E856 PRG:2856 D0 0A lda $31,x ; CPU:$E858 PRG:2858 B5 31 and #$03 ; CPU:$E85A PRG:285A 29 03 beq UpdateObjectVelocity_Block_12 ; CPU:$E85C PRG:285C F0 04 lda #$02 ; CPU:$E85E PRG:285E A9 02 - sta $7F,x ; CPU:$E860 PRG:2860 95 7F + sta PlayerLifecycleState,x ; CPU:$E860 PRG:2860 95 7F UpdateObjectVelocity_Block_12: - lda $7F,x ; CPU:$E862 PRG:2862 B5 7F + lda PlayerLifecycleState,x ; CPU:$E862 PRG:2862 B5 7F cmp #$04 ; CPU:$E864 PRG:2864 C9 04 bcs UpdateObjectVelocity_Block_15 ; CPU:$E866 PRG:2866 B0 15 lda $31,x ; CPU:$E868 PRG:2868 B5 31 @@ -5611,22 +5611,22 @@ UpdateObjectVelocity_Block_13: beq UpdateObjectVelocity_Block_15 ; CPU:$E876 PRG:2876 F0 05 lda #$01 ; CPU:$E878 PRG:2878 A9 01 UpdateObjectVelocity_Block_14: - sta $0448,x ; CPU:$E87A PRG:287A 9D 48 04 + sta PlayerVariantTable,x ; CPU:$E87A PRG:287A 9D 48 04 UpdateObjectVelocity_Block_15: - lda $7F,x ; CPU:$E87D PRG:287D B5 7F + lda PlayerLifecycleState,x ; CPU:$E87D PRG:287D B5 7F cmp #$04 ; CPU:$E87F PRG:287F C9 04 bcc UpdateObjectVelocity_Block_17 ; CPU:$E881 PRG:2881 90 33 lda $0436,x ; CPU:$E883 PRG:2883 BD 36 04 cmp #$01 ; CPU:$E886 PRG:2886 C9 01 bne UpdateObjectVelocity_Block_17 ; CPU:$E888 PRG:2888 D0 2C - ldy $0451,x ; CPU:$E88A PRG:288A BC 51 04 - lda $0448,x ; CPU:$E88D PRG:288D BD 48 04 + ldy PlayerAnimationState,x ; CPU:$E88A PRG:288A BC 51 04 + lda PlayerVariantTable,x ; CPU:$E88D PRG:288D BD 48 04 beq UpdateObjectVelocity_Block_16 ; CPU:$E890 PRG:2890 F0 12 lda $0424,x ; CPU:$E892 PRG:2892 BD 24 04 sec ; CPU:$E895 PRG:2895 38 sbc $E625,y ; CPU:$E896 PRG:2896 F9 25 E6 sta $0424,x ; CPU:$E899 PRG:2899 9D 24 04 - lda $042D,x ; CPU:$E89C PRG:289C BD 2D 04 + lda PlayerVerticalImpulse,x ; CPU:$E89C PRG:289C BD 2D 04 sbc #$00 ; CPU:$E89F PRG:289F E9 00 jmp UpdateObjectVelocity_Store ; CPU:$E8A1 PRG:28A1 4C 01 E9 UpdateObjectVelocity_Block_16: @@ -5634,11 +5634,11 @@ UpdateObjectVelocity_Block_16: clc ; CPU:$E8A7 PRG:28A7 18 adc $E625,y ; CPU:$E8A8 PRG:28A8 79 25 E6 sta $0424,x ; CPU:$E8AB PRG:28AB 9D 24 04 - lda $042D,x ; CPU:$E8AE PRG:28AE BD 2D 04 + lda PlayerVerticalImpulse,x ; CPU:$E8AE PRG:28AE BD 2D 04 adc #$00 ; CPU:$E8B1 PRG:28B1 69 00 jmp UpdateObjectVelocity_Store ; CPU:$E8B3 PRG:28B3 4C 01 E9 UpdateObjectVelocity_Block_17: - lda $7F,x ; CPU:$E8B6 PRG:28B6 B5 7F + lda PlayerLifecycleState,x ; CPU:$E8B6 PRG:28B6 B5 7F beq UpdateObjectVelocity_Block_18 ; CPU:$E8B8 PRG:28B8 F0 0B cmp #$02 ; CPU:$E8BA PRG:28BA C9 02 beq UpdateObjectVelocity_Block_21 ; CPU:$E8BC PRG:28BC F0 47 @@ -5651,7 +5651,7 @@ UpdateObjectVelocity_Block_18: beq UpdateObjectVelocity_Block_19 ; CPU:$E8CA PRG:28CA F0 03 jmp UpdateObjectVelocity_Load ; CPU:$E8CC PRG:28CC 4C 51 E9 UpdateObjectVelocity_Block_19: - ldy $0451,x ; CPU:$E8CF PRG:28CF BC 51 04 + ldy PlayerAnimationState,x ; CPU:$E8CF PRG:28CF BC 51 04 lda $31,x ; CPU:$E8D2 PRG:28D2 B5 31 and #$02 ; CPU:$E8D4 PRG:28D4 29 02 beq UpdateObjectVelocity_Block_20 ; CPU:$E8D6 PRG:28D6 F0 12 @@ -5659,7 +5659,7 @@ UpdateObjectVelocity_Block_19: sec ; CPU:$E8DB PRG:28DB 38 sbc $E619,y ; CPU:$E8DC PRG:28DC F9 19 E6 sta $0424,x ; CPU:$E8DF PRG:28DF 9D 24 04 - lda $042D,x ; CPU:$E8E2 PRG:28E2 BD 2D 04 + lda PlayerVerticalImpulse,x ; CPU:$E8E2 PRG:28E2 BD 2D 04 sbc #$00 ; CPU:$E8E5 PRG:28E5 E9 00 jmp UpdateObjectVelocity_Store ; CPU:$E8E7 PRG:28E7 4C 01 E9 UpdateObjectVelocity_Block_20: @@ -5670,16 +5670,16 @@ UpdateObjectVelocity_Block_20: clc ; CPU:$E8F3 PRG:28F3 18 adc $E619,y ; CPU:$E8F4 PRG:28F4 79 19 E6 sta $0424,x ; CPU:$E8F7 PRG:28F7 9D 24 04 - lda $042D,x ; CPU:$E8FA PRG:28FA BD 2D 04 + lda PlayerVerticalImpulse,x ; CPU:$E8FA PRG:28FA BD 2D 04 adc #$00 ; CPU:$E8FD PRG:28FD 69 00 UpdateObjectVelocity_Store: - sta $042D,x ; CPU:$E8FF PRG:28FF 9D 2D 04 + sta PlayerVerticalImpulse,x ; CPU:$E8FF PRG:28FF 9D 2D 04 jmp UpdateObjectVelocity_Load ; CPU:$E902 PRG:2902 4C 51 E9 UpdateObjectVelocity_Block_21: lda $0436,x ; CPU:$E905 PRG:2905 BD 36 04 cmp #$01 ; CPU:$E908 PRG:2908 C9 01 bne UpdateObjectVelocity_Load ; CPU:$E90A PRG:290A D0 43 - ldy $0451,x ; CPU:$E90C PRG:290C BC 51 04 + ldy PlayerAnimationState,x ; CPU:$E90C PRG:290C BC 51 04 lda $31,x ; CPU:$E90F PRG:290F B5 31 and #$02 ; CPU:$E911 PRG:2911 29 02 beq UpdateObjectVelocity_Block_22 ; CPU:$E913 PRG:2913 F0 12 @@ -5687,7 +5687,7 @@ UpdateObjectVelocity_Block_21: sec ; CPU:$E918 PRG:2918 38 sbc $E625,y ; CPU:$E919 PRG:2919 F9 25 E6 sta $0424,x ; CPU:$E91C PRG:291C 9D 24 04 - lda $042D,x ; CPU:$E91F PRG:291F BD 2D 04 + lda PlayerVerticalImpulse,x ; CPU:$E91F PRG:291F BD 2D 04 sbc #$00 ; CPU:$E922 PRG:2922 E9 00 jmp UpdateObjectVelocity_Store_1 ; CPU:$E924 PRG:2924 4C 3E E9 UpdateObjectVelocity_Block_22: @@ -5698,43 +5698,43 @@ UpdateObjectVelocity_Block_22: clc ; CPU:$E930 PRG:2930 18 adc $E625,y ; CPU:$E931 PRG:2931 79 25 E6 sta $0424,x ; CPU:$E934 PRG:2934 9D 24 04 - lda $042D,x ; CPU:$E937 PRG:2937 BD 2D 04 + lda PlayerVerticalImpulse,x ; CPU:$E937 PRG:2937 BD 2D 04 adc #$00 ; CPU:$E93A PRG:293A 69 00 UpdateObjectVelocity_Store_1: - sta $042D,x ; CPU:$E93C PRG:293C 9D 2D 04 + sta PlayerVerticalImpulse,x ; CPU:$E93C PRG:293C 9D 2D 04 lda $31,x ; CPU:$E93F PRG:293F B5 31 and #$03 ; CPU:$E941 PRG:2941 29 03 beq UpdateObjectVelocity_Load ; CPU:$E943 PRG:2943 F0 0A cpx #$02 ; CPU:$E945 PRG:2945 E0 02 bcs UpdateObjectVelocity_Load ; CPU:$E947 PRG:2947 B0 06 - lda $F0 ; CPU:$E949 PRG:2949 A5 F0 + lda SoundRequestFlags0 ; CPU:$E949 PRG:2949 A5 F0 ora #$08 ; CPU:$E94B PRG:294B 09 08 - sta $F0 ; CPU:$E94D PRG:294D 85 F0 + sta SoundRequestFlags0 ; CPU:$E94D PRG:294D 85 F0 UpdateObjectVelocity_Load: - lda $7F,x ; CPU:$E94F PRG:294F B5 7F + lda PlayerLifecycleState,x ; CPU:$E94F PRG:294F B5 7F cmp #$04 ; CPU:$E951 PRG:2951 C9 04 bcc UpdateObjectVelocity_Block_26 ; CPU:$E953 PRG:2953 90 2B - lda $0448,x ; CPU:$E955 PRG:2955 BD 48 04 + lda PlayerVariantTable,x ; CPU:$E955 PRG:2955 BD 48 04 bne UpdateObjectVelocity_Block_23 ; CPU:$E958 PRG:2958 D0 07 - lda $042D,x ; CPU:$E95A PRG:295A BD 2D 04 + lda PlayerVerticalImpulse,x ; CPU:$E95A PRG:295A BD 2D 04 bmi UpdateObjectVelocity_Block_26 ; CPU:$E95D PRG:295D 30 21 bpl UpdateObjectVelocity_Block_24 ; CPU:$E95F PRG:295F 10 05 UpdateObjectVelocity_Block_23: - lda $042D,x ; CPU:$E961 PRG:2961 BD 2D 04 + lda PlayerVerticalImpulse,x ; CPU:$E961 PRG:2961 BD 2D 04 bpl UpdateObjectVelocity_Block_26 ; CPU:$E964 PRG:2964 10 1A UpdateObjectVelocity_Block_24: - lda $7F,x ; CPU:$E966 PRG:2966 B5 7F + lda PlayerLifecycleState,x ; CPU:$E966 PRG:2966 B5 7F cmp #$05 ; CPU:$E968 PRG:2968 C9 05 bne UpdateObjectVelocity_Block_25 ; CPU:$E96A PRG:296A D0 08 - lda $0448,x ; CPU:$E96C PRG:296C BD 48 04 + lda PlayerVariantTable,x ; CPU:$E96C PRG:296C BD 48 04 eor #$01 ; CPU:$E96F PRG:296F 49 01 - sta $0448,x ; CPU:$E971 PRG:2971 9D 48 04 + sta PlayerVariantTable,x ; CPU:$E971 PRG:2971 9D 48 04 UpdateObjectVelocity_Block_25: lda #$03 ; CPU:$E974 PRG:2974 A9 03 - sta $7F,x ; CPU:$E976 PRG:2976 95 7F + sta PlayerLifecycleState,x ; CPU:$E976 PRG:2976 95 7F lda #$00 ; CPU:$E978 PRG:2978 A9 00 sta $0424,x ; CPU:$E97A PRG:297A 9D 24 04 - sta $042D,x ; CPU:$E97D PRG:297D 9D 2D 04 + sta PlayerVerticalImpulse,x ; CPU:$E97D PRG:297D 9D 2D 04 UpdateObjectVelocity_Block_26: rts ; CPU:$E980 PRG:2980 60 ; UpdateObjectFacingAndState @@ -5742,83 +5742,83 @@ UpdateObjectVelocity_Block_26: ; Inputs: X = object slot. ; Returns: object state and facing fields updated. UpdateObjectFacingAndState: - lda $CB ; CPU:$E981 PRG:2981 A5 CB + lda BonusEffectCounter ; CPU:$E981 PRG:2981 A5 CB bne UpdateObjectFacingAndState_Block_2 ; CPU:$E983 PRG:2983 D0 2F - lda $BD,x ; CPU:$E985 PRG:2985 B5 BD + lda PlayerCollisionDisable,x ; CPU:$E985 PRG:2985 B5 BD beq UpdateObjectFacingAndState_Block ; CPU:$E987 PRG:2987 F0 0F lda $0488 ; CPU:$E989 PRG:2989 AD 88 04 beq UpdateObjectFacingAndState_Block ; CPU:$E98C PRG:298C F0 0A sec ; CPU:$E98E PRG:298E 38 - sbc $91,x ; CPU:$E98F PRG:298F F5 91 - jsr $F08E ; CPU:$E991 PRG:2991 20 8E F0 + sbc PlayerPosX,x ; CPU:$E98F PRG:298F F5 91 + jsr AbsoluteDifference ; CPU:$E991 PRG:2991 20 8E F0 cmp #$05 ; CPU:$E994 PRG:2994 C9 05 bcc UpdateObjectFacingAndState_Block_2 ; CPU:$E996 PRG:2996 90 1C UpdateObjectFacingAndState_Block: cpx #$02 ; CPU:$E998 PRG:2998 E0 02 bcc UpdateObjectFacingAndState_Block_1 ; CPU:$E99A PRG:299A 90 06 - lda $88,x ; CPU:$E99C PRG:299C B5 88 + lda PlayerSlotState,x ; CPU:$E99C PRG:299C B5 88 cmp #$02 ; CPU:$E99E PRG:299E C9 02 bne UpdateObjectFacingAndState_Block_3 ; CPU:$E9A0 PRG:29A0 D0 4E UpdateObjectFacingAndState_Block_1: - lda $7F,x ; CPU:$E9A2 PRG:29A2 B5 7F + lda PlayerLifecycleState,x ; CPU:$E9A2 PRG:29A2 B5 7F cmp #$02 ; CPU:$E9A4 PRG:29A4 C9 02 bcc UpdateObjectFacingAndState_Block_3 ; CPU:$E9A6 PRG:29A6 90 48 cmp #$06 ; CPU:$E9A8 PRG:29A8 C9 06 bcs UpdateObjectFacingAndState_Block_3 ; CPU:$E9AA PRG:29AA B0 44 lda #$01 ; CPU:$E9AC PRG:29AC A9 01 - sta $7F,x ; CPU:$E9AE PRG:29AE 95 7F - sta $045A,x ; CPU:$E9B0 PRG:29B0 9D 5A 04 + sta PlayerLifecycleState,x ; CPU:$E9AE PRG:29AE 95 7F + sta PlayerStateTimer,x ; CPU:$E9B0 PRG:29B0 9D 5A 04 rts ; CPU:$E9B3 PRG:29B3 60 UpdateObjectFacingAndState_Block_2: lda #$00 ; CPU:$E9B4 PRG:29B4 A9 00 sta $0412,x ; CPU:$E9B6 PRG:29B6 9D 12 04 - sta $041B,x ; CPU:$E9B9 PRG:29B9 9D 1B 04 + sta PlayerHorizontalImpulse,x ; CPU:$E9B9 PRG:29B9 9D 1B 04 sta $0409,x ; CPU:$E9BC PRG:29BC 9D 09 04 - sta $CB ; CPU:$E9BF PRG:29BF 85 CB + sta BonusEffectCounter ; CPU:$E9BF PRG:29BF 85 CB cpx #$02 ; CPU:$E9C1 PRG:29C1 E0 02 bcc UpdateObjectFacingAndState_Block_5 ; CPU:$E9C3 PRG:29C3 90 36 - lda $88,x ; CPU:$E9C5 PRG:29C5 B5 88 + lda PlayerSlotState,x ; CPU:$E9C5 PRG:29C5 B5 88 cmp #$02 ; CPU:$E9C7 PRG:29C7 C9 02 beq UpdateObjectFacingAndState_Block_4 ; CPU:$E9C9 PRG:29C9 F0 26 cmp #$01 ; CPU:$E9CB PRG:29CB C9 01 bne UpdateObjectFacingAndState_Block_3 ; CPU:$E9CD PRG:29CD D0 21 - lda $7F,x ; CPU:$E9CF PRG:29CF B5 7F + lda PlayerLifecycleState,x ; CPU:$E9CF PRG:29CF B5 7F cmp #$02 ; CPU:$E9D1 PRG:29D1 C9 02 bcs UpdateObjectFacingAndState_Block_3 ; CPU:$E9D3 PRG:29D3 B0 1B lda #$02 ; CPU:$E9D5 PRG:29D5 A9 02 - sta $7F,x ; CPU:$E9D7 PRG:29D7 95 7F + sta PlayerLifecycleState,x ; CPU:$E9D7 PRG:29D7 95 7F lda $C6 ; CPU:$E9D9 PRG:29D9 A5 C6 sta $043F,x ; CPU:$E9DB PRG:29DB 9D 3F 04 lda #$00 ; CPU:$E9DE PRG:29DE A9 00 sta $0424,x ; CPU:$E9E0 PRG:29E0 9D 24 04 - sta $042D,x ; CPU:$E9E3 PRG:29E3 9D 2D 04 + sta PlayerVerticalImpulse,x ; CPU:$E9E3 PRG:29E3 9D 2D 04 sta $0463,x ; CPU:$E9E6 PRG:29E6 9D 63 04 sta $046C,x ; CPU:$E9E9 PRG:29E9 9D 6C 04 lda #$40 ; CPU:$E9EC PRG:29EC A9 40 - sta $F1 ; CPU:$E9EE PRG:29EE 85 F1 + sta SoundRequestFlags1 ; CPU:$E9EE PRG:29EE 85 F1 UpdateObjectFacingAndState_Block_3: rts ; CPU:$E9F0 PRG:29F0 60 UpdateObjectFacingAndState_Block_4: lda #$00 ; CPU:$E9F1 PRG:29F1 A9 00 - sta $7F,x ; CPU:$E9F3 PRG:29F3 95 7F + sta PlayerLifecycleState,x ; CPU:$E9F3 PRG:29F3 95 7F lda #$01 ; CPU:$E9F5 PRG:29F5 A9 01 - sta $045A,x ; CPU:$E9F7 PRG:29F7 9D 5A 04 + sta PlayerStateTimer,x ; CPU:$E9F7 PRG:29F7 9D 5A 04 rts ; CPU:$E9FA PRG:29FA 60 UpdateObjectFacingAndState_Block_5: - lda $7F,x ; CPU:$E9FB PRG:29FB B5 7F + lda PlayerLifecycleState,x ; CPU:$E9FB PRG:29FB B5 7F cmp #$01 ; CPU:$E9FD PRG:29FD C9 01 bne UpdateObjectFacingAndState_Block_8 ; CPU:$E9FF PRG:29FF D0 14 cmp #$06 ; CPU:$EA01 PRG:2A01 C9 06 bcs UpdateObjectFacingAndState_Block_8 ; CPU:$EA03 PRG:2A03 B0 10 lda $0424,x ; CPU:$EA05 PRG:2A05 BD 24 04 - ora $042D,x ; CPU:$EA08 PRG:2A08 1D 2D 04 + ora PlayerVerticalImpulse,x ; CPU:$EA08 PRG:2A08 1D 2D 04 bne UpdateObjectFacingAndState_Block_6 ; CPU:$EA0B PRG:2A0B D0 04 lda #$03 ; CPU:$EA0D PRG:2A0D A9 03 bne UpdateObjectFacingAndState_Block_7 ; CPU:$EA0F PRG:2A0F D0 02 UpdateObjectFacingAndState_Block_6: lda #$02 ; CPU:$EA11 PRG:2A11 A9 02 UpdateObjectFacingAndState_Block_7: - sta $7F,x ; CPU:$EA13 PRG:2A13 95 7F + sta PlayerLifecycleState,x ; CPU:$EA13 PRG:2A13 95 7F UpdateObjectFacingAndState_Block_8: rts ; CPU:$EA15 PRG:2A15 60 ; ApplyObjectHorizontalMotion @@ -5828,26 +5828,26 @@ UpdateObjectFacingAndState_Block_8: ApplyObjectHorizontalMotion: cpx #$02 ; CPU:$EA16 PRG:2A16 E0 02 bcs ApplyObjectHorizontalMotion_Block ; CPU:$EA18 PRG:2A18 B0 10 - lda $BD,x ; CPU:$EA1A PRG:2A1A B5 BD + lda PlayerCollisionDisable,x ; CPU:$EA1A PRG:2A1A B5 BD bne ApplyObjectHorizontalMotion_Block_2 ; CPU:$EA1C PRG:2A1C D0 24 - lda $7F,x ; CPU:$EA1E PRG:2A1E B5 7F + lda PlayerLifecycleState,x ; CPU:$EA1E PRG:2A1E B5 7F cmp #$01 ; CPU:$EA20 PRG:2A20 C9 01 beq ApplyObjectHorizontalMotion_Block_1 ; CPU:$EA22 PRG:2A22 F0 18 cmp #$03 ; CPU:$EA24 PRG:2A24 C9 03 bne ApplyObjectHorizontalMotion_Block_2 ; CPU:$EA26 PRG:2A26 D0 1A beq ApplyObjectHorizontalMotion_Block_1 ; CPU:$EA28 PRG:2A28 F0 12 ApplyObjectHorizontalMotion_Block: - lda $7F,x ; CPU:$EA2A PRG:2A2A B5 7F + lda PlayerLifecycleState,x ; CPU:$EA2A PRG:2A2A B5 7F cmp #$01 ; CPU:$EA2C PRG:2A2C C9 01 beq ApplyObjectHorizontalMotion_Block_1 ; CPU:$EA2E PRG:2A2E F0 0C cmp #$03 ; CPU:$EA30 PRG:2A30 C9 03 bcc ApplyObjectHorizontalMotion_Block_2 ; CPU:$EA32 PRG:2A32 90 0E - lda $19 ; CPU:$EA34 PRG:2A34 A5 19 + lda FrameCounter ; CPU:$EA34 PRG:2A34 A5 19 and #$03 ; CPU:$EA36 PRG:2A36 29 03 bne ApplyObjectHorizontalMotion_Block_3 ; CPU:$EA38 PRG:2A38 D0 0B beq ApplyObjectHorizontalMotion_Block_2 ; CPU:$EA3A PRG:2A3A F0 06 ApplyObjectHorizontalMotion_Block_1: - lda $19 ; CPU:$EA3C PRG:2A3C A5 19 + lda FrameCounter ; CPU:$EA3C PRG:2A3C A5 19 and #$07 ; CPU:$EA3E PRG:2A3E 29 07 bne ApplyObjectHorizontalMotion_Block_3 ; CPU:$EA40 PRG:2A40 D0 03 ApplyObjectHorizontalMotion_Block_2: @@ -5857,9 +5857,9 @@ ApplyObjectHorizontalMotion_Block_3: and #$03 ; CPU:$EA48 PRG:2A48 29 03 sta $0436,x ; CPU:$EA4A PRG:2A4A 9D 36 04 bne ApplyObjectHorizontalMotion_Block_4 ; CPU:$EA4D PRG:2A4D D0 06 - lda $7F,x ; CPU:$EA4F PRG:2A4F B5 7F + lda PlayerLifecycleState,x ; CPU:$EA4F PRG:2A4F B5 7F bne ApplyObjectHorizontalMotion_Block_4 ; CPU:$EA51 PRG:2A51 D0 02 - inc $7F,x ; CPU:$EA53 PRG:2A53 F6 7F + inc PlayerLifecycleState,x ; CPU:$EA53 PRG:2A53 F6 7F ApplyObjectHorizontalMotion_Block_4: rts ; CPU:$EA55 PRG:2A55 60 ; ApplyObjectVerticalMotion @@ -5875,7 +5875,7 @@ ApplyObjectVerticalMotion_Block: bcs ApplyObjectVerticalMotion_Block_2 ; CPU:$EA60 PRG:2A60 B0 28 lda $C1,x ; CPU:$EA62 PRG:2A62 B5 C1 beq ApplyObjectVerticalMotion_Block_2 ; CPU:$EA64 PRG:2A64 F0 24 - lda $19 ; CPU:$EA66 PRG:2A66 A5 19 + lda FrameCounter ; CPU:$EA66 PRG:2A66 A5 19 lsr a ; CPU:$EA68 PRG:2A68 4A bcc ApplyObjectVerticalMotion_Block_1 ; CPU:$EA69 PRG:2A69 90 1E inc $0436,x ; CPU:$EA6B PRG:2A6B FE 36 04 @@ -5883,26 +5883,26 @@ ApplyObjectVerticalMotion_Block: and #$03 ; CPU:$EA71 PRG:2A71 29 03 sta $0436,x ; CPU:$EA73 PRG:2A73 9D 36 04 lda #$01 ; CPU:$EA76 PRG:2A76 A9 01 - sta $7F,x ; CPU:$EA78 PRG:2A78 95 7F - dec $045A,x ; CPU:$EA7A PRG:2A7A DE 5A 04 + sta PlayerLifecycleState,x ; CPU:$EA78 PRG:2A78 95 7F + dec PlayerStateTimer,x ; CPU:$EA7A PRG:2A7A DE 5A 04 bne ApplyObjectVerticalMotion_Block_1 ; CPU:$EA7D PRG:2A7D D0 0A lda #$00 ; CPU:$EA7F PRG:2A7F A9 00 sta $C1,x ; CPU:$EA81 PRG:2A81 95 C1 - sta $7F,x ; CPU:$EA83 PRG:2A83 95 7F + sta PlayerLifecycleState,x ; CPU:$EA83 PRG:2A83 95 7F lda #$20 ; CPU:$EA85 PRG:2A85 A9 20 - sta $F0 ; CPU:$EA87 PRG:2A87 85 F0 + sta SoundRequestFlags0 ; CPU:$EA87 PRG:2A87 85 F0 ApplyObjectVerticalMotion_Block_1: rts ; CPU:$EA89 PRG:2A89 60 ApplyObjectVerticalMotion_Block_2: lda $0412,x ; CPU:$EA8A PRG:2A8A BD 12 04 clc ; CPU:$EA8D PRG:2A8D 18 - ldy $0451,x ; CPU:$EA8E PRG:2A8E BC 51 04 + ldy PlayerAnimationState,x ; CPU:$EA8E PRG:2A8E BC 51 04 adc $E601,y ; CPU:$EA91 PRG:2A91 79 01 E6 sta $0412,x ; CPU:$EA94 PRG:2A94 9D 12 04 bcc ApplyObjectVerticalMotion_Block_3 ; CPU:$EA97 PRG:2A97 90 03 - inc $041B,x ; CPU:$EA99 PRG:2A99 FE 1B 04 + inc PlayerHorizontalImpulse,x ; CPU:$EA99 PRG:2A99 FE 1B 04 ApplyObjectVerticalMotion_Block_3: - lda $041B,x ; CPU:$EA9C PRG:2A9C BD 1B 04 + lda PlayerHorizontalImpulse,x ; CPU:$EA9C PRG:2A9C BD 1B 04 bmi ApplyObjectVerticalMotion_Block_5 ; CPU:$EA9F PRG:2A9F 30 1E cmp $E66D,y ; CPU:$EAA1 PRG:2AA1 D9 6D E6 bcc ApplyObjectVerticalMotion_Block_7 ; CPU:$EAA4 PRG:2AA4 90 34 @@ -5914,7 +5914,7 @@ ApplyObjectVerticalMotion_Block_4: lda $E661,y ; CPU:$EAB0 PRG:2AB0 B9 61 E6 sta $0412,x ; CPU:$EAB3 PRG:2AB3 9D 12 04 lda $E66D,y ; CPU:$EAB6 PRG:2AB6 B9 6D E6 - sta $041B,x ; CPU:$EAB9 PRG:2AB9 9D 1B 04 + sta PlayerHorizontalImpulse,x ; CPU:$EAB9 PRG:2AB9 9D 1B 04 jmp ApplyObjectVerticalMotion_Block_7 ; CPU:$EABC PRG:2ABC 4C DC EA ApplyObjectVerticalMotion_Block_5: cmp $E685,y ; CPU:$EABF PRG:2ABF D9 85 E6 @@ -5927,7 +5927,7 @@ ApplyObjectVerticalMotion_Block_6: lda $E679,y ; CPU:$EACE PRG:2ACE B9 79 E6 sta $0412,x ; CPU:$EAD1 PRG:2AD1 9D 12 04 lda $E685,y ; CPU:$EAD4 PRG:2AD4 B9 85 E6 - sta $041B,x ; CPU:$EAD7 PRG:2AD7 9D 1B 04 + sta PlayerHorizontalImpulse,x ; CPU:$EAD7 PRG:2AD7 9D 1B 04 ApplyObjectVerticalMotion_Block_7: jsr IntegrateVerticalPosition ; CPU:$EADA PRG:2ADA 20 A0 EB cmp #$F8 ; CPU:$EADD PRG:2ADD C9 F8 @@ -5935,27 +5935,27 @@ ApplyObjectVerticalMotion_Block_7: cmp #$E8 ; CPU:$EAE1 PRG:2AE1 C9 E8 bcc ApplyObjectVerticalMotion_Block_9 ; CPU:$EAE3 PRG:2AE3 90 26 lda #$FF ; CPU:$EAE5 PRG:2AE5 A9 FF - sta $88,x ; CPU:$EAE7 PRG:2AE7 95 88 + sta PlayerSlotState,x ; CPU:$EAE7 PRG:2AE7 95 88 lda #$04 ; CPU:$EAE9 PRG:2AE9 A9 04 sta $BB ; CPU:$EAEB PRG:2AEB 85 BB - lda $91,x ; CPU:$EAED PRG:2AED B5 91 + lda PlayerPosX,x ; CPU:$EAED PRG:2AED B5 91 sta $BC ; CPU:$EAEF PRG:2AEF 85 BC cpx #$02 ; CPU:$EAF1 PRG:2AF1 E0 02 bcc ApplyObjectVerticalMotion_Block_8 ; CPU:$EAF3 PRG:2AF3 90 0E lda #$80 ; CPU:$EAF5 PRG:2AF5 A9 80 - sta $88,x ; CPU:$EAF7 PRG:2AF7 95 88 + sta PlayerSlotState,x ; CPU:$EAF7 PRG:2AF7 95 88 lda #$00 ; CPU:$EAF9 PRG:2AF9 A9 00 - sta $7F,x ; CPU:$EAFB PRG:2AFB 95 7F + sta PlayerLifecycleState,x ; CPU:$EAFB PRG:2AFB 95 7F lda #$01 ; CPU:$EAFD PRG:2AFD A9 01 - sta $F3 ; CPU:$EAFF PRG:2AFF 85 F3 + sta SoundRequestFlags3 ; CPU:$EAFF PRG:2AFF 85 F3 bne ApplyObjectVerticalMotion_Block_9 ; CPU:$EB01 PRG:2B01 D0 08 ApplyObjectVerticalMotion_Block_8: lda $C8 ; CPU:$EB03 PRG:2B03 A5 C8 bne ApplyObjectVerticalMotion_Block_9 ; CPU:$EB05 PRG:2B05 D0 04 lda #$40 ; CPU:$EB07 PRG:2B07 A9 40 - sta $F0 ; CPU:$EB09 PRG:2B09 85 F0 + sta SoundRequestFlags0 ; CPU:$EB09 PRG:2B09 85 F0 ApplyObjectVerticalMotion_Block_9: - lda $042D,x ; CPU:$EB0B PRG:2B0B BD 2D 04 + lda PlayerVerticalImpulse,x ; CPU:$EB0B PRG:2B0B BD 2D 04 bmi ApplyObjectVerticalMotion_Block_11 ; CPU:$EB0E PRG:2B0E 30 1E cmp $E63D,y ; CPU:$EB10 PRG:2B10 D9 3D E6 bcc ApplyObjectVerticalMotion_Block_13 ; CPU:$EB13 PRG:2B13 90 34 @@ -5967,7 +5967,7 @@ ApplyObjectVerticalMotion_Block_10: lda $E631,y ; CPU:$EB1F PRG:2B1F B9 31 E6 sta $0424,x ; CPU:$EB22 PRG:2B22 9D 24 04 lda $E63D,y ; CPU:$EB25 PRG:2B25 B9 3D E6 - sta $042D,x ; CPU:$EB28 PRG:2B28 9D 2D 04 + sta PlayerVerticalImpulse,x ; CPU:$EB28 PRG:2B28 9D 2D 04 jmp ApplyObjectVerticalMotion_Block_13 ; CPU:$EB2B PRG:2B2B 4C 4B EB ApplyObjectVerticalMotion_Block_11: cmp $E655,y ; CPU:$EB2E PRG:2B2E D9 55 E6 @@ -5980,12 +5980,12 @@ ApplyObjectVerticalMotion_Block_12: lda $E649,y ; CPU:$EB3D PRG:2B3D B9 49 E6 sta $0424,x ; CPU:$EB40 PRG:2B40 9D 24 04 lda $E655,y ; CPU:$EB43 PRG:2B43 B9 55 E6 - sta $042D,x ; CPU:$EB46 PRG:2B46 9D 2D 04 + sta PlayerVerticalImpulse,x ; CPU:$EB46 PRG:2B46 9D 2D 04 ApplyObjectVerticalMotion_Block_13: jsr IntegrateHorizontalPosition ; CPU:$EB49 PRG:2B49 20 8E EB - lda $16 ; CPU:$EB4C PRG:2B4C A5 16 + lda RenderingDisabledFlag ; CPU:$EB4C PRG:2B4C A5 16 beq ApplyObjectVerticalMotion_Block_16 ; CPU:$EB4E PRG:2B4E F0 10 - lda $91,x ; CPU:$EB50 PRG:2B50 B5 91 + lda PlayerPosX,x ; CPU:$EB50 PRG:2B50 B5 91 cmp #$10 ; CPU:$EB52 PRG:2B52 C9 10 bcs ApplyObjectVerticalMotion_Block_14 ; CPU:$EB54 PRG:2B54 B0 02 lda #$10 ; CPU:$EB56 PRG:2B56 A9 10 @@ -5994,28 +5994,28 @@ ApplyObjectVerticalMotion_Block_14: bcc ApplyObjectVerticalMotion_Block_15 ; CPU:$EB5A PRG:2B5A 90 02 lda #$E0 ; CPU:$EB5C PRG:2B5C A9 E0 ApplyObjectVerticalMotion_Block_15: - sta $91,x ; CPU:$EB5E PRG:2B5E 95 91 + sta PlayerPosX,x ; CPU:$EB5E PRG:2B5E 95 91 ApplyObjectVerticalMotion_Block_16: lda $C8 ; CPU:$EB60 PRG:2B60 A5 C8 beq ApplyObjectVerticalMotion_Block_18 ; CPU:$EB62 PRG:2B62 F0 27 - lda $88,x ; CPU:$EB64 PRG:2B64 B5 88 + lda PlayerSlotState,x ; CPU:$EB64 PRG:2B64 B5 88 bne ApplyObjectVerticalMotion_Block_18 ; CPU:$EB66 PRG:2B66 D0 23 - lda $9A,x ; CPU:$EB68 PRG:2B68 B5 9A + lda PlayerPosY,x ; CPU:$EB68 PRG:2B68 B5 9A cmp #$C8 ; CPU:$EB6A PRG:2B6A C9 C8 bcc ApplyObjectVerticalMotion_Block_18 ; CPU:$EB6C PRG:2B6C 90 1D lda #$C7 ; CPU:$EB6E PRG:2B6E A9 C7 - sta $9A,x ; CPU:$EB70 PRG:2B70 95 9A - lda $0451,x ; CPU:$EB72 PRG:2B72 BD 51 04 + sta PlayerPosY,x ; CPU:$EB70 PRG:2B70 95 9A + lda PlayerAnimationState,x ; CPU:$EB72 PRG:2B72 BD 51 04 cmp #$0B ; CPU:$EB75 PRG:2B75 C9 0B bne ApplyObjectVerticalMotion_Block_17 ; CPU:$EB77 PRG:2B77 D0 09 - dec $0451,x ; CPU:$EB79 PRG:2B79 DE 51 04 + dec PlayerAnimationState,x ; CPU:$EB79 PRG:2B79 DE 51 04 jsr $F107 ; CPU:$EB7C PRG:2B7C 20 07 F1 jmp $F18C ; CPU:$EB7F PRG:2B7F 4C 8C F1 ApplyObjectVerticalMotion_Block_17: lda #$02 ; CPU:$EB82 PRG:2B82 A9 02 - sta $88,x ; CPU:$EB84 PRG:2B84 95 88 + sta PlayerSlotState,x ; CPU:$EB84 PRG:2B84 95 88 lda #$03 ; CPU:$EB86 PRG:2B86 A9 03 - sta $0451,x ; CPU:$EB88 PRG:2B88 9D 51 04 + sta PlayerAnimationState,x ; CPU:$EB88 PRG:2B88 9D 51 04 ApplyObjectVerticalMotion_Block_18: rts ; CPU:$EB8B PRG:2B8B 60 ; IntegrateHorizontalPosition @@ -6027,9 +6027,9 @@ IntegrateHorizontalPosition: clc ; CPU:$EB8F PRG:2B8F 18 adc $0424,x ; CPU:$EB90 PRG:2B90 7D 24 04 sta $0400,x ; CPU:$EB93 PRG:2B93 9D 00 04 - lda $91,x ; CPU:$EB96 PRG:2B96 B5 91 - adc $042D,x ; CPU:$EB98 PRG:2B98 7D 2D 04 - sta $91,x ; CPU:$EB9B PRG:2B9B 95 91 + lda PlayerPosX,x ; CPU:$EB96 PRG:2B96 B5 91 + adc PlayerVerticalImpulse,x ; CPU:$EB98 PRG:2B98 7D 2D 04 + sta PlayerPosX,x ; CPU:$EB9B PRG:2B9B 95 91 rts ; CPU:$EB9D PRG:2B9D 60 ; IntegrateVerticalPosition ; Purpose: add vertical velocity to fixed-point Y position. @@ -6040,9 +6040,9 @@ IntegrateVerticalPosition: clc ; CPU:$EBA1 PRG:2BA1 18 adc $0412,x ; CPU:$EBA2 PRG:2BA2 7D 12 04 sta $0409,x ; CPU:$EBA5 PRG:2BA5 9D 09 04 - lda $9A,x ; CPU:$EBA8 PRG:2BA8 B5 9A - adc $041B,x ; CPU:$EBAA PRG:2BAA 7D 1B 04 - sta $9A,x ; CPU:$EBAD PRG:2BAD 95 9A + lda PlayerPosY,x ; CPU:$EBA8 PRG:2BA8 B5 9A + adc PlayerHorizontalImpulse,x ; CPU:$EBAA PRG:2BAA 7D 1B 04 + sta PlayerPosY,x ; CPU:$EBAD PRG:2BAD 95 9A rts ; CPU:$EBAF PRG:2BAF 60 ; ApplyHorizontalCollisionResponse ; Purpose: run collision handling around horizontal integration. @@ -6067,64 +6067,64 @@ ApplyVerticalCollisionResponse: UpdateObjectEnvironmentState: cpx #$02 ; CPU:$EBC2 PRG:2BC2 E0 02 bcs UpdateObjectEnvironmentState_Block_1 ; CPU:$EBC4 PRG:2BC4 B0 1B - lda $88,x ; CPU:$EBC6 PRG:2BC6 B5 88 + lda PlayerSlotState,x ; CPU:$EBC6 PRG:2BC6 B5 88 bne UpdateObjectEnvironmentState_Block ; CPU:$EBC8 PRG:2BC8 D0 0A lda $0436,x ; CPU:$EBCA PRG:2BCA BD 36 04 bne UpdateObjectEnvironmentState_Block ; CPU:$EBCD PRG:2BCD D0 05 lda #$00 ; CPU:$EBCF PRG:2BCF A9 00 - sta $7F,x ; CPU:$EBD1 PRG:2BD1 95 7F + sta PlayerLifecycleState,x ; CPU:$EBD1 PRG:2BD1 95 7F rts ; CPU:$EBD3 PRG:2BD3 60 UpdateObjectEnvironmentState_Block: - lda $7F,x ; CPU:$EBD4 PRG:2BD4 B5 7F + lda PlayerLifecycleState,x ; CPU:$EBD4 PRG:2BD4 B5 7F cmp #$06 ; CPU:$EBD6 PRG:2BD6 C9 06 bcc UpdateObjectEnvironmentState_Block_7 ; CPU:$EBD8 PRG:2BD8 90 5C lda #$01 ; CPU:$EBDA PRG:2BDA A9 01 - sta $7F,x ; CPU:$EBDC PRG:2BDC 95 7F - dec $88,x ; CPU:$EBDE PRG:2BDE D6 88 + sta PlayerLifecycleState,x ; CPU:$EBDC PRG:2BDC 95 7F + dec PlayerSlotState,x ; CPU:$EBDE PRG:2BDE D6 88 rts ; CPU:$EBE0 PRG:2BE0 60 UpdateObjectEnvironmentState_Block_1: - lda $88,x ; CPU:$EBE1 PRG:2BE1 B5 88 + lda PlayerSlotState,x ; CPU:$EBE1 PRG:2BE1 B5 88 cmp #$02 ; CPU:$EBE3 PRG:2BE3 C9 02 beq UpdateObjectEnvironmentState_Block_7 ; CPU:$EBE5 PRG:2BE5 F0 4F lda $0436,x ; CPU:$EBE7 PRG:2BE7 BD 36 04 bne UpdateObjectEnvironmentState_Block_3 ; CPU:$EBEA PRG:2BEA D0 0F - lda $88,x ; CPU:$EBEC PRG:2BEC B5 88 + lda PlayerSlotState,x ; CPU:$EBEC PRG:2BEC B5 88 bne UpdateObjectEnvironmentState_Block_2 ; CPU:$EBEE PRG:2BEE D0 05 lda #$00 ; CPU:$EBF0 PRG:2BF0 A9 00 - sta $7F,x ; CPU:$EBF2 PRG:2BF2 95 7F + sta PlayerLifecycleState,x ; CPU:$EBF2 PRG:2BF2 95 7F rts ; CPU:$EBF4 PRG:2BF4 60 UpdateObjectEnvironmentState_Block_2: - lda $7F,x ; CPU:$EBF5 PRG:2BF5 B5 7F + lda PlayerLifecycleState,x ; CPU:$EBF5 PRG:2BF5 B5 7F bne UpdateObjectEnvironmentState_Block_4 ; CPU:$EBF7 PRG:2BF7 D0 03 - inc $7F,x ; CPU:$EBF9 PRG:2BF9 F6 7F + inc PlayerLifecycleState,x ; CPU:$EBF9 PRG:2BF9 F6 7F UpdateObjectEnvironmentState_Block_3: rts ; CPU:$EBFB PRG:2BFB 60 UpdateObjectEnvironmentState_Block_4: cmp #$02 ; CPU:$EBFC PRG:2BFC C9 02 bcc UpdateObjectEnvironmentState_Block_3 ; CPU:$EBFE PRG:2BFE 90 FB - dec $045A,x ; CPU:$EC00 PRG:2C00 DE 5A 04 + dec PlayerStateTimer,x ; CPU:$EC00 PRG:2C00 DE 5A 04 bne UpdateObjectEnvironmentState_Block_6 ; CPU:$EC03 PRG:2C03 D0 30 lda $C7 ; CPU:$EC05 PRG:2C05 A5 C7 - sta $045A,x ; CPU:$EC07 PRG:2C07 9D 5A 04 - inc $7F,x ; CPU:$EC0A PRG:2C0A F6 7F - lda $7F,x ; CPU:$EC0C PRG:2C0C B5 7F + sta PlayerStateTimer,x ; CPU:$EC07 PRG:2C07 9D 5A 04 + inc PlayerLifecycleState,x ; CPU:$EC0A PRG:2C0A F6 7F + lda PlayerLifecycleState,x ; CPU:$EC0C PRG:2C0C B5 7F cmp #$07 ; CPU:$EC0E PRG:2C0E C9 07 bcc UpdateObjectEnvironmentState_Block_6 ; CPU:$EC10 PRG:2C10 90 23 lda #$02 ; CPU:$EC12 PRG:2C12 A9 02 - sta $88,x ; CPU:$EC14 PRG:2C14 95 88 + sta PlayerSlotState,x ; CPU:$EC14 PRG:2C14 95 88 lda #$00 ; CPU:$EC16 PRG:2C16 A9 00 - sta $7F,x ; CPU:$EC18 PRG:2C18 95 7F - ldy $0451,x ; CPU:$EC1A PRG:2C1A BC 51 04 + sta PlayerLifecycleState,x ; CPU:$EC18 PRG:2C18 95 7F + ldy PlayerAnimationState,x ; CPU:$EC1A PRG:2C1A BC 51 04 lda EnvironmentStateTable,y ; CPU:$EC1D PRG:2C1D B9 AE EC ldy $047E,x ; CPU:$EC20 PRG:2C20 BC 7E 04 bne UpdateObjectEnvironmentState_Block_5 ; CPU:$EC23 PRG:2C23 D0 08 dec $047E,x ; CPU:$EC25 PRG:2C25 DE 7E 04 - lda $0451,x ; CPU:$EC28 PRG:2C28 BD 51 04 + lda PlayerAnimationState,x ; CPU:$EC28 PRG:2C28 BD 51 04 and #$03 ; CPU:$EC2B PRG:2C2B 29 03 UpdateObjectEnvironmentState_Block_5: - sta $0451,x ; CPU:$EC2D PRG:2C2D 9D 51 04 + sta PlayerAnimationState,x ; CPU:$EC2D PRG:2C2D 9D 51 04 lda #$FE ; CPU:$EC30 PRG:2C30 A9 FE - sta $041B,x ; CPU:$EC32 PRG:2C32 9D 1B 04 + sta PlayerHorizontalImpulse,x ; CPU:$EC32 PRG:2C32 9D 1B 04 UpdateObjectEnvironmentState_Block_6: rts ; CPU:$EC35 PRG:2C35 60 UpdateObjectEnvironmentState_Block_7: @@ -6135,7 +6135,7 @@ UpdateObjectEnvironmentState_Block_7: cpx #$02 ; CPU:$EC3F PRG:2C3F E0 02 bcs UpdateObjectEnvironmentState_Block_8 ; CPU:$EC41 PRG:2C41 B0 04 lda #$00 ; CPU:$EC43 PRG:2C43 A9 00 - sta $BD,x ; CPU:$EC45 PRG:2C45 95 BD + sta PlayerCollisionDisable,x ; CPU:$EC45 PRG:2C45 95 BD UpdateObjectEnvironmentState_Block_8: lda $31,x ; CPU:$EC47 PRG:2C47 B5 31 and #$40 ; CPU:$EC49 PRG:2C49 29 40 @@ -6150,14 +6150,14 @@ UpdateObjectEnvironmentState_Block_9: lda $0620,x ; CPU:$EC5A PRG:2C5A BD 20 06 bne UpdateObjectEnvironmentState_Block_14 ; CPU:$EC5D PRG:2C5D D0 4C UpdateObjectEnvironmentState_Block_10: - lda $7F,x ; CPU:$EC5F PRG:2C5F B5 7F + lda PlayerLifecycleState,x ; CPU:$EC5F PRG:2C5F B5 7F cmp #$02 ; CPU:$EC61 PRG:2C61 C9 02 bcc UpdateObjectEnvironmentState_Block_11 ; CPU:$EC63 PRG:2C63 90 0E - dec $9A,x ; CPU:$EC65 PRG:2C65 D6 9A - dec $9A,x ; CPU:$EC67 PRG:2C67 D6 9A + dec PlayerPosY,x ; CPU:$EC65 PRG:2C65 D6 9A + dec PlayerPosY,x ; CPU:$EC67 PRG:2C67 D6 9A lda #$00 ; CPU:$EC69 PRG:2C69 A9 00 sta $0412,x ; CPU:$EC6B PRG:2C6B 9D 12 04 - sta $041B,x ; CPU:$EC6E PRG:2C6E 9D 1B 04 + sta PlayerHorizontalImpulse,x ; CPU:$EC6E PRG:2C6E 9D 1B 04 beq UpdateObjectEnvironmentState_Block_12 ; CPU:$EC71 PRG:2C71 F0 09 UpdateObjectEnvironmentState_Block_11: cmp #$01 ; CPU:$EC73 PRG:2C73 C9 01 @@ -6166,7 +6166,7 @@ UpdateObjectEnvironmentState_Block_11: bne UpdateObjectEnvironmentState_Block_14 ; CPU:$EC7A PRG:2C7A D0 2F UpdateObjectEnvironmentState_Block_12: lda #$00 ; CPU:$EC7C PRG:2C7C A9 00 - sta $7F,x ; CPU:$EC7E PRG:2C7E 95 7F + sta PlayerLifecycleState,x ; CPU:$EC7E PRG:2C7E 95 7F lda #$01 ; CPU:$EC80 PRG:2C80 A9 01 sta $0436,x ; CPU:$EC82 PRG:2C82 9D 36 04 lda #$01 ; CPU:$EC85 PRG:2C85 A9 01 @@ -6176,16 +6176,16 @@ UpdateObjectEnvironmentState_Block_12: bcc UpdateObjectEnvironmentState_Block_13 ; CPU:$EC8E PRG:2C8E 90 01 iny ; CPU:$EC90 PRG:2C90 C8 UpdateObjectEnvironmentState_Block_13: - lda a:$00F0,y ; CPU:$EC91 PRG:2C91 B9 F0 00 + lda a:SoundRequestFlags0,y ; CPU:$EC91 PRG:2C91 B9 F0 00 ora #$10 ; CPU:$EC94 PRG:2C94 09 10 - sta a:$00F0,y ; CPU:$EC96 PRG:2C96 99 F0 00 + sta a:SoundRequestFlags0,y ; CPU:$EC96 PRG:2C96 99 F0 00 lda $0412,x ; CPU:$EC99 PRG:2C99 BD 12 04 sec ; CPU:$EC9C PRG:2C9C 38 - ldy $0451,x ; CPU:$EC9D PRG:2C9D BC 51 04 + ldy PlayerAnimationState,x ; CPU:$EC9D PRG:2C9D BC 51 04 sbc $E60D,y ; CPU:$ECA0 PRG:2CA0 F9 0D E6 sta $0412,x ; CPU:$ECA3 PRG:2CA3 9D 12 04 bcs UpdateObjectEnvironmentState_Block_14 ; CPU:$ECA6 PRG:2CA6 B0 03 - dec $041B,x ; CPU:$ECA8 PRG:2CA8 DE 1B 04 + dec PlayerHorizontalImpulse,x ; CPU:$ECA8 PRG:2CA8 DE 1B 04 UpdateObjectEnvironmentState_Block_14: rts ; CPU:$ECAB PRG:2CAB 60 @@ -6198,7 +6198,7 @@ EnvironmentStateTable: ; Inputs: X = object slot. ; Returns: position/state/event fields updated; X restored. UpdateSpecialObjectState: - lda $7F,x ; CPU:$ECB8 PRG:2CB8 B5 7F + lda PlayerLifecycleState,x ; CPU:$ECB8 PRG:2CB8 B5 7F bne UpdateSpecialObjectState_Block_3 ; CPU:$ECBA PRG:2CBA D0 69 jsr $E7B1 ; CPU:$ECBC PRG:2CBC 20 B1 E7 jsr $EB8E ; CPU:$ECBF PRG:2CBF 20 8E EB @@ -6206,46 +6206,46 @@ UpdateSpecialObjectState: sec ; CPU:$ECC5 PRG:2CC5 38 sbc #$60 ; CPU:$ECC6 PRG:2CC6 E9 60 sta $0409,x ; CPU:$ECC8 PRG:2CC8 9D 09 04 - lda $9A,x ; CPU:$ECCB PRG:2CCB B5 9A + lda PlayerPosY,x ; CPU:$ECCB PRG:2CCB B5 9A sbc #$00 ; CPU:$ECCD PRG:2CCD E9 00 - sta $9A,x ; CPU:$ECCF PRG:2CCF 95 9A + sta PlayerPosY,x ; CPU:$ECCF PRG:2CCF 95 9A cmp #$F1 ; CPU:$ECD1 PRG:2CD1 C9 F1 bcc UpdateSpecialObjectState_Block ; CPU:$ECD3 PRG:2CD3 90 04 lda #$FF ; CPU:$ECD5 PRG:2CD5 A9 FF - sta $88,x ; CPU:$ECD7 PRG:2CD7 95 88 + sta PlayerSlotState,x ; CPU:$ECD7 PRG:2CD7 95 88 UpdateSpecialObjectState_Block: txa ; CPU:$ECD9 PRG:2CD9 8A pha ; CPU:$ECDA PRG:2CDA 48 ldy #$01 ; CPU:$ECDB PRG:2CDB A0 01 UpdateSpecialObjectState_Block_1: - lda a:$0088,y ; CPU:$ECDD PRG:2CDD B9 88 00 + lda a:PlayerSlotState,y ; CPU:$ECDD PRG:2CDD B9 88 00 beq UpdateSpecialObjectState_Block_2 ; CPU:$ECE0 PRG:2CE0 F0 3E bmi UpdateSpecialObjectState_Block_2 ; CPU:$ECE2 PRG:2CE2 30 3C - lda $9A,x ; CPU:$ECE4 PRG:2CE4 B5 9A + lda PlayerPosY,x ; CPU:$ECE4 PRG:2CE4 B5 9A sec ; CPU:$ECE6 PRG:2CE6 38 - sbc a:$009A,y ; CPU:$ECE7 PRG:2CE7 F9 9A 00 - jsr $F08E ; CPU:$ECEA PRG:2CEA 20 8E F0 + sbc a:PlayerPosY,y ; CPU:$ECE7 PRG:2CE7 F9 9A 00 + jsr AbsoluteDifference ; CPU:$ECEA PRG:2CEA 20 8E F0 cmp #$18 ; CPU:$ECED PRG:2CED C9 18 bcs UpdateSpecialObjectState_Block_2 ; CPU:$ECEF PRG:2CEF B0 2F - lda $91,x ; CPU:$ECF1 PRG:2CF1 B5 91 + lda PlayerPosX,x ; CPU:$ECF1 PRG:2CF1 B5 91 sec ; CPU:$ECF3 PRG:2CF3 38 - sbc a:$0091,y ; CPU:$ECF4 PRG:2CF4 F9 91 00 - jsr $F08E ; CPU:$ECF7 PRG:2CF7 20 8E F0 + sbc a:PlayerPosX,y ; CPU:$ECF4 PRG:2CF4 F9 91 00 + jsr AbsoluteDifference ; CPU:$ECF7 PRG:2CF7 20 8E F0 cmp #$10 ; CPU:$ECFA PRG:2CFA C9 10 bcs UpdateSpecialObjectState_Block_2 ; CPU:$ECFC PRG:2CFC B0 22 lda #$FF ; CPU:$ECFE PRG:2CFE A9 FF - sta $7F,x ; CPU:$ED00 PRG:2D00 95 7F + sta PlayerLifecycleState,x ; CPU:$ED00 PRG:2D00 95 7F lda #$03 ; CPU:$ED02 PRG:2D02 A9 03 - sta $045A,x ; CPU:$ED04 PRG:2D04 9D 5A 04 + sta PlayerStateTimer,x ; CPU:$ED04 PRG:2D04 9D 5A 04 lda #$78 ; CPU:$ED07 PRG:2D07 A9 78 sta $C5 ; CPU:$ED09 PRG:2D09 85 C5 lda #$02 ; CPU:$ED0B PRG:2D0B A9 02 - sta $F0 ; CPU:$ED0D PRG:2D0D 85 F0 + sta SoundRequestFlags0 ; CPU:$ED0D PRG:2D0D 85 F0 lda #$32 ; CPU:$ED0F PRG:2D0F A9 32 - sty $3E ; CPU:$ED11 PRG:2D11 84 3E - jsr $D6DE ; CPU:$ED13 PRG:2D13 20 DE D6 + sty CurrentObjectIndex ; CPU:$ED11 PRG:2D11 84 3E + jsr InitializeOrQueueObject ; CPU:$ED13 PRG:2D13 20 DE D6 lda #$01 ; CPU:$ED16 PRG:2D16 A9 01 - ldx $3E ; CPU:$ED18 PRG:2D18 A6 3E + ldx CurrentObjectIndex ; CPU:$ED18 PRG:2D18 A6 3E jsr $D871 ; CPU:$ED1A PRG:2D1A 20 71 D8 pla ; CPU:$ED1D PRG:2D1D 68 tax ; CPU:$ED1E PRG:2D1E AA @@ -6262,92 +6262,92 @@ UpdateSpecialObjectState_Block_3: ; Inputs: X = object slot; stage collision pointers in zero page. ; Returns: collision mask in $CC and response fields updated. ResolveStageCollision: - ldy $88,x ; CPU:$ED26 PRG:2D26 B4 88 + ldy PlayerSlotState,x ; CPU:$ED26 PRG:2D26 B4 88 dey ; CPU:$ED28 PRG:2D28 88 bpl ResolveStageCollision_Block_1 ; CPU:$ED29 PRG:2D29 10 01 ResolveStageCollision_Block: rts ; CPU:$ED2B PRG:2D2B 60 ResolveStageCollision_Block_1: - lda $9A,x ; CPU:$ED2C PRG:2D2C B5 9A + lda PlayerPosY,x ; CPU:$ED2C PRG:2D2C B5 9A cmp #$F9 ; CPU:$ED2E PRG:2D2E C9 F9 bcc ResolveStageCollision_Block_2 ; CPU:$ED30 PRG:2D30 90 0C - lda $041B,x ; CPU:$ED32 PRG:2D32 BD 1B 04 + lda PlayerHorizontalImpulse,x ; CPU:$ED32 PRG:2D32 BD 1B 04 bpl ResolveStageCollision_Block ; CPU:$ED35 PRG:2D35 10 F4 lda #$00 ; CPU:$ED37 PRG:2D37 A9 00 - sta $CC ; CPU:$ED39 PRG:2D39 85 CC + sta GameplayObjectCollisionFlags ; CPU:$ED39 PRG:2D39 85 CC jmp ResolveStageCollision_Store ; CPU:$ED3B PRG:2D3B 4C E1 ED ResolveStageCollision_Block_2: - ldy $CD ; CPU:$ED3E PRG:2D3E A4 CD + ldy BoundsCandidateIndex ; CPU:$ED3E PRG:2D3E A4 CD bmi UpdateSpecialObjectState_Block_3 ; CPU:$ED40 PRG:2D40 30 E3 ResolveStageCollision_Load: lda #$00 ; CPU:$ED42 PRG:2D42 A9 00 - sta $CC ; CPU:$ED44 PRG:2D44 85 CC - lda ($27),y ; CPU:$ED46 PRG:2D46 B1 27 + sta GameplayObjectCollisionFlags ; CPU:$ED44 PRG:2D44 85 CC + lda (BoundsTopPtrLo),y ; CPU:$ED46 PRG:2D46 B1 27 sec ; CPU:$ED48 PRG:2D48 38 sbc #$18 ; CPU:$ED49 PRG:2D49 E9 18 - cmp $9A,x ; CPU:$ED4B PRG:2D4B D5 9A + cmp PlayerPosY,x ; CPU:$ED4B PRG:2D4B D5 9A bcs ResolveStageCollision_Block_10 ; CPU:$ED4D PRG:2D4D B0 65 adc #$03 ; CPU:$ED4F PRG:2D4F 69 03 - cmp $9A,x ; CPU:$ED51 PRG:2D51 D5 9A + cmp PlayerPosY,x ; CPU:$ED51 PRG:2D51 D5 9A bcc ResolveStageCollision_Block_3 ; CPU:$ED53 PRG:2D53 90 04 lda #$01 ; CPU:$ED55 PRG:2D55 A9 01 bne ResolveStageCollision_Block_4 ; CPU:$ED57 PRG:2D57 D0 0E ResolveStageCollision_Block_3: - lda ($29),y ; CPU:$ED59 PRG:2D59 B1 29 - cmp $9A,x ; CPU:$ED5B PRG:2D5B D5 9A + lda (BoundsBottomPtrLo),y ; CPU:$ED59 PRG:2D59 B1 29 + cmp PlayerPosY,x ; CPU:$ED5B PRG:2D5B D5 9A bcc ResolveStageCollision_Block_10 ; CPU:$ED5D PRG:2D5D 90 55 sbc #$03 ; CPU:$ED5F PRG:2D5F E9 03 - cmp $9A,x ; CPU:$ED61 PRG:2D61 D5 9A + cmp PlayerPosY,x ; CPU:$ED61 PRG:2D61 D5 9A bcs ResolveStageCollision_Block_7 ; CPU:$ED63 PRG:2D63 B0 22 lda #$02 ; CPU:$ED65 PRG:2D65 A9 02 ResolveStageCollision_Block_4: - sta $CC ; CPU:$ED67 PRG:2D67 85 CC - lda ($23),y ; CPU:$ED69 PRG:2D69 B1 23 + sta GameplayObjectCollisionFlags ; CPU:$ED67 PRG:2D67 85 CC + lda (BoundsLeftPtrLo),y ; CPU:$ED69 PRG:2D69 B1 23 cmp #$10 ; CPU:$ED6B PRG:2D6B C9 10 beq ResolveStageCollision_Block_5 ; CPU:$ED6D PRG:2D6D F0 07 sec ; CPU:$ED6F PRG:2D6F 38 sbc #$0C ; CPU:$ED70 PRG:2D70 E9 0C - cmp $91,x ; CPU:$ED72 PRG:2D72 D5 91 + cmp PlayerPosX,x ; CPU:$ED72 PRG:2D72 D5 91 bcs ResolveStageCollision_Block_6 ; CPU:$ED74 PRG:2D74 B0 0D ResolveStageCollision_Block_5: - lda ($25),y ; CPU:$ED76 PRG:2D76 B1 25 + lda (BoundsRightPtrLo),y ; CPU:$ED76 PRG:2D76 B1 25 cmp #$FF ; CPU:$ED78 PRG:2D78 C9 FF beq ResolveStageCollision_Block_7 ; CPU:$ED7A PRG:2D7A F0 0B sec ; CPU:$ED7C PRG:2D7C 38 sbc #$04 ; CPU:$ED7D PRG:2D7D E9 04 - cmp $91,x ; CPU:$ED7F PRG:2D7F D5 91 + cmp PlayerPosX,x ; CPU:$ED7F PRG:2D7F D5 91 bcs ResolveStageCollision_Block_7 ; CPU:$ED81 PRG:2D81 B0 04 ResolveStageCollision_Block_6: lda #$00 ; CPU:$ED83 PRG:2D83 A9 00 - sta $CC ; CPU:$ED85 PRG:2D85 85 CC + sta GameplayObjectCollisionFlags ; CPU:$ED85 PRG:2D85 85 CC ResolveStageCollision_Block_7: - lda ($23),y ; CPU:$ED87 PRG:2D87 B1 23 + lda (BoundsLeftPtrLo),y ; CPU:$ED87 PRG:2D87 B1 23 sec ; CPU:$ED89 PRG:2D89 38 sbc #$10 ; CPU:$ED8A PRG:2D8A E9 10 beq ResolveStageCollision_Block_8 ; CPU:$ED8C PRG:2D8C F0 10 - cmp $91,x ; CPU:$ED8E PRG:2D8E D5 91 + cmp PlayerPosX,x ; CPU:$ED8E PRG:2D8E D5 91 bcs ResolveStageCollision_Block_10 ; CPU:$ED90 PRG:2D90 B0 22 adc #$04 ; CPU:$ED92 PRG:2D92 69 04 - cmp $91,x ; CPU:$ED94 PRG:2D94 D5 91 + cmp PlayerPosX,x ; CPU:$ED94 PRG:2D94 D5 91 bcc ResolveStageCollision_Block_8 ; CPU:$ED96 PRG:2D96 90 06 - lda $CC ; CPU:$ED98 PRG:2D98 A5 CC + lda GameplayObjectCollisionFlags ; CPU:$ED98 PRG:2D98 A5 CC ora #$04 ; CPU:$ED9A PRG:2D9A 09 04 bne ResolveStageCollision_Block_9 ; CPU:$ED9C PRG:2D9C D0 14 ResolveStageCollision_Block_8: - lda ($25),y ; CPU:$ED9E PRG:2D9E B1 25 + lda (BoundsRightPtrLo),y ; CPU:$ED9E PRG:2D9E B1 25 cmp #$FF ; CPU:$EDA0 PRG:2DA0 C9 FF beq ResolveStageCollision_Block_10 ; CPU:$EDA2 PRG:2DA2 F0 10 - cmp $91,x ; CPU:$EDA4 PRG:2DA4 D5 91 + cmp PlayerPosX,x ; CPU:$EDA4 PRG:2DA4 D5 91 bcc ResolveStageCollision_Block_10 ; CPU:$EDA6 PRG:2DA6 90 0C sbc #$04 ; CPU:$EDA8 PRG:2DA8 E9 04 - cmp $91,x ; CPU:$EDAA PRG:2DAA D5 91 + cmp PlayerPosX,x ; CPU:$EDAA PRG:2DAA D5 91 bcs ResolveStageCollision_Block_10 ; CPU:$EDAC PRG:2DAC B0 06 - lda $CC ; CPU:$EDAE PRG:2DAE A5 CC + lda GameplayObjectCollisionFlags ; CPU:$EDAE PRG:2DAE A5 CC ora #$08 ; CPU:$EDB0 PRG:2DB0 09 08 ResolveStageCollision_Block_9: - sta $CC ; CPU:$EDB2 PRG:2DB2 85 CC + sta GameplayObjectCollisionFlags ; CPU:$EDB2 PRG:2DB2 85 CC ResolveStageCollision_Block_10: - lda $CC ; CPU:$EDB4 PRG:2DB4 A5 CC + lda GameplayObjectCollisionFlags ; CPU:$EDB4 PRG:2DB4 A5 CC bne ResolveStageCollision_Block_12 ; CPU:$EDB6 PRG:2DB6 D0 07 dey ; CPU:$EDB8 PRG:2DB8 88 bmi ResolveStageCollision_Block_11 ; CPU:$EDB9 PRG:2DB9 30 03 @@ -6355,55 +6355,55 @@ ResolveStageCollision_Block_10: ResolveStageCollision_Block_11: rts ; CPU:$EDBE PRG:2DBE 60 ResolveStageCollision_Block_12: - lsr $CC ; CPU:$EDBF PRG:2DBF 46 CC + lsr GameplayObjectCollisionFlags ; CPU:$EDBF PRG:2DBF 46 CC bcc ResolveStageCollision_Block_13 ; CPU:$EDC1 PRG:2DC1 90 11 - lda $041B,x ; CPU:$EDC3 PRG:2DC3 BD 1B 04 + lda PlayerHorizontalImpulse,x ; CPU:$EDC3 PRG:2DC3 BD 1B 04 bmi ResolveStageCollision_Block_13 ; CPU:$EDC6 PRG:2DC6 30 0C - lda ($27),y ; CPU:$EDC8 PRG:2DC8 B1 27 + lda (BoundsTopPtrLo),y ; CPU:$EDC8 PRG:2DC8 B1 27 sbc #$18 ; CPU:$EDCA PRG:2DCA E9 18 - sta $9A,x ; CPU:$EDCC PRG:2DCC 95 9A - inc $9A,x ; CPU:$EDCE PRG:2DCE F6 9A + sta PlayerPosY,x ; CPU:$EDCC PRG:2DCC 95 9A + inc PlayerPosY,x ; CPU:$EDCE PRG:2DCE F6 9A lda #$01 ; CPU:$EDD0 PRG:2DD0 A9 01 - sta $CB ; CPU:$EDD2 PRG:2DD2 85 CB + sta BonusEffectCounter ; CPU:$EDD2 PRG:2DD2 85 CB ResolveStageCollision_Block_13: - lsr $CC ; CPU:$EDD4 PRG:2DD4 46 CC + lsr GameplayObjectCollisionFlags ; CPU:$EDD4 PRG:2DD4 46 CC bcc ResolveStageCollision_Block_15 ; CPU:$EDD6 PRG:2DD6 90 1A - lda $041B,x ; CPU:$EDD8 PRG:2DD8 BD 1B 04 + lda PlayerHorizontalImpulse,x ; CPU:$EDD8 PRG:2DD8 BD 1B 04 bpl ResolveStageCollision_Block_15 ; CPU:$EDDB PRG:2DDB 10 15 - lda ($29),y ; CPU:$EDDD PRG:2DDD B1 29 + lda (BoundsBottomPtrLo),y ; CPU:$EDDD PRG:2DDD B1 29 ResolveStageCollision_Store: - sta $9A,x ; CPU:$EDDF PRG:2DDF 95 9A + sta PlayerPosY,x ; CPU:$EDDF PRG:2DDF 95 9A jsr $F107 ; CPU:$EDE1 PRG:2DE1 20 07 F1 jsr $F18C ; CPU:$EDE4 PRG:2DE4 20 8C F1 cpx #$02 ; CPU:$EDE7 PRG:2DE7 E0 02 bcs ResolveStageCollision_Block_14 ; CPU:$EDE9 PRG:2DE9 B0 03 jsr $CC33 ; CPU:$EDEB PRG:2DEB 20 33 CC ResolveStageCollision_Block_14: - lda $CB ; CPU:$EDEE PRG:2DEE A5 CB + lda BonusEffectCounter ; CPU:$EDEE PRG:2DEE A5 CB bne ResolveStageCollision_Block_18 ; CPU:$EDF0 PRG:2DF0 D0 30 ResolveStageCollision_Block_15: - lsr $CC ; CPU:$EDF2 PRG:2DF2 46 CC + lsr GameplayObjectCollisionFlags ; CPU:$EDF2 PRG:2DF2 46 CC bcc ResolveStageCollision_Block_16 ; CPU:$EDF4 PRG:2DF4 90 07 - lda $042D,x ; CPU:$EDF6 PRG:2DF6 BD 2D 04 + lda PlayerVerticalImpulse,x ; CPU:$EDF6 PRG:2DF6 BD 2D 04 bmi ResolveStageCollision_Block_16 ; CPU:$EDF9 PRG:2DF9 30 02 bpl ResolveStageCollision_Block_17 ; CPU:$EDFB PRG:2DFB 10 09 ResolveStageCollision_Block_16: - lsr $CC ; CPU:$EDFD PRG:2DFD 46 CC + lsr GameplayObjectCollisionFlags ; CPU:$EDFD PRG:2DFD 46 CC bcc ResolveStageCollision_Block_18 ; CPU:$EDFF PRG:2DFF 90 21 - lda $042D,x ; CPU:$EE01 PRG:2E01 BD 2D 04 + lda PlayerVerticalImpulse,x ; CPU:$EE01 PRG:2E01 BD 2D 04 bpl ResolveStageCollision_Block_18 ; CPU:$EE04 PRG:2E04 10 1C ResolveStageCollision_Block_17: jsr $F0DE ; CPU:$EE06 PRG:2E06 20 DE F0 jsr $F172 ; CPU:$EE09 PRG:2E09 20 72 F1 - lda $042D,x ; CPU:$EE0C PRG:2E0C BD 2D 04 + lda PlayerVerticalImpulse,x ; CPU:$EE0C PRG:2E0C BD 2D 04 ora $0424,x ; CPU:$EE0F PRG:2E0F 1D 24 04 beq ResolveStageCollision_Block_18 ; CPU:$EE12 PRG:2E12 F0 0E - lda $0448,x ; CPU:$EE14 PRG:2E14 BD 48 04 + lda PlayerVariantTable,x ; CPU:$EE14 PRG:2E14 BD 48 04 eor #$01 ; CPU:$EE17 PRG:2E17 49 01 - sta $0448,x ; CPU:$EE19 PRG:2E19 9D 48 04 - lda $F1 ; CPU:$EE1C PRG:2E1C A5 F1 + sta PlayerVariantTable,x ; CPU:$EE19 PRG:2E19 9D 48 04 + lda SoundRequestFlags1 ; CPU:$EE1C PRG:2E1C A5 F1 ora #$02 ; CPU:$EE1E PRG:2E1E 09 02 - sta $F1 ; CPU:$EE20 PRG:2E20 85 F1 + sta SoundRequestFlags1 ; CPU:$EE20 PRG:2E20 85 F1 ResolveStageCollision_Block_18: rts ; CPU:$EE22 PRG:2E22 60 ; CheckObjectInteractions @@ -6413,98 +6413,98 @@ ResolveStageCollision_Block_18: CheckObjectInteractions: ldx #$07 ; CPU:$EE23 PRG:2E23 A2 07 CheckObjectInteractions_Block: - stx $12 ; CPU:$EE25 PRG:2E25 86 12 - ldy $12 ; CPU:$EE27 PRG:2E27 A4 12 + stx Temp12 ; CPU:$EE25 PRG:2E25 86 12 + ldy Temp12 ; CPU:$EE27 PRG:2E27 A4 12 dey ; CPU:$EE29 PRG:2E29 88 bpl CheckObjectInteractions_Load ; CPU:$EE2A PRG:2E2A 10 03 CheckObjectInteractions_Block_1: jmp CheckObjectInteractions_Decrement ; CPU:$EE2C PRG:2E2C 4C 2A EF CheckObjectInteractions_Load: - lda $88,x ; CPU:$EE2F PRG:2E2F B5 88 + lda PlayerSlotState,x ; CPU:$EE2F PRG:2E2F B5 88 bmi CheckObjectInteractions_Block_1 ; CPU:$EE31 PRG:2E31 30 F9 beq CheckObjectInteractions_Block_1 ; CPU:$EE33 PRG:2E33 F0 F7 - lda a:$0088,y ; CPU:$EE35 PRG:2E35 B9 88 00 + lda a:PlayerSlotState,y ; CPU:$EE35 PRG:2E35 B9 88 00 bmi CheckObjectInteractions_Block_1 ; CPU:$EE38 PRG:2E38 30 F2 beq CheckObjectInteractions_Block_1 ; CPU:$EE3A PRG:2E3A F0 F0 lda #$00 ; CPU:$EE3C PRG:2E3C A9 00 - sta $CC ; CPU:$EE3E PRG:2E3E 85 CC - lda a:$009A,y ; CPU:$EE40 PRG:2E40 B9 9A 00 + sta GameplayObjectCollisionFlags ; CPU:$EE3E PRG:2E3E 85 CC + lda a:PlayerPosY,y ; CPU:$EE40 PRG:2E40 B9 9A 00 sec ; CPU:$EE43 PRG:2E43 38 - sbc $9A,x ; CPU:$EE44 PRG:2E44 F5 9A - jsr $F08E ; CPU:$EE46 PRG:2E46 20 8E F0 + sbc PlayerPosY,x ; CPU:$EE44 PRG:2E44 F5 9A + jsr AbsoluteDifference ; CPU:$EE46 PRG:2E46 20 8E F0 cmp #$18 ; CPU:$EE49 PRG:2E49 C9 18 bcs CheckObjectInteractions_Block_7 ; CPU:$EE4B PRG:2E4B B0 71 - lda $9A,x ; CPU:$EE4D PRG:2E4D B5 9A + lda PlayerPosY,x ; CPU:$EE4D PRG:2E4D B5 9A clc ; CPU:$EE4F PRG:2E4F 18 adc #$18 ; CPU:$EE50 PRG:2E50 69 18 - sta $12 ; CPU:$EE52 PRG:2E52 85 12 - lda a:$009A,y ; CPU:$EE54 PRG:2E54 B9 9A 00 + sta Temp12 ; CPU:$EE52 PRG:2E52 85 12 + lda a:PlayerPosY,y ; CPU:$EE54 PRG:2E54 B9 9A 00 clc ; CPU:$EE57 PRG:2E57 18 adc #$07 ; CPU:$EE58 PRG:2E58 69 07 sec ; CPU:$EE5A PRG:2E5A 38 - sbc $12 ; CPU:$EE5B PRG:2E5B E5 12 - jsr $F08E ; CPU:$EE5D PRG:2E5D 20 8E F0 + sbc Temp12 ; CPU:$EE5B PRG:2E5B E5 12 + jsr AbsoluteDifference ; CPU:$EE5D PRG:2E5D 20 8E F0 cmp #$04 ; CPU:$EE60 PRG:2E60 C9 04 bcs CheckObjectInteractions_Block_2 ; CPU:$EE62 PRG:2E62 B0 04 lda #$01 ; CPU:$EE64 PRG:2E64 A9 01 bne CheckObjectInteractions_Block_3 ; CPU:$EE66 PRG:2E66 D0 12 CheckObjectInteractions_Block_2: - lda a:$009A,y ; CPU:$EE68 PRG:2E68 B9 9A 00 + lda a:PlayerPosY,y ; CPU:$EE68 PRG:2E68 B9 9A 00 clc ; CPU:$EE6B PRG:2E6B 18 adc #$11 ; CPU:$EE6C PRG:2E6C 69 11 sec ; CPU:$EE6E PRG:2E6E 38 - sbc $9A,x ; CPU:$EE6F PRG:2E6F F5 9A - jsr $F08E ; CPU:$EE71 PRG:2E71 20 8E F0 + sbc PlayerPosY,x ; CPU:$EE6F PRG:2E6F F5 9A + jsr AbsoluteDifference ; CPU:$EE71 PRG:2E71 20 8E F0 cmp #$04 ; CPU:$EE74 PRG:2E74 C9 04 bcs CheckObjectInteractions_Block_4 ; CPU:$EE76 PRG:2E76 B0 15 lda #$02 ; CPU:$EE78 PRG:2E78 A9 02 CheckObjectInteractions_Block_3: - sta $CC ; CPU:$EE7A PRG:2E7A 85 CC - lda a:$0091,y ; CPU:$EE7C PRG:2E7C B9 91 00 + sta GameplayObjectCollisionFlags ; CPU:$EE7A PRG:2E7A 85 CC + lda a:PlayerPosX,y ; CPU:$EE7C PRG:2E7C B9 91 00 sec ; CPU:$EE7F PRG:2E7F 38 - sbc $91,x ; CPU:$EE80 PRG:2E80 F5 91 - jsr $F08E ; CPU:$EE82 PRG:2E82 20 8E F0 + sbc PlayerPosX,x ; CPU:$EE80 PRG:2E80 F5 91 + jsr AbsoluteDifference ; CPU:$EE82 PRG:2E82 20 8E F0 cmp #$10 ; CPU:$EE85 PRG:2E85 C9 10 bcc CheckObjectInteractions_Block_4 ; CPU:$EE87 PRG:2E87 90 04 lda #$00 ; CPU:$EE89 PRG:2E89 A9 00 - sta $CC ; CPU:$EE8B PRG:2E8B 85 CC + sta GameplayObjectCollisionFlags ; CPU:$EE8B PRG:2E8B 85 CC CheckObjectInteractions_Block_4: - lda $91,x ; CPU:$EE8D PRG:2E8D B5 91 + lda PlayerPosX,x ; CPU:$EE8D PRG:2E8D B5 91 clc ; CPU:$EE8F PRG:2E8F 18 adc #$10 ; CPU:$EE90 PRG:2E90 69 10 - sta $12 ; CPU:$EE92 PRG:2E92 85 12 - lda a:$0091,y ; CPU:$EE94 PRG:2E94 B9 91 00 + sta Temp12 ; CPU:$EE92 PRG:2E92 85 12 + lda a:PlayerPosX,y ; CPU:$EE94 PRG:2E94 B9 91 00 clc ; CPU:$EE97 PRG:2E97 18 adc #$07 ; CPU:$EE98 PRG:2E98 69 07 sec ; CPU:$EE9A PRG:2E9A 38 - sbc $12 ; CPU:$EE9B PRG:2E9B E5 12 - jsr $F08E ; CPU:$EE9D PRG:2E9D 20 8E F0 + sbc Temp12 ; CPU:$EE9B PRG:2E9B E5 12 + jsr AbsoluteDifference ; CPU:$EE9D PRG:2E9D 20 8E F0 cmp #$04 ; CPU:$EEA0 PRG:2EA0 C9 04 bcs CheckObjectInteractions_Block_5 ; CPU:$EEA2 PRG:2EA2 B0 04 lda #$04 ; CPU:$EEA4 PRG:2EA4 A9 04 bne CheckObjectInteractions_Block_6 ; CPU:$EEA6 PRG:2EA6 D0 12 CheckObjectInteractions_Block_5: - lda a:$0091,y ; CPU:$EEA8 PRG:2EA8 B9 91 00 + lda a:PlayerPosX,y ; CPU:$EEA8 PRG:2EA8 B9 91 00 clc ; CPU:$EEAB PRG:2EAB 18 adc #$09 ; CPU:$EEAC PRG:2EAC 69 09 sec ; CPU:$EEAE PRG:2EAE 38 - sbc $91,x ; CPU:$EEAF PRG:2EAF F5 91 - jsr $F08E ; CPU:$EEB1 PRG:2EB1 20 8E F0 + sbc PlayerPosX,x ; CPU:$EEAF PRG:2EAF F5 91 + jsr AbsoluteDifference ; CPU:$EEB1 PRG:2EB1 20 8E F0 cmp #$04 ; CPU:$EEB4 PRG:2EB4 C9 04 bcs CheckObjectInteractions_Block_7 ; CPU:$EEB6 PRG:2EB6 B0 06 lda #$08 ; CPU:$EEB8 PRG:2EB8 A9 08 CheckObjectInteractions_Block_6: - ora $CC ; CPU:$EEBA PRG:2EBA 05 CC - sta $CC ; CPU:$EEBC PRG:2EBC 85 CC + ora GameplayObjectCollisionFlags ; CPU:$EEBA PRG:2EBA 05 CC + sta GameplayObjectCollisionFlags ; CPU:$EEBC PRG:2EBC 85 CC CheckObjectInteractions_Block_7: lda #$00 ; CPU:$EEBE PRG:2EBE A9 00 sta $4B ; CPU:$EEC0 PRG:2EC0 85 4B - lsr $CC ; CPU:$EEC2 PRG:2EC2 46 CC + lsr GameplayObjectCollisionFlags ; CPU:$EEC2 PRG:2EC2 46 CC bcc CheckObjectInteractions_Block_8 ; CPU:$EEC4 PRG:2EC4 90 05 jsr $F0A6 ; CPU:$EEC6 PRG:2EC6 20 A6 F0 bmi CheckObjectInteractions_Block_9 ; CPU:$EEC9 PRG:2EC9 30 09 CheckObjectInteractions_Block_8: - lsr $CC ; CPU:$EECB PRG:2ECB 46 CC + lsr GameplayObjectCollisionFlags ; CPU:$EECB PRG:2ECB 46 CC bcc CheckObjectInteractions_Block_11 ; CPU:$EECD PRG:2ECD 90 20 jsr $F0A6 ; CPU:$EECF PRG:2ECF 20 A6 F0 bmi CheckObjectInteractions_Block_11 ; CPU:$EED2 PRG:2ED2 30 1B @@ -6521,12 +6521,12 @@ CheckObjectInteractions_Block_10: lda #$01 ; CPU:$EEEB PRG:2EEB A9 01 sta $4B ; CPU:$EEED PRG:2EED 85 4B CheckObjectInteractions_Block_11: - lsr $CC ; CPU:$EEEF PRG:2EEF 46 CC + lsr GameplayObjectCollisionFlags ; CPU:$EEEF PRG:2EEF 46 CC bcc CheckObjectInteractions_Block_12 ; CPU:$EEF1 PRG:2EF1 90 05 jsr $F098 ; CPU:$EEF3 PRG:2EF3 20 98 F0 bmi CheckObjectInteractions_Block_13 ; CPU:$EEF6 PRG:2EF6 30 09 CheckObjectInteractions_Block_12: - lsr $CC ; CPU:$EEF8 PRG:2EF8 46 CC + lsr GameplayObjectCollisionFlags ; CPU:$EEF8 PRG:2EF8 46 CC bcc CheckObjectInteractions_Block_15 ; CPU:$EEFA PRG:2EFA 90 20 jsr $F098 ; CPU:$EEFC PRG:2EFC 20 98 F0 bmi CheckObjectInteractions_Block_15 ; CPU:$EEFF PRG:2EFF 30 1B @@ -6580,23 +6580,23 @@ ResolveObjectCollisionPair_Block_1: ResolveObjectCollisionPair_Block_2: cpx #$02 ; CPU:$EF54 PRG:2F54 E0 02 bcs ResolveObjectCollisionPair_Block_3 ; CPU:$EF56 PRG:2F56 B0 07 - lda $BD,x ; CPU:$EF58 PRG:2F58 B5 BD + lda PlayerCollisionDisable,x ; CPU:$EF58 PRG:2F58 B5 BD beq ResolveObjectCollisionPair_Block_4 ; CPU:$EF5A PRG:2F5A F0 14 jmp ResolveObjectCollisionPair_Load ; CPU:$EF5C PRG:2F5C 4C 43 F0 ResolveObjectCollisionPair_Block_3: - lda $88,x ; CPU:$EF5F PRG:2F5F B5 88 + lda PlayerSlotState,x ; CPU:$EF5F PRG:2F5F B5 88 cmp #$01 ; CPU:$EF61 PRG:2F61 C9 01 bne ResolveObjectCollisionPair_Block_4 ; CPU:$EF63 PRG:2F63 D0 0B - lda $7F,x ; CPU:$EF65 PRG:2F65 B5 7F + lda PlayerLifecycleState,x ; CPU:$EF65 PRG:2F65 B5 7F cmp #$02 ; CPU:$EF67 PRG:2F67 C9 02 bcs ResolveObjectCollisionPair_Block_5 ; CPU:$EF69 PRG:2F69 B0 12 lda #$01 ; CPU:$EF6B PRG:2F6B A9 01 sta $0487 ; CPU:$EF6D PRG:2F6D 8D 87 04 ResolveObjectCollisionPair_Block_4: - lda a:$009A,y ; CPU:$EF70 PRG:2F70 B9 9A 00 + lda a:PlayerPosY,y ; CPU:$EF70 PRG:2F70 B9 9A 00 clc ; CPU:$EF73 PRG:2F73 18 adc #$04 ; CPU:$EF74 PRG:2F74 69 04 - cmp $9A,x ; CPU:$EF76 PRG:2F76 D5 9A + cmp PlayerPosY,x ; CPU:$EF76 PRG:2F76 D5 9A bcc ResolveObjectCollisionPair_Block_5 ; CPU:$EF78 PRG:2F78 90 03 jmp ResolveObjectCollisionPair_Load ; CPU:$EF7A PRG:2F7A 4C 43 F0 ResolveObjectCollisionPair_Block_5: @@ -6606,45 +6606,45 @@ ResolveObjectCollisionPair_Block_5: sta $0436,x ; CPU:$EF84 PRG:2F84 9D 36 04 cpy #$02 ; CPU:$EF87 PRG:2F87 C0 02 bcc ResolveObjectCollisionPair_Block_6 ; CPU:$EF89 PRG:2F89 90 0A - lda a:$0088,y ; CPU:$EF8B PRG:2F8B B9 88 00 + lda a:PlayerSlotState,y ; CPU:$EF8B PRG:2F8B B9 88 00 cmp #$02 ; CPU:$EF8E PRG:2F8E C9 02 beq ResolveObjectCollisionPair_Block_6 ; CPU:$EF90 PRG:2F90 F0 03 jmp ResolveObjectCollisionPair_Load ; CPU:$EF92 PRG:2F92 4C 43 F0 ResolveObjectCollisionPair_Block_6: - lda $F0 ; CPU:$EF95 PRG:2F95 A5 F0 + lda SoundRequestFlags0 ; CPU:$EF95 PRG:2F95 A5 F0 ora #$02 ; CPU:$EF97 PRG:2F97 09 02 - sta $F0 ; CPU:$EF99 PRG:2F99 85 F0 - lda $88,x ; CPU:$EF9B PRG:2F9B B5 88 + sta SoundRequestFlags0 ; CPU:$EF99 PRG:2F99 85 F0 + lda PlayerSlotState,x ; CPU:$EF9B PRG:2F9B B5 88 cmp #$02 ; CPU:$EF9D PRG:2F9D C9 02 bne ResolveObjectCollisionPair_Block_8 ; CPU:$EF9F PRG:2F9F D0 1D cpx #$02 ; CPU:$EFA1 PRG:2FA1 E0 02 bcs ResolveObjectCollisionPair_Block_8 ; CPU:$EFA3 PRG:2FA3 B0 19 - sty $12 ; CPU:$EFA5 PRG:2FA5 84 12 - ldy $7F,x ; CPU:$EFA7 PRG:2FA7 B4 7F + sty Temp12 ; CPU:$EFA5 PRG:2FA5 84 12 + ldy PlayerLifecycleState,x ; CPU:$EFA7 PRG:2FA7 B4 7F lda CollisionResultStateTable,y ; CPU:$EFA9 PRG:2FA9 B9 53 F0 - ldy $12 ; CPU:$EFAC PRG:2FAC A4 12 + ldy Temp12 ; CPU:$EFAC PRG:2FAC A4 12 pha ; CPU:$EFAE PRG:2FAE 48 pla ; CPU:$EFAF PRG:2FAF 68 bne ResolveObjectCollisionPair_Block_7 ; CPU:$EFB0 PRG:2FB0 D0 03 jmp ResolveObjectCollisionPair_Load ; CPU:$EFB2 PRG:2FB2 4C 43 F0 ResolveObjectCollisionPair_Block_7: - sta $7F,x ; CPU:$EFB5 PRG:2FB5 95 7F + sta PlayerLifecycleState,x ; CPU:$EFB5 PRG:2FB5 95 7F lda #$00 ; CPU:$EFB7 PRG:2FB7 A9 00 sta $0436,x ; CPU:$EFB9 PRG:2FB9 9D 36 04 beq ResolveObjectCollisionPair_Block_12 ; CPU:$EFBC PRG:2FBC F0 2A ResolveObjectCollisionPair_Block_8: - dec $88,x ; CPU:$EFBE PRG:2FBE D6 88 + dec PlayerSlotState,x ; CPU:$EFBE PRG:2FBE D6 88 bne ResolveObjectCollisionPair_Block_9 ; CPU:$EFC0 PRG:2FC0 D0 0A lda #$FF ; CPU:$EFC2 PRG:2FC2 A9 FF - sta $041B,x ; CPU:$EFC4 PRG:2FC4 9D 1B 04 + sta PlayerHorizontalImpulse,x ; CPU:$EFC4 PRG:2FC4 9D 1B 04 lda #$00 ; CPU:$EFC7 PRG:2FC7 A9 00 sta $0412,x ; CPU:$EFC9 PRG:2FC9 9D 12 04 ResolveObjectCollisionPair_Block_9: lda #$00 ; CPU:$EFCC PRG:2FCC A9 00 - sta $7F,x ; CPU:$EFCE PRG:2FCE 95 7F + sta PlayerLifecycleState,x ; CPU:$EFCE PRG:2FCE 95 7F sta $0424,x ; CPU:$EFD0 PRG:2FD0 9D 24 04 - sta $042D,x ; CPU:$EFD3 PRG:2FD3 9D 2D 04 - lda $91,x ; CPU:$EFD6 PRG:2FD6 B5 91 + sta PlayerVerticalImpulse,x ; CPU:$EFD3 PRG:2FD3 9D 2D 04 + lda PlayerPosX,x ; CPU:$EFD6 PRG:2FD6 B5 91 bmi ResolveObjectCollisionPair_Block_10 ; CPU:$EFD8 PRG:2FD8 30 04 lda #$FF ; CPU:$EFDA PRG:2FDA A9 FF bne ResolveObjectCollisionPair_Block_11 ; CPU:$EFDC PRG:2FDC D0 02 @@ -6655,25 +6655,25 @@ ResolveObjectCollisionPair_Block_11: lda #$80 ; CPU:$EFE3 PRG:2FE3 A9 80 sta $0463,x ; CPU:$EFE5 PRG:2FE5 9D 63 04 ResolveObjectCollisionPair_Block_12: - sty $12 ; CPU:$EFE8 PRG:2FE8 84 12 - ldy $0451,x ; CPU:$EFEA PRG:2FEA BC 51 04 + sty Temp12 ; CPU:$EFE8 PRG:2FE8 84 12 + ldy PlayerAnimationState,x ; CPU:$EFEA PRG:2FEA BC 51 04 lda ObjectStateTransitionTable,y ; CPU:$EFED PRG:2FED B9 5E F0 - sta $0451,x ; CPU:$EFF0 PRG:2FF0 9D 51 04 + sta PlayerAnimationState,x ; CPU:$EFF0 PRG:2FF0 9D 51 04 lda #$01 ; CPU:$EFF3 PRG:2FF3 A9 01 sta $047E,x ; CPU:$EFF5 PRG:2FF5 9D 7E 04 - ldy $12 ; CPU:$EFF8 PRG:2FF8 A4 12 + ldy Temp12 ; CPU:$EFF8 PRG:2FF8 A4 12 cpy #$02 ; CPU:$EFFA PRG:2FFA C0 02 bcs ResolveObjectCollisionPair_Load ; CPU:$EFFC PRG:2FFC B0 43 - lda $0451,x ; CPU:$EFFE PRG:2FFE BD 51 04 + lda PlayerAnimationState,x ; CPU:$EFFE PRG:2FFE BD 51 04 cmp #$07 ; CPU:$F001 PRG:3001 C9 07 beq ResolveObjectCollisionPair_Block_13 ; CPU:$F003 PRG:3003 F0 0A cmp #$08 ; CPU:$F005 PRG:3005 C9 08 bcc ResolveObjectCollisionPair_Block_13 ; CPU:$F007 PRG:3007 90 06 - lda $F1 ; CPU:$F009 PRG:3009 A5 F1 + lda SoundRequestFlags1 ; CPU:$F009 PRG:3009 A5 F1 ora #$80 ; CPU:$F00B PRG:300B 09 80 - sta $F1 ; CPU:$F00D PRG:300D 85 F1 + sta SoundRequestFlags1 ; CPU:$F00D PRG:300D 85 F1 ResolveObjectCollisionPair_Block_13: - ldy $0451,x ; CPU:$F00F PRG:300F BC 51 04 + ldy PlayerAnimationState,x ; CPU:$F00F PRG:300F BC 51 04 lda CollisionSoundTable,y ; CPU:$F012 PRG:3012 B9 6A F0 sta $13 ; CPU:$F015 PRG:3015 85 13 lda $0487 ; CPU:$F017 PRG:3017 AD 87 04 @@ -6684,30 +6684,30 @@ ResolveObjectCollisionPair_Block_14: lda CollisionEventTable,y ; CPU:$F021 PRG:3021 B9 82 F0 clc ; CPU:$F024 PRG:3024 18 adc $0487 ; CPU:$F025 PRG:3025 6D 87 04 - sta $14 ; CPU:$F028 PRG:3028 85 14 - lda $12 ; CPU:$F02A PRG:302A A5 12 - sta $3E ; CPU:$F02C PRG:302C 85 3E + sta SpawnParameter ; CPU:$F028 PRG:3028 85 14 + lda Temp12 ; CPU:$F02A PRG:302A A5 12 + sta CurrentObjectIndex ; CPU:$F02C PRG:302C 85 3E pha ; CPU:$F02E PRG:302E 48 txa ; CPU:$F02F PRG:302F 8A pha ; CPU:$F030 PRG:3030 48 lda $13 ; CPU:$F031 PRG:3031 A5 13 pha ; CPU:$F033 PRG:3033 48 - lda $14 ; CPU:$F034 PRG:3034 A5 14 + lda SpawnParameter ; CPU:$F034 PRG:3034 A5 14 jsr $D871 ; CPU:$F036 PRG:3036 20 71 D8 pla ; CPU:$F039 PRG:3039 68 - jsr $D6DE ; CPU:$F03A PRG:303A 20 DE D6 + jsr InitializeOrQueueObject ; CPU:$F03A PRG:303A 20 DE D6 pla ; CPU:$F03D PRG:303D 68 tax ; CPU:$F03E PRG:303E AA pla ; CPU:$F03F PRG:303F 68 tay ; CPU:$F040 PRG:3040 A8 ResolveObjectCollisionPair_Load: - lda $0451,x ; CPU:$F041 PRG:3041 BD 51 04 + lda PlayerAnimationState,x ; CPU:$F041 PRG:3041 BD 51 04 cmp #$0B ; CPU:$F044 PRG:3044 C9 0B bne ResolveObjectCollisionPair_Block_15 ; CPU:$F046 PRG:3046 D0 08 lda $C8 ; CPU:$F048 PRG:3048 A5 C8 bne ResolveObjectCollisionPair_Block_15 ; CPU:$F04A PRG:304A D0 04 lda #$20 ; CPU:$F04C PRG:304C A9 20 - sta $F0 ; CPU:$F04E PRG:304E 85 F0 + sta SoundRequestFlags0 ; CPU:$F04E PRG:304E 85 F0 ResolveObjectCollisionPair_Block_15: rts ; CPU:$F050 PRG:3050 60 @@ -6747,8 +6747,8 @@ SubtractHorizontalVelocityPair: lda $0424,y ; CPU:$F096 PRG:3096 B9 24 04 sec ; CPU:$F099 PRG:3099 38 sbc $0424,x ; CPU:$F09A PRG:309A FD 24 04 - lda $042D,y ; CPU:$F09D PRG:309D B9 2D 04 - sbc $042D,x ; CPU:$F0A0 PRG:30A0 FD 2D 04 + lda PlayerVerticalImpulse,y ; CPU:$F09D PRG:309D B9 2D 04 + sbc PlayerVerticalImpulse,x ; CPU:$F0A0 PRG:30A0 FD 2D 04 rts ; CPU:$F0A3 PRG:30A3 60 ; SubtractVerticalVelocityPair ; Purpose: calculate Y-object minus X-object vertical velocity. @@ -6758,18 +6758,18 @@ SubtractVerticalVelocityPair: lda $0412,y ; CPU:$F0A4 PRG:30A4 B9 12 04 sec ; CPU:$F0A7 PRG:30A7 38 sbc $0412,x ; CPU:$F0A8 PRG:30A8 FD 12 04 - lda $041B,y ; CPU:$F0AB PRG:30AB B9 1B 04 - sbc $041B,x ; CPU:$F0AE PRG:30AE FD 1B 04 + lda PlayerHorizontalImpulse,y ; CPU:$F0AB PRG:30AB B9 1B 04 + sbc PlayerHorizontalImpulse,x ; CPU:$F0AE PRG:30AE FD 1B 04 rts ; CPU:$F0B1 PRG:30B1 60 ; SwapObjectIndexes ; Purpose: exchange X and Y through scratch bytes. ; Inputs: X/Y = object indexes. ; Returns: X/Y swapped. SwapObjectIndexes: - stx $12 ; CPU:$F0B2 PRG:30B2 86 12 + stx Temp12 ; CPU:$F0B2 PRG:30B2 86 12 sty $13 ; CPU:$F0B4 PRG:30B4 84 13 ldx $13 ; CPU:$F0B6 PRG:30B6 A6 13 - ldy $12 ; CPU:$F0B8 PRG:30B8 A4 12 + ldy Temp12 ; CPU:$F0B8 PRG:30B8 A4 12 rts ; CPU:$F0BA PRG:30BA 60 ; TestPairCollisionEligibility ; Purpose: test whether an object pair can participate in collision response. @@ -6778,19 +6778,19 @@ SwapObjectIndexes: TestPairCollisionEligibility: cpx #$02 ; CPU:$F0BB PRG:30BB E0 02 bcc TestPairCollisionEligibility_Block ; CPU:$F0BD PRG:30BD 90 1C - lda $7F,x ; CPU:$F0BF PRG:30BF B5 7F + lda PlayerLifecycleState,x ; CPU:$F0BF PRG:30BF B5 7F cmp #$02 ; CPU:$F0C1 PRG:30C1 C9 02 bcc TestPairCollisionEligibility_Block ; CPU:$F0C3 PRG:30C3 90 16 lda #$01 ; CPU:$F0C5 PRG:30C5 A9 01 - cmp $88,x ; CPU:$F0C7 PRG:30C7 D5 88 + cmp PlayerSlotState,x ; CPU:$F0C7 PRG:30C7 D5 88 bcs TestPairCollisionEligibility_Block ; CPU:$F0C9 PRG:30C9 B0 10 cpy #$02 ; CPU:$F0CB PRG:30CB C0 02 bcc TestPairCollisionEligibility_Block ; CPU:$F0CD PRG:30CD 90 0C - lda a:$007F,y ; CPU:$F0CF PRG:30CF B9 7F 00 + lda a:PlayerLifecycleState,y ; CPU:$F0CF PRG:30CF B9 7F 00 cmp #$02 ; CPU:$F0D2 PRG:30D2 C9 02 bcc TestPairCollisionEligibility_Block ; CPU:$F0D4 PRG:30D4 90 05 lda #$01 ; CPU:$F0D6 PRG:30D6 A9 01 - cmp a:$0088,y ; CPU:$F0D8 PRG:30D8 D9 88 00 + cmp a:PlayerSlotState,y ; CPU:$F0D8 PRG:30D8 D9 88 00 TestPairCollisionEligibility_Block: rts ; CPU:$F0DB PRG:30DB 60 ; NegateHorizontalMotion @@ -6803,8 +6803,8 @@ NegateHorizontalMotion: sbc $0424,x ; CPU:$F0DF PRG:30DF FD 24 04 sta $0424,x ; CPU:$F0E2 PRG:30E2 9D 24 04 lda #$00 ; CPU:$F0E5 PRG:30E5 A9 00 - sbc $042D,x ; CPU:$F0E7 PRG:30E7 FD 2D 04 - sta $042D,x ; CPU:$F0EA PRG:30EA 9D 2D 04 + sbc PlayerVerticalImpulse,x ; CPU:$F0E7 PRG:30E7 FD 2D 04 + sta PlayerVerticalImpulse,x ; CPU:$F0EA PRG:30EA 9D 2D 04 lda #$00 ; CPU:$F0ED PRG:30ED A9 00 sec ; CPU:$F0EF PRG:30EF 38 sbc $0463,x ; CPU:$F0F0 PRG:30F0 FD 63 04 @@ -6826,8 +6826,8 @@ NegateVerticalMotion: sbc $0412,x ; CPU:$F108 PRG:3108 FD 12 04 sta $0412,x ; CPU:$F10B PRG:310B 9D 12 04 lda #$00 ; CPU:$F10E PRG:310E A9 00 - sbc $041B,x ; CPU:$F110 PRG:3110 FD 1B 04 - sta $041B,x ; CPU:$F113 PRG:3113 9D 1B 04 + sbc PlayerHorizontalImpulse,x ; CPU:$F110 PRG:3110 FD 1B 04 + sta PlayerHorizontalImpulse,x ; CPU:$F113 PRG:3113 9D 1B 04 rts ; CPU:$F116 PRG:3116 60 ; MultiplySignedValue ; Purpose: multiply a signed 16-bit value by an 8-bit factor. @@ -6897,14 +6897,14 @@ MultiplyUnsigned16By8_Block_1: ScaleHorizontalVelocity: lda $0424,x ; CPU:$F170 PRG:3170 BD 24 04 sta $2B ; CPU:$F173 PRG:3173 85 2B - lda $042D,x ; CPU:$F175 PRG:3175 BD 2D 04 + lda PlayerVerticalImpulse,x ; CPU:$F175 PRG:3175 BD 2D 04 sta $2C ; CPU:$F178 PRG:3178 85 2C lda #$CD ; CPU:$F17A PRG:317A A9 CD jsr MultiplySignedValue ; CPU:$F17C PRG:317C 20 19 F1 lda $2F ; CPU:$F17F PRG:317F A5 2F sta $0424,x ; CPU:$F181 PRG:3181 9D 24 04 lda $30 ; CPU:$F184 PRG:3184 A5 30 - sta $042D,x ; CPU:$F186 PRG:3186 9D 2D 04 + sta PlayerVerticalImpulse,x ; CPU:$F186 PRG:3186 9D 2D 04 rts ; CPU:$F189 PRG:3189 60 ; ScaleVerticalVelocity ; Purpose: scale vertical velocity by the fixed collision factor. @@ -6913,14 +6913,14 @@ ScaleHorizontalVelocity: ScaleVerticalVelocity: lda $0412,x ; CPU:$F18A PRG:318A BD 12 04 sta $2B ; CPU:$F18D PRG:318D 85 2B - lda $041B,x ; CPU:$F18F PRG:318F BD 1B 04 + lda PlayerHorizontalImpulse,x ; CPU:$F18F PRG:318F BD 1B 04 sta $2C ; CPU:$F192 PRG:3192 85 2C lda #$CD ; CPU:$F194 PRG:3194 A9 CD jsr MultiplySignedValue ; CPU:$F196 PRG:3196 20 19 F1 lda $2F ; CPU:$F199 PRG:3199 A5 2F sta $0412,x ; CPU:$F19B PRG:319B 9D 12 04 lda $30 ; CPU:$F19E PRG:319E A5 30 - sta $041B,x ; CPU:$F1A0 PRG:31A0 9D 1B 04 + sta PlayerHorizontalImpulse,x ; CPU:$F1A0 PRG:31A0 9D 1B 04 rts ; CPU:$F1A3 PRG:31A3 60 ; ShiftInputVectorRight4 ; Purpose: arithmetic-shift the two-byte input vector right four places. @@ -6929,10 +6929,10 @@ ScaleVerticalVelocity: ShiftInputVectorRight4: ldy #$04 ; CPU:$F1A4 PRG:31A4 A0 04 ShiftInputVectorRight4_Block: - lda $13 ; CPU:$F1A6 PRG:31A6 A5 13 + lda MotionDeltaHi ; CPU:$F1A6 PRG:31A6 A5 13 asl a ; CPU:$F1A8 PRG:31A8 0A - ror $13 ; CPU:$F1A9 PRG:31A9 66 13 - ror $12 ; CPU:$F1AB PRG:31AB 66 12 + ror MotionDeltaHi ; CPU:$F1A9 PRG:31A9 66 13 + ror MotionDeltaLo ; CPU:$F1AB PRG:31AB 66 12 dey ; CPU:$F1AD PRG:31AD 88 bne ShiftInputVectorRight4_Block ; CPU:$F1AE PRG:31AE D0 F6 rts ; CPU:$F1B0 PRG:31B0 60 @@ -6945,48 +6945,48 @@ NextRandomByte: pha ; CPU:$F1B2 PRG:31B2 48 ldx #$0B ; CPU:$F1B3 PRG:31B3 A2 0B NextRandomByte_Block: - asl $1B ; CPU:$F1B5 PRG:31B5 06 1B + asl RandomState ; CPU:$F1B5 PRG:31B5 06 1B rol $1C ; CPU:$F1B7 PRG:31B7 26 1C rol a ; CPU:$F1B9 PRG:31B9 2A rol a ; CPU:$F1BA PRG:31BA 2A - eor $1B ; CPU:$F1BB PRG:31BB 45 1B + eor RandomState ; CPU:$F1BB PRG:31BB 45 1B rol a ; CPU:$F1BD PRG:31BD 2A - eor $1B ; CPU:$F1BE PRG:31BE 45 1B + eor RandomState ; CPU:$F1BE PRG:31BE 45 1B lsr a ; CPU:$F1C0 PRG:31C0 4A lsr a ; CPU:$F1C1 PRG:31C1 4A eor #$FF ; CPU:$F1C2 PRG:31C2 49 FF and #$01 ; CPU:$F1C4 PRG:31C4 29 01 - ora $1B ; CPU:$F1C6 PRG:31C6 05 1B - sta $1B ; CPU:$F1C8 PRG:31C8 85 1B + ora RandomState ; CPU:$F1C6 PRG:31C6 05 1B + sta RandomState ; CPU:$F1C8 PRG:31C8 85 1B dex ; CPU:$F1CA PRG:31CA CA bne NextRandomByte_Block ; CPU:$F1CB PRG:31CB D0 E8 pla ; CPU:$F1CD PRG:31CD 68 tax ; CPU:$F1CE PRG:31CE AA - lda $1B ; CPU:$F1CF PRG:31CF A5 1B + lda RandomState ; CPU:$F1CF PRG:31CF A5 1B rts ; CPU:$F1D1 PRG:31D1 60 NextRandomByte_Block_1: jsr $DAC1 ; CPU:$F1D2 PRG:31D2 20 C1 DA ldx #$09 ; CPU:$F1D5 PRG:31D5 A2 09 NextRandomByte_Block_2: lda #$00 ; CPU:$F1D7 PRG:31D7 A9 00 - sta $03,x ; CPU:$F1D9 PRG:31D9 95 03 + sta CurrentRecord,x ; CPU:$F1D9 PRG:31D9 95 03 dex ; CPU:$F1DB PRG:31DB CA bpl NextRandomByte_Block_2 ; CPU:$F1DC PRG:31DC 10 F9 - sta $3E ; CPU:$F1DE PRG:31DE 85 3E - inc $41 ; CPU:$F1E0 PRG:31E0 E6 41 - jsr $D6DE ; CPU:$F1E2 PRG:31E2 20 DE D6 + sta CurrentObjectIndex ; CPU:$F1DE PRG:31DE 85 3E + inc PlayerActiveFlags ; CPU:$F1E0 PRG:31E0 E6 41 + jsr InitializeOrQueueObject ; CPU:$F1E2 PRG:31E2 20 DE D6 lda #$0F ; CPU:$F1E5 PRG:31E5 A9 0F - sta $4015 ; CPU:$F1E7 PRG:31E7 8D 15 40 + sta APUCTRL ; CPU:$F1E7 PRG:31E7 8D 15 40 lda #$01 ; CPU:$F1EA PRG:31EA A9 01 - sta $F0 ; CPU:$F1EC PRG:31EC 85 F0 + sta SoundRequestFlags0 ; CPU:$F1EC PRG:31EC 85 F0 lda #$02 ; CPU:$F1EE PRG:31EE A9 02 ; InitializeRoundObjects ; Purpose: initialize object slots and round-specific gameplay state. ; Inputs: round/stage globals. ; Returns: object arrays, sound state, and counters initialized. InitializeRoundObjects: - sta $41 ; CPU:$F1F0 PRG:31F0 85 41 - ldy $40 ; CPU:$F1F2 PRG:31F2 A4 40 + sta PlayerActiveFlags ; CPU:$F1F0 PRG:31F0 85 41 + ldy PlayerCountMinusOne ; CPU:$F1F2 PRG:31F2 A4 40 bne InitializeRoundObjects_Block ; CPU:$F1F4 PRG:31F4 D0 02 lda #$FF ; CPU:$F1F6 PRG:31F6 A9 FF InitializeRoundObjects_Block: @@ -6994,11 +6994,11 @@ InitializeRoundObjects_Block: ldx #$00 ; CPU:$F1FA PRG:31FA A2 00 stx $0488 ; CPU:$F1FC PRG:31FC 8E 88 04 stx $3B ; CPU:$F1FF PRG:31FF 86 3B - stx $3C ; CPU:$F201 PRG:3201 86 3C - stx $0558 ; CPU:$F203 PRG:3203 8E 58 05 + stx RoundIndex ; CPU:$F201 PRG:3201 86 3C + stx ParticleSequenceIndex ; CPU:$F203 PRG:3203 8E 58 05 dex ; CPU:$F206 PRG:3206 CA - stx $89 ; CPU:$F207 PRG:3207 86 89 - ldx $40 ; CPU:$F209 PRG:3209 A6 40 + stx CarrierPhase ; CPU:$F207 PRG:3207 86 89 + ldx PlayerCountMinusOne ; CPU:$F209 PRG:3209 A6 40 InitializeRoundObjects_Block_1: jsr $F3B0 ; CPU:$F20B PRG:320B 20 B0 F3 dex ; CPU:$F20E PRG:320E CA @@ -7006,7 +7006,7 @@ InitializeRoundObjects_Block_1: InitializeRoundObjects_Load: lda #$00 ; CPU:$F211 PRG:3211 A9 00 sta $C8 ; CPU:$F213 PRG:3213 85 C8 - lda $3C ; CPU:$F215 PRG:3215 A5 3C + lda RoundIndex ; CPU:$F215 PRG:3215 A5 3C lsr a ; CPU:$F217 PRG:3217 4A lsr a ; CPU:$F218 PRG:3218 4A cmp #$08 ; CPU:$F219 PRG:3219 C9 08 @@ -7018,7 +7018,7 @@ InitializeRoundObjects_Block_2: sta $C6 ; CPU:$F223 PRG:3223 85 C6 lda RoundObjectPositionTable,x ; CPU:$F225 PRG:3225 BD C3 F3 sta $C7 ; CPU:$F228 PRG:3228 85 C7 - lda $3C ; CPU:$F22A PRG:322A A5 3C + lda RoundIndex ; CPU:$F22A PRG:322A A5 3C cmp #$02 ; CPU:$F22C PRG:322C C9 02 bcs InitializeRoundObjects_Block_3 ; CPU:$F22E PRG:322E B0 06 lda #$03 ; CPU:$F230 PRG:3230 A9 03 @@ -7028,20 +7028,20 @@ InitializeRoundObjects_Block_3: ldx #$07 ; CPU:$F236 PRG:3236 A2 07 InitializeRoundObjects_Block_4: lda #$00 ; CPU:$F238 PRG:3238 A9 00 - sta $0448,x ; CPU:$F23A PRG:323A 9D 48 04 + sta PlayerVariantTable,x ; CPU:$F23A PRG:323A 9D 48 04 sta $0475,x ; CPU:$F23D PRG:323D 9D 75 04 sta $047E,x ; CPU:$F240 PRG:3240 9D 7E 04 sta $0424,x ; CPU:$F243 PRG:3243 9D 24 04 - sta $042D,x ; CPU:$F246 PRG:3246 9D 2D 04 + sta PlayerVerticalImpulse,x ; CPU:$F246 PRG:3246 9D 2D 04 sta $0412,x ; CPU:$F249 PRG:3249 9D 12 04 - sta $041B,x ; CPU:$F24C PRG:324C 9D 1B 04 + sta PlayerHorizontalImpulse,x ; CPU:$F24C PRG:324C 9D 1B 04 sta $0463,x ; CPU:$F24F PRG:324F 9D 63 04 sta $046C,x ; CPU:$F252 PRG:3252 9D 6C 04 sta $0400,x ; CPU:$F255 PRG:3255 9D 00 04 sta $0409,x ; CPU:$F258 PRG:3258 9D 09 04 lda #$01 ; CPU:$F25B PRG:325B A9 01 sta $043F,x ; CPU:$F25D PRG:325D 9D 3F 04 - sta $045A,x ; CPU:$F260 PRG:3260 9D 5A 04 + sta PlayerStateTimer,x ; CPU:$F260 PRG:3260 9D 5A 04 lda #$03 ; CPU:$F263 PRG:3263 A9 03 sta $0436,x ; CPU:$F265 PRG:3265 9D 36 04 dex ; CPU:$F268 PRG:3268 CA @@ -7052,7 +7052,7 @@ InitializeRoundObjects_Block_5: sta $8A,x ; CPU:$F26F PRG:326F 95 8A dex ; CPU:$F271 PRG:3271 CA bpl InitializeRoundObjects_Block_5 ; CPU:$F272 PRG:3272 10 F9 - ldx $40 ; CPU:$F274 PRG:3274 A6 40 + ldx PlayerCountMinusOne ; CPU:$F274 PRG:3274 A6 40 InitializeRoundObjects_Block_6: jsr ResetObjectMotion ; CPU:$F276 PRG:3276 20 86 F3 dex ; CPU:$F279 PRG:3279 CA @@ -7065,9 +7065,9 @@ InitializeRoundObjects_Block_6: lda #$58 ; CPU:$F288 PRG:3288 A9 58 sta $C6 ; CPU:$F28A PRG:328A 85 C6 InitializeRoundObjects_Block_7: - jsr $F4A5 ; CPU:$F28C PRG:328C 20 A5 F4 + jsr InitializeAudio ; CPU:$F28C PRG:328C 20 A5 F4 jsr $D8FF ; CPU:$F28F PRG:328F 20 FF D8 - lda $16 ; CPU:$F292 PRG:3292 A5 16 + lda RenderingDisabledFlag ; CPU:$F292 PRG:3292 A5 16 beq InitializeRoundObjects_Block_8 ; CPU:$F294 PRG:3294 F0 03 jmp $C1C5 ; CPU:$F296 PRG:3296 4C C5 C1 InitializeRoundObjects_Block_8: @@ -7080,13 +7080,13 @@ InitializeRoundObjects_Block_9: and #$03 ; CPU:$F2A5 PRG:32A5 29 03 bne InitializeRoundObjects_Block_10 ; CPU:$F2A7 PRG:32A7 D0 08 lda #$08 ; CPU:$F2A9 PRG:32A9 A9 08 - sta $F2 ; CPU:$F2AB PRG:32AB 85 F2 + sta SoundRequestFlags2 ; CPU:$F2AB PRG:32AB 85 F2 ldx $3A ; CPU:$F2AD PRG:32AD A6 3A bne InitializeRoundObjects_Block_11 ; CPU:$F2AF PRG:32AF D0 06 InitializeRoundObjects_Block_10: lda #$FF ; CPU:$F2B1 PRG:32B1 A9 FF sta $3D ; CPU:$F2B3 PRG:32B3 85 3D - inc $3C ; CPU:$F2B5 PRG:32B5 E6 3C + inc RoundIndex ; CPU:$F2B5 PRG:32B5 E6 3C InitializeRoundObjects_Block_11: jsr $F470 ; CPU:$F2B7 PRG:32B7 20 70 F4 lda $3D ; CPU:$F2BA PRG:32BA A5 3D @@ -7095,8 +7095,8 @@ InitializeRoundObjects_Block_11: jsr $F3CC ; CPU:$F2C0 PRG:32C0 20 CC F3 InitializeRoundObjects_Block_12: jsr NextRandomByte ; CPU:$F2C3 PRG:32C3 20 B3 F1 - jsr $E691 ; CPU:$F2C6 PRG:32C6 20 91 E6 - jsr $C6F9 ; CPU:$F2C9 PRG:32C9 20 F9 C6 + jsr UpdateGameplayObjects ; CPU:$F2C6 PRG:32C6 20 91 E6 + jsr UpdateSpecialObjectSystem ; CPU:$F2C9 PRG:32C9 20 F9 C6 jsr $C790 ; CPU:$F2CC PRG:32CC 20 90 C7 jsr $C831 ; CPU:$F2CF PRG:32CF 20 31 C8 jsr $C8B7 ; CPU:$F2D2 PRG:32D2 20 B7 C8 @@ -7104,13 +7104,13 @@ InitializeRoundObjects_Block_12: jsr $E587 ; CPU:$F2D8 PRG:32D8 20 87 E5 jsr $CB74 ; CPU:$F2DB PRG:32DB 20 74 CB inc $4C ; CPU:$F2DE PRG:32DE E6 4C - ldx $40 ; CPU:$F2E0 PRG:32E0 A6 40 + ldx PlayerCountMinusOne ; CPU:$F2E0 PRG:32E0 A6 40 InitializeRoundObjects_Block_13: - lda $88,x ; CPU:$F2E2 PRG:32E2 B5 88 + lda PlayerSlotState,x ; CPU:$F2E2 PRG:32E2 B5 88 bpl InitializeRoundObjects_Block_14 ; CPU:$F2E4 PRG:32E4 10 25 lda $3A ; CPU:$F2E6 PRG:32E6 A5 3A bne InitializeRoundObjects_Block_16 ; CPU:$F2E8 PRG:32E8 D0 3A - lda $41,x ; CPU:$F2EA PRG:32EA B5 41 + lda PlayerActiveFlags,x ; CPU:$F2EA PRG:32EA B5 41 bmi InitializeRoundObjects_Block_14 ; CPU:$F2EC PRG:32EC 30 1D dec $C3,x ; CPU:$F2EE PRG:32EE D6 C3 bne InitializeRoundObjects_Block_17 ; CPU:$F2F0 PRG:32F0 D0 33 @@ -7120,17 +7120,17 @@ InitializeRoundObjects_Block_13: pla ; CPU:$F2F7 PRG:32F7 68 tax ; CPU:$F2F8 PRG:32F8 AA ldy #$02 ; CPU:$F2F9 PRG:32F9 A0 02 - dec $41,x ; CPU:$F2FB PRG:32FB D6 41 - sty $46 ; CPU:$F2FD PRG:32FD 84 46 + dec PlayerActiveFlags,x ; CPU:$F2FB PRG:32FB D6 41 + sty SequenceStep ; CPU:$F2FD PRG:32FD 84 46 bmi InitializeRoundObjects_Block_14 ; CPU:$F2FF PRG:32FF 30 0A jsr ResetObjectMotion ; CPU:$F301 PRG:3301 20 86 F3 jsr $F3B0 ; CPU:$F304 PRG:3304 20 B0 F3 lda #$80 ; CPU:$F307 PRG:3307 A9 80 - sta $F2 ; CPU:$F309 PRG:3309 85 F2 + sta SoundRequestFlags2 ; CPU:$F309 PRG:3309 85 F2 InitializeRoundObjects_Block_14: dex ; CPU:$F30B PRG:330B CA bpl InitializeRoundObjects_Block_13 ; CPU:$F30C PRG:330C 10 D4 - lda $41 ; CPU:$F30E PRG:330E A5 41 + lda PlayerActiveFlags ; CPU:$F30E PRG:330E A5 41 bpl InitializeRoundObjects_Block_15 ; CPU:$F310 PRG:3310 10 04 lda $42 ; CPU:$F312 PRG:3312 A5 42 bmi InitializeRoundObjects_Block_23 ; CPU:$F314 PRG:3314 30 4E @@ -7154,15 +7154,15 @@ InitializeRoundObjects_Block_19: bpl InitializeRoundObjects_Block_18 ; CPU:$F32E PRG:332E 10 F7 lda $BB ; CPU:$F330 PRG:3330 A5 BB bpl InitializeRoundObjects_Block_11 ; CPU:$F332 PRG:3332 10 83 - ldx $40 ; CPU:$F334 PRG:3334 A6 40 + ldx PlayerCountMinusOne ; CPU:$F334 PRG:3334 A6 40 InitializeRoundObjects_Block_20: - ldy $88,x ; CPU:$F336 PRG:3336 B4 88 + ldy PlayerSlotState,x ; CPU:$F336 PRG:3336 B4 88 dey ; CPU:$F338 PRG:3338 88 bpl InitializeRoundObjects_Block_21 ; CPU:$F339 PRG:3339 10 0F - lda $41,x ; CPU:$F33B PRG:333B B5 41 + lda PlayerActiveFlags,x ; CPU:$F33B PRG:333B B5 41 bmi InitializeRoundObjects_Block_21 ; CPU:$F33D PRG:333D 30 0B lda #$FF ; CPU:$F33F PRG:333F A9 FF - sta $88,x ; CPU:$F341 PRG:3341 95 88 + sta PlayerSlotState,x ; CPU:$F341 PRG:3341 95 88 lda #$01 ; CPU:$F343 PRG:3343 A9 01 sta $C3,x ; CPU:$F345 PRG:3345 95 C3 jmp InitializeRoundObjects_Block_11 ; CPU:$F347 PRG:3347 4C B9 F2 @@ -7170,7 +7170,7 @@ InitializeRoundObjects_Block_21: dex ; CPU:$F34A PRG:334A CA bpl InitializeRoundObjects_Block_20 ; CPU:$F34B PRG:334B 10 E9 lda #$02 ; CPU:$F34D PRG:334D A9 02 - sta $F2 ; CPU:$F34F PRG:334F 85 F2 + sta SoundRequestFlags2 ; CPU:$F34F PRG:334F 85 F2 ldx #$96 ; CPU:$F351 PRG:3351 A2 96 jsr $F45E ; CPU:$F353 PRG:3353 20 5E F4 ldx $3B ; CPU:$F356 PRG:3356 A6 3B @@ -7183,18 +7183,18 @@ InitializeRoundObjects_Block_22: jmp InitializeRoundObjects_Load ; CPU:$F361 PRG:3361 4C 13 F2 InitializeRoundObjects_Block_23: lda #$01 ; CPU:$F364 PRG:3364 A9 01 - sta $F2 ; CPU:$F366 PRG:3366 85 F2 + sta SoundRequestFlags2 ; CPU:$F366 PRG:3366 85 F2 lda #$00 ; CPU:$F368 PRG:3368 A9 00 - sta $17 ; CPU:$F36A PRG:336A 85 17 - sta $18 ; CPU:$F36C PRG:336C 85 18 - sta $15 ; CPU:$F36E PRG:336E 85 15 + sta PpuScrollX ; CPU:$F36A PRG:336A 85 17 + sta PpuControlBase ; CPU:$F36C PRG:336C 85 18 + sta SpawnPixelPosition ; CPU:$F36E PRG:336E 85 15 jsr $F40B ; CPU:$F370 PRG:3370 20 0B F4 InitializeRoundObjects_Block_24: - jsr $F465 ; CPU:$F373 PRG:3373 20 65 F4 + jsr WaitForFrame ; CPU:$F373 PRG:3373 20 65 F4 jsr $E768 ; CPU:$F376 PRG:3376 20 68 E7 and #$30 ; CPU:$F379 PRG:3379 29 30 bne InitializeRoundObjects_Block_25 ; CPU:$F37B PRG:337B D0 04 - dec $15 ; CPU:$F37D PRG:337D C6 15 + dec SpawnPixelPosition ; CPU:$F37D PRG:337D C6 15 bne InitializeRoundObjects_Block_24 ; CPU:$F37F PRG:337F D0 F2 InitializeRoundObjects_Block_25: jmp NextRandomByte_Block_1 ; CPU:$F381 PRG:3381 4C D4 F1 @@ -7203,24 +7203,24 @@ InitializeRoundObjects_Block_25: ; Inputs: X = object slot. ; Returns: motion fields cleared and default state restored. ResetObjectMotion: - lda $41,x ; CPU:$F384 PRG:3384 B5 41 + lda PlayerActiveFlags,x ; CPU:$F384 PRG:3384 B5 41 bmi ResetObjectMotion_Block_1 ; CPU:$F386 PRG:3386 30 23 lda ObjectSpawnStateTable,x ; CPU:$F388 PRG:3388 BD AE F3 - sta $91,x ; CPU:$F38B PRG:338B 95 91 + sta PlayerPosX,x ; CPU:$F38B PRG:338B 95 91 lda #$B8 ; CPU:$F38D PRG:338D A9 B8 - sta $9A,x ; CPU:$F38F PRG:338F 95 9A - sta $BD,x ; CPU:$F391 PRG:3391 95 BD + sta PlayerPosY,x ; CPU:$F38F PRG:338F 95 9A + sta PlayerCollisionDisable,x ; CPU:$F391 PRG:3391 95 BD lda #$C8 ; CPU:$F393 PRG:3393 A9 C8 sta $BF,x ; CPU:$F395 PRG:3395 95 BF lda #$5A ; CPU:$F397 PRG:3397 A9 5A - ldy $41,x ; CPU:$F399 PRG:3399 B4 41 + ldy PlayerActiveFlags,x ; CPU:$F399 PRG:3399 B4 41 bpl ResetObjectMotion_Block ; CPU:$F39B PRG:339B 10 02 lda #$01 ; CPU:$F39D PRG:339D A9 01 ResetObjectMotion_Block: sta $C3,x ; CPU:$F39F PRG:339F 95 C3 lda #$00 ; CPU:$F3A1 PRG:33A1 A9 00 sta $C1,x ; CPU:$F3A3 PRG:33A3 95 C1 - sta $042D,x ; CPU:$F3A5 PRG:33A5 9D 2D 04 + sta PlayerVerticalImpulse,x ; CPU:$F3A5 PRG:33A5 9D 2D 04 sta $0424,x ; CPU:$F3A8 PRG:33A8 9D 24 04 ResetObjectMotion_Block_1: rts ; CPU:$F3AB PRG:33AB 60 @@ -7233,9 +7233,9 @@ ObjectSpawnStateTable: ; Returns: object type/state initialized and slot activated. ActivateSpawnedObject: lda #$03 ; CPU:$F3AE PRG:33AE A9 03 - sta $0451,x ; CPU:$F3B0 PRG:33B0 9D 51 04 + sta PlayerAnimationState,x ; CPU:$F3B0 PRG:33B0 9D 51 04 lda #$02 ; CPU:$F3B3 PRG:33B3 A9 02 - sta $88,x ; CPU:$F3B5 PRG:33B5 95 88 + sta PlayerSlotState,x ; CPU:$F3B5 PRG:33B5 95 88 rts ; CPU:$F3B7 PRG:33B7 60 RoundObjectTypeTable: .byte $58, $50, $58, $50, $50, $40, $38, $30 ; CPU:$F3B8 PRG:33B8 58 50 58 50 50 40 38 30 @@ -7254,15 +7254,15 @@ LoadRoundScreenData: ldx #$0A ; CPU:$F3D0 PRG:33D0 A2 0A LoadRoundScreenData_Block: lda $F3F5,x ; CPU:$F3D2 PRG:33D2 BD F5 F3 - sta $57,x ; CPU:$F3D5 PRG:33D5 95 57 + sta PpuCommandData0,x ; CPU:$F3D5 PRG:33D5 95 57 dex ; CPU:$F3D7 PRG:33D7 CA bpl LoadRoundScreenData_Block ; CPU:$F3D8 PRG:33D8 10 F8 ldy #$0A ; CPU:$F3DA PRG:33DA A0 0A - lda $3C ; CPU:$F3DC PRG:33DC A5 3C - sta $43 ; CPU:$F3DE PRG:33DE 85 43 - jsr $D77C ; CPU:$F3E0 PRG:33E0 20 7C D7 + lda RoundIndex ; CPU:$F3DC PRG:33DC A5 3C + sta SelectedRecordIndex ; CPU:$F3DE PRG:33DE 85 43 + jsr DivideOrScaleRecordValue ; CPU:$F3E0 PRG:33E0 20 7C D7 sta $60 ; CPU:$F3E3 PRG:33E3 85 60 - lda $43 ; CPU:$F3E5 PRG:33E5 A5 43 + lda SelectedRecordIndex ; CPU:$F3E5 PRG:33E5 A5 43 sta $61 ; CPU:$F3E7 PRG:33E7 85 61 jmp $C12D ; CPU:$F3E9 PRG:33E9 4C 2D C1 LoadRoundScreenData_Block_1: @@ -7289,17 +7289,17 @@ DrawRoundStatusPanel_Block: ldx #$0F ; CPU:$F41A PRG:341A A2 0F DrawRoundStatusPanel_Block_1: lda #$24 ; CPU:$F41C PRG:341C A9 24 - sta $5A,x ; CPU:$F41E PRG:341E 95 5A + sta RoundHudTile,x ; CPU:$F41E PRG:341E 95 5A dex ; CPU:$F420 PRG:3420 CA bpl DrawRoundStatusPanel_Block_1 ; CPU:$F421 PRG:3421 10 F9 lda #$10 ; CPU:$F423 PRG:3423 A9 10 - sta $59 ; CPU:$F425 PRG:3425 85 59 + sta RoundHudCommandLength ; CPU:$F425 PRG:3425 85 59 lda #$21 ; CPU:$F427 PRG:3427 A9 21 - sta $57 ; CPU:$F429 PRG:3429 85 57 + sta RoundHudCommandAddressHi ; CPU:$F429 PRG:3429 85 57 ldx #$02 ; CPU:$F42B PRG:342B A2 02 DrawRoundStatusPanel_Block_2: lda $F43F,x ; CPU:$F42D PRG:342D BD 3F F4 - sta $58 ; CPU:$F430 PRG:3430 85 58 + sta RoundHudCommandAddressLo ; CPU:$F430 PRG:3430 85 58 jsr $C12D ; CPU:$F432 PRG:3432 20 2D C1 dex ; CPU:$F435 PRG:3435 CA bpl DrawRoundStatusPanel_Block_2 ; CPU:$F436 PRG:3436 10 F5 @@ -7330,11 +7330,11 @@ DelayFramesLoop: ; Returns: one frame elapsed. WaitOneFrame: lda #$00 ; CPU:$F463 PRG:3463 A9 00 - sta $02 ; CPU:$F465 PRG:3465 85 02 + sta NmiCompletedFlag ; CPU:$F465 PRG:3465 85 02 WaitForFrameCounter: - lda $02 ; CPU:$F467 PRG:3467 A5 02 + lda NmiCompletedFlag ; CPU:$F467 PRG:3467 A5 02 beq WaitForFrameCounter ; CPU:$F469 PRG:3469 F0 FC - dec $02 ; CPU:$F46B PRG:346B C6 02 + dec NmiCompletedFlag ; CPU:$F46B PRG:346B C6 02 WaitForFrameCounter_Block: rts ; CPU:$F46D PRG:346D 60 ; WaitForStartPress @@ -7349,24 +7349,24 @@ WaitForStartPress: and #$10 ; CPU:$F478 PRG:3478 29 10 beq WaitForFrameCounter_Block ; CPU:$F47A PRG:347A F0 F1 lda #$04 ; CPU:$F47C PRG:347C A9 04 - sta $F2 ; CPU:$F47E PRG:347E 85 F2 - lda $01 ; CPU:$F480 PRG:3480 A5 01 + sta SoundRequestFlags2 ; CPU:$F47E PRG:347E 85 F2 + lda PpuMaskShadow ; CPU:$F480 PRG:3480 A5 01 and #$EF ; CPU:$F482 PRG:3482 29 EF - sta $2001 ; CPU:$F484 PRG:3484 8D 01 20 + sta PPUMASK ; CPU:$F484 PRG:3484 8D 01 20 WaitForStartPress_Block: jsr WaitOneFrame ; CPU:$F487 PRG:3487 20 65 F4 jsr $E768 ; CPU:$F48A PRG:348A 20 68 E7 and #$10 ; CPU:$F48D PRG:348D 29 10 beq WaitForStartPress_Block ; CPU:$F48F PRG:348F F0 F6 - lda $01 ; CPU:$F491 PRG:3491 A5 01 - sta $2001 ; CPU:$F493 PRG:3493 8D 01 20 + lda PpuMaskShadow ; CPU:$F491 PRG:3491 A5 01 + sta PPUMASK ; CPU:$F493 PRG:3493 8D 01 20 ldy #$04 ; CPU:$F496 PRG:3496 A0 04 lda $C8 ; CPU:$F498 PRG:3498 A5 C8 - ora $16 ; CPU:$F49A PRG:349A 05 16 + ora RenderingDisabledFlag ; CPU:$F49A PRG:349A 05 16 beq WaitForStartPress_Block_1 ; CPU:$F49C PRG:349C F0 02 ldy #$20 ; CPU:$F49E PRG:349E A0 20 WaitForStartPress_Block_1: - sty $F2 ; CPU:$F4A0 PRG:34A0 84 F2 + sty SoundRequestFlags2 ; CPU:$F4A0 PRG:34A0 84 F2 rts ; CPU:$F4A2 PRG:34A2 60 ; InitializeGameplayGlobals ; Purpose: initialize common gameplay flags, counters, and player defaults. @@ -7378,15 +7378,15 @@ InitializeGameplayGlobals: sta $048F ; CPU:$F4A8 PRG:34A8 8D 8F 04 lda #$FF ; CPU:$F4AB PRG:34AB A9 FF sta $BB ; CPU:$F4AD PRG:34AD 85 BB - sta $87 ; CPU:$F4AF PRG:34AF 85 87 - sta $048C ; CPU:$F4B1 PRG:34B1 8D 8C 04 + sta CarrierDisplayMode ; CPU:$F4AF PRG:34AF 85 87 + sta CarrierDropPending ; CPU:$F4B1 PRG:34B1 8D 8C 04 ldx #$01 ; CPU:$F4B4 PRG:34B4 A2 01 stx $0459 ; CPU:$F4B6 PRG:34B6 8E 59 04 stx $90 ; CPU:$F4B9 PRG:34B9 86 90 inx ; CPU:$F4BB PRG:34BB E8 - stx $46 ; CPU:$F4BC PRG:34BC 86 46 + stx SequenceStep ; CPU:$F4BC PRG:34BC 86 46 lda #$40 ; CPU:$F4BE PRG:34BE A9 40 - sta $99 ; CPU:$F4C0 PRG:34C0 85 99 + sta CarrierTargetX ; CPU:$F4C0 PRG:34C0 85 99 rts ; CPU:$F4C2 PRG:34C2 60 ; $F4C5-$F4FF - trailing $FF padding after the sound-init routine's RTS at $F4C4. @@ -7505,10 +7505,10 @@ ProcessSoundChannels_Block_9: ldx $FD ; CPU:$F585 PRG:3585 A6 FD lda ApuPeriodLowTable,y ; CPU:$F587 PRG:3587 B9 01 F6 beq ProcessSoundChannels_Block_10 ; CPU:$F58A PRG:358A F0 0B - sta $4002,x ; CPU:$F58C PRG:358C 9D 02 40 + sta APUPC1TLOW,x ; CPU:$F58C PRG:358C 9D 02 40 lda ApuPeriodHighTable,y ; CPU:$F58F PRG:358F B9 00 F6 ora #$08 ; CPU:$F592 PRG:3592 09 08 - sta $4003,x ; CPU:$F594 PRG:3594 9D 03 40 + sta APUPC1THIGH,x ; CPU:$F594 PRG:3594 9D 03 40 ProcessSoundChannels_Block_10: tay ; CPU:$F597 PRG:3597 A8 pla ; CPU:$F598 PRG:3598 68 @@ -7526,7 +7526,7 @@ ProcessSoundChannels_Block_11: ProcessSoundChannels_Block_12: tya ; CPU:$F5AA PRG:35AA 98 ldy $FD ; CPU:$F5AB PRG:35AB A4 FD - sta $4000,y ; CPU:$F5AD PRG:35AD 99 00 40 + sta APUPC1BASE,y ; CPU:$F5AD PRG:35AD 99 00 40 ProcessSoundChannels_Load: lda $D4,x ; CPU:$F5B0 PRG:35B0 B5 D4 sta $D0,x ; CPU:$F5B2 PRG:35B2 95 D0 @@ -7553,7 +7553,7 @@ ProcessSoundChannels_Block_15: bcc ProcessSoundChannels_Block_16 ; CPU:$F5D3 PRG:35D3 90 02 lda #$3C ; CPU:$F5D5 PRG:35D5 A9 3C ProcessSoundChannels_Block_16: - sta $4008 ; CPU:$F5D7 PRG:35D7 8D 08 40 + sta APUTRIBASE ; CPU:$F5D7 PRG:35D7 8D 08 40 sta $DE ; CPU:$F5DA PRG:35DA 85 DE jmp ProcessSoundChannels_Block_7 ; CPU:$F5DC PRG:35DC 4C 75 F5 ProcessSoundChannels_Block_17: @@ -7561,11 +7561,11 @@ ProcessSoundChannels_Block_17: cmp #$02 ; CPU:$F5E1 PRG:35E1 C9 02 beq ProcessSoundChannels_Block_18 ; CPU:$F5E3 PRG:35E3 F0 12 lda $F700,y ; CPU:$F5E5 PRG:35E5 B9 00 F7 - sta $400C ; CPU:$F5E8 PRG:35E8 8D 0C 40 + sta APUNOISEBASE ; CPU:$F5E8 PRG:35E8 8D 0C 40 lda $F701,y ; CPU:$F5EB PRG:35EB B9 01 F7 - sta $400E ; CPU:$F5EE PRG:35EE 8D 0E 40 + sta APUNOISELOOP ; CPU:$F5EE PRG:35EE 8D 0E 40 lda $F702,y ; CPU:$F5F1 PRG:35F1 B9 02 F7 - sta $400F ; CPU:$F5F4 PRG:35F4 8D 0F 40 + sta APUNOISELENGTH ; CPU:$F5F4 PRG:35F4 8D 0F 40 ProcessSoundChannels_Block_18: jmp ProcessSoundChannels_Load ; CPU:$F5F7 PRG:35F7 4C B2 F5 @@ -7653,7 +7653,7 @@ InitializeSoundSequence: beq InitializeSoundSequence_Block ; CPU:$F6AF PRG:36AF F0 0B cmp #$02 ; CPU:$F6B1 PRG:36B1 C9 02 bne InitializeSoundSequence_Block ; CPU:$F6B3 PRG:36B3 D0 07 - sta $F0 ; CPU:$F6B5 PRG:36B5 85 F0 + sta SoundRequestFlags0 ; CPU:$F6B5 PRG:36B5 85 F0 lda #$00 ; CPU:$F6B7 PRG:36B7 A9 00 sta $07F5 ; CPU:$F6B9 PRG:36B9 8D F5 07 InitializeSoundSequence_Block: @@ -7694,8 +7694,8 @@ Data_F6E5: ; Returns: corresponding APU or sequencer state updated. SilencePulseChannels: lda #$7F ; CPU:$F710 PRG:3710 A9 7F - sta $4001 ; CPU:$F712 PRG:3712 8D 01 40 - sta $4005 ; CPU:$F715 PRG:3715 8D 05 40 + sta APUPC1SWEEP ; CPU:$F712 PRG:3712 8D 01 40 + sta APUPC2SWEEP ; CPU:$F715 PRG:3715 8D 05 40 ; InitializeApuChannelState ; Purpose: sound-driver routine identified from call flow and register/state access. ; Inputs: sound request, channel, and stream state in zero page/global RAM as used locally. @@ -7713,13 +7713,13 @@ Sound_F71F: ; Inputs: sound request, channel, and stream state in zero page/global RAM as used locally. ; Returns: corresponding APU or sequencer state updated. UpdateMusicTempo: - lda $F3 ; CPU:$F723 PRG:3723 A5 F3 + lda SoundRequestFlags3 ; CPU:$F723 PRG:3723 A5 F3 lsr a ; CPU:$F725 PRG:3725 4A bcs Sound_F736 ; CPU:$F726 PRG:3726 B0 0C lda $F7 ; CPU:$F728 PRG:3728 A5 F7 lsr a ; CPU:$F72A PRG:372A 4A bcs Sound_F749 ; CPU:$F72B PRG:372B B0 1A - lda $F0 ; CPU:$F72D PRG:372D A5 F0 + lda SoundRequestFlags0 ; CPU:$F72D PRG:372D A5 F0 and #$10 ; CPU:$F72F PRG:372F 29 10 bne Sound_F71F ; CPU:$F731 PRG:3731 D0 EA rts ; CPU:$F733 PRG:3733 60 @@ -7744,19 +7744,19 @@ Sound_F749: rts ; CPU:$F755 PRG:3755 60 Sound_F758: lda #$C0 ; CPU:$F756 PRG:3756 A9 C0 - sta $4017 ; CPU:$F758 PRG:3758 8D 17 40 + sta JOY2 ; CPU:$F758 PRG:3758 8D 17 40 jsr UpdateSoundPriority ; CPU:$F75B PRG:375B 20 25 FB jsr ProcessMusicRequest ; CPU:$F75E PRG:375E 20 0A F9 jsr UpdatePulseEffects ; CPU:$F761 PRG:3761 20 38 FA jsr UpdateNoiseEffects ; CPU:$F764 PRG:3764 20 AC FA jsr ProcessSoundEffectRequests ; CPU:$F767 PRG:3767 20 24 F8 - lda $F1 ; CPU:$F76A PRG:376A A5 F1 + lda SoundRequestFlags1 ; CPU:$F76A PRG:376A A5 F1 sta $07E9 ; CPU:$F76C PRG:376C 8D E9 07 lda #$00 ; CPU:$F76F PRG:376F A9 00 - sta $F0 ; CPU:$F771 PRG:3771 85 F0 - sta $F1 ; CPU:$F773 PRG:3773 85 F1 - sta $F2 ; CPU:$F775 PRG:3775 85 F2 - sta $F3 ; CPU:$F777 PRG:3777 85 F3 + sta SoundRequestFlags0 ; CPU:$F771 PRG:3771 85 F0 + sta SoundRequestFlags1 ; CPU:$F773 PRG:3773 85 F1 + sta SoundRequestFlags2 ; CPU:$F775 PRG:3775 85 F2 + sta SoundRequestFlags3 ; CPU:$F777 PRG:3777 85 F3 Sound_F77B: rts ; CPU:$F779 PRG:3779 60 Sound_F77C: @@ -7797,9 +7797,9 @@ Sound_F79F: ; Returns: corresponding APU or sequencer state updated. ResetAllSoundState: lda #$10 ; CPU:$F7A3 PRG:37A3 A9 10 - sta $400C ; CPU:$F7A5 PRG:37A5 8D 0C 40 - sta $4000 ; CPU:$F7A8 PRG:37A8 8D 00 40 - sta $4004 ; CPU:$F7AB PRG:37AB 8D 04 40 + sta APUNOISEBASE ; CPU:$F7A5 PRG:37A5 8D 0C 40 + sta APUPC1BASE ; CPU:$F7A8 PRG:37A8 8D 00 40 + sta APUPC2BASE ; CPU:$F7AB PRG:37AB 8D 04 40 lda #$00 ; CPU:$F7AE PRG:37AE A9 00 sta $F4 ; CPU:$F7B0 PRG:37B0 85 F4 Sound_F7B4: @@ -7807,14 +7807,14 @@ Sound_F7B4: sta $F6 ; CPU:$F7B4 PRG:37B4 85 F6 sta $07FA ; CPU:$F7B6 PRG:37B6 8D FA 07 sta $F7 ; CPU:$F7B9 PRG:37B9 85 F7 - sta $4008 ; CPU:$F7BB PRG:37BB 8D 08 40 - sta $4011 ; CPU:$F7BE PRG:37BE 8D 11 40 + sta APUTRIBASE ; CPU:$F7BB PRG:37BB 8D 08 40 + sta APUDMALOAD ; CPU:$F7BE PRG:37BE 8D 11 40 sta $07F0 ; CPU:$F7C1 PRG:37C1 8D F0 07 rts ; CPU:$F7C4 PRG:37C4 60 Sound_F7C7: lda #$10 ; CPU:$F7C5 PRG:37C5 A9 10 - sta $4004 ; CPU:$F7C7 PRG:37C7 8D 04 40 - sta $400C ; CPU:$F7CA PRG:37CA 8D 0C 40 + sta APUPC2BASE ; CPU:$F7C7 PRG:37C7 8D 04 40 + sta APUNOISEBASE ; CPU:$F7CA PRG:37CA 8D 0C 40 lda #$00 ; CPU:$F7CD PRG:37CD A9 00 beq Sound_F7B4 ; CPU:$F7CF PRG:37CF F0 E1 Sound_F7D3: @@ -7864,7 +7864,7 @@ Sound_F821: ; Inputs: sound request, channel, and stream state in zero page/global RAM as used locally. ; Returns: corresponding APU or sequencer state updated. ProcessSoundEffectRequests: - lda $F0 ; CPU:$F822 PRG:3822 A5 F0 + lda SoundRequestFlags0 ; CPU:$F822 PRG:3822 A5 F0 lsr a ; CPU:$F824 PRG:3824 4A bcs Sound_F821 ; CPU:$F825 PRG:3825 B0 F8 lda $F6 ; CPU:$F827 PRG:3827 A5 F6 @@ -7882,7 +7882,7 @@ Sound_F83B: beq Sound_F7EF ; CPU:$F83E PRG:383E F0 AD cmp #$F0 ; CPU:$F840 PRG:3840 C9 F0 beq Sound_F7E0 ; CPU:$F842 PRG:3842 F0 9A - lda $F0 ; CPU:$F844 PRG:3844 A5 F0 + lda SoundRequestFlags0 ; CPU:$F844 PRG:3844 A5 F0 lsr a ; CPU:$F846 PRG:3846 4A lsr a ; CPU:$F847 PRG:3847 4A bcs Sound_F800 ; CPU:$F848 PRG:3848 B0 B4 @@ -7928,7 +7928,7 @@ Sound_F87D: cmp #$10 ; CPU:$F890 PRG:3890 C9 10 bne Sound_F8A2 ; CPU:$F892 PRG:3892 D0 0C lda #$10 ; CPU:$F894 PRG:3894 A9 10 - sta $400C ; CPU:$F896 PRG:3896 8D 0C 40 + sta APUNOISEBASE ; CPU:$F896 PRG:3896 8D 0C 40 Sound_F89B: lda $F4 ; CPU:$F899 PRG:3899 A5 F4 and #$F0 ; CPU:$F89B PRG:389B 29 F0 @@ -7936,13 +7936,13 @@ Sound_F89B: Sound_F8A1: rts ; CPU:$F89F PRG:389F 60 Sound_F8A2: - sta $400E ; CPU:$F8A0 PRG:38A0 8D 0E 40 + sta APUNOISELOOP ; CPU:$F8A0 PRG:38A0 8D 0E 40 rts ; CPU:$F8A3 PRG:38A3 60 Sound_F8A6: lda #$00 ; CPU:$F8A4 PRG:38A4 A9 00 sta $07E0 ; CPU:$F8A6 PRG:38A6 8D E0 07 clc ; CPU:$F8A9 PRG:38A9 18 - lda $1B ; CPU:$F8AA PRG:38AA A5 1B + lda RandomState ; CPU:$F8AA PRG:38AA A5 1B and #$07 ; CPU:$F8AC PRG:38AC 29 07 adc #$02 ; CPU:$F8AE PRG:38AE 69 02 sta $07E1 ; CPU:$F8B0 PRG:38B0 8D E1 07 @@ -7958,8 +7958,8 @@ Sound_F8BF: bne Sound_F8E8 ; CPU:$F8C6 PRG:38C6 D0 1E Sound_F8CA: lda #$10 ; CPU:$F8C8 PRG:38C8 A9 10 - sta $4000 ; CPU:$F8CA PRG:38CA 8D 00 40 - sta $4004 ; CPU:$F8CD PRG:38CD 8D 04 40 + sta APUPC1BASE ; CPU:$F8CA PRG:38CA 8D 00 40 + sta APUPC2BASE ; CPU:$F8CD PRG:38CD 8D 04 40 lda #$00 ; CPU:$F8D0 PRG:38D0 A9 00 sta $F7 ; CPU:$F8D2 PRG:38D2 85 F7 lda $F4 ; CPU:$F8D4 PRG:38D4 A5 F4 @@ -7971,22 +7971,22 @@ Sound_F8DD: lda #$80 ; CPU:$F8DE PRG:38DE A9 80 sta $F4 ; CPU:$F8E0 PRG:38E0 85 F4 lda #$02 ; CPU:$F8E2 PRG:38E2 A9 02 - sta $F0 ; CPU:$F8E4 PRG:38E4 85 F0 + sta SoundRequestFlags0 ; CPU:$F8E4 PRG:38E4 85 F0 Sound_F8E8: ldx #$F9 ; CPU:$F8E6 PRG:38E6 A2 F9 ldy #$F6 ; CPU:$F8E8 PRG:38E8 A0 F6 jsr $F683 ; CPU:$F8EA PRG:38EA 20 83 F6 - lda $1B ; CPU:$F8ED PRG:38ED A5 1B + lda RandomState ; CPU:$F8ED PRG:38ED A5 1B and #$0F ; CPU:$F8EF PRG:38EF 29 0F - sta $4002 ; CPU:$F8F1 PRG:38F1 8D 02 40 + sta APUPC1TLOW ; CPU:$F8F1 PRG:38F1 8D 02 40 ldx #$F9 ; CPU:$F8F4 PRG:38F4 A2 F9 ldy #$F6 ; CPU:$F8F6 PRG:38F6 A0 F6 jsr $F68F ; CPU:$F8F8 PRG:38F8 20 8F F6 - lda $1B ; CPU:$F8FB PRG:38FB A5 1B + lda RandomState ; CPU:$F8FB PRG:38FB A5 1B lsr a ; CPU:$F8FD PRG:38FD 4A lsr a ; CPU:$F8FE PRG:38FE 4A and #$0F ; CPU:$F8FF PRG:38FF 29 0F - sta $4006 ; CPU:$F901 PRG:3901 8D 06 40 + sta APUPC2LOW ; CPU:$F901 PRG:3901 8D 06 40 rts ; CPU:$F904 PRG:3904 60 Sound_F907: jmp Sound_F8A6 ; CPU:$F905 PRG:3905 4C A6 F8 @@ -7999,12 +7999,12 @@ ProcessMusicRequest: beq Sound_F91B ; CPU:$F90A PRG:390A F0 0D cmp #$DF ; CPU:$F90C PRG:390C C9 DF beq Sound_F91B ; CPU:$F90E PRG:390E F0 09 - lda $F0 ; CPU:$F910 PRG:3910 A5 F0 + lda SoundRequestFlags0 ; CPU:$F910 PRG:3910 A5 F0 and #$E0 ; CPU:$F912 PRG:3912 29 E0 beq Sound_F94E ; CPU:$F914 PRG:3914 F0 36 jsr ResetAllSoundState ; CPU:$F916 PRG:3916 20 A5 F7 Sound_F91B: - lda $F0 ; CPU:$F919 PRG:3919 A5 F0 + lda SoundRequestFlags0 ; CPU:$F919 PRG:3919 A5 F0 asl a ; CPU:$F91B PRG:391B 0A bcs Sound_F8DD ; CPU:$F91C PRG:391C B0 BD asl a ; CPU:$F91E PRG:391E 0A @@ -8022,7 +8022,7 @@ Sound_F91B: beq Sound_F94B ; CPU:$F933 PRG:3933 F0 14 lda $F6 ; CPU:$F935 PRG:3935 A5 F6 bne Sound_F94E ; CPU:$F937 PRG:3937 D0 13 - lda $F3 ; CPU:$F939 PRG:3939 A5 F3 + lda SoundRequestFlags3 ; CPU:$F939 PRG:3939 A5 F3 asl a ; CPU:$F93B PRG:393B 0A bcs Sound_F907 ; CPU:$F93C PRG:393C B0 C7 asl a ; CPU:$F93E PRG:393E 0A @@ -8050,7 +8050,7 @@ Sound_F952: bne Sound_F98F ; CPU:$F961 PRG:3961 D0 2A Sound_F965: lda #$02 ; CPU:$F963 PRG:3963 A9 02 - sta $F0 ; CPU:$F965 PRG:3965 85 F0 + sta SoundRequestFlags0 ; CPU:$F965 PRG:3965 85 F0 lda $F4 ; CPU:$F967 PRG:3967 A5 F4 and #$0F ; CPU:$F969 PRG:3969 29 0F ora #$20 ; CPU:$F96B PRG:396B 09 20 @@ -8080,7 +8080,7 @@ Sound_F993: beq Sound_F9CA ; CPU:$F999 PRG:3999 F0 2D cmp #$06 ; CPU:$F99B PRG:399B C9 06 bcc Sound_F9B1 ; CPU:$F99D PRG:399D 90 10 - lda $1B ; CPU:$F99F PRG:399F A5 1B + lda RandomState ; CPU:$F99F PRG:399F A5 1B ora #$10 ; CPU:$F9A1 PRG:39A1 09 10 and #$7F ; CPU:$F9A3 PRG:39A3 29 7F sta $07FE ; CPU:$F9A5 PRG:39A5 8D FE 07 @@ -8094,9 +8094,9 @@ Sound_F9B1: inc $07FE ; CPU:$F9B8 PRG:39B8 EE FE 07 Sound_F9BD: lda $07FD ; CPU:$F9BB PRG:39BB AD FD 07 - sta $4006 ; CPU:$F9BE PRG:39BE 8D 06 40 + sta APUPC2LOW ; CPU:$F9BE PRG:39BE 8D 06 40 lda $07FE ; CPU:$F9C1 PRG:39C1 AD FE 07 - sta $4002 ; CPU:$F9C4 PRG:39C4 8D 02 40 + sta APUPC1TLOW ; CPU:$F9C4 PRG:39C4 8D 02 40 rts ; CPU:$F9C7 PRG:39C7 60 Sound_F9CA: jmp Sound_F8CA ; CPU:$F9C8 PRG:39C8 4C CA F8 @@ -8135,9 +8135,9 @@ Sound_FA0C: cmp #$07 ; CPU:$FA10 PRG:3A10 C9 07 bne Sound_FA26 ; CPU:$FA12 PRG:3A12 D0 10 lda #$7F ; CPU:$FA14 PRG:3A14 A9 7F - sta $4005 ; CPU:$FA16 PRG:3A16 8D 05 40 + sta APUPC2SWEEP ; CPU:$FA16 PRG:3A16 8D 05 40 lda #$10 ; CPU:$FA19 PRG:3A19 A9 10 - sta $4004 ; CPU:$FA1B PRG:3A1B 8D 04 40 + sta APUPC2BASE ; CPU:$FA1B PRG:3A1B 8D 04 40 lda $F5 ; CPU:$FA1E PRG:3A1E A5 F5 and #$E0 ; CPU:$FA20 PRG:3A20 29 E0 sta $F5 ; CPU:$FA22 PRG:3A22 85 F5 @@ -8168,7 +8168,7 @@ Sound_FA42: lda $F7 ; CPU:$FA46 PRG:3A46 A5 F7 and #$C0 ; CPU:$FA48 PRG:3A48 29 C0 bne Sound_FA63 ; CPU:$FA4A PRG:3A4A D0 15 - lda $F1 ; CPU:$FA4C PRG:3A4C A5 F1 + lda SoundRequestFlags1 ; CPU:$FA4C PRG:3A4C A5 F1 lsr a ; CPU:$FA4E PRG:3A4E 4A bcs Sound_FA27 ; CPU:$FA4F PRG:3A4F B0 D4 lsr a ; CPU:$FA51 PRG:3A51 4A @@ -8193,10 +8193,10 @@ Sound_FA64: ldx #$8A ; CPU:$FA6C PRG:3A6C A2 8A ldy #$FA ; CPU:$FA6E PRG:3A6E A0 FA jsr $F68F ; CPU:$FA70 PRG:3A70 20 8F F6 - lda $1B ; CPU:$FA73 PRG:3A73 A5 1B + lda RandomState ; CPU:$FA73 PRG:3A73 A5 1B and #$3F ; CPU:$FA75 PRG:3A75 29 3F ora #$10 ; CPU:$FA77 PRG:3A77 09 10 - sta $4006 ; CPU:$FA79 PRG:3A79 8D 06 40 + sta APUPC2LOW ; CPU:$FA79 PRG:3A79 8D 06 40 rts ; CPU:$FA7C PRG:3A7C 60 Sound_FA7F: jsr $F68F ; CPU:$FA7D PRG:3A7D 20 8F F6 @@ -8240,7 +8240,7 @@ Sound_FABA: lda $F4 ; CPU:$FAB8 PRG:3AB8 A5 F4 and #$80 ; CPU:$FABA PRG:3ABA 29 80 bne Sound_FAD8 ; CPU:$FABC PRG:3ABC D0 18 - lda $F1 ; CPU:$FABE PRG:3ABE A5 F1 + lda SoundRequestFlags1 ; CPU:$FABE PRG:3ABE A5 F1 asl a ; CPU:$FAC0 PRG:3AC0 0A bcs Sound_FB17 ; CPU:$FAC1 PRG:3AC1 B0 52 asl a ; CPU:$FAC3 PRG:3AC3 0A @@ -8249,7 +8249,7 @@ Sound_FABA: asl a ; CPU:$FAC8 PRG:3AC8 0A asl a ; CPU:$FAC9 PRG:3AC9 0A bcs UpdateTriangleEffects ; CPU:$FACA PRG:3ACA B0 C8 - lda $F1 ; CPU:$FACC PRG:3ACC A5 F1 + lda SoundRequestFlags1 ; CPU:$FACC PRG:3ACC A5 F1 and #$20 ; CPU:$FACE PRG:3ACE 29 20 beq Sound_FAD9 ; CPU:$FAD0 PRG:3AD0 F0 05 lda $F6 ; CPU:$FAD2 PRG:3AD2 A5 F6 @@ -8267,12 +8267,12 @@ Sound_FAE2: ora #$40 ; CPU:$FAE4 PRG:3AE4 09 40 sta $F5 ; CPU:$FAE6 PRG:3AE6 85 F5 lda #$00 ; CPU:$FAE8 PRG:3AE8 A9 00 - sta $4008 ; CPU:$FAEA PRG:3AEA 8D 08 40 + sta APUTRIBASE ; CPU:$FAEA PRG:3AEA 8D 08 40 sta $F6 ; CPU:$FAED PRG:3AED 85 F6 sta $07F6 ; CPU:$FAEF PRG:3AEF 8D F6 07 lda #$10 ; CPU:$FAF2 PRG:3AF2 A9 10 - sta $4004 ; CPU:$FAF4 PRG:3AF4 8D 04 40 - sta $400C ; CPU:$FAF7 PRG:3AF7 8D 0C 40 + sta APUPC2BASE ; CPU:$FAF4 PRG:3AF4 8D 04 40 + sta APUNOISEBASE ; CPU:$FAF7 PRG:3AF7 8D 0C 40 ldx #$8E ; CPU:$FAFA PRG:3AFA A2 8E ldy #$FA ; CPU:$FAFC PRG:3AFC A0 FA Sound_FB00: @@ -8303,7 +8303,7 @@ Sound_FB1E: UpdateSoundPriority: lda $07E8 ; CPU:$FB23 PRG:3B23 AD E8 07 bne Sound_FB5E ; CPU:$FB26 PRG:3B26 D0 34 - lda $F2 ; CPU:$FB28 PRG:3B28 A5 F2 + lda SoundRequestFlags2 ; CPU:$FB28 PRG:3B28 A5 F2 lsr a ; CPU:$FB2A PRG:3B2A 4A bcs Sound_FB82 ; CPU:$FB2B PRG:3B2B B0 53 lsr a ; CPU:$FB2D PRG:3B2D 4A @@ -8367,9 +8367,9 @@ Sound_FB86: Sound_FB8D: jsr InitializeApuChannelState ; CPU:$FB8B PRG:3B8B 20 1A F7 lda #$83 ; CPU:$FB8E PRG:3B8E A9 83 - sta $4001 ; CPU:$FB90 PRG:3B90 8D 01 40 + sta APUPC1SWEEP ; CPU:$FB90 PRG:3B90 8D 01 40 lda #$7F ; CPU:$FB93 PRG:3B93 A9 7F - sta $4005 ; CPU:$FB95 PRG:3B95 8D 05 40 + sta APUPC2SWEEP ; CPU:$FB95 PRG:3B95 8D 05 40 bne Sound_FBAF ; CPU:$FB98 PRG:3B98 D0 13 jsr $F6A8 ; CPU:$FB9A PRG:3B9A 20 A8 F6 ldx #$04 ; CPU:$FB9D PRG:3B9D A2 04 @@ -8388,7 +8388,7 @@ Sound_FBAF: and #$20 ; CPU:$FBB4 PRG:3BB4 29 20 beq Sound_FB49 ; CPU:$FBB6 PRG:3BB6 F0 8F lda #$D5 ; CPU:$FBB8 PRG:3BB8 A9 D5 - sta $4001 ; CPU:$FBBA PRG:3BBA 8D 01 40 + sta APUPC1SWEEP ; CPU:$FBBA PRG:3BBA 8D 01 40 bne Sound_FB49 ; CPU:$FBBD PRG:3BBD D0 88 Sound_FBC1: jsr $F6A8 ; CPU:$FBBF PRG:3BBF 20 A8 F6 diff --git a/Baseball (UE)/OVERVIEW.md b/Baseball (UE)/OVERVIEW.md index a3e6761..3bd0c07 100644 --- a/Baseball (UE)/OVERVIEW.md +++ b/Baseball (UE)/OVERVIEW.md @@ -13,7 +13,7 @@ This document describes the execution flow of the disassembled Baseball (UE) PRG | CHR | 1 × 8 KB | | Mirroring | Horizontal | | PRG bank start | CPU $C000 (`.org $C000`) | -| Linker output | `reconstructed_prg.bin`, byte-identical to `prg.bin` | +| Linker output | `reconstructed.nes`, byte-identical to `rom.nes` | ### Interrupt vectors (CPU $FFFA–$FFFF) @@ -430,4 +430,4 @@ NMI ($C046) [every frame] - The source is **21,624 lines** and thoroughly annotated with symbolic names for nearly every routine, table, and data block — there are no generic `Label_Cxxxx` placeholders. - Numerous routines are followed by inline `.byte` data blocks consumed by `QueueInlineObjectEvent`, `CopyInlineDisplayRecord`, or `ProcessInlinePpuStream`; these are intentionally left as raw bytes and marked in comments. - The PRG is a single 16 KB bank at $C000–$FFFF; calls to $Dxxx/$Exxx/$Fxxx targets are all within the same bank (no bank switching). -- Build verification: `make` in `copilot/` produces `reconstructed_prg.bin` that is **byte-identical** to `prg.bin` and to the PRG bank of `baseball.nes`. \ No newline at end of file +- Build verification: `make` in `copilot/` produces `reconstructed.nes`, compared whole-ROM against `rom.nes`. \ No newline at end of file diff --git a/Baseball (UE)/copilot/prg.s b/Baseball (UE)/copilot/prg.s index eba5086..435831b 100644 --- a/Baseball (UE)/copilot/prg.s +++ b/Baseball (UE)/copilot/prg.s @@ -804,7 +804,7 @@ SortObjectsByY: ; $C339 iny ; CPU:$C33B PRG:033B C8 SortNextObjectPair: ; $C33C - sty $22 ; CPU:$C33C PRG:033C 84 22 + sty SavedIndex ; CPU:$C33C PRG:033C 84 22 ldx $0378,y ; CPU:$C33E PRG:033E BE 78 03 lda $0377,y ; CPU:$C341 PRG:0341 B9 77 03 @@ -831,17 +831,17 @@ SortNextObjectPair: ; $C33C tya ; CPU:$C353 PRG:0353 98 - ldy $22 ; CPU:$C354 PRG:0354 A4 22 + ldy SavedIndex ; CPU:$C354 PRG:0354 A4 22 sta $0378,y ; CPU:$C356 PRG:0356 99 78 03 txa ; CPU:$C359 PRG:0359 8A sta $0377,y ; CPU:$C35A PRG:035A 99 77 03 ContinueObjectDepthSort: ; $C35D - ldy $22 ; CPU:$C35D PRG:035D A4 22 + ldy SavedIndex ; CPU:$C35D PRG:035D A4 22 iny ; CPU:$C35F PRG:035F C8 - cpy $CA ; CPU:$C360 PRG:0360 C4 CA + cpy SpriteArrayEnd ; CPU:$C360 PRG:0360 C4 CA bcc SortNextObjectPair ; CPU:$C362 PRG:0362 90 D8 ldy SpriteSortBaseIndex ; CPU:$C364 PRG:0364 A4 C9 @@ -860,11 +860,11 @@ RenderNextSortedObject: ; $C366 lda $039A,x ; CPU:$C377 PRG:0377 BD 9A 03 - sty $22 ; CPU:$C37A PRG:037A 84 22 + sty SavedIndex ; CPU:$C37A PRG:037A 84 22 jsr RenderSpriteRecordList ; CPU:$C37C PRG:037C 20 7B E7 - ldy $22 ; CPU:$C37F PRG:037F A4 22 + ldy SavedIndex ; CPU:$C37F PRG:037F A4 22 - cpy $CA ; CPU:$C381 PRG:0381 C4 CA + cpy SpriteArrayEnd ; CPU:$C381 PRG:0381 C4 CA iny ; CPU:$C383 PRG:0383 C8 bcc RenderNextSortedObject ; CPU:$C384 PRG:0384 ?? ; $C384: 90 E0 @@ -1323,7 +1323,7 @@ SelectDistinctSecondPlayerValue: ; $C4CE lda ModeFlags ; CPU:$C4DB PRG:04DB A5 40 and #$01 ; CPU:$C4DD PRG:04DD 29 01 - sta $43 ; CPU:$C4DF PRG:04DF 85 43 + sta SelectionState ; CPU:$C4DF PRG:04DF 85 43 bne DeriveSelectedSideFromMode ; CPU:$C4E1 PRG:04E1 ?? ; $C4E1: D0 09 @@ -1370,7 +1370,7 @@ StartPlayerSelection: ; $C4F5 WaitForPlayerSelection: ; $C4FF jsr SelectObjectEventBank1 ; CPU:$C4FF PRG:04FF 20 48 EB - lda $43 ; CPU:$C502 PRG:0502 A5 43 + lda SelectionState ; CPU:$C502 PRG:0502 A5 43 bpl WaitForPlayerSelection ; CPU:$C504 PRG:0504 ?? ; $C504: 10 F9 @@ -1420,7 +1420,7 @@ InitializeRoundState: ; $C51E EnableRoundAudio: ; $C52A lda #$0F ; CPU:$C52A PRG:052A A9 0F sta $0100 ; CPU:$C52C PRG:052C 8D 00 01 - sta $4015 ; CPU:$C52F PRG:052F 8D 15 40 + sta APUCTRL ; CPU:$C52F PRG:052F 8D 15 40 ; Enable the four standard APU channels. lda #$08 ; CPU:$C532 PRG:0532 A9 08 @@ -1824,7 +1824,7 @@ ApplyPendingScoreUpdate: ; $C67E StartPostRoundDelay: ; $C68D lda #$1E ; CPU:$C68D PRG:068D A9 1E - sta $48 ; CPU:$C68F PRG:068F 85 48 + sta DelayCounter ; CPU:$C68F PRG:068F 85 48 WaitPostRoundFrame: ; $C691 jsr SelectObjectEventBank1 ; CPU:$C691 PRG:0691 20 48 EB @@ -1832,7 +1832,7 @@ WaitPostRoundFrame: ; $C691 lda PendingEvent ; CPU:$C694 PRG:0694 A5 6F bne StartPostRoundDelay ; CPU:$C696 PRG:0696 D0 F5 - dec $48 ; CPU:$C698 PRG:0698 C6 48 + dec DelayCounter ; CPU:$C698 PRG:0698 C6 48 bne WaitPostRoundFrame ; CPU:$C69A PRG:069A D0 F5 ; ---------------------------------------------------------------------------- @@ -1994,13 +1994,13 @@ InitializeResultsPosition: ; $C708 ; ---------------------------------------------------------------------------- lda #$0A ; CPU:$C733 PRG:0733 A9 0A - sta $49 ; CPU:$C735 PRG:0735 85 49 + sta LoopCounter49 ; CPU:$C735 PRG:0735 85 49 ResultsDelayLoop: ; $C737 lda #$3C ; CPU:$C737 PRG:0737 A9 3C jsr StoreObjectEventBankValue ; CPU:$C739 PRG:0739 20 41 EB - dec $49 ; CPU:$C73C PRG:073C C6 49 + dec LoopCounter49 ; CPU:$C73C PRG:073C C6 49 bne ResultsDelayLoop ; CPU:$C73E PRG:073E D0 F7 ; ---------------------------------------------------------------------------- @@ -2075,7 +2075,7 @@ RefreshTitleScreen: ; $C77A jsr QueueModeIndicatorTiles ; CPU:$C77C PRG:077C 20 CF E5 lda #$03 ; CPU:$C77F PRG:077F A9 03 - sta $1B ; CPU:$C781 PRG:0781 85 1B + sta TransitionCounter ; CPU:$C781 PRG:0781 85 1B WaitForTitleInputRelease: ; $C783 jsr SelectObjectEventBank1 ; CPU:$C783 PRG:0783 20 48 EB @@ -2087,7 +2087,7 @@ WaitForTitleInputRelease: ; $C783 lda FrameCounter ; CPU:$C78C PRG:078C A5 E3 bne WaitForTitleInputRelease ; CPU:$C78E PRG:078E D0 F3 - dec $1B ; CPU:$C790 PRG:0790 C6 1B + dec TransitionCounter ; CPU:$C790 PRG:0790 C6 1B bne WaitForTitleInputRelease ; CPU:$C792 PRG:0792 D0 EF ; ---------------------------------------------------------------------------- @@ -2266,8 +2266,8 @@ QueuePlayerSelectionDisplay: ; $C7DD eor #$01 ; CPU:$C805 PRG:0805 ?? tax - ldy $34,x ; CPU:$C807 PRG:0807 ?? - ldx $3E ; CPU:$C809 PRG:0809 ?? + ldy PlayerOneSelection,x ; CPU:$C807 PRG:0807 ?? + ldx PpuQueueOffset ; CPU:$C809 PRG:0809 ?? lda $C02A,y ; CPU:$C80B PRG:080B ?? sta $02F9,x ; CPU:$C80D PRG:080D ?? @@ -2361,7 +2361,7 @@ SavePlayerSelection: ; $C83A lda InputState1,x ; CPU:$C847 PRG:0847 B5 13 bpl UpdatePlayerSelections ; CPU:$C849 PRG:0849 10 CF - dec $43 ; CPU:$C84B PRG:084B C6 43 + dec SelectionState ; CPU:$C84B PRG:084B C6 43 jmp CommonEngineExit ; CPU:$C84D PRG:084D 4C 6A EB @@ -2421,7 +2421,7 @@ FillSelectionBackgroundBlocks: ; $C85A lda #$88 ; CPU:$C85E PRG:085E A9 88 FillNextBackgroundBlock: ; $C860 - sta $4A ; CPU:$C860 PRG:0860 85 4A + sta QueueDestination ; CPU:$C860 PRG:0860 85 4A tax ; CPU:$C862 PRG:0862 AA clc ; CPU:$C863 PRG:0863 18 @@ -2451,7 +2451,7 @@ FillBackgroundBlock: ; $C86F ; Continue until the addition carries. ; ---------------------------------------------------------------------------- - lda $4A ; CPU:$C876 PRG:0876 A5 4A + lda QueueDestination ; CPU:$C876 PRG:0876 A5 4A clc ; CPU:$C878 PRG:0878 18 adc #$20 ; CPU:$C879 PRG:0879 69 20 bcc FillNextBackgroundBlock ; CPU:$C87B PRG:087B 90 E3 @@ -4468,7 +4468,7 @@ ResetCelebrationColorIndex: ; $CDEC ldy #$07 ; CPU:$CDEC PRG:0DEC A0 07 SaveCelebrationColorIndex: ; $CDEE - sty $70 ; CPU:$CDEE PRG:0DEE 84 70 + sty TableCopyIndex ; CPU:$CDEE PRG:0DEE 84 70 lda #$06 ; CPU:$CDF0 PRG:0DF0 A9 06 sta $05C6 ; CPU:$CDF2 PRG:0DF2 8D C6 05 @@ -6206,7 +6206,7 @@ SearchPitchDirectionThresholds: ; $D1FD ; $D201: 90 FA lda PitchDirectionResultTable,x ; CPU:$D203 PRG:1203 BD 54 D1 - sta $91 ; CPU:$D206 PRG:1206 85 91 + sta PitchDirectionDecision ; CPU:$D206 PRG:1206 85 91 bcs AnimatePitchStart ; CPU:$D208 PRG:1208 B0 08 ; Always taken after the table search succeeds. @@ -15171,7 +15171,7 @@ QueueModeIndicatorTiles: ; $E5CF ; Preserve the returned buffer index. ; ---------------------------------------------------------------------------- - stx $05 ; CPU:$E5D9 PRG:25D9 86 05 + stx MathTemp05 ; CPU:$E5D9 PRG:25D9 86 05 ; ---------------------------------------------------------------------------- ; Write three copies of $25 into consecutive bytes of the $0300 buffer. @@ -15206,7 +15206,7 @@ QueueModeIndicatorTiles_Fill: ; $E5DF and #$01 ; CPU:$E5E8 PRG:25E8 29 01 asl ; CPU:$E5EA PRG:25EA 0A - adc $05 ; CPU:$E5EB PRG:25EB 65 05 + adc MathTemp05 ; CPU:$E5EB PRG:25EB 65 05 ; Carry is clear after ASL because the input ; can only be zero or one. @@ -16463,7 +16463,7 @@ CalculateVectorMagnitude_SaveX: ; $E810 ; ---------------------------------------------------------------------------- ldx #$FF ; CPU:$E814 PRG:2814 A2 FF - stx $DB ; CPU:$E816 PRG:2816 86 DB + stx MathShiftCount ; CPU:$E816 PRG:2816 86 DB inx ; CPU:$E818 PRG:2818 E8 ; X = $00. @@ -16552,7 +16552,7 @@ CalculateSignedVector_SaveSign: ; $E832 ; ---------------------------------------------------------------------------- ldx #$FF ; CPU:$E83B PRG:283B A2 FF - stx $DB ; CPU:$E83D PRG:283D 86 DB + stx MathShiftCount ; CPU:$E83D PRG:283D 86 DB inx ; CPU:$E83F PRG:283F E8 ; X = $00. @@ -16631,12 +16631,12 @@ CalculateVectorFromRotatedMask: ; $E855 ; ---------------------------------------------------------------------------- lda #$FF ; CPU:$E85D PRG:285D A9 FF - sta $DB ; CPU:$E85F PRG:285F 85 DB + sta MathShiftCount ; CPU:$E85F PRG:285F 85 DB ldy #$08 ; CPU:$E861 PRG:2861 A0 08 CalculateVectorFromRotatedMask_Loop: ; $E863 - inc $DB ; CPU:$E863 PRG:2863 E6 DB + inc MathShiftCount ; CPU:$E863 PRG:2863 E6 DB ; ---------------------------------------------------------------------------- ; Shift the next bit from $D8 into carry. @@ -16711,7 +16711,7 @@ CalculateVectorFromRotatedMask_SaveMask: ; $E86C ; ---------------------------------------------------------------------------- NormalizeSignedVector: ; $E877 ldy #$FF ; CPU:$E877 PRG:2877 A0 FF - sty $DB ; CPU:$E879 PRG:2879 84 DB + sty MathShiftCount ; CPU:$E879 PRG:2879 84 DB ; ---------------------------------------------------------------------------- ; Normalize the signed source byte at $D4. @@ -16822,7 +16822,7 @@ RunEightRoundTransform: ; $E8A5 ; ---------------------------------------------------------------------------- ldx #$FF ; CPU:$E8A9 PRG:28A9 A2 FF - stx $DB ; CPU:$E8AB PRG:28AB 86 DB + stx MathShiftCount ; CPU:$E8AB PRG:28AB 86 DB inx ; CPU:$E8AD PRG:28AD E8 ; X = $00. @@ -16891,7 +16891,7 @@ TransformSignedComponentPair_SaveY: ; $E8C2 ; ---------------------------------------------------------------------------- ldx #$FF ; CPU:$E8C4 PRG:28C4 A2 FF - stx $DB ; CPU:$E8C6 PRG:28C6 86 DB + stx MathShiftCount ; CPU:$E8C6 PRG:28C6 86 DB inx ; CPU:$E8C8 PRG:28C8 E8 ; X = $00. @@ -16957,7 +16957,7 @@ TransformSignedComponentPair_Loop: ; $E8CB ; Validation: Inferred from annotated instructions and call sites; call sites: 4. ; ---------------------------------------------------------------------------- UpdatePrimaryArithmeticPair: ; $E8DA - inc $DB ; CPU:$E8DA PRG:28DA E6 DB + inc MathShiftCount ; CPU:$E8DA PRG:28DA E6 DB ; Advance the per-round shift count. lda $D5 ; CPU:$E8DC PRG:28DC A5 D5 @@ -16983,7 +16983,7 @@ UpdatePrimaryArithmeticPair_SaveMask: ; $E8E3 ; When $DB is zero, no shift is performed. ; ---------------------------------------------------------------------------- - ldx $DB ; CPU:$E8E5 PRG:28E5 A6 DB + ldx MathShiftCount ; CPU:$E8E5 PRG:28E5 A6 DB beq UpdatePrimaryArithmeticPair_AddLow ; CPU:$E8E7 PRG:28E7 ?? ; $E8E7: F0 04 @@ -17017,7 +17017,7 @@ UpdatePrimaryArithmeticPair_AddLow: ; $E8ED eor #$FF ; CPU:$E8F2 PRG:28F2 49 FF eor $D4 ; CPU:$E8F4 PRG:28F4 45 D4 - ldx $DB ; CPU:$E8F6 PRG:28F6 A6 DB + ldx MathShiftCount ; CPU:$E8F6 PRG:28F6 A6 DB beq UpdatePrimaryArithmeticPair_AddHigh ; CPU:$E8F8 PRG:28F8 ?? ; $E8F8: F0 06 @@ -17085,7 +17085,7 @@ UpdateSecondaryArithmeticPair: ; $E908 ; Arithmetically shift the sign-corrected high contribution by $DB. ; ---------------------------------------------------------------------------- - ldx $DB ; CPU:$E90E PRG:290E A6 DB + ldx MathShiftCount ; CPU:$E90E PRG:290E A6 DB beq UpdateSecondaryArithmeticPair_AddLow ; CPU:$E910 PRG:2910 ?? ; $E910: F0 06 @@ -17113,7 +17113,7 @@ UpdateSecondaryArithmeticPair_AddLow: ; $E918 lda $DA ; CPU:$E91B PRG:291B A5 DA eor $D6 ; CPU:$E91D PRG:291D 45 D6 - ldx $DB ; CPU:$E91F PRG:291F A6 DB + ldx MathShiftCount ; CPU:$E91F PRG:291F A6 DB beq UpdateSecondaryArithmeticPair_AddHigh ; CPU:$E921 PRG:2921 ?? ; $E921: F0 06 @@ -17172,7 +17172,7 @@ UpdateSecondaryArithmeticPair_AddHigh: ; $E929 ; Validation: Inferred from annotated instructions and call sites; call sites: 1. ; ---------------------------------------------------------------------------- UpdatePrimaryArithmeticPairAlternate: ; $E931 - inc $DB ; CPU:$E931 PRG:2931 E6 DB + inc MathShiftCount ; CPU:$E931 PRG:2931 E6 DB lda $D5 ; CPU:$E933 PRG:2933 A5 D5 bmi UpdatePrimaryArithmeticPairAlternate_SaveMask ; CPU:$E935 PRG:2935 ?? @@ -17197,7 +17197,7 @@ UpdatePrimaryArithmeticPairAlternate_SaveMask: ; $E93A ; Counts below four are increased by one. ; ---------------------------------------------------------------------------- - ldx $DB ; CPU:$E93C PRG:293C A6 DB + ldx MathShiftCount ; CPU:$E93C PRG:293C A6 DB cpx #$04 ; CPU:$E93E PRG:293E E0 04 bcs UpdatePrimaryArithmeticPairAlternate_ShiftLow ; CPU:$E940 PRG:2940 ?? ; $E940: B0 01 @@ -17234,7 +17234,7 @@ UpdatePrimaryArithmeticPairAlternate_ShiftLow: ; $E943 ; Apply the same adjusted shift-count rule. ; ---------------------------------------------------------------------------- - ldx $DB ; CPU:$E950 PRG:2950 A6 DB + ldx MathShiftCount ; CPU:$E950 PRG:2950 A6 DB cpx #$04 ; CPU:$E952 PRG:2952 E0 04 bcs UpdatePrimaryArithmeticPairAlternate_ShiftHigh ; CPU:$E954 PRG:2954 ?? ; $E954: B0 01 @@ -17314,13 +17314,13 @@ CalculateScaledRatio: ; $E965 DisablePpuRendering: ; $E96C lda #$00 ; CPU:$E96C PRG:296C A9 00 - sta $2000 ; CPU:$E96E PRG:296E 8D 00 20 + sta PPUCTRL ; CPU:$E96E PRG:296E 8D 00 20 ; Disable NMI and reset PPUCTRL state. - sta $2001 ; CPU:$E971 PRG:2971 8D 01 20 + sta PPUMASK ; CPU:$E971 PRG:2971 8D 01 20 ; Disable background and sprite rendering. - lda $2002 ; CPU:$E974 PRG:2974 AD 02 20 + lda PPUSTATUS ; CPU:$E974 PRG:2974 AD 02 20 ; Read PPUSTATUS and reset the address latch. rts ; CPU:$E977 PRG:2977 60 @@ -17342,11 +17342,11 @@ DisablePpuRendering: ; $E96C ; Validation: Inferred from annotated instructions and call sites; call sites: 2. ; ---------------------------------------------------------------------------- EnableNmiAndWaitForFrame: ; $E978 - lda $2002 ; CPU:$E978 PRG:2978 AD 02 20 + lda PPUSTATUS ; CPU:$E978 PRG:2978 AD 02 20 ; Reset the PPU address latch. lda #$80 ; CPU:$E97B PRG:297B A9 80 - sta $2000 ; CPU:$E97D PRG:297D 8D 00 20 + sta PPUCTRL ; CPU:$E97D PRG:297D 8D 00 20 ; Enable NMI. jmp SelectObjectEventBank1 ; CPU:$E980 PRG:2980 4C 48 EB @@ -17439,7 +17439,7 @@ FillPpuMemoryAfterValueSaved: ; ---------------------------------------------------------------------------- FillPpuMemoryWith26_Loop: ; $E990 - sta $2007 ; CPU:$E990 PRG:2990 8D 07 20 + sta PPUDATA ; CPU:$E990 PRG:2990 8D 07 20 ; ---------------------------------------------------------------------------- ; Process 256 bytes in the current outer block. @@ -17509,10 +17509,10 @@ DecodeInlineParameters: ; $E99A ; ---------------------------------------------------------------------------- pla ; CPU:$E99E PRG:299E 68 - sta $00 ; CPU:$E99F PRG:299F 85 00 + sta IndirectPtrLo ; CPU:$E99F PRG:299F 85 00 pla ; CPU:$E9A1 PRG:29A1 68 - sta $01 ; CPU:$E9A2 PRG:29A2 85 01 + sta IndirectPtrHi ; CPU:$E9A2 PRG:29A2 85 01 ; ---------------------------------------------------------------------------- ; Restore the immediate return address and read two bytes following the outer @@ -17536,20 +17536,20 @@ DecodeInlineParameters: ; $E99A clc ; CPU:$E9A7 PRG:29A7 18 tya ; CPU:$E9A8 PRG:29A8 98 - adc $00 ; CPU:$E9A9 PRG:29A9 65 00 - sta $00 ; CPU:$E9AB PRG:29AB 85 00 + adc IndirectPtrLo ; CPU:$E9A9 PRG:29A9 65 00 + sta IndirectPtrLo ; CPU:$E9AB PRG:29AB 85 00 bcc DecodeInlineParameters_Jump ; CPU:$E9AD PRG:29AD 90 02 ; $E9AD: 90 02 - inc $01 ; CPU:$E9AF PRG:29AF E6 01 + inc IndirectPtrHi ; CPU:$E9AF PRG:29AF E6 01 ; ---------------------------------------------------------------------------- ; Continue execution immediately after the inline record. ; ---------------------------------------------------------------------------- DecodeInlineParameters_Jump: ; $E9B1 - jmp ($0000) ; CPU:$E9B1 PRG:29B1 6C 00 00 + jmp (IndirectPtrLo) ; CPU:$E9B1 PRG:29B1 6C 00 00 ; ============================================================================ ; $E9B4-$E9C1 @@ -17590,13 +17590,13 @@ ReadInlineWord: ; $E9B4 ldy #$01 ; CPU:$E9B8 PRG:29B8 A0 01 - lda ($00),y ; CPU:$E9BA PRG:29BA B1 00 + lda (IndirectPtrLo),y ; CPU:$E9BA PRG:29BA B1 00 tax ; CPU:$E9BC PRG:29BC AA ; X = first inline parameter. iny ; CPU:$E9BD PRG:29BD C8 - lda ($00),y ; CPU:$E9BE PRG:29BE B1 00 + lda (IndirectPtrLo),y ; CPU:$E9BE PRG:29BE B1 00 ; A = second inline parameter. iny ; CPU:$E9C0 PRG:29C0 C8 @@ -17629,8 +17629,8 @@ CopyInlineBytesToZeroPage: ; $E9C2 ; Save byte count. CopyInlineBytesToZeroPage_Loop: ; $E9C7 - lda ($00),y ; CPU:$E9C7 PRG:29C7 B1 00 - sta $00,x ; CPU:$E9C9 PRG:29C9 95 00 + lda (IndirectPtrLo),y ; CPU:$E9C7 PRG:29C7 B1 00 + sta IndirectPtrLo,x ; CPU:$E9C9 PRG:29C9 95 00 iny ; CPU:$E9CB PRG:29CB C8 inx ; CPU:$E9CC PRG:29CC E8 @@ -17660,7 +17660,7 @@ WritePpuControlFromCarry: ; $E9D2 rol ; CPU:$E9D5 PRG:29D5 2A rol ; CPU:$E9D6 PRG:29D6 2A - sta $2000 ; CPU:$E9D7 PRG:29D7 8D 00 20 + sta PPUCTRL ; CPU:$E9D7 PRG:29D7 8D 00 20 rts ; CPU:$E9DA PRG:29DA 60 @@ -17721,7 +17721,7 @@ SetPpuAddressFromInlineRecord: ; $E9DB ; addition. ; ---------------------------------------------------------------------------- SetRelativePpuAddressFromInlineRecord: - stx $05 ; CPU:$E9E0 PRG:29E0 86 05 + stx MathTemp05 ; CPU:$E9E0 PRG:29E0 86 05 ldy #$00 ; CPU:$E9E2 PRG:29E2 A0 00 ; Default sign-extension byte. @@ -17870,7 +17870,7 @@ WriteInlinePpuBlock_Loop: ; $EA0A ; was actually consumed. ; ---------------------------------------------------------------------------- - lda ($00),y ; CPU:$EA0D PRG:2A0D B1 00 + lda (IndirectPtrLo),y ; CPU:$EA0D PRG:2A0D B1 00 iny ; CPU:$EA0F PRG:2A0F C8 dex ; CPU:$EA10 PRG:2A10 CA @@ -17933,11 +17933,11 @@ CopyInlineDisplayRecord: ; $EA17 ; ---------------------------------------------------------------------------- pla ; CPU:$EA1A PRG:2A1A 68 - sta $26 ; CPU:$EA1B PRG:2A1B 85 26 + sta InlineReturnLo ; CPU:$EA1B PRG:2A1B 85 26 ; Saved return-address low byte. pla ; CPU:$EA1D PRG:2A1D 68 - sta $27 ; CPU:$EA1E PRG:2A1E 85 27 + sta InlineReturnHi ; CPU:$EA1E PRG:2A1E 85 27 ; Saved return-address high byte. ; ---------------------------------------------------------------------------- @@ -17946,7 +17946,7 @@ CopyInlineDisplayRecord: ; $EA17 ldy #$01 ; CPU:$EA20 PRG:2A20 A0 01 - lda ($26),y ; CPU:$EA22 PRG:2A22 B1 26 + lda (InlineReturnLo),y ; CPU:$EA22 PRG:2A22 B1 26 sta $04 ; CPU:$EA24 PRG:2A24 85 04 ; Number of data bytes to copy. @@ -17958,7 +17958,7 @@ CopyInlineDisplayRecord_Loop: ; $EA26 iny ; CPU:$EA26 PRG:2A26 C8 ; Advance to the next inline data byte. - lda ($26),y ; CPU:$EA27 PRG:2A27 B1 26 + lda (InlineReturnLo),y ; CPU:$EA27 PRG:2A27 B1 26 sta $0300,x ; CPU:$EA29 PRG:2A29 9D 00 03 inx ; CPU:$EA2C PRG:2A2C E8 @@ -17983,7 +17983,7 @@ CopyInlineDisplayRecord_Loop: ; $EA26 clc ; CPU:$EA31 PRG:2A31 18 tya ; CPU:$EA32 PRG:2A32 98 - adc $26 ; CPU:$EA33 PRG:2A33 65 26 + adc InlineReturnLo ; CPU:$EA33 PRG:2A33 65 26 tay ; CPU:$EA35 PRG:2A35 A8 ; Y = adjusted return-address low byte. @@ -17995,7 +17995,7 @@ CopyInlineDisplayRecord_Loop: ; $EA26 lda $04 ; CPU:$EA36 PRG:2A36 A5 04 ; A = $00. - adc $27 ; CPU:$EA38 PRG:2A38 65 27 + adc InlineReturnHi ; CPU:$EA38 PRG:2A38 65 27 ; A = adjusted return-address high byte. ; ---------------------------------------------------------------------------- @@ -18050,7 +18050,7 @@ CopyInlineDisplayRecord_Loop: ; $EA26 ; Validation: Inferred from annotated instructions and call sites; call sites: 11. ; ---------------------------------------------------------------------------- AllocateDisplayBufferRecord: ; $EA3E - sty $05 ; CPU:$EA3E PRG:2A3E 84 05 + sty MathTemp05 ; CPU:$EA3E PRG:2A3E 84 05 ; Save payload length. ldy #$00 ; CPU:$EA40 PRG:2A40 A0 00 @@ -18093,7 +18093,7 @@ AllocateDisplayBufferRecord: ; $EA3E ; Store the payload length as record byte zero. ; ---------------------------------------------------------------------------- - lda $05 ; CPU:$EA55 PRG:2A55 A5 05 + lda MathTemp05 ; CPU:$EA55 PRG:2A55 A5 05 sta $0300,y ; CPU:$EA57 PRG:2A57 99 00 03 ; ---------------------------------------------------------------------------- @@ -18116,7 +18116,7 @@ AllocateDisplayBufferRecord: ; $EA3E ; $3E = payload offset + payload length ; ---------------------------------------------------------------------------- - adc $05 ; CPU:$EA5E PRG:2A5E 65 05 + adc MathTemp05 ; CPU:$EA5E PRG:2A5E 65 05 sta PpuQueueOffset ; CPU:$EA60 PRG:2A60 85 3E rts ; CPU:$EA62 PRG:2A62 60 @@ -18187,13 +18187,13 @@ ProcessInlinePpuStream: ; $EA63 ; ============================================================================ ProcessInlinePpuStream_Record: ; $EA6C - sta $2006 ; CPU:$EA6C PRG:2A6C 8D 06 20 + sta PPUADDR ; CPU:$EA6C PRG:2A6C 8D 06 20 ; Write PPU address high byte. iny ; CPU:$EA6F PRG:2A6F C8 lda ($08),y ; CPU:$EA70 PRG:2A70 B1 08 - sta $2006 ; CPU:$EA72 PRG:2A72 8D 06 20 + sta PPUADDR ; CPU:$EA72 PRG:2A72 8D 06 20 ; Write PPU address low byte. ; ---------------------------------------------------------------------------- @@ -18219,7 +18219,7 @@ ProcessInlinePpuStream_Record: ; $EA6C rol ; CPU:$EA7D PRG:2A7D 2A rol ; CPU:$EA7E PRG:2A7E 2A - sta $2000 ; CPU:$EA7F PRG:2A7F 8D 00 20 + sta PPUCTRL ; CPU:$EA7F PRG:2A7F 8D 00 20 ; Select PPU address increment mode. ; ---------------------------------------------------------------------------- @@ -18274,7 +18274,7 @@ ProcessInlinePpuStream_WriteLoop: ; $EA8C ProcessInlinePpuStream_Write: ; $EA8F lda ($08),y ; CPU:$EA8F PRG:2A8F B1 08 - sta $2007 ; CPU:$EA91 PRG:2A91 8D 07 20 + sta PPUDATA ; CPU:$EA91 PRG:2A91 8D 07 20 dex ; CPU:$EA94 PRG:2A94 CA bne ProcessInlinePpuStream_WriteLoop ; CPU:$EA95 PRG:2A95 D0 F5 @@ -18306,7 +18306,7 @@ ProcessInlinePpuStream_Write: ; $EA8F ; ============================================================================ ProcessInlinePpuStream_CheckRecord: ; $EAA3 - ldx $2002 ; CPU:$EAA3 PRG:2AA3 AE 02 20 + ldx PPUSTATUS ; CPU:$EAA3 PRG:2AA3 AE 02 20 ; Reset PPU address latch. ; The status value itself is unused. @@ -18572,7 +18572,7 @@ QueueDecodedObjectEvent: ; $EB0D sta $069F,x ; CPU:$EB0D PRG:2B0D 9D 9F 06 ; Save the second inline parameter. - lda ($00),y ; CPU:$EB10 PRG:2B10 B1 00 + lda (IndirectPtrLo),y ; CPU:$EB10 PRG:2B10 B1 00 ; Load the next inline byte. sta $06CF,x ; CPU:$EB12 PRG:2B12 9D CF 06 @@ -18632,8 +18632,8 @@ QueueDecodedObjectEventCheckActive: ; $E2 is the current queue length or next free queue slot. ; ---------------------------------------------------------------------------- - ldy $E2 ; CPU:$EB20 PRG:2B20 A4 E2 - inc $E2 ; CPU:$EB22 PRG:2B22 E6 E2 + ldy ScriptDepth ; CPU:$EB20 PRG:2B20 A4 E2 + inc ScriptDepth ; CPU:$EB22 PRG:2B22 E6 E2 sta $0670,y ; CPU:$EB24 PRG:2B24 99 70 06 @@ -18950,7 +18950,7 @@ CommonEngineExit: ; $EB6A ; Check the queued-event count in $E2. ; ---------------------------------------------------------------------------- - ldx $E2 ; CPU:$EB71 PRG:2B71 A6 E2 + ldx ScriptDepth ; CPU:$EB71 PRG:2B71 A6 E2 bne DispatchNextQueuedEvent_HaveEntry ; CPU:$EB73 PRG:2B73 D0 0C ; $EB73: D0 0C @@ -18961,15 +18961,15 @@ CommonEngineExit: ; $EB6A ; Wait until an NMI or another producer adds an event to the queue. ; ---------------------------------------------------------------------------- - lda $2002 ; CPU:$EB75 PRG:2B75 AD 02 20 + lda PPUSTATUS ; CPU:$EB75 PRG:2B75 AD 02 20 ; Reset the PPU address latch. lda PpuCtrlShadow ; CPU:$EB78 PRG:2B78 A5 DD - sta $2000 ; CPU:$EB7A PRG:2B7A 8D 00 20 + sta PPUCTRL ; CPU:$EB7A PRG:2B7A 8D 00 20 ; Restore the current PPUCTRL value. DispatchNextQueuedEvent_Wait: ; $EB7D - ldx $E2 ; CPU:$EB7D PRG:2B7D A6 E2 + ldx ScriptDepth ; CPU:$EB7D PRG:2B7D A6 E2 beq DispatchNextQueuedEvent_Wait ; CPU:$EB7F PRG:2B7F F0 FC ; $EB7F: F0 FC @@ -18982,7 +18982,7 @@ DispatchNextQueuedEvent_Wait: ; $EB7D DispatchNextQueuedEvent_HaveEntry: ; $EB81 lda PpuCtrlShadow ; CPU:$EB81 PRG:2B81 A5 DD and #$7F ; CPU:$EB83 PRG:2B83 29 7F - sta $2000 ; CPU:$EB85 PRG:2B85 8D 00 20 + sta PPUCTRL ; CPU:$EB85 PRG:2B85 8D 00 20 ; ---------------------------------------------------------------------------- ; Remove the newest object/event index from the queue. @@ -18995,7 +18995,7 @@ DispatchNextQueuedEvent_HaveEntry: ; $EB81 ; ---------------------------------------------------------------------------- dex ; CPU:$EB88 PRG:2B88 CA - stx $E2 ; CPU:$EB89 PRG:2B89 86 E2 + stx ScriptDepth ; CPU:$EB89 PRG:2B89 86 E2 lda $0670,x ; CPU:$EB8B PRG:2B8B BD 70 06 sta CurrentObjectIndex ; CPU:$EB8E PRG:2B8E 85 E1 @@ -19084,7 +19084,7 @@ InitializeQueuedEventSystem_ClearPage: ; $EBA0 ; Clear the queued-event count or next-free queue index. ; ---------------------------------------------------------------------------- - sta $E2 ; CPU:$EBA6 PRG:2BA6 85 E2 + sta ScriptDepth ; CPU:$EBA6 PRG:2BA6 85 E2 ; ---------------------------------------------------------------------------- ; X wrapped to zero after the page clear. Increment it to one and use that as @@ -19526,7 +19526,7 @@ RenderingAnimationData_F9A5: ; $F9A5 ; ---------------------------------------------------------------------------- InitializeAudioEngine: ; $F9D0 lda #$C0 ; CPU:$F9D0 PRG:39D0 A9 C0 - sta $4017 ; CPU:$F9D2 PRG:39D2 8D 17 40 + sta JOY2 ; CPU:$F9D2 PRG:39D2 8D 17 40 ; Configure the APU frame counter: ; bit 7 = five-step sequence ; bit 6 = inhibit frame IRQ @@ -19578,7 +19578,7 @@ InitializeAudioEngine: ; $F9D0 InitializeAudioEngine_WriteDmc: ; $F9ED lda $07FF ; CPU:$F9ED PRG:39ED AD FF 07 - sta $4011 ; CPU:$F9F0 PRG:39F0 8D 11 40 + sta APUDMALOAD ; CPU:$F9F0 PRG:39F0 8D 11 40 rts ; CPU:$F9F3 PRG:39F3 60 @@ -19679,10 +19679,10 @@ WritePulse1SweepAndControl: ; $FA68 ; Validation: Internal-entry contract; call sites: internal entry. ; ---------------------------------------------------------------------------- WritePulse1SweepAndControlFromRegisters: - sty $4001 ; CPU:$FA6A PRG:3A6A 8C 01 40 + sty APUPC1SWEEP ; CPU:$FA6A PRG:3A6A 8C 01 40 WritePulse1Control: ; $FA6D - stx $4000 ; CPU:$FA6D PRG:3A6D 8E 00 40 + stx APUPC1BASE ; CPU:$FA6D PRG:3A6D 8E 00 40 rts ; CPU:$FA70 PRG:3A70 60 ; ============================================================================ @@ -19718,10 +19718,10 @@ WritePulse2SweepAndControl: ; $FA71 ; Validation: Internal-entry contract; call sites: internal entry. ; ---------------------------------------------------------------------------- WritePulse2SweepAndControlFromRegisters: - sty $4005 ; CPU:$FA73 PRG:3A73 8C 05 40 + sty APUPC2SWEEP ; CPU:$FA73 PRG:3A73 8C 05 40 WritePulse2Control: ; $FA76 - stx $4004 ; CPU:$FA76 PRG:3A76 8E 04 40 + stx APUPC2BASE ; CPU:$FA76 PRG:3A76 8E 04 40 rts ; CPU:$FA79 PRG:3A79 60 ; ============================================================================ @@ -19749,14 +19749,14 @@ WritePulse2Control: ; $FA76 ; Validation: Inferred from annotated instructions and call sites; call sites: 1. ; ---------------------------------------------------------------------------- ConfigureNoiseChannel: ; $FA7A - sta $400C ; CPU:$FA7A PRG:3A7A 8D 0C 40 + sta APUNOISEBASE ; CPU:$FA7A PRG:3A7A 8D 0C 40 ; Noise volume and envelope control. - stx $400E ; CPU:$FA7D PRG:3A7D 8E 0E 40 + stx APUNOISELOOP ; CPU:$FA7D PRG:3A7D 8E 0E 40 ; Noise mode and period. ldy #$08 ; CPU:$FA80 PRG:3A80 A0 08 - sty $400F ; CPU:$FA82 PRG:3A82 8C 0F 40 + sty APUNOISELENGTH ; CPU:$FA82 PRG:3A82 8C 0F 40 ; Reload the noise length counter. rts ; CPU:$FA85 PRG:3A85 60 @@ -19872,7 +19872,7 @@ WriteApuTimerFromTable: ; $FA91 ; $FA95: F0 0B ; A zero high byte suppresses the write. - sta $4002,x ; CPU:$FA97 PRG:3A97 9D 02 40 + sta APUPC1TLOW,x ; CPU:$FA97 PRG:3A97 9D 02 40 ; Write timer low-register address plus X. ; ; Despite the table naming, this instruction @@ -19886,7 +19886,7 @@ WriteApuTimerFromTable: ; $FA91 lda $FA00,y ; CPU:$FA9A PRG:3A9A B9 00 FA ora #$08 ; CPU:$FA9D PRG:3A9D 09 08 - sta $4003,x ; CPU:$FA9F PRG:3A9F 9D 03 40 + sta APUPC1THIGH,x ; CPU:$FA9F PRG:3A9F 9D 03 40 WriteApuTimerFromTable_Return: ; $FAA2 rts ; CPU:$FAA2 PRG:3AA2 60 @@ -19974,7 +19974,7 @@ ReduceValueByOneThirtySecond: ; $FAAE lsr ; CPU:$FAB2 PRG:3AB2 4A lsr ; CPU:$FAB3 PRG:3AB3 4A - sta $00 ; CPU:$FAB4 PRG:3AB4 85 00 + sta IndirectPtrLo ; CPU:$FAB4 PRG:3AB4 85 00 ; Save the calculated adjustment. ; ---------------------------------------------------------------------------- @@ -19986,7 +19986,7 @@ ReduceValueByOneThirtySecond: ; $FAAE bne ReduceValueByOneThirtySecond_Subtract ; CPU:$FAB6 PRG:3AB6 D0 02 ; $FAB6: D0 02 - inc $00 ; CPU:$FAB8 PRG:3AB8 E6 00 + inc IndirectPtrLo ; CPU:$FAB8 PRG:3AB8 E6 00 ; Change zero adjustment to one. ; ---------------------------------------------------------------------------- @@ -19998,7 +19998,7 @@ ReduceValueByOneThirtySecond_Subtract: ; $FABA ; Restore the original source value. sec ; CPU:$FABB PRG:3ABB 38 - sbc $00 ; CPU:$FABC PRG:3ABC E5 00 + sbc IndirectPtrLo ; CPU:$FABC PRG:3ABC E5 00 rts ; CPU:$FABE PRG:3ABE 60 @@ -20075,7 +20075,7 @@ LookupAudioControlValueFinalRotate: ; Keep a three-bit table offset. clc ; CPU:$FAC7 PRG:3AC7 18 - adc $F6 ; CPU:$FAC8 PRG:3AC8 65 F6 + adc SoundPtrLo ; CPU:$FAC8 PRG:3AC8 65 F6 ; Add the current audio-table base. tay ; CPU:$FACA PRG:3ACA A8 @@ -20212,7 +20212,7 @@ StartPulse1EffectPreset3FromControl: ; ============================================================================ UpdatePulse1PresetEffect: ; $FAEE - lda $00 ; CPU:$FAEE PRG:3AEE A5 00 + lda IndirectPtrLo ; CPU:$FAEE PRG:3AEE A5 00 and #$08 ; CPU:$FAF0 PRG:3AF0 29 08 beq FinalizeSoundEffectPreset_SelectX ; CPU:$FAF2 PRG:3AF2 F0 02 @@ -20287,7 +20287,7 @@ FinalizeSoundEffectPreset_Apply: ; $FB02 ; ---------------------------------------------------------------------------- UpdateAudioEngine: ; $FB05 ldy RenderStateFlags ; CPU:$FB05 PRG:3B05 A4 FF - sty $00 ; CPU:$FB07 PRG:3B07 84 00 + sty IndirectPtrLo ; CPU:$FB07 PRG:3B07 84 00 ; Preserve the original pending-effect flags. lda $F0 ; CPU:$FB09 PRG:3B09 A5 F0 @@ -20521,7 +20521,7 @@ UpdatePulse1StateChangeEffect: ; $FB6B ; Test bit six of the original pending-effect flags saved at $00. ; ---------------------------------------------------------------------------- - lda $00 ; CPU:$FB6F PRG:3B6F A5 00 + lda IndirectPtrLo ; CPU:$FB6F PRG:3B6F A5 00 and #$40 ; CPU:$FB71 PRG:3B71 29 40 bne UpdateAudioEffect2_CheckState ; CPU:$FB73 PRG:3B73 D0 0A ; $FB73: D0 0A @@ -20571,7 +20571,7 @@ UpdateAudioEffect2_CheckState: ; $FB7F ; ---------------------------------------------------------------------------- UpdateAudioEffect2_WriteSweep: ; $FB90 - sty $4001 ; CPU:$FB90 PRG:3B90 8C 01 40 + sty APUPC1SWEEP ; CPU:$FB90 PRG:3B90 8C 01 40 bne UpdateAudioEffect2_CountDown ; CPU:$FB93 PRG:3B93 D0 07 ; $FB93: D0 07 @@ -20716,7 +20716,7 @@ PulseEffectAlternate_Use90: ; $FBFB UpdateSecondaryEffects: ; $FBFF ldy PendingAudioFlags ; CPU:$FBFF PRG:3BFF A4 FE - sty $00 ; CPU:$FC01 PRG:3C01 84 00 + sty IndirectPtrLo ; CPU:$FC01 PRG:3C01 84 00 lda $F1 ; CPU:$FC03 PRG:3C03 A5 F1 @@ -20785,11 +20785,11 @@ UpdateTrianglePitchSweep: ; $FC33 asl ; CPU:$FC3C PRG:3C3C 0A asl ; CPU:$FC3D PRG:3C3D 0A - sta $4006 ; CPU:$FC3E PRG:3C3E 8D 06 40 + sta APUPC2LOW ; CPU:$FC3E PRG:3C3E 8D 06 40 rol ; CPU:$FC41 PRG:3C41 2A and #$03 ; CPU:$FC42 PRG:3C42 29 03 - sta $4007 ; CPU:$FC44 PRG:3C44 8D 07 40 + sta APUPC2HIGH ; CPU:$FC44 PRG:3C44 8D 07 40 ldy #$81 ; CPU:$FC47 PRG:3C47 A0 81 ldx #$50 ; CPU:$FC49 PRG:3C49 A2 50 @@ -20822,7 +20822,7 @@ DispatchMusicAndNoise: ; $FC60 lda GameplaySuspended ; CPU:$FC60 PRG:3C60 A5 EF bne UpdateMusicSequencer ; CPU:$FC62 PRG:3C62 D0 30 - ldy $00 ; CPU:$FC64 PRG:3C64 A4 00 + ldy IndirectPtrLo ; CPU:$FC64 PRG:3C64 A4 00 bmi UpdateNoiseEffectSequence ; CPU:$FC66 PRG:3C66 30 2F lda $07F5 ; CPU:$FC68 PRG:3C68 AD F5 07 @@ -20830,25 +20830,25 @@ DispatchMusicAndNoise: ; $FC60 asl ; CPU:$FC6B PRG:3C6B 0A bmi UpdateDmcOutputEffect ; CPU:$FC6C PRG:3C6C 30 3A - asl $00 ; CPU:$FC6E PRG:3C6E 06 00 + asl IndirectPtrLo ; CPU:$FC6E PRG:3C6E 06 00 bmi StartTriangleEffectShort ; CPU:$FC70 PRG:3C70 30 28 asl ; CPU:$FC72 PRG:3C72 0A bmi ContinueTimedAudioEffect ; CPU:$FC73 PRG:3C73 30 5A - asl $00 ; CPU:$FC75 PRG:3C75 06 00 + asl IndirectPtrLo ; CPU:$FC75 PRG:3C75 06 00 bmi StartTriangleEffectMedium ; CPU:$FC77 PRG:3C77 30 3B asl ; CPU:$FC79 PRG:3C79 0A bmi UpdateTriangleEffectLong ; CPU:$FC7A PRG:3C7A 30 68 - asl $00 ; CPU:$FC7C PRG:3C7C 06 00 + asl IndirectPtrLo ; CPU:$FC7C PRG:3C7C 06 00 bmi StartTriangleEffectLong ; CPU:$FC7E PRG:3C7E 30 56 asl ; CPU:$FC80 PRG:3C80 0A bmi UpdateTriangleEffectAlternate ; CPU:$FC81 PRG:3C81 30 7E - asl $00 ; CPU:$FC83 PRG:3C83 06 00 + asl IndirectPtrLo ; CPU:$FC83 PRG:3C83 06 00 bmi StartTriangleEffectAlternate ; CPU:$FC85 PRG:3C85 30 6C ResetTimedAudioEvents: ; $FC87 @@ -20858,7 +20858,7 @@ ResetTimedAudioEvents: ; $FC87 sta $07F5 ; CPU:$FC8C PRG:3C8C 8D F5 07 lda #$10 ; CPU:$FC8F PRG:3C8F A9 10 - sta $400C ; CPU:$FC91 PRG:3C91 8D 0C 40 + sta APUNOISEBASE ; CPU:$FC91 PRG:3C91 8D 0C 40 UpdateMusicSequencer: ; $FC94 jmp UpdateMusicEngine ; CPU:$FC94 PRG:3C94 4C 2A FD @@ -20911,12 +20911,12 @@ StartTriangleEffectMedium: ; $FCB4 ldy #$0A ; CPU:$FCBE PRG:3CBE A0 0A ConfigureTimedTriangleEffect: ; $FCC0 - sta $400A ; CPU:$FCC0 PRG:3CC0 8D 0A 40 + sta APUTRILOW ; CPU:$FCC0 PRG:3CC0 8D 0A 40 ldx #$08 ; CPU:$FCC3 PRG:3CC3 A2 08 - stx $400B ; CPU:$FCC5 PRG:3CC5 8E 0B 40 + stx APUTRIHIGH ; CPU:$FCC5 PRG:3CC5 8E 0B 40 - sty $4008 ; CPU:$FCC8 PRG:3CC8 8C 08 40 + sty APUTRIBASE ; CPU:$FCC8 PRG:3CC8 8C 08 40 lda #$00 ; CPU:$FCCB PRG:3CCB A9 00 sta $F0 ; CPU:$FCCD PRG:3CCD 85 F0 @@ -21184,7 +21184,7 @@ InitializeMusicSequence_LoadPointer: ; $FD49 InitializeMusicSequence_CopyDescriptor: ; $FD51 lda $FE40,y ; CPU:$FD51 PRG:3D51 B9 40 FE - sta $F6,x ; CPU:$FD54 PRG:3D54 95 F6 + sta SoundPtrLo,x ; CPU:$FD54 PRG:3D54 95 F6 iny ; CPU:$FD56 PRG:3D56 C8 inx ; CPU:$FD57 PRG:3D57 E8 @@ -21245,7 +21245,7 @@ UpdateMusicChannel1_Decrement: ; $FD79 inc $FA ; CPU:$FD7E PRG:3D7E E6 FA - lda ($F7),y ; CPU:$FD80 PRG:3D80 B1 F7 + lda (SoundPtrHi),y ; CPU:$FD80 PRG:3D80 B1 F7 bpl UpdateMusicChannel1_HaveNote ; CPU:$FD82 PRG:3D82 10 0C ; $FD82: 10 0C @@ -21260,7 +21260,7 @@ UpdateMusicChannel1_Decrement: ; $FD79 ldy $FA ; CPU:$FD8A PRG:3D8A A4 FA inc $FA ; CPU:$FD8C PRG:3D8C E6 FA - lda ($F7),y ; CPU:$FD8E PRG:3D8E B1 F7 + lda (SoundPtrHi),y ; CPU:$FD8E PRG:3D8E B1 F7 ; ---------------------------------------------------------------------------- ; Convert the note value through the audio period helper at $FA8F. @@ -21344,7 +21344,7 @@ UpdateMusicChannel2_Decrement: ; $FDC7 ldy $FB ; CPU:$FDCC PRG:3DCC A4 FB inc $FB ; CPU:$FDCE PRG:3DCE E6 FB - lda ($F7),y ; CPU:$FDD0 PRG:3DD0 B1 F7 + lda (SoundPtrHi),y ; CPU:$FDD0 PRG:3DD0 B1 F7 bne UpdateMusicChannel2_HaveCommand ; CPU:$FDD2 PRG:3DD2 D0 0B ; $FDD2: D0 0B @@ -21418,7 +21418,7 @@ UpdateTriangleMusicChannel: ; $FE05 ; $FE0E: D0 05 lda #$00 ; CPU:$FE10 PRG:3E10 A9 00 - sta $4008 ; CPU:$FE12 PRG:3E12 8D 08 40 + sta APUTRIBASE ; CPU:$FE12 PRG:3E12 8D 08 40 UpdateMusicChannel3_Decrement: ; $FE15 dec $07F2 ; CPU:$FE15 PRG:3E15 CE F2 07 @@ -21431,7 +21431,7 @@ UpdateMusicChannel3_Decrement: ; $FE15 inc $F9 ; CPU:$FE1A PRG:3E1A E6 F9 - lda ($F7),y ; CPU:$FE1C PRG:3E1C B1 F7 + lda (SoundPtrHi),y ; CPU:$FE1C PRG:3E1C B1 F7 jsr LookupAudioControlValue ; CPU:$FE1E PRG:3E1E 20 BF FA sta $07F2 ; CPU:$FE21 PRG:3E21 8D F2 07 @@ -21461,7 +21461,7 @@ UpdateMusicChannel3_CheckBank: ; $FE30 ldy #$88 ; CPU:$FE34 PRG:3E34 A0 88 UpdateMusicChannel3_WriteLinear: ; $FE36 - sty $4008 ; CPU:$FE36 PRG:3E36 8C 08 40 + sty APUTRIBASE ; CPU:$FE36 PRG:3E36 8C 08 40 ; ---------------------------------------------------------------------------- ; Use the command byte preserved in X by LookupAudioControlValue to select the diff --git a/Bomberman (U)/OVERVIEW.md b/Bomberman (U)/OVERVIEW.md index eb82dd0..b8e8986 100644 --- a/Bomberman (U)/OVERVIEW.md +++ b/Bomberman (U)/OVERVIEW.md @@ -1,6 +1,6 @@ # Bomberman (U) — Game Flow from Power-On -This document describes the execution flow of the disassembled Bomberman (U) PRG bank (16 KB, mapped at CPU **$C000–$FFFF**), starting from power-on. It is based entirely on `copilot/main.s` in the repository. +This document describes the execution flow of the disassembled Bomberman (U) PRG bank (16 KB, mapped at CPU **$C000–$FFFF**), starting from power-on. It is based entirely on `copilot/prg.s` (with `header.s` and `chr.s` for the iNES header and CHR data) in the repository. --- @@ -11,10 +11,10 @@ This document describes the execution flow of the disassembled Bomberman (U) PRG | Format | iNES / NES 2.0 | | PRG | 1 × 16 KB (mapped at CPU $C000–$FFFF) | | CHR | 1 × 8 KB | -| Mirroring | Vertical (per header byte $01) | +| Mirroring | Vertical | | PRG bank start | CPU $C000 | -| Source file | `copilot/main.s` (8,070 lines, ~614 KB) | -| Output | `reconstructed_bomberman.nes` (24,592 bytes) | +| Source files | `copilot/prg.s` (7,553 lines, ~493 KB), `header.s`, `chr.s` | +| Output | `reconstructed.nes` (24,592 bytes) | ### Interrupt vectors (CPU $FFFA–$FFFF) @@ -28,7 +28,7 @@ This document describes the execution flow of the disassembled Bomberman (U) PRG ## 2. Build Status -`make` in `copilot/` assembles and links successfully, producing `reconstructed_bomberman.nes` (24,592 bytes). +`make` in `copilot/` assembles and links successfully, producing `reconstructed.nes` (24,592 bytes). **Verification result:** The reconstructed ROM is **byte-identical** to `bomberman.nes` — headers, CHR, and all 16,384 PRG bytes match exactly. @@ -37,11 +37,22 @@ This document describes the execution flow of the disassembled Bomberman (U) PRG | Change | Location | Reason | |--------|----------|--------| | `RandomState0` kept at `$54`; added `RandomStateAlt = $E4` | `locals.inc` | Zero-page reuse: `$54` is the random-state byte used by most code; `$E4` is a distinct byte decremented at CPU `$E71B` | -| `dec RandomState0` → `dec RandomStateAlt` | `main.s:6972` | The original ROM has `dec $E4` at CPU `$E71B`, not `dec $54` | -| `ControllerState` → `ControllerState1` | `main.s` (16 refs) | Clarifies this is controller port 1; added `ControllerState2 = $13` for port 2 | -| `Main_HandleControl_C368` → `MainGameLoop` | `main.s` (3 refs) | Main per-frame game loop entry point | -| `Gameplay_HandleControl_C79D` → `GameplayUpdate` | `main.s` (4 refs) | Gameplay object dispatcher/update | -| `Sound_HandleControl_E65F` → `SoundUpdate` | `main.s` (3 refs) | Sound engine update called from NMI | +| `dec RandomState0` → `dec RandomStateAlt` | `prg.s` (was `main.s:6972`) | The original ROM has `dec $E4` at CPU `$E71B`, not `dec $54` | +| `ControllerState` → `ControllerState1` | `prg.s` (16 refs) | Clarifies this is controller port 1; added `ControllerState2 = $13` for port 2 | +| `Main_HandleControl_C368` → `MainGameLoop` | `prg.s` (3 refs) | Main per-frame game loop entry point | +| `Gameplay_HandleControl_C79D` → `GameplayUpdate` | `prg.s` (4 refs) | Gameplay object dispatcher/update | +| `Sound_HandleControl_E65F` → `SoundUpdate` | `prg.s` (3 refs) | Sound engine update called from NMI | + +### Pass 3 symbol application (2026-10-19) + +| Pass | Substitutions | Detail | +|------|---------------|--------| +| locals.inc (single-name) | 354 operands | All zero-page addresses with exactly one name in `locals.inc` | +| locals.inc (multi-alias, site-resolved) | 8 operands | `$E0/$E1`: `IndirectPtrLo/Hi` in the RAM-clear loop (`InitializeSystemAndRunMainLoop` → `Main_WriteSoundDispatchIndex_C317`); `SoundDelay0` (indexed, `$E1,x`) in sound engine (`Gameplay_ReadSoundDelay0_E57B`, `InitializeApu`, `Sound_ReadSoundDelay0_E661`) | +| symbols.inc (hardware) | 0 operands | `prg.s` already contains no numeric hardware operands ($2000–$4017) | +| In-file data-table labels | 24 operands | 24 ROM-space table reads (`lda $C2E7,x` → `lda SystemPaletteData,x`, etc.) substituted via `reconstructed.lbl` | + +**Residue:** 758 numeric operands remain, addressing bytes not named in either `.inc` file: 505 zero-page (133 distinct addresses), 171 RAM $0100–$07FF (46 addresses), and 82 ROM table reads (54 addresses, 34 of which are interior bytes of labelled tables). --- @@ -64,15 +75,15 @@ On power-on or reset: This is the main entry point after reset: -1. **Clear RAM** — writes $00 to zero page and a range of RAM via an indirect pointer at $E0/$E1 (loops through $00–$FF pages). +1. **Clear RAM** — writes $00 to zero page via `Main_WriteZp00_C333` ($C333) and to $0100–$07FF via an indirect pointer `IndirectPtrLo`/`IndirectPtrHi` ($E0/$E1) in a 7-page loop (`Main_WriteSoundDispatchIndex_C317` at $C317). 2. `jsr InitializeVideoSystem` ($C1F2) — disables rendering, clears shadow OAM, uploads the system palette, enables NMI. -3. `jsr InitializeApu` ($E642) — silences all APU channels, resets sound delay/state variables. -4. Sets up the sound dispatch index and writes zero to sound state variables ($E0–$E3). +3. `jsr InitializeApu` ($E642) — silences all APU channels, resets sound delay/state variables (`SoundDelay0`–`SoundDelay2` at $E1–$E3). +4. Writes zero to sound state variables ($E0–$E3). 5. Sets stack pointer to $FF, enables APU ($4015 = $0F). 6. `jsr ComposeStatusScreen` ($DE83) — draws the initial status/title screen. 7. `jsr EnableNmiInPpuControl` ($C2B0) — enables NMI via PPUCTRL shadow. -8. Sets `GameplayActive`-style flag $72 = $01. -9. Enters the main loop at `Main_HandleControl_C368` ($C368). +8. Sets `ScreenState` ($72) = $01. +9. Enters the main loop at `MainGameLoop` ($C368). --- @@ -84,32 +95,32 @@ The NMI fires once per frame and is the central real-time driver: 2. Set `FrameSyncFlag` ($0B) = $00. 3. Set OAM address to $00. 4. **Sprite DMA path** — if $60 is zero, write OAM entry $0700–$0703 (sprite #0 at Y=$F8) and trigger OAMDMA ($4014 = $07). -5. **VRAM transfer path** — if $14 ≠ $15, transfer VRAM data from a table at $0600–$0607, indexing into pointer data at $D9C6–$D9C9. Handles both write and read packet types. -6. **Screen state / NMI work pending** — based on $72 and $60, transfers various VRAM data blocks (title screen, gameplay screen, etc.) using `SetPpuAddress` ($C196). -7. **PPU status / audio** — reads PPUSTATUS, commits PPU state and scroll via `CommitPpuStateAndScroll` ($C296), increments a frame counter at $33, handles audio channel timing at $69/$6A. -8. `jsr Ppu_WriteZp10_C19D` ($C19D) — reads and debounces both controller ports, stores results in `ControllerState` ($12) and $13. +5. **VRAM transfer path** — if `VramReadOffset` ($14) ≠ `VramWriteLimit` ($15), transfer VRAM data from a table at $0600–$0607, indexing into pointer data at $D9C6–$D9C9. Handles both write and read packet types. +6. **Screen state / NMI work pending** — based on `ScreenState` ($72) and `NmiWorkPending` ($60), transfers various VRAM data blocks (title screen, gameplay screen, etc.) using `SetPpuAddress` ($C196). +7. **PPU status / audio** — reads PPUSTATUS, commits PPU state and scroll via `CommitPpuStateAndScroll` ($C296), increments `FrameCounter` ($33), handles audio channel timing at $69/$6A. +8. `jsr Ppu_WriteZp10_C19D` ($C19D) — reads and debounces both controller ports, stores results in `ControllerState1` ($12) and `ControllerState2` ($13). 9. `jsr Gameplay_ReadZpB2_E4C7` ($E4C7) — gameplay input handling. -10. `jsr Sound_HandleControl_E65F` ($E65F) — sound engine update. -11. **DMC control** — if $38 and $59 are zero, starts DMC playback ($4010 = $0E, DMC address $C000, length $FF, enable channels). +10. `jsr SoundUpdate` ($E65F) — sound engine update. +11. **DMC control** — if $38 and `GameMode` ($59) are zero, starts DMC playback ($4010 = $0E, DMC address $C000, length $FF, enable channels). 12. **PPU scroll wait** — if $60 is set, waits for VBlank (polls PPUSTATUS bit 6), then applies scroll from $0E/$0F. -13. Toggles $DB with EOR #$05 (frame parity / flip-flop flag). +13. Toggles `FrameParity` ($DB) with `EOR #$05` (frame parity / flip-flop flag). 14. **Restore registers, `rti`.** ### Controller reading (`Ppu_ReadControllerAndReturnA_C1BF` / $C1BF) -- Strobes JOY1 ($4016) with $01 then $00. +- Strobes `JOY1` ($4016) with $01 then $00. - Reads 8 bits per controller, shifting into X. - `Ppu_HandleControl_C1EB` masks to the low 2 bits ($03) and increments X if non-zero (button press detection). -- Port 1 result → `ControllerState` ($12); port 2 result → $13. +- Port 1 result → `ControllerState1` ($12); port 2 result → $13 (`ControllerState2`). --- ## 6. Main Loop -The main loop starts at **`Main_HandleControl_C368`** ($C368): +The main loop starts at **`MainGameLoop`** ($C368): ``` -Main_HandleControl_C368 ($C368): - wait until ControllerState ($12) is nonzero (button pressed) +MainGameLoop ($C368): + wait until ControllerState1 ($12) is nonzero (button pressed) └─ branch on SELECT ($20) to toggle $5F └─ decrement sub-delay $71 / main delay $70 └─ when delays expire, increment $59 (game mode / screen state) @@ -123,9 +134,9 @@ Based on `$59` and `$5F`, the loop dispatches to: The core per-frame gameplay dispatch uses a **state table** at `MainStateDispatchTable` ($C75D–$C79C), which maps state indices to handler sub-indices ($00–$27). Gameplay object processing walks arrays at $03E6 (state), $0436, $0486 (X/Y position), $04D6, $0526 (timer/flags), with up to 80 ($4F) object slots. Key main-loop subroutines: -- `Main_ReadGameMode_C60B` ($C60B) — waits for $B5 (frame delay) to reach zero. +- `Main_ReadGameMode_C60B` ($C60B) — waits for `FrameDelay` ($B5) to reach zero. - `Main_WriteStageCounter_C613` ($C613) — updates stage counter, handles START button to begin gameplay. -- `Gameplay_HandleControl_C79D` ($C79D) — main gameplay object dispatcher (80 slots). +- `GameplayUpdate` ($C79D) — main gameplay object dispatcher (80 slots). - `Gameplay_Dispatch_C7A4` / `Gameplay_Dispatch_C835` — object state dispatch. - `Stage_WriteObjectWorkX_D8FC` ($D8FC) — object work initialization. @@ -141,7 +152,7 @@ Key main-loop subroutines: ### Bomb / explosion / player mechanics Referenced throughout the gameplay code: -- `Gameplay_HandleControl_C96A`, `Gameplay_HandleControl_CA1B`, `Gameplay_HandleControl_C79D` — player/bomb input and state. +- `Gameplay_HandleControl_C96A`, `Gameplay_HandleControl_CA1B`, `GameplayUpdate` — player/bomb input and state. - `Object_WriteStageProgress_CFB0` ($CFB0) — stage progress tracking. - `Frame_ReadObjectIndex_CE5B` ($CE5B), `Frame_ReadObjectX_CDD4` ($CDD4) — frame-based object reading. @@ -154,14 +165,14 @@ Referenced throughout the gameplay code: ## 8. Audio / Sound Engine ### `InitializeApu` ($E642) -- Clears DMC direct register ($4011), sound delays $E1–$E3. +- Clears DMC direct register ($4011), sound delays `SoundDelay0`–`SoundDelay2` ($E1–$E3). - Silences pulse 1, pulse 2, triangle, noise channel controls ($4000, $4004, $4008, $400C). - Enables APU channels ($4015 = $0F). -### `Sound_HandleControl_E65F` ($E65F) +### `SoundUpdate` ($E65F) - Loops over 3 sound channels (X = 2 down to 0). -- Decrements per-channel delay at $E1,X. -- When delay expires, reads sound command state from $DF: +- Decrements per-channel delay at `SoundDelay0,x` ($E1,X). +- When delay expires, reads sound command state from `SoundCommandState` ($DF): - If $DF < 0 → read sound RAM pointer ($E6BC table). - If $DF == 3 → write sound command state. - Otherwise → return or handle based on $E0 (indirect pointer). @@ -178,9 +189,9 @@ A jump table of 14 sound handler addresses (e.g., $E641, $E6C8, $E6CC, $E6DE, $E ### Sound state (zero page) | Address | Symbol | Use | |---------|--------|-----| -| $DF | SoundCommandState | Sound command / state | -| $E0 | SoundDispatchIndex / IndirectPtrLo | Sound dispatch pointer low | -| $E1–$E3 | SoundDelay0–2 | Per-channel sound delays | +| $DF | `SoundCommandState` | Sound command / state | +| $E0 | `IndirectPtrLo` / `SoundDispatchIndex` | Indirect pointer low; sound dispatch index | +| $E1–$E3 | `SoundDelay0`–`SoundDelay2` | Per-channel sound delays | --- @@ -189,7 +200,7 @@ A jump table of 14 sound handler addresses (e.g., $E641, $E6C8, $E6CC, $E6DE, $E ### `InitializeVideoSystem` ($C1F2) - `jsr DisableRendering` ($C257) — wait for VBlank, turn off PPUMASK. - `jsr Ppu_HandleControl_C2B9` ($C2B9) — apply PPUCTRL shadow with NMI disabled. -- Set PPUCTRL shadow ($0C) = $10, clear $0E/$0F/$14/$15. +- Set `PpuCtrlShadow` ($0C) = $10, clear $0E/$0F/$14/$15. - `jsr HideAllSprites` ($C268) — fills $0700–$07FF with $F8 (offscreen) in 32-byte strides. - `jsr UploadSystemPalette` ($C2C3) — uploads 32 bytes of palette data from `SystemPaletteData` ($C2E7) to $3F00–$3F1F. - `jsr EnableNmiInPpuControl` ($C2B0) — enable NMI. @@ -206,52 +217,53 @@ A jump table of 14 sound handler addresses (e.g., $E641, $E6C8, $E6CC, $E6DE, $E ## 10. Zero-Page / RAM Symbols +The symbol table lives in `copilot/locals.inc` (hardware constants are in `copilot/symbols.inc`). Every address it names is used by name in `prg.s`: + | Address | Symbol | Use | |---------|--------|-----| -| $0B | FrameSyncFlag | NMI frame sync | -| $0C–$0D | PpuCtrlShadow / PpuMaskShadow | PPU register shadows | -| $12 | ControllerState1 | Controller port 1 state | -| $13 | ControllerState2 | Controller port 2 state | -| $14–$15 | VramReadOffset / VramWriteLimit | NMI VRAM-transfer window (index + limit) | -| $16 | NmiPathSelector | Selects NMI sub-path (sprite DMA vs VRAM data) | -| $1F–$20 | (unnamed) | Object X/Y temp | -| $28–$2C | (unnamed) | Object spawn parameters | -| $29–$2B | (unnamed) | Object coordinates | -| $33 | FrameCounter | Frame tick counter | -| $34 | IndirectPtrHi | Pointer high (used by sound/object) | -| $36 | (unnamed) | Object X temp | -| $38 | (unnamed) | DMC / audio flag | -| $39 | (unnamed) | Stage counter flag | -| $3C–$3F | (unnamed) | Delay counters | -| $54–$57 | RandomState0–3 | PRNG state (4-byte RNG) | -| $59 | GameMode | Game mode / screen state | -| $5A | (unnamed) | Stage / level | -| $5B | (unnamed) | Object X bound | -| $5C–$5E | (unnamed) | Object state flags | -| $5F | (unnamed) | Menu toggle | -| $60 | NmiWorkPending | NMI VRAM-transfer work pending flag | -| $61–$6A | (unnamed) | Object init / temp | -| $68–$70 | MainDelay / SubDelay | Main loop delay counters | -| $72 | ScreenState | Screen state flag | -| $73 | ObjectXLimit | Object X limit | -| $76–$7A | (unnamed) | Object position/state | -| $7D–$7E | (unnamed) | Bomb / object state | -| $78–$7C | (unnamed) | Player / bomb coords | -| $79–$7A | (unnamed) | Player position | -| $93 | StageCounter | Stage counter | -| $94 | (unnamed) | Audio / object | -| $9C–$9F | ObjectWork0–3 | Object work fields | -| $A0–$A7 | (unnamed) | Object work / bonus | -| $A4 | BonusTimer | Bonus timer | -| $AC–$AE | (unnamed) | Audio data pointers | -| $B0 | GameModeCounter | Game mode counter | -| $B1 | ObjectType | Object type | -| $B2 | (unnamed) | Audio flag | -| $B5 | FrameDelay | Frame delay | -| $DB | FrameParity | Frame parity toggle (NMI toggles each frame) | -| $DF | SoundCommandState | Sound command state | -| $E0–$E3 | SoundDispatchIndex / SoundDelay0–2 | Sound dispatch & delays | -| $E4 | RandomStateAlt | Alternate random-state byte (dec'd at CPU $E71B; distinct from RandomState0 at $54) | +| $0B | `FrameSyncFlag` | Main-thread/NMI frame handoff | +| $0C | `PpuCtrlShadow` | Software copy of PPUCTRL | +| $0D | `PpuMaskShadow` | Software copy of PPUMASK | +| $12 | `ControllerState1` | Controller port 1 sample | +| $13 | `ControllerState2` | Controller port 2 sample | +| $14 | `VramReadOffset` | NMI VRAM-transfer index into the $0600 table | +| $15 | `VramWriteLimit` | Upper limit compared against $14 | +| $16 | `NmiPathSelector` | $60=0 → sprite DMA path; $60≠0 → VRAM data path | +| $1F | `ObjectScreenX` | Object coordinate temporaries used by object processing | +| $20 | `ObjectScreenY` | | +| $28 | `ObjectSpawnParam` | Object spawn parameters | +| $29 | `ObjectSpawnY` | | +| $2A | `ObjectSpawnX` | | +| $2B | `ObjectSpawnWidth` | | +| $2C | `ObjectSpawnHeight` | | +| $33 | `FrameCounter` | Frame counter | +| $54–$57 | `RandomState0`–`RandomState3` | Four-byte PRNG state used by `AdvanceRandomState` | +| $59 | `GameMode` | Game mode / screen selector | +| $5C | `ObjectStateFlags` | Object state trio | +| $5D | `ObjectStateTimer` | | +| $5E | `ObjectStateExtra` | | +| $60 | `NmiWorkPending` | Nonzero → the NMI performs VRAM transfers | +| $70 | `MainDelay` | Main-loop delay counter | +| $71 | `SubDelay` | Secondary delay counter | +| $72 | `ScreenState` | Screen state flag | +| $73 | `ObjectXLimit` | Object X limit | +| $93 | `StageCounter` | Stage counter | +| $9C–$9F | `ObjectWork0`–`ObjectWork3` | Object work fields | +| $A4 | `BonusTimer` | Bonus timer | +| $AC–$AF | `AudioPtrLo/Hi`, `AudioArgLo/Hi` | Audio data / argument pointers | +| $B0 | `GameModeCounter` | Game-mode counter | +| $B1 | `ObjectType` | Object type | +| $B5 | `FrameDelay` | Frame delay | +| $DB | `FrameParity` | Frame-parity toggle, flipped by the NMI each frame | +| $DF | `SoundCommandState` | Sound command state | +| $E0 | `IndirectPtrLo` / `SoundDispatchIndex` | Indirect pointer for the RAM-clear loop; sound dispatch index in the sound engine | +| $E1 | `IndirectPtrHi` / `SoundDelay0` | Indirect pointer high byte; per-channel delay base (indexed by X) | +| $E2–$E3 | `SoundDelay1` / `SoundDelay2` | Remaining per-channel delays | +| $E4 | `RandomStateAlt` | Distinct byte decremented at CPU $E71B (zero-page reuse) | + +**Aliases.** Two addresses carry two names each; `prg.s` uses the one that matches the calling routine. `$E0`/`$E1` are `IndirectPtrLo/Hi` in the RAM-clear loop (`InitializeSystemAndRunMainLoop` / `Main_WriteSoundDispatchIndex_C317`) and in the sound engine's pointer work, but `$E1` is `SoundDelay0` wherever the sound engine indexes the per-channel delay table (`SoundDelay0,x`, i.e. `$E1`–`$E3`). + +**Unnamed residue.** Most zero-page/RAM bytes the game touches have no entry in `locals.inc` and stay numeric — 758 operands address 179 distinct addresses outside the table above (e.g. the `$34`/`$35` indirect pointer used by gameplay data writes). Naming them is Pass-3 semantic work, not a substitution. --- @@ -259,11 +271,11 @@ A jump table of 14 sound handler addresses (e.g., $E641, $E6C8, $E6CC, $E6DE, $E | Label | Address | Description | |-------|---------|-------------| -| `InesHeader` | $C000–$C00F | iNES header (embedded in source) | +| `InesHeader` | $000000–$00000F (header segment) | iNES header (in `header.s`) | | `SystemPaletteData` | $C2E7–$C306 | 32-byte palette for $3F00 | | `MainStateDispatchTable` | $C75D–$C79C | 64-byte gameplay state dispatch table | | `SoundDispatchAddressTable` | $E6AD–$E6C8 | 14-entry sound handler jump table | -| `PatternTableGraphics` | $C010+ (CHR) | CHR pattern table data | +| `PatternTableGraphics` | $004010+ (CHR segment) | CHR pattern table data (in `chr.s`) | --- @@ -289,7 +301,7 @@ jmp InitializeSystemAndRunMainLoop ($C30C) │ ├─ ComposeStatusScreen ($DE83) │ ├─ EnableNmiInPpuControl │ └─ MainGameLoop ($C368) ◄─────────────┘ - │ + │ MainGameLoop ($C368) ─────────────────────────────────┤ │ │ ├─ wait for controller button press │ @@ -303,7 +315,7 @@ MainGameLoop ($C368) ─────────────────── │ ├─ object timer ($0526) │ │ └─ object dispatch via StateDispatchTable │ └─ eventually → back to MainGameLoop │ - │ + │ NMI ($C01A) [every frame] │ │ │ ├─ OAM setup + DMA ($4014) │ @@ -316,7 +328,7 @@ NMI ($C01A) [every frame] │ ├─ PPU state & scroll commit ($C296) │ ├─ frame parity toggle ($DB) │ └─ rti │ - │ + │ Sound Engine ($E65F) [from NMI] │ ├─ per-channel delay countdown ($E1–$E3) │ ├─ SoundDispatchAddressTable ($E6AD) │ @@ -329,7 +341,8 @@ Sound Engine ($E65F) [from NMI] │ ## 13. Notes - **Build is byte-identical:** The apparent one-byte difference (`dec $E4` vs `dec $54` at CPU $E71B) was resolved by recognizing zero-page reuse — `$54` is `RandomState0` used by most code, while `$E4` is a distinct byte (`RandomStateAlt`) decremented at that one location. Both are now separately named in `locals.inc`. -- The source uses a "ROM $00XXXX" file-offset annotation scheme on every instruction, enabling direct comparison with the binary. -- Code is organized as reachable routines traced from the NMI/RESET/IRQ control-flow graph; unreachable bytes are classified as explicit data regions. -- The disassembly is a single file (`main.s`) with embedded iNES header and CHR data segments. -- Vectors confirm NMI at $C01A and RESET at $C000, matching the reset handler location. \ No newline at end of file +- **Source annotation:** `prg.s` uses the canonical `; CPU:$C123 PRG:0123 AD 21 03` audit comment format on every instruction, enabling direct comparison with the binary. +- **Code organization:** Code is organized as reachable routines traced from the NMI/RESET/IRQ control-flow graph; unreachable bytes are classified as explicit data regions. +- **Legacy file:** `copilot/main.s` (8,070 lines) is a pre-standardization duplicate kept for reference; the build uses `prg.s` + `header.s` + `chr.s`. +- **Vectors confirm** NMI at $C01A and RESET at $C000, matching the reset handler location. +- **Known misnomer:** `Main_WriteSoundDispatchIndex_C317` ($C317) is actually the RAM-clear loop (writes $00 to $0100–$07FF via `IndirectPtrLo/Hi`), not a sound-dispatch write. The name reflects a prior pass's assumption; the operands now correctly use `IndirectPtrLo/Hi`. Renaming the label is a follow-up task. \ No newline at end of file diff --git a/Bomberman (U)/copilot/prg.s b/Bomberman (U)/copilot/prg.s index c02f7a5..34eecb3 100644 --- a/Bomberman (U)/copilot/prg.s +++ b/Bomberman (U)/copilot/prg.s @@ -62,7 +62,7 @@ NmiHandler: ldx #$00 ; CPU:$C01F PRG:001F A2 00 stx FrameSyncFlag ; CPU:$C021 PRG:0021 86 0B stx OAMADDR ; CPU:$C023 PRG:0023 8E 03 20 - lda $60 ; CPU:$C026 PRG:0026 A5 60 + lda NmiWorkPending ; CPU:$C026 PRG:0026 A5 60 beq Nmi_TransferSpriteDmaPath_C03E ; CPU:$C028 PRG:0028 F0 14 lda #$19 ; CPU:$C02A PRG:002A A9 19 sta $0700 ; CPU:$C02C PRG:002C 8D 00 07 @@ -83,7 +83,7 @@ Nmi_TransferSpriteDmaPath_C03E: lda #$07 ; CPU:$C03E PRG:003E A9 07 sta OAMDMA ; CPU:$C040 PRG:0040 8D 14 40 ldx #$09 ; CPU:$C043 PRG:0043 A2 09 - stx $16 ; CPU:$C045 PRG:0045 86 16 + stx NmiPathSelector ; CPU:$C045 PRG:0045 86 16 bne Nmi_ReadZp14_C0B3 ; CPU:$C047 PRG:0047 D0 6A ; Routine: Nmi_TransferVramDataPath_C049 ; Global: Reachable code entry at CPU $C049 traced from the interrupt-root control-flow graph. @@ -132,9 +132,9 @@ Nmi_TransferVramDataPath_C049: sty PPUDATA ; CPU:$C0A5 PRG:00A5 8C 07 20 lda #$08 ; CPU:$C0A8 PRG:00A8 A9 08 clc ; CPU:$C0AA PRG:00AA 18 - adc $14 ; CPU:$C0AB PRG:00AB 65 14 - sta $14 ; CPU:$C0AD PRG:00AD 85 14 - dec $16 ; CPU:$C0AF PRG:00AF C6 16 + adc VramReadOffset ; CPU:$C0AB PRG:00AB 65 14 + sta VramReadOffset ; CPU:$C0AD PRG:00AD 85 14 + dec NmiPathSelector ; CPU:$C0AF PRG:00AF C6 16 beq Nmi_ReadScreenState_C0B9 ; CPU:$C0B1 PRG:00B1 F0 06 ; Routine: Nmi_ReadZp14_C0B3 ; Global: Reachable code entry at CPU $C0B3 traced from the interrupt-root control-flow graph. @@ -144,8 +144,8 @@ Nmi_TransferVramDataPath_C049: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Nmi_ReadZp14_C0B3: - ldy $14 ; CPU:$C0B3 PRG:00B3 A4 14 - cpy $15 ; CPU:$C0B5 PRG:00B5 C4 15 + ldy VramReadOffset ; CPU:$C0B3 PRG:00B3 A4 14 + cpy VramWriteLimit ; CPU:$C0B5 PRG:00B5 C4 15 bne Nmi_TransferVramDataPath_C049 ; CPU:$C0B7 PRG:00B7 D0 90 ; Routine: Nmi_ReadScreenState_C0B9 ; Global: Reachable code entry at CPU $C0B9 traced from the interrupt-root control-flow graph. @@ -155,7 +155,7 @@ Nmi_ReadZp14_C0B3: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Nmi_ReadScreenState_C0B9: - lda $72 ; CPU:$C0B9 PRG:00B9 A5 72 + lda ScreenState ; CPU:$C0B9 PRG:00B9 A5 72 beq Nmi_ReadNmiWorkPending_C0E4 ; CPU:$C0BB PRG:00BB F0 27 lda #$22 ; CPU:$C0BD PRG:00BD A9 22 ldx #$68 ; CPU:$C0BF PRG:00BF A2 68 @@ -198,9 +198,9 @@ Nmi_TransferVramDataPath_C0DE: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Nmi_ReadNmiWorkPending_C0E4: - lda $60 ; CPU:$C0E4 PRG:00E4 A5 60 + lda NmiWorkPending ; CPU:$C0E4 PRG:00E4 A5 60 beq Nmi_ReadPpuStatusPath_C126 ; CPU:$C0E6 PRG:00E6 F0 3E - lda $16 ; CPU:$C0E8 PRG:00E8 A5 16 + lda NmiPathSelector ; CPU:$C0E8 PRG:00E8 A5 16 cmp #$04 ; CPU:$C0EA PRG:00EA C9 04 bcc Nmi_ReadPpuStatusPath_C126 ; CPU:$C0EC PRG:00EC 90 38 lda #$20 ; CPU:$C0EE PRG:00EE A9 20 @@ -249,7 +249,7 @@ Nmi_ReadZp93_C114: lda #$20 ; CPU:$C114 PRG:0114 A9 20 ldx #$46 ; CPU:$C116 PRG:0116 A2 46 jsr SetPpuAddress ; CPU:$C118 PRG:0118 20 96 C1 - lda $93 ; CPU:$C11B PRG:011B A5 93 + lda StageCounter ; CPU:$C11B PRG:011B A5 93 cmp #$FF ; CPU:$C11D PRG:011D C9 FF bne Nmi_CallHelper_C123 ; CPU:$C11F PRG:011F D0 02 lda #$00 ; CPU:$C121 PRG:0121 A9 00 @@ -272,7 +272,7 @@ Nmi_CallHelper_C123: Nmi_ReadPpuStatusPath_C126: lda PPUSTATUS ; CPU:$C126 PRG:0126 AD 02 20 jsr CommitPpuStateAndScroll ; CPU:$C129 PRG:0129 20 96 C2 - inc $33 ; CPU:$C12C PRG:012C E6 33 + inc FrameCounter ; CPU:$C12C PRG:012C E6 33 lda $6A ; CPU:$C12E PRG:012E A5 6A beq Nmi_UpdateAudioChannelPath_C13E ; CPU:$C130 PRG:0130 F0 0C inc $69 ; CPU:$C132 PRG:0132 E6 69 @@ -295,7 +295,7 @@ Nmi_UpdateAudioChannelPath_C13E: jsr SoundUpdate ; CPU:$C146 PRG:0146 20 5F E6 lda $38 ; CPU:$C149 PRG:0149 A5 38 beq Nmi_ReadNmiWorkPending_C16E ; CPU:$C14B PRG:014B F0 21 - lda $59 ; CPU:$C14D PRG:014D A5 59 + lda GameMode ; CPU:$C14D PRG:014D A5 59 bne Nmi_ReadNmiWorkPending_C16E ; CPU:$C14F PRG:014F D0 1D lda #$0E ; CPU:$C151 PRG:0151 A9 0E sta APUDMCCTRL ; CPU:$C153 PRG:0153 8D 10 40 @@ -317,7 +317,7 @@ Nmi_UpdateAudioChannelPath_C13E: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Nmi_ReadNmiWorkPending_C16E: - lda $60 ; CPU:$C16E PRG:016E A5 60 + lda NmiWorkPending ; CPU:$C16E PRG:016E A5 60 beq Nmi_ToggleZpDB_C18A ; CPU:$C170 PRG:0170 F0 18 ; Routine: Nmi_ReadPpuStatusPath_C172 ; Global: Reachable code entry at CPU $C172 traced from the interrupt-root control-flow graph. @@ -354,8 +354,8 @@ Nmi_ReadPpuStatusPath_C179: ; Confidence: High for reachability and encoding; semantic role provisional. Nmi_ToggleZpDB_C18A: lda #$05 ; CPU:$C18A PRG:018A A9 05 - eor $DB ; CPU:$C18C PRG:018C 45 DB - sta $DB ; CPU:$C18E PRG:018E 85 DB + eor FrameParity ; CPU:$C18C PRG:018C 45 DB + sta FrameParity ; CPU:$C18E PRG:018E 85 DB pla ; CPU:$C190 PRG:0190 68 tay ; CPU:$C191 PRG:0191 A8 pla ; CPU:$C192 PRG:0192 68 @@ -384,13 +384,13 @@ Ppu_WriteZp10_C19D: jsr Ppu_ReadControllerAndReturnA_C1BF ; CPU:$C19D PRG:019D 20 BF C1 lda ControllerState1 ; CPU:$C1A0 PRG:01A0 A5 12 sta $10 ; CPU:$C1A2 PRG:01A2 85 10 - lda $13 ; CPU:$C1A4 PRG:01A4 A5 13 + lda ControllerState2 ; CPU:$C1A4 PRG:01A4 A5 13 sta $11 ; CPU:$C1A6 PRG:01A6 85 11 jsr Ppu_ReadControllerAndReturnA_C1BF ; CPU:$C1A8 PRG:01A8 20 BF C1 lda ControllerState1 ; CPU:$C1AB PRG:01AB A5 12 cmp $10 ; CPU:$C1AD PRG:01AD C5 10 bne Ppu_WriteZp13_C1B8 ; CPU:$C1AF PRG:01AF D0 07 - lda $13 ; CPU:$C1B1 PRG:01B1 A5 13 + lda ControllerState2 ; CPU:$C1B1 PRG:01B1 A5 13 cmp $11 ; CPU:$C1B3 PRG:01B3 C5 11 bne Ppu_WriteZp13_C1B8 ; CPU:$C1B5 PRG:01B5 D0 01 rts ; CPU:$C1B7 PRG:01B7 60 @@ -404,7 +404,7 @@ Ppu_WriteZp10_C19D: Ppu_WriteZp13_C1B8: lda #$00 ; CPU:$C1B8 PRG:01B8 A9 00 sta ControllerState1 ; CPU:$C1BA PRG:01BA 85 12 - sta $13 ; CPU:$C1BC PRG:01BC 85 13 + sta ControllerState2 ; CPU:$C1BC PRG:01BC 85 13 rts ; CPU:$C1BE PRG:01BE 60 ; Routine: Ppu_ReadControllerAndReturnA_C1BF ; Global: Reachable code entry at CPU $C1BF traced from the interrupt-root control-flow graph. @@ -451,7 +451,7 @@ Ppu_ReadControllerPath_C1DD: lda JOY2 ; CPU:$C1E0 PRG:01E0 AD 17 40 jsr Ppu_HandleControl_C1EB ; CPU:$C1E3 PRG:01E3 20 EB C1 bne Ppu_ReadControllerPath_C1DD ; CPU:$C1E6 PRG:01E6 D0 F5 - stx $13 ; CPU:$C1E8 PRG:01E8 86 13 + stx ControllerState2 ; CPU:$C1E8 PRG:01E8 86 13 rts ; CPU:$C1EA PRG:01EA 60 ; Routine: Ppu_HandleControl_C1EB ; Global: Reachable code entry at CPU $C1EB traced from the interrupt-root control-flow graph. @@ -489,8 +489,8 @@ InitializeVideoSystem: sta PPUCTRL ; CPU:$C1FC PRG:01FC 8D 00 20 lda #$00 ; CPU:$C1FF PRG:01FF A9 00 sta $0E ; CPU:$C201 PRG:0201 85 0E - sta $14 ; CPU:$C203 PRG:0203 85 14 - sta $15 ; CPU:$C205 PRG:0205 85 15 + sta VramReadOffset ; CPU:$C203 PRG:0203 85 14 + sta VramWriteLimit ; CPU:$C205 PRG:0205 85 15 sta $0F ; CPU:$C207 PRG:0207 85 0F jsr HideAllSprites ; CPU:$C209 PRG:0209 20 68 C2 jsr DisableRendering ; CPU:$C20C PRG:020C 20 57 C2 @@ -731,7 +731,7 @@ UploadSystemPalette: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Ppu_TransferVramDataPath_C2CC: - lda $C2E7,x ; CPU:$C2CC PRG:02CC BD E7 C2 + lda SystemPaletteData,x ; CPU:$C2CC PRG:02CC BD E7 C2 sta PPUDATA ; CPU:$C2CF PRG:02CF 8D 07 20 inx ; CPU:$C2D2 PRG:02D2 E8 dey ; CPU:$C2D3 PRG:02D3 88 @@ -776,9 +776,9 @@ WaitForFrameBoundary: ; Confidence: High for reachability and encoding; semantic role provisional. InitializeSystemAndRunMainLoop: ldy #$00 ; CPU:$C30C PRG:030C A0 00 - sty $E0 ; CPU:$C30E PRG:030E 84 E0 + sty IndirectPtrLo ; CPU:$C30E PRG:030E 84 E0 iny ; CPU:$C310 PRG:0310 C8 - sty $E1 ; CPU:$C311 PRG:0311 84 E1 + sty IndirectPtrHi ; CPU:$C311 PRG:0311 84 E1 dey ; CPU:$C313 PRG:0313 88 tya ; CPU:$C314 PRG:0314 98 ldx #$07 ; CPU:$C315 PRG:0315 A2 07 @@ -790,10 +790,10 @@ InitializeSystemAndRunMainLoop: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Main_WriteSoundDispatchIndex_C317: - sta ($E0),y ; CPU:$C317 PRG:0317 91 E0 + sta (IndirectPtrLo),y ; CPU:$C317 PRG:0317 91 E0 iny ; CPU:$C319 PRG:0319 C8 bne Main_WriteSoundDispatchIndex_C317 ; CPU:$C31A PRG:031A D0 FB - inc $E1 ; CPU:$C31C PRG:031C E6 E1 + inc IndirectPtrHi ; CPU:$C31C PRG:031C E6 E1 dex ; CPU:$C31E PRG:031E CA bne Main_WriteSoundDispatchIndex_C317 ; CPU:$C31F PRG:031F D0 F6 ldx #$00 ; CPU:$C321 PRG:0321 A2 00 @@ -828,10 +828,10 @@ Main_WriteZp00_C333: Main_WriteZpDB_C33C: jsr InitializeVideoSystem ; CPU:$C33C PRG:033C 20 F2 C1 lda #$00 ; CPU:$C33F PRG:033F A9 00 - sta $DB ; CPU:$C341 PRG:0341 85 DB + sta FrameParity ; CPU:$C341 PRG:0341 85 DB jsr InitializeApu ; CPU:$C343 PRG:0343 20 42 E6 lda #$01 ; CPU:$C346 PRG:0346 A9 01 - sta $B5 ; CPU:$C348 PRG:0348 85 B5 + sta FrameDelay ; CPU:$C348 PRG:0348 85 B5 ; Routine: Main_UpdateAudioChannelPath_C34A ; Global: Reachable code entry at CPU $C34A traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -846,14 +846,14 @@ Main_UpdateAudioChannelPath_C34A: sta APUSTATUS ; CPU:$C34F PRG:034F 8D 15 40 lda #$00 ; CPU:$C352 PRG:0352 A9 00 sta $38 ; CPU:$C354 PRG:0354 85 38 - sta $59 ; CPU:$C356 PRG:0356 85 59 + sta GameMode ; CPU:$C356 PRG:0356 85 59 sta $B2 ; CPU:$C358 PRG:0358 85 B2 - sta $60 ; CPU:$C35A PRG:035A 85 60 - sta $70 ; CPU:$C35C PRG:035C 85 70 + sta NmiWorkPending ; CPU:$C35A PRG:035A 85 60 + sta MainDelay ; CPU:$C35C PRG:035C 85 70 jsr ComposeStatusScreen ; CPU:$C35E PRG:035E 20 83 DE jsr EnableNmiInPpuControl ; CPU:$C361 PRG:0361 20 B0 C2 lda #$01 ; CPU:$C364 PRG:0364 A9 01 - sta $72 ; CPU:$C366 PRG:0366 85 72 + sta ScreenState ; CPU:$C366 PRG:0366 85 72 ; Routine: MainGameLoop ; Global: Reachable code entry at CPU $C368 traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -873,7 +873,7 @@ MainGameLoop: ; Confidence: High for reachability and encoding; semantic role provisional. Main_WriteMainDelay_C36C: lda #$08 ; CPU:$C36C PRG:036C A9 08 - sta $70 ; CPU:$C36E PRG:036E 85 70 + sta MainDelay ; CPU:$C36E PRG:036E 85 70 ; Routine: Main_ReadOptionState_C370 ; Global: Reachable code entry at CPU $C370 traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -903,11 +903,11 @@ Main_ReadOptionState_C370: ; Confidence: High for reachability and encoding; semantic role provisional. Main_DecrementSubDelay_C38B: jsr AdvanceRandomState ; CPU:$C38B PRG:038B 20 70 D6 - dec $71 ; CPU:$C38E PRG:038E C6 71 + dec SubDelay ; CPU:$C38E PRG:038E C6 71 bne Main_ReadOptionState_C370 ; CPU:$C390 PRG:0390 D0 DE - dec $70 ; CPU:$C392 PRG:0392 C6 70 + dec MainDelay ; CPU:$C392 PRG:0392 C6 70 bne Main_ReadOptionState_C370 ; CPU:$C394 PRG:0394 D0 DA - inc $59 ; CPU:$C396 PRG:0396 E6 59 + inc GameMode ; CPU:$C396 PRG:0396 E6 59 ; Routine: Main_ReadGameState_C398 ; Global: Reachable code entry at CPU $C398 traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -916,7 +916,7 @@ Main_DecrementSubDelay_C38B: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Main_ReadGameState_C398: - lda $59 ; CPU:$C398 PRG:0398 A5 59 + lda GameMode ; CPU:$C398 PRG:0398 A5 59 bne Main_WriteScreenState_C3A3 ; CPU:$C39A PRG:039A D0 07 lda $5F ; CPU:$C39C PRG:039C A5 5F beq Main_WriteScreenState_C3A3 ; CPU:$C39E PRG:039E F0 03 @@ -930,11 +930,11 @@ Main_ReadGameState_C398: ; Confidence: High for reachability and encoding; semantic role provisional. Main_WriteScreenState_C3A3: lda #$00 ; CPU:$C3A3 PRG:03A3 A9 00 - sta $72 ; CPU:$C3A5 PRG:03A5 85 72 + sta ScreenState ; CPU:$C3A5 PRG:03A5 85 72 jsr WaitForFrameBoundary ; CPU:$C3A7 PRG:03A7 20 07 C3 lda #$02 ; CPU:$C3AA PRG:03AA A9 02 sta $68 ; CPU:$C3AC PRG:03AC 85 68 - lda $59 ; CPU:$C3AE PRG:03AE A5 59 + lda GameMode ; CPU:$C3AE PRG:03AE A5 59 bne Main_WriteZp58_C3B6 ; CPU:$C3B0 PRG:03B0 D0 04 lda $5F ; CPU:$C3B2 PRG:03B2 A5 5F bne Main_WriteObjectDirection_C40A ; CPU:$C3B4 PRG:03B4 D0 54 @@ -948,7 +948,7 @@ Main_WriteScreenState_C3A3: Main_WriteZp58_C3B6: lda #$01 ; CPU:$C3B6 PRG:03B6 A9 01 sta $58 ; CPU:$C3B8 PRG:03B8 85 58 - lda $59 ; CPU:$C3BA PRG:03BA A5 59 + lda GameMode ; CPU:$C3BA PRG:03BA A5 59 bne Main_UpdateAudioChannelPath_C3C7 ; CPU:$C3BC PRG:03BC D0 09 ldx #$06 ; CPU:$C3BE PRG:03BE A2 06 lda #$00 ; CPU:$C3C0 PRG:03C0 A9 00 @@ -972,7 +972,7 @@ Main_WriteZp61_C3C2: ; Confidence: High for reachability and encoding; semantic role provisional. Main_UpdateAudioChannelPath_C3C7: lda #$10 ; CPU:$C3C7 PRG:03C7 A9 10 - sta $73 ; CPU:$C3C9 PRG:03C9 85 73 + sta ObjectXLimit ; CPU:$C3C9 PRG:03C9 85 73 lda #$00 ; CPU:$C3CB PRG:03CB A9 00 sta $74 ; CPU:$C3CD PRG:03CD 85 74 sta $77 ; CPU:$C3CF PRG:03CF 85 77 @@ -980,12 +980,12 @@ Main_UpdateAudioChannelPath_C3C7: sta $76 ; CPU:$C3D3 PRG:03D3 85 76 sta $79 ; CPU:$C3D5 PRG:03D5 85 79 sta $94 ; CPU:$C3D7 PRG:03D7 85 94 - lda $59 ; CPU:$C3D9 PRG:03D9 A5 59 + lda GameMode ; CPU:$C3D9 PRG:03D9 A5 59 beq Main_WriteObjectDirection_C40A ; CPU:$C3DB PRG:03DB F0 2D lda #$09 ; CPU:$C3DD PRG:03DD A9 09 sta $74 ; CPU:$C3DF PRG:03DF 85 74 lda #$40 ; CPU:$C3E1 PRG:03E1 A9 40 - sta $73 ; CPU:$C3E3 PRG:03E3 85 73 + sta ObjectXLimit ; CPU:$C3E3 PRG:03E3 85 73 lda #$01 ; CPU:$C3E5 PRG:03E5 A9 01 sta $77 ; CPU:$C3E7 PRG:03E7 85 77 lda #$00 ; CPU:$C3E9 PRG:03E9 A9 00 @@ -994,15 +994,15 @@ Main_UpdateAudioChannelPath_C3C7: sta RandomState1 ; CPU:$C3F0 PRG:03F0 85 55 sta RandomState2 ; CPU:$C3F2 PRG:03F2 85 56 sta RandomState3 ; CPU:$C3F4 PRG:03F4 85 57 - sta $33 ; CPU:$C3F6 PRG:03F6 85 33 + sta FrameCounter ; CPU:$C3F6 PRG:03F6 85 33 lda #$F4 ; CPU:$C3F8 PRG:03F8 A9 F4 - sta $AC ; CPU:$C3FA PRG:03FA 85 AC + sta AudioPtrLo ; CPU:$C3FA PRG:03FA 85 AC lda #$ED ; CPU:$C3FC PRG:03FC A9 ED - sta $AD ; CPU:$C3FE PRG:03FE 85 AD + sta AudioPtrHi ; CPU:$C3FE PRG:03FE 85 AD lda $EDF2 ; CPU:$C400 PRG:0400 AD F2 ED - sta $AE ; CPU:$C403 PRG:0403 85 AE + sta AudioArgLo ; CPU:$C403 PRG:0403 85 AE lda $EDF3 ; CPU:$C405 PRG:0405 AD F3 ED - sta $AF ; CPU:$C408 PRG:0408 85 AF + sta AudioArgHi ; CPU:$C408 PRG:0408 85 AF ; Routine: Main_WriteObjectDirection_C40A ; Global: Reachable code entry at CPU $C40A traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -1023,33 +1023,33 @@ Main_WriteObjectDirection_C40A: ; Confidence: High for reachability and encoding; semantic role provisional. Main_WriteZpB1_C410: lda #$00 ; CPU:$C410 PRG:0410 A9 00 - sta $B1 ; CPU:$C412 PRG:0412 85 B1 + sta ObjectType ; CPU:$C412 PRG:0412 85 B1 sta $A8 ; CPU:$C414 PRG:0414 85 A8 - sta $60 ; CPU:$C416 PRG:0416 85 60 - sta $9E ; CPU:$C418 PRG:0418 85 9E - sta $9F ; CPU:$C41A PRG:041A 85 9F - sta $9C ; CPU:$C41C PRG:041C 85 9C + sta NmiWorkPending ; CPU:$C416 PRG:0416 85 60 + sta ObjectWork2 ; CPU:$C418 PRG:0418 85 9E + sta ObjectWork3 ; CPU:$C41A PRG:041A 85 9F + sta ObjectWork0 ; CPU:$C41C PRG:041C 85 9C sta $A0 ; CPU:$C41E PRG:041E 85 A0 sta $A1 ; CPU:$C420 PRG:0420 85 A1 sta $A2 ; CPU:$C422 PRG:0422 85 A2 sta $A3 ; CPU:$C424 PRG:0424 85 A3 - sta $A4 ; CPU:$C426 PRG:0426 85 A4 + sta BonusTimer ; CPU:$C426 PRG:0426 85 A4 sta $A5 ; CPU:$C428 PRG:0428 85 A5 sta $A6 ; CPU:$C42A PRG:042A 85 A6 sta $A7 ; CPU:$C42C PRG:042C 85 A7 jsr Menu_WriteZp0E_DE1D ; CPU:$C42E PRG:042E 20 1D DE lda #$02 ; CPU:$C431 PRG:0431 A9 02 - sta $B5 ; CPU:$C433 PRG:0433 85 B5 + sta FrameDelay ; CPU:$C433 PRG:0433 85 B5 jsr Main_ReadGameMode_C60B ; CPU:$C435 PRG:0435 20 0B C6 lda #$03 ; CPU:$C438 PRG:0438 A9 03 - sta $B5 ; CPU:$C43A PRG:043A 85 B5 + sta FrameDelay ; CPU:$C43A PRG:043A 85 B5 jsr Ppu_HandleControl_C2B9 ; CPU:$C43C PRG:043C 20 B9 C2 jsr Gameplay_WriteTransferPointer_CA4B ; CPU:$C43F PRG:043F 20 4B CA jsr Main_WriteObjectType_C5CE ; CPU:$C442 PRG:0442 20 CE C5 jsr Gameplay_ReadZp58_E4AF ; CPU:$C445 PRG:0445 20 AF E4 jsr Main_CallHelper_C5FF ; CPU:$C448 PRG:0448 20 FF C5 lda #$C8 ; CPU:$C44B PRG:044B A9 C8 - sta $93 ; CPU:$C44D PRG:044D 85 93 + sta StageCounter ; CPU:$C44D PRG:044D 85 93 ; Routine: Main_ReadZp5D_C44F ; Global: Reachable code entry at CPU $C44F traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -1067,11 +1067,11 @@ Main_ReadZp5D_C44F: jsr Gameplay_HandleControl_CA1B ; CPU:$C461 PRG:0461 20 1B CA jsr Main_ReadZp33_C644 ; CPU:$C464 PRG:0464 20 44 C6 jsr Gameplay_ReadStageProgress_E399 ; CPU:$C467 PRG:0467 20 99 E3 - lda $5D ; CPU:$C46A PRG:046A A5 5D + lda ObjectStateTimer ; CPU:$C46A PRG:046A A5 5D bne Main_ReadGameState_C481 ; CPU:$C46C PRG:046C D0 13 - lda $5E ; CPU:$C46E PRG:046E A5 5E + lda ObjectStateExtra ; CPU:$C46E PRG:046E A5 5E bne Main_ReadGameState_C4BF ; CPU:$C470 PRG:0470 D0 4D - lda $33 ; CPU:$C472 PRG:0472 A5 33 + lda FrameCounter ; CPU:$C472 PRG:0472 A5 33 and #$03 ; CPU:$C474 PRG:0474 29 03 bne Main_ReadZp5D_C44F ; CPU:$C476 PRG:0476 D0 D7 jsr GameplayUpdate ; CPU:$C478 PRG:0478 20 9D C7 @@ -1085,7 +1085,7 @@ Main_ReadZp5D_C44F: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Main_ReadGameState_C481: - lda $59 ; CPU:$C481 PRG:0481 A5 59 + lda GameMode ; CPU:$C481 PRG:0481 A5 59 bne Main_WriteGameMode_C4C3 ; CPU:$C483 PRG:0483 D0 3E lda #$00 ; CPU:$C485 PRG:0485 A9 00 sta $76 ; CPU:$C487 PRG:0487 85 76 @@ -1094,7 +1094,7 @@ Main_ReadGameState_C481: sta $79 ; CPU:$C48D PRG:048D 85 79 sta $7A ; CPU:$C48F PRG:048F 85 7A lda #$08 ; CPU:$C491 PRG:0491 A9 08 - sta $B5 ; CPU:$C493 PRG:0493 85 B5 + sta FrameDelay ; CPU:$C493 PRG:0493 85 B5 jsr Main_ReadGameMode_C60B ; CPU:$C495 PRG:0495 20 0B C6 dec $68 ; CPU:$C498 PRG:0498 C6 68 bmi Main_WriteNmiWorkPending_C49F ; CPU:$C49A PRG:049A 30 03 @@ -1108,10 +1108,10 @@ Main_ReadGameState_C481: ; Confidence: High for reachability and encoding; semantic role provisional. Main_WriteNmiWorkPending_C49F: lda #$00 ; CPU:$C49F PRG:049F A9 00 - sta $60 ; CPU:$C4A1 PRG:04A1 85 60 + sta NmiWorkPending ; CPU:$C4A1 PRG:04A1 85 60 jsr Menu_CallHelper_DD3E ; CPU:$C4A3 PRG:04A3 20 3E DD lda #$09 ; CPU:$C4A6 PRG:04A6 A9 09 - sta $B5 ; CPU:$C4A8 PRG:04A8 85 B5 + sta FrameDelay ; CPU:$C4A8 PRG:04A8 85 B5 ; Routine: Main_ReadGameMode_C4AA ; Global: Reachable code entry at CPU $C4AA traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -1123,7 +1123,7 @@ Main_ReadGameMode_C4AA: lda ControllerState1 ; CPU:$C4AA PRG:04AA A5 12 and #$10 ; CPU:$C4AC PRG:04AC 29 10 bne Main_WriteGameMode_C4B4 ; CPU:$C4AE PRG:04AE D0 04 - lda $B5 ; CPU:$C4B0 PRG:04B0 A5 B5 + lda FrameDelay ; CPU:$C4B0 PRG:04B0 A5 B5 bne Main_ReadGameMode_C4AA ; CPU:$C4B2 PRG:04B2 D0 F6 ; Routine: Main_WriteGameMode_C4B4 ; Global: Reachable code entry at CPU $C4B4 traced from the interrupt-root control-flow graph. @@ -1134,7 +1134,7 @@ Main_ReadGameMode_C4AA: ; Confidence: High for reachability and encoding; semantic role provisional. Main_WriteGameMode_C4B4: lda #$00 ; CPU:$C4B4 PRG:04B4 A9 00 - sta $B5 ; CPU:$C4B6 PRG:04B6 85 B5 + sta FrameDelay ; CPU:$C4B6 PRG:04B6 85 B5 ; Routine: Main_HandleControl_C4B8 ; Global: Reachable code entry at CPU $C4B8 traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -1154,7 +1154,7 @@ Main_HandleControl_C4B8: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Main_ReadGameState_C4BF: - lda $59 ; CPU:$C4BF PRG:04BF A5 59 + lda GameMode ; CPU:$C4BF PRG:04BF A5 59 beq Main_WriteGameMode_C4D5 ; CPU:$C4C1 PRG:04C1 F0 12 ; Routine: Main_WriteGameMode_C4C3 ; Global: Reachable code entry at CPU $C4C3 traced from the interrupt-root control-flow graph. @@ -1165,9 +1165,9 @@ Main_ReadGameState_C4BF: ; Confidence: High for reachability and encoding; semantic role provisional. Main_WriteGameMode_C4C3: lda #$00 ; CPU:$C4C3 PRG:04C3 A9 00 - sta $B5 ; CPU:$C4C5 PRG:04C5 85 B5 - inc $B0 ; CPU:$C4C7 PRG:04C7 E6 B0 - lda $B0 ; CPU:$C4C9 PRG:04C9 A5 B0 + sta FrameDelay ; CPU:$C4C5 PRG:04C5 85 B5 + inc GameModeCounter ; CPU:$C4C7 PRG:04C7 E6 B0 + lda GameModeCounter ; CPU:$C4C9 PRG:04C9 A5 B0 and #$03 ; CPU:$C4CB PRG:04CB 29 03 beq Main_Dispatch_C4D2 ; CPU:$C4CD PRG:04CD F0 03 jmp Main_UpdateAudioChannelPath_C34A ; CPU:$C4CF PRG:04CF 4C 4A C3 @@ -1189,7 +1189,7 @@ Main_Dispatch_C4D2: ; Confidence: High for reachability and encoding; semantic role provisional. Main_WriteGameMode_C4D5: lda #$0A ; CPU:$C4D5 PRG:04D5 A9 0A - sta $B5 ; CPU:$C4D7 PRG:04D7 85 B5 + sta FrameDelay ; CPU:$C4D7 PRG:04D7 85 B5 jsr Main_ReadGameMode_C60B ; CPU:$C4D9 PRG:04D9 20 0B C6 inc $68 ; CPU:$C4DC PRG:04DC E6 68 inc $58 ; CPU:$C4DE PRG:04DE E6 58 @@ -1236,10 +1236,10 @@ Main_WriteZp7E_C4F8: ; Confidence: High for reachability and encoding; semantic role provisional. Main_WriteNmiWorkPending_C503: lda #$00 ; CPU:$C503 PRG:0503 A9 00 - sta $60 ; CPU:$C505 PRG:0505 85 60 + sta NmiWorkPending ; CPU:$C505 PRG:0505 85 60 jsr Menu_WriteZp0E_DE53 ; CPU:$C507 PRG:0507 20 53 DE lda #$02 ; CPU:$C50A PRG:050A A9 02 - sta $B5 ; CPU:$C50C PRG:050C 85 B5 + sta FrameDelay ; CPU:$C50C PRG:050C 85 B5 jsr Main_ReadGameMode_C60B ; CPU:$C50E PRG:050E 20 0B C6 jsr Ppu_HandleControl_C2B9 ; CPU:$C511 PRG:0511 20 B9 C2 jsr Gameplay_WriteTransferPointer_CA72 ; CPU:$C514 PRG:0514 20 72 CA @@ -1247,12 +1247,12 @@ Main_WriteNmiWorkPending_C503: jsr Main_CallHelper_C5FF ; CPU:$C51A PRG:051A 20 FF C5 jsr Gameplay_HandleControl_CBC5 ; CPU:$C51D PRG:051D 20 C5 CB lda #$06 ; CPU:$C520 PRG:0520 A9 06 - sta $B5 ; CPU:$C522 PRG:0522 85 B5 + sta FrameDelay ; CPU:$C522 PRG:0522 85 B5 lda #$01 ; CPU:$C524 PRG:0524 A9 01 sta $7A ; CPU:$C526 PRG:0526 85 7A sta $7D ; CPU:$C528 PRG:0528 85 7D lda #$1E ; CPU:$C52A PRG:052A A9 1E - sta $93 ; CPU:$C52C PRG:052C 85 93 + sta StageCounter ; CPU:$C52C PRG:052C 85 93 ; Routine: Main_ReadZp93_C52E ; Global: Reachable code entry at CPU $C52E traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -1262,7 +1262,7 @@ Main_WriteNmiWorkPending_C503: ; Confidence: High for reachability and encoding; semantic role provisional. Main_ReadZp93_C52E: jsr Main_WriteStageCounter_C613 ; CPU:$C52E PRG:052E 20 13 C6 - lda $93 ; CPU:$C531 PRG:0531 A5 93 + lda StageCounter ; CPU:$C531 PRG:0531 A5 93 beq Main_WriteGameMode_C55C ; CPU:$C533 PRG:0533 F0 27 jsr HideAllSprites ; CPU:$C535 PRG:0535 20 68 C2 jsr Gameplay_HandleControl_C8ED ; CPU:$C538 PRG:0538 20 ED C8 @@ -1272,7 +1272,7 @@ Main_ReadZp93_C52E: jsr Object_WriteStageProgress_CFB0 ; CPU:$C544 PRG:0544 20 B0 CF jsr Gameplay_HandleControl_CA1B ; CPU:$C547 PRG:0547 20 1B CA jsr Main_ReadZp33_C65F ; CPU:$C54A PRG:054A 20 5F C6 - lda $33 ; CPU:$C54D PRG:054D A5 33 + lda FrameCounter ; CPU:$C54D PRG:054D A5 33 and #$01 ; CPU:$C54F PRG:054F 29 01 bne Main_ReadZp93_C52E ; CPU:$C551 PRG:0551 D0 DB jsr GameplayUpdate ; CPU:$C553 PRG:0553 20 9D C7 @@ -1287,7 +1287,7 @@ Main_ReadZp93_C52E: ; Confidence: High for reachability and encoding; semantic role provisional. Main_WriteGameMode_C55C: lda #$0A ; CPU:$C55C PRG:055C A9 0A - sta $B5 ; CPU:$C55E PRG:055E 85 B5 + sta FrameDelay ; CPU:$C55E PRG:055E 85 B5 jsr Main_ReadGameMode_C60B ; CPU:$C560 PRG:0560 20 0B C6 lda #$00 ; CPU:$C563 PRG:0563 A9 00 sta $7D ; CPU:$C565 PRG:0565 85 7D @@ -1305,15 +1305,15 @@ Main_WriteObjectX_C56C: jsr Menu_WriteWorkValue_DBF9 ; CPU:$C56F PRG:056F 20 F9 DB jsr Gameplay_WriteTransferPointer_CA72 ; CPU:$C572 PRG:0572 20 72 CA lda #$08 ; CPU:$C575 PRG:0575 A9 08 - sta $29 ; CPU:$C577 PRG:0577 85 29 - sta $2B ; CPU:$C579 PRG:0579 85 2B + sta ObjectSpawnY ; CPU:$C577 PRG:0577 85 29 + sta ObjectSpawnWidth ; CPU:$C579 PRG:0579 85 2B lda #$00 ; CPU:$C57B PRG:057B A9 00 - sta $60 ; CPU:$C57D PRG:057D 85 60 - sta $28 ; CPU:$C57F PRG:057F 85 28 + sta NmiWorkPending ; CPU:$C57D PRG:057D 85 60 + sta ObjectSpawnParam ; CPU:$C57F PRG:057F 85 28 lda #$09 ; CPU:$C581 PRG:0581 A9 09 - sta $2A ; CPU:$C583 PRG:0583 85 2A + sta ObjectSpawnX ; CPU:$C583 PRG:0583 85 2A lda #$07 ; CPU:$C585 PRG:0585 A9 07 - sta $B5 ; CPU:$C587 PRG:0587 85 B5 + sta FrameDelay ; CPU:$C587 PRG:0587 85 B5 jsr Ppu_HandleControl_C262 ; CPU:$C589 PRG:0589 20 62 C2 jsr EnableNmiInPpuControl ; CPU:$C58C PRG:058C 20 B0 C2 ; Routine: Main_WriteStageCounter_C58F @@ -1329,7 +1329,7 @@ Main_WriteStageCounter_C58F: sta $39 ; CPU:$C594 PRG:0594 85 39 jsr HideAllSprites ; CPU:$C596 PRG:0596 20 68 C2 jsr Frame_ReadObjectIndex_CE5B ; CPU:$C599 PRG:0599 20 5B CE - lda $33 ; CPU:$C59C PRG:059C A5 33 + lda FrameCounter ; CPU:$C59C PRG:059C A5 33 ror a ; CPU:$C59E PRG:059E 6A bcs Main_ReadObjectType_C5A4 ; CPU:$C59F PRG:059F B0 03 jsr Frame_ReadObjectX_CDD4 ; CPU:$C5A1 PRG:05A1 20 D4 CD @@ -1341,7 +1341,7 @@ Main_WriteStageCounter_C58F: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Main_ReadObjectType_C5A4: - lda $28 ; CPU:$C5A4 PRG:05A4 A5 28 + lda ObjectSpawnParam ; CPU:$C5A4 PRG:05A4 A5 28 cmp #$08 ; CPU:$C5A6 PRG:05A6 C9 08 bne Main_WriteStageCounter_C58F ; CPU:$C5A8 PRG:05A8 D0 E5 ; Routine: Main_WriteStageCounter_C5AA @@ -1357,7 +1357,7 @@ Main_WriteStageCounter_C5AA: sta $39 ; CPU:$C5AF PRG:05AF 85 39 jsr HideAllSprites ; CPU:$C5B1 PRG:05B1 20 68 C2 jsr Frame_ReadZp2D_CEA7 ; CPU:$C5B4 PRG:05B4 20 A7 CE - lda $33 ; CPU:$C5B7 PRG:05B7 A5 33 + lda FrameCounter ; CPU:$C5B7 PRG:05B7 A5 33 ror a ; CPU:$C5B9 PRG:05B9 6A bcs Main_ReadGameMode_C5BF ; CPU:$C5BA PRG:05BA B0 03 jsr Frame_ReadObjectX_CDD4 ; CPU:$C5BC PRG:05BC 20 D4 CD @@ -1369,7 +1369,7 @@ Main_WriteStageCounter_C5AA: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Main_ReadGameMode_C5BF: - lda $B5 ; CPU:$C5BF PRG:05BF A5 B5 + lda FrameDelay ; CPU:$C5BF PRG:05BF A5 B5 bne Main_WriteStageCounter_C5AA ; CPU:$C5C1 PRG:05C1 D0 E7 ; Routine: Main_WriteZp58_C5C3 ; Global: Reachable code entry at CPU $C5C3 traced from the interrupt-root control-flow graph. @@ -1393,16 +1393,16 @@ Main_WriteZp58_C5C3: ; Confidence: High for reachability and encoding; semantic role provisional. Main_WriteObjectType_C5CE: lda #$01 ; CPU:$C5CE PRG:05CE A9 01 - sta $28 ; CPU:$C5D0 PRG:05D0 85 28 - sta $2A ; CPU:$C5D2 PRG:05D2 85 2A + sta ObjectSpawnParam ; CPU:$C5D0 PRG:05D0 85 28 + sta ObjectSpawnX ; CPU:$C5D2 PRG:05D2 85 2A lda #$08 ; CPU:$C5D4 PRG:05D4 A9 08 - sta $29 ; CPU:$C5D6 PRG:05D6 85 29 - sta $2B ; CPU:$C5D8 PRG:05D8 85 2B + sta ObjectSpawnY ; CPU:$C5D6 PRG:05D6 85 29 + sta ObjectSpawnWidth ; CPU:$C5D8 PRG:05D8 85 2B lda #$00 ; CPU:$C5DA PRG:05DA A9 00 - sta $2C ; CPU:$C5DC PRG:05DC 85 2C - sta $5D ; CPU:$C5DE PRG:05DE 85 5D - sta $5C ; CPU:$C5E0 PRG:05E0 85 5C - sta $5E ; CPU:$C5E2 PRG:05E2 85 5E + sta ObjectSpawnHeight ; CPU:$C5DC PRG:05DC 85 2C + sta ObjectStateTimer ; CPU:$C5DE PRG:05DE 85 5D + sta ObjectStateFlags ; CPU:$C5E0 PRG:05E0 85 5C + sta ObjectStateExtra ; CPU:$C5E2 PRG:05E2 85 5E jsr Gameplay_HandleControl_CBC5 ; CPU:$C5E4 PRG:05E4 20 C5 CB jsr Stage_ReadZp58_D69A ; CPU:$C5E7 PRG:05E7 20 9A D6 jsr Gameplay_WriteWorkValue_CB06 ; CPU:$C5EA PRG:05EA 20 06 CB @@ -1412,7 +1412,7 @@ Main_WriteObjectType_C5CE: lda $CC03,x ; CPU:$C5F5 PRG:05F5 BD 03 CC sta $5B ; CPU:$C5F8 PRG:05F8 85 5B lda #$01 ; CPU:$C5FA PRG:05FA A9 01 - sta $60 ; CPU:$C5FC PRG:05FC 85 60 + sta NmiWorkPending ; CPU:$C5FC PRG:05FC 85 60 rts ; CPU:$C5FE PRG:05FE 60 ; Routine: Main_CallHelper_C5FF ; Global: Reachable code entry at CPU $C5FF traced from the interrupt-root control-flow graph. @@ -1434,7 +1434,7 @@ Main_CallHelper_C5FF: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Main_ReadGameMode_C60B: - lda $B5 ; CPU:$C60B PRG:060B A5 B5 + lda FrameDelay ; CPU:$C60B PRG:060B A5 B5 bne Main_ReadGameMode_C60B ; CPU:$C60D PRG:060D D0 FC rts ; CPU:$C60F PRG:060F 60 ; Routine: Main_Dispatch_C610 @@ -1460,12 +1460,12 @@ Main_WriteStageCounter_C613: lda ControllerState1 ; CPU:$C61A PRG:061A A5 12 and #$10 ; CPU:$C61C PRG:061C 29 10 beq Main_ReturnToCaller_C643 ; CPU:$C61E PRG:061E F0 23 - lda $59 ; CPU:$C620 PRG:0620 A5 59 + lda GameMode ; CPU:$C620 PRG:0620 A5 59 bne Main_Dispatch_C610 ; CPU:$C622 PRG:0622 D0 EC lda #$01 ; CPU:$C624 PRG:0624 A9 01 sta $B2 ; CPU:$C626 PRG:0626 85 B2 lda #$06 ; CPU:$C628 PRG:0628 A9 06 - sta $DF ; CPU:$C62A PRG:062A 85 DF + sta SoundCommandState ; CPU:$C62A PRG:062A 85 DF jsr WaitForFrameBoundary ; CPU:$C62C PRG:062C 20 07 C3 ; Routine: Main_WriteSoundCommandState_C62F ; Global: Reachable code entry at CPU $C62F traced from the interrupt-root control-flow graph. @@ -1479,7 +1479,7 @@ Main_WriteSoundCommandState_C62F: and #$10 ; CPU:$C631 PRG:0631 29 10 beq Main_WriteSoundCommandState_C62F ; CPU:$C633 PRG:0633 F0 FA lda #$06 ; CPU:$C635 PRG:0635 A9 06 - sta $DF ; CPU:$C637 PRG:0637 85 DF + sta SoundCommandState ; CPU:$C637 PRG:0637 85 DF lda #$00 ; CPU:$C639 PRG:0639 A9 00 sta $B2 ; CPU:$C63B PRG:063B 85 B2 jsr WaitForFrameBoundary ; CPU:$C63D PRG:063D 20 07 C3 @@ -1501,13 +1501,13 @@ Main_ReturnToCaller_C643: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Main_ReadZp33_C644: - lda $33 ; CPU:$C644 PRG:0644 A5 33 + lda FrameCounter ; CPU:$C644 PRG:0644 A5 33 and #$3F ; CPU:$C646 PRG:0646 29 3F bne Main_ReturnToCaller_C65E ; CPU:$C648 PRG:0648 D0 14 - lda $93 ; CPU:$C64A PRG:064A A5 93 + lda StageCounter ; CPU:$C64A PRG:064A A5 93 cmp #$FF ; CPU:$C64C PRG:064C C9 FF beq Main_ReturnToCaller_C65E ; CPU:$C64E PRG:064E F0 0E - dec $93 ; CPU:$C650 PRG:0650 C6 93 + dec StageCounter ; CPU:$C650 PRG:0650 C6 93 bne Main_ReturnToCaller_C65E ; CPU:$C652 PRG:0652 D0 0A jsr Gameplay_HandleControl_CBD7 ; CPU:$C654 PRG:0654 20 D7 CB lda #$08 ; CPU:$C657 PRG:0657 A9 08 @@ -1530,12 +1530,12 @@ Main_ReturnToCaller_C65E: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Main_ReadZp33_C65F: - lda $33 ; CPU:$C65F PRG:065F A5 33 + lda FrameCounter ; CPU:$C65F PRG:065F A5 33 and #$3F ; CPU:$C661 PRG:0661 29 3F bne Main_ReturnToCaller_C65E ; CPU:$C663 PRG:0663 D0 F9 - lda $93 ; CPU:$C665 PRG:0665 A5 93 + lda StageCounter ; CPU:$C665 PRG:0665 A5 93 beq Main_ReturnToCaller_C65E ; CPU:$C667 PRG:0667 F0 F5 - dec $93 ; CPU:$C669 PRG:0669 C6 93 + dec StageCounter ; CPU:$C669 PRG:0669 C6 93 rts ; CPU:$C66B PRG:066B 60 ; Routine: Main_HandleControl_C66C ; Global: Reachable code entry at CPU $C66C traced from the interrupt-root control-flow graph. @@ -1560,10 +1560,10 @@ Main_ReadRam03E6_C66E: and #$7F ; CPU:$C675 PRG:0675 29 7F tay ; CPU:$C677 PRG:0677 A8 lda $0436,x ; CPU:$C678 PRG:0678 BD 36 04 - sta $1F ; CPU:$C67B PRG:067B 85 1F + sta ObjectScreenX ; CPU:$C67B PRG:067B 85 1F lda $0486,x ; CPU:$C67D PRG:067D BD 86 04 - sta $20 ; CPU:$C680 PRG:0680 85 20 - lda $C75D,y ; CPU:$C682 PRG:0682 B9 5D C7 + sta ObjectScreenY ; CPU:$C680 PRG:0680 85 20 + lda MainStateDispatchTable,y ; CPU:$C682 PRG:0682 B9 5D C7 jmp Main_ReadZp5C_C6DA ; CPU:$C685 PRG:0685 4C DA C6 ; Routine: Main_ReadRam0436_C688 ; Global: Reachable code entry at CPU $C688 traced from the interrupt-root control-flow graph. @@ -1574,9 +1574,9 @@ Main_ReadRam03E6_C66E: ; Confidence: High for reachability and encoding; semantic role provisional. Main_ReadRam0436_C688: lda $0436,x ; CPU:$C688 PRG:0688 BD 36 04 - sta $1F ; CPU:$C68B PRG:068B 85 1F + sta ObjectScreenX ; CPU:$C68B PRG:068B 85 1F lda $0486,x ; CPU:$C68D PRG:068D BD 86 04 - sta $20 ; CPU:$C690 PRG:0690 85 20 + sta ObjectScreenY ; CPU:$C690 PRG:0690 85 20 lda $0526,x ; CPU:$C692 PRG:0692 BD 26 05 and #$78 ; CPU:$C695 PRG:0695 29 78 beq Main_Dispatch_C6CD ; CPU:$C697 PRG:0697 F0 34 @@ -1657,24 +1657,24 @@ Main_ReadZp5C_C6DA: and #$FF ; CPU:$C6DA PRG:06DA 29 FF beq Main_CallHelper_C753 ; CPU:$C6DC PRG:06DC F0 75 jsr Stage_WriteObjectWorkX_D8FC ; CPU:$C6DE PRG:06DE 20 FC D8 - lda $5C ; CPU:$C6E1 PRG:06E1 A5 5C + lda ObjectStateFlags ; CPU:$C6E1 PRG:06E1 A5 5C bne Main_HandleControl_C705 ; CPU:$C6E3 PRG:06E3 D0 20 lda $79 ; CPU:$C6E5 PRG:06E5 A5 79 bne Main_HandleControl_C705 ; CPU:$C6E7 PRG:06E7 D0 1C lda $7A ; CPU:$C6E9 PRG:06E9 A5 7A bne Main_HandleControl_C705 ; CPU:$C6EB PRG:06EB D0 18 - lda $28 ; CPU:$C6ED PRG:06ED A5 28 - cmp $1F ; CPU:$C6EF PRG:06EF C5 1F + lda ObjectSpawnParam ; CPU:$C6ED PRG:06ED A5 28 + cmp ObjectScreenX ; CPU:$C6EF PRG:06EF C5 1F bne Main_HandleControl_C705 ; CPU:$C6F1 PRG:06F1 D0 12 - lda $2A ; CPU:$C6F3 PRG:06F3 A5 2A - cmp $20 ; CPU:$C6F5 PRG:06F5 C5 20 + lda ObjectSpawnX ; CPU:$C6F3 PRG:06F3 A5 2A + cmp ObjectScreenY ; CPU:$C6F5 PRG:06F5 C5 20 bne Main_HandleControl_C705 ; CPU:$C6F7 PRG:06F7 D0 0C lda #$05 ; CPU:$C6F9 PRG:06F9 A9 05 - sta $DF ; CPU:$C6FB PRG:06FB 85 DF + sta SoundCommandState ; CPU:$C6FB PRG:06FB 85 DF lda #$01 ; CPU:$C6FD PRG:06FD A9 01 - sta $5C ; CPU:$C6FF PRG:06FF 85 5C + sta ObjectStateFlags ; CPU:$C6FF PRG:06FF 85 5C lda #$0C ; CPU:$C701 PRG:0701 A9 0C - sta $2C ; CPU:$C703 PRG:0703 85 2C + sta ObjectSpawnHeight ; CPU:$C703 PRG:0703 85 2C ; Routine: Main_HandleControl_C705 ; Global: Reachable code entry at CPU $C705 traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -1697,12 +1697,12 @@ Main_ReadRam0576_C707: cmp #$09 ; CPU:$C70C PRG:070C C9 09 bcs Main_RetreatIndexY_C74E ; CPU:$C70E PRG:070E B0 3E lda $0580,y ; CPU:$C710 PRG:0710 B9 80 05 - cmp $1F ; CPU:$C713 PRG:0713 C5 1F + cmp ObjectScreenX ; CPU:$C713 PRG:0713 C5 1F bne Main_RetreatIndexY_C74E ; CPU:$C715 PRG:0715 D0 37 lda $0594,y ; CPU:$C717 PRG:0717 B9 94 05 - cmp $20 ; CPU:$C71A PRG:071A C5 20 + cmp ObjectScreenY ; CPU:$C71A PRG:071A C5 20 bne Main_RetreatIndexY_C74E ; CPU:$C71C PRG:071C D0 30 - inc $9E ; CPU:$C71E PRG:071E E6 9E + inc ObjectWork2 ; CPU:$C71E PRG:071E E6 9E lda #$00 ; CPU:$C720 PRG:0720 A9 00 sta $A0 ; CPU:$C722 PRG:0722 85 A0 sta $A1 ; CPU:$C724 PRG:0724 85 A1 @@ -1809,10 +1809,10 @@ Gameplay_Dispatch_C7A4: Gameplay_ReadRam0486_C7A7: pha ; CPU:$C7A7 PRG:07A7 48 ldy $0486,x ; CPU:$C7A8 PRG:07A8 BC 86 04 - sty $20 ; CPU:$C7AB PRG:07AB 84 20 + sty ObjectScreenY ; CPU:$C7AB PRG:07AB 84 20 jsr Gameplay_ReadRamE2A3_CBEB ; CPU:$C7AD PRG:07AD 20 EB CB ldy $0436,x ; CPU:$C7B0 PRG:07B0 BC 36 04 - sty $1F ; CPU:$C7B3 PRG:07B3 84 1F + sty ObjectScreenX ; CPU:$C7B3 PRG:07B3 84 1F pla ; CPU:$C7B5 PRG:07B5 68 bpl Gameplay_ReadTransferPointer_C7CB ; CPU:$C7B6 PRG:07B6 10 13 inc $03E6,x ; CPU:$C7B8 PRG:07B8 FE E6 03 @@ -1836,7 +1836,7 @@ Gameplay_ReadTransferPointer_C7CB: beq Gameplay_ReadRam0526_C838 ; CPU:$C7CE PRG:07CE F0 68 cpy #$02 ; CPU:$C7D0 PRG:07D0 C0 02 bne Gameplay_ReadRam04D6_C7DE ; CPU:$C7D2 PRG:07D2 D0 0A - inc $A4 ; CPU:$C7D4 PRG:07D4 E6 A4 + inc BonusTimer ; CPU:$C7D4 PRG:07D4 E6 A4 lda #$80 ; CPU:$C7D6 PRG:07D6 A9 80 sta $03E6,x ; CPU:$C7D8 PRG:07D8 9D E6 03 jmp Gameplay_RetreatIndexX_C8A6 ; CPU:$C7DB PRG:07DB 4C A6 C8 @@ -1852,7 +1852,7 @@ Gameplay_ReadRam04D6_C7DE: bne Gameplay_ReadWorkIndex_C7EE ; CPU:$C7E0 PRG:07E0 D0 0C lda $04D6,x ; CPU:$C7E2 PRG:07E2 BD D6 04 ora #$10 ; CPU:$C7E5 PRG:07E5 09 10 - ldy $1F ; CPU:$C7E7 PRG:07E7 A4 1F + ldy ObjectScreenX ; CPU:$C7E7 PRG:07E7 A4 1F sta ($34),y ; CPU:$C7E9 PRG:07E9 91 34 jmp Gameplay_WriteRam03E6_C830 ; CPU:$C7EB PRG:07EB 4C 30 C8 ; Routine: Gameplay_ReadWorkIndex_C7EE @@ -1865,7 +1865,7 @@ Gameplay_ReadRam04D6_C7DE: Gameplay_ReadWorkIndex_C7EE: cpy #$04 ; CPU:$C7EE PRG:07EE C0 04 bne Gameplay_ReadWorkIndex_C800 ; CPU:$C7F0 PRG:07F0 D0 0E - ldy $1F ; CPU:$C7F2 PRG:07F2 A4 1F + ldy ObjectScreenX ; CPU:$C7F2 PRG:07F2 A4 1F lda #$08 ; CPU:$C7F4 PRG:07F4 A9 08 sta ($34),y ; CPU:$C7F6 PRG:07F6 91 34 lda #$28 ; CPU:$C7F8 PRG:07F8 A9 28 @@ -1881,7 +1881,7 @@ Gameplay_ReadWorkIndex_C7EE: Gameplay_ReadWorkIndex_C800: cpy #$05 ; CPU:$C800 PRG:0800 C0 05 bne Gameplay_ReadWorkIndex_C815 ; CPU:$C802 PRG:0802 D0 11 - ldy $1F ; CPU:$C804 PRG:0804 A4 1F + ldy ObjectScreenX ; CPU:$C804 PRG:0804 A4 1F lda #$06 ; CPU:$C806 PRG:0806 A9 06 sta ($34),y ; CPU:$C808 PRG:0808 91 34 lda #$28 ; CPU:$C80A PRG:080A A9 28 @@ -1901,7 +1901,7 @@ Gameplay_ReadWorkIndex_C815: beq Gameplay_IncrementBonusTimer_C828 ; CPU:$C817 PRG:0817 F0 0F cpy #$06 ; CPU:$C819 PRG:0819 C0 06 bne Gameplay_WriteRam03E6_C830 ; CPU:$C81B PRG:081B D0 13 - ldy $1F ; CPU:$C81D PRG:081D A4 1F + ldy ObjectScreenX ; CPU:$C81D PRG:081D A4 1F lda #$00 ; CPU:$C81F PRG:081F A9 00 sta ($34),y ; CPU:$C821 PRG:0821 91 34 jsr Stage_WriteObjectWorkX_D8FC ; CPU:$C823 PRG:0823 20 FC D8 @@ -1961,17 +1961,17 @@ Gameplay_ReadRam0526_C838: lda $0436,x ; CPU:$C856 PRG:0856 BD 36 04 clc ; CPU:$C859 PRG:0859 18 adc $CA16,y ; CPU:$C85A PRG:085A 79 16 CA - sta $1F ; CPU:$C85D PRG:085D 85 1F + sta ObjectScreenX ; CPU:$C85D PRG:085D 85 1F lda $0486,x ; CPU:$C85F PRG:085F BD 86 04 clc ; CPU:$C862 PRG:0862 18 - adc $CA11,y ; CPU:$C863 PRG:0863 79 11 CA - sta $20 ; CPU:$C866 PRG:0866 85 20 + adc GameplayObjectClassTable,y ; CPU:$C863 PRG:0863 79 11 CA + sta ObjectScreenY ; CPU:$C866 PRG:0866 85 20 ldy #$4F ; CPU:$C868 PRG:0868 A0 4F jsr Gameplay_ReadRam03E6_CBE5 ; CPU:$C86A PRG:086A 20 E5 CB bne Gameplay_RetreatIndexX_C8A6 ; CPU:$C86D PRG:086D D0 37 - lda $1F ; CPU:$C86F PRG:086F A5 1F + lda ObjectScreenX ; CPU:$C86F PRG:086F A5 1F sta $0436,y ; CPU:$C871 PRG:0871 99 36 04 - lda $20 ; CPU:$C874 PRG:0874 A5 20 + lda ObjectScreenY ; CPU:$C874 PRG:0874 A5 20 sta $0486,y ; CPU:$C876 PRG:0876 99 86 04 lda #$01 ; CPU:$C879 PRG:0879 A9 01 sta $03E6,y ; CPU:$C87B PRG:087B 99 E6 03 @@ -1981,7 +1981,7 @@ Gameplay_ReadRam0526_C838: lda $36 ; CPU:$C885 PRG:0885 A5 36 clc ; CPU:$C887 PRG:0887 18 adc #$10 ; CPU:$C888 PRG:0888 69 10 - cmp $73 ; CPU:$C88A PRG:088A C5 73 + cmp ObjectXLimit ; CPU:$C88A PRG:088A C5 73 bcc Gameplay_WriteRam04D6_C89E ; CPU:$C88C PRG:088C 90 10 lda #$00 ; CPU:$C88E PRG:088E A9 00 sta $03E6,y ; CPU:$C890 PRG:0890 99 E6 03 @@ -2058,9 +2058,9 @@ Gameplay_ReadRam0576_C8AF: clc ; CPU:$C8C9 PRG:08C9 18 adc #$01 ; CPU:$C8CA PRG:08CA 69 01 sta $05D0,y ; CPU:$C8CC PRG:08CC 99 D0 05 - lda $1F ; CPU:$C8CF PRG:08CF A5 1F + lda ObjectScreenX ; CPU:$C8CF PRG:08CF A5 1F sta $0580,y ; CPU:$C8D1 PRG:08D1 99 80 05 - lda $20 ; CPU:$C8D4 PRG:08D4 A5 20 + lda ObjectScreenY ; CPU:$C8D4 PRG:08D4 A5 20 sta $0594,y ; CPU:$C8D6 PRG:08D6 99 94 05 lda #$00 ; CPU:$C8D9 PRG:08D9 A9 00 sta $05DA,y ; CPU:$C8DB PRG:08DB 99 DA 05 @@ -2161,9 +2161,9 @@ Gameplay_ReadRam03A0_C93B: sta $34 ; CPU:$C946 PRG:0946 85 34 lda $E2B0,y ; CPU:$C948 PRG:0948 B9 B0 E2 sta $35 ; CPU:$C94B PRG:094B 85 35 - sty $20 ; CPU:$C94D PRG:094D 84 20 + sty ObjectScreenY ; CPU:$C94D PRG:094D 84 20 ldy $03AA,x ; CPU:$C94F PRG:094F BC AA 03 - sty $1F ; CPU:$C952 PRG:0952 84 1F + sty ObjectScreenX ; CPU:$C952 PRG:0952 84 1F lda #$00 ; CPU:$C954 PRG:0954 A9 00 jsr Gameplay_WriteZp2F_C9B6 ; CPU:$C956 PRG:0956 20 B6 C9 jsr Gameplay_WriteDisplayMode_CBF6 ; CPU:$C959 PRG:0959 20 F6 CB @@ -2207,9 +2207,9 @@ Gameplay_ReadRam03A0_C96C: sta $34 ; CPU:$C977 PRG:0977 85 34 lda $E2B0,y ; CPU:$C979 PRG:0979 B9 B0 E2 sta $35 ; CPU:$C97C PRG:097C 85 35 - sty $20 ; CPU:$C97E PRG:097E 84 20 + sty ObjectScreenY ; CPU:$C97E PRG:097E 84 20 ldy $03AA,x ; CPU:$C980 PRG:0980 BC AA 03 - sty $1F ; CPU:$C983 PRG:0983 84 1F + sty ObjectScreenX ; CPU:$C983 PRG:0983 84 1F lda ($34),y ; CPU:$C985 PRG:0985 B1 34 cmp #$03 ; CPU:$C987 PRG:0987 C9 03 bne Gameplay_ReadFlamePass_C999 ; CPU:$C989 PRG:0989 D0 0E @@ -2276,7 +2276,7 @@ Gameplay_WriteZp2F_C9B6: stx $2F ; CPU:$C9B6 PRG:09B6 86 2F sty $30 ; CPU:$C9B8 PRG:09B8 84 30 tay ; CPU:$C9BA PRG:09BA A8 - lda $C9DE,y ; CPU:$C9BB PRG:09BB B9 DE C9 + lda GameplayDirectionDeltaTable,y ; CPU:$C9BB PRG:09BB B9 DE C9 sta $2E ; CPU:$C9BE PRG:09BE 85 2E lda #$01 ; CPU:$C9C0 PRG:09C0 A9 01 jsr Gameplay_TestZp2E_C9E3 ; CPU:$C9C2 PRG:09C2 20 E3 C9 @@ -2310,11 +2310,11 @@ Gameplay_TestZp2E_C9E3: ldy #$4F ; CPU:$C9EA PRG:09EA A0 4F jsr Gameplay_ReadRam03E6_CBE5 ; CPU:$C9EC PRG:09EC 20 E5 CB bmi Gameplay_ReturnToCaller_CA10 ; CPU:$C9EF PRG:09EF 30 1F - lda $20 ; CPU:$C9F1 PRG:09F1 A5 20 + lda ObjectScreenY ; CPU:$C9F1 PRG:09F1 A5 20 clc ; CPU:$C9F3 PRG:09F3 18 - adc $CA11,x ; CPU:$C9F4 PRG:09F4 7D 11 CA + adc GameplayObjectClassTable,x ; CPU:$C9F4 PRG:09F4 7D 11 CA sta $0486,y ; CPU:$C9F7 PRG:09F7 99 86 04 - lda $1F ; CPU:$C9FA PRG:09FA A5 1F + lda ObjectScreenX ; CPU:$C9FA PRG:09FA A5 1F clc ; CPU:$C9FC PRG:09FC 18 adc $CA16,x ; CPU:$C9FD PRG:09FD 7D 16 CA sta $0436,y ; CPU:$CA00 PRG:0A00 99 36 04 @@ -2356,9 +2356,9 @@ Gameplay_ReadRam03A0_CA1D: lda $03A0,x ; CPU:$CA1D PRG:0A1D BD A0 03 beq Gameplay_RetreatIndexX_CA43 ; CPU:$CA20 PRG:0A20 F0 21 lda $03AA,x ; CPU:$CA22 PRG:0A22 BD AA 03 - sta $1F ; CPU:$CA25 PRG:0A25 85 1F + sta ObjectScreenX ; CPU:$CA25 PRG:0A25 85 1F lda $03B4,x ; CPU:$CA27 PRG:0A27 BD B4 03 - sta $20 ; CPU:$CA2A PRG:0A2A 85 20 + sta ObjectScreenY ; CPU:$CA2A PRG:0A2A 85 20 lda $03D2,x ; CPU:$CA2C PRG:0A2C BD D2 03 and #$0F ; CPU:$CA2F PRG:0A2F 29 0F bne Gameplay_RetreatIndexX_CA43 ; CPU:$CA31 PRG:0A31 D0 10 @@ -2369,7 +2369,7 @@ Gameplay_ReadRam03A0_CA1D: lsr a ; CPU:$CA39 PRG:0A39 4A and #$03 ; CPU:$CA3A PRG:0A3A 29 03 tay ; CPU:$CA3C PRG:0A3C A8 - lda $CA47,y ; CPU:$CA3D PRG:0A3D B9 47 CA + lda GameplayObjectAttributeTable,y ; CPU:$CA3D PRG:0A3D B9 47 CA jsr Stage_WriteObjectWorkX_D8FC ; CPU:$CA40 PRG:0A40 20 FC D8 ; Routine: Gameplay_RetreatIndexX_CA43 ; Global: Reachable code entry at CPU $CA43 traced from the interrupt-root control-flow graph. @@ -2406,7 +2406,7 @@ Gameplay_WriteTransferPointer_CA4B: adc $58 ; CPU:$CA5F PRG:0A5F 65 58 clc ; CPU:$CA61 PRG:0A61 18 adc $58 ; CPU:$CA62 PRG:0A62 65 58 - sta $1F ; CPU:$CA64 PRG:0A64 85 1F + sta ObjectScreenX ; CPU:$CA64 PRG:0A64 85 1F ; Routine: Gameplay_WriteTransferPointer_CA66 ; Global: Reachable code entry at CPU $CA66 traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -2418,7 +2418,7 @@ Gameplay_WriteTransferPointer_CA66: jsr Gameplay_WriteObjectWorkX_CACF ; CPU:$CA66 PRG:0A66 20 CF CA lda #$02 ; CPU:$CA69 PRG:0A69 A9 02 sta ($34),y ; CPU:$CA6B PRG:0A6B 91 34 - dec $1F ; CPU:$CA6D PRG:0A6D C6 1F + dec ObjectScreenX ; CPU:$CA6D PRG:0A6D C6 1F bne Gameplay_WriteTransferPointer_CA66 ; CPU:$CA6F PRG:0A6F D0 F5 rts ; CPU:$CA71 PRG:0A71 60 ; Routine: Gameplay_WriteTransferPointer_CA72 @@ -2557,7 +2557,7 @@ Gameplay_ReturnToCaller_CB05: Gameplay_WriteWorkValue_CB06: jsr DisableRendering ; CPU:$CB06 PRG:0B06 20 57 C2 lda #$00 ; CPU:$CB09 PRG:0B09 A9 00 - sta $20 ; CPU:$CB0B PRG:0B0B 85 20 + sta ObjectScreenY ; CPU:$CB0B PRG:0B0B 85 20 lda #$00 ; CPU:$CB0D PRG:0B0D A9 00 sta $26 ; CPU:$CB0F PRG:0B0F 85 26 lda #$02 ; CPU:$CB11 PRG:0B11 A9 02 @@ -2572,7 +2572,7 @@ Gameplay_WriteWorkValue_CB06: ; Confidence: High for reachability and encoding; semantic role provisional. Gameplay_WriteWorkIndex_CB17: lda #$00 ; CPU:$CB17 PRG:0B17 A9 00 - sta $1F ; CPU:$CB19 PRG:0B19 85 1F + sta ObjectScreenX ; CPU:$CB19 PRG:0B19 85 1F ; Routine: Gameplay_ReadZp94_CB1B ; Global: Reachable code entry at CPU $CB1B traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -2627,12 +2627,12 @@ Gameplay_IncrementZp27_CB30: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Gameplay_IncrementWorkIndex_CB38: - inc $1F ; CPU:$CB38 PRG:0B38 E6 1F - lda $1F ; CPU:$CB3A PRG:0B3A A5 1F + inc ObjectScreenX ; CPU:$CB38 PRG:0B38 E6 1F + lda ObjectScreenX ; CPU:$CB3A PRG:0B3A A5 1F and #$20 ; CPU:$CB3C PRG:0B3C 29 20 beq Gameplay_ReadZp94_CB1B ; CPU:$CB3E PRG:0B3E F0 DB - inc $20 ; CPU:$CB40 PRG:0B40 E6 20 - lda $20 ; CPU:$CB42 PRG:0B42 A5 20 + inc ObjectScreenY ; CPU:$CB40 PRG:0B40 E6 20 + lda ObjectScreenY ; CPU:$CB42 PRG:0B42 A5 20 cmp #$0D ; CPU:$CB44 PRG:0B44 C9 0D bne Gameplay_WriteWorkIndex_CB17 ; CPU:$CB46 PRG:0B46 D0 CF jsr Menu_HandleControl_DDC7 ; CPU:$CB48 PRG:0B48 20 C7 DD @@ -2850,13 +2850,13 @@ Frame_ReadZp7D_CC36: bne Frame_ReadZp5C_CC4C ; CPU:$CC38 PRG:0C38 D0 12 lda $7A ; CPU:$CC3A PRG:0C3A A5 7A beq Frame_ReadZp5C_CC4C ; CPU:$CC3C PRG:0C3C F0 0E - lda $33 ; CPU:$CC3E PRG:0C3E A5 33 + lda FrameCounter ; CPU:$CC3E PRG:0C3E A5 33 and #$07 ; CPU:$CC40 PRG:0C40 29 07 bne Frame_ReadZp5C_CC4C ; CPU:$CC42 PRG:0C42 D0 08 dec $7A ; CPU:$CC44 PRG:0C44 C6 7A bne Frame_ReadZp5C_CC4C ; CPU:$CC46 PRG:0C46 D0 04 lda #$03 ; CPU:$CC48 PRG:0C48 A9 03 - sta $B5 ; CPU:$CC4A PRG:0C4A 85 B5 + sta FrameDelay ; CPU:$CC4A PRG:0C4A 85 B5 ; Routine: Frame_ReadZp5C_CC4C ; Global: Reachable code entry at CPU $CC4C traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -2865,17 +2865,17 @@ Frame_ReadZp7D_CC36: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Frame_ReadZp5C_CC4C: - lda $5C ; CPU:$CC4C PRG:0C4C A5 5C + lda ObjectStateFlags ; CPU:$CC4C PRG:0C4C A5 5C beq Frame_ReadObjectX_CC63 ; CPU:$CC4E PRG:0C4E F0 13 - lda $33 ; CPU:$CC50 PRG:0C50 A5 33 + lda FrameCounter ; CPU:$CC50 PRG:0C50 A5 33 and #$0F ; CPU:$CC52 PRG:0C52 29 0F bne Frame_ReturnToCaller_CC62 ; CPU:$CC54 PRG:0C54 D0 0C - inc $2C ; CPU:$CC56 PRG:0C56 E6 2C - lda $2C ; CPU:$CC58 PRG:0C58 A5 2C + inc ObjectSpawnHeight ; CPU:$CC56 PRG:0C56 E6 2C + lda ObjectSpawnHeight ; CPU:$CC58 PRG:0C58 A5 2C cmp #$14 ; CPU:$CC5A PRG:0C5A C9 14 bne Frame_ReturnToCaller_CC62 ; CPU:$CC5C PRG:0C5C D0 04 lda #$01 ; CPU:$CC5E PRG:0C5E A9 01 - sta $5D ; CPU:$CC60 PRG:0C60 85 5D + sta ObjectStateTimer ; CPU:$CC60 PRG:0C60 85 5D ; Routine: Frame_ReturnToCaller_CC62 ; Global: Reachable code entry at CPU $CC62 traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -2893,20 +2893,20 @@ Frame_ReturnToCaller_CC62: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Frame_ReadObjectX_CC63: - lda $29 ; CPU:$CC63 PRG:0C63 A5 29 + lda ObjectSpawnY ; CPU:$CC63 PRG:0C63 A5 29 cmp #$08 ; CPU:$CC65 PRG:0C65 C9 08 bne Frame_ReadObjectFlags_CCA4 ; CPU:$CC67 PRG:0C67 D0 3B - lda $2B ; CPU:$CC69 PRG:0C69 A5 2B + lda ObjectSpawnWidth ; CPU:$CC69 PRG:0C69 A5 2B cmp #$08 ; CPU:$CC6B PRG:0C6B C9 08 bne Frame_ReadObjectFlags_CCA4 ; CPU:$CC6D PRG:0C6D D0 35 - ldy $2A ; CPU:$CC6F PRG:0C6F A4 2A - sty $20 ; CPU:$CC71 PRG:0C71 84 20 + ldy ObjectSpawnX ; CPU:$CC6F PRG:0C6F A4 2A + sty ObjectScreenY ; CPU:$CC71 PRG:0C71 84 20 lda $E2A3,y ; CPU:$CC73 PRG:0C73 B9 A3 E2 sta $34 ; CPU:$CC76 PRG:0C76 85 34 lda $E2B0,y ; CPU:$CC78 PRG:0C78 B9 B0 E2 sta $35 ; CPU:$CC7B PRG:0C7B 85 35 - ldy $28 ; CPU:$CC7D PRG:0C7D A4 28 - sty $1F ; CPU:$CC7F PRG:0C7F 84 1F + ldy ObjectSpawnParam ; CPU:$CC7D PRG:0C7D A4 28 + sty ObjectScreenX ; CPU:$CC7F PRG:0C7F 84 1F lda ($34),y ; CPU:$CC81 PRG:0C81 B1 34 cmp #$08 ; CPU:$CC83 PRG:0C83 C9 08 beq Frame_IncrementBombCapacity_CC95 ; CPU:$CC85 PRG:0C85 F0 0E @@ -2924,13 +2924,13 @@ Frame_ReadObjectX_CC63: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Frame_IncrementBombCapacity_CC95: - inc $9F ; CPU:$CC95 PRG:0C95 E6 9F + inc ObjectWork3 ; CPU:$CC95 PRG:0C95 E6 9F lda #$00 ; CPU:$CC97 PRG:0C97 A9 00 sta $A6 ; CPU:$CC99 PRG:0C99 85 A6 - lda $9C ; CPU:$CC9B PRG:0C9B A5 9C + lda ObjectWork0 ; CPU:$CC9B PRG:0C9B A5 9C bne Frame_ReadObjectFlags_CCA4 ; CPU:$CC9D PRG:0C9D D0 05 lda #$01 ; CPU:$CC9F PRG:0C9F A9 01 - sta $5E ; CPU:$CCA1 PRG:0CA1 85 5E + sta ObjectStateExtra ; CPU:$CCA1 PRG:0CA1 85 5E ; Routine: Frame_ReturnToCaller_CCA3 ; Global: Reachable code entry at CPU $CCA3 traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -2950,7 +2950,7 @@ Frame_ReturnToCaller_CCA3: Frame_ReadObjectFlags_CCA4: lda $75 ; CPU:$CCA4 PRG:0CA4 A5 75 bne Frame_WriteInvincibilityTimer_CCAE ; CPU:$CCA6 PRG:0CA6 D0 06 - lda $33 ; CPU:$CCA8 PRG:0CA8 A5 33 + lda FrameCounter ; CPU:$CCA8 PRG:0CA8 A5 33 and #$03 ; CPU:$CCAA PRG:0CAA 29 03 beq Frame_ReturnToCaller_CCA3 ; CPU:$CCAC PRG:0CAC F0 F5 ; Routine: Frame_WriteInvincibilityTimer_CCAE @@ -3050,12 +3050,12 @@ Frame_ReturnToCaller_CCEE: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Frame_ReadObjectState_CCEF: - ldy $2A ; CPU:$CCEF PRG:0CEF A4 2A + ldy ObjectSpawnX ; CPU:$CCEF PRG:0CEF A4 2A lda $E2A3,y ; CPU:$CCF1 PRG:0CF1 B9 A3 E2 sta $34 ; CPU:$CCF4 PRG:0CF4 85 34 lda $E2B0,y ; CPU:$CCF6 PRG:0CF6 B9 B0 E2 sta $35 ; CPU:$CCF9 PRG:0CF9 85 35 - ldy $28 ; CPU:$CCFB PRG:0CFB A4 28 + ldy ObjectSpawnParam ; CPU:$CCFB PRG:0CFB A4 28 lda ($34),y ; CPU:$CCFD PRG:0CFD B1 34 bne Frame_ReturnToCaller_CCEE ; CPU:$CCFF PRG:0CFF D0 ED jsr Frame_ReadObjectX_CE10 ; CPU:$CD01 PRG:0D01 20 10 CE @@ -3084,9 +3084,9 @@ Frame_ReadRam03A0_CD09: Frame_WriteTransferPointer_CD12: lda #$03 ; CPU:$CD12 PRG:0D12 A9 03 sta ($34),y ; CPU:$CD14 PRG:0D14 91 34 - lda $28 ; CPU:$CD16 PRG:0D16 A5 28 + lda ObjectSpawnParam ; CPU:$CD16 PRG:0D16 A5 28 sta $03AA,x ; CPU:$CD18 PRG:0D18 9D AA 03 - lda $2A ; CPU:$CD1B PRG:0D1B A5 2A + lda ObjectSpawnX ; CPU:$CD1B PRG:0D1B A5 2A sta $03B4,x ; CPU:$CD1D PRG:0D1D 9D B4 03 lda #$00 ; CPU:$CD20 PRG:0D20 A9 00 sta $03D2,x ; CPU:$CD22 PRG:0D22 9D D2 03 @@ -3097,7 +3097,7 @@ Frame_WriteTransferPointer_CD12: lda #$01 ; CPU:$CD2F PRG:0D2F A9 01 sta $03A0,x ; CPU:$CD31 PRG:0D31 9D A0 03 lda #$03 ; CPU:$CD34 PRG:0D34 A9 03 - sta $DF ; CPU:$CD36 PRG:0D36 85 DF + sta SoundCommandState ; CPU:$CD36 PRG:0D36 85 DF rts ; CPU:$CD38 PRG:0D38 60 ; Routine: Frame_ReadObjectY_CD39 ; Global: Reachable code entry at CPU $CD39 traced from the interrupt-root control-flow graph. @@ -3107,10 +3107,10 @@ Frame_WriteTransferPointer_CD12: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Frame_ReadObjectY_CD39: - lda $2B ; CPU:$CD39 PRG:0D39 A5 2B + lda ObjectSpawnWidth ; CPU:$CD39 PRG:0D39 A5 2B cmp #$08 ; CPU:$CD3B PRG:0D3B C9 08 bcs Frame_ReadObjectState_CD44 ; CPU:$CD3D PRG:0D3D B0 05 - inc $2B ; CPU:$CD3F PRG:0D3F E6 2B + inc ObjectSpawnWidth ; CPU:$CD3F PRG:0D3F E6 2B jmp Frame_HandleControl_CD69 ; CPU:$CD41 PRG:0D41 4C 69 CD ; Routine: Frame_ReadObjectState_CD44 ; Global: Reachable code entry at CPU $CD44 traced from the interrupt-root control-flow graph. @@ -3120,23 +3120,23 @@ Frame_ReadObjectY_CD39: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Frame_ReadObjectState_CD44: - ldy $2A ; CPU:$CD44 PRG:0D44 A4 2A + ldy ObjectSpawnX ; CPU:$CD44 PRG:0D44 A4 2A iny ; CPU:$CD46 PRG:0D46 C8 lda $E2A3,y ; CPU:$CD47 PRG:0D47 B9 A3 E2 sta $34 ; CPU:$CD4A PRG:0D4A 85 34 lda $E2B0,y ; CPU:$CD4C PRG:0D4C B9 B0 E2 sta $35 ; CPU:$CD4F PRG:0D4F 85 35 - ldy $28 ; CPU:$CD51 PRG:0D51 A4 28 + ldy ObjectSpawnParam ; CPU:$CD51 PRG:0D51 A4 28 jsr Object_ReadTransferPointer_CF60 ; CPU:$CD53 PRG:0D53 20 60 CF bne Frame_HandleControl_CD69 ; CPU:$CD56 PRG:0D56 D0 11 jsr Frame_ReadObjectX_CE10 ; CPU:$CD58 PRG:0D58 20 10 CE - inc $2B ; CPU:$CD5B PRG:0D5B E6 2B - lda $2B ; CPU:$CD5D PRG:0D5D A5 2B + inc ObjectSpawnWidth ; CPU:$CD5B PRG:0D5B E6 2B + lda ObjectSpawnWidth ; CPU:$CD5D PRG:0D5D A5 2B cmp #$10 ; CPU:$CD5F PRG:0D5F C9 10 bne Frame_HandleControl_CD69 ; CPU:$CD61 PRG:0D61 D0 06 lda #$00 ; CPU:$CD63 PRG:0D63 A9 00 - sta $2B ; CPU:$CD65 PRG:0D65 85 2B - inc $2A ; CPU:$CD67 PRG:0D67 E6 2A + sta ObjectSpawnWidth ; CPU:$CD65 PRG:0D65 85 2B + inc ObjectSpawnX ; CPU:$CD67 PRG:0D67 E6 2A ; Routine: Frame_HandleControl_CD69 ; Global: Reachable code entry at CPU $CD69 traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -3156,10 +3156,10 @@ Frame_HandleControl_CD69: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Frame_ReadObjectY_CD70: - lda $2B ; CPU:$CD70 PRG:0D70 A5 2B + lda ObjectSpawnWidth ; CPU:$CD70 PRG:0D70 A5 2B cmp #$09 ; CPU:$CD72 PRG:0D72 C9 09 bcc Frame_ReadObjectState_CD7B ; CPU:$CD74 PRG:0D74 90 05 - dec $2B ; CPU:$CD76 PRG:0D76 C6 2B + dec ObjectSpawnWidth ; CPU:$CD76 PRG:0D76 C6 2B jmp Frame_HandleControl_CD9C ; CPU:$CD78 PRG:0D78 4C 9C CD ; Routine: Frame_ReadObjectState_CD7B ; Global: Reachable code entry at CPU $CD7B traced from the interrupt-root control-flow graph. @@ -3169,21 +3169,21 @@ Frame_ReadObjectY_CD70: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Frame_ReadObjectState_CD7B: - ldy $2A ; CPU:$CD7B PRG:0D7B A4 2A + ldy ObjectSpawnX ; CPU:$CD7B PRG:0D7B A4 2A dey ; CPU:$CD7D PRG:0D7D 88 lda $E2A3,y ; CPU:$CD7E PRG:0D7E B9 A3 E2 sta $34 ; CPU:$CD81 PRG:0D81 85 34 lda $E2B0,y ; CPU:$CD83 PRG:0D83 B9 B0 E2 sta $35 ; CPU:$CD86 PRG:0D86 85 35 - ldy $28 ; CPU:$CD88 PRG:0D88 A4 28 + ldy ObjectSpawnParam ; CPU:$CD88 PRG:0D88 A4 28 jsr Object_ReadTransferPointer_CF60 ; CPU:$CD8A PRG:0D8A 20 60 CF bne Frame_HandleControl_CD9C ; CPU:$CD8D PRG:0D8D D0 0D jsr Frame_ReadObjectX_CE10 ; CPU:$CD8F PRG:0D8F 20 10 CE - dec $2B ; CPU:$CD92 PRG:0D92 C6 2B + dec ObjectSpawnWidth ; CPU:$CD92 PRG:0D92 C6 2B bpl Frame_HandleControl_CD9C ; CPU:$CD94 PRG:0D94 10 06 lda #$0F ; CPU:$CD96 PRG:0D96 A9 0F - sta $2B ; CPU:$CD98 PRG:0D98 85 2B - dec $2A ; CPU:$CD9A PRG:0D9A C6 2A + sta ObjectSpawnWidth ; CPU:$CD98 PRG:0D98 85 2B + dec ObjectSpawnX ; CPU:$CD9A PRG:0D9A C6 2A ; Routine: Frame_HandleControl_CD9C ; Global: Reachable code entry at CPU $CD9C traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -3203,10 +3203,10 @@ Frame_HandleControl_CD9C: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Frame_ReadObjectX_CDA3: - lda $29 ; CPU:$CDA3 PRG:0DA3 A5 29 + lda ObjectSpawnY ; CPU:$CDA3 PRG:0DA3 A5 29 cmp #$09 ; CPU:$CDA5 PRG:0DA5 C9 09 bcc Frame_ReadObjectState_CDAE ; CPU:$CDA7 PRG:0DA7 90 05 - dec $29 ; CPU:$CDA9 PRG:0DA9 C6 29 + dec ObjectSpawnY ; CPU:$CDA9 PRG:0DA9 C6 29 jmp Frame_HandleControl_CDCF ; CPU:$CDAB PRG:0DAB 4C CF CD ; Routine: Frame_ReadObjectState_CDAE ; Global: Reachable code entry at CPU $CDAE traced from the interrupt-root control-flow graph. @@ -3216,21 +3216,21 @@ Frame_ReadObjectX_CDA3: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Frame_ReadObjectState_CDAE: - ldy $2A ; CPU:$CDAE PRG:0DAE A4 2A + ldy ObjectSpawnX ; CPU:$CDAE PRG:0DAE A4 2A lda $E2A3,y ; CPU:$CDB0 PRG:0DB0 B9 A3 E2 sta $34 ; CPU:$CDB3 PRG:0DB3 85 34 lda $E2B0,y ; CPU:$CDB5 PRG:0DB5 B9 B0 E2 sta $35 ; CPU:$CDB8 PRG:0DB8 85 35 - ldy $28 ; CPU:$CDBA PRG:0DBA A4 28 + ldy ObjectSpawnParam ; CPU:$CDBA PRG:0DBA A4 28 dey ; CPU:$CDBC PRG:0DBC 88 jsr Object_ReadTransferPointer_CF60 ; CPU:$CDBD PRG:0DBD 20 60 CF bne Frame_HandleControl_CDCF ; CPU:$CDC0 PRG:0DC0 D0 0D jsr Frame_ReadObjectY_CE1F ; CPU:$CDC2 PRG:0DC2 20 1F CE - dec $29 ; CPU:$CDC5 PRG:0DC5 C6 29 + dec ObjectSpawnY ; CPU:$CDC5 PRG:0DC5 C6 29 bpl Frame_HandleControl_CDCF ; CPU:$CDC7 PRG:0DC7 10 06 lda #$0F ; CPU:$CDC9 PRG:0DC9 A9 0F - sta $29 ; CPU:$CDCB PRG:0DCB 85 29 - dec $28 ; CPU:$CDCD PRG:0DCD C6 28 + sta ObjectSpawnY ; CPU:$CDCB PRG:0DCB 85 29 + dec ObjectSpawnParam ; CPU:$CDCD PRG:0DCD C6 28 ; Routine: Frame_HandleControl_CDCF ; Global: Reachable code entry at CPU $CDCF traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -3249,10 +3249,10 @@ Frame_HandleControl_CDCF: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Frame_ReadObjectX_CDD4: - lda $29 ; CPU:$CDD4 PRG:0DD4 A5 29 + lda ObjectSpawnY ; CPU:$CDD4 PRG:0DD4 A5 29 cmp #$08 ; CPU:$CDD6 PRG:0DD6 C9 08 bcs Frame_ReadObjectState_CDDF ; CPU:$CDD8 PRG:0DD8 B0 05 - inc $29 ; CPU:$CDDA PRG:0DDA E6 29 + inc ObjectSpawnY ; CPU:$CDDA PRG:0DDA E6 29 jmp Frame_HandleControl_CE04 ; CPU:$CDDC PRG:0DDC 4C 04 CE ; Routine: Frame_ReadObjectState_CDDF ; Global: Reachable code entry at CPU $CDDF traced from the interrupt-root control-flow graph. @@ -3262,23 +3262,23 @@ Frame_ReadObjectX_CDD4: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Frame_ReadObjectState_CDDF: - ldy $2A ; CPU:$CDDF PRG:0DDF A4 2A + ldy ObjectSpawnX ; CPU:$CDDF PRG:0DDF A4 2A lda $E2A3,y ; CPU:$CDE1 PRG:0DE1 B9 A3 E2 sta $34 ; CPU:$CDE4 PRG:0DE4 85 34 lda $E2B0,y ; CPU:$CDE6 PRG:0DE6 B9 B0 E2 sta $35 ; CPU:$CDE9 PRG:0DE9 85 35 - ldy $28 ; CPU:$CDEB PRG:0DEB A4 28 + ldy ObjectSpawnParam ; CPU:$CDEB PRG:0DEB A4 28 iny ; CPU:$CDED PRG:0DED C8 jsr Object_ReadTransferPointer_CF60 ; CPU:$CDEE PRG:0DEE 20 60 CF bne Frame_HandleControl_CE04 ; CPU:$CDF1 PRG:0DF1 D0 11 jsr Frame_ReadObjectY_CE1F ; CPU:$CDF3 PRG:0DF3 20 1F CE - inc $29 ; CPU:$CDF6 PRG:0DF6 E6 29 - lda $29 ; CPU:$CDF8 PRG:0DF8 A5 29 + inc ObjectSpawnY ; CPU:$CDF6 PRG:0DF6 E6 29 + lda ObjectSpawnY ; CPU:$CDF8 PRG:0DF8 A5 29 cmp #$10 ; CPU:$CDFA PRG:0DFA C9 10 bne Frame_HandleControl_CE04 ; CPU:$CDFC PRG:0DFC D0 06 lda #$00 ; CPU:$CDFE PRG:0DFE A9 00 - sta $29 ; CPU:$CE00 PRG:0E00 85 29 - inc $28 ; CPU:$CE02 PRG:0E02 E6 28 + sta ObjectSpawnY ; CPU:$CE00 PRG:0E00 85 29 + inc ObjectSpawnParam ; CPU:$CE02 PRG:0E02 E6 28 ; Routine: Frame_HandleControl_CE04 ; Global: Reachable code entry at CPU $CE04 traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -3312,11 +3312,11 @@ FrameSingleByteConstant: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Frame_ReadObjectX_CE10: - lda $29 ; CPU:$CE10 PRG:0E10 A5 29 + lda ObjectSpawnY ; CPU:$CE10 PRG:0E10 A5 29 cmp #$08 ; CPU:$CE12 PRG:0E12 C9 08 bcc Frame_IncrementObjectX_CE1B ; CPU:$CE14 PRG:0E14 90 05 beq Frame_ReturnToCaller_CE1E ; CPU:$CE16 PRG:0E16 F0 06 - dec $29 ; CPU:$CE18 PRG:0E18 C6 29 + dec ObjectSpawnY ; CPU:$CE18 PRG:0E18 C6 29 rts ; CPU:$CE1A PRG:0E1A 60 ; Routine: Frame_IncrementObjectX_CE1B ; Global: Reachable code entry at CPU $CE1B traced from the interrupt-root control-flow graph. @@ -3326,7 +3326,7 @@ Frame_ReadObjectX_CE10: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Frame_IncrementObjectX_CE1B: - inc $29 ; CPU:$CE1B PRG:0E1B E6 29 + inc ObjectSpawnY ; CPU:$CE1B PRG:0E1B E6 29 rts ; CPU:$CE1D PRG:0E1D 60 ; Routine: Frame_ReturnToCaller_CE1E ; Global: Reachable code entry at CPU $CE1E traced from the interrupt-root control-flow graph. @@ -3345,11 +3345,11 @@ Frame_ReturnToCaller_CE1E: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Frame_ReadObjectY_CE1F: - lda $2B ; CPU:$CE1F PRG:0E1F A5 2B + lda ObjectSpawnWidth ; CPU:$CE1F PRG:0E1F A5 2B cmp #$08 ; CPU:$CE21 PRG:0E21 C9 08 bcc Frame_IncrementObjectY_CE2A ; CPU:$CE23 PRG:0E23 90 05 beq Frame_ReturnToCaller_CE2D ; CPU:$CE25 PRG:0E25 F0 06 - dec $2B ; CPU:$CE27 PRG:0E27 C6 2B + dec ObjectSpawnWidth ; CPU:$CE27 PRG:0E27 C6 2B rts ; CPU:$CE29 PRG:0E29 60 ; Routine: Frame_IncrementObjectY_CE2A ; Global: Reachable code entry at CPU $CE2A traced from the interrupt-root control-flow graph. @@ -3359,7 +3359,7 @@ Frame_ReadObjectY_CE1F: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Frame_IncrementObjectY_CE2A: - inc $2B ; CPU:$CE2A PRG:0E2A E6 2B + inc ObjectSpawnWidth ; CPU:$CE2A PRG:0E2A E6 2B rts ; CPU:$CE2C PRG:0E2C 60 ; Routine: Frame_ReturnToCaller_CE2D ; Global: Reachable code entry at CPU $CE2D traced from the interrupt-root control-flow graph. @@ -3379,17 +3379,17 @@ Frame_ReturnToCaller_CE2D: ; Confidence: High for reachability and encoding; semantic role provisional. Frame_ReadZp33_CE2E: pha ; CPU:$CE2E PRG:0E2E 48 - lda $33 ; CPU:$CE2F PRG:0E2F A5 33 + lda FrameCounter ; CPU:$CE2F PRG:0E2F A5 33 and #$03 ; CPU:$CE31 PRG:0E31 29 03 cmp #$02 ; CPU:$CE33 PRG:0E33 C9 02 bne Frame_RestoreAccumulator_CE59 ; CPU:$CE35 PRG:0E35 D0 22 - lda $33 ; CPU:$CE37 PRG:0E37 A5 33 + lda FrameCounter ; CPU:$CE37 PRG:0E37 A5 33 pla ; CPU:$CE39 PRG:0E39 68 inc $A6 ; CPU:$CE3A PRG:0E3A E6 A6 - inc $2C ; CPU:$CE3C PRG:0E3C E6 2C - cmp $2C ; CPU:$CE3E PRG:0E3E C5 2C + inc ObjectSpawnHeight ; CPU:$CE3C PRG:0E3C E6 2C + cmp ObjectSpawnHeight ; CPU:$CE3E PRG:0E3E C5 2C bcc Frame_TestObjectIndex_CE45 ; CPU:$CE40 PRG:0E40 90 03 - sta $2C ; CPU:$CE42 PRG:0E42 85 2C + sta ObjectSpawnHeight ; CPU:$CE42 PRG:0E42 85 2C rts ; CPU:$CE44 PRG:0E44 60 ; Routine: Frame_TestObjectIndex_CE45 ; Global: Reachable code entry at CPU $CE45 traced from the interrupt-root control-flow graph. @@ -3399,7 +3399,7 @@ Frame_ReadZp33_CE2E: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Frame_TestObjectIndex_CE45: - cpy $2C ; CPU:$CE45 PRG:0E45 C4 2C + cpy ObjectSpawnHeight ; CPU:$CE45 PRG:0E45 C4 2C bcc Frame_WriteObjectIndex_CE4A ; CPU:$CE47 PRG:0E47 90 01 rts ; CPU:$CE49 PRG:0E49 60 ; Routine: Frame_WriteObjectIndex_CE4A @@ -3410,7 +3410,7 @@ Frame_TestObjectIndex_CE45: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Frame_WriteObjectIndex_CE4A: - sta $2C ; CPU:$CE4A PRG:0E4A 85 2C + sta ObjectSpawnHeight ; CPU:$CE4A PRG:0E4A 85 2C cmp #$04 ; CPU:$CE4C PRG:0E4C C9 04 bcc Frame_HandleControl_CE54 ; CPU:$CE4E PRG:0E4E 90 04 lda #$02 ; CPU:$CE50 PRG:0E50 A9 02 @@ -3432,7 +3432,7 @@ Frame_HandleControl_CE54: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Frame_WriteSoundCommandState_CE56: - sta $DF ; CPU:$CE56 PRG:0E56 85 DF + sta SoundCommandState ; CPU:$CE56 PRG:0E56 85 DF rts ; CPU:$CE58 PRG:0E58 60 ; Routine: Frame_RestoreAccumulator_CE59 ; Global: Reachable code entry at CPU $CE59 traced from the interrupt-root control-flow graph. @@ -3460,14 +3460,14 @@ Frame_ReturnToCaller_CE5A: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Frame_ReadObjectIndex_CE5B: - lda $2C ; CPU:$CE5B PRG:0E5B A5 2C + lda ObjectSpawnHeight ; CPU:$CE5B PRG:0E5B A5 2C cmp #$13 ; CPU:$CE5D PRG:0E5D C9 13 bcs Frame_ReturnToCaller_CE5A ; CPU:$CE5F PRG:0E5F B0 F9 lda $2D ; CPU:$CE61 PRG:0E61 A5 2D sta $3D ; CPU:$CE63 PRG:0E63 85 3D ldy #$00 ; CPU:$CE65 PRG:0E65 A0 00 sty $3C ; CPU:$CE67 PRG:0E67 84 3C - lda $28 ; CPU:$CE69 PRG:0E69 A5 28 + lda ObjectSpawnParam ; CPU:$CE69 PRG:0E69 A5 28 cmp #$08 ; CPU:$CE6B PRG:0E6B C9 08 bcc Frame_WriteZp0E_CE80 ; CPU:$CE6D PRG:0E6D 90 11 ldy #$F0 ; CPU:$CE6F PRG:0E6F A0 F0 @@ -3478,7 +3478,7 @@ Frame_ReadObjectIndex_CE5B: asl a ; CPU:$CE77 PRG:0E77 0A asl a ; CPU:$CE78 PRG:0E78 0A clc ; CPU:$CE79 PRG:0E79 18 - adc $29 ; CPU:$CE7A PRG:0E7A 65 29 + adc ObjectSpawnY ; CPU:$CE7A PRG:0E7A 65 29 sec ; CPU:$CE7C PRG:0E7C 38 sbc #$80 ; CPU:$CE7D PRG:0E7D E9 80 tay ; CPU:$CE7F PRG:0E7F A8 @@ -3491,27 +3491,27 @@ Frame_ReadObjectIndex_CE5B: ; Confidence: High for reachability and encoding; semantic role provisional. Frame_WriteZp0E_CE80: sty $0E ; CPU:$CE80 PRG:0E80 84 0E - lda $28 ; CPU:$CE82 PRG:0E82 A5 28 + lda ObjectSpawnParam ; CPU:$CE82 PRG:0E82 A5 28 asl a ; CPU:$CE84 PRG:0E84 0A asl a ; CPU:$CE85 PRG:0E85 0A asl a ; CPU:$CE86 PRG:0E86 0A asl a ; CPU:$CE87 PRG:0E87 0A clc ; CPU:$CE88 PRG:0E88 18 - adc $29 ; CPU:$CE89 PRG:0E89 65 29 + adc ObjectSpawnY ; CPU:$CE89 PRG:0E89 65 29 sec ; CPU:$CE8B PRG:0E8B 38 sbc #$08 ; CPU:$CE8C PRG:0E8C E9 08 sbc $0E ; CPU:$CE8E PRG:0E8E E5 0E sta $3A ; CPU:$CE90 PRG:0E90 85 3A - lda $2A ; CPU:$CE92 PRG:0E92 A5 2A + lda ObjectSpawnX ; CPU:$CE92 PRG:0E92 A5 2A asl a ; CPU:$CE94 PRG:0E94 0A asl a ; CPU:$CE95 PRG:0E95 0A asl a ; CPU:$CE96 PRG:0E96 0A asl a ; CPU:$CE97 PRG:0E97 0A clc ; CPU:$CE98 PRG:0E98 18 - adc $2B ; CPU:$CE99 PRG:0E99 65 2B + adc ObjectSpawnWidth ; CPU:$CE99 PRG:0E99 65 2B adc #$17 ; CPU:$CE9B PRG:0E9B 69 17 sta $3B ; CPU:$CE9D PRG:0E9D 85 3B - ldx $2C ; CPU:$CE9F PRG:0E9F A6 2C + ldx ObjectSpawnHeight ; CPU:$CE9F PRG:0E9F A6 2C lda $CED6,x ; CPU:$CEA1 PRG:0EA1 BD D6 CE jmp Stage_WriteZp3F_D5F2 ; CPU:$CEA4 PRG:0EA4 4C F2 D5 ; Routine: Frame_ReadZp2D_CEA7 @@ -3526,27 +3526,27 @@ Frame_ReadZp2D_CEA7: sta $3D ; CPU:$CEA9 PRG:0EA9 85 3D ldy #$03 ; CPU:$CEAB PRG:0EAB A0 03 sty $3C ; CPU:$CEAD PRG:0EAD 84 3C - lda $28 ; CPU:$CEAF PRG:0EAF A5 28 + lda ObjectSpawnParam ; CPU:$CEAF PRG:0EAF A5 28 asl a ; CPU:$CEB1 PRG:0EB1 0A asl a ; CPU:$CEB2 PRG:0EB2 0A asl a ; CPU:$CEB3 PRG:0EB3 0A asl a ; CPU:$CEB4 PRG:0EB4 0A clc ; CPU:$CEB5 PRG:0EB5 18 - adc $29 ; CPU:$CEB6 PRG:0EB6 65 29 + adc ObjectSpawnY ; CPU:$CEB6 PRG:0EB6 65 29 sec ; CPU:$CEB8 PRG:0EB8 38 sbc #$08 ; CPU:$CEB9 PRG:0EB9 E9 08 sta $3A ; CPU:$CEBB PRG:0EBB 85 3A - lda $2A ; CPU:$CEBD PRG:0EBD A5 2A + lda ObjectSpawnX ; CPU:$CEBD PRG:0EBD A5 2A asl a ; CPU:$CEBF PRG:0EBF 0A asl a ; CPU:$CEC0 PRG:0EC0 0A asl a ; CPU:$CEC1 PRG:0EC1 0A asl a ; CPU:$CEC2 PRG:0EC2 0A clc ; CPU:$CEC3 PRG:0EC3 18 - adc $2B ; CPU:$CEC4 PRG:0EC4 65 2B + adc ObjectSpawnWidth ; CPU:$CEC4 PRG:0EC4 65 2B adc #$17 ; CPU:$CEC6 PRG:0EC6 69 17 sta $3B ; CPU:$CEC8 PRG:0EC8 85 3B - ldx $2C ; CPU:$CECA PRG:0ECA A6 2C - lda $CED2,x ; CPU:$CECC PRG:0ECC BD D2 CE + ldx ObjectSpawnHeight ; CPU:$CECA PRG:0ECA A6 2C + lda FrameObjectOffsetTable,x ; CPU:$CECC PRG:0ECC BD D2 CE jmp Stage_WriteZp3F_D5F2 ; CPU:$CECF PRG:0ECF 4C F2 D5 ; Data region: CPU $CED2-$CEE8; unreachable by direct recursive trace. @@ -3562,7 +3562,7 @@ FrameObjectOffsetTable: ; Confidence: High for reachability and encoding; semantic role provisional. Frame_WriteSoundCommandState_CEE9: lda #$04 ; CPU:$CEE9 PRG:0EE9 A9 04 - sta $DF ; CPU:$CEEB PRG:0EEB 85 DF + sta SoundCommandState ; CPU:$CEEB PRG:0EEB 85 DF lda #$0A ; CPU:$CEED PRG:0EED A9 0A jsr Menu_WriteObjectWorkX_DD83 ; CPU:$CEEF PRG:0EEF 20 83 DD ldx $5B ; CPU:$CEF2 PRG:0EF2 A6 5B @@ -3604,7 +3604,7 @@ Object_ReadObjectTimer_CF0D: ; Confidence: High for reachability and encoding; semantic role provisional. Object_WriteGameMode_CF15: lda #$04 ; CPU:$CF15 PRG:0F15 A9 04 - sta $B5 ; CPU:$CF17 PRG:0F17 85 B5 + sta FrameDelay ; CPU:$CF17 PRG:0F17 85 B5 rts ; CPU:$CF19 PRG:0F19 60 ; Routine: Object_ReadObjectMode_CF1A ; Global: Reachable code entry at CPU $CF1A traced from the interrupt-root control-flow graph. @@ -3614,12 +3614,12 @@ Object_WriteGameMode_CF15: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Object_ReadObjectMode_CF1A: - lda $73 ; CPU:$CF1A PRG:0F1A A5 73 + lda ObjectXLimit ; CPU:$CF1A PRG:0F1A A5 73 cmp #$50 ; CPU:$CF1C PRG:0F1C C9 50 beq Object_WriteGameMode_CF25 ; CPU:$CF1E PRG:0F1E F0 05 clc ; CPU:$CF20 PRG:0F20 18 adc #$10 ; CPU:$CF21 PRG:0F21 69 10 - sta $73 ; CPU:$CF23 PRG:0F23 85 73 + sta ObjectXLimit ; CPU:$CF23 PRG:0F23 85 73 ; Routine: Object_WriteGameMode_CF25 ; Global: Reachable code entry at CPU $CF25 traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -3629,7 +3629,7 @@ Object_ReadObjectMode_CF1A: ; Confidence: High for reachability and encoding; semantic role provisional. Object_WriteGameMode_CF25: lda #$04 ; CPU:$CF25 PRG:0F25 A9 04 - sta $B5 ; CPU:$CF27 PRG:0F27 85 B5 + sta FrameDelay ; CPU:$CF27 PRG:0F27 85 B5 rts ; CPU:$CF29 PRG:0F29 60 ; Routine: Object_WriteObjectFlags_CF2A ; Global: Reachable code entry at CPU $CF2A traced from the interrupt-root control-flow graph. @@ -3642,7 +3642,7 @@ Object_WriteObjectFlags_CF2A: lda #$01 ; CPU:$CF2A PRG:0F2A A9 01 sta $75 ; CPU:$CF2C PRG:0F2C 85 75 lda #$04 ; CPU:$CF2E PRG:0F2E A9 04 - sta $B5 ; CPU:$CF30 PRG:0F30 85 B5 + sta FrameDelay ; CPU:$CF30 PRG:0F30 85 B5 rts ; CPU:$CF32 PRG:0F32 60 ; Routine: Object_WriteObjectPhase_CF33 ; Global: Reachable code entry at CPU $CF33 traced from the interrupt-root control-flow graph. @@ -3655,7 +3655,7 @@ Object_WriteObjectPhase_CF33: lda #$01 ; CPU:$CF33 PRG:0F33 A9 01 sta $76 ; CPU:$CF35 PRG:0F35 85 76 lda #$04 ; CPU:$CF37 PRG:0F37 A9 04 - sta $B5 ; CPU:$CF39 PRG:0F39 85 B5 + sta FrameDelay ; CPU:$CF39 PRG:0F39 85 B5 rts ; CPU:$CF3B PRG:0F3B 60 ; Routine: Object_WriteObjectSubtype_CF3C ; Global: Reachable code entry at CPU $CF3C traced from the interrupt-root control-flow graph. @@ -3668,7 +3668,7 @@ Object_WriteObjectSubtype_CF3C: lda #$01 ; CPU:$CF3C PRG:0F3C A9 01 sta $77 ; CPU:$CF3E PRG:0F3E 85 77 lda #$04 ; CPU:$CF40 PRG:0F40 A9 04 - sta $B5 ; CPU:$CF42 PRG:0F42 85 B5 + sta FrameDelay ; CPU:$CF42 PRG:0F42 85 B5 rts ; CPU:$CF44 PRG:0F44 60 ; Routine: Object_WriteObjectDirection_CF45 ; Global: Reachable code entry at CPU $CF45 traced from the interrupt-root control-flow graph. @@ -3681,7 +3681,7 @@ Object_WriteObjectDirection_CF45: lda #$01 ; CPU:$CF45 PRG:0F45 A9 01 sta $78 ; CPU:$CF47 PRG:0F47 85 78 lda #$04 ; CPU:$CF49 PRG:0F49 A9 04 - sta $B5 ; CPU:$CF4B PRG:0F4B 85 B5 + sta FrameDelay ; CPU:$CF4B PRG:0F4B 85 B5 rts ; CPU:$CF4D PRG:0F4D 60 ; Routine: Object_WriteObjectSpeed_CF4E ; Global: Reachable code entry at CPU $CF4E traced from the interrupt-root control-flow graph. @@ -3694,7 +3694,7 @@ Object_WriteObjectSpeed_CF4E: lda #$01 ; CPU:$CF4E PRG:0F4E A9 01 sta $79 ; CPU:$CF50 PRG:0F50 85 79 lda #$05 ; CPU:$CF52 PRG:0F52 A9 05 - sta $B5 ; CPU:$CF54 PRG:0F54 85 B5 + sta FrameDelay ; CPU:$CF54 PRG:0F54 85 B5 rts ; CPU:$CF56 PRG:0F56 60 ; Routine: Object_WriteObjectCounter_CF57 ; Global: Reachable code entry at CPU $CF57 traced from the interrupt-root control-flow graph. @@ -3707,7 +3707,7 @@ Object_WriteObjectCounter_CF57: lda #$FF ; CPU:$CF57 PRG:0F57 A9 FF sta $7A ; CPU:$CF59 PRG:0F59 85 7A lda #$05 ; CPU:$CF5B PRG:0F5B A9 05 - sta $B5 ; CPU:$CF5D PRG:0F5D 85 B5 + sta FrameDelay ; CPU:$CF5D PRG:0F5D 85 B5 rts ; CPU:$CF5F PRG:0F5F 60 ; Routine: Object_ReadTransferPointer_CF60 ; Global: Reachable code entry at CPU $CF60 traced from the interrupt-root control-flow graph. @@ -3770,18 +3770,18 @@ Object_ReadObjectDirection_CF82: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Object_ReadGameState_CF87: - lda $59 ; CPU:$CF87 PRG:0F87 A5 59 + lda GameMode ; CPU:$CF87 PRG:0F87 A5 59 beq Object_MergeZp13_CFA4 ; CPU:$CF89 PRG:0F89 F0 19 - lda $AF ; CPU:$CF8B PRG:0F8B A5 AF - dec $AE ; CPU:$CF8D PRG:0F8D C6 AE + lda AudioArgHi ; CPU:$CF8B PRG:0F8B A5 AF + dec AudioArgLo ; CPU:$CF8D PRG:0F8D C6 AE bne Object_ReturnToCaller_CFA3 ; CPU:$CF8F PRG:0F8F D0 12 pha ; CPU:$CF91 PRG:0F91 48 ldy #$00 ; CPU:$CF92 PRG:0F92 A0 00 - lda ($AC),y ; CPU:$CF94 PRG:0F94 B1 AC - sta $AE ; CPU:$CF96 PRG:0F96 85 AE + lda (AudioPtrLo),y ; CPU:$CF94 PRG:0F94 B1 AC + sta AudioArgLo ; CPU:$CF96 PRG:0F96 85 AE jsr Object_IncrementZpAC_CFA9 ; CPU:$CF98 PRG:0F98 20 A9 CF - lda ($AC),y ; CPU:$CF9B PRG:0F9B B1 AC - sta $AF ; CPU:$CF9D PRG:0F9D 85 AF + lda (AudioPtrLo),y ; CPU:$CF9B PRG:0F9B B1 AC + sta AudioArgHi ; CPU:$CF9D PRG:0F9D 85 AF jsr Object_IncrementZpAC_CFA9 ; CPU:$CF9F PRG:0F9F 20 A9 CF pla ; CPU:$CFA2 PRG:0FA2 68 ; Routine: Object_ReturnToCaller_CFA3 @@ -3802,7 +3802,7 @@ Object_ReturnToCaller_CFA3: ; Confidence: High for reachability and encoding; semantic role provisional. Object_MergeZp13_CFA4: lda ControllerState1 ; CPU:$CFA4 PRG:0FA4 A5 12 - ora $13 ; CPU:$CFA6 PRG:0FA6 05 13 + ora ControllerState2 ; CPU:$CFA6 PRG:0FA6 05 13 rts ; CPU:$CFA8 PRG:0FA8 60 ; Routine: Object_IncrementZpAC_CFA9 ; Global: Reachable code entry at CPU $CFA9 traced from the interrupt-root control-flow graph. @@ -3812,9 +3812,9 @@ Object_MergeZp13_CFA4: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Object_IncrementZpAC_CFA9: - inc $AC ; CPU:$CFA9 PRG:0FA9 E6 AC + inc AudioPtrLo ; CPU:$CFA9 PRG:0FA9 E6 AC bne Object_ReturnToCaller_CFAF ; CPU:$CFAB PRG:0FAB D0 02 - inc $AD ; CPU:$CFAD PRG:0FAD E6 AD + inc AudioPtrHi ; CPU:$CFAD PRG:0FAD E6 AD ; Routine: Object_ReturnToCaller_CFAF ; Global: Reachable code entry at CPU $CFAF traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -3833,7 +3833,7 @@ Object_ReturnToCaller_CFAF: ; Confidence: High for reachability and encoding; semantic role provisional. Object_WriteStageProgress_CFB0: lda #$00 ; CPU:$CFB0 PRG:0FB0 A9 00 - sta $9C ; CPU:$CFB2 PRG:0FB2 85 9C + sta ObjectWork0 ; CPU:$CFB2 PRG:0FB2 85 9C lda #$C0 ; CPU:$CFB4 PRG:0FB4 A9 C0 sta $6B ; CPU:$CFB6 PRG:0FB6 85 6B ldx #$09 ; CPU:$CFB8 PRG:0FB8 A2 09 @@ -3849,7 +3849,7 @@ Object_ReadRam0576_CFBA: beq Object_RetreatIndexX_CFE9 ; CPU:$CFBD PRG:0FBD F0 2A cmp #$09 ; CPU:$CFBF PRG:0FBF C9 09 bcs Object_ReadRam05B2_CFC5 ; CPU:$CFC1 PRG:0FC1 B0 02 - inc $9C ; CPU:$CFC3 PRG:0FC3 E6 9C + inc ObjectWork0 ; CPU:$CFC3 PRG:0FC3 E6 9C ; Routine: Object_ReadRam05B2_CFC5 ; Global: Reachable code entry at CPU $CFC5 traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -3913,7 +3913,7 @@ Object_ReturnToCaller_CFEC: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Object_ReadStageIndex_CFED: - lda $9D ; CPU:$CFED PRG:0FED A5 9D + lda ObjectWork1 ; CPU:$CFED PRG:0FED A5 9D clc ; CPU:$CFEF PRG:0FEF 18 adc #$2C ; CPU:$CFF0 PRG:0FF0 69 2C sta $46 ; CPU:$CFF2 PRG:0FF2 85 46 @@ -3989,22 +3989,22 @@ Object_WriteZp3D_D010: lda $46 ; CPU:$D065 PRG:1065 A5 46 cmp #$20 ; CPU:$D067 PRG:1067 C9 20 bcs Object_ReturnToCaller_D08B ; CPU:$D069 PRG:1069 B0 20 - lda $5C ; CPU:$D06B PRG:106B A5 5C + lda ObjectStateFlags ; CPU:$D06B PRG:106B A5 5C bne Object_ReturnToCaller_D08B ; CPU:$D06D PRG:106D D0 1C lda $7A ; CPU:$D06F PRG:106F A5 7A bne Object_ReturnToCaller_D08B ; CPU:$D071 PRG:1071 D0 18 lda $42 ; CPU:$D073 PRG:1073 A5 42 - cmp $28 ; CPU:$D075 PRG:1075 C5 28 + cmp ObjectSpawnParam ; CPU:$D075 PRG:1075 C5 28 bne Object_ReturnToCaller_D08B ; CPU:$D077 PRG:1077 D0 12 lda $44 ; CPU:$D079 PRG:1079 A5 44 - cmp $2A ; CPU:$D07B PRG:107B C5 2A + cmp ObjectSpawnX ; CPU:$D07B PRG:107B C5 2A bne Object_ReturnToCaller_D08B ; CPU:$D07D PRG:107D D0 0C lda #$05 ; CPU:$D07F PRG:107F A9 05 - sta $DF ; CPU:$D081 PRG:1081 85 DF + sta SoundCommandState ; CPU:$D081 PRG:1081 85 DF lda #$01 ; CPU:$D083 PRG:1083 A9 01 - sta $5C ; CPU:$D085 PRG:1085 85 5C + sta ObjectStateFlags ; CPU:$D085 PRG:1085 85 5C lda #$0C ; CPU:$D087 PRG:1087 A9 0C - sta $2C ; CPU:$D089 PRG:1089 85 2C + sta ObjectSpawnHeight ; CPU:$D089 PRG:1089 85 2C ; Routine: Object_ReturnToCaller_D08B ; Global: Reachable code entry at CPU $D08B traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -4286,7 +4286,7 @@ Stage_WriteZp3F_D5F2: lda $39 ; CPU:$D604 PRG:1604 A5 39 inc $39 ; CPU:$D606 PRG:1606 E6 39 clc ; CPU:$D608 PRG:1608 18 - adc $DB ; CPU:$D609 PRG:1609 65 DB + adc FrameParity ; CPU:$D609 PRG:1609 65 DB cmp #$0C ; CPU:$D60B PRG:160B C9 0C bcc Stage_ReadZp3D_D611 ; CPU:$D60D PRG:160D 90 02 sbc #$0A ; CPU:$D60F PRG:160F E9 0A @@ -4412,7 +4412,7 @@ AdvanceRandomState: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Stage_ToggleRandomState3_D697: - eor $57 ; CPU:$D697 PRG:1697 45 57 + eor RandomState3 ; CPU:$D697 PRG:1697 45 57 rts ; CPU:$D699 PRG:1699 60 ; Routine: Stage_ReadZp58_D69A ; Global: Reachable code entry at CPU $D69A traced from the interrupt-root control-flow graph. @@ -4571,14 +4571,14 @@ Stage_WriteObjectWorkX_D8FC: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Stage_ReadZp14_D901: - lda $14 ; CPU:$D901 PRG:1901 A5 14 + lda VramReadOffset ; CPU:$D901 PRG:1901 A5 14 sec ; CPU:$D903 PRG:1903 38 - sbc $15 ; CPU:$D904 PRG:1904 E5 15 + sbc VramWriteLimit ; CPU:$D904 PRG:1904 E5 15 cmp #$08 ; CPU:$D906 PRG:1906 C9 08 beq Stage_ReadZp14_D901 ; CPU:$D908 PRG:1908 F0 F7 pla ; CPU:$D90A PRG:190A 68 jsr Stage_WriteZp1A_D924 ; CPU:$D90B PRG:190B 20 24 D9 - ldy $15 ; CPU:$D90E PRG:190E A4 15 + ldy VramWriteLimit ; CPU:$D90E PRG:190E A4 15 ldx #$00 ; CPU:$D910 PRG:1910 A2 00 ; Routine: Stage_ReadZp17_D912 ; Global: Reachable code entry at CPU $D912 traced from the interrupt-root control-flow graph. @@ -4594,7 +4594,7 @@ Stage_ReadZp17_D912: inx ; CPU:$D918 PRG:1918 E8 cpx #$08 ; CPU:$D919 PRG:1919 E0 08 bne Stage_ReadZp17_D912 ; CPU:$D91B PRG:191B D0 F5 - sty $15 ; CPU:$D91D PRG:191D 84 15 + sty VramWriteLimit ; CPU:$D91D PRG:191D 84 15 ldx $24 ; CPU:$D91F PRG:191F A6 24 ldy $25 ; CPU:$D921 PRG:1921 A4 25 rts ; CPU:$D923 PRG:1923 60 @@ -4610,10 +4610,10 @@ Stage_WriteZp1A_D924: asl a ; CPU:$D925 PRG:1925 0A asl a ; CPU:$D926 PRG:1926 0A sta $1A ; CPU:$D927 PRG:1927 85 1A - lda $D994,y ; CPU:$D929 PRG:1929 B9 94 D9 + lda StageLayoutPointerData,y ; CPU:$D929 PRG:1929 B9 94 D9 sta $1E ; CPU:$D92C PRG:192C 85 1E ldy #$00 ; CPU:$D92E PRG:192E A0 00 - lda $1F ; CPU:$D930 PRG:1930 A5 1F + lda ObjectScreenX ; CPU:$D930 PRG:1930 A5 1F cmp #$10 ; CPU:$D932 PRG:1932 C9 10 bcc Stage_WriteZp17_D93A ; CPU:$D934 PRG:1934 90 04 ldy #$04 ; CPU:$D936 PRG:1936 A0 04 @@ -4629,7 +4629,7 @@ Stage_WriteZp17_D93A: sty $17 ; CPU:$D93A PRG:193A 84 17 asl a ; CPU:$D93C PRG:193C 0A sta $21 ; CPU:$D93D PRG:193D 85 21 - lda $20 ; CPU:$D93F PRG:193F A5 20 + lda ObjectScreenY ; CPU:$D93F PRG:193F A5 20 clc ; CPU:$D941 PRG:1941 18 adc #$02 ; CPU:$D942 PRG:1942 69 02 asl a ; CPU:$D944 PRG:1944 0A @@ -4744,18 +4744,18 @@ RunMenuSelectionScreen: jsr Ppu_HandleControl_C2B9 ; CPU:$DA91 PRG:1A91 20 B9 C2 jsr UploadMenuPalette ; CPU:$DA94 PRG:1A94 20 27 DF lda #$00 ; CPU:$DA97 PRG:1A97 A9 00 - sta $60 ; CPU:$DA99 PRG:1A99 85 60 - sta $72 ; CPU:$DA9B PRG:1A9B 85 72 - sta $B5 ; CPU:$DA9D PRG:1A9D 85 B5 + sta NmiWorkPending ; CPU:$DA99 PRG:1A99 85 60 + sta ScreenState ; CPU:$DA9B PRG:1A9B 85 72 + sta FrameDelay ; CPU:$DA9D PRG:1A9D 85 B5 ldy #$9F ; CPU:$DA9F PRG:1A9F A0 9F lda #$20 ; CPU:$DAA1 PRG:1AA1 A9 20 ldx #$E7 ; CPU:$DAA3 PRG:1AA3 A2 E7 jsr Menu_CallHelper_DC41 ; CPU:$DAA5 PRG:1AA5 20 41 DC jsr Ppu_CallHelper_C23B ; CPU:$DAA8 PRG:1AA8 20 3B C2 lda #$06 ; CPU:$DAAB PRG:1AAB A9 06 - sta $1F ; CPU:$DAAD PRG:1AAD 85 1F + sta ObjectScreenX ; CPU:$DAAD PRG:1AAD 85 1F lda #$3A ; CPU:$DAAF PRG:1AAF A9 3A - sta $20 ; CPU:$DAB1 PRG:1AB1 85 20 + sta ObjectScreenY ; CPU:$DAB1 PRG:1AB1 85 20 ldy #$00 ; CPU:$DAB3 PRG:1AB3 A0 00 ; Routine: Menu_TransferVramDataPath_DAB5 ; Global: Reachable code entry at CPU $DAB5 traced from the interrupt-root control-flow graph. @@ -4767,9 +4767,9 @@ RunMenuSelectionScreen: Menu_TransferVramDataPath_DAB5: jsr WaitForVBlankTransition ; CPU:$DAB5 PRG:1AB5 20 8B C2 lda #$22 ; CPU:$DAB8 PRG:1AB8 A9 22 - ldx $1F ; CPU:$DABA PRG:1ABA A6 1F + ldx ObjectScreenX ; CPU:$DABA PRG:1ABA A6 1F jsr SetPpuAddress ; CPU:$DABC PRG:1ABC 20 96 C1 - lda $20 ; CPU:$DABF PRG:1ABF A5 20 + lda ObjectScreenY ; CPU:$DABF PRG:1ABF A5 20 sta PPUDATA ; CPU:$DAC1 PRG:1AC1 8D 07 20 jsr CommitPpuStateAndScroll ; CPU:$DAC4 PRG:1AC4 20 96 C2 ldx #$0A ; CPU:$DAC7 PRG:1AC7 A2 0A @@ -4789,7 +4789,7 @@ Menu_TransferVramDataPath_DAC9: bne Menu_TransferVramDataPath_DAC9 ; CPU:$DAD3 PRG:1AD3 D0 F4 jsr WaitForVBlankTransition ; CPU:$DAD5 PRG:1AD5 20 8B C2 lda #$22 ; CPU:$DAD8 PRG:1AD8 A9 22 - ldx $1F ; CPU:$DADA PRG:1ADA A6 1F + ldx ObjectScreenX ; CPU:$DADA PRG:1ADA A6 1F jsr SetPpuAddress ; CPU:$DADC PRG:1ADC 20 96 C1 lda #$3B ; CPU:$DADF PRG:1ADF A9 3B sta PPUDATA ; CPU:$DAE1 PRG:1AE1 8D 07 20 @@ -4825,11 +4825,11 @@ Menu_UpdateAudioChannelPath_DAF8: pla ; CPU:$DB00 PRG:1B00 68 cmp #$01 ; CPU:$DB01 PRG:1B01 C9 01 beq Menu_ReadWorkValue_DB24 ; CPU:$DB03 PRG:1B03 F0 1F - lda $20 ; CPU:$DB05 PRG:1B05 A5 20 + lda ObjectScreenY ; CPU:$DB05 PRG:1B05 A5 20 cmp #$3A ; CPU:$DB07 PRG:1B07 C9 3A bne Menu_ReadWorkValue_DB0F ; CPU:$DB09 PRG:1B09 D0 04 lda #$51 ; CPU:$DB0B PRG:1B0B A9 51 - sta $20 ; CPU:$DB0D PRG:1B0D 85 20 + sta ObjectScreenY ; CPU:$DB0D PRG:1B0D 85 20 ; Routine: Menu_ReadWorkValue_DB0F ; Global: Reachable code entry at CPU $DB0F traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -4838,10 +4838,10 @@ Menu_UpdateAudioChannelPath_DAF8: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Menu_ReadWorkValue_DB0F: - lda $20 ; CPU:$DB0F PRG:1B0F A5 20 + lda ObjectScreenY ; CPU:$DB0F PRG:1B0F A5 20 cmp #$41 ; CPU:$DB11 PRG:1B11 C9 41 beq Menu_WriteWorkValue_DB1A ; CPU:$DB13 PRG:1B13 F0 05 - dec $20 ; CPU:$DB15 PRG:1B15 C6 20 + dec ObjectScreenY ; CPU:$DB15 PRG:1B15 C6 20 jmp Menu_CallHelper_DB1E ; CPU:$DB17 PRG:1B17 4C 1E DB ; Routine: Menu_WriteWorkValue_DB1A ; Global: Reachable code entry at CPU $DB1A traced from the interrupt-root control-flow graph. @@ -4852,7 +4852,7 @@ Menu_ReadWorkValue_DB0F: ; Confidence: High for reachability and encoding; semantic role provisional. Menu_WriteWorkValue_DB1A: lda #$50 ; CPU:$DB1A PRG:1B1A A9 50 - sta $20 ; CPU:$DB1C PRG:1B1C 85 20 + sta ObjectScreenY ; CPU:$DB1C PRG:1B1C 85 20 ; Routine: Menu_CallHelper_DB1E ; Global: Reachable code entry at CPU $DB1E traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -4871,11 +4871,11 @@ Menu_CallHelper_DB1E: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Menu_ReadWorkValue_DB24: - lda $20 ; CPU:$DB24 PRG:1B24 A5 20 + lda ObjectScreenY ; CPU:$DB24 PRG:1B24 A5 20 cmp #$3A ; CPU:$DB26 PRG:1B26 C9 3A bne Menu_ReadWorkValue_DB2E ; CPU:$DB28 PRG:1B28 D0 04 lda #$40 ; CPU:$DB2A PRG:1B2A A9 40 - sta $20 ; CPU:$DB2C PRG:1B2C 85 20 + sta ObjectScreenY ; CPU:$DB2C PRG:1B2C 85 20 ; Routine: Menu_ReadWorkValue_DB2E ; Global: Reachable code entry at CPU $DB2E traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -4884,10 +4884,10 @@ Menu_ReadWorkValue_DB24: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Menu_ReadWorkValue_DB2E: - lda $20 ; CPU:$DB2E PRG:1B2E A5 20 + lda ObjectScreenY ; CPU:$DB2E PRG:1B2E A5 20 cmp #$50 ; CPU:$DB30 PRG:1B30 C9 50 beq Menu_WriteWorkValue_DB39 ; CPU:$DB32 PRG:1B32 F0 05 - inc $20 ; CPU:$DB34 PRG:1B34 E6 20 + inc ObjectScreenY ; CPU:$DB34 PRG:1B34 E6 20 jmp Menu_CallHelper_DB3D ; CPU:$DB36 PRG:1B36 4C 3D DB ; Routine: Menu_WriteWorkValue_DB39 ; Global: Reachable code entry at CPU $DB39 traced from the interrupt-root control-flow graph. @@ -4898,7 +4898,7 @@ Menu_ReadWorkValue_DB2E: ; Confidence: High for reachability and encoding; semantic role provisional. Menu_WriteWorkValue_DB39: lda #$41 ; CPU:$DB39 PRG:1B39 A9 41 - sta $20 ; CPU:$DB3B PRG:1B3B 85 20 + sta ObjectScreenY ; CPU:$DB3B PRG:1B3B 85 20 ; Routine: Menu_CallHelper_DB3D ; Global: Reachable code entry at CPU $DB3D traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -4927,7 +4927,7 @@ Menu_Dispatch_DB40: Menu_TransferVramDataPath_DB43: lda #$11 ; CPU:$DB43 PRG:1B43 A9 11 sta APUPULSE1TIMERHI ; CPU:$DB45 PRG:1B45 8D 03 40 - lda $20 ; CPU:$DB48 PRG:1B48 A5 20 + lda ObjectScreenY ; CPU:$DB48 PRG:1B48 A5 20 cmp #$3A ; CPU:$DB4A PRG:1B4A C9 3A beq Menu_Dispatch_DB40 ; CPU:$DB4C PRG:1B4C F0 F2 and #$0F ; CPU:$DB4E PRG:1B4E 29 0F @@ -4936,14 +4936,14 @@ Menu_TransferVramDataPath_DB43: sta $007F,y ; CPU:$DB54 PRG:1B54 99 7F 00 jsr WaitForVBlankTransition ; CPU:$DB57 PRG:1B57 20 8B C2 lda #$22 ; CPU:$DB5A PRG:1B5A A9 22 - ldx $1F ; CPU:$DB5C PRG:1B5C A6 1F + ldx ObjectScreenX ; CPU:$DB5C PRG:1B5C A6 1F jsr SetPpuAddress ; CPU:$DB5E PRG:1B5E 20 96 C1 - lda $20 ; CPU:$DB61 PRG:1B61 A5 20 + lda ObjectScreenY ; CPU:$DB61 PRG:1B61 A5 20 sta PPUDATA ; CPU:$DB63 PRG:1B63 8D 07 20 jsr CommitPpuStateAndScroll ; CPU:$DB66 PRG:1B66 20 96 C2 lda #$3A ; CPU:$DB69 PRG:1B69 A9 3A - sta $20 ; CPU:$DB6B PRG:1B6B 85 20 - inc $1F ; CPU:$DB6D PRG:1B6D E6 1F + sta ObjectScreenY ; CPU:$DB6B PRG:1B6B 85 20 + inc ObjectScreenX ; CPU:$DB6D PRG:1B6D E6 1F iny ; CPU:$DB6F PRG:1B6F C8 cpy #$14 ; CPU:$DB70 PRG:1B70 C0 14 beq Menu_HandleControl_DB7A ; CPU:$DB72 PRG:1B72 F0 06 @@ -5012,16 +5012,16 @@ Menu_AddToZp7F_DB99: bne Menu_HandleControl_DB95 ; CPU:$DBA9 PRG:1BA9 D0 EA lda $83 ; CPU:$DBAB PRG:1BAB A5 83 asl a ; CPU:$DBAD PRG:1BAD 0A - sta $1F ; CPU:$DBAE PRG:1BAE 85 1F + sta ObjectScreenX ; CPU:$DBAE PRG:1BAE 85 1F lda $88 ; CPU:$DBB0 PRG:1BB0 A5 88 asl a ; CPU:$DBB2 PRG:1BB2 0A clc ; CPU:$DBB3 PRG:1BB3 18 - adc $1F ; CPU:$DBB4 PRG:1BB4 65 1F - sta $1F ; CPU:$DBB6 PRG:1BB6 85 1F + adc ObjectScreenX ; CPU:$DBB4 PRG:1BB4 65 1F + sta ObjectScreenX ; CPU:$DBB6 PRG:1BB6 85 1F lda $8D ; CPU:$DBB8 PRG:1BB8 A5 8D asl a ; CPU:$DBBA PRG:1BBA 0A clc ; CPU:$DBBB PRG:1BBB 18 - adc $1F ; CPU:$DBBC PRG:1BBC 65 1F + adc ObjectScreenX ; CPU:$DBBC PRG:1BBC 65 1F ldx #$04 ; CPU:$DBBE PRG:1BBE A2 04 ; Routine: Menu_AddToZp8D_DBC0 ; Global: Reachable code entry at CPU $DBC0 traced from the interrupt-root control-flow graph. @@ -5079,7 +5079,7 @@ Menu_ReadRam007F_DBD3: asl a ; CPU:$DBE9 PRG:1BE9 0A asl a ; CPU:$DBEA PRG:1BEA 0A asl a ; CPU:$DBEB PRG:1BEB 0A - sta $73 ; CPU:$DBEC PRG:1BEC 85 73 + sta ObjectXLimit ; CPU:$DBEC PRG:1BEC 85 73 lda $DE ; CPU:$DBEE PRG:1BEE A5 DE asl a ; CPU:$DBF0 PRG:1BF0 0A asl a ; CPU:$DBF1 PRG:1BF1 0A @@ -5110,9 +5110,9 @@ Menu_WriteWorkValue_DBF9: jsr Menu_ReadRamDC53_DC39 ; CPU:$DC18 PRG:1C18 20 39 DC jsr Menu_ReadRamDC53_DC39 ; CPU:$DC1B PRG:1C1B 20 39 DC lda #$0A ; CPU:$DC1E PRG:1C1E A9 0A - sta $20 ; CPU:$DC20 PRG:1C20 85 20 + sta ObjectScreenY ; CPU:$DC20 PRG:1C20 85 20 lda #$00 ; CPU:$DC22 PRG:1C22 A9 00 - sta $1F ; CPU:$DC24 PRG:1C24 85 1F + sta ObjectScreenX ; CPU:$DC24 PRG:1C24 85 1F ; Routine: Menu_IncrementWorkIndex_DC26 ; Global: Reachable code entry at CPU $DC26 traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -5123,8 +5123,8 @@ Menu_WriteWorkValue_DBF9: Menu_IncrementWorkIndex_DC26: lda #$31 ; CPU:$DC26 PRG:1C26 A9 31 jsr Gameplay_WriteObjectWorkY_CB4E ; CPU:$DC28 PRG:1C28 20 4E CB - inc $1F ; CPU:$DC2B PRG:1C2B E6 1F - lda $1F ; CPU:$DC2D PRG:1C2D A5 1F + inc ObjectScreenX ; CPU:$DC2B PRG:1C2B E6 1F + lda ObjectScreenX ; CPU:$DC2D PRG:1C2D A5 1F cmp #$10 ; CPU:$DC2F PRG:1C2F C9 10 bne Menu_IncrementWorkIndex_DC26 ; CPU:$DC31 PRG:1C31 D0 F3 jsr EnableNmiInPpuControl ; CPU:$DC33 PRG:1C33 20 B0 C2 @@ -5137,9 +5137,9 @@ Menu_IncrementWorkIndex_DC26: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Menu_ReadRamDC53_DC39: - lda $DC53,y ; CPU:$DC39 PRG:1C39 B9 53 DC + lda MenuScreenConstructionData,y ; CPU:$DC39 PRG:1C39 B9 53 DC iny ; CPU:$DC3C PRG:1C3C C8 - ldx $DC53,y ; CPU:$DC3D PRG:1C3D BE 53 DC + ldx MenuScreenConstructionData,y ; CPU:$DC3D PRG:1C3D BE 53 DC iny ; CPU:$DC40 PRG:1C40 C8 ; Routine: Menu_CallHelper_DC41 ; Global: Reachable code entry at CPU $DC41 traced from the interrupt-root control-flow graph. @@ -5158,7 +5158,7 @@ Menu_CallHelper_DC41: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Menu_TransferVramDataPath_DC44: - lda $DC53,y ; CPU:$DC44 PRG:1C44 B9 53 DC + lda MenuScreenConstructionData,y ; CPU:$DC44 PRG:1C44 B9 53 DC iny ; CPU:$DC47 PRG:1C47 C8 cmp #$00 ; CPU:$DC48 PRG:1C48 C9 00 beq Menu_ReturnToCaller_DC52 ; CPU:$DC4A PRG:1C4A F0 06 @@ -5214,7 +5214,7 @@ Menu_SaveAccumulator_DD04: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Menu_TransferVramDataPath_DD15: - lda $DD22,x ; CPU:$DD15 PRG:1D15 BD 22 DD + lda StatusScreenAddressTable,x ; CPU:$DD15 PRG:1D15 BD 22 DD sta PPUDATA ; CPU:$DD18 PRG:1D18 8D 07 20 inx ; CPU:$DD1B PRG:1D1B E8 dey ; CPU:$DD1C PRG:1D1C 88 @@ -5248,7 +5248,7 @@ Menu_CallHelper_DD3E: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Menu_TransferVramDataPath_DD50: - lda $DD62,x ; CPU:$DD50 PRG:1D50 BD 62 DD + lda StatusDigitTileTable,x ; CPU:$DD50 PRG:1D50 BD 62 DD sta PPUDATA ; CPU:$DD53 PRG:1D53 8D 07 20 dex ; CPU:$DD56 PRG:1D56 CA bpl Menu_TransferVramDataPath_DD50 ; CPU:$DD57 PRG:1D57 10 F7 @@ -5269,7 +5269,7 @@ StatusDigitTileTable: Menu_WriteObjectWorkX_DD6B: stx $24 ; CPU:$DD6B PRG:1D6B 86 24 sty $25 ; CPU:$DD6D PRG:1D6D 84 25 - ldx $59 ; CPU:$DD6F PRG:1D6F A6 59 + ldx GameMode ; CPU:$DD6F PRG:1D6F A6 59 bne Menu_ReadObjectWorkX_DDC2 ; CPU:$DD71 PRG:1D71 D0 4F ldx #$03 ; CPU:$DD73 PRG:1D73 A2 03 bne Menu_AddToZp61_DD8D ; CPU:$DD75 PRG:1D75 D0 16 @@ -5283,7 +5283,7 @@ Menu_WriteObjectWorkX_DD6B: Menu_WriteObjectWorkX_DD77: stx $24 ; CPU:$DD77 PRG:1D77 86 24 sty $25 ; CPU:$DD79 PRG:1D79 84 25 - ldx $59 ; CPU:$DD7B PRG:1D7B A6 59 + ldx GameMode ; CPU:$DD7B PRG:1D7B A6 59 bne Menu_ReadObjectWorkX_DDC2 ; CPU:$DD7D PRG:1D7D D0 43 ldx #$04 ; CPU:$DD7F PRG:1D7F A2 04 bne Menu_AddToZp61_DD8D ; CPU:$DD81 PRG:1D81 D0 0A @@ -5297,7 +5297,7 @@ Menu_WriteObjectWorkX_DD77: Menu_WriteObjectWorkX_DD83: stx $24 ; CPU:$DD83 PRG:1D83 86 24 sty $25 ; CPU:$DD85 PRG:1D85 84 25 - ldx $59 ; CPU:$DD87 PRG:1D87 A6 59 + ldx GameMode ; CPU:$DD87 PRG:1D87 A6 59 bne Menu_ReadObjectWorkX_DDC2 ; CPU:$DD89 PRG:1D89 D0 37 ldx #$06 ; CPU:$DD8B PRG:1D8B A2 06 ; Routine: Menu_AddToZp61_DD8D @@ -5433,7 +5433,7 @@ Menu_TransferVramDataPath_DDD2: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Menu_TransferVramDataPath_DDE1: - lda $DE15,x ; CPU:$DDE1 PRG:1DE1 BD 15 DE + lda StatusScreenTextPointerTable,x ; CPU:$DDE1 PRG:1DE1 BD 15 DE sta PPUDATA ; CPU:$DDE4 PRG:1DE4 8D 07 20 dex ; CPU:$DDE7 PRG:1DE7 CA bpl Menu_TransferVramDataPath_DDE1 ; CPU:$DDE8 PRG:1DE8 10 F7 @@ -5492,7 +5492,7 @@ Menu_WriteZp0E_DE1D: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Menu_TransferVramDataPath_DE33: - lda $DE4E,x ; CPU:$DE33 PRG:1E33 BD 4E DE + lda StatusScreenValueAddressTable,x ; CPU:$DE33 PRG:1E33 BD 4E DE sta PPUDATA ; CPU:$DE36 PRG:1E36 8D 07 20 dex ; CPU:$DE39 PRG:1E39 CA bpl Menu_TransferVramDataPath_DE33 ; CPU:$DE3A PRG:1E3A 10 F7 @@ -5532,7 +5532,7 @@ Menu_WriteZp0E_DE53: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Menu_TransferVramDataPath_DE69: - lda $DE78,x ; CPU:$DE69 PRG:1E69 BD 78 DE + lda StatusScreenPaletteAddressTable,x ; CPU:$DE69 PRG:1E69 BD 78 DE sta PPUDATA ; CPU:$DE6C PRG:1E6C 8D 07 20 dex ; CPU:$DE6F PRG:1E6F CA bpl Menu_TransferVramDataPath_DE69 ; CPU:$DE70 PRG:1E70 10 F7 @@ -5727,7 +5727,7 @@ UploadMenuPalette: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Menu_TransferVramDataPath_DF37: - lda $DF8C,x ; CPU:$DF37 PRG:1F37 BD 8C DF + lda MenuPaletteAndScreenData,x ; CPU:$DF37 PRG:1F37 BD 8C DF sta PPUDATA ; CPU:$DF3A PRG:1F3A 8D 07 20 inx ; CPU:$DF3D PRG:1F3D E8 cpx #$10 ; CPU:$DF3E PRG:1F3E E0 10 @@ -5942,7 +5942,7 @@ Gameplay_RetreatIndexX_E1DC: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Gameplay_ReadRamE1E5_E1E0: - lda $E1E5,y ; CPU:$E1E0 PRG:21E0 B9 E5 E1 + lda TitleAndCopyrightText,y ; CPU:$E1E0 PRG:21E0 B9 E5 E1 iny ; CPU:$E1E3 PRG:21E3 C8 rts ; CPU:$E1E4 PRG:21E4 60 @@ -5970,7 +5970,7 @@ TitleAndCopyrightText: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Gameplay_ReadObjectMode_E2BD: - lda $73 ; CPU:$E2BD PRG:22BD A5 73 + lda ObjectXLimit ; CPU:$E2BD PRG:22BD A5 73 lsr a ; CPU:$E2BF PRG:22BF 4A lsr a ; CPU:$E2C0 PRG:22C0 4A lsr a ; CPU:$E2C1 PRG:22C1 4A @@ -5988,7 +5988,7 @@ Gameplay_ReadObjectMode_E2BD: ldy #$00 ; CPU:$E2D3 PRG:22D3 A0 00 ldx #$00 ; CPU:$E2D5 PRG:22D5 A2 00 lda #$03 ; CPU:$E2D7 PRG:22D7 A9 03 - sta $1F ; CPU:$E2D9 PRG:22D9 85 1F + sta ObjectScreenX ; CPU:$E2D9 PRG:22D9 85 1F ; Routine: Gameplay_ReadObjectWorkX_E2DB ; Global: Reachable code entry at CPU $E2DB traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -6001,7 +6001,7 @@ Gameplay_ReadObjectWorkX_E2DB: jsr Gameplay_ReadRamE360_E353 ; CPU:$E2DE PRG:22DE 20 53 E3 lda $24 ; CPU:$E2E1 PRG:22E1 A5 24 sta ($34),y ; CPU:$E2E3 PRG:22E3 91 34 - dec $1F ; CPU:$E2E5 PRG:22E5 C6 1F + dec ObjectScreenX ; CPU:$E2E5 PRG:22E5 C6 1F bne Gameplay_ReadObjectWorkX_E2DB ; CPU:$E2E7 PRG:22E7 D0 F2 jsr Gameplay_WriteWorkValue_E33C ; CPU:$E2E9 PRG:22E9 20 3C E3 lda $99 ; CPU:$E2EC PRG:22EC A5 99 @@ -6072,7 +6072,7 @@ Gameplay_TransferVramDataPath_E32B: ; Confidence: High for reachability and encoding; semantic role provisional. Gameplay_WriteWorkValue_E33C: lda #$04 ; CPU:$E33C PRG:233C A9 04 - sta $20 ; CPU:$E33E PRG:233E 85 20 + sta ObjectScreenY ; CPU:$E33E PRG:233E 85 20 lda #$00 ; CPU:$E340 PRG:2340 A9 00 sta $24 ; CPU:$E342 PRG:2342 85 24 ; Routine: Gameplay_ReadTransferPointer_E344 @@ -6088,7 +6088,7 @@ Gameplay_ReadTransferPointer_E344: clc ; CPU:$E349 PRG:2349 18 adc $24 ; CPU:$E34A PRG:234A 65 24 sta $24 ; CPU:$E34C PRG:234C 85 24 - dec $20 ; CPU:$E34E PRG:234E C6 20 + dec ObjectScreenY ; CPU:$E34E PRG:234E C6 20 bne Gameplay_ReadTransferPointer_E344 ; CPU:$E350 PRG:2350 D0 F2 rts ; CPU:$E352 PRG:2352 60 ; Routine: Gameplay_ReadRamE360_E353 @@ -6099,10 +6099,10 @@ Gameplay_ReadTransferPointer_E344: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Gameplay_ReadRamE360_E353: - lda $E360,x ; CPU:$E353 PRG:2353 BD 60 E3 + lda GameplayScoreThresholdTable,x ; CPU:$E353 PRG:2353 BD 60 E3 sta $34 ; CPU:$E356 PRG:2356 85 34 inx ; CPU:$E358 PRG:2358 E8 - lda $E360,x ; CPU:$E359 PRG:2359 BD 60 E3 + lda GameplayScoreThresholdTable,x ; CPU:$E359 PRG:2359 BD 60 E3 sta $35 ; CPU:$E35C PRG:235C 85 35 inx ; CPU:$E35E PRG:235E E8 rts ; CPU:$E35F PRG:235F 60 @@ -6130,13 +6130,13 @@ Gameplay_ReturnToCaller_E398: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Gameplay_ReadStageProgress_E399: - lda $9C ; CPU:$E399 PRG:2399 A5 9C + lda ObjectWork0 ; CPU:$E399 PRG:2399 A5 9C bne Gameplay_ReadPlayerState_E3A7 ; CPU:$E39B PRG:239B D0 0A - lda $B1 ; CPU:$E39D PRG:239D A5 B1 + lda ObjectType ; CPU:$E39D PRG:239D A5 B1 bne Gameplay_ReadPlayerState_E3A7 ; CPU:$E39F PRG:239F D0 06 - inc $B1 ; CPU:$E3A1 PRG:23A1 E6 B1 + inc ObjectType ; CPU:$E3A1 PRG:23A1 E6 B1 lda #$06 ; CPU:$E3A3 PRG:23A3 A9 06 - sta $DF ; CPU:$E3A5 PRG:23A5 85 DF + sta SoundCommandState ; CPU:$E3A5 PRG:23A5 85 DF ; Routine: Gameplay_ReadPlayerState_E3A7 ; Global: Reachable code entry at CPU $E3A7 traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -6149,7 +6149,7 @@ Gameplay_ReadPlayerState_E3A7: beq Gameplay_ReadObjectType_E3E7 ; CPU:$E3A9 PRG:23A9 F0 3C cmp #$02 ; CPU:$E3AB PRG:23AB C9 02 beq Gameplay_ReturnToCaller_E398 ; CPU:$E3AD PRG:23AD F0 E9 - lda $33 ; CPU:$E3AF PRG:23AF A5 33 + lda FrameCounter ; CPU:$E3AF PRG:23AF A5 33 and #$01 ; CPU:$E3B1 PRG:23B1 29 01 bne Gameplay_ReadZpAA_E3BD ; CPU:$E3B3 PRG:23B3 D0 08 dec $A9 ; CPU:$E3B5 PRG:23B5 C6 A9 @@ -6166,15 +6166,15 @@ Gameplay_ReadPlayerState_E3A7: Gameplay_ReadZpAA_E3BD: jsr Object_ReadStageIndex_CFED ; CPU:$E3BD PRG:23BD 20 ED CF lda $AA ; CPU:$E3C0 PRG:23C0 A5 AA - cmp $28 ; CPU:$E3C2 PRG:23C2 C5 28 + cmp ObjectSpawnParam ; CPU:$E3C2 PRG:23C2 C5 28 bne Gameplay_ReturnToCaller_E3E6 ; CPU:$E3C4 PRG:23C4 D0 20 - lda $2A ; CPU:$E3C6 PRG:23C6 A5 2A + lda ObjectSpawnX ; CPU:$E3C6 PRG:23C6 A5 2A cmp $AB ; CPU:$E3C8 PRG:23C8 C5 AB bne Gameplay_ReturnToCaller_E3E6 ; CPU:$E3CA PRG:23CA D0 1A lda #$04 ; CPU:$E3CC PRG:23CC A9 04 - sta $DF ; CPU:$E3CE PRG:23CE 85 DF - ldx $9D ; CPU:$E3D0 PRG:23D0 A6 9D - lda $E4BC,x ; CPU:$E3D2 PRG:23D2 BD BC E4 + sta SoundCommandState ; CPU:$E3CE PRG:23CE 85 DF + ldx ObjectWork1 ; CPU:$E3D0 PRG:23D0 A6 9D + lda GameplayPowerupMaskTable,x ; CPU:$E3D2 PRG:23D2 BD BC E4 cmp #$64 ; CPU:$E3D5 PRG:23D5 C9 64 bcc Gameplay_CallHelper_E3DF ; CPU:$E3D7 PRG:23D7 90 06 jsr Menu_WriteObjectWorkX_DD6B ; CPU:$E3D9 PRG:23D9 20 6B DD @@ -6215,10 +6215,10 @@ Gameplay_ReturnToCaller_E3E6: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Gameplay_ReadObjectType_E3E7: - lda $28 ; CPU:$E3E7 PRG:23E7 A5 28 + lda ObjectSpawnParam ; CPU:$E3E7 PRG:23E7 A5 28 cmp #$01 ; CPU:$E3E9 PRG:23E9 C9 01 bne Gameplay_ReadObjectState_E401 ; CPU:$E3EB PRG:23EB D0 14 - lda $2A ; CPU:$E3ED PRG:23ED A5 2A + lda ObjectSpawnX ; CPU:$E3ED PRG:23ED A5 2A cmp #$01 ; CPU:$E3EF PRG:23EF C9 01 bne Gameplay_IncrementRemoteControl_E3F8 ; CPU:$E3F1 PRG:23F1 D0 05 inc $A0 ; CPU:$E3F3 PRG:23F3 E6 A0 @@ -6245,7 +6245,7 @@ Gameplay_IncrementRemoteControl_E3F8: Gameplay_ReadObjectState_E401: cmp #$1D ; CPU:$E401 PRG:2401 C9 1D bne Gameplay_ReadObjectType_E416 ; CPU:$E403 PRG:2403 D0 11 - lda $2A ; CPU:$E405 PRG:2405 A5 2A + lda ObjectSpawnX ; CPU:$E405 PRG:2405 A5 2A cmp #$01 ; CPU:$E407 PRG:2407 C9 01 bne Gameplay_IncrementWallPass_E410 ; CPU:$E409 PRG:2409 D0 05 inc $A1 ; CPU:$E40B PRG:240B E6 A1 @@ -6269,12 +6269,12 @@ Gameplay_IncrementWallPass_E410: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Gameplay_ReadObjectType_E416: - lda $28 ; CPU:$E416 PRG:2416 A5 28 + lda ObjectSpawnParam ; CPU:$E416 PRG:2416 A5 28 cmp #$01 ; CPU:$E418 PRG:2418 C9 01 beq Gameplay_ReadStageIndex_E434 ; CPU:$E41A PRG:241A F0 18 cmp #$1D ; CPU:$E41C PRG:241C C9 1D beq Gameplay_ReadStageIndex_E434 ; CPU:$E41E PRG:241E F0 14 - lda $2A ; CPU:$E420 PRG:2420 A5 2A + lda ObjectSpawnX ; CPU:$E420 PRG:2420 A5 2A cmp #$01 ; CPU:$E422 PRG:2422 C9 01 beq Gameplay_ReadStageIndex_E434 ; CPU:$E424 PRG:2424 F0 0E cmp #$0B ; CPU:$E426 PRG:2426 C9 0B @@ -6292,7 +6292,7 @@ Gameplay_ReadObjectType_E416: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Gameplay_ReadStageIndex_E434: - ldx $9D ; CPU:$E434 PRG:2434 A6 9D + ldx ObjectWork1 ; CPU:$E434 PRG:2434 A6 9D beq Gameplay_ReadPlayerLives_E448 ; CPU:$E436 PRG:2436 F0 10 dex ; CPU:$E438 PRG:2438 CA beq Gameplay_ReadStageProgress_E468 ; CPU:$E439 PRG:2439 F0 2D @@ -6313,9 +6313,9 @@ Gameplay_ReadStageIndex_E434: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Gameplay_ReadPlayerLives_E448: - lda $9E ; CPU:$E448 PRG:2448 A5 9E + lda ObjectWork2 ; CPU:$E448 PRG:2448 A5 9E bne Gameplay_ReturnToCaller_E467 ; CPU:$E44A PRG:244A D0 1B - lda $9F ; CPU:$E44C PRG:244C A5 9F + lda ObjectWork3 ; CPU:$E44C PRG:244C A5 9F beq Gameplay_ReturnToCaller_E467 ; CPU:$E44E PRG:244E F0 17 ; Routine: Gameplay_ReadPlayerState_E450 ; Global: Reachable code entry at CPU $E450 traced from the interrupt-root control-flow graph. @@ -6353,7 +6353,7 @@ Gameplay_ReturnToCaller_E467: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Gameplay_ReadStageProgress_E468: - lda $9C ; CPU:$E468 PRG:2468 A5 9C + lda ObjectWork0 ; CPU:$E468 PRG:2468 A5 9C bne Gameplay_ReturnToCaller_E467 ; CPU:$E46A PRG:246A D0 FB lda $A0 ; CPU:$E46C PRG:246C A5 A0 beq Gameplay_ReturnToCaller_E467 ; CPU:$E46E PRG:246E F0 F7 @@ -6372,9 +6372,9 @@ Gameplay_ReadStageProgress_E468: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Gameplay_ReadStageProgress_E47D: - lda $9C ; CPU:$E47D PRG:247D A5 9C + lda ObjectWork0 ; CPU:$E47D PRG:247D A5 9C bne Gameplay_ReturnToCaller_E467 ; CPU:$E47F PRG:247F D0 E6 - lda $A4 ; CPU:$E481 PRG:2481 A5 A4 + lda BonusTimer ; CPU:$E481 PRG:2481 A5 A4 beq Gameplay_ReadPlayerState_E450 ; CPU:$E483 PRG:2483 F0 CB rts ; CPU:$E485 PRG:2485 60 ; Routine: Gameplay_ReadFlamePass_E486 @@ -6397,7 +6397,7 @@ Gameplay_ReadFlamePass_E486: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Gameplay_ReadBombCapacity_E48D: - lda $9F ; CPU:$E48D PRG:248D A5 9F + lda ObjectWork3 ; CPU:$E48D PRG:248D A5 9F beq Gameplay_ReturnToCaller_E467 ; CPU:$E48F PRG:248F F0 D6 lda $A6 ; CPU:$E491 PRG:2491 A5 A6 cmp #$F8 ; CPU:$E493 PRG:2493 C9 F8 @@ -6411,13 +6411,13 @@ Gameplay_ReadBombCapacity_E48D: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Gameplay_ReadPlayerLives_E498: - lda $9E ; CPU:$E498 PRG:2498 A5 9E + lda ObjectWork2 ; CPU:$E498 PRG:2498 A5 9E bne Gameplay_ReturnToCaller_E467 ; CPU:$E49A PRG:249A D0 CB lda $58 ; CPU:$E49C PRG:249C A5 58 asl a ; CPU:$E49E PRG:249E 0A clc ; CPU:$E49F PRG:249F 18 adc #$32 ; CPU:$E4A0 PRG:24A0 69 32 - cmp $A4 ; CPU:$E4A2 PRG:24A2 C5 A4 + cmp BonusTimer ; CPU:$E4A2 PRG:24A2 C5 A4 beq Gameplay_ReadBonusTimer_E4A8 ; CPU:$E4A4 PRG:24A4 F0 02 bcs Gameplay_ReturnToCaller_E467 ; CPU:$E4A6 PRG:24A6 B0 BF ; Routine: Gameplay_ReadBonusTimer_E4A8 @@ -6453,7 +6453,7 @@ Gameplay_ReadZp58_E4AF: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Gameplay_WriteStageIndex_E4B9: - sta $9D ; CPU:$E4B9 PRG:24B9 85 9D + sta ObjectWork1 ; CPU:$E4B9 PRG:24B9 85 9D rts ; CPU:$E4BB PRG:24BB 60 ; Data region: CPU $E4BC-$E4C1; unreachable by direct recursive trace. @@ -6468,7 +6468,7 @@ GameplayPowerupMaskTable: ; Confidence: High for reachability and encoding; semantic role provisional. Gameplay_WriteGameMode_E4C2: lda #$00 ; CPU:$E4C2 PRG:24C2 A9 00 - sta $B5 ; CPU:$E4C4 PRG:24C4 85 B5 + sta FrameDelay ; CPU:$E4C4 PRG:24C4 85 B5 ; Routine: Gameplay_ReturnToCaller_E4C6 ; Global: Reachable code entry at CPU $E4C6 traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -6488,14 +6488,14 @@ Gameplay_ReturnToCaller_E4C6: Gameplay_ReadZpB2_E4C7: lda $B2 ; CPU:$E4C7 PRG:24C7 A5 B2 bne Gameplay_ReturnToCaller_E4C6 ; CPU:$E4C9 PRG:24C9 D0 FB - lda $B5 ; CPU:$E4CB PRG:24CB A5 B5 + lda FrameDelay ; CPU:$E4CB PRG:24CB A5 B5 beq Gameplay_ReturnToCaller_E4C6 ; CPU:$E4CD PRG:24CD F0 F7 bmi Gameplay_WriteSoundChannelIndex_E52A ; CPU:$E4CF PRG:24CF 30 59 cmp #$0B ; CPU:$E4D1 PRG:24D1 C9 0B bcs Gameplay_WriteGameMode_E4C2 ; CPU:$E4D3 PRG:24D3 B0 ED sta $B4 ; CPU:$E4D5 PRG:24D5 85 B4 ora #$80 ; CPU:$E4D7 PRG:24D7 09 80 - sta $B5 ; CPU:$E4D9 PRG:24D9 85 B5 + sta FrameDelay ; CPU:$E4D9 PRG:24D9 85 B5 dec $B4 ; CPU:$E4DB PRG:24DB C6 B4 lda $B4 ; CPU:$E4DD PRG:24DD A5 B4 asl a ; CPU:$E4DF PRG:24DF 0A @@ -6652,7 +6652,7 @@ Gameplay_WriteZpD6_E573: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Gameplay_ReadSoundDelay0_E57B: - ldy $E1,x ; CPU:$E57B PRG:257B B4 E1 + ldy SoundDelay0,x ; CPU:$E57B PRG:257B B4 E1 bne Gameplay_ReturnToCaller_E5C6 ; CPU:$E57D PRG:257D D0 47 lda $B4 ; CPU:$E57F PRG:257F A5 B4 cmp #$00 ; CPU:$E581 PRG:2581 C9 00 @@ -6769,7 +6769,7 @@ Gameplay_SubtractFromSoundTempo_E5D6: tay ; CPU:$E5DC PRG:25DC A8 lda $E5E7,y ; CPU:$E5DD PRG:25DD B9 E7 E5 pha ; CPU:$E5E0 PRG:25E0 48 - lda $E5E6,y ; CPU:$E5E1 PRG:25E1 B9 E6 E5 + lda GameplayAndSoundDataTables,y ; CPU:$E5E1 PRG:25E1 B9 E6 E5 pha ; CPU:$E5E4 PRG:25E4 48 rts ; CPU:$E5E5 PRG:25E5 60 @@ -6791,9 +6791,9 @@ GameplayAndSoundDataTables: InitializeApu: lda #$00 ; CPU:$E642 PRG:2642 A9 00 sta APUDMCDIRECT ; CPU:$E644 PRG:2644 8D 11 40 - sta $E1 ; CPU:$E647 PRG:2647 85 E1 - sta $E2 ; CPU:$E649 PRG:2649 85 E2 - sta $E3 ; CPU:$E64B PRG:264B 85 E3 + sta SoundDelay0 ; CPU:$E647 PRG:2647 85 E1 + sta SoundDelay1 ; CPU:$E649 PRG:2649 85 E2 + sta SoundDelay2 ; CPU:$E64B PRG:264B 85 E3 sta APUPULSE1CTRL ; CPU:$E64D PRG:264D 8D 00 40 sta APUPULSE2CTRL ; CPU:$E650 PRG:2650 8D 04 40 sta APUTRIANGLECTRL ; CPU:$E653 PRG:2653 8D 08 40 @@ -6818,9 +6818,9 @@ SoundUpdate: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Sound_ReadSoundDelay0_E661: - lda $E1,x ; CPU:$E661 PRG:2661 B5 E1 + lda SoundDelay0,x ; CPU:$E661 PRG:2661 B5 E1 beq Sound_ReadSoundCommandState_E667 ; CPU:$E663 PRG:2663 F0 02 - dec $E1,x ; CPU:$E665 PRG:2665 D6 E1 + dec SoundDelay0,x ; CPU:$E665 PRG:2665 D6 E1 ; Routine: Sound_ReadSoundCommandState_E667 ; Global: Reachable code entry at CPU $E667 traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -6831,7 +6831,7 @@ Sound_ReadSoundDelay0_E661: Sound_ReadSoundCommandState_E667: dex ; CPU:$E667 PRG:2667 CA bpl Sound_ReadSoundDelay0_E661 ; CPU:$E668 PRG:2668 10 F7 - lda $DF ; CPU:$E66A PRG:266A A5 DF + lda SoundCommandState ; CPU:$E66A PRG:266A A5 DF bmi Sound_ReadRamE6BC_E69C ; CPU:$E66C PRG:266C 30 2E cmp #$07 ; CPU:$E66E PRG:266E C9 07 bcs Sound_ReturnToCaller_E6AC ; CPU:$E670 PRG:2670 B0 3A @@ -6841,7 +6841,7 @@ Sound_ReadSoundCommandState_E667: beq Sound_WriteSoundCommandState_E681 ; CPU:$E678 PRG:2678 F0 07 txa ; CPU:$E67A PRG:267A 8A ora #$80 ; CPU:$E67B PRG:267B 09 80 - sta $DF ; CPU:$E67D PRG:267D 85 DF + sta SoundCommandState ; CPU:$E67D PRG:267D 85 DF bne Sound_ReadRamE6BC_E69C ; CPU:$E67F PRG:267F D0 1B ; Routine: Sound_WriteSoundCommandState_E681 ; Global: Reachable code entry at CPU $E681 traced from the interrupt-root control-flow graph. @@ -6853,17 +6853,17 @@ Sound_ReadSoundCommandState_E667: Sound_WriteSoundCommandState_E681: sta IndirectPtrLo ; CPU:$E681 PRG:2681 85 E0 ora #$80 ; CPU:$E683 PRG:2683 09 80 - sta $DF ; CPU:$E685 PRG:2685 85 DF + sta SoundCommandState ; CPU:$E685 PRG:2685 85 DF lda #$00 ; CPU:$E687 PRG:2687 A9 00 sta IndirectPtrHi ; CPU:$E689 PRG:2689 85 E1 - sta $E2 ; CPU:$E68B PRG:268B 85 E2 - sta $E3 ; CPU:$E68D PRG:268D 85 E3 + sta SoundDelay1 ; CPU:$E68B PRG:268B 85 E2 + sta SoundDelay2 ; CPU:$E68D PRG:268D 85 E3 lda IndirectPtrLo ; CPU:$E68F PRG:268F A5 E0 asl a ; CPU:$E691 PRG:2691 0A tax ; CPU:$E692 PRG:2692 AA lda $E6AE,x ; CPU:$E693 PRG:2693 BD AE E6 pha ; CPU:$E696 PRG:2696 48 - lda $E6AD,x ; CPU:$E697 PRG:2697 BD AD E6 + lda SoundDispatchAddressTable,x ; CPU:$E697 PRG:2697 BD AD E6 pha ; CPU:$E69A PRG:269A 48 rts ; CPU:$E69B PRG:269B 60 ; Routine: Sound_ReadRamE6BC_E69C @@ -6940,7 +6940,7 @@ Sound_UpdateAudioChannelPath_E6CF: ; Confidence: High for reachability and encoding; semantic role provisional. Sound_UpdateAudioChannelPath_E6DF: lda #$10 ; CPU:$E6DD PRG:26DD ?? - sta $E2 ; CPU:$E6DF PRG:26DF ?? + sta SoundDelay1 ; CPU:$E6DF PRG:26DF ?? lda #$01 ; CPU:$E6E1 PRG:26E1 ?? sta APUNOISECTRL ; CPU:$E6E3 PRG:26E3 ?? lda #$0F ; CPU:$E6E5 PRG:26E5 ?? @@ -6956,7 +6956,7 @@ Sound_UpdateAudioChannelPath_E6DF: lda #$02 ; CPU:$E6F9 PRG:26F9 ?? sta APUPULSE2TIMERHI ; CPU:$E6FB PRG:26FB ?? lda #$04 ; CPU:$E6FD PRG:26FD ?? - sta $E4 ; CPU:$E6FF PRG:26FF ?? + sta RandomStateAlt ; CPU:$E6FF PRG:26FF ?? rts ; CPU:$E701 PRG:2701 ?? ; Routine: Sound_UpdateAudioChannelPath_E70B ; Global: Reachable code entry at CPU $E70B traced from the interrupt-root control-flow graph. @@ -6996,9 +6996,9 @@ Sound_ReturnToCaller_E727: ; Confidence: High for reachability and encoding; semantic role provisional. Sound_WriteSoundDelay1_E728: lda #$FF ; CPU:$E71D PRG:271D ?? - sta $E2 ; CPU:$E71F PRG:271F ?? + sta SoundDelay1 ; CPU:$E71F PRG:271F ?? lda #$00 ; CPU:$E721 PRG:2721 ?? - sta $E4 ; CPU:$E723 PRG:2723 ?? + sta RandomStateAlt ; CPU:$E723 PRG:2723 ?? lda #$04 ; CPU:$E725 PRG:2725 ?? sta $E5 ; CPU:$E727 PRG:2727 ?? ; Routine: Sound_ReadSoundEnvelopeCounter_E734 @@ -7009,13 +7009,13 @@ Sound_WriteSoundDelay1_E728: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Sound_ReadSoundEnvelopeCounter_E734: - lda $E4 ; CPU:$E729 PRG:2729 ?? + lda RandomStateAlt ; CPU:$E729 PRG:2729 ?? bne Sound_DecrementSoundEnvelopeCounter_E760 ; CPU:$E72B PRG:272B ?? lda $E5 ; CPU:$E72D PRG:272D ?? bne Sound_UpdateAudioChannelPath_E743 ; CPU:$E72F PRG:272F ?? lda #$00 ; CPU:$E731 PRG:2731 ?? sta IndirectPtrLo ; CPU:$E733 PRG:2733 ?? - sta $E2 ; CPU:$E735 PRG:2735 ?? + sta SoundDelay1 ; CPU:$E735 PRG:2735 ?? rts ; CPU:$E737 PRG:2737 ?? ; Routine: Sound_UpdateAudioChannelPath_E743 ; Global: Reachable code entry at CPU $E743 traced from the interrupt-root control-flow graph. @@ -7036,7 +7036,7 @@ Sound_UpdateAudioChannelPath_E743: lda #$10 ; CPU:$E749 PRG:2749 ?? sta APUPULSE2TIMERHI ; CPU:$E74B PRG:274B ?? lda #$04 ; CPU:$E74D PRG:274D ?? - sta $E4 ; CPU:$E74F PRG:274F ?? + sta RandomStateAlt ; CPU:$E74F PRG:274F ?? ; Routine: Sound_DecrementSoundEnvelopeCounter_E760 ; Global: Reachable code entry at CPU $E760 traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -7045,7 +7045,7 @@ Sound_UpdateAudioChannelPath_E743: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Sound_DecrementSoundEnvelopeCounter_E760: - dec $E4 ; CPU:$E751 PRG:2751 ?? + dec RandomStateAlt ; CPU:$E751 PRG:2751 ?? rts ; CPU:$E753 PRG:2753 ?? ; Data region: CPU $E763-$E766; unreachable by direct recursive trace. @@ -7060,7 +7060,7 @@ SoundHandlerData: ; Confidence: High for reachability and encoding; semantic role provisional. Sound_UpdateAudioChannelPath_E767: lda #$30 ; CPU:$E759 PRG:2759 ?? - sta $E2 ; CPU:$E75B PRG:275B ?? + sta SoundDelay1 ; CPU:$E75B PRG:275B ?? lda #$09 ; CPU:$E75D PRG:275D ?? sta APUNOISECTRL ; CPU:$E75F PRG:275F ?? lda #$07 ; CPU:$E761 PRG:2761 ?? @@ -7087,11 +7087,11 @@ Sound_UpdateAudioChannelPath_E767: ; Confidence: High for reachability and encoding; semantic role provisional. Sound_WriteSoundEnvelopeCounter_E793: lda #$1D ; CPU:$E77F PRG:277F ?? - sta $E4 ; CPU:$E781 PRG:2781 ?? + sta RandomStateAlt ; CPU:$E781 PRG:2781 ?? lda #$FF ; CPU:$E783 PRG:2783 ?? sta IndirectPtrHi ; CPU:$E785 PRG:2785 ?? - sta $E2 ; CPU:$E787 PRG:2787 ?? - sta $E3 ; CPU:$E789 PRG:2789 ?? + sta SoundDelay1 ; CPU:$E787 PRG:2787 ?? + sta SoundDelay2 ; CPU:$E789 PRG:2789 ?? ; Routine: Sound_UpdateAudioChannelPath_E79F ; Global: Reachable code entry at CPU $E79F traced from the interrupt-root control-flow graph. ; Local: Performs the instruction sequence below; semantic purpose remains provisional. @@ -7100,17 +7100,17 @@ Sound_WriteSoundEnvelopeCounter_E793: ; Side effects: Registers, flags, memory, and hardware registers written below. ; Confidence: High for reachability and encoding; semantic role provisional. Sound_UpdateAudioChannelPath_E79F: - dec $E4 ; CPU:$E78B PRG:278B ?? + dec RandomStateAlt ; CPU:$E78B PRG:278B ?? beq Sound_HandleControl_E7D1 ; CPU:$E78D PRG:278D ?? - lda $E4 ; CPU:$E78F PRG:278F ?? + lda RandomStateAlt ; CPU:$E78F PRG:278F ?? and #$03 ; CPU:$E791 PRG:2791 ?? bne Sound_ReturnToCaller_E7D0 ; CPU:$E793 PRG:2793 ?? - lda $E4 ; CPU:$E795 PRG:2795 ?? + lda RandomStateAlt ; CPU:$E795 PRG:2795 ?? lsr a ; CPU:$E797 PRG:2797 ?? lsr a ; CPU:$E799 PRG:2799 ?? and #$01 ; CPU:$E79B PRG:279B ?? tax ; CPU:$E79D PRG:279D ?? - lda $E7DE,x ; CPU:$E79F PRG:279F ?? + lda SoundSequenceAndPaddingData,x ; CPU:$E79F PRG:279F ?? sta APUPULSE1TIMERLO ; CPU:$E7A1 PRG:27A1 ?? lda $E7E0,x ; CPU:$E7A3 PRG:27A3 ?? sta APUPULSE2TIMERLO ; CPU:$E7A5 PRG:27A5 ?? diff --git a/Bomberman (U)/copilot/reconstructed.lbl b/Bomberman (U)/copilot/reconstructed.lbl index eb393fb..bd2195e 100644 --- a/Bomberman (U)/copilot/reconstructed.lbl +++ b/Bomberman (U)/copilot/reconstructed.lbl @@ -44,7 +44,6 @@ al 00E4E5 .Gameplay_ReadRamE87C_E4E5 al 00E52A .Gameplay_WriteSoundChannelIndex_E52A al 00E4C6 .Gameplay_ReturnToCaller_E4C6 al 00E4C2 .Gameplay_WriteGameMode_E4C2 -al 00E4BC .GameplayPowerupMaskTable al 00E4B9 .Gameplay_WriteStageIndex_E4B9 al 00E4A8 .Gameplay_ReadBonusTimer_E4A8 al 00E450 .Gameplay_ReadPlayerState_E450 @@ -62,6 +61,7 @@ al 00E3F8 .Gameplay_IncrementRemoteControl_E3F8 al 00E401 .Gameplay_ReadObjectState_E401 al 00E3E2 .Gameplay_WritePlayerState_E3E2 al 00E3DF .Gameplay_CallHelper_E3DF +al 00E4BC .GameplayPowerupMaskTable al 00E3E6 .Gameplay_ReturnToCaller_E3E6 al 00E3BD .Gameplay_ReadZpAA_E3BD al 00E3E7 .Gameplay_ReadObjectType_E3E7 @@ -78,7 +78,6 @@ al 00E1DC .Gameplay_RetreatIndexX_E1DC al 00E1D0 .Gameplay_TransferVramDataPath_E1D0 al 00E1E0 .Gameplay_ReadRamE1E5_E1E0 al 00E1C4 .Gameplay_SetVramAddressPath_E1C4 -al 00DF8C .MenuPaletteAndScreenData al 00DF83 .Menu_TransferVramDataPath_DF83 al 00DF7C .Menu_HandleControl_DF7C al 00DF6F .Menu_TransferVramDataPath_DF6F @@ -87,6 +86,7 @@ al 00DF60 .Menu_HandleControl_DF60 al 00DF76 .Menu_TransferVramDataPath_DF76 al 00DF52 .Menu_TransferVramDataPath_DF52 al 00DF4B .Menu_HandleControl_DF4B +al 00DF8C .MenuPaletteAndScreenData al 00DF37 .Menu_TransferVramDataPath_DF37 al 00DF18 .Menu_TransferVramDataPath_DF18 al 00DF0E .Menu_TransferVramDataPath_DF0E @@ -103,9 +103,9 @@ al 00DE78 .StatusScreenPaletteAddressTable al 00DE69 .Menu_TransferVramDataPath_DE69 al 00DE4E .StatusScreenValueAddressTable al 00DE33 .Menu_TransferVramDataPath_DE33 -al 00DE15 .StatusScreenTextPointerTable al 00DF5D .Menu_HandleControl_DF5D al 00DE07 .Menu_TransferVramDataPath_DE07 +al 00DE15 .StatusScreenTextPointerTable al 00DDE1 .Menu_TransferVramDataPath_DDE1 al 00DDD2 .Menu_TransferVramDataPath_DDD2 al 00DDBB .Menu_ReadZp61_DDBB @@ -118,14 +118,14 @@ al 00DD77 .Menu_WriteObjectWorkX_DD77 al 00DD8D .Menu_AddToZp61_DD8D al 00DDC2 .Menu_ReadObjectWorkX_DDC2 al 00DD6B .Menu_WriteObjectWorkX_DD6B -al 00DD62 .StatusDigitTileTable al 00E2BD .Gameplay_ReadObjectMode_E2BD +al 00DD62 .StatusDigitTileTable al 00DD50 .Menu_TransferVramDataPath_DD50 al 00DD22 .StatusScreenAddressTable al 00DD15 .Menu_TransferVramDataPath_DD15 -al 00DC53 .MenuScreenConstructionData al 00DC52 .Menu_ReturnToCaller_DC52 al 00DC44 .Menu_TransferVramDataPath_DC44 +al 00DC53 .MenuScreenConstructionData al 00DC26 .Menu_IncrementWorkIndex_DC26 al 00DC39 .Menu_ReadRamDC53_DC39 al 00DD04 .Menu_SaveAccumulator_DD04 @@ -153,12 +153,12 @@ al 00DAC9 .Menu_TransferVramDataPath_DAC9 al 00DAB5 .Menu_TransferVramDataPath_DAB5 al 00DC41 .Menu_CallHelper_DC41 al 00DF27 .UploadMenuPalette -al 00D994 .StageLayoutPointerData al 00D993 .Stage_ReturnToCaller_D993 al 00D984 .Stage_RotateLeftZp19_D984 al 00D974 .Stage_ShiftLeftZp1E_D974 al 00D97C .Stage_WriteZp19_D97C al 00D93A .Stage_WriteZp17_D93A +al 00D994 .StageLayoutPointerData al 00D912 .Stage_ReadZp17_D912 al 00D901 .Stage_ReadZp14_D901 al 00D708 .GameplayParameterTables @@ -282,10 +282,9 @@ al 00CA66 .Gameplay_WriteTransferPointer_CA66 al 00CA47 .GameplayObjectAttributeTable al 00CA43 .Gameplay_RetreatIndexX_CA43 al 00CA1D .Gameplay_ReadRam03A0_CA1D -al 00CA11 .GameplayObjectClassTable al 00CA10 .Gameplay_ReturnToCaller_CA10 -al 00C9DE .GameplayDirectionDeltaTable al 00C9E3 .Gameplay_TestZp2E_C9E3 +al 00C9DE .GameplayDirectionDeltaTable al 00C9B5 .Gameplay_ReturnToCaller_C9B5 al 00C9A6 .Gameplay_WriteTransferPointer_C9A6 al 00C999 .Gameplay_ReadFlamePass_C999 @@ -305,6 +304,7 @@ al 00C8AC .Gameplay_ReturnToCaller_C8AC al 00C8A1 .Gameplay_WriteRam04D6_C8A1 al 00C89E .Gameplay_WriteRam04D6_C89E al 00CBE5 .Gameplay_ReadRam03E6_CBE5 +al 00CA11 .GameplayObjectClassTable al 00C835 .Gameplay_Dispatch_C835 al 00C8AD .Gameplay_HandleControl_C8AD al 00C828 .Gameplay_IncrementBonusTimer_C828 @@ -320,7 +320,6 @@ al 00C8A6 .Gameplay_RetreatIndexX_C8A6 al 00C7A4 .Gameplay_Dispatch_C7A4 al 00C7A7 .Gameplay_ReadRam0486_C7A7 al 00C79F .Gameplay_ReadRam03E6_C79F -al 00C75D .MainStateDispatchTable al 00C75C .Main_ReturnToCaller_C75C al 00C74E .Main_RetreatIndexY_C74E al 00C707 .Main_ReadRam0576_C707 @@ -332,6 +331,7 @@ al 00C6D6 .Main_ReadRamC764_C6D6 al 00C6D0 .Main_ReadRam0526_C6D0 al 00C6B2 .Main_WriteZp32_C6B2 al 00C6DA .Main_ReadZp5C_C6DA +al 00C75D .MainStateDispatchTable al 00C688 .Main_ReadRam0436_C688 al 00C6CD .Main_Dispatch_C6CD al 00C66E .Main_ReadRam03E6_C66E @@ -409,8 +409,8 @@ al 00C33C .Main_WriteZpDB_C33C al 00C333 .Main_WriteZp00_C333 al 00C317 .Main_WriteSoundDispatchIndex_C317 al 00C307 .WaitForFrameBoundary -al 00C2E7 .SystemPaletteData al 00C2D6 .Ppu_SetVramAddress_C2D6 +al 00C2E7 .SystemPaletteData al 00C2CC .Ppu_TransferVramDataPath_C2CC al 00C2BD .Ppu_UpdatePpuStatePath_C2BD al 00C290 .Ppu_WaitPpuStatusPath_C290 diff --git a/CIRCUS/OVERVIEW.md b/CIRCUS/OVERVIEW.md index 688e56a..b9c3965 100644 --- a/CIRCUS/OVERVIEW.md +++ b/CIRCUS/OVERVIEW.md @@ -11,10 +11,10 @@ This document describes the execution flow of the disassembled CIRCUS PRG bank ( | 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` (~12,755 lines) | -| Output | `reconstructed_prg.bin` (16,384 bytes) | +| Output | `reconstructed.nes` (whole ROM: 16-byte header + 16,384-byte PRG + 8,192-byte CHR) | ### Interrupt vectors (CPU $FFFA–$FFFF) @@ -30,7 +30,7 @@ This document describes the execution flow of the disassembled CIRCUS PRG bank ( `make` in `copilot/` assembles `prg.s` with `ca65`, links with `ld65`, and verifies against `prg.bin`. -**Verification result: BYTE-IDENTICAL** — `reconstructed_prg.bin` matches `prg.bin` exactly (all 16,384 bytes), and `prg.bin` matches the PRG bank of `CIRCUS.NES`. +**Verification result: BYTE-IDENTICAL** — `reconstructed.nes` matches `rom.nes` exactly (header + PRG + CHR). --- @@ -215,8 +215,8 @@ Full list in `copilot/locals.inc` (161 lines). ## 10. Build ```bash -cd "_wip/CIRCUS/copilot" -make # → ca65 + ld65 + cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" +cd "CIRCUS/copilot" +make # → ca65 + ld65 + cmp reconstructed.nes rom.nes → "Byte-identical ROM verified." ``` --- diff --git a/CIRCUS/copilot/prg.s b/CIRCUS/copilot/prg.s index 9b33626..cba2b8a 100644 --- a/CIRCUS/copilot/prg.s +++ b/CIRCUS/copilot/prg.s @@ -33,7 +33,7 @@ Reset: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- WaitForFirstPpuWarmup: - lda $2002 ; CPU:$C002 PRG:0002 AD 02 20 + lda PPUSTATUS ; CPU:$C002 PRG:0002 AD 02 20 bpl WaitForFirstPpuWarmup ; CPU:$C005 PRG:0005 10 FB ; ----------------------------------------------------------------------------- ; Routine: WaitForSecondPpuWarmup @@ -45,7 +45,7 @@ WaitForFirstPpuWarmup: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- WaitForSecondPpuWarmup: - lda $2002 ; CPU:$C007 PRG:0007 AD 02 20 + lda PPUSTATUS ; CPU:$C007 PRG:0007 AD 02 20 bpl WaitForSecondPpuWarmup ; CPU:$C00A PRG:000A 10 FB jsr $C0B8 ; CPU:$C00C PRG:000C 20 B8 C0 ldx #$FF ; CPU:$C00F PRG:000F A2 FF @@ -119,7 +119,7 @@ ClearUpperRamPages: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ClearUpperRamPageLoop: - sta ($E0),y ; CPU:$C037 PRG:0037 91 E0 + sta (IndirectPointerLo),y ; CPU:$C037 PRG:0037 91 E0 dey ; CPU:$C039 PRG:0039 88 bne ClearUpperRamPageLoop ; CPU:$C03A PRG:003A D0 FB dec IndirectPointerHi ; CPU:$C03C PRG:003C C6 E1 @@ -181,13 +181,13 @@ NmiHandler: pha ; CPU:$C05C PRG:005C 48 tya ; CPU:$C05D PRG:005D 98 pha ; CPU:$C05E PRG:005E 48 - lda $2002 ; CPU:$C05F PRG:005F AD 02 20 + lda PPUSTATUS ; CPU:$C05F PRG:005F AD 02 20 lda Zp04 ; CPU:$C062 PRG:0062 A5 04 bne ResetPpuScroll ; CPU:$C064 PRG:0064 D0 23 lda #$00 ; CPU:$C066 PRG:0066 A9 00 - sta $2003 ; CPU:$C068 PRG:0068 8D 03 20 + sta OAMADDR ; CPU:$C068 PRG:0068 8D 03 20 lda #$02 ; CPU:$C06B PRG:006B A9 02 - sta $4014 ; CPU:$C06D PRG:006D 8D 14 40 + sta OAMDMA ; CPU:$C06D PRG:006D 8D 14 40 inc Zp04 ; CPU:$C070 PRG:0070 E6 04 jsr $C0B8 ; CPU:$C072 PRG:0072 20 B8 C0 jsr $C1B7 ; CPU:$C075 PRG:0075 20 B7 C1 @@ -217,7 +217,7 @@ ApplyPpuMaskShadow: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- FinishNmiPpuUpdates: - sta $2001 ; CPU:$C084 PRG:0084 8D 01 20 + sta PPUMASK ; CPU:$C084 PRG:0084 8D 01 20 dec Zp04 ; CPU:$C087 PRG:0087 C6 04 ; ----------------------------------------------------------------------------- ; Routine: ResetPpuScroll @@ -229,10 +229,10 @@ FinishNmiPpuUpdates: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ResetPpuScroll: - lda $2002 ; CPU:$C089 PRG:0089 AD 02 20 + lda PPUSTATUS ; CPU:$C089 PRG:0089 AD 02 20 lda #$00 ; CPU:$C08C PRG:008C A9 00 - sta $2005 ; CPU:$C08E PRG:008E 8D 05 20 - sta $2005 ; CPU:$C091 PRG:0091 8D 05 20 + sta PPUSCROLL ; CPU:$C08E PRG:008E 8D 05 20 + sta PPUSCROLL ; CPU:$C091 PRG:0091 8D 05 20 lda #$7E ; CPU:$C094 PRG:0094 A9 7E jsr $C0C5 ; CPU:$C096 PRG:0096 20 C5 C0 jsr $F87C ; CPU:$C099 PRG:0099 20 7C F8 @@ -282,9 +282,9 @@ RestoreNmiRegisters: ; ----------------------------------------------------------------------------- InitializePpuControl: lda #$08 ; CPU:$C0B8 PRG:00B8 A9 08 - sta $2000 ; CPU:$C0BA PRG:00BA 8D 00 20 + sta PPUCTRL ; CPU:$C0BA PRG:00BA 8D 00 20 lda #$00 ; CPU:$C0BD PRG:00BD A9 00 - sta $2001 ; CPU:$C0BF PRG:00BF 8D 01 20 + sta PPUMASK ; CPU:$C0BF PRG:00BF 8D 01 20 rts ; CPU:$C0C2 PRG:00C2 60 ; ----------------------------------------------------------------------------- ; Routine: WritePpuCtrlShadowMasked @@ -308,7 +308,7 @@ WritePpuCtrlShadowMasked: ; ----------------------------------------------------------------------------- WriteMaskedPpuControl: and PpuCtrlShadow ; CPU:$C0C5 PRG:00C5 25 53 - sta $2000 ; CPU:$C0C7 PRG:00C7 8D 00 20 + sta PPUCTRL ; CPU:$C0C7 PRG:00C7 8D 00 20 rts ; CPU:$C0CA PRG:00CA 60 ; ----------------------------------------------------------------------------- ; Routine: SetVisiblePpuMask @@ -423,7 +423,7 @@ SecondaryStateEligibilityTable: DispatchStateHandler: jsr $C4CD ; CPU:$C1D5 PRG:01D5 20 CD C4 nop ; CPU:$C1D8 PRG:01D8 EA - cmp ($12,x) ; CPU:$C1D9 PRG:01D9 C1 12 + cmp (Zp12,x) ; CPU:$C1D9 PRG:01D9 C1 12 SecondaryStateHandlerPointerTable: .byte $C2, $3A, $C2, $5D, $C2, $7D, $C2, $F5, $C2, $03, $C3, $60, $C3, $8B, $C3 ; CPU:$C1DB PRG:01DB C2 3A C2 5D C2 7D C2 F5 C2 03 C3 60 C3 8B C3 @@ -999,13 +999,13 @@ InitializeApuAndPpu: ; ----------------------------------------------------------------------------- InitializeApuAndPpu_LoadAndContinue_C3C1: lda #$1F ; CPU:$C3C1 PRG:03C1 A9 1F - sta $4015 ; CPU:$C3C3 PRG:03C3 8D 15 40 + sta APUSTATUS ; CPU:$C3C3 PRG:03C3 8D 15 40 lda #$C0 ; CPU:$C3C6 PRG:03C6 A9 C0 - sta $4017 ; CPU:$C3C8 PRG:03C8 8D 17 40 + sta JOY2 ; CPU:$C3C8 PRG:03C8 8D 17 40 jsr $C0CB ; CPU:$C3CB PRG:03CB 20 CB C0 lda #$88 ; CPU:$C3CE PRG:03CE A9 88 sta PpuCtrlShadow ; CPU:$C3D0 PRG:03D0 85 53 - sta $2000 ; CPU:$C3D2 PRG:03D2 8D 00 20 + sta PPUCTRL ; CPU:$C3D2 PRG:03D2 8D 00 20 rts ; CPU:$C3D5 PRG:03D5 60 ; ----------------------------------------------------------------------------- ; Routine: InitializeNametablePages @@ -1084,7 +1084,7 @@ ClearPpuPage: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ClearPpuPage_OnNonzero_C3FA: - sta $2007 ; CPU:$C3FA PRG:03FA 8D 07 20 + sta PPUDATA ; CPU:$C3FA PRG:03FA 8D 07 20 dec TransferByteCount ; CPU:$C3FD PRG:03FD C6 E2 bne ClearPpuPage_OnNonzero_C3FA ; CPU:$C3FF PRG:03FF D0 F9 rts ; CPU:$C401 PRG:0401 60 @@ -1099,9 +1099,9 @@ ClearPpuPage_OnNonzero_C3FA: ; ----------------------------------------------------------------------------- ReadControllers: ldx #$01 ; CPU:$C402 PRG:0402 A2 01 - stx $4016 ; CPU:$C404 PRG:0404 8E 16 40 + stx JOY1 ; CPU:$C404 PRG:0404 8E 16 40 dex ; CPU:$C407 PRG:0407 CA - stx $4016 ; CPU:$C408 PRG:0408 8E 16 40 + stx JOY1 ; CPU:$C408 PRG:0408 8E 16 40 ldy #$08 ; CPU:$C40B PRG:040B A0 08 ; ----------------------------------------------------------------------------- ; Routine: ReadControllers_OnNonzero_C40D @@ -1113,13 +1113,13 @@ ReadControllers: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ReadControllers_OnNonzero_C40D: - lda $4016 ; CPU:$C40D PRG:040D AD 16 40 + lda JOY1 ; CPU:$C40D PRG:040D AD 16 40 sta ControllerReadScratch ; CPU:$C410 PRG:0410 85 E7 lsr a ; CPU:$C412 PRG:0412 4A ora ControllerReadScratch ; CPU:$C413 PRG:0413 05 E7 lsr a ; CPU:$C415 PRG:0415 4A rol Controller1Shift ; CPU:$C416 PRG:0416 26 E4 - lda $4017 ; CPU:$C418 PRG:0418 AD 17 40 + lda JOY2 ; CPU:$C418 PRG:0418 AD 17 40 sta ControllerReadScratch ; CPU:$C41B PRG:041B 85 E7 lsr a ; CPU:$C41D PRG:041D 4A ora ControllerReadScratch ; CPU:$C41E PRG:041E 05 E7 @@ -1315,7 +1315,7 @@ ReadControllers_CallNext_C4AA: ; ----------------------------------------------------------------------------- ReadControllers_OnNonzero_C4AF: lda ($E4),y ; CPU:$C4AF PRG:04AF B1 E4 - sta $2007 ; CPU:$C4B1 PRG:04B1 8D 07 20 + sta PPUDATA ; CPU:$C4B1 PRG:04B1 8D 07 20 iny ; CPU:$C4B4 PRG:04B4 C8 dec TransferByteCount ; CPU:$C4B5 PRG:04B5 C6 E2 bne ReadControllers_OnNonzero_C4AF ; CPU:$C4B7 PRG:04B7 D0 F6 @@ -1330,11 +1330,11 @@ ReadControllers_OnNonzero_C4AF: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ReadControllers_LoadIndexAndContinue_C4BA: - ldx $2002 ; CPU:$C4BA PRG:04BA AE 02 20 + ldx PPUSTATUS ; CPU:$C4BA PRG:04BA AE 02 20 ldx IndirectPointerHi ; CPU:$C4BD PRG:04BD A6 E1 - stx $2006 ; CPU:$C4BF PRG:04BF 8E 06 20 + stx PPUADDR ; CPU:$C4BF PRG:04BF 8E 06 20 ldx IndirectPointerLo ; CPU:$C4C2 PRG:04C2 A6 E0 - stx $2006 ; CPU:$C4C4 PRG:04C4 8E 06 20 + stx PPUADDR ; CPU:$C4C4 PRG:04C4 8E 06 20 rts ; CPU:$C4C7 PRG:04C7 60 ; ----------------------------------------------------------------------------- ; Routine: ReadControllers_LoadAndContinue_C4C8 @@ -1366,13 +1366,13 @@ ReadControllers_StoreAndContinue_C4CD: sta IndirectPointerLo ; CPU:$C4D1 PRG:04D1 85 E0 pla ; CPU:$C4D3 PRG:04D3 68 sta IndirectPointerHi ; CPU:$C4D4 PRG:04D4 85 E1 - lda ($E0),y ; CPU:$C4D6 PRG:04D6 B1 E0 + lda (IndirectPointerLo),y ; CPU:$C4D6 PRG:04D6 B1 E0 tax ; CPU:$C4D8 PRG:04D8 AA iny ; CPU:$C4D9 PRG:04D9 C8 - lda ($E0),y ; CPU:$C4DA PRG:04DA B1 E0 + lda (IndirectPointerLo),y ; CPU:$C4DA PRG:04DA B1 E0 sta IndirectPointerHi ; CPU:$C4DC PRG:04DC 85 E1 stx IndirectPointerLo ; CPU:$C4DE PRG:04DE 86 E0 - jmp ($00E0) ; CPU:$C4E0 PRG:04E0 6C E0 00 + jmp (IndirectPointerLo) ; CPU:$C4E0 PRG:04E0 6C E0 00 ; ----------------------------------------------------------------------------- ; Routine: ReadControllers_LoadIndexAndContinue_C4E3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -1435,10 +1435,10 @@ ReadControllers_StoreAndContinue_C505: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ReadControllers_OnEqualFE_C509: - lda ($E2),y ; CPU:$C509 PRG:0509 B1 E2 + lda (TransferByteCount),y ; CPU:$C509 PRG:0509 B1 E2 sta IndirectPointerLo ; CPU:$C50B PRG:050B 85 E0 iny ; CPU:$C50D PRG:050D C8 - lda ($E2),y ; CPU:$C50E PRG:050E B1 E2 + lda (TransferByteCount),y ; CPU:$C50E PRG:050E B1 E2 sta IndirectPointerHi ; CPU:$C510 PRG:0510 85 E1 iny ; CPU:$C512 PRG:0512 C8 jsr $C4BA ; CPU:$C513 PRG:0513 20 BA C4 @@ -1452,7 +1452,7 @@ ReadControllers_OnEqualFE_C509: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ReadControllers_OnZero_C516: - lda ($E2),y ; CPU:$C516 PRG:0516 B1 E2 + lda (TransferByteCount),y ; CPU:$C516 PRG:0516 B1 E2 iny ; CPU:$C518 PRG:0518 C8 cmp #$FD ; CPU:$C519 PRG:0519 C9 FD bcc ReadControllers_OnBelowFD_C527 ; CPU:$C51B PRG:051B 90 0A @@ -1472,7 +1472,7 @@ ReadControllers_OnZero_C516: ; ----------------------------------------------------------------------------- ReadControllers_OnBelowFD_C527: and Controller1Shift ; CPU:$C527 PRG:0527 25 E4 - sta $2007 ; CPU:$C529 PRG:0529 8D 07 20 + sta PPUDATA ; CPU:$C529 PRG:0529 8D 07 20 jmp $C516 ; CPU:$C52C PRG:052C 4C 16 C5 ; ----------------------------------------------------------------------------- ; Routine: ReadControllers_OnEqualFF_C52F @@ -1495,10 +1495,10 @@ ReadControllers_OnEqualFF_C52F: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ReadControllers_OnEqualFD_C530: - lda ($E2),y ; CPU:$C530 PRG:0530 B1 E2 + lda (TransferByteCount),y ; CPU:$C530 PRG:0530 B1 E2 tax ; CPU:$C532 PRG:0532 AA iny ; CPU:$C533 PRG:0533 C8 - lda ($E2),y ; CPU:$C534 PRG:0534 B1 E2 + lda (TransferByteCount),y ; CPU:$C534 PRG:0534 B1 E2 iny ; CPU:$C536 PRG:0536 C8 ; ----------------------------------------------------------------------------- ; Routine: ReadControllers_OnNonzero_C537 @@ -1510,7 +1510,7 @@ ReadControllers_OnEqualFD_C530: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ReadControllers_OnNonzero_C537: - sta $2007 ; CPU:$C537 PRG:0537 8D 07 20 + sta PPUDATA ; CPU:$C537 PRG:0537 8D 07 20 dex ; CPU:$C53A PRG:053A CA bne ReadControllers_OnNonzero_C537 ; CPU:$C53B PRG:053B D0 FA beq ReadControllers_OnZero_C516 ; CPU:$C53D PRG:053D F0 D7 @@ -1835,7 +1835,7 @@ ReadControllers_CallNext_C63A: ReadControllers_StoreAndContinue_C643: and #$0F ; CPU:$C643 PRG:0643 29 0F ora #$30 ; CPU:$C645 PRG:0645 09 30 - sta $2007 ; CPU:$C647 PRG:0647 8D 07 20 + sta PPUDATA ; CPU:$C647 PRG:0647 8D 07 20 ; ----------------------------------------------------------------------------- ; Routine: ReadControllers_OnCarrySet_C64A ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -1914,7 +1914,7 @@ ReadControllers_OnNonnegative_C68D: ; ----------------------------------------------------------------------------- ReadControllers_OnNonnegative_C693: jsr $C4BA ; CPU:$C693 PRG:0693 20 BA C4 - sty $2007 ; CPU:$C696 PRG:0696 8C 07 20 + sty PPUDATA ; CPU:$C696 PRG:0696 8C 07 20 ldx #$E0 ; CPU:$C699 PRG:0699 A2 E0 lda #$01 ; CPU:$C69B PRG:069B A9 01 eor #$FF ; CPU:$C69D PRG:069D 49 FF @@ -1954,7 +1954,7 @@ ReadControllers_CallNext_C6AD: ldx #$E0 ; CPU:$C6B8 PRG:06B8 A2 E0 jsr $C53F ; CPU:$C6BA PRG:06BA 20 3F C5 jsr $C4BA ; CPU:$C6BD PRG:06BD 20 BA C4 - sty $2007 ; CPU:$C6C0 PRG:06C0 8C 07 20 + sty PPUDATA ; CPU:$C6C0 PRG:06C0 8C 07 20 ; ----------------------------------------------------------------------------- ; Routine: ReadControllers_OnNonnegative_C6C3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -2398,13 +2398,13 @@ ObjectSlotOffsetTable: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- SetPaletteRamAddress: - lda $2002 ; CPU:$CA11 PRG:0A11 AD 02 20 + lda PPUSTATUS ; CPU:$CA11 PRG:0A11 AD 02 20 lda #$3F ; CPU:$CA14 PRG:0A14 A9 3F - sta $2006 ; CPU:$CA16 PRG:0A16 8D 06 20 + sta PPUADDR ; CPU:$CA16 PRG:0A16 8D 06 20 lda #$00 ; CPU:$CA19 PRG:0A19 A9 00 - sta $2006 ; CPU:$CA1B PRG:0A1B 8D 06 20 - sta $2006 ; CPU:$CA1E PRG:0A1E 8D 06 20 - sta $2006 ; CPU:$CA21 PRG:0A21 8D 06 20 + sta PPUADDR ; CPU:$CA1B PRG:0A1B 8D 06 20 + sta PPUADDR ; CPU:$CA1E PRG:0A1E 8D 06 20 + sta PPUADDR ; CPU:$CA21 PRG:0A21 8D 06 20 rts ; CPU:$CA24 PRG:0A24 60 ; ----------------------------------------------------------------------------- ; Routine: SetPaletteRamAddress_LoadAndContinue_CA25 @@ -2512,7 +2512,7 @@ SetPaletteRamAddress_LoadAndContinue_CA4B: ; ----------------------------------------------------------------------------- SetPaletteRamAddress_StoreAndContinue_CA4F: sta PpuCtrlShadow ; CPU:$CA4F PRG:0A4F 85 53 - sta $2000 ; CPU:$CA51 PRG:0A51 8D 00 20 + sta PPUCTRL ; CPU:$CA51 PRG:0A51 8D 00 20 rts ; CPU:$CA54 PRG:0A54 60 ; ----------------------------------------------------------------------------- ; Routine: SetPaletteRamAddress_LoadAndContinue_CA55 @@ -3086,11 +3086,11 @@ SetupScreenPaletteTransfer_LoadIndexAndContinue_CEE3: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- SetupScreenPaletteTransfer_LoadAndContinue_CEE5: - lda $2002 ; CPU:$CEE5 PRG:0EE5 AD 02 20 + lda PPUSTATUS ; CPU:$CEE5 PRG:0EE5 AD 02 20 lda Zp78 ; CPU:$CEE8 PRG:0EE8 A5 78 - sta $2006 ; CPU:$CEEA PRG:0EEA 8D 06 20 + sta PPUADDR ; CPU:$CEEA PRG:0EEA 8D 06 20 lda Zp77 ; CPU:$CEED PRG:0EED A5 77 - sta $2006 ; CPU:$CEEF PRG:0EEF 8D 06 20 + sta PPUADDR ; CPU:$CEEF PRG:0EEF 8D 06 20 ; ----------------------------------------------------------------------------- ; Routine: SetupScreenPaletteTransfer_LoadAndContinue_CEF2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -3119,7 +3119,7 @@ SetupScreenPaletteTransfer_LoadAndContinue_CEF2: SetupScreenPaletteTransfer_OnNonzero_CEFA: inx ; CPU:$CEFA PRG:0EFA E8 beq SetupScreenPaletteTransfer_OnZero_CF03 ; CPU:$CEFB PRG:0EFB F0 06 - sta $2007 ; CPU:$CEFD PRG:0EFD 8D 07 20 + sta PPUDATA ; CPU:$CEFD PRG:0EFD 8D 07 20 jmp $CEF2 ; CPU:$CF00 PRG:0F00 4C F2 CE ; ----------------------------------------------------------------------------- ; Routine: SetupScreenPaletteTransfer_OnZero_CF03 @@ -3585,14 +3585,14 @@ ProcessQueuedVramUpdates_OnEqual01_D291: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ProcessQueuedVramUpdates_OnNonzero_D295: - sta $2000 ; CPU:$D295 PRG:1295 8D 00 20 - lda $2002 ; CPU:$D298 PRG:1298 AD 02 20 + sta PPUCTRL ; CPU:$D295 PRG:1295 8D 00 20 + lda PPUSTATUS ; CPU:$D298 PRG:1298 AD 02 20 inx ; CPU:$D29B PRG:129B E8 lda $0700,x ; CPU:$D29C PRG:129C BD 00 07 - sta $2006 ; CPU:$D29F PRG:129F 8D 06 20 + sta PPUADDR ; CPU:$D29F PRG:129F 8D 06 20 inx ; CPU:$D2A2 PRG:12A2 E8 lda $0700,x ; CPU:$D2A3 PRG:12A3 BD 00 07 - sta $2006 ; CPU:$D2A6 PRG:12A6 8D 06 20 + sta PPUADDR ; CPU:$D2A6 PRG:12A6 8D 06 20 inx ; CPU:$D2A9 PRG:12A9 E8 lda $0700,x ; CPU:$D2AA PRG:12AA BD 00 07 tay ; CPU:$D2AD PRG:12AD A8 @@ -3612,7 +3612,7 @@ ProcessQueuedVramUpdates_OnNonzero_D295: ProcessQueuedVramUpdates_OnNonzero_D2B6: inx ; CPU:$D2B6 PRG:12B6 E8 lda $0700,x ; CPU:$D2B7 PRG:12B7 BD 00 07 - sta $2007 ; CPU:$D2BA PRG:12BA 8D 07 20 + sta PPUDATA ; CPU:$D2BA PRG:12BA 8D 07 20 dey ; CPU:$D2BD PRG:12BD 88 bne ProcessQueuedVramUpdates_OnNonzero_D2B6 ; CPU:$D2BE PRG:12BE D0 F6 beq ProcessQueuedVramUpdates_OnZero_D2C9 ; CPU:$D2C0 PRG:12C0 F0 07 @@ -3627,7 +3627,7 @@ ProcessQueuedVramUpdates_OnNonzero_D2B6: ; ----------------------------------------------------------------------------- ProcessQueuedVramUpdates_JoinBranchPaths_D2C2: inx ; CPU:$D2C2 PRG:12C2 E8 - sta $2007 ; CPU:$D2C3 PRG:12C3 8D 07 20 + sta PPUDATA ; CPU:$D2C3 PRG:12C3 8D 07 20 dey ; CPU:$D2C6 PRG:12C6 88 bne ProcessQueuedVramUpdates_JoinBranchPaths_D2C2 ; CPU:$D2C7 PRG:12C7 D0 F9 ; ----------------------------------------------------------------------------- @@ -3657,7 +3657,7 @@ ProcessQueuedVramUpdates_OnZero_D2CD: sta $0700 ; CPU:$D2D1 PRG:12D1 8D 00 07 lda PpuCtrlShadow ; CPU:$D2D4 PRG:12D4 A5 53 and #$7B ; CPU:$D2D6 PRG:12D6 29 7B - sta $2000 ; CPU:$D2D8 PRG:12D8 8D 00 20 + sta PPUCTRL ; CPU:$D2D8 PRG:12D8 8D 00 20 clc ; CPU:$D2DB PRG:12DB 18 rts ; CPU:$D2DC PRG:12DC 60 @@ -3676,7 +3676,7 @@ VramDescriptorPointerTable: ; ----------------------------------------------------------------------------- ProcessQueuedVramUpdates_LoadAndContinue_D2FD: lda #$00 ; CPU:$D2FD PRG:12FD A9 00 - sta $2001 ; CPU:$D2FF PRG:12FF 8D 01 20 + sta PPUMASK ; CPU:$D2FF PRG:12FF 8D 01 20 lda Zp64 ; CPU:$D302 PRG:1302 A5 64 asl a ; CPU:$D304 PRG:1304 0A asl a ; CPU:$D305 PRG:1305 0A @@ -3687,8 +3687,8 @@ ProcessQueuedVramUpdates_LoadAndContinue_D2FD: jsr $CEB7 ; CPU:$D30F PRG:130F 20 B7 CE jsr $D575 ; CPU:$D312 PRG:1312 20 75 D5 lda #$00 ; CPU:$D315 PRG:1315 A9 00 - sta $2000 ; CPU:$D317 PRG:1317 8D 00 20 - lda $2002 ; CPU:$D31A PRG:131A AD 02 20 + sta PPUCTRL ; CPU:$D317 PRG:1317 8D 00 20 + lda PPUSTATUS ; CPU:$D31A PRG:131A AD 02 20 rts ; CPU:$D31D PRG:131D 60 ; ----------------------------------------------------------------------------- ; Routine: ConfigurePpuForScreenTransfer @@ -3706,7 +3706,7 @@ ConfigurePpuForScreenTransfer: and PpuCtrlShadow ; CPU:$D324 PRG:1324 25 53 ora #$08 ; CPU:$D326 PRG:1326 09 08 sta PpuCtrlShadow ; CPU:$D328 PRG:1328 85 53 - sta $2000 ; CPU:$D32A PRG:132A 8D 00 20 + sta PPUCTRL ; CPU:$D32A PRG:132A 8D 00 20 rts ; CPU:$D32D PRG:132D 60 VramDescriptorDispatchTable: @@ -3761,13 +3761,13 @@ ExecuteVramDescriptorStream_OnNonzero_D35F: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ExecuteVramDescriptorStream_OnNonzero_D365: - lda $2002 ; CPU:$D365 PRG:1365 AD 02 20 + lda PPUSTATUS ; CPU:$D365 PRG:1365 AD 02 20 lda ($7C),y ; CPU:$D368 PRG:1368 B1 7C tax ; CPU:$D36A PRG:136A AA iny ; CPU:$D36B PRG:136B C8 lda ($7C),y ; CPU:$D36C PRG:136C B1 7C - sta $2006 ; CPU:$D36E PRG:136E 8D 06 20 - stx $2006 ; CPU:$D371 PRG:1371 8E 06 20 + sta PPUADDR ; CPU:$D36E PRG:136E 8D 06 20 + stx PPUADDR ; CPU:$D371 PRG:1371 8E 06 20 iny ; CPU:$D374 PRG:1374 C8 ; ----------------------------------------------------------------------------- ; Routine: ExecuteVramDescriptorStream_OnNegative_D375 @@ -3826,7 +3826,7 @@ WriteVramDescriptorPayload_OnNonzero_D38B: beq ExecuteVramDescriptorStream_OnEqual5A_D388 ; CPU:$D38F PRG:138F F0 F7 cmp #$57 ; CPU:$D391 PRG:1391 C9 57 beq WriteVramDescriptorPayload_OnEqual57_D39B ; CPU:$D393 PRG:1393 F0 06 - sta $2007 ; CPU:$D395 PRG:1395 8D 07 20 + sta PPUDATA ; CPU:$D395 PRG:1395 8D 07 20 ; ----------------------------------------------------------------------------- ; Routine: WriteVramDescriptorPayload_OnZero_D398 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -3864,7 +3864,7 @@ WriteVramDescriptorPayload_OnEqual57_D39B: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- WriteVramDescriptorPayload_OnNonzero_D3A2: - sta $2007 ; CPU:$D3A2 PRG:13A2 8D 07 20 + sta PPUDATA ; CPU:$D3A2 PRG:13A2 8D 07 20 dex ; CPU:$D3A5 PRG:13A5 CA bne WriteVramDescriptorPayload_OnNonzero_D3A2 ; CPU:$D3A6 PRG:13A6 D0 FA beq WriteVramDescriptorPayload_OnZero_D398 ; CPU:$D3A8 PRG:13A8 F0 EE @@ -3916,11 +3916,11 @@ WriteVramDescriptorPayload_LoadAndContinue_D575: sta WorkPointer1Lo ; CPU:$D577 PRG:1577 85 7E lda #$03 ; CPU:$D579 PRG:1579 A9 03 sta WorkPointer1Hi ; CPU:$D57B PRG:157B 85 7F - lda $2002 ; CPU:$D57D PRG:157D AD 02 20 + lda PPUSTATUS ; CPU:$D57D PRG:157D AD 02 20 lda #$20 ; CPU:$D580 PRG:1580 A9 20 - sta $2006 ; CPU:$D582 PRG:1582 8D 06 20 + sta PPUADDR ; CPU:$D582 PRG:1582 8D 06 20 lda #$92 ; CPU:$D585 PRG:1585 A9 92 - sta $2006 ; CPU:$D587 PRG:1587 8D 06 20 + sta PPUADDR ; CPU:$D587 PRG:1587 8D 06 20 ldy #$03 ; CPU:$D58A PRG:158A A0 03 ; ----------------------------------------------------------------------------- ; Routine: WriteVramDescriptorPayload_OnNonnegative_D58C @@ -3934,7 +3934,7 @@ WriteVramDescriptorPayload_LoadAndContinue_D575: WriteVramDescriptorPayload_OnNonnegative_D58C: lda ($7E),y ; CPU:$D58C PRG:158C B1 7E ora #$30 ; CPU:$D58E PRG:158E 09 30 - sta $2007 ; CPU:$D590 PRG:1590 8D 07 20 + sta PPUDATA ; CPU:$D590 PRG:1590 8D 07 20 dey ; CPU:$D593 PRG:1593 88 bpl WriteVramDescriptorPayload_OnNonnegative_D58C ; CPU:$D594 PRG:1594 10 F6 rts ; CPU:$D596 PRG:1596 60 @@ -3951,11 +3951,11 @@ UpdateMenuSelection: lda ControllerEdgeFlags ; CPU:$D597 PRG:1597 A5 09 and #$07 ; CPU:$D599 PRG:1599 29 07 bne UpdateMenuSelection_JoinBranchPaths_D5F1 ; CPU:$D59B PRG:159B D0 54 - inc $0302 ; CPU:$D59D PRG:159D EE 02 03 - lda $0302 ; CPU:$D5A0 PRG:15A0 AD 02 03 + inc MenuSelectionIndex ; CPU:$D59D PRG:159D EE 02 03 + lda MenuSelectionIndex ; CPU:$D5A0 PRG:15A0 AD 02 03 eor #$03 ; CPU:$D5A3 PRG:15A3 49 03 bne UpdateMenuSelection_OnNonzero_D5AA ; CPU:$D5A5 PRG:15A5 D0 03 - sta $0302 ; CPU:$D5A7 PRG:15A7 8D 02 03 + sta MenuSelectionIndex ; CPU:$D5A7 PRG:15A7 8D 02 03 ; ----------------------------------------------------------------------------- ; Routine: UpdateMenuSelection_OnNonzero_D5AA ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -3990,7 +3990,7 @@ UpdateMenuSelection_OnNonzero_D5AA: ; ----------------------------------------------------------------------------- UpdateMenuSelection_OnNonzero_D5C7: lda ($7E),y ; CPU:$D5C7 PRG:15C7 B1 7E - sta $2007 ; CPU:$D5C9 PRG:15C9 8D 07 20 + sta PPUDATA ; CPU:$D5C9 PRG:15C9 8D 07 20 iny ; CPU:$D5CC PRG:15CC C8 dex ; CPU:$D5CD PRG:15CD CA bne UpdateMenuSelection_OnNonzero_D5C7 ; CPU:$D5CE PRG:15CE D0 F7 @@ -4007,7 +4007,7 @@ UpdateMenuSelection_OnNonzero_D5C7: ; ----------------------------------------------------------------------------- UpdateMenuSelection_OnNonzero_D5D4: lda ($7C),y ; CPU:$D5D4 PRG:15D4 B1 7C - sta $2007 ; CPU:$D5D6 PRG:15D6 8D 07 20 + sta PPUDATA ; CPU:$D5D6 PRG:15D6 8D 07 20 iny ; CPU:$D5D9 PRG:15D9 C8 dex ; CPU:$D5DA PRG:15DA CA bne UpdateMenuSelection_OnNonzero_D5D4 ; CPU:$D5DB PRG:15DB D0 F7 @@ -4099,7 +4099,7 @@ UpdateMenuSelection_OnNonzero_D5FE: ; ----------------------------------------------------------------------------- UpdateMenuSelection_OnNonzero_D616: lda ($7E),y ; CPU:$D616 PRG:1616 B1 7E - sta $2007 ; CPU:$D618 PRG:1618 8D 07 20 + sta PPUDATA ; CPU:$D618 PRG:1618 8D 07 20 iny ; CPU:$D61B PRG:161B C8 dex ; CPU:$D61C PRG:161C CA cpx Zp77 ; CPU:$D61D PRG:161D E4 77 @@ -4150,7 +4150,7 @@ UpdateMenuSelection_OnZero_D627: ; ----------------------------------------------------------------------------- UpdateMenuSelection_OnNonzero_D62B: lda ($7C),y ; CPU:$D62B PRG:162B B1 7C - sta $2007 ; CPU:$D62D PRG:162D 8D 07 20 + sta PPUDATA ; CPU:$D62D PRG:162D 8D 07 20 iny ; CPU:$D630 PRG:1630 C8 dex ; CPU:$D631 PRG:1631 CA cpx Zp78 ; CPU:$D632 PRG:1632 E4 78 @@ -4172,11 +4172,11 @@ MenuItemPointerTable: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- SetPaletteAddress: - lda $2002 ; CPU:$D657 PRG:1657 AD 02 20 + lda PPUSTATUS ; CPU:$D657 PRG:1657 AD 02 20 lda #$3F ; CPU:$D65A PRG:165A A9 3F - sta $2006 ; CPU:$D65C PRG:165C 8D 06 20 + sta PPUADDR ; CPU:$D65C PRG:165C 8D 06 20 lda #$00 ; CPU:$D65F PRG:165F A9 00 - sta $2006 ; CPU:$D661 PRG:1661 8D 06 20 + sta PPUADDR ; CPU:$D661 PRG:1661 8D 06 20 rts ; CPU:$D664 PRG:1664 60 ; ----------------------------------------------------------------------------- ; Routine: LoadMenuDescriptorPointer @@ -4249,7 +4249,7 @@ InitializeRoundParameters: stx Zp6B ; CPU:$D753 PRG:1753 86 6B stx Zp66 ; CPU:$D755 PRG:1755 86 66 ldx #$02 ; CPU:$D757 PRG:1757 A2 02 - lda $03B0 ; CPU:$D759 PRG:1759 AD B0 03 + lda VariantSequenceCounter ; CPU:$D759 PRG:1759 AD B0 03 lsr a ; CPU:$D75C PRG:175C 4A bcc InitializeRoundParameters_OnCarryClear_D761 ; CPU:$D75D PRG:175D 90 02 ldx #$04 ; CPU:$D75F PRG:175F A2 04 @@ -4266,7 +4266,7 @@ InitializeRoundParameters_OnCarryClear_D761: stx CurrentGameVariant ; CPU:$D761 PRG:1761 86 63 lda #$00 ; CPU:$D763 PRG:1763 A9 00 sta Zp61 ; CPU:$D765 PRG:1765 85 61 - inc $03B0 ; CPU:$D767 PRG:1767 EE B0 03 + inc VariantSequenceCounter ; CPU:$D767 PRG:1767 EE B0 03 jmp $C835 ; CPU:$D76A PRG:176A 4C 35 C8 RoundParameterTable: @@ -11846,7 +11846,7 @@ RequestAudioSequence_OnNonzero_F835: sty Zp00,x ; CPU:$F84D PRG:384D 94 00 dey ; CPU:$F84F PRG:384F 88 sty Zp08,x ; CPU:$F850 PRG:3850 94 08 - lda ($F2),y ; CPU:$F852 PRG:3852 B1 F2 + lda (ZpF2),y ; CPU:$F852 PRG:3852 B1 F2 and #$F0 ; CPU:$F854 PRG:3854 29 F0 cmp #$20 ; CPU:$F856 PRG:3856 C9 20 beq RequestAudioSequence_OnEqual20_F85B ; CPU:$F858 PRG:3858 F0 01 @@ -11887,8 +11887,8 @@ RequestAudioSequence_OnZero_F85D: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- RequestAudioSequence_OnEqual08_F867: - sta $4000,y ; CPU:$F867 PRG:3867 99 00 40 - sta $4001,y ; CPU:$F86A PRG:386A 99 01 40 + sta APUPULSE1CTRL,y ; CPU:$F867 PRG:3867 99 00 40 + sta APUPULSE1SWEEP,y ; CPU:$F86A PRG:386A 99 01 40 lda Zp2F ; CPU:$F86D PRG:386D A5 2F and #$3F ; CPU:$F86F PRG:386F 29 3F sta Zp02,x ; CPU:$F871 PRG:3871 95 02 @@ -11994,7 +11994,7 @@ ProcessAudioFrame_OnNonnegative_F89E: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ProcessAudioFrame_OnEqual08_F8A9: - sta $4000,x ; CPU:$F8A9 PRG:38A9 9D 00 40 + sta APUPULSE1CTRL,x ; CPU:$F8A9 PRG:38A9 9D 00 40 rts ; CPU:$F8AC PRG:38AC 60 ; ----------------------------------------------------------------------------- ; Routine: ProcessAudioFrame_JoinBranchPaths_F8AD @@ -12007,10 +12007,10 @@ ProcessAudioFrame_OnEqual08_F8A9: ; ----------------------------------------------------------------------------- ProcessAudioFrame_JoinBranchPaths_F8AD: iny ; CPU:$F8AD PRG:38AD C8 - lda ($F6),y ; CPU:$F8AE PRG:38AE B1 F6 + lda (AudioSequencePointerLo),y ; CPU:$F8AE PRG:38AE B1 F6 sta Zp03,x ; CPU:$F8B0 PRG:38B0 95 03 iny ; CPU:$F8B2 PRG:38B2 C8 - lda ($F6),y ; CPU:$F8B3 PRG:38B3 B1 F6 + lda (AudioSequencePointerLo),y ; CPU:$F8B3 PRG:38B3 B1 F6 sta Zp04,x ; CPU:$F8B5 PRG:38B5 95 04 iny ; CPU:$F8B7 PRG:38B7 C8 tya ; CPU:$F8B8 PRG:38B8 98 @@ -12068,8 +12068,8 @@ DecodeAudioStream_IncrementAndContinue_F8E1: tya ; CPU:$F8E3 PRG:38E3 98 sta Zp08,x ; CPU:$F8E4 PRG:38E4 95 08 ldx AudioApuRegisterOffset ; CPU:$F8E6 PRG:38E6 A6 F5 - sta $4002,x ; CPU:$F8E8 PRG:38E8 9D 02 40 - sta $4003,x ; CPU:$F8EB PRG:38EB 9D 03 40 + sta APUPULSE1TIMERLO,x ; CPU:$F8E8 PRG:38E8 9D 02 40 + sta APUPULSE1TIMERHI,x ; CPU:$F8EB PRG:38EB 9D 03 40 ; ----------------------------------------------------------------------------- ; Routine: DecodeAudioStream_OnEqual16_F8EE ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -12102,7 +12102,7 @@ DecodeAudioStream_OnZero_F8EF: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- DecodeAudioStream_OnZero_F8F2: - lda ($F6),y ; CPU:$F8F2 PRG:38F2 B1 F6 + lda (AudioSequencePointerLo),y ; CPU:$F8F2 PRG:38F2 B1 F6 cmp #$FD ; CPU:$F8F4 PRG:38F4 C9 FD bcc DecodeAudioStream_OnBelowFD_F918 ; CPU:$F8F6 PRG:38F6 90 20 bne DecodeAudioStream_OnNotEqualFD_F902 ; CPU:$F8F8 PRG:38F8 D0 08 @@ -12155,17 +12155,17 @@ DecodeAudioStream_OnBelowFD_F918: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- DecodeAudioStream_OnZero_F921: - lda ($F6),y ; CPU:$F921 PRG:3921 B1 F6 + lda (AudioSequencePointerLo),y ; CPU:$F921 PRG:3921 B1 F6 and #$F0 ; CPU:$F923 PRG:3923 29 F0 cmp #$20 ; CPU:$F925 PRG:3925 C9 20 bne DecodeAudioStream_OnNotEqual20_F93C ; CPU:$F927 PRG:3927 D0 13 - lda ($F6),y ; CPU:$F929 PRG:3929 B1 F6 + lda (AudioSequencePointerLo),y ; CPU:$F929 PRG:3929 B1 F6 and #$0F ; CPU:$F92B PRG:392B 29 0F sta Zp01,x ; CPU:$F92D PRG:392D 95 01 iny ; CPU:$F92F PRG:392F C8 - lda ($F6),y ; CPU:$F930 PRG:3930 B1 F6 + lda (AudioSequencePointerLo),y ; CPU:$F930 PRG:3930 B1 F6 ldx AudioApuRegisterOffset ; CPU:$F932 PRG:3932 A6 F5 - sta $4000,x ; CPU:$F934 PRG:3934 9D 00 40 + sta APUPULSE1CTRL,x ; CPU:$F934 PRG:3934 9D 00 40 ldx AudioChannelStructOffset ; CPU:$F937 PRG:3937 A6 F4 sta Zp09,x ; CPU:$F939 PRG:3939 95 09 iny ; CPU:$F93B PRG:393B C8 @@ -12187,11 +12187,11 @@ DecodeAudioStream_OnNotEqual20_F93C: lda Zp09,x ; CPU:$F946 PRG:3946 B5 09 and #$F0 ; CPU:$F948 PRG:3948 29 F0 sta Zp09,x ; CPU:$F94A PRG:394A 95 09 - lda ($F6),y ; CPU:$F94C PRG:394C B1 F6 + lda (AudioSequencePointerLo),y ; CPU:$F94C PRG:394C B1 F6 cmp #$F8 ; CPU:$F94E PRG:394E C9 F8 bne DecodeAudioStream_OnNotEqualF8_F955 ; CPU:$F950 PRG:3950 D0 03 iny ; CPU:$F952 PRG:3952 C8 - lda ($F6),y ; CPU:$F953 PRG:3953 B1 F6 + lda (AudioSequencePointerLo),y ; CPU:$F953 PRG:3953 B1 F6 ; ----------------------------------------------------------------------------- ; Routine: DecodeAudioStream_OnNotEqualF8_F955 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -12209,7 +12209,7 @@ DecodeAudioStream_OnNotEqualF8_F955: ora Zp09,x ; CPU:$F959 PRG:3959 15 09 sta Zp09,x ; CPU:$F95B PRG:395B 95 09 ldx AudioApuRegisterOffset ; CPU:$F95D PRG:395D A6 F5 - sta $4000,x ; CPU:$F95F PRG:395F 9D 00 40 + sta APUPULSE1CTRL,x ; CPU:$F95F PRG:395F 9D 00 40 ; ----------------------------------------------------------------------------- ; Routine: DecodeAudioStream_OnZero_F962 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -12220,11 +12220,11 @@ DecodeAudioStream_OnNotEqualF8_F955: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- DecodeAudioStream_OnZero_F962: - lda ($F6),y ; CPU:$F962 PRG:3962 B1 F6 + lda (AudioSequencePointerLo),y ; CPU:$F962 PRG:3962 B1 F6 and #$07 ; CPU:$F964 PRG:3964 29 07 sta ZpF0 ; CPU:$F966 PRG:3966 85 F0 iny ; CPU:$F968 PRG:3968 C8 - lda ($F6),y ; CPU:$F969 PRG:3969 B1 F6 + lda (AudioSequencePointerLo),y ; CPU:$F969 PRG:3969 B1 F6 sta ZpF1 ; CPU:$F96B PRG:396B 85 F1 ldx AudioChannelStructOffset ; CPU:$F96D PRG:396D A6 F4 jsr $FA80 ; CPU:$F96F PRG:396F 20 80 FA @@ -12281,7 +12281,7 @@ ExecuteAudioCommand_OnNotEqual08_F981: ExecuteAudioCommand_OnNonzero_F987: dec AudioSequencePointerLo ; CPU:$F987 PRG:3987 C6 F6 ldy #$00 ; CPU:$F989 PRG:3989 A0 00 - lda ($F6),y ; CPU:$F98B PRG:398B B1 F6 + lda (AudioSequencePointerLo),y ; CPU:$F98B PRG:398B B1 F6 and #$F0 ; CPU:$F98D PRG:398D 29 F0 cmp #$C0 ; CPU:$F98F PRG:398F C9 C0 bne ExecuteAudioCommand_OnNotEqualC0_F994 ; CPU:$F991 PRG:3991 D0 01 @@ -12364,7 +12364,7 @@ ExecuteAudioCommand_OnNonnegative_F9BD: sbc #$01 ; CPU:$F9BF PRG:39BF E9 01 sta Zp09,x ; CPU:$F9C1 PRG:39C1 95 09 ldx AudioApuRegisterOffset ; CPU:$F9C3 PRG:39C3 A6 F5 - sta $4000,x ; CPU:$F9C5 PRG:39C5 9D 00 40 + sta APUPULSE1CTRL,x ; CPU:$F9C5 PRG:39C5 9D 00 40 rts ; CPU:$F9C8 PRG:39C8 60 ; ----------------------------------------------------------------------------- ; Routine: ExecuteAudioCommand_LoadAndContinue_F9C9 @@ -12389,29 +12389,29 @@ ExecuteAudioCommand_LoadAndContinue_F9C9: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ExecuteAudioCommand_OnZero_F9D1: - lda ($F6),y ; CPU:$F9D1 PRG:39D1 B1 F6 + lda (AudioSequencePointerLo),y ; CPU:$F9D1 PRG:39D1 B1 F6 and #$F0 ; CPU:$F9D3 PRG:39D3 29 F0 cmp #$D0 ; CPU:$F9D5 PRG:39D5 C9 D0 bne ExecuteAudioCommand_OnNotEqualD0_F9FF ; CPU:$F9D7 PRG:39D7 D0 26 - lda ($F6),y ; CPU:$F9D9 PRG:39D9 B1 F6 + lda (AudioSequencePointerLo),y ; CPU:$F9D9 PRG:39D9 B1 F6 and #$0F ; CPU:$F9DB PRG:39DB 29 0F sta Zp0D,x ; CPU:$F9DD PRG:39DD 95 0D iny ; CPU:$F9DF PRG:39DF C8 - lda ($F6),y ; CPU:$F9E0 PRG:39E0 B1 F6 + lda (AudioSequencePointerLo),y ; CPU:$F9E0 PRG:39E0 B1 F6 sta Zp05,x ; CPU:$F9E2 PRG:39E2 95 05 ldx AudioApuRegisterOffset ; CPU:$F9E4 PRG:39E4 A6 F5 - sta $4000,x ; CPU:$F9E6 PRG:39E6 9D 00 40 + sta APUPULSE1CTRL,x ; CPU:$F9E6 PRG:39E6 9D 00 40 iny ; CPU:$F9E9 PRG:39E9 C8 cpx #$08 ; CPU:$F9EA PRG:39EA E0 08 beq ExecuteAudioCommand_JoinBranchPaths_FA12 ; CPU:$F9EC PRG:39EC F0 24 - lda ($F6),y ; CPU:$F9EE PRG:39EE B1 F6 + lda (AudioSequencePointerLo),y ; CPU:$F9EE PRG:39EE B1 F6 lsr a ; CPU:$F9F0 PRG:39F0 4A lsr a ; CPU:$F9F1 PRG:39F1 4A lsr a ; CPU:$F9F2 PRG:39F2 4A lsr a ; CPU:$F9F3 PRG:39F3 4A ldx AudioChannelStructOffset ; CPU:$F9F4 PRG:39F4 A6 F4 sta Zp0F,x ; CPU:$F9F6 PRG:39F6 95 0F - lda ($F6),y ; CPU:$F9F8 PRG:39F8 B1 F6 + lda (AudioSequencePointerLo),y ; CPU:$F9F8 PRG:39F8 B1 F6 and #$0F ; CPU:$F9FA PRG:39FA 29 0F sta Zp10,x ; CPU:$F9FC PRG:39FC 95 10 iny ; CPU:$F9FE PRG:39FE C8 @@ -12428,12 +12428,12 @@ ExecuteAudioCommand_OnNotEqualD0_F9FF: ldx AudioApuRegisterOffset ; CPU:$F9FF PRG:39FF A6 F5 cpx #$08 ; CPU:$FA01 PRG:3A01 E0 08 beq ExecuteAudioCommand_JoinBranchPaths_FA12 ; CPU:$FA03 PRG:3A03 F0 0D - lda ($F6),y ; CPU:$FA05 PRG:3A05 B1 F6 + lda (AudioSequencePointerLo),y ; CPU:$FA05 PRG:3A05 B1 F6 cmp #$F0 ; CPU:$FA07 PRG:3A07 C9 F0 bne ExecuteAudioCommand_JoinBranchPaths_FA12 ; CPU:$FA09 PRG:3A09 D0 07 iny ; CPU:$FA0B PRG:3A0B C8 - lda ($F6),y ; CPU:$FA0C PRG:3A0C B1 F6 - sta $4001,x ; CPU:$FA0E PRG:3A0E 9D 01 40 + lda (AudioSequencePointerLo),y ; CPU:$FA0C PRG:3A0C B1 F6 + sta APUPULSE1SWEEP,x ; CPU:$FA0E PRG:3A0E 9D 01 40 iny ; CPU:$FA11 PRG:3A11 C8 ; ----------------------------------------------------------------------------- ; Routine: ExecuteAudioCommand_JoinBranchPaths_FA12 @@ -12445,11 +12445,11 @@ ExecuteAudioCommand_OnNotEqualD0_F9FF: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ExecuteAudioCommand_JoinBranchPaths_FA12: - lda ($F6),y ; CPU:$FA12 PRG:3A12 B1 F6 + lda (AudioSequencePointerLo),y ; CPU:$FA12 PRG:3A12 B1 F6 and #$F0 ; CPU:$FA14 PRG:3A14 29 F0 cmp #$E0 ; CPU:$FA16 PRG:3A16 C9 E0 bne ExecuteAudioCommand_OnNotEqualE0_FA23 ; CPU:$FA18 PRG:3A18 D0 09 - lda ($F6),y ; CPU:$FA1A PRG:3A1A B1 F6 + lda (AudioSequencePointerLo),y ; CPU:$FA1A PRG:3A1A B1 F6 and #$0F ; CPU:$FA1C PRG:3A1C 29 0F ldx AudioChannelStructOffset ; CPU:$FA1E PRG:3A1E A6 F4 sta Zp0B,x ; CPU:$FA20 PRG:3A20 95 0B @@ -12466,7 +12466,7 @@ ExecuteAudioCommand_JoinBranchPaths_FA12: ExecuteAudioCommand_OnNotEqualE0_FA23: jsr $FAA9 ; CPU:$FA23 PRG:3A23 20 A9 FA dey ; CPU:$FA26 PRG:3A26 88 - lda ($F6),y ; CPU:$FA27 PRG:3A27 B1 F6 + lda (AudioSequencePointerLo),y ; CPU:$FA27 PRG:3A27 B1 F6 and #$0F ; CPU:$FA29 PRG:3A29 29 0F sta ZpF0 ; CPU:$FA2B PRG:3A2B 85 F0 beq ExecuteAudioCommand_OnZero_FA3A ; CPU:$FA2D PRG:3A2D F0 0B @@ -12514,8 +12514,8 @@ ExecuteAudioCommand_OnZero_FA3C: lda Zp05,x ; CPU:$FA43 PRG:3A43 B5 05 sta Zp09,x ; CPU:$FA45 PRG:3A45 95 09 ldx AudioApuRegisterOffset ; CPU:$FA47 PRG:3A47 A6 F5 - sta $4000,x ; CPU:$FA49 PRG:3A49 9D 00 40 - lda ($F6),y ; CPU:$FA4C PRG:3A4C B1 F6 + sta APUPULSE1CTRL,x ; CPU:$FA49 PRG:3A49 9D 00 40 + lda (AudioSequencePointerLo),y ; CPU:$FA4C PRG:3A4C B1 F6 lsr a ; CPU:$FA4E PRG:3A4E 4A lsr a ; CPU:$FA4F PRG:3A4F 4A lsr a ; CPU:$FA50 PRG:3A50 4A @@ -12536,7 +12536,7 @@ ExecuteAudioCommand_OnZero_FA3C: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ExecuteAudioCommand_OnEqual08_FA5E: - sta $4000,x ; CPU:$FA5E PRG:3A5E 9D 00 40 + sta APUPULSE1CTRL,x ; CPU:$FA5E PRG:3A5E 9D 00 40 rts ; CPU:$FA61 PRG:3A61 60 ; ----------------------------------------------------------------------------- ; Routine: ExecuteAudioCommand_OnNotEqual0C_FA62 @@ -12619,7 +12619,7 @@ ExecuteAudioCommand_OnNonzero_FA98: ExecuteAudioCommand_JoinBranchPaths_FA9A: lda ZpF0 ; CPU:$FA9A PRG:3A9A A5 F0 ldx AudioApuRegisterOffset ; CPU:$FA9C PRG:3A9C A6 F5 - sta $4003,x ; CPU:$FA9E PRG:3A9E 9D 03 40 + sta APUPULSE1TIMERHI,x ; CPU:$FA9E PRG:3A9E 9D 03 40 ; ----------------------------------------------------------------------------- ; Routine: ExecuteAudioCommand_OnNotEqual08_FAA1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -12632,7 +12632,7 @@ ExecuteAudioCommand_JoinBranchPaths_FA9A: ExecuteAudioCommand_OnNotEqual08_FAA1: ldx AudioApuRegisterOffset ; CPU:$FAA1 PRG:3AA1 A6 F5 lda ZpF1 ; CPU:$FAA3 PRG:3AA3 A5 F1 - sta $4002,x ; CPU:$FAA5 PRG:3AA5 9D 02 40 + sta APUPULSE1TIMERLO,x ; CPU:$FAA5 PRG:3AA5 9D 02 40 rts ; CPU:$FAA8 PRG:3AA8 60 ; ----------------------------------------------------------------------------- ; Routine: ExecuteAudioCommand_LoadIndexAndContinue_FAA9 diff --git a/Clu Clu Land (JU)/OVERVIEW.md b/Clu Clu Land (JU)/OVERVIEW.md index 3114913..d28f843 100644 --- a/Clu Clu Land (JU)/OVERVIEW.md +++ b/Clu Clu Land (JU)/OVERVIEW.md @@ -14,7 +14,7 @@ This document describes the execution flow of the disassembled Clu Clu Land (JU) | Mirroring | Horizontal | | PRG bank start | CPU $C000 | | Source file | `copilot/prg.s` (9,150 lines) | -| Output | `reconstructed_prg.bin` (16,384 bytes) | +| Output | `reconstructed.nes` (whole ROM: 16-byte header + 16,384-byte PRG + 8,192-byte CHR) | ### Interrupt vectors (CPU $FFFA–$FFFF) @@ -30,7 +30,7 @@ This document describes the execution flow of the disassembled Clu Clu Land (JU) `make` in `copilot/` assembles `prg.s` with `ca65`, links with `ld65`, and verifies against `prg.bin`. -**Verification result: BYTE-IDENTICAL** — `reconstructed_prg.bin` matches `prg.bin` exactly (all 16,384 bytes), and `prg.bin` matches the PRG bank of `rom.nes`. +**Verification result: BYTE-IDENTICAL** — `reconstructed.nes` matches `rom.nes` exactly (header + PRG + CHR). --- @@ -311,7 +311,7 @@ Game Task Dispatcher ($C368) [from NMI] ## 14. Notes -- **Build verification:** `make` in `copilot/` produces `reconstructed_prg.bin` that is **byte-identical** to `prg.bin` and to the PRG bank of `rom.nes`. +- **Build verification:** `make` in `copilot/` produces `reconstructed.nes`, compared whole-ROM against `rom.nes`. - Vectors confirm NMI at $C1F1 and both RESET/IRQ at $C196 (IRQ reuses the reset handler). - The main loop (`InterruptPathDispatch_C1EB`) is a tight infinite loop calling only `EnginePath_F58D`; all substantive per-frame work is done in the NMI handler. - NMI temporarily disables itself (`AND #$7F` on PPUCTRL) and rendering (`AND #$E7` on PPUMASK) while it updates PPU state and objects, then re-enables both before RTI — a classic NES VBlank update pattern. diff --git a/_wip/Donkey Kong (JU)/Donkey Kong (JU).nes b/Donkey Kong (JU)/Donkey Kong (JU).nes similarity index 100% rename from _wip/Donkey Kong (JU)/Donkey Kong (JU).nes rename to Donkey Kong (JU)/Donkey Kong (JU).nes diff --git a/Donkey Kong (JU)/OVERVIEW.md b/Donkey Kong (JU)/OVERVIEW.md new file mode 100644 index 0000000..4b51ec5 --- /dev/null +++ b/Donkey Kong (JU)/OVERVIEW.md @@ -0,0 +1,104 @@ +# Donkey Kong (JU) — Pass 2/3 Complete, Promoted + +ROM: `Donkey Kong (JU)/Donkey Kong (JU).nes` (24,592 bytes, iNES). Status: **Pass 2/3 complete, promoted to top level 2026-10-19 — whole ROM rebuilds byte-identically.** `copilot/prg.s` contains a classified disassembly with 6,014 instructions (76.3% code / 12,505 bytes), **1,015 label definitions and zero `Label_` residue**, and 10 named data tables. `make` verifies header + PRG + CHR against `copilot/rom.nes` (a relative symlink that survives the `git mv`). + +**Relationship note:** separate title from the already-disassembled `Donkey Kong Jr. (JU)` and `Donkey Kong 3 (JUE)` — do not reuse their symbols. + + +## ROM Facts + +| Property | Value | +|----------|-------| +| Mapper | 0 (NROM) — from the iNES header | +| PRG | 16 KB (header claims map at CPU $C000–$FFFF) | +| CHR | 8 KB | +| Mirroring | Horizontal | +| Battery-backed flag | clear | +| ROM SHA-256 | `f9f026fd3560eeb03be9f6d1efa329b4c71d562caf06d4a5a691e5342f8da8e6` | +| PRG SHA-256 | `2952648e8a6eea65b7f388af8fce9ef33a9cb07178835fea6674db75d2623c49` | + +## Interrupt Vectors (taken from PRG $3FFA–$3FFF) + +| Vector | Target | Note | +|--------|--------|------| +| NMI | `$C85F` | per-frame heartbeat | +| RESET | `$C79E` | non-$C000 entry, like `Donkey Kong Jr. (JU)` | +| IRQ | `$FFF0` | lands in the vector-page padding — unused placeholder | + +## `copilot/` Contents + +| File | Purpose | +|------|---------| +| `rom.nes` | relative symlink → `../Donkey Kong (JU).nes` (space-free link name, per convention) | +| `prg.bin` / `header.bin` / `chr.bin` | split image, produced by `_tools/splitnes.py` | +| `header.s` / `chr.s` | one-line `.incbin` of `header.bin` / `chr.bin` (added at promotion) | +| `prg.s` | Pass 1/2/3: classified code/data split, 6,014 instructions, 1,015 labels (zero `Label_` residue), 10 named data tables, audit comments on every emission | +| `symbols.inc` | shared NES hardware constants (PPU/APU/controller) | +| `locals.inc` | 145 zero-page slot definitions with neutral `ZpXX` names (behavioral naming not yet assigned) | +| `linker.cfg` | HEADER (16 bytes) + PRG at $C000 (16 KB) + CHR (8 KB) | +| `Makefile` | links `reconstructed.nes` (header + PRG + CHR) and `cmp`s it against `rom.nes` | +| `reconstructed.nes` | build output from the last verified build | +| `dk_full_map.tsv` | complete Pass 2 label map (919 applied rows) plus 407 `zp` proposals that were never applied | +| `dk_label_map.tsv` | superseded first-draft map (219 label rows), kept for provenance | + +## Build + +```bash +cd "Donkey Kong (JU)/copilot" +make # → cmp reconstructed.nes rom.nes → "Byte-identical ROM verified." +``` + +## Pass 2 Details (2026-10-19) + +All **919** remaining address-derived `Label_XXXX` definitions were replaced; `prg.s` +now carries **1,015** labels and **zero `Label_` residue**. + +- **319 of the 919** were routine entry points (`jsr`/`jmp` targets): + - **102** were named from observed behaviour — e.g. `LoadSpriteInitPointerToZp00` ($C807), + `CopyVramDataToBuffer` ($CBDF), `UpdateObjectListZp5D` ($DA16), + `CheckSpriteListCollision` ($D8AD), `UpdateRandomSeed` ($F4ED), + `ReadControllers` ($F50E), `UpdateSoundEngine` ($FA48). + - **217** stayed address-based as `SubC` (`SubCC24`, `SubCE130`, …) — honest + residue where the body is too context-dependent to name without guessing. This + matches sibling practice (`Golf (JU)`: 108, `Mario Bros (JU)`: 223). + - The **77** entry points already named in earlier passes were left untouched. +- **600** internal branch targets were named `_Block` / `_Block_n` in + address order within their owning routine (the `Donkey Kong Jr. (JU)` / `Balloon Fight (JU)` + convention). Ownership is control-flow containment: an internal label is attributed to + the routine whose body actually reaches it, not merely the nearest preceding entry (this + matters for loops that physically precede their own entry, e.g. `FlushPpuBuffer_Block` + at $F1EC under the entry at $F228). +- Two name collisions in the raw proposals were disambiguated by the indexing zero-page + slot — `UpdateObjectListZp5D`/`DispatchObjectStateZp5E` ($DA16/$DA4C, index Zp5D/Zp5E) + versus `UpdateObjectListZpAE`/`DispatchObjectStateZpAF` ($E1E9/$E250, index ZpAE/ZpAF). +- `jsr`/`jmp` operands stay **numeric** (`jsr $F228`), matching `Wild Gunman (U)`; only + branch operands are symbolic, so the call graph is read from the labels. +- Applied with `_tools/pass2.py apply` (919 definitions + 2,622 references rewritten, + comments re-aligned to the file's column convention); `make` still prints + **byte-identical** — labels only, no byte or audit-comment content change. +- **Residue:** the 217 `SubC` names, the 145 zero-page slots in `locals.inc` + (neutral `ZpXX`), and the 407 unapplied `zp` proposals in `dk_full_map.tsv`. + +## Pass 3 Details (2026-10-19) + +- **Data table naming**: 10 data regions identified and named in `prg.s`: + - `LevelPtrTable` ($C000–$C03B, 60 bytes) — level header data + - `ObjectPtrTable` ($C03C–$C043, 8 bytes) — 4 pointer pairs ($C63E/$C657/$C6E1/$C760) read by the dispatchers at $C815/$C823/$C831/$C847/$C853 + - `LevelDataPtrTable` ($C044–$C79D, 1882 bytes) — level data pointer tables + - `SpriteInitPtrTable` ($C4B0–$C4BF, labelled at the byte-row boundary) — **residue:** the routine at $C807 reads `$C4A7,x`/`$C4A8,x`, i.e. the referenced table starts mid-row at $C4A7, which cannot hold a label without splitting the canonical 16-byte audit-comment line; the label marks the row containing the tail instead + - `UnreachedCode_D650` ($D650–$D696, 71 bytes) — unreached code block (clears $0472/$0473, copies $0200 → $0460) + - `UnreachedCode_E144` ($E144–$E165, 34 bytes) — unreached code block (clears $0068–$0071, processes sprite data) + - `MusicDataTable` ($F55B–$FA47, 1261 bytes) — music/sound data: note frequencies, envelopes, sequences + - `APUDataTable` ($FAE6–$FB74, 143 bytes) — APU register tables: pulse/noise channel data, frequency LUTs + - `SfxDataTable` ($FE59–$FFEF, 407 bytes) — sound effect data: frequency sweeps, envelope shapes, channel configs + - `VectorTable` ($FFF6–$FFFF, 10 bytes) — 4 bytes of vector-page padding then the NMI/RESET/IRQ words at $FFFA–$FFFF +- All regions remain byte-identical; `make` now proves the **whole ROM** (header + PRG + CHR). +- No provisional flags remain; all data regions classified. Names like `LevelPtrTable` are descriptive (usage-derived where references exist — see the provenance comment block above the $C000 region in `prg.s`). + +## Promotion (2026-10-19) + +Executed per `PROMPTS.md` / AGENTS.md: `git mv` to top level, `rom.nes` symlink added, `header.s` + `chr.s` + HEADER/PRG/CHR `linker.cfg` added (a Pass-0 skeleton ships none of the three), Makefile switched from `cmp reconstructed_prg.bin prg.bin` to `cmp reconstructed.nes rom.nes`. No `_tools` path change was needed — this Makefile does not reference `_tools/`, and there is no `make regen` target. Mirroring discrepancy resolved to Horizontal from header byte 6. + +## Next Steps + +None outstanding for the pass contract. Optional deeper work: refine the descriptive table names above against runtime traces, decode the `$D650`/`$E144` unreached blocks into real code entries, and give behavioural names to the 217 `SubC` routines and the 145 zero-page slots where usage justifies it. diff --git a/Donkey Kong (JU)/copilot/Makefile b/Donkey Kong (JU)/copilot/Makefile new file mode 100644 index 0000000..0d14c9a --- /dev/null +++ b/Donkey Kong (JU)/copilot/Makefile @@ -0,0 +1,25 @@ +CA65 ?= ca65 +LD65 ?= ld65 + +all: reconstructed.nes verify + +prg.o: prg.s symbols.inc locals.inc + $(CA65) -g -o $@ $< + +header.o: header.s + $(CA65) -g -o $@ $< + +chr.o: chr.s + $(CA65) -g -o $@ $< + +reconstructed.nes: header.o prg.o chr.o linker.cfg + $(LD65) -C linker.cfg -m reconstructed.map -Ln reconstructed.lbl -o $@ header.o prg.o chr.o + +verify: reconstructed.nes + cmp reconstructed.nes rom.nes + @echo "Byte-identical ROM verified." + +clean: + rm -f *.o reconstructed.nes reconstructed.map reconstructed.lbl + +.PHONY: all verify clean diff --git a/_wip/Donkey Kong (JU)/copilot/chr.bin b/Donkey Kong (JU)/copilot/chr.bin similarity index 100% rename from _wip/Donkey Kong (JU)/copilot/chr.bin rename to Donkey Kong (JU)/copilot/chr.bin diff --git a/Donkey Kong (JU)/copilot/chr.s b/Donkey Kong (JU)/copilot/chr.s new file mode 100644 index 0000000..a5c5801 --- /dev/null +++ b/Donkey Kong (JU)/copilot/chr.s @@ -0,0 +1,2 @@ +.segment "CHR" + .incbin "chr.bin" diff --git a/Donkey Kong (JU)/copilot/dk_full_map.tsv b/Donkey Kong (JU)/copilot/dk_full_map.tsv new file mode 100644 index 0000000..e1144ab --- /dev/null +++ b/Donkey Kong (JU)/copilot/dk_full_map.tsv @@ -0,0 +1,1326 @@ +label Label_C7A8 Reset_Block +label Label_C7B9 Reset_Block_1 +label Label_C807 LoadSpriteInitPointerToZp00 +label Label_C815 LoadObjectPointerToZp02AndDraw +label Label_C823 LoadObjectPointerToZp00AndDraw +label Label_C831 LoadObjectAndLevelPointers +label Label_C847 LoadObjectPointerToZp02 +label Label_C853 LoadObjectPointerToZp08 +label Label_C8A5 NmiHandler_Block +label Label_C95C UpdateGameState_Block +label Label_C976 UpdateGameState2_Block +label Label_C985 UpdateGameState2_Block_1 +label Label_C989 UpdateGameState2_Block_2 +label Label_C991 UpdateGameState3_Block +label Label_C9AD UpdateGameState3_Block_1 +label Label_C9B1 InitGameState +label Label_CA06 InitGameState_Block +label Label_CA26 InitGameState_Block_1 +label Label_CA4A UpdateSprites_Block +label Label_CA5A UpdateSprites_Block_1 +label Label_CA5F UpdateSprites_Block_2 +label Label_CA64 UpdateSprites_Block_3 +label Label_CA79 UpdateSprites_Block_4 +label Label_CA94 UpdateSprites_Block_5 +label Label_CA99 UpdateSprites_Block_6 +label Label_CAAB CopyToOAM_Block +label Label_CABB CopyFromOAM_Block +label Label_CAD8 UpdateSpriteData_Block +label Label_CAE7 UpdateSpriteData_Block_1 +label Label_CAF6 UpdateSpriteData_Block_2 +label Label_CAFA UpdateSpriteData_Block_3 +label Label_CB02 UpdateSpriteData_Block_4 +label Label_CB15 UpdateSpriteData_Block_5 +label Label_CB18 UpdateSpriteData_Block_6 +label Label_CB30 HandleController_Block +label Label_CB36 HandleController_Block_1 +label Label_CB39 HandleController_Block_2 +label Label_CB46 HandleController_Block_3 +label Label_CB47 HandleController_Block_4 +label Label_CB58 HandleController_Block_5 +label Label_CB7B HandleController_Block_6 +label Label_CB9E HandleController_Block_7 +label Label_CBDF CopyVramDataToBuffer +label Label_CBEB CopyVramDataToBuffer_Block +label Label_CC24 SubCCC24 +label Label_CC4A InitScroll_Block +label Label_CC99 InitScroll_Block_1 +label Label_CCA6 InitScroll_Block_2 +label Label_CCF3 UpdateScroll8_Block +label Label_CD07 CheckGameState_1_Block +label Label_CD13 CheckGameState_1_Block_1 +label Label_CD45 UpdateGameTimer_Block +label Label_CD4A UpdateGameTimer_Block_1 +label Label_CD4F UpdateGameTimer_Block_2 +label Label_CD58 UpdateGameTimer_Block_3 +label Label_CD61 UpdateGameTimer_Block_4 +label Label_CD66 UpdateGameTimer_Block_5 +label Label_CD69 UpdateGameTimer_Block_6 +label Label_CD6C UpdateGameTimer_Block_7 +label Label_CDAE UpdateSpritePosition5_Block +label Label_CDD7 UpdateSpritePosition6_Block +label Label_CDEF UpdateSpritePosition6_Block_1 +label Label_CDF3 UpdateSpritePosition6_Block_2 +label Label_CE1F UpdateSpritePosition8_Block +label Label_CE2F UpdateSpritePosition9_Block +label Label_CE8B UpdateSpritePosition10_Block +label Label_CE94 UpdateSpritePosition10_Block_1 +label Label_CEA2 UpdateSpritePosition10_Block_2 +label Label_CEAE UpdateSpritePosition10_Block_3 +label Label_CEB1 UpdateSpritePosition10_Block_4 +label Label_CEB8 UpdateSpritePosition10_Block_5 +label Label_CEC1 UpdateSpritePosition10_Block_6 +label Label_CED3 UpdateSpritePosition10_Block_7 +label Label_CF01 UpdateSpritePosition11_Block +label Label_CF0D UpdateSpritePosition11_Block_1 +label Label_CF2A UpdateSpritePosition13_3_Block +label Label_CF55 UpdateSpritePosition15_Block +label Label_CF79 UpdateSpritePosition15_Block_1 +label Label_CF7A UpdateSpritePosition15_Block_2 +label Label_CF8F UpdateSpritePosition15_Block_3 +label Label_CF92 UpdateSpritePosition15_Block_4 +label Label_CF9B UpdateSpritePosition15_Block_5 +label Label_CFA1 UpdateSpritePosition15_Block_6 +label Label_CFAC UpdateSpritePosition17_Block +label Label_CFB8 UpdateSpritePosition17_Block_1 +label Label_CFCD UpdateSpritePosition18_Block +label Label_CFF9 UpdateSpritePosition18_Block_1 +label Label_D02A UpdateSpritePosition19_Block +label Label_D04B UpdateSpritePosition21_1_Block +label Label_D063 UpdateSpritePosition21_3_Block +label Label_D065 UpdateSpritePosition21_3_Block_1 +label Label_D074 UpdateSpritePosition21_3_Block_2 +label Label_D092 UpdateSpritePosition22_1_Block +label Label_D0A5 UpdateSpritePosition22_1_Block_1 +label Label_D0AA UpdateSpritePosition22_1_Block_2 +label Label_D0BF UpdateSpritePosition22_3_Block +label Label_D0DD UpdateSpritePosition23_Block +label Label_D0E4 UpdateSpritePosition23_Block_1 +label Label_D0F4 UpdateSpritePosition23_Block_2 +label Label_D0F8 UpdateSpritePosition23_Block_3 +label Label_D101 UpdateSpritePosition23_Block_4 +label Label_D115 UpdateSpritePosition23_Block_5 +label Label_D11D UpdateSpritePosition23_Block_6 +label Label_D130 UpdateSpritePosition24_Block +label Label_D138 UpdateSpritePosition24_Block_1 +label Label_D139 UpdateSpritePosition24_Block_2 +label Label_D14B UpdateSpritePosition24_Block_3 +label Label_D166 UpdateSpritePosition24_Block_4 +label Label_D189 UpdateSpritePosition26_Block +label Label_D199 UpdateSpritePosition26_Block_1 +label Label_D1BB UpdateSpritePosition28_Block +label Label_D1C3 UpdateSpritePosition29_Block +label Label_D1C6 UpdateSpritePosition29_Block_1 +label Label_D1C9 UpdateSpritePosition29_Block_2 +label Label_D1CC UpdateSpritePosition29_Block_3 +label Label_D1E2 UpdateSpritePosition30_Block +label Label_D1E5 UpdateSpritePosition30_Block_1 +label Label_D1F3 UpdateSpritePosition30_Block_2 +label Label_D1F9 UpdateSpritePosition30_Block_3 +label Label_D205 UpdateSpritePosition30_Block_4 +label Label_D227 UpdateSpritePosition31_Block +label Label_D233 UpdateSpritePosition31_Block_1 +label Label_D23E UpdateSpritePosition31_Block_2 +label Label_D25B UpdateSpritePosition31_Block_3 +label Label_D262 UpdateSpritePosition31_Block_4 +label Label_D26D UpdateSpritePosition31_Block_5 +label Label_D288 UpdateSpritePosition33_Block +label Label_D2CA UpdateSpritePosition34_Block +label Label_D2DD UpdateSpritePosition35_Block +label Label_D2F0 UpdateSpritePosition36_Block +label Label_D34E UpdateSpritePosition40_Block +label Label_D353 UpdateSpritePosition40_Block_1 +label Label_D35E UpdateSpritePosition40_Block_2 +label Label_D365 UpdateSpritePosition40_Block_3 +label Label_D373 UpdateSpritePosition42_1_Block +label Label_D38B UpdateSpritePosition43_Block +label Label_D39C UpdateSpritePosition44_Block +label Label_D3AF UpdateSpritePosition44_Block_1 +label Label_D3BB UpdateSpritePosition44_Block_2 +label Label_D3CD UpdateSpritePosition44_Block_3 +label Label_D3D0 UpdateSpritePosition44_Block_4 +label Label_D3D2 SubCD3D2 +label Label_D3E7 UpdateSpritePosition44_Block_5 +label Label_D3F9 UpdateSpritePosition44_Block_6 +label Label_D3FB SubCD3FB +label Label_D40D SubCD40D +label Label_D426 SubCD40D_Block +label Label_D42C SubCD42C +label Label_D432 SubCD432 +label Label_D445 SubCD432_Block +label Label_D45A SubCD432_Block_1 +label Label_D471 SubCD432_Block_2 +label Label_D476 SubCD432_Block_3 +label Label_D478 SubCD478 +label Label_D48B SubCD432_Block_4 +label Label_D49D SubCD432_Block_5 +label Label_D49F SubCD49F +label Label_D4B1 SubCD4B1 +label Label_D4C6 SubCD4B1_Block +label Label_D4CC SubCD4CC +label Label_D4ED UpdateSpritePosition49_Block +label Label_D4EE SubCD4EE +label Label_D4F9 SubCD4F9 +label Label_D501 SubCD501 +label Label_D509 SubCD501_Block +label Label_D50A SubCD50A +label Label_D544 SubCD50A_Block +label Label_D547 SubCD547 +label Label_D551 SubCD547_Block +label Label_D55A SubCD547_Block_1 +label Label_D56A SubCD547_Block_2 +label Label_D56C SubCD56C +label Label_D570 SubCD56C_Block +label Label_D58C SubCD56C_Block_1 +label Label_D59A SubCD56C_Block_2 +label Label_D5A1 SubCD56C_Block_3 +label Label_D5AF SubCD56C_Block_4 +label Label_D5B3 SubCD5B3 +label Label_D5CC SubCD5B3_Block +label Label_D5E2 SubCD5B3_Block_1 +label Label_D5F1 SubCD5F1 +label Label_D5F6 SubCD5F6 +label Label_D60D SubCD60D +label Label_D642 SubCD60D_Block +label Label_D64F SubCD60D_Block_1 +label Label_D697 SubCD697 +label Label_D6B1 SubCD697_Block +label Label_D6B7 SubCD6B7 +label Label_D6C5 SubCD6B7_Block +label Label_D6C6 SubCD6C6 +label Label_D6CD SubCD6C6_Block +label Label_D6D9 SubCD6C6_Block_1 +label Label_D6E8 SubCD6C6_Block_2 +label Label_D6F2 SubCD6C6_Block_3 +label Label_D6FE SubCD6C6_Block_4 +label Label_D703 SubCD6C6_Block_5 +label Label_D705 SubCD705 +label Label_D70A SubCD6C6_Block_6 +label Label_D710 SubCD6C6_Block_7 +label Label_D713 SubCD713 +label Label_D732 SubCD713_Block +label Label_D73E SubCD713_Block_1 +label Label_D74F SubCD713_Block_2 +label Label_D753 SubCD753 +label Label_D767 SubCD753_Block +label Label_D769 SubCD769 +label Label_D786 SubCD769_Block +label Label_D795 SubCD769_Block_1 +label Label_D79B SubCD79B +label Label_D7AD SubCD7AD +label Label_D7B8 SubCD7AD_Block +label Label_D7BA SubCD7BA +label Label_D7BF SubCD7BF +label Label_D7D3 SubCD7BF_Block +label Label_D7DA SubCD7DA +label Label_D7F2 SubCD7F2 +label Label_D800 SubCD800 +label Label_D805 SubCD800_Block +label Label_D80E SubCD800_Block_1 +label Label_D81E SubCD800_Block_2 +label Label_D827 SubCD800_Block_3 +label Label_D849 SubCD800_Block_4 +label Label_D856 SubCD800_Block_5 +label Label_D867 SubCD800_Block_6 +label Label_D86F SubCD800_Block_7 +label Label_D87D SubCD87D +label Label_D8A7 SubCD87D_Block +label Label_D8A8 SubCD8A8 +label Label_D8AD CheckSpriteListCollision +label Label_D8B9 SubCD8B9 +label Label_D8E1 SubCD8B9_Block +label Label_D8E6 SubCD8B9_Block_1 +label Label_D8E8 SubCD8E8 +label Label_D8EB SubCD8EB +label Label_D904 SubCD8EB_Block +label Label_D911 SubCD8EB_Block_1 +label Label_D914 SubCD8EB_Block_2 +label Label_D917 SubCD917 +label Label_D91A SubCD91A +label Label_D92D SubCD92D +label Label_D938 SubCD91A_Block +label Label_D93B SubCD92D_Block +label Label_D93C SubCD93C +label Label_D964 SubCD93C_Block +label Label_D986 SubCD93C_Block_1 +label Label_D98B SubCD93C_Block_2 +label Label_D98D SubCD98D +label Label_D990 SubCD990 +label Label_D99D SubCD990_Block +label Label_D9AF SubCD990_Block_1 +label Label_D9D0 SubCD990_Block_2 +label Label_D9D4 SubCD9D4 +label Label_D9E0 SubCD9D4_Block +label Label_D9E3 SubCD9E3 +label Label_D9E6 CheckPeriodicEvent +label Label_D9E8 SubCD9E8 +label Label_D9F5 SubCD9E8_Block +label Label_D9F9 SubCD9F9 +label Label_DA06 SubCD9F9_Block +label Label_DA0F SubCDA0F +label Label_DA13 SubCDA0F_Block +label Label_DA16 UpdateObjectListZp5D +label Label_DA1D UpdateObjectListZp5D_Block +label Label_DA3D UpdateObjectListZp5D_Block_1 +label Label_DA40 UpdateObjectListZp5D_Block_2 +label Label_DA4C DispatchObjectStateZp5E +label Label_DA7D DispatchObjectStateZp5E_Block +label Label_DA80 DispatchObjectStateZp5E_Block_1 +label Label_DA83 DispatchObjectStateZp5E_Block_2 +label Label_DA86 DispatchObjectStateZp5E_Block_3 +label Label_DA89 DispatchObjectStateZp5E_Block_4 +label Label_DA8F DispatchObjectStateZp5E_Block_5 +label Label_DA92 DispatchObjectStateZp5E_Block_6 +label Label_DA95 DispatchObjectStateZp5E_Block_7 +label Label_DA98 DispatchObjectStateZp5E_Block_8 +label Label_DA9C HandleObjectState80 +label Label_DAC3 HandleObjectState80_Block +label Label_DAD5 SubCDAD5 +label Label_DAF2 SubCDAD5_Block +label Label_DAF7 SubCDAF7 +label Label_DAFF SubCDAF7_Block +label Label_DB00 HandleObjectState81 +label Label_DB21 HandleObjectState81_Block +label Label_DB2B SubCDB2B +label Label_DB2C HandleObjectState01 +label Label_DB34 HandleObjectState01_Block +label Label_DB4E HandleObjectState01_Block_1 +label Label_DB50 SubCDB50 +label Label_DBA3 SubCDB50_Block +label Label_DBAC SubCDB50_Block_1 +label Label_DBCD UpdateSpritePosition57_Block +label Label_DBE7 SubCDBE7 +label Label_DBED SubCDBE7_Block +label Label_DBEE UpdateObjectAnimationFrame +label Label_DBFB UpdateObjectAnimationFrame_Block +label Label_DC16 UpdateObjectAnimationFrame_Block_1 +label Label_DC1B UpdateObjectAnimationFrame_Block_2 +label Label_DC2B UpdateObjectAnimationFrame_Block_3 +label Label_DC2D SubCDC2D +label Label_DC30 HandleObjectState02 +label Label_DC4F HandleObjectState02_Block +label Label_DC51 SubCDC51 +label Label_DC68 SubCDC51_Block +label Label_DC69 HandleObjectState08 +label Label_DC71 HandleObjectState08_Block +label Label_DC8E HandleObjectState08_Block_1 +label Label_DC90 SubCDC90 +label Label_DCBC SubCDC90_Block +label Label_DCC9 SubCDCC9 +label Label_DCCF SubCDCC9_Block +label Label_DCD0 HandleObjectState10 +label Label_DCD8 HandleObjectState10_Block +label Label_DCF3 SubCDCF3 +label Label_DD00 HandleObjectState10_Block_1 +label Label_DD06 SubCDD06 +label Label_DD13 SubCDD06_Block +label Label_DD25 SubCDD06_Block_1 +label Label_DD3A UpdateSpritePosition68_Block +label Label_DD59 UpdateSpritePosition68_Block_1 +label Label_DD60 UpdateSpritePosition68_Block_2 +label Label_DD6A UpdateSpritePosition68_Block_3 +label Label_DD73 UpdateSpritePosition68_Block_4 +label Label_DD7F SubCDD7F +label Label_DD8B HandleObjectStateC0 +label Label_DD98 HandleObjectStateC0_Block +label Label_DDAB HandleObjectStateC0_Block_1 +label Label_DDB0 HandleObjectStateC0_Block_2 +label Label_DDB2 SubCDDB2 +label Label_DDC9 SubCDDB2_Block +label Label_DDD7 SubCDDB2_Block_1 +label Label_DDF5 SubCDDB2_Block_2 +label Label_DE0B SubCDDB2_Block_3 +label Label_DE0D SubCDE0D +label Label_DE10 SubCDE0D_Block +label Label_DE13 SubCDDB2_Block_4 +label Label_DE1A SubCDE1A +label Label_DE27 SubCDE27 +label Label_DE36 SubCDE27_Block +label Label_DE50 SubCDE27_Block_1 +label Label_DE56 SubCDE56 +label Label_DE68 SubCDE56_Block +label Label_DE6A SubCDE6A +label Label_DE73 SubCDE73 +label Label_DE82 SubCDE82 +label Label_DE85 SubCDE82_Block +label Label_DE86 SubCDE86 +label Label_DE90 SubCDE86_Block +label Label_DE9F SubCDE86_Block_1 +label Label_DEA4 SubCDEA4 +label Label_DEA5 SubCDEA5 +label Label_DEDC SubCDEA5_Block +label Label_DEE8 SubCDEA5_Block_1 +label Label_DEED SubCDEA5_Block_2 +label Label_DEF2 SubCDEA5_Block_3 +label Label_DEFB SubCDEFB +label Label_DF07 HandleObjectState40 +label Label_DF0F HandleObjectState40_Block +label Label_DF25 HandleObjectState40_Block_1 +label Label_DF27 SubCDF27 +label Label_DF35 SubCDF27_Block +label Label_DF40 SubCDF40 +label Label_DF45 SubCDF40_Block +label Label_DF4C SubCDF40_Block_1 +label Label_DF55 SubCDF40_Block_2 +label Label_DF5E SubCDF40_Block_3 +label Label_DF60 SubCDF40_Block_4 +label Label_DF6C SubCDF40_Block_5 +label Label_DF72 SubCDF72 +label Label_DF7B SubCDF72_Block +label Label_DF7D SubCDF72_Block_1 +label Label_DF89 SubCDF72_Block_2 +label Label_DF8F SubCDF72_Block_3 +label Label_DFAD SubCDFAD +label Label_DFB8 SubCDFAD_Block +label Label_DFC3 SubCDFC3 +label Label_DFE3 SubCDFC3_Block +label Label_DFE4 CheckPeriodicEventForObject +label Label_DFE8 SubCDFE8 +label Label_DFF7 SubCDFE8_Block +label Label_DFFB SubCDFFB +label Label_E008 SubCDFFB_Block +label Label_E011 SubCE011 +label Label_E015 SubCE011_Block +label Label_E016 FindYRowIndex +label Label_E02F SubCE02F +label Label_E041 SubCE02F_Block +label Label_E045 SubCE02F_Block_1 +label Label_E048 SubCE048 +label Label_E057 SubCE048_Block +label Label_E05A SubCE05A +label Label_E06A SubCE06A +label Label_E079 SubCE05A_Block +label Label_E07B SubCE07B +label Label_E08A SubCE07B_Block +label Label_E08D SubCE07B_Block_1 +label Label_E090 SubCE090 +label Label_E09F SubCE090_Block +label Label_E0A1 SubCE0A1 +label Label_E0AB SubCE0A1_Block +label Label_E0AE SubCE0AE +label Label_E0CB SubCE0AE_Block +label Label_E0D1 SubCE0AE_Block_1 +label Label_E0DD SubCE0AE_Block_2 +label Label_E0E9 SubCE0AE_Block_3 +label Label_E0EC SubCE0EC +label Label_E0F1 SubCE0F1 +label Label_E107 SubCE0F1_Block +label Label_E109 SubCE0F1_Block_1 +label Label_E10F SubCE10F +label Label_E112 SearchTableForByte +label Label_E116 SearchTableForByte_Loop +label Label_E124 SearchTableForByte_Loop_Block +label Label_E129 SearchTableForByte_Loop_Block_1 +label Label_E12B SearchTableForByte_Return +label Label_E130 SubCE130 +label Label_E13E SubCE130_Block +label Label_E141 SubCE141 +label Label_E166 CountObjectTypes +label Label_E16A CountObjectTypes_Block +label Label_E172 CountObjectTypes_Loop +label Label_E17F CountObjectTypes_Loop_Block +label Label_E187 CountObjectTypes_Loop_Block_1 +label Label_E199 CountObjectTypes_Loop_Block_2 +label Label_E19A SubCE19A +label Label_E19F SubCE19A_Block +label Label_E1BF SubCE19A_Block_1 +label Label_E1D5 SubCE19A_Block_2 +label Label_E1D7 SubCE1D7 +label Label_E1E0 SubCE1E0 +label Label_E1E4 SubCE1E0_Block +label Label_E1E5 InitObjectListZpAE +label Label_E1E9 UpdateObjectListZpAE +label Label_E200 UpdateObjectListZpAE_Block +label Label_E213 UpdateObjectListZpAE_Block_1 +label Label_E21F SubCE21F +label Label_E225 SubCE225 +label Label_E228 SubCE225_Block +label Label_E237 SubCE225_Block_1 +label Label_E24F SubCE225_Block_2 +label Label_E250 DispatchObjectStateZpAF +label Label_E254 DispatchObjectState_Loop +label Label_E280 SubCE280 +label Label_E28C InitSound_3_Block +label Label_E28F DispatchObjectState_Loop_Block +label Label_E292 SubCE292 +label Label_E295 DispatchObjectState_Loop_Block_1 +label Label_E29A DispatchObjectState_Loop_Block_2 +label Label_E29C SubCE29C +label Label_E2A1 DispatchObjectState_Loop_Block_3 +label Label_E2B3 DispatchObjectState_Loop_Block_4 +label Label_E2B6 SubCE2B6 +label Label_E2D9 SubCE2B6_Block +label Label_E2DD SubCE2DD +label Label_E2EB SubCE2DD_Block +label Label_E2F4 SubCE2DD_Block_1 +label Label_E2F6 SubCE2F6 +label Label_E2F9 SubCE2F9 +label Label_E305 SubCE2F9_Block +label Label_E31A SubCE2F9_Block_1 +label Label_E323 SubCE2F9_Block_2 +label Label_E325 SubCE325 +label Label_E33B SubCE325_Block +label Label_E340 SubCE325_Block_1 +label Label_E349 SubCE325_Block_2 +label Label_E34B SubCE34B +label Label_E363 SubCE34B_Block +label Label_E365 SubCE365 +label Label_E368 SubCE368 +label Label_E374 SubCE368_Block +label Label_E385 SubCE368_Block_1 +label Label_E387 SubCE387 +label Label_E396 SubCE387_Block +label Label_E39B SubCE39B +label Label_E3AA SubCE39B_Block +label Label_E3AF SubCE3AF +label Label_E3BA SubCE3AF_Block +label Label_E3C0 SubCE3C0 +label Label_E3CE SubCE3C0_Block +label Label_E3DD SubCE3C0_Block_1 +label Label_E3E6 SubCE3C0_Block_2 +label Label_E3ED SubCE3ED +label Label_E408 SubCE3ED_Block +label Label_E411 SubCE3ED_Block_1 +label Label_E413 SubCE413 +label Label_E41B SubCE41B +label Label_E429 SubCE41B_Block +label Label_E436 SubCE41B_Block_1 +label Label_E44B SubCE44B +label Label_E451 SubCE44B_Block +label Label_E466 SubCE44B_Block_1 +label Label_E46D SubCE46D +label Label_E47A SubCE47A +label Label_E48E SubCE47A_Block +label Label_E49B SubCE47A_Block_1 +label Label_E4A8 SubCE47A_Block_2 +label Label_E4B5 SubCE47A_Block_3 +label Label_E4C0 SubCE47A_Block_4 +label Label_E4D3 SubCE47A_Block_5 +label Label_E4D6 SubCE4D6 +label Label_E4F9 SubCE4D6_Block +label Label_E50C SubCE50C +label Label_E522 SubCE50C_Block +label Label_E527 SubCE50C_Block_1 +label Label_E530 SubCE50C_Block_2 +label Label_E532 SubCE532 +label Label_E538 SubCE538 +label Label_E545 SubCE538_Block +label Label_E548 SubCE538_Block_1 +label Label_E553 SubCE538_Block_2 +label Label_E564 SubCE538_Block_3 +label Label_E570 SubCE538_Block_4 +label Label_E572 SubCE572 +label Label_E592 SubCE592 +label Label_E594 SubCE594 +label Label_E59F SubCE59F +label Label_E5B4 SubCE59F_Block +label Label_E5BE SubCE59F_Block_1 +label Label_E5D9 SubCE59F_Block_2 +label Label_E5DB SubCE5DB +label Label_E5E5 SubCE5DB_Block +label Label_E5E8 SubCE5E8 +label Label_E5FA SubCE5FA +label Label_E60C SubCE5FA_Block +label Label_E60F SubCE5E8_Block +label Label_E611 SubCE611 +label Label_E620 SubCE611_Block +label Label_E623 SubCE611_Block_1 +label Label_E626 SubCE626 +label Label_E62F SubCE626_Block +label Label_E640 SubCE626_Block_1 +label Label_E64D SubCE626_Block_2 +label Label_E65D SubCE626_Block_3 +label Label_E66D SubCE66D +label Label_E67A SubCE66D_Block +label Label_E68A SubCE66D_Block_1 +label Label_E697 SubCE697 +label Label_E69E SubCE69E +label Label_E6A5 SubCE6A5 +label Label_E6BC SubCE6A5_Block +label Label_E6C3 SubCE6A5_Block_1 +label Label_E6C6 SubCE6C6 +label Label_E6DB SubCE6C6_Block +label Label_E6DE SubCE6DE +label Label_E6E3 SubCE6DE_Block +label Label_E6F3 SubCE6DE_Block_1 +label Label_E6FB SubCE6DE_Block_2 +label Label_E702 SubCE702 +label Label_E719 SubCE702_Block +label Label_E721 SubCE702_Block_1 +label Label_E72D SubCE72D +label Label_E72E SubCE702_Block_2 +label Label_E735 SubCE702_Block_3 +label Label_E73C SubCE73C +label Label_E747 SubCE747 +label Label_E755 SubCE747_Block +label Label_E758 SubCE758 +label Label_E75C SubCE747_Block_1 +label Label_E769 SubCE747_Block_2 +label Label_E770 SubCE770 +label Label_E790 SubCE770_Block +label Label_E79D SubCE770_Block_1 +label Label_E7A0 SubCE770_Block_2 +label Label_E7A3 SubCE7A3 +label Label_E7AE SubCE7A3_Block +label Label_E7E2 SubCE7E2 +label Label_E7F2 SubCE7E2_Block +label Label_E7F9 SubCE7E2_Block_1 +label Label_E806 AdvancePatternBit +label Label_E815 AdvancePatternBit_Block +label Label_E819 ReadPatternBit +label Label_E826 ReadPatternBit_Block +label Label_E82F ReadPatternBit_Return +label Label_E833 ReadPatternBit_Return_Block +label Label_E834 SubCE834 +label Label_E84B SubCE834_Block +label Label_E84F SubCE84F +label Label_E86A SubCE84F_Block +label Label_E889 SubCE84F_Block_1 +label Label_E890 SubCE890 +label Label_E89B SubCE890_Block +label Label_E8A4 SubCE890_Block_1 +label Label_E8A9 SubCE84F_Block_2 +label Label_E8C4 SubCE84F_Block_3 +label Label_E8E3 SubCE84F_Block_4 +label Label_E8EA SubCE8EA +label Label_E8F8 SubCE8EA_Block +label Label_E8FC SubCE8EA_Block_1 +label Label_E901 SubCE8EA_Block_2 +label Label_E90E SubCE84F_Block_5 +label Label_E918 SubCE918 +label Label_E92E SubCE918_Block +label Label_E93B SubCE84F_Block_6 +label Label_E945 SubCE945 +label Label_E95B SubCE945_Block +label Label_E967 SubCE945_Block_1 +label Label_E968 SubCE968 +label Label_E971 SubCE971 +label Label_E97A SetSpritePairY +label Label_E981 SubCE981 +label Label_E986 SubCE986 +label Label_E9B4 SubCE986_Block +label Label_E9BE SubCE986_Block_1 +label Label_E9DA SubCE9DA +label Label_E9EA SubCE9EA +label Label_E9F0 SubCE986_Block_2 +label Label_E9F3 SubCE9F3 +label Label_EA00 SubCE9F3_Block +label Label_EA01 SubCEA01 +label Label_EA11 SubCEA01_Block +label Label_EA2A SubCEA01_Block_1 +label Label_EA34 SubCEA34 +label Label_EA5E SubCEA34_Block +label Label_EA5F SubCEA5F +label Label_EA64 SubCEA5F_Block +label Label_EA72 SubCEA5F_Block_1 +label Label_EA88 SubCEA5F_Block_2 +label Label_EA8A SubCEA8A +label Label_EAA0 SubCEA8A_Block +label Label_EAA1 AdvancePatternBitAlt +label Label_EAAE AdvancePatternBitAlt_Block +label Label_EAB2 ReadPatternBitAlt +label Label_EABF ReadPatternBitAlt_Block +label Label_EAC8 ReadPatternBitAlt_Return +label Label_EACC ReadPatternBitAlt_Return_Block +label Label_EACD ClearSpriteDestOffset +label Label_EAD4 SetSpriteTile +label Label_EAD6 SetSpriteSize +label Label_EADB SetSpriteSizeAndDraw +label Label_EAE1 LoadSprite0Position +label Label_EAEC LoadSpritePosition +label Label_EAF7 SubCEAF7 +label Label_EB05 SubCEAF7_Block +label Label_EB06 SubCEB06 +label Label_EB0C SubCEB06_Block +label Label_EB2B SubCEB2B +label Label_EB32 SubCEB2B_Block +label Label_EB39 SubCEB2B_Block_1 +label Label_EB40 SubCEB2B_Block_2 +label Label_EB47 SubCEB2B_Block_3 +label Label_EB4E SubCEB2B_Block_4 +label Label_EB4F SubCEB06_Block_1 +label Label_EB54 SubCEB06_Block_2 +label Label_EB6F SubCEB06_Block_3 +label Label_EB74 SubCEB06_Block_4 +label Label_EB7B SubCEB06_Block_5 +label Label_EB85 SubCEB85 +label Label_EB89 SubCEB89 +label Label_EB8E SubCEB8E +label Label_EB92 SubCEB92 +label Label_EB97 SubCEB97 +label Label_EB9C SubCEB9C +label Label_EBA1 SubCEBA1 +label Label_EBA6 SubCEBA6 +label Label_EBA8 SubCEBA8 +label Label_EBB6 SubCEBB6 +label Label_EBBB SubCEBB6_Block +label Label_EBC4 SubCEBB6_Block_1 +label Label_EBDA SubCEBDA +label Label_EBED SubCEBDA_Block +label Label_EC03 SubCEBDA_Block_1 +label Label_EC0A SubCEBDA_Block_2 +label Label_EC12 SubCEC12 +label Label_EC16 SubCEBDA_Block_3 +label Label_EC29 SubCEC29 +label Label_EC3B SubCEC29_Block +label Label_EC3E SubCEC29_Block_1 +label Label_EC44 SubCEC44 +label Label_EC48 SubCEC48 +label Label_EC5B SubCEC48_Block +label Label_EC76 SubCEC48_Block_1 +label Label_EC97 SubCEC97 +label Label_ECA7 SubCEC48_Block_2 +label Label_ECAF SubCEC97_Block +label Label_ECBE SubCEC97_Block_1 +label Label_ECBF SubCECBF +label Label_ECC6 SubCECBF_Block +label Label_ECD1 SubCECBF_Block_1 +label Label_ECD3 SubCECD3 +label Label_ECE8 SubCECD3_Block +label Label_ECF7 SubCECD3_Block_1 +label Label_ECFD SubCECFD +label Label_ED07 SubCED07 +label Label_ED16 SubCED16 +label Label_ED34 SubCED07_Block +label Label_ED38 SubCED38 +label Label_ED57 SubCED38_Block +label Label_ED74 SubCED38_Block_1 +label Label_ED85 SubCED38_Block_2 +label Label_ED87 SubCED87 +label Label_ED8A SubCED8A +label Label_ED93 SubCED93 +label Label_EDAD SubCED93_Block +label Label_EDB5 SubCED93_Block_1 +label Label_EDC4 SubCED93_Block_2 +label Label_EDC5 SubCEDC5 +label Label_EDD2 SubCEDC5_Block +label Label_EDEB SubCEDEB +label Label_EE07 SubCEDEB_Block +label Label_EE0B SubCEDEB_Block_1 +label Label_EE0C SubCEE0C +label Label_EE1A SubCEE0C_Block +label Label_EE26 SubCEE0C_Block_1 +label Label_EE29 SubCEE29 +label Label_EE38 SubCEE29_Block +label Label_EE51 SubCEE29_Block_1 +label Label_EE5C SubCEE29_Block_2 +label Label_EE6C SetSpriteAttributes +label Label_EE79 CheckPlayerCollision +label Label_EE80 CheckPlayerCollision_Block +label Label_EE8D SubCEE8D +label Label_EED8 SubCEE8D_Block +label Label_EED9 SubCEE8D_Block_1 +label Label_EEE6 SubCEE8D_Block_2 +label Label_EEE7 SubCEE8D_Block_3 +label Label_EEF0 SubCEE8D_Block_4 +label Label_EEF7 SubCEEF7 +label Label_EF2E SubCEEF7_Block +label Label_EF2F SubCEEF7_Block_1 +label Label_EF38 SubCEF38 +label Label_EF51 SubCEF51 +label Label_EF71 SubCEF51_Block +label Label_EF72 SubCEF72 +label Label_EF87 SubCEF72_Block +label Label_EF89 SubCEF89 +label Label_EF94 SubCEF72_Block_1 +label Label_EFA0 SubCEF72_Block_2 +label Label_EFA2 SubCEFA2 +label Label_EFAD SubCEFAD +label Label_EFD5 ComputeOamOffsetFromZp5D +label Label_EFD7 SubCEFD7 +label Label_EFDD ComputeOamOffsetFromZpAE +label Label_EFE2 ComputeOamOffset +label Label_EFE8 LoadObjectRect +label Label_EFEB SubCEFEB +label Label_EFEF CheckObjectOverlap +label Label_EFF3 SubCEFF3 +label Label_EFF5 SubCEFF3_Block +label Label_F018 SubCEFF3_Block_1 +label Label_F057 SubCEFF3_Block_2 +label Label_F059 SubCF059 +label Label_F062 SubCF062 +label Label_F063 ReadPtrBytePlusZp00 +label Label_F069 ReadPtrBytePlusZp01 +label Label_F070 SubCF070 +label Label_F075 SubCF075 +label Label_F078 DrawSpriteByMode +label Label_F080 SetSpriteDrawOffset +label Label_F082 DrawSpritePatternMode0 +label Label_F086 SetSpriteDrawOffsetMode1 +label Label_F088 DrawSpritePatternMode1 +label Label_F08C SetSpriteDrawOffsetMode4 +label Label_F08E DrawSpritePatternMode4 +label Label_F092 SetSpritePatternParams +label Label_F094 DrawSpritePatternMode15 +label Label_F096 DrawSpritePattern +label Label_F0CB DrawSpritePattern_Block +label Label_F0DC DrawSpritePattern_Block_1 +label Label_F0E6 DrawSpritePattern_Block_2 +label Label_F0E9 SubCF0E9 +label Label_F0EF DrawSpritePattern_Block_3 +label Label_F0F2 DrawSpritePatternReturn +label Label_F10A HideSpriteRange +label Label_F10E HideSpriteRange_Block +label Label_F11E DrawSpriteTileRun +label Label_F124 DrawSpriteTileRun_Block +label Label_F139 DrawSpriteGrid +label Label_F13B DrawSpriteGrid_Block +label Label_F141 DrawSpriteGrid_Block_1 +label Label_F161 DrawSpriteMaskedGrid +label Label_F16A DrawSpriteMaskedGrid_Block +label Label_F16F DrawSpriteMaskedGrid_Block_1 +label Label_F195 HideSpriteGrid +label Label_F197 HideSpriteGrid_Block +label Label_F19F HideSpriteGrid_Block_1 +label Label_F1B4 ClearNametable +label Label_F1CE ClearNametable_Block +label Label_F1E5 ClearNametable_Block_1 +label Label_F1EC FlushPpuBuffer_Block +label Label_F202 FlushPpuBuffer_Block_1 +label Label_F20E FlushPpuBuffer_Block_2 +label Label_F211 FlushPpuBuffer_Block_3 +label Label_F214 FlushPpuBuffer_Block_4 +label Label_F228 FlushPpuBuffer +label Label_F23C DrawLevelBlocks +label Label_F23F DrawLevelBlocks_Block +label Label_F248 DrawLevelBlocks_Block_1 +label Label_F24E DrawLevelBlock +label Label_F28E DrawLevelBlock_Block +label Label_F296 DrawLevelBlock_Block_1 +label Label_F29A DrawLevelBlock_Block_2 +label Label_F2B0 DrawLevelBlock_Block_3 +label Label_F2B4 DrawLevelBlock_Block_4 +label Label_F2BE DrawLevelBlock_Block_5 +label Label_F2C4 DrawLevelBlock_Block_6 +label Label_F2D6 DrawLevelBlock_Block_7 +label Label_F2D7 DrawVramBlock +label Label_F2EA DrawVramBlock_Block +label Label_F303 DrawVramBlock_Block_1 +label Label_F32D AdvancePpuBufferWrite +label Label_F32F CheckPpuBufferOverflow +label Label_F33D CheckPpuBufferOverflow_Block +label Label_F33E SubtractBcdValue +label Label_F342 AddBcdValue +label Label_F344 AddBcdValue_Block +label Label_F355 AddBcdValue_Block_1 +label Label_F35E ApplyBcdAddSub +label Label_F36B ApplyBcdAddSub_Block +label Label_F38E ApplyBcdAddSub_Block_1 +label Label_F392 ApplyBcdAddSub_Block_2 +label Label_F3C0 ApplyBcdAddSub_Block_3 +label Label_F3C6 ApplyBcdAddSub_Block_4 +label Label_F3E2 ApplyBcdAddSub_Block_5 +label Label_F3E3 AddBcdNibble +label Label_F3EE AddBcdNibble_Block +label Label_F3FB AddBcdNibble_Block_1 +label Label_F3FF AddBcdNibble_Block_2 +label Label_F404 SubtractBcdNibble +label Label_F417 SubtractBcdNibble_Block +label Label_F423 SubtractBcdNibble_Block_1 +label Label_F426 SplitBcdByte +label Label_F435 CompareBcdValues +label Label_F44A CompareBcdValues_Block +label Label_F453 CompareBcdValues_Block_1 +label Label_F479 CompareBcdValues_Block_2 +label Label_F47E CompareBcdValues_Block_3 +label Label_F493 CompareBcdValues_Block_4 +label Label_F49F CompareBcdValues_Block_5 +label Label_F4A0 CompareBcdValues_Block_6 +label Label_F4A4 CompareBcdValues_Block_7 +label Label_F4A9 CompareBcdValues_Block_8 +label Label_F4AC UpdateTimers +label Label_F4B8 UpdateTimers_Block +label Label_F4BE UpdateTimers_Block_1 +label Label_F4C2 QueuePpuByteWrite +label Label_F4ED UpdateRandomSeed +label Label_F4FD UpdateRandomSeed_Block +label Label_F50E ReadControllers +label Label_F522 ReadControllerShift +label Label_F524 ReadControllerShift_Block +label Label_F549 ReadControllerShift_Block_1 +label Label_F55A ReadControllerShift_Block_2 +label Label_FA48 UpdateSoundEngine +label Label_FA64 UpdateSoundEngine_Block +label Label_FA6B UpdateSoundEngine_Block_1 +label Label_FA7F UpdateSoundEngine_Block_2 +label Label_FA82 UpdateSoundEngine_Block_3 +label Label_FA86 FindHighestSetBit +label Label_FA88 FindHighestSetBit_Block +label Label_FA8E FindHighestSetBit_Block_1 +label Label_FA8F SubCFA8F +label Label_FA93 WritePulse1ControlDefault +label Label_FA95 WritePulse1Control +label Label_FA9F WriteNoteFrequency +label Label_FAA1 WriteTriangleNote_Block +label Label_FAB2 WriteTriangleNote_Block_1 +label Label_FAB3 WritePulse2Note +label Label_FABA WriteTriangleNote +label Label_FAC4 DecodeNotePeriod +label Label_FACA LookupNotePeriod +label Label_FAD5 SubCFAD5 +label Label_FAD7 SubCFAD7 +label Label_FAE0 SilencePulse1 +label Label_FB75 ProcessSoundCommands_Block +label Label_FB7E ProcessSoundCommands_Block_1 +label Label_FB89 ProcessSoundCommands_Block_2 +label Label_FBA0 ProcessSoundCommands_Block_3 +label Label_FBA7 ProcessSoundCommands_Block_4 +label Label_FBAF ProcessSoundCommands_Block_5 +label Label_FBB2 ProcessSoundCommands_Block_6 +label Label_FBB7 ProcessSoundCommands_Block_7 +label Label_FBC2 ProcessSoundCommands_Block_8 +label Label_FBD4 ProcessSoundCommands_Block_9 +label Label_FBD9 ProcessSoundCommands_Block_10 +label Label_FBF2 ProcessSoundCommands +label Label_FC16 ProcessSoundCommands_Block_11 +label Label_FC19 ProcessSoundCommands_Block_12 +label Label_FC28 ProcessSoundCommands_Block_13 +label Label_FC30 ProcessSoundCommands_Block_14 +label Label_FC41 ProcessSoundCommands_Block_15 +label Label_FC44 ProcessSoundCommands_Block_16 +label Label_FC4B ProcessSoundCommands_Block_17 +label Label_FC51 ProcessSoundCommands_Block_18 +label Label_FC62 ProcessSoundCommands_Block_19 +label Label_FC73 SubCFC90_Block +label Label_FC7F SubCFC90_Block_1 +label Label_FC90 SubCFC90 +label Label_FC9D SubCFC90_Block_2 +label Label_FCBA SubCFC90_Block_3 +label Label_FCBE SubCFC90_Block_4 +label Label_FCC6 SubCFC90_Block_5 +label Label_FCD1 SubCFC90_Block_6 +label Label_FCDB SubCFC90_Block_7 +label Label_FCDD SubCFC90_Block_8 +label Label_FCF0 SubCFC90_Block_9 +label Label_FD00 SubCFC90_Block_10 +label Label_FD0B SubCFC90_Block_11 +label Label_FD18 SubCFC90_Block_12 +label Label_FD1D SubCFC90_Block_13 +label Label_FD35 SubCFC90_Block_14 +label Label_FD3A SubCFC90_Block_15 +label Label_FD58 SubCFC90_Block_16 +label Label_FD62 SubCFC90_Block_17 +label Label_FD67 InitSoundEffect +label Label_FD9B InitSoundEffect_Block +label Label_FDA4 InitSoundEffect_Block_1 +label Label_FDB8 InitSoundEffect_Block_2 +label Label_FDC1 InitSoundEffect_Block_3 +label Label_FDCF InitSoundEffect_Block_4 +label Label_FDD8 InitSoundEffect_Block_5 +label Label_FDE9 InitSoundEffect_Block_6 +label Label_FE00 SilenceTriangleAndNoise +label Label_FE03 SilenceTriangleAndNoise_Block +label Label_FE09 InitSoundEffect_Block_7 +label Label_FE1D InitSoundEffect_Block_8 +label Label_FE2E InitSoundEffect_Block_9 +label Label_FE31 InitSoundEffect_Block_10 +label Label_FE4F InitSoundEffect_Block_11 +label Label_FE55 InitSoundEffect_Block_12 +label Label_FE58 InitSoundEffect_Block_13 +zp Zp00 TempPtrLo +zp Zp01 TempPtrHi +zp Zp02 TempReg +zp Zp03 TempReg2 +zp Zp04 TempReg3 +zp Zp05 TempReg3 +zp Zp06 TempReg4 +zp Zp07 TempReg5 +zp Zp08 TempReg6 +zp Zp09 TempReg7 +zp Zp0A TempReg8 +zp Zp0B TempReg9 +zp Zp0C TempReg10 +zp Zp0D TempReg11 +zp Zp0E TempReg12 +zp Zp0F TempReg13 +zp Zp10 PPUCtrlShadow +zp Zp11 PPUMaskShadow +zp Zp12 PPUScrollX +zp Zp13 PPUScrollY +zp Zp10 PPUCtrlShadow +zp Zp11 PPUMaskShadow +zp Zp12 PPUScrollX +zp Zp13 PPUScrollY +zp Zp14 TempReg14 +zp Zp15 TempReg15 +zp Zp16 TempReg16 +zp Zp17 TempReg17 +zp Zp18 TempReg18 +zp Zp19 TempReg19 +zp Zp1A TempReg20 +zp Zp1B TempReg21 +zp Zp1C TempReg22 +zp Zp1D TempReg23 +zp Zp1E TempReg24 +zp Zp1F TempReg25 +zp Zp20 TempReg26 +zp Zp21 TempReg27 +zp Zp22 TempReg28 +zp Zp23 TempReg29 +zp Zp24 TempReg30 +zp Zp25 TempReg31 +zp Zp26 TempReg32 +zp Zp27 TempReg33 +zp Zp28 TempReg34 +zp Zp29 TempReg35 +zp Zp2A TempReg36 +zp Zp2B TempReg37 +zp Zp2C TempReg38 +zp Zp2D TempReg39 +zp Zp2E TempReg40 +zp Zp2F TempReg41 +zp Zp2F TempReg42 +zp Zp30 TempReg43 +zp Zp31 TempReg44 +zp Zp32 TempReg45 +zp Zp33 TempReg46 +zp Zp34 TempReg47 +zp Zp35 TempReg48 +zp Zp36 TempReg49 +zp Zp37 TempReg50 +zp Zp38 TempReg51 +zp Zp39 TempReg52 +zp Zp3A TempReg53 +zp Zp3B TempReg54 +zp Zp3C TempReg55 +zp Zp3D TempReg56 +zp Zp3E TempReg57 +zp Zp3F TempReg58 +zp Zp40 TempReg59 +zp Zp41 TempReg60 +zp Zp42 TempReg61 +zp Zp43 TempReg62 +zp Zp44 TempReg63 +zp Zp45 TempReg64 +zp Zp46 TempReg65 +zp Zp47 TempReg66 +zp Zp48 TempReg67 +zp Zp49 TempReg68 +zp Zp4A TempReg69 +zp Zp4B TempReg70 +zp Zp4C TempReg71 +zp Zp4D TempReg72 +zp Zp4E TempReg73 +zp Zp4F TempReg74 +zp Zp50 TempReg75 +zp Zp51 TempReg76 +zp Zp52 TempReg77 +zp Zp53 TempReg78 +zp Zp54 TempReg79 +zp Zp55 TempReg80 +zp Zp56 TempReg81 +zp Zp57 TempReg82 +zp Zp58 TempReg83 +zp Zp59 TempReg84 +zp Zp5A TempReg85 +zp Zp5B TempReg86 +zp Zp5C TempReg87 +zp Zp5D TempReg88 +zp Zp5E TempReg89 +zp Zp5F TempReg90 +zp Zp5F TempReg91 +zp Zp60 TempReg92 +zp Zp61 TempReg93 +zp Zp62 TempReg94 +zp Zp63 TempReg95 +zp Zp64 TempReg96 +zp Zp65 TempReg96 +zp Zp66 TempReg97 +zp Zp67 TempReg98 +zp Zp68 TempReg99 +zp Zp69 TempReg100 +zp Zp6A TempReg101 +zp Zp6B TempReg102 +zp Zp6C TempReg103 +zp Zp6D TempReg104 +zp Zp6E TempReg105 +zp Zp6F TempReg106 +zp Zp70 TempReg107 +zp Zp71 TempReg108 +zp Zp72 TempReg109 +zp Zp73 TempReg110 +zp Zp74 TempReg111 +zp Zp75 TempReg111 +zp Zp76 TempReg112 +zp Zp77 TempReg113 +zp Zp78 TempReg114 +zp Zp79 TempReg115 +zp Zp7A TempReg116 +zp Zp7B TempReg117 +zp Zp7C TempReg118 +zp Zp7D TempReg119 +zp Zp7E TempReg120 +zp Zp7F TempReg121 +zp Zp80 TempReg122 +zp Zp81 TempReg123 +zp Zp82 TempReg124 +zp Zp83 TempReg125 +zp Zp84 TempReg126 +zp Zp85 TempReg127 +zp Zp86 TempReg128 +zp Zp87 TempReg129 +zp Zp88 TempReg130 +zp Zp89 TempReg131 +zp Zp8A TempReg132 +zp Zp8B TempReg133 +zp Zp8C TempReg134 +zp Zp8D TempReg135 +zp Zp8E TempReg136 +zp Zp8F TempReg137 +zp Zp90 TempReg138 +zp Zp91 TempReg139 +zp Zp92 TempReg140 +zp Zp93 TempReg141 +zp Zp94 TempReg141 +zp Zp95 TempReg142 +zp Zp96 TempReg143 +zp Zp97 TempReg144 +zp Zp98 TempReg145 +zp Zp99 TempReg146 +zp Zp9A TempReg147 +zp Zp9B TempReg148 +zp Zp9C TempReg149 +zp Zp9D TempReg150 +zp Zp9E TempReg151 +zp Zp9F TempReg152 +zp ZpA0 TempReg153 +zp ZpA1 TempReg154 +zp ZpA2 TempReg155 +zp ZpA3 TempReg156 +zp ZpA4 TempReg157 +zp ZpA5 TempReg158 +zp ZpA6 TempReg159 +zp ZpA7 TempReg160 +zp ZpA8 TempReg161 +zp ZpA9 TempReg162 +zp ZpAA TempReg163 +zp ZpAB TempReg164 +zp ZpAC TempReg165 +zp ZpAD TempReg166 +zp ZpAE TempReg167 +zp ZpAF TempReg168 +zp ZpB0 TempReg169 +zp ZpB1 TempReg170 +zp ZpB2 TempReg171 +zp ZpB3 TempReg172 +zp ZpB4 TempReg173 +zp ZpB5 TempReg174 +zp ZpB6 TempReg175 +zp ZpB7 TempReg176 +zp ZpB8 TempReg177 +zp ZpB9 TempReg177 +zp ZpBA TempReg178 +zp ZpBB TempReg179 +zp ZpBC TempReg180 +zp ZpBD TempReg181 +zp ZpBE TempReg182 +zp ZpBF TempReg183 +zp ZpC0 TempReg184 +zp ZpC1 TempReg185 +zp ZpC2 TempReg186 +zp ZpC3 TempReg187 +zp ZpC4 TempReg188 +zp ZpC5 TempReg189 +zp ZpC6 TempReg190 +zp ZpC7 TempReg191 +zp ZpC8 TempReg192 +zp ZpC9 TempReg193 +zp ZpCA TempReg194 +zp ZpCB TempReg195 +zp ZpCC TempReg196 +zp ZpCD TempReg197 +zp ZpCE TempReg198 +zp ZpCF TempReg199 +zp ZpD0 TempReg185 +zp ZpD1 TempReg186 +zp ZpD2 TempReg187 +zp ZpD3 TempReg188 +zp ZpD4 TempReg189 +zp ZpD5 TempReg190 +zp ZpD6 TempReg191 +zp ZpD7 TempReg192 +zp ZpD8 TempReg193 +zp ZpD9 TempReg194 +zp ZpDA TempReg195 +zp ZpDB TempReg196 +zp ZpDC TempReg197 +zp ZpDD TempReg198 +zp ZpDE TempReg199 +zp ZpDF TempReg200 +zp ZpE0 TempReg201 +zp ZpE1 TempReg202 +zp ZpE2 TempReg203 +zp ZpE3 TempReg204 +zp ZpE4 TempReg205 +zp ZpE5 TempReg206 +zp ZpE6 TempReg207 +zp ZpE7 TempReg208 +zp ZpE8 TempReg209 +zp ZpE9 TempReg210 +zp ZpEA TempReg211 +zp ZpEB TempReg212 +zp ZpEC TempReg213 +zp ZpED TempReg214 +zp ZpEE TempReg215 +zp ZpEF TempReg216 +zp ZpF0 TempReg217 +zp ZpF1 TempReg218 +zp ZpF2 TempReg219 +zp ZpF3 TempReg220 +zp ZpF4 TempReg221 +zp ZpF5 TempReg222 +zp ZpF6 TempReg223 +zp ZpF7 TempReg224 +zp ZpF8 TempReg225 +zp ZpF9 TempReg226 +zp ZpFA TempReg227 +zp ZpFB TempReg228 +zp ZpFC TempReg229 +zp ZpFD TempReg230 +zp ZpFE TempReg231 +zp ZpFF TempReg232 +zp Zp00 Zp00 +zp Zp01 Zp01 +zp Zp02 Zp02 +zp Zp03 Zp03 +zp Zp04 Zp04 +zp Zp05 Zp05 +zp Zp06 Zp06 +zp Zp07 Zp07 +zp Zp08 Zp08 +zp Zp09 Zp09 +zp Zp0A Zp0A +zp Zp0B Zp0B +zp Zp0C Zp0C +zp Zp0F Zp0F +zp Zp10 Zp10 +zp Zp11 Zp11 +zp Zp12 Zp12 +zp Zp13 Zp13 +zp Zp14 Zp14 +zp Zp15 Zp15 +zp Zp18 Zp18 +zp Zp19 Zp19 +zp Zp1A Zp1A +zp Zp1B Zp1B +zp Zp1C Zp1C +zp Zp1D Zp1D +zp Zp1E Zp1E +zp Zp1F Zp1F +zp Zp20 Zp20 +zp Zp21 Zp21 +zp Zp22 Zp22 +zp Zp23 Zp23 +zp Zp24 Zp24 +zp Zp25 Zp25 +zp Zp26 Zp26 +zp Zp27 Zp27 +zp Zp2C Zp2C +zp Zp2E Zp2E +zp Zp34 Zp34 +zp Zp35 Zp35 +zp Zp36 Zp36 +zp Zp37 Zp37 +zp Zp38 Zp38 +zp Zp39 Zp39 +zp Zp3A Zp3A +zp Zp3B Zp3B +zp Zp3F Zp3F +zp Zp40 Zp40 +zp Zp41 Zp41 +zp Zp43 Zp43 +zp Zp44 Zp44 +zp Zp45 Zp45 +zp Zp46 Zp46 +zp Zp47 Zp47 +zp Zp48 Zp48 +zp Zp49 Zp49 +zp Zp4A Zp4A +zp Zp4B Zp4B +zp Zp4C Zp4C +zp Zp4D Zp4D +zp Zp4E Zp4E +zp Zp4F Zp4F +zp Zp50 Zp50 +zp Zp51 Zp51 +zp Zp52 Zp52 +zp Zp53 Zp53 +zp Zp54 Zp54 +zp Zp55 Zp55 +zp Zp56 Zp56 +zp Zp57 Zp57 +zp Zp58 Zp58 +zp Zp59 Zp59 +zp Zp5A Zp5A +zp Zp5B Zp5B +zp Zp5C Zp5C +zp Zp5D Zp5D +zp Zp5E Zp5E +zp Zp68 Zp68 +zp Zp72 Zp72 +zp Zp7D Zp7D +zp Zp7E Zp7E +zp Zp85 Zp85 +zp Zp86 Zp86 +zp Zp88 Zp88 +zp Zp8A Zp8A +zp Zp94 Zp94 +zp Zp95 Zp95 +zp Zp96 Zp96 +zp Zp97 Zp97 +zp Zp98 Zp98 +zp Zp99 Zp99 +zp Zp9A Zp9A +zp Zp9B Zp9B +zp Zp9C Zp9C +zp Zp9D Zp9D +zp Zp9E Zp9E +zp Zp9F Zp9F +zp ZpA0 ZpA0 +zp ZpA1 ZpA1 +zp ZpA2 ZpA2 +zp ZpA3 ZpA3 +zp ZpAD ZpAD +zp ZpAE ZpAE +zp ZpAF ZpAF +zp ZpB3 ZpB3 +zp ZpB7 ZpB7 +zp ZpB8 ZpB8 +zp ZpB9 ZpB9 +zp ZpBE ZpBE +zp ZpBF ZpBF +zp ZpC0 ZpC0 +zp ZpC1 ZpC1 +zp ZpC2 ZpC2 +zp ZpCC ZpCC +zp ZpCD ZpCD +zp ZpCE ZpCE +zp ZpCF ZpCF +zp ZpD0 ZpD0 +zp ZpD2 ZpD2 +zp ZpD3 ZpD3 +zp ZpD4 ZpD4 +zp ZpD5 ZpD5 +zp ZpD8 ZpD8 +zp ZpD9 ZpD9 +zp ZpDA ZpDA +zp ZpDB ZpDB +zp ZpE0 ZpE0 +zp ZpE4 ZpE4 +zp ZpE8 ZpE8 +zp ZpEC ZpEC +zp ZpF0 ZpF0 +zp ZpF1 ZpF1 +zp ZpF2 ZpF2 +zp ZpF3 ZpF3 +zp ZpF5 ZpF5 +zp ZpF6 ZpF6 +zp ZpF7 ZpF7 +zp ZpF8 ZpF8 +zp ZpF9 ZpF9 +zp ZpFA ZpFA +zp ZpFB ZpFB +zp ZpFC ZpFC +zp ZpFD ZpFD +zp ZpFE ZpFE +zp ZpFF ZpFF diff --git a/_wip/Donkey Kong (JU)/copilot/dk_label_map.tsv b/Donkey Kong (JU)/copilot/dk_label_map.tsv similarity index 100% rename from _wip/Donkey Kong (JU)/copilot/dk_label_map.tsv rename to Donkey Kong (JU)/copilot/dk_label_map.tsv diff --git a/_wip/Donkey Kong (JU)/copilot/header.bin b/Donkey Kong (JU)/copilot/header.bin similarity index 100% rename from _wip/Donkey Kong (JU)/copilot/header.bin rename to Donkey Kong (JU)/copilot/header.bin diff --git a/Donkey Kong (JU)/copilot/header.s b/Donkey Kong (JU)/copilot/header.s new file mode 100644 index 0000000..6091055 --- /dev/null +++ b/Donkey Kong (JU)/copilot/header.s @@ -0,0 +1,2 @@ +.segment "HEADER" + .incbin "header.bin" diff --git a/Donkey Kong (JU)/copilot/linker.cfg b/Donkey Kong (JU)/copilot/linker.cfg new file mode 100644 index 0000000..e5136a0 --- /dev/null +++ b/Donkey Kong (JU)/copilot/linker.cfg @@ -0,0 +1,10 @@ +MEMORY { + HEADER: start = $0000, size = $0010, fill = yes; + PRG: start = $C000, size = $4000, fill = yes; + CHR: start = $0000, size = $2000, fill = yes; +} +SEGMENTS { + HEADER: load = HEADER, type = ro; + PRG: load = PRG, type = ro; + CHR: load = CHR, type = ro; +} diff --git a/_wip/Donkey Kong (JU)/copilot/locals.inc b/Donkey Kong (JU)/copilot/locals.inc similarity index 100% rename from _wip/Donkey Kong (JU)/copilot/locals.inc rename to Donkey Kong (JU)/copilot/locals.inc diff --git a/_wip/Donkey Kong (JU)/copilot/prg.bin b/Donkey Kong (JU)/copilot/prg.bin similarity index 100% rename from _wip/Donkey Kong (JU)/copilot/prg.bin rename to Donkey Kong (JU)/copilot/prg.bin diff --git a/_wip/Donkey Kong (JU)/copilot/prg.s b/Donkey Kong (JU)/copilot/prg.s similarity index 91% rename from _wip/Donkey Kong (JU)/copilot/prg.s rename to Donkey Kong (JU)/copilot/prg.s index c31955e..7a43224 100644 --- a/_wip/Donkey Kong (JU)/copilot/prg.s +++ b/Donkey Kong (JU)/copilot/prg.s @@ -27,11 +27,15 @@ ; referenced by `lda $C03C,x` at $C824 (operand $C03C falls inside this region) ; referenced by `lda $C03D,x` at $C829 (operand $C03D falls inside this region) ; ... and 127 further references from decoded code - .byte $20, $70, $06, $00, $20, $64, $06, $00, $20, $78, $06, $00, $20, $B7, $04, $00 ; CPU:$C000 PRG:0000 20 70 06 00 20 64 06 00 20 78 06 00 20 B7 04 00 + +LevelPtrTable: .byte $20, $70, $06, $00, $20, $64, $06, $00, $20, $78, $06, $00, $20, $B7, $04, $00 ; CPU:$C000 PRG:0000 20 70 06 00 20 64 06 00 20 78 06 00 20 B7 04 00 .byte $20, $BC, $01, $00, $01, $08, $02, $08, $02, $00, $05, $01, $00, $02, $01, $01 ; CPU:$C010 PRG:0010 20 BC 01 00 01 08 02 08 02 00 05 01 00 02 01 01 .byte $01, $05, $01, $05, $01, $02, $01, $02, $DB, $60, $E2, $55, $14, $20, $01, $F9 ; CPU:$C020 PRG:0020 01 05 01 05 01 02 01 02 DB 60 E2 55 14 20 01 F9 - .byte $A0, $E0, $30, $10, $10, $01, $50, $01, $30, $D0, $FF, $FF, $3E, $C6, $57, $C6 ; CPU:$C030 PRG:0030 A0 E0 30 10 10 01 50 01 30 D0 FF FF 3E C6 57 C6 - .byte $E1, $C6, $60, $C7, $7D, $C7, $E4, $C6, $F1, $C6, $53, $C7, $08, $C7, $19, $C7 ; CPU:$C040 PRG:0040 E1 C6 60 C7 7D C7 E4 C6 F1 C6 53 C7 08 C7 19 C7 + .byte $A0, $E0, $30, $10, $10, $01, $50, $01, $30, $D0, $FF, $FF ; CPU:$C030 PRG:0030 A0 E0 30 10 10 01 50 01 30 D0 FF FF + +ObjectPtrTable: .byte $3E, $C6, $57, $C6, $E1, $C6, $60, $C7 ; CPU:$C03C PRG:003C 3E C6 57 C6 E1 C6 60 C7 + +LevelDataPtrTable: .byte $7D, $C7, $E4, $C6, $F1, $C6, $53, $C7, $08, $C7, $19, $C7 ; CPU:$C044 PRG:0044 7D C7 E4 C6 F1 C6 53 C7 08 C7 19 C7 .byte $1C, $C7, $35, $C7, $4E, $C7, $8C, $C0, $CF, $C0, $61, $C1, $60, $04, $C3, $C0 ; CPU:$C050 PRG:0050 1C C7 35 C7 4E C7 8C C0 CF C0 61 C1 60 04 C3 C0 .byte $DF, $C0, $6E, $C1, $C4, $C2, $C8, $C2, $86, $C1, $B0, $C1, $92, $C1, $CF, $C1 ; CPU:$C060 PRG:0060 DF C0 6E C1 C4 C2 C8 C2 86 C1 B0 C1 92 C1 CF C1 .byte $D5, $C1, $DB, $C1, $E1, $C1, $9E, $C1, $E7, $C1, $0C, $C6, $70, $C6, $89, $C6 ; CPU:$C070 PRG:0070 D5 C1 DB C1 E1 C1 9E C1 E7 C1 0C C6 70 C6 89 C6 @@ -102,7 +106,10 @@ .byte $C2, $16, $C3, $0B, $C1, $0C, $C2, $8D, $C2, $41, $C3, $27, $C1, $0C, $C2, $A5 ; CPU:$C480 PRG:0480 C2 16 C3 0B C1 0C C2 8D C2 41 C3 27 C1 0C C2 A5 .byte $C2, $49, $C3, $BC, $C0, $0C, $C2, $4C, $C2, $00, $C3, $0C, $C2, $D2, $C2, $74 ; CPU:$C490 PRG:0490 C2 49 C3 BC C0 0C C2 4C C2 00 C3 0C C2 D2 C2 74 .byte $C3, $0C, $C2, $D8, $C2, $7A, $C3, $5B, $F5, $D9, $F8, $CD, $F7, $1C, $F7, $D9 ; CPU:$C4A0 PRG:04A0 C3 0C C2 D8 C2 7A C3 5B F5 D9 F8 CD F7 1C F7 D9 - .byte $F8, $1B, $FA, $00, $00, $01, $06, $E8, $04, $50, $18, $D5, $12, $E8, $00, $50 ; CPU:$C4B0 PRG:04B0 F8 1B FA 00 00 01 06 E8 04 50 18 D5 12 E8 00 50 + +SpriteInitPtrTable: .byte $F8, $1B, $FA, $00, $00, $01, $06, $E8 ; CPU:$C4A7 PRG:04A7 F8 1B FA 00 00 01 06 E8 + + .byte $04, $50, $18, $D5, $12, $E8, $00, $50 ; CPU:$C4AF PRG:04AF 04 50 18 D5 12 E8 00 50 .byte $20, $DB, $22, $F0, $00, $00, $00, $03, $2C, $30, $04, $20, $7F, $F6, $21, $D0 ; CPU:$C4C0 PRG:04C0 20 DB 22 F0 00 00 00 03 2C 30 04 20 7F F6 21 D0 .byte $00, $20, $46, $F6, $21, $D8, $00, $00, $00, $01, $04, $C0, $04, $00, $00, $00 ; CPU:$C4D0 PRG:04D0 00 20 46 F6 21 D8 00 00 00 01 04 C0 04 00 00 00 .byte $04, $00, $04, $30, $C7, $04, $22, $00, $00, $00, $00, $02, $08, $10, $04, $00 ; CPU:$C4E0 PRG:04E0 04 00 04 30 C7 04 22 00 00 00 00 02 08 10 04 00 @@ -162,11 +169,11 @@ Reset: sei ; CPU:$C79E PRG:079E 78 cld ; CPU:$C79F PRG:079F D8 lda #$10 ; CPU:$C7A0 PRG:07A0 A9 10 - sta $2000 ; CPU:$C7A2 PRG:07A2 8D 00 20 + sta PPUCTRL ; CPU:$C7A2 PRG:07A2 8D 00 20 ldx #$FF ; CPU:$C7A5 PRG:07A5 A2 FF txs ; CPU:$C7A7 PRG:07A7 9A ; ----------------------------------------------------------------------------- -; Routine: Label_C7A8 +; Routine: Reset_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -174,17 +181,17 @@ Reset: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C7A8: - lda $2002 ; CPU:$C7A8 PRG:07A8 AD 02 20 +Reset_Block: + lda PPUSTATUS ; CPU:$C7A8 PRG:07A8 AD 02 20 and #$80 ; CPU:$C7AB PRG:07AB 29 80 - beq Label_C7A8 ; CPU:$C7AD PRG:07AD F0 F9 + beq Reset_Block ; CPU:$C7AD PRG:07AD F0 F9 ldy #$07 ; CPU:$C7AF PRG:07AF A0 07 sty Zp01 ; CPU:$C7B1 PRG:07B1 84 01 ldy #$00 ; CPU:$C7B3 PRG:07B3 A0 00 sty Zp00 ; CPU:$C7B5 PRG:07B5 84 00 lda #$00 ; CPU:$C7B7 PRG:07B7 A9 00 ; ----------------------------------------------------------------------------- -; Routine: Label_C7B9 +; Routine: Reset_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -192,12 +199,12 @@ Label_C7A8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C7B9: +Reset_Block_1: sta (Zp00),y ; CPU:$C7B9 PRG:07B9 91 00 dey ; CPU:$C7BB PRG:07BB 88 - bne Label_C7B9 ; CPU:$C7BC PRG:07BC D0 FB + bne Reset_Block_1 ; CPU:$C7BC PRG:07BC D0 FB dec Zp01 ; CPU:$C7BE PRG:07BE C6 01 - bpl Label_C7B9 ; CPU:$C7C0 PRG:07C0 10 F7 + bpl Reset_Block_1 ; CPU:$C7C0 PRG:07C0 10 F7 jsr $C7E7 ; CPU:$C7C2 PRG:07C2 20 E7 C7 lda #$7F ; CPU:$C7C5 PRG:07C5 A9 7F sta $0511 ; CPU:$C7C7 PRG:07C7 8D 11 05 @@ -210,7 +217,7 @@ Label_C7B9: sta Zp4F ; CPU:$C7D6 PRG:07D6 85 4F lda Zp10 ; CPU:$C7D8 PRG:07D8 A5 10 eor #$80 ; CPU:$C7DA PRG:07DA 49 80 - sta $2000 ; CPU:$C7DC PRG:07DC 8D 00 20 + sta PPUCTRL ; CPU:$C7DC PRG:07DC 8D 00 20 sta Zp10 ; CPU:$C7DF PRG:07DF 85 10 ; ----------------------------------------------------------------------------- ; Routine: GameLoopEntry @@ -235,20 +242,20 @@ GameLoopEntry: ; ----------------------------------------------------------------------------- InitPPURegisters: lda #$10 ; CPU:$C7E7 PRG:07E7 A9 10 - sta $2000 ; CPU:$C7E9 PRG:07E9 8D 00 20 + sta PPUCTRL ; CPU:$C7E9 PRG:07E9 8D 00 20 sta Zp10 ; CPU:$C7EC PRG:07EC 85 10 lda #$06 ; CPU:$C7EE PRG:07EE A9 06 - sta $2001 ; CPU:$C7F0 PRG:07F0 8D 01 20 + sta PPUMASK ; CPU:$C7F0 PRG:07F0 8D 01 20 sta Zp11 ; CPU:$C7F3 PRG:07F3 85 11 lda #$00 ; CPU:$C7F5 PRG:07F5 A9 00 - sta $2005 ; CPU:$C7F7 PRG:07F7 8D 05 20 + sta PPUSCROLL ; CPU:$C7F7 PRG:07F7 8D 05 20 sta Zp12 ; CPU:$C7FA PRG:07FA 85 12 - sta $2005 ; CPU:$C7FC PRG:07FC 8D 05 20 + sta PPUSCROLL ; CPU:$C7FC PRG:07FC 8D 05 20 sta Zp13 ; CPU:$C7FF PRG:07FF 85 13 jsr $CBAE ; CPU:$C801 PRG:0801 20 AE CB jmp $CBB7 ; CPU:$C804 PRG:0804 4C B7 CB ; ----------------------------------------------------------------------------- -; Routine: Label_C807 +; Routine: LoadSpriteInitPointerToZp00 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -256,7 +263,7 @@ InitPPURegisters: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C807: +LoadSpriteInitPointerToZp00: tax ; CPU:$C807 PRG:0807 AA lda $C4A7,x ; CPU:$C808 PRG:0808 BD A7 C4 sta Zp00 ; CPU:$C80B PRG:080B 85 00 @@ -264,7 +271,7 @@ Label_C807: sta Zp01 ; CPU:$C810 PRG:0810 85 01 jmp $F228 ; CPU:$C812 PRG:0812 4C 28 F2 ; ----------------------------------------------------------------------------- -; Routine: Label_C815 +; Routine: LoadObjectPointerToZp02AndDraw ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -272,7 +279,7 @@ Label_C807: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C815: +LoadObjectPointerToZp02AndDraw: tax ; CPU:$C815 PRG:0815 AA lda $C03C,x ; CPU:$C816 PRG:0816 BD 3C C0 sta Zp02 ; CPU:$C819 PRG:0819 85 02 @@ -280,7 +287,7 @@ Label_C815: sta Zp03 ; CPU:$C81E PRG:081E 85 03 jmp $F2D7 ; CPU:$C820 PRG:0820 4C D7 F2 ; ----------------------------------------------------------------------------- -; Routine: Label_C823 +; Routine: LoadObjectPointerToZp00AndDraw ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -288,7 +295,7 @@ Label_C815: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C823: +LoadObjectPointerToZp00AndDraw: tax ; CPU:$C823 PRG:0823 AA lda $C03C,x ; CPU:$C824 PRG:0824 BD 3C C0 sta Zp00 ; CPU:$C827 PRG:0827 85 00 @@ -296,7 +303,7 @@ Label_C823: sta Zp01 ; CPU:$C82C PRG:082C 85 01 jmp $CD76 ; CPU:$C82E PRG:082E 4C 76 CD ; ----------------------------------------------------------------------------- -; Routine: Label_C831 +; Routine: LoadObjectAndLevelPointers ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -304,7 +311,7 @@ Label_C823: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C831: +LoadObjectAndLevelPointers: tax ; CPU:$C831 PRG:0831 AA lda $C03C,x ; CPU:$C832 PRG:0832 BD 3C C0 sta Zp04 ; CPU:$C835 PRG:0835 85 04 @@ -316,7 +323,7 @@ Label_C831: sta Zp07 ; CPU:$C844 PRG:0844 85 07 rts ; CPU:$C846 PRG:0846 60 ; ----------------------------------------------------------------------------- -; Routine: Label_C847 +; Routine: LoadObjectPointerToZp02 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -324,7 +331,7 @@ Label_C831: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C847: +LoadObjectPointerToZp02: tax ; CPU:$C847 PRG:0847 AA lda $C03C,x ; CPU:$C848 PRG:0848 BD 3C C0 sta Zp02 ; CPU:$C84B PRG:084B 85 02 @@ -332,7 +339,7 @@ Label_C847: sta Zp03 ; CPU:$C850 PRG:0850 85 03 rts ; CPU:$C852 PRG:0852 60 ; ----------------------------------------------------------------------------- -; Routine: Label_C853 +; Routine: LoadObjectPointerToZp08 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -340,7 +347,7 @@ Label_C847: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C853: +LoadObjectPointerToZp08: tax ; CPU:$C853 PRG:0853 AA lda $C03C,x ; CPU:$C854 PRG:0854 BD 3C C0 sta Zp08 ; CPU:$C857 PRG:0857 85 08 @@ -360,12 +367,12 @@ NmiHandler: pha ; CPU:$C85F PRG:085F 48 lda Zp10 ; CPU:$C860 PRG:0860 A5 10 and #$7F ; CPU:$C862 PRG:0862 29 7F - sta $2000 ; CPU:$C864 PRG:0864 8D 00 20 + sta PPUCTRL ; CPU:$C864 PRG:0864 8D 00 20 sta Zp10 ; CPU:$C867 PRG:0867 85 10 lda #$00 ; CPU:$C869 PRG:0869 A9 00 - sta $2003 ; CPU:$C86B PRG:086B 8D 03 20 + sta OAMADDR ; CPU:$C86B PRG:086B 8D 03 20 lda #$02 ; CPU:$C86E PRG:086E A9 02 - sta $4014 ; CPU:$C870 PRG:0870 8D 14 40 + sta OAMDMA ; CPU:$C870 PRG:0870 8D 14 40 lda #$31 ; CPU:$C873 PRG:0873 A9 31 sta Zp00 ; CPU:$C875 PRG:0875 85 00 lda #$03 ; CPU:$C877 PRG:0877 A9 03 @@ -377,18 +384,18 @@ NmiHandler: jsr $F50E ; CPU:$C886 PRG:0886 20 0E F5 lda Zp11 ; CPU:$C889 PRG:0889 A5 11 eor #$18 ; CPU:$C88B PRG:088B 49 18 - sta $2001 ; CPU:$C88D PRG:088D 8D 01 20 + sta PPUMASK ; CPU:$C88D PRG:088D 8D 01 20 jsr $FA48 ; CPU:$C890 PRG:0890 20 48 FA lda Zp4E ; CPU:$C893 PRG:0893 A5 4E bne NmiFrameUpdate ; CPU:$C895 PRG:0895 D0 2A lda Zp4F ; CPU:$C897 PRG:0897 A5 4F beq NmiFrameUpdate3 ; CPU:$C899 PRG:0899 F0 39 lda Zp9A ; CPU:$C89B PRG:089B A5 9A - bne Label_C8A5 ; CPU:$C89D PRG:089D D0 06 + bne NmiHandler_Block ; CPU:$C89D PRG:089D D0 06 jsr $CE7C ; CPU:$C89F PRG:089F 20 7C CE jmp $C8D7 ; CPU:$C8A2 PRG:08A2 4C D7 C8 ; ----------------------------------------------------------------------------- -; Routine: Label_C8A5 +; Routine: NmiHandler_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -396,7 +403,7 @@ NmiHandler: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C8A5: +NmiHandler_Block: lda $044F ; CPU:$C8A5 PRG:08A5 AD 4F 04 cmp #$08 ; CPU:$C8A8 PRG:08A8 C9 08 bne NmiFrameUpdate3 ; CPU:$C8AA PRG:08AA D0 28 @@ -476,7 +483,7 @@ NmiFrameUpdate4: NmiFrameEnd: lda Zp10 ; CPU:$C8E8 PRG:08E8 A5 10 eor #$80 ; CPU:$C8EA PRG:08EA 49 80 - sta $2000 ; CPU:$C8EC PRG:08EC 8D 00 20 + sta PPUCTRL ; CPU:$C8EC PRG:08EC 8D 00 20 sta Zp10 ; CPU:$C8EF PRG:08EF 85 10 pla ; CPU:$C8F1 PRG:08F1 68 rti ; CPU:$C8F2 PRG:08F2 40 @@ -492,7 +499,7 @@ NmiFrameEnd: InitAPU: lda $0102 ; CPU:$C8F3 PRG:08F3 AD 02 01 bne InitSound_1 ; CPU:$C8F6 PRG:08F6 D0 06 - sta $4015 ; CPU:$C8F8 PRG:08F8 8D 15 40 + sta APUSTATUS ; CPU:$C8F8 PRG:08F8 8D 15 40 sta $0100 ; CPU:$C8FB PRG:08FB 8D 00 01 ; ----------------------------------------------------------------------------- ; Routine: InitSound_1 @@ -511,7 +518,7 @@ InitSound_1: lda #$04 ; CPU:$C907 PRG:0907 A9 04 sta $0518 ; CPU:$C909 PRG:0909 8D 18 05 lda #$0F ; CPU:$C90C PRG:090C A9 0F - sta $4015 ; CPU:$C90E PRG:090E 8D 15 40 + sta APUSTATUS ; CPU:$C90E PRG:090E 8D 15 40 sta $0100 ; CPU:$C911 PRG:0911 8D 00 01 ; ----------------------------------------------------------------------------- ; Routine: InitLevel @@ -560,12 +567,12 @@ UpdateGameState: lda #$00 ; CPU:$C94C PRG:094C A9 00 sta $0512 ; CPU:$C94E PRG:094E 8D 12 05 lda Zp44 ; CPU:$C951 PRG:0951 A5 44 - bne Label_C95C ; CPU:$C953 PRG:0953 D0 07 + bne UpdateGameState_Block ; CPU:$C953 PRG:0953 D0 07 lda #$01 ; CPU:$C955 PRG:0955 A9 01 sta Zp58 ; CPU:$C957 PRG:0957 85 58 jmp $C9B1 ; CPU:$C959 PRG:0959 4C B1 C9 ; ----------------------------------------------------------------------------- -; Routine: Label_C95C +; Routine: UpdateGameState_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -573,7 +580,7 @@ UpdateGameState: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C95C: +UpdateGameState_Block: rts ; CPU:$C95C PRG:095C 60 ; ----------------------------------------------------------------------------- ; Routine: UpdateGameState2 @@ -588,17 +595,17 @@ UpdateGameState2: lda #$40 ; CPU:$C95D PRG:095D A9 40 sta Zp44 ; CPU:$C95F PRG:095F 85 44 lda $0512 ; CPU:$C961 PRG:0961 AD 12 05 - bne Label_C985 ; CPU:$C964 PRG:0964 D0 1F + bne UpdateGameState2_Block_1 ; CPU:$C964 PRG:0964 D0 1F lda #$40 ; CPU:$C966 PRG:0966 A9 40 sta Zp35 ; CPU:$C968 PRG:0968 85 35 lda $0200 ; CPU:$C96A PRG:096A AD 00 02 clc ; CPU:$C96D PRG:096D 18 adc #$10 ; CPU:$C96E PRG:096E 69 10 cmp #$BF ; CPU:$C970 PRG:0970 C9 BF - bne Label_C976 ; CPU:$C972 PRG:0972 D0 02 + bne UpdateGameState2_Block ; CPU:$C972 PRG:0972 D0 02 lda #$7F ; CPU:$C974 PRG:0974 A9 7F ; ----------------------------------------------------------------------------- -; Routine: Label_C976 +; Routine: UpdateGameState2_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -606,7 +613,7 @@ UpdateGameState2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C976: +UpdateGameState2_Block: sta $0200 ; CPU:$C976 PRG:0976 8D 00 02 sta $0511 ; CPU:$C979 PRG:0979 8D 11 05 inc $0512 ; CPU:$C97C PRG:097C EE 12 05 @@ -614,7 +621,7 @@ Label_C976: sta $0513 ; CPU:$C981 PRG:0981 8D 13 05 rts ; CPU:$C984 PRG:0984 60 ; ----------------------------------------------------------------------------- -; Routine: Label_C985 +; Routine: UpdateGameState2_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -622,11 +629,11 @@ Label_C976: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C985: +UpdateGameState2_Block_1: lda Zp35 ; CPU:$C985 PRG:0985 A5 35 - bne Label_C989 ; CPU:$C987 PRG:0987 D0 00 + bne UpdateGameState2_Block_2 ; CPU:$C987 PRG:0987 D0 00 ; ----------------------------------------------------------------------------- -; Routine: Label_C989 +; Routine: UpdateGameState2_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -634,7 +641,7 @@ Label_C985: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C989: +UpdateGameState2_Block_2: rts ; CPU:$C989 PRG:0989 60 ; ----------------------------------------------------------------------------- ; Routine: UpdateGameState3 @@ -650,7 +657,7 @@ UpdateGameState3: ldx #$0A ; CPU:$C98D PRG:098D A2 0A lda #$00 ; CPU:$C98F PRG:098F A9 00 ; ----------------------------------------------------------------------------- -; Routine: Label_C991 +; Routine: UpdateGameState3_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -658,10 +665,10 @@ UpdateGameState3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C991: +UpdateGameState3_Block: sta Zp24,x ; CPU:$C991 PRG:0991 95 24 dex ; CPU:$C993 PRG:0993 CA - bne Label_C991 ; CPU:$C994 PRG:0994 D0 FB + bne UpdateGameState3_Block ; CPU:$C994 PRG:0994 D0 FB lda $0511 ; CPU:$C996 PRG:0996 AD 11 05 lsr a ; CPU:$C999 PRG:0999 4A lsr a ; CPU:$C99A PRG:099A 4A @@ -671,12 +678,12 @@ Label_C991: sbc #$07 ; CPU:$C99E PRG:099E E9 07 sta Zp50 ; CPU:$C9A0 PRG:09A0 85 50 cmp #$02 ; CPU:$C9A2 PRG:09A2 C9 02 - bmi Label_C9AD ; CPU:$C9A4 PRG:09A4 30 07 + bmi UpdateGameState3_Block_1 ; CPU:$C9A4 PRG:09A4 30 07 lda #$1C ; CPU:$C9A6 PRG:09A6 A9 1C sta Zp51 ; CPU:$C9A8 PRG:09A8 85 51 jmp $C9B1 ; CPU:$C9AA PRG:09AA 4C B1 C9 ; ----------------------------------------------------------------------------- -; Routine: Label_C9AD +; Routine: UpdateGameState3_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -684,11 +691,11 @@ Label_C991: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C9AD: +UpdateGameState3_Block_1: lda #$18 ; CPU:$C9AD PRG:09AD A9 18 sta Zp51 ; CPU:$C9AF PRG:09AF 85 51 ; ----------------------------------------------------------------------------- -; Routine: Label_C9B1 +; Routine: InitGameState ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -696,7 +703,7 @@ Label_C9AD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C9B1: +InitGameState: lda Zp50 ; CPU:$C9B1 PRG:09B1 A5 50 and #$01 ; CPU:$C9B3 PRG:09B3 29 01 asl a ; CPU:$C9B5 PRG:09B5 0A @@ -732,10 +739,10 @@ Label_C9B1: sta ZpFC ; CPU:$C9FC PRG:09FC 85 FC lda #$03 ; CPU:$C9FE PRG:09FE A9 03 ldx Zp58 ; CPU:$CA00 PRG:0A00 A6 58 - beq Label_CA06 ; CPU:$CA02 PRG:0A02 F0 02 + beq InitGameState_Block ; CPU:$CA02 PRG:0A02 F0 02 lda #$01 ; CPU:$CA04 PRG:0A04 A9 01 ; ----------------------------------------------------------------------------- -; Routine: Label_CA06 +; Routine: InitGameState_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -743,23 +750,23 @@ Label_C9B1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CA06: +InitGameState_Block: sta Zp55 ; CPU:$CA06 PRG:0A06 85 55 sta $0404 ; CPU:$CA08 PRG:0A08 8D 04 04 sta $0405 ; CPU:$CA0B PRG:0A0B 8D 05 04 sta $040B ; CPU:$CA0E PRG:0A0E 8D 0B 04 lda Zp58 ; CPU:$CA11 PRG:0A11 A5 58 - bne Label_CA26 ; CPU:$CA13 PRG:0A13 D0 11 + bne InitGameState_Block_1 ; CPU:$CA13 PRG:0A13 D0 11 lda #$97 ; CPU:$CA15 PRG:0A15 A9 97 sta Zp43 ; CPU:$CA17 PRG:0A17 85 43 lda #$01 ; CPU:$CA19 PRG:0A19 A9 01 sta ZpFD ; CPU:$CA1B PRG:0A1B 85 FD lda #$0F ; CPU:$CA1D PRG:0A1D A9 0F - sta $4015 ; CPU:$CA1F PRG:0A1F 8D 15 40 + sta APUSTATUS ; CPU:$CA1F PRG:0A1F 8D 15 40 sta $0100 ; CPU:$CA22 PRG:0A22 8D 00 01 rts ; CPU:$CA25 PRG:0A25 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CA26 +; Routine: InitGameState_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -767,7 +774,7 @@ Label_CA06: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CA26: +InitGameState_Block_1: dec $0518 ; CPU:$CA26 PRG:0A26 CE 18 05 lda #$75 ; CPU:$CA29 PRG:0A29 A9 75 sta Zp43 ; CPU:$CA2B PRG:0A2B 85 43 @@ -784,19 +791,19 @@ Label_CA26: UpdateSprites: jsr $F4AC ; CPU:$CA30 PRG:0A30 20 AC F4 lda Zp58 ; CPU:$CA33 PRG:0A33 A5 58 - bne Label_CA4A ; CPU:$CA35 PRG:0A35 D0 13 + bne UpdateSprites_Block ; CPU:$CA35 PRG:0A35 D0 13 lda Zp43 ; CPU:$CA37 PRG:0A37 A5 43 cmp #$75 ; CPU:$CA39 PRG:0A39 C9 75 - beq Label_CA5A ; CPU:$CA3B PRG:0A3B F0 1D + beq UpdateSprites_Block_1 ; CPU:$CA3B PRG:0A3B F0 1D cmp #$74 ; CPU:$CA3D PRG:0A3D C9 74 - beq Label_CA5F ; CPU:$CA3F PRG:0A3F F0 1E + beq UpdateSprites_Block_2 ; CPU:$CA3F PRG:0A3F F0 1E cmp #$73 ; CPU:$CA41 PRG:0A41 C9 73 - beq Label_CA64 ; CPU:$CA43 PRG:0A43 F0 1F + beq UpdateSprites_Block_3 ; CPU:$CA43 PRG:0A43 F0 1F cmp #$5F ; CPU:$CA45 PRG:0A45 C9 5F - beq Label_CA79 ; CPU:$CA47 PRG:0A47 F0 30 + beq UpdateSprites_Block_4 ; CPU:$CA47 PRG:0A47 F0 30 rts ; CPU:$CA49 PRG:0A49 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CA4A +; Routine: UpdateSprites_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -804,7 +811,7 @@ UpdateSprites: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CA4A: +UpdateSprites_Block: sta Zp55 ; CPU:$CA4A PRG:0A4A 85 55 lda #$00 ; CPU:$CA4C PRG:0A4C A9 00 sta Zp58 ; CPU:$CA4E PRG:0A4E 85 58 @@ -823,7 +830,7 @@ UpdateSprites2: jsr $CBAE ; CPU:$CA56 PRG:0A56 20 AE CB rts ; CPU:$CA59 PRG:0A59 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CA5A +; Routine: UpdateSprites_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -831,11 +838,11 @@ UpdateSprites2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CA5A: +UpdateSprites_Block_1: dec Zp43 ; CPU:$CA5A PRG:0A5A C6 43 jmp $CBAE ; CPU:$CA5C PRG:0A5C 4C AE CB ; ----------------------------------------------------------------------------- -; Routine: Label_CA5F +; Routine: UpdateSprites_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -843,11 +850,11 @@ Label_CA5A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CA5F: +UpdateSprites_Block_2: dec Zp43 ; CPU:$CA5F PRG:0A5F C6 43 jmp $CBCA ; CPU:$CA61 PRG:0A61 4C CA CB ; ----------------------------------------------------------------------------- -; Routine: Label_CA64 +; Routine: UpdateSprites_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -855,7 +862,7 @@ Label_CA5F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CA64: +UpdateSprites_Block_3: dec Zp43 ; CPU:$CA64 PRG:0A64 C6 43 lda Zp50 ; CPU:$CA66 PRG:0A66 A5 50 and #$01 ; CPU:$CA68 PRG:0A68 29 01 @@ -867,7 +874,7 @@ Label_CA64: sta $0508,x ; CPU:$CA73 PRG:0A73 9D 08 05 jmp $CBF5 ; CPU:$CA76 PRG:0A76 4C F5 CB ; ----------------------------------------------------------------------------- -; Routine: Label_CA79 +; Routine: UpdateSprites_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -875,22 +882,22 @@ Label_CA64: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CA79: +UpdateSprites_Block_4: ldx Zp52 ; CPU:$CA79 PRG:0A79 A6 52 lda #$01 ; CPU:$CA7B PRG:0A7B A9 01 sta $0406,x ; CPU:$CA7D PRG:0A7D 9D 06 04 sta Zp4E ; CPU:$CA80 PRG:0A80 85 4E lda Zp51 ; CPU:$CA82 PRG:0A82 A5 51 cmp #$1C ; CPU:$CA84 PRG:0A84 C9 1C - bne Label_CA94 ; CPU:$CA86 PRG:0A86 D0 0C + bne UpdateSprites_Block_5 ; CPU:$CA86 PRG:0A86 D0 0C lda Zp52 ; CPU:$CA88 PRG:0A88 A5 52 eor #$01 ; CPU:$CA8A PRG:0A8A 49 01 tax ; CPU:$CA8C PRG:0A8C AA lda $0406,x ; CPU:$CA8D PRG:0A8D BD 06 04 sta Zp4E ; CPU:$CA90 PRG:0A90 85 4E - beq Label_CA99 ; CPU:$CA92 PRG:0A92 F0 05 + beq UpdateSprites_Block_6 ; CPU:$CA92 PRG:0A92 F0 05 ; ----------------------------------------------------------------------------- -; Routine: Label_CA94 +; Routine: UpdateSprites_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -898,11 +905,11 @@ Label_CA79: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CA94: +UpdateSprites_Block_5: sta Zp55 ; CPU:$CA94 PRG:0A94 85 55 jmp $CA53 ; CPU:$CA96 PRG:0A96 4C 53 CA ; ----------------------------------------------------------------------------- -; Routine: Label_CA99 +; Routine: UpdateSprites_Block_6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -910,7 +917,7 @@ Label_CA94: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CA99: +UpdateSprites_Block_6: lda #$85 ; CPU:$CA99 PRG:0A99 A9 85 sta Zp43 ; CPU:$CA9B PRG:0A9B 85 43 sta $040B ; CPU:$CA9D PRG:0A9D 8D 0B 04 @@ -930,7 +937,7 @@ Label_CA99: CopyToOAM: ldy #$00 ; CPU:$CAA9 PRG:0AA9 A0 00 ; ----------------------------------------------------------------------------- -; Routine: Label_CAAB +; Routine: CopyToOAM_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -938,14 +945,14 @@ CopyToOAM: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CAAB: +CopyToOAM_Block: lda $0400,x ; CPU:$CAAB PRG:0AAB BD 00 04 - sta a:$0053,y ; CPU:$CAAE PRG:0AAE 99 53 00 + sta a:Zp53,y ; CPU:$CAAE PRG:0AAE 99 53 00 inx ; CPU:$CAB1 PRG:0AB1 E8 inx ; CPU:$CAB2 PRG:0AB2 E8 iny ; CPU:$CAB3 PRG:0AB3 C8 cpy #$03 ; CPU:$CAB4 PRG:0AB4 C0 03 - bne Label_CAAB ; CPU:$CAB6 PRG:0AB6 D0 F3 + bne CopyToOAM_Block ; CPU:$CAB6 PRG:0AB6 D0 F3 rts ; CPU:$CAB8 PRG:0AB8 60 ; ----------------------------------------------------------------------------- ; Routine: CopyFromOAM @@ -959,7 +966,7 @@ Label_CAAB: CopyFromOAM: ldy #$00 ; CPU:$CAB9 PRG:0AB9 A0 00 ; ----------------------------------------------------------------------------- -; Routine: Label_CABB +; Routine: CopyFromOAM_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -967,14 +974,14 @@ CopyFromOAM: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CABB: - lda a:$0053,y ; CPU:$CABB PRG:0ABB B9 53 00 +CopyFromOAM_Block: + lda a:Zp53,y ; CPU:$CABB PRG:0ABB B9 53 00 sta $0400,x ; CPU:$CABE PRG:0ABE 9D 00 04 inx ; CPU:$CAC1 PRG:0AC1 E8 inx ; CPU:$CAC2 PRG:0AC2 E8 iny ; CPU:$CAC3 PRG:0AC3 C8 cpy #$03 ; CPU:$CAC4 PRG:0AC4 C0 03 - bne Label_CABB ; CPU:$CAC6 PRG:0AC6 D0 F3 + bne CopyFromOAM_Block ; CPU:$CAC6 PRG:0AC6 D0 F3 rts ; CPU:$CAC8 PRG:0AC8 60 ; ----------------------------------------------------------------------------- ; Routine: UpdateSpriteData @@ -989,12 +996,12 @@ UpdateSpriteData: jsr $F4AC ; CPU:$CAC9 PRG:0AC9 20 AC F4 lda Zp53 ; CPU:$CACC PRG:0ACC A5 53 cmp #$01 ; CPU:$CACE PRG:0ACE C9 01 - beq Label_CAD8 ; CPU:$CAD0 PRG:0AD0 F0 06 + beq UpdateSpriteData_Block ; CPU:$CAD0 PRG:0AD0 F0 06 lda Zp43 ; CPU:$CAD2 PRG:0AD2 A5 43 cmp #$84 ; CPU:$CAD4 PRG:0AD4 C9 84 - beq Label_CB02 ; CPU:$CAD6 PRG:0AD6 F0 2A + beq UpdateSpriteData_Block_4 ; CPU:$CAD6 PRG:0AD6 F0 2A ; ----------------------------------------------------------------------------- -; Routine: Label_CAD8 +; Routine: UpdateSpriteData_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1002,17 +1009,17 @@ UpdateSpriteData: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CAD8: +UpdateSpriteData_Block: lda Zp43 ; CPU:$CAD8 PRG:0AD8 A5 43 cmp #$72 ; CPU:$CADA PRG:0ADA C9 72 - bcs Label_CB18 ; CPU:$CADC PRG:0ADC B0 3A + bcs UpdateSpriteData_Block_6 ; CPU:$CADC PRG:0ADC B0 3A cmp #$6D ; CPU:$CADE PRG:0ADE C9 6D - beq Label_CAE7 ; CPU:$CAE0 PRG:0AE0 F0 05 + beq UpdateSpriteData_Block_1 ; CPU:$CAE0 PRG:0AE0 F0 05 cmp #$62 ; CPU:$CAE2 PRG:0AE2 C9 62 - beq Label_CAFA ; CPU:$CAE4 PRG:0AE4 F0 14 + beq UpdateSpriteData_Block_3 ; CPU:$CAE4 PRG:0AE4 F0 14 rts ; CPU:$CAE6 PRG:0AE6 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CAE7 +; Routine: UpdateSpriteData_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1020,15 +1027,15 @@ Label_CAD8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CAE7: +UpdateSpriteData_Block_1: lda $040B ; CPU:$CAE7 PRG:0AE7 AD 0B 04 - beq Label_CAF6 ; CPU:$CAEA PRG:0AEA F0 0A + beq UpdateSpriteData_Block_2 ; CPU:$CAEA PRG:0AEA F0 0A lda #$00 ; CPU:$CAEC PRG:0AEC A9 00 sta $040B ; CPU:$CAEE PRG:0AEE 8D 0B 04 dec Zp55 ; CPU:$CAF1 PRG:0AF1 C6 55 jsr $CBBD ; CPU:$CAF3 PRG:0AF3 20 BD CB ; ----------------------------------------------------------------------------- -; Routine: Label_CAF6 +; Routine: UpdateSpriteData_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1036,11 +1043,11 @@ Label_CAE7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CAF6: +UpdateSpriteData_Block_2: jsr $CC34 ; CPU:$CAF6 PRG:0AF6 20 34 CC rts ; CPU:$CAF9 PRG:0AF9 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CAFA +; Routine: UpdateSpriteData_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1048,13 +1055,13 @@ Label_CAF6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CAFA: +UpdateSpriteData_Block_3: lda #$01 ; CPU:$CAFA PRG:0AFA A9 01 sta Zp4F ; CPU:$CAFC PRG:0AFC 85 4F jsr $CC47 ; CPU:$CAFE PRG:0AFE 20 47 CC rts ; CPU:$CB01 PRG:0B01 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CB02 +; Routine: UpdateSpriteData_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1062,17 +1069,17 @@ Label_CAFA: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CB02: +UpdateSpriteData_Block_4: ldx Zp52 ; CPU:$CB02 PRG:0B02 A6 52 lda Zp53 ; CPU:$CB04 PRG:0B04 A5 53 cmp $0400,x ; CPU:$CB06 PRG:0B06 DD 00 04 - beq Label_CB15 ; CPU:$CB09 PRG:0B09 F0 0A + beq UpdateSpriteData_Block_5 ; CPU:$CB09 PRG:0B09 F0 0A cmp #$01 ; CPU:$CB0B PRG:0B0B C9 01 - beq Label_CB15 ; CPU:$CB0D PRG:0B0D F0 06 + beq UpdateSpriteData_Block_5 ; CPU:$CB0D PRG:0B0D F0 06 jsr $CC24 ; CPU:$CB0F PRG:0B0F 20 24 CC jsr $CC04 ; CPU:$CB12 PRG:0B12 20 04 CC ; ----------------------------------------------------------------------------- -; Routine: Label_CB15 +; Routine: UpdateSpriteData_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1080,11 +1087,11 @@ Label_CB02: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CB15: +UpdateSpriteData_Block_5: dec Zp43 ; CPU:$CB15 PRG:0B15 C6 43 rts ; CPU:$CB17 PRG:0B17 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CB18 +; Routine: UpdateSpriteData_Block_6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1092,7 +1099,7 @@ Label_CB15: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CB18: +UpdateSpriteData_Block_6: jmp $CB1B ; CPU:$CB18 PRG:0B18 4C 1B CB ; ----------------------------------------------------------------------------- ; Routine: HandleController @@ -1105,18 +1112,18 @@ Label_CB18: ; ----------------------------------------------------------------------------- HandleController: cmp #$7A ; CPU:$CB1B PRG:0B1B C9 7A - beq Label_CB30 ; CPU:$CB1D PRG:0B1D F0 11 + beq HandleController_Block ; CPU:$CB1D PRG:0B1D F0 11 cmp #$75 ; CPU:$CB1F PRG:0B1F C9 75 - beq Label_CB39 ; CPU:$CB21 PRG:0B21 F0 16 + beq HandleController_Block_2 ; CPU:$CB21 PRG:0B21 F0 16 cmp #$74 ; CPU:$CB23 PRG:0B23 C9 74 - beq Label_CB36 ; CPU:$CB25 PRG:0B25 F0 0F + beq HandleController_Block_1 ; CPU:$CB25 PRG:0B25 F0 0F cmp #$73 ; CPU:$CB27 PRG:0B27 C9 73 - beq Label_CB58 ; CPU:$CB29 PRG:0B29 F0 2D + beq HandleController_Block_5 ; CPU:$CB29 PRG:0B29 F0 2D cmp #$72 ; CPU:$CB2B PRG:0B2B C9 72 - beq Label_CB47 ; CPU:$CB2D PRG:0B2D F0 18 + beq HandleController_Block_4 ; CPU:$CB2D PRG:0B2D F0 18 rts ; CPU:$CB2F PRG:0B2F 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CB30 +; Routine: HandleController_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1124,11 +1131,11 @@ HandleController: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CB30: +HandleController_Block: jsr $CA53 ; CPU:$CB30 PRG:0B30 20 53 CA jsr $CBCA ; CPU:$CB33 PRG:0B33 20 CA CB ; ----------------------------------------------------------------------------- -; Routine: Label_CB36 +; Routine: HandleController_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1136,11 +1143,11 @@ Label_CB30: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CB36: +HandleController_Block_1: dec Zp43 ; CPU:$CB36 PRG:0B36 C6 43 rts ; CPU:$CB38 PRG:0B38 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CB39 +; Routine: HandleController_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1148,15 +1155,15 @@ Label_CB36: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CB39: +HandleController_Block_2: jsr $CBB7 ; CPU:$CB39 PRG:0B39 20 B7 CB dec Zp43 ; CPU:$CB3C PRG:0B3C C6 43 lda Zp58 ; CPU:$CB3E PRG:0B3E A5 58 - bne Label_CB46 ; CPU:$CB40 PRG:0B40 D0 04 + bne HandleController_Block_3 ; CPU:$CB40 PRG:0B40 D0 04 lda #$08 ; CPU:$CB42 PRG:0B42 A9 08 sta ZpFD ; CPU:$CB44 PRG:0B44 85 FD ; ----------------------------------------------------------------------------- -; Routine: Label_CB46 +; Routine: HandleController_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1164,10 +1171,10 @@ Label_CB39: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CB46: +HandleController_Block_3: rts ; CPU:$CB46 PRG:0B46 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CB47 +; Routine: HandleController_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1175,7 +1182,7 @@ Label_CB46: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CB47: +HandleController_Block_4: dec Zp43 ; CPU:$CB47 PRG:0B47 C6 43 ldx Zp53 ; CPU:$CB49 PRG:0B49 A6 53 dex ; CPU:$CB4B PRG:0B4B CA @@ -1185,7 +1192,7 @@ Label_CB47: sta Zp01 ; CPU:$CB53 PRG:0B53 85 01 jmp $EBA6 ; CPU:$CB55 PRG:0B55 4C A6 EB ; ----------------------------------------------------------------------------- -; Routine: Label_CB58 +; Routine: HandleController_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1193,7 +1200,7 @@ Label_CB47: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CB58: +HandleController_Block_5: jsr $D19A ; CPU:$CB58 PRG:0B58 20 9A D1 ldx Zp53 ; CPU:$CB5B PRG:0B5B A6 53 dex ; CPU:$CB5D PRG:0B5D CA @@ -1204,7 +1211,7 @@ Label_CB58: jsr $C807 ; CPU:$CB65 PRG:0B65 20 07 C8 lda Zp51 ; CPU:$CB68 PRG:0B68 A5 51 cmp #$1C ; CPU:$CB6A PRG:0B6A C9 1C - beq Label_CB7B ; CPU:$CB6C PRG:0B6C F0 0D + beq HandleController_Block_6 ; CPU:$CB6C PRG:0B6C F0 0D lda #$76 ; CPU:$CB6E PRG:0B6E A9 76 sta Zp00 ; CPU:$CB70 PRG:0B70 85 00 lda #$20 ; CPU:$CB72 PRG:0B72 A9 20 @@ -1212,7 +1219,7 @@ Label_CB58: lda #$04 ; CPU:$CB76 PRG:0B76 A9 04 jsr $C815 ; CPU:$CB78 PRG:0B78 20 15 C8 ; ----------------------------------------------------------------------------- -; Routine: Label_CB7B +; Routine: HandleController_Block_6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1220,7 +1227,7 @@ Label_CB58: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CB7B: +HandleController_Block_6: lda #$01 ; CPU:$CB7B PRG:0B7B A9 01 sta $0505 ; CPU:$CB7D PRG:0B7D 8D 05 05 jsr $D032 ; CPU:$CB80 PRG:0B80 20 32 D0 @@ -1235,10 +1242,10 @@ Label_CB7B: lda #$80 ; CPU:$CB94 PRG:0B94 A9 80 dey ; CPU:$CB96 PRG:0B96 88 cpy #$04 ; CPU:$CB97 PRG:0B97 C0 04 - bpl Label_CB9E ; CPU:$CB99 PRG:0B99 10 03 + bpl HandleController_Block_7 ; CPU:$CB99 PRG:0B99 10 03 lda $C207,y ; CPU:$CB9B PRG:0B9B B9 07 C2 ; ----------------------------------------------------------------------------- -; Routine: Label_CB9E +; Routine: HandleController_Block_7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1246,7 +1253,7 @@ Label_CB7B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CB9E: +HandleController_Block_7: sta Zp2E ; CPU:$CB9E PRG:0B9E 85 2E lda #$0D ; CPU:$CBA0 PRG:0BA0 A9 0D sta Zp45 ; CPU:$CBA2 PRG:0BA2 85 45 @@ -1318,7 +1325,7 @@ UpdateScroll2: bne UpdateScroll3 ; CPU:$CBDB PRG:0BDB D0 17 ldy #$00 ; CPU:$CBDD PRG:0BDD A0 00 ; ----------------------------------------------------------------------------- -; Routine: Label_CBDF +; Routine: CopyVramDataToBuffer ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1326,14 +1333,14 @@ UpdateScroll2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CBDF: +CopyVramDataToBuffer: lda $C6AA,y ; CPU:$CBDF PRG:0BDF B9 AA C6 sta $0331,y ; CPU:$CBE2 PRG:0BE2 99 31 03 - beq Label_CBEB ; CPU:$CBE5 PRG:0BE5 F0 04 + beq CopyVramDataToBuffer_Block ; CPU:$CBE5 PRG:0BE5 F0 04 iny ; CPU:$CBE7 PRG:0BE7 C8 jmp $CBDF ; CPU:$CBE8 PRG:0BE8 4C DF CB ; ----------------------------------------------------------------------------- -; Routine: Label_CBEB +; Routine: CopyVramDataToBuffer_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1341,7 +1348,7 @@ Label_CBDF: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CBEB: +CopyVramDataToBuffer_Block: lda Zp52 ; CPU:$CBEB PRG:0BEB A5 52 beq UpdateScroll3 ; CPU:$CBED PRG:0BED F0 05 lda #$67 ; CPU:$CBEF PRG:0BEF A9 67 @@ -1433,7 +1440,7 @@ UpdateScroll4: UpdateScroll5: rts ; CPU:$CC23 PRG:0C23 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CC24 +; Routine: SubCCC24 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1441,7 +1448,7 @@ UpdateScroll5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CC24: +SubCCC24: lda Zp2E ; CPU:$CC24 PRG:0C24 A5 2E sta Zp00 ; CPU:$CC26 PRG:0C26 85 00 lda Zp52 ; CPU:$CC28 PRG:0C28 A5 52 @@ -1479,7 +1486,7 @@ InitScroll: lda #$00 ; CPU:$CC47 PRG:0C47 A9 00 tax ; CPU:$CC49 PRG:0C49 AA ; ----------------------------------------------------------------------------- -; Routine: Label_CC4A +; Routine: InitScroll_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1487,12 +1494,12 @@ InitScroll: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CC4A: +InitScroll_Block: sta Zp59,x ; CPU:$CC4A PRG:0C4A 95 59 sta $040D,x ; CPU:$CC4C PRG:0C4C 9D 0D 04 inx ; CPU:$CC4F PRG:0C4F E8 cpx #$89 ; CPU:$CC50 PRG:0C50 E0 89 - bne Label_CC4A ; CPU:$CC52 PRG:0C52 D0 F6 + bne InitScroll_Block ; CPU:$CC52 PRG:0C52 D0 F6 lda #$01 ; CPU:$CC54 PRG:0C54 A9 01 sta Zp59 ; CPU:$CC56 PRG:0C56 85 59 sta Zp96 ; CPU:$CC58 PRG:0C58 85 96 @@ -1519,14 +1526,14 @@ Label_CC4A: sta Zp44 ; CPU:$CC88 PRG:0C88 85 44 lda Zp53 ; CPU:$CC8A PRG:0C8A A5 53 cmp #$01 ; CPU:$CC8C PRG:0C8C C9 01 - beq Label_CC99 ; CPU:$CC8E PRG:0C8E F0 09 + beq InitScroll_Block_1 ; CPU:$CC8E PRG:0C8E F0 09 cmp #$03 ; CPU:$CC90 PRG:0C90 C9 03 - beq Label_CCA6 ; CPU:$CC92 PRG:0C92 F0 12 + beq InitScroll_Block_2 ; CPU:$CC92 PRG:0C92 F0 12 lda #$10 ; CPU:$CC94 PRG:0C94 A9 10 sta ZpFC ; CPU:$CC96 PRG:0C96 85 FC rts ; CPU:$CC98 PRG:0C98 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CC99 +; Routine: InitScroll_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1534,7 +1541,7 @@ Label_CC4A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CC99: +InitScroll_Block_1: lda #$38 ; CPU:$CC99 PRG:0C99 A9 38 sta Zp36 ; CPU:$CC9B PRG:0C9B 85 36 lda #$40 ; CPU:$CC9D PRG:0C9D A9 40 @@ -1543,7 +1550,7 @@ Label_CC99: sta ZpFC ; CPU:$CCA3 PRG:0CA3 85 FC rts ; CPU:$CCA5 PRG:0CA5 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CCA6 +; Routine: InitScroll_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1551,7 +1558,7 @@ Label_CC99: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CCA6: +InitScroll_Block_2: lda #$20 ; CPU:$CCA6 PRG:0CA6 A9 20 sta Zp36 ; CPU:$CCA8 PRG:0CA8 85 36 lda #$50 ; CPU:$CCAA PRG:0CAA A9 50 @@ -1596,7 +1603,7 @@ UpdateScroll7: UpdateScroll8: lda (Zp09),y ; CPU:$CCD6 PRG:0CD6 B1 09 cmp #$FE ; CPU:$CCD8 PRG:0CD8 C9 FE - beq Label_CCF3 ; CPU:$CCDA PRG:0CDA F0 17 + beq UpdateScroll8_Block ; CPU:$CCDA PRG:0CDA F0 17 sta Zp00,x ; CPU:$CCDC PRG:0CDC 95 00 iny ; CPU:$CCDE PRG:0CDE C8 inx ; CPU:$CCDF PRG:0CDF E8 @@ -1610,7 +1617,7 @@ UpdateScroll8: ldx #$00 ; CPU:$CCEE PRG:0CEE A2 00 jmp $CCD6 ; CPU:$CCF0 PRG:0CF0 4C D6 CC ; ----------------------------------------------------------------------------- -; Routine: Label_CCF3 +; Routine: UpdateScroll8_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1618,7 +1625,7 @@ UpdateScroll8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CCF3: +UpdateScroll8_Block: rts ; CPU:$CCF3 PRG:0CF3 60 ; ----------------------------------------------------------------------------- ; Routine: CheckGameState_1 @@ -1631,7 +1638,7 @@ Label_CCF3: ; ----------------------------------------------------------------------------- CheckGameState_1: lda $0450 ; CPU:$CCF4 PRG:0CF4 AD 50 04 - bne Label_CD07 ; CPU:$CCF7 PRG:0CF7 D0 0E + bne CheckGameState_1_Block ; CPU:$CCF7 PRG:0CF7 D0 0E lda #$01 ; CPU:$CCF9 PRG:0CF9 A9 01 sta $0450 ; CPU:$CCFB PRG:0CFB 8D 50 04 lda #$0A ; CPU:$CCFE PRG:0CFE A9 0A @@ -1640,7 +1647,7 @@ CheckGameState_1: sta ZpFD ; CPU:$CD04 PRG:0D04 85 FD rts ; CPU:$CD06 PRG:0D06 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CD07 +; Routine: CheckGameState_1_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1648,14 +1655,14 @@ CheckGameState_1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CD07: +CheckGameState_1_Block: lda Zp43 ; CPU:$CD07 PRG:0D07 A5 43 cmp #$58 ; CPU:$CD09 PRG:0D09 C9 58 - bcc Label_CD13 ; CPU:$CD0B PRG:0D0B 90 06 + bcc CheckGameState_1_Block_1 ; CPU:$CD0B PRG:0D0B 90 06 jsr $F4AC ; CPU:$CD0D PRG:0D0D 20 AC F4 jmp $CD22 ; CPU:$CD10 PRG:0D10 4C 22 CD ; ----------------------------------------------------------------------------- -; Routine: Label_CD13 +; Routine: CheckGameState_1_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1663,7 +1670,7 @@ Label_CD07: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CD13: +CheckGameState_1_Block_1: jsr $CC24 ; CPU:$CD13 PRG:0D13 20 24 CC jsr $CC04 ; CPU:$CD16 PRG:0D16 20 04 CC lda #$00 ; CPU:$CD19 PRG:0D19 A9 00 @@ -1682,24 +1689,24 @@ Label_CD13: UpdateGameTimer: lda Zp43 ; CPU:$CD22 PRG:0D22 A5 43 cmp #$9F ; CPU:$CD24 PRG:0D24 C9 9F - beq Label_CD45 ; CPU:$CD26 PRG:0D26 F0 1D + beq UpdateGameTimer_Block ; CPU:$CD26 PRG:0D26 F0 1D cmp #$9E ; CPU:$CD28 PRG:0D28 C9 9E - beq Label_CD4A ; CPU:$CD2A PRG:0D2A F0 1E + beq UpdateGameTimer_Block_1 ; CPU:$CD2A PRG:0D2A F0 1E cmp #$9D ; CPU:$CD2C PRG:0D2C C9 9D - beq Label_CD4F ; CPU:$CD2E PRG:0D2E F0 1F + beq UpdateGameTimer_Block_2 ; CPU:$CD2E PRG:0D2E F0 1F cmp #$9C ; CPU:$CD30 PRG:0D30 C9 9C - beq Label_CD58 ; CPU:$CD32 PRG:0D32 F0 24 + beq UpdateGameTimer_Block_3 ; CPU:$CD32 PRG:0D32 F0 24 cmp #$9B ; CPU:$CD34 PRG:0D34 C9 9B - beq Label_CD61 ; CPU:$CD36 PRG:0D36 F0 29 + beq UpdateGameTimer_Block_4 ; CPU:$CD36 PRG:0D36 F0 29 cmp #$90 ; CPU:$CD38 PRG:0D38 C9 90 - bcs Label_CD66 ; CPU:$CD3A PRG:0D3A B0 2A + bcs UpdateGameTimer_Block_5 ; CPU:$CD3A PRG:0D3A B0 2A cmp #$86 ; CPU:$CD3C PRG:0D3C C9 86 - bcs Label_CD69 ; CPU:$CD3E PRG:0D3E B0 29 + bcs UpdateGameTimer_Block_6 ; CPU:$CD3E PRG:0D3E B0 29 cmp #$70 ; CPU:$CD40 PRG:0D40 C9 70 - bcs Label_CD6C ; CPU:$CD42 PRG:0D42 B0 28 + bcs UpdateGameTimer_Block_7 ; CPU:$CD42 PRG:0D42 B0 28 rts ; CPU:$CD44 PRG:0D44 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CD45 +; Routine: UpdateGameTimer_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1707,11 +1714,11 @@ UpdateGameTimer: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CD45: +UpdateGameTimer_Block: dec Zp43 ; CPU:$CD45 PRG:0D45 C6 43 jmp $CD6F ; CPU:$CD47 PRG:0D47 4C 6F CD ; ----------------------------------------------------------------------------- -; Routine: Label_CD4A +; Routine: UpdateGameTimer_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1719,11 +1726,11 @@ Label_CD45: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CD4A: +UpdateGameTimer_Block_1: dec Zp43 ; CPU:$CD4A PRG:0D4A C6 43 jmp $CD7F ; CPU:$CD4C PRG:0D4C 4C 7F CD ; ----------------------------------------------------------------------------- -; Routine: Label_CD4F +; Routine: UpdateGameTimer_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1731,13 +1738,13 @@ Label_CD4A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CD4F: +UpdateGameTimer_Block_2: ldy #$1C ; CPU:$CD4F PRG:0D4F A0 1C dec Zp43 ; CPU:$CD51 PRG:0D51 C6 43 lda #$06 ; CPU:$CD53 PRG:0D53 A9 06 jmp $C823 ; CPU:$CD55 PRG:0D55 4C 23 C8 ; ----------------------------------------------------------------------------- -; Routine: Label_CD58 +; Routine: UpdateGameTimer_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1745,13 +1752,13 @@ Label_CD4F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CD58: +UpdateGameTimer_Block_3: ldy #$1C ; CPU:$CD58 PRG:0D58 A0 1C dec Zp43 ; CPU:$CD5A PRG:0D5A C6 43 lda #$08 ; CPU:$CD5C PRG:0D5C A9 08 jmp $C823 ; CPU:$CD5E PRG:0D5E 4C 23 C8 ; ----------------------------------------------------------------------------- -; Routine: Label_CD61 +; Routine: UpdateGameTimer_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1759,11 +1766,11 @@ Label_CD58: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CD61: +UpdateGameTimer_Block_4: dec Zp43 ; CPU:$CD61 PRG:0D61 C6 43 jmp $CD89 ; CPU:$CD63 PRG:0D63 4C 89 CD ; ----------------------------------------------------------------------------- -; Routine: Label_CD66 +; Routine: UpdateGameTimer_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1771,10 +1778,10 @@ Label_CD61: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CD66: +UpdateGameTimer_Block_5: jmp $CD9D ; CPU:$CD66 PRG:0D66 4C 9D CD ; ----------------------------------------------------------------------------- -; Routine: Label_CD69 +; Routine: UpdateGameTimer_Block_6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1782,10 +1789,10 @@ Label_CD66: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CD69: +UpdateGameTimer_Block_6: jmp $CDB1 ; CPU:$CD69 PRG:0D69 4C B1 CD ; ----------------------------------------------------------------------------- -; Routine: Label_CD6C +; Routine: UpdateGameTimer_Block_7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1793,7 +1800,7 @@ Label_CD69: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CD6C: +UpdateGameTimer_Block_7: jmp $CE24 ; CPU:$CD6C PRG:0D6C 4C 24 CE ; ----------------------------------------------------------------------------- ; Routine: UpdateSpritePosition @@ -1872,10 +1879,10 @@ UpdateSpritePosition5: sta Zp01 ; CPU:$CDA3 PRG:0DA3 85 01 lda Zp43 ; CPU:$CDA5 PRG:0DA5 A5 43 and #$01 ; CPU:$CDA7 PRG:0DA7 29 01 - beq Label_CDAE ; CPU:$CDA9 PRG:0DA9 F0 03 + beq UpdateSpritePosition5_Block ; CPU:$CDA9 PRG:0DA9 F0 03 jmp $EB89 ; CPU:$CDAB PRG:0DAB 4C 89 EB ; ----------------------------------------------------------------------------- -; Routine: Label_CDAE +; Routine: UpdateSpritePosition5_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1883,7 +1890,7 @@ UpdateSpritePosition5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CDAE: +UpdateSpritePosition5_Block: jmp $EB92 ; CPU:$CDAE PRG:0DAE 4C 92 EB ; ----------------------------------------------------------------------------- ; Routine: UpdateSpritePosition6 @@ -1896,7 +1903,7 @@ Label_CDAE: ; ----------------------------------------------------------------------------- UpdateSpritePosition6: cmp #$8F ; CPU:$CDB1 PRG:0DB1 C9 8F - bne Label_CDD7 ; CPU:$CDB3 PRG:0DB3 D0 22 + bne UpdateSpritePosition6_Block ; CPU:$CDB3 PRG:0DB3 D0 22 dec Zp43 ; CPU:$CDB5 PRG:0DB5 C6 43 ldy #$10 ; CPU:$CDB7 PRG:0DB7 A0 10 lda #$10 ; CPU:$CDB9 PRG:0DB9 A9 10 @@ -1924,7 +1931,7 @@ UpdateSpritePosition7: lda #$50 ; CPU:$CDD2 PRG:0DD2 A9 50 jmp $F080 ; CPU:$CDD4 PRG:0DD4 4C 80 F0 ; ----------------------------------------------------------------------------- -; Routine: Label_CDD7 +; Routine: UpdateSpritePosition6_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1932,12 +1939,12 @@ UpdateSpritePosition7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CDD7: +UpdateSpritePosition6_Block: lda $0250 ; CPU:$CDD7 PRG:0DD7 AD 50 02 cmp #$A0 ; CPU:$CDDA PRG:0DDA C9 A0 - beq Label_CDEF ; CPU:$CDDC PRG:0DDC F0 11 + beq UpdateSpritePosition6_Block_1 ; CPU:$CDDC PRG:0DDC F0 11 cmp #$FF ; CPU:$CDDE PRG:0DDE C9 FF - beq Label_CDF3 ; CPU:$CDE0 PRG:0DE0 F0 11 + beq UpdateSpritePosition6_Block_2 ; CPU:$CDE0 PRG:0DE0 F0 11 clc ; CPU:$CDE2 PRG:0DE2 18 adc #$02 ; CPU:$CDE3 PRG:0DE3 69 02 sta Zp01 ; CPU:$CDE5 PRG:0DE5 85 01 @@ -1945,7 +1952,7 @@ Label_CDD7: sta Zp00 ; CPU:$CDEA PRG:0DEA 85 00 jmp $CDCA ; CPU:$CDEC PRG:0DEC 4C CA CD ; ----------------------------------------------------------------------------- -; Routine: Label_CDEF +; Routine: UpdateSpritePosition6_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1953,11 +1960,11 @@ Label_CDD7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CDEF: +UpdateSpritePosition6_Block_1: lda #$80 ; CPU:$CDEF PRG:0DEF A9 80 sta ZpFE ; CPU:$CDF1 PRG:0DF1 85 FE ; ----------------------------------------------------------------------------- -; Routine: Label_CDF3 +; Routine: UpdateSpritePosition6_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1965,7 +1972,7 @@ Label_CDEF: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CDF3: +UpdateSpritePosition6_Block_2: lda #$18 ; CPU:$CDF3 PRG:0DF3 A9 18 sta Zp03 ; CPU:$CDF5 PRG:0DF5 85 03 lda #$50 ; CPU:$CDF7 PRG:0DF7 A9 50 @@ -1994,11 +2001,11 @@ UpdateSpritePosition8: lda #$22 ; CPU:$CE13 PRG:0E13 A9 22 sta Zp01 ; CPU:$CE15 PRG:0E15 85 01 plp ; CPU:$CE17 PRG:0E17 28 - bne Label_CE1F ; CPU:$CE18 PRG:0E18 D0 05 + bne UpdateSpritePosition8_Block ; CPU:$CE18 PRG:0E18 D0 05 lda #$16 ; CPU:$CE1A PRG:0E1A A9 16 jmp $C815 ; CPU:$CE1C PRG:0E1C 4C 15 C8 ; ----------------------------------------------------------------------------- -; Routine: Label_CE1F +; Routine: UpdateSpritePosition8_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2006,7 +2013,7 @@ UpdateSpritePosition8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CE1F: +UpdateSpritePosition8_Block: lda #$14 ; CPU:$CE1F PRG:0E1F A9 14 jmp $C815 ; CPU:$CE21 PRG:0E21 4C 15 C8 ; ----------------------------------------------------------------------------- @@ -2020,12 +2027,12 @@ Label_CE1F: ; ----------------------------------------------------------------------------- UpdateSpritePosition9: cmp #$85 ; CPU:$CE24 PRG:0E24 C9 85 - beq Label_CE2F ; CPU:$CE26 PRG:0E26 F0 07 + beq UpdateSpritePosition9_Block ; CPU:$CE26 PRG:0E26 F0 07 lda Zp43 ; CPU:$CE28 PRG:0E28 A5 43 and #$01 ; CPU:$CE2A PRG:0E2A 29 01 jmp $CE0E ; CPU:$CE2C PRG:0E2C 4C 0E CE ; ----------------------------------------------------------------------------- -; Routine: Label_CE2F +; Routine: UpdateSpritePosition9_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2033,7 +2040,7 @@ UpdateSpritePosition9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CE2F: +UpdateSpritePosition9_Block: lda #$04 ; CPU:$CE2F PRG:0E2F A9 04 sta ZpFD ; CPU:$CE31 PRG:0E31 85 FD ldy #$04 ; CPU:$CE33 PRG:0E33 A0 04 @@ -2079,13 +2086,13 @@ Label_CE2F: ; ----------------------------------------------------------------------------- UpdateSpritePosition10: lda Zp58 ; CPU:$CE7C PRG:0E7C A5 58 - beq Label_CE94 ; CPU:$CE7E PRG:0E7E F0 14 + beq UpdateSpritePosition10_Block_1 ; CPU:$CE7E PRG:0E7E F0 14 lda $0102 ; CPU:$CE80 PRG:0E80 AD 02 01 - bne Label_CE8B ; CPU:$CE83 PRG:0E83 D0 06 - sta $4015 ; CPU:$CE85 PRG:0E85 8D 15 40 + bne UpdateSpritePosition10_Block ; CPU:$CE83 PRG:0E83 D0 06 + sta APUSTATUS ; CPU:$CE85 PRG:0E85 8D 15 40 sta $0100 ; CPU:$CE88 PRG:0E88 8D 00 01 ; ----------------------------------------------------------------------------- -; Routine: Label_CE8B +; Routine: UpdateSpritePosition10_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2093,13 +2100,13 @@ UpdateSpritePosition10: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CE8B: +UpdateSpritePosition10_Block: lda Zp15 ; CPU:$CE8B PRG:0E8B A5 15 and #$20 ; CPU:$CE8D PRG:0E8D 29 20 - beq Label_CE94 ; CPU:$CE8F PRG:0E8F F0 03 + beq UpdateSpritePosition10_Block_1 ; CPU:$CE8F PRG:0E8F F0 03 jmp $CF2B ; CPU:$CE91 PRG:0E91 4C 2B CF ; ----------------------------------------------------------------------------- -; Routine: Label_CE94 +; Routine: UpdateSpritePosition10_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2107,15 +2114,15 @@ Label_CE8B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CE94: +UpdateSpritePosition10_Block_1: lda $0516 ; CPU:$CE94 PRG:0E94 AD 16 05 - bne Label_CEAE ; CPU:$CE97 PRG:0E97 D0 15 + bne UpdateSpritePosition10_Block_3 ; CPU:$CE97 PRG:0E97 D0 15 lda $0517 ; CPU:$CE99 PRG:0E99 AD 17 05 - beq Label_CEA2 ; CPU:$CE9C PRG:0E9C F0 04 + beq UpdateSpritePosition10_Block_2 ; CPU:$CE9C PRG:0E9C F0 04 dec $0517 ; CPU:$CE9E PRG:0E9E CE 17 05 rts ; CPU:$CEA1 PRG:0EA1 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CEA2 +; Routine: UpdateSpritePosition10_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2123,14 +2130,14 @@ Label_CE94: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CEA2: +UpdateSpritePosition10_Block_2: jsr $CC04 ; CPU:$CEA2 PRG:0EA2 20 04 CC jsr $CFA8 ; CPU:$CEA5 PRG:0EA5 20 A8 CF lda Zp9A ; CPU:$CEA8 PRG:0EA8 A5 9A cmp #$01 ; CPU:$CEAA PRG:0EAA C9 01 - bne Label_CEB1 ; CPU:$CEAC PRG:0EAC D0 03 + bne UpdateSpritePosition10_Block_4 ; CPU:$CEAC PRG:0EAC D0 03 ; ----------------------------------------------------------------------------- -; Routine: Label_CEAE +; Routine: UpdateSpritePosition10_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2138,10 +2145,10 @@ Label_CEA2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CEAE: +UpdateSpritePosition10_Block_3: jmp $CF1C ; CPU:$CEAE PRG:0EAE 4C 1C CF ; ----------------------------------------------------------------------------- -; Routine: Label_CEB1 +; Routine: UpdateSpritePosition10_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2149,12 +2156,12 @@ Label_CEAE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CEB1: +UpdateSpritePosition10_Block_4: lda ZpBF ; CPU:$CEB1 PRG:0EB1 A5 BF - beq Label_CEB8 ; CPU:$CEB3 PRG:0EB3 F0 03 + beq UpdateSpritePosition10_Block_5 ; CPU:$CEB3 PRG:0EB3 F0 03 jmp $CF13 ; CPU:$CEB5 PRG:0EB5 4C 13 CF ; ----------------------------------------------------------------------------- -; Routine: Label_CEB8 +; Routine: UpdateSpritePosition10_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2162,13 +2169,13 @@ Label_CEB1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CEB8: +UpdateSpritePosition10_Block_5: lda Zp96 ; CPU:$CEB8 PRG:0EB8 A5 96 cmp #$FF ; CPU:$CEBA PRG:0EBA C9 FF - bne Label_CEC1 ; CPU:$CEBC PRG:0EBC D0 03 + bne UpdateSpritePosition10_Block_6 ; CPU:$CEBC PRG:0EBC D0 03 jmp $CF19 ; CPU:$CEBE PRG:0EBE 4C 19 CF ; ----------------------------------------------------------------------------- -; Routine: Label_CEC1 +; Routine: UpdateSpritePosition10_Block_6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2176,17 +2183,17 @@ Label_CEB8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CEC1: +UpdateSpritePosition10_Block_6: cmp #$08 ; CPU:$CEC1 PRG:0EC1 C9 08 beq UpdateSpritePosition11 ; CPU:$CEC3 PRG:0EC3 F0 11 cmp #$04 ; CPU:$CEC5 PRG:0EC5 C9 04 beq UpdateSpritePosition11 ; CPU:$CEC7 PRG:0EC7 F0 0D lda Zp58 ; CPU:$CEC9 PRG:0EC9 A5 58 - beq Label_CED3 ; CPU:$CECB PRG:0ECB F0 06 + beq UpdateSpritePosition10_Block_7 ; CPU:$CECB PRG:0ECB F0 06 jsr $EBDA ; CPU:$CECD PRG:0ECD 20 DA EB jmp $CED6 ; CPU:$CED0 PRG:0ED0 4C D6 CE ; ----------------------------------------------------------------------------- -; Routine: Label_CED3 +; Routine: UpdateSpritePosition10_Block_7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2194,7 +2201,7 @@ Label_CEC1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CED3: +UpdateSpritePosition10_Block_7: jsr $D175 ; CPU:$CED3 PRG:0ED3 20 75 D1 ; ----------------------------------------------------------------------------- ; Routine: UpdateSpritePosition11 @@ -2215,15 +2222,15 @@ UpdateSpritePosition11: jsr $EE79 ; CPU:$CEE8 PRG:0EE8 20 79 EE lda Zp53 ; CPU:$CEEB PRG:0EEB A5 53 cmp #$03 ; CPU:$CEED PRG:0EED C9 03 - beq Label_CF01 ; CPU:$CEEF PRG:0EEF F0 10 + beq UpdateSpritePosition11_Block ; CPU:$CEEF PRG:0EEF F0 10 cmp #$04 ; CPU:$CEF1 PRG:0EF1 C9 04 - beq Label_CF0D ; CPU:$CEF3 PRG:0EF3 F0 18 + beq UpdateSpritePosition11_Block_1 ; CPU:$CEF3 PRG:0EF3 F0 18 jsr $DA16 ; CPU:$CEF5 PRG:0EF5 20 16 DA jsr $E19A ; CPU:$CEF8 PRG:0EF8 20 9A E1 jsr $EC29 ; CPU:$CEFB PRG:0EFB 20 29 EC jmp $CF1C ; CPU:$CEFE PRG:0EFE 4C 1C CF ; ----------------------------------------------------------------------------- -; Routine: Label_CF01 +; Routine: UpdateSpritePosition11_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2231,13 +2238,13 @@ UpdateSpritePosition11: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CF01: +UpdateSpritePosition11_Block: jsr $E834 ; CPU:$CF01 PRG:0F01 20 34 E8 jsr $E981 ; CPU:$CF04 PRG:0F04 20 81 E9 jsr $EC29 ; CPU:$CF07 PRG:0F07 20 29 EC jmp $CF1C ; CPU:$CF0A PRG:0F0A 4C 1C CF ; ----------------------------------------------------------------------------- -; Routine: Label_CF0D +; Routine: UpdateSpritePosition11_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2245,7 +2252,7 @@ Label_CF01: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CF0D: +UpdateSpritePosition11_Block_1: jsr $EC29 ; CPU:$CF0D PRG:0F0D 20 29 EC jmp $CF1C ; CPU:$CF10 PRG:0F10 4C 1C CF ; ----------------------------------------------------------------------------- @@ -2283,11 +2290,11 @@ UpdateSpritePosition13_1: UpdateSpritePosition13_3: jsr $CF42 ; CPU:$CF1C PRG:0F1C 20 42 CF lda $0516 ; CPU:$CF1F PRG:0F1F AD 16 05 - bne Label_CF2A ; CPU:$CF22 PRG:0F22 D0 06 + bne UpdateSpritePosition13_3_Block ; CPU:$CF22 PRG:0F22 D0 06 jsr $D04C ; CPU:$CF24 PRG:0F24 20 4C D0 jsr $F4AC ; CPU:$CF27 PRG:0F27 20 AC F4 ; ----------------------------------------------------------------------------- -; Routine: Label_CF2A +; Routine: UpdateSpritePosition13_3_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2295,7 +2302,7 @@ UpdateSpritePosition13_3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CF2A: +UpdateSpritePosition13_3_Block: rts ; CPU:$CF2A PRG:0F2A 60 ; ----------------------------------------------------------------------------- ; Routine: UpdateSpritePosition14 @@ -2329,15 +2336,15 @@ UpdateSpritePosition14: UpdateSpritePosition15: lda Zp15 ; CPU:$CF42 PRG:0F42 A5 15 and #$10 ; CPU:$CF44 PRG:0F44 29 10 - beq Label_CF8F ; CPU:$CF46 PRG:0F46 F0 47 + beq UpdateSpritePosition15_Block_3 ; CPU:$CF46 PRG:0F46 F0 47 lda Zp58 ; CPU:$CF48 PRG:0F48 A5 58 - beq Label_CF55 ; CPU:$CF4A PRG:0F4A F0 09 + beq UpdateSpritePosition15_Block ; CPU:$CF4A PRG:0F4A F0 09 lda #$00 ; CPU:$CF4C PRG:0F4C A9 00 sta Zp58 ; CPU:$CF4E PRG:0F4E 85 58 lda Zp15 ; CPU:$CF50 PRG:0F50 A5 15 jmp $C98A ; CPU:$CF52 PRG:0F52 4C 8A C9 ; ----------------------------------------------------------------------------- -; Routine: Label_CF55 +; Routine: UpdateSpritePosition15_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2345,15 +2352,15 @@ UpdateSpritePosition15: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CF55: +UpdateSpritePosition15_Block: lda Zp15 ; CPU:$CF55 PRG:0F55 A5 15 cmp $0514 ; CPU:$CF57 PRG:0F57 CD 14 05 - beq Label_CF92 ; CPU:$CF5A PRG:0F5A F0 36 + beq UpdateSpritePosition15_Block_4 ; CPU:$CF5A PRG:0F5A F0 36 sta $0514 ; CPU:$CF5C PRG:0F5C 8D 14 05 lda $0516 ; CPU:$CF5F PRG:0F5F AD 16 05 - beq Label_CF7A ; CPU:$CF62 PRG:0F62 F0 16 + beq UpdateSpritePosition15_Block_2 ; CPU:$CF62 PRG:0F62 F0 16 lda $0517 ; CPU:$CF64 PRG:0F64 AD 17 05 - bne Label_CF79 ; CPU:$CF67 PRG:0F67 D0 10 + bne UpdateSpritePosition15_Block_1 ; CPU:$CF67 PRG:0F67 D0 10 sta $0516 ; CPU:$CF69 PRG:0F69 8D 16 05 lda Zp0F ; CPU:$CF6C PRG:0F6C A5 0F sta ZpFC ; CPU:$CF6E PRG:0F6E 85 FC @@ -2362,7 +2369,7 @@ Label_CF55: sta Zp11 ; CPU:$CF74 PRG:0F74 85 11 jmp $CF87 ; CPU:$CF76 PRG:0F76 4C 87 CF ; ----------------------------------------------------------------------------- -; Routine: Label_CF79 +; Routine: UpdateSpritePosition15_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2370,10 +2377,10 @@ Label_CF55: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CF79: +UpdateSpritePosition15_Block_1: rts ; CPU:$CF79 PRG:0F79 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CF7A +; Routine: UpdateSpritePosition15_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2381,7 +2388,7 @@ Label_CF79: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CF7A: +UpdateSpritePosition15_Block_2: lda #$01 ; CPU:$CF7A PRG:0F7A A9 01 sta $0516 ; CPU:$CF7C PRG:0F7C 8D 16 05 lda ZpFC ; CPU:$CF7F PRG:0F7F A5 FC @@ -2403,7 +2410,7 @@ UpdateSpritePosition16: sta ZpFD ; CPU:$CF8C PRG:0F8C 85 FD rts ; CPU:$CF8E PRG:0F8E 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CF8F +; Routine: UpdateSpritePosition15_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2411,10 +2418,10 @@ UpdateSpritePosition16: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CF8F: +UpdateSpritePosition15_Block_3: sta $0514 ; CPU:$CF8F PRG:0F8F 8D 14 05 ; ----------------------------------------------------------------------------- -; Routine: Label_CF92 +; Routine: UpdateSpritePosition15_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2422,13 +2429,13 @@ Label_CF8F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CF92: +UpdateSpritePosition15_Block_4: lda $0517 ; CPU:$CF92 PRG:0F92 AD 17 05 - beq Label_CF9B ; CPU:$CF95 PRG:0F95 F0 04 + beq UpdateSpritePosition15_Block_5 ; CPU:$CF95 PRG:0F95 F0 04 dec $0517 ; CPU:$CF97 PRG:0F97 CE 17 05 rts ; CPU:$CF9A PRG:0F9A 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CF9B +; Routine: UpdateSpritePosition15_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2436,12 +2443,12 @@ Label_CF92: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CF9B: +UpdateSpritePosition15_Block_5: lda $0516 ; CPU:$CF9B PRG:0F9B AD 16 05 - bne Label_CFA1 ; CPU:$CF9E PRG:0F9E D0 01 + bne UpdateSpritePosition15_Block_6 ; CPU:$CF9E PRG:0F9E D0 01 rts ; CPU:$CFA0 PRG:0FA0 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CFA1 +; Routine: UpdateSpritePosition15_Block_6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2449,7 +2456,7 @@ Label_CF9B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CFA1: +UpdateSpritePosition15_Block_6: lda Zp11 ; CPU:$CFA1 PRG:0FA1 A5 11 ora #$10 ; CPU:$CFA3 PRG:0FA3 09 10 sta Zp11 ; CPU:$CFA5 PRG:0FA5 85 11 @@ -2467,7 +2474,7 @@ UpdateSpritePosition17: ldx #$00 ; CPU:$CFA8 PRG:0FA8 A2 00 ldy #$00 ; CPU:$CFAA PRG:0FAA A0 00 ; ----------------------------------------------------------------------------- -; Routine: Label_CFAC +; Routine: UpdateSpritePosition17_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2475,14 +2482,14 @@ UpdateSpritePosition17: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CFAC: +UpdateSpritePosition17_Block: lda Zp41,x ; CPU:$CFAC PRG:0FAC B5 41 - bne Label_CFB8 ; CPU:$CFAE PRG:0FAE D0 08 + bne UpdateSpritePosition17_Block_1 ; CPU:$CFAE PRG:0FAE D0 08 lda #$FF ; CPU:$CFB0 PRG:0FB0 A9 FF sta $02C0,y ; CPU:$CFB2 PRG:0FB2 99 C0 02 sta $02C4,y ; CPU:$CFB5 PRG:0FB5 99 C4 02 ; ----------------------------------------------------------------------------- -; Routine: Label_CFB8 +; Routine: UpdateSpritePosition17_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2490,7 +2497,7 @@ Label_CFAC: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CFB8: +UpdateSpritePosition17_Block_1: inx ; CPU:$CFB8 PRG:0FB8 E8 iny ; CPU:$CFB9 PRG:0FB9 C8 iny ; CPU:$CFBA PRG:0FBA C8 @@ -2501,7 +2508,7 @@ Label_CFB8: iny ; CPU:$CFBF PRG:0FBF C8 iny ; CPU:$CFC0 PRG:0FC0 C8 cpx #$02 ; CPU:$CFC1 PRG:0FC1 E0 02 - bmi Label_CFAC ; CPU:$CFC3 PRG:0FC3 30 E7 + bmi UpdateSpritePosition17_Block ; CPU:$CFC3 PRG:0FC3 30 E7 rts ; CPU:$CFC5 PRG:0FC5 60 ; ----------------------------------------------------------------------------- ; Routine: UpdateSpritePosition18 @@ -2517,7 +2524,7 @@ UpdateSpritePosition18: sty Zp0F ; CPU:$CFC8 PRG:0FC8 84 0F jsr $D008 ; CPU:$CFCA PRG:0FCA 20 08 D0 ; ----------------------------------------------------------------------------- -; Routine: Label_CFCD +; Routine: UpdateSpritePosition18_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2525,10 +2532,10 @@ UpdateSpritePosition18: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CFCD: +UpdateSpritePosition18_Block: lda $02C0,y ; CPU:$CFCD PRG:0FCD B9 C0 02 cmp #$FF ; CPU:$CFD0 PRG:0FD0 C9 FF - bne Label_CFF9 ; CPU:$CFD2 PRG:0FD2 D0 25 + bne UpdateSpritePosition18_Block_1 ; CPU:$CFD2 PRG:0FD2 D0 25 lda Zp05 ; CPU:$CFD4 PRG:0FD4 A5 05 sta $02C3,y ; CPU:$CFD6 PRG:0FD6 99 C3 02 clc ; CPU:$CFD9 PRG:0FD9 18 @@ -2546,7 +2553,7 @@ Label_CFCD: sta Zp41,x ; CPU:$CFF6 PRG:0FF6 95 41 rts ; CPU:$CFF8 PRG:0FF8 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CFF9 +; Routine: UpdateSpritePosition18_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2554,7 +2561,7 @@ Label_CFCD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CFF9: +UpdateSpritePosition18_Block_1: iny ; CPU:$CFF9 PRG:0FF9 C8 iny ; CPU:$CFFA PRG:0FFA C8 iny ; CPU:$CFFB PRG:0FFB C8 @@ -2565,7 +2572,7 @@ Label_CFF9: iny ; CPU:$D000 PRG:1000 C8 inc Zp0F ; CPU:$D001 PRG:1001 E6 0F cpy #$10 ; CPU:$D003 PRG:1003 C0 10 - bmi Label_CFCD ; CPU:$D005 PRG:1005 30 C6 + bmi UpdateSpritePosition18_Block ; CPU:$D005 PRG:1005 30 C6 rts ; CPU:$D007 PRG:1007 60 ; ----------------------------------------------------------------------------- ; Routine: UpdateSpritePosition19 @@ -2582,7 +2589,7 @@ UpdateSpritePosition19: tya ; CPU:$D00A PRG:100A 98 pha ; CPU:$D00B PRG:100B 48 lda Zp58 ; CPU:$D00C PRG:100C A5 58 - bne Label_D02A ; CPU:$D00E PRG:100E D0 1A + bne UpdateSpritePosition19_Block ; CPU:$D00E PRG:100E D0 1A lda Zp52 ; CPU:$D010 PRG:1010 A5 52 ora #$18 ; CPU:$D012 PRG:1012 09 18 sta Zp01 ; CPU:$D014 PRG:1014 85 01 @@ -2598,7 +2605,7 @@ UpdateSpritePosition19: pla ; CPU:$D027 PRG:1027 68 sta Zp05 ; CPU:$D028 PRG:1028 85 05 ; ----------------------------------------------------------------------------- -; Routine: Label_D02A +; Routine: UpdateSpritePosition19_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2606,7 +2613,7 @@ UpdateSpritePosition19: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D02A: +UpdateSpritePosition19_Block: jsr $D032 ; CPU:$D02A PRG:102A 20 32 D0 pla ; CPU:$D02D PRG:102D 68 tay ; CPU:$D02E PRG:102E A8 @@ -2641,11 +2648,11 @@ UpdateSpritePosition20: UpdateSpritePosition21_1: lda Zp2E ; CPU:$D041 PRG:1041 A5 2E cmp #$10 ; CPU:$D043 PRG:1043 C9 10 - bpl Label_D04B ; CPU:$D045 PRG:1045 10 04 + bpl UpdateSpritePosition21_1_Block ; CPU:$D045 PRG:1045 10 04 lda #$20 ; CPU:$D047 PRG:1047 A9 20 sta ZpFC ; CPU:$D049 PRG:1049 85 FC ; ----------------------------------------------------------------------------- -; Routine: Label_D04B +; Routine: UpdateSpritePosition21_1_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2653,7 +2660,7 @@ UpdateSpritePosition21_1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D04B: +UpdateSpritePosition21_1_Block: rts ; CPU:$D04B PRG:104B 60 ; ----------------------------------------------------------------------------- ; Routine: UpdateSpritePosition21_3 @@ -2666,19 +2673,19 @@ Label_D04B: ; ----------------------------------------------------------------------------- UpdateSpritePosition21_3: lda Zp9A ; CPU:$D04C PRG:104C A5 9A - bne Label_D092 ; CPU:$D04E PRG:104E D0 42 + bne UpdateSpritePosition22_1_Block ; CPU:$D04E PRG:104E D0 42 ldx Zp53 ; CPU:$D050 PRG:1050 A6 53 cpx #$04 ; CPU:$D052 PRG:1052 E0 04 - beq Label_D063 ; CPU:$D054 PRG:1054 F0 0D + beq UpdateSpritePosition21_3_Block ; CPU:$D054 PRG:1054 F0 0D lda Zp5A ; CPU:$D056 PRG:1056 A5 5A - beq Label_D0BF ; CPU:$D058 PRG:1058 F0 65 + beq UpdateSpritePosition22_3_Block ; CPU:$D058 PRG:1058 F0 65 dex ; CPU:$D05A PRG:105A CA lda $C1FA,x ; CPU:$D05B PRG:105B BD FA C1 cmp Zp59 ; CPU:$D05E PRG:105E C5 59 - beq Label_D074 ; CPU:$D060 PRG:1060 F0 12 + beq UpdateSpritePosition21_3_Block_2 ; CPU:$D060 PRG:1060 F0 12 rts ; CPU:$D062 PRG:1062 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D063 +; Routine: UpdateSpritePosition21_3_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2686,10 +2693,10 @@ UpdateSpritePosition21_3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D063: +UpdateSpritePosition21_3_Block: ldx #$00 ; CPU:$D063 PRG:1063 A2 00 ; ----------------------------------------------------------------------------- -; Routine: Label_D065 +; Routine: UpdateSpritePosition21_3_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2697,16 +2704,16 @@ Label_D063: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D065: +UpdateSpritePosition21_3_Block_1: lda ZpC1,x ; CPU:$D065 PRG:1065 B5 C1 - beq Label_D0BF ; CPU:$D067 PRG:1067 F0 56 + beq UpdateSpritePosition22_3_Block ; CPU:$D067 PRG:1067 F0 56 inx ; CPU:$D069 PRG:1069 E8 stx $044F ; CPU:$D06A PRG:106A 8E 4F 04 cpx #$08 ; CPU:$D06D PRG:106D E0 08 - bne Label_D065 ; CPU:$D06F PRG:106F D0 F4 + bne UpdateSpritePosition21_3_Block_1 ; CPU:$D06F PRG:106F D0 F4 jmp $D086 ; CPU:$D071 PRG:1071 4C 86 D0 ; ----------------------------------------------------------------------------- -; Routine: Label_D074 +; Routine: UpdateSpritePosition21_3_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2714,7 +2721,7 @@ Label_D065: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D074: +UpdateSpritePosition21_3_Block_2: jsr $EAE1 ; CPU:$D074 PRG:1074 20 E1 EA lda #$04 ; CPU:$D077 PRG:1077 A9 04 jsr $EAD4 ; CPU:$D079 PRG:1079 20 D4 EA @@ -2739,7 +2746,7 @@ UpdateSpritePosition22_1: lda #$00 ; CPU:$D08E PRG:108E A9 00 sta Zp3A ; CPU:$D090 PRG:1090 85 3A ; ----------------------------------------------------------------------------- -; Routine: Label_D092 +; Routine: UpdateSpritePosition22_1_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2747,18 +2754,18 @@ UpdateSpritePosition22_1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D092: +UpdateSpritePosition22_1_Block: lda Zp3A ; CPU:$D092 PRG:1092 A5 3A - bne Label_D0BF ; CPU:$D094 PRG:1094 D0 29 + bne UpdateSpritePosition22_3_Block ; CPU:$D094 PRG:1094 D0 29 inc Zp53 ; CPU:$D096 PRG:1096 E6 53 lda Zp53 ; CPU:$D098 PRG:1098 A5 53 cmp #$02 ; CPU:$D09A PRG:109A C9 02 - beq Label_D0A5 ; CPU:$D09C PRG:109C F0 07 + beq UpdateSpritePosition22_1_Block_1 ; CPU:$D09C PRG:109C F0 07 cmp #$05 ; CPU:$D09E PRG:109E C9 05 - bcs Label_D0AA ; CPU:$D0A0 PRG:10A0 B0 08 + bcs UpdateSpritePosition22_1_Block_2 ; CPU:$D0A0 PRG:10A0 B0 08 jmp $D0B5 ; CPU:$D0A2 PRG:10A2 4C B5 D0 ; ----------------------------------------------------------------------------- -; Routine: Label_D0A5 +; Routine: UpdateSpritePosition22_1_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2766,11 +2773,11 @@ Label_D092: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D0A5: +UpdateSpritePosition22_1_Block_1: inc Zp53 ; CPU:$D0A5 PRG:10A5 E6 53 jmp $D0B5 ; CPU:$D0A7 PRG:10A7 4C B5 D0 ; ----------------------------------------------------------------------------- -; Routine: Label_D0AA +; Routine: UpdateSpritePosition22_1_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2778,7 +2785,7 @@ Label_D0A5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D0AA: +UpdateSpritePosition22_1_Block_2: lda #$01 ; CPU:$D0AA PRG:10AA A9 01 sta Zp53 ; CPU:$D0AC PRG:10AC 85 53 inc Zp54 ; CPU:$D0AE PRG:10AE E6 54 @@ -2801,7 +2808,7 @@ UpdateSpritePosition22_3: sta Zp4F ; CPU:$D0BB PRG:10BB 85 4F sta Zp9A ; CPU:$D0BD PRG:10BD 85 9A ; ----------------------------------------------------------------------------- -; Routine: Label_D0BF +; Routine: UpdateSpritePosition22_3_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2809,7 +2816,7 @@ UpdateSpritePosition22_3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D0BF: +UpdateSpritePosition22_3_Block: rts ; CPU:$D0BF PRG:10BF 60 ; ----------------------------------------------------------------------------- ; Routine: UpdateSpritePosition23 @@ -2825,18 +2832,18 @@ UpdateSpritePosition23: sta ZpFC ; CPU:$D0C2 PRG:10C2 85 FC lda #$10 ; CPU:$D0C4 PRG:10C4 A9 10 jsr $D9E6 ; CPU:$D0C6 PRG:10C6 20 E6 D9 - beq Label_D138 ; CPU:$D0C9 PRG:10C9 F0 6D + beq UpdateSpritePosition24_Block_1 ; CPU:$D0C9 PRG:10C9 F0 6D lda Zp98 ; CPU:$D0CB PRG:10CB A5 98 cmp #$FF ; CPU:$D0CD PRG:10CD C9 FF - beq Label_D130 ; CPU:$D0CF PRG:10CF F0 5F + beq UpdateSpritePosition24_Block ; CPU:$D0CF PRG:10CF F0 5F lda Zp98 ; CPU:$D0D1 PRG:10D1 A5 98 - bne Label_D0E4 ; CPU:$D0D3 PRG:10D3 D0 0F + bne UpdateSpritePosition23_Block_1 ; CPU:$D0D3 PRG:10D3 D0 0F lda Zp58 ; CPU:$D0D5 PRG:10D5 A5 58 - bne Label_D0DD ; CPU:$D0D7 PRG:10D7 D0 04 + bne UpdateSpritePosition23_Block ; CPU:$D0D7 PRG:10D7 D0 04 lda #$80 ; CPU:$D0D9 PRG:10D9 A9 80 sta ZpFE ; CPU:$D0DB PRG:10DB 85 FE ; ----------------------------------------------------------------------------- -; Routine: Label_D0DD +; Routine: UpdateSpritePosition23_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2844,13 +2851,13 @@ UpdateSpritePosition23: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D0DD: +UpdateSpritePosition23_Block: lda #$40 ; CPU:$D0DD PRG:10DD A9 40 sta Zp3A ; CPU:$D0DF PRG:10DF 85 3A inc Zp98 ; CPU:$D0E1 PRG:10E1 E6 98 rts ; CPU:$D0E3 PRG:10E3 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D0E4 +; Routine: UpdateSpritePosition23_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2858,17 +2865,17 @@ Label_D0DD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D0E4: +UpdateSpritePosition23_Block_1: lda Zp3A ; CPU:$D0E4 PRG:10E4 A5 3A - beq Label_D0F8 ; CPU:$D0E6 PRG:10E6 F0 10 + beq UpdateSpritePosition23_Block_3 ; CPU:$D0E6 PRG:10E6 F0 10 cmp #$0E ; CPU:$D0E8 PRG:10E8 C9 0E - bcc Label_D138 ; CPU:$D0EA PRG:10EA 90 4C + bcc UpdateSpritePosition24_Block_1 ; CPU:$D0EA PRG:10EA 90 4C lda Zp58 ; CPU:$D0EC PRG:10EC A5 58 - bne Label_D0F4 ; CPU:$D0EE PRG:10EE D0 04 + bne UpdateSpritePosition23_Block_2 ; CPU:$D0EE PRG:10EE D0 04 lda #$01 ; CPU:$D0F0 PRG:10F0 A9 01 sta ZpFF ; CPU:$D0F2 PRG:10F2 85 FF ; ----------------------------------------------------------------------------- -; Routine: Label_D0F4 +; Routine: UpdateSpritePosition23_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2876,11 +2883,11 @@ Label_D0E4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D0F4: +UpdateSpritePosition23_Block_2: lda #$00 ; CPU:$D0F4 PRG:10F4 A9 00 sta Zp3A ; CPU:$D0F6 PRG:10F6 85 3A ; ----------------------------------------------------------------------------- -; Routine: Label_D0F8 +; Routine: UpdateSpritePosition23_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2888,13 +2895,13 @@ Label_D0F4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D0F8: +UpdateSpritePosition23_Block_3: lda $0201 ; CPU:$D0F8 PRG:10F8 AD 01 02 cmp #$6C ; CPU:$D0FB PRG:10FB C9 6C - bcs Label_D101 ; CPU:$D0FD PRG:10FD B0 02 + bcs UpdateSpritePosition23_Block_4 ; CPU:$D0FD PRG:10FD B0 02 lda #$6C ; CPU:$D0FF PRG:10FF A9 6C ; ----------------------------------------------------------------------------- -; Routine: Label_D101 +; Routine: UpdateSpritePosition23_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2902,7 +2909,7 @@ Label_D0F8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D101: +UpdateSpritePosition23_Block_4: clc ; CPU:$D101 PRG:1101 18 adc #$04 ; CPU:$D102 PRG:1102 69 04 cmp #$7C ; CPU:$D104 PRG:1104 C9 7C @@ -2910,11 +2917,11 @@ Label_D101: inc Zp98 ; CPU:$D108 PRG:1108 E6 98 lda Zp98 ; CPU:$D10A PRG:110A A5 98 cmp #$05 ; CPU:$D10C PRG:110C C9 05 - beq Label_D115 ; CPU:$D10E PRG:110E F0 05 + beq UpdateSpritePosition23_Block_5 ; CPU:$D10E PRG:110E F0 05 lda #$6C ; CPU:$D110 PRG:1110 A9 6C jmp $D11F ; CPU:$D112 PRG:1112 4C 1F D1 ; ----------------------------------------------------------------------------- -; Routine: Label_D115 +; Routine: UpdateSpritePosition23_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2922,13 +2929,13 @@ Label_D101: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D115: +UpdateSpritePosition23_Block_5: lda Zp58 ; CPU:$D115 PRG:1115 A5 58 - beq Label_D11D ; CPU:$D117 PRG:1117 F0 04 + beq UpdateSpritePosition23_Block_6 ; CPU:$D117 PRG:1117 F0 04 lda #$7D ; CPU:$D119 PRG:1119 A9 7D sta Zp3A ; CPU:$D11B PRG:111B 85 3A ; ----------------------------------------------------------------------------- -; Routine: Label_D11D +; Routine: UpdateSpritePosition23_Block_6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2936,7 +2943,7 @@ Label_D115: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D11D: +UpdateSpritePosition23_Block_6: lda #$7C ; CPU:$D11D PRG:111D A9 7C ; ----------------------------------------------------------------------------- ; Routine: UpdateSpritePosition24 @@ -2954,9 +2961,9 @@ UpdateSpritePosition24: jsr $F082 ; CPU:$D127 PRG:1127 20 82 F0 lda Zp98 ; CPU:$D12A PRG:112A A5 98 cmp #$05 ; CPU:$D12C PRG:112C C9 05 - bne Label_D138 ; CPU:$D12E PRG:112E D0 08 + bne UpdateSpritePosition24_Block_1 ; CPU:$D12E PRG:112E D0 08 ; ----------------------------------------------------------------------------- -; Routine: Label_D130 +; Routine: UpdateSpritePosition24_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2964,13 +2971,13 @@ UpdateSpritePosition24: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D130: +UpdateSpritePosition24_Block: lda #$FF ; CPU:$D130 PRG:1130 A9 FF sta Zp98 ; CPU:$D132 PRG:1132 85 98 lda Zp3A ; CPU:$D134 PRG:1134 A5 3A - beq Label_D139 ; CPU:$D136 PRG:1136 F0 01 + beq UpdateSpritePosition24_Block_2 ; CPU:$D136 PRG:1136 F0 01 ; ----------------------------------------------------------------------------- -; Routine: Label_D138 +; Routine: UpdateSpritePosition24_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2978,10 +2985,10 @@ Label_D130: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D138: +UpdateSpritePosition24_Block_1: rts ; CPU:$D138 PRG:1138 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D139 +; Routine: UpdateSpritePosition24_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2989,18 +2996,18 @@ Label_D138: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D139: +UpdateSpritePosition24_Block_2: ldx Zp52 ; CPU:$D139 PRG:1139 A6 52 jsr $CAB9 ; CPU:$D13B PRG:113B 20 B9 CA lda Zp55 ; CPU:$D13E PRG:113E A5 55 - bne Label_D14B ; CPU:$D140 PRG:1140 D0 09 + bne UpdateSpritePosition24_Block_3 ; CPU:$D140 PRG:1140 D0 09 lda #$01 ; CPU:$D142 PRG:1142 A9 01 sta Zp4E ; CPU:$D144 PRG:1144 85 4E lda #$87 ; CPU:$D146 PRG:1146 A9 87 sta Zp43 ; CPU:$D148 PRG:1148 85 43 rts ; CPU:$D14A PRG:114A 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D14B +; Routine: UpdateSpritePosition24_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3008,7 +3015,7 @@ Label_D139: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D14B: +UpdateSpritePosition24_Block_3: lda Zp51 ; CPU:$D14B PRG:114B A5 51 cmp #$1C ; CPU:$D14D PRG:114D C9 1C bne UpdateSpritePosition25 ; CPU:$D14F PRG:114F D0 18 @@ -3017,14 +3024,14 @@ Label_D14B: tax ; CPU:$D155 PRG:1155 AA stx Zp52 ; CPU:$D156 PRG:1156 86 52 lda $0406,x ; CPU:$D158 PRG:1158 BD 06 04 - beq Label_D166 ; CPU:$D15B PRG:115B F0 09 + beq UpdateSpritePosition24_Block_4 ; CPU:$D15B PRG:115B F0 09 txa ; CPU:$D15D PRG:115D 8A eor #$01 ; CPU:$D15E PRG:115E 49 01 tax ; CPU:$D160 PRG:1160 AA stx Zp52 ; CPU:$D161 PRG:1161 86 52 jmp $D169 ; CPU:$D163 PRG:1163 4C 69 D1 ; ----------------------------------------------------------------------------- -; Routine: Label_D166 +; Routine: UpdateSpritePosition24_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3032,7 +3039,7 @@ Label_D14B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D166: +UpdateSpritePosition24_Block_4: jsr $CAA9 ; CPU:$D166 PRG:1166 20 A9 CA ; ----------------------------------------------------------------------------- ; Routine: UpdateSpritePosition25 @@ -3066,14 +3073,14 @@ UpdateSpritePosition26: lda Zp15,x ; CPU:$D179 PRG:1179 B5 15 and #$0F ; CPU:$D17B PRG:117B 29 0F sta Zp56 ; CPU:$D17D PRG:117D 85 56 - beq Label_D189 ; CPU:$D17F PRG:117F F0 08 + beq UpdateSpritePosition26_Block ; CPU:$D17F PRG:117F F0 08 lsr a ; CPU:$D181 PRG:1181 4A lsr a ; CPU:$D182 PRG:1182 4A - bne Label_D189 ; CPU:$D183 PRG:1183 D0 04 + bne UpdateSpritePosition26_Block ; CPU:$D183 PRG:1183 D0 04 lda Zp56 ; CPU:$D185 PRG:1185 A5 56 sta Zp57 ; CPU:$D187 PRG:1187 85 57 ; ----------------------------------------------------------------------------- -; Routine: Label_D189 +; Routine: UpdateSpritePosition26_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3081,17 +3088,17 @@ UpdateSpritePosition26: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D189: +UpdateSpritePosition26_Block: lda Zp96 ; CPU:$D189 PRG:1189 A5 96 cmp #$01 ; CPU:$D18B PRG:118B C9 01 - bne Label_D199 ; CPU:$D18D PRG:118D D0 0A + bne UpdateSpritePosition26_Block_1 ; CPU:$D18D PRG:118D D0 0A lda Zp15,x ; CPU:$D18F PRG:118F B5 15 and #$80 ; CPU:$D191 PRG:1191 29 80 - beq Label_D199 ; CPU:$D193 PRG:1193 F0 04 + beq UpdateSpritePosition26_Block_1 ; CPU:$D193 PRG:1193 F0 04 lda #$04 ; CPU:$D195 PRG:1195 A9 04 sta Zp96 ; CPU:$D197 PRG:1197 85 96 ; ----------------------------------------------------------------------------- -; Routine: Label_D199 +; Routine: UpdateSpritePosition26_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3099,7 +3106,7 @@ Label_D189: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D199: +UpdateSpritePosition26_Block_1: rts ; CPU:$D199 PRG:1199 60 ; ----------------------------------------------------------------------------- ; Routine: UpdateSpritePosition27 @@ -3113,7 +3120,7 @@ Label_D199: UpdateSpritePosition27: lda Zp11 ; CPU:$D19A PRG:119A A5 11 and #$E7 ; CPU:$D19C PRG:119C 29 E7 - sta $2001 ; CPU:$D19E PRG:119E 8D 01 20 + sta PPUMASK ; CPU:$D19E PRG:119E 8D 01 20 sta Zp11 ; CPU:$D1A1 PRG:11A1 85 11 rts ; CPU:$D1A3 PRG:11A3 60 ; ----------------------------------------------------------------------------- @@ -3128,7 +3135,7 @@ UpdateSpritePosition27: UpdateSpritePosition28: lda Zp96 ; CPU:$D1A4 PRG:11A4 A5 96 cmp #$01 ; CPU:$D1A6 PRG:11A6 C9 01 - beq Label_D1BB ; CPU:$D1A8 PRG:11A8 F0 11 + beq UpdateSpritePosition28_Block ; CPU:$D1A8 PRG:11A8 F0 11 ; ----------------------------------------------------------------------------- ; Routine: UpdateSpritePosition29 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -3140,16 +3147,16 @@ UpdateSpritePosition28: ; ----------------------------------------------------------------------------- UpdateSpritePosition29: cmp #$02 ; CPU:$D1AA PRG:11AA C9 02 - beq Label_D1C3 ; CPU:$D1AC PRG:11AC F0 15 + beq UpdateSpritePosition29_Block ; CPU:$D1AC PRG:11AC F0 15 cmp #$04 ; CPU:$D1AE PRG:11AE C9 04 - beq Label_D1C6 ; CPU:$D1B0 PRG:11B0 F0 14 + beq UpdateSpritePosition29_Block_1 ; CPU:$D1B0 PRG:11B0 F0 14 cmp #$08 ; CPU:$D1B2 PRG:11B2 C9 08 - beq Label_D1C9 ; CPU:$D1B4 PRG:11B4 F0 13 + beq UpdateSpritePosition29_Block_2 ; CPU:$D1B4 PRG:11B4 F0 13 cmp #$0A ; CPU:$D1B6 PRG:11B6 C9 0A - beq Label_D1CC ; CPU:$D1B8 PRG:11B8 F0 12 + beq UpdateSpritePosition29_Block_3 ; CPU:$D1B8 PRG:11B8 F0 12 rts ; CPU:$D1BA PRG:11BA 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D1BB +; Routine: UpdateSpritePosition28_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3157,12 +3164,12 @@ UpdateSpritePosition29: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D1BB: +UpdateSpritePosition28_Block: jsr $D1CF ; CPU:$D1BB PRG:11BB 20 CF D1 lda Zp96 ; CPU:$D1BE PRG:11BE A5 96 jmp $D1AA ; CPU:$D1C0 PRG:11C0 4C AA D1 ; ----------------------------------------------------------------------------- -; Routine: Label_D1C3 +; Routine: UpdateSpritePosition29_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3170,10 +3177,10 @@ Label_D1BB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D1C3: +UpdateSpritePosition29_Block: jmp $D37E ; CPU:$D1C3 PRG:11C3 4C 7E D3 ; ----------------------------------------------------------------------------- -; Routine: Label_D1C6 +; Routine: UpdateSpritePosition29_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3181,10 +3188,10 @@ Label_D1C3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D1C6: +UpdateSpritePosition29_Block_1: jmp $D547 ; CPU:$D1C6 PRG:11C6 4C 47 D5 ; ----------------------------------------------------------------------------- -; Routine: Label_D1C9 +; Routine: UpdateSpritePosition29_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3192,10 +3199,10 @@ Label_D1C6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D1C9: +UpdateSpritePosition29_Block_2: jmp $D697 ; CPU:$D1C9 PRG:11C9 4C 97 D6 ; ----------------------------------------------------------------------------- -; Routine: Label_D1CC +; Routine: UpdateSpritePosition29_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3203,7 +3210,7 @@ Label_D1C9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D1CC: +UpdateSpritePosition29_Block_3: jmp $D6C6 ; CPU:$D1CC PRG:11CC 4C C6 D6 ; ----------------------------------------------------------------------------- ; Routine: UpdateSpritePosition30 @@ -3217,16 +3224,16 @@ Label_D1CC: UpdateSpritePosition30: lda Zp56 ; CPU:$D1CF PRG:11CF A5 56 cmp #$01 ; CPU:$D1D1 PRG:11D1 C9 01 - beq Label_D1E5 ; CPU:$D1D3 PRG:11D3 F0 10 + beq UpdateSpritePosition30_Block_1 ; CPU:$D1D3 PRG:11D3 F0 10 cmp #$02 ; CPU:$D1D5 PRG:11D5 C9 02 - beq Label_D1E5 ; CPU:$D1D7 PRG:11D7 F0 0C + beq UpdateSpritePosition30_Block_1 ; CPU:$D1D7 PRG:11D7 F0 0C cmp #$04 ; CPU:$D1D9 PRG:11D9 C9 04 - beq Label_D1E2 ; CPU:$D1DB PRG:11DB F0 05 + beq UpdateSpritePosition30_Block ; CPU:$D1DB PRG:11DB F0 05 cmp #$08 ; CPU:$D1DD PRG:11DD C9 08 - beq Label_D1E2 ; CPU:$D1DF PRG:11DF F0 01 + beq UpdateSpritePosition30_Block ; CPU:$D1DF PRG:11DF F0 01 rts ; CPU:$D1E1 PRG:11E1 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D1E2 +; Routine: UpdateSpritePosition30_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3234,10 +3241,10 @@ UpdateSpritePosition30: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D1E2: +UpdateSpritePosition30_Block: jmp $D28B ; CPU:$D1E2 PRG:11E2 4C 8B D2 ; ----------------------------------------------------------------------------- -; Routine: Label_D1E5 +; Routine: UpdateSpritePosition30_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3245,15 +3252,15 @@ Label_D1E2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D1E5: +UpdateSpritePosition30_Block_1: lda #$DB ; CPU:$D1E5 PRG:11E5 A9 DB sta Zp0A ; CPU:$D1E7 PRG:11E7 85 0A lda #$36 ; CPU:$D1E9 PRG:11E9 A9 36 jsr $D9E8 ; CPU:$D1EB PRG:11EB 20 E8 D9 - bne Label_D1F3 ; CPU:$D1EE PRG:11EE D0 03 + bne UpdateSpritePosition30_Block_2 ; CPU:$D1EE PRG:11EE D0 03 jmp $D275 ; CPU:$D1F0 PRG:11F0 4C 75 D2 ; ----------------------------------------------------------------------------- -; Routine: Label_D1F3 +; Routine: UpdateSpritePosition30_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3261,12 +3268,12 @@ Label_D1E5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D1F3: +UpdateSpritePosition30_Block_2: jsr $D990 ; CPU:$D1F3 PRG:11F3 20 90 D9 - beq Label_D1F9 ; CPU:$D1F6 PRG:11F6 F0 01 + beq UpdateSpritePosition30_Block_3 ; CPU:$D1F6 PRG:11F6 F0 01 rts ; CPU:$D1F8 PRG:11F8 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D1F9 +; Routine: UpdateSpritePosition30_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3274,14 +3281,14 @@ Label_D1F3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D1F9: +UpdateSpritePosition30_Block_3: lda Zp56 ; CPU:$D1F9 PRG:11F9 A5 56 cmp #$02 ; CPU:$D1FB PRG:11FB C9 02 - beq Label_D205 ; CPU:$D1FD PRG:11FD F0 06 + beq UpdateSpritePosition30_Block_4 ; CPU:$D1FD PRG:11FD F0 06 inc $0203 ; CPU:$D1FF PRG:11FF EE 03 02 jmp $D208 ; CPU:$D202 PRG:1202 4C 08 D2 ; ----------------------------------------------------------------------------- -; Routine: Label_D205 +; Routine: UpdateSpritePosition30_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3289,7 +3296,7 @@ Label_D1F9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D205: +UpdateSpritePosition30_Block_4: dec $0203 ; CPU:$D205 PRG:1205 CE 03 02 ; ----------------------------------------------------------------------------- ; Routine: UpdateSpritePosition31 @@ -3307,15 +3314,15 @@ UpdateSpritePosition31: jsr $E016 ; CPU:$D210 PRG:1210 20 16 E0 sta Zp59 ; CPU:$D213 PRG:1213 85 59 jsr $D8EB ; CPU:$D215 PRG:1215 20 EB D8 - beq Label_D233 ; CPU:$D218 PRG:1218 F0 19 + beq UpdateSpritePosition31_Block_1 ; CPU:$D218 PRG:1218 F0 19 ldx Zp53 ; CPU:$D21A PRG:121A A6 53 cpx #$01 ; CPU:$D21C PRG:121C E0 01 - bne Label_D227 ; CPU:$D21E PRG:121E D0 07 + bne UpdateSpritePosition31_Block ; CPU:$D21E PRG:121E D0 07 clc ; CPU:$D220 PRG:1220 18 adc $0200 ; CPU:$D221 PRG:1221 6D 00 02 sta $0200 ; CPU:$D224 PRG:1224 8D 00 02 ; ----------------------------------------------------------------------------- -; Routine: Label_D227 +; Routine: UpdateSpritePosition31_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3323,15 +3330,15 @@ UpdateSpritePosition31: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D227: +UpdateSpritePosition31_Block: jsr $D36A ; CPU:$D227 PRG:1227 20 6A D3 cmp #$00 ; CPU:$D22A PRG:122A C9 00 - beq Label_D233 ; CPU:$D22C PRG:122C F0 05 + beq UpdateSpritePosition31_Block_1 ; CPU:$D22C PRG:122C F0 05 lda #$08 ; CPU:$D22E PRG:122E A9 08 sta Zp96 ; CPU:$D230 PRG:1230 85 96 rts ; CPU:$D232 PRG:1232 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D233 +; Routine: UpdateSpritePosition31_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3339,14 +3346,14 @@ Label_D227: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D233: +UpdateSpritePosition31_Block_1: lda Zp9B ; CPU:$D233 PRG:1233 A5 9B - bne Label_D23E ; CPU:$D235 PRG:1235 D0 07 + bne UpdateSpritePosition31_Block_2 ; CPU:$D235 PRG:1235 D0 07 lda #$01 ; CPU:$D237 PRG:1237 A9 01 sta Zp9B ; CPU:$D239 PRG:1239 85 9B jmp $D275 ; CPU:$D23B PRG:123B 4C 75 D2 ; ----------------------------------------------------------------------------- -; Routine: Label_D23E +; Routine: UpdateSpritePosition31_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3354,23 +3361,23 @@ Label_D233: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D23E: +UpdateSpritePosition31_Block_2: lda #$08 ; CPU:$D23E PRG:123E A9 08 sta ZpFF ; CPU:$D240 PRG:1240 85 FF lda #$00 ; CPU:$D242 PRG:1242 A9 00 sta Zp9B ; CPU:$D244 PRG:1244 85 9B lda Zp97 ; CPU:$D246 PRG:1246 A5 97 - beq Label_D262 ; CPU:$D248 PRG:1248 F0 18 + beq UpdateSpritePosition31_Block_4 ; CPU:$D248 PRG:1248 F0 18 cmp #$08 ; CPU:$D24A PRG:124A C9 08 - beq Label_D26D ; CPU:$D24C PRG:124C F0 1F + beq UpdateSpritePosition31_Block_5 ; CPU:$D24C PRG:124C F0 1F lda #$04 ; CPU:$D24E PRG:124E A9 04 sta Zp97 ; CPU:$D250 PRG:1250 85 97 lda Zp85 ; CPU:$D252 PRG:1252 A5 85 - beq Label_D25B ; CPU:$D254 PRG:1254 F0 05 + beq UpdateSpritePosition31_Block_3 ; CPU:$D254 PRG:1254 F0 05 lda #$00 ; CPU:$D256 PRG:1256 A9 00 jmp $D25D ; CPU:$D258 PRG:1258 4C 5D D2 ; ----------------------------------------------------------------------------- -; Routine: Label_D25B +; Routine: UpdateSpritePosition31_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3378,7 +3385,7 @@ Label_D23E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D25B: +UpdateSpritePosition31_Block_3: lda #$08 ; CPU:$D25B PRG:125B A9 08 ; ----------------------------------------------------------------------------- ; Routine: UpdateSpritePosition32 @@ -3393,7 +3400,7 @@ UpdateSpritePosition32: sta Zp97 ; CPU:$D25D PRG:125D 85 97 jmp $D275 ; CPU:$D25F PRG:125F 4C 75 D2 ; ----------------------------------------------------------------------------- -; Routine: Label_D262 +; Routine: UpdateSpritePosition31_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3401,14 +3408,14 @@ UpdateSpritePosition32: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D262: +UpdateSpritePosition31_Block_4: lda #$04 ; CPU:$D262 PRG:1262 A9 04 sta Zp97 ; CPU:$D264 PRG:1264 85 97 lda #$00 ; CPU:$D266 PRG:1266 A9 00 sta Zp85 ; CPU:$D268 PRG:1268 85 85 jmp $D275 ; CPU:$D26A PRG:126A 4C 75 D2 ; ----------------------------------------------------------------------------- -; Routine: Label_D26D +; Routine: UpdateSpritePosition31_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3416,7 +3423,7 @@ Label_D262: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D26D: +UpdateSpritePosition31_Block_5: lda #$04 ; CPU:$D26D PRG:126D A9 04 sta Zp97 ; CPU:$D26F PRG:126F 85 97 lda #$01 ; CPU:$D271 PRG:1271 A9 01 @@ -3437,10 +3444,10 @@ UpdateSpritePosition33: jsr $EACD ; CPU:$D27C PRG:127C 20 CD EA lda Zp56 ; CPU:$D27F PRG:127F A5 56 cmp #$02 ; CPU:$D281 PRG:1281 C9 02 - beq Label_D288 ; CPU:$D283 PRG:1283 F0 03 + beq UpdateSpritePosition33_Block ; CPU:$D283 PRG:1283 F0 03 jmp $F082 ; CPU:$D285 PRG:1285 4C 82 F0 ; ----------------------------------------------------------------------------- -; Routine: Label_D288 +; Routine: UpdateSpritePosition33_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3448,7 +3455,7 @@ UpdateSpritePosition33: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D288: +UpdateSpritePosition33_Block: jmp $F088 ; CPU:$D288 PRG:1288 4C 88 F0 ; ----------------------------------------------------------------------------- ; Routine: UpdateSpritePosition34 @@ -3480,7 +3487,7 @@ UpdateSpritePosition34: lda $C484,x ; CPU:$D2AF PRG:12AF BD 84 C4 sta Zp07 ; CPU:$D2B2 PRG:12B2 85 07 jsr $D8AD ; CPU:$D2B4 PRG:12B4 20 AD D8 - beq Label_D2CA ; CPU:$D2B7 PRG:12B7 F0 11 + beq UpdateSpritePosition34_Block ; CPU:$D2B7 PRG:12B7 F0 11 lda Zp00 ; CPU:$D2B9 PRG:12B9 A5 00 sec ; CPU:$D2BB PRG:12BB 38 sbc #$04 ; CPU:$D2BC PRG:12BC E9 04 @@ -3491,7 +3498,7 @@ UpdateSpritePosition34: sta Zp5B ; CPU:$D2C6 PRG:12C6 85 5B sta Zp5C ; CPU:$D2C8 PRG:12C8 85 5C ; ----------------------------------------------------------------------------- -; Routine: Label_D2CA +; Routine: UpdateSpritePosition34_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3499,7 +3506,7 @@ UpdateSpritePosition34: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D2CA: +UpdateSpritePosition34_Block: rts ; CPU:$D2CA PRG:12CA 60 ; ----------------------------------------------------------------------------- ; Routine: UpdateSpritePosition35 @@ -3514,13 +3521,13 @@ UpdateSpritePosition35: jsr $EAE1 ; CPU:$D2CB PRG:12CB 20 E1 EA lda Zp96 ; CPU:$D2CE PRG:12CE A5 96 cmp #$04 ; CPU:$D2D0 PRG:12D0 C9 04 - beq Label_D2DD ; CPU:$D2D2 PRG:12D2 F0 09 + beq UpdateSpritePosition35_Block ; CPU:$D2D2 PRG:12D2 F0 09 cmp #$08 ; CPU:$D2D4 PRG:12D4 C9 08 - beq Label_D2DD ; CPU:$D2D6 PRG:12D6 F0 05 + beq UpdateSpritePosition35_Block ; CPU:$D2D6 PRG:12D6 F0 05 lda #$2C ; CPU:$D2D8 PRG:12D8 A9 2C jmp $D2DF ; CPU:$D2DA PRG:12DA 4C DF D2 ; ----------------------------------------------------------------------------- -; Routine: Label_D2DD +; Routine: UpdateSpritePosition35_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3528,7 +3535,7 @@ UpdateSpritePosition35: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D2DD: +UpdateSpritePosition35_Block: lda #$4A ; CPU:$D2DD PRG:12DD A9 4A ; ----------------------------------------------------------------------------- ; Routine: UpdateSpritePosition36 @@ -3543,14 +3550,14 @@ UpdateSpritePosition36: jsr $EFE8 ; CPU:$D2DF PRG:12DF 20 E8 EF lda Zp53 ; CPU:$D2E2 PRG:12E2 A5 53 cmp #$01 ; CPU:$D2E4 PRG:12E4 C9 01 - beq Label_D2F0 ; CPU:$D2E6 PRG:12E6 F0 08 + beq UpdateSpritePosition36_Block ; CPU:$D2E6 PRG:12E6 F0 08 sec ; CPU:$D2E8 PRG:12E8 38 sbc #$01 ; CPU:$D2E9 PRG:12E9 E9 01 asl a ; CPU:$D2EB PRG:12EB 0A tax ; CPU:$D2EC PRG:12EC AA jmp $D2FD ; CPU:$D2ED PRG:12ED 4C FD D2 ; ----------------------------------------------------------------------------- -; Routine: Label_D2F0 +; Routine: UpdateSpritePosition36_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3558,7 +3565,7 @@ UpdateSpritePosition36: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D2F0: +UpdateSpritePosition36_Block: lda #$1A ; CPU:$D2F0 PRG:12F0 A9 1A jsr $C831 ; CPU:$D2F2 PRG:12F2 20 31 C8 jsr $D91A ; CPU:$D2F5 PRG:12F5 20 1A D9 @@ -3628,20 +3635,20 @@ UpdateSpritePosition39: UpdateSpritePosition40: lda ZpD2 ; CPU:$D32F PRG:132F A5 D2 cmp #$06 ; CPU:$D331 PRG:1331 C9 06 - beq Label_D365 ; CPU:$D333 PRG:1333 F0 30 + beq UpdateSpritePosition40_Block_3 ; CPU:$D333 PRG:1333 F0 30 tax ; CPU:$D335 PRG:1335 AA ldy $C2CC,x ; CPU:$D336 PRG:1336 BC CC C2 lda $0200,y ; CPU:$D339 PRG:1339 B9 00 02 cmp #$FF ; CPU:$D33C PRG:133C C9 FF - beq Label_D34E ; CPU:$D33E PRG:133E F0 0E + beq UpdateSpritePosition40_Block ; CPU:$D33E PRG:133E F0 0E sta Zp01 ; CPU:$D340 PRG:1340 85 01 lda $0203,y ; CPU:$D342 PRG:1342 B9 03 02 sta Zp00 ; CPU:$D345 PRG:1345 85 00 jsr $EFEF ; CPU:$D347 PRG:1347 20 EF EF cmp #$01 ; CPU:$D34A PRG:134A C9 01 - beq Label_D353 ; CPU:$D34C PRG:134C F0 05 + beq UpdateSpritePosition40_Block_1 ; CPU:$D34C PRG:134C F0 05 ; ----------------------------------------------------------------------------- -; Routine: Label_D34E +; Routine: UpdateSpritePosition40_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3649,11 +3656,11 @@ UpdateSpritePosition40: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D34E: +UpdateSpritePosition40_Block: inc ZpD2 ; CPU:$D34E PRG:134E E6 D2 jmp $D32F ; CPU:$D350 PRG:1350 4C 2F D3 ; ----------------------------------------------------------------------------- -; Routine: Label_D353 +; Routine: UpdateSpritePosition40_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3661,14 +3668,14 @@ Label_D34E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D353: +UpdateSpritePosition40_Block_1: lda ZpD2 ; CPU:$D353 PRG:1353 A5 D2 cmp #$03 ; CPU:$D355 PRG:1355 C9 03 - bcs Label_D35E ; CPU:$D357 PRG:1357 B0 05 + bcs UpdateSpritePosition40_Block_2 ; CPU:$D357 PRG:1357 B0 05 lda #$01 ; CPU:$D359 PRG:1359 A9 01 jmp $D360 ; CPU:$D35B PRG:135B 4C 60 D3 ; ----------------------------------------------------------------------------- -; Routine: Label_D35E +; Routine: UpdateSpritePosition40_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3676,7 +3683,7 @@ Label_D353: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D35E: +UpdateSpritePosition40_Block_2: lda #$02 ; CPU:$D35E PRG:135E A9 02 ; ----------------------------------------------------------------------------- ; Routine: UpdateSpritePosition41 @@ -3692,7 +3699,7 @@ UpdateSpritePosition41: lda #$01 ; CPU:$D362 PRG:1362 A9 01 rts ; CPU:$D364 PRG:1364 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D365 +; Routine: UpdateSpritePosition40_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3700,7 +3707,7 @@ UpdateSpritePosition41: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D365: +UpdateSpritePosition40_Block_3: lda #$00 ; CPU:$D365 PRG:1365 A9 00 sta ZpDA ; CPU:$D367 PRG:1367 85 DA rts ; CPU:$D369 PRG:1369 60 @@ -3716,10 +3723,10 @@ Label_D365: UpdateSpritePosition42_1: lda Zp53 ; CPU:$D36A PRG:136A A5 53 cmp #$01 ; CPU:$D36C PRG:136C C9 01 - beq Label_D373 ; CPU:$D36E PRG:136E F0 03 + beq UpdateSpritePosition42_1_Block ; CPU:$D36E PRG:136E F0 03 jmp $D37B ; CPU:$D370 PRG:1370 4C 7B D3 ; ----------------------------------------------------------------------------- -; Routine: Label_D373 +; Routine: UpdateSpritePosition42_1_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3727,7 +3734,7 @@ UpdateSpritePosition42_1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D373: +UpdateSpritePosition42_1_Block: lda #$1C ; CPU:$D373 PRG:1373 A9 1C jsr $C831 ; CPU:$D375 PRG:1375 20 31 C8 jmp $D8AD ; CPU:$D378 PRG:1378 4C AD D8 @@ -3757,10 +3764,10 @@ UpdateSpritePosition43: cmp #$08 ; CPU:$D380 PRG:1380 C9 08 beq UpdateSpritePosition44 ; CPU:$D382 PRG:1382 F0 0A cmp #$04 ; CPU:$D384 PRG:1384 C9 04 - beq Label_D38B ; CPU:$D386 PRG:1386 F0 03 + beq UpdateSpritePosition43_Block ; CPU:$D386 PRG:1386 F0 03 jmp $D4CF ; CPU:$D388 PRG:1388 4C CF D4 ; ----------------------------------------------------------------------------- -; Routine: Label_D38B +; Routine: UpdateSpritePosition43_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3768,7 +3775,7 @@ UpdateSpritePosition43: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D38B: +UpdateSpritePosition43_Block: jmp $D432 ; CPU:$D38B PRG:138B 4C 32 D4 ; ----------------------------------------------------------------------------- ; Routine: UpdateSpritePosition44 @@ -3781,13 +3788,13 @@ Label_D38B: ; ----------------------------------------------------------------------------- UpdateSpritePosition44: lda Zp5A ; CPU:$D38E PRG:138E A5 5A - beq Label_D39C ; CPU:$D390 PRG:1390 F0 0A + beq UpdateSpritePosition44_Block ; CPU:$D390 PRG:1390 F0 0A jsr $EAE1 ; CPU:$D392 PRG:1392 20 E1 EA dec Zp01 ; CPU:$D395 PRG:1395 C6 01 jsr $D50A ; CPU:$D397 PRG:1397 20 0A D5 - bne Label_D3CD ; CPU:$D39A PRG:139A D0 31 + bne UpdateSpritePosition44_Block_3 ; CPU:$D39A PRG:139A D0 31 ; ----------------------------------------------------------------------------- -; Routine: Label_D39C +; Routine: UpdateSpritePosition44_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3795,17 +3802,17 @@ UpdateSpritePosition44: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D39C: +UpdateSpritePosition44_Block: lda #$24 ; CPU:$D39C PRG:139C A9 24 sta Zp0A ; CPU:$D39E PRG:139E 85 0A lda #$49 ; CPU:$D3A0 PRG:13A0 A9 49 jsr $D9E8 ; CPU:$D3A2 PRG:13A2 20 E8 D9 - bne Label_D3AF ; CPU:$D3A5 PRG:13A5 D0 08 + bne UpdateSpritePosition44_Block_1 ; CPU:$D3A5 PRG:13A5 D0 08 lda $0200 ; CPU:$D3A7 PRG:13A7 AD 00 02 sta Zp01 ; CPU:$D3AA PRG:13AA 85 01 jmp $D4CF ; CPU:$D3AC PRG:13AC 4C CF D4 ; ----------------------------------------------------------------------------- -; Routine: Label_D3AF +; Routine: UpdateSpritePosition44_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3813,14 +3820,14 @@ Label_D39C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D3AF: +UpdateSpritePosition44_Block_1: jsr $D50A ; CPU:$D3AF PRG:13AF 20 0A D5 - beq Label_D3E7 ; CPU:$D3B2 PRG:13B2 F0 33 + beq UpdateSpritePosition44_Block_5 ; CPU:$D3B2 PRG:13B2 F0 33 cmp #$02 ; CPU:$D3B4 PRG:13B4 C9 02 - bne Label_D3BB ; CPU:$D3B6 PRG:13B6 D0 03 + bne UpdateSpritePosition44_Block_2 ; CPU:$D3B6 PRG:13B6 D0 03 jmp $D4CF ; CPU:$D3B8 PRG:13B8 4C CF D4 ; ----------------------------------------------------------------------------- -; Routine: Label_D3BB +; Routine: UpdateSpritePosition44_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3828,18 +3835,18 @@ Label_D3AF: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D3BB: +UpdateSpritePosition44_Block_2: lda Zp5B ; CPU:$D3BB PRG:13BB A5 5B - beq Label_D3D0 ; CPU:$D3BD PRG:13BD F0 11 + beq UpdateSpritePosition44_Block_4 ; CPU:$D3BD PRG:13BD F0 11 clc ; CPU:$D3BF PRG:13BF 18 adc #$01 ; CPU:$D3C0 PRG:13C0 69 01 cmp #$10 ; CPU:$D3C2 PRG:13C2 C9 10 - beq Label_D3D2 ; CPU:$D3C4 PRG:13C4 F0 0C - bcc Label_D3D2 ; CPU:$D3C6 PRG:13C6 90 0A + beq SubCD3D2 ; CPU:$D3C4 PRG:13C4 F0 0C + bcc SubCD3D2 ; CPU:$D3C6 PRG:13C6 90 0A lda #$10 ; CPU:$D3C8 PRG:13C8 A9 10 jmp $D3D2 ; CPU:$D3CA PRG:13CA 4C D2 D3 ; ----------------------------------------------------------------------------- -; Routine: Label_D3CD +; Routine: UpdateSpritePosition44_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3847,10 +3854,10 @@ Label_D3BB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D3CD: +UpdateSpritePosition44_Block_3: jmp $D4CF ; CPU:$D3CD PRG:13CD 4C CF D4 ; ----------------------------------------------------------------------------- -; Routine: Label_D3D0 +; Routine: UpdateSpritePosition44_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3858,10 +3865,10 @@ Label_D3CD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D3D0: +UpdateSpritePosition44_Block_4: lda #$01 ; CPU:$D3D0 PRG:13D0 A9 01 ; ----------------------------------------------------------------------------- -; Routine: Label_D3D2 +; Routine: SubCD3D2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3869,7 +3876,7 @@ Label_D3D0: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D3D2: +SubCD3D2: sta Zp5B ; CPU:$D3D2 PRG:13D2 85 5B tax ; CPU:$D3D4 PRG:13D4 AA dex ; CPU:$D3D5 PRG:13D5 CA @@ -3881,7 +3888,7 @@ Label_D3D2: jsr $D4EE ; CPU:$D3E1 PRG:13E1 20 EE D4 jmp $D40D ; CPU:$D3E4 PRG:13E4 4C 0D D4 ; ----------------------------------------------------------------------------- -; Routine: Label_D3E7 +; Routine: UpdateSpritePosition44_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3889,18 +3896,18 @@ Label_D3D2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D3E7: +UpdateSpritePosition44_Block_5: lda Zp5C ; CPU:$D3E7 PRG:13E7 A5 5C - beq Label_D3F9 ; CPU:$D3E9 PRG:13E9 F0 0E + beq UpdateSpritePosition44_Block_6 ; CPU:$D3E9 PRG:13E9 F0 0E clc ; CPU:$D3EB PRG:13EB 18 adc #$01 ; CPU:$D3EC PRG:13EC 69 01 cmp #$06 ; CPU:$D3EE PRG:13EE C9 06 - beq Label_D3FB ; CPU:$D3F0 PRG:13F0 F0 09 - bcc Label_D3FB ; CPU:$D3F2 PRG:13F2 90 07 + beq SubCD3FB ; CPU:$D3F0 PRG:13F0 F0 09 + bcc SubCD3FB ; CPU:$D3F2 PRG:13F2 90 07 lda #$01 ; CPU:$D3F4 PRG:13F4 A9 01 jmp $D3FB ; CPU:$D3F6 PRG:13F6 4C FB D3 ; ----------------------------------------------------------------------------- -; Routine: Label_D3F9 +; Routine: UpdateSpritePosition44_Block_6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3908,10 +3915,10 @@ Label_D3E7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D3F9: +UpdateSpritePosition44_Block_6: lda #$02 ; CPU:$D3F9 PRG:13F9 A9 02 ; ----------------------------------------------------------------------------- -; Routine: Label_D3FB +; Routine: SubCD3FB ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3919,7 +3926,7 @@ Label_D3F9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D3FB: +SubCD3FB: sta Zp5C ; CPU:$D3FB PRG:13FB 85 5C tax ; CPU:$D3FD PRG:13FD AA dex ; CPU:$D3FE PRG:13FE CA @@ -3930,7 +3937,7 @@ Label_D3FB: sta Zp5B ; CPU:$D408 PRG:1408 85 5B jsr $D4EE ; CPU:$D40A PRG:140A 20 EE D4 ; ----------------------------------------------------------------------------- -; Routine: Label_D40D +; Routine: SubCD40D ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3938,7 +3945,7 @@ Label_D3FB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D40D: +SubCD40D: lda ZpA1 ; CPU:$D40D PRG:140D A5 A1 sta Zp00 ; CPU:$D40F PRG:140F 85 00 sta $0203 ; CPU:$D411 PRG:1411 8D 03 02 @@ -3947,11 +3954,11 @@ Label_D40D: sta Zp04 ; CPU:$D419 PRG:1419 85 04 lda Zp02 ; CPU:$D41B PRG:141B A5 02 cmp #$54 ; CPU:$D41D PRG:141D C9 54 - beq Label_D426 ; CPU:$D41F PRG:141F F0 05 + beq SubCD40D_Block ; CPU:$D41F PRG:141F F0 05 lda #$00 ; CPU:$D421 PRG:1421 A9 00 jmp $D42C ; CPU:$D423 PRG:1423 4C 2C D4 ; ----------------------------------------------------------------------------- -; Routine: Label_D426 +; Routine: SubCD40D_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3959,12 +3966,12 @@ Label_D40D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D426: +SubCD40D_Block: lda #$24 ; CPU:$D426 PRG:1426 A9 24 sta Zp02 ; CPU:$D428 PRG:1428 85 02 lda #$01 ; CPU:$D42A PRG:142A A9 01 ; ----------------------------------------------------------------------------- -; Routine: Label_D42C +; Routine: SubCD42C ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3972,11 +3979,11 @@ Label_D426: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D42C: +SubCD42C: jsr $F096 ; CPU:$D42C PRG:142C 20 96 F0 jmp $D4CF ; CPU:$D42F PRG:142F 4C CF D4 ; ----------------------------------------------------------------------------- -; Routine: Label_D432 +; Routine: SubCD432 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3984,17 +3991,17 @@ Label_D42C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D432: +SubCD432: lda Zp5A ; CPU:$D432 PRG:1432 A5 5A - beq Label_D445 ; CPU:$D434 PRG:1434 F0 0F + beq SubCD432_Block ; CPU:$D434 PRG:1434 F0 0F jsr $EAE1 ; CPU:$D436 PRG:1436 20 E1 EA inc Zp01 ; CPU:$D439 PRG:1439 E6 01 jsr $D50A ; CPU:$D43B PRG:143B 20 0A D5 cmp #$01 ; CPU:$D43E PRG:143E C9 01 - beq Label_D445 ; CPU:$D440 PRG:1440 F0 03 + beq SubCD432_Block ; CPU:$D440 PRG:1440 F0 03 jmp $D4CF ; CPU:$D442 PRG:1442 4C CF D4 ; ----------------------------------------------------------------------------- -; Routine: Label_D445 +; Routine: SubCD432_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4002,18 +4009,18 @@ Label_D432: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D445: +SubCD432_Block: lda #$24 ; CPU:$D445 PRG:1445 A9 24 sta Zp0A ; CPU:$D447 PRG:1447 85 0A lda #$49 ; CPU:$D449 PRG:1449 A9 49 sta Zp0B ; CPU:$D44B PRG:144B 85 0B jsr $D9E6 ; CPU:$D44D PRG:144D 20 E6 D9 - bne Label_D45A ; CPU:$D450 PRG:1450 D0 08 + bne SubCD432_Block_1 ; CPU:$D450 PRG:1450 D0 08 lda $0200 ; CPU:$D452 PRG:1452 AD 00 02 sta Zp01 ; CPU:$D455 PRG:1455 85 01 jmp $D4CF ; CPU:$D457 PRG:1457 4C CF D4 ; ----------------------------------------------------------------------------- -; Routine: Label_D45A +; Routine: SubCD432_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4021,20 +4028,20 @@ Label_D445: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D45A: +SubCD432_Block_1: jsr $D50A ; CPU:$D45A PRG:145A 20 0A D5 - beq Label_D48B ; CPU:$D45D PRG:145D F0 2C + beq SubCD432_Block_4 ; CPU:$D45D PRG:145D F0 2C cmp #$02 ; CPU:$D45F PRG:145F C9 02 - beq Label_D48B ; CPU:$D461 PRG:1461 F0 28 + beq SubCD432_Block_4 ; CPU:$D461 PRG:1461 F0 28 lda Zp5B ; CPU:$D463 PRG:1463 A5 5B - beq Label_D471 ; CPU:$D465 PRG:1465 F0 0A + beq SubCD432_Block_2 ; CPU:$D465 PRG:1465 F0 0A sec ; CPU:$D467 PRG:1467 38 sbc #$01 ; CPU:$D468 PRG:1468 E9 01 cmp #$01 ; CPU:$D46A PRG:146A C9 01 - bcc Label_D476 ; CPU:$D46C PRG:146C 90 08 + bcc SubCD432_Block_3 ; CPU:$D46C PRG:146C 90 08 jmp $D478 ; CPU:$D46E PRG:146E 4C 78 D4 ; ----------------------------------------------------------------------------- -; Routine: Label_D471 +; Routine: SubCD432_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4042,11 +4049,11 @@ Label_D45A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D471: +SubCD432_Block_2: lda #$0D ; CPU:$D471 PRG:1471 A9 0D jmp $D478 ; CPU:$D473 PRG:1473 4C 78 D4 ; ----------------------------------------------------------------------------- -; Routine: Label_D476 +; Routine: SubCD432_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4054,10 +4061,10 @@ Label_D471: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D476: +SubCD432_Block_3: lda #$01 ; CPU:$D476 PRG:1476 A9 01 ; ----------------------------------------------------------------------------- -; Routine: Label_D478 +; Routine: SubCD478 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4065,7 +4072,7 @@ Label_D476: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D478: +SubCD478: sta Zp5B ; CPU:$D478 PRG:1478 85 5B tax ; CPU:$D47A PRG:147A AA dex ; CPU:$D47B PRG:147B CA @@ -4076,7 +4083,7 @@ Label_D478: jsr $D4F9 ; CPU:$D485 PRG:1485 20 F9 D4 jmp $D4B1 ; CPU:$D488 PRG:1488 4C B1 D4 ; ----------------------------------------------------------------------------- -; Routine: Label_D48B +; Routine: SubCD432_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4084,18 +4091,18 @@ Label_D478: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D48B: +SubCD432_Block_4: lda Zp5C ; CPU:$D48B PRG:148B A5 5C - beq Label_D49D ; CPU:$D48D PRG:148D F0 0E + beq SubCD432_Block_5 ; CPU:$D48D PRG:148D F0 0E clc ; CPU:$D48F PRG:148F 18 adc #$01 ; CPU:$D490 PRG:1490 69 01 cmp #$06 ; CPU:$D492 PRG:1492 C9 06 - beq Label_D49F ; CPU:$D494 PRG:1494 F0 09 - bcc Label_D49F ; CPU:$D496 PRG:1496 90 07 + beq SubCD49F ; CPU:$D494 PRG:1494 F0 09 + bcc SubCD49F ; CPU:$D496 PRG:1496 90 07 lda #$01 ; CPU:$D498 PRG:1498 A9 01 jmp $D49F ; CPU:$D49A PRG:149A 4C 9F D4 ; ----------------------------------------------------------------------------- -; Routine: Label_D49D +; Routine: SubCD432_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4103,10 +4110,10 @@ Label_D48B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D49D: +SubCD432_Block_5: lda #$01 ; CPU:$D49D PRG:149D A9 01 ; ----------------------------------------------------------------------------- -; Routine: Label_D49F +; Routine: SubCD49F ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4114,7 +4121,7 @@ Label_D49D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D49F: +SubCD49F: sta Zp5C ; CPU:$D49F PRG:149F 85 5C sec ; CPU:$D4A1 PRG:14A1 38 sbc #$01 ; CPU:$D4A2 PRG:14A2 E9 01 @@ -4125,7 +4132,7 @@ Label_D49F: sta Zp5B ; CPU:$D4AC PRG:14AC 85 5B jsr $D4F9 ; CPU:$D4AE PRG:14AE 20 F9 D4 ; ----------------------------------------------------------------------------- -; Routine: Label_D4B1 +; Routine: SubCD4B1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4133,18 +4140,18 @@ Label_D49F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D4B1: +SubCD4B1: lda ZpA1 ; CPU:$D4B1 PRG:14B1 A5 A1 sta $0203 ; CPU:$D4B3 PRG:14B3 8D 03 02 sta Zp00 ; CPU:$D4B6 PRG:14B6 85 00 jsr $EACD ; CPU:$D4B8 PRG:14B8 20 CD EA lda Zp02 ; CPU:$D4BB PRG:14BB A5 02 cmp #$54 ; CPU:$D4BD PRG:14BD C9 54 - beq Label_D4C6 ; CPU:$D4BF PRG:14BF F0 05 + beq SubCD4B1_Block ; CPU:$D4BF PRG:14BF F0 05 lda #$00 ; CPU:$D4C1 PRG:14C1 A9 00 jmp $D4CC ; CPU:$D4C3 PRG:14C3 4C CC D4 ; ----------------------------------------------------------------------------- -; Routine: Label_D4C6 +; Routine: SubCD4B1_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4152,12 +4159,12 @@ Label_D4B1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D4C6: +SubCD4B1_Block: lda #$24 ; CPU:$D4C6 PRG:14C6 A9 24 sta Zp02 ; CPU:$D4C8 PRG:14C8 85 02 lda #$01 ; CPU:$D4CA PRG:14CA A9 01 ; ----------------------------------------------------------------------------- -; Routine: Label_D4CC +; Routine: SubCD4CC ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4165,7 +4172,7 @@ Label_D4C6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D4CC: +SubCD4CC: jsr $F096 ; CPU:$D4CC PRG:14CC 20 96 F0 ; ----------------------------------------------------------------------------- ; Routine: UpdateSpritePosition49 @@ -4179,7 +4186,7 @@ Label_D4CC: UpdateSpritePosition49: jsr $D2CB ; CPU:$D4CF PRG:14CF 20 CB D2 sta Zp5A ; CPU:$D4D2 PRG:14D2 85 5A - beq Label_D4ED ; CPU:$D4D4 PRG:14D4 F0 17 + beq UpdateSpritePosition49_Block ; CPU:$D4D4 PRG:14D4 F0 17 lda $0200 ; CPU:$D4D6 PRG:14D6 AD 00 02 clc ; CPU:$D4D9 PRG:14D9 18 adc #$08 ; CPU:$D4DA PRG:14DA 69 08 @@ -4192,7 +4199,7 @@ UpdateSpritePosition49: sta Zp5B ; CPU:$D4E9 PRG:14E9 85 5B sta Zp85 ; CPU:$D4EB PRG:14EB 85 85 ; ----------------------------------------------------------------------------- -; Routine: Label_D4ED +; Routine: UpdateSpritePosition49_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4200,10 +4207,10 @@ UpdateSpritePosition49: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D4ED: +UpdateSpritePosition49_Block: rts ; CPU:$D4ED PRG:14ED 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D4EE +; Routine: SubCD4EE ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4211,14 +4218,14 @@ Label_D4ED: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D4EE: +SubCD4EE: lda $0200 ; CPU:$D4EE PRG:14EE AD 00 02 sec ; CPU:$D4F1 PRG:14F1 38 sbc #$01 ; CPU:$D4F2 PRG:14F2 E9 01 sta Zp01 ; CPU:$D4F4 PRG:14F4 85 01 jmp $D501 ; CPU:$D4F6 PRG:14F6 4C 01 D5 ; ----------------------------------------------------------------------------- -; Routine: Label_D4F9 +; Routine: SubCD4F9 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4226,13 +4233,13 @@ Label_D4EE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D4F9: +SubCD4F9: lda $0200 ; CPU:$D4F9 PRG:14F9 AD 00 02 clc ; CPU:$D4FC PRG:14FC 18 adc #$01 ; CPU:$D4FD PRG:14FD 69 01 sta Zp01 ; CPU:$D4FF PRG:14FF 85 01 ; ----------------------------------------------------------------------------- -; Routine: Label_D501 +; Routine: SubCD501 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4240,13 +4247,13 @@ Label_D4F9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D501: +SubCD501: and #$06 ; CPU:$D501 PRG:1501 29 06 - bne Label_D509 ; CPU:$D503 PRG:1503 D0 04 + bne SubCD501_Block ; CPU:$D503 PRG:1503 D0 04 lda #$08 ; CPU:$D505 PRG:1505 A9 08 sta ZpFF ; CPU:$D507 PRG:1507 85 FF ; ----------------------------------------------------------------------------- -; Routine: Label_D509 +; Routine: SubCD501_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4254,10 +4261,10 @@ Label_D501: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D509: +SubCD501_Block: rts ; CPU:$D509 PRG:1509 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D50A +; Routine: SubCD50A ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4265,7 +4272,7 @@ Label_D509: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D50A: +SubCD50A: jsr $EAE1 ; CPU:$D50A PRG:150A 20 E1 EA lda #$2C ; CPU:$D50D PRG:150D A9 2C jsr $EFE8 ; CPU:$D50F PRG:150F 20 E8 EF @@ -4286,15 +4293,15 @@ Label_D50A: sta Zp08 ; CPU:$D52E PRG:152E 85 08 lda Zp53 ; CPU:$D530 PRG:1530 A5 53 cmp #$01 ; CPU:$D532 PRG:1532 C9 01 - bne Label_D544 ; CPU:$D534 PRG:1534 D0 0E + bne SubCD50A_Block ; CPU:$D534 PRG:1534 D0 0E lda #$1E ; CPU:$D536 PRG:1536 A9 1E jsr $C831 ; CPU:$D538 PRG:1538 20 31 C8 jsr $D8AD ; CPU:$D53B PRG:153B 20 AD D8 - beq Label_D544 ; CPU:$D53E PRG:153E F0 04 + beq SubCD50A_Block ; CPU:$D53E PRG:153E F0 04 lda #$02 ; CPU:$D540 PRG:1540 A9 02 sta Zp08 ; CPU:$D542 PRG:1542 85 08 ; ----------------------------------------------------------------------------- -; Routine: Label_D544 +; Routine: SubCD50A_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4302,11 +4309,11 @@ Label_D50A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D544: +SubCD50A_Block: lda Zp08 ; CPU:$D544 PRG:1544 A5 08 rts ; CPU:$D546 PRG:1546 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D547 +; Routine: SubCD547 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4314,14 +4321,14 @@ Label_D544: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D547: +SubCD547: lda #$FF ; CPU:$D547 PRG:1547 A9 FF jsr $D9E6 ; CPU:$D549 PRG:1549 20 E6 D9 cmp #$00 ; CPU:$D54C PRG:154C C9 00 - bne Label_D551 ; CPU:$D54E PRG:154E D0 01 + bne SubCD547_Block ; CPU:$D54E PRG:154E D0 01 rts ; CPU:$D550 PRG:1550 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D551 +; Routine: SubCD547_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4329,13 +4336,13 @@ Label_D547: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D551: +SubCD547_Block: lda Zp94 ; CPU:$D551 PRG:1551 A5 94 cmp #$F0 ; CPU:$D553 PRG:1553 C9 F0 - bcc Label_D55A ; CPU:$D555 PRG:1555 90 03 + bcc SubCD547_Block_1 ; CPU:$D555 PRG:1555 90 03 jmp $D60D ; CPU:$D557 PRG:1557 4C 0D D6 ; ----------------------------------------------------------------------------- -; Routine: Label_D55A +; Routine: SubCD547_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4343,16 +4350,16 @@ Label_D551: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D55A: +SubCD547_Block_1: jsr $D990 ; CPU:$D55A PRG:155A 20 90 D9 - beq Label_D570 ; CPU:$D55D PRG:155D F0 11 + beq SubCD56C_Block ; CPU:$D55D PRG:155D F0 11 lda Zp56 ; CPU:$D55F PRG:155F A5 56 cmp #$01 ; CPU:$D561 PRG:1561 C9 01 - bne Label_D56A ; CPU:$D563 PRG:1563 D0 05 + bne SubCD547_Block_2 ; CPU:$D563 PRG:1563 D0 05 lda #$02 ; CPU:$D565 PRG:1565 A9 02 jmp $D56C ; CPU:$D567 PRG:1567 4C 6C D5 ; ----------------------------------------------------------------------------- -; Routine: Label_D56A +; Routine: SubCD547_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4360,10 +4367,10 @@ Label_D55A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D56A: +SubCD547_Block_2: lda #$01 ; CPU:$D56A PRG:156A A9 01 ; ----------------------------------------------------------------------------- -; Routine: Label_D56C +; Routine: SubCD56C ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4371,11 +4378,11 @@ Label_D56A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D56C: +SubCD56C: sta Zp56 ; CPU:$D56C PRG:156C 85 56 sta Zp57 ; CPU:$D56E PRG:156E 85 57 ; ----------------------------------------------------------------------------- -; Routine: Label_D570 +; Routine: SubCD56C_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4383,7 +4390,7 @@ Label_D56C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D570: +SubCD56C_Block: lda $0200 ; CPU:$D570 PRG:1570 AD 00 02 sta Zp01 ; CPU:$D573 PRG:1573 85 01 lda #$00 ; CPU:$D575 PRG:1575 A9 00 @@ -4392,12 +4399,12 @@ Label_D570: sta $0200 ; CPU:$D57C PRG:157C 8D 00 02 lda Zp56 ; CPU:$D57F PRG:157F A5 56 cmp #$01 ; CPU:$D581 PRG:1581 C9 01 - beq Label_D58C ; CPU:$D583 PRG:1583 F0 07 + beq SubCD56C_Block_1 ; CPU:$D583 PRG:1583 F0 07 cmp #$02 ; CPU:$D585 PRG:1585 C9 02 - beq Label_D5A1 ; CPU:$D587 PRG:1587 F0 18 + beq SubCD56C_Block_3 ; CPU:$D587 PRG:1587 F0 18 jmp $D5B3 ; CPU:$D589 PRG:1589 4C B3 D5 ; ----------------------------------------------------------------------------- -; Routine: Label_D58C +; Routine: SubCD56C_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4405,15 +4412,15 @@ Label_D570: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D58C: +SubCD56C_Block_1: lda Zp9E ; CPU:$D58C PRG:158C A5 9E - beq Label_D59A ; CPU:$D58E PRG:158E F0 0A + beq SubCD56C_Block_2 ; CPU:$D58E PRG:158E F0 0A inc $0203 ; CPU:$D590 PRG:1590 EE 03 02 lda #$00 ; CPU:$D593 PRG:1593 A9 00 sta Zp9E ; CPU:$D595 PRG:1595 85 9E jmp $D5B3 ; CPU:$D597 PRG:1597 4C B3 D5 ; ----------------------------------------------------------------------------- -; Routine: Label_D59A +; Routine: SubCD56C_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4421,12 +4428,12 @@ Label_D58C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D59A: +SubCD56C_Block_2: lda #$01 ; CPU:$D59A PRG:159A A9 01 sta Zp9E ; CPU:$D59C PRG:159C 85 9E jmp $D5B3 ; CPU:$D59E PRG:159E 4C B3 D5 ; ----------------------------------------------------------------------------- -; Routine: Label_D5A1 +; Routine: SubCD56C_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4434,15 +4441,15 @@ Label_D59A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D5A1: +SubCD56C_Block_3: lda Zp9E ; CPU:$D5A1 PRG:15A1 A5 9E - beq Label_D5AF ; CPU:$D5A3 PRG:15A3 F0 0A + beq SubCD56C_Block_4 ; CPU:$D5A3 PRG:15A3 F0 0A dec $0203 ; CPU:$D5A5 PRG:15A5 CE 03 02 lda #$00 ; CPU:$D5A8 PRG:15A8 A9 00 sta Zp9E ; CPU:$D5AA PRG:15AA 85 9E jmp $D5B3 ; CPU:$D5AC PRG:15AC 4C B3 D5 ; ----------------------------------------------------------------------------- -; Routine: Label_D5AF +; Routine: SubCD56C_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4450,11 +4457,11 @@ Label_D5A1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D5AF: +SubCD56C_Block_4: lda #$01 ; CPU:$D5AF PRG:15AF A9 01 sta Zp9E ; CPU:$D5B1 PRG:15B1 85 9E ; ----------------------------------------------------------------------------- -; Routine: Label_D5B3 +; Routine: SubCD5B3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4462,21 +4469,21 @@ Label_D5AF: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D5B3: +SubCD5B3: lda $0203 ; CPU:$D5B3 PRG:15B3 AD 03 02 sta Zp00 ; CPU:$D5B6 PRG:15B6 85 00 jsr $D800 ; CPU:$D5B8 PRG:15B8 20 00 D8 lda Zp94 ; CPU:$D5BB PRG:15BB A5 94 - beq Label_D5E2 ; CPU:$D5BD PRG:15BD F0 23 + beq SubCD5B3_Block_1 ; CPU:$D5BD PRG:15BD F0 23 lda Zp01 ; CPU:$D5BF PRG:15BF A5 01 sec ; CPU:$D5C1 PRG:15C1 38 sbc #$10 ; CPU:$D5C2 PRG:15C2 E9 10 cmp Zp95 ; CPU:$D5C4 PRG:15C4 C5 95 - bcc Label_D5CC ; CPU:$D5C6 PRG:15C6 90 04 + bcc SubCD5B3_Block ; CPU:$D5C6 PRG:15C6 90 04 lda #$FF ; CPU:$D5C8 PRG:15C8 A9 FF sta Zp95 ; CPU:$D5CA PRG:15CA 85 95 ; ----------------------------------------------------------------------------- -; Routine: Label_D5CC +; Routine: SubCD5B3_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4484,10 +4491,10 @@ Label_D5B3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D5CC: +SubCD5B3_Block: jsr $D2CB ; CPU:$D5CC PRG:15CC 20 CB D2 sta Zp5A ; CPU:$D5CF PRG:15CF 85 5A - beq Label_D5F1 ; CPU:$D5D1 PRG:15D1 F0 1E + beq SubCD5F1 ; CPU:$D5D1 PRG:15D1 F0 1E lda Zp4B ; CPU:$D5D3 PRG:15D3 A5 4B sec ; CPU:$D5D5 PRG:15D5 38 sbc #$11 ; CPU:$D5D6 PRG:15D6 E9 11 @@ -4496,7 +4503,7 @@ Label_D5CC: sta Zp5A ; CPU:$D5DD PRG:15DD 85 5A jmp $D5F6 ; CPU:$D5DF PRG:15DF 4C F6 D5 ; ----------------------------------------------------------------------------- -; Routine: Label_D5E2 +; Routine: SubCD5B3_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4504,7 +4511,7 @@ Label_D5CC: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D5E2: +SubCD5B3_Block_1: lda #$04 ; CPU:$D5E2 PRG:15E2 A9 04 sta ZpFF ; CPU:$D5E4 PRG:15E4 85 FF lda #$01 ; CPU:$D5E6 PRG:15E6 A9 01 @@ -4513,7 +4520,7 @@ Label_D5E2: sta Zp95 ; CPU:$D5EC PRG:15EC 85 95 jmp $D5F1 ; CPU:$D5EE PRG:15EE 4C F1 D5 ; ----------------------------------------------------------------------------- -; Routine: Label_D5F1 +; Routine: SubCD5F1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4521,11 +4528,11 @@ Label_D5E2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D5F1: +SubCD5F1: lda #$28 ; CPU:$D5F1 PRG:15F1 A9 28 jmp $F070 ; CPU:$D5F3 PRG:15F3 4C 70 F0 ; ----------------------------------------------------------------------------- -; Routine: Label_D5F6 +; Routine: SubCD5F6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4533,7 +4540,7 @@ Label_D5F1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D5F6: +SubCD5F6: jsr $EAE1 ; CPU:$D5F6 PRG:15F6 20 E1 EA lda #$2C ; CPU:$D5F9 PRG:15F9 A9 2C sta Zp02 ; CPU:$D5FB PRG:15FB 85 02 @@ -4546,7 +4553,7 @@ Label_D5F6: sta Zp94 ; CPU:$D60A PRG:160A 85 94 rts ; CPU:$D60C PRG:160C 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D60D +; Routine: SubCD60D ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4554,14 +4561,14 @@ Label_D5F6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D60D: +SubCD60D: inc Zp94 ; CPU:$D60D PRG:160D E6 94 lda Zp94 ; CPU:$D60F PRG:160F A5 94 cmp #$F4 ; CPU:$D611 PRG:1611 C9 F4 - bne Label_D64F ; CPU:$D613 PRG:1613 D0 3A + bne SubCD60D_Block_1 ; CPU:$D613 PRG:1613 D0 3A lda Zp95 ; CPU:$D615 PRG:1615 A5 95 cmp #$FF ; CPU:$D617 PRG:1617 C9 FF - beq Label_D642 ; CPU:$D619 PRG:1619 F0 27 + beq SubCD60D_Block ; CPU:$D619 PRG:1619 F0 27 lda #$04 ; CPU:$D61B PRG:161B A9 04 jsr $F070 ; CPU:$D61D PRG:161D 20 70 F0 lda #$00 ; CPU:$D620 PRG:1620 A9 00 @@ -4571,7 +4578,7 @@ Label_D60D: lda #$01 ; CPU:$D629 PRG:1629 A9 01 sta Zp96 ; CPU:$D62B PRG:162B 85 96 lda ZpA0 ; CPU:$D62D PRG:162D A5 A0 - beq Label_D64F ; CPU:$D62F PRG:162F F0 1E + beq SubCD60D_Block_1 ; CPU:$D62F PRG:162F F0 1E lda #$01 ; CPU:$D631 PRG:1631 A9 01 sta Zp9F ; CPU:$D633 PRG:1633 85 9F lda #$4B ; CPU:$D635 PRG:1635 A9 4B @@ -4582,7 +4589,7 @@ Label_D60D: sta ZpFC ; CPU:$D63F PRG:163F 85 FC rts ; CPU:$D641 PRG:1641 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D642 +; Routine: SubCD60D_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4590,7 +4597,7 @@ Label_D60D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D642: +SubCD60D_Block: lda #$00 ; CPU:$D642 PRG:1642 A9 00 sta $042C ; CPU:$D644 PRG:1644 8D 2C 04 sta Zp94 ; CPU:$D647 PRG:1647 85 94 @@ -4598,7 +4605,7 @@ Label_D642: lda #$FF ; CPU:$D64B PRG:164B A9 FF sta Zp96 ; CPU:$D64D PRG:164D 85 96 ; ----------------------------------------------------------------------------- -; Routine: Label_D64F +; Routine: SubCD60D_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4606,16 +4613,17 @@ Label_D642: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D64F: +SubCD60D_Block_1: rts ; CPU:$D64F PRG:164F 60 ; ---- data $D650-$D696 (71 bytes) ---- - .byte $A9, $FE, $8D, $72, $04, $8D, $73, $04, $A2, $00, $A0, $60, $B9, $00, $02, $C9 ; CPU:$D650 PRG:1650 A9 FE 8D 72 04 8D 73 04 A2 00 A0 60 B9 00 02 C9 +; Unreached code block: clears $0472/$0473, copies $0200-$02FF to $0460-$0461 +UnreachedCode_D650: .byte $A9, $FE, $8D, $72, $04, $8D, $73, $04, $A2, $00, $A0, $60, $B9, $00, $02, $C9 ; CPU:$D650 PRG:1650 A9 FE 8D 72 04 8D 73 04 A2 00 A0 60 B9 00 02 C9 .byte $FF, $F0, $0F, $9D, $61, $04, $B9, $03, $02, $38, $E9, $08, $9D, $60, $04, $4C ; CPU:$D660 PRG:1660 FF F0 0F 9D 61 04 B9 03 02 38 E9 08 9D 60 04 4C .byte $7A, $D6, $A9, $00, $9D, $61, $04, $9D, $60, $04, $98, $18, $69, $08, $A8, $E8 ; CPU:$D670 PRG:1670 7A D6 A9 00 9D 61 04 9D 60 04 98 18 69 08 A8 E8 .byte $E8, $E8, $C0, $90, $D0, $D6, $A9, $20, $20, $31, $C8, $20, $AD, $D8, $F0, $06 ; CPU:$D680 PRG:1680 E8 E8 C0 90 D0 D6 A9 20 20 31 C8 20 AD D8 F0 06 .byte $A9, $08, $85, $96, $A9, $01, $60 ; CPU:$D690 PRG:1690 A9 08 85 96 A9 01 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D697 +; Routine: SubCD697 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4623,20 +4631,20 @@ Label_D64F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D697: +SubCD697: lda #$FF ; CPU:$D697 PRG:1697 A9 FF jsr $D9E6 ; CPU:$D699 PRG:1699 20 E6 D9 - beq Label_D6C5 ; CPU:$D69C PRG:169C F0 27 + beq SubCD6B7_Block ; CPU:$D69C PRG:169C F0 27 jsr $EAE1 ; CPU:$D69E PRG:169E 20 E1 EA inc Zp01 ; CPU:$D6A1 PRG:16A1 E6 01 inc Zp01 ; CPU:$D6A3 PRG:16A3 E6 01 lda Zp57 ; CPU:$D6A5 PRG:16A5 A5 57 cmp #$02 ; CPU:$D6A7 PRG:16A7 C9 02 - beq Label_D6B1 ; CPU:$D6A9 PRG:16A9 F0 06 + beq SubCD697_Block ; CPU:$D6A9 PRG:16A9 F0 06 lda $0201 ; CPU:$D6AB PRG:16AB AD 01 02 jmp $D6B7 ; CPU:$D6AE PRG:16AE 4C B7 D6 ; ----------------------------------------------------------------------------- -; Routine: Label_D6B1 +; Routine: SubCD697_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4644,12 +4652,12 @@ Label_D697: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D6B1: +SubCD697_Block: lda $0201 ; CPU:$D6B1 PRG:16B1 AD 01 02 sec ; CPU:$D6B4 PRG:16B4 38 sbc #$02 ; CPU:$D6B5 PRG:16B5 E9 02 ; ----------------------------------------------------------------------------- -; Routine: Label_D6B7 +; Routine: SubCD6B7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4657,15 +4665,15 @@ Label_D6B1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D6B7: +SubCD6B7: sta Zp02 ; CPU:$D6B7 PRG:16B7 85 02 jsr $F075 ; CPU:$D6B9 PRG:16B9 20 75 F0 jsr $D2CB ; CPU:$D6BC PRG:16BC 20 CB D2 - beq Label_D6C5 ; CPU:$D6BF PRG:16BF F0 04 + beq SubCD6B7_Block ; CPU:$D6BF PRG:16BF F0 04 lda #$FF ; CPU:$D6C1 PRG:16C1 A9 FF sta Zp96 ; CPU:$D6C3 PRG:16C3 85 96 ; ----------------------------------------------------------------------------- -; Routine: Label_D6C5 +; Routine: SubCD6B7_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4673,10 +4681,10 @@ Label_D6B7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D6C5: +SubCD6B7_Block: rts ; CPU:$D6C5 PRG:16C5 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D6C6 +; Routine: SubCD6C6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4684,12 +4692,12 @@ Label_D6C5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D6C6: +SubCD6C6: lda Zp3F ; CPU:$D6C6 PRG:16C6 A5 3F - bne Label_D6CD ; CPU:$D6C8 PRG:16C8 D0 03 + bne SubCD6C6_Block ; CPU:$D6C8 PRG:16C8 D0 03 jmp $D7BF ; CPU:$D6CA PRG:16CA 4C BF D7 ; ----------------------------------------------------------------------------- -; Routine: Label_D6CD +; Routine: SubCD6C6_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4697,15 +4705,15 @@ Label_D6C6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D6CD: +SubCD6C6_Block: lda #$DB ; CPU:$D6CD PRG:16CD A9 DB sta Zp0A ; CPU:$D6CF PRG:16CF 85 0A lda #$36 ; CPU:$D6D1 PRG:16D1 A9 36 jsr $D9E8 ; CPU:$D6D3 PRG:16D3 20 E8 D9 - bne Label_D6D9 ; CPU:$D6D6 PRG:16D6 D0 01 + bne SubCD6C6_Block_1 ; CPU:$D6D6 PRG:16D6 D0 01 rts ; CPU:$D6D8 PRG:16D8 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D6D9 +; Routine: SubCD6C6_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4713,16 +4721,16 @@ Label_D6CD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D6D9: +SubCD6C6_Block_1: jsr $D990 ; CPU:$D6D9 PRG:16D9 20 90 D9 - bne Label_D6E8 ; CPU:$D6DC PRG:16DC D0 0A + bne SubCD6C6_Block_2 ; CPU:$D6DC PRG:16DC D0 0A lda Zp56 ; CPU:$D6DE PRG:16DE A5 56 cmp #$01 ; CPU:$D6E0 PRG:16E0 C9 01 - beq Label_D70A ; CPU:$D6E2 PRG:16E2 F0 26 + beq SubCD6C6_Block_6 ; CPU:$D6E2 PRG:16E2 F0 26 cmp #$02 ; CPU:$D6E4 PRG:16E4 C9 02 - beq Label_D710 ; CPU:$D6E6 PRG:16E6 F0 28 + beq SubCD6C6_Block_7 ; CPU:$D6E6 PRG:16E6 F0 28 ; ----------------------------------------------------------------------------- -; Routine: Label_D6E8 +; Routine: SubCD6C6_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4730,14 +4738,14 @@ Label_D6D9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D6E8: +SubCD6C6_Block_2: lda ZpA2 ; CPU:$D6E8 PRG:16E8 A5 A2 asl a ; CPU:$D6EA PRG:16EA 0A sta ZpA2 ; CPU:$D6EB PRG:16EB 85 A2 - beq Label_D6F2 ; CPU:$D6ED PRG:16ED F0 03 + beq SubCD6C6_Block_3 ; CPU:$D6ED PRG:16ED F0 03 jmp $D753 ; CPU:$D6EF PRG:16EF 4C 53 D7 ; ----------------------------------------------------------------------------- -; Routine: Label_D6F2 +; Routine: SubCD6C6_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4745,15 +4753,15 @@ Label_D6E8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D6F2: +SubCD6C6_Block_3: lda #$20 ; CPU:$D6F2 PRG:16F2 A9 20 sta ZpA2 ; CPU:$D6F4 PRG:16F4 85 A2 lda Zp9F ; CPU:$D6F6 PRG:16F6 A5 9F - beq Label_D6FE ; CPU:$D6F8 PRG:16F8 F0 04 + beq SubCD6C6_Block_4 ; CPU:$D6F8 PRG:16F8 F0 04 cmp #$04 ; CPU:$D6FA PRG:16FA C9 04 - bcc Label_D703 ; CPU:$D6FC PRG:16FC 90 05 + bcc SubCD6C6_Block_5 ; CPU:$D6FC PRG:16FC 90 05 ; ----------------------------------------------------------------------------- -; Routine: Label_D6FE +; Routine: SubCD6C6_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4761,11 +4769,11 @@ Label_D6F2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D6FE: +SubCD6C6_Block_4: lda #$02 ; CPU:$D6FE PRG:16FE A9 02 jmp $D705 ; CPU:$D700 PRG:1700 4C 05 D7 ; ----------------------------------------------------------------------------- -; Routine: Label_D703 +; Routine: SubCD6C6_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4773,10 +4781,10 @@ Label_D6FE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D703: +SubCD6C6_Block_5: lda #$05 ; CPU:$D703 PRG:1703 A9 05 ; ----------------------------------------------------------------------------- -; Routine: Label_D705 +; Routine: SubCD705 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4784,11 +4792,11 @@ Label_D703: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D705: +SubCD705: sta Zp9F ; CPU:$D705 PRG:1705 85 9F jmp $D753 ; CPU:$D707 PRG:1707 4C 53 D7 ; ----------------------------------------------------------------------------- -; Routine: Label_D70A +; Routine: SubCD6C6_Block_6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4796,11 +4804,11 @@ Label_D705: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D70A: +SubCD6C6_Block_6: inc $0203 ; CPU:$D70A PRG:170A EE 03 02 jmp $D713 ; CPU:$D70D PRG:170D 4C 13 D7 ; ----------------------------------------------------------------------------- -; Routine: Label_D710 +; Routine: SubCD6C6_Block_7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4808,10 +4816,10 @@ Label_D70A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D710: +SubCD6C6_Block_7: dec $0203 ; CPU:$D710 PRG:1710 CE 03 02 ; ----------------------------------------------------------------------------- -; Routine: Label_D713 +; Routine: SubCD713 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4819,22 +4827,22 @@ Label_D710: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D713: +SubCD713: jsr $D2CB ; CPU:$D713 PRG:1713 20 CB D2 sta Zp5A ; CPU:$D716 PRG:1716 85 5A lda $0200 ; CPU:$D718 PRG:1718 AD 00 02 jsr $E016 ; CPU:$D71B PRG:171B 20 16 E0 sta Zp59 ; CPU:$D71E PRG:171E 85 59 jsr $D8EB ; CPU:$D720 PRG:1720 20 EB D8 - beq Label_D73E ; CPU:$D723 PRG:1723 F0 19 + beq SubCD713_Block_1 ; CPU:$D723 PRG:1723 F0 19 ldx Zp53 ; CPU:$D725 PRG:1725 A6 53 cpx #$01 ; CPU:$D727 PRG:1727 E0 01 - bne Label_D732 ; CPU:$D729 PRG:1729 D0 07 + bne SubCD713_Block ; CPU:$D729 PRG:1729 D0 07 clc ; CPU:$D72B PRG:172B 18 adc $0200 ; CPU:$D72C PRG:172C 6D 00 02 sta $0200 ; CPU:$D72F PRG:172F 8D 00 02 ; ----------------------------------------------------------------------------- -; Routine: Label_D732 +; Routine: SubCD713_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4842,14 +4850,14 @@ Label_D713: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D732: +SubCD713_Block: jsr $D36A ; CPU:$D732 PRG:1732 20 6A D3 - beq Label_D73E ; CPU:$D735 PRG:1735 F0 07 + beq SubCD713_Block_1 ; CPU:$D735 PRG:1735 F0 07 lda #$08 ; CPU:$D737 PRG:1737 A9 08 sta Zp96 ; CPU:$D739 PRG:1739 85 96 jmp $D7BF ; CPU:$D73B PRG:173B 4C BF D7 ; ----------------------------------------------------------------------------- -; Routine: Label_D73E +; Routine: SubCD713_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4857,17 +4865,17 @@ Label_D732: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D73E: +SubCD713_Block_1: lda #$08 ; CPU:$D73E PRG:173E A9 08 sta ZpFF ; CPU:$D740 PRG:1740 85 FF lda Zp9F ; CPU:$D742 PRG:1742 A5 9F - beq Label_D74F ; CPU:$D744 PRG:1744 F0 09 + beq SubCD713_Block_2 ; CPU:$D744 PRG:1744 F0 09 cmp #$06 ; CPU:$D746 PRG:1746 C9 06 - bcs Label_D74F ; CPU:$D748 PRG:1748 B0 05 + bcs SubCD713_Block_2 ; CPU:$D748 PRG:1748 B0 05 inc Zp9F ; CPU:$D74A PRG:174A E6 9F jmp $D753 ; CPU:$D74C PRG:174C 4C 53 D7 ; ----------------------------------------------------------------------------- -; Routine: Label_D74F +; Routine: SubCD713_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4875,11 +4883,11 @@ Label_D73E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D74F: +SubCD713_Block_2: lda #$01 ; CPU:$D74F PRG:174F A9 01 sta Zp9F ; CPU:$D751 PRG:1751 85 9F ; ----------------------------------------------------------------------------- -; Routine: Label_D753 +; Routine: SubCD753 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4887,7 +4895,7 @@ Label_D74F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D753: +SubCD753: ldx Zp9F ; CPU:$D753 PRG:1753 A6 9F dex ; CPU:$D755 PRG:1755 CA lda $C1A2,x ; CPU:$D756 PRG:1756 BD A2 C1 @@ -4895,11 +4903,11 @@ Label_D753: lda Zp9F ; CPU:$D75C PRG:175C A5 9F lsr a ; CPU:$D75E PRG:175E 4A lsr a ; CPU:$D75F PRG:175F 4A - beq Label_D767 ; CPU:$D760 PRG:1760 F0 05 + beq SubCD753_Block ; CPU:$D760 PRG:1760 F0 05 lda #$00 ; CPU:$D762 PRG:1762 A9 00 jmp $D769 ; CPU:$D764 PRG:1764 4C 69 D7 ; ----------------------------------------------------------------------------- -; Routine: Label_D767 +; Routine: SubCD753_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4907,10 +4915,10 @@ Label_D753: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D767: +SubCD753_Block: lda #$01 ; CPU:$D767 PRG:1767 A9 01 ; ----------------------------------------------------------------------------- -; Routine: Label_D769 +; Routine: SubCD769 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4918,8 +4926,8 @@ Label_D767: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D769: - beq Label_D786 ; CPU:$D769 PRG:1769 F0 1B +SubCD769: + beq SubCD769_Block ; CPU:$D769 PRG:1769 F0 1B lda #$04 ; CPU:$D76B PRG:176B A9 04 clc ; CPU:$D76D PRG:176D 18 adc $0203 ; CPU:$D76E PRG:176E 6D 03 02 @@ -4934,7 +4942,7 @@ Label_D769: sta Zp02 ; CPU:$D781 PRG:1781 85 02 jmp $D7AD ; CPU:$D783 PRG:1783 4C AD D7 ; ----------------------------------------------------------------------------- -; Routine: Label_D786 +; Routine: SubCD769_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4942,16 +4950,16 @@ Label_D769: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D786: +SubCD769_Block: lda Zp57 ; CPU:$D786 PRG:1786 A5 57 cmp #$01 ; CPU:$D788 PRG:1788 C9 01 - bne Label_D795 ; CPU:$D78A PRG:178A D0 09 + bne SubCD769_Block_1 ; CPU:$D78A PRG:178A D0 09 lda #$0E ; CPU:$D78C PRG:178C A9 0E clc ; CPU:$D78E PRG:178E 18 adc $0203 ; CPU:$D78F PRG:178F 6D 03 02 jmp $D79B ; CPU:$D792 PRG:1792 4C 9B D7 ; ----------------------------------------------------------------------------- -; Routine: Label_D795 +; Routine: SubCD769_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4959,12 +4967,12 @@ Label_D786: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D795: +SubCD769_Block_1: lda $0203 ; CPU:$D795 PRG:1795 AD 03 02 sec ; CPU:$D798 PRG:1798 38 sbc #$0E ; CPU:$D799 PRG:1799 E9 0E ; ----------------------------------------------------------------------------- -; Routine: Label_D79B +; Routine: SubCD79B ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4972,7 +4980,7 @@ Label_D795: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D79B: +SubCD79B: sta Zp00 ; CPU:$D79B PRG:179B 85 00 lda #$06 ; CPU:$D79D PRG:179D A9 06 clc ; CPU:$D79F PRG:179F 18 @@ -4983,7 +4991,7 @@ Label_D79B: lda #$FA ; CPU:$D7A9 PRG:17A9 A9 FA sta Zp02 ; CPU:$D7AB PRG:17AB 85 02 ; ----------------------------------------------------------------------------- -; Routine: Label_D7AD +; Routine: SubCD7AD ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4991,14 +4999,14 @@ Label_D79B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D7AD: +SubCD7AD: lda ZpA0 ; CPU:$D7AD PRG:17AD A5 A0 cmp #$01 ; CPU:$D7AF PRG:17AF C9 01 - beq Label_D7B8 ; CPU:$D7B1 PRG:17B1 F0 05 + beq SubCD7AD_Block ; CPU:$D7B1 PRG:17B1 F0 05 lda #$D8 ; CPU:$D7B3 PRG:17B3 A9 D8 jmp $D7BA ; CPU:$D7B5 PRG:17B5 4C BA D7 ; ----------------------------------------------------------------------------- -; Routine: Label_D7B8 +; Routine: SubCD7AD_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5006,10 +5014,10 @@ Label_D7AD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D7B8: +SubCD7AD_Block: lda #$D0 ; CPU:$D7B8 PRG:17B8 A9 D0 ; ----------------------------------------------------------------------------- -; Routine: Label_D7BA +; Routine: SubCD7BA ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5017,11 +5025,11 @@ Label_D7B8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D7BA: +SubCD7BA: sta Zp04 ; CPU:$D7BA PRG:17BA 85 04 jmp $F078 ; CPU:$D7BC PRG:17BC 4C 78 F0 ; ----------------------------------------------------------------------------- -; Routine: Label_D7BF +; Routine: SubCD7BF ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5029,18 +5037,18 @@ Label_D7BA: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D7BF: +SubCD7BF: lda #$12 ; CPU:$D7BF PRG:17BF A9 12 sta Zp03 ; CPU:$D7C1 PRG:17C1 85 03 lda ZpA0 ; CPU:$D7C3 PRG:17C3 A5 A0 cmp #$01 ; CPU:$D7C5 PRG:17C5 C9 01 - beq Label_D7D3 ; CPU:$D7C7 PRG:17C7 F0 0A + beq SubCD7BF_Block ; CPU:$D7C7 PRG:17C7 F0 0A lda #$00 ; CPU:$D7C9 PRG:17C9 A9 00 sta $0452 ; CPU:$D7CB PRG:17CB 8D 52 04 lda #$D8 ; CPU:$D7CE PRG:17CE A9 D8 jmp $D7DA ; CPU:$D7D0 PRG:17D0 4C DA D7 ; ----------------------------------------------------------------------------- -; Routine: Label_D7D3 +; Routine: SubCD7BF_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5048,12 +5056,12 @@ Label_D7BF: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D7D3: +SubCD7BF_Block: lda #$00 ; CPU:$D7D3 PRG:17D3 A9 00 sta $0451 ; CPU:$D7D5 PRG:17D5 8D 51 04 lda #$D0 ; CPU:$D7D8 PRG:17D8 A9 D0 ; ----------------------------------------------------------------------------- -; Routine: Label_D7DA +; Routine: SubCD7DA ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5061,7 +5069,7 @@ Label_D7D3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D7DA: +SubCD7DA: sta Zp04 ; CPU:$D7DA PRG:17DA 85 04 jsr $F094 ; CPU:$D7DC PRG:17DC 20 94 F0 jsr $D7F2 ; CPU:$D7DF PRG:17DF 20 F2 D7 @@ -5074,7 +5082,7 @@ Label_D7DA: sta ZpFC ; CPU:$D7EF PRG:17EF 85 FC rts ; CPU:$D7F1 PRG:17F1 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D7F2 +; Routine: SubCD7F2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5082,7 +5090,7 @@ Label_D7DA: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D7F2: +SubCD7F2: lda #$19 ; CPU:$D7F2 PRG:17F2 A9 19 sta Zp00 ; CPU:$D7F4 PRG:17F4 85 00 lda #$3F ; CPU:$D7F6 PRG:17F6 A9 3F @@ -5091,7 +5099,7 @@ Label_D7F2: jsr $C815 ; CPU:$D7FC PRG:17FC 20 15 C8 rts ; CPU:$D7FF PRG:17FF 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D800 +; Routine: SubCD800 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5099,12 +5107,12 @@ Label_D7F2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D800: +SubCD800: lda ZpA0 ; CPU:$D800 PRG:1800 A5 A0 - beq Label_D805 ; CPU:$D802 PRG:1802 F0 01 + beq SubCD800_Block ; CPU:$D802 PRG:1802 F0 01 rts ; CPU:$D804 PRG:1804 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D805 +; Routine: SubCD800_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5112,13 +5120,13 @@ Label_D800: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D805: +SubCD800_Block: ldy Zp53 ; CPU:$D805 PRG:1805 A4 53 cpy #$03 ; CPU:$D807 PRG:1807 C0 03 - bne Label_D80E ; CPU:$D809 PRG:1809 D0 03 + bne SubCD800_Block_1 ; CPU:$D809 PRG:1809 D0 03 jmp $D8A8 ; CPU:$D80B PRG:180B 4C A8 D8 ; ----------------------------------------------------------------------------- -; Routine: Label_D80E +; Routine: SubCD800_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5126,16 +5134,16 @@ Label_D805: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D80E: +SubCD800_Block_1: lda $0203 ; CPU:$D80E PRG:180E AD 03 02 cpy #$01 ; CPU:$D811 PRG:1811 C0 01 - beq Label_D81E ; CPU:$D813 PRG:1813 F0 09 + beq SubCD800_Block_2 ; CPU:$D813 PRG:1813 F0 09 cmp #$88 ; CPU:$D815 PRG:1815 C9 88 - beq Label_D827 ; CPU:$D817 PRG:1817 F0 0E - bcc Label_D827 ; CPU:$D819 PRG:1819 90 0C + beq SubCD800_Block_3 ; CPU:$D817 PRG:1817 F0 0E + bcc SubCD800_Block_3 ; CPU:$D819 PRG:1819 90 0C jmp $D8A8 ; CPU:$D81B PRG:181B 4C A8 D8 ; ----------------------------------------------------------------------------- -; Routine: Label_D81E +; Routine: SubCD800_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5143,13 +5151,13 @@ Label_D80E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D81E: +SubCD800_Block_2: cmp #$28 ; CPU:$D81E PRG:181E C9 28 - beq Label_D827 ; CPU:$D820 PRG:1820 F0 05 - bcc Label_D827 ; CPU:$D822 PRG:1822 90 03 + beq SubCD800_Block_3 ; CPU:$D820 PRG:1820 F0 05 + bcc SubCD800_Block_3 ; CPU:$D822 PRG:1822 90 03 jmp $D8A8 ; CPU:$D824 PRG:1824 4C A8 D8 ; ----------------------------------------------------------------------------- -; Routine: Label_D827 +; Routine: SubCD800_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5157,7 +5165,7 @@ Label_D81E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D827: +SubCD800_Block_3: lda $0200 ; CPU:$D827 PRG:1827 AD 00 02 clc ; CPU:$D82A PRG:182A 18 adc #$08 ; CPU:$D82B PRG:182B 69 08 @@ -5170,13 +5178,13 @@ Label_D827: tax ; CPU:$D838 PRG:1838 AA lda Zp59 ; CPU:$D839 PRG:1839 A5 59 cmp $C1A8,x ; CPU:$D83B PRG:183B DD A8 C1 - beq Label_D849 ; CPU:$D83E PRG:183E F0 09 + beq SubCD800_Block_4 ; CPU:$D83E PRG:183E F0 09 inx ; CPU:$D840 PRG:1840 E8 cmp $C1A8,x ; CPU:$D841 PRG:1841 DD A8 C1 - beq Label_D849 ; CPU:$D844 PRG:1844 F0 03 + beq SubCD800_Block_4 ; CPU:$D844 PRG:1844 F0 03 jmp $D8A8 ; CPU:$D846 PRG:1846 4C A8 D8 ; ----------------------------------------------------------------------------- -; Routine: Label_D849 +; Routine: SubCD800_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5184,15 +5192,15 @@ Label_D827: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D849: +SubCD800_Block_4: txa ; CPU:$D849 PRG:1849 8A and #$01 ; CPU:$D84A PRG:184A 29 01 - beq Label_D867 ; CPU:$D84C PRG:184C F0 19 + beq SubCD800_Block_6 ; CPU:$D84C PRG:184C F0 19 lda $0452 ; CPU:$D84E PRG:184E AD 52 04 - bne Label_D856 ; CPU:$D851 PRG:1851 D0 03 + bne SubCD800_Block_5 ; CPU:$D851 PRG:1851 D0 03 jmp $D8A8 ; CPU:$D853 PRG:1853 4C A8 D8 ; ----------------------------------------------------------------------------- -; Routine: Label_D856 +; Routine: SubCD800_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5200,7 +5208,7 @@ Label_D849: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D856: +SubCD800_Block_5: lda #$02 ; CPU:$D856 PRG:1856 A9 02 sta ZpA0 ; CPU:$D858 PRG:1858 85 A0 lda $02D8 ; CPU:$D85A PRG:185A AD D8 02 @@ -5209,7 +5217,7 @@ Label_D856: sta Zp00 ; CPU:$D862 PRG:1862 85 00 jmp $D87D ; CPU:$D864 PRG:1864 4C 7D D8 ; ----------------------------------------------------------------------------- -; Routine: Label_D867 +; Routine: SubCD800_Block_6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5217,12 +5225,12 @@ Label_D856: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D867: +SubCD800_Block_6: lda $0451 ; CPU:$D867 PRG:1867 AD 51 04 - bne Label_D86F ; CPU:$D86A PRG:186A D0 03 + bne SubCD800_Block_7 ; CPU:$D86A PRG:186A D0 03 jmp $D8A8 ; CPU:$D86C PRG:186C 4C A8 D8 ; ----------------------------------------------------------------------------- -; Routine: Label_D86F +; Routine: SubCD800_Block_7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5230,7 +5238,7 @@ Label_D867: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D86F: +SubCD800_Block_7: lda #$01 ; CPU:$D86F PRG:186F A9 01 sta ZpA0 ; CPU:$D871 PRG:1871 85 A0 lda $02D0 ; CPU:$D873 PRG:1873 AD D0 02 @@ -5238,7 +5246,7 @@ Label_D86F: lda $02D3 ; CPU:$D878 PRG:1878 AD D3 02 sta Zp00 ; CPU:$D87B PRG:187B 85 00 ; ----------------------------------------------------------------------------- -; Routine: Label_D87D +; Routine: SubCD87D ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5246,19 +5254,19 @@ Label_D86F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D87D: +SubCD87D: lda #$2E ; CPU:$D87D PRG:187D A9 2E jsr $EFE8 ; CPU:$D87F PRG:187F 20 E8 EF jsr $EAE1 ; CPU:$D882 PRG:1882 20 E1 EA lda #$30 ; CPU:$D885 PRG:1885 A9 30 jsr $C847 ; CPU:$D887 PRG:1887 20 47 C8 jsr $EFEF ; CPU:$D88A PRG:188A 20 EF EF - beq Label_D8A8 ; CPU:$D88D PRG:188D F0 19 + beq SubCD8A8 ; CPU:$D88D PRG:188D F0 19 lda ZpFC ; CPU:$D88F PRG:188F A5 FC sta $0519 ; CPU:$D891 PRG:1891 8D 19 05 lda Zp53 ; CPU:$D894 PRG:1894 A5 53 cmp #$04 ; CPU:$D896 PRG:1896 C9 04 - bne Label_D8A7 ; CPU:$D898 PRG:1898 D0 0D + bne SubCD87D_Block ; CPU:$D898 PRG:1898 D0 0D lda #$19 ; CPU:$D89A PRG:189A A9 19 sta Zp00 ; CPU:$D89C PRG:189C 85 00 lda #$3F ; CPU:$D89E PRG:189E A9 3F @@ -5266,7 +5274,7 @@ Label_D87D: lda #$46 ; CPU:$D8A2 PRG:18A2 A9 46 jsr $C815 ; CPU:$D8A4 PRG:18A4 20 15 C8 ; ----------------------------------------------------------------------------- -; Routine: Label_D8A7 +; Routine: SubCD87D_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5274,10 +5282,10 @@ Label_D87D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D8A7: +SubCD87D_Block: rts ; CPU:$D8A7 PRG:18A7 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D8A8 +; Routine: SubCD8A8 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5285,12 +5293,12 @@ Label_D8A7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D8A8: +SubCD8A8: lda #$00 ; CPU:$D8A8 PRG:18A8 A9 00 sta ZpA0 ; CPU:$D8AA PRG:18AA 85 A0 rts ; CPU:$D8AC PRG:18AC 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D8AD +; Routine: CheckSpriteListCollision ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5298,7 +5306,7 @@ Label_D8A8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D8AD: +CheckSpriteListCollision: lda #$F3 ; CPU:$D8AD PRG:18AD A9 F3 sta Zp0B ; CPU:$D8AF PRG:18AF 85 0B lda #$00 ; CPU:$D8B1 PRG:18B1 A9 00 @@ -5306,7 +5314,7 @@ Label_D8AD: ldy #$00 ; CPU:$D8B5 PRG:18B5 A0 00 lda (Zp04),y ; CPU:$D8B7 PRG:18B7 B1 04 ; ----------------------------------------------------------------------------- -; Routine: Label_D8B9 +; Routine: SubCD8B9 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5314,7 +5322,7 @@ Label_D8AD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D8B9: +SubCD8B9: sta Zp00 ; CPU:$D8B9 PRG:18B9 85 00 iny ; CPU:$D8BB PRG:18BB C8 lda (Zp04),y ; CPU:$D8BC PRG:18BC B1 04 @@ -5329,15 +5337,15 @@ Label_D8B9: sta Zp03 ; CPU:$D8CC PRG:18CC 85 03 sty Zp86 ; CPU:$D8CE PRG:18CE 84 86 jsr $EFF3 ; CPU:$D8D0 PRG:18D0 20 F3 EF - bne Label_D8E1 ; CPU:$D8D3 PRG:18D3 D0 0C + bne SubCD8B9_Block ; CPU:$D8D3 PRG:18D3 D0 0C ldy Zp86 ; CPU:$D8D5 PRG:18D5 A4 86 iny ; CPU:$D8D7 PRG:18D7 C8 lda (Zp04),y ; CPU:$D8D8 PRG:18D8 B1 04 cmp #$FE ; CPU:$D8DA PRG:18DA C9 FE - beq Label_D8E6 ; CPU:$D8DC PRG:18DC F0 08 + beq SubCD8B9_Block_1 ; CPU:$D8DC PRG:18DC F0 08 jmp $D8B9 ; CPU:$D8DE PRG:18DE 4C B9 D8 ; ----------------------------------------------------------------------------- -; Routine: Label_D8E1 +; Routine: SubCD8B9_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5345,11 +5353,11 @@ Label_D8B9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D8E1: +SubCD8B9_Block: lda #$01 ; CPU:$D8E1 PRG:18E1 A9 01 jmp $D8E8 ; CPU:$D8E3 PRG:18E3 4C E8 D8 ; ----------------------------------------------------------------------------- -; Routine: Label_D8E6 +; Routine: SubCD8B9_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5357,10 +5365,10 @@ Label_D8E1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D8E6: +SubCD8B9_Block_1: lda #$00 ; CPU:$D8E6 PRG:18E6 A9 00 ; ----------------------------------------------------------------------------- -; Routine: Label_D8E8 +; Routine: SubCD8E8 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5368,11 +5376,11 @@ Label_D8E6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D8E8: +SubCD8E8: sta Zp0C ; CPU:$D8E8 PRG:18E8 85 0C rts ; CPU:$D8EA PRG:18EA 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D8EB +; Routine: SubCD8EB ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5380,21 +5388,21 @@ Label_D8E8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D8EB: +SubCD8EB: lda Zp5A ; CPU:$D8EB PRG:18EB A5 5A - bne Label_D917 ; CPU:$D8ED PRG:18ED D0 28 + bne SubCD917 ; CPU:$D8ED PRG:18ED D0 28 lda Zp59 ; CPU:$D8EF PRG:18EF A5 59 - beq Label_D917 ; CPU:$D8F1 PRG:18F1 F0 24 + beq SubCD917 ; CPU:$D8F1 PRG:18F1 F0 24 and #$01 ; CPU:$D8F3 PRG:18F3 29 01 - bne Label_D904 ; CPU:$D8F5 PRG:18F5 D0 0D + bne SubCD8EB_Block ; CPU:$D8F5 PRG:18F5 D0 0D lda Zp56 ; CPU:$D8F7 PRG:18F7 A5 56 cmp #$01 ; CPU:$D8F9 PRG:18F9 C9 01 - beq Label_D914 ; CPU:$D8FB PRG:18FB F0 17 + beq SubCD8EB_Block_2 ; CPU:$D8FB PRG:18FB F0 17 cmp #$02 ; CPU:$D8FD PRG:18FD C9 02 - beq Label_D911 ; CPU:$D8FF PRG:18FF F0 10 + beq SubCD8EB_Block_1 ; CPU:$D8FF PRG:18FF F0 10 jmp $D917 ; CPU:$D901 PRG:1901 4C 17 D9 ; ----------------------------------------------------------------------------- -; Routine: Label_D904 +; Routine: SubCD8EB_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5402,15 +5410,15 @@ Label_D8EB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D904: +SubCD8EB_Block: lda Zp56 ; CPU:$D904 PRG:1904 A5 56 cmp #$01 ; CPU:$D906 PRG:1906 C9 01 - beq Label_D911 ; CPU:$D908 PRG:1908 F0 07 + beq SubCD8EB_Block_1 ; CPU:$D908 PRG:1908 F0 07 cmp #$02 ; CPU:$D90A PRG:190A C9 02 - beq Label_D914 ; CPU:$D90C PRG:190C F0 06 + beq SubCD8EB_Block_2 ; CPU:$D90C PRG:190C F0 06 jmp $D917 ; CPU:$D90E PRG:190E 4C 17 D9 ; ----------------------------------------------------------------------------- -; Routine: Label_D911 +; Routine: SubCD8EB_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5418,11 +5426,11 @@ Label_D904: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D911: +SubCD8EB_Block_1: lda #$FF ; CPU:$D911 PRG:1911 A9 FF rts ; CPU:$D913 PRG:1913 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D914 +; Routine: SubCD8EB_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5430,11 +5438,11 @@ Label_D911: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D914: +SubCD8EB_Block_2: lda #$01 ; CPU:$D914 PRG:1914 A9 01 rts ; CPU:$D916 PRG:1916 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D917 +; Routine: SubCD917 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5442,11 +5450,11 @@ Label_D914: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D917: +SubCD917: lda #$00 ; CPU:$D917 PRG:1917 A9 00 rts ; CPU:$D919 PRG:1919 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D91A +; Routine: SubCD91A ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5454,18 +5462,18 @@ Label_D917: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D91A: +SubCD91A: lda $0200 ; CPU:$D91A PRG:191A AD 00 02 clc ; CPU:$D91D PRG:191D 18 adc #$08 ; CPU:$D91E PRG:191E 69 08 jsr $E016 ; CPU:$D920 PRG:1920 20 16 E0 sta Zp59 ; CPU:$D923 PRG:1923 85 59 cmp #$01 ; CPU:$D925 PRG:1925 C9 01 - beq Label_D938 ; CPU:$D927 PRG:1927 F0 0F + beq SubCD91A_Block ; CPU:$D927 PRG:1927 F0 0F ldx #$02 ; CPU:$D929 PRG:1929 A2 02 lda #$0C ; CPU:$D92B PRG:192B A9 0C ; ----------------------------------------------------------------------------- -; Routine: Label_D92D +; Routine: SubCD92D ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5473,15 +5481,15 @@ Label_D91A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D92D: +SubCD92D: cpx Zp59 ; CPU:$D92D PRG:192D E4 59 - beq Label_D93B ; CPU:$D92F PRG:192F F0 0A + beq SubCD92D_Block ; CPU:$D92F PRG:192F F0 0A clc ; CPU:$D931 PRG:1931 18 adc #$06 ; CPU:$D932 PRG:1932 69 06 inx ; CPU:$D934 PRG:1934 E8 jmp $D92D ; CPU:$D935 PRG:1935 4C 2D D9 ; ----------------------------------------------------------------------------- -; Routine: Label_D938 +; Routine: SubCD91A_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5489,11 +5497,11 @@ Label_D92D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D938: +SubCD91A_Block: sec ; CPU:$D938 PRG:1938 38 sbc #$01 ; CPU:$D939 PRG:1939 E9 01 ; ----------------------------------------------------------------------------- -; Routine: Label_D93B +; Routine: SubCD92D_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5501,10 +5509,10 @@ Label_D938: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D93B: +SubCD92D_Block: tax ; CPU:$D93B PRG:193B AA ; ----------------------------------------------------------------------------- -; Routine: Label_D93C +; Routine: SubCD93C ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5512,7 +5520,7 @@ Label_D93B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D93C: +SubCD93C: lda #$00 ; CPU:$D93C PRG:193C A9 00 sta Zp86 ; CPU:$D93E PRG:193E 85 86 lda $C08C,x ; CPU:$D940 PRG:1940 BD 8C C0 @@ -5534,7 +5542,7 @@ Label_D93C: lda $C08C,x ; CPU:$D95F PRG:195F BD 8C C0 sta Zp09 ; CPU:$D962 PRG:1962 85 09 ; ----------------------------------------------------------------------------- -; Routine: Label_D964 +; Routine: SubCD93C_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5542,9 +5550,9 @@ Label_D93C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D964: +SubCD93C_Block: jsr $EFEF ; CPU:$D964 PRG:1964 20 EF EF - bne Label_D98B ; CPU:$D967 PRG:1967 D0 22 + bne SubCD93C_Block_2 ; CPU:$D967 PRG:1967 D0 22 lda Zp00 ; CPU:$D969 PRG:1969 A5 00 clc ; CPU:$D96B PRG:196B 18 adc Zp08 ; CPU:$D96C PRG:196C 65 08 @@ -5553,15 +5561,15 @@ Label_D964: inc Zp86 ; CPU:$D972 PRG:1972 E6 86 lda Zp09 ; CPU:$D974 PRG:1974 A5 09 cmp Zp86 ; CPU:$D976 PRG:1976 C5 86 - bne Label_D964 ; CPU:$D978 PRG:1978 D0 EA + bne SubCD93C_Block ; CPU:$D978 PRG:1978 D0 EA inx ; CPU:$D97A PRG:197A E8 lda $C08C,x ; CPU:$D97B PRG:197B BD 8C C0 cmp #$FE ; CPU:$D97E PRG:197E C9 FE - beq Label_D986 ; CPU:$D980 PRG:1980 F0 04 + beq SubCD93C_Block_1 ; CPU:$D980 PRG:1980 F0 04 inx ; CPU:$D982 PRG:1982 E8 jmp $D93C ; CPU:$D983 PRG:1983 4C 3C D9 ; ----------------------------------------------------------------------------- -; Routine: Label_D986 +; Routine: SubCD93C_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5569,11 +5577,11 @@ Label_D964: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D986: +SubCD93C_Block_1: lda #$00 ; CPU:$D986 PRG:1986 A9 00 jmp $D98D ; CPU:$D988 PRG:1988 4C 8D D9 ; ----------------------------------------------------------------------------- -; Routine: Label_D98B +; Routine: SubCD93C_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5581,10 +5589,10 @@ Label_D986: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D98B: +SubCD93C_Block_2: lda #$01 ; CPU:$D98B PRG:198B A9 01 ; ----------------------------------------------------------------------------- -; Routine: Label_D98D +; Routine: SubCD98D ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5592,11 +5600,11 @@ Label_D98B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D98D: +SubCD98D: sta Zp5A ; CPU:$D98D PRG:198D 85 5A rts ; CPU:$D98F PRG:198F 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D990 +; Routine: SubCD990 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5604,15 +5612,15 @@ Label_D98D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D990: +SubCD990: lda Zp56 ; CPU:$D990 PRG:1990 A5 56 cmp #$01 ; CPU:$D992 PRG:1992 C9 01 - beq Label_D99D ; CPU:$D994 PRG:1994 F0 07 + beq SubCD990_Block ; CPU:$D994 PRG:1994 F0 07 cmp #$02 ; CPU:$D996 PRG:1996 C9 02 - beq Label_D9AF ; CPU:$D998 PRG:1998 F0 15 + beq SubCD990_Block_1 ; CPU:$D998 PRG:1998 F0 15 jmp $D9E3 ; CPU:$D99A PRG:199A 4C E3 D9 ; ----------------------------------------------------------------------------- -; Routine: Label_D99D +; Routine: SubCD990_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5620,18 +5628,18 @@ Label_D990: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D99D: +SubCD990_Block: lda Zp53 ; CPU:$D99D PRG:199D A5 53 asl a ; CPU:$D99F PRG:199F 0A tax ; CPU:$D9A0 PRG:19A0 AA dex ; CPU:$D9A1 PRG:19A1 CA lda $C1B4,x ; CPU:$D9A2 PRG:19A2 BD B4 C1 cmp $0203 ; CPU:$D9A5 PRG:19A5 CD 03 02 - beq Label_D9E0 ; CPU:$D9A8 PRG:19A8 F0 36 - bcc Label_D9E0 ; CPU:$D9AA PRG:19AA 90 34 + beq SubCD9D4_Block ; CPU:$D9A8 PRG:19A8 F0 36 + bcc SubCD9D4_Block ; CPU:$D9AA PRG:19AA 90 34 jmp $D9E3 ; CPU:$D9AC PRG:19AC 4C E3 D9 ; ----------------------------------------------------------------------------- -; Routine: Label_D9AF +; Routine: SubCD990_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5639,7 +5647,7 @@ Label_D99D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D9AF: +SubCD990_Block_1: lda Zp53 ; CPU:$D9AF PRG:19AF A5 53 asl a ; CPU:$D9B1 PRG:19B1 0A tax ; CPU:$D9B2 PRG:19B2 AA @@ -5647,18 +5655,18 @@ Label_D9AF: dex ; CPU:$D9B4 PRG:19B4 CA lda $C1B4,x ; CPU:$D9B5 PRG:19B5 BD B4 C1 cmp $0203 ; CPU:$D9B8 PRG:19B8 CD 03 02 - bcs Label_D9E0 ; CPU:$D9BB PRG:19BB B0 23 + bcs SubCD9D4_Block ; CPU:$D9BB PRG:19BB B0 23 lda Zp53 ; CPU:$D9BD PRG:19BD A5 53 cmp #$04 ; CPU:$D9BF PRG:19BF C9 04 - beq Label_D9E3 ; CPU:$D9C1 PRG:19C1 F0 20 + beq SubCD9E3 ; CPU:$D9C1 PRG:19C1 F0 20 ldx Zp59 ; CPU:$D9C3 PRG:19C3 A6 59 cmp #$03 ; CPU:$D9C5 PRG:19C5 C9 03 - beq Label_D9D0 ; CPU:$D9C7 PRG:19C7 F0 07 + beq SubCD990_Block_2 ; CPU:$D9C7 PRG:19C7 F0 07 cpx #$06 ; CPU:$D9C9 PRG:19C9 E0 06 - bne Label_D9E3 ; CPU:$D9CB PRG:19CB D0 16 + bne SubCD9E3 ; CPU:$D9CB PRG:19CB D0 16 jmp $D9D4 ; CPU:$D9CD PRG:19CD 4C D4 D9 ; ----------------------------------------------------------------------------- -; Routine: Label_D9D0 +; Routine: SubCD990_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5666,11 +5674,11 @@ Label_D9AF: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D9D0: +SubCD990_Block_2: cpx #$05 ; CPU:$D9D0 PRG:19D0 E0 05 - bne Label_D9E3 ; CPU:$D9D2 PRG:19D2 D0 0F + bne SubCD9E3 ; CPU:$D9D2 PRG:19D2 D0 0F ; ----------------------------------------------------------------------------- -; Routine: Label_D9D4 +; Routine: SubCD9D4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5678,14 +5686,14 @@ Label_D9D0: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D9D4: +SubCD9D4: lda $0203 ; CPU:$D9D4 PRG:19D4 AD 03 02 cmp #$68 ; CPU:$D9D7 PRG:19D7 C9 68 - beq Label_D9E0 ; CPU:$D9D9 PRG:19D9 F0 05 - bcc Label_D9E0 ; CPU:$D9DB PRG:19DB 90 03 + beq SubCD9D4_Block ; CPU:$D9D9 PRG:19D9 F0 05 + bcc SubCD9D4_Block ; CPU:$D9DB PRG:19DB 90 03 jmp $D9E3 ; CPU:$D9DD PRG:19DD 4C E3 D9 ; ----------------------------------------------------------------------------- -; Routine: Label_D9E0 +; Routine: SubCD9D4_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5693,11 +5701,11 @@ Label_D9D4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D9E0: +SubCD9D4_Block: lda #$01 ; CPU:$D9E0 PRG:19E0 A9 01 rts ; CPU:$D9E2 PRG:19E2 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D9E3 +; Routine: SubCD9E3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5705,11 +5713,11 @@ Label_D9E0: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D9E3: +SubCD9E3: lda #$00 ; CPU:$D9E3 PRG:19E3 A9 00 rts ; CPU:$D9E5 PRG:19E5 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D9E6 +; Routine: CheckPeriodicEvent ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5717,10 +5725,10 @@ Label_D9E3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D9E6: +CheckPeriodicEvent: sta Zp0A ; CPU:$D9E6 PRG:19E6 85 0A ; ----------------------------------------------------------------------------- -; Routine: Label_D9E8 +; Routine: SubCD9E8 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5728,15 +5736,15 @@ Label_D9E6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D9E8: +SubCD9E8: sta Zp0B ; CPU:$D9E8 PRG:19E8 85 0B inc Zp88 ; CPU:$D9EA PRG:19EA E6 88 lda Zp88 ; CPU:$D9EC PRG:19EC A5 88 cmp #$0F ; CPU:$D9EE PRG:19EE C9 0F - bcs Label_D9F5 ; CPU:$D9F0 PRG:19F0 B0 03 + bcs SubCD9E8_Block ; CPU:$D9F0 PRG:19F0 B0 03 jmp $D9F9 ; CPU:$D9F2 PRG:19F2 4C F9 D9 ; ----------------------------------------------------------------------------- -; Routine: Label_D9F5 +; Routine: SubCD9E8_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5744,11 +5752,11 @@ Label_D9E8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D9F5: +SubCD9E8_Block: lda #$00 ; CPU:$D9F5 PRG:19F5 A9 00 sta Zp88 ; CPU:$D9F7 PRG:19F7 85 88 ; ----------------------------------------------------------------------------- -; Routine: Label_D9F9 +; Routine: SubCD9F9 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5756,15 +5764,15 @@ Label_D9F5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D9F9: +SubCD9F9: cmp #$08 ; CPU:$D9F9 PRG:19F9 C9 08 - bcs Label_DA06 ; CPU:$D9FB PRG:19FB B0 09 + bcs SubCD9F9_Block ; CPU:$D9FB PRG:19FB B0 09 tax ; CPU:$D9FD PRG:19FD AA lda $C1BC,x ; CPU:$D9FE PRG:19FE BD BC C1 and Zp0A ; CPU:$DA01 PRG:1A01 25 0A jmp $DA0F ; CPU:$DA03 PRG:1A03 4C 0F DA ; ----------------------------------------------------------------------------- -; Routine: Label_DA06 +; Routine: SubCD9F9_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5772,14 +5780,14 @@ Label_D9F9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DA06: +SubCD9F9_Block: sec ; CPU:$DA06 PRG:1A06 38 sbc #$08 ; CPU:$DA07 PRG:1A07 E9 08 tax ; CPU:$DA09 PRG:1A09 AA lda $C1BC,x ; CPU:$DA0A PRG:1A0A BD BC C1 and Zp0B ; CPU:$DA0D PRG:1A0D 25 0B ; ----------------------------------------------------------------------------- -; Routine: Label_DA0F +; Routine: SubCDA0F ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5787,11 +5795,11 @@ Label_DA06: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DA0F: - beq Label_DA13 ; CPU:$DA0F PRG:1A0F F0 02 +SubCDA0F: + beq SubCDA0F_Block ; CPU:$DA0F PRG:1A0F F0 02 lda #$01 ; CPU:$DA11 PRG:1A11 A9 01 ; ----------------------------------------------------------------------------- -; Routine: Label_DA13 +; Routine: SubCDA0F_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5799,11 +5807,11 @@ Label_DA0F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DA13: +SubCDA0F_Block: sta ZpBE ; CPU:$DA13 PRG:1A13 85 BE rts ; CPU:$DA15 PRG:1A15 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DA16 +; Routine: UpdateObjectListZp5D ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5811,12 +5819,12 @@ Label_DA13: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DA16: +UpdateObjectListZp5D: jsr $E166 ; CPU:$DA16 PRG:1A16 20 66 E1 lda #$00 ; CPU:$DA19 PRG:1A19 A9 00 sta Zp5D ; CPU:$DA1B PRG:1A1B 85 5D ; ----------------------------------------------------------------------------- -; Routine: Label_DA1D +; Routine: UpdateObjectListZp5D_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5824,13 +5832,13 @@ Label_DA16: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DA1D: +UpdateObjectListZp5D_Block: jsr $EFD5 ; CPU:$DA1D PRG:1A1D 20 D5 EF lda $0200,x ; CPU:$DA20 PRG:1A20 BD 00 02 cmp #$FF ; CPU:$DA23 PRG:1A23 C9 FF - bne Label_DA3D ; CPU:$DA25 PRG:1A25 D0 16 + bne UpdateObjectListZp5D_Block_1 ; CPU:$DA25 PRG:1A25 D0 16 lda Zp36 ; CPU:$DA27 PRG:1A27 A5 36 - bne Label_DA40 ; CPU:$DA29 PRG:1A29 D0 15 + bne UpdateObjectListZp5D_Block_2 ; CPU:$DA29 PRG:1A29 D0 15 lda #$80 ; CPU:$DA2B PRG:1A2B A9 80 ldx Zp5D ; CPU:$DA2D PRG:1A2D A6 5D sta Zp5E,x ; CPU:$DA2F PRG:1A2F 95 5E @@ -5840,7 +5848,7 @@ Label_DA1D: lda $C443,x ; CPU:$DA38 PRG:1A38 BD 43 C4 sta Zp36 ; CPU:$DA3B PRG:1A3B 85 36 ; ----------------------------------------------------------------------------- -; Routine: Label_DA3D +; Routine: UpdateObjectListZp5D_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5848,10 +5856,10 @@ Label_DA1D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DA3D: +UpdateObjectListZp5D_Block_1: jsr $DA4C ; CPU:$DA3D PRG:1A3D 20 4C DA ; ----------------------------------------------------------------------------- -; Routine: Label_DA40 +; Routine: UpdateObjectListZp5D_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5859,16 +5867,16 @@ Label_DA3D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DA40: +UpdateObjectListZp5D_Block_2: lda Zp5D ; CPU:$DA40 PRG:1A40 A5 5D clc ; CPU:$DA42 PRG:1A42 18 adc #$01 ; CPU:$DA43 PRG:1A43 69 01 sta Zp5D ; CPU:$DA45 PRG:1A45 85 5D cmp #$09 ; CPU:$DA47 PRG:1A47 C9 09 - bne Label_DA1D ; CPU:$DA49 PRG:1A49 D0 D2 + bne UpdateObjectListZp5D_Block ; CPU:$DA49 PRG:1A49 D0 D2 rts ; CPU:$DA4B PRG:1A4B 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DA4C +; Routine: DispatchObjectStateZp5E ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5876,34 +5884,34 @@ Label_DA40: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DA4C: +DispatchObjectStateZp5E: ldx Zp5D ; CPU:$DA4C PRG:1A4C A6 5D lda Zp5E,x ; CPU:$DA4E PRG:1A4E B5 5E cmp #$80 ; CPU:$DA50 PRG:1A50 C9 80 - beq Label_DA7D ; CPU:$DA52 PRG:1A52 F0 29 + beq DispatchObjectStateZp5E_Block ; CPU:$DA52 PRG:1A52 F0 29 cmp #$81 ; CPU:$DA54 PRG:1A54 C9 81 - beq Label_DA80 ; CPU:$DA56 PRG:1A56 F0 28 + beq DispatchObjectStateZp5E_Block_1 ; CPU:$DA56 PRG:1A56 F0 28 cmp #$01 ; CPU:$DA58 PRG:1A58 C9 01 - beq Label_DA83 ; CPU:$DA5A PRG:1A5A F0 27 + beq DispatchObjectStateZp5E_Block_2 ; CPU:$DA5A PRG:1A5A F0 27 cmp #$02 ; CPU:$DA5C PRG:1A5C C9 02 - beq Label_DA86 ; CPU:$DA5E PRG:1A5E F0 26 + beq DispatchObjectStateZp5E_Block_3 ; CPU:$DA5E PRG:1A5E F0 26 cmp #$C0 ; CPU:$DA60 PRG:1A60 C9 C0 - beq Label_DA89 ; CPU:$DA62 PRG:1A62 F0 25 + beq DispatchObjectStateZp5E_Block_4 ; CPU:$DA62 PRG:1A62 F0 25 cmp #$C1 ; CPU:$DA64 PRG:1A64 C9 C1 - beq Label_DA89 ; CPU:$DA66 PRG:1A66 F0 21 + beq DispatchObjectStateZp5E_Block_4 ; CPU:$DA66 PRG:1A66 F0 21 cmp #$C2 ; CPU:$DA68 PRG:1A68 C9 C2 - beq Label_DA89 ; CPU:$DA6A PRG:1A6A F0 1D + beq DispatchObjectStateZp5E_Block_4 ; CPU:$DA6A PRG:1A6A F0 1D cmp #$08 ; CPU:$DA6C PRG:1A6C C9 08 - beq Label_DA8F ; CPU:$DA6E PRG:1A6E F0 1F + beq DispatchObjectStateZp5E_Block_5 ; CPU:$DA6E PRG:1A6E F0 1F cmp #$10 ; CPU:$DA70 PRG:1A70 C9 10 - beq Label_DA92 ; CPU:$DA72 PRG:1A72 F0 1E + beq DispatchObjectStateZp5E_Block_6 ; CPU:$DA72 PRG:1A72 F0 1E cmp #$20 ; CPU:$DA74 PRG:1A74 C9 20 - beq Label_DA95 ; CPU:$DA76 PRG:1A76 F0 1D + beq DispatchObjectStateZp5E_Block_7 ; CPU:$DA76 PRG:1A76 F0 1D cmp #$40 ; CPU:$DA78 PRG:1A78 C9 40 - beq Label_DA98 ; CPU:$DA7A PRG:1A7A F0 1C + beq DispatchObjectStateZp5E_Block_8 ; CPU:$DA7A PRG:1A7A F0 1C rts ; CPU:$DA7C PRG:1A7C 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DA7D +; Routine: DispatchObjectStateZp5E_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5911,10 +5919,10 @@ Label_DA4C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DA7D: +DispatchObjectStateZp5E_Block: jmp $DA9C ; CPU:$DA7D PRG:1A7D 4C 9C DA ; ----------------------------------------------------------------------------- -; Routine: Label_DA80 +; Routine: DispatchObjectStateZp5E_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5922,10 +5930,10 @@ Label_DA7D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DA80: +DispatchObjectStateZp5E_Block_1: jmp $DB00 ; CPU:$DA80 PRG:1A80 4C 00 DB ; ----------------------------------------------------------------------------- -; Routine: Label_DA83 +; Routine: DispatchObjectStateZp5E_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5933,10 +5941,10 @@ Label_DA80: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DA83: +DispatchObjectStateZp5E_Block_2: jmp $DB2C ; CPU:$DA83 PRG:1A83 4C 2C DB ; ----------------------------------------------------------------------------- -; Routine: Label_DA86 +; Routine: DispatchObjectStateZp5E_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5944,10 +5952,10 @@ Label_DA83: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DA86: +DispatchObjectStateZp5E_Block_3: jmp $DC30 ; CPU:$DA86 PRG:1A86 4C 30 DC ; ----------------------------------------------------------------------------- -; Routine: Label_DA89 +; Routine: DispatchObjectStateZp5E_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5955,11 +5963,11 @@ Label_DA86: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DA89: +DispatchObjectStateZp5E_Block_4: lda $0421,x ; CPU:$DA89 PRG:1A89 BD 21 04 jmp $DD8B ; CPU:$DA8C PRG:1A8C 4C 8B DD ; ----------------------------------------------------------------------------- -; Routine: Label_DA8F +; Routine: DispatchObjectStateZp5E_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5967,10 +5975,10 @@ Label_DA89: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DA8F: +DispatchObjectStateZp5E_Block_5: jmp $DC69 ; CPU:$DA8F PRG:1A8F 4C 69 DC ; ----------------------------------------------------------------------------- -; Routine: Label_DA92 +; Routine: DispatchObjectStateZp5E_Block_6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5978,10 +5986,10 @@ Label_DA8F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DA92: +DispatchObjectStateZp5E_Block_6: jmp $DCD0 ; CPU:$DA92 PRG:1A92 4C D0 DC ; ----------------------------------------------------------------------------- -; Routine: Label_DA95 +; Routine: DispatchObjectStateZp5E_Block_7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -5989,10 +5997,10 @@ Label_DA92: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DA95: +DispatchObjectStateZp5E_Block_7: jmp $DD32 ; CPU:$DA95 PRG:1A95 4C 32 DD ; ----------------------------------------------------------------------------- -; Routine: Label_DA98 +; Routine: DispatchObjectStateZp5E_Block_8 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6000,11 +6008,11 @@ Label_DA95: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DA98: +DispatchObjectStateZp5E_Block_8: jsr $DF07 ; CPU:$DA98 PRG:1A98 20 07 DF rts ; CPU:$DA9B PRG:1A9B 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DA9C +; Routine: HandleObjectState80 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6012,7 +6020,7 @@ Label_DA98: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DA9C: +HandleObjectState80: jsr $EFD5 ; CPU:$DA9C PRG:1A9C 20 D5 EF lda #$30 ; CPU:$DA9F PRG:1A9F A9 30 sta Zp00 ; CPU:$DAA1 PRG:1AA1 85 00 @@ -6022,17 +6030,17 @@ Label_DA9C: stx Zp04 ; CPU:$DAA9 PRG:1AA9 86 04 jsr $EADB ; CPU:$DAAB PRG:1AAB 20 DB EA lda Zp37 ; CPU:$DAAE PRG:1AAE A5 37 - bne Label_DAFF ; CPU:$DAB0 PRG:1AB0 D0 4D + bne SubCDAF7_Block ; CPU:$DAB0 PRG:1AB0 D0 4D lda #$81 ; CPU:$DAB2 PRG:1AB2 A9 81 ldx Zp5D ; CPU:$DAB4 PRG:1AB4 A6 5D sta Zp5E,x ; CPU:$DAB6 PRG:1AB6 95 5E lda #$00 ; CPU:$DAB8 PRG:1AB8 A9 00 sta Zp8A,x ; CPU:$DABA PRG:1ABA 95 8A lda ZpAD ; CPU:$DABC PRG:1ABC A5 AD - beq Label_DAC3 ; CPU:$DABE PRG:1ABE F0 03 + beq HandleObjectState80_Block ; CPU:$DABE PRG:1ABE F0 03 jmp $DAD5 ; CPU:$DAC0 PRG:1AC0 4C D5 DA ; ----------------------------------------------------------------------------- -; Routine: Label_DAC3 +; Routine: HandleObjectState80_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6040,9 +6048,9 @@ Label_DA9C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DAC3: +HandleObjectState80_Block: lda Zp5D ; CPU:$DAC3 PRG:1AC3 A5 5D - bne Label_DAFF ; CPU:$DAC5 PRG:1AC5 D0 38 + bne SubCDAF7_Block ; CPU:$DAC5 PRG:1AC5 D0 38 lda #$C0 ; CPU:$DAC7 PRG:1AC7 A9 C0 ldx Zp5D ; CPU:$DAC9 PRG:1AC9 A6 5D sta Zp5E,x ; CPU:$DACB PRG:1ACB 95 5E @@ -6050,7 +6058,7 @@ Label_DAC3: sta $0421,x ; CPU:$DACF PRG:1ACF 9D 21 04 jmp $DAF7 ; CPU:$DAD2 PRG:1AD2 4C F7 DA ; ----------------------------------------------------------------------------- -; Routine: Label_DAD5 +; Routine: SubCDAD5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6058,22 +6066,22 @@ Label_DAC3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DAD5: +SubCDAD5: lda Zp43 ; CPU:$DAD5 PRG:1AD5 A5 43 - bne Label_DAFF ; CPU:$DAD7 PRG:1AD7 D0 26 + bne SubCDAF7_Block ; CPU:$DAD7 PRG:1AD7 D0 26 lda Zp5D ; CPU:$DAD9 PRG:1AD9 A5 5D - bne Label_DAFF ; CPU:$DADB PRG:1ADB D0 22 + bne SubCDAF7_Block ; CPU:$DADB PRG:1ADB D0 22 lda #$C0 ; CPU:$DADD PRG:1ADD A9 C0 ldx Zp5D ; CPU:$DADF PRG:1ADF A6 5D sta Zp5E,x ; CPU:$DAE1 PRG:1AE1 95 5E lda $0421,x ; CPU:$DAE3 PRG:1AE3 BD 21 04 cmp #$01 ; CPU:$DAE6 PRG:1AE6 C9 01 - bne Label_DAF2 ; CPU:$DAE8 PRG:1AE8 D0 08 + bne SubCDAD5_Block ; CPU:$DAE8 PRG:1AE8 D0 08 lda #$03 ; CPU:$DAEA PRG:1AEA A9 03 sta $0421,x ; CPU:$DAEC PRG:1AEC 9D 21 04 jmp $DAF7 ; CPU:$DAEF PRG:1AEF 4C F7 DA ; ----------------------------------------------------------------------------- -; Routine: Label_DAF2 +; Routine: SubCDAD5_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6081,11 +6089,11 @@ Label_DAD5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DAF2: +SubCDAD5_Block: lda #$01 ; CPU:$DAF2 PRG:1AF2 A9 01 sta $0421,x ; CPU:$DAF4 PRG:1AF4 9D 21 04 ; ----------------------------------------------------------------------------- -; Routine: Label_DAF7 +; Routine: SubCDAF7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6093,12 +6101,12 @@ Label_DAF2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DAF7: +SubCDAF7: jsr $EAF7 ; CPU:$DAF7 PRG:1AF7 20 F7 EA lda $C44D,x ; CPU:$DAFA PRG:1AFA BD 4D C4 sta Zp43 ; CPU:$DAFD PRG:1AFD 85 43 ; ----------------------------------------------------------------------------- -; Routine: Label_DAFF +; Routine: SubCDAF7_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6106,10 +6114,10 @@ Label_DAF7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DAFF: +SubCDAF7_Block: rts ; CPU:$DAFF PRG:1AFF 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DB00 +; Routine: HandleObjectState81 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6117,10 +6125,10 @@ Label_DAFF: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DB00: +HandleObjectState81: lda #$55 ; CPU:$DB00 PRG:1B00 A9 55 jsr $DFE4 ; CPU:$DB02 PRG:1B02 20 E4 DF - bne Label_DB21 ; CPU:$DB05 PRG:1B05 D0 1A + bne HandleObjectState81_Block ; CPU:$DB05 PRG:1B05 D0 1A jsr $EFD5 ; CPU:$DB07 PRG:1B07 20 D5 EF lda #$4D ; CPU:$DB0A PRG:1B0A A9 4D sta Zp00 ; CPU:$DB0C PRG:1B0C 85 00 @@ -6133,7 +6141,7 @@ Label_DB00: inc $0515 ; CPU:$DB1B PRG:1B1B EE 15 05 jmp $DB2B ; CPU:$DB1E PRG:1B1E 4C 2B DB ; ----------------------------------------------------------------------------- -; Routine: Label_DB21 +; Routine: HandleObjectState81_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6141,14 +6149,14 @@ Label_DB00: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DB21: +HandleObjectState81_Block: ldx Zp5D ; CPU:$DB21 PRG:1B21 A6 5D lda #$01 ; CPU:$DB23 PRG:1B23 A9 01 sta Zp5E,x ; CPU:$DB25 PRG:1B25 95 5E lda #$84 ; CPU:$DB27 PRG:1B27 A9 84 sta Zp72,x ; CPU:$DB29 PRG:1B29 95 72 ; ----------------------------------------------------------------------------- -; Routine: Label_DB2B +; Routine: SubCDB2B ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6156,10 +6164,10 @@ Label_DB21: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DB2B: +SubCDB2B: rts ; CPU:$DB2B PRG:1B2B 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DB2C +; Routine: HandleObjectState01 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6167,13 +6175,13 @@ Label_DB2B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DB2C: +HandleObjectState01: lda #$FF ; CPU:$DB2C PRG:1B2C A9 FF jsr $DFE4 ; CPU:$DB2E PRG:1B2E 20 E4 DF - bne Label_DB34 ; CPU:$DB31 PRG:1B31 D0 01 + bne HandleObjectState01_Block ; CPU:$DB31 PRG:1B31 D0 01 rts ; CPU:$DB33 PRG:1B33 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DB34 +; Routine: HandleObjectState01_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6181,20 +6189,20 @@ Label_DB2C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DB34: +HandleObjectState01_Block: jsr $EFD5 ; CPU:$DB34 PRG:1B34 20 D5 EF pha ; CPU:$DB37 PRG:1B37 48 jsr $EAEC ; CPU:$DB38 PRG:1B38 20 EC EA lda Zp01 ; CPU:$DB3B PRG:1B3B A5 01 jsr $E016 ; CPU:$DB3D PRG:1B3D 20 16 E0 ldy Zp5D ; CPU:$DB40 PRG:1B40 A4 5D - sta a:$0068,y ; CPU:$DB42 PRG:1B42 99 68 00 + sta a:Zp68,y ; CPU:$DB42 PRG:1B42 99 68 00 and #$01 ; CPU:$DB45 PRG:1B45 29 01 - bne Label_DB4E ; CPU:$DB47 PRG:1B47 D0 05 + bne HandleObjectState01_Block_1 ; CPU:$DB47 PRG:1B47 D0 05 inc Zp00 ; CPU:$DB49 PRG:1B49 E6 00 jmp $DB50 ; CPU:$DB4B PRG:1B4B 4C 50 DB ; ----------------------------------------------------------------------------- -; Routine: Label_DB4E +; Routine: HandleObjectState01_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6202,10 +6210,10 @@ Label_DB34: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DB4E: +HandleObjectState01_Block_1: dec Zp00 ; CPU:$DB4E PRG:1B4E C6 00 ; ----------------------------------------------------------------------------- -; Routine: Label_DB50 +; Routine: SubCDB50 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6213,7 +6221,7 @@ Label_DB4E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DB50: +SubCDB50: lda Zp00 ; CPU:$DB50 PRG:1B50 A5 00 jsr $E05A ; CPU:$DB52 PRG:1B52 20 5A E0 sta Zp7D ; CPU:$DB55 PRG:1B55 85 7D @@ -6230,31 +6238,31 @@ Label_DB50: jsr $F080 ; CPU:$DB6B PRG:1B6B 20 80 F0 lda Zp00 ; CPU:$DB6E PRG:1B6E A5 00 jsr $E0AE ; CPU:$DB70 PRG:1B70 20 AE E0 - beq Label_DBAC ; CPU:$DB73 PRG:1B73 F0 37 + beq SubCDB50_Block_1 ; CPU:$DB73 PRG:1B73 F0 37 jsr $EAF7 ; CPU:$DB75 PRG:1B75 20 F7 EA lda $C448,x ; CPU:$DB78 PRG:1B78 BD 48 C4 and Zp19 ; CPU:$DB7B PRG:1B7B 25 19 - bne Label_DBAC ; CPU:$DB7D PRG:1B7D D0 2D + bne SubCDB50_Block_1 ; CPU:$DB7D PRG:1B7D D0 2D ldx Zp5D ; CPU:$DB7F PRG:1B7F A6 5D lda Zp68,x ; CPU:$DB81 PRG:1B81 B5 68 tax ; CPU:$DB83 PRG:1B83 AA dex ; CPU:$DB84 PRG:1B84 CA lda Zp7E,x ; CPU:$DB85 PRG:1B85 B5 7E cmp #$04 ; CPU:$DB87 PRG:1B87 C9 04 - bcs Label_DBAC ; CPU:$DB89 PRG:1B89 B0 21 + bcs SubCDB50_Block_1 ; CPU:$DB89 PRG:1B89 B0 21 lda Zp96 ; CPU:$DB8B PRG:1B8B A5 96 cmp #$02 ; CPU:$DB8D PRG:1B8D C9 02 - bne Label_DBA3 ; CPU:$DB8F PRG:1B8F D0 12 + bne SubCDB50_Block ; CPU:$DB8F PRG:1B8F D0 12 ldx Zp04 ; CPU:$DB91 PRG:1B91 A6 04 lda $0200,x ; CPU:$DB93 PRG:1B93 BD 00 02 cmp $0200 ; CPU:$DB96 PRG:1B96 CD 00 02 - bcs Label_DBA3 ; CPU:$DB99 PRG:1B99 B0 08 + bcs SubCDB50_Block ; CPU:$DB99 PRG:1B99 B0 08 clc ; CPU:$DB9B PRG:1B9B 18 adc #$0F ; CPU:$DB9C PRG:1B9C 69 0F cmp $0200 ; CPU:$DB9E PRG:1B9E CD 00 02 - bcs Label_DBAC ; CPU:$DBA1 PRG:1BA1 B0 09 + bcs SubCDB50_Block_1 ; CPU:$DBA1 PRG:1BA1 B0 09 ; ----------------------------------------------------------------------------- -; Routine: Label_DBA3 +; Routine: SubCDB50_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6262,14 +6270,14 @@ Label_DB50: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DBA3: +SubCDB50_Block: lda #$02 ; CPU:$DBA3 PRG:1BA3 A9 02 ldx Zp5D ; CPU:$DBA5 PRG:1BA5 A6 5D sta Zp5E,x ; CPU:$DBA7 PRG:1BA7 95 5E dec Zp68,x ; CPU:$DBA9 PRG:1BA9 D6 68 rts ; CPU:$DBAB PRG:1BAB 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DBAC +; Routine: SubCDB50_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6277,7 +6285,7 @@ Label_DBA3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DBAC: +SubCDB50_Block_1: lda Zp00 ; CPU:$DBAC PRG:1BAC A5 00 jsr $E090 ; CPU:$DBAE PRG:1BAE 20 90 E0 beq UpdateSpritePosition57 ; CPU:$DBB1 PRG:1BB1 F0 03 @@ -6296,15 +6304,15 @@ UpdateSpritePosition57: ldx Zp5D ; CPU:$DBB9 PRG:1BB9 A6 5D lda Zp68,x ; CPU:$DBBB PRG:1BBB B5 68 cmp #$01 ; CPU:$DBBD PRG:1BBD C9 01 - bne Label_DBED ; CPU:$DBBF PRG:1BBF D0 2C + bne SubCDBE7_Block ; CPU:$DBBF PRG:1BBF D0 2C jsr $DFC3 ; CPU:$DBC1 PRG:1BC1 20 C3 DF lda Zp00 ; CPU:$DBC4 PRG:1BC4 A5 00 cmp #$20 ; CPU:$DBC6 PRG:1BC6 C9 20 - beq Label_DBCD ; CPU:$DBC8 PRG:1BC8 F0 03 - bcc Label_DBCD ; CPU:$DBCA PRG:1BCA 90 01 + beq UpdateSpritePosition57_Block ; CPU:$DBC8 PRG:1BC8 F0 03 + bcc UpdateSpritePosition57_Block ; CPU:$DBCA PRG:1BCA 90 01 rts ; CPU:$DBCC PRG:1BCC 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DBCD +; Routine: UpdateSpritePosition57_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6312,7 +6320,7 @@ UpdateSpritePosition57: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DBCD: +UpdateSpritePosition57_Block: lda #$03 ; CPU:$DBCD PRG:1BCD A9 03 sta Zp02 ; CPU:$DBCF PRG:1BCF 85 02 lda #$04 ; CPU:$DBD1 PRG:1BD1 A9 04 @@ -6327,7 +6335,7 @@ Label_DBCD: sta ZpFE ; CPU:$DBE4 PRG:1BE4 85 FE rts ; CPU:$DBE6 PRG:1BE6 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DBE7 +; Routine: SubCDBE7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6335,12 +6343,12 @@ Label_DBCD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DBE7: +SubCDBE7: ldx Zp5D ; CPU:$DBE7 PRG:1BE7 A6 5D lda #$08 ; CPU:$DBE9 PRG:1BE9 A9 08 sta Zp5E,x ; CPU:$DBEB PRG:1BEB 95 5E ; ----------------------------------------------------------------------------- -; Routine: Label_DBED +; Routine: SubCDBE7_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6348,10 +6356,10 @@ Label_DBE7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DBED: +SubCDBE7_Block: rts ; CPU:$DBED PRG:1BED 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DBEE +; Routine: UpdateObjectAnimationFrame ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6359,15 +6367,15 @@ Label_DBED: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DBEE: +UpdateObjectAnimationFrame: ldx Zp5D ; CPU:$DBEE PRG:1BEE A6 5D inc $040D,x ; CPU:$DBF0 PRG:1BF0 FE 0D 04 lda $040D,x ; CPU:$DBF3 PRG:1BF3 BD 0D 04 cmp #$06 ; CPU:$DBF6 PRG:1BF6 C9 06 - bcs Label_DBFB ; CPU:$DBF8 PRG:1BF8 B0 01 + bcs UpdateObjectAnimationFrame_Block ; CPU:$DBF8 PRG:1BF8 B0 01 rts ; CPU:$DBFA PRG:1BFA 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DBFB +; Routine: UpdateObjectAnimationFrame_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6375,22 +6383,22 @@ Label_DBEE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DBFB: +UpdateObjectAnimationFrame_Block: lda #$00 ; CPU:$DBFB PRG:1BFB A9 00 sta $040D,x ; CPU:$DBFD PRG:1BFD 9D 0D 04 lda Zp68,x ; CPU:$DC00 PRG:1C00 B5 68 and #$01 ; CPU:$DC02 PRG:1C02 29 01 - beq Label_DC1B ; CPU:$DC04 PRG:1C04 F0 15 + beq UpdateObjectAnimationFrame_Block_2 ; CPU:$DC04 PRG:1C04 F0 15 lda Zp72,x ; CPU:$DC06 PRG:1C06 B5 72 clc ; CPU:$DC08 PRG:1C08 18 adc #$04 ; CPU:$DC09 PRG:1C09 69 04 cmp #$80 ; CPU:$DC0B PRG:1C0B C9 80 - bcc Label_DC16 ; CPU:$DC0D PRG:1C0D 90 07 + bcc UpdateObjectAnimationFrame_Block_1 ; CPU:$DC0D PRG:1C0D 90 07 cmp #$90 ; CPU:$DC0F PRG:1C0F C9 90 - bcs Label_DC16 ; CPU:$DC11 PRG:1C11 B0 03 + bcs UpdateObjectAnimationFrame_Block_1 ; CPU:$DC11 PRG:1C11 B0 03 jmp $DC2D ; CPU:$DC13 PRG:1C13 4C 2D DC ; ----------------------------------------------------------------------------- -; Routine: Label_DC16 +; Routine: UpdateObjectAnimationFrame_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6398,11 +6406,11 @@ Label_DBFB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DC16: +UpdateObjectAnimationFrame_Block_1: lda #$80 ; CPU:$DC16 PRG:1C16 A9 80 jmp $DC2D ; CPU:$DC18 PRG:1C18 4C 2D DC ; ----------------------------------------------------------------------------- -; Routine: Label_DC1B +; Routine: UpdateObjectAnimationFrame_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6410,17 +6418,17 @@ Label_DC16: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DC1B: +UpdateObjectAnimationFrame_Block_2: lda Zp72,x ; CPU:$DC1B PRG:1C1B B5 72 sec ; CPU:$DC1D PRG:1C1D 38 sbc #$04 ; CPU:$DC1E PRG:1C1E E9 04 cmp #$80 ; CPU:$DC20 PRG:1C20 C9 80 - bcc Label_DC2B ; CPU:$DC22 PRG:1C22 90 07 + bcc UpdateObjectAnimationFrame_Block_3 ; CPU:$DC22 PRG:1C22 90 07 cmp #$90 ; CPU:$DC24 PRG:1C24 C9 90 - bcs Label_DC2B ; CPU:$DC26 PRG:1C26 B0 03 + bcs UpdateObjectAnimationFrame_Block_3 ; CPU:$DC26 PRG:1C26 B0 03 jmp $DC2D ; CPU:$DC28 PRG:1C28 4C 2D DC ; ----------------------------------------------------------------------------- -; Routine: Label_DC2B +; Routine: UpdateObjectAnimationFrame_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6428,10 +6436,10 @@ Label_DC1B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DC2B: +UpdateObjectAnimationFrame_Block_3: lda #$8C ; CPU:$DC2B PRG:1C2B A9 8C ; ----------------------------------------------------------------------------- -; Routine: Label_DC2D +; Routine: SubCDC2D ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6439,11 +6447,11 @@ Label_DC2B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DC2D: +SubCDC2D: sta Zp72,x ; CPU:$DC2D PRG:1C2D 95 72 rts ; CPU:$DC2F PRG:1C2F 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DC30 +; Routine: HandleObjectState02 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6451,22 +6459,22 @@ Label_DC2D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DC30: +HandleObjectState02: lda #$55 ; CPU:$DC30 PRG:1C30 A9 55 jsr $DFE4 ; CPU:$DC32 PRG:1C32 20 E4 DF - beq Label_DC68 ; CPU:$DC35 PRG:1C35 F0 31 + beq SubCDC51_Block ; CPU:$DC35 PRG:1C35 F0 31 jsr $EFD5 ; CPU:$DC37 PRG:1C37 20 D5 EF stx Zp04 ; CPU:$DC3A PRG:1C3A 86 04 jsr $EAEC ; CPU:$DC3C PRG:1C3C 20 EC EA inc Zp01 ; CPU:$DC3F PRG:1C3F E6 01 ldy Zp5D ; CPU:$DC41 PRG:1C41 A4 5D - lda a:$0072,y ; CPU:$DC43 PRG:1C43 B9 72 00 + lda a:Zp72,y ; CPU:$DC43 PRG:1C43 B9 72 00 cmp #$90 ; CPU:$DC46 PRG:1C46 C9 90 - bne Label_DC4F ; CPU:$DC48 PRG:1C48 D0 05 + bne HandleObjectState02_Block ; CPU:$DC48 PRG:1C48 D0 05 lda #$94 ; CPU:$DC4A PRG:1C4A A9 94 jmp $DC51 ; CPU:$DC4C PRG:1C4C 4C 51 DC ; ----------------------------------------------------------------------------- -; Routine: Label_DC4F +; Routine: HandleObjectState02_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6474,10 +6482,10 @@ Label_DC30: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DC4F: +HandleObjectState02_Block: lda #$90 ; CPU:$DC4F PRG:1C4F A9 90 ; ----------------------------------------------------------------------------- -; Routine: Label_DC51 +; Routine: SubCDC51 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6485,7 +6493,7 @@ Label_DC4F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DC51: +SubCDC51: sta Zp02 ; CPU:$DC51 PRG:1C51 85 02 ldx Zp5D ; CPU:$DC53 PRG:1C53 A6 5D sta Zp72,x ; CPU:$DC55 PRG:1C55 95 72 @@ -6493,12 +6501,12 @@ Label_DC51: lda Zp01 ; CPU:$DC5A PRG:1C5A A5 01 ldx Zp5D ; CPU:$DC5C PRG:1C5C A6 5D cmp ZpA3,x ; CPU:$DC5E PRG:1C5E D5 A3 - bne Label_DC68 ; CPU:$DC60 PRG:1C60 D0 06 + bne SubCDC51_Block ; CPU:$DC60 PRG:1C60 D0 06 ldx Zp5D ; CPU:$DC62 PRG:1C62 A6 5D lda #$01 ; CPU:$DC64 PRG:1C64 A9 01 sta Zp5E,x ; CPU:$DC66 PRG:1C66 95 5E ; ----------------------------------------------------------------------------- -; Routine: Label_DC68 +; Routine: SubCDC51_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6506,10 +6514,10 @@ Label_DC51: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DC68: +SubCDC51_Block: rts ; CPU:$DC68 PRG:1C68 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DC69 +; Routine: HandleObjectState08 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6517,13 +6525,13 @@ Label_DC68: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DC69: +HandleObjectState08: lda #$FF ; CPU:$DC69 PRG:1C69 A9 FF jsr $DFE4 ; CPU:$DC6B PRG:1C6B 20 E4 DF - bne Label_DC71 ; CPU:$DC6E PRG:1C6E D0 01 + bne HandleObjectState08_Block ; CPU:$DC6E PRG:1C6E D0 01 rts ; CPU:$DC70 PRG:1C70 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DC71 +; Routine: HandleObjectState08_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6531,22 +6539,22 @@ Label_DC69: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DC71: +HandleObjectState08_Block: jsr $EFD5 ; CPU:$DC71 PRG:1C71 20 D5 EF stx Zp04 ; CPU:$DC74 PRG:1C74 86 04 jsr $EAEC ; CPU:$DC76 PRG:1C76 20 EC EA inc Zp01 ; CPU:$DC79 PRG:1C79 E6 01 lda Zp01 ; CPU:$DC7B PRG:1C7B A5 01 and #$01 ; CPU:$DC7D PRG:1C7D 29 01 - beq Label_DC90 ; CPU:$DC7F PRG:1C7F F0 0F + beq SubCDC90 ; CPU:$DC7F PRG:1C7F F0 0F ldx Zp5D ; CPU:$DC81 PRG:1C81 A6 5D lda Zp68,x ; CPU:$DC83 PRG:1C83 B5 68 and #$01 ; CPU:$DC85 PRG:1C85 29 01 - beq Label_DC8E ; CPU:$DC87 PRG:1C87 F0 05 + beq HandleObjectState08_Block_1 ; CPU:$DC87 PRG:1C87 F0 05 dec Zp00 ; CPU:$DC89 PRG:1C89 C6 00 jmp $DC90 ; CPU:$DC8B PRG:1C8B 4C 90 DC ; ----------------------------------------------------------------------------- -; Routine: Label_DC8E +; Routine: HandleObjectState08_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6554,10 +6562,10 @@ Label_DC71: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DC8E: +HandleObjectState08_Block_1: inc Zp00 ; CPU:$DC8E PRG:1C8E E6 00 ; ----------------------------------------------------------------------------- -; Routine: Label_DC90 +; Routine: SubCDC90 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6565,7 +6573,7 @@ Label_DC8E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DC90: +SubCDC90: jsr $DBEE ; CPU:$DC90 PRG:1C90 20 EE DB ldx Zp5D ; CPU:$DC93 PRG:1C93 A6 5D lda Zp72,x ; CPU:$DC95 PRG:1C95 B5 72 @@ -6575,18 +6583,18 @@ Label_DC90: jsr $C853 ; CPU:$DC9E PRG:1C9E 20 53 C8 lda Zp01 ; CPU:$DCA1 PRG:1CA1 A5 01 jsr $E112 ; CPU:$DCA3 PRG:1CA3 20 12 E1 - beq Label_DCCF ; CPU:$DCA6 PRG:1CA6 F0 27 + beq SubCDCC9_Block ; CPU:$DCA6 PRG:1CA6 F0 27 ldx Zp5D ; CPU:$DCA8 PRG:1CA8 A6 5D lda #$10 ; CPU:$DCAA PRG:1CAA A9 10 sta Zp5E,x ; CPU:$DCAC PRG:1CAC 95 5E jsr $E130 ; CPU:$DCAE PRG:1CAE 20 30 E1 - beq Label_DCBC ; CPU:$DCB1 PRG:1CB1 F0 09 + beq SubCDC90_Block ; CPU:$DCB1 PRG:1CB1 F0 09 lda Zp19 ; CPU:$DCB3 PRG:1CB3 A5 19 and #$01 ; CPU:$DCB5 PRG:1CB5 29 01 - beq Label_DCBC ; CPU:$DCB7 PRG:1CB7 F0 03 + beq SubCDC90_Block ; CPU:$DCB7 PRG:1CB7 F0 03 jmp $DCC9 ; CPU:$DCB9 PRG:1CB9 4C C9 DC ; ----------------------------------------------------------------------------- -; Routine: Label_DCBC +; Routine: SubCDC90_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6594,17 +6602,17 @@ Label_DC90: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DCBC: +SubCDC90_Block: ldx Zp5D ; CPU:$DCBC PRG:1CBC A6 5D lda Zp68,x ; CPU:$DCBE PRG:1CBE B5 68 tax ; CPU:$DCC0 PRG:1CC0 AA dex ; CPU:$DCC1 PRG:1CC1 CA lda Zp7E,x ; CPU:$DCC2 PRG:1CC2 B5 7E cmp #$04 ; CPU:$DCC4 PRG:1CC4 C9 04 - bcs Label_DCC9 ; CPU:$DCC6 PRG:1CC6 B0 01 + bcs SubCDCC9 ; CPU:$DCC6 PRG:1CC6 B0 01 rts ; CPU:$DCC8 PRG:1CC8 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DCC9 +; Routine: SubCDCC9 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6612,12 +6620,12 @@ Label_DCBC: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DCC9: +SubCDCC9: ldx Zp5D ; CPU:$DCC9 PRG:1CC9 A6 5D lda #$20 ; CPU:$DCCB PRG:1CCB A9 20 sta Zp5E,x ; CPU:$DCCD PRG:1CCD 95 5E ; ----------------------------------------------------------------------------- -; Routine: Label_DCCF +; Routine: SubCDCC9_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6625,10 +6633,10 @@ Label_DCC9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DCCF: +SubCDCC9_Block: rts ; CPU:$DCCF PRG:1CCF 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DCD0 +; Routine: HandleObjectState10 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6636,13 +6644,13 @@ Label_DCCF: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DCD0: +HandleObjectState10: lda #$77 ; CPU:$DCD0 PRG:1CD0 A9 77 jsr $DFE4 ; CPU:$DCD2 PRG:1CD2 20 E4 DF - bne Label_DCD8 ; CPU:$DCD5 PRG:1CD5 D0 01 + bne HandleObjectState10_Block ; CPU:$DCD5 PRG:1CD5 D0 01 rts ; CPU:$DCD7 PRG:1CD7 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DCD8 +; Routine: HandleObjectState10_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6650,7 +6658,7 @@ Label_DCD0: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DCD8: +HandleObjectState10_Block: jsr $EFD5 ; CPU:$DCD8 PRG:1CD8 20 D5 EF stx Zp04 ; CPU:$DCDB PRG:1CDB 86 04 jsr $EAEC ; CPU:$DCDD PRG:1CDD 20 EC EA @@ -6659,12 +6667,12 @@ Label_DCD8: ldx Zp5D ; CPU:$DCE5 PRG:1CE5 A6 5D sta Zp68,x ; CPU:$DCE7 PRG:1CE7 95 68 and #$01 ; CPU:$DCE9 PRG:1CE9 29 01 - bne Label_DD00 ; CPU:$DCEB PRG:1CEB D0 13 + bne HandleObjectState10_Block_1 ; CPU:$DCEB PRG:1CEB D0 13 inc Zp00 ; CPU:$DCED PRG:1CED E6 00 lda Zp00 ; CPU:$DCEF PRG:1CEF A5 00 ldx #$00 ; CPU:$DCF1 PRG:1CF1 A2 00 ; ----------------------------------------------------------------------------- -; Routine: Label_DCF3 +; Routine: SubCDCF3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6672,15 +6680,15 @@ Label_DCD8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DCF3: +SubCDCF3: cmp $C3FC,x ; CPU:$DCF3 PRG:1CF3 DD FC C3 - beq Label_DD13 ; CPU:$DCF6 PRG:1CF6 F0 1B + beq SubCDD06_Block ; CPU:$DCF6 PRG:1CF6 F0 1B inx ; CPU:$DCF8 PRG:1CF8 E8 cpx #$0B ; CPU:$DCF9 PRG:1CF9 E0 0B - beq Label_DD25 ; CPU:$DCFB PRG:1CFB F0 28 + beq SubCDD06_Block_1 ; CPU:$DCFB PRG:1CFB F0 28 jmp $DCF3 ; CPU:$DCFD PRG:1CFD 4C F3 DC ; ----------------------------------------------------------------------------- -; Routine: Label_DD00 +; Routine: HandleObjectState10_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6688,12 +6696,12 @@ Label_DCF3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DD00: +HandleObjectState10_Block_1: dec Zp00 ; CPU:$DD00 PRG:1D00 C6 00 lda Zp00 ; CPU:$DD02 PRG:1D02 A5 00 ldx #$00 ; CPU:$DD04 PRG:1D04 A2 00 ; ----------------------------------------------------------------------------- -; Routine: Label_DD06 +; Routine: SubCDD06 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6701,15 +6709,15 @@ Label_DD00: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DD06: +SubCDD06: cmp $C412,x ; CPU:$DD06 PRG:1D06 DD 12 C4 - beq Label_DD13 ; CPU:$DD09 PRG:1D09 F0 08 + beq SubCDD06_Block ; CPU:$DD09 PRG:1D09 F0 08 inx ; CPU:$DD0B PRG:1D0B E8 cpx #$0B ; CPU:$DD0C PRG:1D0C E0 0B - beq Label_DD25 ; CPU:$DD0E PRG:1D0E F0 15 + beq SubCDD06_Block_1 ; CPU:$DD0E PRG:1D0E F0 15 jmp $DD06 ; CPU:$DD10 PRG:1D10 4C 06 DD ; ----------------------------------------------------------------------------- -; Routine: Label_DD13 +; Routine: SubCDD06_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6717,18 +6725,18 @@ Label_DD06: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DD13: +SubCDD06_Block: lda Zp01 ; CPU:$DD13 PRG:1D13 A5 01 clc ; CPU:$DD15 PRG:1D15 18 adc $C407,x ; CPU:$DD16 PRG:1D16 7D 07 C4 sta Zp01 ; CPU:$DD19 PRG:1D19 85 01 cpx #$0A ; CPU:$DD1B PRG:1D1B E0 0A - bne Label_DD25 ; CPU:$DD1D PRG:1D1D D0 06 + bne SubCDD06_Block_1 ; CPU:$DD1D PRG:1D1D D0 06 ldx Zp5D ; CPU:$DD1F PRG:1D1F A6 5D lda #$01 ; CPU:$DD21 PRG:1D21 A9 01 sta Zp5E,x ; CPU:$DD23 PRG:1D23 95 5E ; ----------------------------------------------------------------------------- -; Routine: Label_DD25 +; Routine: SubCDD06_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6736,7 +6744,7 @@ Label_DD13: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DD25: +SubCDD06_Block_1: jsr $DBEE ; CPU:$DD25 PRG:1D25 20 EE DB ldx Zp5D ; CPU:$DD28 PRG:1D28 A6 5D lda Zp72,x ; CPU:$DD2A PRG:1D2A B5 72 @@ -6755,10 +6763,10 @@ Label_DD25: UpdateSpritePosition68: lda #$55 ; CPU:$DD32 PRG:1D32 A9 55 jsr $DFE4 ; CPU:$DD34 PRG:1D34 20 E4 DF - bne Label_DD3A ; CPU:$DD37 PRG:1D37 D0 01 + bne UpdateSpritePosition68_Block ; CPU:$DD37 PRG:1D37 D0 01 rts ; CPU:$DD39 PRG:1D39 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DD3A +; Routine: UpdateSpritePosition68_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6766,7 +6774,7 @@ UpdateSpritePosition68: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DD3A: +UpdateSpritePosition68_Block: jsr $EFD5 ; CPU:$DD3A PRG:1D3A 20 D5 EF stx Zp04 ; CPU:$DD3D PRG:1D3D 86 04 jsr $EAEC ; CPU:$DD3F PRG:1D3F 20 EC EA @@ -6775,14 +6783,14 @@ Label_DD3A: ldx Zp5D ; CPU:$DD47 PRG:1D47 A6 5D sta Zp68,x ; CPU:$DD49 PRG:1D49 95 68 and #$01 ; CPU:$DD4B PRG:1D4B 29 01 - bne Label_DD60 ; CPU:$DD4D PRG:1D4D D0 11 + bne UpdateSpritePosition68_Block_2 ; CPU:$DD4D PRG:1D4D D0 11 dec Zp00 ; CPU:$DD4F PRG:1D4F C6 00 lda Zp01 ; CPU:$DD51 PRG:1D51 A5 01 cmp #$14 ; CPU:$DD53 PRG:1D53 C9 14 - bne Label_DD59 ; CPU:$DD55 PRG:1D55 D0 02 + bne UpdateSpritePosition68_Block_1 ; CPU:$DD55 PRG:1D55 D0 02 dec Zp01 ; CPU:$DD57 PRG:1D57 C6 01 ; ----------------------------------------------------------------------------- -; Routine: Label_DD59 +; Routine: UpdateSpritePosition68_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6790,12 +6798,12 @@ Label_DD3A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DD59: +UpdateSpritePosition68_Block_1: lda Zp00 ; CPU:$DD59 PRG:1D59 A5 00 - bne Label_DD73 ; CPU:$DD5B PRG:1D5B D0 16 + bne UpdateSpritePosition68_Block_4 ; CPU:$DD5B PRG:1D5B D0 16 jmp $DD7F ; CPU:$DD5D PRG:1D5D 4C 7F DD ; ----------------------------------------------------------------------------- -; Routine: Label_DD60 +; Routine: UpdateSpritePosition68_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6803,14 +6811,14 @@ Label_DD59: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DD60: +UpdateSpritePosition68_Block_2: inc Zp00 ; CPU:$DD60 PRG:1D60 E6 00 lda Zp01 ; CPU:$DD62 PRG:1D62 A5 01 cmp #$EC ; CPU:$DD64 PRG:1D64 C9 EC - bne Label_DD6A ; CPU:$DD66 PRG:1D66 D0 02 + bne UpdateSpritePosition68_Block_3 ; CPU:$DD66 PRG:1D66 D0 02 dec Zp01 ; CPU:$DD68 PRG:1D68 C6 01 ; ----------------------------------------------------------------------------- -; Routine: Label_DD6A +; Routine: UpdateSpritePosition68_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6818,13 +6826,13 @@ Label_DD60: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DD6A: +UpdateSpritePosition68_Block_3: lda Zp00 ; CPU:$DD6A PRG:1D6A A5 00 cmp #$F4 ; CPU:$DD6C PRG:1D6C C9 F4 - bne Label_DD73 ; CPU:$DD6E PRG:1D6E D0 03 + bne UpdateSpritePosition68_Block_4 ; CPU:$DD6E PRG:1D6E D0 03 jmp $DD7F ; CPU:$DD70 PRG:1D70 4C 7F DD ; ----------------------------------------------------------------------------- -; Routine: Label_DD73 +; Routine: UpdateSpritePosition68_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6832,14 +6840,14 @@ Label_DD6A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DD73: +UpdateSpritePosition68_Block_4: jsr $DBEE ; CPU:$DD73 PRG:1D73 20 EE DB ldx Zp5D ; CPU:$DD76 PRG:1D76 A6 5D lda Zp72,x ; CPU:$DD78 PRG:1D78 B5 72 sta Zp02 ; CPU:$DD7A PRG:1D7A 85 02 jmp $EADB ; CPU:$DD7C PRG:1D7C 4C DB EA ; ----------------------------------------------------------------------------- -; Routine: Label_DD7F +; Routine: SubCDD7F ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6847,7 +6855,7 @@ Label_DD73: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DD7F: +SubCDD7F: lda #$22 ; CPU:$DD7F PRG:1D7F A9 22 jsr $F092 ; CPU:$DD81 PRG:1D81 20 92 F0 lda #$00 ; CPU:$DD84 PRG:1D84 A9 00 @@ -6855,7 +6863,7 @@ Label_DD7F: sta Zp68,x ; CPU:$DD88 PRG:1D88 95 68 rts ; CPU:$DD8A PRG:1D8A 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DD8B +; Routine: HandleObjectStateC0 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6863,15 +6871,15 @@ Label_DD7F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DD8B: +HandleObjectStateC0: sta Zp07 ; CPU:$DD8B PRG:1D8B 85 07 ldx Zp5D ; CPU:$DD8D PRG:1D8D A6 5D lda Zp5E,x ; CPU:$DD8F PRG:1D8F B5 5E cmp #$C2 ; CPU:$DD91 PRG:1D91 C9 C2 - bne Label_DD98 ; CPU:$DD93 PRG:1D93 D0 03 + bne HandleObjectStateC0_Block ; CPU:$DD93 PRG:1D93 D0 03 jmp $DE82 ; CPU:$DD95 PRG:1D95 4C 82 DE ; ----------------------------------------------------------------------------- -; Routine: Label_DD98 +; Routine: HandleObjectStateC0_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6879,18 +6887,18 @@ Label_DD8B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DD98: +HandleObjectStateC0_Block: cmp #$C1 ; CPU:$DD98 PRG:1D98 C9 C1 - beq Label_DDD7 ; CPU:$DD9A PRG:1D9A F0 3B + beq SubCDDB2_Block_1 ; CPU:$DD9A PRG:1D9A F0 3B lda Zp07 ; CPU:$DD9C PRG:1D9C A5 07 cmp #$02 ; CPU:$DD9E PRG:1D9E C9 02 - beq Label_DDAB ; CPU:$DDA0 PRG:1DA0 F0 09 + beq HandleObjectStateC0_Block_1 ; CPU:$DDA0 PRG:1DA0 F0 09 cmp #$03 ; CPU:$DDA2 PRG:1DA2 C9 03 - beq Label_DDB0 ; CPU:$DDA4 PRG:1DA4 F0 0A + beq HandleObjectStateC0_Block_2 ; CPU:$DDA4 PRG:1DA4 F0 0A lda #$34 ; CPU:$DDA6 PRG:1DA6 A9 34 jmp $DDB2 ; CPU:$DDA8 PRG:1DA8 4C B2 DD ; ----------------------------------------------------------------------------- -; Routine: Label_DDAB +; Routine: HandleObjectStateC0_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6898,11 +6906,11 @@ Label_DD98: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DDAB: +HandleObjectStateC0_Block_1: lda #$36 ; CPU:$DDAB PRG:1DAB A9 36 jmp $DDB2 ; CPU:$DDAD PRG:1DAD 4C B2 DD ; ----------------------------------------------------------------------------- -; Routine: Label_DDB0 +; Routine: HandleObjectStateC0_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6910,10 +6918,10 @@ Label_DDAB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DDB0: +HandleObjectStateC0_Block_2: lda #$38 ; CPU:$DDB0 PRG:1DB0 A9 38 ; ----------------------------------------------------------------------------- -; Routine: Label_DDB2 +; Routine: SubCDDB2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6921,7 +6929,7 @@ Label_DDB0: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DDB2: +SubCDDB2: jsr $C853 ; CPU:$DDB2 PRG:1DB2 20 53 C8 jsr $EFD5 ; CPU:$DDB5 PRG:1DB5 20 D5 EF stx Zp04 ; CPU:$DDB8 PRG:1DB8 86 04 @@ -6929,10 +6937,10 @@ Label_DDB2: jsr $E112 ; CPU:$DDBD PRG:1DBD 20 12 E1 ldy Zp0A ; CPU:$DDC0 PRG:1DC0 A4 0A cpy #$04 ; CPU:$DDC2 PRG:1DC2 C0 04 - bne Label_DDC9 ; CPU:$DDC4 PRG:1DC4 D0 03 + bne SubCDDB2_Block ; CPU:$DDC4 PRG:1DC4 D0 03 jmp $DE73 ; CPU:$DDC6 PRG:1DC6 4C 73 DE ; ----------------------------------------------------------------------------- -; Routine: Label_DDC9 +; Routine: SubCDDB2_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6940,16 +6948,16 @@ Label_DDB2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DDC9: +SubCDDB2_Block: cmp #$00 ; CPU:$DDC9 PRG:1DC9 C9 00 - beq Label_DDD7 ; CPU:$DDCB PRG:1DCB F0 0A + beq SubCDDB2_Block_1 ; CPU:$DDCB PRG:1DCB F0 0A ldx Zp5D ; CPU:$DDCD PRG:1DCD A6 5D lda #$01 ; CPU:$DDCF PRG:1DCF A9 01 sta Zp8A,x ; CPU:$DDD1 PRG:1DD1 95 8A lda #$C1 ; CPU:$DDD3 PRG:1DD3 A9 C1 sta Zp5E,x ; CPU:$DDD5 PRG:1DD5 95 5E ; ----------------------------------------------------------------------------- -; Routine: Label_DDD7 +; Routine: SubCDDB2_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6957,22 +6965,22 @@ Label_DDC9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DDD7: +SubCDDB2_Block_1: jsr $EFD5 ; CPU:$DDD7 PRG:1DD7 20 D5 EF stx Zp04 ; CPU:$DDDA PRG:1DDA 86 04 ldx Zp5D ; CPU:$DDDC PRG:1DDC A6 5D lda Zp5E,x ; CPU:$DDDE PRG:1DDE B5 5E cmp #$C1 ; CPU:$DDE0 PRG:1DE0 C9 C1 - bne Label_DE13 ; CPU:$DDE2 PRG:1DE2 D0 2F + bne SubCDDB2_Block_4 ; CPU:$DDE2 PRG:1DE2 D0 2F lda #$20 ; CPU:$DDE4 PRG:1DE4 A9 20 jsr $DFE4 ; CPU:$DDE6 PRG:1DE6 20 E4 DF - bne Label_DDF5 ; CPU:$DDE9 PRG:1DE9 D0 0A + bne SubCDDB2_Block_2 ; CPU:$DDE9 PRG:1DE9 D0 0A ldx Zp04 ; CPU:$DDEB PRG:1DEB A6 04 lda $0200,x ; CPU:$DDED PRG:1DED BD 00 02 sta Zp01 ; CPU:$DDF0 PRG:1DF0 85 01 jmp $DE27 ; CPU:$DDF2 PRG:1DF2 4C 27 DE ; ----------------------------------------------------------------------------- -; Routine: Label_DDF5 +; Routine: SubCDDB2_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6980,19 +6988,19 @@ Label_DDD7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DDF5: +SubCDDB2_Block_2: ldx Zp5D ; CPU:$DDF5 PRG:1DF5 A6 5D lda #$C0 ; CPU:$DDF7 PRG:1DF7 A9 C0 sta Zp5E,x ; CPU:$DDF9 PRG:1DF9 95 5E lda Zp07 ; CPU:$DDFB PRG:1DFB A5 07 cmp #$03 ; CPU:$DDFD PRG:1DFD C9 03 - bne Label_DE10 ; CPU:$DDFF PRG:1DFF D0 0F + bne SubCDE0D_Block ; CPU:$DDFF PRG:1DFF D0 0F lda $0417,x ; CPU:$DE01 PRG:1E01 BD 17 04 - beq Label_DE0B ; CPU:$DE04 PRG:1E04 F0 05 + beq SubCDDB2_Block_3 ; CPU:$DE04 PRG:1E04 F0 05 lda #$00 ; CPU:$DE06 PRG:1E06 A9 00 jmp $DE0D ; CPU:$DE08 PRG:1E08 4C 0D DE ; ----------------------------------------------------------------------------- -; Routine: Label_DE0B +; Routine: SubCDDB2_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7000,10 +7008,10 @@ Label_DDF5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DE0B: +SubCDDB2_Block_3: lda #$01 ; CPU:$DE0B PRG:1E0B A9 01 ; ----------------------------------------------------------------------------- -; Routine: Label_DE0D +; Routine: SubCDE0D ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7011,10 +7019,10 @@ Label_DE0B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DE0D: +SubCDE0D: sta $0417,x ; CPU:$DE0D PRG:1E0D 9D 17 04 ; ----------------------------------------------------------------------------- -; Routine: Label_DE10 +; Routine: SubCDE0D_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7022,10 +7030,10 @@ Label_DE0D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DE10: +SubCDE0D_Block: jmp $DE1A ; CPU:$DE10 PRG:1E10 4C 1A DE ; ----------------------------------------------------------------------------- -; Routine: Label_DE13 +; Routine: SubCDDB2_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7033,12 +7041,12 @@ Label_DE10: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DE13: +SubCDDB2_Block_4: lda #$FF ; CPU:$DE13 PRG:1E13 A9 FF jsr $DFE4 ; CPU:$DE15 PRG:1E15 20 E4 DF - beq Label_DE85 ; CPU:$DE18 PRG:1E18 F0 6B + beq SubCDE82_Block ; CPU:$DE18 PRG:1E18 F0 6B ; ----------------------------------------------------------------------------- -; Routine: Label_DE1A +; Routine: SubCDE1A ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7046,7 +7054,7 @@ Label_DE13: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DE1A: +SubCDE1A: ldx Zp04 ; CPU:$DE1A PRG:1E1A A6 04 lda #$01 ; CPU:$DE1C PRG:1E1C A9 01 clc ; CPU:$DE1E PRG:1E1E 18 @@ -7054,7 +7062,7 @@ Label_DE1A: sta Zp01 ; CPU:$DE22 PRG:1E22 85 01 jsr $DE86 ; CPU:$DE24 PRG:1E24 20 86 DE ; ----------------------------------------------------------------------------- -; Routine: Label_DE27 +; Routine: SubCDE27 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7062,17 +7070,17 @@ Label_DE1A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DE27: +SubCDE27: inx ; CPU:$DE27 PRG:1E27 E8 inx ; CPU:$DE28 PRG:1E28 E8 inx ; CPU:$DE29 PRG:1E29 E8 lda Zp07 ; CPU:$DE2A PRG:1E2A A5 07 cmp #$02 ; CPU:$DE2C PRG:1E2C C9 02 - bne Label_DE36 ; CPU:$DE2E PRG:1E2E D0 06 + bne SubCDE27_Block ; CPU:$DE2E PRG:1E2E D0 06 inc $0200,x ; CPU:$DE30 PRG:1E30 FE 00 02 jmp $DE56 ; CPU:$DE33 PRG:1E33 4C 56 DE ; ----------------------------------------------------------------------------- -; Routine: Label_DE36 +; Routine: SubCDE27_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7080,20 +7088,20 @@ Label_DE27: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DE36: +SubCDE27_Block: cmp #$03 ; CPU:$DE36 PRG:1E36 C9 03 - bne Label_DE56 ; CPU:$DE38 PRG:1E38 D0 1C + bne SubCDE56 ; CPU:$DE38 PRG:1E38 D0 1C lda Zp01 ; CPU:$DE3A PRG:1E3A A5 01 and #$01 ; CPU:$DE3C PRG:1E3C 29 01 - beq Label_DE56 ; CPU:$DE3E PRG:1E3E F0 16 + beq SubCDE56 ; CPU:$DE3E PRG:1E3E F0 16 ldy Zp5D ; CPU:$DE40 PRG:1E40 A4 5D lda $0417,y ; CPU:$DE42 PRG:1E42 B9 17 04 - bne Label_DE50 ; CPU:$DE45 PRG:1E45 D0 09 + bne SubCDE27_Block_1 ; CPU:$DE45 PRG:1E45 D0 09 inc $0200,x ; CPU:$DE47 PRG:1E47 FE 00 02 inc $0200,x ; CPU:$DE4A PRG:1E4A FE 00 02 jmp $DE56 ; CPU:$DE4D PRG:1E4D 4C 56 DE ; ----------------------------------------------------------------------------- -; Routine: Label_DE50 +; Routine: SubCDE27_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7101,11 +7109,11 @@ Label_DE36: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DE50: +SubCDE27_Block_1: dec $0200,x ; CPU:$DE50 PRG:1E50 DE 00 02 dec $0200,x ; CPU:$DE53 PRG:1E53 DE 00 02 ; ----------------------------------------------------------------------------- -; Routine: Label_DE56 +; Routine: SubCDE56 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7113,17 +7121,17 @@ Label_DE50: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DE56: +SubCDE56: lda $0200,x ; CPU:$DE56 PRG:1E56 BD 00 02 sta Zp00 ; CPU:$DE59 PRG:1E59 85 00 ldx Zp5D ; CPU:$DE5B PRG:1E5B A6 5D lda Zp72,x ; CPU:$DE5D PRG:1E5D B5 72 cmp #$90 ; CPU:$DE5F PRG:1E5F C9 90 - bne Label_DE68 ; CPU:$DE61 PRG:1E61 D0 05 + bne SubCDE56_Block ; CPU:$DE61 PRG:1E61 D0 05 lda #$94 ; CPU:$DE63 PRG:1E63 A9 94 jmp $DE6A ; CPU:$DE65 PRG:1E65 4C 6A DE ; ----------------------------------------------------------------------------- -; Routine: Label_DE68 +; Routine: SubCDE56_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7131,10 +7139,10 @@ Label_DE56: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DE68: +SubCDE56_Block: lda #$90 ; CPU:$DE68 PRG:1E68 A9 90 ; ----------------------------------------------------------------------------- -; Routine: Label_DE6A +; Routine: SubCDE6A ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7142,13 +7150,13 @@ Label_DE68: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DE6A: +SubCDE6A: sta Zp02 ; CPU:$DE6A PRG:1E6A 85 02 ldx Zp5D ; CPU:$DE6C PRG:1E6C A6 5D sta Zp72,x ; CPU:$DE6E PRG:1E6E 95 72 jmp $EADB ; CPU:$DE70 PRG:1E70 4C DB EA ; ----------------------------------------------------------------------------- -; Routine: Label_DE73 +; Routine: SubCDE73 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7156,7 +7164,7 @@ Label_DE6A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DE73: +SubCDE73: lda #$C2 ; CPU:$DE73 PRG:1E73 A9 C2 ldx Zp5D ; CPU:$DE75 PRG:1E75 A6 5D sta Zp5E,x ; CPU:$DE77 PRG:1E77 95 5E @@ -7165,7 +7173,7 @@ Label_DE73: sta $042B ; CPU:$DE7E PRG:1E7E 8D 2B 04 rts ; CPU:$DE81 PRG:1E81 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DE82 +; Routine: SubCDE82 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7173,10 +7181,10 @@ Label_DE73: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DE82: +SubCDE82: jsr $DEA5 ; CPU:$DE82 PRG:1E82 20 A5 DE ; ----------------------------------------------------------------------------- -; Routine: Label_DE85 +; Routine: SubCDE82_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7184,10 +7192,10 @@ Label_DE82: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DE85: +SubCDE82_Block: rts ; CPU:$DE85 PRG:1E85 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DE86 +; Routine: SubCDE86 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7195,14 +7203,14 @@ Label_DE85: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DE86: +SubCDE86: lda Zp07 ; CPU:$DE86 PRG:1E86 A5 07 cmp #$01 ; CPU:$DE88 PRG:1E88 C9 01 - bne Label_DEA4 ; CPU:$DE8A PRG:1E8A D0 18 + bne SubCDEA4 ; CPU:$DE8A PRG:1E8A D0 18 ldy #$00 ; CPU:$DE8C PRG:1E8C A0 00 lda Zp01 ; CPU:$DE8E PRG:1E8E A5 01 ; ----------------------------------------------------------------------------- -; Routine: Label_DE90 +; Routine: SubCDE86_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7210,15 +7218,15 @@ Label_DE86: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DE90: +SubCDE86_Block: cmp $C41D,y ; CPU:$DE90 PRG:1E90 D9 1D C4 - bcc Label_DE9F ; CPU:$DE93 PRG:1E93 90 0A + bcc SubCDE86_Block_1 ; CPU:$DE93 PRG:1E93 90 0A cmp $C420,y ; CPU:$DE95 PRG:1E95 D9 20 C4 - bcs Label_DE9F ; CPU:$DE98 PRG:1E98 B0 05 + bcs SubCDE86_Block_1 ; CPU:$DE98 PRG:1E98 B0 05 inc Zp01 ; CPU:$DE9A PRG:1E9A E6 01 jmp $DEA4 ; CPU:$DE9C PRG:1E9C 4C A4 DE ; ----------------------------------------------------------------------------- -; Routine: Label_DE9F +; Routine: SubCDE86_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7226,12 +7234,12 @@ Label_DE90: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DE9F: +SubCDE86_Block_1: iny ; CPU:$DE9F PRG:1E9F C8 cpy #$03 ; CPU:$DEA0 PRG:1EA0 C0 03 - bne Label_DE90 ; CPU:$DEA2 PRG:1EA2 D0 EC + bne SubCDE86_Block ; CPU:$DEA2 PRG:1EA2 D0 EC ; ----------------------------------------------------------------------------- -; Routine: Label_DEA4 +; Routine: SubCDEA4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7239,10 +7247,10 @@ Label_DE9F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DEA4: +SubCDEA4: rts ; CPU:$DEA4 PRG:1EA4 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DEA5 +; Routine: SubCDEA5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7250,7 +7258,7 @@ Label_DEA4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DEA5: +SubCDEA5: jsr $EFD5 ; CPU:$DEA5 PRG:1EA5 20 D5 EF stx Zp04 ; CPU:$DEA8 PRG:1EA8 86 04 jsr $EAEC ; CPU:$DEAA PRG:1EAA 20 EC EA @@ -7259,29 +7267,29 @@ Label_DEA5: sec ; CPU:$DEB2 PRG:1EB2 38 sbc #$01 ; CPU:$DEB3 PRG:1EB3 E9 01 cmp Zp00 ; CPU:$DEB5 PRG:1EB5 C5 00 - beq Label_DEE8 ; CPU:$DEB7 PRG:1EB7 F0 2F + beq SubCDEA5_Block_1 ; CPU:$DEB7 PRG:1EB7 F0 2F sec ; CPU:$DEB9 PRG:1EB9 38 sbc #$01 ; CPU:$DEBA PRG:1EBA E9 01 cmp Zp00 ; CPU:$DEBC PRG:1EBC C5 00 - beq Label_DEE8 ; CPU:$DEBE PRG:1EBE F0 28 + beq SubCDEA5_Block_1 ; CPU:$DEBE PRG:1EBE F0 28 sec ; CPU:$DEC0 PRG:1EC0 38 sbc #$01 ; CPU:$DEC1 PRG:1EC1 E9 01 cmp Zp00 ; CPU:$DEC3 PRG:1EC3 C5 00 - beq Label_DEF2 ; CPU:$DEC5 PRG:1EC5 F0 2B + beq SubCDEA5_Block_3 ; CPU:$DEC5 PRG:1EC5 F0 2B sec ; CPU:$DEC7 PRG:1EC7 38 sbc #$08 ; CPU:$DEC8 PRG:1EC8 E9 08 cmp Zp00 ; CPU:$DECA PRG:1ECA C5 00 - beq Label_DEED ; CPU:$DECC PRG:1ECC F0 1F + beq SubCDEA5_Block_2 ; CPU:$DECC PRG:1ECC F0 1F sec ; CPU:$DECE PRG:1ECE 38 sbc #$01 ; CPU:$DECF PRG:1ECF E9 01 cmp Zp00 ; CPU:$DED1 PRG:1ED1 C5 00 - beq Label_DEED ; CPU:$DED3 PRG:1ED3 F0 18 + beq SubCDEA5_Block_2 ; CPU:$DED3 PRG:1ED3 F0 18 sec ; CPU:$DED5 PRG:1ED5 38 sbc #$01 ; CPU:$DED6 PRG:1ED6 E9 01 cmp Zp00 ; CPU:$DED8 PRG:1ED8 C5 00 - bne Label_DEFB ; CPU:$DEDA PRG:1EDA D0 1F + bne SubCDEFB ; CPU:$DEDA PRG:1EDA D0 1F ; ----------------------------------------------------------------------------- -; Routine: Label_DEDC +; Routine: SubCDEA5_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7289,7 +7297,7 @@ Label_DEA5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DEDC: +SubCDEA5_Block: lda #$01 ; CPU:$DEDC PRG:1EDC A9 01 ldx Zp5D ; CPU:$DEDE PRG:1EDE A6 5D sta Zp5E,x ; CPU:$DEE0 PRG:1EE0 95 5E @@ -7297,7 +7305,7 @@ Label_DEDC: sta $0417,x ; CPU:$DEE4 PRG:1EE4 9D 17 04 rts ; CPU:$DEE7 PRG:1EE7 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DEE8 +; Routine: SubCDEA5_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7305,11 +7313,11 @@ Label_DEDC: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DEE8: +SubCDEA5_Block_1: dec Zp01 ; CPU:$DEE8 PRG:1EE8 C6 01 jmp $DEFB ; CPU:$DEEA PRG:1EEA 4C FB DE ; ----------------------------------------------------------------------------- -; Routine: Label_DEED +; Routine: SubCDEA5_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7317,11 +7325,11 @@ Label_DEE8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DEED: +SubCDEA5_Block_2: inc Zp01 ; CPU:$DEED PRG:1EED E6 01 jmp $DEFB ; CPU:$DEEF PRG:1EEF 4C FB DE ; ----------------------------------------------------------------------------- -; Routine: Label_DEF2 +; Routine: SubCDEA5_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7329,13 +7337,13 @@ Label_DEED: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DEF2: +SubCDEA5_Block_3: ldx Zp5D ; CPU:$DEF2 PRG:1EF2 A6 5D lda $0421,x ; CPU:$DEF4 PRG:1EF4 BD 21 04 cmp #$01 ; CPU:$DEF7 PRG:1EF7 C9 01 - beq Label_DEDC ; CPU:$DEF9 PRG:1EF9 F0 E1 + beq SubCDEA5_Block ; CPU:$DEF9 PRG:1EF9 F0 E1 ; ----------------------------------------------------------------------------- -; Routine: Label_DEFB +; Routine: SubCDEFB ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7343,7 +7351,7 @@ Label_DEF2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DEFB: +SubCDEFB: lda #$84 ; CPU:$DEFB PRG:1EFB A9 84 ldx Zp5D ; CPU:$DEFD PRG:1EFD A6 5D sta Zp72,x ; CPU:$DEFF PRG:1EFF 95 72 @@ -7351,7 +7359,7 @@ Label_DEFB: jsr $EADB ; CPU:$DF03 PRG:1F03 20 DB EA rts ; CPU:$DF06 PRG:1F06 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DF07 +; Routine: HandleObjectState40 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7359,13 +7367,13 @@ Label_DEFB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DF07: +HandleObjectState40: lda #$55 ; CPU:$DF07 PRG:1F07 A9 55 jsr $DFE4 ; CPU:$DF09 PRG:1F09 20 E4 DF - bne Label_DF0F ; CPU:$DF0C PRG:1F0C D0 01 + bne HandleObjectState40_Block ; CPU:$DF0C PRG:1F0C D0 01 rts ; CPU:$DF0E PRG:1F0E 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DF0F +; Routine: HandleObjectState40_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7373,18 +7381,18 @@ Label_DF07: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DF0F: +HandleObjectState40_Block: jsr $EFD5 ; CPU:$DF0F PRG:1F0F 20 D5 EF stx Zp04 ; CPU:$DF12 PRG:1F12 86 04 jsr $EAEC ; CPU:$DF14 PRG:1F14 20 EC EA inc Zp01 ; CPU:$DF17 PRG:1F17 E6 01 lda $0201,x ; CPU:$DF19 PRG:1F19 BD 01 02 cmp #$90 ; CPU:$DF1C PRG:1F1C C9 90 - beq Label_DF25 ; CPU:$DF1E PRG:1F1E F0 05 + beq HandleObjectState40_Block_1 ; CPU:$DF1E PRG:1F1E F0 05 lda #$90 ; CPU:$DF20 PRG:1F20 A9 90 jmp $DF27 ; CPU:$DF22 PRG:1F22 4C 27 DF ; ----------------------------------------------------------------------------- -; Routine: Label_DF25 +; Routine: HandleObjectState40_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7392,10 +7400,10 @@ Label_DF0F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DF25: +HandleObjectState40_Block_1: lda #$94 ; CPU:$DF25 PRG:1F25 A9 94 ; ----------------------------------------------------------------------------- -; Routine: Label_DF27 +; Routine: SubCDF27 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7403,16 +7411,16 @@ Label_DF25: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DF27: +SubCDF27: sta Zp02 ; CPU:$DF27 PRG:1F27 85 02 jsr $EADB ; CPU:$DF29 PRG:1F29 20 DB EA lda ZpC0 ; CPU:$DF2C PRG:1F2C A5 C0 cmp Zp01 ; CPU:$DF2E PRG:1F2E C5 01 - beq Label_DF35 ; CPU:$DF30 PRG:1F30 F0 03 - bcc Label_DF35 ; CPU:$DF32 PRG:1F32 90 01 + beq SubCDF27_Block ; CPU:$DF30 PRG:1F30 F0 03 + bcc SubCDF27_Block ; CPU:$DF32 PRG:1F32 90 01 rts ; CPU:$DF34 PRG:1F34 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DF35 +; Routine: SubCDF27_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7420,7 +7428,7 @@ Label_DF27: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DF35: +SubCDF27_Block: ldx Zp5D ; CPU:$DF35 PRG:1F35 A6 5D lda #$01 ; CPU:$DF37 PRG:1F37 A9 01 sta Zp5E,x ; CPU:$DF39 PRG:1F39 95 5E @@ -7428,7 +7436,7 @@ Label_DF35: sta ZpC0 ; CPU:$DF3D PRG:1F3D 85 C0 rts ; CPU:$DF3F PRG:1F3F 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DF40 +; Routine: SubCDF40 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7436,12 +7444,12 @@ Label_DF35: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DF40: +SubCDF40: lda ZpC0 ; CPU:$DF40 PRG:1F40 A5 C0 - beq Label_DF45 ; CPU:$DF42 PRG:1F42 F0 01 + beq SubCDF40_Block ; CPU:$DF42 PRG:1F42 F0 01 rts ; CPU:$DF44 PRG:1F44 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DF45 +; Routine: SubCDF40_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7449,13 +7457,13 @@ Label_DF40: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DF45: +SubCDF40_Block: lda Zp96 ; CPU:$DF45 PRG:1F45 A5 96 cmp #$0A ; CPU:$DF47 PRG:1F47 C9 0A - beq Label_DF4C ; CPU:$DF49 PRG:1F49 F0 01 + beq SubCDF40_Block_1 ; CPU:$DF49 PRG:1F49 F0 01 rts ; CPU:$DF4B PRG:1F4B 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DF4C +; Routine: SubCDF40_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7463,13 +7471,13 @@ Label_DF45: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DF4C: +SubCDF40_Block_1: lda Zp59 ; CPU:$DF4C PRG:1F4C A5 59 cmp #$03 ; CPU:$DF4E PRG:1F4E C9 03 - beq Label_DF55 ; CPU:$DF50 PRG:1F50 F0 03 + beq SubCDF40_Block_2 ; CPU:$DF50 PRG:1F50 F0 03 jmp $DF72 ; CPU:$DF52 PRG:1F52 4C 72 DF ; ----------------------------------------------------------------------------- -; Routine: Label_DF55 +; Routine: SubCDF40_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7477,14 +7485,14 @@ Label_DF4C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DF55: +SubCDF40_Block_2: ldx #$03 ; CPU:$DF55 PRG:1F55 A2 03 lda Zp7E,x ; CPU:$DF57 PRG:1F57 B5 7E cmp #$05 ; CPU:$DF59 PRG:1F59 C9 05 - bcs Label_DF5E ; CPU:$DF5B PRG:1F5B B0 01 + bcs SubCDF40_Block_3 ; CPU:$DF5B PRG:1F5B B0 01 rts ; CPU:$DF5D PRG:1F5D 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DF5E +; Routine: SubCDF40_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7492,10 +7500,10 @@ Label_DF55: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DF5E: +SubCDF40_Block_3: ldx #$00 ; CPU:$DF5E PRG:1F5E A2 00 ; ----------------------------------------------------------------------------- -; Routine: Label_DF60 +; Routine: SubCDF40_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7503,15 +7511,15 @@ Label_DF5E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DF60: +SubCDF40_Block_4: lda Zp5E,x ; CPU:$DF60 PRG:1F60 B5 5E cmp #$01 ; CPU:$DF62 PRG:1F62 C9 01 - bne Label_DF6C ; CPU:$DF64 PRG:1F64 D0 06 + bne SubCDF40_Block_5 ; CPU:$DF64 PRG:1F64 D0 06 lda Zp68,x ; CPU:$DF66 PRG:1F66 B5 68 cmp #$03 ; CPU:$DF68 PRG:1F68 C9 03 - beq Label_DF8F ; CPU:$DF6A PRG:1F6A F0 23 + beq SubCDF72_Block_3 ; CPU:$DF6A PRG:1F6A F0 23 ; ----------------------------------------------------------------------------- -; Routine: Label_DF6C +; Routine: SubCDF40_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7519,13 +7527,13 @@ Label_DF60: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DF6C: +SubCDF40_Block_5: inx ; CPU:$DF6C PRG:1F6C E8 cpx #$0A ; CPU:$DF6D PRG:1F6D E0 0A - bne Label_DF60 ; CPU:$DF6F PRG:1F6F D0 EF + bne SubCDF40_Block_4 ; CPU:$DF6F PRG:1F6F D0 EF rts ; CPU:$DF71 PRG:1F71 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DF72 +; Routine: SubCDF72 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7533,14 +7541,14 @@ Label_DF6C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DF72: +SubCDF72: ldx #$05 ; CPU:$DF72 PRG:1F72 A2 05 lda Zp7E,x ; CPU:$DF74 PRG:1F74 B5 7E cmp #$05 ; CPU:$DF76 PRG:1F76 C9 05 - bcs Label_DF7B ; CPU:$DF78 PRG:1F78 B0 01 + bcs SubCDF72_Block ; CPU:$DF78 PRG:1F78 B0 01 rts ; CPU:$DF7A PRG:1F7A 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DF7B +; Routine: SubCDF72_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7548,10 +7556,10 @@ Label_DF72: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DF7B: +SubCDF72_Block: ldx #$00 ; CPU:$DF7B PRG:1F7B A2 00 ; ----------------------------------------------------------------------------- -; Routine: Label_DF7D +; Routine: SubCDF72_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7559,15 +7567,15 @@ Label_DF7B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DF7D: +SubCDF72_Block_1: lda Zp5E,x ; CPU:$DF7D PRG:1F7D B5 5E cmp #$01 ; CPU:$DF7F PRG:1F7F C9 01 - bne Label_DF89 ; CPU:$DF81 PRG:1F81 D0 06 + bne SubCDF72_Block_2 ; CPU:$DF81 PRG:1F81 D0 06 lda Zp68,x ; CPU:$DF83 PRG:1F83 B5 68 cmp #$05 ; CPU:$DF85 PRG:1F85 C9 05 - beq Label_DF8F ; CPU:$DF87 PRG:1F87 F0 06 + beq SubCDF72_Block_3 ; CPU:$DF87 PRG:1F87 F0 06 ; ----------------------------------------------------------------------------- -; Routine: Label_DF89 +; Routine: SubCDF72_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7575,13 +7583,13 @@ Label_DF7D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DF89: +SubCDF72_Block_2: inx ; CPU:$DF89 PRG:1F89 E8 cmp #$0A ; CPU:$DF8A PRG:1F8A C9 0A - bne Label_DF7D ; CPU:$DF8C PRG:1F8C D0 EF + bne SubCDF72_Block_1 ; CPU:$DF8C PRG:1F8C D0 EF rts ; CPU:$DF8E PRG:1F8E 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DF8F +; Routine: SubCDF72_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7589,7 +7597,7 @@ Label_DF89: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DF8F: +SubCDF72_Block_3: lda #$40 ; CPU:$DF8F PRG:1F8F A9 40 sta Zp5E,x ; CPU:$DF91 PRG:1F91 95 5E dec Zp68,x ; CPU:$DF93 PRG:1F93 D6 68 @@ -7608,7 +7616,7 @@ Label_DF8F: lda $C1EB ; CPU:$DFA8 PRG:1FA8 AD EB C1 ldy #$00 ; CPU:$DFAB PRG:1FAB A0 00 ; ----------------------------------------------------------------------------- -; Routine: Label_DFAD +; Routine: SubCDFAD ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7616,15 +7624,15 @@ Label_DF8F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DFAD: +SubCDFAD: cmp Zp00 ; CPU:$DFAD PRG:1FAD C5 00 - bcs Label_DFB8 ; CPU:$DFAF PRG:1FAF B0 07 + bcs SubCDFAD_Block ; CPU:$DFAF PRG:1FAF B0 07 clc ; CPU:$DFB1 PRG:1FB1 18 adc #$18 ; CPU:$DFB2 PRG:1FB2 69 18 iny ; CPU:$DFB4 PRG:1FB4 C8 jmp $DFAD ; CPU:$DFB5 PRG:1FB5 4C AD DF ; ----------------------------------------------------------------------------- -; Routine: Label_DFB8 +; Routine: SubCDFAD_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7632,7 +7640,7 @@ Label_DFAD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DFB8: +SubCDFAD_Block: tya ; CPU:$DFB8 PRG:1FB8 98 asl a ; CPU:$DFB9 PRG:1FB9 0A clc ; CPU:$DFBA PRG:1FBA 18 @@ -7642,7 +7650,7 @@ Label_DFB8: sta ZpC0 ; CPU:$DFC0 PRG:1FC0 85 C0 rts ; CPU:$DFC2 PRG:1FC2 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DFC3 +; Routine: SubCDFC3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7650,22 +7658,22 @@ Label_DFB8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DFC3: +SubCDFC3: ldx Zp5D ; CPU:$DFC3 PRG:1FC3 A6 5D lda Zp68,x ; CPU:$DFC5 PRG:1FC5 B5 68 cmp #$01 ; CPU:$DFC7 PRG:1FC7 C9 01 - bne Label_DFE3 ; CPU:$DFC9 PRG:1FC9 D0 18 + bne SubCDFC3_Block ; CPU:$DFC9 PRG:1FC9 D0 18 jsr $EFD5 ; CPU:$DFCB PRG:1FCB 20 D5 EF lda $0203,x ; CPU:$DFCE PRG:1FCE BD 03 02 cmp #$30 ; CPU:$DFD1 PRG:1FD1 C9 30 - bcs Label_DFE3 ; CPU:$DFD3 PRG:1FD3 B0 0E + bcs SubCDFC3_Block ; CPU:$DFD3 PRG:1FD3 B0 0E lda #$23 ; CPU:$DFD5 PRG:1FD5 A9 23 sta $0202,x ; CPU:$DFD7 PRG:1FD7 9D 02 02 sta $0206,x ; CPU:$DFDA PRG:1FDA 9D 06 02 sta $020A,x ; CPU:$DFDD PRG:1FDD 9D 0A 02 sta $020E,x ; CPU:$DFE0 PRG:1FE0 9D 0E 02 ; ----------------------------------------------------------------------------- -; Routine: Label_DFE3 +; Routine: SubCDFC3_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7673,10 +7681,10 @@ Label_DFC3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DFE3: +SubCDFC3_Block: rts ; CPU:$DFE3 PRG:1FE3 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DFE4 +; Routine: CheckPeriodicEventForObject ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7684,11 +7692,11 @@ Label_DFE3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DFE4: +CheckPeriodicEventForObject: sta Zp0A ; CPU:$DFE4 PRG:1FE4 85 0A sta Zp0B ; CPU:$DFE6 PRG:1FE6 85 0B ; ----------------------------------------------------------------------------- -; Routine: Label_DFE8 +; Routine: SubCDFE8 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7696,16 +7704,16 @@ Label_DFE4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DFE8: +SubCDFE8: ldx Zp5D ; CPU:$DFE8 PRG:1FE8 A6 5D inc Zp8A,x ; CPU:$DFEA PRG:1FEA F6 8A lda Zp8A,x ; CPU:$DFEC PRG:1FEC B5 8A - bmi Label_DFF7 ; CPU:$DFEE PRG:1FEE 30 07 + bmi SubCDFE8_Block ; CPU:$DFEE PRG:1FEE 30 07 cmp #$10 ; CPU:$DFF0 PRG:1FF0 C9 10 - bcs Label_DFF7 ; CPU:$DFF2 PRG:1FF2 B0 03 + bcs SubCDFE8_Block ; CPU:$DFF2 PRG:1FF2 B0 03 jmp $DFFB ; CPU:$DFF4 PRG:1FF4 4C FB DF ; ----------------------------------------------------------------------------- -; Routine: Label_DFF7 +; Routine: SubCDFE8_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7713,11 +7721,11 @@ Label_DFE8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DFF7: +SubCDFE8_Block: lda #$00 ; CPU:$DFF7 PRG:1FF7 A9 00 sta Zp8A,x ; CPU:$DFF9 PRG:1FF9 95 8A ; ----------------------------------------------------------------------------- -; Routine: Label_DFFB +; Routine: SubCDFFB ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7725,15 +7733,15 @@ Label_DFF7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DFFB: +SubCDFFB: cmp #$08 ; CPU:$DFFB PRG:1FFB C9 08 - bcs Label_E008 ; CPU:$DFFD PRG:1FFD B0 09 + bcs SubCDFFB_Block ; CPU:$DFFD PRG:1FFD B0 09 tax ; CPU:$DFFF PRG:1FFF AA lda $C1BC,x ; CPU:$E000 PRG:2000 BD BC C1 and Zp0A ; CPU:$E003 PRG:2003 25 0A jmp $E011 ; CPU:$E005 PRG:2005 4C 11 E0 ; ----------------------------------------------------------------------------- -; Routine: Label_E008 +; Routine: SubCDFFB_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7741,14 +7749,14 @@ Label_DFFB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E008: +SubCDFFB_Block: sec ; CPU:$E008 PRG:2008 38 sbc #$08 ; CPU:$E009 PRG:2009 E9 08 tax ; CPU:$E00B PRG:200B AA lda $C1BC,x ; CPU:$E00C PRG:200C BD BC C1 and Zp0B ; CPU:$E00F PRG:200F 25 0B ; ----------------------------------------------------------------------------- -; Routine: Label_E011 +; Routine: SubCE011 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7756,11 +7764,11 @@ Label_E008: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E011: - beq Label_E015 ; CPU:$E011 PRG:2011 F0 02 +SubCE011: + beq SubCE011_Block ; CPU:$E011 PRG:2011 F0 02 lda #$01 ; CPU:$E013 PRG:2013 A9 01 ; ----------------------------------------------------------------------------- -; Routine: Label_E015 +; Routine: SubCE011_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7768,10 +7776,10 @@ Label_E011: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E015: +SubCE011_Block: rts ; CPU:$E015 PRG:2015 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E016 +; Routine: FindYRowIndex ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7779,7 +7787,7 @@ Label_E015: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E016: +FindYRowIndex: sta Zp0A ; CPU:$E016 PRG:2016 85 0A lda Zp53 ; CPU:$E018 PRG:2018 A5 53 sec ; CPU:$E01A PRG:201A 38 @@ -7794,7 +7802,7 @@ Label_E016: lda #$01 ; CPU:$E02B PRG:202B A9 01 sta Zp0B ; CPU:$E02D PRG:202D 85 0B ; ----------------------------------------------------------------------------- -; Routine: Label_E02F +; Routine: SubCE02F ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7802,18 +7810,18 @@ Label_E016: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E02F: +SubCE02F: lda (Zp08),y ; CPU:$E02F PRG:202F B1 08 cmp #$FF ; CPU:$E031 PRG:2031 C9 FF - beq Label_E041 ; CPU:$E033 PRG:2033 F0 0C + beq SubCE02F_Block ; CPU:$E033 PRG:2033 F0 0C cmp Zp0A ; CPU:$E035 PRG:2035 C5 0A - beq Label_E045 ; CPU:$E037 PRG:2037 F0 0C - bcc Label_E045 ; CPU:$E039 PRG:2039 90 0A + beq SubCE02F_Block_1 ; CPU:$E037 PRG:2037 F0 0C + bcc SubCE02F_Block_1 ; CPU:$E039 PRG:2039 90 0A inc Zp0B ; CPU:$E03B PRG:203B E6 0B iny ; CPU:$E03D PRG:203D C8 jmp $E02F ; CPU:$E03E PRG:203E 4C 2F E0 ; ----------------------------------------------------------------------------- -; Routine: Label_E041 +; Routine: SubCE02F_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7821,11 +7829,11 @@ Label_E02F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E041: +SubCE02F_Block: lda #$07 ; CPU:$E041 PRG:2041 A9 07 sta Zp0B ; CPU:$E043 PRG:2043 85 0B ; ----------------------------------------------------------------------------- -; Routine: Label_E045 +; Routine: SubCE02F_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7833,11 +7841,11 @@ Label_E041: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E045: +SubCE02F_Block_1: lda Zp0B ; CPU:$E045 PRG:2045 A5 0B rts ; CPU:$E047 PRG:2047 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E048 +; Routine: SubCE048 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7845,17 +7853,17 @@ Label_E045: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E048: +SubCE048: ldx Zp5D ; CPU:$E048 PRG:2048 A6 5D lda Zp5E,x ; CPU:$E04A PRG:204A B5 5E cmp #$01 ; CPU:$E04C PRG:204C C9 01 - bne Label_E057 ; CPU:$E04E PRG:204E D0 07 + bne SubCE048_Block ; CPU:$E04E PRG:204E D0 07 lda Zp7D ; CPU:$E050 PRG:2050 A5 7D - bne Label_E057 ; CPU:$E052 PRG:2052 D0 03 + bne SubCE048_Block ; CPU:$E052 PRG:2052 D0 03 lda #$01 ; CPU:$E054 PRG:2054 A9 01 rts ; CPU:$E056 PRG:2056 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E057 +; Routine: SubCE048_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7863,11 +7871,11 @@ Label_E048: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E057: +SubCE048_Block: lda #$00 ; CPU:$E057 PRG:2057 A9 00 rts ; CPU:$E059 PRG:2059 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E05A +; Routine: SubCE05A ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7875,17 +7883,17 @@ Label_E057: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E05A: +SubCE05A: sta Zp0C ; CPU:$E05A PRG:205A 85 0C ldx Zp5D ; CPU:$E05C PRG:205C A6 5D lda Zp68,x ; CPU:$E05E PRG:205E B5 68 cmp #$01 ; CPU:$E060 PRG:2060 C9 01 - beq Label_E079 ; CPU:$E062 PRG:2062 F0 15 + beq SubCE05A_Block ; CPU:$E062 PRG:2062 F0 15 cmp #$06 ; CPU:$E064 PRG:2064 C9 06 - beq Label_E079 ; CPU:$E066 PRG:2066 F0 11 + beq SubCE05A_Block ; CPU:$E066 PRG:2066 F0 11 ldx #$00 ; CPU:$E068 PRG:2068 A2 00 ; ----------------------------------------------------------------------------- -; Routine: Label_E06A +; Routine: SubCE06A ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7893,16 +7901,16 @@ Label_E05A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E06A: +SubCE06A: lda $C1C4,x ; CPU:$E06A PRG:206A BD C4 C1 cmp Zp0C ; CPU:$E06D PRG:206D C5 0C - beq Label_E08A ; CPU:$E06F PRG:206F F0 19 + beq SubCE07B_Block ; CPU:$E06F PRG:206F F0 19 inx ; CPU:$E071 PRG:2071 E8 cpx #$09 ; CPU:$E072 PRG:2072 E0 09 - beq Label_E08D ; CPU:$E074 PRG:2074 F0 17 + beq SubCE07B_Block_1 ; CPU:$E074 PRG:2074 F0 17 jmp $E06A ; CPU:$E076 PRG:2076 4C 6A E0 ; ----------------------------------------------------------------------------- -; Routine: Label_E079 +; Routine: SubCE05A_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7910,10 +7918,10 @@ Label_E06A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E079: +SubCE05A_Block: ldx #$04 ; CPU:$E079 PRG:2079 A2 04 ; ----------------------------------------------------------------------------- -; Routine: Label_E07B +; Routine: SubCE07B ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7921,16 +7929,16 @@ Label_E079: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E07B: +SubCE07B: lda $C1C4,x ; CPU:$E07B PRG:207B BD C4 C1 cmp Zp0C ; CPU:$E07E PRG:207E C5 0C - beq Label_E08A ; CPU:$E080 PRG:2080 F0 08 + beq SubCE07B_Block ; CPU:$E080 PRG:2080 F0 08 inx ; CPU:$E082 PRG:2082 E8 cpx #$09 ; CPU:$E083 PRG:2083 E0 09 - beq Label_E08D ; CPU:$E085 PRG:2085 F0 06 + beq SubCE07B_Block_1 ; CPU:$E085 PRG:2085 F0 06 jmp $E07B ; CPU:$E087 PRG:2087 4C 7B E0 ; ----------------------------------------------------------------------------- -; Routine: Label_E08A +; Routine: SubCE07B_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7938,11 +7946,11 @@ Label_E07B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E08A: +SubCE07B_Block: lda #$00 ; CPU:$E08A PRG:208A A9 00 rts ; CPU:$E08C PRG:208C 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E08D +; Routine: SubCE07B_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7950,11 +7958,11 @@ Label_E08A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E08D: +SubCE07B_Block_1: lda #$01 ; CPU:$E08D PRG:208D A9 01 rts ; CPU:$E08F PRG:208F 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E090 +; Routine: SubCE090 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7962,16 +7970,16 @@ Label_E08D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E090: +SubCE090: sta Zp0C ; CPU:$E090 PRG:2090 85 0C ldx Zp5D ; CPU:$E092 PRG:2092 A6 5D lda Zp68,x ; CPU:$E094 PRG:2094 B5 68 and #$01 ; CPU:$E096 PRG:2096 29 01 - beq Label_E09F ; CPU:$E098 PRG:2098 F0 05 + beq SubCE090_Block ; CPU:$E098 PRG:2098 F0 05 ldx #$00 ; CPU:$E09A PRG:209A A2 00 jmp $E0A1 ; CPU:$E09C PRG:209C 4C A1 E0 ; ----------------------------------------------------------------------------- -; Routine: Label_E09F +; Routine: SubCE090_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7979,10 +7987,10 @@ Label_E090: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E09F: +SubCE090_Block: ldx #$01 ; CPU:$E09F PRG:209F A2 01 ; ----------------------------------------------------------------------------- -; Routine: Label_E0A1 +; Routine: SubCE0A1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7990,14 +7998,14 @@ Label_E09F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E0A1: +SubCE0A1: lda $C1CD,x ; CPU:$E0A1 PRG:20A1 BD CD C1 cmp Zp0C ; CPU:$E0A4 PRG:20A4 C5 0C - beq Label_E0AB ; CPU:$E0A6 PRG:20A6 F0 03 + beq SubCE0A1_Block ; CPU:$E0A6 PRG:20A6 F0 03 lda #$00 ; CPU:$E0A8 PRG:20A8 A9 00 rts ; CPU:$E0AA PRG:20AA 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E0AB +; Routine: SubCE0A1_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8005,11 +8013,11 @@ Label_E0A1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E0AB: +SubCE0A1_Block: lda #$01 ; CPU:$E0AB PRG:20AB A9 01 rts ; CPU:$E0AD PRG:20AD 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E0AE +; Routine: SubCE0AE ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8017,23 +8025,23 @@ Label_E0AB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E0AE: +SubCE0AE: sta Zp0C ; CPU:$E0AE PRG:20AE 85 0C ldx Zp5D ; CPU:$E0B0 PRG:20B0 A6 5D lda Zp68,x ; CPU:$E0B2 PRG:20B2 B5 68 cmp #$02 ; CPU:$E0B4 PRG:20B4 C9 02 - beq Label_E0CB ; CPU:$E0B6 PRG:20B6 F0 13 + beq SubCE0AE_Block ; CPU:$E0B6 PRG:20B6 F0 13 cmp #$03 ; CPU:$E0B8 PRG:20B8 C9 03 - beq Label_E0CB ; CPU:$E0BA PRG:20BA F0 0F + beq SubCE0AE_Block ; CPU:$E0BA PRG:20BA F0 0F cmp #$04 ; CPU:$E0BC PRG:20BC C9 04 - beq Label_E0D1 ; CPU:$E0BE PRG:20BE F0 11 + beq SubCE0AE_Block_1 ; CPU:$E0BE PRG:20BE F0 11 cmp #$05 ; CPU:$E0C0 PRG:20C0 C9 05 - beq Label_E0DD ; CPU:$E0C2 PRG:20C2 F0 19 + beq SubCE0AE_Block_2 ; CPU:$E0C2 PRG:20C2 F0 19 cmp #$06 ; CPU:$E0C4 PRG:20C4 C9 06 - beq Label_E0E9 ; CPU:$E0C6 PRG:20C6 F0 21 + beq SubCE0AE_Block_3 ; CPU:$E0C6 PRG:20C6 F0 21 jmp $E0EC ; CPU:$E0C8 PRG:20C8 4C EC E0 ; ----------------------------------------------------------------------------- -; Routine: Label_E0CB +; Routine: SubCE0AE_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8041,11 +8049,11 @@ Label_E0AE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E0CB: +SubCE0AE_Block: jsr $E0F1 ; CPU:$E0CB PRG:20CB 20 F1 E0 jmp $E0EC ; CPU:$E0CE PRG:20CE 4C EC E0 ; ----------------------------------------------------------------------------- -; Routine: Label_E0D1 +; Routine: SubCE0AE_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8053,14 +8061,14 @@ Label_E0CB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E0D1: +SubCE0AE_Block_1: jsr $E0F1 ; CPU:$E0D1 PRG:20D1 20 F1 E0 ldy #$89 ; CPU:$E0D4 PRG:20D4 A0 89 cmp #$C4 ; CPU:$E0D6 PRG:20D6 C9 C4 - beq Label_E109 ; CPU:$E0D8 PRG:20D8 F0 2F + beq SubCE0F1_Block_1 ; CPU:$E0D8 PRG:20D8 F0 2F jmp $E0EC ; CPU:$E0DA PRG:20DA 4C EC E0 ; ----------------------------------------------------------------------------- -; Routine: Label_E0DD +; Routine: SubCE0AE_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8068,14 +8076,14 @@ Label_E0D1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E0DD: +SubCE0AE_Block_2: jsr $E0F1 ; CPU:$E0DD PRG:20DD 20 F1 E0 ldy #$71 ; CPU:$E0E0 PRG:20E0 A0 71 cmp #$B4 ; CPU:$E0E2 PRG:20E2 C9 B4 - beq Label_E109 ; CPU:$E0E4 PRG:20E4 F0 23 + beq SubCE0F1_Block_1 ; CPU:$E0E4 PRG:20E4 F0 23 jmp $E0EC ; CPU:$E0E6 PRG:20E6 4C EC E0 ; ----------------------------------------------------------------------------- -; Routine: Label_E0E9 +; Routine: SubCE0AE_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8083,10 +8091,10 @@ Label_E0DD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E0E9: +SubCE0AE_Block_3: jsr $E0F1 ; CPU:$E0E9 PRG:20E9 20 F1 E0 ; ----------------------------------------------------------------------------- -; Routine: Label_E0EC +; Routine: SubCE0EC ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8094,11 +8102,11 @@ Label_E0E9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E0EC: +SubCE0EC: lda #$00 ; CPU:$E0EC PRG:20EC A9 00 jmp $E10F ; CPU:$E0EE PRG:20EE 4C 0F E1 ; ----------------------------------------------------------------------------- -; Routine: Label_E0F1 +; Routine: SubCE0F1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8106,20 +8114,20 @@ Label_E0EC: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E0F1: +SubCE0F1: tax ; CPU:$E0F1 PRG:20F1 AA dex ; CPU:$E0F2 PRG:20F2 CA dex ; CPU:$E0F3 PRG:20F3 CA lda Zp0C ; CPU:$E0F4 PRG:20F4 A5 0C ldy $C172,x ; CPU:$E0F6 PRG:20F6 BC 72 C1 cmp $C177,x ; CPU:$E0F9 PRG:20F9 DD 77 C1 - beq Label_E107 ; CPU:$E0FC PRG:20FC F0 09 + beq SubCE0F1_Block ; CPU:$E0FC PRG:20FC F0 09 ldy $C17C,x ; CPU:$E0FE PRG:20FE BC 7C C1 cmp $C181,x ; CPU:$E101 PRG:2101 DD 81 C1 - beq Label_E107 ; CPU:$E104 PRG:2104 F0 01 + beq SubCE0F1_Block ; CPU:$E104 PRG:2104 F0 01 rts ; CPU:$E106 PRG:2106 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E107 +; Routine: SubCE0F1_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8127,11 +8135,11 @@ Label_E0F1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E107: +SubCE0F1_Block: pla ; CPU:$E107 PRG:2107 68 pla ; CPU:$E108 PRG:2108 68 ; ----------------------------------------------------------------------------- -; Routine: Label_E109 +; Routine: SubCE0F1_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8139,12 +8147,12 @@ Label_E107: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E109: +SubCE0F1_Block_1: ldx Zp5D ; CPU:$E109 PRG:2109 A6 5D sty ZpA3,x ; CPU:$E10B PRG:210B 94 A3 lda #$01 ; CPU:$E10D PRG:210D A9 01 ; ----------------------------------------------------------------------------- -; Routine: Label_E10F +; Routine: SubCE10F ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8152,11 +8160,11 @@ Label_E109: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E10F: +SubCE10F: sta Zp0C ; CPU:$E10F PRG:210F 85 0C rts ; CPU:$E111 PRG:2111 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E112 +; Routine: SearchTableForByte ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8164,11 +8172,11 @@ Label_E10F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E112: +SearchTableForByte: sta Zp0B ; CPU:$E112 PRG:2112 85 0B ldy #$00 ; CPU:$E114 PRG:2114 A0 00 ; ----------------------------------------------------------------------------- -; Routine: Label_E116 +; Routine: SearchTableForByte_Loop ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8176,16 +8184,16 @@ Label_E112: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E116: +SearchTableForByte_Loop: lda (Zp08),y ; CPU:$E116 PRG:2116 B1 08 cmp #$FE ; CPU:$E118 PRG:2118 C9 FE - beq Label_E129 ; CPU:$E11A PRG:211A F0 0D + beq SearchTableForByte_Loop_Block_1 ; CPU:$E11A PRG:211A F0 0D cmp Zp0B ; CPU:$E11C PRG:211C C5 0B - beq Label_E124 ; CPU:$E11E PRG:211E F0 04 + beq SearchTableForByte_Loop_Block ; CPU:$E11E PRG:211E F0 04 iny ; CPU:$E120 PRG:2120 C8 jmp $E116 ; CPU:$E121 PRG:2121 4C 16 E1 ; ----------------------------------------------------------------------------- -; Routine: Label_E124 +; Routine: SearchTableForByte_Loop_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8193,11 +8201,11 @@ Label_E116: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E124: +SearchTableForByte_Loop_Block: lda #$01 ; CPU:$E124 PRG:2124 A9 01 jmp $E12B ; CPU:$E126 PRG:2126 4C 2B E1 ; ----------------------------------------------------------------------------- -; Routine: Label_E129 +; Routine: SearchTableForByte_Loop_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8205,10 +8213,10 @@ Label_E124: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E129: +SearchTableForByte_Loop_Block_1: lda #$00 ; CPU:$E129 PRG:2129 A9 00 ; ----------------------------------------------------------------------------- -; Routine: Label_E12B +; Routine: SearchTableForByte_Return ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8216,12 +8224,12 @@ Label_E129: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E12B: +SearchTableForByte_Return: sta Zp0C ; CPU:$E12B PRG:212B 85 0C sty Zp0A ; CPU:$E12D PRG:212D 84 0A rts ; CPU:$E12F PRG:212F 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E130 +; Routine: SubCE130 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8229,16 +8237,16 @@ Label_E12B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E130: +SubCE130: ldx Zp5D ; CPU:$E130 PRG:2130 A6 5D lda Zp68,x ; CPU:$E132 PRG:2132 B5 68 sec ; CPU:$E134 PRG:2134 38 sbc Zp59 ; CPU:$E135 PRG:2135 E5 59 - beq Label_E13E ; CPU:$E137 PRG:2137 F0 05 - bmi Label_E13E ; CPU:$E139 PRG:2139 30 03 + beq SubCE130_Block ; CPU:$E137 PRG:2137 F0 05 + bmi SubCE130_Block ; CPU:$E139 PRG:2139 30 03 jmp $E141 ; CPU:$E13B PRG:213B 4C 41 E1 ; ----------------------------------------------------------------------------- -; Routine: Label_E13E +; Routine: SubCE130_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8246,11 +8254,11 @@ Label_E130: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E13E: +SubCE130_Block: lda #$01 ; CPU:$E13E PRG:213E A9 01 rts ; CPU:$E140 PRG:2140 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E141 +; Routine: SubCE141 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8258,15 +8266,16 @@ Label_E13E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E141: +SubCE141: lda #$00 ; CPU:$E141 PRG:2141 A9 00 rts ; CPU:$E143 PRG:2143 60 ; ---- data $E144-$E165 (34 bytes) ---- - .byte $A2, $00, $A0, $20, $B9, $00, $02, $C9, $FF, $F0, $08, $20, $16, $E0, $95, $68 ; CPU:$E144 PRG:2144 A2 00 A0 20 B9 00 02 C9 FF F0 08 20 16 E0 95 68 +; Unreached code block: clears $0068-$0071, processes sprite data +UnreachedCode_E144: .byte $A2, $00, $A0, $20, $B9, $00, $02, $C9, $FF, $F0, $08, $20, $16, $E0, $95, $68 ; CPU:$E144 PRG:2144 A2 00 A0 20 B9 00 02 C9 FF F0 08 20 16 E0 95 68 .byte $4C, $5B, $E1, $A9, $00, $95, $68, $98, $18, $69, $10, $A8, $E8, $E0, $0A, $D0 ; CPU:$E154 PRG:2154 4C 5B E1 A9 00 95 68 98 18 69 10 A8 E8 E0 0A D0 .byte $E3, $60 ; CPU:$E164 PRG:2164 E3 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E166 +; Routine: CountObjectTypes ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8274,11 +8283,11 @@ Label_E141: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E166: +CountObjectTypes: lda #$00 ; CPU:$E166 PRG:2166 A9 00 ldy #$06 ; CPU:$E168 PRG:2168 A0 06 ; ----------------------------------------------------------------------------- -; Routine: Label_E16A +; Routine: CountObjectTypes_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8286,13 +8295,13 @@ Label_E166: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E16A: - sta a:$007E,y ; CPU:$E16A PRG:216A 99 7E 00 +CountObjectTypes_Block: + sta a:Zp7E,y ; CPU:$E16A PRG:216A 99 7E 00 dey ; CPU:$E16D PRG:216D 88 - bpl Label_E16A ; CPU:$E16E PRG:216E 10 FA + bpl CountObjectTypes_Block ; CPU:$E16E PRG:216E 10 FA ldy #$00 ; CPU:$E170 PRG:2170 A0 00 ; ----------------------------------------------------------------------------- -; Routine: Label_E172 +; Routine: CountObjectTypes_Loop ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8300,16 +8309,16 @@ Label_E16A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E172: - lda a:$0068,y ; CPU:$E172 PRG:2172 B9 68 00 - beq Label_E17F ; CPU:$E175 PRG:2175 F0 08 +CountObjectTypes_Loop: + lda a:Zp68,y ; CPU:$E172 PRG:2172 B9 68 00 + beq CountObjectTypes_Loop_Block ; CPU:$E175 PRG:2175 F0 08 tax ; CPU:$E177 PRG:2177 AA lda Zp7E,x ; CPU:$E178 PRG:2178 B5 7E clc ; CPU:$E17A PRG:217A 18 adc #$01 ; CPU:$E17B PRG:217B 69 01 sta Zp7E,x ; CPU:$E17D PRG:217D 95 7E ; ----------------------------------------------------------------------------- -; Routine: Label_E17F +; Routine: CountObjectTypes_Loop_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8317,13 +8326,13 @@ Label_E172: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E17F: +CountObjectTypes_Loop_Block: cpy #$09 ; CPU:$E17F PRG:217F C0 09 - beq Label_E187 ; CPU:$E181 PRG:2181 F0 04 + beq CountObjectTypes_Loop_Block_1 ; CPU:$E181 PRG:2181 F0 04 iny ; CPU:$E183 PRG:2183 C8 jmp $E172 ; CPU:$E184 PRG:2184 4C 72 E1 ; ----------------------------------------------------------------------------- -; Routine: Label_E187 +; Routine: CountObjectTypes_Loop_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8331,18 +8340,18 @@ Label_E17F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E187: +CountObjectTypes_Loop_Block_1: ldx Zp59 ; CPU:$E187 PRG:2187 A6 59 cpx #$07 ; CPU:$E189 PRG:2189 E0 07 - beq Label_E199 ; CPU:$E18B PRG:218B F0 0C + beq CountObjectTypes_Loop_Block_2 ; CPU:$E18B PRG:218B F0 0C inc Zp7E,x ; CPU:$E18D PRG:218D F6 7E lda Zp96 ; CPU:$E18F PRG:218F A5 96 cmp #$0A ; CPU:$E191 PRG:2191 C9 0A - bne Label_E199 ; CPU:$E193 PRG:2193 D0 04 + bne CountObjectTypes_Loop_Block_2 ; CPU:$E193 PRG:2193 D0 04 ldx Zp59 ; CPU:$E195 PRG:2195 A6 59 inc Zp7E,x ; CPU:$E197 PRG:2197 F6 7E ; ----------------------------------------------------------------------------- -; Routine: Label_E199 +; Routine: CountObjectTypes_Loop_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8350,10 +8359,10 @@ Label_E187: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E199: +CountObjectTypes_Loop_Block_2: rts ; CPU:$E199 PRG:2199 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E19A +; Routine: SubCE19A ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8361,12 +8370,12 @@ Label_E199: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E19A: +SubCE19A: lda ZpAD ; CPU:$E19A PRG:219A A5 AD - bne Label_E19F ; CPU:$E19C PRG:219C D0 01 + bne SubCE19A_Block ; CPU:$E19C PRG:219C D0 01 rts ; CPU:$E19E PRG:219E 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E19F +; Routine: SubCE19A_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8374,9 +8383,9 @@ Label_E19A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E19F: +SubCE19A_Block: cmp #$01 ; CPU:$E19F PRG:219F C9 01 - bne Label_E1BF ; CPU:$E1A1 PRG:21A1 D0 1C + bne SubCE19A_Block_1 ; CPU:$E1A1 PRG:21A1 D0 1C lda #$20 ; CPU:$E1A3 PRG:21A3 A9 20 sta Zp00 ; CPU:$E1A5 PRG:21A5 85 00 lda #$C0 ; CPU:$E1A7 PRG:21A7 A9 C0 @@ -8391,7 +8400,7 @@ Label_E19F: sta ZpAD ; CPU:$E1BA PRG:21BA 85 AD jmp $E1E0 ; CPU:$E1BC PRG:21BC 4C E0 E1 ; ----------------------------------------------------------------------------- -; Routine: Label_E1BF +; Routine: SubCE19A_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8399,19 +8408,19 @@ Label_E19F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E1BF: +SubCE19A_Block_1: lda Zp38 ; CPU:$E1BF PRG:21BF A5 38 - bne Label_E1E4 ; CPU:$E1C1 PRG:21C1 D0 21 + bne SubCE1E0_Block ; CPU:$E1C1 PRG:21C1 D0 21 lda #$03 ; CPU:$E1C3 PRG:21C3 A9 03 sta ZpAD ; CPU:$E1C5 PRG:21C5 85 AD ldx #$E1 ; CPU:$E1C7 PRG:21C7 A2 E1 lda $0200,x ; CPU:$E1C9 PRG:21C9 BD 00 02 cmp #$FC ; CPU:$E1CC PRG:21CC C9 FC - beq Label_E1D5 ; CPU:$E1CE PRG:21CE F0 05 + beq SubCE19A_Block_2 ; CPU:$E1CE PRG:21CE F0 05 lda #$FC ; CPU:$E1D0 PRG:21D0 A9 FC jmp $E1D7 ; CPU:$E1D2 PRG:21D2 4C D7 E1 ; ----------------------------------------------------------------------------- -; Routine: Label_E1D5 +; Routine: SubCE19A_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8419,10 +8428,10 @@ Label_E1BF: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E1D5: +SubCE19A_Block_2: lda #$FE ; CPU:$E1D5 PRG:21D5 A9 FE ; ----------------------------------------------------------------------------- -; Routine: Label_E1D7 +; Routine: SubCE1D7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8430,13 +8439,13 @@ Label_E1D5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E1D7: +SubCE1D7: sta $0200,x ; CPU:$E1D7 PRG:21D7 9D 00 02 clc ; CPU:$E1DA PRG:21DA 18 adc #$01 ; CPU:$E1DB PRG:21DB 69 01 sta $0204,x ; CPU:$E1DD PRG:21DD 9D 04 02 ; ----------------------------------------------------------------------------- -; Routine: Label_E1E0 +; Routine: SubCE1E0 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8444,11 +8453,11 @@ Label_E1D7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E1E0: +SubCE1E0: lda #$10 ; CPU:$E1E0 PRG:21E0 A9 10 sta Zp38 ; CPU:$E1E2 PRG:21E2 85 38 ; ----------------------------------------------------------------------------- -; Routine: Label_E1E4 +; Routine: SubCE1E0_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8456,10 +8465,10 @@ Label_E1E0: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E1E4: +SubCE1E0_Block: rts ; CPU:$E1E4 PRG:21E4 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E1E5 +; Routine: InitObjectListZpAE ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8467,11 +8476,11 @@ Label_E1E4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E1E5: +InitObjectListZpAE: lda #$00 ; CPU:$E1E5 PRG:21E5 A9 00 sta ZpAE ; CPU:$E1E7 PRG:21E7 85 AE ; ----------------------------------------------------------------------------- -; Routine: Label_E1E9 +; Routine: UpdateObjectListZpAE ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8479,19 +8488,19 @@ Label_E1E5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E1E9: +UpdateObjectListZpAE: jsr $EFDD ; CPU:$E1E9 PRG:21E9 20 DD EF lda $0200,x ; CPU:$E1EC PRG:21EC BD 00 02 cmp #$FF ; CPU:$E1EF PRG:21EF C9 FF - bne Label_E225 ; CPU:$E1F1 PRG:21F1 D0 32 + bne SubCE225 ; CPU:$E1F1 PRG:21F1 D0 32 lda Zp53 ; CPU:$E1F3 PRG:21F3 A5 53 cmp #$01 ; CPU:$E1F5 PRG:21F5 C9 01 - beq Label_E200 ; CPU:$E1F7 PRG:21F7 F0 07 + beq UpdateObjectListZpAE_Block ; CPU:$E1F7 PRG:21F7 F0 07 cmp #$04 ; CPU:$E1F9 PRG:21F9 C9 04 - beq Label_E213 ; CPU:$E1FB PRG:21FB F0 16 + beq UpdateObjectListZpAE_Block_1 ; CPU:$E1FB PRG:21FB F0 16 jmp $E225 ; CPU:$E1FD PRG:21FD 4C 25 E2 ; ----------------------------------------------------------------------------- -; Routine: Label_E200 +; Routine: UpdateObjectListZpAE_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8499,18 +8508,18 @@ Label_E1E9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E200: +UpdateObjectListZpAE_Block: lda Zp40 ; CPU:$E200 PRG:2200 A5 40 - bne Label_E228 ; CPU:$E202 PRG:2202 D0 24 + bne SubCE225_Block ; CPU:$E202 PRG:2202 D0 24 lda ZpAD ; CPU:$E204 PRG:2204 A5 AD - beq Label_E228 ; CPU:$E206 PRG:2206 F0 20 + beq SubCE225_Block ; CPU:$E206 PRG:2206 F0 20 cmp #$02 ; CPU:$E208 PRG:2208 C9 02 - bne Label_E228 ; CPU:$E20A PRG:220A D0 1C + bne SubCE225_Block ; CPU:$E20A PRG:220A D0 1C lda #$19 ; CPU:$E20C PRG:220C A9 19 sta Zp40 ; CPU:$E20E PRG:220E 85 40 jmp $E21F ; CPU:$E210 PRG:2210 4C 1F E2 ; ----------------------------------------------------------------------------- -; Routine: Label_E213 +; Routine: UpdateObjectListZpAE_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8518,14 +8527,14 @@ Label_E200: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E213: +UpdateObjectListZpAE_Block_1: lda Zp40 ; CPU:$E213 PRG:2213 A5 40 - bne Label_E228 ; CPU:$E215 PRG:2215 D0 11 + bne SubCE225_Block ; CPU:$E215 PRG:2215 D0 11 jsr $EAF7 ; CPU:$E217 PRG:2217 20 F7 EA lda $C466,x ; CPU:$E21A PRG:221A BD 66 C4 sta Zp40 ; CPU:$E21D PRG:221D 85 40 ; ----------------------------------------------------------------------------- -; Routine: Label_E21F +; Routine: SubCE21F ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8533,12 +8542,12 @@ Label_E213: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E21F: +SubCE21F: lda #$06 ; CPU:$E21F PRG:221F A9 06 ldx ZpAE ; CPU:$E221 PRG:2221 A6 AE sta ZpAF,x ; CPU:$E223 PRG:2223 95 AF ; ----------------------------------------------------------------------------- -; Routine: Label_E225 +; Routine: SubCE225 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8546,10 +8555,10 @@ Label_E21F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E225: +SubCE225: jsr $E250 ; CPU:$E225 PRG:2225 20 50 E2 ; ----------------------------------------------------------------------------- -; Routine: Label_E228 +; Routine: SubCE225_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8557,16 +8566,16 @@ Label_E225: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E228: +SubCE225_Block: ldx Zp53 ; CPU:$E228 PRG:2228 A6 53 dex ; CPU:$E22A PRG:222A CA inc ZpAE ; CPU:$E22B PRG:222B E6 AE lda ZpAE ; CPU:$E22D PRG:222D A5 AE cmp $C1F6,x ; CPU:$E22F PRG:222F DD F6 C1 - beq Label_E237 ; CPU:$E232 PRG:2232 F0 03 + beq SubCE225_Block_1 ; CPU:$E232 PRG:2232 F0 03 jmp $E1E9 ; CPU:$E234 PRG:2234 4C E9 E1 ; ----------------------------------------------------------------------------- -; Routine: Label_E237 +; Routine: SubCE225_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8574,12 +8583,12 @@ Label_E228: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E237: +SubCE225_Block_1: lda Zp53 ; CPU:$E237 PRG:2237 A5 53 cmp #$03 ; CPU:$E239 PRG:2239 C9 03 - beq Label_E24F ; CPU:$E23B PRG:223B F0 12 + beq SubCE225_Block_2 ; CPU:$E23B PRG:223B F0 12 lda Zp3B ; CPU:$E23D PRG:223D A5 3B - bne Label_E24F ; CPU:$E23F PRG:223F D0 0E + bne SubCE225_Block_2 ; CPU:$E23F PRG:223F D0 0E lda #$00 ; CPU:$E241 PRG:2241 A9 00 sta ZpD2 ; CPU:$E243 PRG:2243 85 D2 sta ZpD3 ; CPU:$E245 PRG:2245 85 D3 @@ -8588,7 +8597,7 @@ Label_E237: lda #$BC ; CPU:$E24B PRG:224B A9 BC sta Zp3B ; CPU:$E24D PRG:224D 85 3B ; ----------------------------------------------------------------------------- -; Routine: Label_E24F +; Routine: SubCE225_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8596,10 +8605,10 @@ Label_E237: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E24F: +SubCE225_Block_2: rts ; CPU:$E24F PRG:224F 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E250 +; Routine: DispatchObjectStateZpAF ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8607,11 +8616,11 @@ Label_E24F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E250: +DispatchObjectStateZpAF: ldx ZpAE ; CPU:$E250 PRG:2250 A6 AE lda ZpAF,x ; CPU:$E252 PRG:2252 B5 AF ; ----------------------------------------------------------------------------- -; Routine: Label_E254 +; Routine: DispatchObjectState_Loop ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8619,19 +8628,19 @@ Label_E250: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E254: +DispatchObjectState_Loop: and #$0F ; CPU:$E254 PRG:2254 29 0F - beq Label_E292 ; CPU:$E256 PRG:2256 F0 3A + beq SubCE292 ; CPU:$E256 PRG:2256 F0 3A cmp #$06 ; CPU:$E258 PRG:2258 C9 06 - beq Label_E28F ; CPU:$E25A PRG:225A F0 33 + beq DispatchObjectState_Loop_Block ; CPU:$E25A PRG:225A F0 33 cmp #$08 ; CPU:$E25C PRG:225C C9 08 - beq Label_E28F ; CPU:$E25E PRG:225E F0 2F + beq DispatchObjectState_Loop_Block ; CPU:$E25E PRG:225E F0 2F cmp #$01 ; CPU:$E260 PRG:2260 C9 01 - beq Label_E295 ; CPU:$E262 PRG:2262 F0 31 + beq DispatchObjectState_Loop_Block_1 ; CPU:$E262 PRG:2262 F0 31 cmp #$02 ; CPU:$E264 PRG:2264 C9 02 - beq Label_E29A ; CPU:$E266 PRG:2266 F0 32 + beq DispatchObjectState_Loop_Block_2 ; CPU:$E266 PRG:2266 F0 32 cmp #$03 ; CPU:$E268 PRG:2268 C9 03 - beq Label_E2A1 ; CPU:$E26A PRG:226A F0 35 + beq DispatchObjectState_Loop_Block_3 ; CPU:$E26A PRG:226A F0 35 lda Zp53 ; CPU:$E26C PRG:226C A5 53 cmp #$03 ; CPU:$E26E PRG:226E C9 03 beq UpdateBallTrajectory ; CPU:$E270 PRG:2270 F0 06 @@ -8652,7 +8661,7 @@ UpdateBallTrajectory: ldx ZpAE ; CPU:$E27C PRG:227C A6 AE sta ZpAF,x ; CPU:$E27E PRG:227E 95 AF ; ----------------------------------------------------------------------------- -; Routine: Label_E280 +; Routine: SubCE280 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8660,12 +8669,12 @@ UpdateBallTrajectory: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E280: +SubCE280: lda ZpAF,x ; CPU:$E280 PRG:2280 B5 AF cmp #$01 ; CPU:$E282 PRG:2282 C9 01 beq InitSound_3 ; CPU:$E284 PRG:2284 F0 04 cmp #$02 ; CPU:$E286 PRG:2286 C9 02 - bne Label_E28C ; CPU:$E288 PRG:2288 D0 02 + bne InitSound_3_Block ; CPU:$E288 PRG:2288 D0 02 ; ----------------------------------------------------------------------------- ; Routine: InitSound_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -8678,7 +8687,7 @@ Label_E280: InitSound_3: sta ZpB3,x ; CPU:$E28A PRG:228A 95 B3 ; ----------------------------------------------------------------------------- -; Routine: Label_E28C +; Routine: InitSound_3_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8686,10 +8695,10 @@ InitSound_3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E28C: +InitSound_3_Block: jmp $E254 ; CPU:$E28C PRG:228C 4C 54 E2 ; ----------------------------------------------------------------------------- -; Routine: Label_E28F +; Routine: DispatchObjectState_Loop_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8697,10 +8706,10 @@ Label_E28C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E28F: +DispatchObjectState_Loop_Block: jmp $E538 ; CPU:$E28F PRG:228F 4C 38 E5 ; ----------------------------------------------------------------------------- -; Routine: Label_E292 +; Routine: SubCE292 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8708,10 +8717,10 @@ Label_E28F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E292: +SubCE292: jmp $E2F9 ; CPU:$E292 PRG:2292 4C F9 E2 ; ----------------------------------------------------------------------------- -; Routine: Label_E295 +; Routine: DispatchObjectState_Loop_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8719,11 +8728,11 @@ Label_E292: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E295: +DispatchObjectState_Loop_Block_1: lda #$00 ; CPU:$E295 PRG:2295 A9 00 jmp $E29C ; CPU:$E297 PRG:2297 4C 9C E2 ; ----------------------------------------------------------------------------- -; Routine: Label_E29A +; Routine: DispatchObjectState_Loop_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8731,10 +8740,10 @@ Label_E295: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E29A: +DispatchObjectState_Loop_Block_2: lda #$01 ; CPU:$E29A PRG:229A A9 01 ; ----------------------------------------------------------------------------- -; Routine: Label_E29C +; Routine: SubCE29C ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8742,11 +8751,11 @@ Label_E29A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E29C: +SubCE29C: sta Zp99 ; CPU:$E29C PRG:229C 85 99 jmp $E368 ; CPU:$E29E PRG:229E 4C 68 E3 ; ----------------------------------------------------------------------------- -; Routine: Label_E2A1 +; Routine: DispatchObjectState_Loop_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8754,17 +8763,17 @@ Label_E29C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E2A1: +DispatchObjectState_Loop_Block_3: lda Zp53 ; CPU:$E2A1 PRG:22A1 A5 53 cmp #$01 ; CPU:$E2A3 PRG:22A3 C9 01 - bne Label_E2B3 ; CPU:$E2A5 PRG:22A5 D0 0C + bne DispatchObjectState_Loop_Block_4 ; CPU:$E2A5 PRG:22A5 D0 0C jsr $E626 ; CPU:$E2A7 PRG:22A7 20 26 E6 ldx ZpAE ; CPU:$E2AA PRG:22AA A6 AE lda ZpAF,x ; CPU:$E2AC PRG:22AC B5 AF - bne Label_E2B3 ; CPU:$E2AE PRG:22AE D0 03 + bne DispatchObjectState_Loop_Block_4 ; CPU:$E2AE PRG:22AE D0 03 jmp $E292 ; CPU:$E2B0 PRG:22B0 4C 92 E2 ; ----------------------------------------------------------------------------- -; Routine: Label_E2B3 +; Routine: DispatchObjectState_Loop_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8772,10 +8781,10 @@ Label_E2A1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E2B3: +DispatchObjectState_Loop_Block_4: jmp $E41B ; CPU:$E2B3 PRG:22B3 4C 1B E4 ; ----------------------------------------------------------------------------- -; Routine: Label_E2B6 +; Routine: SubCE2B6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8783,10 +8792,10 @@ Label_E2B3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E2B6: +SubCE2B6: ldx ZpAE ; CPU:$E2B6 PRG:22B6 A6 AE lda ZpD2,x ; CPU:$E2B8 PRG:22B8 B5 D2 - bne Label_E2DD ; CPU:$E2BA PRG:22BA D0 21 + bne SubCE2DD ; CPU:$E2BA PRG:22BA D0 21 lda #$01 ; CPU:$E2BC PRG:22BC A9 01 sta ZpD2,x ; CPU:$E2BE PRG:22BE 95 D2 lda ZpAE ; CPU:$E2C0 PRG:22C0 A5 AE @@ -8799,12 +8808,12 @@ Label_E2B6: tay ; CPU:$E2C9 PRG:22C9 A8 lda $0203,y ; CPU:$E2CA PRG:22CA B9 03 02 cmp $0203 ; CPU:$E2CD PRG:22CD CD 03 02 - bcs Label_E2D9 ; CPU:$E2D0 PRG:22D0 B0 07 + bcs SubCE2B6_Block ; CPU:$E2D0 PRG:22D0 B0 07 lda #$01 ; CPU:$E2D2 PRG:22D2 A9 01 sta ZpEC,x ; CPU:$E2D4 PRG:22D4 95 EC jmp $E2DD ; CPU:$E2D6 PRG:22D6 4C DD E2 ; ----------------------------------------------------------------------------- -; Routine: Label_E2D9 +; Routine: SubCE2B6_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8812,11 +8821,11 @@ Label_E2B6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E2D9: +SubCE2B6_Block: lda #$02 ; CPU:$E2D9 PRG:22D9 A9 02 sta ZpEC,x ; CPU:$E2DB PRG:22DB 95 EC ; ----------------------------------------------------------------------------- -; Routine: Label_E2DD +; Routine: SubCE2DD ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8824,16 +8833,16 @@ Label_E2D9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E2DD: +SubCE2DD: lda Zp19,x ; CPU:$E2DD PRG:22DD B5 19 and #$07 ; CPU:$E2DF PRG:22DF 29 07 sta ZpAF,x ; CPU:$E2E1 PRG:22E1 95 AF tay ; CPU:$E2E3 PRG:22E3 A8 cmp #$04 ; CPU:$E2E4 PRG:22E4 C9 04 - bcs Label_E2EB ; CPU:$E2E6 PRG:22E6 B0 03 + bcs SubCE2DD_Block ; CPU:$E2E6 PRG:22E6 B0 03 jmp $E2F6 ; CPU:$E2E8 PRG:22E8 4C F6 E2 ; ----------------------------------------------------------------------------- -; Routine: Label_E2EB +; Routine: SubCE2DD_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8841,13 +8850,13 @@ Label_E2DD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E2EB: +SubCE2DD_Block: ldy ZpEC,x ; CPU:$E2EB PRG:22EB B4 EC cmp #$07 ; CPU:$E2ED PRG:22ED C9 07 - bcs Label_E2F4 ; CPU:$E2EF PRG:22EF B0 03 + bcs SubCE2DD_Block_1 ; CPU:$E2EF PRG:22EF B0 03 jmp $E2F6 ; CPU:$E2F1 PRG:22F1 4C F6 E2 ; ----------------------------------------------------------------------------- -; Routine: Label_E2F4 +; Routine: SubCE2DD_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8855,10 +8864,10 @@ Label_E2EB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E2F4: +SubCE2DD_Block_1: ldy #$03 ; CPU:$E2F4 PRG:22F4 A0 03 ; ----------------------------------------------------------------------------- -; Routine: Label_E2F6 +; Routine: SubCE2F6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8866,11 +8875,11 @@ Label_E2F4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E2F6: +SubCE2F6: sty ZpAF,x ; CPU:$E2F6 PRG:22F6 94 AF rts ; CPU:$E2F8 PRG:22F8 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E2F9 +; Routine: SubCE2F9 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8878,15 +8887,15 @@ Label_E2F6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E2F9: +SubCE2F9: lda #$55 ; CPU:$E2F9 PRG:22F9 A9 55 sta Zp0A ; CPU:$E2FB PRG:22FB 85 0A sta Zp0B ; CPU:$E2FD PRG:22FD 85 0B jsr $E806 ; CPU:$E2FF PRG:22FF 20 06 E8 - bne Label_E305 ; CPU:$E302 PRG:2302 D0 01 + bne SubCE2F9_Block ; CPU:$E302 PRG:2302 D0 01 rts ; CPU:$E304 PRG:2304 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E305 +; Routine: SubCE2F9_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8894,19 +8903,19 @@ Label_E2F9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E305: +SubCE2F9_Block: jsr $EFDD ; CPU:$E305 PRG:2305 20 DD EF stx Zp04 ; CPU:$E308 PRG:2308 86 04 jsr $EAEC ; CPU:$E30A PRG:230A 20 EC EA ldx ZpAE ; CPU:$E30D PRG:230D A6 AE lda ZpAF,x ; CPU:$E30F PRG:230F B5 AF cmp #$20 ; CPU:$E311 PRG:2311 C9 20 - bne Label_E31A ; CPU:$E313 PRG:2313 D0 05 + bne SubCE2F9_Block_1 ; CPU:$E313 PRG:2313 D0 05 lda #$FF ; CPU:$E315 PRG:2315 A9 FF sta ZpAF,x ; CPU:$E317 PRG:2317 95 AF rts ; CPU:$E319 PRG:2319 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E31A +; Routine: SubCE2F9_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8914,13 +8923,13 @@ Label_E305: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E31A: +SubCE2F9_Block_1: cmp #$10 ; CPU:$E31A PRG:231A C9 10 - beq Label_E323 ; CPU:$E31C PRG:231C F0 05 + beq SubCE2F9_Block_2 ; CPU:$E31C PRG:231C F0 05 dec Zp01 ; CPU:$E31E PRG:231E C6 01 jmp $E325 ; CPU:$E320 PRG:2320 4C 25 E3 ; ----------------------------------------------------------------------------- -; Routine: Label_E323 +; Routine: SubCE2F9_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8928,10 +8937,10 @@ Label_E31A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E323: +SubCE2F9_Block_2: inc Zp01 ; CPU:$E323 PRG:2323 E6 01 ; ----------------------------------------------------------------------------- -; Routine: Label_E325 +; Routine: SubCE325 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8939,20 +8948,20 @@ Label_E323: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E325: +SubCE325: lda Zp04 ; CPU:$E325 PRG:2325 A5 04 tay ; CPU:$E327 PRG:2327 A8 iny ; CPU:$E328 PRG:2328 C8 lda $0200,y ; CPU:$E329 PRG:2329 B9 00 02 ldx Zp53 ; CPU:$E32C PRG:232C A6 53 cpx #$04 ; CPU:$E32E PRG:232E E0 04 - beq Label_E340 ; CPU:$E330 PRG:2330 F0 0E + beq SubCE325_Block_1 ; CPU:$E330 PRG:2330 F0 0E cmp #$9C ; CPU:$E332 PRG:2332 C9 9C - beq Label_E33B ; CPU:$E334 PRG:2334 F0 05 + beq SubCE325_Block ; CPU:$E334 PRG:2334 F0 05 lda #$9C ; CPU:$E336 PRG:2336 A9 9C jmp $E34B ; CPU:$E338 PRG:2338 4C 4B E3 ; ----------------------------------------------------------------------------- -; Routine: Label_E33B +; Routine: SubCE325_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8960,11 +8969,11 @@ Label_E325: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E33B: +SubCE325_Block: lda #$98 ; CPU:$E33B PRG:233B A9 98 jmp $E34B ; CPU:$E33D PRG:233D 4C 4B E3 ; ----------------------------------------------------------------------------- -; Routine: Label_E340 +; Routine: SubCE325_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8972,13 +8981,13 @@ Label_E33B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E340: +SubCE325_Block_1: cmp #$AC ; CPU:$E340 PRG:2340 C9 AC - beq Label_E349 ; CPU:$E342 PRG:2342 F0 05 + beq SubCE325_Block_2 ; CPU:$E342 PRG:2342 F0 05 lda #$AC ; CPU:$E344 PRG:2344 A9 AC jmp $E34B ; CPU:$E346 PRG:2346 4C 4B E3 ; ----------------------------------------------------------------------------- -; Routine: Label_E349 +; Routine: SubCE325_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8986,10 +8995,10 @@ Label_E340: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E349: +SubCE325_Block_2: lda #$A8 ; CPU:$E349 PRG:2349 A9 A8 ; ----------------------------------------------------------------------------- -; Routine: Label_E34B +; Routine: SubCE34B ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8997,7 +9006,7 @@ Label_E349: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E34B: +SubCE34B: jsr $EAD4 ; CPU:$E34B PRG:234B 20 D4 EA ldx ZpAE ; CPU:$E34E PRG:234E A6 AE lda ZpB3,x ; CPU:$E350 PRG:2350 B5 B3 @@ -9006,11 +9015,11 @@ Label_E34B: ldx ZpAE ; CPU:$E356 PRG:2356 A6 AE lda ZpAF,x ; CPU:$E358 PRG:2358 B5 AF cmp #$10 ; CPU:$E35A PRG:235A C9 10 - beq Label_E363 ; CPU:$E35C PRG:235C F0 05 + beq SubCE34B_Block ; CPU:$E35C PRG:235C F0 05 lda #$10 ; CPU:$E35E PRG:235E A9 10 jmp $E365 ; CPU:$E360 PRG:2360 4C 65 E3 ; ----------------------------------------------------------------------------- -; Routine: Label_E363 +; Routine: SubCE34B_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9018,10 +9027,10 @@ Label_E34B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E363: +SubCE34B_Block: lda #$20 ; CPU:$E363 PRG:2363 A9 20 ; ----------------------------------------------------------------------------- -; Routine: Label_E365 +; Routine: SubCE365 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9029,11 +9038,11 @@ Label_E363: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E365: +SubCE365: sta ZpAF,x ; CPU:$E365 PRG:2365 95 AF rts ; CPU:$E367 PRG:2367 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E368 +; Routine: SubCE368 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9041,15 +9050,15 @@ Label_E365: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E368: +SubCE368: lda #$55 ; CPU:$E368 PRG:2368 A9 55 sta Zp0A ; CPU:$E36A PRG:236A 85 0A sta Zp0B ; CPU:$E36C PRG:236C 85 0B jsr $E806 ; CPU:$E36E PRG:236E 20 06 E8 - bne Label_E374 ; CPU:$E371 PRG:2371 D0 01 + bne SubCE368_Block ; CPU:$E371 PRG:2371 D0 01 rts ; CPU:$E373 PRG:2373 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E374 +; Routine: SubCE368_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9057,16 +9066,16 @@ Label_E368: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E374: +SubCE368_Block: jsr $EFDD ; CPU:$E374 PRG:2374 20 DD EF stx Zp04 ; CPU:$E377 PRG:2377 86 04 jsr $EAEC ; CPU:$E379 PRG:2379 20 EC EA lda Zp99 ; CPU:$E37C PRG:237C A5 99 - bne Label_E385 ; CPU:$E37E PRG:237E D0 05 + bne SubCE368_Block_1 ; CPU:$E37E PRG:237E D0 05 inc Zp00 ; CPU:$E380 PRG:2380 E6 00 jmp $E387 ; CPU:$E382 PRG:2382 4C 87 E3 ; ----------------------------------------------------------------------------- -; Routine: Label_E385 +; Routine: SubCE368_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9074,10 +9083,10 @@ Label_E374: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E385: +SubCE368_Block_1: dec Zp00 ; CPU:$E385 PRG:2385 C6 00 ; ----------------------------------------------------------------------------- -; Routine: Label_E387 +; Routine: SubCE387 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9085,16 +9094,16 @@ Label_E385: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E387: +SubCE387: lda Zp00 ; CPU:$E387 PRG:2387 A5 00 and #$0F ; CPU:$E389 PRG:2389 29 0F cmp #$04 ; CPU:$E38B PRG:238B C9 04 - beq Label_E396 ; CPU:$E38D PRG:238D F0 07 + beq SubCE387_Block ; CPU:$E38D PRG:238D F0 07 cmp #$0C ; CPU:$E38F PRG:238F C9 0C - beq Label_E396 ; CPU:$E391 PRG:2391 F0 03 + beq SubCE387_Block ; CPU:$E391 PRG:2391 F0 03 jmp $E39B ; CPU:$E393 PRG:2393 4C 9B E3 ; ----------------------------------------------------------------------------- -; Routine: Label_E396 +; Routine: SubCE387_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9102,11 +9111,11 @@ Label_E387: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E396: +SubCE387_Block: inc Zp01 ; CPU:$E396 PRG:2396 E6 01 jmp $E3AF ; CPU:$E398 PRG:2398 4C AF E3 ; ----------------------------------------------------------------------------- -; Routine: Label_E39B +; Routine: SubCE39B ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9114,15 +9123,15 @@ Label_E396: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E39B: +SubCE39B: ldx Zp99 ; CPU:$E39B PRG:239B A6 99 cmp $C3E2,x ; CPU:$E39D PRG:239D DD E2 C3 - beq Label_E3AA ; CPU:$E3A0 PRG:23A0 F0 08 + beq SubCE39B_Block ; CPU:$E3A0 PRG:23A0 F0 08 cmp $C3E4,x ; CPU:$E3A2 PRG:23A2 DD E4 C3 - beq Label_E3AA ; CPU:$E3A5 PRG:23A5 F0 03 + beq SubCE39B_Block ; CPU:$E3A5 PRG:23A5 F0 03 jmp $E3AF ; CPU:$E3A7 PRG:23A7 4C AF E3 ; ----------------------------------------------------------------------------- -; Routine: Label_E3AA +; Routine: SubCE39B_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9130,11 +9139,11 @@ Label_E39B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E3AA: +SubCE39B_Block: dec Zp01 ; CPU:$E3AA PRG:23AA C6 01 jmp $E3C0 ; CPU:$E3AC PRG:23AC 4C C0 E3 ; ----------------------------------------------------------------------------- -; Routine: Label_E3AF +; Routine: SubCE3AF ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9142,14 +9151,14 @@ Label_E3AA: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E3AF: +SubCE3AF: cmp #$04 ; CPU:$E3AF PRG:23AF C9 04 - beq Label_E3BA ; CPU:$E3B1 PRG:23B1 F0 07 + beq SubCE3AF_Block ; CPU:$E3B1 PRG:23B1 F0 07 cmp #$0C ; CPU:$E3B3 PRG:23B3 C9 0C - beq Label_E3BA ; CPU:$E3B5 PRG:23B5 F0 03 + beq SubCE3AF_Block ; CPU:$E3B5 PRG:23B5 F0 03 jmp $E3C0 ; CPU:$E3B7 PRG:23B7 4C C0 E3 ; ----------------------------------------------------------------------------- -; Routine: Label_E3BA +; Routine: SubCE3AF_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9157,12 +9166,12 @@ Label_E3AF: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E3BA: +SubCE3AF_Block: ldx ZpAE ; CPU:$E3BA PRG:23BA A6 AE lda #$FF ; CPU:$E3BC PRG:23BC A9 FF sta ZpAF,x ; CPU:$E3BE PRG:23BE 95 AF ; ----------------------------------------------------------------------------- -; Routine: Label_E3C0 +; Routine: SubCE3C0 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9170,16 +9179,16 @@ Label_E3BA: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E3C0: +SubCE3C0: ldy Zp99 ; CPU:$E3C0 PRG:23C0 A4 99 jsr $E6A5 ; CPU:$E3C2 PRG:23C2 20 A5 E6 - bne Label_E3CE ; CPU:$E3C5 PRG:23C5 D0 07 + bne SubCE3C0_Block ; CPU:$E3C5 PRG:23C5 D0 07 lda #$00 ; CPU:$E3C7 PRG:23C7 A9 00 ldx ZpAE ; CPU:$E3C9 PRG:23C9 A6 AE sta ZpAF,x ; CPU:$E3CB PRG:23CB 95 AF rts ; CPU:$E3CD PRG:23CD 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E3CE +; Routine: SubCE3C0_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9187,16 +9196,16 @@ Label_E3C0: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E3CE: +SubCE3C0_Block: lda Zp99 ; CPU:$E3CE PRG:23CE A5 99 - beq Label_E3ED ; CPU:$E3D0 PRG:23D0 F0 1B + beq SubCE3ED ; CPU:$E3D0 PRG:23D0 F0 1B lda Zp00 ; CPU:$E3D2 PRG:23D2 A5 00 cmp #$0C ; CPU:$E3D4 PRG:23D4 C9 0C - beq Label_E3DD ; CPU:$E3D6 PRG:23D6 F0 05 - bcc Label_E3E6 ; CPU:$E3D8 PRG:23D8 90 0C + beq SubCE3C0_Block_1 ; CPU:$E3D6 PRG:23D6 F0 05 + bcc SubCE3C0_Block_2 ; CPU:$E3D8 PRG:23D8 90 0C jmp $E3ED ; CPU:$E3DA PRG:23DA 4C ED E3 ; ----------------------------------------------------------------------------- -; Routine: Label_E3DD +; Routine: SubCE3C0_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9204,13 +9213,13 @@ Label_E3CE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E3DD: +SubCE3C0_Block_1: lda #$00 ; CPU:$E3DD PRG:23DD A9 00 ldx ZpAE ; CPU:$E3DF PRG:23DF A6 AE sta ZpAF,x ; CPU:$E3E1 PRG:23E1 95 AF jmp $E3ED ; CPU:$E3E3 PRG:23E3 4C ED E3 ; ----------------------------------------------------------------------------- -; Routine: Label_E3E6 +; Routine: SubCE3C0_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9218,13 +9227,13 @@ Label_E3DD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E3E6: +SubCE3C0_Block_2: lda #$00 ; CPU:$E3E6 PRG:23E6 A9 00 ldx ZpAE ; CPU:$E3E8 PRG:23E8 A6 AE sta ZpAF,x ; CPU:$E3EA PRG:23EA 95 AF rts ; CPU:$E3EC PRG:23EC 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E3ED +; Routine: SubCE3ED ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9232,14 +9241,14 @@ Label_E3E6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E3ED: +SubCE3ED: lda Zp04 ; CPU:$E3ED PRG:23ED A5 04 tay ; CPU:$E3EF PRG:23EF A8 iny ; CPU:$E3F0 PRG:23F0 C8 lda $0200,y ; CPU:$E3F1 PRG:23F1 B9 00 02 ldx Zp53 ; CPU:$E3F4 PRG:23F4 A6 53 cpx #$04 ; CPU:$E3F6 PRG:23F6 E0 04 - beq Label_E408 ; CPU:$E3F8 PRG:23F8 F0 0E + beq SubCE3ED_Block ; CPU:$E3F8 PRG:23F8 F0 0E cmp #$9C ; CPU:$E3FA PRG:23FA C9 9C bcs CheckGameState_3 ; CPU:$E3FC PRG:23FC B0 05 lda #$9C ; CPU:$E3FE PRG:23FE A9 9C @@ -9257,7 +9266,7 @@ CheckGameState_3: lda #$98 ; CPU:$E403 PRG:2403 A9 98 jmp $E413 ; CPU:$E405 PRG:2405 4C 13 E4 ; ----------------------------------------------------------------------------- -; Routine: Label_E408 +; Routine: SubCE3ED_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9265,13 +9274,13 @@ CheckGameState_3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E408: +SubCE3ED_Block: cmp #$AC ; CPU:$E408 PRG:2408 C9 AC - bcs Label_E411 ; CPU:$E40A PRG:240A B0 05 + bcs SubCE3ED_Block_1 ; CPU:$E40A PRG:240A B0 05 lda #$AC ; CPU:$E40C PRG:240C A9 AC jmp $E413 ; CPU:$E40E PRG:240E 4C 13 E4 ; ----------------------------------------------------------------------------- -; Routine: Label_E411 +; Routine: SubCE3ED_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9279,10 +9288,10 @@ Label_E408: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E411: +SubCE3ED_Block_1: lda #$A8 ; CPU:$E411 PRG:2411 A9 A8 ; ----------------------------------------------------------------------------- -; Routine: Label_E413 +; Routine: SubCE413 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9290,12 +9299,12 @@ Label_E411: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E413: +SubCE413: jsr $EAD4 ; CPU:$E413 PRG:2413 20 D4 EA lda Zp99 ; CPU:$E416 PRG:2416 A5 99 jmp $F096 ; CPU:$E418 PRG:2418 4C 96 F0 ; ----------------------------------------------------------------------------- -; Routine: Label_E41B +; Routine: SubCE41B ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9303,7 +9312,7 @@ Label_E413: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E41B: +SubCE41B: ldx ZpAE ; CPU:$E41B PRG:241B A6 AE lda ZpAF,x ; CPU:$E41D PRG:241D B5 AF lsr a ; CPU:$E41F PRG:241F 4A @@ -9312,9 +9321,9 @@ Label_E41B: tax ; CPU:$E422 PRG:2422 AA lda Zp53 ; CPU:$E423 PRG:2423 A5 53 cmp #$04 ; CPU:$E425 PRG:2425 C9 04 - beq Label_E436 ; CPU:$E427 PRG:2427 F0 0D + beq SubCE41B_Block_1 ; CPU:$E427 PRG:2427 F0 0D ; ----------------------------------------------------------------------------- -; Routine: Label_E429 +; Routine: SubCE41B_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9322,14 +9331,14 @@ Label_E41B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E429: +SubCE41B_Block: lda $C3F4,x ; CPU:$E429 PRG:2429 BD F4 C3 sta Zp0A ; CPU:$E42C PRG:242C 85 0A lda $C3F5,x ; CPU:$E42E PRG:242E BD F5 C3 sta Zp0B ; CPU:$E431 PRG:2431 85 0B jmp $E44B ; CPU:$E433 PRG:2433 4C 4B E4 ; ----------------------------------------------------------------------------- -; Routine: Label_E436 +; Routine: SubCE41B_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9337,19 +9346,19 @@ Label_E429: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E436: +SubCE41B_Block_1: lda Zp50 ; CPU:$E436 PRG:2436 A5 50 and #$01 ; CPU:$E438 PRG:2438 29 01 clc ; CPU:$E43A PRG:243A 18 adc Zp54 ; CPU:$E43B PRG:243B 65 54 cmp #$03 ; CPU:$E43D PRG:243D C9 03 - bcc Label_E429 ; CPU:$E43F PRG:243F 90 E8 + bcc SubCE41B_Block ; CPU:$E43F PRG:243F 90 E8 lda $C3F8,x ; CPU:$E441 PRG:2441 BD F8 C3 sta Zp0A ; CPU:$E444 PRG:2444 85 0A lda $C3F9,x ; CPU:$E446 PRG:2446 BD F9 C3 sta Zp0B ; CPU:$E449 PRG:2449 85 0B ; ----------------------------------------------------------------------------- -; Routine: Label_E44B +; Routine: SubCE44B ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9357,12 +9366,12 @@ Label_E436: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E44B: +SubCE44B: jsr $E806 ; CPU:$E44B PRG:244B 20 06 E8 - bne Label_E451 ; CPU:$E44E PRG:244E D0 01 + bne SubCE44B_Block ; CPU:$E44E PRG:244E D0 01 rts ; CPU:$E450 PRG:2450 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E451 +; Routine: SubCE44B_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9370,18 +9379,18 @@ Label_E44B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E451: +SubCE44B_Block: jsr $EFDD ; CPU:$E451 PRG:2451 20 DD EF stx Zp04 ; CPU:$E454 PRG:2454 86 04 jsr $EAEC ; CPU:$E456 PRG:2456 20 EC EA ldx ZpAE ; CPU:$E459 PRG:2459 A6 AE lda ZpE8,x ; CPU:$E45B PRG:245B B5 E8 - beq Label_E46D ; CPU:$E45D PRG:245D F0 0E + beq SubCE46D ; CPU:$E45D PRG:245D F0 0E cmp #$03 ; CPU:$E45F PRG:245F C9 03 - beq Label_E466 ; CPU:$E461 PRG:2461 F0 03 + beq SubCE44B_Block_1 ; CPU:$E461 PRG:2461 F0 03 jmp $E46D ; CPU:$E463 PRG:2463 4C 6D E4 ; ----------------------------------------------------------------------------- -; Routine: Label_E466 +; Routine: SubCE44B_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9389,12 +9398,12 @@ Label_E451: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E466: +SubCE44B_Block_1: lda #$00 ; CPU:$E466 PRG:2466 A9 00 sta ZpE8,x ; CPU:$E468 PRG:2468 95 E8 jmp $E47A ; CPU:$E46A PRG:246A 4C 7A E4 ; ----------------------------------------------------------------------------- -; Routine: Label_E46D +; Routine: SubCE46D ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9402,15 +9411,15 @@ Label_E466: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E46D: +SubCE46D: lda Zp01 ; CPU:$E46D PRG:246D A5 01 and #$03 ; CPU:$E46F PRG:246F 29 03 - bne Label_E47A ; CPU:$E471 PRG:2471 D0 07 + bne SubCE47A ; CPU:$E471 PRG:2471 D0 07 lda #$01 ; CPU:$E473 PRG:2473 A9 01 inc ZpE8,x ; CPU:$E475 PRG:2475 F6 E8 jmp $E50C ; CPU:$E477 PRG:2477 4C 0C E5 ; ----------------------------------------------------------------------------- -; Routine: Label_E47A +; Routine: SubCE47A ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9418,18 +9427,18 @@ Label_E46D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E47A: +SubCE47A: lda Zp53 ; CPU:$E47A PRG:247A A5 53 cmp #$01 ; CPU:$E47C PRG:247C C9 01 - beq Label_E4B5 ; CPU:$E47E PRG:247E F0 35 + beq SubCE47A_Block_3 ; CPU:$E47E PRG:247E F0 35 jsr $E7A3 ; CPU:$E480 PRG:2480 20 A3 E7 cmp #$03 ; CPU:$E483 PRG:2483 C9 03 - beq Label_E48E ; CPU:$E485 PRG:2485 F0 07 + beq SubCE47A_Block ; CPU:$E485 PRG:2485 F0 07 cmp #$13 ; CPU:$E487 PRG:2487 C9 13 - beq Label_E49B ; CPU:$E489 PRG:2489 F0 10 + beq SubCE47A_Block_1 ; CPU:$E489 PRG:2489 F0 10 jmp $E50C ; CPU:$E48B PRG:248B 4C 0C E5 ; ----------------------------------------------------------------------------- -; Routine: Label_E48E +; Routine: SubCE47A_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9437,15 +9446,15 @@ Label_E47A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E48E: +SubCE47A_Block: dec Zp01 ; CPU:$E48E PRG:248E C6 01 lda Zp01 ; CPU:$E490 PRG:2490 A5 01 ldx ZpAE ; CPU:$E492 PRG:2492 A6 AE cmp ZpDB,x ; CPU:$E494 PRG:2494 D5 DB - beq Label_E4A8 ; CPU:$E496 PRG:2496 F0 10 + beq SubCE47A_Block_2 ; CPU:$E496 PRG:2496 F0 10 jmp $E50C ; CPU:$E498 PRG:2498 4C 0C E5 ; ----------------------------------------------------------------------------- -; Routine: Label_E49B +; Routine: SubCE47A_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9453,15 +9462,15 @@ Label_E48E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E49B: +SubCE47A_Block_1: inc Zp01 ; CPU:$E49B PRG:249B E6 01 lda Zp01 ; CPU:$E49D PRG:249D A5 01 ldx ZpAE ; CPU:$E49F PRG:249F A6 AE cmp ZpDB,x ; CPU:$E4A1 PRG:24A1 D5 DB - beq Label_E4A8 ; CPU:$E4A3 PRG:24A3 F0 03 + beq SubCE47A_Block_2 ; CPU:$E4A3 PRG:24A3 F0 03 jmp $E50C ; CPU:$E4A5 PRG:24A5 4C 0C E5 ; ----------------------------------------------------------------------------- -; Routine: Label_E4A8 +; Routine: SubCE47A_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9469,7 +9478,7 @@ Label_E49B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E4A8: +SubCE47A_Block_2: lda #$01 ; CPU:$E4A8 PRG:24A8 A9 01 ldx ZpAE ; CPU:$E4AA PRG:24AA A6 AE sta ZpAF,x ; CPU:$E4AC PRG:24AC 95 AF @@ -9477,7 +9486,7 @@ Label_E4A8: sta ZpDB,x ; CPU:$E4B0 PRG:24B0 95 DB jmp $E50C ; CPU:$E4B2 PRG:24B2 4C 0C E5 ; ----------------------------------------------------------------------------- -; Routine: Label_E4B5 +; Routine: SubCE47A_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9485,14 +9494,14 @@ Label_E4A8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E4B5: +SubCE47A_Block_3: ldx ZpAE ; CPU:$E4B5 PRG:24B5 A6 AE lda ZpAF,x ; CPU:$E4B7 PRG:24B7 B5 AF cmp #$13 ; CPU:$E4B9 PRG:24B9 C9 13 - beq Label_E4C0 ; CPU:$E4BB PRG:24BB F0 03 + beq SubCE47A_Block_4 ; CPU:$E4BB PRG:24BB F0 03 jmp $E4D6 ; CPU:$E4BD PRG:24BD 4C D6 E4 ; ----------------------------------------------------------------------------- -; Routine: Label_E4C0 +; Routine: SubCE47A_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9500,7 +9509,7 @@ Label_E4B5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E4C0: +SubCE47A_Block_4: inc Zp01 ; CPU:$E4C0 PRG:24C0 E6 01 lda ZpAE ; CPU:$E4C2 PRG:24C2 A5 AE asl a ; CPU:$E4C4 PRG:24C4 0A @@ -9508,12 +9517,12 @@ Label_E4C0: inx ; CPU:$E4C6 PRG:24C6 E8 lda ZpB9,x ; CPU:$E4C7 PRG:24C7 B5 B9 cmp Zp01 ; CPU:$E4C9 PRG:24C9 C5 01 - bne Label_E4D3 ; CPU:$E4CB PRG:24CB D0 06 + bne SubCE47A_Block_5 ; CPU:$E4CB PRG:24CB D0 06 lda #$01 ; CPU:$E4CD PRG:24CD A9 01 ldx ZpAE ; CPU:$E4CF PRG:24CF A6 AE sta ZpAF,x ; CPU:$E4D1 PRG:24D1 95 AF ; ----------------------------------------------------------------------------- -; Routine: Label_E4D3 +; Routine: SubCE47A_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9521,10 +9530,10 @@ Label_E4C0: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E4D3: +SubCE47A_Block_5: jmp $E50C ; CPU:$E4D3 PRG:24D3 4C 0C E5 ; ----------------------------------------------------------------------------- -; Routine: Label_E4D6 +; Routine: SubCE4D6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9532,27 +9541,27 @@ Label_E4D3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E4D6: +SubCE4D6: dec Zp01 ; CPU:$E4D6 PRG:24D6 C6 01 ldx ZpAE ; CPU:$E4D8 PRG:24D8 A6 AE cpx #$00 ; CPU:$E4DA PRG:24DA E0 00 - bne Label_E4F9 ; CPU:$E4DC PRG:24DC D0 1B + bne SubCE4D6_Block ; CPU:$E4DC PRG:24DC D0 1B ldx ZpAE ; CPU:$E4DE PRG:24DE A6 AE lda ZpE0,x ; CPU:$E4E0 PRG:24E0 B5 E0 cmp #$02 ; CPU:$E4E2 PRG:24E2 C9 02 - beq Label_E4F9 ; CPU:$E4E4 PRG:24E4 F0 13 + beq SubCE4D6_Block ; CPU:$E4E4 PRG:24E4 F0 13 lda ZpAE ; CPU:$E4E6 PRG:24E6 A5 AE asl a ; CPU:$E4E8 PRG:24E8 0A tax ; CPU:$E4E9 PRG:24E9 AA lda ZpB9,x ; CPU:$E4EA PRG:24EA B5 B9 cmp Zp01 ; CPU:$E4EC PRG:24EC C5 01 - bne Label_E50C ; CPU:$E4EE PRG:24EE D0 1C + bne SubCE50C ; CPU:$E4EE PRG:24EE D0 1C lda #$02 ; CPU:$E4F0 PRG:24F0 A9 02 ldx ZpAE ; CPU:$E4F2 PRG:24F2 A6 AE sta ZpAF,x ; CPU:$E4F4 PRG:24F4 95 AF jmp $E50C ; CPU:$E4F6 PRG:24F6 4C 0C E5 ; ----------------------------------------------------------------------------- -; Routine: Label_E4F9 +; Routine: SubCE4D6_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9560,7 +9569,7 @@ Label_E4D6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E4F9: +SubCE4D6_Block: lda ZpAE ; CPU:$E4F9 PRG:24F9 A5 AE asl a ; CPU:$E4FB PRG:24FB 0A tax ; CPU:$E4FC PRG:24FC AA @@ -9568,12 +9577,12 @@ Label_E4F9: clc ; CPU:$E4FF PRG:24FF 18 adc #$0D ; CPU:$E500 PRG:2500 69 0D cmp Zp01 ; CPU:$E502 PRG:2502 C5 01 - bne Label_E50C ; CPU:$E504 PRG:2504 D0 06 + bne SubCE50C ; CPU:$E504 PRG:2504 D0 06 lda #$13 ; CPU:$E506 PRG:2506 A9 13 ldx ZpAE ; CPU:$E508 PRG:2508 A6 AE sta ZpAF,x ; CPU:$E50A PRG:250A 95 AF ; ----------------------------------------------------------------------------- -; Routine: Label_E50C +; Routine: SubCE50C ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9581,20 +9590,20 @@ Label_E4F9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E50C: +SubCE50C: lda Zp04 ; CPU:$E50C PRG:250C A5 04 tay ; CPU:$E50E PRG:250E A8 iny ; CPU:$E50F PRG:250F C8 lda $0200,y ; CPU:$E510 PRG:2510 B9 00 02 ldx Zp53 ; CPU:$E513 PRG:2513 A6 53 cpx #$04 ; CPU:$E515 PRG:2515 E0 04 - beq Label_E527 ; CPU:$E517 PRG:2517 F0 0E + beq SubCE50C_Block_1 ; CPU:$E517 PRG:2517 F0 0E cmp #$9C ; CPU:$E519 PRG:2519 C9 9C - bcs Label_E522 ; CPU:$E51B PRG:251B B0 05 + bcs SubCE50C_Block ; CPU:$E51B PRG:251B B0 05 lda #$9C ; CPU:$E51D PRG:251D A9 9C jmp $E532 ; CPU:$E51F PRG:251F 4C 32 E5 ; ----------------------------------------------------------------------------- -; Routine: Label_E522 +; Routine: SubCE50C_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9602,11 +9611,11 @@ Label_E50C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E522: +SubCE50C_Block: lda #$98 ; CPU:$E522 PRG:2522 A9 98 jmp $E532 ; CPU:$E524 PRG:2524 4C 32 E5 ; ----------------------------------------------------------------------------- -; Routine: Label_E527 +; Routine: SubCE50C_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9614,13 +9623,13 @@ Label_E522: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E527: +SubCE50C_Block_1: cmp #$AC ; CPU:$E527 PRG:2527 C9 AC - bcs Label_E530 ; CPU:$E529 PRG:2529 B0 05 + bcs SubCE50C_Block_2 ; CPU:$E529 PRG:2529 B0 05 lda #$AC ; CPU:$E52B PRG:252B A9 AC jmp $E532 ; CPU:$E52D PRG:252D 4C 32 E5 ; ----------------------------------------------------------------------------- -; Routine: Label_E530 +; Routine: SubCE50C_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9628,10 +9637,10 @@ Label_E527: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E530: +SubCE50C_Block_2: lda #$A8 ; CPU:$E530 PRG:2530 A9 A8 ; ----------------------------------------------------------------------------- -; Routine: Label_E532 +; Routine: SubCE532 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9639,11 +9648,11 @@ Label_E530: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E532: +SubCE532: jsr $EAD4 ; CPU:$E532 PRG:2532 20 D4 EA jmp $F088 ; CPU:$E535 PRG:2535 4C 88 F0 ; ----------------------------------------------------------------------------- -; Routine: Label_E538 +; Routine: SubCE538 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9651,16 +9660,16 @@ Label_E532: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E538: +SubCE538: ldx ZpAE ; CPU:$E538 PRG:2538 A6 AE lda ZpAF,x ; CPU:$E53A PRG:253A B5 AF cmp #$06 ; CPU:$E53C PRG:253C C9 06 - beq Label_E548 ; CPU:$E53E PRG:253E F0 08 + beq SubCE538_Block_1 ; CPU:$E53E PRG:253E F0 08 cmp #$08 ; CPU:$E540 PRG:2540 C9 08 - beq Label_E545 ; CPU:$E542 PRG:2542 F0 01 + beq SubCE538_Block ; CPU:$E542 PRG:2542 F0 01 rts ; CPU:$E544 PRG:2544 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E545 +; Routine: SubCE538_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9668,10 +9677,10 @@ Label_E538: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E545: +SubCE538_Block: jmp $E59F ; CPU:$E545 PRG:2545 4C 9F E5 ; ----------------------------------------------------------------------------- -; Routine: Label_E548 +; Routine: SubCE538_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9679,15 +9688,15 @@ Label_E545: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E548: +SubCE538_Block_1: lda Zp53 ; CPU:$E548 PRG:2548 A5 53 cmp #$01 ; CPU:$E54A PRG:254A C9 01 - beq Label_E553 ; CPU:$E54C PRG:254C F0 05 + beq SubCE538_Block_2 ; CPU:$E54C PRG:254C F0 05 cmp #$04 ; CPU:$E54E PRG:254E C9 04 - beq Label_E564 ; CPU:$E550 PRG:2550 F0 12 + beq SubCE538_Block_3 ; CPU:$E550 PRG:2550 F0 12 rts ; CPU:$E552 PRG:2552 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E553 +; Routine: SubCE538_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9695,7 +9704,7 @@ Label_E548: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E553: +SubCE538_Block_2: lda #$20 ; CPU:$E553 PRG:2553 A9 20 sta Zp00 ; CPU:$E555 PRG:2555 85 00 lda #$B8 ; CPU:$E557 PRG:2557 A9 B8 @@ -9705,7 +9714,7 @@ Label_E553: sta ZpAF,x ; CPU:$E55F PRG:255F 95 AF jmp $E592 ; CPU:$E561 PRG:2561 4C 92 E5 ; ----------------------------------------------------------------------------- -; Routine: Label_E564 +; Routine: SubCE538_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9713,14 +9722,14 @@ Label_E553: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E564: +SubCE538_Block_3: lda $0203 ; CPU:$E564 PRG:2564 AD 03 02 cmp #$78 ; CPU:$E567 PRG:2567 C9 78 - bcc Label_E570 ; CPU:$E569 PRG:2569 90 05 + bcc SubCE538_Block_4 ; CPU:$E569 PRG:2569 90 05 ldy #$00 ; CPU:$E56B PRG:256B A0 00 jmp $E572 ; CPU:$E56D PRG:256D 4C 72 E5 ; ----------------------------------------------------------------------------- -; Routine: Label_E570 +; Routine: SubCE538_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9728,10 +9737,10 @@ Label_E564: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E570: +SubCE538_Block_4: ldy #$08 ; CPU:$E570 PRG:2570 A0 08 ; ----------------------------------------------------------------------------- -; Routine: Label_E572 +; Routine: SubCE572 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9739,7 +9748,7 @@ Label_E570: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E572: +SubCE572: sty Zp0C ; CPU:$E572 PRG:2572 84 0C lda Zp19 ; CPU:$E574 PRG:2574 A5 19 and #$03 ; CPU:$E576 PRG:2576 29 03 @@ -9757,7 +9766,7 @@ Label_E572: lda #$A8 ; CPU:$E58D PRG:258D A9 A8 jmp $E594 ; CPU:$E58F PRG:258F 4C 94 E5 ; ----------------------------------------------------------------------------- -; Routine: Label_E592 +; Routine: SubCE592 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9765,10 +9774,10 @@ Label_E572: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E592: +SubCE592: lda #$98 ; CPU:$E592 PRG:2592 A9 98 ; ----------------------------------------------------------------------------- -; Routine: Label_E594 +; Routine: SubCE594 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9776,13 +9785,13 @@ Label_E592: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E594: +SubCE594: jsr $EAD4 ; CPU:$E594 PRG:2594 20 D4 EA jsr $EFDD ; CPU:$E597 PRG:2597 20 DD EF sta Zp04 ; CPU:$E59A PRG:259A 85 04 jmp $F082 ; CPU:$E59C PRG:259C 4C 82 F0 ; ----------------------------------------------------------------------------- -; Routine: Label_E59F +; Routine: SubCE59F ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9790,7 +9799,7 @@ Label_E594: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E59F: +SubCE59F: jsr $EFDD ; CPU:$E59F PRG:259F 20 DD EF stx Zp04 ; CPU:$E5A2 PRG:25A2 86 04 jsr $EAEC ; CPU:$E5A4 PRG:25A4 20 EC EA @@ -9798,10 +9807,10 @@ Label_E59F: jsr $EAD4 ; CPU:$E5AA PRG:25AA 20 D4 EA lda Zp53 ; CPU:$E5AD PRG:25AD A5 53 cmp #$01 ; CPU:$E5AF PRG:25AF C9 01 - beq Label_E5B4 ; CPU:$E5B1 PRG:25B1 F0 01 + beq SubCE59F_Block ; CPU:$E5B1 PRG:25B1 F0 01 rts ; CPU:$E5B3 PRG:25B3 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E5B4 +; Routine: SubCE59F_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9809,14 +9818,14 @@ Label_E59F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E5B4: +SubCE59F_Block: inc Zp00 ; CPU:$E5B4 PRG:25B4 E6 00 lda Zp00 ; CPU:$E5B6 PRG:25B6 A5 00 cmp #$2C ; CPU:$E5B8 PRG:25B8 C9 2C - beq Label_E5BE ; CPU:$E5BA PRG:25BA F0 02 - bcc Label_E5E5 ; CPU:$E5BC PRG:25BC 90 27 + beq SubCE59F_Block_1 ; CPU:$E5BA PRG:25BA F0 02 + bcc SubCE5DB_Block ; CPU:$E5BC PRG:25BC 90 27 ; ----------------------------------------------------------------------------- -; Routine: Label_E5BE +; Routine: SubCE59F_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9824,22 +9833,22 @@ Label_E5B4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E5BE: +SubCE59F_Block_1: inc Zp01 ; CPU:$E5BE PRG:25BE E6 01 lda Zp01 ; CPU:$E5C0 PRG:25C0 A5 01 cmp #$C5 ; CPU:$E5C2 PRG:25C2 C9 C5 - bne Label_E5E5 ; CPU:$E5C4 PRG:25C4 D0 1F + bne SubCE5DB_Block ; CPU:$E5C4 PRG:25C4 D0 1F lda #$00 ; CPU:$E5C6 PRG:25C6 A9 00 ldx ZpAE ; CPU:$E5C8 PRG:25C8 A6 AE sta ZpAF,x ; CPU:$E5CA PRG:25CA 95 AF dec Zp00 ; CPU:$E5CC PRG:25CC C6 00 lda Zp00 ; CPU:$E5CE PRG:25CE A5 00 cmp #$68 ; CPU:$E5D0 PRG:25D0 C9 68 - bcs Label_E5D9 ; CPU:$E5D2 PRG:25D2 B0 05 + bcs SubCE59F_Block_2 ; CPU:$E5D2 PRG:25D2 B0 05 inc Zp01 ; CPU:$E5D4 PRG:25D4 E6 01 jmp $E5DB ; CPU:$E5D6 PRG:25D6 4C DB E5 ; ----------------------------------------------------------------------------- -; Routine: Label_E5D9 +; Routine: SubCE59F_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9847,10 +9856,10 @@ Label_E5BE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E5D9: +SubCE59F_Block_2: dec Zp01 ; CPU:$E5D9 PRG:25D9 C6 01 ; ----------------------------------------------------------------------------- -; Routine: Label_E5DB +; Routine: SubCE5DB ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9858,14 +9867,14 @@ Label_E5D9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E5DB: +SubCE5DB: cmp #$60 ; CPU:$E5DB PRG:25DB C9 60 - bne Label_E5E5 ; CPU:$E5DD PRG:25DD D0 06 + bne SubCE5DB_Block ; CPU:$E5DD PRG:25DD D0 06 ldx ZpAE ; CPU:$E5DF PRG:25DF A6 AE lda #$00 ; CPU:$E5E1 PRG:25E1 A9 00 sta ZpAF,x ; CPU:$E5E3 PRG:25E3 95 AF ; ----------------------------------------------------------------------------- -; Routine: Label_E5E5 +; Routine: SubCE5DB_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9873,10 +9882,10 @@ Label_E5DB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E5E5: +SubCE5DB_Block: jmp $F082 ; CPU:$E5E5 PRG:25E5 4C 82 F0 ; ----------------------------------------------------------------------------- -; Routine: Label_E5E8 +; Routine: SubCE5E8 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9884,18 +9893,18 @@ Label_E5E5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E5E8: +SubCE5E8: sta Zp0C ; CPU:$E5E8 PRG:25E8 85 0C ldx ZpAE ; CPU:$E5EA PRG:25EA A6 AE lda ZpE0,x ; CPU:$E5EC PRG:25EC B5 E0 cmp #$01 ; CPU:$E5EE PRG:25EE C9 01 - beq Label_E60F ; CPU:$E5F0 PRG:25F0 F0 1D + beq SubCE5E8_Block ; CPU:$E5F0 PRG:25F0 F0 1D cmp #$06 ; CPU:$E5F2 PRG:25F2 C9 06 - beq Label_E60F ; CPU:$E5F4 PRG:25F4 F0 19 + beq SubCE5E8_Block ; CPU:$E5F4 PRG:25F4 F0 19 ldx #$00 ; CPU:$E5F6 PRG:25F6 A2 00 lda #$18 ; CPU:$E5F8 PRG:25F8 A9 18 ; ----------------------------------------------------------------------------- -; Routine: Label_E5FA +; Routine: SubCE5FA ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9903,12 +9912,12 @@ Label_E5E8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E5FA: +SubCE5FA: cmp Zp0C ; CPU:$E5FA PRG:25FA C5 0C beq UpdateMusicEngine ; CPU:$E5FC PRG:25FC F0 0B inx ; CPU:$E5FE PRG:25FE E8 cpx #$09 ; CPU:$E5FF PRG:25FF E0 09 - beq Label_E60C ; CPU:$E601 PRG:2601 F0 09 + beq SubCE5FA_Block ; CPU:$E601 PRG:2601 F0 09 lda $C1C4,x ; CPU:$E603 PRG:2603 BD C4 C1 jmp $E5FA ; CPU:$E606 PRG:2606 4C FA E5 ; ----------------------------------------------------------------------------- @@ -9924,7 +9933,7 @@ UpdateMusicEngine: lda #$00 ; CPU:$E609 PRG:2609 A9 00 rts ; CPU:$E60B PRG:260B 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E60C +; Routine: SubCE5FA_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9932,11 +9941,11 @@ UpdateMusicEngine: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E60C: +SubCE5FA_Block: lda #$01 ; CPU:$E60C PRG:260C A9 01 rts ; CPU:$E60E PRG:260E 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E60F +; Routine: SubCE5E8_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9944,10 +9953,10 @@ Label_E60C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E60F: +SubCE5E8_Block: ldx #$04 ; CPU:$E60F PRG:260F A2 04 ; ----------------------------------------------------------------------------- -; Routine: Label_E611 +; Routine: SubCE611 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9955,16 +9964,16 @@ Label_E60F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E611: +SubCE611: lda $C1C4,x ; CPU:$E611 PRG:2611 BD C4 C1 cmp Zp0C ; CPU:$E614 PRG:2614 C5 0C - beq Label_E620 ; CPU:$E616 PRG:2616 F0 08 + beq SubCE611_Block ; CPU:$E616 PRG:2616 F0 08 inx ; CPU:$E618 PRG:2618 E8 cpx #$09 ; CPU:$E619 PRG:2619 E0 09 - beq Label_E623 ; CPU:$E61B PRG:261B F0 06 + beq SubCE611_Block_1 ; CPU:$E61B PRG:261B F0 06 jmp $E611 ; CPU:$E61D PRG:261D 4C 11 E6 ; ----------------------------------------------------------------------------- -; Routine: Label_E620 +; Routine: SubCE611_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9972,11 +9981,11 @@ Label_E611: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E620: +SubCE611_Block: lda #$00 ; CPU:$E620 PRG:2620 A9 00 rts ; CPU:$E622 PRG:2622 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E623 +; Routine: SubCE611_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9984,11 +9993,11 @@ Label_E620: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E623: +SubCE611_Block_1: lda #$01 ; CPU:$E623 PRG:2623 A9 01 rts ; CPU:$E625 PRG:2625 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E626 +; Routine: SubCE626 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9996,14 +10005,14 @@ Label_E623: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E626: +SubCE626: ldx ZpAE ; CPU:$E626 PRG:2626 A6 AE lda ZpAF,x ; CPU:$E628 PRG:2628 B5 AF cmp #$13 ; CPU:$E62A PRG:262A C9 13 - bne Label_E62F ; CPU:$E62C PRG:262C D0 01 + bne SubCE626_Block ; CPU:$E62C PRG:262C D0 01 rts ; CPU:$E62E PRG:262E 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E62F +; Routine: SubCE626_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10011,16 +10020,16 @@ Label_E626: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E62F: +SubCE626_Block: jsr $EFDD ; CPU:$E62F PRG:262F 20 DD EF jsr $EAEC ; CPU:$E632 PRG:2632 20 EC EA ldx ZpAE ; CPU:$E635 PRG:2635 A6 AE lda ZpE0,x ; CPU:$E637 PRG:2637 B5 E0 cmp #$01 ; CPU:$E639 PRG:2639 C9 01 - beq Label_E640 ; CPU:$E63B PRG:263B F0 03 + beq SubCE626_Block_1 ; CPU:$E63B PRG:263B F0 03 jmp $E66D ; CPU:$E63D PRG:263D 4C 6D E6 ; ----------------------------------------------------------------------------- -; Routine: Label_E640 +; Routine: SubCE626_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10028,15 +10037,15 @@ Label_E62F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E640: +SubCE626_Block_1: lda Zp00 ; CPU:$E640 PRG:2640 A5 00 cmp #$5C ; CPU:$E642 PRG:2642 C9 5C - beq Label_E64D ; CPU:$E644 PRG:2644 F0 07 + beq SubCE626_Block_2 ; CPU:$E644 PRG:2644 F0 07 cmp #$C4 ; CPU:$E646 PRG:2646 C9 C4 - beq Label_E65D ; CPU:$E648 PRG:2648 F0 13 + beq SubCE626_Block_3 ; CPU:$E648 PRG:2648 F0 13 jmp $E69E ; CPU:$E64A PRG:264A 4C 9E E6 ; ----------------------------------------------------------------------------- -; Routine: Label_E64D +; Routine: SubCE626_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10044,7 +10053,7 @@ Label_E640: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E64D: +SubCE626_Block_2: lda ZpAE ; CPU:$E64D PRG:264D A5 AE asl a ; CPU:$E64F PRG:264F 0A tax ; CPU:$E650 PRG:2650 AA @@ -10055,7 +10064,7 @@ Label_E64D: sta ZpB9,x ; CPU:$E658 PRG:2658 95 B9 jmp $E697 ; CPU:$E65A PRG:265A 4C 97 E6 ; ----------------------------------------------------------------------------- -; Routine: Label_E65D +; Routine: SubCE626_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10063,7 +10072,7 @@ Label_E64D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E65D: +SubCE626_Block_3: lda ZpAE ; CPU:$E65D PRG:265D A5 AE asl a ; CPU:$E65F PRG:265F 0A tax ; CPU:$E660 PRG:2660 AA @@ -10074,7 +10083,7 @@ Label_E65D: sta ZpB9,x ; CPU:$E668 PRG:2668 95 B9 jmp $E697 ; CPU:$E66A PRG:266A 4C 97 E6 ; ----------------------------------------------------------------------------- -; Routine: Label_E66D +; Routine: SubCE66D ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10082,15 +10091,15 @@ Label_E65D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E66D: +SubCE66D: lda Zp00 ; CPU:$E66D PRG:266D A5 00 cmp #$2C ; CPU:$E66F PRG:266F C9 2C - beq Label_E67A ; CPU:$E671 PRG:2671 F0 07 + beq SubCE66D_Block ; CPU:$E671 PRG:2671 F0 07 cmp #$6C ; CPU:$E673 PRG:2673 C9 6C - beq Label_E68A ; CPU:$E675 PRG:2675 F0 13 + beq SubCE66D_Block_1 ; CPU:$E675 PRG:2675 F0 13 jmp $E69E ; CPU:$E677 PRG:2677 4C 9E E6 ; ----------------------------------------------------------------------------- -; Routine: Label_E67A +; Routine: SubCE66D_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10098,7 +10107,7 @@ Label_E66D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E67A: +SubCE66D_Block: lda ZpAE ; CPU:$E67A PRG:267A A5 AE asl a ; CPU:$E67C PRG:267C 0A tax ; CPU:$E67D PRG:267D AA @@ -10109,7 +10118,7 @@ Label_E67A: sta ZpB9,x ; CPU:$E685 PRG:2685 95 B9 jmp $E697 ; CPU:$E687 PRG:2687 4C 97 E6 ; ----------------------------------------------------------------------------- -; Routine: Label_E68A +; Routine: SubCE66D_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10117,7 +10126,7 @@ Label_E67A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E68A: +SubCE66D_Block_1: lda ZpAE ; CPU:$E68A PRG:268A A5 AE asl a ; CPU:$E68C PRG:268C 0A tax ; CPU:$E68D PRG:268D AA @@ -10127,7 +10136,7 @@ Label_E68A: lda #$A7 ; CPU:$E693 PRG:2693 A9 A7 sta ZpB9,x ; CPU:$E695 PRG:2695 95 B9 ; ----------------------------------------------------------------------------- -; Routine: Label_E697 +; Routine: SubCE697 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10135,13 +10144,13 @@ Label_E68A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E697: +SubCE697: lda #$03 ; CPU:$E697 PRG:2697 A9 03 ldx ZpAE ; CPU:$E699 PRG:2699 A6 AE sta ZpAF,x ; CPU:$E69B PRG:269B 95 AF rts ; CPU:$E69D PRG:269D 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E69E +; Routine: SubCE69E ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10149,13 +10158,13 @@ Label_E697: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E69E: +SubCE69E: lda #$00 ; CPU:$E69E PRG:269E A9 00 ldx ZpAE ; CPU:$E6A0 PRG:26A0 A6 AE sta ZpAF,x ; CPU:$E6A2 PRG:26A2 95 AF rts ; CPU:$E6A4 PRG:26A4 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E6A5 +; Routine: SubCE6A5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10163,7 +10172,7 @@ Label_E69E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E6A5: +SubCE6A5: lda Zp01 ; CPU:$E6A5 PRG:26A5 A5 01 clc ; CPU:$E6A7 PRG:26A7 18 adc #$0B ; CPU:$E6A8 PRG:26A8 69 0B @@ -10173,10 +10182,10 @@ Label_E6A5: sta ZpE0,x ; CPU:$E6B1 PRG:26B1 95 E0 lda Zp53 ; CPU:$E6B3 PRG:26B3 A5 53 cmp #$01 ; CPU:$E6B5 PRG:26B5 C9 01 - bne Label_E6BC ; CPU:$E6B7 PRG:26B7 D0 03 + bne SubCE6A5_Block ; CPU:$E6B7 PRG:26B7 D0 03 jmp $E6C6 ; CPU:$E6B9 PRG:26B9 4C C6 E6 ; ----------------------------------------------------------------------------- -; Routine: Label_E6BC +; Routine: SubCE6A5_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10184,12 +10193,12 @@ Label_E6A5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E6BC: +SubCE6A5_Block: cmp #$03 ; CPU:$E6BC PRG:26BC C9 03 - bne Label_E6C3 ; CPU:$E6BE PRG:26BE D0 03 + bne SubCE6A5_Block_1 ; CPU:$E6BE PRG:26BE D0 03 jmp $E702 ; CPU:$E6C0 PRG:26C0 4C 02 E7 ; ----------------------------------------------------------------------------- -; Routine: Label_E6C3 +; Routine: SubCE6A5_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10197,10 +10206,10 @@ Label_E6BC: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E6C3: +SubCE6A5_Block_1: jmp $E73C ; CPU:$E6C3 PRG:26C3 4C 3C E7 ; ----------------------------------------------------------------------------- -; Routine: Label_E6C6 +; Routine: SubCE6C6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10208,18 +10217,18 @@ Label_E6C3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E6C6: +SubCE6C6: lda Zp00 ; CPU:$E6C6 PRG:26C6 A5 00 jsr $E5E8 ; CPU:$E6C8 PRG:26C8 20 E8 E5 - bne Label_E6E3 ; CPU:$E6CB PRG:26CB D0 16 + bne SubCE6DE_Block ; CPU:$E6CB PRG:26CB D0 16 ldx ZpAE ; CPU:$E6CD PRG:26CD A6 AE lda ZpE0,x ; CPU:$E6CF PRG:26CF B5 E0 and #$01 ; CPU:$E6D1 PRG:26D1 29 01 - beq Label_E6DB ; CPU:$E6D3 PRG:26D3 F0 06 + beq SubCE6C6_Block ; CPU:$E6D3 PRG:26D3 F0 06 lda $C79A,y ; CPU:$E6D5 PRG:26D5 B9 9A C7 jmp $E6DE ; CPU:$E6D8 PRG:26D8 4C DE E6 ; ----------------------------------------------------------------------------- -; Routine: Label_E6DB +; Routine: SubCE6C6_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10227,10 +10236,10 @@ Label_E6C6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E6DB: +SubCE6C6_Block: lda $C79C,y ; CPU:$E6DB PRG:26DB B9 9C C7 ; ----------------------------------------------------------------------------- -; Routine: Label_E6DE +; Routine: SubCE6DE ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10238,12 +10247,12 @@ Label_E6DB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E6DE: +SubCE6DE: clc ; CPU:$E6DE PRG:26DE 18 adc Zp01 ; CPU:$E6DF PRG:26DF 65 01 sta Zp01 ; CPU:$E6E1 PRG:26E1 85 01 ; ----------------------------------------------------------------------------- -; Routine: Label_E6E3 +; Routine: SubCE6DE_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10251,17 +10260,17 @@ Label_E6DE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E6E3: +SubCE6DE_Block: ldx ZpAE ; CPU:$E6E3 PRG:26E3 A6 AE lda ZpE0,x ; CPU:$E6E5 PRG:26E5 B5 E0 cmp #$01 ; CPU:$E6E7 PRG:26E7 C9 01 - beq Label_E6F3 ; CPU:$E6E9 PRG:26E9 F0 08 + beq SubCE6DE_Block_1 ; CPU:$E6E9 PRG:26E9 F0 08 lda Zp00 ; CPU:$E6EB PRG:26EB A5 00 cmp $C3E6,y ; CPU:$E6ED PRG:26ED D9 E6 C3 - beq Label_E6FB ; CPU:$E6F0 PRG:26F0 F0 09 + beq SubCE6DE_Block_2 ; CPU:$E6F0 PRG:26F0 F0 09 rts ; CPU:$E6F2 PRG:26F2 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E6F3 +; Routine: SubCE6DE_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10269,13 +10278,13 @@ Label_E6E3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E6F3: +SubCE6DE_Block_1: lda Zp00 ; CPU:$E6F3 PRG:26F3 A5 00 cmp $C3E8,y ; CPU:$E6F5 PRG:26F5 D9 E8 C3 - beq Label_E6FB ; CPU:$E6F8 PRG:26F8 F0 01 + beq SubCE6DE_Block_2 ; CPU:$E6F8 PRG:26F8 F0 01 rts ; CPU:$E6FA PRG:26FA 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E6FB +; Routine: SubCE6DE_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10283,13 +10292,13 @@ Label_E6F3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E6FB: +SubCE6DE_Block_2: lda #$00 ; CPU:$E6FB PRG:26FB A9 00 ldx ZpAE ; CPU:$E6FD PRG:26FD A6 AE sta ZpAF,x ; CPU:$E6FF PRG:26FF 95 AF rts ; CPU:$E701 PRG:2701 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E702 +; Routine: SubCE702 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10297,19 +10306,19 @@ Label_E6FB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E702: +SubCE702: ldx ZpAE ; CPU:$E702 PRG:2702 A6 AE lda ZpE0,x ; CPU:$E704 PRG:2704 B5 E0 cmp #$02 ; CPU:$E706 PRG:2706 C9 02 - bne Label_E719 ; CPU:$E708 PRG:2708 D0 0F + bne SubCE702_Block ; CPU:$E708 PRG:2708 D0 0F lda Zp00 ; CPU:$E70A PRG:270A A5 00 cmp $C3EA,y ; CPU:$E70C PRG:270C D9 EA C3 - beq Label_E735 ; CPU:$E70F PRG:270F F0 24 + beq SubCE702_Block_3 ; CPU:$E70F PRG:270F F0 24 cmp $C3EC,y ; CPU:$E711 PRG:2711 D9 EC C3 - beq Label_E735 ; CPU:$E714 PRG:2714 F0 1F + beq SubCE702_Block_3 ; CPU:$E714 PRG:2714 F0 1F jmp $E72D ; CPU:$E716 PRG:2716 4C 2D E7 ; ----------------------------------------------------------------------------- -; Routine: Label_E719 +; Routine: SubCE702_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10317,13 +10326,13 @@ Label_E702: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E719: +SubCE702_Block: cpy #$01 ; CPU:$E719 PRG:2719 C0 01 - bne Label_E721 ; CPU:$E71B PRG:271B D0 04 + bne SubCE702_Block_1 ; CPU:$E71B PRG:271B D0 04 cmp #$04 ; CPU:$E71D PRG:271D C9 04 - beq Label_E72E ; CPU:$E71F PRG:271F F0 0D + beq SubCE702_Block_2 ; CPU:$E71F PRG:271F F0 0D ; ----------------------------------------------------------------------------- -; Routine: Label_E721 +; Routine: SubCE702_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10331,14 +10340,14 @@ Label_E719: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E721: +SubCE702_Block_1: lda Zp00 ; CPU:$E721 PRG:2721 A5 00 cmp $C3EE,y ; CPU:$E723 PRG:2723 D9 EE C3 - beq Label_E735 ; CPU:$E726 PRG:2726 F0 0D + beq SubCE702_Block_3 ; CPU:$E726 PRG:2726 F0 0D cmp $C3F0,y ; CPU:$E728 PRG:2728 D9 F0 C3 - beq Label_E735 ; CPU:$E72B PRG:272B F0 08 + beq SubCE702_Block_3 ; CPU:$E72B PRG:272B F0 08 ; ----------------------------------------------------------------------------- -; Routine: Label_E72D +; Routine: SubCE72D ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10346,10 +10355,10 @@ Label_E721: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E72D: +SubCE72D: rts ; CPU:$E72D PRG:272D 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E72E +; Routine: SubCE702_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10357,13 +10366,13 @@ Label_E72D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E72E: +SubCE702_Block_2: lda Zp00 ; CPU:$E72E PRG:272E A5 00 cmp #$DB ; CPU:$E730 PRG:2730 C9 DB - beq Label_E735 ; CPU:$E732 PRG:2732 F0 01 + beq SubCE702_Block_3 ; CPU:$E732 PRG:2732 F0 01 rts ; CPU:$E734 PRG:2734 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E735 +; Routine: SubCE702_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10371,13 +10380,13 @@ Label_E72E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E735: +SubCE702_Block_3: ldx ZpAE ; CPU:$E735 PRG:2735 A6 AE lda #$00 ; CPU:$E737 PRG:2737 A9 00 sta ZpAF,x ; CPU:$E739 PRG:2739 95 AF rts ; CPU:$E73B PRG:273B 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E73C +; Routine: SubCE73C ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10385,7 +10394,7 @@ Label_E735: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E73C: +SubCE73C: ldx ZpAE ; CPU:$E73C PRG:273C A6 AE lda ZpE0,x ; CPU:$E73E PRG:273E B5 E0 tay ; CPU:$E740 PRG:2740 A8 @@ -10393,7 +10402,7 @@ Label_E73C: ldx Zp99 ; CPU:$E742 PRG:2742 A6 99 lda $C3F2,x ; CPU:$E744 PRG:2744 BD F2 C3 ; ----------------------------------------------------------------------------- -; Routine: Label_E747 +; Routine: SubCE747 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10401,16 +10410,16 @@ Label_E73C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E747: +SubCE747: cpy #$00 ; CPU:$E747 PRG:2747 C0 00 - beq Label_E75C ; CPU:$E749 PRG:2749 F0 11 + beq SubCE747_Block_1 ; CPU:$E749 PRG:2749 F0 11 cpx #$00 ; CPU:$E74B PRG:274B E0 00 - beq Label_E755 ; CPU:$E74D PRG:274D F0 06 + beq SubCE747_Block ; CPU:$E74D PRG:274D F0 06 clc ; CPU:$E74F PRG:274F 18 adc #$08 ; CPU:$E750 PRG:2750 69 08 jmp $E758 ; CPU:$E752 PRG:2752 4C 58 E7 ; ----------------------------------------------------------------------------- -; Routine: Label_E755 +; Routine: SubCE747_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10418,11 +10427,11 @@ Label_E747: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E755: +SubCE747_Block: sec ; CPU:$E755 PRG:2755 38 sbc #$08 ; CPU:$E756 PRG:2756 E9 08 ; ----------------------------------------------------------------------------- -; Routine: Label_E758 +; Routine: SubCE758 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10430,11 +10439,11 @@ Label_E755: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E758: +SubCE758: dey ; CPU:$E758 PRG:2758 88 jmp $E747 ; CPU:$E759 PRG:2759 4C 47 E7 ; ----------------------------------------------------------------------------- -; Routine: Label_E75C +; Routine: SubCE747_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10442,16 +10451,16 @@ Label_E758: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E75C: +SubCE747_Block_1: cmp Zp00 ; CPU:$E75C PRG:275C C5 00 - beq Label_E769 ; CPU:$E75E PRG:275E F0 09 + beq SubCE747_Block_2 ; CPU:$E75E PRG:275E F0 09 lda Zp99 ; CPU:$E760 PRG:2760 A5 99 asl a ; CPU:$E762 PRG:2762 0A jsr $E770 ; CPU:$E763 PRG:2763 20 70 E7 - beq Label_E769 ; CPU:$E766 PRG:2766 F0 01 + beq SubCE747_Block_2 ; CPU:$E766 PRG:2766 F0 01 rts ; CPU:$E768 PRG:2768 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E769 +; Routine: SubCE747_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10459,13 +10468,13 @@ Label_E75C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E769: +SubCE747_Block_2: ldx ZpAE ; CPU:$E769 PRG:2769 A6 AE lda #$00 ; CPU:$E76B PRG:276B A9 00 sta ZpAF,x ; CPU:$E76D PRG:276D 95 AF rts ; CPU:$E76F PRG:276F 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E770 +; Routine: SubCE770 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10473,7 +10482,7 @@ Label_E769: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E770: +SubCE770: sta Zp09 ; CPU:$E770 PRG:2770 85 09 jsr $EFDD ; CPU:$E772 PRG:2772 20 DD EF lda $0203,x ; CPU:$E775 PRG:2775 BD 03 02 @@ -10485,13 +10494,13 @@ Label_E770: asl a ; CPU:$E781 PRG:2781 0A tax ; CPU:$E782 PRG:2782 AA lda ZpC1,x ; CPU:$E783 PRG:2783 B5 C1 - beq Label_E790 ; CPU:$E785 PRG:2785 F0 09 + beq SubCE770_Block ; CPU:$E785 PRG:2785 F0 09 ldy Zp09 ; CPU:$E787 PRG:2787 A4 09 lda $C3DE,y ; CPU:$E789 PRG:2789 B9 DE C3 cmp Zp0A ; CPU:$E78C PRG:278C C5 0A - beq Label_E79D ; CPU:$E78E PRG:278E F0 0D + beq SubCE770_Block_1 ; CPU:$E78E PRG:278E F0 0D ; ----------------------------------------------------------------------------- -; Routine: Label_E790 +; Routine: SubCE770_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10499,15 +10508,15 @@ Label_E770: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E790: +SubCE770_Block: lda ZpC2,x ; CPU:$E790 PRG:2790 B5 C2 - beq Label_E7A0 ; CPU:$E792 PRG:2792 F0 0C + beq SubCE770_Block_2 ; CPU:$E792 PRG:2792 F0 0C ldy Zp09 ; CPU:$E794 PRG:2794 A4 09 lda $C3DF,y ; CPU:$E796 PRG:2796 B9 DF C3 cmp Zp0A ; CPU:$E799 PRG:2799 C5 0A - bne Label_E7A0 ; CPU:$E79B PRG:279B D0 03 + bne SubCE770_Block_2 ; CPU:$E79B PRG:279B D0 03 ; ----------------------------------------------------------------------------- -; Routine: Label_E79D +; Routine: SubCE770_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10515,11 +10524,11 @@ Label_E790: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E79D: +SubCE770_Block_1: lda #$00 ; CPU:$E79D PRG:279D A9 00 rts ; CPU:$E79F PRG:279F 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E7A0 +; Routine: SubCE770_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10527,11 +10536,11 @@ Label_E79D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E7A0: +SubCE770_Block_2: lda #$01 ; CPU:$E7A0 PRG:27A0 A9 01 rts ; CPU:$E7A2 PRG:27A2 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E7A3 +; Routine: SubCE7A3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10539,15 +10548,15 @@ Label_E7A0: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E7A3: +SubCE7A3: ldx ZpAE ; CPU:$E7A3 PRG:27A3 A6 AE lda ZpDB,x ; CPU:$E7A5 PRG:27A5 B5 DB - beq Label_E7AE ; CPU:$E7A7 PRG:27A7 F0 05 + beq SubCE7A3_Block ; CPU:$E7A7 PRG:27A7 F0 05 ldx ZpAE ; CPU:$E7A9 PRG:27A9 A6 AE lda ZpAF,x ; CPU:$E7AB PRG:27AB B5 AF rts ; CPU:$E7AD PRG:27AD 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E7AE +; Routine: SubCE7A3_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10555,7 +10564,7 @@ Label_E7A3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E7AE: +SubCE7A3_Block: lda Zp53 ; CPU:$E7AE PRG:27AE A5 53 sec ; CPU:$E7B0 PRG:27B0 38 sbc #$02 ; CPU:$E7B1 PRG:27B1 E9 02 @@ -10567,7 +10576,7 @@ Label_E7AE: sta Zp08 ; CPU:$E7BD PRG:27BD 85 08 ldx ZpAE ; CPU:$E7BF PRG:27BF A6 AE ldy ZpE0,x ; CPU:$E7C1 PRG:27C1 B4 E0 - beq Label_E7F2 ; CPU:$E7C3 PRG:27C3 F0 2D + beq SubCE7E2_Block ; CPU:$E7C3 PRG:27C3 F0 2D dey ; CPU:$E7C5 PRG:27C5 88 lda (Zp07),y ; CPU:$E7C6 PRG:27C6 B1 07 sta Zp09 ; CPU:$E7C8 PRG:27C8 85 09 @@ -10585,7 +10594,7 @@ Label_E7AE: sta Zp08 ; CPU:$E7DE PRG:27DE 85 08 ldy Zp09 ; CPU:$E7E0 PRG:27E0 A4 09 ; ----------------------------------------------------------------------------- -; Routine: Label_E7E2 +; Routine: SubCE7E2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10593,18 +10602,18 @@ Label_E7AE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E7E2: +SubCE7E2: cpy Zp0A ; CPU:$E7E2 PRG:27E2 C4 0A - beq Label_E7F2 ; CPU:$E7E4 PRG:27E4 F0 0C + beq SubCE7E2_Block ; CPU:$E7E4 PRG:27E4 F0 0C lda (Zp07),y ; CPU:$E7E6 PRG:27E6 B1 07 cmp Zp00 ; CPU:$E7E8 PRG:27E8 C5 00 - beq Label_E7F9 ; CPU:$E7EA PRG:27EA F0 0D + beq SubCE7E2_Block_1 ; CPU:$E7EA PRG:27EA F0 0D iny ; CPU:$E7EC PRG:27EC C8 iny ; CPU:$E7ED PRG:27ED C8 iny ; CPU:$E7EE PRG:27EE C8 jmp $E7E2 ; CPU:$E7EF PRG:27EF 4C E2 E7 ; ----------------------------------------------------------------------------- -; Routine: Label_E7F2 +; Routine: SubCE7E2_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10612,13 +10621,13 @@ Label_E7E2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E7F2: +SubCE7E2_Block: lda #$00 ; CPU:$E7F2 PRG:27F2 A9 00 ldx ZpAE ; CPU:$E7F4 PRG:27F4 A6 AE sta ZpAF,x ; CPU:$E7F6 PRG:27F6 95 AF rts ; CPU:$E7F8 PRG:27F8 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E7F9 +; Routine: SubCE7E2_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10626,7 +10635,7 @@ Label_E7F2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E7F9: +SubCE7E2_Block_1: iny ; CPU:$E7F9 PRG:27F9 C8 lda (Zp07),y ; CPU:$E7FA PRG:27FA B1 07 ldx ZpAE ; CPU:$E7FC PRG:27FC A6 AE @@ -10636,7 +10645,7 @@ Label_E7F9: sta ZpAF,x ; CPU:$E803 PRG:2803 95 AF rts ; CPU:$E805 PRG:2805 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E806 +; Routine: AdvancePatternBit ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10644,16 +10653,16 @@ Label_E7F9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E806: +AdvancePatternBit: ldx ZpAE ; CPU:$E806 PRG:2806 A6 AE inc ZpE4,x ; CPU:$E808 PRG:2808 F6 E4 lda ZpE4,x ; CPU:$E80A PRG:280A B5 E4 - bmi Label_E815 ; CPU:$E80C PRG:280C 30 07 + bmi AdvancePatternBit_Block ; CPU:$E80C PRG:280C 30 07 cmp #$10 ; CPU:$E80E PRG:280E C9 10 - bcs Label_E815 ; CPU:$E810 PRG:2810 B0 03 + bcs AdvancePatternBit_Block ; CPU:$E810 PRG:2810 B0 03 jmp $E819 ; CPU:$E812 PRG:2812 4C 19 E8 ; ----------------------------------------------------------------------------- -; Routine: Label_E815 +; Routine: AdvancePatternBit_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10661,11 +10670,11 @@ Label_E806: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E815: +AdvancePatternBit_Block: lda #$00 ; CPU:$E815 PRG:2815 A9 00 sta ZpE4,x ; CPU:$E817 PRG:2817 95 E4 ; ----------------------------------------------------------------------------- -; Routine: Label_E819 +; Routine: ReadPatternBit ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10673,15 +10682,15 @@ Label_E815: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E819: +ReadPatternBit: cmp #$08 ; CPU:$E819 PRG:2819 C9 08 - bcs Label_E826 ; CPU:$E81B PRG:281B B0 09 + bcs ReadPatternBit_Block ; CPU:$E81B PRG:281B B0 09 tax ; CPU:$E81D PRG:281D AA lda $C1BC,x ; CPU:$E81E PRG:281E BD BC C1 and Zp0A ; CPU:$E821 PRG:2821 25 0A jmp $E82F ; CPU:$E823 PRG:2823 4C 2F E8 ; ----------------------------------------------------------------------------- -; Routine: Label_E826 +; Routine: ReadPatternBit_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10689,14 +10698,14 @@ Label_E819: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E826: +ReadPatternBit_Block: sec ; CPU:$E826 PRG:2826 38 sbc #$08 ; CPU:$E827 PRG:2827 E9 08 tax ; CPU:$E829 PRG:2829 AA lda $C1BC,x ; CPU:$E82A PRG:282A BD BC C1 and Zp0B ; CPU:$E82D PRG:282D 25 0B ; ----------------------------------------------------------------------------- -; Routine: Label_E82F +; Routine: ReadPatternBit_Return ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10704,11 +10713,11 @@ Label_E826: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E82F: - beq Label_E833 ; CPU:$E82F PRG:282F F0 02 +ReadPatternBit_Return: + beq ReadPatternBit_Return_Block ; CPU:$E82F PRG:282F F0 02 lda #$01 ; CPU:$E831 PRG:2831 A9 01 ; ----------------------------------------------------------------------------- -; Routine: Label_E833 +; Routine: ReadPatternBit_Return_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10716,10 +10725,10 @@ Label_E82F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E833: +ReadPatternBit_Return_Block: rts ; CPU:$E833 PRG:2833 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E834 +; Routine: SubCE834 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10727,7 +10736,7 @@ Label_E833: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E834: +SubCE834: jsr $EAF7 ; CPU:$E834 PRG:2834 20 F7 EA lda $C45C,x ; CPU:$E837 PRG:2837 BD 5C C4 sta Zp0A ; CPU:$E83A PRG:283A 85 0A @@ -10736,10 +10745,10 @@ Label_E834: lda #$00 ; CPU:$E841 PRG:2841 A9 00 sta Zp5D ; CPU:$E843 PRG:2843 85 5D jsr $DFE8 ; CPU:$E845 PRG:2845 20 E8 DF - bne Label_E84B ; CPU:$E848 PRG:2848 D0 01 + bne SubCE834_Block ; CPU:$E848 PRG:2848 D0 01 rts ; CPU:$E84A PRG:284A 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E84B +; Routine: SubCE834_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10747,11 +10756,11 @@ Label_E834: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E84B: +SubCE834_Block: lda #$00 ; CPU:$E84B PRG:284B A9 00 sta ZpD2 ; CPU:$E84D PRG:284D 85 D2 ; ----------------------------------------------------------------------------- -; Routine: Label_E84F +; Routine: SubCE84F ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10759,21 +10768,21 @@ Label_E84B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E84F: +SubCE84F: lda ZpD2 ; CPU:$E84F PRG:284F A5 D2 cmp #$03 ; CPU:$E851 PRG:2851 C9 03 - bcs Label_E8A9 ; CPU:$E853 PRG:2853 B0 54 + bcs SubCE84F_Block_2 ; CPU:$E853 PRG:2853 B0 54 tax ; CPU:$E855 PRG:2855 AA - bne Label_E86A ; CPU:$E856 PRG:2856 D0 12 + bne SubCE84F_Block ; CPU:$E856 PRG:2856 D0 12 lda ZpDA ; CPU:$E858 PRG:2858 A5 DA cmp #$01 ; CPU:$E85A PRG:285A C9 01 - bne Label_E86A ; CPU:$E85C PRG:285C D0 0C + bne SubCE84F_Block ; CPU:$E85C PRG:285C D0 0C dec $0200 ; CPU:$E85E PRG:285E CE 00 02 dec $0204 ; CPU:$E861 PRG:2861 CE 04 02 dec $0208 ; CPU:$E864 PRG:2864 CE 08 02 dec $020C ; CPU:$E867 PRG:2867 CE 0C 02 ; ----------------------------------------------------------------------------- -; Routine: Label_E86A +; Routine: SubCE84F_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10781,22 +10790,22 @@ Label_E84F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E86A: +SubCE84F_Block: ldy $C2CC,x ; CPU:$E86A PRG:286A BC CC C2 lda $0200,y ; CPU:$E86D PRG:286D B9 00 02 cmp #$FF ; CPU:$E870 PRG:2870 C9 FF - beq Label_E8A4 ; CPU:$E872 PRG:2872 F0 30 + beq SubCE890_Block_1 ; CPU:$E872 PRG:2872 F0 30 tya ; CPU:$E874 PRG:2874 98 tax ; CPU:$E875 PRG:2875 AA dec $0200,x ; CPU:$E876 PRG:2876 DE 00 02 dec $0204,x ; CPU:$E879 PRG:2879 DE 04 02 lda $0200,x ; CPU:$E87C PRG:287C BD 00 02 cmp #$50 ; CPU:$E87F PRG:287F C9 50 - bne Label_E889 ; CPU:$E881 PRG:2881 D0 06 + bne SubCE84F_Block_1 ; CPU:$E881 PRG:2881 D0 06 jsr $E968 ; CPU:$E883 PRG:2883 20 68 E9 jmp $E890 ; CPU:$E886 PRG:2886 4C 90 E8 ; ----------------------------------------------------------------------------- -; Routine: Label_E889 +; Routine: SubCE84F_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10804,12 +10813,12 @@ Label_E86A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E889: +SubCE84F_Block_1: cmp #$C8 ; CPU:$E889 PRG:2889 C9 C8 - bne Label_E890 ; CPU:$E88B PRG:288B D0 03 + bne SubCE890 ; CPU:$E88B PRG:288B D0 03 jsr $E971 ; CPU:$E88D PRG:288D 20 71 E9 ; ----------------------------------------------------------------------------- -; Routine: Label_E890 +; Routine: SubCE890 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10817,14 +10826,14 @@ Label_E889: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E890: +SubCE890: lda $0200,y ; CPU:$E890 PRG:2890 B9 00 02 cmp #$70 ; CPU:$E893 PRG:2893 C9 70 - bne Label_E89B ; CPU:$E895 PRG:2895 D0 04 + bne SubCE890_Block ; CPU:$E895 PRG:2895 D0 04 lda #$01 ; CPU:$E897 PRG:2897 A9 01 sta ZpD8 ; CPU:$E899 PRG:2899 85 D8 ; ----------------------------------------------------------------------------- -; Routine: Label_E89B +; Routine: SubCE890_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10832,13 +10841,13 @@ Label_E890: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E89B: +SubCE890_Block: lda $0200,y ; CPU:$E89B PRG:289B B9 00 02 cmp #$48 ; CPU:$E89E PRG:289E C9 48 - beq Label_E901 ; CPU:$E8A0 PRG:28A0 F0 5F - bcc Label_E901 ; CPU:$E8A2 PRG:28A2 90 5D + beq SubCE8EA_Block_2 ; CPU:$E8A0 PRG:28A0 F0 5F + bcc SubCE8EA_Block_2 ; CPU:$E8A2 PRG:28A2 90 5D ; ----------------------------------------------------------------------------- -; Routine: Label_E8A4 +; Routine: SubCE890_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10846,11 +10855,11 @@ Label_E89B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E8A4: +SubCE890_Block_1: inc ZpD2 ; CPU:$E8A4 PRG:28A4 E6 D2 jmp $E84F ; CPU:$E8A6 PRG:28A6 4C 4F E8 ; ----------------------------------------------------------------------------- -; Routine: Label_E8A9 +; Routine: SubCE84F_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10858,21 +10867,21 @@ Label_E8A4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E8A9: +SubCE84F_Block_2: cmp #$06 ; CPU:$E8A9 PRG:28A9 C9 06 - beq Label_E90E ; CPU:$E8AB PRG:28AB F0 61 + beq SubCE84F_Block_5 ; CPU:$E8AB PRG:28AB F0 61 tax ; CPU:$E8AD PRG:28AD AA cmp #$03 ; CPU:$E8AE PRG:28AE C9 03 - bne Label_E8C4 ; CPU:$E8B0 PRG:28B0 D0 12 + bne SubCE84F_Block_3 ; CPU:$E8B0 PRG:28B0 D0 12 lda ZpDA ; CPU:$E8B2 PRG:28B2 A5 DA cmp #$02 ; CPU:$E8B4 PRG:28B4 C9 02 - bne Label_E8C4 ; CPU:$E8B6 PRG:28B6 D0 0C + bne SubCE84F_Block_3 ; CPU:$E8B6 PRG:28B6 D0 0C inc $0200 ; CPU:$E8B8 PRG:28B8 EE 00 02 inc $0204 ; CPU:$E8BB PRG:28BB EE 04 02 inc $0208 ; CPU:$E8BE PRG:28BE EE 08 02 inc $020C ; CPU:$E8C1 PRG:28C1 EE 0C 02 ; ----------------------------------------------------------------------------- -; Routine: Label_E8C4 +; Routine: SubCE84F_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10880,22 +10889,22 @@ Label_E8A9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E8C4: +SubCE84F_Block_3: ldy $C2CC,x ; CPU:$E8C4 PRG:28C4 BC CC C2 lda $0200,y ; CPU:$E8C7 PRG:28C7 B9 00 02 cmp #$FF ; CPU:$E8CA PRG:28CA C9 FF - beq Label_E8FC ; CPU:$E8CC PRG:28CC F0 2E + beq SubCE8EA_Block_1 ; CPU:$E8CC PRG:28CC F0 2E tya ; CPU:$E8CE PRG:28CE 98 tax ; CPU:$E8CF PRG:28CF AA inc $0200,x ; CPU:$E8D0 PRG:28D0 FE 00 02 inc $0204,x ; CPU:$E8D3 PRG:28D3 FE 04 02 lda $0200,x ; CPU:$E8D6 PRG:28D6 BD 00 02 cmp #$50 ; CPU:$E8D9 PRG:28D9 C9 50 - bne Label_E8E3 ; CPU:$E8DB PRG:28DB D0 06 + bne SubCE84F_Block_4 ; CPU:$E8DB PRG:28DB D0 06 jsr $E971 ; CPU:$E8DD PRG:28DD 20 71 E9 jmp $E8EA ; CPU:$E8E0 PRG:28E0 4C EA E8 ; ----------------------------------------------------------------------------- -; Routine: Label_E8E3 +; Routine: SubCE84F_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10903,12 +10912,12 @@ Label_E8C4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E8E3: +SubCE84F_Block_4: cmp #$C8 ; CPU:$E8E3 PRG:28E3 C9 C8 - bne Label_E8EA ; CPU:$E8E5 PRG:28E5 D0 03 + bne SubCE8EA ; CPU:$E8E5 PRG:28E5 D0 03 jsr $E968 ; CPU:$E8E7 PRG:28E7 20 68 E9 ; ----------------------------------------------------------------------------- -; Routine: Label_E8EA +; Routine: SubCE8EA ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10916,15 +10925,15 @@ Label_E8E3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E8EA: +SubCE8EA: lda $0200,y ; CPU:$E8EA PRG:28EA B9 00 02 cmp #$A8 ; CPU:$E8ED PRG:28ED C9 A8 - bne Label_E8F8 ; CPU:$E8EF PRG:28EF D0 07 + bne SubCE8EA_Block ; CPU:$E8EF PRG:28EF D0 07 lda #$01 ; CPU:$E8F1 PRG:28F1 A9 01 sta ZpD9 ; CPU:$E8F3 PRG:28F3 85 D9 lda $0200,y ; CPU:$E8F5 PRG:28F5 B9 00 02 ; ----------------------------------------------------------------------------- -; Routine: Label_E8F8 +; Routine: SubCE8EA_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10932,11 +10941,11 @@ Label_E8EA: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E8F8: +SubCE8EA_Block: cmp #$D0 ; CPU:$E8F8 PRG:28F8 C9 D0 - bcs Label_E901 ; CPU:$E8FA PRG:28FA B0 05 + bcs SubCE8EA_Block_2 ; CPU:$E8FA PRG:28FA B0 05 ; ----------------------------------------------------------------------------- -; Routine: Label_E8FC +; Routine: SubCE8EA_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10944,11 +10953,11 @@ Label_E8F8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E8FC: +SubCE8EA_Block_1: inc ZpD2 ; CPU:$E8FC PRG:28FC E6 D2 jmp $E84F ; CPU:$E8FE PRG:28FE 4C 4F E8 ; ----------------------------------------------------------------------------- -; Routine: Label_E901 +; Routine: SubCE8EA_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10956,14 +10965,14 @@ Label_E8FC: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E901: +SubCE8EA_Block_2: lda #$FF ; CPU:$E901 PRG:2901 A9 FF sta $0200,y ; CPU:$E903 PRG:2903 99 00 02 sta $0204,y ; CPU:$E906 PRG:2906 99 04 02 inc ZpD2 ; CPU:$E909 PRG:2909 E6 D2 jmp $E84F ; CPU:$E90B PRG:290B 4C 4F E8 ; ----------------------------------------------------------------------------- -; Routine: Label_E90E +; Routine: SubCE84F_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10971,14 +10980,14 @@ Label_E901: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E90E: +SubCE84F_Block_5: lda ZpD8 ; CPU:$E90E PRG:290E A5 D8 cmp #$01 ; CPU:$E910 PRG:2910 C9 01 - bne Label_E93B ; CPU:$E912 PRG:2912 D0 27 + bne SubCE84F_Block_6 ; CPU:$E912 PRG:2912 D0 27 lda #$00 ; CPU:$E914 PRG:2914 A9 00 sta ZpD2 ; CPU:$E916 PRG:2916 85 D2 ; ----------------------------------------------------------------------------- -; Routine: Label_E918 +; Routine: SubCE918 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10986,19 +10995,19 @@ Label_E90E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E918: +SubCE918: lda ZpD2 ; CPU:$E918 PRG:2918 A5 D2 cmp #$03 ; CPU:$E91A PRG:291A C9 03 - beq Label_E967 ; CPU:$E91C PRG:291C F0 49 + beq SubCE945_Block_1 ; CPU:$E91C PRG:291C F0 49 tax ; CPU:$E91E PRG:291E AA ldy $C2CC,x ; CPU:$E91F PRG:291F BC CC C2 lda $0200,y ; CPU:$E922 PRG:2922 B9 00 02 cmp #$FF ; CPU:$E925 PRG:2925 C9 FF - beq Label_E92E ; CPU:$E927 PRG:2927 F0 05 + beq SubCE918_Block ; CPU:$E927 PRG:2927 F0 05 inc ZpD2 ; CPU:$E929 PRG:2929 E6 D2 jmp $E918 ; CPU:$E92B PRG:292B 4C 18 E9 ; ----------------------------------------------------------------------------- -; Routine: Label_E92E +; Routine: SubCE918_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11006,7 +11015,7 @@ Label_E918: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E92E: +SubCE918_Block: lda #$D0 ; CPU:$E92E PRG:292E A9 D0 jsr $E97A ; CPU:$E930 PRG:2930 20 7A E9 jsr $E968 ; CPU:$E933 PRG:2933 20 68 E9 @@ -11014,7 +11023,7 @@ Label_E92E: sta ZpD8 ; CPU:$E938 PRG:2938 85 D8 rts ; CPU:$E93A PRG:293A 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E93B +; Routine: SubCE84F_Block_6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11022,14 +11031,14 @@ Label_E92E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E93B: +SubCE84F_Block_6: lda ZpD9 ; CPU:$E93B PRG:293B A5 D9 cmp #$01 ; CPU:$E93D PRG:293D C9 01 - bne Label_E967 ; CPU:$E93F PRG:293F D0 26 + bne SubCE945_Block_1 ; CPU:$E93F PRG:293F D0 26 lda #$03 ; CPU:$E941 PRG:2941 A9 03 sta ZpD2 ; CPU:$E943 PRG:2943 85 D2 ; ----------------------------------------------------------------------------- -; Routine: Label_E945 +; Routine: SubCE945 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11037,19 +11046,19 @@ Label_E93B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E945: +SubCE945: lda ZpD2 ; CPU:$E945 PRG:2945 A5 D2 cmp #$06 ; CPU:$E947 PRG:2947 C9 06 - beq Label_E967 ; CPU:$E949 PRG:2949 F0 1C + beq SubCE945_Block_1 ; CPU:$E949 PRG:2949 F0 1C tax ; CPU:$E94B PRG:294B AA ldy $C2CC,x ; CPU:$E94C PRG:294C BC CC C2 lda $0200,y ; CPU:$E94F PRG:294F B9 00 02 cmp #$FF ; CPU:$E952 PRG:2952 C9 FF - beq Label_E95B ; CPU:$E954 PRG:2954 F0 05 + beq SubCE945_Block ; CPU:$E954 PRG:2954 F0 05 inc ZpD2 ; CPU:$E956 PRG:2956 E6 D2 jmp $E945 ; CPU:$E958 PRG:2958 4C 45 E9 ; ----------------------------------------------------------------------------- -; Routine: Label_E95B +; Routine: SubCE945_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11057,14 +11066,14 @@ Label_E945: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E95B: +SubCE945_Block: lda #$48 ; CPU:$E95B PRG:295B A9 48 jsr $E97A ; CPU:$E95D PRG:295D 20 7A E9 jsr $E968 ; CPU:$E960 PRG:2960 20 68 E9 lda #$00 ; CPU:$E963 PRG:2963 A9 00 sta ZpD9 ; CPU:$E965 PRG:2965 85 D9 ; ----------------------------------------------------------------------------- -; Routine: Label_E967 +; Routine: SubCE945_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11072,10 +11081,10 @@ Label_E95B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E967: +SubCE945_Block_1: rts ; CPU:$E967 PRG:2967 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E968 +; Routine: SubCE968 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11083,13 +11092,13 @@ Label_E967: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E968: +SubCE968: lda #$23 ; CPU:$E968 PRG:2968 A9 23 sta $0202,y ; CPU:$E96A PRG:296A 99 02 02 sta $0206,y ; CPU:$E96D PRG:296D 99 06 02 rts ; CPU:$E970 PRG:2970 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E971 +; Routine: SubCE971 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11097,13 +11106,13 @@ Label_E968: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E971: +SubCE971: lda #$03 ; CPU:$E971 PRG:2971 A9 03 sta $0202,y ; CPU:$E973 PRG:2973 99 02 02 sta $0206,y ; CPU:$E976 PRG:2976 99 06 02 rts ; CPU:$E979 PRG:2979 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E97A +; Routine: SetSpritePairY ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11111,12 +11120,12 @@ Label_E971: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E97A: +SetSpritePairY: sta $0200,y ; CPU:$E97A PRG:297A 99 00 02 sta $0204,y ; CPU:$E97D PRG:297D 99 04 02 rts ; CPU:$E980 PRG:2980 60 ; ----------------------------------------------------------------------------- -; Routine: Label_E981 +; Routine: SubCE981 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11124,11 +11133,11 @@ Label_E97A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E981: +SubCE981: lda #$00 ; CPU:$E981 PRG:2981 A9 00 sta $0445 ; CPU:$E983 PRG:2983 8D 45 04 ; ----------------------------------------------------------------------------- -; Routine: Label_E986 +; Routine: SubCE986 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11136,7 +11145,7 @@ Label_E981: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E986: +SubCE986: lda $0445 ; CPU:$E986 PRG:2986 AD 45 04 jsr $EFD7 ; CPU:$E989 PRG:2989 20 D7 EF txa ; CPU:$E98C PRG:298C 8A @@ -11146,21 +11155,21 @@ Label_E986: stx Zp04 ; CPU:$E991 PRG:2991 86 04 jsr $EAEC ; CPU:$E993 PRG:2993 20 EC EA cmp #$FF ; CPU:$E996 PRG:2996 C9 FF - beq Label_E9F0 ; CPU:$E998 PRG:2998 F0 56 + beq SubCE986_Block_2 ; CPU:$E998 PRG:2998 F0 56 ldx $0445 ; CPU:$E99A PRG:299A AE 45 04 lda $0446,x ; CPU:$E99D PRG:299D BD 46 04 clc ; CPU:$E9A0 PRG:29A0 18 adc #$B0 ; CPU:$E9A1 PRG:29A1 69 B0 cmp Zp00 ; CPU:$E9A3 PRG:29A3 C5 00 - bcc Label_E9B4 ; CPU:$E9A5 PRG:29A5 90 0D + bcc SubCE986_Block ; CPU:$E9A5 PRG:29A5 90 0D lda Zp01 ; CPU:$E9A7 PRG:29A7 A5 01 cmp #$26 ; CPU:$E9A9 PRG:29A9 C9 26 - bcs Label_E9BE ; CPU:$E9AB PRG:29AB B0 11 + bcs SubCE986_Block_1 ; CPU:$E9AB PRG:29AB B0 11 lda #$C0 ; CPU:$E9AD PRG:29AD A9 C0 sta Zp02 ; CPU:$E9AF PRG:29AF 85 02 jmp $E9DA ; CPU:$E9B1 PRG:29B1 4C DA E9 ; ----------------------------------------------------------------------------- -; Routine: Label_E9B4 +; Routine: SubCE986_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11168,13 +11177,13 @@ Label_E986: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E9B4: +SubCE986_Block: jsr $EA01 ; CPU:$E9B4 PRG:29B4 20 01 EA cmp #$FF ; CPU:$E9B7 PRG:29B7 C9 FF - beq Label_E9F3 ; CPU:$E9B9 PRG:29B9 F0 38 + beq SubCE9F3 ; CPU:$E9B9 PRG:29B9 F0 38 jmp $E9EA ; CPU:$E9BB PRG:29BB 4C EA E9 ; ----------------------------------------------------------------------------- -; Routine: Label_E9BE +; Routine: SubCE986_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11182,12 +11191,12 @@ Label_E9B4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E9BE: +SubCE986_Block_1: lda #$C4 ; CPU:$E9BE PRG:29BE A9 C4 sta Zp02 ; CPU:$E9C0 PRG:29C0 85 02 lda Zp01 ; CPU:$E9C2 PRG:29C2 A5 01 cmp #$2E ; CPU:$E9C4 PRG:29C4 C9 2E - bcc Label_E9DA ; CPU:$E9C6 PRG:29C6 90 12 + bcc SubCE9DA ; CPU:$E9C6 PRG:29C6 90 12 lda #$02 ; CPU:$E9C8 PRG:29C8 A9 02 sta ZpFE ; CPU:$E9CA PRG:29CA 85 FE lda #$2E ; CPU:$E9CC PRG:29CC A9 2E @@ -11198,7 +11207,7 @@ Label_E9BE: lda #$00 ; CPU:$E9D5 PRG:29D5 A9 00 sta $042E,x ; CPU:$E9D7 PRG:29D7 9D 2E 04 ; ----------------------------------------------------------------------------- -; Routine: Label_E9DA +; Routine: SubCE9DA ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11206,7 +11215,7 @@ Label_E9BE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E9DA: +SubCE9DA: lda Zp00 ; CPU:$E9DA PRG:29DA A5 00 clc ; CPU:$E9DC PRG:29DC 18 adc #$02 ; CPU:$E9DD PRG:29DD 69 02 @@ -11216,7 +11225,7 @@ Label_E9DA: adc #$01 ; CPU:$E9E5 PRG:29E5 69 01 jsr $EF72 ; CPU:$E9E7 PRG:29E7 20 72 EF ; ----------------------------------------------------------------------------- -; Routine: Label_E9EA +; Routine: SubCE9EA ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11224,11 +11233,11 @@ Label_E9DA: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E9EA: +SubCE9EA: jsr $EADB ; CPU:$E9EA PRG:29EA 20 DB EA jmp $E9F3 ; CPU:$E9ED PRG:29ED 4C F3 E9 ; ----------------------------------------------------------------------------- -; Routine: Label_E9F0 +; Routine: SubCE986_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11236,10 +11245,10 @@ Label_E9EA: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E9F0: +SubCE986_Block_2: jsr $EA34 ; CPU:$E9F0 PRG:29F0 20 34 EA ; ----------------------------------------------------------------------------- -; Routine: Label_E9F3 +; Routine: SubCE9F3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11247,14 +11256,14 @@ Label_E9F0: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E9F3: +SubCE9F3: inc $0445 ; CPU:$E9F3 PRG:29F3 EE 45 04 lda $0445 ; CPU:$E9F6 PRG:29F6 AD 45 04 cmp #$03 ; CPU:$E9F9 PRG:29F9 C9 03 - beq Label_EA00 ; CPU:$E9FB PRG:29FB F0 03 + beq SubCE9F3_Block ; CPU:$E9FB PRG:29FB F0 03 jmp $E986 ; CPU:$E9FD PRG:29FD 4C 86 E9 ; ----------------------------------------------------------------------------- -; Routine: Label_EA00 +; Routine: SubCE9F3_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11262,10 +11271,10 @@ Label_E9F3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EA00: +SubCE9F3_Block: rts ; CPU:$EA00 PRG:2A00 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EA01 +; Routine: SubCEA01 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11273,17 +11282,17 @@ Label_EA00: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EA01: +SubCEA01: lda Zp01 ; CPU:$EA01 PRG:2A01 A5 01 inc Zp01 ; CPU:$EA03 PRG:2A03 E6 01 inc Zp01 ; CPU:$EA05 PRG:2A05 E6 01 inc Zp01 ; CPU:$EA07 PRG:2A07 E6 01 cmp #$26 ; CPU:$EA09 PRG:2A09 C9 26 - bne Label_EA11 ; CPU:$EA0B PRG:2A0B D0 04 + bne SubCEA01_Block ; CPU:$EA0B PRG:2A0B D0 04 ldx #$01 ; CPU:$EA0D PRG:2A0D A2 01 stx ZpFE ; CPU:$EA0F PRG:2A0F 86 FE ; ----------------------------------------------------------------------------- -; Routine: Label_EA11 +; Routine: SubCEA01_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11291,13 +11300,13 @@ Label_EA01: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EA11: +SubCEA01_Block: cmp #$50 ; CPU:$EA11 PRG:2A11 C9 50 - bcc Label_EA2A ; CPU:$EA13 PRG:2A13 90 15 + bcc SubCEA01_Block_1 ; CPU:$EA13 PRG:2A13 90 15 cmp #$90 ; CPU:$EA15 PRG:2A15 C9 90 bcc UpdateSoundChannels ; CPU:$EA17 PRG:2A17 90 16 cmp #$C0 ; CPU:$EA19 PRG:2A19 C9 C0 - bcc Label_EA2A ; CPU:$EA1B PRG:2A1B 90 0D + bcc SubCEA01_Block_1 ; CPU:$EA1B PRG:2A1B 90 0D cmp #$D8 ; CPU:$EA1D PRG:2A1D C9 D8 bcc UpdateSoundChannels ; CPU:$EA1F PRG:2A1F 90 0E jsr $EAD1 ; CPU:$EA21 PRG:2A21 20 D1 EA @@ -11305,7 +11314,7 @@ Label_EA11: lda #$FF ; CPU:$EA27 PRG:2A27 A9 FF rts ; CPU:$EA29 PRG:2A29 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EA2A +; Routine: SubCEA01_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11313,7 +11322,7 @@ Label_EA11: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EA2A: +SubCEA01_Block_1: lda #$C4 ; CPU:$EA2A PRG:2A2A A9 C4 sta Zp02 ; CPU:$EA2C PRG:2A2C 85 02 rts ; CPU:$EA2E PRG:2A2E 60 @@ -11331,7 +11340,7 @@ UpdateSoundChannels: sta Zp02 ; CPU:$EA31 PRG:2A31 85 02 rts ; CPU:$EA33 PRG:2A33 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EA34 +; Routine: SubCEA34 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11339,9 +11348,9 @@ UpdateSoundChannels: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EA34: +SubCEA34: lda Zp36 ; CPU:$EA34 PRG:2A34 A5 36 - bne Label_EA5E ; CPU:$EA36 PRG:2A36 D0 26 + bne SubCEA34_Block ; CPU:$EA36 PRG:2A36 D0 26 lda Zp19 ; CPU:$EA38 PRG:2A38 A5 19 and #$03 ; CPU:$EA3A PRG:2A3A 29 03 tax ; CPU:$EA3C PRG:2A3C AA @@ -11360,7 +11369,7 @@ Label_EA34: lda $C457,x ; CPU:$EA59 PRG:2A59 BD 57 C4 sta Zp36 ; CPU:$EA5C PRG:2A5C 85 36 ; ----------------------------------------------------------------------------- -; Routine: Label_EA5E +; Routine: SubCEA34_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11368,10 +11377,10 @@ Label_EA34: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EA5E: +SubCEA34_Block: rts ; CPU:$EA5E PRG:2A5E 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EA5F +; Routine: SubCEA5F ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11379,12 +11388,12 @@ Label_EA5E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EA5F: +SubCEA5F: lda Zp39 ; CPU:$EA5F PRG:2A5F A5 39 - beq Label_EA64 ; CPU:$EA61 PRG:2A61 F0 01 + beq SubCEA5F_Block ; CPU:$EA61 PRG:2A61 F0 01 rts ; CPU:$EA63 PRG:2A63 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EA64 +; Routine: SubCEA5F_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11392,16 +11401,16 @@ Label_EA5F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EA64: +SubCEA5F_Block: lda #$08 ; CPU:$EA64 PRG:2A64 A9 08 sta Zp0A ; CPU:$EA66 PRG:2A66 85 0A lda #$00 ; CPU:$EA68 PRG:2A68 A9 00 sta Zp0B ; CPU:$EA6A PRG:2A6A 85 0B jsr $EAA1 ; CPU:$EA6C PRG:2A6C 20 A1 EA - bne Label_EA72 ; CPU:$EA6F PRG:2A6F D0 01 + bne SubCEA5F_Block_1 ; CPU:$EA6F PRG:2A6F D0 01 rts ; CPU:$EA71 PRG:2A71 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EA72 +; Routine: SubCEA5F_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11409,19 +11418,19 @@ Label_EA64: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EA72: +SubCEA5F_Block_1: lda #$50 ; CPU:$EA72 PRG:2A72 A9 50 sta Zp00 ; CPU:$EA74 PRG:2A74 85 00 lda #$20 ; CPU:$EA76 PRG:2A76 A9 20 sta Zp01 ; CPU:$EA78 PRG:2A78 85 01 lda $02F1 ; CPU:$EA7A PRG:2A7A AD F1 02 cmp #$DB ; CPU:$EA7D PRG:2A7D C9 DB - beq Label_EA88 ; CPU:$EA7F PRG:2A7F F0 07 + beq SubCEA5F_Block_2 ; CPU:$EA7F PRG:2A7F F0 07 inc ZpB7 ; CPU:$EA81 PRG:2A81 E6 B7 lda #$DB ; CPU:$EA83 PRG:2A83 A9 DB jmp $EA8A ; CPU:$EA85 PRG:2A85 4C 8A EA ; ----------------------------------------------------------------------------- -; Routine: Label_EA88 +; Routine: SubCEA5F_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11429,10 +11438,10 @@ Label_EA72: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EA88: +SubCEA5F_Block_2: lda #$D7 ; CPU:$EA88 PRG:2A88 A9 D7 ; ----------------------------------------------------------------------------- -; Routine: Label_EA8A +; Routine: SubCEA8A ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11440,19 +11449,19 @@ Label_EA88: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EA8A: +SubCEA8A: jsr $EAD4 ; CPU:$EA8A PRG:2A8A 20 D4 EA lda #$F0 ; CPU:$EA8D PRG:2A8D A9 F0 jsr $F080 ; CPU:$EA8F PRG:2A8F 20 80 F0 lda ZpB7 ; CPU:$EA92 PRG:2A92 A5 B7 cmp #$04 ; CPU:$EA94 PRG:2A94 C9 04 - bne Label_EAA0 ; CPU:$EA96 PRG:2A96 D0 08 + bne SubCEA8A_Block ; CPU:$EA96 PRG:2A96 D0 08 lda #$00 ; CPU:$EA98 PRG:2A98 A9 00 sta ZpB7 ; CPU:$EA9A PRG:2A9A 85 B7 lda #$BB ; CPU:$EA9C PRG:2A9C A9 BB sta Zp39 ; CPU:$EA9E PRG:2A9E 85 39 ; ----------------------------------------------------------------------------- -; Routine: Label_EAA0 +; Routine: SubCEA8A_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11460,10 +11469,10 @@ Label_EA8A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EAA0: +SubCEA8A_Block: rts ; CPU:$EAA0 PRG:2AA0 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EAA1 +; Routine: AdvancePatternBitAlt ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11471,15 +11480,15 @@ Label_EAA0: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EAA1: +AdvancePatternBitAlt: inc ZpB8 ; CPU:$EAA1 PRG:2AA1 E6 B8 lda ZpB8 ; CPU:$EAA3 PRG:2AA3 A5 B8 - bmi Label_EAAE ; CPU:$EAA5 PRG:2AA5 30 07 + bmi AdvancePatternBitAlt_Block ; CPU:$EAA5 PRG:2AA5 30 07 cmp #$10 ; CPU:$EAA7 PRG:2AA7 C9 10 - bcs Label_EAAE ; CPU:$EAA9 PRG:2AA9 B0 03 + bcs AdvancePatternBitAlt_Block ; CPU:$EAA9 PRG:2AA9 B0 03 jmp $EAB2 ; CPU:$EAAB PRG:2AAB 4C B2 EA ; ----------------------------------------------------------------------------- -; Routine: Label_EAAE +; Routine: AdvancePatternBitAlt_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11487,11 +11496,11 @@ Label_EAA1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EAAE: +AdvancePatternBitAlt_Block: lda #$00 ; CPU:$EAAE PRG:2AAE A9 00 sta ZpB8 ; CPU:$EAB0 PRG:2AB0 85 B8 ; ----------------------------------------------------------------------------- -; Routine: Label_EAB2 +; Routine: ReadPatternBitAlt ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11499,15 +11508,15 @@ Label_EAAE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EAB2: +ReadPatternBitAlt: cmp #$08 ; CPU:$EAB2 PRG:2AB2 C9 08 - bcs Label_EABF ; CPU:$EAB4 PRG:2AB4 B0 09 + bcs ReadPatternBitAlt_Block ; CPU:$EAB4 PRG:2AB4 B0 09 tax ; CPU:$EAB6 PRG:2AB6 AA lda $C1BC,x ; CPU:$EAB7 PRG:2AB7 BD BC C1 and Zp0A ; CPU:$EABA PRG:2ABA 25 0A jmp $EAC8 ; CPU:$EABC PRG:2ABC 4C C8 EA ; ----------------------------------------------------------------------------- -; Routine: Label_EABF +; Routine: ReadPatternBitAlt_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11515,14 +11524,14 @@ Label_EAB2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EABF: +ReadPatternBitAlt_Block: sec ; CPU:$EABF PRG:2ABF 38 sbc #$08 ; CPU:$EAC0 PRG:2AC0 E9 08 tax ; CPU:$EAC2 PRG:2AC2 AA lda $C1BC,x ; CPU:$EAC3 PRG:2AC3 BD BC C1 and Zp0B ; CPU:$EAC6 PRG:2AC6 25 0B ; ----------------------------------------------------------------------------- -; Routine: Label_EAC8 +; Routine: ReadPatternBitAlt_Return ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11530,11 +11539,11 @@ Label_EABF: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EAC8: - beq Label_EACC ; CPU:$EAC8 PRG:2AC8 F0 02 +ReadPatternBitAlt_Return: + beq ReadPatternBitAlt_Return_Block ; CPU:$EAC8 PRG:2AC8 F0 02 lda #$01 ; CPU:$EACA PRG:2ACA A9 01 ; ----------------------------------------------------------------------------- -; Routine: Label_EACC +; Routine: ReadPatternBitAlt_Return_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11542,10 +11551,10 @@ Label_EAC8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EACC: +ReadPatternBitAlt_Return_Block: rts ; CPU:$EACC PRG:2ACC 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EACD +; Routine: ClearSpriteDestOffset ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11553,7 +11562,7 @@ Label_EACC: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EACD: +ClearSpriteDestOffset: lda #$00 ; CPU:$EACD PRG:2ACD A9 00 sta Zp04 ; CPU:$EACF PRG:2ACF 85 04 ; ----------------------------------------------------------------------------- @@ -11568,7 +11577,7 @@ Label_EACD: UpdateSoundChannel4: jmp $EAD6 ; CPU:$EAD1 PRG:2AD1 4C D6 EA ; ----------------------------------------------------------------------------- -; Routine: Label_EAD4 +; Routine: SetSpriteTile ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11576,10 +11585,10 @@ UpdateSoundChannel4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EAD4: +SetSpriteTile: sta Zp02 ; CPU:$EAD4 PRG:2AD4 85 02 ; ----------------------------------------------------------------------------- -; Routine: Label_EAD6 +; Routine: SetSpriteSize ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11587,12 +11596,12 @@ Label_EAD4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EAD6: +SetSpriteSize: lda #$22 ; CPU:$EAD6 PRG:2AD6 A9 22 sta Zp03 ; CPU:$EAD8 PRG:2AD8 85 03 rts ; CPU:$EADA PRG:2ADA 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EADB +; Routine: SetSpriteSizeAndDraw ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11600,11 +11609,11 @@ Label_EAD6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EADB: +SetSpriteSizeAndDraw: jsr $EAD1 ; CPU:$EADB PRG:2ADB 20 D1 EA jmp $F082 ; CPU:$EADE PRG:2ADE 4C 82 F0 ; ----------------------------------------------------------------------------- -; Routine: Label_EAE1 +; Routine: LoadSprite0Position ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11612,14 +11621,14 @@ Label_EADB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EAE1: +LoadSprite0Position: lda $0203 ; CPU:$EAE1 PRG:2AE1 AD 03 02 sta Zp00 ; CPU:$EAE4 PRG:2AE4 85 00 lda $0200 ; CPU:$EAE6 PRG:2AE6 AD 00 02 sta Zp01 ; CPU:$EAE9 PRG:2AE9 85 01 rts ; CPU:$EAEB PRG:2AEB 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EAEC +; Routine: LoadSpritePosition ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11627,14 +11636,14 @@ Label_EAE1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EAEC: +LoadSpritePosition: lda $0203,x ; CPU:$EAEC PRG:2AEC BD 03 02 sta Zp00 ; CPU:$EAEF PRG:2AEF 85 00 lda $0200,x ; CPU:$EAF1 PRG:2AF1 BD 00 02 sta Zp01 ; CPU:$EAF4 PRG:2AF4 85 01 rts ; CPU:$EAF6 PRG:2AF6 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EAF7 +; Routine: SubCEAF7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11642,17 +11651,17 @@ Label_EAEC: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EAF7: +SubCEAF7: lda Zp50 ; CPU:$EAF7 PRG:2AF7 A5 50 and #$01 ; CPU:$EAF9 PRG:2AF9 29 01 clc ; CPU:$EAFB PRG:2AFB 18 adc Zp54 ; CPU:$EAFC PRG:2AFC 65 54 tax ; CPU:$EAFE PRG:2AFE AA cpx #$04 ; CPU:$EAFF PRG:2AFF E0 04 - bcc Label_EB05 ; CPU:$EB01 PRG:2B01 90 02 + bcc SubCEAF7_Block ; CPU:$EB01 PRG:2B01 90 02 ldx #$04 ; CPU:$EB03 PRG:2B03 A2 04 ; ----------------------------------------------------------------------------- -; Routine: Label_EB05 +; Routine: SubCEAF7_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11660,10 +11669,10 @@ Label_EAF7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EB05: +SubCEAF7_Block: rts ; CPU:$EB05 PRG:2B05 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EB06 +; Routine: SubCEB06 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11671,12 +11680,12 @@ Label_EB05: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EB06: +SubCEB06: lda $0503 ; CPU:$EB06 PRG:2B06 AD 03 05 - bne Label_EB0C ; CPU:$EB09 PRG:2B09 D0 01 + bne SubCEB06_Block ; CPU:$EB09 PRG:2B09 D0 01 rts ; CPU:$EB0B PRG:2B0B 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EB0C +; Routine: SubCEB06_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11684,7 +11693,7 @@ Label_EB06: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EB0C: +SubCEB06_Block: lda $0505 ; CPU:$EB0C PRG:2B0C AD 05 05 and #$0F ; CPU:$EB0F PRG:2B0F 29 0F sta $0505 ; CPU:$EB11 PRG:2B11 8D 05 05 @@ -11698,11 +11707,11 @@ Label_EB0C: sta Zp01 ; CPU:$EB20 PRG:2B20 85 01 tya ; CPU:$EB22 PRG:2B22 98 cmp #$02 ; CPU:$EB23 PRG:2B23 C9 02 - bmi Label_EB54 ; CPU:$EB25 PRG:2B25 30 2D + bmi SubCEB06_Block_2 ; CPU:$EB25 PRG:2B25 30 2D lda Zp44 ; CPU:$EB27 PRG:2B27 A5 44 - beq Label_EB4F ; CPU:$EB29 PRG:2B29 F0 24 + beq SubCEB06_Block_1 ; CPU:$EB29 PRG:2B29 F0 24 ; ----------------------------------------------------------------------------- -; Routine: Label_EB2B +; Routine: SubCEB2B ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11710,12 +11719,12 @@ Label_EB0C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EB2B: +SubCEB2B: cmp #$13 ; CPU:$EB2B PRG:2B2B C9 13 - bne Label_EB32 ; CPU:$EB2D PRG:2B2D D0 03 + bne SubCEB2B_Block ; CPU:$EB2D PRG:2B2D D0 03 jmp $EB85 ; CPU:$EB2F PRG:2B2F 4C 85 EB ; ----------------------------------------------------------------------------- -; Routine: Label_EB32 +; Routine: SubCEB2B_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11723,12 +11732,12 @@ Label_EB2B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EB32: +SubCEB2B_Block: cmp #$0F ; CPU:$EB32 PRG:2B32 C9 0F - bne Label_EB39 ; CPU:$EB34 PRG:2B34 D0 03 + bne SubCEB2B_Block_1 ; CPU:$EB34 PRG:2B34 D0 03 jmp $EB8E ; CPU:$EB36 PRG:2B36 4C 8E EB ; ----------------------------------------------------------------------------- -; Routine: Label_EB39 +; Routine: SubCEB2B_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11736,12 +11745,12 @@ Label_EB32: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EB39: +SubCEB2B_Block_1: cmp #$0B ; CPU:$EB39 PRG:2B39 C9 0B - bne Label_EB40 ; CPU:$EB3B PRG:2B3B D0 03 + bne SubCEB2B_Block_2 ; CPU:$EB3B PRG:2B3B D0 03 jmp $EB85 ; CPU:$EB3D PRG:2B3D 4C 85 EB ; ----------------------------------------------------------------------------- -; Routine: Label_EB40 +; Routine: SubCEB2B_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11749,12 +11758,12 @@ Label_EB39: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EB40: +SubCEB2B_Block_2: cmp #$08 ; CPU:$EB40 PRG:2B40 C9 08 - bne Label_EB47 ; CPU:$EB42 PRG:2B42 D0 03 + bne SubCEB2B_Block_3 ; CPU:$EB42 PRG:2B42 D0 03 jmp $EB8E ; CPU:$EB44 PRG:2B44 4C 8E EB ; ----------------------------------------------------------------------------- -; Routine: Label_EB47 +; Routine: SubCEB2B_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11762,12 +11771,12 @@ Label_EB40: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EB47: +SubCEB2B_Block_3: cmp #$04 ; CPU:$EB47 PRG:2B47 C9 04 - bne Label_EB4E ; CPU:$EB49 PRG:2B49 D0 03 + bne SubCEB2B_Block_4 ; CPU:$EB49 PRG:2B49 D0 03 jsr $EBA6 ; CPU:$EB4B PRG:2B4B 20 A6 EB ; ----------------------------------------------------------------------------- -; Routine: Label_EB4E +; Routine: SubCEB2B_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11775,10 +11784,10 @@ Label_EB47: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EB4E: +SubCEB2B_Block_4: rts ; CPU:$EB4E PRG:2B4E 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EB4F +; Routine: SubCEB06_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11786,12 +11795,12 @@ Label_EB4E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EB4F: +SubCEB06_Block_1: lda #$25 ; CPU:$EB4F PRG:2B4F A9 25 sta Zp44 ; CPU:$EB51 PRG:2B51 85 44 rts ; CPU:$EB53 PRG:2B53 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EB54 +; Routine: SubCEB06_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11799,21 +11808,21 @@ Label_EB4F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EB54: +SubCEB06_Block_2: lda Zp36 ; CPU:$EB54 PRG:2B54 A5 36 cmp #$18 ; CPU:$EB56 PRG:2B56 C9 18 - beq Label_EB74 ; CPU:$EB58 PRG:2B58 F0 1A + beq SubCEB06_Block_4 ; CPU:$EB58 PRG:2B58 F0 1A cmp #$00 ; CPU:$EB5A PRG:2B5A C9 00 - beq Label_EB7B ; CPU:$EB5C PRG:2B5C F0 1D + beq SubCEB06_Block_5 ; CPU:$EB5C PRG:2B5C F0 1D lda $0515 ; CPU:$EB5E PRG:2B5E AD 15 05 - beq Label_EB6F ; CPU:$EB61 PRG:2B61 F0 0C + beq SubCEB06_Block_3 ; CPU:$EB61 PRG:2B61 F0 0C jsr $EBA1 ; CPU:$EB63 PRG:2B63 20 A1 EB lda #$00 ; CPU:$EB66 PRG:2B66 A9 00 sta $0515 ; CPU:$EB68 PRG:2B68 8D 15 05 lda #$1A ; CPU:$EB6B PRG:2B6B A9 1A sta Zp44 ; CPU:$EB6D PRG:2B6D 85 44 ; ----------------------------------------------------------------------------- -; Routine: Label_EB6F +; Routine: SubCEB06_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11821,11 +11830,11 @@ Label_EB54: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EB6F: +SubCEB06_Block_3: lda Zp44 ; CPU:$EB6F PRG:2B6F A5 44 jmp $EB2B ; CPU:$EB71 PRG:2B71 4C 2B EB ; ----------------------------------------------------------------------------- -; Routine: Label_EB74 +; Routine: SubCEB06_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11833,12 +11842,12 @@ Label_EB6F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EB74: +SubCEB06_Block_4: lda #$30 ; CPU:$EB74 PRG:2B74 A9 30 sta Zp44 ; CPU:$EB76 PRG:2B76 85 44 jmp $EB9C ; CPU:$EB78 PRG:2B78 4C 9C EB ; ----------------------------------------------------------------------------- -; Routine: Label_EB7B +; Routine: SubCEB06_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11846,13 +11855,13 @@ Label_EB74: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EB7B: +SubCEB06_Block_5: lda #$1A ; CPU:$EB7B PRG:2B7B A9 1A sta Zp44 ; CPU:$EB7D PRG:2B7D 85 44 jsr $EB97 ; CPU:$EB7F PRG:2B7F 20 97 EB jmp $EB2B ; CPU:$EB82 PRG:2B82 4C 2B EB ; ----------------------------------------------------------------------------- -; Routine: Label_EB85 +; Routine: SubCEB85 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11860,11 +11869,11 @@ Label_EB7B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EB85: +SubCEB85: lda #$80 ; CPU:$EB85 PRG:2B85 A9 80 sta ZpFE ; CPU:$EB87 PRG:2B87 85 FE ; ----------------------------------------------------------------------------- -; Routine: Label_EB89 +; Routine: SubCEB89 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11872,11 +11881,11 @@ Label_EB85: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EB89: +SubCEB89: lda #$40 ; CPU:$EB89 PRG:2B89 A9 40 jmp $EBA8 ; CPU:$EB8B PRG:2B8B 4C A8 EB ; ----------------------------------------------------------------------------- -; Routine: Label_EB8E +; Routine: SubCEB8E ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11884,11 +11893,11 @@ Label_EB89: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EB8E: +SubCEB8E: lda #$80 ; CPU:$EB8E PRG:2B8E A9 80 sta ZpFE ; CPU:$EB90 PRG:2B90 85 FE ; ----------------------------------------------------------------------------- -; Routine: Label_EB92 +; Routine: SubCEB92 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11896,11 +11905,11 @@ Label_EB8E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EB92: +SubCEB92: lda #$42 ; CPU:$EB92 PRG:2B92 A9 42 jmp $EBA8 ; CPU:$EB94 PRG:2B94 4C A8 EB ; ----------------------------------------------------------------------------- -; Routine: Label_EB97 +; Routine: SubCEB97 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11908,11 +11917,11 @@ Label_EB92: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EB97: +SubCEB97: lda #$44 ; CPU:$EB97 PRG:2B97 A9 44 jmp $EBA8 ; CPU:$EB99 PRG:2B99 4C A8 EB ; ----------------------------------------------------------------------------- -; Routine: Label_EB9C +; Routine: SubCEB9C ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11920,11 +11929,11 @@ Label_EB97: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EB9C: +SubCEB9C: lda #$3E ; CPU:$EB9C PRG:2B9C A9 3E jmp $EBA8 ; CPU:$EB9E PRG:2B9E 4C A8 EB ; ----------------------------------------------------------------------------- -; Routine: Label_EBA1 +; Routine: SubCEBA1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11932,11 +11941,11 @@ Label_EB9C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EBA1: +SubCEBA1: lda #$00 ; CPU:$EBA1 PRG:2BA1 A9 00 jmp $EBA8 ; CPU:$EBA3 PRG:2BA3 4C A8 EB ; ----------------------------------------------------------------------------- -; Routine: Label_EBA6 +; Routine: SubCEBA6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11944,10 +11953,10 @@ Label_EBA1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EBA6: +SubCEBA6: lda #$02 ; CPU:$EBA6 PRG:2BA6 A9 02 ; ----------------------------------------------------------------------------- -; Routine: Label_EBA8 +; Routine: SubCEBA8 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11955,7 +11964,7 @@ Label_EBA6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EBA8: +SubCEBA8: jsr $C815 ; CPU:$EBA8 PRG:2BA8 20 15 C8 dec Zp44 ; CPU:$EBAB PRG:2BAB C6 44 lda $0505 ; CPU:$EBAD PRG:2BAD AD 05 05 @@ -11963,7 +11972,7 @@ Label_EBA8: sta $0505 ; CPU:$EBB2 PRG:2BB2 8D 05 05 rts ; CPU:$EBB5 PRG:2BB5 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EBB6 +; Routine: SubCEBB6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11971,12 +11980,12 @@ Label_EBA8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EBB6: +SubCEBB6: lda Zp45 ; CPU:$EBB6 PRG:2BB6 A5 45 - beq Label_EBBB ; CPU:$EBB8 PRG:2BB8 F0 01 + beq SubCEBB6_Block ; CPU:$EBB8 PRG:2BB8 F0 01 rts ; CPU:$EBBA PRG:2BBA 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EBBB +; Routine: SubCEBB6_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11984,14 +11993,14 @@ Label_EBB6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EBBB: +SubCEBB6_Block: lda Zp2E ; CPU:$EBBB PRG:2BBB A5 2E - bne Label_EBC4 ; CPU:$EBBD PRG:2BBD D0 05 + bne SubCEBB6_Block_1 ; CPU:$EBBD PRG:2BBD D0 05 lda #$FF ; CPU:$EBBF PRG:2BBF A9 FF sta Zp96 ; CPU:$EBC1 PRG:2BC1 85 96 rts ; CPU:$EBC3 PRG:2BC3 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EBC4 +; Routine: SubCEBB6_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11999,7 +12008,7 @@ Label_EBBB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EBC4: +SubCEBB6_Block_1: lda #$0B ; CPU:$EBC4 PRG:2BC4 A9 0B sta Zp45 ; CPU:$EBC6 PRG:2BC6 85 45 lda #$01 ; CPU:$EBC8 PRG:2BC8 A9 01 @@ -12011,7 +12020,7 @@ Label_EBC4: sta Zp00 ; CPU:$EBD5 PRG:2BD5 85 00 jmp $F23C ; CPU:$EBD7 PRG:2BD7 4C 3C F2 ; ----------------------------------------------------------------------------- -; Routine: Label_EBDA +; Routine: SubCEBDA ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12019,9 +12028,9 @@ Label_EBC4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EBDA: +SubCEBDA: lda $050B ; CPU:$EBDA PRG:2BDA AD 0B 05 - bne Label_EBED ; CPU:$EBDD PRG:2BDD D0 0E + bne SubCEBDA_Block ; CPU:$EBDD PRG:2BDD D0 0E lda #$01 ; CPU:$EBDF PRG:2BDF A9 01 sta $050B ; CPU:$EBE1 PRG:2BE1 8D 0B 05 lda #$00 ; CPU:$EBE4 PRG:2BE4 A9 00 @@ -12029,7 +12038,7 @@ Label_EBDA: sta $050C ; CPU:$EBE9 PRG:2BE9 8D 0C 05 rts ; CPU:$EBEC PRG:2BEC 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EBED +; Routine: SubCEBDA_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12037,19 +12046,19 @@ Label_EBDA: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EBED: +SubCEBDA_Block: lda $050C ; CPU:$EBED PRG:2BED AD 0C 05 - beq Label_EC16 ; CPU:$EBF0 PRG:2BF0 F0 24 + beq SubCEBDA_Block_3 ; CPU:$EBF0 PRG:2BF0 F0 24 lda $050D ; CPU:$EBF2 PRG:2BF2 AD 0D 05 cmp #$05 ; CPU:$EBF5 PRG:2BF5 C9 05 - bne Label_EC0A ; CPU:$EBF7 PRG:2BF7 D0 11 + bne SubCEBDA_Block_2 ; CPU:$EBF7 PRG:2BF7 D0 11 lda Zp96 ; CPU:$EBF9 PRG:2BF9 A5 96 cmp #$0A ; CPU:$EBFB PRG:2BFB C9 0A - bne Label_EC03 ; CPU:$EBFD PRG:2BFD D0 04 + bne SubCEBDA_Block_1 ; CPU:$EBFD PRG:2BFD D0 04 lda #$00 ; CPU:$EBFF PRG:2BFF A9 00 - beq Label_EC0A ; CPU:$EC01 PRG:2C01 F0 07 + beq SubCEBDA_Block_2 ; CPU:$EC01 PRG:2C01 F0 07 ; ----------------------------------------------------------------------------- -; Routine: Label_EC03 +; Routine: SubCEBDA_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12057,12 +12066,12 @@ Label_EBED: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EC03: +SubCEBDA_Block_1: lda #$04 ; CPU:$EC03 PRG:2C03 A9 04 sta Zp96 ; CPU:$EC05 PRG:2C05 85 96 jmp $EC12 ; CPU:$EC07 PRG:2C07 4C 12 EC ; ----------------------------------------------------------------------------- -; Routine: Label_EC0A +; Routine: SubCEBDA_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12070,13 +12079,13 @@ Label_EC03: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EC0A: +SubCEBDA_Block_2: sta Zp56 ; CPU:$EC0A PRG:2C0A 85 56 and #$03 ; CPU:$EC0C PRG:2C0C 29 03 - beq Label_EC12 ; CPU:$EC0E PRG:2C0E F0 02 + beq SubCEC12 ; CPU:$EC0E PRG:2C0E F0 02 sta Zp57 ; CPU:$EC10 PRG:2C10 85 57 ; ----------------------------------------------------------------------------- -; Routine: Label_EC12 +; Routine: SubCEC12 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12084,11 +12093,11 @@ Label_EC0A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EC12: +SubCEC12: dec $050C ; CPU:$EC12 PRG:2C12 CE 0C 05 rts ; CPU:$EC15 PRG:2C15 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EC16 +; Routine: SubCEBDA_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12096,7 +12105,7 @@ Label_EC12: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EC16: +SubCEBDA_Block_3: ldx $050E ; CPU:$EC16 PRG:2C16 AE 0E 05 lda $C028,x ; CPU:$EC19 PRG:2C19 BD 28 C0 sta $050C ; CPU:$EC1C PRG:2C1C 8D 0C 05 @@ -12105,7 +12114,7 @@ Label_EC16: inc $050E ; CPU:$EC25 PRG:2C25 EE 0E 05 rts ; CPU:$EC28 PRG:2C28 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EC29 +; Routine: SubCEC29 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12113,17 +12122,17 @@ Label_EC16: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EC29: +SubCEC29: jsr $EAE1 ; CPU:$EC29 PRG:2C29 20 E1 EA lda #$4C ; CPU:$EC2C PRG:2C2C A9 4C jsr $EFE8 ; CPU:$EC2E PRG:2C2E 20 E8 EF lda Zp53 ; CPU:$EC31 PRG:2C31 A5 53 cmp #$03 ; CPU:$EC33 PRG:2C33 C9 03 - beq Label_EC3B ; CPU:$EC35 PRG:2C35 F0 04 + beq SubCEC29_Block ; CPU:$EC35 PRG:2C35 F0 04 cmp #$01 ; CPU:$EC37 PRG:2C37 C9 01 - bne Label_EC3E ; CPU:$EC39 PRG:2C39 D0 03 + bne SubCEC29_Block_1 ; CPU:$EC39 PRG:2C39 D0 03 ; ----------------------------------------------------------------------------- -; Routine: Label_EC3B +; Routine: SubCEC29_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12131,10 +12140,10 @@ Label_EC29: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EC3B: +SubCEC29_Block: jsr $EC44 ; CPU:$EC3B PRG:2C3B 20 44 EC ; ----------------------------------------------------------------------------- -; Routine: Label_EC3E +; Routine: SubCEC29_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12142,11 +12151,11 @@ Label_EC3B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EC3E: +SubCEC29_Block_1: jsr $ED8A ; CPU:$EC3E PRG:2C3E 20 8A ED jmp $EDC5 ; CPU:$EC41 PRG:2C41 4C C5 ED ; ----------------------------------------------------------------------------- -; Routine: Label_EC44 +; Routine: SubCEC44 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12154,11 +12163,11 @@ Label_EC3E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EC44: +SubCEC44: lda #$00 ; CPU:$EC44 PRG:2C44 A9 00 sta Zp5D ; CPU:$EC46 PRG:2C46 85 5D ; ----------------------------------------------------------------------------- -; Routine: Label_EC48 +; Routine: SubCEC48 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12166,19 +12175,19 @@ Label_EC44: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EC48: +SubCEC48: lda #$3A ; CPU:$EC48 PRG:2C48 A9 3A jsr $C847 ; CPU:$EC4A PRG:2C4A 20 47 C8 jsr $EFD5 ; CPU:$EC4D PRG:2C4D 20 D5 EF lda Zp53 ; CPU:$EC50 PRG:2C50 A5 53 cmp #$01 ; CPU:$EC52 PRG:2C52 C9 01 - beq Label_EC5B ; CPU:$EC54 PRG:2C54 F0 05 + beq SubCEC48_Block ; CPU:$EC54 PRG:2C54 F0 05 txa ; CPU:$EC56 PRG:2C56 8A clc ; CPU:$EC57 PRG:2C57 18 adc #$30 ; CPU:$EC58 PRG:2C58 69 30 tax ; CPU:$EC5A PRG:2C5A AA ; ----------------------------------------------------------------------------- -; Routine: Label_EC5B +; Routine: SubCEC48_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12186,21 +12195,21 @@ Label_EC48: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EC5B: +SubCEC48_Block: jsr $EAEC ; CPU:$EC5B PRG:2C5B 20 EC EA jsr $EFEF ; CPU:$EC5E PRG:2C5E 20 EF EF - bne Label_ECA7 ; CPU:$EC61 PRG:2C61 D0 44 + bne SubCEC48_Block_2 ; CPU:$EC61 PRG:2C61 D0 44 lda Zp96 ; CPU:$EC63 PRG:2C63 A5 96 cmp #$04 ; CPU:$EC65 PRG:2C65 C9 04 - bne Label_EC97 ; CPU:$EC67 PRG:2C67 D0 2E + bne SubCEC97 ; CPU:$EC67 PRG:2C67 D0 2E lda Zp56 ; CPU:$EC69 PRG:2C69 A5 56 and #$03 ; CPU:$EC6B PRG:2C6B 29 03 - bne Label_EC76 ; CPU:$EC6D PRG:2C6D D0 07 + bne SubCEC48_Block_1 ; CPU:$EC6D PRG:2C6D D0 07 lda Zp9C ; CPU:$EC6F PRG:2C6F A5 9C beq UpdateMusic2 ; CPU:$EC71 PRG:2C71 F0 0D jmp $EC97 ; CPU:$EC73 PRG:2C73 4C 97 EC ; ----------------------------------------------------------------------------- -; Routine: Label_EC76 +; Routine: SubCEC48_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12208,12 +12217,12 @@ Label_EC5B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EC76: +SubCEC48_Block_1: lda Zp9C ; CPU:$EC76 PRG:2C76 A5 9C cmp #$03 ; CPU:$EC78 PRG:2C78 C9 03 - bcs Label_EC97 ; CPU:$EC7A PRG:2C7A B0 1B + bcs SubCEC97 ; CPU:$EC7A PRG:2C7A B0 1B lda Zp9E ; CPU:$EC7C PRG:2C7C A5 9E - bne Label_EC97 ; CPU:$EC7E PRG:2C7E D0 17 + bne SubCEC97 ; CPU:$EC7E PRG:2C7E D0 17 ; ----------------------------------------------------------------------------- ; Routine: UpdateMusic2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -12226,7 +12235,7 @@ Label_EC76: UpdateMusic2: lda Zp9D ; CPU:$EC80 PRG:2C80 A5 9D cmp #$18 ; CPU:$EC82 PRG:2C82 C9 18 - bcs Label_EC97 ; CPU:$EC84 PRG:2C84 B0 11 + bcs SubCEC97 ; CPU:$EC84 PRG:2C84 B0 11 lda Zp00 ; CPU:$EC86 PRG:2C86 A5 00 sta Zp05 ; CPU:$EC88 PRG:2C88 85 05 lda Zp01 ; CPU:$EC8A PRG:2C8A A5 01 @@ -12236,7 +12245,7 @@ UpdateMusic2: lda #$20 ; CPU:$EC93 PRG:2C93 A9 20 sta ZpFD ; CPU:$EC95 PRG:2C95 85 FD ; ----------------------------------------------------------------------------- -; Routine: Label_EC97 +; Routine: SubCEC97 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12244,17 +12253,17 @@ UpdateMusic2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EC97: +SubCEC97: inc Zp5D ; CPU:$EC97 PRG:2C97 E6 5D lda Zp53 ; CPU:$EC99 PRG:2C99 A5 53 lsr a ; CPU:$EC9B PRG:2C9B 4A tax ; CPU:$EC9C PRG:2C9C AA lda Zp5D ; CPU:$EC9D PRG:2C9D A5 5D cmp $C1FD,x ; CPU:$EC9F PRG:2C9F DD FD C1 - beq Label_ECAF ; CPU:$ECA2 PRG:2CA2 F0 0B + beq SubCEC97_Block ; CPU:$ECA2 PRG:2CA2 F0 0B jmp $EC48 ; CPU:$ECA4 PRG:2CA4 4C 48 EC ; ----------------------------------------------------------------------------- -; Routine: Label_ECA7 +; Routine: SubCEC48_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12262,13 +12271,13 @@ Label_EC97: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_ECA7: +SubCEC48_Block_2: jsr $EF51 ; CPU:$ECA7 PRG:2CA7 20 51 EF lda #$FF ; CPU:$ECAA PRG:2CAA A9 FF sta Zp96 ; CPU:$ECAC PRG:2CAC 85 96 rts ; CPU:$ECAE PRG:2CAE 60 ; ----------------------------------------------------------------------------- -; Routine: Label_ECAF +; Routine: SubCEC97_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12276,16 +12285,16 @@ Label_ECA7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_ECAF: +SubCEC97_Block: lda Zp53 ; CPU:$ECAF PRG:2CAF A5 53 cmp #$03 ; CPU:$ECB1 PRG:2CB1 C9 03 - beq Label_ECBE ; CPU:$ECB3 PRG:2CB3 F0 09 + beq SubCEC97_Block_1 ; CPU:$ECB3 PRG:2CB3 F0 09 lda Zp96 ; CPU:$ECB5 PRG:2CB5 A5 96 cmp #$0A ; CPU:$ECB7 PRG:2CB7 C9 0A - bne Label_ECBE ; CPU:$ECB9 PRG:2CB9 D0 03 + bne SubCEC97_Block_1 ; CPU:$ECB9 PRG:2CB9 D0 03 jmp $ECBF ; CPU:$ECBB PRG:2CBB 4C BF EC ; ----------------------------------------------------------------------------- -; Routine: Label_ECBE +; Routine: SubCEC97_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12293,10 +12302,10 @@ Label_ECAF: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_ECBE: +SubCEC97_Block_1: rts ; CPU:$ECBE PRG:2CBE 60 ; ----------------------------------------------------------------------------- -; Routine: Label_ECBF +; Routine: SubCECBF ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12304,12 +12313,12 @@ Label_ECBE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_ECBF: +SubCECBF: lda ZpA0 ; CPU:$ECBF PRG:2CBF A5 A0 - bne Label_ECC6 ; CPU:$ECC1 PRG:2CC1 D0 03 + bne SubCECBF_Block ; CPU:$ECC1 PRG:2CC1 D0 03 jmp $ED87 ; CPU:$ECC3 PRG:2CC3 4C 87 ED ; ----------------------------------------------------------------------------- -; Routine: Label_ECC6 +; Routine: SubCECBF_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12317,15 +12326,15 @@ Label_ECBF: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_ECC6: +SubCECBF_Block: lda Zp9F ; CPU:$ECC6 PRG:2CC6 A5 9F lsr a ; CPU:$ECC8 PRG:2CC8 4A lsr a ; CPU:$ECC9 PRG:2CC9 4A - beq Label_ECD1 ; CPU:$ECCA PRG:2CCA F0 05 + beq SubCECBF_Block_1 ; CPU:$ECCA PRG:2CCA F0 05 lda #$00 ; CPU:$ECCC PRG:2CCC A9 00 jmp $ECD3 ; CPU:$ECCE PRG:2CCE 4C D3 EC ; ----------------------------------------------------------------------------- -; Routine: Label_ECD1 +; Routine: SubCECBF_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12333,10 +12342,10 @@ Label_ECC6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_ECD1: +SubCECBF_Block_1: lda #$01 ; CPU:$ECD1 PRG:2CD1 A9 01 ; ----------------------------------------------------------------------------- -; Routine: Label_ECD3 +; Routine: SubCECD3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12344,8 +12353,8 @@ Label_ECD1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_ECD3: - beq Label_ECE8 ; CPU:$ECD3 PRG:2CD3 F0 13 +SubCECD3: + beq SubCECD3_Block ; CPU:$ECD3 PRG:2CD3 F0 13 lda #$04 ; CPU:$ECD5 PRG:2CD5 A9 04 clc ; CPU:$ECD7 PRG:2CD7 18 adc $0203 ; CPU:$ECD8 PRG:2CD8 6D 03 02 @@ -12356,7 +12365,7 @@ Label_ECD3: sta Zp01 ; CPU:$ECE3 PRG:2CE3 85 01 jmp $ED07 ; CPU:$ECE5 PRG:2CE5 4C 07 ED ; ----------------------------------------------------------------------------- -; Routine: Label_ECE8 +; Routine: SubCECD3_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12364,16 +12373,16 @@ Label_ECD3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_ECE8: +SubCECD3_Block: lda Zp57 ; CPU:$ECE8 PRG:2CE8 A5 57 cmp #$01 ; CPU:$ECEA PRG:2CEA C9 01 - beq Label_ECF7 ; CPU:$ECEC PRG:2CEC F0 09 + beq SubCECD3_Block_1 ; CPU:$ECEC PRG:2CEC F0 09 lda $0203 ; CPU:$ECEE PRG:2CEE AD 03 02 sec ; CPU:$ECF1 PRG:2CF1 38 sbc #$10 ; CPU:$ECF2 PRG:2CF2 E9 10 jmp $ECFD ; CPU:$ECF4 PRG:2CF4 4C FD EC ; ----------------------------------------------------------------------------- -; Routine: Label_ECF7 +; Routine: SubCECD3_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12381,12 +12390,12 @@ Label_ECE8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_ECF7: +SubCECD3_Block_1: lda $0203 ; CPU:$ECF7 PRG:2CF7 AD 03 02 clc ; CPU:$ECFA PRG:2CFA 18 adc #$10 ; CPU:$ECFB PRG:2CFB 69 10 ; ----------------------------------------------------------------------------- -; Routine: Label_ECFD +; Routine: SubCECFD ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12394,14 +12403,14 @@ Label_ECF7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_ECFD: +SubCECFD: sta Zp00 ; CPU:$ECFD PRG:2CFD 85 00 lda $0200 ; CPU:$ECFF PRG:2CFF AD 00 02 clc ; CPU:$ED02 PRG:2D02 18 adc #$06 ; CPU:$ED03 PRG:2D03 69 06 sta Zp01 ; CPU:$ED05 PRG:2D05 85 01 ; ----------------------------------------------------------------------------- -; Routine: Label_ED07 +; Routine: SubCED07 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12409,16 +12418,16 @@ Label_ECFD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_ED07: +SubCED07: lda #$3C ; CPU:$ED07 PRG:2D07 A9 3C jsr $EFE8 ; CPU:$ED09 PRG:2D09 20 E8 EF lda Zp53 ; CPU:$ED0C PRG:2D0C A5 53 cmp #$01 ; CPU:$ED0E PRG:2D0E C9 01 - bne Label_ED34 ; CPU:$ED10 PRG:2D10 D0 22 + bne SubCED07_Block ; CPU:$ED10 PRG:2D10 D0 22 lda #$00 ; CPU:$ED12 PRG:2D12 A9 00 sta Zp5D ; CPU:$ED14 PRG:2D14 85 5D ; ----------------------------------------------------------------------------- -; Routine: Label_ED16 +; Routine: SubCED16 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12426,22 +12435,22 @@ Label_ED07: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_ED16: +SubCED16: jsr $EFD5 ; CPU:$ED16 PRG:2D16 20 D5 EF jsr $EAEC ; CPU:$ED19 PRG:2D19 20 EC EA lda #$3A ; CPU:$ED1C PRG:2D1C A9 3A jsr $C847 ; CPU:$ED1E PRG:2D1E 20 47 C8 jsr $EFEF ; CPU:$ED21 PRG:2D21 20 EF EF - bne Label_ED57 ; CPU:$ED24 PRG:2D24 D0 31 + bne SubCED38_Block ; CPU:$ED24 PRG:2D24 D0 31 lda Zp5D ; CPU:$ED26 PRG:2D26 A5 5D clc ; CPU:$ED28 PRG:2D28 18 adc #$01 ; CPU:$ED29 PRG:2D29 69 01 sta Zp5D ; CPU:$ED2B PRG:2D2B 85 5D cmp #$09 ; CPU:$ED2D PRG:2D2D C9 09 - beq Label_ED85 ; CPU:$ED2F PRG:2D2F F0 54 + beq SubCED38_Block_2 ; CPU:$ED2F PRG:2D2F F0 54 jmp $ED16 ; CPU:$ED31 PRG:2D31 4C 16 ED ; ----------------------------------------------------------------------------- -; Routine: Label_ED34 +; Routine: SubCED07_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12449,11 +12458,11 @@ Label_ED16: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_ED34: +SubCED07_Block: lda #$00 ; CPU:$ED34 PRG:2D34 A9 00 sta ZpAE ; CPU:$ED36 PRG:2D36 85 AE ; ----------------------------------------------------------------------------- -; Routine: Label_ED38 +; Routine: SubCED38 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12461,22 +12470,22 @@ Label_ED34: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_ED38: +SubCED38: jsr $EFDD ; CPU:$ED38 PRG:2D38 20 DD EF jsr $EAEC ; CPU:$ED3B PRG:2D3B 20 EC EA lda #$3A ; CPU:$ED3E PRG:2D3E A9 3A jsr $C847 ; CPU:$ED40 PRG:2D40 20 47 C8 jsr $EFEF ; CPU:$ED43 PRG:2D43 20 EF EF - bne Label_ED57 ; CPU:$ED46 PRG:2D46 D0 0F + bne SubCED38_Block ; CPU:$ED46 PRG:2D46 D0 0F inc ZpAE ; CPU:$ED48 PRG:2D48 E6 AE lda ZpAE ; CPU:$ED4A PRG:2D4A A5 AE ldx Zp53 ; CPU:$ED4C PRG:2D4C A6 53 dex ; CPU:$ED4E PRG:2D4E CA cmp $C1F6,x ; CPU:$ED4F PRG:2D4F DD F6 C1 - beq Label_ED85 ; CPU:$ED52 PRG:2D52 F0 31 + beq SubCED38_Block_2 ; CPU:$ED52 PRG:2D52 F0 31 jmp $ED38 ; CPU:$ED54 PRG:2D54 4C 38 ED ; ----------------------------------------------------------------------------- -; Routine: Label_ED57 +; Routine: SubCED38_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12484,7 +12493,7 @@ Label_ED38: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_ED57: +SubCED38_Block: lda #$02 ; CPU:$ED57 PRG:2D57 A9 02 sta ZpFF ; CPU:$ED59 PRG:2D59 85 FF lda Zp00 ; CPU:$ED5B PRG:2D5B A5 00 @@ -12493,14 +12502,14 @@ Label_ED57: sta Zp06 ; CPU:$ED61 PRG:2D61 85 06 lda Zp53 ; CPU:$ED63 PRG:2D63 A5 53 cmp #$01 ; CPU:$ED65 PRG:2D65 C9 01 - bne Label_ED74 ; CPU:$ED67 PRG:2D67 D0 0B + bne SubCED38_Block_1 ; CPU:$ED67 PRG:2D67 D0 0B lda #$00 ; CPU:$ED69 PRG:2D69 A9 00 ldx Zp5D ; CPU:$ED6B PRG:2D6B A6 5D sta Zp68,x ; CPU:$ED6D PRG:2D6D 95 68 lda #$01 ; CPU:$ED6F PRG:2D6F A9 01 jmp $ED87 ; CPU:$ED71 PRG:2D71 4C 87 ED ; ----------------------------------------------------------------------------- -; Routine: Label_ED74 +; Routine: SubCED38_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12508,7 +12517,7 @@ Label_ED57: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_ED74: +SubCED38_Block_1: lda #$10 ; CPU:$ED74 PRG:2D74 A9 10 sta Zp40 ; CPU:$ED76 PRG:2D76 85 40 lda #$00 ; CPU:$ED78 PRG:2D78 A9 00 @@ -12518,7 +12527,7 @@ Label_ED74: lda #$01 ; CPU:$ED80 PRG:2D80 A9 01 jmp $ED87 ; CPU:$ED82 PRG:2D82 4C 87 ED ; ----------------------------------------------------------------------------- -; Routine: Label_ED85 +; Routine: SubCED38_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12526,10 +12535,10 @@ Label_ED74: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_ED85: +SubCED38_Block_2: lda #$00 ; CPU:$ED85 PRG:2D85 A9 00 ; ----------------------------------------------------------------------------- -; Routine: Label_ED87 +; Routine: SubCED87 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12537,11 +12546,11 @@ Label_ED85: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_ED87: +SubCED87: sta ZpBF ; CPU:$ED87 PRG:2D87 85 BF rts ; CPU:$ED89 PRG:2D89 60 ; ----------------------------------------------------------------------------- -; Routine: Label_ED8A +; Routine: SubCED8A ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12549,13 +12558,13 @@ Label_ED87: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_ED8A: +SubCED8A: lda #$00 ; CPU:$ED8A PRG:2D8A A9 00 sta ZpAE ; CPU:$ED8C PRG:2D8C 85 AE lda #$3A ; CPU:$ED8E PRG:2D8E A9 3A jsr $C847 ; CPU:$ED90 PRG:2D90 20 47 C8 ; ----------------------------------------------------------------------------- -; Routine: Label_ED93 +; Routine: SubCED93 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12563,20 +12572,20 @@ Label_ED8A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_ED93: +SubCED93: jsr $EFDD ; CPU:$ED93 PRG:2D93 20 DD EF jsr $EAEC ; CPU:$ED96 PRG:2D96 20 EC EA jsr $EFEF ; CPU:$ED99 PRG:2D99 20 EF EF - bne Label_EDAD ; CPU:$ED9C PRG:2D9C D0 0F + bne SubCED93_Block ; CPU:$ED9C PRG:2D9C D0 0F inc ZpAE ; CPU:$ED9E PRG:2D9E E6 AE lda ZpAE ; CPU:$EDA0 PRG:2DA0 A5 AE ldx Zp53 ; CPU:$EDA2 PRG:2DA2 A6 53 dex ; CPU:$EDA4 PRG:2DA4 CA cmp $C1F6,x ; CPU:$EDA5 PRG:2DA5 DD F6 C1 - beq Label_EDB5 ; CPU:$EDA8 PRG:2DA8 F0 0B + beq SubCED93_Block_1 ; CPU:$EDA8 PRG:2DA8 F0 0B jmp $ED93 ; CPU:$EDAA PRG:2DAA 4C 93 ED ; ----------------------------------------------------------------------------- -; Routine: Label_EDAD +; Routine: SubCED93_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12584,13 +12593,13 @@ Label_ED93: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EDAD: +SubCED93_Block: jsr $EF51 ; CPU:$EDAD PRG:2DAD 20 51 EF lda #$FF ; CPU:$EDB0 PRG:2DB0 A9 FF sta Zp96 ; CPU:$EDB2 PRG:2DB2 85 96 rts ; CPU:$EDB4 PRG:2DB4 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EDB5 +; Routine: SubCED93_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12598,16 +12607,16 @@ Label_EDAD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EDB5: +SubCED93_Block_1: lda Zp96 ; CPU:$EDB5 PRG:2DB5 A5 96 cmp #$0A ; CPU:$EDB7 PRG:2DB7 C9 0A - bne Label_EDC4 ; CPU:$EDB9 PRG:2DB9 D0 09 + bne SubCED93_Block_2 ; CPU:$EDB9 PRG:2DB9 D0 09 lda Zp53 ; CPU:$EDBB PRG:2DBB A5 53 cmp #$01 ; CPU:$EDBD PRG:2DBD C9 01 - beq Label_EDC4 ; CPU:$EDBF PRG:2DBF F0 03 + beq SubCED93_Block_2 ; CPU:$EDBF PRG:2DBF F0 03 jsr $ECBF ; CPU:$EDC1 PRG:2DC1 20 BF EC ; ----------------------------------------------------------------------------- -; Routine: Label_EDC4 +; Routine: SubCED93_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12615,10 +12624,10 @@ Label_EDB5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EDC4: +SubCED93_Block_2: rts ; CPU:$EDC4 PRG:2DC4 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EDC5 +; Routine: SubCEDC5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12626,16 +12635,16 @@ Label_EDC4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EDC5: +SubCEDC5: lda Zp53 ; CPU:$EDC5 PRG:2DC5 A5 53 cmp #$03 ; CPU:$EDC7 PRG:2DC7 C9 03 - bne Label_EDD2 ; CPU:$EDC9 PRG:2DC9 D0 07 + bne SubCEDC5_Block ; CPU:$EDC9 PRG:2DC9 D0 07 ldy Zp96 ; CPU:$EDCB PRG:2DCB A4 96 cpy #$01 ; CPU:$EDCD PRG:2DCD C0 01 - beq Label_EDD2 ; CPU:$EDCF PRG:2DCF F0 01 + beq SubCEDC5_Block ; CPU:$EDCF PRG:2DCF F0 01 rts ; CPU:$EDD1 PRG:2DD1 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EDD2 +; Routine: SubCEDC5_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12643,7 +12652,7 @@ Label_EDC5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EDD2: +SubCEDC5_Block: sec ; CPU:$EDD2 PRG:2DD2 38 sbc #$01 ; CPU:$EDD3 PRG:2DD3 E9 01 asl a ; CPU:$EDD5 PRG:2DD5 0A @@ -12657,7 +12666,7 @@ Label_EDD2: lda $C424,x ; CPU:$EDE6 PRG:2DE6 BD 24 C4 sta Zp01 ; CPU:$EDE9 PRG:2DE9 85 01 ; ----------------------------------------------------------------------------- -; Routine: Label_EDEB +; Routine: SubCEDEB ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12665,22 +12674,22 @@ Label_EDD2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EDEB: +SubCEDEB: jsr $EFEF ; CPU:$EDEB PRG:2DEB 20 EF EF - bne Label_EE07 ; CPU:$EDEE PRG:2DEE D0 17 + bne SubCEDEB_Block ; CPU:$EDEE PRG:2DEE D0 17 lda Zp53 ; CPU:$EDF0 PRG:2DF0 A5 53 cmp #$03 ; CPU:$EDF2 PRG:2DF2 C9 03 - bne Label_EE0B ; CPU:$EDF4 PRG:2DF4 D0 15 + bne SubCEDEB_Block_1 ; CPU:$EDF4 PRG:2DF4 D0 15 lda Zp01 ; CPU:$EDF6 PRG:2DF6 A5 01 cmp #$C9 ; CPU:$EDF8 PRG:2DF8 C9 C9 - beq Label_EE0B ; CPU:$EDFA PRG:2DFA F0 0F + beq SubCEDEB_Block_1 ; CPU:$EDFA PRG:2DFA F0 0F lda #$70 ; CPU:$EDFC PRG:2DFC A9 70 sta Zp00 ; CPU:$EDFE PRG:2DFE 85 00 lda #$C9 ; CPU:$EE00 PRG:2E00 A9 C9 sta Zp01 ; CPU:$EE02 PRG:2E02 85 01 jmp $EDEB ; CPU:$EE04 PRG:2E04 4C EB ED ; ----------------------------------------------------------------------------- -; Routine: Label_EE07 +; Routine: SubCEDEB_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12688,11 +12697,11 @@ Label_EDEB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EE07: +SubCEDEB_Block: lda #$FF ; CPU:$EE07 PRG:2E07 A9 FF sta Zp96 ; CPU:$EE09 PRG:2E09 85 96 ; ----------------------------------------------------------------------------- -; Routine: Label_EE0B +; Routine: SubCEDEB_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12700,10 +12709,10 @@ Label_EE07: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EE0B: +SubCEDEB_Block_1: rts ; CPU:$EE0B PRG:2E0B 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EE0C +; Routine: SubCEE0C ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12711,16 +12720,16 @@ Label_EE0B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EE0C: +SubCEE0C: lda #$80 ; CPU:$EE0C PRG:2E0C A9 80 sta Zp0A ; CPU:$EE0E PRG:2E0E 85 0A lda #$80 ; CPU:$EE10 PRG:2E10 A9 80 sta Zp0B ; CPU:$EE12 PRG:2E12 85 0B jsr $DFE4 ; CPU:$EE14 PRG:2E14 20 E4 DF - bne Label_EE1A ; CPU:$EE17 PRG:2E17 D0 01 + bne SubCEE0C_Block ; CPU:$EE17 PRG:2E17 D0 01 rts ; CPU:$EE19 PRG:2E19 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EE1A +; Routine: SubCEE0C_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12728,14 +12737,14 @@ Label_EE0C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EE1A: +SubCEE0C_Block: lda Zp53 ; CPU:$EE1A PRG:2E1A A5 53 cmp #$01 ; CPU:$EE1C PRG:2E1C C9 01 - bne Label_EE26 ; CPU:$EE1E PRG:2E1E D0 06 + bne SubCEE0C_Block_1 ; CPU:$EE1E PRG:2E1E D0 06 jsr $EFD5 ; CPU:$EE20 PRG:2E20 20 D5 EF jmp $EE29 ; CPU:$EE23 PRG:2E23 4C 29 EE ; ----------------------------------------------------------------------------- -; Routine: Label_EE26 +; Routine: SubCEE0C_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12743,10 +12752,10 @@ Label_EE1A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EE26: +SubCEE0C_Block_1: jsr $EFDD ; CPU:$EE26 PRG:2E26 20 DD EF ; ----------------------------------------------------------------------------- -; Routine: Label_EE29 +; Routine: SubCEE29 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12754,16 +12763,16 @@ Label_EE26: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EE29: +SubCEE29: stx Zp04 ; CPU:$EE29 PRG:2E29 86 04 jsr $EAEC ; CPU:$EE2B PRG:2E2B 20 EC EA lda ZpBF ; CPU:$EE2E PRG:2E2E A5 BF cmp #$01 ; CPU:$EE30 PRG:2E30 C9 01 - bne Label_EE38 ; CPU:$EE32 PRG:2E32 D0 04 + bne SubCEE29_Block ; CPU:$EE32 PRG:2E32 D0 04 ldy #$02 ; CPU:$EE34 PRG:2E34 A0 02 sty ZpFF ; CPU:$EE36 PRG:2E36 84 FF ; ----------------------------------------------------------------------------- -; Routine: Label_EE38 +; Routine: SubCEE29_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12771,9 +12780,9 @@ Label_EE29: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EE38: +SubCEE29_Block: cmp #$0B ; CPU:$EE38 PRG:2E38 C9 0B - beq Label_EE51 ; CPU:$EE3A PRG:2E3A F0 15 + beq SubCEE29_Block_1 ; CPU:$EE3A PRG:2E3A F0 15 ldx ZpBF ; CPU:$EE3C PRG:2E3C A6 BF dex ; CPU:$EE3E PRG:2E3E CA lda $C1EC,x ; CPU:$EE3F PRG:2E3F BD EC C1 @@ -12785,7 +12794,7 @@ Label_EE38: inc ZpBF ; CPU:$EE4E PRG:2E4E E6 BF rts ; CPU:$EE50 PRG:2E50 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EE51 +; Routine: SubCEE29_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12793,14 +12802,14 @@ Label_EE38: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EE51: +SubCEE29_Block_1: lda Zp53 ; CPU:$EE51 PRG:2E51 A5 53 cmp #$01 ; CPU:$EE53 PRG:2E53 C9 01 - bne Label_EE5C ; CPU:$EE55 PRG:2E55 D0 05 + bne SubCEE29_Block_2 ; CPU:$EE55 PRG:2E55 D0 05 lda #$03 ; CPU:$EE57 PRG:2E57 A9 03 jsr $EE6C ; CPU:$EE59 PRG:2E59 20 6C EE ; ----------------------------------------------------------------------------- -; Routine: Label_EE5C +; Routine: SubCEE29_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12808,7 +12817,7 @@ Label_EE51: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EE5C: +SubCEE29_Block_2: jsr $EAD1 ; CPU:$EE5C PRG:2E5C 20 D1 EA jsr $F094 ; CPU:$EE5F PRG:2E5F 20 94 F0 ldx #$02 ; CPU:$EE62 PRG:2E62 A2 02 @@ -12817,7 +12826,7 @@ Label_EE5C: sta ZpBF ; CPU:$EE69 PRG:2E69 85 BF rts ; CPU:$EE6B PRG:2E6B 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EE6C +; Routine: SetSpriteAttributes ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12825,14 +12834,14 @@ Label_EE5C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EE6C: +SetSpriteAttributes: sta $0202,x ; CPU:$EE6C PRG:2E6C 9D 02 02 sta $0206,x ; CPU:$EE6F PRG:2E6F 9D 06 02 sta $020A,x ; CPU:$EE72 PRG:2E72 9D 0A 02 sta $020E,x ; CPU:$EE75 PRG:2E75 9D 0E 02 rts ; CPU:$EE78 PRG:2E78 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EE79 +; Routine: CheckPlayerCollision ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12840,13 +12849,13 @@ Label_EE6C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EE79: +CheckPlayerCollision: ldy Zp53 ; CPU:$EE79 PRG:2E79 A4 53 cpy #$01 ; CPU:$EE7B PRG:2E7B C0 01 - bne Label_EE80 ; CPU:$EE7D PRG:2E7D D0 01 + bne CheckPlayerCollision_Block ; CPU:$EE7D PRG:2E7D D0 01 rts ; CPU:$EE7F PRG:2E7F 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EE80 +; Routine: CheckPlayerCollision_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12854,15 +12863,15 @@ Label_EE79: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EE80: +CheckPlayerCollision_Block: lda ZpBE ; CPU:$EE80 PRG:2E80 A5 BE - beq Label_EED8 ; CPU:$EE82 PRG:2E82 F0 54 + beq SubCEE8D_Block ; CPU:$EE82 PRG:2E82 F0 54 cpy #$04 ; CPU:$EE84 PRG:2E84 C0 04 - bne Label_EEF0 ; CPU:$EE86 PRG:2E86 D0 68 + bne SubCEE8D_Block_4 ; CPU:$EE86 PRG:2E86 D0 68 ldy #$00 ; CPU:$EE88 PRG:2E88 A0 00 ldx $C5FF ; CPU:$EE8A PRG:2E8A AE FF C5 ; ----------------------------------------------------------------------------- -; Routine: Label_EE8D +; Routine: SubCEE8D ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12870,29 +12879,29 @@ Label_EE80: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EE8D: +SubCEE8D: lda $C5C2,x ; CPU:$EE8D PRG:2E8D BD C2 C5 cmp $0203 ; CPU:$EE90 PRG:2E90 CD 03 02 - bne Label_EEE7 ; CPU:$EE93 PRG:2E93 D0 52 + bne SubCEE8D_Block_3 ; CPU:$EE93 PRG:2E93 D0 52 lda $C5AE,x ; CPU:$EE95 PRG:2E95 BD AE C5 cmp $0200 ; CPU:$EE98 PRG:2E98 CD 00 02 - bcc Label_EEE7 ; CPU:$EE9B PRG:2E9B 90 4A + bcc SubCEE8D_Block_3 ; CPU:$EE9B PRG:2E9B 90 4A sec ; CPU:$EE9D PRG:2E9D 38 sbc #$11 ; CPU:$EE9E PRG:2E9E E9 11 cmp $0200 ; CPU:$EEA0 PRG:2EA0 CD 00 02 - bcs Label_EEE7 ; CPU:$EEA3 PRG:2EA3 B0 42 - lda a:$00C1,y ; CPU:$EEA5 PRG:2EA5 B9 C1 00 + bcs SubCEE8D_Block_3 ; CPU:$EEA3 PRG:2EA3 B0 42 + lda a:ZpC1,y ; CPU:$EEA5 PRG:2EA5 B9 C1 00 cmp #$00 ; CPU:$EEA8 PRG:2EA8 C9 00 - bne Label_EED9 ; CPU:$EEAA PRG:2EAA D0 2D + bne SubCEE8D_Block_1 ; CPU:$EEAA PRG:2EAA D0 2D lda Zp96 ; CPU:$EEAC PRG:2EAC A5 96 cmp #$08 ; CPU:$EEAE PRG:2EAE C9 08 - beq Label_EED8 ; CPU:$EEB0 PRG:2EB0 F0 26 + beq SubCEE8D_Block ; CPU:$EEB0 PRG:2EB0 F0 26 cmp #$FF ; CPU:$EEB2 PRG:2EB2 C9 FF - beq Label_EED8 ; CPU:$EEB4 PRG:2EB4 F0 22 + beq SubCEE8D_Block ; CPU:$EEB4 PRG:2EB4 F0 22 lda #$11 ; CPU:$EEB6 PRG:2EB6 A9 11 sta ZpCC ; CPU:$EEB8 PRG:2EB8 85 CC lda #$01 ; CPU:$EEBA PRG:2EBA A9 01 - sta a:$00C1,y ; CPU:$EEBC PRG:2EBC 99 C1 00 + sta a:ZpC1,y ; CPU:$EEBC PRG:2EBC 99 C1 00 jsr $EF38 ; CPU:$EEBF PRG:2EBF 20 38 EF lda $0200 ; CPU:$EEC2 PRG:2EC2 AD 00 02 clc ; CPU:$EEC5 PRG:2EC5 18 @@ -12905,7 +12914,7 @@ Label_EE8D: lda #$20 ; CPU:$EED4 PRG:2ED4 A9 20 sta ZpFD ; CPU:$EED6 PRG:2ED6 85 FD ; ----------------------------------------------------------------------------- -; Routine: Label_EED8 +; Routine: SubCEE8D_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12913,10 +12922,10 @@ Label_EE8D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EED8: +SubCEE8D_Block: rts ; CPU:$EED8 PRG:2ED8 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EED9 +; Routine: SubCEE8D_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12924,15 +12933,15 @@ Label_EED8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EED9: +SubCEE8D_Block_1: lda Zp96 ; CPU:$EED9 PRG:2ED9 A5 96 cmp #$04 ; CPU:$EEDB PRG:2EDB C9 04 - beq Label_EEE6 ; CPU:$EEDD PRG:2EDD F0 07 + beq SubCEE8D_Block_2 ; CPU:$EEDD PRG:2EDD F0 07 jsr $EF51 ; CPU:$EEDF PRG:2EDF 20 51 EF lda #$08 ; CPU:$EEE2 PRG:2EE2 A9 08 sta Zp96 ; CPU:$EEE4 PRG:2EE4 85 96 ; ----------------------------------------------------------------------------- -; Routine: Label_EEE6 +; Routine: SubCEE8D_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12940,10 +12949,10 @@ Label_EED9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EEE6: +SubCEE8D_Block_2: rts ; CPU:$EEE6 PRG:2EE6 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EEE7 +; Routine: SubCEE8D_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12951,14 +12960,14 @@ Label_EEE6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EEE7: +SubCEE8D_Block_3: cpy #$07 ; CPU:$EEE7 PRG:2EE7 C0 07 - beq Label_EEF0 ; CPU:$EEE9 PRG:2EE9 F0 05 + beq SubCEE8D_Block_4 ; CPU:$EEE9 PRG:2EE9 F0 05 inx ; CPU:$EEEB PRG:2EEB E8 iny ; CPU:$EEEC PRG:2EEC C8 jmp $EE8D ; CPU:$EEED PRG:2EED 4C 8D EE ; ----------------------------------------------------------------------------- -; Routine: Label_EEF0 +; Routine: SubCEE8D_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12966,12 +12975,12 @@ Label_EEE7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EEF0: +SubCEE8D_Block_4: ldy Zp53 ; CPU:$EEF0 PRG:2EF0 A4 53 ldx $C5FA,y ; CPU:$EEF2 PRG:2EF2 BE FA C5 ldy #$00 ; CPU:$EEF5 PRG:2EF5 A0 00 ; ----------------------------------------------------------------------------- -; Routine: Label_EEF7 +; Routine: SubCEEF7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12979,15 +12988,15 @@ Label_EEF0: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EEF7: +SubCEEF7: lda $C5AE,x ; CPU:$EEF7 PRG:2EF7 BD AE C5 cmp $0200 ; CPU:$EEFA PRG:2EFA CD 00 02 - bne Label_EF2F ; CPU:$EEFD PRG:2EFD D0 30 + bne SubCEEF7_Block_1 ; CPU:$EEFD PRG:2EFD D0 30 lda $C5C2,x ; CPU:$EEFF PRG:2EFF BD C2 C5 cmp $0203 ; CPU:$EF02 PRG:2F02 CD 03 02 - bne Label_EF2F ; CPU:$EF05 PRG:2F05 D0 28 + bne SubCEEF7_Block_1 ; CPU:$EF05 PRG:2F05 D0 28 lda a:$00C9,y ; CPU:$EF07 PRG:2F07 B9 C9 00 - bne Label_EF2F ; CPU:$EF0A PRG:2F0A D0 23 + bne SubCEEF7_Block_1 ; CPU:$EF0A PRG:2F0A D0 23 lda #$22 ; CPU:$EF0C PRG:2F0C A9 22 sta ZpCC ; CPU:$EF0E PRG:2F0E 85 CC lda #$01 ; CPU:$EF10 PRG:2F10 A9 01 @@ -13004,7 +13013,7 @@ Label_EEF7: lda #$20 ; CPU:$EF2A PRG:2F2A A9 20 sta ZpFD ; CPU:$EF2C PRG:2F2C 85 FD ; ----------------------------------------------------------------------------- -; Routine: Label_EF2E +; Routine: SubCEEF7_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13012,10 +13021,10 @@ Label_EEF7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EF2E: +SubCEEF7_Block: rts ; CPU:$EF2E PRG:2F2E 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EF2F +; Routine: SubCEEF7_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13023,14 +13032,14 @@ Label_EF2E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EF2F: +SubCEEF7_Block_1: cpy #$02 ; CPU:$EF2F PRG:2F2F C0 02 - beq Label_EF2E ; CPU:$EF31 PRG:2F31 F0 FB + beq SubCEEF7_Block ; CPU:$EF31 PRG:2F31 F0 FB inx ; CPU:$EF33 PRG:2F33 E8 iny ; CPU:$EF34 PRG:2F34 C8 jmp $EEF7 ; CPU:$EF35 PRG:2F35 4C F7 EE ; ----------------------------------------------------------------------------- -; Routine: Label_EF38 +; Routine: SubCEF38 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13038,7 +13047,7 @@ Label_EF2F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EF38: +SubCEF38: lda #$24 ; CPU:$EF38 PRG:2F38 A9 24 sta ZpCD ; CPU:$EF3A PRG:2F3A 85 CD sta ZpCE ; CPU:$EF3C PRG:2F3C 85 CE @@ -13051,7 +13060,7 @@ Label_EF38: lda #$48 ; CPU:$EF4C PRG:2F4C A9 48 jmp $C815 ; CPU:$EF4E PRG:2F4E 4C 15 C8 ; ----------------------------------------------------------------------------- -; Routine: Label_EF51 +; Routine: SubCEF51 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13059,12 +13068,12 @@ Label_EF38: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EF51: +SubCEF51: lda Zp96 ; CPU:$EF51 PRG:2F51 A5 96 cmp #$0A ; CPU:$EF53 PRG:2F53 C9 0A - bne Label_EF71 ; CPU:$EF55 PRG:2F55 D0 1A + bne SubCEF51_Block ; CPU:$EF55 PRG:2F55 D0 1A lda ZpA0 ; CPU:$EF57 PRG:2F57 A5 A0 - beq Label_EF71 ; CPU:$EF59 PRG:2F59 F0 16 + beq SubCEF51_Block ; CPU:$EF59 PRG:2F59 F0 16 sec ; CPU:$EF5B PRG:2F5B 38 sbc #$01 ; CPU:$EF5C PRG:2F5C E9 01 tax ; CPU:$EF5E PRG:2F5E AA @@ -13079,7 +13088,7 @@ Label_EF51: sta $02D0,x ; CPU:$EF6B PRG:2F6B 9D D0 02 sta $02D4,x ; CPU:$EF6E PRG:2F6E 9D D4 02 ; ----------------------------------------------------------------------------- -; Routine: Label_EF71 +; Routine: SubCEF51_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13087,10 +13096,10 @@ Label_EF51: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EF71: +SubCEF51_Block: rts ; CPU:$EF71 PRG:2F71 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EF72 +; Routine: SubCEF72 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13098,19 +13107,19 @@ Label_EF71: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EF72: +SubCEF72: stx Zp0F ; CPU:$EF72 PRG:2F72 86 0F asl a ; CPU:$EF74 PRG:2F74 0A tax ; CPU:$EF75 PRG:2F75 AA lda $042C,x ; CPU:$EF76 PRG:2F76 BD 2C 04 - bne Label_EF94 ; CPU:$EF79 PRG:2F79 D0 19 + bne SubCEF72_Block_1 ; CPU:$EF79 PRG:2F79 D0 19 sta $0436,x ; CPU:$EF7B PRG:2F7B 9D 36 04 cpx #$00 ; CPU:$EF7E PRG:2F7E E0 00 - bne Label_EF87 ; CPU:$EF80 PRG:2F80 D0 05 + bne SubCEF72_Block ; CPU:$EF80 PRG:2F80 D0 05 lda #$08 ; CPU:$EF82 PRG:2F82 A9 08 jmp $EF89 ; CPU:$EF84 PRG:2F84 4C 89 EF ; ----------------------------------------------------------------------------- -; Routine: Label_EF87 +; Routine: SubCEF72_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13118,10 +13127,10 @@ Label_EF72: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EF87: +SubCEF72_Block: lda #$80 ; CPU:$EF87 PRG:2F87 A9 80 ; ----------------------------------------------------------------------------- -; Routine: Label_EF89 +; Routine: SubCEF89 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13129,13 +13138,13 @@ Label_EF87: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EF89: +SubCEF89: sta $0435,x ; CPU:$EF89 PRG:2F89 9D 35 04 lda #$F0 ; CPU:$EF8C PRG:2F8C A9 F0 sta $042D,x ; CPU:$EF8E PRG:2F8E 9D 2D 04 jmp $EFAD ; CPU:$EF91 PRG:2F91 4C AD EF ; ----------------------------------------------------------------------------- -; Routine: Label_EF94 +; Routine: SubCEF72_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13143,14 +13152,14 @@ Label_EF89: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EF94: +SubCEF72_Block_1: lda $0435,x ; CPU:$EF94 PRG:2F94 BD 35 04 cpx #$00 ; CPU:$EF97 PRG:2F97 E0 00 - bne Label_EFA0 ; CPU:$EF99 PRG:2F99 D0 05 + bne SubCEF72_Block_2 ; CPU:$EF99 PRG:2F99 D0 05 adc #$10 ; CPU:$EF9B PRG:2F9B 69 10 jmp $EFA2 ; CPU:$EF9D PRG:2F9D 4C A2 EF ; ----------------------------------------------------------------------------- -; Routine: Label_EFA0 +; Routine: SubCEF72_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13158,10 +13167,10 @@ Label_EF94: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EFA0: +SubCEF72_Block_2: adc #$30 ; CPU:$EFA0 PRG:2FA0 69 30 ; ----------------------------------------------------------------------------- -; Routine: Label_EFA2 +; Routine: SubCEFA2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13169,13 +13178,13 @@ Label_EFA0: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EFA2: +SubCEFA2: sta $0435,x ; CPU:$EFA2 PRG:2FA2 9D 35 04 lda $0436,x ; CPU:$EFA5 PRG:2FA5 BD 36 04 adc #$00 ; CPU:$EFA8 PRG:2FA8 69 00 sta $0436,x ; CPU:$EFAA PRG:2FAA 9D 36 04 ; ----------------------------------------------------------------------------- -; Routine: Label_EFAD +; Routine: SubCEFAD ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13183,7 +13192,7 @@ Label_EFA2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EFAD: +SubCEFAD: lda $042D,x ; CPU:$EFAD PRG:2FAD BD 2D 04 sec ; CPU:$EFB0 PRG:2FB0 38 sbc $043D,x ; CPU:$EFB1 PRG:2FB1 FD 3D 04 @@ -13202,7 +13211,7 @@ Label_EFAD: ldx Zp0F ; CPU:$EFD2 PRG:2FD2 A6 0F rts ; CPU:$EFD4 PRG:2FD4 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EFD5 +; Routine: ComputeOamOffsetFromZp5D ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13210,10 +13219,10 @@ Label_EFAD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EFD5: +ComputeOamOffsetFromZp5D: lda Zp5D ; CPU:$EFD5 PRG:2FD5 A5 5D ; ----------------------------------------------------------------------------- -; Routine: Label_EFD7 +; Routine: SubCEFD7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13221,12 +13230,12 @@ Label_EFD5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EFD7: +SubCEFD7: clc ; CPU:$EFD7 PRG:2FD7 18 adc #$03 ; CPU:$EFD8 PRG:2FD8 69 03 jmp $EFE2 ; CPU:$EFDA PRG:2FDA 4C E2 EF ; ----------------------------------------------------------------------------- -; Routine: Label_EFDD +; Routine: ComputeOamOffsetFromZpAE ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13234,12 +13243,12 @@ Label_EFD7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EFDD: +ComputeOamOffsetFromZpAE: lda ZpAE ; CPU:$EFDD PRG:2FDD A5 AE clc ; CPU:$EFDF PRG:2FDF 18 adc #$01 ; CPU:$EFE0 PRG:2FE0 69 01 ; ----------------------------------------------------------------------------- -; Routine: Label_EFE2 +; Routine: ComputeOamOffset ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13247,7 +13256,7 @@ Label_EFDD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EFE2: +ComputeOamOffset: asl a ; CPU:$EFE2 PRG:2FE2 0A asl a ; CPU:$EFE3 PRG:2FE3 0A asl a ; CPU:$EFE4 PRG:2FE4 0A @@ -13255,7 +13264,7 @@ Label_EFE2: tax ; CPU:$EFE6 PRG:2FE6 AA rts ; CPU:$EFE7 PRG:2FE7 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EFE8 +; Routine: LoadObjectRect ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13263,10 +13272,10 @@ Label_EFE2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EFE8: +LoadObjectRect: jsr $C847 ; CPU:$EFE8 PRG:2FE8 20 47 C8 ; ----------------------------------------------------------------------------- -; Routine: Label_EFEB +; Routine: SubCEFEB ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13274,11 +13283,11 @@ Label_EFE8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EFEB: +SubCEFEB: lda #$00 ; CPU:$EFEB PRG:2FEB A9 00 - beq Label_EFF5 ; CPU:$EFED PRG:2FED F0 06 + beq SubCEFF3_Block ; CPU:$EFED PRG:2FED F0 06 ; ----------------------------------------------------------------------------- -; Routine: Label_EFEF +; Routine: CheckObjectOverlap ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13286,11 +13295,11 @@ Label_EFEB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EFEF: +CheckObjectOverlap: lda #$01 ; CPU:$EFEF PRG:2FEF A9 01 - bne Label_EFF5 ; CPU:$EFF1 PRG:2FF1 D0 02 + bne SubCEFF3_Block ; CPU:$EFF1 PRG:2FF1 D0 02 ; ----------------------------------------------------------------------------- -; Routine: Label_EFF3 +; Routine: SubCEFF3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13298,10 +13307,10 @@ Label_EFEF: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EFF3: +SubCEFF3: lda #$02 ; CPU:$EFF3 PRG:2FF3 A9 02 ; ----------------------------------------------------------------------------- -; Routine: Label_EFF5 +; Routine: SubCEFF3_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13309,7 +13318,7 @@ Label_EFF3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EFF5: +SubCEFF3_Block: sta Zp0C ; CPU:$EFF5 PRG:2FF5 85 0C txa ; CPU:$EFF7 PRG:2FF7 8A pha ; CPU:$EFF8 PRG:2FF8 48 @@ -13317,7 +13326,7 @@ Label_EFF5: pha ; CPU:$EFFA PRG:2FFA 48 ldy #$00 ; CPU:$EFFB PRG:2FFB A0 00 lda Zp0C ; CPU:$EFFD PRG:2FFD A5 0C - bne Label_F018 ; CPU:$EFFF PRG:2FFF D0 17 + bne SubCEFF3_Block_1 ; CPU:$EFFF PRG:2FFF D0 17 jsr $F063 ; CPU:$F001 PRG:3001 20 63 F0 sta Zp46 ; CPU:$F004 PRG:3004 85 46 jsr $F069 ; CPU:$F006 PRG:3006 20 69 F0 @@ -13328,7 +13337,7 @@ Label_EFF5: sta Zp49 ; CPU:$F013 PRG:3013 85 49 jmp $F059 ; CPU:$F015 PRG:3015 4C 59 F0 ; ----------------------------------------------------------------------------- -; Routine: Label_F018 +; Routine: SubCEFF3_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13336,7 +13345,7 @@ Label_EFF5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F018: +SubCEFF3_Block_1: jsr $F063 ; CPU:$F018 PRG:3018 20 63 F0 sta Zp4A ; CPU:$F01B PRG:301B 85 4A jsr $F069 ; CPU:$F01D PRG:301D 20 69 F0 @@ -13355,20 +13364,20 @@ Label_F018: sta Zp9D ; CPU:$F038 PRG:3038 85 9D lda Zp49 ; CPU:$F03A PRG:303A A5 49 cmp Zp4B ; CPU:$F03C PRG:303C C5 4B - bcc Label_F057 ; CPU:$F03E PRG:303E 90 17 + bcc SubCEFF3_Block_2 ; CPU:$F03E PRG:303E 90 17 lda Zp4D ; CPU:$F040 PRG:3040 A5 4D cmp Zp47 ; CPU:$F042 PRG:3042 C5 47 - bcc Label_F057 ; CPU:$F044 PRG:3044 90 11 + bcc SubCEFF3_Block_2 ; CPU:$F044 PRG:3044 90 11 lda Zp4C ; CPU:$F046 PRG:3046 A5 4C cmp Zp46 ; CPU:$F048 PRG:3048 C5 46 - bcc Label_F057 ; CPU:$F04A PRG:304A 90 0B + bcc SubCEFF3_Block_2 ; CPU:$F04A PRG:304A 90 0B lda Zp48 ; CPU:$F04C PRG:304C A5 48 cmp Zp4A ; CPU:$F04E PRG:304E C5 4A - bcc Label_F057 ; CPU:$F050 PRG:3050 90 05 + bcc SubCEFF3_Block_2 ; CPU:$F050 PRG:3050 90 05 lda #$01 ; CPU:$F052 PRG:3052 A9 01 jmp $F059 ; CPU:$F054 PRG:3054 4C 59 F0 ; ----------------------------------------------------------------------------- -; Routine: Label_F057 +; Routine: SubCEFF3_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13376,10 +13385,10 @@ Label_F018: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F057: +SubCEFF3_Block_2: lda #$00 ; CPU:$F057 PRG:3057 A9 00 ; ----------------------------------------------------------------------------- -; Routine: Label_F059 +; Routine: SubCF059 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13387,7 +13396,7 @@ Label_F057: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F059: +SubCF059: sta Zp0C ; CPU:$F059 PRG:3059 85 0C pla ; CPU:$F05B PRG:305B 68 tay ; CPU:$F05C PRG:305C A8 @@ -13396,7 +13405,7 @@ Label_F059: lda Zp0C ; CPU:$F05F PRG:305F A5 0C rts ; CPU:$F061 PRG:3061 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F062 +; Routine: SubCF062 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13404,10 +13413,10 @@ Label_F059: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F062: +SubCF062: iny ; CPU:$F062 PRG:3062 C8 ; ----------------------------------------------------------------------------- -; Routine: Label_F063 +; Routine: ReadPtrBytePlusZp00 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13415,13 +13424,13 @@ Label_F062: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F063: +ReadPtrBytePlusZp00: lda (Zp02),y ; CPU:$F063 PRG:3063 B1 02 clc ; CPU:$F065 PRG:3065 18 adc Zp00 ; CPU:$F066 PRG:3066 65 00 rts ; CPU:$F068 PRG:3068 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F069 +; Routine: ReadPtrBytePlusZp01 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13429,14 +13438,14 @@ Label_F063: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F069: +ReadPtrBytePlusZp01: iny ; CPU:$F069 PRG:3069 C8 lda (Zp02),y ; CPU:$F06A PRG:306A B1 02 clc ; CPU:$F06C PRG:306C 18 adc Zp01 ; CPU:$F06D PRG:306D 65 01 rts ; CPU:$F06F PRG:306F 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F070 +; Routine: SubCF070 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13444,11 +13453,11 @@ Label_F069: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F070: +SubCF070: sta Zp02 ; CPU:$F070 PRG:3070 85 02 jsr $EAE1 ; CPU:$F072 PRG:3072 20 E1 EA ; ----------------------------------------------------------------------------- -; Routine: Label_F075 +; Routine: SubCF075 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13456,10 +13465,10 @@ Label_F070: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F075: +SubCF075: jsr $EACD ; CPU:$F075 PRG:3075 20 CD EA ; ----------------------------------------------------------------------------- -; Routine: Label_F078 +; Routine: DrawSpriteByMode ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13467,13 +13476,13 @@ Label_F075: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F078: +DrawSpriteByMode: lda Zp57 ; CPU:$F078 PRG:3078 A5 57 and #$03 ; CPU:$F07A PRG:307A 29 03 lsr a ; CPU:$F07C PRG:307C 4A jmp $F096 ; CPU:$F07D PRG:307D 4C 96 F0 ; ----------------------------------------------------------------------------- -; Routine: Label_F080 +; Routine: SetSpriteDrawOffset ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13481,10 +13490,10 @@ Label_F078: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F080: +SetSpriteDrawOffset: sta Zp04 ; CPU:$F080 PRG:3080 85 04 ; ----------------------------------------------------------------------------- -; Routine: Label_F082 +; Routine: DrawSpritePatternMode0 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13492,11 +13501,11 @@ Label_F080: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F082: +DrawSpritePatternMode0: lda #$00 ; CPU:$F082 PRG:3082 A9 00 - beq Label_F096 ; CPU:$F084 PRG:3084 F0 10 + beq DrawSpritePattern ; CPU:$F084 PRG:3084 F0 10 ; ----------------------------------------------------------------------------- -; Routine: Label_F086 +; Routine: SetSpriteDrawOffsetMode1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13504,10 +13513,10 @@ Label_F082: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F086: +SetSpriteDrawOffsetMode1: sta Zp04 ; CPU:$F086 PRG:3086 85 04 ; ----------------------------------------------------------------------------- -; Routine: Label_F088 +; Routine: DrawSpritePatternMode1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13515,11 +13524,11 @@ Label_F086: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F088: +DrawSpritePatternMode1: lda #$01 ; CPU:$F088 PRG:3088 A9 01 - bne Label_F096 ; CPU:$F08A PRG:308A D0 0A + bne DrawSpritePattern ; CPU:$F08A PRG:308A D0 0A ; ----------------------------------------------------------------------------- -; Routine: Label_F08C +; Routine: SetSpriteDrawOffsetMode4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13527,10 +13536,10 @@ Label_F088: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F08C: +SetSpriteDrawOffsetMode4: sta Zp04 ; CPU:$F08C PRG:308C 85 04 ; ----------------------------------------------------------------------------- -; Routine: Label_F08E +; Routine: DrawSpritePatternMode4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13538,11 +13547,11 @@ Label_F08C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F08E: +DrawSpritePatternMode4: lda #$04 ; CPU:$F08E PRG:308E A9 04 - bne Label_F096 ; CPU:$F090 PRG:3090 D0 04 + bne DrawSpritePattern ; CPU:$F090 PRG:3090 D0 04 ; ----------------------------------------------------------------------------- -; Routine: Label_F092 +; Routine: SetSpritePatternParams ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13550,10 +13559,10 @@ Label_F08E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F092: +SetSpritePatternParams: sta Zp03 ; CPU:$F092 PRG:3092 85 03 ; ----------------------------------------------------------------------------- -; Routine: Label_F094 +; Routine: DrawSpritePatternMode15 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13561,10 +13570,10 @@ Label_F092: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F094: +DrawSpritePatternMode15: lda #$0F ; CPU:$F094 PRG:3094 A9 0F ; ----------------------------------------------------------------------------- -; Routine: Label_F096 +; Routine: DrawSpritePattern ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13572,7 +13581,7 @@ Label_F094: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F096: +DrawSpritePattern: pha ; CPU:$F096 PRG:3096 48 sta Zp0F ; CPU:$F097 PRG:3097 85 0F txa ; CPU:$F099 PRG:3099 8A @@ -13595,7 +13604,7 @@ Label_F096: sta Zp05 ; CPU:$F0B1 PRG:30B1 85 05 lda Zp0F ; CPU:$F0B3 PRG:30B3 A5 0F cmp #$04 ; CPU:$F0B5 PRG:30B5 C9 04 - beq Label_F0EF ; CPU:$F0B7 PRG:30B7 F0 36 + beq DrawSpritePattern_Block_3 ; CPU:$F0B7 PRG:30B7 F0 36 lda #$0F ; CPU:$F0B9 PRG:30B9 A9 0F and Zp03 ; CPU:$F0BB PRG:30BB 25 03 sta Zp07 ; CPU:$F0BD PRG:30BD 85 07 @@ -13609,7 +13618,7 @@ Label_F096: lda #$00 ; CPU:$F0C8 PRG:30C8 A9 00 clc ; CPU:$F0CA PRG:30CA 18 ; ----------------------------------------------------------------------------- -; Routine: Label_F0CB +; Routine: DrawSpritePattern_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13617,17 +13626,17 @@ Label_F096: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F0CB: +DrawSpritePattern_Block: adc Zp07 ; CPU:$F0CB PRG:30CB 65 07 dex ; CPU:$F0CD PRG:30CD CA - bne Label_F0CB ; CPU:$F0CE PRG:30CE D0 FB + bne DrawSpritePattern_Block ; CPU:$F0CE PRG:30CE D0 FB sta Zp08 ; CPU:$F0D0 PRG:30D0 85 08 lda Zp0F ; CPU:$F0D2 PRG:30D2 A5 0F - bne Label_F0DC ; CPU:$F0D4 PRG:30D4 D0 06 + bne DrawSpritePattern_Block_1 ; CPU:$F0D4 PRG:30D4 D0 06 jsr $F11E ; CPU:$F0D6 PRG:30D6 20 1E F1 jmp $F0E9 ; CPU:$F0D9 PRG:30D9 4C E9 F0 ; ----------------------------------------------------------------------------- -; Routine: Label_F0DC +; Routine: DrawSpritePattern_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13635,13 +13644,13 @@ Label_F0CB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F0DC: +DrawSpritePattern_Block_1: cmp #$01 ; CPU:$F0DC PRG:30DC C9 01 - beq Label_F0E6 ; CPU:$F0DE PRG:30DE F0 06 + beq DrawSpritePattern_Block_2 ; CPU:$F0DE PRG:30DE F0 06 jsr $F195 ; CPU:$F0E0 PRG:30E0 20 95 F1 jmp $F0F2 ; CPU:$F0E3 PRG:30E3 4C F2 F0 ; ----------------------------------------------------------------------------- -; Routine: Label_F0E6 +; Routine: DrawSpritePattern_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13649,10 +13658,10 @@ Label_F0DC: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F0E6: +DrawSpritePattern_Block_2: jsr $F161 ; CPU:$F0E6 PRG:30E6 20 61 F1 ; ----------------------------------------------------------------------------- -; Routine: Label_F0E9 +; Routine: SubCF0E9 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13660,11 +13669,11 @@ Label_F0E6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F0E9: +SubCF0E9: jsr $F139 ; CPU:$F0E9 PRG:30E9 20 39 F1 jmp $F0F2 ; CPU:$F0EC PRG:30EC 4C F2 F0 ; ----------------------------------------------------------------------------- -; Routine: Label_F0EF +; Routine: DrawSpritePattern_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13672,10 +13681,10 @@ Label_F0E9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F0EF: +DrawSpritePattern_Block_3: jsr $F10A ; CPU:$F0EF PRG:30EF 20 0A F1 ; ----------------------------------------------------------------------------- -; Routine: Label_F0F2 +; Routine: DrawSpritePatternReturn ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13683,7 +13692,7 @@ Label_F0EF: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F0F2: +DrawSpritePatternReturn: pla ; CPU:$F0F2 PRG:30F2 68 sta Zp09 ; CPU:$F0F3 PRG:30F3 85 09 pla ; CPU:$F0F5 PRG:30F5 68 @@ -13703,7 +13712,7 @@ Label_F0F2: pla ; CPU:$F108 PRG:3108 68 rts ; CPU:$F109 PRG:3109 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F10A +; Routine: HideSpriteRange ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13711,11 +13720,11 @@ Label_F0F2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F10A: +HideSpriteRange: ldx Zp03 ; CPU:$F10A PRG:310A A6 03 ldy #$00 ; CPU:$F10C PRG:310C A0 00 ; ----------------------------------------------------------------------------- -; Routine: Label_F10E +; Routine: HideSpriteRange_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13723,7 +13732,7 @@ Label_F10A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F10E: +HideSpriteRange_Block: lda #$FF ; CPU:$F10E PRG:310E A9 FF sta (Zp04),y ; CPU:$F110 PRG:3110 91 04 iny ; CPU:$F112 PRG:3112 C8 @@ -13733,10 +13742,10 @@ Label_F10E: iny ; CPU:$F118 PRG:3118 C8 iny ; CPU:$F119 PRG:3119 C8 dex ; CPU:$F11A PRG:311A CA - bne Label_F10E ; CPU:$F11B PRG:311B D0 F1 + bne HideSpriteRange_Block ; CPU:$F11B PRG:311B D0 F1 rts ; CPU:$F11D PRG:311D 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F11E +; Routine: DrawSpriteTileRun ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13744,12 +13753,12 @@ Label_F10E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F11E: +DrawSpriteTileRun: lda Zp02 ; CPU:$F11E PRG:311E A5 02 ldx Zp08 ; CPU:$F120 PRG:3120 A6 08 ldy #$01 ; CPU:$F122 PRG:3122 A0 01 ; ----------------------------------------------------------------------------- -; Routine: Label_F124 +; Routine: DrawSpriteTileRun_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13757,7 +13766,7 @@ Label_F11E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F124: +DrawSpriteTileRun_Block: sta (Zp04),y ; CPU:$F124 PRG:3124 91 04 clc ; CPU:$F126 PRG:3126 18 adc #$01 ; CPU:$F127 PRG:3127 69 01 @@ -13771,10 +13780,10 @@ Label_F124: iny ; CPU:$F133 PRG:3133 C8 iny ; CPU:$F134 PRG:3134 C8 dex ; CPU:$F135 PRG:3135 CA - bne Label_F124 ; CPU:$F136 PRG:3136 D0 EC + bne DrawSpriteTileRun_Block ; CPU:$F136 PRG:3136 D0 EC rts ; CPU:$F138 PRG:3138 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F139 +; Routine: DrawSpriteGrid ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13782,10 +13791,10 @@ Label_F124: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F139: +DrawSpriteGrid: ldy #$00 ; CPU:$F139 PRG:3139 A0 00 ; ----------------------------------------------------------------------------- -; Routine: Label_F13B +; Routine: DrawSpriteGrid_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13793,12 +13802,12 @@ Label_F139: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F13B: +DrawSpriteGrid_Block: ldx Zp06 ; CPU:$F13B PRG:313B A6 06 lda Zp01 ; CPU:$F13D PRG:313D A5 01 sta Zp09 ; CPU:$F13F PRG:313F 85 09 ; ----------------------------------------------------------------------------- -; Routine: Label_F141 +; Routine: DrawSpriteGrid_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13806,7 +13815,7 @@ Label_F13B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F141: +DrawSpriteGrid_Block_1: lda Zp09 ; CPU:$F141 PRG:3141 A5 09 sta (Zp04),y ; CPU:$F143 PRG:3143 91 04 clc ; CPU:$F145 PRG:3145 18 @@ -13819,16 +13828,16 @@ Label_F141: sta (Zp04),y ; CPU:$F14F PRG:314F 91 04 iny ; CPU:$F151 PRG:3151 C8 dex ; CPU:$F152 PRG:3152 CA - bne Label_F141 ; CPU:$F153 PRG:3153 D0 EC + bne DrawSpriteGrid_Block_1 ; CPU:$F153 PRG:3153 D0 EC lda Zp00 ; CPU:$F155 PRG:3155 A5 00 clc ; CPU:$F157 PRG:3157 18 adc #$08 ; CPU:$F158 PRG:3158 69 08 sta Zp00 ; CPU:$F15A PRG:315A 85 00 dec Zp07 ; CPU:$F15C PRG:315C C6 07 - bne Label_F13B ; CPU:$F15E PRG:315E D0 DB + bne DrawSpriteGrid_Block ; CPU:$F15E PRG:315E D0 DB rts ; CPU:$F160 PRG:3160 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F161 +; Routine: DrawSpriteMaskedGrid ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13836,14 +13845,14 @@ Label_F141: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F161: +DrawSpriteMaskedGrid: ldy #$01 ; CPU:$F161 PRG:3161 A0 01 sty Zp0A ; CPU:$F163 PRG:3163 84 0A lda Zp08 ; CPU:$F165 PRG:3165 A5 08 sec ; CPU:$F167 PRG:3167 38 sbc Zp06 ; CPU:$F168 PRG:3168 E5 06 ; ----------------------------------------------------------------------------- -; Routine: Label_F16A +; Routine: DrawSpriteMaskedGrid_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13851,12 +13860,12 @@ Label_F161: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F16A: +DrawSpriteMaskedGrid_Block: tay ; CPU:$F16A PRG:316A A8 sta Zp0B ; CPU:$F16B PRG:316B 85 0B ldx Zp06 ; CPU:$F16D PRG:316D A6 06 ; ----------------------------------------------------------------------------- -; Routine: Label_F16F +; Routine: DrawSpriteMaskedGrid_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13864,7 +13873,7 @@ Label_F16A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F16F: +DrawSpriteMaskedGrid_Block_1: tya ; CPU:$F16F PRG:316F 98 pha ; CPU:$F170 PRG:3170 48 clc ; CPU:$F171 PRG:3171 18 @@ -13885,14 +13894,14 @@ Label_F16F: tay ; CPU:$F188 PRG:3188 A8 iny ; CPU:$F189 PRG:3189 C8 dex ; CPU:$F18A PRG:318A CA - bne Label_F16F ; CPU:$F18B PRG:318B D0 E2 + bne DrawSpriteMaskedGrid_Block_1 ; CPU:$F18B PRG:318B D0 E2 lda Zp0B ; CPU:$F18D PRG:318D A5 0B sec ; CPU:$F18F PRG:318F 38 sbc Zp06 ; CPU:$F190 PRG:3190 E5 06 - bpl Label_F16A ; CPU:$F192 PRG:3192 10 D6 + bpl DrawSpriteMaskedGrid_Block ; CPU:$F192 PRG:3192 10 D6 rts ; CPU:$F194 PRG:3194 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F195 +; Routine: HideSpriteGrid ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13900,10 +13909,10 @@ Label_F16F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F195: +HideSpriteGrid: ldy #$00 ; CPU:$F195 PRG:3195 A0 00 ; ----------------------------------------------------------------------------- -; Routine: Label_F197 +; Routine: HideSpriteGrid_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13911,13 +13920,13 @@ Label_F195: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F197: +HideSpriteGrid_Block: ldx Zp06 ; CPU:$F197 PRG:3197 A6 06 lda Zp01 ; CPU:$F199 PRG:3199 A5 01 sta Zp09 ; CPU:$F19B PRG:319B 85 09 lda #$FF ; CPU:$F19D PRG:319D A9 FF ; ----------------------------------------------------------------------------- -; Routine: Label_F19F +; Routine: HideSpriteGrid_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13925,23 +13934,23 @@ Label_F197: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F19F: +HideSpriteGrid_Block_1: sta (Zp04),y ; CPU:$F19F PRG:319F 91 04 iny ; CPU:$F1A1 PRG:31A1 C8 iny ; CPU:$F1A2 PRG:31A2 C8 iny ; CPU:$F1A3 PRG:31A3 C8 iny ; CPU:$F1A4 PRG:31A4 C8 dex ; CPU:$F1A5 PRG:31A5 CA - bne Label_F19F ; CPU:$F1A6 PRG:31A6 D0 F7 + bne HideSpriteGrid_Block_1 ; CPU:$F1A6 PRG:31A6 D0 F7 lda Zp00 ; CPU:$F1A8 PRG:31A8 A5 00 clc ; CPU:$F1AA PRG:31AA 18 adc #$08 ; CPU:$F1AB PRG:31AB 69 08 sta Zp00 ; CPU:$F1AD PRG:31AD 85 00 dec Zp07 ; CPU:$F1AF PRG:31AF C6 07 - bne Label_F197 ; CPU:$F1B1 PRG:31B1 D0 E4 + bne HideSpriteGrid_Block ; CPU:$F1B1 PRG:31B1 D0 E4 rts ; CPU:$F1B3 PRG:31B3 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F1B4 +; Routine: ClearNametable ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13949,20 +13958,20 @@ Label_F19F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F1B4: - lda $2002 ; CPU:$F1B4 PRG:31B4 AD 02 20 +ClearNametable: + lda PPUSTATUS ; CPU:$F1B4 PRG:31B4 AD 02 20 lda Zp10 ; CPU:$F1B7 PRG:31B7 A5 10 and #$FB ; CPU:$F1B9 PRG:31B9 29 FB - sta $2000 ; CPU:$F1BB PRG:31BB 8D 00 20 + sta PPUCTRL ; CPU:$F1BB PRG:31BB 8D 00 20 lda #$20 ; CPU:$F1BE PRG:31BE A9 20 - sta $2006 ; CPU:$F1C0 PRG:31C0 8D 06 20 + sta PPUADDR ; CPU:$F1C0 PRG:31C0 8D 06 20 lda #$00 ; CPU:$F1C3 PRG:31C3 A9 00 - sta $2006 ; CPU:$F1C5 PRG:31C5 8D 06 20 + sta PPUADDR ; CPU:$F1C5 PRG:31C5 8D 06 20 ldx #$04 ; CPU:$F1C8 PRG:31C8 A2 04 ldy #$00 ; CPU:$F1CA PRG:31CA A0 00 lda #$24 ; CPU:$F1CC PRG:31CC A9 24 ; ----------------------------------------------------------------------------- -; Routine: Label_F1CE +; Routine: ClearNametable_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13970,20 +13979,20 @@ Label_F1B4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F1CE: - sta $2007 ; CPU:$F1CE PRG:31CE 8D 07 20 +ClearNametable_Block: + sta PPUDATA ; CPU:$F1CE PRG:31CE 8D 07 20 dey ; CPU:$F1D1 PRG:31D1 88 - bne Label_F1CE ; CPU:$F1D2 PRG:31D2 D0 FA + bne ClearNametable_Block ; CPU:$F1D2 PRG:31D2 D0 FA dex ; CPU:$F1D4 PRG:31D4 CA - bne Label_F1CE ; CPU:$F1D5 PRG:31D5 D0 F7 + bne ClearNametable_Block ; CPU:$F1D5 PRG:31D5 D0 F7 lda #$23 ; CPU:$F1D7 PRG:31D7 A9 23 - sta $2006 ; CPU:$F1D9 PRG:31D9 8D 06 20 + sta PPUADDR ; CPU:$F1D9 PRG:31D9 8D 06 20 lda #$C0 ; CPU:$F1DC PRG:31DC A9 C0 - sta $2006 ; CPU:$F1DE PRG:31DE 8D 06 20 + sta PPUADDR ; CPU:$F1DE PRG:31DE 8D 06 20 ldy #$40 ; CPU:$F1E1 PRG:31E1 A0 40 lda #$00 ; CPU:$F1E3 PRG:31E3 A9 00 ; ----------------------------------------------------------------------------- -; Routine: Label_F1E5 +; Routine: ClearNametable_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13991,13 +14000,13 @@ Label_F1CE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F1E5: - sta $2007 ; CPU:$F1E5 PRG:31E5 8D 07 20 +ClearNametable_Block_1: + sta PPUDATA ; CPU:$F1E5 PRG:31E5 8D 07 20 dey ; CPU:$F1E8 PRG:31E8 88 - bne Label_F1E5 ; CPU:$F1E9 PRG:31E9 D0 FA + bne ClearNametable_Block_1 ; CPU:$F1E9 PRG:31E9 D0 FA rts ; CPU:$F1EB PRG:31EB 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F1EC +; Routine: FlushPpuBuffer_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14005,21 +14014,21 @@ Label_F1E5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F1EC: - sta $2006 ; CPU:$F1EC PRG:31EC 8D 06 20 +FlushPpuBuffer_Block: + sta PPUADDR ; CPU:$F1EC PRG:31EC 8D 06 20 iny ; CPU:$F1EF PRG:31EF C8 lda (Zp00),y ; CPU:$F1F0 PRG:31F0 B1 00 - sta $2006 ; CPU:$F1F2 PRG:31F2 8D 06 20 + sta PPUADDR ; CPU:$F1F2 PRG:31F2 8D 06 20 iny ; CPU:$F1F5 PRG:31F5 C8 lda (Zp00),y ; CPU:$F1F6 PRG:31F6 B1 00 asl a ; CPU:$F1F8 PRG:31F8 0A pha ; CPU:$F1F9 PRG:31F9 48 lda Zp10 ; CPU:$F1FA PRG:31FA A5 10 ora #$04 ; CPU:$F1FC PRG:31FC 09 04 - bcs Label_F202 ; CPU:$F1FE PRG:31FE B0 02 + bcs FlushPpuBuffer_Block_1 ; CPU:$F1FE PRG:31FE B0 02 and #$FB ; CPU:$F200 PRG:3200 29 FB ; ----------------------------------------------------------------------------- -; Routine: Label_F202 +; Routine: FlushPpuBuffer_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14027,16 +14036,16 @@ Label_F1EC: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F202: - sta $2000 ; CPU:$F202 PRG:3202 8D 00 20 +FlushPpuBuffer_Block_1: + sta PPUCTRL ; CPU:$F202 PRG:3202 8D 00 20 sta Zp10 ; CPU:$F205 PRG:3205 85 10 pla ; CPU:$F207 PRG:3207 68 asl a ; CPU:$F208 PRG:3208 0A - bcc Label_F20E ; CPU:$F209 PRG:3209 90 03 + bcc FlushPpuBuffer_Block_2 ; CPU:$F209 PRG:3209 90 03 ora #$02 ; CPU:$F20B PRG:320B 09 02 iny ; CPU:$F20D PRG:320D C8 ; ----------------------------------------------------------------------------- -; Routine: Label_F20E +; Routine: FlushPpuBuffer_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14044,12 +14053,12 @@ Label_F202: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F20E: +FlushPpuBuffer_Block_2: lsr a ; CPU:$F20E PRG:320E 4A lsr a ; CPU:$F20F PRG:320F 4A tax ; CPU:$F210 PRG:3210 AA ; ----------------------------------------------------------------------------- -; Routine: Label_F211 +; Routine: FlushPpuBuffer_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14057,11 +14066,11 @@ Label_F20E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F211: - bcs Label_F214 ; CPU:$F211 PRG:3211 B0 01 +FlushPpuBuffer_Block_3: + bcs FlushPpuBuffer_Block_4 ; CPU:$F211 PRG:3211 B0 01 iny ; CPU:$F213 PRG:3213 C8 ; ----------------------------------------------------------------------------- -; Routine: Label_F214 +; Routine: FlushPpuBuffer_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14069,11 +14078,11 @@ Label_F211: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F214: +FlushPpuBuffer_Block_4: lda (Zp00),y ; CPU:$F214 PRG:3214 B1 00 - sta $2007 ; CPU:$F216 PRG:3216 8D 07 20 + sta PPUDATA ; CPU:$F216 PRG:3216 8D 07 20 dex ; CPU:$F219 PRG:3219 CA - bne Label_F211 ; CPU:$F21A PRG:321A D0 F5 + bne FlushPpuBuffer_Block_3 ; CPU:$F21A PRG:321A D0 F5 sec ; CPU:$F21C PRG:321C 38 tya ; CPU:$F21D PRG:321D 98 adc Zp00 ; CPU:$F21E PRG:321E 65 00 @@ -14082,7 +14091,7 @@ Label_F214: adc Zp01 ; CPU:$F224 PRG:3224 65 01 sta Zp01 ; CPU:$F226 PRG:3226 85 01 ; ----------------------------------------------------------------------------- -; Routine: Label_F228 +; Routine: FlushPpuBuffer ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14090,18 +14099,18 @@ Label_F214: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F228: - ldx $2002 ; CPU:$F228 PRG:3228 AE 02 20 +FlushPpuBuffer: + ldx PPUSTATUS ; CPU:$F228 PRG:3228 AE 02 20 ldy #$00 ; CPU:$F22B PRG:322B A0 00 lda (Zp00),y ; CPU:$F22D PRG:322D B1 00 - bne Label_F1EC ; CPU:$F22F PRG:322F D0 BB + bne FlushPpuBuffer_Block ; CPU:$F22F PRG:322F D0 BB lda Zp12 ; CPU:$F231 PRG:3231 A5 12 - sta $2005 ; CPU:$F233 PRG:3233 8D 05 20 + sta PPUSCROLL ; CPU:$F233 PRG:3233 8D 05 20 lda Zp13 ; CPU:$F236 PRG:3236 A5 13 - sta $2005 ; CPU:$F238 PRG:3238 8D 05 20 + sta PPUSCROLL ; CPU:$F238 PRG:3238 8D 05 20 rts ; CPU:$F23B PRG:323B 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F23C +; Routine: DrawLevelBlocks ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14109,11 +14118,11 @@ Label_F228: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F23C: +DrawLevelBlocks: cld ; CPU:$F23C PRG:323C D8 lda #$04 ; CPU:$F23D PRG:323D A9 04 ; ----------------------------------------------------------------------------- -; Routine: Label_F23F +; Routine: DrawLevelBlocks_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14121,14 +14130,14 @@ Label_F23C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F23F: +DrawLevelBlocks_Block: lsr Zp00 ; CPU:$F23F PRG:323F 46 00 - bcc Label_F248 ; CPU:$F241 PRG:3241 90 05 + bcc DrawLevelBlocks_Block_1 ; CPU:$F241 PRG:3241 90 05 pha ; CPU:$F243 PRG:3243 48 jsr $F24E ; CPU:$F244 PRG:3244 20 4E F2 pla ; CPU:$F247 PRG:3247 68 ; ----------------------------------------------------------------------------- -; Routine: Label_F248 +; Routine: DrawLevelBlocks_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14136,13 +14145,13 @@ Label_F23F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F248: +DrawLevelBlocks_Block_1: clc ; CPU:$F248 PRG:3248 18 sbc #$00 ; CPU:$F249 PRG:3249 E9 00 - bpl Label_F23F ; CPU:$F24B PRG:324B 10 F2 + bpl DrawLevelBlocks_Block ; CPU:$F24B PRG:324B 10 F2 rts ; CPU:$F24D PRG:324D 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F24E +; Routine: DrawLevelBlock ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14150,7 +14159,7 @@ Label_F248: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F24E: +DrawLevelBlock: asl a ; CPU:$F24E PRG:324E 0A asl a ; CPU:$F24F PRG:324F 0A tay ; CPU:$F250 PRG:3250 A8 @@ -14183,7 +14192,7 @@ Label_F24E: dex ; CPU:$F28C PRG:328C CA clc ; CPU:$F28D PRG:328D 18 ; ----------------------------------------------------------------------------- -; Routine: Label_F28E +; Routine: DrawLevelBlock_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14191,13 +14200,13 @@ Label_F24E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F28E: - lda a:$0020,y ; CPU:$F28E PRG:328E B9 20 00 +DrawLevelBlock_Block: + lda a:Zp20,y ; CPU:$F28E PRG:328E B9 20 00 and #$0F ; CPU:$F291 PRG:3291 29 0F - beq Label_F296 ; CPU:$F293 PRG:3293 F0 01 + beq DrawLevelBlock_Block_1 ; CPU:$F293 PRG:3293 F0 01 clc ; CPU:$F295 PRG:3295 18 ; ----------------------------------------------------------------------------- -; Routine: Label_F296 +; Routine: DrawLevelBlock_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14205,11 +14214,11 @@ Label_F28E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F296: - bcc Label_F29A ; CPU:$F296 PRG:3296 90 02 +DrawLevelBlock_Block_1: + bcc DrawLevelBlock_Block_2 ; CPU:$F296 PRG:3296 90 02 lda #$24 ; CPU:$F298 PRG:3298 A9 24 ; ----------------------------------------------------------------------------- -; Routine: Label_F29A +; Routine: DrawLevelBlock_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14217,12 +14226,12 @@ Label_F296: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F29A: +DrawLevelBlock_Block_2: sta $0331,x ; CPU:$F29A PRG:329A 9D 31 03 dex ; CPU:$F29D PRG:329D CA dec Zp02 ; CPU:$F29E PRG:329E C6 02 - beq Label_F2C4 ; CPU:$F2A0 PRG:32A0 F0 22 - lda a:$0020,y ; CPU:$F2A2 PRG:32A2 B9 20 00 + beq DrawLevelBlock_Block_6 ; CPU:$F2A0 PRG:32A0 F0 22 + lda a:Zp20,y ; CPU:$F2A2 PRG:32A2 B9 20 00 and #$F0 ; CPU:$F2A5 PRG:32A5 29 F0 php ; CPU:$F2A7 PRG:32A7 08 lsr a ; CPU:$F2A8 PRG:32A8 4A @@ -14230,10 +14239,10 @@ Label_F29A: lsr a ; CPU:$F2AA PRG:32AA 4A lsr a ; CPU:$F2AB PRG:32AB 4A plp ; CPU:$F2AC PRG:32AC 28 - beq Label_F2B0 ; CPU:$F2AD PRG:32AD F0 01 + beq DrawLevelBlock_Block_3 ; CPU:$F2AD PRG:32AD F0 01 clc ; CPU:$F2AF PRG:32AF 18 ; ----------------------------------------------------------------------------- -; Routine: Label_F2B0 +; Routine: DrawLevelBlock_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14241,11 +14250,11 @@ Label_F29A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F2B0: - bcc Label_F2B4 ; CPU:$F2B0 PRG:32B0 90 02 +DrawLevelBlock_Block_3: + bcc DrawLevelBlock_Block_4 ; CPU:$F2B0 PRG:32B0 90 02 lda #$24 ; CPU:$F2B2 PRG:32B2 A9 24 ; ----------------------------------------------------------------------------- -; Routine: Label_F2B4 +; Routine: DrawLevelBlock_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14253,14 +14262,14 @@ Label_F2B0: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F2B4: +DrawLevelBlock_Block_4: sta $0331,x ; CPU:$F2B4 PRG:32B4 9D 31 03 lda Zp03 ; CPU:$F2B7 PRG:32B7 A5 03 and #$01 ; CPU:$F2B9 PRG:32B9 29 01 - beq Label_F2BE ; CPU:$F2BB PRG:32BB F0 01 + beq DrawLevelBlock_Block_5 ; CPU:$F2BB PRG:32BB F0 01 sec ; CPU:$F2BD PRG:32BD 38 ; ----------------------------------------------------------------------------- -; Routine: Label_F2BE +; Routine: DrawLevelBlock_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14268,13 +14277,13 @@ Label_F2B4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F2BE: +DrawLevelBlock_Block_5: dey ; CPU:$F2BE PRG:32BE 88 dex ; CPU:$F2BF PRG:32BF CA dec Zp02 ; CPU:$F2C0 PRG:32C0 C6 02 - bne Label_F28E ; CPU:$F2C2 PRG:32C2 D0 CA + bne DrawLevelBlock_Block ; CPU:$F2C2 PRG:32C2 D0 CA ; ----------------------------------------------------------------------------- -; Routine: Label_F2C4 +; Routine: DrawLevelBlock_Block_6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14282,18 +14291,18 @@ Label_F2BE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F2C4: +DrawLevelBlock_Block_6: lda Zp03 ; CPU:$F2C4 PRG:32C4 A5 03 and #$10 ; CPU:$F2C6 PRG:32C6 29 10 - beq Label_F2D6 ; CPU:$F2C8 PRG:32C8 F0 0C + beq DrawLevelBlock_Block_7 ; CPU:$F2C8 PRG:32C8 F0 0C inx ; CPU:$F2CA PRG:32CA E8 ldy Zp01 ; CPU:$F2CB PRG:32CB A4 01 clc ; CPU:$F2CD PRG:32CD 18 - lda a:$0020,y ; CPU:$F2CE PRG:32CE B9 20 00 + lda a:Zp20,y ; CPU:$F2CE PRG:32CE B9 20 00 adc #$37 ; CPU:$F2D1 PRG:32D1 69 37 sta $0331,x ; CPU:$F2D3 PRG:32D3 9D 31 03 ; ----------------------------------------------------------------------------- -; Routine: Label_F2D6 +; Routine: DrawLevelBlock_Block_7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14301,10 +14310,10 @@ Label_F2C4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F2D6: +DrawLevelBlock_Block_7: rts ; CPU:$F2D6 PRG:32D6 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F2D7 +; Routine: DrawVramBlock ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14312,7 +14321,7 @@ Label_F2D6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F2D7: +DrawVramBlock: ldy #$00 ; CPU:$F2D7 PRG:32D7 A0 00 lda (Zp02),y ; CPU:$F2D9 PRG:32D9 B1 02 and #$0F ; CPU:$F2DB PRG:32DB 29 0F @@ -14325,7 +14334,7 @@ Label_F2D7: sta Zp04 ; CPU:$F2E5 PRG:32E5 85 04 ldx $0330 ; CPU:$F2E7 PRG:32E7 AE 30 03 ; ----------------------------------------------------------------------------- -; Routine: Label_F2EA +; Routine: DrawVramBlock_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14333,7 +14342,7 @@ Label_F2D7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F2EA: +DrawVramBlock_Block: lda Zp01 ; CPU:$F2EA PRG:32EA A5 01 sta $0331,x ; CPU:$F2EC PRG:32EC 9D 31 03 jsr $F32D ; CPU:$F2EF PRG:32EF 20 2D F3 @@ -14345,7 +14354,7 @@ Label_F2EA: ora #$80 ; CPU:$F2FE PRG:32FE 09 80 sta $0331,x ; CPU:$F300 PRG:3300 9D 31 03 ; ----------------------------------------------------------------------------- -; Routine: Label_F303 +; Routine: DrawVramBlock_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14353,13 +14362,13 @@ Label_F2EA: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F303: +DrawVramBlock_Block_1: jsr $F32D ; CPU:$F303 PRG:3303 20 2D F3 iny ; CPU:$F306 PRG:3306 C8 lda (Zp02),y ; CPU:$F307 PRG:3307 B1 02 sta $0331,x ; CPU:$F309 PRG:3309 9D 31 03 dec Zp06 ; CPU:$F30C PRG:330C C6 06 - bne Label_F303 ; CPU:$F30E PRG:330E D0 F3 + bne DrawVramBlock_Block_1 ; CPU:$F30E PRG:330E D0 F3 jsr $F32D ; CPU:$F310 PRG:3310 20 2D F3 clc ; CPU:$F313 PRG:3313 18 lda #$01 ; CPU:$F314 PRG:3314 A9 01 @@ -14370,12 +14379,12 @@ Label_F303: sta Zp01 ; CPU:$F31E PRG:331E 85 01 stx $0330 ; CPU:$F320 PRG:3320 8E 30 03 dec Zp05 ; CPU:$F323 PRG:3323 C6 05 - bne Label_F2EA ; CPU:$F325 PRG:3325 D0 C3 + bne DrawVramBlock_Block ; CPU:$F325 PRG:3325 D0 C3 lda #$00 ; CPU:$F327 PRG:3327 A9 00 sta $0331,x ; CPU:$F329 PRG:3329 9D 31 03 rts ; CPU:$F32C PRG:332C 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F32D +; Routine: AdvancePpuBufferWrite ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14383,11 +14392,11 @@ Label_F303: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F32D: +AdvancePpuBufferWrite: inx ; CPU:$F32D PRG:332D E8 txa ; CPU:$F32E PRG:332E 8A ; ----------------------------------------------------------------------------- -; Routine: Label_F32F +; Routine: CheckPpuBufferOverflow ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14395,16 +14404,16 @@ Label_F32D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F32F: +CheckPpuBufferOverflow: cmp #$3F ; CPU:$F32F PRG:332F C9 3F - bcc Label_F33D ; CPU:$F331 PRG:3331 90 0A + bcc CheckPpuBufferOverflow_Block ; CPU:$F331 PRG:3331 90 0A ldx $0330 ; CPU:$F333 PRG:3333 AE 30 03 lda #$00 ; CPU:$F336 PRG:3336 A9 00 sta $0331,x ; CPU:$F338 PRG:3338 9D 31 03 pla ; CPU:$F33B PRG:333B 68 pla ; CPU:$F33C PRG:333C 68 ; ----------------------------------------------------------------------------- -; Routine: Label_F33D +; Routine: CheckPpuBufferOverflow_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14412,10 +14421,10 @@ Label_F32F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F33D: +CheckPpuBufferOverflow_Block: rts ; CPU:$F33D PRG:333D 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F33E +; Routine: SubtractBcdValue ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14423,11 +14432,11 @@ Label_F33D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F33E: +SubtractBcdValue: ldx #$FF ; CPU:$F33E PRG:333E A2 FF - bne Label_F344 ; CPU:$F340 PRG:3340 D0 02 + bne AddBcdValue_Block ; CPU:$F340 PRG:3340 D0 02 ; ----------------------------------------------------------------------------- -; Routine: Label_F342 +; Routine: AddBcdValue ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14435,10 +14444,10 @@ Label_F33E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F342: +AddBcdValue: ldx #$00 ; CPU:$F342 PRG:3342 A2 00 ; ----------------------------------------------------------------------------- -; Routine: Label_F344 +; Routine: AddBcdValue_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14446,7 +14455,7 @@ Label_F342: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F344: +AddBcdValue_Block: stx Zp04 ; CPU:$F344 PRG:3344 86 04 ldx #$00 ; CPU:$F346 PRG:3346 A2 00 stx Zp05 ; CPU:$F348 PRG:3348 86 05 @@ -14454,10 +14463,10 @@ Label_F344: stx Zp07 ; CPU:$F34C PRG:334C 86 07 lda Zp01 ; CPU:$F34E PRG:334E A5 01 and #$08 ; CPU:$F350 PRG:3350 29 08 - bne Label_F355 ; CPU:$F352 PRG:3352 D0 01 + bne AddBcdValue_Block_1 ; CPU:$F352 PRG:3352 D0 01 inx ; CPU:$F354 PRG:3354 E8 ; ----------------------------------------------------------------------------- -; Routine: Label_F355 +; Routine: AddBcdValue_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14465,13 +14474,13 @@ Label_F344: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F355: +AddBcdValue_Block_1: lda Zp00 ; CPU:$F355 PRG:3355 A5 00 sta Zp06,x ; CPU:$F357 PRG:3357 95 06 lda Zp01 ; CPU:$F359 PRG:3359 A5 01 jmp $F35E ; CPU:$F35B PRG:335B 4C 5E F3 ; ----------------------------------------------------------------------------- -; Routine: Label_F35E +; Routine: ApplyBcdAddSub ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14479,17 +14488,17 @@ Label_F355: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F35E: +ApplyBcdAddSub: and #$07 ; CPU:$F35E PRG:335E 29 07 asl a ; CPU:$F360 PRG:3360 0A asl a ; CPU:$F361 PRG:3361 0A tax ; CPU:$F362 PRG:3362 AA lda Zp04 ; CPU:$F363 PRG:3363 A5 04 - beq Label_F38E ; CPU:$F365 PRG:3365 F0 27 + beq ApplyBcdAddSub_Block_1 ; CPU:$F365 PRG:3365 F0 27 lda Zp24,x ; CPU:$F367 PRG:3367 B5 24 - beq Label_F392 ; CPU:$F369 PRG:3369 F0 27 + beq ApplyBcdAddSub_Block_2 ; CPU:$F369 PRG:3369 F0 27 ; ----------------------------------------------------------------------------- -; Routine: Label_F36B +; Routine: ApplyBcdAddSub_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14497,7 +14506,7 @@ Label_F35E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F36B: +ApplyBcdAddSub_Block: clc ; CPU:$F36B PRG:336B 18 lda Zp27,x ; CPU:$F36C PRG:336C B5 27 sta Zp03 ; CPU:$F36E PRG:336E 85 03 @@ -14516,7 +14525,7 @@ Label_F36B: sta Zp25,x ; CPU:$F38B PRG:338B 95 25 rts ; CPU:$F38D PRG:338D 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F38E +; Routine: ApplyBcdAddSub_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14524,11 +14533,11 @@ Label_F36B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F38E: +ApplyBcdAddSub_Block_1: lda Zp24,x ; CPU:$F38E PRG:338E B5 24 - beq Label_F36B ; CPU:$F390 PRG:3390 F0 D9 + beq ApplyBcdAddSub_Block ; CPU:$F390 PRG:3390 F0 D9 ; ----------------------------------------------------------------------------- -; Routine: Label_F392 +; Routine: ApplyBcdAddSub_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14536,7 +14545,7 @@ Label_F38E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F392: +ApplyBcdAddSub_Block_2: sec ; CPU:$F392 PRG:3392 38 lda Zp27,x ; CPU:$F393 PRG:3393 B5 27 sta Zp03 ; CPU:$F395 PRG:3395 85 03 @@ -14554,13 +14563,13 @@ Label_F392: jsr $F404 ; CPU:$F3AF PRG:33AF 20 04 F4 sta Zp25,x ; CPU:$F3B2 PRG:33B2 95 25 lda Zp25,x ; CPU:$F3B4 PRG:33B4 B5 25 - bne Label_F3C0 ; CPU:$F3B6 PRG:33B6 D0 08 + bne ApplyBcdAddSub_Block_3 ; CPU:$F3B6 PRG:33B6 D0 08 lda Zp26,x ; CPU:$F3B8 PRG:33B8 B5 26 - bne Label_F3C0 ; CPU:$F3BA PRG:33BA D0 04 + bne ApplyBcdAddSub_Block_3 ; CPU:$F3BA PRG:33BA D0 04 lda Zp27,x ; CPU:$F3BC PRG:33BC B5 27 - beq Label_F3C6 ; CPU:$F3BE PRG:33BE F0 06 + beq ApplyBcdAddSub_Block_4 ; CPU:$F3BE PRG:33BE F0 06 ; ----------------------------------------------------------------------------- -; Routine: Label_F3C0 +; Routine: ApplyBcdAddSub_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14568,12 +14577,12 @@ Label_F392: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F3C0: - bcs Label_F3E2 ; CPU:$F3C0 PRG:33C0 B0 20 +ApplyBcdAddSub_Block_3: + bcs ApplyBcdAddSub_Block_5 ; CPU:$F3C0 PRG:33C0 B0 20 lda Zp24,x ; CPU:$F3C2 PRG:33C2 B5 24 eor #$FF ; CPU:$F3C4 PRG:33C4 49 FF ; ----------------------------------------------------------------------------- -; Routine: Label_F3C6 +; Routine: ApplyBcdAddSub_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14581,7 +14590,7 @@ Label_F3C0: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F3C6: +ApplyBcdAddSub_Block_4: sta Zp24,x ; CPU:$F3C6 PRG:33C6 95 24 sec ; CPU:$F3C8 PRG:33C8 38 lda #$00 ; CPU:$F3C9 PRG:33C9 A9 00 @@ -14596,7 +14605,7 @@ Label_F3C6: jsr $F404 ; CPU:$F3DD PRG:33DD 20 04 F4 sta Zp25,x ; CPU:$F3E0 PRG:33E0 95 25 ; ----------------------------------------------------------------------------- -; Routine: Label_F3E2 +; Routine: ApplyBcdAddSub_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14604,10 +14613,10 @@ Label_F3C6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F3E2: +ApplyBcdAddSub_Block_5: rts ; CPU:$F3E2 PRG:33E2 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F3E3 +; Routine: AddBcdNibble ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14615,14 +14624,14 @@ Label_F3E2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F3E3: +AddBcdNibble: jsr $F426 ; CPU:$F3E3 PRG:33E3 20 26 F4 adc Zp01 ; CPU:$F3E6 PRG:33E6 65 01 cmp #$0A ; CPU:$F3E8 PRG:33E8 C9 0A - bcc Label_F3EE ; CPU:$F3EA PRG:33EA 90 02 + bcc AddBcdNibble_Block ; CPU:$F3EA PRG:33EA 90 02 adc #$05 ; CPU:$F3EC PRG:33EC 69 05 ; ----------------------------------------------------------------------------- -; Routine: Label_F3EE +; Routine: AddBcdNibble_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14630,16 +14639,16 @@ Label_F3E3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F3EE: +AddBcdNibble_Block: clc ; CPU:$F3EE PRG:33EE 18 adc Zp02 ; CPU:$F3EF PRG:33EF 65 02 sta Zp02 ; CPU:$F3F1 PRG:33F1 85 02 lda Zp03 ; CPU:$F3F3 PRG:33F3 A5 03 and #$F0 ; CPU:$F3F5 PRG:33F5 29 F0 adc Zp02 ; CPU:$F3F7 PRG:33F7 65 02 - bcc Label_F3FF ; CPU:$F3F9 PRG:33F9 90 04 + bcc AddBcdNibble_Block_2 ; CPU:$F3F9 PRG:33F9 90 04 ; ----------------------------------------------------------------------------- -; Routine: Label_F3FB +; Routine: AddBcdNibble_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14647,12 +14656,12 @@ Label_F3EE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F3FB: +AddBcdNibble_Block_1: adc #$5F ; CPU:$F3FB PRG:33FB 69 5F sec ; CPU:$F3FD PRG:33FD 38 rts ; CPU:$F3FE PRG:33FE 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F3FF +; Routine: AddBcdNibble_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14660,12 +14669,12 @@ Label_F3FB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F3FF: +AddBcdNibble_Block_2: cmp #$A0 ; CPU:$F3FF PRG:33FF C9 A0 - bcs Label_F3FB ; CPU:$F401 PRG:3401 B0 F8 + bcs AddBcdNibble_Block_1 ; CPU:$F401 PRG:3401 B0 F8 rts ; CPU:$F403 PRG:3403 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F404 +; Routine: SubtractBcdNibble ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14673,18 +14682,18 @@ Label_F3FF: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F404: +SubtractBcdNibble: jsr $F426 ; CPU:$F404 PRG:3404 20 26 F4 sbc Zp01 ; CPU:$F407 PRG:3407 E5 01 sta Zp01 ; CPU:$F409 PRG:3409 85 01 - bcs Label_F417 ; CPU:$F40B PRG:340B B0 0A + bcs SubtractBcdNibble_Block ; CPU:$F40B PRG:340B B0 0A adc #$0A ; CPU:$F40D PRG:340D 69 0A sta Zp01 ; CPU:$F40F PRG:340F 85 01 lda Zp02 ; CPU:$F411 PRG:3411 A5 02 adc #$0F ; CPU:$F413 PRG:3413 69 0F sta Zp02 ; CPU:$F415 PRG:3415 85 02 ; ----------------------------------------------------------------------------- -; Routine: Label_F417 +; Routine: SubtractBcdNibble_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14692,16 +14701,16 @@ Label_F404: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F417: +SubtractBcdNibble_Block: lda Zp03 ; CPU:$F417 PRG:3417 A5 03 and #$F0 ; CPU:$F419 PRG:3419 29 F0 sec ; CPU:$F41B PRG:341B 38 sbc Zp02 ; CPU:$F41C PRG:341C E5 02 - bcs Label_F423 ; CPU:$F41E PRG:341E B0 03 + bcs SubtractBcdNibble_Block_1 ; CPU:$F41E PRG:341E B0 03 adc #$A0 ; CPU:$F420 PRG:3420 69 A0 clc ; CPU:$F422 PRG:3422 18 ; ----------------------------------------------------------------------------- -; Routine: Label_F423 +; Routine: SubtractBcdNibble_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14709,11 +14718,11 @@ Label_F417: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F423: +SubtractBcdNibble_Block_1: ora Zp01 ; CPU:$F423 PRG:3423 05 01 rts ; CPU:$F425 PRG:3425 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F426 +; Routine: SplitBcdByte ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14721,7 +14730,7 @@ Label_F423: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F426: +SplitBcdByte: pha ; CPU:$F426 PRG:3426 48 and #$0F ; CPU:$F427 PRG:3427 29 0F sta Zp01 ; CPU:$F429 PRG:3429 85 01 @@ -14732,7 +14741,7 @@ Label_F426: and #$0F ; CPU:$F432 PRG:3432 29 0F rts ; CPU:$F434 PRG:3434 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F435 +; Routine: CompareBcdValues ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14740,7 +14749,7 @@ Label_F426: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F435: +CompareBcdValues: lda #$00 ; CPU:$F435 PRG:3435 A9 00 sta Zp04 ; CPU:$F437 PRG:3437 85 04 clc ; CPU:$F439 PRG:3439 18 @@ -14756,7 +14765,7 @@ Label_F435: asl a ; CPU:$F448 PRG:3448 0A tax ; CPU:$F449 PRG:3449 AA ; ----------------------------------------------------------------------------- -; Routine: Label_F44A +; Routine: CompareBcdValues_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14764,13 +14773,13 @@ Label_F435: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F44A: - lda a:$0020,y ; CPU:$F44A PRG:344A B9 20 00 - beq Label_F4A0 ; CPU:$F44D PRG:344D F0 51 +CompareBcdValues_Block: + lda a:Zp20,y ; CPU:$F44A PRG:344A B9 20 00 + beq CompareBcdValues_Block_6 ; CPU:$F44D PRG:344D F0 51 lda Zp24,x ; CPU:$F44F PRG:344F B5 24 - beq Label_F479 ; CPU:$F451 PRG:3451 F0 26 + beq CompareBcdValues_Block_2 ; CPU:$F451 PRG:3451 F0 26 ; ----------------------------------------------------------------------------- -; Routine: Label_F453 +; Routine: CompareBcdValues_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14778,25 +14787,25 @@ Label_F44A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F453: +CompareBcdValues_Block_1: sec ; CPU:$F453 PRG:3453 38 - lda a:$0023,y ; CPU:$F454 PRG:3454 B9 23 00 + lda a:Zp23,y ; CPU:$F454 PRG:3454 B9 23 00 sta Zp03 ; CPU:$F457 PRG:3457 85 03 lda Zp27,x ; CPU:$F459 PRG:3459 B5 27 jsr $F404 ; CPU:$F45B PRG:345B 20 04 F4 - lda a:$0022,y ; CPU:$F45E PRG:345E B9 22 00 + lda a:Zp22,y ; CPU:$F45E PRG:345E B9 22 00 sta Zp03 ; CPU:$F461 PRG:3461 85 03 lda Zp26,x ; CPU:$F463 PRG:3463 B5 26 jsr $F404 ; CPU:$F465 PRG:3465 20 04 F4 - lda a:$0021,y ; CPU:$F468 PRG:3468 B9 21 00 + lda a:Zp21,y ; CPU:$F468 PRG:3468 B9 21 00 sta Zp03 ; CPU:$F46B PRG:346B 85 03 lda Zp25,x ; CPU:$F46D PRG:346D B5 25 jsr $F404 ; CPU:$F46F PRG:346F 20 04 F4 - bcs Label_F4A4 ; CPU:$F472 PRG:3472 B0 30 - lda a:$0020,y ; CPU:$F474 PRG:3474 B9 20 00 - bne Label_F4A9 ; CPU:$F477 PRG:3477 D0 30 + bcs CompareBcdValues_Block_7 ; CPU:$F472 PRG:3472 B0 30 + lda a:Zp20,y ; CPU:$F474 PRG:3474 B9 20 00 + bne CompareBcdValues_Block_8 ; CPU:$F477 PRG:3477 D0 30 ; ----------------------------------------------------------------------------- -; Routine: Label_F479 +; Routine: CompareBcdValues_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14804,12 +14813,12 @@ Label_F453: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F479: +CompareBcdValues_Block_2: lda #$FF ; CPU:$F479 PRG:3479 A9 FF sta Zp04 ; CPU:$F47B PRG:347B 85 04 sec ; CPU:$F47D PRG:347D 38 ; ----------------------------------------------------------------------------- -; Routine: Label_F47E +; Routine: CompareBcdValues_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14817,10 +14826,10 @@ Label_F479: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F47E: +CompareBcdValues_Block_3: tya ; CPU:$F47E PRG:347E 98 - bne Label_F49F ; CPU:$F47F PRG:347F D0 1E - bcc Label_F493 ; CPU:$F481 PRG:3481 90 10 + bne CompareBcdValues_Block_5 ; CPU:$F47F PRG:347F D0 1E + bcc CompareBcdValues_Block_4 ; CPU:$F481 PRG:3481 90 10 lda Zp24,x ; CPU:$F483 PRG:3483 B5 24 sta Zp20 ; CPU:$F485 PRG:3485 85 20 lda Zp25,x ; CPU:$F487 PRG:3487 B5 25 @@ -14830,7 +14839,7 @@ Label_F47E: lda Zp27,x ; CPU:$F48F PRG:348F B5 27 sta Zp23 ; CPU:$F491 PRG:3491 85 23 ; ----------------------------------------------------------------------------- -; Routine: Label_F493 +; Routine: CompareBcdValues_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14838,17 +14847,17 @@ Label_F47E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F493: +CompareBcdValues_Block_4: lda Zp00 ; CPU:$F493 PRG:3493 A5 00 and #$08 ; CPU:$F495 PRG:3495 29 08 - beq Label_F49F ; CPU:$F497 PRG:3497 F0 06 + beq CompareBcdValues_Block_5 ; CPU:$F497 PRG:3497 F0 06 dex ; CPU:$F499 PRG:3499 CA dex ; CPU:$F49A PRG:349A CA dex ; CPU:$F49B PRG:349B CA dex ; CPU:$F49C PRG:349C CA - bpl Label_F44A ; CPU:$F49D PRG:349D 10 AB + bpl CompareBcdValues_Block ; CPU:$F49D PRG:349D 10 AB ; ----------------------------------------------------------------------------- -; Routine: Label_F49F +; Routine: CompareBcdValues_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14856,10 +14865,10 @@ Label_F493: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F49F: +CompareBcdValues_Block_5: rts ; CPU:$F49F PRG:349F 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F4A0 +; Routine: CompareBcdValues_Block_6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14867,11 +14876,11 @@ Label_F49F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F4A0: +CompareBcdValues_Block_6: lda Zp24,x ; CPU:$F4A0 PRG:34A0 B5 24 - beq Label_F453 ; CPU:$F4A2 PRG:34A2 F0 AF + beq CompareBcdValues_Block_1 ; CPU:$F4A2 PRG:34A2 F0 AF ; ----------------------------------------------------------------------------- -; Routine: Label_F4A4 +; Routine: CompareBcdValues_Block_7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14879,11 +14888,11 @@ Label_F4A0: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F4A4: - lda a:$0020,y ; CPU:$F4A4 PRG:34A4 B9 20 00 - bne Label_F479 ; CPU:$F4A7 PRG:34A7 D0 D0 +CompareBcdValues_Block_7: + lda a:Zp20,y ; CPU:$F4A4 PRG:34A4 B9 20 00 + bne CompareBcdValues_Block_2 ; CPU:$F4A7 PRG:34A7 D0 D0 ; ----------------------------------------------------------------------------- -; Routine: Label_F4A9 +; Routine: CompareBcdValues_Block_8 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14891,11 +14900,11 @@ Label_F4A4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F4A9: +CompareBcdValues_Block_8: clc ; CPU:$F4A9 PRG:34A9 18 - bcc Label_F47E ; CPU:$F4AA PRG:34AA 90 D2 + bcc CompareBcdValues_Block_3 ; CPU:$F4AA PRG:34AA 90 D2 ; ----------------------------------------------------------------------------- -; Routine: Label_F4AC +; Routine: UpdateTimers ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14903,15 +14912,15 @@ Label_F4A9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F4AC: +UpdateTimers: ldx #$09 ; CPU:$F4AC PRG:34AC A2 09 dec Zp34 ; CPU:$F4AE PRG:34AE C6 34 - bpl Label_F4B8 ; CPU:$F4B0 PRG:34B0 10 06 + bpl UpdateTimers_Block ; CPU:$F4B0 PRG:34B0 10 06 lda #$0A ; CPU:$F4B2 PRG:34B2 A9 0A sta Zp34 ; CPU:$F4B4 PRG:34B4 85 34 ldx #$10 ; CPU:$F4B6 PRG:34B6 A2 10 ; ----------------------------------------------------------------------------- -; Routine: Label_F4B8 +; Routine: UpdateTimers_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14919,12 +14928,12 @@ Label_F4AC: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F4B8: +UpdateTimers_Block: lda Zp35,x ; CPU:$F4B8 PRG:34B8 B5 35 - beq Label_F4BE ; CPU:$F4BA PRG:34BA F0 02 + beq UpdateTimers_Block_1 ; CPU:$F4BA PRG:34BA F0 02 dec Zp35,x ; CPU:$F4BC PRG:34BC D6 35 ; ----------------------------------------------------------------------------- -; Routine: Label_F4BE +; Routine: UpdateTimers_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14932,12 +14941,12 @@ Label_F4B8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F4BE: +UpdateTimers_Block_1: dex ; CPU:$F4BE PRG:34BE CA - bpl Label_F4B8 ; CPU:$F4BF PRG:34BF 10 F7 + bpl UpdateTimers_Block ; CPU:$F4BF PRG:34BF 10 F7 rts ; CPU:$F4C1 PRG:34C1 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F4C2 +; Routine: QueuePpuByteWrite ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14945,7 +14954,7 @@ Label_F4BE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F4C2: +QueuePpuByteWrite: ldx $0330 ; CPU:$F4C2 PRG:34C2 AE 30 03 lda Zp01 ; CPU:$F4C5 PRG:34C5 A5 01 sta $0331,x ; CPU:$F4C7 PRG:34C7 9D 31 03 @@ -14964,7 +14973,7 @@ Label_F4C2: stx $0330 ; CPU:$F4E9 PRG:34E9 8E 30 03 rts ; CPU:$F4EC PRG:34EC 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F4ED +; Routine: UpdateRandomSeed ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14972,7 +14981,7 @@ Label_F4C2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F4ED: +UpdateRandomSeed: lda Zp18 ; CPU:$F4ED PRG:34ED A5 18 and #$02 ; CPU:$F4EF PRG:34EF 29 02 sta Zp00 ; CPU:$F4F1 PRG:34F1 85 00 @@ -14980,10 +14989,10 @@ Label_F4ED: and #$02 ; CPU:$F4F5 PRG:34F5 29 02 eor Zp00 ; CPU:$F4F7 PRG:34F7 45 00 clc ; CPU:$F4F9 PRG:34F9 18 - beq Label_F4FD ; CPU:$F4FA PRG:34FA F0 01 + beq UpdateRandomSeed_Block ; CPU:$F4FA PRG:34FA F0 01 sec ; CPU:$F4FC PRG:34FC 38 ; ----------------------------------------------------------------------------- -; Routine: Label_F4FD +; Routine: UpdateRandomSeed_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14991,7 +15000,7 @@ Label_F4ED: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F4FD: +UpdateRandomSeed_Block: ror Zp18 ; CPU:$F4FD PRG:34FD 66 18 ror Zp19 ; CPU:$F4FF PRG:34FF 66 19 ror Zp1A ; CPU:$F501 PRG:3501 66 1A @@ -15002,7 +15011,7 @@ Label_F4FD: ror Zp1F ; CPU:$F50B PRG:350B 66 1F rts ; CPU:$F50D PRG:350D 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F50E +; Routine: ReadControllers ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15010,18 +15019,18 @@ Label_F4FD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F50E: +ReadControllers: lda #$01 ; CPU:$F50E PRG:350E A9 01 - sta $4016 ; CPU:$F510 PRG:3510 8D 16 40 + sta JOY1 ; CPU:$F510 PRG:3510 8D 16 40 ldx #$00 ; CPU:$F513 PRG:3513 A2 00 lda #$00 ; CPU:$F515 PRG:3515 A9 00 - sta $4016 ; CPU:$F517 PRG:3517 8D 16 40 + sta JOY1 ; CPU:$F517 PRG:3517 8D 16 40 jsr $F522 ; CPU:$F51A PRG:351A 20 22 F5 inx ; CPU:$F51D PRG:351D E8 jsr $F522 ; CPU:$F51E PRG:351E 20 22 F5 rts ; CPU:$F521 PRG:3521 60 ; ----------------------------------------------------------------------------- -; Routine: Label_F522 +; Routine: ReadControllerShift ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15029,10 +15038,10 @@ Label_F50E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F522: +ReadControllerShift: ldy #$08 ; CPU:$F522 PRG:3522 A0 08 ; ----------------------------------------------------------------------------- -; Routine: Label_F524 +; Routine: ReadControllerShift_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15040,9 +15049,9 @@ Label_F522: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F524: +ReadControllerShift_Block: pha ; CPU:$F524 PRG:3524 48 - lda $4016,x ; CPU:$F525 PRG:3525 BD 16 40 + lda JOY1,x ; CPU:$F525 PRG:3525 BD 16 40 sta Zp00 ; CPU:$F528 PRG:3528 85 00 lsr a ; CPU:$F52A PRG:352A 4A ora Zp00 ; CPU:$F52B PRG:352B 05 00 @@ -15050,7 +15059,7 @@ Label_F524: pla ; CPU:$F52E PRG:352E 68 rol a ; CPU:$F52F PRG:352F 2A dey ; CPU:$F530 PRG:3530 88 - bne Label_F524 ; CPU:$F531 PRG:3531 D0 F1 + bne ReadControllerShift_Block ; CPU:$F531 PRG:3531 D0 F1 stx Zp00 ; CPU:$F533 PRG:3533 86 00 asl Zp00 ; CPU:$F535 PRG:3535 06 00 ldx Zp00 ; CPU:$F537 PRG:3537 A6 00 @@ -15058,12 +15067,12 @@ Label_F524: sty Zp00 ; CPU:$F53B PRG:353B 84 00 sta Zp14,x ; CPU:$F53D PRG:353D 95 14 and #$FF ; CPU:$F53F PRG:353F 29 FF - bpl Label_F549 ; CPU:$F541 PRG:3541 10 06 + bpl ReadControllerShift_Block_1 ; CPU:$F541 PRG:3541 10 06 bit Zp00 ; CPU:$F543 PRG:3543 24 00 - bpl Label_F549 ; CPU:$F545 PRG:3545 10 02 + bpl ReadControllerShift_Block_1 ; CPU:$F545 PRG:3545 10 02 and #$7F ; CPU:$F547 PRG:3547 29 7F ; ----------------------------------------------------------------------------- -; Routine: Label_F549 +; Routine: ReadControllerShift_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15071,18 +15080,18 @@ Label_F524: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F549: +ReadControllerShift_Block_1: ldy Zp15,x ; CPU:$F549 PRG:3549 B4 15 sta Zp15,x ; CPU:$F54B PRG:354B 95 15 tya ; CPU:$F54D PRG:354D 98 and #$0F ; CPU:$F54E PRG:354E 29 0F and Zp15,x ; CPU:$F550 PRG:3550 35 15 - beq Label_F55A ; CPU:$F552 PRG:3552 F0 06 + beq ReadControllerShift_Block_2 ; CPU:$F552 PRG:3552 F0 06 ora #$F0 ; CPU:$F554 PRG:3554 09 F0 and Zp15,x ; CPU:$F556 PRG:3556 35 15 sta Zp15,x ; CPU:$F558 PRG:3558 95 15 ; ----------------------------------------------------------------------------- -; Routine: Label_F55A +; Routine: ReadControllerShift_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15090,10 +15099,11 @@ Label_F549: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F55A: +ReadControllerShift_Block_2: rts ; CPU:$F55A PRG:355A 60 ; ---- data $F55B-$FA47 (1261 bytes) ---- - .byte $3F, $00, $20, $0F, $15, $2C, $12, $0F, $27, $02, $17, $0F, $30, $36, $06, $0F ; CPU:$F55B PRG:355B 3F 00 20 0F 15 2C 12 0F 27 02 17 0F 30 36 06 0F +; Music/sound data tables: note frequencies, envelope data, sequence pointers +MusicDataTable: .byte $3F, $00, $20, $0F, $15, $2C, $12, $0F, $27, $02, $17, $0F, $30, $36, $06, $0F ; CPU:$F55B PRG:355B 3F 00 20 0F 15 2C 12 0F 27 02 17 0F 30 36 06 0F .byte $30, $2C, $24, $0F, $02, $36, $16, $0F, $30, $27, $24, $0F, $16, $30, $37, $0F ; CPU:$F56B PRG:356B 30 2C 24 0F 02 36 16 0F 30 27 24 0F 16 30 37 0F .byte $06, $27, $02, $23, $C0, $48, $FF, $23, $C8, $03, $55, $AA, $22, $23, $CD, $43 ; CPU:$F57B PRG:357B 06 27 02 23 C0 48 FF 23 C8 03 55 AA 22 23 CD 43 .byte $0F, $20, $2C, $C7, $3F, $20, $81, $84, $50, $51, $52, $53, $20, $82, $84, $54 ; CPU:$F58B PRG:358B 0F 20 2C C7 3F 20 81 84 50 51 52 53 20 82 84 54 @@ -15173,7 +15183,7 @@ Label_F55A: .byte $94, $0A, $25, $16, $2A, $26, $27, $28, $29, $2A, $15, $2D, $20, $B4, $0A, $2B ; CPU:$FA2B PRG:3A2B 94 0A 25 16 2A 26 27 28 29 2A 15 2D 20 B4 0A 2B .byte $24, $2C, $24, $24, $24, $24, $2C, $24, $2F, $00, $FF, $FF, $FF ; CPU:$FA3B PRG:3A3B 24 2C 24 24 24 24 2C 24 2F 00 FF FF FF ; ----------------------------------------------------------------------------- -; Routine: Label_FA48 +; Routine: UpdateSoundEngine ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15181,9 +15191,9 @@ Label_F55A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FA48: +UpdateSoundEngine: lda #$C0 ; CPU:$FA48 PRG:3A48 A9 C0 - sta $4017 ; CPU:$FA4A PRG:3A4A 8D 17 40 + sta JOY2 ; CPU:$FA4A PRG:3A4A 8D 17 40 jsr $FBF2 ; CPU:$FA4D PRG:3A4D 20 F2 FB ldx #$00 ; CPU:$FA50 PRG:3A50 A2 00 stx ZpFF ; CPU:$FA52 PRG:3A52 86 FF @@ -15191,11 +15201,11 @@ Label_FA48: stx ZpFD ; CPU:$FA56 PRG:3A56 86 FD lda $06F0 ; CPU:$FA58 PRG:3A58 AD F0 06 cmp #$90 ; CPU:$FA5B PRG:3A5B C9 90 - bcs Label_FA64 ; CPU:$FA5D PRG:3A5D B0 05 + bcs UpdateSoundEngine_Block ; CPU:$FA5D PRG:3A5D B0 05 ldx #$00 ; CPU:$FA5F PRG:3A5F A2 00 stx $06F1 ; CPU:$FA61 PRG:3A61 8E F1 06 ; ----------------------------------------------------------------------------- -; Routine: Label_FA64 +; Routine: UpdateSoundEngine_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15203,12 +15213,12 @@ Label_FA48: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FA64: +UpdateSoundEngine_Block: cmp #$D8 ; CPU:$FA64 PRG:3A64 C9 D8 - bcc Label_FA6B ; CPU:$FA66 PRG:3A66 90 03 + bcc UpdateSoundEngine_Block_1 ; CPU:$FA66 PRG:3A66 90 03 inc $06F1 ; CPU:$FA68 PRG:3A68 EE F1 06 ; ----------------------------------------------------------------------------- -; Routine: Label_FA6B +; Routine: UpdateSoundEngine_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15216,7 +15226,7 @@ Label_FA64: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FA6B: +UpdateSoundEngine_Block_1: tay ; CPU:$FA6B PRG:3A6B A8 lsr a ; CPU:$FA6C PRG:3A6C 4A lsr a ; CPU:$FA6D PRG:3A6D 4A @@ -15227,12 +15237,12 @@ Label_FA6B: sta Zp00 ; CPU:$FA72 PRG:3A72 85 00 tya ; CPU:$FA74 PRG:3A74 98 ldx $06F1 ; CPU:$FA75 PRG:3A75 AE F1 06 - bne Label_FA7F ; CPU:$FA78 PRG:3A78 D0 05 + bne UpdateSoundEngine_Block_2 ; CPU:$FA78 PRG:3A78 D0 05 sec ; CPU:$FA7A PRG:3A7A 38 adc Zp00 ; CPU:$FA7B PRG:3A7B 65 00 - bne Label_FA82 ; CPU:$FA7D PRG:3A7D D0 03 + bne UpdateSoundEngine_Block_3 ; CPU:$FA7D PRG:3A7D D0 03 ; ----------------------------------------------------------------------------- -; Routine: Label_FA7F +; Routine: UpdateSoundEngine_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15240,11 +15250,11 @@ Label_FA6B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FA7F: +UpdateSoundEngine_Block_2: clc ; CPU:$FA7F PRG:3A7F 18 sbc Zp00 ; CPU:$FA80 PRG:3A80 E5 00 ; ----------------------------------------------------------------------------- -; Routine: Label_FA82 +; Routine: UpdateSoundEngine_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15252,11 +15262,11 @@ Label_FA7F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FA82: +UpdateSoundEngine_Block_3: sta $06F0 ; CPU:$FA82 PRG:3A82 8D F0 06 rts ; CPU:$FA85 PRG:3A85 60 ; ----------------------------------------------------------------------------- -; Routine: Label_FA86 +; Routine: FindHighestSetBit ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15264,10 +15274,10 @@ Label_FA82: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FA86: +FindHighestSetBit: ldy #$07 ; CPU:$FA86 PRG:3A86 A0 07 ; ----------------------------------------------------------------------------- -; Routine: Label_FA88 +; Routine: FindHighestSetBit_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15275,13 +15285,13 @@ Label_FA86: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FA88: +FindHighestSetBit_Block: asl a ; CPU:$FA88 PRG:3A88 0A - bcs Label_FA8E ; CPU:$FA89 PRG:3A89 B0 03 + bcs FindHighestSetBit_Block_1 ; CPU:$FA89 PRG:3A89 B0 03 dey ; CPU:$FA8B PRG:3A8B 88 - bne Label_FA88 ; CPU:$FA8C PRG:3A8C D0 FA + bne FindHighestSetBit_Block ; CPU:$FA8C PRG:3A8C D0 FA ; ----------------------------------------------------------------------------- -; Routine: Label_FA8E +; Routine: FindHighestSetBit_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15289,10 +15299,10 @@ Label_FA88: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FA8E: +FindHighestSetBit_Block_1: rts ; CPU:$FA8E PRG:3A8E 60 ; ----------------------------------------------------------------------------- -; Routine: Label_FA8F +; Routine: SubCFA8F ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15300,11 +15310,11 @@ Label_FA8E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FA8F: +SubCFA8F: sta ZpF1 ; CPU:$FA8F PRG:3A8F 85 F1 sty ZpF2 ; CPU:$FA91 PRG:3A91 84 F2 ; ----------------------------------------------------------------------------- -; Routine: Label_FA93 +; Routine: WritePulse1ControlDefault ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15312,10 +15322,10 @@ Label_FA8F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FA93: +WritePulse1ControlDefault: ldy #$7F ; CPU:$FA93 PRG:3A93 A0 7F ; ----------------------------------------------------------------------------- -; Routine: Label_FA95 +; Routine: WritePulse1Control ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15323,14 +15333,14 @@ Label_FA93: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FA95: - stx $4000 ; CPU:$FA95 PRG:3A95 8E 00 40 - sty $4001 ; CPU:$FA98 PRG:3A98 8C 01 40 +WritePulse1Control: + stx APUPULSE1CTRL ; CPU:$FA95 PRG:3A95 8E 00 40 + sty APUPULSE1SWEEP ; CPU:$FA98 PRG:3A98 8C 01 40 rts ; CPU:$FA9B PRG:3A9B 60 ; ---- data $FA9C-$FA9E (3 bytes) ---- .byte $20, $95, $FA ; CPU:$FA9C PRG:3A9C 20 95 FA ; ----------------------------------------------------------------------------- -; Routine: Label_FA9F +; Routine: WriteNoteFrequency ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15338,10 +15348,10 @@ Label_FA95: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FA9F: +WriteNoteFrequency: ldx #$00 ; CPU:$FA9F PRG:3A9F A2 00 ; ----------------------------------------------------------------------------- -; Routine: Label_FAA1 +; Routine: WriteTriangleNote_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15349,16 +15359,16 @@ Label_FA9F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FAA1: +WriteTriangleNote_Block: tay ; CPU:$FAA1 PRG:3AA1 A8 lda $FB01,y ; CPU:$FAA2 PRG:3AA2 B9 01 FB - beq Label_FAB2 ; CPU:$FAA5 PRG:3AA5 F0 0B - sta $4002,x ; CPU:$FAA7 PRG:3AA7 9D 02 40 + beq WriteTriangleNote_Block_1 ; CPU:$FAA5 PRG:3AA5 F0 0B + sta APUPULSE1TIMERLO,x ; CPU:$FAA7 PRG:3AA7 9D 02 40 lda $FB00,y ; CPU:$FAAA PRG:3AAA B9 00 FB ora #$08 ; CPU:$FAAD PRG:3AAD 09 08 - sta $4003,x ; CPU:$FAAF PRG:3AAF 9D 03 40 + sta APUPULSE1TIMERHI,x ; CPU:$FAAF PRG:3AAF 9D 03 40 ; ----------------------------------------------------------------------------- -; Routine: Label_FAB2 +; Routine: WriteTriangleNote_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15366,10 +15376,10 @@ Label_FAA1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FAB2: +WriteTriangleNote_Block_1: rts ; CPU:$FAB2 PRG:3AB2 60 ; ----------------------------------------------------------------------------- -; Routine: Label_FAB3 +; Routine: WritePulse2Note ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15377,12 +15387,12 @@ Label_FAB2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FAB3: - sty $4005 ; CPU:$FAB3 PRG:3AB3 8C 05 40 +WritePulse2Note: + sty APUPULSE2SWEEP ; CPU:$FAB3 PRG:3AB3 8C 05 40 ldx #$04 ; CPU:$FAB6 PRG:3AB6 A2 04 - bne Label_FAA1 ; CPU:$FAB8 PRG:3AB8 D0 E7 + bne WriteTriangleNote_Block ; CPU:$FAB8 PRG:3AB8 D0 E7 ; ----------------------------------------------------------------------------- -; Routine: Label_FABA +; Routine: WriteTriangleNote ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15390,14 +15400,14 @@ Label_FAB3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FABA: - sta $4008 ; CPU:$FABA PRG:3ABA 8D 08 40 +WriteTriangleNote: + sta APUTRIANGLECTRL ; CPU:$FABA PRG:3ABA 8D 08 40 txa ; CPU:$FABD PRG:3ABD 8A and #$3E ; CPU:$FABE PRG:3ABE 29 3E ldx #$08 ; CPU:$FAC0 PRG:3AC0 A2 08 - bne Label_FAA1 ; CPU:$FAC2 PRG:3AC2 D0 DD + bne WriteTriangleNote_Block ; CPU:$FAC2 PRG:3AC2 D0 DD ; ----------------------------------------------------------------------------- -; Routine: Label_FAC4 +; Routine: DecodeNotePeriod ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15405,7 +15415,7 @@ Label_FABA: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FAC4: +DecodeNotePeriod: tax ; CPU:$FAC4 PRG:3AC4 AA ror a ; CPU:$FAC5 PRG:3AC5 6A txa ; CPU:$FAC6 PRG:3AC6 8A @@ -15413,7 +15423,7 @@ Label_FAC4: rol a ; CPU:$FAC8 PRG:3AC8 2A rol a ; CPU:$FAC9 PRG:3AC9 2A ; ----------------------------------------------------------------------------- -; Routine: Label_FACA +; Routine: LookupNotePeriod ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15421,7 +15431,7 @@ Label_FAC4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FACA: +LookupNotePeriod: and #$07 ; CPU:$FACA PRG:3ACA 29 07 clc ; CPU:$FACC PRG:3ACC 18 adc $068D ; CPU:$FACD PRG:3ACD 6D 8D 06 @@ -15429,7 +15439,7 @@ Label_FACA: lda $FB4C,y ; CPU:$FAD1 PRG:3AD1 B9 4C FB rts ; CPU:$FAD4 PRG:3AD4 60 ; ----------------------------------------------------------------------------- -; Routine: Label_FAD5 +; Routine: SubCFAD5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15437,11 +15447,11 @@ Label_FACA: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FAD5: +SubCFAD5: tya ; CPU:$FAD5 PRG:3AD5 98 lsr a ; CPU:$FAD6 PRG:3AD6 4A ; ----------------------------------------------------------------------------- -; Routine: Label_FAD7 +; Routine: SubCFAD7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15449,7 +15459,7 @@ Label_FAD5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FAD7: +SubCFAD7: lsr a ; CPU:$FAD7 PRG:3AD7 4A lsr a ; CPU:$FAD8 PRG:3AD8 4A sta Zp00 ; CPU:$FAD9 PRG:3AD9 85 00 @@ -15458,7 +15468,7 @@ Label_FAD7: sbc Zp00 ; CPU:$FADD PRG:3ADD E5 00 rts ; CPU:$FADF PRG:3ADF 60 ; ----------------------------------------------------------------------------- -; Routine: Label_FAE0 +; Routine: SilencePulse1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15466,9 +15476,9 @@ Label_FAD7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FAE0: +SilencePulse1: lda #$90 ; CPU:$FAE0 PRG:3AE0 A9 90 - sta $4000 ; CPU:$FAE2 PRG:3AE2 8D 00 40 + sta APUPULSE1CTRL ; CPU:$FAE2 PRG:3AE2 8D 00 40 rts ; CPU:$FAE5 PRG:3AE5 60 ; ---- data $FAE6-$FB74 (143 bytes) ---- ; referenced by `lda $FB01,y` at $FAA2 (operand $FB01 falls inside this region) @@ -15478,7 +15488,8 @@ Label_FAE0: ; referenced by `adc $FB67,x` at $FB9A (operand $FB67 falls inside this region) ; referenced by `ldy $FAF5,x` at $FC32 (operand $FAF5 falls inside this region) ; ... and 1 further references from decoded code - .byte $8D, $8D, $8C, $8C, $8B, $8C, $83, $83, $8F, $8F, $8F, $8F, $8D, $85, $84, $85 ; CPU:$FAE6 PRG:3AE6 8D 8D 8C 8C 8B 8C 83 83 8F 8F 8F 8F 8D 85 84 85 +; APU register tables: pulse/noise channel data, frequency LUTs +APUDataTable: .byte $8D, $8D, $8C, $8C, $8B, $8C, $83, $83, $8F, $8F, $8F, $8F, $8D, $85, $84, $85 ; CPU:$FAE6 PRG:3AE6 8D 8D 8C 8C 8B 8C 83 83 8F 8F 8F 8F 8D 85 84 85 .byte $7F, $85, $85, $85, $7F, $8D, $8D, $8D, $8D, $8D, $07, $F0, $00, $00, $00, $69 ; CPU:$FAF6 PRG:3AF6 7F 85 85 85 7F 8D 8D 8D 8D 8D 07 F0 00 00 00 69 .byte $00, $53, $00, $46, $00, $D4, $00, $BD, $00, $A8, $00, $9F, $00, $8D, $00, $7E ; CPU:$FB06 PRG:3B06 00 53 00 46 00 D4 00 BD 00 A8 00 9F 00 8D 00 7E .byte $01, $AB, $01, $7C, $01, $52, $01, $3F, $01, $1C, $00, $FD, $00, $EE, $00, $E1 ; CPU:$FB16 PRG:3B16 01 AB 01 7C 01 52 01 3F 01 1C 00 FD 00 EE 00 E1 @@ -15488,7 +15499,7 @@ Label_FAE0: .byte $18, $30, $60, $24, $48, $07, $0D, $1A, $34, $78, $27, $4E, $0A, $08, $05, $0A ; CPU:$FB56 PRG:3B56 18 30 60 24 48 07 0D 1A 34 78 27 4E 0A 08 05 0A .byte $09, $50, $40, $46, $4A, $50, $56, $5C, $64, $6C, $74, $7C, $88, $90, $9A ; CPU:$FB66 PRG:3B66 09 50 40 46 4A 50 56 5C 64 6C 74 7C 88 90 9A ; ----------------------------------------------------------------------------- -; Routine: Label_FB75 +; Routine: ProcessSoundCommands_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15496,13 +15507,13 @@ Label_FAE0: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FB75: +ProcessSoundCommands_Block: sta ZpF0 ; CPU:$FB75 PRG:3B75 85 F0 sta ZpFB ; CPU:$FB77 PRG:3B77 85 FB ldy #$08 ; CPU:$FB79 PRG:3B79 A0 08 jmp $FD67 ; CPU:$FB7B PRG:3B7B 4C 67 FD ; ----------------------------------------------------------------------------- -; Routine: Label_FB7E +; Routine: ProcessSoundCommands_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15510,14 +15521,14 @@ Label_FB75: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FB7E: +ProcessSoundCommands_Block_1: sty ZpF0 ; CPU:$FB7E PRG:3B7E 84 F0 lda #$71 ; CPU:$FB80 PRG:3B80 A9 71 ldy #$00 ; CPU:$FB82 PRG:3B82 A0 00 ldx #$9F ; CPU:$FB84 PRG:3B84 A2 9F jsr $FA8F ; CPU:$FB86 PRG:3B86 20 8F FA ; ----------------------------------------------------------------------------- -; Routine: Label_FB89 +; Routine: ProcessSoundCommands_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15525,21 +15536,21 @@ Label_FB7E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FB89: +ProcessSoundCommands_Block_2: ldx ZpF2 ; CPU:$FB89 PRG:3B89 A6 F2 ldy $FB67,x ; CPU:$FB8B PRG:3B8B BC 67 FB dec ZpF1 ; CPU:$FB8E PRG:3B8E C6 F1 lda ZpF1 ; CPU:$FB90 PRG:3B90 A5 F1 - beq Label_FB75 ; CPU:$FB92 PRG:3B92 F0 E1 + beq ProcessSoundCommands_Block ; CPU:$FB92 PRG:3B92 F0 E1 and #$07 ; CPU:$FB94 PRG:3B94 29 07 - bne Label_FBA0 ; CPU:$FB96 PRG:3B96 D0 08 + bne ProcessSoundCommands_Block_3 ; CPU:$FB96 PRG:3B96 D0 08 tya ; CPU:$FB98 PRG:3B98 98 lsr a ; CPU:$FB99 PRG:3B99 4A adc $FB67,x ; CPU:$FB9A PRG:3B9A 7D 67 FB tay ; CPU:$FB9D PRG:3B9D A8 - bne Label_FBA7 ; CPU:$FB9E PRG:3B9E D0 07 + bne ProcessSoundCommands_Block_4 ; CPU:$FB9E PRG:3B9E D0 07 ; ----------------------------------------------------------------------------- -; Routine: Label_FBA0 +; Routine: ProcessSoundCommands_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15547,13 +15558,13 @@ Label_FB89: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FBA0: +ProcessSoundCommands_Block_3: and #$03 ; CPU:$FBA0 PRG:3BA0 29 03 - bne Label_FBB2 ; CPU:$FBA2 PRG:3BA2 D0 0E + bne ProcessSoundCommands_Block_6 ; CPU:$FBA2 PRG:3BA2 D0 0E inc ZpF2 ; CPU:$FBA4 PRG:3BA4 E6 F2 clc ; CPU:$FBA6 PRG:3BA6 18 ; ----------------------------------------------------------------------------- -; Routine: Label_FBA7 +; Routine: ProcessSoundCommands_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15561,13 +15572,13 @@ Label_FBA0: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FBA7: - sty $4002 ; CPU:$FBA7 PRG:3BA7 8C 02 40 +ProcessSoundCommands_Block_4: + sty APUPULSE1TIMERLO ; CPU:$FBA7 PRG:3BA7 8C 02 40 ldy #$28 ; CPU:$FBAA PRG:3BAA A0 28 - bcc Label_FBAF ; CPU:$FBAC PRG:3BAC 90 01 + bcc ProcessSoundCommands_Block_5 ; CPU:$FBAC PRG:3BAC 90 01 iny ; CPU:$FBAE PRG:3BAE C8 ; ----------------------------------------------------------------------------- -; Routine: Label_FBAF +; Routine: ProcessSoundCommands_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15575,10 +15586,10 @@ Label_FBA7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FBAF: - sty $4003 ; CPU:$FBAF PRG:3BAF 8C 03 40 +ProcessSoundCommands_Block_5: + sty APUPULSE1TIMERHI ; CPU:$FBAF PRG:3BAF 8C 03 40 ; ----------------------------------------------------------------------------- -; Routine: Label_FBB2 +; Routine: ProcessSoundCommands_Block_6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15586,11 +15597,11 @@ Label_FBAF: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FBB2: +ProcessSoundCommands_Block_6: lda #$00 ; CPU:$FBB2 PRG:3BB2 A9 00 jmp $FE00 ; CPU:$FBB4 PRG:3BB4 4C 00 FE ; ----------------------------------------------------------------------------- -; Routine: Label_FBB7 +; Routine: ProcessSoundCommands_Block_7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15598,14 +15609,14 @@ Label_FBB2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FBB7: +ProcessSoundCommands_Block_7: sty ZpF0 ; CPU:$FBB7 PRG:3BB7 84 F0 lda #$54 ; CPU:$FBB9 PRG:3BB9 A9 54 ldy #$6A ; CPU:$FBBB PRG:3BBB A0 6A ldx #$9C ; CPU:$FBBD PRG:3BBD A2 9C jsr $FA8F ; CPU:$FBBF PRG:3BBF 20 8F FA ; ----------------------------------------------------------------------------- -; Routine: Label_FBC2 +; Routine: ProcessSoundCommands_Block_8 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15613,18 +15624,18 @@ Label_FBB7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FBC2: +ProcessSoundCommands_Block_8: ldy ZpF2 ; CPU:$FBC2 PRG:3BC2 A4 F2 lda ZpF1 ; CPU:$FBC4 PRG:3BC4 A5 F1 and #$03 ; CPU:$FBC6 PRG:3BC6 29 03 - beq Label_FBD4 ; CPU:$FBC8 PRG:3BC8 F0 0A + beq ProcessSoundCommands_Block_9 ; CPU:$FBC8 PRG:3BC8 F0 0A cmp #$03 ; CPU:$FBCA PRG:3BCA C9 03 - bne Label_FBD9 ; CPU:$FBCC PRG:3BCC D0 0B + bne ProcessSoundCommands_Block_10 ; CPU:$FBCC PRG:3BCC D0 0B jsr $FAD5 ; CPU:$FBCE PRG:3BCE 20 D5 FA sta ZpF2 ; CPU:$FBD1 PRG:3BD1 85 F2 tay ; CPU:$FBD3 PRG:3BD3 A8 ; ----------------------------------------------------------------------------- -; Routine: Label_FBD4 +; Routine: ProcessSoundCommands_Block_9 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15632,13 +15643,13 @@ Label_FBC2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FBD4: +ProcessSoundCommands_Block_9: tya ; CPU:$FBD4 PRG:3BD4 98 lsr a ; CPU:$FBD5 PRG:3BD5 4A adc ZpF2 ; CPU:$FBD6 PRG:3BD6 65 F2 tay ; CPU:$FBD8 PRG:3BD8 A8 ; ----------------------------------------------------------------------------- -; Routine: Label_FBD9 +; Routine: ProcessSoundCommands_Block_10 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15646,23 +15657,23 @@ Label_FBD4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FBD9: +ProcessSoundCommands_Block_10: tya ; CPU:$FBD9 PRG:3BD9 98 rol a ; CPU:$FBDA PRG:3BDA 2A rol a ; CPU:$FBDB PRG:3BDB 2A rol a ; CPU:$FBDC PRG:3BDC 2A - sta $4002 ; CPU:$FBDD PRG:3BDD 8D 02 40 + sta APUPULSE1TIMERLO ; CPU:$FBDD PRG:3BDD 8D 02 40 rol a ; CPU:$FBE0 PRG:3BE0 2A - sta $4003 ; CPU:$FBE1 PRG:3BE1 8D 03 40 + sta APUPULSE1TIMERHI ; CPU:$FBE1 PRG:3BE1 8D 03 40 lda ZpF1 ; CPU:$FBE4 PRG:3BE4 A5 F1 cmp #$18 ; CPU:$FBE6 PRG:3BE6 C9 18 - bcs Label_FC44 ; CPU:$FBE8 PRG:3BE8 B0 5A + bcs ProcessSoundCommands_Block_16 ; CPU:$FBE8 PRG:3BE8 B0 5A lsr a ; CPU:$FBEA PRG:3BEA 4A ora #$90 ; CPU:$FBEB PRG:3BEB 09 90 - sta $4000 ; CPU:$FBED PRG:3BED 8D 00 40 - bne Label_FC44 ; CPU:$FBF0 PRG:3BF0 D0 52 + sta APUPULSE1CTRL ; CPU:$FBED PRG:3BED 8D 00 40 + bne ProcessSoundCommands_Block_16 ; CPU:$FBF0 PRG:3BF0 D0 52 ; ----------------------------------------------------------------------------- -; Routine: Label_FBF2 +; Routine: ProcessSoundCommands ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15670,29 +15681,29 @@ Label_FBD9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FBF2: +ProcessSoundCommands: ldy ZpFF ; CPU:$FBF2 PRG:3BF2 A4 FF lda ZpF0 ; CPU:$FBF4 PRG:3BF4 A5 F0 lsr a ; CPU:$FBF6 PRG:3BF6 4A - bcs Label_FB89 ; CPU:$FBF7 PRG:3BF7 B0 90 + bcs ProcessSoundCommands_Block_2 ; CPU:$FBF7 PRG:3BF7 B0 90 lsr ZpFF ; CPU:$FBF9 PRG:3BF9 46 FF - bcs Label_FB7E ; CPU:$FBFB PRG:3BFB B0 81 + bcs ProcessSoundCommands_Block_1 ; CPU:$FBFB PRG:3BFB B0 81 ldx ZpFA ; CPU:$FBFD PRG:3BFD A6 FA - bne Label_FC4B ; CPU:$FBFF PRG:3BFF D0 4A + bne ProcessSoundCommands_Block_17 ; CPU:$FBFF PRG:3BFF D0 4A lsr a ; CPU:$FC01 PRG:3C01 4A - bcs Label_FBC2 ; CPU:$FC02 PRG:3C02 B0 BE + bcs ProcessSoundCommands_Block_8 ; CPU:$FC02 PRG:3C02 B0 BE lsr ZpFF ; CPU:$FC04 PRG:3C04 46 FF - bcs Label_FBB7 ; CPU:$FC06 PRG:3C06 B0 AF + bcs ProcessSoundCommands_Block_7 ; CPU:$FC06 PRG:3C06 B0 AF lsr a ; CPU:$FC08 PRG:3C08 4A - bcs Label_FC28 ; CPU:$FC09 PRG:3C09 B0 1D + bcs ProcessSoundCommands_Block_13 ; CPU:$FC09 PRG:3C09 B0 1D lsr ZpFF ; CPU:$FC0B PRG:3C0B 46 FF - bcs Label_FC19 ; CPU:$FC0D PRG:3C0D B0 0A + bcs ProcessSoundCommands_Block_12 ; CPU:$FC0D PRG:3C0D B0 0A lsr a ; CPU:$FC0F PRG:3C0F 4A - bcs Label_FC62 ; CPU:$FC10 PRG:3C10 B0 50 + bcs ProcessSoundCommands_Block_19 ; CPU:$FC10 PRG:3C10 B0 50 lsr ZpFF ; CPU:$FC12 PRG:3C12 46 FF - bcs Label_FC51 ; CPU:$FC14 PRG:3C14 B0 3B + bcs ProcessSoundCommands_Block_18 ; CPU:$FC14 PRG:3C14 B0 3B ; ----------------------------------------------------------------------------- -; Routine: Label_FC16 +; Routine: ProcessSoundCommands_Block_11 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15700,10 +15711,10 @@ Label_FBF2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FC16: +ProcessSoundCommands_Block_11: jmp $FC90 ; CPU:$FC16 PRG:3C16 4C 90 FC ; ----------------------------------------------------------------------------- -; Routine: Label_FC19 +; Routine: ProcessSoundCommands_Block_12 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15711,7 +15722,7 @@ Label_FC16: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FC19: +ProcessSoundCommands_Block_12: sty ZpF0 ; CPU:$FC19 PRG:3C19 84 F0 lda #$22 ; CPU:$FC1B PRG:3C1B A9 22 sta ZpF1 ; CPU:$FC1D PRG:3C1D 85 F1 @@ -15720,7 +15731,7 @@ Label_FC19: lda #$20 ; CPU:$FC23 PRG:3C23 A9 20 jsr $FA9F ; CPU:$FC25 PRG:3C25 20 9F FA ; ----------------------------------------------------------------------------- -; Routine: Label_FC28 +; Routine: ProcessSoundCommands_Block_13 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15728,13 +15739,13 @@ Label_FC19: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FC28: +ProcessSoundCommands_Block_13: dec ZpF2 ; CPU:$FC28 PRG:3C28 C6 F2 - bne Label_FC30 ; CPU:$FC2A PRG:3C2A D0 04 + bne ProcessSoundCommands_Block_14 ; CPU:$FC2A PRG:3C2A D0 04 lda #$07 ; CPU:$FC2C PRG:3C2C A9 07 sta ZpF2 ; CPU:$FC2E PRG:3C2E 85 F2 ; ----------------------------------------------------------------------------- -; Routine: Label_FC30 +; Routine: ProcessSoundCommands_Block_14 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15742,18 +15753,18 @@ Label_FC28: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FC30: +ProcessSoundCommands_Block_14: ldx ZpF2 ; CPU:$FC30 PRG:3C30 A6 F2 ldy $FAF5,x ; CPU:$FC32 PRG:3C32 BC F5 FA ldx #$5A ; CPU:$FC35 PRG:3C35 A2 5A lda ZpF1 ; CPU:$FC37 PRG:3C37 A5 F1 cmp #$14 ; CPU:$FC39 PRG:3C39 C9 14 - bcs Label_FC41 ; CPU:$FC3B PRG:3C3B B0 04 + bcs ProcessSoundCommands_Block_15 ; CPU:$FC3B PRG:3C3B B0 04 lsr a ; CPU:$FC3D PRG:3C3D 4A ora #$50 ; CPU:$FC3E PRG:3C3E 09 50 tax ; CPU:$FC40 PRG:3C40 AA ; ----------------------------------------------------------------------------- -; Routine: Label_FC41 +; Routine: ProcessSoundCommands_Block_15 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15761,10 +15772,10 @@ Label_FC30: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FC41: +ProcessSoundCommands_Block_15: jsr $FA95 ; CPU:$FC41 PRG:3C41 20 95 FA ; ----------------------------------------------------------------------------- -; Routine: Label_FC44 +; Routine: ProcessSoundCommands_Block_16 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15772,12 +15783,12 @@ Label_FC41: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FC44: +ProcessSoundCommands_Block_16: dec ZpF1 ; CPU:$FC44 PRG:3C44 C6 F1 - bne Label_FC16 ; CPU:$FC46 PRG:3C46 D0 CE + bne ProcessSoundCommands_Block_11 ; CPU:$FC46 PRG:3C46 D0 CE jsr $FAE0 ; CPU:$FC48 PRG:3C48 20 E0 FA ; ----------------------------------------------------------------------------- -; Routine: Label_FC4B +; Routine: ProcessSoundCommands_Block_17 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15785,12 +15796,12 @@ Label_FC44: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FC4B: +ProcessSoundCommands_Block_17: lda #$00 ; CPU:$FC4B PRG:3C4B A9 00 sta ZpF0 ; CPU:$FC4D PRG:3C4D 85 F0 - beq Label_FC16 ; CPU:$FC4F PRG:3C4F F0 C5 + beq ProcessSoundCommands_Block_11 ; CPU:$FC4F PRG:3C4F F0 C5 ; ----------------------------------------------------------------------------- -; Routine: Label_FC51 +; Routine: ProcessSoundCommands_Block_18 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15798,16 +15809,16 @@ Label_FC4B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FC51: +ProcessSoundCommands_Block_18: sty ZpF0 ; CPU:$FC51 PRG:3C51 84 F0 lda #$0A ; CPU:$FC53 PRG:3C53 A9 0A sta ZpF1 ; CPU:$FC55 PRG:3C55 85 F1 ldy $06F0 ; CPU:$FC57 PRG:3C57 AC F0 06 - sty $4002 ; CPU:$FC5A PRG:3C5A 8C 02 40 + sty APUPULSE1TIMERLO ; CPU:$FC5A PRG:3C5A 8C 02 40 lda #$88 ; CPU:$FC5D PRG:3C5D A9 88 - sta $4003 ; CPU:$FC5F PRG:3C5F 8D 03 40 + sta APUPULSE1TIMERHI ; CPU:$FC5F PRG:3C5F 8D 03 40 ; ----------------------------------------------------------------------------- -; Routine: Label_FC62 +; Routine: ProcessSoundCommands_Block_19 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15815,7 +15826,7 @@ Label_FC51: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FC62: +ProcessSoundCommands_Block_19: lda Zp18 ; CPU:$FC62 PRG:3C62 A5 18 and #$08 ; CPU:$FC64 PRG:3C64 29 08 clc ; CPU:$FC66 PRG:3C66 18 @@ -15824,9 +15835,9 @@ Label_FC62: tax ; CPU:$FC6B PRG:3C6B AA ldy $FAE5,x ; CPU:$FC6C PRG:3C6C BC E5 FA ldx #$41 ; CPU:$FC6F PRG:3C6F A2 41 - bne Label_FC41 ; CPU:$FC71 PRG:3C71 D0 CE + bne ProcessSoundCommands_Block_15 ; CPU:$FC71 PRG:3C71 D0 CE ; ----------------------------------------------------------------------------- -; Routine: Label_FC73 +; Routine: SubCFC90_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15834,14 +15845,14 @@ Label_FC62: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FC73: +SubCFC90_Block: lda #$0E ; CPU:$FC73 PRG:3C73 A9 0E sta $06A5 ; CPU:$FC75 PRG:3C75 8D A5 06 ldy #$85 ; CPU:$FC78 PRG:3C78 A0 85 lda #$46 ; CPU:$FC7A PRG:3C7A A9 46 jsr $FAB3 ; CPU:$FC7C PRG:3C7C 20 B3 FA ; ----------------------------------------------------------------------------- -; Routine: Label_FC7F +; Routine: SubCFC90_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15849,17 +15860,17 @@ Label_FC73: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FC7F: +SubCFC90_Block_1: dec $06A5 ; CPU:$FC7F PRG:3C7F CE A5 06 - beq Label_FC9D ; CPU:$FC82 PRG:3C82 F0 19 + beq SubCFC90_Block_2 ; CPU:$FC82 PRG:3C82 F0 19 lda $06A5 ; CPU:$FC84 PRG:3C84 AD A5 06 ora #$90 ; CPU:$FC87 PRG:3C87 09 90 tay ; CPU:$FC89 PRG:3C89 A8 dey ; CPU:$FC8A PRG:3C8A 88 - sty $4004 ; CPU:$FC8B PRG:3C8B 8C 04 40 - bne Label_FC9D ; CPU:$FC8E PRG:3C8E D0 0D + sty APUPULSE2CTRL ; CPU:$FC8B PRG:3C8B 8C 04 40 + bne SubCFC90_Block_2 ; CPU:$FC8E PRG:3C8E D0 0D ; ----------------------------------------------------------------------------- -; Routine: Label_FC90 +; Routine: SubCFC90 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15867,15 +15878,15 @@ Label_FC7F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FC90: +SubCFC90: lda ZpF3 ; CPU:$FC90 PRG:3C90 A5 F3 - bne Label_FC9D ; CPU:$FC92 PRG:3C92 D0 09 + bne SubCFC90_Block_2 ; CPU:$FC92 PRG:3C92 D0 09 lda $06A5 ; CPU:$FC94 PRG:3C94 AD A5 06 - bne Label_FC7F ; CPU:$FC97 PRG:3C97 D0 E6 + bne SubCFC90_Block_1 ; CPU:$FC97 PRG:3C97 D0 E6 ldy ZpFE ; CPU:$FC99 PRG:3C99 A4 FE - bmi Label_FC73 ; CPU:$FC9B PRG:3C9B 30 D6 + bmi SubCFC90_Block ; CPU:$FC9B PRG:3C9B 30 D6 ; ----------------------------------------------------------------------------- -; Routine: Label_FC9D +; Routine: SubCFC90_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15883,24 +15894,24 @@ Label_FC90: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FC9D: +SubCFC90_Block_2: lda ZpFC ; CPU:$FC9D PRG:3C9D A5 FC - bne Label_FD0B ; CPU:$FC9F PRG:3C9F D0 6A + bne SubCFC90_Block_11 ; CPU:$FC9F PRG:3C9F D0 6A lda ZpF9 ; CPU:$FCA1 PRG:3CA1 A5 F9 - bne Label_FD0B ; CPU:$FCA3 PRG:3CA3 D0 66 + bne SubCFC90_Block_11 ; CPU:$FCA3 PRG:3CA3 D0 66 ldy ZpFE ; CPU:$FCA5 PRG:3CA5 A4 FE lda $06A1 ; CPU:$FCA7 PRG:3CA7 AD A1 06 lsr ZpFE ; CPU:$FCAA PRG:3CAA 46 FE - bcs Label_FCBA ; CPU:$FCAC PRG:3CAC B0 0C + bcs SubCFC90_Block_3 ; CPU:$FCAC PRG:3CAC B0 0C lsr a ; CPU:$FCAE PRG:3CAE 4A - bcs Label_FCBE ; CPU:$FCAF PRG:3CAF B0 0D + bcs SubCFC90_Block_4 ; CPU:$FCAF PRG:3CAF B0 0D lsr a ; CPU:$FCB1 PRG:3CB1 4A - bcs Label_FCF0 ; CPU:$FCB2 PRG:3CB2 B0 3C + bcs SubCFC90_Block_9 ; CPU:$FCB2 PRG:3CB2 B0 3C lsr ZpFE ; CPU:$FCB4 PRG:3CB4 46 FE - bcs Label_FCDB ; CPU:$FCB6 PRG:3CB6 B0 23 - bcc Label_FD0B ; CPU:$FCB8 PRG:3CB8 90 51 + bcs SubCFC90_Block_7 ; CPU:$FCB6 PRG:3CB6 B0 23 + bcc SubCFC90_Block_11 ; CPU:$FCB8 PRG:3CB8 90 51 ; ----------------------------------------------------------------------------- -; Routine: Label_FCBA +; Routine: SubCFC90_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15908,11 +15919,11 @@ Label_FC9D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FCBA: +SubCFC90_Block_3: lda #$28 ; CPU:$FCBA PRG:3CBA A9 28 - bne Label_FCDD ; CPU:$FCBC PRG:3CBC D0 1F + bne SubCFC90_Block_8 ; CPU:$FCBC PRG:3CBC D0 1F ; ----------------------------------------------------------------------------- -; Routine: Label_FCBE +; Routine: SubCFC90_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15920,13 +15931,13 @@ Label_FCBA: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FCBE: +SubCFC90_Block_4: lda ZpF5 ; CPU:$FCBE PRG:3CBE A5 F5 - bne Label_FCC6 ; CPU:$FCC0 PRG:3CC0 D0 04 + bne SubCFC90_Block_5 ; CPU:$FCC0 PRG:3CC0 D0 04 lsr ZpFE ; CPU:$FCC2 PRG:3CC2 46 FE - bcs Label_FCDB ; CPU:$FCC4 PRG:3CC4 B0 15 + bcs SubCFC90_Block_7 ; CPU:$FCC4 PRG:3CC4 B0 15 ; ----------------------------------------------------------------------------- -; Routine: Label_FCC6 +; Routine: SubCFC90_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15934,7 +15945,7 @@ Label_FCBE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FCC6: +SubCFC90_Block_5: lda ZpF6 ; CPU:$FCC6 PRG:3CC6 A5 F6 lsr a ; CPU:$FCC8 PRG:3CC8 4A lsr a ; CPU:$FCC9 PRG:3CC9 4A @@ -15942,9 +15953,9 @@ Label_FCC6: lsr a ; CPU:$FCCB PRG:3CCB 4A lsr a ; CPU:$FCCC PRG:3CCC 4A adc ZpF6 ; CPU:$FCCD PRG:3CCD 65 F6 - bcc Label_FD00 ; CPU:$FCCF PRG:3CCF 90 2F + bcc SubCFC90_Block_10 ; CPU:$FCCF PRG:3CCF 90 2F ; ----------------------------------------------------------------------------- -; Routine: Label_FCD1 +; Routine: SubCFC90_Block_6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15952,13 +15963,13 @@ Label_FCC6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FCD1: +SubCFC90_Block_6: lda #$00 ; CPU:$FCD1 PRG:3CD1 A9 00 sta $06A1 ; CPU:$FCD3 PRG:3CD3 8D A1 06 - sta $4008 ; CPU:$FCD6 PRG:3CD6 8D 08 40 - beq Label_FD0B ; CPU:$FCD9 PRG:3CD9 F0 30 + sta APUTRIANGLECTRL ; CPU:$FCD6 PRG:3CD6 8D 08 40 + beq SubCFC90_Block_11 ; CPU:$FCD9 PRG:3CD9 F0 30 ; ----------------------------------------------------------------------------- -; Routine: Label_FCDB +; Routine: SubCFC90_Block_7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15966,10 +15977,10 @@ Label_FCD1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FCDB: +SubCFC90_Block_7: lda #$FE ; CPU:$FCDB PRG:3CDB A9 FE ; ----------------------------------------------------------------------------- -; Routine: Label_FCDD +; Routine: SubCFC90_Block_8 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15977,17 +15988,17 @@ Label_FCDB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FCDD: +SubCFC90_Block_8: sty $06A1 ; CPU:$FCDD PRG:3CDD 8C A1 06 ldx #$0E ; CPU:$FCE0 PRG:3CE0 A2 0E stx ZpF5 ; CPU:$FCE2 PRG:3CE2 86 F5 ldy #$FF ; CPU:$FCE4 PRG:3CE4 A0 FF - sty $4008 ; CPU:$FCE6 PRG:3CE6 8C 08 40 + sty APUTRIANGLECTRL ; CPU:$FCE6 PRG:3CE6 8C 08 40 ldy #$08 ; CPU:$FCE9 PRG:3CE9 A0 08 - sty $400B ; CPU:$FCEB PRG:3CEB 8C 0B 40 - bne Label_FD00 ; CPU:$FCEE PRG:3CEE D0 10 + sty APUTRIANGLETIMERHI ; CPU:$FCEB PRG:3CEB 8C 0B 40 + bne SubCFC90_Block_10 ; CPU:$FCEE PRG:3CEE D0 10 ; ----------------------------------------------------------------------------- -; Routine: Label_FCF0 +; Routine: SubCFC90_Block_9 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -15995,17 +16006,17 @@ Label_FCDD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FCF0: +SubCFC90_Block_9: lda #$FE ; CPU:$FCF0 PRG:3CF0 A9 FE ldy ZpF5 ; CPU:$FCF2 PRG:3CF2 A4 F5 - beq Label_FCD1 ; CPU:$FCF4 PRG:3CF4 F0 DB + beq SubCFC90_Block_6 ; CPU:$FCF4 PRG:3CF4 F0 DB cpy #$07 ; CPU:$FCF6 PRG:3CF6 C0 07 - beq Label_FD00 ; CPU:$FCF8 PRG:3CF8 F0 06 + beq SubCFC90_Block_10 ; CPU:$FCF8 PRG:3CF8 F0 06 lda ZpF6 ; CPU:$FCFA PRG:3CFA A5 F6 tay ; CPU:$FCFC PRG:3CFC A8 jsr $FAD7 ; CPU:$FCFD PRG:3CFD 20 D7 FA ; ----------------------------------------------------------------------------- -; Routine: Label_FD00 +; Routine: SubCFC90_Block_10 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16013,14 +16024,14 @@ Label_FCF0: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FD00: +SubCFC90_Block_10: sta ZpF6 ; CPU:$FD00 PRG:3D00 85 F6 - sta $400A ; CPU:$FD02 PRG:3D02 8D 0A 40 + sta APUTRIANGLETIMERLO ; CPU:$FD02 PRG:3D02 8D 0A 40 lda ZpF5 ; CPU:$FD05 PRG:3D05 A5 F5 - beq Label_FD0B ; CPU:$FD07 PRG:3D07 F0 02 + beq SubCFC90_Block_11 ; CPU:$FD07 PRG:3D07 F0 02 dec ZpF5 ; CPU:$FD09 PRG:3D09 C6 F5 ; ----------------------------------------------------------------------------- -; Routine: Label_FD0B +; Routine: SubCFC90_Block_11 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16028,15 +16039,15 @@ Label_FD00: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FD0B: +SubCFC90_Block_11: ldx ZpFA ; CPU:$FD0B PRG:3D0B A6 FA - bne Label_FD58 ; CPU:$FD0D PRG:3D0D D0 49 + bne SubCFC90_Block_16 ; CPU:$FD0D PRG:3D0D D0 49 lda ZpFC ; CPU:$FD0F PRG:3D0F A5 FC - bne Label_FD18 ; CPU:$FD11 PRG:3D11 D0 05 + bne SubCFC90_Block_12 ; CPU:$FD11 PRG:3D11 D0 05 sta $06A3 ; CPU:$FD13 PRG:3D13 8D A3 06 - beq Label_FD58 ; CPU:$FD16 PRG:3D16 F0 40 + beq SubCFC90_Block_16 ; CPU:$FD16 PRG:3D16 F0 40 ; ----------------------------------------------------------------------------- -; Routine: Label_FD18 +; Routine: SubCFC90_Block_12 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16044,11 +16055,11 @@ Label_FD0B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FD18: +SubCFC90_Block_12: eor $06A3 ; CPU:$FD18 PRG:3D18 4D A3 06 - beq Label_FD35 ; CPU:$FD1B PRG:3D1B F0 18 + beq SubCFC90_Block_14 ; CPU:$FD1B PRG:3D1B F0 18 ; ----------------------------------------------------------------------------- -; Routine: Label_FD1D +; Routine: SubCFC90_Block_13 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16056,7 +16067,7 @@ Label_FD18: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FD1D: +SubCFC90_Block_13: lda ZpFC ; CPU:$FD1D PRG:3D1D A5 FC sta $06A3 ; CPU:$FD1F PRG:3D1F 8D A3 06 jsr $FA86 ; CPU:$FD22 PRG:3D22 20 86 FA @@ -16066,9 +16077,9 @@ Label_FD1D: sta ZpF5 ; CPU:$FD2D PRG:3D2D 85 F5 lda #$FF ; CPU:$FD2F PRG:3D2F A9 FF sta ZpF6 ; CPU:$FD31 PRG:3D31 85 F6 - bne Label_FD3A ; CPU:$FD33 PRG:3D33 D0 05 + bne SubCFC90_Block_15 ; CPU:$FD33 PRG:3D33 D0 05 ; ----------------------------------------------------------------------------- -; Routine: Label_FD35 +; Routine: SubCFC90_Block_14 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16076,11 +16087,11 @@ Label_FD1D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FD35: +SubCFC90_Block_14: dec $0698 ; CPU:$FD35 PRG:3D35 CE 98 06 - bne Label_FD58 ; CPU:$FD38 PRG:3D38 D0 1E + bne SubCFC90_Block_16 ; CPU:$FD38 PRG:3D38 D0 1E ; ----------------------------------------------------------------------------- -; Routine: Label_FD3A +; Routine: SubCFC90_Block_15 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16088,11 +16099,11 @@ Label_FD35: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FD3A: +SubCFC90_Block_15: ldy $0680 ; CPU:$FD3A PRG:3D3A AC 80 06 inc $0680 ; CPU:$FD3D PRG:3D3D EE 80 06 lda (ZpF5),y ; CPU:$FD40 PRG:3D40 B1 F5 - beq Label_FD1D ; CPU:$FD42 PRG:3D42 F0 D9 + beq SubCFC90_Block_13 ; CPU:$FD42 PRG:3D42 F0 D9 tax ; CPU:$FD44 PRG:3D44 AA ror a ; CPU:$FD45 PRG:3D45 6A txa ; CPU:$FD46 PRG:3D46 8A @@ -16106,7 +16117,7 @@ Label_FD3A: lda #$10 ; CPU:$FD53 PRG:3D53 A9 10 jsr $FABA ; CPU:$FD55 PRG:3D55 20 BA FA ; ----------------------------------------------------------------------------- -; Routine: Label_FD58 +; Routine: SubCFC90_Block_16 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16114,14 +16125,14 @@ Label_FD3A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FD58: +SubCFC90_Block_16: lda ZpFD ; CPU:$FD58 PRG:3D58 A5 FD - bne Label_FD62 ; CPU:$FD5A PRG:3D5A D0 06 + bne SubCFC90_Block_17 ; CPU:$FD5A PRG:3D5A D0 06 lda $0102 ; CPU:$FD5C PRG:3D5C AD 02 01 - bne Label_FD9B ; CPU:$FD5F PRG:3D5F D0 3A + bne InitSoundEffect_Block ; CPU:$FD5F PRG:3D5F D0 3A rts ; CPU:$FD61 PRG:3D61 60 ; ----------------------------------------------------------------------------- -; Routine: Label_FD62 +; Routine: SubCFC90_Block_17 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16129,11 +16140,11 @@ Label_FD58: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FD62: +SubCFC90_Block_17: jsr $FA86 ; CPU:$FD62 PRG:3D62 20 86 FA sty ZpFB ; CPU:$FD65 PRG:3D65 84 FB ; ----------------------------------------------------------------------------- -; Routine: Label_FD67 +; Routine: InitSoundEffect ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16141,7 +16152,7 @@ Label_FD62: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FD67: +InitSoundEffect: lda $FE59,y ; CPU:$FD67 PRG:3D67 B9 59 FE tay ; CPU:$FD6A PRG:3D6A A8 lda $FE59,y ; CPU:$FD6B PRG:3D6B B9 59 FE @@ -16162,9 +16173,9 @@ Label_FD67: ldy #$00 ; CPU:$FD93 PRG:3D93 A0 00 sty ZpF3 ; CPU:$FD95 PRG:3D95 84 F3 lda ZpFB ; CPU:$FD97 PRG:3D97 A5 FB - beq Label_FDA4 ; CPU:$FD99 PRG:3D99 F0 09 + beq InitSoundEffect_Block_1 ; CPU:$FD99 PRG:3D99 F0 09 ; ----------------------------------------------------------------------------- -; Routine: Label_FD9B +; Routine: InitSoundEffect_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16172,13 +16183,13 @@ Label_FD67: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FD9B: +InitSoundEffect_Block: ldy ZpFA ; CPU:$FD9B PRG:3D9B A4 FA - beq Label_FDD8 ; CPU:$FD9D PRG:3D9D F0 39 + beq InitSoundEffect_Block_5 ; CPU:$FD9D PRG:3D9D F0 39 dec $0696 ; CPU:$FD9F PRG:3D9F CE 96 06 - bne Label_FDD8 ; CPU:$FDA2 PRG:3DA2 D0 34 + bne InitSoundEffect_Block_5 ; CPU:$FDA2 PRG:3DA2 D0 34 ; ----------------------------------------------------------------------------- -; Routine: Label_FDA4 +; Routine: InitSoundEffect_Block_1 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16186,18 +16197,18 @@ Label_FD9B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FDA4: +InitSoundEffect_Block_1: inc ZpFA ; CPU:$FDA4 PRG:3DA4 E6 FA lda (ZpF7),y ; CPU:$FDA6 PRG:3DA6 B1 F7 - beq Label_FDE9 ; CPU:$FDA8 PRG:3DA8 F0 3F - bpl Label_FDB8 ; CPU:$FDAA PRG:3DAA 10 0C + beq InitSoundEffect_Block_6 ; CPU:$FDA8 PRG:3DA8 F0 3F + bpl InitSoundEffect_Block_2 ; CPU:$FDAA PRG:3DAA 10 0C jsr $FACA ; CPU:$FDAC PRG:3DAC 20 CA FA sta $0691 ; CPU:$FDAF PRG:3DAF 8D 91 06 ldy ZpFA ; CPU:$FDB2 PRG:3DB2 A4 FA inc ZpFA ; CPU:$FDB4 PRG:3DB4 E6 FA lda (ZpF7),y ; CPU:$FDB6 PRG:3DB6 B1 F7 ; ----------------------------------------------------------------------------- -; Routine: Label_FDB8 +; Routine: InitSoundEffect_Block_2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16205,13 +16216,13 @@ Label_FDA4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FDB8: +InitSoundEffect_Block_2: jsr $FA9F ; CPU:$FDB8 PRG:3DB8 20 9F FA - bne Label_FDC1 ; CPU:$FDBB PRG:3DBB D0 04 + bne InitSoundEffect_Block_3 ; CPU:$FDBB PRG:3DBB D0 04 ldy #$10 ; CPU:$FDBD PRG:3DBD A0 10 - bne Label_FDCF ; CPU:$FDBF PRG:3DBF D0 0E + bne InitSoundEffect_Block_4 ; CPU:$FDBF PRG:3DBF D0 0E ; ----------------------------------------------------------------------------- -; Routine: Label_FDC1 +; Routine: InitSoundEffect_Block_3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16219,16 +16230,16 @@ Label_FDB8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FDC1: +InitSoundEffect_Block_3: ldx #$9F ; CPU:$FDC1 PRG:3DC1 A2 9F lda ZpFB ; CPU:$FDC3 PRG:3DC3 A5 FB - beq Label_FDCF ; CPU:$FDC5 PRG:3DC5 F0 08 + beq InitSoundEffect_Block_4 ; CPU:$FDC5 PRG:3DC5 F0 08 ldx #$06 ; CPU:$FDC7 PRG:3DC7 A2 06 lda ZpF9 ; CPU:$FDC9 PRG:3DC9 A5 F9 - bne Label_FDCF ; CPU:$FDCB PRG:3DCB D0 02 + bne InitSoundEffect_Block_4 ; CPU:$FDCB PRG:3DCB D0 02 ldx #$86 ; CPU:$FDCD PRG:3DCD A2 86 ; ----------------------------------------------------------------------------- -; Routine: Label_FDCF +; Routine: InitSoundEffect_Block_4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16236,12 +16247,12 @@ Label_FDC1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FDCF: +InitSoundEffect_Block_4: jsr $FA93 ; CPU:$FDCF PRG:3DCF 20 93 FA lda $0691 ; CPU:$FDD2 PRG:3DD2 AD 91 06 sta $0696 ; CPU:$FDD5 PRG:3DD5 8D 96 06 ; ----------------------------------------------------------------------------- -; Routine: Label_FDD8 +; Routine: InitSoundEffect_Block_5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16249,17 +16260,17 @@ Label_FDCF: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FDD8: +InitSoundEffect_Block_5: lda ZpFB ; CPU:$FDD8 PRG:3DD8 A5 FB - beq Label_FE31 ; CPU:$FDDA PRG:3DDA F0 55 + beq InitSoundEffect_Block_10 ; CPU:$FDDA PRG:3DDA F0 55 dec $0695 ; CPU:$FDDC PRG:3DDC CE 95 06 - bne Label_FE31 ; CPU:$FDDF PRG:3DDF D0 50 + bne InitSoundEffect_Block_10 ; CPU:$FDDF PRG:3DDF D0 50 ldy ZpF3 ; CPU:$FDE1 PRG:3DE1 A4 F3 inc ZpF3 ; CPU:$FDE3 PRG:3DE3 E6 F3 lda (ZpF7),y ; CPU:$FDE5 PRG:3DE5 B1 F7 - bne Label_FE09 ; CPU:$FDE7 PRG:3DE7 D0 20 + bne InitSoundEffect_Block_7 ; CPU:$FDE7 PRG:3DE7 D0 20 ; ----------------------------------------------------------------------------- -; Routine: Label_FDE9 +; Routine: InitSoundEffect_Block_6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16267,7 +16278,7 @@ Label_FDD8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FDE9: +InitSoundEffect_Block_6: jsr $FAE0 ; CPU:$FDE9 PRG:3DE9 20 E0 FA lda #$00 ; CPU:$FDEC PRG:3DEC A9 00 sta ZpFA ; CPU:$FDEE PRG:3DEE 85 FA @@ -16275,11 +16286,11 @@ Label_FDE9: sta ZpF9 ; CPU:$FDF2 PRG:3DF2 85 F9 sta $0102 ; CPU:$FDF4 PRG:3DF4 8D 02 01 ldy ZpFB ; CPU:$FDF7 PRG:3DF7 A4 FB - beq Label_FE00 ; CPU:$FDF9 PRG:3DF9 F0 05 + beq SilenceTriangleAndNoise ; CPU:$FDF9 PRG:3DF9 F0 05 ldy $06A1 ; CPU:$FDFB PRG:3DFB AC A1 06 - bne Label_FE03 ; CPU:$FDFE PRG:3DFE D0 03 + bne SilenceTriangleAndNoise_Block ; CPU:$FDFE PRG:3DFE D0 03 ; ----------------------------------------------------------------------------- -; Routine: Label_FE00 +; Routine: SilenceTriangleAndNoise ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16287,10 +16298,10 @@ Label_FDE9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FE00: - sta $4008 ; CPU:$FE00 PRG:3E00 8D 08 40 +SilenceTriangleAndNoise: + sta APUTRIANGLECTRL ; CPU:$FE00 PRG:3E00 8D 08 40 ; ----------------------------------------------------------------------------- -; Routine: Label_FE03 +; Routine: SilenceTriangleAndNoise_Block ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16298,12 +16309,12 @@ Label_FE00: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FE03: +SilenceTriangleAndNoise_Block: lda #$10 ; CPU:$FE03 PRG:3E03 A9 10 - sta $4004 ; CPU:$FE05 PRG:3E05 8D 04 40 + sta APUPULSE2CTRL ; CPU:$FE05 PRG:3E05 8D 04 40 rts ; CPU:$FE08 PRG:3E08 60 ; ----------------------------------------------------------------------------- -; Routine: Label_FE09 +; Routine: InitSoundEffect_Block_7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16311,18 +16322,18 @@ Label_FE03: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FE09: +InitSoundEffect_Block_7: jsr $FAC4 ; CPU:$FE09 PRG:3E09 20 C4 FA sta $0695 ; CPU:$FE0C PRG:3E0C 8D 95 06 txa ; CPU:$FE0F PRG:3E0F 8A and #$3E ; CPU:$FE10 PRG:3E10 29 3E ldy #$7F ; CPU:$FE12 PRG:3E12 A0 7F jsr $FAB3 ; CPU:$FE14 PRG:3E14 20 B3 FA - bne Label_FE1D ; CPU:$FE17 PRG:3E17 D0 04 + bne InitSoundEffect_Block_8 ; CPU:$FE17 PRG:3E17 D0 04 ldx #$10 ; CPU:$FE19 PRG:3E19 A2 10 - bne Label_FE2E ; CPU:$FE1B PRG:3E1B D0 11 + bne InitSoundEffect_Block_9 ; CPU:$FE1B PRG:3E1B D0 11 ; ----------------------------------------------------------------------------- -; Routine: Label_FE1D +; Routine: InitSoundEffect_Block_8 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16330,17 +16341,17 @@ Label_FE09: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FE1D: +InitSoundEffect_Block_8: ldx #$89 ; CPU:$FE1D PRG:3E1D A2 89 lda $0695 ; CPU:$FE1F PRG:3E1F AD 95 06 cmp #$18 ; CPU:$FE22 PRG:3E22 C9 18 - bcs Label_FE2E ; CPU:$FE24 PRG:3E24 B0 08 + bcs InitSoundEffect_Block_9 ; CPU:$FE24 PRG:3E24 B0 08 ldx #$86 ; CPU:$FE26 PRG:3E26 A2 86 cmp #$10 ; CPU:$FE28 PRG:3E28 C9 10 - bcs Label_FE2E ; CPU:$FE2A PRG:3E2A B0 02 + bcs InitSoundEffect_Block_9 ; CPU:$FE2A PRG:3E2A B0 02 ldx #$84 ; CPU:$FE2C PRG:3E2C A2 84 ; ----------------------------------------------------------------------------- -; Routine: Label_FE2E +; Routine: InitSoundEffect_Block_9 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16348,10 +16359,10 @@ Label_FE1D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FE2E: - stx $4004 ; CPU:$FE2E PRG:3E2E 8E 04 40 +InitSoundEffect_Block_9: + stx APUPULSE2CTRL ; CPU:$FE2E PRG:3E2E 8E 04 40 ; ----------------------------------------------------------------------------- -; Routine: Label_FE31 +; Routine: InitSoundEffect_Block_10 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16359,11 +16370,11 @@ Label_FE2E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FE31: +InitSoundEffect_Block_10: ldy ZpF9 ; CPU:$FE31 PRG:3E31 A4 F9 - beq Label_FE58 ; CPU:$FE33 PRG:3E33 F0 23 + beq InitSoundEffect_Block_13 ; CPU:$FE33 PRG:3E33 F0 23 dec $0698 ; CPU:$FE35 PRG:3E35 CE 98 06 - bne Label_FE58 ; CPU:$FE38 PRG:3E38 D0 1E + bne InitSoundEffect_Block_13 ; CPU:$FE38 PRG:3E38 D0 1E inc ZpF9 ; CPU:$FE3A PRG:3E3A E6 F9 lda (ZpF7),y ; CPU:$FE3C PRG:3E3C B1 F7 jsr $FAC4 ; CPU:$FE3E PRG:3E3E 20 C4 FA @@ -16373,10 +16384,10 @@ Label_FE31: asl a ; CPU:$FE47 PRG:3E47 0A asl a ; CPU:$FE48 PRG:3E48 0A cmp #$38 ; CPU:$FE49 PRG:3E49 C9 38 - bcc Label_FE4F ; CPU:$FE4B PRG:3E4B 90 02 + bcc InitSoundEffect_Block_11 ; CPU:$FE4B PRG:3E4B 90 02 lda #$38 ; CPU:$FE4D PRG:3E4D A9 38 ; ----------------------------------------------------------------------------- -; Routine: Label_FE4F +; Routine: InitSoundEffect_Block_11 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16384,12 +16395,12 @@ Label_FE31: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FE4F: +InitSoundEffect_Block_11: ldy ZpFB ; CPU:$FE4F PRG:3E4F A4 FB - bne Label_FE55 ; CPU:$FE51 PRG:3E51 D0 02 + bne InitSoundEffect_Block_12 ; CPU:$FE51 PRG:3E51 D0 02 lda #$FF ; CPU:$FE53 PRG:3E53 A9 FF ; ----------------------------------------------------------------------------- -; Routine: Label_FE55 +; Routine: InitSoundEffect_Block_12 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16397,10 +16408,10 @@ Label_FE4F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FE55: +InitSoundEffect_Block_12: jsr $FABA ; CPU:$FE55 PRG:3E55 20 BA FA ; ----------------------------------------------------------------------------- -; Routine: Label_FE58 +; Routine: InitSoundEffect_Block_13 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16408,7 +16419,7 @@ Label_FE55: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FE58: +InitSoundEffect_Block_13: rts ; CPU:$FE58 PRG:3E58 60 ; ---- data $FE59-$FFEF (407 bytes) ---- ; referenced by `lda $FFCD,y` at $FD25 (operand $FFCD falls inside this region) @@ -16418,7 +16429,8 @@ Label_FE58: ; referenced by `lda $FE5B,y` at $FD76 (operand $FE5B falls inside this region) ; referenced by `lda $FE5C,y` at $FD7B (operand $FE5C falls inside this region) ; ... and 1 further references from decoded code - .byte $09, $0E, $13, $18, $1D, $22, $27, $2C, $31, $00, $8F, $FE, $1B, $00, $08, $B0 ; CPU:$FE59 PRG:3E59 09 0E 13 18 1D 22 27 2C 31 00 8F FE 1B 00 08 B0 +; Sound effect data: frequency sweeps, envelope shapes, channel configs +SfxDataTable: .byte $09, $0E, $13, $18, $1D, $22, $27, $2C, $31, $00, $8F, $FE, $1B, $00, $08, $B0 ; CPU:$FE59 PRG:3E59 09 0E 13 18 1D 22 27 2C 31 00 8F FE 1B 00 08 B0 .byte $FE, $00, $0C, $00, $CF, $FE, $00, $1A, $08, $05, $FF, $00, $0B, $00, $AD, $FF ; CPU:$FE69 PRG:3E69 FE 00 0C 00 CF FE 00 1A 08 05 FF 00 0B 00 AD FF .byte $00, $03, $00, $BE, $FF, $00, $00, $00, $C4, $FF, $00, $00, $0F, $20, $FF, $21 ; CPU:$FE79 PRG:3E79 00 03 00 BE FF 00 00 00 C4 FF 00 00 0F 20 FF 21 .byte $3E, $00, $A1, $FF, $08, $00, $86, $46, $82, $4A, $83, $26, $46, $80, $34, $32 ; CPU:$FE89 PRG:3E89 3E 00 A1 FF 08 00 86 46 82 4A 83 26 46 80 34 32 @@ -16457,4 +16469,6 @@ IrqHandler: stx $CE8E ; CPU:$FFF0 PRG:3FF0 8E 8E CE dec $CED2 ; CPU:$FFF3 PRG:3FF3 CE D2 CE ; ---- data $FFF6-$FFFF (10 bytes) ---- - .byte $D2, $CE, $00, $FF, $5F, $C8, $9E, $C7, $F0, $FF ; CPU:$FFF6 PRG:3FF6 D2 CE 00 FF 5F C8 9E C7 F0 FF +; Vector table at end of PRG ROM ($FFFA-$FFFF in CPU space) +; $FFF6-$FFF9: padding/alignment; $FFFA-$FFFF: NMI/RESET/IRQ vectors +VectorTable: .byte $D2, $CE, $00, $FF, $5F, $C8, $9E, $C7, $F0, $FF ; CPU:$FFF6 PRG:3FF6 D2 CE 00 FF 5F C8 9E C7 F0 FF diff --git a/Donkey Kong (JU)/copilot/reconstructed.lbl b/Donkey Kong (JU)/copilot/reconstructed.lbl new file mode 100644 index 0000000..c7f78d9 --- /dev/null +++ b/Donkey Kong (JU)/copilot/reconstructed.lbl @@ -0,0 +1,1025 @@ +al 00FFF6 .VectorTable +al 00FFF0 .IrqHandler +al 00FE59 .SfxDataTable +al 00FE55 .InitSoundEffect_Block_12 +al 00FE4F .InitSoundEffect_Block_11 +al 00FE58 .InitSoundEffect_Block_13 +al 00FE2E .InitSoundEffect_Block_9 +al 00FE1D .InitSoundEffect_Block_8 +al 00FE03 .SilenceTriangleAndNoise_Block +al 00FE00 .SilenceTriangleAndNoise +al 00FE09 .InitSoundEffect_Block_7 +al 00FE31 .InitSoundEffect_Block_10 +al 00FDCF .InitSoundEffect_Block_4 +al 00FDC1 .InitSoundEffect_Block_3 +al 00FDB8 .InitSoundEffect_Block_2 +al 00FDE9 .InitSoundEffect_Block_6 +al 00FDD8 .InitSoundEffect_Block_5 +al 00FDA4 .InitSoundEffect_Block_1 +al 00FD67 .InitSoundEffect +al 00FD9B .InitSoundEffect_Block +al 00FD62 .SubCFC90_Block_17 +al 00FD3A .SubCFC90_Block_15 +al 00FD1D .SubCFC90_Block_13 +al 00FD35 .SubCFC90_Block_14 +al 00FD18 .SubCFC90_Block_12 +al 00FD58 .SubCFC90_Block_16 +al 00FCD1 .SubCFC90_Block_6 +al 00FD00 .SubCFC90_Block_10 +al 00FCC6 .SubCFC90_Block_5 +al 00FCDD .SubCFC90_Block_8 +al 00FCDB .SubCFC90_Block_7 +al 00FCF0 .SubCFC90_Block_9 +al 00FCBE .SubCFC90_Block_4 +al 00FCBA .SubCFC90_Block_3 +al 00FD0B .SubCFC90_Block_11 +al 00FC90 .SubCFC90 +al 00FC9D .SubCFC90_Block_2 +al 00FC7F .SubCFC90_Block_1 +al 00FC73 .SubCFC90_Block +al 00FC41 .ProcessSoundCommands_Block_15 +al 00FC30 .ProcessSoundCommands_Block_14 +al 00FC16 .ProcessSoundCommands_Block_11 +al 00FC51 .ProcessSoundCommands_Block_18 +al 00FC62 .ProcessSoundCommands_Block_19 +al 00FC19 .ProcessSoundCommands_Block_12 +al 00FC28 .ProcessSoundCommands_Block_13 +al 00FC4B .ProcessSoundCommands_Block_17 +al 00FBF2 .ProcessSoundCommands +al 00FC44 .ProcessSoundCommands_Block_16 +al 00FBD9 .ProcessSoundCommands_Block_10 +al 00FBD4 .ProcessSoundCommands_Block_9 +al 00FBC2 .ProcessSoundCommands_Block_8 +al 00FBB7 .ProcessSoundCommands_Block_7 +al 00FBAF .ProcessSoundCommands_Block_5 +al 00FBB2 .ProcessSoundCommands_Block_6 +al 00FBA7 .ProcessSoundCommands_Block_4 +al 00FBA0 .ProcessSoundCommands_Block_3 +al 00FB89 .ProcessSoundCommands_Block_2 +al 00FB7E .ProcessSoundCommands_Block_1 +al 00FB75 .ProcessSoundCommands_Block +al 00FAE6 .APUDataTable +al 00FAE0 .SilencePulse1 +al 00FAD7 .SubCFAD7 +al 00FAD5 .SubCFAD5 +al 00FACA .LookupNotePeriod +al 00FAC4 .DecodeNotePeriod +al 00FABA .WriteTriangleNote +al 00FAB3 .WritePulse2Note +al 00FAB2 .WriteTriangleNote_Block_1 +al 00FAA1 .WriteTriangleNote_Block +al 00FA9F .WriteNoteFrequency +al 00FA95 .WritePulse1Control +al 00FA93 .WritePulse1ControlDefault +al 00FA8F .SubCFA8F +al 00FA8E .FindHighestSetBit_Block_1 +al 00FA88 .FindHighestSetBit_Block +al 00FA86 .FindHighestSetBit +al 00FA82 .UpdateSoundEngine_Block_3 +al 00FA7F .UpdateSoundEngine_Block_2 +al 00FA6B .UpdateSoundEngine_Block_1 +al 00FA64 .UpdateSoundEngine_Block +al 00FA48 .UpdateSoundEngine +al 00F55B .MusicDataTable +al 00F55A .ReadControllerShift_Block_2 +al 00F549 .ReadControllerShift_Block_1 +al 00F524 .ReadControllerShift_Block +al 00F522 .ReadControllerShift +al 00F50E .ReadControllers +al 00F4FD .UpdateRandomSeed_Block +al 00F4ED .UpdateRandomSeed +al 00F4C2 .QueuePpuByteWrite +al 00F4BE .UpdateTimers_Block_1 +al 00F4B8 .UpdateTimers_Block +al 00F4AC .UpdateTimers +al 00F493 .CompareBcdValues_Block_4 +al 00F49F .CompareBcdValues_Block_5 +al 00F47E .CompareBcdValues_Block_3 +al 00F4A9 .CompareBcdValues_Block_8 +al 00F4A4 .CompareBcdValues_Block_7 +al 00F453 .CompareBcdValues_Block_1 +al 00F479 .CompareBcdValues_Block_2 +al 00F4A0 .CompareBcdValues_Block_6 +al 00F44A .CompareBcdValues_Block +al 00F435 .CompareBcdValues +al 00F426 .SplitBcdByte +al 00F423 .SubtractBcdNibble_Block_1 +al 00F417 .SubtractBcdNibble_Block +al 00F404 .SubtractBcdNibble +al 00F3FB .AddBcdNibble_Block_1 +al 00F3FF .AddBcdNibble_Block_2 +al 00F3EE .AddBcdNibble_Block +al 00F3E3 .AddBcdNibble +al 00F3E2 .ApplyBcdAddSub_Block_5 +al 00F3C6 .ApplyBcdAddSub_Block_4 +al 00F3C0 .ApplyBcdAddSub_Block_3 +al 00F36B .ApplyBcdAddSub_Block +al 00F392 .ApplyBcdAddSub_Block_2 +al 00F38E .ApplyBcdAddSub_Block_1 +al 00F35E .ApplyBcdAddSub +al 00F355 .AddBcdValue_Block_1 +al 00F342 .AddBcdValue +al 00F344 .AddBcdValue_Block +al 00F33E .SubtractBcdValue +al 00F33D .CheckPpuBufferOverflow_Block +al 00F32F .CheckPpuBufferOverflow +al 00F32D .AdvancePpuBufferWrite +al 00F303 .DrawVramBlock_Block_1 +al 00F2EA .DrawVramBlock_Block +al 00F2D7 .DrawVramBlock +al 00F2D6 .DrawLevelBlock_Block_7 +al 00F2BE .DrawLevelBlock_Block_5 +al 00F2B4 .DrawLevelBlock_Block_4 +al 00F2B0 .DrawLevelBlock_Block_3 +al 00F2C4 .DrawLevelBlock_Block_6 +al 00F29A .DrawLevelBlock_Block_2 +al 00F296 .DrawLevelBlock_Block_1 +al 00F28E .DrawLevelBlock_Block +al 00F24E .DrawLevelBlock +al 00F248 .DrawLevelBlocks_Block_1 +al 00F23F .DrawLevelBlocks_Block +al 00F23C .DrawLevelBlocks +al 00F228 .FlushPpuBuffer +al 00F214 .FlushPpuBuffer_Block_4 +al 00F211 .FlushPpuBuffer_Block_3 +al 00F20E .FlushPpuBuffer_Block_2 +al 00F202 .FlushPpuBuffer_Block_1 +al 00F1EC .FlushPpuBuffer_Block +al 00F1E5 .ClearNametable_Block_1 +al 00F1CE .ClearNametable_Block +al 00F1B4 .ClearNametable +al 00F19F .HideSpriteGrid_Block_1 +al 00F197 .HideSpriteGrid_Block +al 00F195 .HideSpriteGrid +al 00F16F .DrawSpriteMaskedGrid_Block_1 +al 00F16A .DrawSpriteMaskedGrid_Block +al 00F161 .DrawSpriteMaskedGrid +al 00F141 .DrawSpriteGrid_Block_1 +al 00F13B .DrawSpriteGrid_Block +al 00F139 .DrawSpriteGrid +al 00F124 .DrawSpriteTileRun_Block +al 00F11E .DrawSpriteTileRun +al 00F10E .HideSpriteRange_Block +al 00F10A .HideSpriteRange +al 00F0F2 .DrawSpritePatternReturn +al 00F0E9 .SubCF0E9 +al 00F0E6 .DrawSpritePattern_Block_2 +al 00F0DC .DrawSpritePattern_Block_1 +al 00F0CB .DrawSpritePattern_Block +al 00F0EF .DrawSpritePattern_Block_3 +al 00F094 .DrawSpritePatternMode15 +al 00F092 .SetSpritePatternParams +al 00F08E .DrawSpritePatternMode4 +al 00F08C .SetSpriteDrawOffsetMode4 +al 00F088 .DrawSpritePatternMode1 +al 00F086 .SetSpriteDrawOffsetMode1 +al 00F096 .DrawSpritePattern +al 00F082 .DrawSpritePatternMode0 +al 00F080 .SetSpriteDrawOffset +al 00F078 .DrawSpriteByMode +al 00F075 .SubCF075 +al 00F070 .SubCF070 +al 00F069 .ReadPtrBytePlusZp01 +al 00F063 .ReadPtrBytePlusZp00 +al 00F062 .SubCF062 +al 00F059 .SubCF059 +al 00F057 .SubCEFF3_Block_2 +al 00F018 .SubCEFF3_Block_1 +al 00EFF3 .SubCEFF3 +al 00EFEF .CheckObjectOverlap +al 00EFF5 .SubCEFF3_Block +al 00EFEB .SubCEFEB +al 00EFE8 .LoadObjectRect +al 00EFE2 .ComputeOamOffset +al 00EFDD .ComputeOamOffsetFromZpAE +al 00EFD7 .SubCEFD7 +al 00EFD5 .ComputeOamOffsetFromZp5D +al 00EFAD .SubCEFAD +al 00EFA2 .SubCEFA2 +al 00EFA0 .SubCEF72_Block_2 +al 00EF89 .SubCEF89 +al 00EF87 .SubCEF72_Block +al 00EF94 .SubCEF72_Block_1 +al 00EF72 .SubCEF72 +al 00EF71 .SubCEF51_Block +al 00EF51 .SubCEF51 +al 00EF38 .SubCEF38 +al 00EF2E .SubCEEF7_Block +al 00EF2F .SubCEEF7_Block_1 +al 00EEF7 .SubCEEF7 +al 00EEE6 .SubCEE8D_Block_2 +al 00EED9 .SubCEE8D_Block_1 +al 00EEE7 .SubCEE8D_Block_3 +al 00EE8D .SubCEE8D +al 00EEF0 .SubCEE8D_Block_4 +al 00EED8 .SubCEE8D_Block +al 00EE80 .CheckPlayerCollision_Block +al 00EE79 .CheckPlayerCollision +al 00EE6C .SetSpriteAttributes +al 00EE5C .SubCEE29_Block_2 +al 00EE51 .SubCEE29_Block_1 +al 00EE38 .SubCEE29_Block +al 00EE29 .SubCEE29 +al 00EE26 .SubCEE0C_Block_1 +al 00EE1A .SubCEE0C_Block +al 00EE0C .SubCEE0C +al 00EE0B .SubCEDEB_Block_1 +al 00EE07 .SubCEDEB_Block +al 00EDEB .SubCEDEB +al 00EDD2 .SubCEDC5_Block +al 00EDC5 .SubCEDC5 +al 00EDC4 .SubCED93_Block_2 +al 00EDB5 .SubCED93_Block_1 +al 00EDAD .SubCED93_Block +al 00ED93 .SubCED93 +al 00ED8A .SubCED8A +al 00ED87 .SubCED87 +al 00ED74 .SubCED38_Block_1 +al 00ED38 .SubCED38 +al 00ED85 .SubCED38_Block_2 +al 00ED57 .SubCED38_Block +al 00ED16 .SubCED16 +al 00ED34 .SubCED07_Block +al 00ED07 .SubCED07 +al 00ECFD .SubCECFD +al 00ECF7 .SubCECD3_Block_1 +al 00ECE8 .SubCECD3_Block +al 00ECD3 .SubCECD3 +al 00ECD1 .SubCECBF_Block_1 +al 00ECC6 .SubCECBF_Block +al 00ECBF .SubCECBF +al 00ECBE .SubCEC97_Block_1 +al 00ECAF .SubCEC97_Block +al 00EC80 .UpdateMusic2 +al 00EC76 .SubCEC48_Block_1 +al 00EC97 .SubCEC97 +al 00ECA7 .SubCEC48_Block_2 +al 00EC5B .SubCEC48_Block +al 00EC48 .SubCEC48 +al 00EC44 .SubCEC44 +al 00EC3E .SubCEC29_Block_1 +al 00EC3B .SubCEC29_Block +al 00EC29 .SubCEC29 +al 00EC12 .SubCEC12 +al 00EC03 .SubCEBDA_Block_1 +al 00EC0A .SubCEBDA_Block_2 +al 00EC16 .SubCEBDA_Block_3 +al 00EBED .SubCEBDA_Block +al 00EBDA .SubCEBDA +al 00EBC4 .SubCEBB6_Block_1 +al 00EBBB .SubCEBB6_Block +al 00EBB6 .SubCEBB6 +al 00EBA8 .SubCEBA8 +al 00EBA6 .SubCEBA6 +al 00EBA1 .SubCEBA1 +al 00EB9C .SubCEB9C +al 00EB97 .SubCEB97 +al 00EB92 .SubCEB92 +al 00EB8E .SubCEB8E +al 00EB89 .SubCEB89 +al 00EB85 .SubCEB85 +al 00EB6F .SubCEB06_Block_3 +al 00EB7B .SubCEB06_Block_5 +al 00EB74 .SubCEB06_Block_4 +al 00EB4E .SubCEB2B_Block_4 +al 00EB47 .SubCEB2B_Block_3 +al 00EB40 .SubCEB2B_Block_2 +al 00EB39 .SubCEB2B_Block_1 +al 00EB32 .SubCEB2B_Block +al 00EB2B .SubCEB2B +al 00EB4F .SubCEB06_Block_1 +al 00EB54 .SubCEB06_Block_2 +al 00EB0C .SubCEB06_Block +al 00EB06 .SubCEB06 +al 00EB05 .SubCEAF7_Block +al 00EAF7 .SubCEAF7 +al 00EAEC .LoadSpritePosition +al 00EAE1 .LoadSprite0Position +al 00EADB .SetSpriteSizeAndDraw +al 00EAD6 .SetSpriteSize +al 00EAD4 .SetSpriteTile +al 00EAD1 .UpdateSoundChannel4 +al 00EACD .ClearSpriteDestOffset +al 00EACC .ReadPatternBitAlt_Return_Block +al 00EAC8 .ReadPatternBitAlt_Return +al 00EABF .ReadPatternBitAlt_Block +al 00EAB2 .ReadPatternBitAlt +al 00EAAE .AdvancePatternBitAlt_Block +al 00EAA1 .AdvancePatternBitAlt +al 00EAA0 .SubCEA8A_Block +al 00EA8A .SubCEA8A +al 00EA88 .SubCEA5F_Block_2 +al 00EA72 .SubCEA5F_Block_1 +al 00EA64 .SubCEA5F_Block +al 00EA5F .SubCEA5F +al 00EA5E .SubCEA34_Block +al 00EA34 .SubCEA34 +al 00EA2F .UpdateSoundChannels +al 00EA2A .SubCEA01_Block_1 +al 00EA11 .SubCEA01_Block +al 00EA01 .SubCEA01 +al 00EA00 .SubCE9F3_Block +al 00E9EA .SubCE9EA +al 00E9DA .SubCE9DA +al 00E9F3 .SubCE9F3 +al 00E9BE .SubCE986_Block_1 +al 00E9B4 .SubCE986_Block +al 00E9F0 .SubCE986_Block_2 +al 00E986 .SubCE986 +al 00E981 .SubCE981 +al 00E97A .SetSpritePairY +al 00E971 .SubCE971 +al 00E968 .SubCE968 +al 00E95B .SubCE945_Block +al 00E945 .SubCE945 +al 00E92E .SubCE918_Block +al 00E967 .SubCE945_Block_1 +al 00E918 .SubCE918 +al 00E93B .SubCE84F_Block_6 +al 00E8F8 .SubCE8EA_Block +al 00E8EA .SubCE8EA +al 00E8E3 .SubCE84F_Block_4 +al 00E8FC .SubCE8EA_Block_1 +al 00E8C4 .SubCE84F_Block_3 +al 00E90E .SubCE84F_Block_5 +al 00E901 .SubCE8EA_Block_2 +al 00E89B .SubCE890_Block +al 00E890 .SubCE890 +al 00E889 .SubCE84F_Block_1 +al 00E8A4 .SubCE890_Block_1 +al 00E86A .SubCE84F_Block +al 00E8A9 .SubCE84F_Block_2 +al 00E84F .SubCE84F +al 00E84B .SubCE834_Block +al 00E834 .SubCE834 +al 00E833 .ReadPatternBit_Return_Block +al 00E82F .ReadPatternBit_Return +al 00E826 .ReadPatternBit_Block +al 00E819 .ReadPatternBit +al 00E815 .AdvancePatternBit_Block +al 00E806 .AdvancePatternBit +al 00E7F9 .SubCE7E2_Block_1 +al 00E7E2 .SubCE7E2 +al 00E7F2 .SubCE7E2_Block +al 00E7AE .SubCE7A3_Block +al 00E7A3 .SubCE7A3 +al 00E7A0 .SubCE770_Block_2 +al 00E79D .SubCE770_Block_1 +al 00E790 .SubCE770_Block +al 00E770 .SubCE770 +al 00E769 .SubCE747_Block_2 +al 00E758 .SubCE758 +al 00E755 .SubCE747_Block +al 00E75C .SubCE747_Block_1 +al 00E747 .SubCE747 +al 00E73C .SubCE73C +al 00E72D .SubCE72D +al 00E72E .SubCE702_Block_2 +al 00E721 .SubCE702_Block_1 +al 00E735 .SubCE702_Block_3 +al 00E719 .SubCE702_Block +al 00E702 .SubCE702 +al 00E6FB .SubCE6DE_Block_2 +al 00E6F3 .SubCE6DE_Block_1 +al 00E6DE .SubCE6DE +al 00E6DB .SubCE6C6_Block +al 00E6E3 .SubCE6DE_Block +al 00E6C6 .SubCE6C6 +al 00E6C3 .SubCE6A5_Block_1 +al 00E6BC .SubCE6A5_Block +al 00E6A5 .SubCE6A5 +al 00E69E .SubCE69E +al 00E697 .SubCE697 +al 00E68A .SubCE66D_Block_1 +al 00E67A .SubCE66D_Block +al 00E66D .SubCE66D +al 00E65D .SubCE626_Block_3 +al 00E64D .SubCE626_Block_2 +al 00E640 .SubCE626_Block_1 +al 00E62F .SubCE626_Block +al 00E626 .SubCE626 +al 00E623 .SubCE611_Block_1 +al 00E620 .SubCE611_Block +al 00E611 .SubCE611 +al 00E60C .SubCE5FA_Block +al 00E609 .UpdateMusicEngine +al 00E5FA .SubCE5FA +al 00E60F .SubCE5E8_Block +al 00E5E8 .SubCE5E8 +al 00E5DB .SubCE5DB +al 00E5D9 .SubCE59F_Block_2 +al 00E5E5 .SubCE5DB_Block +al 00E5BE .SubCE59F_Block_1 +al 00E5B4 .SubCE59F_Block +al 00E59F .SubCE59F +al 00E594 .SubCE594 +al 00E592 .SubCE592 +al 00E572 .SubCE572 +al 00E570 .SubCE538_Block_4 +al 00E564 .SubCE538_Block_3 +al 00E553 .SubCE538_Block_2 +al 00E545 .SubCE538_Block +al 00E548 .SubCE538_Block_1 +al 00E538 .SubCE538 +al 00E532 .SubCE532 +al 00E530 .SubCE50C_Block_2 +al 00E522 .SubCE50C_Block +al 00E527 .SubCE50C_Block_1 +al 00E50C .SubCE50C +al 00E4F9 .SubCE4D6_Block +al 00E4D6 .SubCE4D6 +al 00E4D3 .SubCE47A_Block_5 +al 00E4C0 .SubCE47A_Block_4 +al 00E4A8 .SubCE47A_Block_2 +al 00E49B .SubCE47A_Block_1 +al 00E48E .SubCE47A_Block +al 00E4B5 .SubCE47A_Block_3 +al 00E47A .SubCE47A +al 00E466 .SubCE44B_Block_1 +al 00E46D .SubCE46D +al 00E451 .SubCE44B_Block +al 00E44B .SubCE44B +al 00E429 .SubCE41B_Block +al 00E436 .SubCE41B_Block_1 +al 00E41B .SubCE41B +al 00E413 .SubCE413 +al 00E411 .SubCE3ED_Block_1 +al 00E403 .CheckGameState_3 +al 00E408 .SubCE3ED_Block +al 00E3E6 .SubCE3C0_Block_2 +al 00E3DD .SubCE3C0_Block_1 +al 00E3ED .SubCE3ED +al 00E3CE .SubCE3C0_Block +al 00E3C0 .SubCE3C0 +al 00E3BA .SubCE3AF_Block +al 00E3AF .SubCE3AF +al 00E3AA .SubCE39B_Block +al 00E39B .SubCE39B +al 00E396 .SubCE387_Block +al 00E387 .SubCE387 +al 00E385 .SubCE368_Block_1 +al 00E374 .SubCE368_Block +al 00E368 .SubCE368 +al 00E365 .SubCE365 +al 00E363 .SubCE34B_Block +al 00E34B .SubCE34B +al 00E349 .SubCE325_Block_2 +al 00E33B .SubCE325_Block +al 00E340 .SubCE325_Block_1 +al 00E325 .SubCE325 +al 00E323 .SubCE2F9_Block_2 +al 00E31A .SubCE2F9_Block_1 +al 00E305 .SubCE2F9_Block +al 00E2F9 .SubCE2F9 +al 00E2F6 .SubCE2F6 +al 00E2F4 .SubCE2DD_Block_1 +al 00E2EB .SubCE2DD_Block +al 00E2D9 .SubCE2B6_Block +al 00E2DD .SubCE2DD +al 00E2B6 .SubCE2B6 +al 00E2B3 .DispatchObjectState_Loop_Block_4 +al 00E29C .SubCE29C +al 00E28C .InitSound_3_Block +al 00E28A .InitSound_3 +al 00E280 .SubCE280 +al 00E278 .UpdateBallTrajectory +al 00E2A1 .DispatchObjectState_Loop_Block_3 +al 00E29A .DispatchObjectState_Loop_Block_2 +al 00E295 .DispatchObjectState_Loop_Block_1 +al 00E28F .DispatchObjectState_Loop_Block +al 00E292 .SubCE292 +al 00E254 .DispatchObjectState_Loop +al 00E250 .DispatchObjectStateZpAF +al 00E24F .SubCE225_Block_2 +al 00E237 .SubCE225_Block_1 +al 00E21F .SubCE21F +al 00E228 .SubCE225_Block +al 00E213 .UpdateObjectListZpAE_Block_1 +al 00E200 .UpdateObjectListZpAE_Block +al 00E225 .SubCE225 +al 00E1E9 .UpdateObjectListZpAE +al 00E1E5 .InitObjectListZpAE +al 00E1E0 .SubCE1E0 +al 00E1D7 .SubCE1D7 +al 00E1D5 .SubCE19A_Block_2 +al 00E1E4 .SubCE1E0_Block +al 00E1BF .SubCE19A_Block_1 +al 00E19F .SubCE19A_Block +al 00E19A .SubCE19A +al 00E199 .CountObjectTypes_Loop_Block_2 +al 00E187 .CountObjectTypes_Loop_Block_1 +al 00E17F .CountObjectTypes_Loop_Block +al 00E172 .CountObjectTypes_Loop +al 00E16A .CountObjectTypes_Block +al 00E166 .CountObjectTypes +al 00E144 .UnreachedCode_E144 +al 00E141 .SubCE141 +al 00E13E .SubCE130_Block +al 00E130 .SubCE130 +al 00E12B .SearchTableForByte_Return +al 00E124 .SearchTableForByte_Loop_Block +al 00E129 .SearchTableForByte_Loop_Block_1 +al 00E116 .SearchTableForByte_Loop +al 00E112 .SearchTableForByte +al 00E10F .SubCE10F +al 00E107 .SubCE0F1_Block +al 00E0F1 .SubCE0F1 +al 00E0EC .SubCE0EC +al 00E109 .SubCE0F1_Block_1 +al 00E0E9 .SubCE0AE_Block_3 +al 00E0DD .SubCE0AE_Block_2 +al 00E0D1 .SubCE0AE_Block_1 +al 00E0CB .SubCE0AE_Block +al 00E0AE .SubCE0AE +al 00E0AB .SubCE0A1_Block +al 00E0A1 .SubCE0A1 +al 00E09F .SubCE090_Block +al 00E090 .SubCE090 +al 00E07B .SubCE07B +al 00E08D .SubCE07B_Block_1 +al 00E08A .SubCE07B_Block +al 00E06A .SubCE06A +al 00E079 .SubCE05A_Block +al 00E05A .SubCE05A +al 00E057 .SubCE048_Block +al 00E048 .SubCE048 +al 00E045 .SubCE02F_Block_1 +al 00E041 .SubCE02F_Block +al 00E02F .SubCE02F +al 00E016 .FindYRowIndex +al 00E015 .SubCE011_Block +al 00E011 .SubCE011 +al 00E008 .SubCDFFB_Block +al 00DFFB .SubCDFFB +al 00DFF7 .SubCDFE8_Block +al 00DFE8 .SubCDFE8 +al 00DFE4 .CheckPeriodicEventForObject +al 00DFE3 .SubCDFC3_Block +al 00DFC3 .SubCDFC3 +al 00DFB8 .SubCDFAD_Block +al 00DFAD .SubCDFAD +al 00DF89 .SubCDF72_Block_2 +al 00DF7D .SubCDF72_Block_1 +al 00DF7B .SubCDF72_Block +al 00DF72 .SubCDF72 +al 00DF8F .SubCDF72_Block_3 +al 00DF6C .SubCDF40_Block_5 +al 00DF60 .SubCDF40_Block_4 +al 00DF5E .SubCDF40_Block_3 +al 00DF55 .SubCDF40_Block_2 +al 00DF4C .SubCDF40_Block_1 +al 00DF45 .SubCDF40_Block +al 00DF40 .SubCDF40 +al 00DF35 .SubCDF27_Block +al 00DF27 .SubCDF27 +al 00DF25 .HandleObjectState40_Block_1 +al 00DF0F .HandleObjectState40_Block +al 00DF07 .HandleObjectState40 +al 00DEDC .SubCDEA5_Block +al 00DEFB .SubCDEFB +al 00DEED .SubCDEA5_Block_2 +al 00DEF2 .SubCDEA5_Block_3 +al 00DEE8 .SubCDEA5_Block_1 +al 00DEA5 .SubCDEA5 +al 00DE9F .SubCDE86_Block_1 +al 00DE90 .SubCDE86_Block +al 00DEA4 .SubCDEA4 +al 00DE86 .SubCDE86 +al 00DE82 .SubCDE82 +al 00DE73 .SubCDE73 +al 00DE6A .SubCDE6A +al 00DE68 .SubCDE56_Block +al 00DE50 .SubCDE27_Block_1 +al 00DE56 .SubCDE56 +al 00DE36 .SubCDE27_Block +al 00DE27 .SubCDE27 +al 00DE1A .SubCDE1A +al 00DE85 .SubCDE82_Block +al 00DE0D .SubCDE0D +al 00DE0B .SubCDDB2_Block_3 +al 00DE10 .SubCDE0D_Block +al 00DDF5 .SubCDDB2_Block_2 +al 00DE13 .SubCDDB2_Block_4 +al 00DDC9 .SubCDDB2_Block +al 00DDB2 .SubCDDB2 +al 00DDB0 .HandleObjectStateC0_Block_2 +al 00DDAB .HandleObjectStateC0_Block_1 +al 00DDD7 .SubCDDB2_Block_1 +al 00DD98 .HandleObjectStateC0_Block +al 00DD8B .HandleObjectStateC0 +al 00DD7F .SubCDD7F +al 00DD6A .UpdateSpritePosition68_Block_3 +al 00DD73 .UpdateSpritePosition68_Block_4 +al 00DD59 .UpdateSpritePosition68_Block_1 +al 00DD60 .UpdateSpritePosition68_Block_2 +al 00DD3A .UpdateSpritePosition68_Block +al 00DD32 .UpdateSpritePosition68 +al 00DD06 .SubCDD06 +al 00DD25 .SubCDD06_Block_1 +al 00DD13 .SubCDD06_Block +al 00DCF3 .SubCDCF3 +al 00DD00 .HandleObjectState10_Block_1 +al 00DCD8 .HandleObjectState10_Block +al 00DCD0 .HandleObjectState10 +al 00DCC9 .SubCDCC9 +al 00DCBC .SubCDC90_Block +al 00DCCF .SubCDCC9_Block +al 00DC8E .HandleObjectState08_Block_1 +al 00DC90 .SubCDC90 +al 00DC71 .HandleObjectState08_Block +al 00DC69 .HandleObjectState08 +al 00DC51 .SubCDC51 +al 00DC4F .HandleObjectState02_Block +al 00DC68 .SubCDC51_Block +al 00DC30 .HandleObjectState02 +al 00DC2D .SubCDC2D +al 00DC2B .UpdateObjectAnimationFrame_Block_3 +al 00DC16 .UpdateObjectAnimationFrame_Block_1 +al 00DC1B .UpdateObjectAnimationFrame_Block_2 +al 00DBFB .UpdateObjectAnimationFrame_Block +al 00DBEE .UpdateObjectAnimationFrame +al 00DBE7 .SubCDBE7 +al 00DBCD .UpdateSpritePosition57_Block +al 00DBED .SubCDBE7_Block +al 00DBB6 .UpdateSpritePosition57 +al 00DBA3 .SubCDB50_Block +al 00DBAC .SubCDB50_Block_1 +al 00DB50 .SubCDB50 +al 00DB4E .HandleObjectState01_Block_1 +al 00DB34 .HandleObjectState01_Block +al 00DB2C .HandleObjectState01 +al 00DB2B .SubCDB2B +al 00DB21 .HandleObjectState81_Block +al 00DB00 .HandleObjectState81 +al 00DAF7 .SubCDAF7 +al 00DAF2 .SubCDAD5_Block +al 00DAD5 .SubCDAD5 +al 00DAC3 .HandleObjectState80_Block +al 00DAFF .SubCDAF7_Block +al 00DA9C .HandleObjectState80 +al 00DA98 .DispatchObjectStateZp5E_Block_8 +al 00DA95 .DispatchObjectStateZp5E_Block_7 +al 00DA92 .DispatchObjectStateZp5E_Block_6 +al 00DA8F .DispatchObjectStateZp5E_Block_5 +al 00DA89 .DispatchObjectStateZp5E_Block_4 +al 00DA86 .DispatchObjectStateZp5E_Block_3 +al 00DA83 .DispatchObjectStateZp5E_Block_2 +al 00DA80 .DispatchObjectStateZp5E_Block_1 +al 00DA7D .DispatchObjectStateZp5E_Block +al 00DA4C .DispatchObjectStateZp5E +al 00DA40 .UpdateObjectListZp5D_Block_2 +al 00DA3D .UpdateObjectListZp5D_Block_1 +al 00DA1D .UpdateObjectListZp5D_Block +al 00DA16 .UpdateObjectListZp5D +al 00DA13 .SubCDA0F_Block +al 00DA0F .SubCDA0F +al 00DA06 .SubCD9F9_Block +al 00D9F9 .SubCD9F9 +al 00D9F5 .SubCD9E8_Block +al 00D9E8 .SubCD9E8 +al 00D9E6 .CheckPeriodicEvent +al 00D9D4 .SubCD9D4 +al 00D9D0 .SubCD990_Block_2 +al 00D9E3 .SubCD9E3 +al 00D9E0 .SubCD9D4_Block +al 00D9AF .SubCD990_Block_1 +al 00D99D .SubCD990_Block +al 00D990 .SubCD990 +al 00D98D .SubCD98D +al 00D986 .SubCD93C_Block_1 +al 00D98B .SubCD93C_Block_2 +al 00D964 .SubCD93C_Block +al 00D93C .SubCD93C +al 00D93B .SubCD92D_Block +al 00D92D .SubCD92D +al 00D938 .SubCD91A_Block +al 00D91A .SubCD91A +al 00D911 .SubCD8EB_Block_1 +al 00D914 .SubCD8EB_Block_2 +al 00D904 .SubCD8EB_Block +al 00D917 .SubCD917 +al 00D8EB .SubCD8EB +al 00D8E8 .SubCD8E8 +al 00D8E6 .SubCD8B9_Block_1 +al 00D8E1 .SubCD8B9_Block +al 00D8B9 .SubCD8B9 +al 00D8AD .CheckSpriteListCollision +al 00D8A7 .SubCD87D_Block +al 00D8A8 .SubCD8A8 +al 00D87D .SubCD87D +al 00D86F .SubCD800_Block_7 +al 00D856 .SubCD800_Block_5 +al 00D867 .SubCD800_Block_6 +al 00D849 .SubCD800_Block_4 +al 00D827 .SubCD800_Block_3 +al 00D81E .SubCD800_Block_2 +al 00D80E .SubCD800_Block_1 +al 00D805 .SubCD800_Block +al 00D800 .SubCD800 +al 00D7F2 .SubCD7F2 +al 00D7DA .SubCD7DA +al 00D7D3 .SubCD7BF_Block +al 00D7BF .SubCD7BF +al 00D7BA .SubCD7BA +al 00D7B8 .SubCD7AD_Block +al 00D7AD .SubCD7AD +al 00D79B .SubCD79B +al 00D795 .SubCD769_Block_1 +al 00D786 .SubCD769_Block +al 00D769 .SubCD769 +al 00D767 .SubCD753_Block +al 00D753 .SubCD753 +al 00D74F .SubCD713_Block_2 +al 00D732 .SubCD713_Block +al 00D73E .SubCD713_Block_1 +al 00D713 .SubCD713 +al 00D705 .SubCD705 +al 00D703 .SubCD6C6_Block_5 +al 00D6FE .SubCD6C6_Block_4 +al 00D6F2 .SubCD6C6_Block_3 +al 00D710 .SubCD6C6_Block_7 +al 00D70A .SubCD6C6_Block_6 +al 00D6E8 .SubCD6C6_Block_2 +al 00D6D9 .SubCD6C6_Block_1 +al 00D6CD .SubCD6C6_Block +al 00D6C6 .SubCD6C6 +al 00D6B7 .SubCD6B7 +al 00D6B1 .SubCD697_Block +al 00D6C5 .SubCD6B7_Block +al 00D697 .SubCD697 +al 00D650 .UnreachedCode_D650 +al 00D642 .SubCD60D_Block +al 00D64F .SubCD60D_Block_1 +al 00D60D .SubCD60D +al 00D5F6 .SubCD5F6 +al 00D5F1 .SubCD5F1 +al 00D5CC .SubCD5B3_Block +al 00D5E2 .SubCD5B3_Block_1 +al 00D5B3 .SubCD5B3 +al 00D5AF .SubCD56C_Block_4 +al 00D59A .SubCD56C_Block_2 +al 00D5A1 .SubCD56C_Block_3 +al 00D58C .SubCD56C_Block_1 +al 00D56C .SubCD56C +al 00D56A .SubCD547_Block_2 +al 00D570 .SubCD56C_Block +al 00D55A .SubCD547_Block_1 +al 00D551 .SubCD547_Block +al 00D547 .SubCD547 +al 00D544 .SubCD50A_Block +al 00D50A .SubCD50A +al 00D509 .SubCD501_Block +al 00D501 .SubCD501 +al 00D4F9 .SubCD4F9 +al 00D4EE .SubCD4EE +al 00D4ED .UpdateSpritePosition49_Block +al 00D4CF .UpdateSpritePosition49 +al 00D4CC .SubCD4CC +al 00D4C6 .SubCD4B1_Block +al 00D4B1 .SubCD4B1 +al 00D49F .SubCD49F +al 00D49D .SubCD432_Block_5 +al 00D478 .SubCD478 +al 00D476 .SubCD432_Block_3 +al 00D471 .SubCD432_Block_2 +al 00D48B .SubCD432_Block_4 +al 00D45A .SubCD432_Block_1 +al 00D445 .SubCD432_Block +al 00D432 .SubCD432 +al 00D42C .SubCD42C +al 00D426 .SubCD40D_Block +al 00D40D .SubCD40D +al 00D3FB .SubCD3FB +al 00D3F9 .UpdateSpritePosition44_Block_6 +al 00D3D2 .SubCD3D2 +al 00D3D0 .UpdateSpritePosition44_Block_4 +al 00D3BB .UpdateSpritePosition44_Block_2 +al 00D3E7 .UpdateSpritePosition44_Block_5 +al 00D3AF .UpdateSpritePosition44_Block_1 +al 00D3CD .UpdateSpritePosition44_Block_3 +al 00D39C .UpdateSpritePosition44_Block +al 00D38B .UpdateSpritePosition43_Block +al 00D38E .UpdateSpritePosition44 +al 00D37E .UpdateSpritePosition43 +al 00D37B .UpdateSpritePosition42_3 +al 00D373 .UpdateSpritePosition42_1_Block +al 00D36A .UpdateSpritePosition42_1 +al 00D360 .UpdateSpritePosition41 +al 00D35E .UpdateSpritePosition40_Block_2 +al 00D353 .UpdateSpritePosition40_Block_1 +al 00D34E .UpdateSpritePosition40_Block +al 00D365 .UpdateSpritePosition40_Block_3 +al 00D32F .UpdateSpritePosition40 +al 00D326 .UpdateSpritePosition39 +al 00D323 .UpdateSpritePosition38 +al 00D2FD .UpdateSpritePosition37 +al 00D2F0 .UpdateSpritePosition36_Block +al 00D2DF .UpdateSpritePosition36 +al 00D2DD .UpdateSpritePosition35_Block +al 00D2CB .UpdateSpritePosition35 +al 00D2CA .UpdateSpritePosition34_Block +al 00D28B .UpdateSpritePosition34 +al 00D288 .UpdateSpritePosition33_Block +al 00D275 .UpdateSpritePosition33 +al 00D25D .UpdateSpritePosition32 +al 00D25B .UpdateSpritePosition31_Block_3 +al 00D26D .UpdateSpritePosition31_Block_5 +al 00D262 .UpdateSpritePosition31_Block_4 +al 00D23E .UpdateSpritePosition31_Block_2 +al 00D227 .UpdateSpritePosition31_Block +al 00D233 .UpdateSpritePosition31_Block_1 +al 00D208 .UpdateSpritePosition31 +al 00D205 .UpdateSpritePosition30_Block_4 +al 00D1F9 .UpdateSpritePosition30_Block_3 +al 00D1F3 .UpdateSpritePosition30_Block_2 +al 00D1E2 .UpdateSpritePosition30_Block +al 00D1E5 .UpdateSpritePosition30_Block_1 +al 00D1CF .UpdateSpritePosition30 +al 00D1CC .UpdateSpritePosition29_Block_3 +al 00D1C9 .UpdateSpritePosition29_Block_2 +al 00D1C6 .UpdateSpritePosition29_Block_1 +al 00D1C3 .UpdateSpritePosition29_Block +al 00D1AA .UpdateSpritePosition29 +al 00D1BB .UpdateSpritePosition28_Block +al 00D1A4 .UpdateSpritePosition28 +al 00D19A .UpdateSpritePosition27 +al 00D199 .UpdateSpritePosition26_Block_1 +al 00D189 .UpdateSpritePosition26_Block +al 00D175 .UpdateSpritePosition26 +al 00D166 .UpdateSpritePosition24_Block_4 +al 00D169 .UpdateSpritePosition25 +al 00D14B .UpdateSpritePosition24_Block_3 +al 00D139 .UpdateSpritePosition24_Block_2 +al 00D11D .UpdateSpritePosition23_Block_6 +al 00D115 .UpdateSpritePosition23_Block_5 +al 00D11F .UpdateSpritePosition24 +al 00D101 .UpdateSpritePosition23_Block_4 +al 00D0F4 .UpdateSpritePosition23_Block_2 +al 00D0F8 .UpdateSpritePosition23_Block_3 +al 00D0DD .UpdateSpritePosition23_Block +al 00D0E4 .UpdateSpritePosition23_Block_1 +al 00D130 .UpdateSpritePosition24_Block +al 00D138 .UpdateSpritePosition24_Block_1 +al 00D0C0 .UpdateSpritePosition23 +al 00D0B5 .UpdateSpritePosition22_3 +al 00D0AA .UpdateSpritePosition22_1_Block_2 +al 00D0A5 .UpdateSpritePosition22_1_Block_1 +al 00D086 .UpdateSpritePosition22_1 +al 00D065 .UpdateSpritePosition21_3_Block_1 +al 00D074 .UpdateSpritePosition21_3_Block_2 +al 00D0BF .UpdateSpritePosition22_3_Block +al 00D063 .UpdateSpritePosition21_3_Block +al 00D092 .UpdateSpritePosition22_1_Block +al 00D04C .UpdateSpritePosition21_3 +al 00D04B .UpdateSpritePosition21_1_Block +al 00D041 .UpdateSpritePosition21_1 +al 00D032 .UpdateSpritePosition20 +al 00D02A .UpdateSpritePosition19_Block +al 00D008 .UpdateSpritePosition19 +al 00CFF9 .UpdateSpritePosition18_Block_1 +al 00CFCD .UpdateSpritePosition18_Block +al 00CFC6 .UpdateSpritePosition18 +al 00CFB8 .UpdateSpritePosition17_Block_1 +al 00CFAC .UpdateSpritePosition17_Block +al 00CFA8 .UpdateSpritePosition17 +al 00CFA1 .UpdateSpritePosition15_Block_6 +al 00CF9B .UpdateSpritePosition15_Block_5 +al 00CF87 .UpdateSpritePosition16 +al 00CF79 .UpdateSpritePosition15_Block_1 +al 00CF7A .UpdateSpritePosition15_Block_2 +al 00CF92 .UpdateSpritePosition15_Block_4 +al 00CF55 .UpdateSpritePosition15_Block +al 00CF8F .UpdateSpritePosition15_Block_3 +al 00CF42 .UpdateSpritePosition15 +al 00CF2B .UpdateSpritePosition14 +al 00CF2A .UpdateSpritePosition13_3_Block +al 00CF1C .UpdateSpritePosition13_3 +al 00CF19 .UpdateSpritePosition13_1 +al 00CF13 .UpdateSpritePosition12 +al 00CF0D .UpdateSpritePosition11_Block_1 +al 00CF01 .UpdateSpritePosition11_Block +al 00CED3 .UpdateSpritePosition10_Block_7 +al 00CED6 .UpdateSpritePosition11 +al 00CEC1 .UpdateSpritePosition10_Block_6 +al 00CEB8 .UpdateSpritePosition10_Block_5 +al 00CEB1 .UpdateSpritePosition10_Block_4 +al 00CEA2 .UpdateSpritePosition10_Block_2 +al 00CEAE .UpdateSpritePosition10_Block_3 +al 00CE8B .UpdateSpritePosition10_Block +al 00CE94 .UpdateSpritePosition10_Block_1 +al 00CE7C .UpdateSpritePosition10 +al 00CE2F .UpdateSpritePosition9_Block +al 00CE24 .UpdateSpritePosition9 +al 00CE1F .UpdateSpritePosition8_Block +al 00CE0E .UpdateSpritePosition8 +al 00CDF3 .UpdateSpritePosition6_Block_2 +al 00CDEF .UpdateSpritePosition6_Block_1 +al 00CDCA .UpdateSpritePosition7 +al 00CDD7 .UpdateSpritePosition6_Block +al 00CDB1 .UpdateSpritePosition6 +al 00CDAE .UpdateSpritePosition5_Block +al 00CD9D .UpdateSpritePosition5 +al 00CD89 .UpdateSpritePosition4 +al 00CD7F .UpdateSpritePosition3 +al 00CD76 .UpdateSpritePosition2 +al 00CD6F .UpdateSpritePosition +al 00CD6C .UpdateGameTimer_Block_7 +al 00CD69 .UpdateGameTimer_Block_6 +al 00CD66 .UpdateGameTimer_Block_5 +al 00CD61 .UpdateGameTimer_Block_4 +al 00CD58 .UpdateGameTimer_Block_3 +al 00CD4F .UpdateGameTimer_Block_2 +al 00CD4A .UpdateGameTimer_Block_1 +al 00CD45 .UpdateGameTimer_Block +al 00CD22 .UpdateGameTimer +al 00CD13 .CheckGameState_1_Block_1 +al 00CD07 .CheckGameState_1_Block +al 00CCF4 .CheckGameState_1 +al 00CCF3 .UpdateScroll8_Block +al 00CCD6 .UpdateScroll8 +al 00CCC1 .UpdateScroll7 +al 00CCA6 .InitScroll_Block_2 +al 00CC99 .InitScroll_Block_1 +al 00CC4A .InitScroll_Block +al 00CC47 .InitScroll +al 00CC34 .UpdateScroll6 +al 00CC24 .SubCCC24 +al 00CC23 .UpdateScroll5 +al 00CC04 .UpdateScroll4 +al 00CC03 .UpdateOAM3 +al 00CBF7 .UpdateOAM2 +al 00CBF5 .UpdateOAM +al 00CBEB .CopyVramDataToBuffer_Block +al 00CBDF .CopyVramDataToBuffer +al 00CBF4 .UpdateScroll3 +al 00CBCA .UpdateScroll2 +al 00CBBD .UpdateScroll +al 00CBB7 .WaitVBlank_1 +al 00CBAE .ClearZeropage +al 00CB9E .HandleController_Block_7 +al 00CB7B .HandleController_Block_6 +al 00CB46 .HandleController_Block_3 +al 00CB47 .HandleController_Block_4 +al 00CB58 .HandleController_Block_5 +al 00CB36 .HandleController_Block_1 +al 00CB39 .HandleController_Block_2 +al 00CB30 .HandleController_Block +al 00CB1B .HandleController +al 00CB15 .UpdateSpriteData_Block_5 +al 00CAF6 .UpdateSpriteData_Block_2 +al 00CAFA .UpdateSpriteData_Block_3 +al 00CAE7 .UpdateSpriteData_Block_1 +al 00CB18 .UpdateSpriteData_Block_6 +al 00CB02 .UpdateSpriteData_Block_4 +al 00CAD8 .UpdateSpriteData_Block +al 00CAC9 .UpdateSpriteData +al 00CABB .CopyFromOAM_Block +al 00CAB9 .CopyFromOAM +al 00CAAB .CopyToOAM_Block +al 00CAA9 .CopyToOAM +al 00CA99 .UpdateSprites_Block_6 +al 00CA94 .UpdateSprites_Block_5 +al 00CA53 .UpdateSprites2 +al 00CA79 .UpdateSprites_Block_4 +al 00CA64 .UpdateSprites_Block_3 +al 00CA5F .UpdateSprites_Block_2 +al 00CA5A .UpdateSprites_Block_1 +al 00CA4A .UpdateSprites_Block +al 00CA30 .UpdateSprites +al 00CA26 .InitGameState_Block_1 +al 00CA06 .InitGameState_Block +al 00C9B1 .InitGameState +al 00C9AD .UpdateGameState3_Block_1 +al 00C991 .UpdateGameState3_Block +al 00C989 .UpdateGameState2_Block_2 +al 00C976 .UpdateGameState2_Block +al 00C985 .UpdateGameState2_Block_1 +al 00C95C .UpdateGameState_Block +al 00C98A .UpdateGameState3 +al 00C95D .UpdateGameState2 +al 00C940 .UpdateGameState +al 00C914 .InitLevel +al 00C8FE .InitSound_1 +al 00C8F3 .InitAPU +al 00C8E8 .NmiFrameEnd +al 00C8CB .NmiFrameUpdate2 +al 00C8D7 .NmiFrameUpdate4 +al 00C8A5 .NmiHandler_Block +al 00C8D4 .NmiFrameUpdate3 +al 00C8C1 .NmiFrameUpdate +al 00C85F .NmiHandler +al 00C853 .LoadObjectPointerToZp08 +al 00C847 .LoadObjectPointerToZp02 +al 00C831 .LoadObjectAndLevelPointers +al 00C823 .LoadObjectPointerToZp00AndDraw +al 00C815 .LoadObjectPointerToZp02AndDraw +al 00C807 .LoadSpriteInitPointerToZp00 +al 00C7E7 .InitPPURegisters +al 00C7E1 .GameLoopEntry +al 00C7B9 .Reset_Block_1 +al 00C7A8 .Reset_Block +al 00C79E .Reset +al 00C4B0 .SpriteInitPtrTable +al 00C044 .LevelDataPtrTable +al 00C03C .ObjectPtrTable +al 00C000 .LevelPtrTable diff --git a/Donkey Kong (JU)/copilot/reconstructed.map b/Donkey Kong (JU)/copilot/reconstructed.map new file mode 100644 index 0000000..1ad1cc6 --- /dev/null +++ b/Donkey Kong (JU)/copilot/reconstructed.map @@ -0,0 +1,32 @@ +Modules list: +------------- +header.o: + HEADER Offs=000000 Size=000010 Align=00001 Fill=0000 +prg.o: + PRG Offs=000000 Size=004000 Align=00001 Fill=0000 +chr.o: + CHR Offs=000000 Size=002000 Align=00001 Fill=0000 + + +Segment list: +------------- +Name Start End Size Align +---------------------------------------------------- +CHR 000000 001FFF 002000 00001 +HEADER 000000 00000F 000010 00001 +PRG 00C000 00FFFF 004000 00001 + + +Exports list by name: +--------------------- + + + +Exports list by value: +---------------------- + + + +Imports list: +------------- + diff --git a/_wip/Donkey Kong (JU)/copilot/reconstructed_prg.bin b/Donkey Kong (JU)/copilot/reconstructed.nes similarity index 65% rename from _wip/Donkey Kong (JU)/copilot/reconstructed_prg.bin rename to Donkey Kong (JU)/copilot/reconstructed.nes index d85d6574436482b0ddd26f0443c8f7ac32c73274..ecd6f0a740de52e799a814dd9f14aef4a811e7d2 100644 GIT binary patch delta 8282 zcmcgxeQX@paesSzygfyy+jA7uWJTRBt>`07YhNlrI$5XNv!b*{95^xwujF(XPb8mN{nt{_D&P=Q>6 zg}4-#yZz1E-MbSbHz-heK<>QR_h#O_c{B57-i(a2?4*ZfGxH_QD(v|0H<2y*h?A0l1b7ZGL$^wG!(F1&+B*HqHCe8 z>!94aX<2p8<1RBX;La`Br>V+zKCPzg0ZCCbHMPPCm#+J@xgcQdh~+q*7cZa|gbPp; z(_&^tlI90B?aSL?df|j#?1W^!+rD?{_=ntf&K=7^10|i)E0w5$mYz#1jOii5Yde=t zCK6Ettz1!8+Arb}5jI!Q zAf*ACUXm)*RfX&UFq=eFBq1hJ4=&0W0!wJaX-N#PlF^JR?V%JhpdnU4SWy(2qyUEv z;_HUpJA!WDhNf!t0u93M!fX)u%`&|La2S_>d`8G60ugcf7BfxYAb7`~NL;*n@kls6 z2-Ltn{>+}4Drm=KZ1jkIz4d2XHDs&BMVbu!vZDUU-$QxeAb3vMT>19!x8IKWoj|>M zbI(i$v?jwd%*bME}-40iB7zC=$i%j;`#$ukJ8t1%Ko}0tlU~=?W5`NEN&dmLe>2pc z?S@hA-z~g0!EEQT^nu9>zU_=TCw~9hfba4POVBu@*RV3D03{AC&IgALp?98_4dXCh znmbr5m3gyQsA!%#-TMB5Wmgz`aQ2aF3*T>@K4r4OM`j;H&{>5>5KOPuILjdStJx%9 zy>(me6RL9b?3Y%lJ*rY{c;3x1$72 z#`Z4!;`Z!M_pM(8BmQDxFHSl|?mu~a+P^|MkM%bFM#;MpOpTs|1^qf+nfPZcZ~P?) zFzJnY1IrtP5gR^Sw`yM%1K^vD7o`^)AUGTNn;-u3@y&j&?~kXy{M==c4rC~gJ~@-S zPscJu4j9;w%S6e5Suhs*twQ>#37E}7n;lK23!;H`hkw(CHoty1{yjX|7BF!)0s25J zV8f=n379w<^C$P*jekR%U%&5e{5;tfF!5AdfLf>;A~GK^sya8S1K}G}+`4FUPhI;VzgKDfH@_#%42j+{WiCu9{{?$o3-~o9o7E28=99R?zF~<8+ z6T2Q`Y@3)k#vftW6|X#uLDF6k>0&euRF}$o6OHd!ZNSCObhG zIoN~CA`7_A@GieUP5iKsqJdvvs=X+APwgv~4;OlI`Z=~=!r^nmvE3pnXG9CfKf`~~ zblKh&w)r^7|Hc0Q57WcVxAv*z$szu%(z9mux^+7vEU#i5X2$s{F}WuT?0W7^WDv{s zupw}782LXZZ!85D1a@(V0**80`zbeTQf@}&oM*D6D(iPjYC=)rp4hL1oOt10csWe| z@VVERgJgZGP<3*YUEF%DT5v9SK9y9QHNHhMS<V4&u|HEFdR9S*@-HC@jf7l}sj? zC>u~eVu)}cN@)N(6)2xG`vSnZU^89cqB9*DuHC-#`9o!-`i-A_V(X4eBmZ#ez2~=_ zOPht)es+4K&eLBj{Kdh~Zu>1dNZ99g^|dA@Cr>wSo4Q%{-Pu!i{gqdK z@XC$$aP~F8e>~cuOSM|5%LmAYTLAF@5}r-P6l2uar7t?FH43lx{Qc!pvB0Wr4(hCR z$aX~(4~Pn+m?S4ez0@Yz3Xb7{GkO3{bXi?R5 z=&;C(=f{lUnmPl*)=)4sME}wIAfiJOJc5opA)1+d487FCm)0(|xB6hgOh7 zcbF6kb(@qXZJU%ap>W4G;R4172M5{U<9`&;hb`c7P=kYfaGZ#5a2!OGhW$;OM2<)M zK2QKbei2w<_$&hSsH@kl1qecA3bog*R(pO^zs=^B2*&0vUj7+C5PXi=L|nc&H+I(n z?S5y>W4<^O-}Db1J_rzm&pc`$KIFgooBDBNE(emwZ6p9JIBdN<9}E;8V9@bf

tX$&{mo`G2t>-ORwH)^5oZSuP#y?@vPf@lCszl^EP&W$aL$I~ zVtfP_M2Vx$d0`1WEHmtn@!Plnstl;_#{IyWnm0IMQ8x!XaGknGc11ZAe$%ni?$Bj{ zhyJA*e27lqzrBox6qVa?`7O$AD1~`N(QMizCD_TvMkZU=u5Gx7^nrzh-h@|x$x-)q z16{bueUOG)Fo|mveA$bOIjD@w5IW}RdJFfQ5k|G4NI4zRYZ%=33a-yJwXaY^sUl$M zxy|rev0|b*J^W?&7GVNDJ2k4QzxP;0U>*jI?FaLi$srlSOXnBJ2m+=?QIn&pjA_g9 z9A_j=w1a91-b7$p5yB-0s#bJ}PLHmC?f@Pb8cHUN#%qBYxf4c124QcJ#%B|s5^Si5 z%`sgcGiemSvP`Kbne2gmMI|Ke65*Zzn2@kBN{qG27Qv5uC!rWR1(rCm(Qs%%;SDQt zF|zYO#U?JP@J3)_RCq82q|(@Ff~ncIh2|Ggql>TTP=>4;s@j(m3#2JD?z_$iJ~)Y) z{-@7hhk=9>f(nF%__+2g5d;hKi>~wLClUgqmyBzTkdZB0FM6n4%5W`&F?c-}oy>&o z=zbu?s6K5oorD6gf0KSwfp=luWFe}55$OVO?@y&<6kJjwDO?&>ghW99PI^kR!J9(G zWwA3su)H|GaBF7SbFa>a`Uda5bLQ&ej@`6k0SY{F-#2O!s$&D!egV^T{E8&HxOo2K z+e6=d(X-oe{HyoGB`O5aH=W5Gck-pLZ%X0b$@51?A;3$?k|J2e$eR`S}j37379FjQkkB?5xKKsJBp$$(F33%t-GsB~=bygsZ4V!}7 zCXa^W5twKRCnUkhmbwXL;h8W!8CQW{3l!a$BXmg@SYMJ9y5VCo{0}~dRtOXb)URgC zJP2kNTmvWqIF9fQAOW6hil~8qGFIT+7=}rwj(u>BE~|g_o<*Wy!4Rk58*{MO;;|22 z#^rc`RFApz0Q0NL@EIG~g_BgVvxL3V_4=v0M|a;H-@L;jdgWXB=D#BT5!Ajv4Hmc= zCJZtCqVRaVxeV_|NHv2c`WVI43rsFBtYu>i4`40(>KTQOSyF)01Hg^-`TQE>YUGDb z0_$?BXD^2#90Vbz)dFmKm~gLJqlwU&)!K1IDL!0YoE(k3ganJpFbA=PyBi^KnSi!w znW6`NXj?j(h&p`6;V?y=55Succ05h6BPN-B>eO2|$R8po?SA$3*I(UTifLdu#hE1b zTvo6V$kW&b9;Iuj#!UQ=;U7kFa6e~%aQnYZh8qrHBD|MVI0t~~NY+*>@}K_r3A(un zLj$i(RJ!Dh7AXy_$;Qnn2_tWa`gg$CwhaNnk=H2|!^zighdYmCc?Py zOiOD)(J!w%x3&YHy0;xzhSz_d)(P_f5svDAE9SRz#c?sW_}vGsCRre#FJn_wb#!!` zqjm~{4=s)-0B1mMnYILnrFfxh)$bUbH$coy%uF2F5n1GHWD$7$AZ-y&5HUW%J-LV_ z=RuwQ!pxqlD@{a089tT-770}FaYG<@Zn=a&rRr)KI{U%$!Ncg8H>2+8I2PP^SWfP! uNT|4Rx@jYSnHBc14yCewjqFR2jIE$Jj`, and `git log -S SubC` shows this was never done for this project. -3. **Pass 3** — in progress. Zero-page audit complete (38 semantic + 66 neutral), and the - `$FFFA–$FFFF` vectors are now `.word NmiHandler, Reset, IrqHandler`. - Remaining: name the data tables and structures — the `$D4FA` 30-entry pointer table and - the variable-length records at `$D559+`, the `$C0C0` entry-point table, the - `$C47A–$CA20` block. -4. **Promotion** — move to a top-level `/copilot/` folder, add a full-ROM build - (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the - established style; then it joins the root index's numbered inventory. +Passes 1-3 are complete and the project is promoted to the top level (row 17); see +*Pass Status* above. The only residue is the ~354 bytes the CDL could not settle, kept +`.byte` on purpose and itemised under *Known remaining gaps*. No pass work is pending. diff --git a/Lunar Pool (U)/copilot/prg.s b/Lunar Pool (U)/copilot/prg.s index f4f032f..b77ed73 100644 --- a/Lunar Pool (U)/copilot/prg.s +++ b/Lunar Pool (U)/copilot/prg.s @@ -982,7 +982,7 @@ UpdateObjectSound: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- UpdateObjectSound_Silence: - sta a:$006F,y ; CPU:$C321 PRG:0321 99 6F 00 + sta a:Zp6F,y ; CPU:$C321 PRG:0321 99 6F 00 dey ; CPU:$C324 PRG:0324 88 bne UpdateObjectSound_Silence ; CPU:$C325 PRG:0325 D0 FA sta $05F0 ; CPU:$C327 PRG:0327 8D F0 05 @@ -1030,7 +1030,7 @@ UpdateObjectSound_Emit: asl a ; CPU:$C341 PRG:0341 0A tay ; CPU:$C342 PRG:0342 A8 lda #$00 ; CPU:$C343 PRG:0343 A9 00 - sta a:$0070,y ; CPU:$C345 PRG:0345 99 70 00 + sta a:Zp70,y ; CPU:$C345 PRG:0345 99 70 00 sta a:$0071,y ; CPU:$C348 PRG:0348 99 71 00 sta a:$0072,y ; CPU:$C34B PRG:034B 99 72 00 sta a:$0073,y ; CPU:$C34E PRG:034E 99 73 00 @@ -1041,7 +1041,7 @@ UpdateObjectSound_Emit: ora $0541,x ; CPU:$C35C PRG:035C 1D 41 05 bne UpdateObjectSound_Sustain ; CPU:$C35F PRG:035F D0 3E lda #$01 ; CPU:$C361 PRG:0361 A9 01 - sta a:$0070,y ; CPU:$C363 PRG:0363 99 70 00 + sta a:Zp70,y ; CPU:$C363 PRG:0363 99 70 00 sta a:$0072,y ; CPU:$C366 PRG:0366 99 72 00 sta a:$0073,y ; CPU:$C369 PRG:0369 99 73 00 lda $0546,x ; CPU:$C36C PRG:036C BD 46 05 @@ -1098,7 +1098,7 @@ UpdateObjectSound_Sustain: lda $056E,x ; CPU:$C3A3 PRG:03A3 BD 6E 05 sta $05E0,y ; CPU:$C3A6 PRG:03A6 99 E0 05 lda #$01 ; CPU:$C3A9 PRG:03A9 A9 01 - sta a:$0070,y ; CPU:$C3AB PRG:03AB 99 70 00 + sta a:Zp70,y ; CPU:$C3AB PRG:03AB 99 70 00 ; ----------------------------------------------------------------------------- ; Routine: UpdateObjectSound_CheckVolume ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -2333,16 +2333,16 @@ DrainVramQueue: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- DrainVramQueue_Slot: - lda a:$00D0,y ; CPU:$CC91 PRG:0C91 B9 D0 00 + lda a:vram_slot_len,y ; CPU:$CC91 PRG:0C91 B9 D0 00 beq DrainVramQueue_NextSlot ; CPU:$CC94 PRG:0C94 F0 24 tax ; CPU:$CC96 PRG:0C96 AA - lda a:$00D3,y ; CPU:$CC97 PRG:0C97 B9 D3 00 + lda a:vram_slot_addr_hi,y ; CPU:$CC97 PRG:0C97 B9 D3 00 sta PPUADDR ; CPU:$CC9A PRG:0C9A 8D 06 20 - lda a:$00D2,y ; CPU:$CC9D PRG:0C9D B9 D2 00 + lda a:vram_slot_addr_lo,y ; CPU:$CC9D PRG:0C9D B9 D2 00 sta PPUADDR ; CPU:$CCA0 PRG:0CA0 8D 06 20 tya ; CPU:$CCA3 PRG:0CA3 98 pha ; CPU:$CCA4 PRG:0CA4 48 - lda a:$00D1,y ; CPU:$CCA5 PRG:0CA5 B9 D1 00 + lda a:vram_slot_ofs,y ; CPU:$CCA5 PRG:0CA5 B9 D1 00 tay ; CPU:$CCA8 PRG:0CA8 A8 ; ----------------------------------------------------------------------------- ; Routine: DrainVramQueue_CopyLoop @@ -2354,7 +2354,7 @@ DrainVramQueue_Slot: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- DrainVramQueue_CopyLoop: - lda a:$00A0,y ; CPU:$CCA9 PRG:0CA9 B9 A0 00 + lda a:vram_buf,y ; CPU:$CCA9 PRG:0CA9 B9 A0 00 sta PPUDATA ; CPU:$CCAC PRG:0CAC 8D 07 20 iny ; CPU:$CCAF PRG:0CAF C8 dex ; CPU:$CCB0 PRG:0CB0 CA @@ -2362,7 +2362,7 @@ DrainVramQueue_CopyLoop: pla ; CPU:$CCB3 PRG:0CB3 68 tay ; CPU:$CCB4 PRG:0CB4 A8 lda #$00 ; CPU:$CCB5 PRG:0CB5 A9 00 - sta a:$00D0,y ; CPU:$CCB7 PRG:0CB7 99 D0 00 + sta a:vram_slot_len,y ; CPU:$CCB7 PRG:0CB7 99 D0 00 ; ----------------------------------------------------------------------------- ; Routine: DrainVramQueue_NextSlot ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -2432,7 +2432,7 @@ FlushPaletteToPpu: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- FlushPaletteToPpu_Loop: - lda a:$0080,y ; CPU:$CCF3 PRG:0CF3 B9 80 00 + lda a:palette_shadow,y ; CPU:$CCF3 PRG:0CF3 B9 80 00 sta PPUDATA ; CPU:$CCF6 PRG:0CF6 8D 07 20 iny ; CPU:$CCF9 PRG:0CF9 C8 dex ; CPU:$CCFA PRG:0CFA CA @@ -3528,9 +3528,9 @@ PlaceFieldTile_Done: ; ----------------------------------------------------------------------------- UploadFieldMap: lda #$24 ; CPU:$D1BB PRG:11BB A9 24 - sta $2006 ; CPU:$D1BD PRG:11BD 8D 06 20 + sta PPUADDR ; CPU:$D1BD PRG:11BD 8D 06 20 lda #$00 ; CPU:$D1C0 PRG:11C0 A9 00 - sta $2006 ; CPU:$D1C2 PRG:11C2 8D 06 20 + sta PPUADDR ; CPU:$D1C2 PRG:11C2 8D 06 20 ldx #$06 ; CPU:$D1C5 PRG:11C5 A2 06 ldy #$00 ; CPU:$D1C7 PRG:11C7 A0 00 jsr $CBA9 ; CPU:$D1C9 PRG:11C9 20 A9 CB @@ -3617,7 +3617,7 @@ UploadFieldMap_Found: ; ----------------------------------------------------------------------------- UploadFieldMap_Store: ldy #$00 ; CPU:$D1FB PRG:11FB A0 00 - sta $2007 ; CPU:$D1FD PRG:11FD 8D 07 20 + sta PPUDATA ; CPU:$D1FD PRG:11FD 8D 07 20 jsr $CB5F ; CPU:$D200 PRG:1200 20 5F CB lda ppu_addr_hi ; CPU:$D203 PRG:1203 A5 FD cmp #$08 ; CPU:$D205 PRG:1205 C9 08 @@ -7851,9 +7851,9 @@ DrawStageBanner: ; ---- data $EBF3-$EBF7 (5 bytes) ---- .byte $61, $67, $65, $3B, $00 ; CPU:$EBF3 PRG:2BF3 61 67 65 3B 00 lda Zp0D ; CPU:$EBF8 PRG:2BF8 A5 0D - sta $2007 ; CPU:$EBFA PRG:2BFA 8D 07 20 + sta PPUDATA ; CPU:$EBFA PRG:2BFA 8D 07 20 lda Zp0E ; CPU:$EBFD PRG:2BFD A5 0E - sta $2007 ; CPU:$EBFF PRG:2BFF 8D 07 20 + sta PPUDATA ; CPU:$EBFF PRG:2BFF 8D 07 20 jsr $CBC9 ; CPU:$EC02 PRG:2C02 20 C9 CB ; ---- data $EC05-$EC0B (7 bytes) ---- .byte $3B, $73, $74, $61, $72, $74, $00 ; CPU:$EC05 PRG:2C05 3B 73 74 61 72 74 00 @@ -7944,7 +7944,7 @@ LoadStageScene_PlaceBalls: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- LoadStageScene_VaryTiles: - lda $2007 ; CPU:$EC87 PRG:2C87 AD 07 20 + lda PPUDATA ; CPU:$EC87 PRG:2C87 AD 07 20 tax ; CPU:$EC8A PRG:2C8A AA cmp #$DE ; CPU:$EC8B PRG:2C8B C9 DE bne LoadStageScene_VaryTiles_Next ; CPU:$EC8D PRG:2C8D D0 1F @@ -7970,9 +7970,9 @@ LoadStageScene_VaryTiles: ; ----------------------------------------------------------------------------- LoadStageScene_VaryTiles_Write: jsr $CAA3 ; CPU:$ECA2 PRG:2CA2 20 A3 CA - stx $2007 ; CPU:$ECA5 PRG:2CA5 8E 07 20 + stx PPUDATA ; CPU:$ECA5 PRG:2CA5 8E 07 20 jsr $CAAE ; CPU:$ECA8 PRG:2CA8 20 AE CA - lda $2007 ; CPU:$ECAB PRG:2CAB AD 07 20 + lda PPUDATA ; CPU:$ECAB PRG:2CAB AD 07 20 ; ----------------------------------------------------------------------------- ; Routine: LoadStageScene_VaryTiles_Next ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -7994,11 +7994,11 @@ LoadStageScene_VaryTiles_Next: cmp #$02 ; CPU:$ECC0 PRG:2CC0 C9 02 bne LoadStageScene_LoadLayout ; CPU:$ECC2 PRG:2CC2 D0 0F lda #$20 ; CPU:$ECC4 PRG:2CC4 A9 20 - sta $2006 ; CPU:$ECC6 PRG:2CC6 8D 06 20 + sta PPUADDR ; CPU:$ECC6 PRG:2CC6 8D 06 20 lda #$82 ; CPU:$ECC9 PRG:2CC9 A9 82 - sta $2006 ; CPU:$ECCB PRG:2CCB 8D 06 20 + sta PPUADDR ; CPU:$ECCB PRG:2CCB 8D 06 20 lda #$43 ; CPU:$ECCE PRG:2CCE A9 43 - sta $2007 ; CPU:$ECD0 PRG:2CD0 8D 07 20 + sta PPUDATA ; CPU:$ECD0 PRG:2CD0 8D 07 20 ; ----------------------------------------------------------------------------- ; Routine: LoadStageScene_LoadLayout ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -10186,7 +10186,7 @@ FillAttributeTable: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- FillAttributeTable_Loop: - sta a:$00FF,x ; CPU:$F66B PRG:366B 9D FF 00 + sta a:ppu_addr_src_hi,x ; CPU:$F66B PRG:366B 9D FF 00 dex ; CPU:$F66E PRG:366E CA bne FillAttributeTable_Loop ; CPU:$F66F PRG:366F D0 FA jmp $CD9D ; CPU:$F671 PRG:3671 4C 9D CD @@ -10729,7 +10729,7 @@ StampBallMarker_TopLeft: jsr $CAF7 ; CPU:$F8C9 PRG:38C9 20 F7 CA jsr $F989 ; CPU:$F8CC PRG:38CC 20 89 F9 lda #$DA ; CPU:$F8CF PRG:38CF A9 DA - sta $2007 ; CPU:$F8D1 PRG:38D1 8D 07 20 + sta PPUDATA ; CPU:$F8D1 PRG:38D1 8D 07 20 ; ----------------------------------------------------------------------------- ; Routine: StampBallMarker_TopRight ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -10750,7 +10750,7 @@ StampBallMarker_TopRight: jsr $CAF7 ; CPU:$F8E3 PRG:38E3 20 F7 CA jsr $F989 ; CPU:$F8E6 PRG:38E6 20 89 F9 lda #$DB ; CPU:$F8E9 PRG:38E9 A9 DB - sta $2007 ; CPU:$F8EB PRG:38EB 8D 07 20 + sta PPUDATA ; CPU:$F8EB PRG:38EB 8D 07 20 ; ----------------------------------------------------------------------------- ; Routine: StampBallMarker_BottomLeft ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -10771,7 +10771,7 @@ StampBallMarker_BottomLeft: jsr $CAF7 ; CPU:$F8FD PRG:38FD 20 F7 CA jsr $F989 ; CPU:$F900 PRG:3900 20 89 F9 lda #$D9 ; CPU:$F903 PRG:3903 A9 D9 - sta $2007 ; CPU:$F905 PRG:3905 8D 07 20 + sta PPUDATA ; CPU:$F905 PRG:3905 8D 07 20 ; ----------------------------------------------------------------------------- ; Routine: StampBallMarker_BottomRight ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -10793,7 +10793,7 @@ StampBallMarker_BottomRight: jsr $CAF7 ; CPU:$F918 PRG:3918 20 F7 CA jsr $F989 ; CPU:$F91B PRG:391B 20 89 F9 lda #$D8 ; CPU:$F91E PRG:391E A9 D8 - sta $2007 ; CPU:$F920 PRG:3920 8D 07 20 + sta PPUDATA ; CPU:$F920 PRG:3920 8D 07 20 rts ; CPU:$F923 PRG:3923 60 ; ----------------------------------------------------------------------------- ; Routine: StampBallMarker_IfEmpty @@ -10809,13 +10809,13 @@ StampBallMarker_IfEmpty: stx ppu_addr_hi ; CPU:$F927 PRG:3927 86 FD sty ppu_addr_lo ; CPU:$F929 PRG:3929 84 FC jsr $F989 ; CPU:$F92B PRG:392B 20 89 F9 - lda $2007 ; CPU:$F92E PRG:392E AD 07 20 - lda $2007 ; CPU:$F931 PRG:3931 AD 07 20 + lda PPUDATA ; CPU:$F92E PRG:392E AD 07 20 + lda PPUDATA ; CPU:$F931 PRG:3931 AD 07 20 cmp #$DC ; CPU:$F934 PRG:3934 C9 DC bcc StampBallMarker_Abort ; CPU:$F936 PRG:3936 90 50 cmp #$DF ; CPU:$F938 PRG:3938 C9 DF bcs StampBallMarker_Abort ; CPU:$F93A PRG:393A B0 4C - lda $2007 ; CPU:$F93C PRG:393C AD 07 20 + lda PPUDATA ; CPU:$F93C PRG:393C AD 07 20 cmp #$DC ; CPU:$F93F PRG:393F C9 DC bcc StampBallMarker_Abort ; CPU:$F941 PRG:3941 90 45 cmp #$DF ; CPU:$F943 PRG:3943 C9 DF @@ -10828,27 +10828,27 @@ StampBallMarker_IfEmpty: adc #$00 ; CPU:$F94F PRG:394F 69 00 tax ; CPU:$F951 PRG:3951 AA jsr $F989 ; CPU:$F952 PRG:3952 20 89 F9 - lda $2007 ; CPU:$F955 PRG:3955 AD 07 20 - lda $2007 ; CPU:$F958 PRG:3958 AD 07 20 + lda PPUDATA ; CPU:$F955 PRG:3955 AD 07 20 + lda PPUDATA ; CPU:$F958 PRG:3958 AD 07 20 cmp #$DC ; CPU:$F95B PRG:395B C9 DC bcc StampBallMarker_Abort ; CPU:$F95D PRG:395D 90 29 cmp #$DF ; CPU:$F95F PRG:395F C9 DF bcs StampBallMarker_Abort ; CPU:$F961 PRG:3961 B0 25 - lda $2007 ; CPU:$F963 PRG:3963 AD 07 20 + lda PPUDATA ; CPU:$F963 PRG:3963 AD 07 20 cmp #$DC ; CPU:$F966 PRG:3966 C9 DC bcc StampBallMarker_Abort ; CPU:$F968 PRG:3968 90 1E cmp #$DF ; CPU:$F96A PRG:396A C9 DF bcs StampBallMarker_Abort ; CPU:$F96C PRG:396C B0 1A jsr $CAA3 ; CPU:$F96E PRG:396E 20 A3 CA lda #$DA ; CPU:$F971 PRG:3971 A9 DA - sta $2007 ; CPU:$F973 PRG:3973 8D 07 20 + sta PPUDATA ; CPU:$F973 PRG:3973 8D 07 20 lda #$DB ; CPU:$F976 PRG:3976 A9 DB - sta $2007 ; CPU:$F978 PRG:3978 8D 07 20 + sta PPUDATA ; CPU:$F978 PRG:3978 8D 07 20 jsr $F989 ; CPU:$F97B PRG:397B 20 89 F9 lda #$D9 ; CPU:$F97E PRG:397E A9 D9 - sta $2007 ; CPU:$F980 PRG:3980 8D 07 20 + sta PPUDATA ; CPU:$F980 PRG:3980 8D 07 20 lda #$D8 ; CPU:$F983 PRG:3983 A9 D8 - sta $2007 ; CPU:$F985 PRG:3985 8D 07 20 + sta PPUDATA ; CPU:$F985 PRG:3985 8D 07 20 ; ----------------------------------------------------------------------------- ; Routine: StampBallMarker_Abort ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -10870,8 +10870,8 @@ StampBallMarker_Abort: ; Clobbers: none. ; ----------------------------------------------------------------------------- SetPpuAddr: - stx $2006 ; CPU:$F989 PRG:3989 8E 06 20 - sty $2006 ; CPU:$F98C PRG:398C 8C 06 20 + stx PPUADDR ; CPU:$F989 PRG:3989 8E 06 20 + sty PPUADDR ; CPU:$F98C PRG:398C 8C 06 20 rts ; CPU:$F98F PRG:398F 60 ; ----------------------------------------------------------------------------- ; Routine: SetBallSpriteAttributes @@ -11661,10 +11661,10 @@ ComputeBallVelocity_Moving: ldy ppu_addr_src_hi ; CPU:$FC24 PRG:3C24 A4 FF clc ; CPU:$FC26 PRG:3C26 18 adc Zp24 ; CPU:$FC27 PRG:3C27 65 24 - sta a:$0012,y ; CPU:$FC29 PRG:3C29 99 12 00 + sta a:Zp12,y ; CPU:$FC29 PRG:3C29 99 12 00 txa ; CPU:$FC2C PRG:3C2C 8A adc Zp25 ; CPU:$FC2D PRG:3C2D 65 25 - sta a:$0013,y ; CPU:$FC2F PRG:3C2F 99 13 00 + sta a:Zp13,y ; CPU:$FC2F PRG:3C2F 99 13 00 lda Zp1E ; CPU:$FC32 PRG:3C32 A5 1E sta ppu_addr_lo ; CPU:$FC34 PRG:3C34 85 FC lda Zp1F ; CPU:$FC36 PRG:3C36 A5 1F @@ -11689,10 +11689,10 @@ ComputeBallVelocity_Moving: ldy ppu_addr_src_hi ; CPU:$FC5D PRG:3C5D A4 FF sec ; CPU:$FC5F PRG:3C5F 38 sbc Zp24 ; CPU:$FC60 PRG:3C60 E5 24 - sta a:$0010,y ; CPU:$FC62 PRG:3C62 99 10 00 + sta a:Zp10,y ; CPU:$FC62 PRG:3C62 99 10 00 txa ; CPU:$FC65 PRG:3C65 8A sbc Zp25 ; CPU:$FC66 PRG:3C66 E5 25 - sta a:$0011,y ; CPU:$FC68 PRG:3C68 99 11 00 + sta a:Zp11,y ; CPU:$FC68 PRG:3C68 99 11 00 rts ; CPU:$FC6B PRG:3C6B 60 ; ----------------------------------------------------------------------------- ; Routine: ProjectObjectPosition @@ -11704,9 +11704,9 @@ ComputeBallVelocity_Moving: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ProjectObjectPosition: - lda a:$0010,y ; CPU:$FC6C PRG:3C6C B9 10 00 + lda a:Zp10,y ; CPU:$FC6C PRG:3C6C B9 10 00 sta ppu_addr_lo ; CPU:$FC6F PRG:3C6F 85 FC - lda a:$0011,y ; CPU:$FC71 PRG:3C71 B9 11 00 + lda a:Zp11,y ; CPU:$FC71 PRG:3C71 B9 11 00 sta ppu_addr_hi ; CPU:$FC74 PRG:3C74 85 FD jsr $FE4A ; CPU:$FC76 PRG:3C76 20 4A FE sty Zp18 ; CPU:$FC79 PRG:3C79 84 18 diff --git a/MUSCLE (U)/OVERVIEW.md b/MUSCLE (U)/OVERVIEW.md index 9e5367c..0e0655a 100644 --- a/MUSCLE (U)/OVERVIEW.md +++ b/MUSCLE (U)/OVERVIEW.md @@ -25,7 +25,7 @@ none of this touched a byte. | Mapper | 0 (NROM) | | PRG | 16 KB, mapped **low** at $8000–$BFFF (mirrored to $C000–$FFFF) | | CHR | 8 KB | -| Mirroring | Horizontal (header byte 6 = $01) | +| Mirroring | Vertical | | Battery / trainer | none | | ROM SHA-256 | `d3da17f2b67d517e4d519659407d6f0e3cd7a2a4d89d31da6bb2727afce798dd` | | PRG SHA-256 | `c9061b6d3d06f56e3c2f89337d8e59c159f494ff9efad50852fcd19621f0b03e` | diff --git a/MUSCLE (U)/copilot/prg.s b/MUSCLE (U)/copilot/prg.s index c4c0432..986a366 100644 --- a/MUSCLE (U)/copilot/prg.s +++ b/MUSCLE (U)/copilot/prg.s @@ -42,7 +42,7 @@ Reset: txs ; CPU:$8006 PRG:0006 9A cld ; CPU:$8007 PRG:0007 D8 lda #$00 ; CPU:$8008 PRG:0008 A9 00 - sta $2000 ; CPU:$800A PRG:000A 8D 00 20 + sta PPUCTRL ; CPU:$800A PRG:000A 8D 00 20 nop ; CPU:$800D PRG:000D EA ; ----------------------------------------------------------------------------- ; Routine: WaitForFirstPpuWarmup @@ -54,10 +54,10 @@ Reset: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- WaitForFirstPpuWarmup: - lda $2002 ; CPU:$800E PRG:000E AD 02 20 + lda PPUSTATUS ; CPU:$800E PRG:000E AD 02 20 bpl WaitForFirstPpuWarmup ; CPU:$8011 PRG:0011 10 FB lda #$00 ; CPU:$8013 PRG:0013 A9 00 - sta $2000 ; CPU:$8015 PRG:0015 8D 00 20 + sta PPUCTRL ; CPU:$8015 PRG:0015 8D 00 20 nop ; CPU:$8018 PRG:0018 EA ; ----------------------------------------------------------------------------- ; Routine: WaitForSecondPpuWarmup @@ -69,12 +69,12 @@ WaitForFirstPpuWarmup: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- WaitForSecondPpuWarmup: - lda $2002 ; CPU:$8019 PRG:0019 AD 02 20 + lda PPUSTATUS ; CPU:$8019 PRG:0019 AD 02 20 bpl WaitForSecondPpuWarmup ; CPU:$801C PRG:001C 10 FB lda #$40 ; CPU:$801E PRG:001E A9 40 - sta $4017 ; CPU:$8020 PRG:0020 8D 17 40 + sta JOY2 ; CPU:$8020 PRG:0020 8D 17 40 lda #$00 ; CPU:$8023 PRG:0023 A9 00 - sta $4010 ; CPU:$8025 PRG:0025 8D 10 40 + sta APUDMCCTRL ; CPU:$8025 PRG:0025 8D 10 40 sta ControllerButtons1 ; CPU:$8028 PRG:0028 85 FA sta ControllerButtons2 ; CPU:$802A PRG:002A 85 FB ; ----------------------------------------------------------------------------- @@ -908,11 +908,11 @@ UpdateHudTallyTiles: lda $0338 ; CPU:$832A PRG:032A AD 38 03 beq UpdateHudTallyTiles_OnZero_833E ; CPU:$832D PRG:032D F0 0F lda #$20 ; CPU:$832F PRG:032F A9 20 - sta $2006 ; CPU:$8331 PRG:0331 8D 06 20 + sta PPUADDR ; CPU:$8331 PRG:0331 8D 06 20 lda #$BB ; CPU:$8334 PRG:0334 A9 BB - sta $2006 ; CPU:$8336 PRG:0336 8D 06 20 + sta PPUADDR ; CPU:$8336 PRG:0336 8D 06 20 lda #$AC ; CPU:$8339 PRG:0339 A9 AC - sta $2007 ; CPU:$833B PRG:033B 8D 07 20 + sta PPUDATA ; CPU:$833B PRG:033B 8D 07 20 ; ----------------------------------------------------------------------------- ; Routine: UpdateHudTallyTiles_OnZero_833E ; Global: UpdateHudTallyTiles_OnZero_833E.; no call site is visible in the static trace @@ -926,11 +926,11 @@ UpdateHudTallyTiles_OnZero_833E: lda $0339 ; CPU:$833E PRG:033E AD 39 03 beq UpdateHudTallyTiles_OnZero_8352 ; CPU:$8341 PRG:0341 F0 0F lda #$24 ; CPU:$8343 PRG:0343 A9 24 - sta $2006 ; CPU:$8345 PRG:0345 8D 06 20 + sta PPUADDR ; CPU:$8345 PRG:0345 8D 06 20 lda #$A6 ; CPU:$8348 PRG:0348 A9 A6 - sta $2006 ; CPU:$834A PRG:034A 8D 06 20 + sta PPUADDR ; CPU:$834A PRG:034A 8D 06 20 lda #$AC ; CPU:$834D PRG:034D A9 AC - sta $2007 ; CPU:$834F PRG:034F 8D 07 20 + sta PPUDATA ; CPU:$834F PRG:034F 8D 07 20 ; ----------------------------------------------------------------------------- ; Routine: UpdateHudTallyTiles_OnZero_8352 ; Global: UpdateHudTallyTiles_OnZero_8352.; no call site is visible in the static trace @@ -953,16 +953,16 @@ UpdateHudTallyTiles_OnZero_8352: ; ----------------------------------------------------------------------------- UpdateScoreTallyDigits: lda #$20 ; CPU:$8353 PRG:0353 A9 20 - sta $2006 ; CPU:$8355 PRG:0355 8D 06 20 + sta PPUADDR ; CPU:$8355 PRG:0355 8D 06 20 lda #$EC ; CPU:$8358 PRG:0358 A9 EC - sta $2006 ; CPU:$835A PRG:035A 8D 06 20 + sta PPUADDR ; CPU:$835A PRG:035A 8D 06 20 lda #$34 ; CPU:$835D PRG:035D A9 34 sta SourcePointerLo ; CPU:$835F PRG:035F 85 10 jsr $8372 ; CPU:$8361 PRG:0361 20 72 83 lda #$21 ; CPU:$8364 PRG:0364 A9 21 - sta $2006 ; CPU:$8366 PRG:0366 8D 06 20 + sta PPUADDR ; CPU:$8366 PRG:0366 8D 06 20 lda #$0C ; CPU:$8369 PRG:0369 A9 0C - sta $2006 ; CPU:$836B PRG:036B 8D 06 20 + sta PPUADDR ; CPU:$836B PRG:036B 8D 06 20 lda #$36 ; CPU:$836E PRG:036E A9 36 sta SourcePointerLo ; CPU:$8370 PRG:0370 85 10 ; ----------------------------------------------------------------------------- @@ -990,8 +990,8 @@ WriteScoreTallyDigits_OnCarryClear_8374: cmp PlayerCount ; CPU:$8377 PRG:0377 C5 94 beq WriteScoreTallyDigits_OnZero_8385 ; CPU:$8379 PRG:0379 F0 0A lda #$30 ; CPU:$837B PRG:037B A9 30 - sta $2007 ; CPU:$837D PRG:037D 8D 07 20 - sta $2007 ; CPU:$8380 PRG:0380 8D 07 20 + sta PPUDATA ; CPU:$837D PRG:037D 8D 07 20 + sta PPUDATA ; CPU:$8380 PRG:0380 8D 07 20 bne WriteScoreTallyDigits_OnNonzero_8390 ; CPU:$8383 PRG:0383 D0 0B ; ----------------------------------------------------------------------------- ; Routine: WriteScoreTallyDigits_OnZero_8385 @@ -1004,9 +1004,9 @@ WriteScoreTallyDigits_OnCarryClear_8374: ; ----------------------------------------------------------------------------- WriteScoreTallyDigits_OnZero_8385: ldx SourcePointerLo ; CPU:$8385 PRG:0385 A6 10 - stx $2007 ; CPU:$8387 PRG:0387 8E 07 20 + stx PPUDATA ; CPU:$8387 PRG:0387 8E 07 20 inx ; CPU:$838A PRG:038A E8 - stx $2007 ; CPU:$838B PRG:038B 8E 07 20 + stx PPUDATA ; CPU:$838B PRG:038B 8E 07 20 lda #$30 ; CPU:$838E PRG:038E A9 30 ; ----------------------------------------------------------------------------- ; Routine: WriteScoreTallyDigits_OnNonzero_8390 @@ -1018,7 +1018,7 @@ WriteScoreTallyDigits_OnZero_8385: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- WriteScoreTallyDigits_OnNonzero_8390: - sta $2007 ; CPU:$8390 PRG:0390 8D 07 20 + sta PPUDATA ; CPU:$8390 PRG:0390 8D 07 20 iny ; CPU:$8393 PRG:0393 C8 cpy #$03 ; CPU:$8394 PRG:0394 C0 03 bcc WriteScoreTallyDigits_OnCarryClear_8374 ; CPU:$8396 PRG:0396 90 DC @@ -1121,9 +1121,9 @@ UpdateActorPositions_OnCarryClear_83E1: jsr $ABFC ; CPU:$83E7 PRG:03E7 20 FC AB jsr $8399 ; CPU:$83EA PRG:03EA 20 99 83 lda #$20 ; CPU:$83ED PRG:03ED A9 20 - sta $2006 ; CPU:$83EF PRG:03EF 8D 06 20 + sta PPUADDR ; CPU:$83EF PRG:03EF 8D 06 20 lda #$AA ; CPU:$83F2 PRG:03F2 A9 AA - sta $2006 ; CPU:$83F4 PRG:03F4 8D 06 20 + sta PPUADDR ; CPU:$83F4 PRG:03F4 8D 06 20 lda #$30 ; CPU:$83F7 PRG:03F7 A9 30 jsr $8B20 ; CPU:$83F9 PRG:03F9 20 20 8B jsr $8B07 ; CPU:$83FC PRG:03FC 20 07 8B @@ -1677,10 +1677,10 @@ BeginVblankFrame: ; ----------------------------------------------------------------------------- ForceRenderingOff: lda #$10 ; CPU:$8644 PRG:0644 A9 10 - sta $2000 ; CPU:$8646 PRG:0646 8D 00 20 + sta PPUCTRL ; CPU:$8646 PRG:0646 8D 00 20 sta PpuCtrlShadow ; CPU:$8649 PRG:0649 85 FC lda #$00 ; CPU:$864B PRG:064B A9 00 - sta $2001 ; CPU:$864D PRG:064D 8D 01 20 + sta PPUMASK ; CPU:$864D PRG:064D 8D 01 20 sta PpuMaskShadow ; CPU:$8650 PRG:0650 85 FD rts ; CPU:$8652 PRG:0652 60 ; ----------------------------------------------------------------------------- @@ -1836,10 +1836,10 @@ NmiHandler_OnZero_86D8: ; ----------------------------------------------------------------------------- NmiHandler_OnNonzero_86E3: lda #$00 ; CPU:$86E3 PRG:06E3 A9 00 - sta $2001 ; CPU:$86E5 PRG:06E5 8D 01 20 - sta $2003 ; CPU:$86E8 PRG:06E8 8D 03 20 + sta PPUMASK ; CPU:$86E5 PRG:06E5 8D 01 20 + sta OAMADDR ; CPU:$86E8 PRG:06E8 8D 03 20 lda #$02 ; CPU:$86EB PRG:06EB A9 02 - sta $4014 ; CPU:$86ED PRG:06ED 8D 14 40 + sta OAMDMA ; CPU:$86ED PRG:06ED 8D 14 40 lda $0322 ; CPU:$86F0 PRG:06F0 AD 22 03 beq NmiHandler_OnZero_86FA ; CPU:$86F3 PRG:06F3 F0 05 bmi UpdateRoundLogic_OnNegative_86AD ; CPU:$86F5 PRG:06F5 30 B6 @@ -1961,7 +1961,7 @@ FinishNmiUpdates: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- FinishNmiRegisters: - lda $2002 ; CPU:$8759 PRG:0759 AD 02 20 + lda PPUSTATUS ; CPU:$8759 PRG:0759 AD 02 20 jsr $AF3B ; CPU:$875C PRG:075C 20 3B AF pla ; CPU:$875F PRG:075F 68 tay ; CPU:$8760 PRG:0760 A8 @@ -2887,23 +2887,23 @@ UpdateStageActors: lda PlayerPaletteIndexHi ; CPU:$8A2C PRG:0A2C A5 92 bmi UpdateStageActors_JoinBranchPaths_8A5D ; CPU:$8A2E PRG:0A2E 30 2D lda #$20 ; CPU:$8A30 PRG:0A30 A9 20 - sta $2006 ; CPU:$8A32 PRG:0A32 8D 06 20 + sta PPUADDR ; CPU:$8A32 PRG:0A32 8D 06 20 lda #$BF ; CPU:$8A35 PRG:0A35 A9 BF - sta $2006 ; CPU:$8A37 PRG:0A37 8D 06 20 + sta PPUADDR ; CPU:$8A37 PRG:0A37 8D 06 20 lda PlayerPaletteIndexHi ; CPU:$8A3A PRG:0A3A A5 92 - sta $2007 ; CPU:$8A3C PRG:0A3C 8D 07 20 + sta PPUDATA ; CPU:$8A3C PRG:0A3C 8D 07 20 lda #$24 ; CPU:$8A3F PRG:0A3F A9 24 - sta $2006 ; CPU:$8A41 PRG:0A41 8D 06 20 + sta PPUADDR ; CPU:$8A41 PRG:0A41 8D 06 20 lda #$A0 ; CPU:$8A44 PRG:0A44 A9 A0 - sta $2006 ; CPU:$8A46 PRG:0A46 8D 06 20 + sta PPUADDR ; CPU:$8A46 PRG:0A46 8D 06 20 lda PlayerPaletteIndexLo ; CPU:$8A49 PRG:0A49 A5 91 - sta $2007 ; CPU:$8A4B PRG:0A4B 8D 07 20 + sta PPUDATA ; CPU:$8A4B PRG:0A4B 8D 07 20 lda #$25 ; CPU:$8A4E PRG:0A4E A9 25 - sta $2007 ; CPU:$8A50 PRG:0A50 8D 07 20 + sta PPUDATA ; CPU:$8A50 PRG:0A50 8D 07 20 lda Zp90 ; CPU:$8A53 PRG:0A53 A5 90 - sta $2007 ; CPU:$8A55 PRG:0A55 8D 07 20 + sta PPUDATA ; CPU:$8A55 PRG:0A55 8D 07 20 lda Zp8F ; CPU:$8A58 PRG:0A58 A5 8F - sta $2007 ; CPU:$8A5A PRG:0A5A 8D 07 20 + sta PPUDATA ; CPU:$8A5A PRG:0A5A 8D 07 20 ; ----------------------------------------------------------------------------- ; Routine: UpdateStageActors_JoinBranchPaths_8A5D ; Global: UpdateStageActors_JoinBranchPaths_8A5D.; no call site is visible in the static trace @@ -2964,8 +2964,8 @@ SpawnStageActors_OnZero_8A74: asl a ; CPU:$8A7A PRG:0A7A 0A tay ; CPU:$8A7B PRG:0A7B A8 lda #$00 ; CPU:$8A7C PRG:0A7C A9 00 - sta a:$0034,y ; CPU:$8A7E PRG:0A7E 99 34 00 - sta a:$0033,y ; CPU:$8A81 PRG:0A81 99 33 00 + sta a:ActorPosXLo,y ; CPU:$8A7E PRG:0A7E 99 34 00 + sta a:Zp33,y ; CPU:$8A81 PRG:0A81 99 33 00 ; ----------------------------------------------------------------------------- ; Routine: SpawnStageActors_OnNonzero_8A84 ; Global: SpawnStageActors_OnNonzero_8A84.; no call site is visible in the static trace @@ -2998,7 +2998,7 @@ SpawnStageActors_OnZero_8A93: asl a ; CPU:$8A95 PRG:0A95 0A tay ; CPU:$8A96 PRG:0A96 A8 lda #$64 ; CPU:$8A97 PRG:0A97 A9 64 - sta a:$0034,y ; CPU:$8A99 PRG:0A99 99 34 00 + sta a:ActorPosXLo,y ; CPU:$8A99 PRG:0A99 99 34 00 lda #$FE ; CPU:$8A9C PRG:0A9C A9 FE sta PlayerActionState,x ; CPU:$8A9E PRG:0A9E 95 F0 lda #$00 ; CPU:$8AA0 PRG:0AA0 A9 00 @@ -3078,13 +3078,13 @@ SpawnStageActors_JoinBranchPaths_8AE1: ; ----------------------------------------------------------------------------- UpdateAttributeTable: lda #$20 ; CPU:$8AE8 PRG:0AE8 A9 20 - sta $2006 ; CPU:$8AEA PRG:0AEA 8D 06 20 + sta PPUADDR ; CPU:$8AEA PRG:0AEA 8D 06 20 lda #$9C ; CPU:$8AED PRG:0AED A9 9C - sta $2006 ; CPU:$8AEF PRG:0AEF 8D 06 20 + sta PPUADDR ; CPU:$8AEF PRG:0AEF 8D 06 20 lda #$32 ; CPU:$8AF2 PRG:0AF2 A9 32 jsr $8B20 ; CPU:$8AF4 PRG:0AF4 20 20 8B lda #$32 ; CPU:$8AF7 PRG:0AF7 A9 32 - sta $2007 ; CPU:$8AF9 PRG:0AF9 8D 07 20 + sta PPUDATA ; CPU:$8AF9 PRG:0AF9 8D 07 20 lda #$2E ; CPU:$8AFC PRG:0AFC A9 2E sta SourcePointerLo ; CPU:$8AFE PRG:0AFE 85 10 lda #$88 ; CPU:$8B00 PRG:0B00 A9 88 @@ -3114,9 +3114,9 @@ ClearScrollLatch: ; ----------------------------------------------------------------------------- ClearScrollLatch_OnNonzero_8B0D: lda #$22 ; CPU:$8B0D PRG:0B0D A9 22 - sta $2006 ; CPU:$8B0F PRG:0B0F 8D 06 20 + sta PPUADDR ; CPU:$8B0F PRG:0B0F 8D 06 20 lda #$0E ; CPU:$8B12 PRG:0B12 A9 0E - sta $2006 ; CPU:$8B14 PRG:0B14 8D 06 20 + sta PPUADDR ; CPU:$8B14 PRG:0B14 8D 06 20 lda #$32 ; CPU:$8B17 PRG:0B17 A9 32 sta Zp16 ; CPU:$8B19 PRG:0B19 85 16 lda $0352 ; CPU:$8B1B PRG:0B1B AD 52 03 @@ -3238,14 +3238,14 @@ ClearAttributeRegion_OnZero_8B67: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- ClearAttributeRegion_JoinBranchPaths_8B6D: - sta $2007 ; CPU:$8B6D PRG:0B6D 8D 07 20 + sta PPUDATA ; CPU:$8B6D PRG:0B6D 8D 07 20 inx ; CPU:$8B70 PRG:0B70 E8 inx ; CPU:$8B71 PRG:0B71 E8 inx ; CPU:$8B72 PRG:0B72 E8 cpx #$15 ; CPU:$8B73 PRG:0B73 E0 15 bcc ClearAttributeRegion_JoinBranchPaths_8B37 ; CPU:$8B75 PRG:0B75 90 C0 lda SourcePointerLo ; CPU:$8B77 PRG:0B77 A5 10 - sta $2007 ; CPU:$8B79 PRG:0B79 8D 07 20 + sta PPUDATA ; CPU:$8B79 PRG:0B79 8D 07 20 rts ; CPU:$8B7C PRG:0B7C 60 ; Pass 3: 7 x 3-byte deltas {source lo, source hi, destination lo}. ClearAttributeRegion walks it with three `sbc table,x` against the same index. ; ---- data $8B7D-$8B91 (21 bytes) ---- @@ -3266,7 +3266,7 @@ RenderHudDigits: sta DestinationPointerLo ; CPU:$8BAB PRG:0BAB 85 12 jsr $8BF8 ; CPU:$8BAD PRG:0BAD 20 F8 8B lda #$22 ; CPU:$8BB0 PRG:0BB0 A9 22 - sta $2006 ; CPU:$8BB2 PRG:0BB2 8D 06 20 + sta PPUADDR ; CPU:$8BB2 PRG:0BB2 8D 06 20 lda #$F0 ; CPU:$8BB5 PRG:0BB5 A9 F0 jsr $8BEF ; CPU:$8BB7 PRG:0BB7 20 EF 8B ; ----------------------------------------------------------------------------- @@ -3287,7 +3287,7 @@ RenderHudDigits_OnNonzero_8BBA: sta DestinationPointerLo ; CPU:$8BC7 PRG:0BC7 85 12 jsr $8BF8 ; CPU:$8BC9 PRG:0BC9 20 F8 8B lda #$22 ; CPU:$8BCC PRG:0BCC A9 22 - sta $2006 ; CPU:$8BCE PRG:0BCE 8D 06 20 + sta PPUADDR ; CPU:$8BCE PRG:0BCE 8D 06 20 lda #$50 ; CPU:$8BD1 PRG:0BD1 A9 50 jsr $8BEF ; CPU:$8BD3 PRG:0BD3 20 EF 8B lda $0340 ; CPU:$8BD6 PRG:0BD6 AD 40 03 @@ -3298,7 +3298,7 @@ RenderHudDigits_OnNonzero_8BBA: sta DestinationPointerLo ; CPU:$8BE3 PRG:0BE3 85 12 jsr $8BF8 ; CPU:$8BE5 PRG:0BE5 20 F8 8B lda #$22 ; CPU:$8BE8 PRG:0BE8 A9 22 - sta $2006 ; CPU:$8BEA PRG:0BEA 8D 06 20 + sta PPUADDR ; CPU:$8BEA PRG:0BEA 8D 06 20 lda #$B0 ; CPU:$8BED PRG:0BED A9 B0 ; ----------------------------------------------------------------------------- ; Routine: RenderHudDigitDescriptor @@ -3310,7 +3310,7 @@ RenderHudDigits_OnNonzero_8BBA: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- RenderHudDigitDescriptor: - sta $2006 ; CPU:$8BEF PRG:0BEF 8D 06 20 + sta PPUADDR ; CPU:$8BEF PRG:0BEF 8D 06 20 jsr $8B33 ; CPU:$8BF2 PRG:0BF2 20 33 8B jmp $ABE4 ; CPU:$8BF5 PRG:0BF5 4C E4 AB ; ----------------------------------------------------------------------------- @@ -3325,7 +3325,7 @@ RenderHudDigitDescriptor: SetRenderingOn: lda #$10 ; CPU:$8BF8 PRG:0BF8 A9 10 sta PpuCtrlShadow ; CPU:$8BFA PRG:0BFA 85 FC - sta $2000 ; CPU:$8BFC PRG:0BFC 8D 00 20 + sta PPUCTRL ; CPU:$8BFC PRG:0BFC 8D 00 20 ; ----------------------------------------------------------------------------- ; Routine: SetRenderingOn_OnNonnegative_8BFF ; Global: SetRenderingOn_OnNonnegative_8BFF.; no call site is visible in the static trace @@ -3336,7 +3336,7 @@ SetRenderingOn: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- SetRenderingOn_OnNonnegative_8BFF: - lda $2002 ; CPU:$8BFF PRG:0BFF AD 02 20 + lda PPUSTATUS ; CPU:$8BFF PRG:0BFF AD 02 20 bpl SetRenderingOn_OnNonnegative_8BFF ; CPU:$8C02 PRG:0C02 10 FB rts ; CPU:$8C04 PRG:0C04 60 ; ----------------------------------------------------------------------------- @@ -5111,12 +5111,12 @@ QueueVramDescriptor_JumpNext_92B2: dec Zp7A,x ; CPU:$92B2 PRG:12B2 D6 7A beq QueueVramDescriptor_OnZero_9329 ; CPU:$92B4 PRG:12B4 F0 73 jsr $94C7 ; CPU:$92B6 PRG:12B6 20 C7 94 - lda a:$003A,y ; CPU:$92B9 PRG:12B9 B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$92B9 PRG:12B9 B9 3A 00 clc ; CPU:$92BC PRG:12BC 18 adc #$01 ; CPU:$92BD PRG:12BD 69 01 - sta a:$003A,y ; CPU:$92BF PRG:12BF 99 3A 00 + sta a:PlayerPosXLo1,y ; CPU:$92BF PRG:12BF 99 3A 00 inc Zp4B,x ; CPU:$92C2 PRG:12C2 F6 4B - lda a:$0033,y ; CPU:$92C4 PRG:12C4 B9 33 00 + lda a:Zp33,y ; CPU:$92C4 PRG:12C4 B9 33 00 sec ; CPU:$92C7 PRG:12C7 38 sbc Zp4B,x ; CPU:$92C8 PRG:12C8 F5 4B jmp $934B ; CPU:$92CA PRG:12CA 4C 4B 93 @@ -5133,12 +5133,12 @@ QueueVramDescriptor_JumpNext_92CD: dec Zp7A,x ; CPU:$92CD PRG:12CD D6 7A beq QueueVramDescriptor_OnZero_92E8 ; CPU:$92CF PRG:12CF F0 17 jsr $94C7 ; CPU:$92D1 PRG:12D1 20 C7 94 - lda a:$0033,y ; CPU:$92D4 PRG:12D4 B9 33 00 + lda a:Zp33,y ; CPU:$92D4 PRG:12D4 B9 33 00 clc ; CPU:$92D7 PRG:12D7 18 adc Zp4B,x ; CPU:$92D8 PRG:12D8 75 4B - sta a:$0033,y ; CPU:$92DA PRG:12DA 99 33 00 + sta a:Zp33,y ; CPU:$92DA PRG:12DA 99 33 00 dec Zp4B,x ; CPU:$92DD PRG:12DD D6 4B - lda a:$003A,y ; CPU:$92DF PRG:12DF B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$92DF PRG:12DF B9 3A 00 sec ; CPU:$92E2 PRG:12E2 38 sbc #$01 ; CPU:$92E3 PRG:12E3 E9 01 jmp $9371 ; CPU:$92E5 PRG:12E5 4C 71 93 @@ -5215,10 +5215,10 @@ QueueVramDescriptor_JumpNext_932C: dec Zp7A,x ; CPU:$932C PRG:132C D6 7A beq QueueVramDescriptor_OnZero_9329 ; CPU:$932E PRG:132E F0 F9 jsr $94C7 ; CPU:$9330 PRG:1330 20 C7 94 - lda a:$003A,y ; CPU:$9333 PRG:1333 B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$9333 PRG:1333 B9 3A 00 sec ; CPU:$9336 PRG:1336 38 sbc #$02 ; CPU:$9337 PRG:1337 E9 02 - sta a:$003A,y ; CPU:$9339 PRG:1339 99 3A 00 + sta a:PlayerPosXLo1,y ; CPU:$9339 PRG:1339 99 3A 00 inc Zp4B,x ; CPU:$933C PRG:133C F6 4B lda Zp4B,x ; CPU:$933E PRG:133E B5 4B rol a ; CPU:$9340 PRG:1340 2A @@ -5228,7 +5228,7 @@ QueueVramDescriptor_JumpNext_932C: ror a ; CPU:$9344 PRG:1344 6A eor #$FF ; CPU:$9345 PRG:1345 49 FF sec ; CPU:$9347 PRG:1347 38 - adc a:$0033,y ; CPU:$9348 PRG:1348 79 33 00 + adc a:Zp33,y ; CPU:$9348 PRG:1348 79 33 00 ; ----------------------------------------------------------------------------- ; Routine: UpdateActorX ; Global: UpdateActorX.; called from $92CA @@ -5239,7 +5239,7 @@ QueueVramDescriptor_JumpNext_932C: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- UpdateActorX: - sta a:$0033,y ; CPU:$934B PRG:134B 99 33 00 + sta a:Zp33,y ; CPU:$934B PRG:134B 99 33 00 jsr $82ED ; CPU:$934E PRG:134E 20 ED 82 jmp $9374 ; CPU:$9351 PRG:1351 4C 74 93 ; ----------------------------------------------------------------------------- @@ -5262,10 +5262,10 @@ UpdateActorX_JumpNext_9354: plp ; CPU:$9360 PRG:1360 28 ror a ; CPU:$9361 PRG:1361 6A clc ; CPU:$9362 PRG:1362 18 - adc a:$0033,y ; CPU:$9363 PRG:1363 79 33 00 - sta a:$0033,y ; CPU:$9366 PRG:1366 99 33 00 + adc a:Zp33,y ; CPU:$9363 PRG:1363 79 33 00 + sta a:Zp33,y ; CPU:$9366 PRG:1366 99 33 00 dec Zp4B,x ; CPU:$9369 PRG:1369 D6 4B - lda a:$003A,y ; CPU:$936B PRG:136B B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$936B PRG:136B B9 3A 00 clc ; CPU:$936E PRG:136E 18 adc #$02 ; CPU:$936F PRG:136F 69 02 ; ----------------------------------------------------------------------------- @@ -5278,7 +5278,7 @@ UpdateActorX_JumpNext_9354: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- UpdateActorTile: - sta a:$003A,y ; CPU:$9371 PRG:1371 99 3A 00 + sta a:PlayerPosXLo1,y ; CPU:$9371 PRG:1371 99 3A 00 ; ----------------------------------------------------------------------------- ; Routine: UpdateActorTileAlt ; Global: UpdateActorTileAlt.; called from $9351 @@ -5308,14 +5308,14 @@ UpdateActorTileAlt_JumpNext_937C: tya ; CPU:$9381 PRG:1381 98 pha ; CPU:$9382 PRG:1382 48 ldy ActorSlotOffset ; CPU:$9383 PRG:1383 A4 21 - lda a:$003B,y ; CPU:$9385 PRG:1385 B9 3B 00 + lda a:Zp3B,y ; CPU:$9385 PRG:1385 B9 3B 00 asl a ; CPU:$9388 PRG:1388 0A - lda a:$003C,y ; CPU:$9389 PRG:1389 B9 3C 00 + lda a:PlayerPosYLo1,y ; CPU:$9389 PRG:1389 B9 3C 00 rol a ; CPU:$938C PRG:138C 2A sta Zp51 ; CPU:$938D PRG:138D 85 51 - lda a:$003A,y ; CPU:$938F PRG:138F B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$938F PRG:138F B9 3A 00 sec ; CPU:$9392 PRG:1392 38 - sbc a:$0033,y ; CPU:$9393 PRG:1393 F9 33 00 + sbc a:Zp33,y ; CPU:$9393 PRG:1393 F9 33 00 clc ; CPU:$9396 PRG:1396 18 adc BytecodeHandlerPointerLo ; CPU:$9397 PRG:1397 65 1C tay ; CPU:$9399 PRG:1399 A8 @@ -5406,7 +5406,7 @@ UpdateActorTileAlt_OnNonzero_93D3: lda #$FB ; CPU:$93E7 PRG:13E7 A9 FB jsr $9A2E ; CPU:$93E9 PRG:13E9 20 2E 9A ldy ActorSlotOffset ; CPU:$93EC PRG:13EC A4 21 - lda a:$003A,y ; CPU:$93EE PRG:13EE B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$93EE PRG:13EE B9 3A 00 clc ; CPU:$93F1 PRG:13F1 18 adc #$08 ; CPU:$93F2 PRG:13F2 69 08 tay ; CPU:$93F4 PRG:13F4 A8 @@ -5476,7 +5476,7 @@ UpdateActorTileAlt_OnNegative_942C: lda Zp4B,x ; CPU:$942E PRG:142E B5 4B lsr a ; CPU:$9430 PRG:1430 4A sta BytecodeHandlerPointerLo ; CPU:$9431 PRG:1431 85 1C - lda a:$0033,y ; CPU:$9433 PRG:1433 B9 33 00 + lda a:Zp33,y ; CPU:$9433 PRG:1433 B9 33 00 sec ; CPU:$9436 PRG:1436 38 sbc BytecodeHandlerPointerLo ; CPU:$9437 PRG:1437 E5 1C bpl UpdateActorTileAlt_OnNonnegative_9441 ; CPU:$9439 PRG:1439 10 06 @@ -5614,10 +5614,10 @@ UpdateActorTileAlt_OnZero_947D: ; ----------------------------------------------------------------------------- UpdateActorTileAlt_JumpNext_9480: jsr $94C8 ; CPU:$9480 PRG:1480 20 C8 94 - lda a:$003A,y ; CPU:$9483 PRG:1483 B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$9483 PRG:1483 B9 3A 00 clc ; CPU:$9486 PRG:1486 18 adc #$06 ; CPU:$9487 PRG:1487 69 06 - sta a:$003A,y ; CPU:$9489 PRG:1489 99 3A 00 + sta a:PlayerPosXLo1,y ; CPU:$9489 PRG:1489 99 3A 00 jmp $9B25 ; CPU:$948C PRG:148C 4C 25 9B ; ----------------------------------------------------------------------------- ; Routine: UpdateActorTileAlt_JumpNext_948F @@ -5755,8 +5755,8 @@ ClearActorPosition: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- ClearActorFields: - sta a:$0033,y ; CPU:$94D7 PRG:14D7 99 33 00 - sta a:$0034,y ; CPU:$94DA PRG:14DA 99 34 00 + sta a:Zp33,y ; CPU:$94D7 PRG:14D7 99 33 00 + sta a:ActorPosXLo,y ; CPU:$94DA PRG:14DA 99 34 00 lda Zp8A ; CPU:$94DD PRG:14DD A5 8A beq ClearActorFields_JoinBranchPaths_94F3 ; CPU:$94DF PRG:14DF F0 12 inx ; CPU:$94E1 PRG:14E1 E8 @@ -5925,13 +5925,13 @@ SetActorFlag_OnNonzero_9551: ; ----------------------------------------------------------------------------- SetActorFlag_JumpNext_9559: jsr $94C8 ; CPU:$9559 PRG:1559 20 C8 94 - lda a:$003A,y ; CPU:$955C PRG:155C B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$955C PRG:155C B9 3A 00 clc ; CPU:$955F PRG:155F 18 adc #$20 ; CPU:$9560 PRG:1560 69 20 pha ; CPU:$9562 PRG:1562 48 - lda a:$003B,y ; CPU:$9563 PRG:1563 B9 3B 00 + lda a:Zp3B,y ; CPU:$9563 PRG:1563 B9 3B 00 asl a ; CPU:$9566 PRG:1566 0A - lda a:$003C,y ; CPU:$9567 PRG:1567 B9 3C 00 + lda a:PlayerPosYLo1,y ; CPU:$9567 PRG:1567 B9 3C 00 rol a ; CPU:$956A PRG:156A 2A sec ; CPU:$956B PRG:156B 38 sta Zp51 ; CPU:$956C PRG:156C 85 51 @@ -6112,7 +6112,7 @@ CompareActorToLimit_OnNonzero_95E3: lda #$F1 ; CPU:$95F5 PRG:15F5 A9 F1 ldy #$45 ; CPU:$95F7 PRG:15F7 A0 45 jsr $9A24 ; CPU:$95F9 PRG:15F9 20 24 9A - lda a:$003A,y ; CPU:$95FC PRG:15FC B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$95FC PRG:15FC B9 3A 00 clc ; CPU:$95FF PRG:15FF 18 adc #$08 ; CPU:$9600 PRG:1600 69 08 tay ; CPU:$9602 PRG:1602 A8 @@ -6145,7 +6145,7 @@ CompareActorToLimit_OnCarrySet_9628: lda #$01 ; CPU:$9628 PRG:1628 A9 01 jsr $9653 ; CPU:$962A PRG:162A 20 53 96 ldy ActorSlotOffset ; CPU:$962D PRG:162D A4 21 - lda a:$0033,y ; CPU:$962F PRG:162F B9 33 00 + lda a:Zp33,y ; CPU:$962F PRG:162F B9 33 00 cmp #$14 ; CPU:$9632 PRG:1632 C9 14 beq CompareActorToLimit_OnZero_9641 ; CPU:$9634 PRG:1634 F0 0B bcs CompareActorToLimit_OnCarrySet_963C ; CPU:$9636 PRG:1636 B0 04 @@ -6172,7 +6172,7 @@ CompareActorToLimit_OnCarrySet_963C: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- CompareActorToLimit_OnNonnegative_963E: - sta a:$0033,y ; CPU:$963E PRG:163E 99 33 00 + sta a:Zp33,y ; CPU:$963E PRG:163E 99 33 00 ; ----------------------------------------------------------------------------- ; Routine: CompareActorToLimit_OnZero_9641 ; Global: CompareActorToLimit_OnZero_9641.; no call site is visible in the static trace @@ -6212,7 +6212,7 @@ CompareActorToLimit_JumpNext_9644: SetActorTileFromPalette: sta BytecodeHandlerPointerLo ; CPU:$9653 PRG:1653 85 1C ldy ActorSlotOffset ; CPU:$9655 PRG:1655 A4 21 - lda a:$003C,y ; CPU:$9657 PRG:1657 B9 3C 00 + lda a:PlayerPosYLo1,y ; CPU:$9657 PRG:1657 B9 3C 00 ldx Zp19 ; CPU:$965A PRG:165A A6 19 bne SetActorTileFromPalette_OnNonzero_9664 ; CPU:$965C PRG:165C D0 06 sec ; CPU:$965E PRG:165E 38 @@ -6240,7 +6240,7 @@ SetActorTileFromPalette_OnNonzero_9664: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- StoreActorTile: - sta a:$003C,y ; CPU:$9667 PRG:1667 99 3C 00 + sta a:PlayerPosYLo1,y ; CPU:$9667 PRG:1667 99 3C 00 ldx ActorIndex ; CPU:$966A PRG:166A A6 1E rts ; CPU:$966C PRG:166C 60 ; ----------------------------------------------------------------------------- @@ -6272,7 +6272,7 @@ StoreActorTile_OnNegative_9679: lda Zp4B,x ; CPU:$967B PRG:167B B5 4B lsr a ; CPU:$967D PRG:167D 4A sta BytecodeHandlerPointerLo ; CPU:$967E PRG:167E 85 1C - lda a:$0033,y ; CPU:$9680 PRG:1680 B9 33 00 + lda a:Zp33,y ; CPU:$9680 PRG:1680 B9 33 00 sec ; CPU:$9683 PRG:1683 38 sbc BytecodeHandlerPointerLo ; CPU:$9684 PRG:1684 E5 1C bpl StoreActorTile_OnNonnegative_968E ; CPU:$9686 PRG:1686 10 06 @@ -6318,7 +6318,7 @@ StoreActorTile_OnNonzero_969D: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- AdvanceActorCounter: - sta a:$0033,y ; CPU:$969E PRG:169E 99 33 00 + sta a:Zp33,y ; CPU:$969E PRG:169E 99 33 00 inc Zp4B,x ; CPU:$96A1 PRG:16A1 F6 4B jmp $9B25 ; CPU:$96A3 PRG:16A3 4C 25 9B ; ----------------------------------------------------------------------------- @@ -6344,7 +6344,7 @@ AdvanceActorCounter_OnCarryClear_96A6: ; ----------------------------------------------------------------------------- SetActorTileValue: lda #$FD ; CPU:$96AA PRG:16AA A9 FD - sta a:$0033,y ; CPU:$96AC PRG:16AC 99 33 00 + sta a:Zp33,y ; CPU:$96AC PRG:16AC 99 33 00 ldy #$44 ; CPU:$96AF PRG:16AF A0 44 lda #$F2 ; CPU:$96B1 PRG:16B1 A9 F2 ; ----------------------------------------------------------------------------- @@ -6574,9 +6574,9 @@ MoveActorByStep: lda #$FF ; CPU:$973A PRG:173A A9 FF sta Zp5A,x ; CPU:$973C PRG:173C 95 5A ldy ActorSlotOffset ; CPU:$973E PRG:173E A4 21 - lda a:$003A,y ; CPU:$9740 PRG:1740 B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$9740 PRG:1740 B9 3A 00 sec ; CPU:$9743 PRG:1743 38 - sbc a:$0033,y ; CPU:$9744 PRG:1744 F9 33 00 + sbc a:Zp33,y ; CPU:$9744 PRG:1744 F9 33 00 clc ; CPU:$9747 PRG:1747 18 adc #$13 ; CPU:$9748 PRG:1748 69 13 tay ; CPU:$974A PRG:174A A8 @@ -6632,9 +6632,9 @@ MoveActorByStep_OnCarryClear_9766: lda #$FF ; CPU:$9772 PRG:1772 A9 FF sta Zp5A,x ; CPU:$9774 PRG:1774 95 5A ldy ActorSlotOffset ; CPU:$9776 PRG:1776 A4 21 - lda a:$003A,y ; CPU:$9778 PRG:1778 B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$9778 PRG:1778 B9 3A 00 sec ; CPU:$977B PRG:177B 38 - sbc a:$0033,y ; CPU:$977C PRG:177C F9 33 00 + sbc a:Zp33,y ; CPU:$977C PRG:177C F9 33 00 clc ; CPU:$977F PRG:177F 18 adc #$13 ; CPU:$9780 PRG:1780 69 13 tay ; CPU:$9782 PRG:1782 A8 @@ -6962,7 +6962,7 @@ TestActorValue_OnCarryClear_9875: tya ; CPU:$9875 PRG:1875 98 pha ; CPU:$9876 PRG:1876 48 ldy ActorSlotOffset ; CPU:$9877 PRG:1877 A4 21 - lda a:$003A,y ; CPU:$9879 PRG:1879 B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$9879 PRG:1879 B9 3A 00 clc ; CPU:$987C PRG:187C 18 adc #$0C ; CPU:$987D PRG:187D 69 0C tay ; CPU:$987F PRG:187F A8 @@ -7178,7 +7178,7 @@ UpdateActorTileFromIndexAlt: cmp #$09 ; CPU:$9918 PRG:1918 C9 09 bcs UpdateActorTileFromIndexAlt_JoinBranchPaths_9948 ; CPU:$991A PRG:191A B0 2C ldy ActorSlotOffset ; CPU:$991C PRG:191C A4 21 - lda a:$003A,y ; CPU:$991E PRG:191E B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$991E PRG:191E B9 3A 00 clc ; CPU:$9921 PRG:1921 18 adc #$0C ; CPU:$9922 PRG:1922 69 0C tay ; CPU:$9924 PRG:1924 A8 @@ -7223,7 +7223,7 @@ UpdateActorTileFromIndexAlt_JumpNext_994B: ldy ActorSlotOffset ; CPU:$994D PRG:194D A4 21 lda a:$0039,y ; CPU:$994F PRG:194F B9 39 00 sta BytecodeHandlerPointerLo ; CPU:$9952 PRG:1952 85 1C - lda a:$003A,y ; CPU:$9954 PRG:1954 B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$9954 PRG:1954 B9 3A 00 sta BytecodeHandlerPointerHi ; CPU:$9957 PRG:1957 85 1D jsr $A4FF ; CPU:$9959 PRG:1959 20 FF A4 lda BytecodeHandlerPointerLo ; CPU:$995C PRG:195C A5 1C @@ -7364,8 +7364,8 @@ SetSoundSequenceChannel2_JumpNext_99B7: plp ; CPU:$99C9 PRG:19C9 28 ror a ; CPU:$99CA PRG:19CA 6A clc ; CPU:$99CB PRG:19CB 18 - adc a:$0033,y ; CPU:$99CC PRG:19CC 79 33 00 - sta a:$0033,y ; CPU:$99CF PRG:19CF 99 33 00 + adc a:Zp33,y ; CPU:$99CC PRG:19CC 79 33 00 + sta a:Zp33,y ; CPU:$99CF PRG:19CF 99 33 00 bmi SetSoundSequenceChannel2_OnNegative_99D7 ; CPU:$99D2 PRG:19D2 30 03 jmp $9B25 ; CPU:$99D4 PRG:19D4 4C 25 9B ; ----------------------------------------------------------------------------- @@ -7570,7 +7570,7 @@ SpawnActorPairAlt: sta SourcePointerHi ; CPU:$9A90 PRG:1A90 85 11 ldx ActorIndex ; CPU:$9A92 PRG:1A92 A6 1E ldy PlayerPaletteIndex,x ; CPU:$9A94 PRG:1A94 B4 2A - lda a:$0026,y ; CPU:$9A96 PRG:1A96 B9 26 00 + lda a:PlayerSpriteIndex1,y ; CPU:$9A96 PRG:1A96 B9 26 00 jsr $8CB8 ; CPU:$9A99 PRG:1A99 20 B8 8C lda ControllerDPad1,x ; CPU:$9A9C PRG:1A9C B5 F6 and #$01 ; CPU:$9A9E PRG:1A9E 29 01 @@ -7579,7 +7579,7 @@ SpawnActorPairAlt: ror a ; CPU:$9AA2 PRG:1AA2 6A sta Zp19 ; CPU:$9AA3 PRG:1AA3 85 19 ldy ActorSlotOffset ; CPU:$9AA5 PRG:1AA5 A4 21 - lda a:$0034,y ; CPU:$9AA7 PRG:1AA7 B9 34 00 + lda a:ActorPosXLo,y ; CPU:$9AA7 PRG:1AA7 B9 34 00 and #$7F ; CPU:$9AAA PRG:1AAA 29 7F bne SpawnActorPairAlt_OnNonzero_9AD8 ; CPU:$9AAC PRG:1AAC D0 2A lda ControllerButtonMask,x ; CPU:$9AAE PRG:1AAE B5 F2 @@ -7688,7 +7688,7 @@ RunBytecodeInterpreter: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- DispatchThroughPointer: - jmp ($001C) ; CPU:$9B05 PRG:1B05 6C 1C 00 + jmp (BytecodeHandlerPointerLo) ; CPU:$9B05 PRG:1B05 6C 1C 00 ; ----------------------------------------------------------------------------- ; Routine: DispatchThroughPointer_JoinBranchPaths_9B08 ; Global: DispatchThroughPointer_JoinBranchPaths_9B08.; no call site is visible in the static trace @@ -7720,10 +7720,10 @@ DispatchThroughPointer_JoinBranchPaths_9B08: DispatchThroughPointer_OnNonzero_9B18: ldy ActorSlotOffset ; CPU:$9B18 PRG:1B18 A4 21 clc ; CPU:$9B1A PRG:1B1A 18 - adc a:$003C,y ; CPU:$9B1B PRG:1B1B 79 3C 00 - sta a:$003C,y ; CPU:$9B1E PRG:1B1E 99 3C 00 + adc a:PlayerPosYLo1,y ; CPU:$9B1B PRG:1B1B 79 3C 00 + sta a:PlayerPosYLo1,y ; CPU:$9B1E PRG:1B1E 99 3C 00 pla ; CPU:$9B21 PRG:1B21 68 - sta a:$0033,y ; CPU:$9B22 PRG:1B22 99 33 00 + sta a:Zp33,y ; CPU:$9B22 PRG:1B22 99 33 00 ; ----------------------------------------------------------------------------- ; Routine: RunBytecodeProgram ; Global: Main bytecode program loop: advance the program counter, dispatch the token, and resume. @@ -7943,7 +7943,7 @@ RunBytecodeProgram_OnNonzero_9BDD: ; ----------------------------------------------------------------------------- RunBytecodeProgram_OnCarryClear_9BF3: ldy ActorSlotOffset ; CPU:$9BF3 PRG:1BF3 A4 21 - lda a:$0033,y ; CPU:$9BF5 PRG:1BF5 B9 33 00 + lda a:Zp33,y ; CPU:$9BF5 PRG:1BF5 B9 33 00 sta BytecodeHandlerPointerHi ; CPU:$9BF8 PRG:1BF8 85 1D lda a:$0032,y ; CPU:$9BFA PRG:1BFA B9 32 00 sec ; CPU:$9BFD PRG:1BFD 38 @@ -7970,7 +7970,7 @@ RunBytecodeProgram_OnCarryClear_9BF3: clc ; CPU:$9C21 PRG:1C21 18 adc #$1F ; CPU:$9C22 PRG:1C22 69 1F tax ; CPU:$9C24 PRG:1C24 AA - lda a:$0033,y ; CPU:$9C25 PRG:1C25 B9 33 00 + lda a:Zp33,y ; CPU:$9C25 PRG:1C25 B9 33 00 beq RunBytecodeProgram_OnZero_9C2C ; CPU:$9C28 PRG:1C28 F0 02 bpl RunBytecodeProgram_OnNonnegative_9C2E ; CPU:$9C2A PRG:1C2A 10 02 ; ----------------------------------------------------------------------------- @@ -8306,7 +8306,7 @@ ResetBytecodeState_OnNonzero_9D10: ResetBytecodeState_OnZero_9D39: sec ; CPU:$9D39 PRG:1D39 38 sbc #$04 ; CPU:$9D3A PRG:1D3A E9 04 - sta a:$003C,y ; CPU:$9D3C PRG:1D3C 99 3C 00 + sta a:PlayerPosYLo1,y ; CPU:$9D3C PRG:1D3C 99 3C 00 clc ; CPU:$9D3F PRG:1D3F 18 adc #$08 ; CPU:$9D40 PRG:1D40 69 08 sta PlayerPosYLo1,x ; CPU:$9D42 PRG:1D42 95 3C @@ -8336,7 +8336,7 @@ ResetBytecodeState_OnZero_9D4A: ; ----------------------------------------------------------------------------- CopyActorCoordinates: ldy ActorSlotOffset ; CPU:$9D4E PRG:1D4E A4 21 - lda a:$003A,y ; CPU:$9D50 PRG:1D50 B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$9D50 PRG:1D50 B9 3A 00 sta a:$0031,y ; CPU:$9D53 PRG:1D53 99 31 00 ldx ActorIndex ; CPU:$9D56 PRG:1D56 A6 1E lda PlayerActionState,x ; CPU:$9D58 PRG:1D58 B5 F0 @@ -8353,7 +8353,7 @@ CopyActorCoordinates: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- CopyActorCoordinates_OnCarryClear_9D61: - lda a:$003A,y ; CPU:$9D61 PRG:1D61 B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$9D61 PRG:1D61 B9 3A 00 sec ; CPU:$9D64 PRG:1D64 38 sbc #$38 ; CPU:$9D65 PRG:1D65 E9 38 sta VramBlockCountLo ; CPU:$9D67 PRG:1D67 85 14 @@ -8369,15 +8369,15 @@ CopyActorCoordinates_OnCarryClear_9D61: sbc Zp18 ; CPU:$9D7A PRG:1D7A E5 18 sta CollisionFlagBits ; CPU:$9D7C PRG:1D7C 85 15 ldy ActorSlotOffset ; CPU:$9D7E PRG:1D7E A4 21 - lda a:$003C,y ; CPU:$9D80 PRG:1D80 B9 3C 00 + lda a:PlayerPosYLo1,y ; CPU:$9D80 PRG:1D80 B9 3C 00 cmp VramBlockCountLo ; CPU:$9D83 PRG:1D83 C5 14 bcs LoadActorTileIndex_OnCarrySet_9E02 ; CPU:$9D85 PRG:1D85 B0 7B cmp CollisionFlagBits ; CPU:$9D87 PRG:1D87 C5 15 bcs LoadActorTileIndex ; CPU:$9D89 PRG:1D89 B0 5B lda #$00 ; CPU:$9D8B PRG:1D8B A9 00 - sta a:$003B,y ; CPU:$9D8D PRG:1D8D 99 3B 00 + sta a:Zp3B,y ; CPU:$9D8D PRG:1D8D 99 3B 00 lda CollisionFlagBits ; CPU:$9D90 PRG:1D90 A5 15 - sta a:$003C,y ; CPU:$9D92 PRG:1D92 99 3C 00 + sta a:PlayerPosYLo1,y ; CPU:$9D92 PRG:1D92 99 3C 00 ldx ActorIndex ; CPU:$9D95 PRG:1D95 A6 1E lda PlayerActiveFlag,x ; CPU:$9D97 PRG:1D97 B5 78 bne CopyActorCoordinates_OnNonzero_9DA2 ; CPU:$9D99 PRG:1D99 D0 07 @@ -8490,18 +8490,18 @@ SetActorBounds: ; ----------------------------------------------------------------------------- LoadActorTileIndex: ldy ActorSlotOffset ; CPU:$9DE6 PRG:1DE6 A4 21 - lda a:$003B,y ; CPU:$9DE8 PRG:1DE8 B9 3B 00 + lda a:Zp3B,y ; CPU:$9DE8 PRG:1DE8 B9 3B 00 asl a ; CPU:$9DEB PRG:1DEB 0A - lda a:$003C,y ; CPU:$9DEC PRG:1DEC B9 3C 00 + lda a:PlayerPosYLo1,y ; CPU:$9DEC PRG:1DEC B9 3C 00 rol a ; CPU:$9DEF PRG:1DEF 2A pha ; CPU:$9DF0 PRG:1DF0 48 php ; CPU:$9DF1 PRG:1DF1 08 - lda a:$0034,y ; CPU:$9DF2 PRG:1DF2 B9 34 00 + lda a:ActorPosXLo,y ; CPU:$9DF2 PRG:1DF2 B9 34 00 and #$7F ; CPU:$9DF5 PRG:1DF5 29 7F rol a ; CPU:$9DF7 PRG:1DF7 2A plp ; CPU:$9DF8 PRG:1DF8 28 ror a ; CPU:$9DF9 PRG:1DF9 6A - sta a:$0034,y ; CPU:$9DFA PRG:1DFA 99 34 00 + sta a:ActorPosXLo,y ; CPU:$9DFA PRG:1DFA 99 34 00 pla ; CPU:$9DFD PRG:1DFD 68 sta a:$0032,y ; CPU:$9DFE PRG:1DFE 99 32 00 rts ; CPU:$9E01 PRG:1E01 60 @@ -8516,7 +8516,7 @@ LoadActorTileIndex: ; ----------------------------------------------------------------------------- LoadActorTileIndex_OnCarrySet_9E02: lda #$FF ; CPU:$9E02 PRG:1E02 A9 FF - sta a:$003B,y ; CPU:$9E04 PRG:1E04 99 3B 00 + sta a:Zp3B,y ; CPU:$9E04 PRG:1E04 99 3B 00 ldx VramBlockCountLo ; CPU:$9E07 PRG:1E07 A6 14 dex ; CPU:$9E09 PRG:1E09 CA stx PlayerPosYLo1,y ; CPU:$9E0A PRG:1E0A 96 3C @@ -8692,7 +8692,7 @@ QueueNametableWrite_OnNonzero_9E87: ; ----------------------------------------------------------------------------- QueueNametableWrite_OnNonnegative_9E89: lda (SourcePointerLo),y ; CPU:$9E89 PRG:1E89 B1 10 - sta a:$0097,y ; CPU:$9E8B PRG:1E8B 99 97 00 + sta a:Zp97,y ; CPU:$9E8B PRG:1E8B 99 97 00 dey ; CPU:$9E8E PRG:1E8E 88 bpl QueueNametableWrite_OnNonnegative_9E89 ; CPU:$9E8F PRG:1E8F 10 F8 ldy #$00 ; CPU:$9E91 PRG:1E91 A0 00 @@ -9554,7 +9554,7 @@ RunActorScript_OnZero_A1C3: eor #$01 ; CPU:$A1C5 PRG:21C5 49 01 sta Zp2C ; CPU:$A1C7 PRG:21C7 85 2C tay ; CPU:$A1C9 PRG:21C9 A8 - lda a:$0026,y ; CPU:$A1CA PRG:21CA B9 26 00 + lda a:PlayerSpriteIndex1,y ; CPU:$A1CA PRG:21CA B9 26 00 jsr $8CB8 ; CPU:$A1CD PRG:21CD 20 B8 8C lda Zp16 ; CPU:$A1D0 PRG:21D0 A5 16 sta VramBlockCountLo ; CPU:$A1D2 PRG:21D2 85 14 @@ -9672,7 +9672,7 @@ RunActorScript_OnZero_A246: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- LoadActorConfigByte: - lda a:$0026,y ; CPU:$A250 PRG:2250 B9 26 00 + lda a:PlayerSpriteIndex1,y ; CPU:$A250 PRG:2250 B9 26 00 ; ----------------------------------------------------------------------------- ; Routine: ComputeActorConfigOffset ; Global: Compute the byte offset of an actor configuration record. @@ -9843,7 +9843,7 @@ LoadActorConfigFields_OnZero_A2D8: lda PlayerActionState,x ; CPU:$A2D8 PRG:22D8 B5 F0 cmp #$D0 ; CPU:$A2DA PRG:22DA C9 D0 bne LoadActorConfigFields_OnNonzero_A30B ; CPU:$A2DC PRG:22DC D0 2D - lda a:$003C,y ; CPU:$A2DE PRG:22DE B9 3C 00 + lda a:PlayerPosYLo1,y ; CPU:$A2DE PRG:22DE B9 3C 00 bmi LoadActorConfigFields_OnNegative_A2EB ; CPU:$A2E1 PRG:22E1 30 08 lda ControllerDPad1,x ; CPU:$A2E3 PRG:22E3 B5 F6 and #$FC ; CPU:$A2E5 PRG:22E5 29 FC @@ -9875,7 +9875,7 @@ LoadActorConfigFields_OnNonzero_A2F1: sta ControllerDPad1,x ; CPU:$A2F1 PRG:22F1 95 F6 sta ControllerFaceButtons1,x ; CPU:$A2F3 PRG:22F3 95 F8 jsr $A4FF ; CPU:$A2F5 PRG:22F5 20 FF A4 - lda a:$0034,y ; CPU:$A2F8 PRG:22F8 B9 34 00 + lda a:ActorPosXLo,y ; CPU:$A2F8 PRG:22F8 B9 34 00 and #$7F ; CPU:$A2FB PRG:22FB 29 7F cmp #$5E ; CPU:$A2FD PRG:22FD C9 5E beq LoadActorConfigFields_OnZero_A305 ; CPU:$A2FF PRG:22FF F0 04 @@ -9984,16 +9984,16 @@ ReadActorConfigByte: bne ReadActorConfigByte_JoinBranchPaths_A388 ; CPU:$A345 PRG:2345 D0 41 lda Zp84 ; CPU:$A347 PRG:2347 A5 84 bne ReadActorConfigByte_JoinBranchPaths_A388 ; CPU:$A349 PRG:2349 D0 3D - lda a:$003A,y ; CPU:$A34B PRG:234B B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$A34B PRG:234B B9 3A 00 sec ; CPU:$A34E PRG:234E 38 - sbc a:$0033,y ; CPU:$A34F PRG:234F F9 33 00 + sbc a:Zp33,y ; CPU:$A34F PRG:234F F9 33 00 clc ; CPU:$A352 PRG:2352 18 adc #$08 ; CPU:$A353 PRG:2353 69 08 sta $0210 ; CPU:$A355 PRG:2355 8D 10 02 clc ; CPU:$A358 PRG:2358 18 adc #$08 ; CPU:$A359 PRG:2359 69 08 sta $0214 ; CPU:$A35B PRG:235B 8D 14 02 - lda a:$003C,y ; CPU:$A35E PRG:235E B9 3C 00 + lda a:PlayerPosYLo1,y ; CPU:$A35E PRG:235E B9 3C 00 asl a ; CPU:$A361 PRG:2361 0A sta Zp85 ; CPU:$A362 PRG:2362 85 85 lda #$00 ; CPU:$A364 PRG:2364 A9 00 @@ -10652,31 +10652,31 @@ AdvanceObjectSlot_OnCarryClear_A532: sta SourcePointerHi ; CPU:$A541 PRG:2541 85 11 lda PpuCtrlShadow ; CPU:$A543 PRG:2543 A5 FC ora #$04 ; CPU:$A545 PRG:2545 09 04 - sta $2000 ; CPU:$A547 PRG:2547 8D 00 20 + sta PPUCTRL ; CPU:$A547 PRG:2547 8D 00 20 lda ScriptArgHi,x ; CPU:$A54A PRG:254A B5 48 - sta $2006 ; CPU:$A54C PRG:254C 8D 06 20 + sta PPUADDR ; CPU:$A54C PRG:254C 8D 06 20 lda ScriptArgLo,x ; CPU:$A54F PRG:254F B5 47 - sta $2006 ; CPU:$A551 PRG:2551 8D 06 20 + sta PPUADDR ; CPU:$A551 PRG:2551 8D 06 20 ldy #$02 ; CPU:$A554 PRG:2554 A0 02 jsr $A5DD ; CPU:$A556 PRG:2556 20 DD A5 lda ScriptArgHi,x ; CPU:$A559 PRG:2559 B5 48 - sta $2006 ; CPU:$A55B PRG:255B 8D 06 20 + sta PPUADDR ; CPU:$A55B PRG:255B 8D 06 20 lda ScriptArgLo,x ; CPU:$A55E PRG:255E B5 47 sec ; CPU:$A560 PRG:2560 38 sbc #$01 ; CPU:$A561 PRG:2561 E9 01 - sta $2006 ; CPU:$A563 PRG:2563 8D 06 20 + sta PPUADDR ; CPU:$A563 PRG:2563 8D 06 20 ldy #$04 ; CPU:$A566 PRG:2566 A0 04 jsr $A5DD ; CPU:$A568 PRG:2568 20 DD A5 lda ScriptArgHi,x ; CPU:$A56B PRG:256B B5 48 - sta $2006 ; CPU:$A56D PRG:256D 8D 06 20 + sta PPUADDR ; CPU:$A56D PRG:256D 8D 06 20 lda ScriptArgLo,x ; CPU:$A570 PRG:2570 B5 47 clc ; CPU:$A572 PRG:2572 18 adc #$1E ; CPU:$A573 PRG:2573 69 1E - sta $2006 ; CPU:$A575 PRG:2575 8D 06 20 + sta PPUADDR ; CPU:$A575 PRG:2575 8D 06 20 ldy #$03 ; CPU:$A578 PRG:2578 A0 03 jsr $A5DD ; CPU:$A57A PRG:257A 20 DD A5 lda PpuCtrlShadow ; CPU:$A57D PRG:257D A5 FC - sta $2000 ; CPU:$A57F PRG:257F 8D 00 20 + sta PPUCTRL ; CPU:$A57F PRG:257F 8D 00 20 rts ; CPU:$A582 PRG:2582 60 ; ----------------------------------------------------------------------------- ; Routine: AdvanceObjectSlot_OnNegative_A583 @@ -10705,31 +10705,31 @@ AdvanceObjectSlot_OnNegative_A583: sta SourcePointerHi ; CPU:$A59B PRG:259B 85 11 lda PpuCtrlShadow ; CPU:$A59D PRG:259D A5 FC ora #$04 ; CPU:$A59F PRG:259F 09 04 - sta $2000 ; CPU:$A5A1 PRG:25A1 8D 00 20 + sta PPUCTRL ; CPU:$A5A1 PRG:25A1 8D 00 20 lda ScriptArgHi,x ; CPU:$A5A4 PRG:25A4 B5 48 - sta $2006 ; CPU:$A5A6 PRG:25A6 8D 06 20 + sta PPUADDR ; CPU:$A5A6 PRG:25A6 8D 06 20 lda ScriptArgLo,x ; CPU:$A5A9 PRG:25A9 B5 47 - sta $2006 ; CPU:$A5AB PRG:25AB 8D 06 20 + sta PPUADDR ; CPU:$A5AB PRG:25AB 8D 06 20 ldy #$02 ; CPU:$A5AE PRG:25AE A0 02 jsr $A5DD ; CPU:$A5B0 PRG:25B0 20 DD A5 lda ScriptArgHi,x ; CPU:$A5B3 PRG:25B3 B5 48 - sta $2006 ; CPU:$A5B5 PRG:25B5 8D 06 20 + sta PPUADDR ; CPU:$A5B5 PRG:25B5 8D 06 20 lda ScriptArgLo,x ; CPU:$A5B8 PRG:25B8 B5 47 clc ; CPU:$A5BA PRG:25BA 18 adc #$01 ; CPU:$A5BB PRG:25BB 69 01 - sta $2006 ; CPU:$A5BD PRG:25BD 8D 06 20 + sta PPUADDR ; CPU:$A5BD PRG:25BD 8D 06 20 ldy #$04 ; CPU:$A5C0 PRG:25C0 A0 04 jsr $A5DD ; CPU:$A5C2 PRG:25C2 20 DD A5 lda ScriptArgHi,x ; CPU:$A5C5 PRG:25C5 B5 48 - sta $2006 ; CPU:$A5C7 PRG:25C7 8D 06 20 + sta PPUADDR ; CPU:$A5C7 PRG:25C7 8D 06 20 lda ScriptArgLo,x ; CPU:$A5CA PRG:25CA B5 47 clc ; CPU:$A5CC PRG:25CC 18 adc #$22 ; CPU:$A5CD PRG:25CD 69 22 - sta $2006 ; CPU:$A5CF PRG:25CF 8D 06 20 + sta PPUADDR ; CPU:$A5CF PRG:25CF 8D 06 20 ldy #$03 ; CPU:$A5D2 PRG:25D2 A0 03 jsr $A5DD ; CPU:$A5D4 PRG:25D4 20 DD A5 lda PpuCtrlShadow ; CPU:$A5D7 PRG:25D7 A5 FC - sta $2000 ; CPU:$A5D9 PRG:25D9 8D 00 20 + sta PPUCTRL ; CPU:$A5D9 PRG:25D9 8D 00 20 rts ; CPU:$A5DC PRG:25DC 60 ; ----------------------------------------------------------------------------- ; Routine: WriteNametableBytes @@ -10754,7 +10754,7 @@ WriteNametableBytes: ; ----------------------------------------------------------------------------- WriteNametableBytes_OnNonnegative_A5DF: lda (SourcePointerLo),y ; CPU:$A5DF PRG:25DF B1 10 - sta $2007 ; CPU:$A5E1 PRG:25E1 8D 07 20 + sta PPUDATA ; CPU:$A5E1 PRG:25E1 8D 07 20 dey ; CPU:$A5E4 PRG:25E4 88 bpl WriteNametableBytes_OnNonnegative_A5DF ; CPU:$A5E5 PRG:25E5 10 F8 pla ; CPU:$A5E7 PRG:25E7 68 @@ -10958,7 +10958,7 @@ UpdateObjectCollisions: bcc UpdateObjectCollisions_OnCarryClear_A729 ; CPU:$A700 PRG:2700 90 27 bne UpdateObjectCollisions_OnNonzero_A70D ; CPU:$A702 PRG:2702 D0 09 lda #$20 ; CPU:$A704 PRG:2704 A9 20 - sta $2006 ; CPU:$A706 PRG:2706 8D 06 20 + sta PPUADDR ; CPU:$A706 PRG:2706 8D 06 20 lda #$7B ; CPU:$A709 PRG:2709 A9 7B bne UpdateObjectCollisions_OnNonzero_A714 ; CPU:$A70B PRG:270B D0 07 ; ----------------------------------------------------------------------------- @@ -10972,7 +10972,7 @@ UpdateObjectCollisions: ; ----------------------------------------------------------------------------- UpdateObjectCollisions_OnNonzero_A70D: lda #$24 ; CPU:$A70D PRG:270D A9 24 - sta $2006 ; CPU:$A70F PRG:270F 8D 06 20 + sta PPUADDR ; CPU:$A70F PRG:270F 8D 06 20 lda #$62 ; CPU:$A712 PRG:2712 A9 62 ; ----------------------------------------------------------------------------- ; Routine: UpdateObjectCollisions_OnNonzero_A714 @@ -10984,13 +10984,13 @@ UpdateObjectCollisions_OnNonzero_A70D: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- UpdateObjectCollisions_OnNonzero_A714: - sta $2006 ; CPU:$A714 PRG:2714 8D 06 20 + sta PPUADDR ; CPU:$A714 PRG:2714 8D 06 20 lda #$30 ; CPU:$A717 PRG:2717 A9 30 - sta $2007 ; CPU:$A719 PRG:2719 8D 07 20 - sta $2007 ; CPU:$A71C PRG:271C 8D 07 20 - sta $2007 ; CPU:$A71F PRG:271F 8D 07 20 - sta $2007 ; CPU:$A722 PRG:2722 8D 07 20 - sta $2007 ; CPU:$A725 PRG:2725 8D 07 20 + sta PPUDATA ; CPU:$A719 PRG:2719 8D 07 20 + sta PPUDATA ; CPU:$A71C PRG:271C 8D 07 20 + sta PPUDATA ; CPU:$A71F PRG:271F 8D 07 20 + sta PPUDATA ; CPU:$A722 PRG:2722 8D 07 20 + sta PPUDATA ; CPU:$A725 PRG:2725 8D 07 20 ; ----------------------------------------------------------------------------- ; Routine: UpdateObjectCollisions_OnNonzero_A728 ; Global: UpdateObjectCollisions_OnNonzero_A728.; no call site is visible in the static trace @@ -11015,9 +11015,9 @@ UpdateObjectCollisions_OnCarryClear_A729: lda ActionCooldown ; CPU:$A729 PRG:2729 A5 65 beq UpdateObjectCollisions_OnZero_A79B ; CPU:$A72B PRG:272B F0 6E lda #$20 ; CPU:$A72D PRG:272D A9 20 - sta $2006 ; CPU:$A72F PRG:272F 8D 06 20 + sta PPUADDR ; CPU:$A72F PRG:272F 8D 06 20 lda #$7B ; CPU:$A732 PRG:2732 A9 7B - sta $2006 ; CPU:$A734 PRG:2734 8D 06 20 + sta PPUADDR ; CPU:$A734 PRG:2734 8D 06 20 ldx Zp64 ; CPU:$A737 PRG:2737 A6 64 ldy #$05 ; CPU:$A739 PRG:2739 A0 05 lda #$38 ; CPU:$A73B PRG:273B A9 38 @@ -11031,7 +11031,7 @@ UpdateObjectCollisions_OnCarryClear_A729: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- UpdateObjectCollisions_OnNonzero_A73D: - sta $2007 ; CPU:$A73D PRG:273D 8D 07 20 + sta PPUDATA ; CPU:$A73D PRG:273D 8D 07 20 dex ; CPU:$A740 PRG:2740 CA bne UpdateObjectCollisions_OnNonzero_A745 ; CPU:$A741 PRG:2741 D0 02 lda #$30 ; CPU:$A743 PRG:2743 A9 30 @@ -11048,9 +11048,9 @@ UpdateObjectCollisions_OnNonzero_A745: dey ; CPU:$A745 PRG:2745 88 bne UpdateObjectCollisions_OnNonzero_A73D ; CPU:$A746 PRG:2746 D0 F5 lda #$24 ; CPU:$A748 PRG:2748 A9 24 - sta $2006 ; CPU:$A74A PRG:274A 8D 06 20 + sta PPUADDR ; CPU:$A74A PRG:274A 8D 06 20 lda #$62 ; CPU:$A74D PRG:274D A9 62 - sta $2006 ; CPU:$A74F PRG:274F 8D 06 20 + sta PPUADDR ; CPU:$A74F PRG:274F 8D 06 20 ldx ActionCooldown ; CPU:$A752 PRG:2752 A6 65 ldy #$05 ; CPU:$A754 PRG:2754 A0 05 lda #$30 ; CPU:$A756 PRG:2756 A9 30 @@ -11077,7 +11077,7 @@ UpdateObjectCollisions_OnNonzero_A758: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- UpdateObjectCollisions_OnNonzero_A75D: - sta $2007 ; CPU:$A75D PRG:275D 8D 07 20 + sta PPUDATA ; CPU:$A75D PRG:275D 8D 07 20 dey ; CPU:$A760 PRG:2760 88 bne UpdateObjectCollisions_OnNonzero_A758 ; CPU:$A761 PRG:2761 D0 F5 lda ScreenTransitionState ; CPU:$A763 PRG:2763 A5 68 @@ -11647,7 +11647,7 @@ UpdateObjectAnimation: adc #$08 ; CPU:$A970 PRG:2970 69 08 cmp #$10 ; CPU:$A972 PRG:2972 C9 10 bcs UpdateObjectAnimation_JoinBranchPaths_A991 ; CPU:$A974 PRG:2974 B0 1B - lda a:$004F,y ; CPU:$A976 PRG:2976 B9 4F 00 + lda a:Zp4F,y ; CPU:$A976 PRG:2976 B9 4F 00 clc ; CPU:$A979 PRG:2979 18 adc #$14 ; CPU:$A97A PRG:297A 69 14 cmp #$64 ; CPU:$A97C PRG:297C C9 64 @@ -11663,11 +11663,11 @@ UpdateObjectAnimation: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- UpdateObjectAnimation_OnCarryClear_A982: - sta a:$004F,y ; CPU:$A982 PRG:2982 99 4F 00 + sta a:Zp4F,y ; CPU:$A982 PRG:2982 99 4F 00 lda #$00 ; CPU:$A985 PRG:2985 A9 00 sta ScreenTransitionState ; CPU:$A987 PRG:2987 85 68 lda #$96 ; CPU:$A989 PRG:2989 A9 96 - sta a:$0078,y ; CPU:$A98B PRG:298B 99 78 00 + sta a:PlayerActiveFlag,y ; CPU:$A98B PRG:298B 99 78 00 jsr $82ED ; CPU:$A98E PRG:298E 20 ED 82 ; ----------------------------------------------------------------------------- ; Routine: UpdateObjectAnimation_JoinBranchPaths_A991 @@ -11866,9 +11866,9 @@ BuildObjectList: asl a ; CPU:$AA10 PRG:2A10 0A asl a ; CPU:$AA11 PRG:2A11 0A tay ; CPU:$AA12 PRG:2A12 A8 - lda a:$003A,y ; CPU:$AA13 PRG:2A13 B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$AA13 PRG:2A13 B9 3A 00 sec ; CPU:$AA16 PRG:2A16 38 - sbc a:$0033,y ; CPU:$AA17 PRG:2A17 F9 33 00 + sbc a:Zp33,y ; CPU:$AA17 PRG:2A17 F9 33 00 sec ; CPU:$AA1A PRG:2A1A 38 sbc $0210 ; CPU:$AA1B PRG:2A1B ED 10 02 clc ; CPU:$AA1E PRG:2A1E 18 @@ -11880,7 +11880,7 @@ BuildObjectList: lda Zp85 ; CPU:$AA28 PRG:2A28 A5 85 ror a ; CPU:$AA2A PRG:2A2A 6A sec ; CPU:$AA2B PRG:2A2B 38 - sbc a:$003C,y ; CPU:$AA2C PRG:2A2C F9 3C 00 + sbc a:PlayerPosYLo1,y ; CPU:$AA2C PRG:2A2C F9 3C 00 clc ; CPU:$AA2F PRG:2A2F 18 adc #$08 ; CPU:$AA30 PRG:2A30 69 08 cmp #$0C ; CPU:$AA32 PRG:2A32 C9 0C @@ -11888,12 +11888,12 @@ BuildObjectList: lda #$C0 ; CPU:$AA36 PRG:2A36 A9 C0 sta Zp84 ; CPU:$AA38 PRG:2A38 85 84 lda #$4B ; CPU:$AA3A PRG:2A3A A9 4B - sta a:$0034,y ; CPU:$AA3C PRG:2A3C 99 34 00 + sta a:ActorPosXLo,y ; CPU:$AA3C PRG:2A3C 99 34 00 lda #$FB ; CPU:$AA3F PRG:2A3F A9 FB sta PlayerActionState,x ; CPU:$AA41 PRG:2A41 95 F0 jsr $A4FF ; CPU:$AA43 PRG:2A43 20 FF A4 lda #$4F ; CPU:$AA46 PRG:2A46 A9 4F - sta a:$0034,y ; CPU:$AA48 PRG:2A48 99 34 00 + sta a:ActorPosXLo,y ; CPU:$AA48 PRG:2A48 99 34 00 lda #$FA ; CPU:$AA4B PRG:2A4B A9 FA sta PlayerActionState,x ; CPU:$AA4D PRG:2A4D 95 F0 lda #$00 ; CPU:$AA4F PRG:2A4F A9 00 @@ -11921,9 +11921,9 @@ ToggleScrollRegionFlip_OnCarrySet_AA55: ; ----------------------------------------------------------------------------- ReadControllers: ldx #$01 ; CPU:$AA56 PRG:2A56 A2 01 - stx $4016 ; CPU:$AA58 PRG:2A58 8E 16 40 + stx JOY1 ; CPU:$AA58 PRG:2A58 8E 16 40 dex ; CPU:$AA5B PRG:2A5B CA - stx $4016 ; CPU:$AA5C PRG:2A5C 8E 16 40 + stx JOY1 ; CPU:$AA5C PRG:2A5C 8E 16 40 jsr $AA63 ; CPU:$AA5F PRG:2A5F 20 63 AA inx ; CPU:$AA62 PRG:2A62 E8 ; ----------------------------------------------------------------------------- @@ -11949,7 +11949,7 @@ ReadControllerShiftRegister: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- ReadControllerShiftRegister_OnNonzero_AA69: - lda $4016,x ; CPU:$AA69 PRG:2A69 BD 16 40 + lda JOY1,x ; CPU:$AA69 PRG:2A69 BD 16 40 and #$03 ; CPU:$AA6C PRG:2A6C 29 03 cmp #$01 ; CPU:$AA6E PRG:2A6E C9 01 rol ControllerButtons1,x ; CPU:$AA70 PRG:2A70 36 FA @@ -12108,10 +12108,10 @@ StoreControllerButtonBits_OnZero_AACC: ; ----------------------------------------------------------------------------- EnableRendering: lda #$18 ; CPU:$AACD PRG:2ACD A9 18 - sta $2001 ; CPU:$AACF PRG:2ACF 8D 01 20 + sta PPUMASK ; CPU:$AACF PRG:2ACF 8D 01 20 sta PpuMaskShadow ; CPU:$AAD2 PRG:2AD2 85 FD lda #$90 ; CPU:$AAD4 PRG:2AD4 A9 90 - sta $2000 ; CPU:$AAD6 PRG:2AD6 8D 00 20 + sta PPUCTRL ; CPU:$AAD6 PRG:2AD6 8D 00 20 sta PpuCtrlShadow ; CPU:$AAD9 PRG:2AD9 85 FC rts ; CPU:$AADB PRG:2ADB 60 ; ----------------------------------------------------------------------------- @@ -12125,9 +12125,9 @@ EnableRendering: ; ----------------------------------------------------------------------------- DisableRenderingAndClearNametables: lda #$00 ; CPU:$AADC PRG:2ADC A9 00 - sta $2000 ; CPU:$AADE PRG:2ADE 8D 00 20 + sta PPUCTRL ; CPU:$AADE PRG:2ADE 8D 00 20 sta PpuCtrlShadow ; CPU:$AAE1 PRG:2AE1 85 FC - sta $2001 ; CPU:$AAE3 PRG:2AE3 8D 01 20 + sta PPUMASK ; CPU:$AAE3 PRG:2AE3 8D 01 20 sta PpuMaskShadow ; CPU:$AAE6 PRG:2AE6 85 FD lda #$20 ; CPU:$AAE8 PRG:2AE8 A9 20 jsr $AAEF ; CPU:$AAEA PRG:2AEA 20 EF AA @@ -12142,9 +12142,9 @@ DisableRenderingAndClearNametables: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- ClearNametablePattern: - sta $2006 ; CPU:$AAEF PRG:2AEF 8D 06 20 + sta PPUADDR ; CPU:$AAEF PRG:2AEF 8D 06 20 lda #$00 ; CPU:$AAF2 PRG:2AF2 A9 00 - sta $2006 ; CPU:$AAF4 PRG:2AF4 8D 06 20 + sta PPUADDR ; CPU:$AAF4 PRG:2AF4 8D 06 20 lda #$04 ; CPU:$AAF7 PRG:2AF7 A9 04 sta SourcePointerLo ; CPU:$AAF9 PRG:2AF9 85 10 ldy #$C0 ; CPU:$AAFB PRG:2AFB A0 C0 @@ -12159,7 +12159,7 @@ ClearNametablePattern: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- ClearNametablePattern_OnNonzero_AAFF: - sta $2007 ; CPU:$AAFF PRG:2AFF 8D 07 20 + sta PPUDATA ; CPU:$AAFF PRG:2AFF 8D 07 20 dey ; CPU:$AB02 PRG:2B02 88 bne ClearNametablePattern_OnNonzero_AAFF ; CPU:$AB03 PRG:2B03 D0 FA dec SourcePointerLo ; CPU:$AB05 PRG:2B05 C6 10 @@ -12175,7 +12175,7 @@ ClearNametablePattern_OnNonzero_AAFF: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- ClearNametablePattern_OnNonzero_AB0B: - sta $2007 ; CPU:$AB0B PRG:2B0B 8D 07 20 + sta PPUDATA ; CPU:$AB0B PRG:2B0B 8D 07 20 iny ; CPU:$AB0E PRG:2B0E C8 cpy #$40 ; CPU:$AB0F PRG:2B0F C0 40 bne ClearNametablePattern_OnNonzero_AB0B ; CPU:$AB11 PRG:2B11 D0 F8 @@ -12368,13 +12368,13 @@ FillShadowOamBlock_OnNonnegative_ABA8: ; ----------------------------------------------------------------------------- UploadPalette: lda #$00 ; CPU:$ABB1 PRG:2BB1 A9 00 - sta $2001 ; CPU:$ABB3 PRG:2BB3 8D 01 20 + sta PPUMASK ; CPU:$ABB3 PRG:2BB3 8D 01 20 tay ; CPU:$ABB6 PRG:2BB6 A8 - lda $2002 ; CPU:$ABB7 PRG:2BB7 AD 02 20 + lda PPUSTATUS ; CPU:$ABB7 PRG:2BB7 AD 02 20 lda #$3F ; CPU:$ABBA PRG:2BBA A9 3F - sta $2006 ; CPU:$ABBC PRG:2BBC 8D 06 20 + sta PPUADDR ; CPU:$ABBC PRG:2BBC 8D 06 20 lda #$00 ; CPU:$ABBF PRG:2BBF A9 00 - sta $2006 ; CPU:$ABC1 PRG:2BC1 8D 06 20 + sta PPUADDR ; CPU:$ABC1 PRG:2BC1 8D 06 20 ; ----------------------------------------------------------------------------- ; Routine: UploadPalette_OnCarryClear_ABC4 ; Global: UploadPalette_OnCarryClear_ABC4.; no call site is visible in the static trace @@ -12386,18 +12386,18 @@ UploadPalette: ; ----------------------------------------------------------------------------- UploadPalette_OnCarryClear_ABC4: lda $0300,y ; CPU:$ABC4 PRG:2BC4 B9 00 03 - sta $2007 ; CPU:$ABC7 PRG:2BC7 8D 07 20 + sta PPUDATA ; CPU:$ABC7 PRG:2BC7 8D 07 20 iny ; CPU:$ABCA PRG:2BCA C8 cpy #$20 ; CPU:$ABCB PRG:2BCB C0 20 bcc UploadPalette_OnCarryClear_ABC4 ; CPU:$ABCD PRG:2BCD 90 F5 lda #$3F ; CPU:$ABCF PRG:2BCF A9 3F - sta $2006 ; CPU:$ABD1 PRG:2BD1 8D 06 20 + sta PPUADDR ; CPU:$ABD1 PRG:2BD1 8D 06 20 lda #$00 ; CPU:$ABD4 PRG:2BD4 A9 00 - sta $2006 ; CPU:$ABD6 PRG:2BD6 8D 06 20 - sta $2006 ; CPU:$ABD9 PRG:2BD9 8D 06 20 - sta $2006 ; CPU:$ABDC PRG:2BDC 8D 06 20 + sta PPUADDR ; CPU:$ABD6 PRG:2BD6 8D 06 20 + sta PPUADDR ; CPU:$ABD9 PRG:2BD9 8D 06 20 + sta PPUADDR ; CPU:$ABDC PRG:2BDC 8D 06 20 lda PpuMaskShadow ; CPU:$ABDF PRG:2BDF A5 FD - sta $2001 ; CPU:$ABE1 PRG:2BE1 8D 01 20 + sta PPUMASK ; CPU:$ABE1 PRG:2BE1 8D 01 20 ; ----------------------------------------------------------------------------- ; Routine: ApplyPpuScrollAndControl ; Global: Write the latched scroll (PpuScrollX/PpuScrollY) and PpuCtrlShadow to the PPU. @@ -12408,13 +12408,13 @@ UploadPalette_OnCarryClear_ABC4: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- ApplyPpuScrollAndControl: - lda $2002 ; CPU:$ABE4 PRG:2BE4 AD 02 20 + lda PPUSTATUS ; CPU:$ABE4 PRG:2BE4 AD 02 20 lda PpuScrollX ; CPU:$ABE7 PRG:2BE7 A5 FE - sta $2005 ; CPU:$ABE9 PRG:2BE9 8D 05 20 + sta PPUSCROLL ; CPU:$ABE9 PRG:2BE9 8D 05 20 lda PpuScrollY ; CPU:$ABEC PRG:2BEC A5 FF - sta $2005 ; CPU:$ABEE PRG:2BEE 8D 05 20 + sta PPUSCROLL ; CPU:$ABEE PRG:2BEE 8D 05 20 lda PpuCtrlShadow ; CPU:$ABF1 PRG:2BF1 A5 FC - sta $2000 ; CPU:$ABF3 PRG:2BF3 8D 00 20 + sta PPUCTRL ; CPU:$ABF3 PRG:2BF3 8D 00 20 rts ; CPU:$ABF6 PRG:2BF6 60 ; ----------------------------------------------------------------------------- ; Routine: ShiftAccumulatorRight4 @@ -12442,7 +12442,7 @@ ShiftAccumulatorRight4: ; ----------------------------------------------------------------------------- ClearOamShadow: ldx #$00 ; CPU:$ABFC PRG:2BFC A2 00 - stx $2003 ; CPU:$ABFE PRG:2BFE 8E 03 20 + stx OAMADDR ; CPU:$ABFE PRG:2BFE 8E 03 20 lda #$F0 ; CPU:$AC01 PRG:2C01 A9 F0 ; ----------------------------------------------------------------------------- ; Routine: ClearOamShadow_OnNonzero_AC03 @@ -12454,7 +12454,7 @@ ClearOamShadow: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- ClearOamShadow_OnNonzero_AC03: - sta $2004 ; CPU:$AC03 PRG:2C03 8D 04 20 + sta OAMDATA ; CPU:$AC03 PRG:2C03 8D 04 20 sta $0200,x ; CPU:$AC06 PRG:2C06 9D 00 02 dex ; CPU:$AC09 PRG:2C09 CA bne ClearOamShadow_OnNonzero_AC03 ; CPU:$AC0A PRG:2C0A D0 F7 @@ -12486,7 +12486,7 @@ SelectLevelVramWriter: sta SourcePointerLo ; CPU:$AC2B PRG:2C2B 85 10 lda $AC36,x ; CPU:$AC2D PRG:2C2D BD 36 AC sta SourcePointerHi ; CPU:$AC30 PRG:2C30 85 11 - jmp ($0010) ; CPU:$AC32 PRG:2C32 6C 10 00 + jmp (SourcePointerLo) ; CPU:$AC32 PRG:2C32 6C 10 00 ; Pass 3: 3 x 16-bit VRAM writers, index = the level byte at $0326. SelectLevelVramWriter loads the entry into SourcePointerLo/Hi and jumps through jmp ($0010). ; ---- data $AC35-$AC3A (6 bytes) ---- LevelVramWriterTable: @@ -12522,9 +12522,9 @@ FillAttributeBlock: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- WriteAttributeBlock: - sta $2006 ; CPU:$AC4C PRG:2C4C 8D 06 20 + sta PPUADDR ; CPU:$AC4C PRG:2C4C 8D 06 20 lda #$C0 ; CPU:$AC4F PRG:2C4F A9 C0 - sta $2006 ; CPU:$AC51 PRG:2C51 8D 06 20 + sta PPUADDR ; CPU:$AC51 PRG:2C51 8D 06 20 ldx #$40 ; CPU:$AC54 PRG:2C54 A2 40 ; ----------------------------------------------------------------------------- ; Routine: WriteAttributeBlock_OnNonzero_AC56 @@ -12537,7 +12537,7 @@ WriteAttributeBlock: ; ----------------------------------------------------------------------------- WriteAttributeBlock_OnNonzero_AC56: lda (SourcePointerLo),y ; CPU:$AC56 PRG:2C56 B1 10 - sta $2007 ; CPU:$AC58 PRG:2C58 8D 07 20 + sta PPUDATA ; CPU:$AC58 PRG:2C58 8D 07 20 jsr $AC88 ; CPU:$AC5B PRG:2C5B 20 88 AC dex ; CPU:$AC5E PRG:2C5E CA bne WriteAttributeBlock_OnNonzero_AC56 ; CPU:$AC5F PRG:2C5F D0 F5 @@ -12572,9 +12572,9 @@ LoadAttributeStream: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- SetPpuAddressHighAnd40: - sta $2006 ; CPU:$AC78 PRG:2C78 8D 06 20 + sta PPUADDR ; CPU:$AC78 PRG:2C78 8D 06 20 lda #$40 ; CPU:$AC7B PRG:2C7B A9 40 - sta $2006 ; CPU:$AC7D PRG:2C7D 8D 06 20 + sta PPUADDR ; CPU:$AC7D PRG:2C7D 8D 06 20 ldy #$00 ; CPU:$AC80 PRG:2C80 A0 00 ; ----------------------------------------------------------------------------- ; Routine: WriteCompressedVramStream @@ -12631,7 +12631,7 @@ DecodeVramStreamToken: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- AdvanceSourceByte_OnCarrySet_AC9E: - sta $2007 ; CPU:$AC9E PRG:2C9E 8D 07 20 + sta PPUDATA ; CPU:$AC9E PRG:2C9E 8D 07 20 ; ----------------------------------------------------------------------------- ; Routine: AdvanceSourceByte_OnZero_ACA1 ; Global: AdvanceSourceByte_OnZero_ACA1.; no call site is visible in the static trace @@ -12672,7 +12672,7 @@ WriteVramRunToken: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- AdvanceSourceByte_OnNonzero_ACB5: - sta $2007 ; CPU:$ACB5 PRG:2CB5 8D 07 20 + sta PPUDATA ; CPU:$ACB5 PRG:2CB5 8D 07 20 dex ; CPU:$ACB8 PRG:2CB8 CA bne AdvanceSourceByte_OnNonzero_ACB5 ; CPU:$ACB9 PRG:2CB9 D0 FA beq AdvanceSourceByte_OnZero_ACA1 ; CPU:$ACBB PRG:2CBB F0 E4 @@ -12720,10 +12720,10 @@ WithRenderingEnabled: lda PpuCtrlShadow ; CPU:$ACE5 PRG:2CE5 A5 FC pha ; CPU:$ACE7 PRG:2CE7 48 ora #$04 ; CPU:$ACE8 PRG:2CE8 09 04 - sta $2000 ; CPU:$ACEA PRG:2CEA 8D 00 20 + sta PPUCTRL ; CPU:$ACEA PRG:2CEA 8D 00 20 jsr $ACF5 ; CPU:$ACED PRG:2CED 20 F5 AC pla ; CPU:$ACF0 PRG:2CF0 68 - sta $2000 ; CPU:$ACF1 PRG:2CF1 8D 00 20 + sta PPUCTRL ; CPU:$ACF1 PRG:2CF1 8D 00 20 rts ; CPU:$ACF4 PRG:2CF4 60 ; ----------------------------------------------------------------------------- ; Routine: WriteCompressedVramBlocks @@ -12736,7 +12736,7 @@ WithRenderingEnabled: ; ----------------------------------------------------------------------------- WriteCompressedVramBlocks: ldy #$00 ; CPU:$ACF5 PRG:2CF5 A0 00 - lda $2002 ; CPU:$ACF7 PRG:2CF7 AD 02 20 + lda PPUSTATUS ; CPU:$ACF7 PRG:2CF7 AD 02 20 lda (SourcePointerLo),y ; CPU:$ACFA PRG:2CFA B1 10 sta DestinationPointerLo ; CPU:$ACFC PRG:2CFC 85 12 jsr $AC88 ; CPU:$ACFE PRG:2CFE 20 88 AC @@ -12751,10 +12751,10 @@ WriteCompressedVramBlocks: ; ----------------------------------------------------------------------------- WriteCompressedVramBlocks_OnNonzero_AD01: lda (SourcePointerLo),y ; CPU:$AD01 PRG:2D01 B1 10 - sta $2006 ; CPU:$AD03 PRG:2D03 8D 06 20 + sta PPUADDR ; CPU:$AD03 PRG:2D03 8D 06 20 jsr $AC88 ; CPU:$AD06 PRG:2D06 20 88 AC lda (SourcePointerLo),y ; CPU:$AD09 PRG:2D09 B1 10 - sta $2006 ; CPU:$AD0B PRG:2D0B 8D 06 20 + sta PPUADDR ; CPU:$AD0B PRG:2D0B 8D 06 20 jsr $AC88 ; CPU:$AD0E PRG:2D0E 20 88 AC jsr $AC82 ; CPU:$AD11 PRG:2D11 20 82 AC dec DestinationPointerLo ; CPU:$AD14 PRG:2D14 C6 12 @@ -12811,7 +12811,7 @@ ComputePlayerOverlapBits: lda ScriptFlagsHi ; CPU:$AD4C PRG:2D4C A5 4E beq ComputePlayerOverlapBits_JoinBranchPaths_AD7A ; CPU:$AD4E PRG:2D4E F0 2A jsr $A4FF ; CPU:$AD50 PRG:2D50 20 FF A4 - lda a:$0033,y ; CPU:$AD53 PRG:2D53 B9 33 00 + lda a:Zp33,y ; CPU:$AD53 PRG:2D53 B9 33 00 beq ComputePlayerOverlapBits_JoinBranchPaths_AD7A ; CPU:$AD56 PRG:2D56 F0 22 bmi ComputePlayerOverlapBits_JoinBranchPaths_AD7A ; CPU:$AD58 PRG:2D58 30 20 lda FrameCounterLo ; CPU:$AD5A PRG:2D5A A5 24 @@ -12820,7 +12820,7 @@ ComputePlayerOverlapBits: bne ComputePlayerOverlapBits_JoinBranchPaths_AD7A ; CPU:$AD60 PRG:2D60 D0 18 ldx ActorIndex ; CPU:$AD62 PRG:2D62 A6 1E ldy ActorSlotOffset ; CPU:$AD64 PRG:2D64 A4 21 - lda a:$003A,y ; CPU:$AD66 PRG:2D66 B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$AD66 PRG:2D66 B9 3A 00 cmp #$68 ; CPU:$AD69 PRG:2D69 C9 68 bcs ComputePlayerOverlapBits_OnCarrySet_AD71 ; CPU:$AD6B PRG:2D6B B0 04 lda #$04 ; CPU:$AD6D PRG:2D6D A9 04 @@ -12916,7 +12916,7 @@ ComputePlayerOverlapBits_JoinBranchPaths_AD94: lda ScreenTransitionState ; CPU:$AD94 PRG:2D94 A5 68 beq ComputePlayerOverlapBits_JoinBranchPaths_ADC2 ; CPU:$AD96 PRG:2D96 F0 2A bmi ComputePlayerOverlapBits_JoinBranchPaths_ADC2 ; CPU:$AD98 PRG:2D98 30 28 - lda a:$003A,y ; CPU:$AD9A PRG:2D9A B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$AD9A PRG:2D9A B9 3A 00 sec ; CPU:$AD9D PRG:2D9D 38 sbc PlayerBoxOriginX ; CPU:$AD9E PRG:2D9E E5 6E clc ; CPU:$ADA0 PRG:2DA0 18 @@ -12958,7 +12958,7 @@ ComputePlayerOverlapBits_OnNonzero_ADAF: ; Clobbers: Not yet resolved. ; ----------------------------------------------------------------------------- ComputePlayerOverlapBits_OnCarryClear_ADB1: - lda a:$003C,y ; CPU:$ADB1 PRG:2DB1 B9 3C 00 + lda a:PlayerPosYLo1,y ; CPU:$ADB1 PRG:2DB1 B9 3C 00 sec ; CPU:$ADB4 PRG:2DB4 38 sbc PlayerBoxOriginY ; CPU:$ADB5 PRG:2DB5 E5 70 clc ; CPU:$ADB7 PRG:2DB7 18 @@ -12980,14 +12980,14 @@ ComputePlayerOverlapBits_JoinBranchPaths_ADC2: lda FrameCounterLo ; CPU:$ADC2 PRG:2DC2 A5 24 and #$0F ; CPU:$ADC4 PRG:2DC4 29 0F beq ComputePlayerOverlapBits_OnZero_AE16 ; CPU:$ADC6 PRG:2DC6 F0 4E - lda a:$003A,y ; CPU:$ADC8 PRG:2DC8 B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$ADC8 PRG:2DC8 B9 3A 00 sta SourcePointerLo ; CPU:$ADCB PRG:2DCB 85 10 - lda a:$003C,y ; CPU:$ADCD PRG:2DCD B9 3C 00 + lda a:PlayerPosYLo1,y ; CPU:$ADCD PRG:2DCD B9 3C 00 sta DestinationPointerLo ; CPU:$ADD0 PRG:2DD0 85 12 jsr $A4FF ; CPU:$ADD2 PRG:2DD2 20 FF A4 - lda a:$003A,y ; CPU:$ADD5 PRG:2DD5 B9 3A 00 + lda a:PlayerPosXLo1,y ; CPU:$ADD5 PRG:2DD5 B9 3A 00 sta SourcePointerHi ; CPU:$ADD8 PRG:2DD8 85 11 - lda a:$003C,y ; CPU:$ADDA PRG:2DDA B9 3C 00 + lda a:PlayerPosYLo1,y ; CPU:$ADDA PRG:2DDA B9 3C 00 sta DestinationPointerHi ; CPU:$ADDD PRG:2DDD 85 13 lda SourcePointerLo ; CPU:$ADDF PRG:2DDF A5 10 sec ; CPU:$ADE1 PRG:2DE1 38 @@ -13446,7 +13446,7 @@ ComputeEdgeOverlapBits_JoinBranchPaths_AF24: ; ----------------------------------------------------------------------------- InitializeSoundEngine: lda #$00 ; CPU:$AF25 PRG:2F25 A9 00 - sta $4015 ; CPU:$AF27 PRG:2F27 8D 15 40 + sta APUSTATUS ; CPU:$AF27 PRG:2F27 8D 15 40 sta ApuEnableMask ; CPU:$AF2A PRG:2F2A 85 E8 lda #$FF ; CPU:$AF2C PRG:2F2C A9 FF sta SoundChannelStep1 ; CPU:$AF2E PRG:2F2E 85 D0 @@ -13574,12 +13574,12 @@ StartSoundChannelNote: lda (SoundReadPointerLo),y ; CPU:$AF91 PRG:2F91 B1 EE ora SoundEnvelopeMaskHi ; CPU:$AF93 PRG:2F93 05 ED ldy ApuRegisterOffset ; CPU:$AF95 PRG:2F95 A4 E4 - sta $4000,y ; CPU:$AF97 PRG:2F97 99 00 40 + sta APUPULSE1CTRL,y ; CPU:$AF97 PRG:2F97 99 00 40 sta SoundLastCtrlWrite1,x ; CPU:$AF9A PRG:2F9A 95 E0 ldy #$03 ; CPU:$AF9C PRG:2F9C A0 03 lda (SoundReadPointerLo),y ; CPU:$AF9E PRG:2F9E B1 EE ldy ApuRegisterOffset ; CPU:$AFA0 PRG:2FA0 A4 E4 - sta $4001,y ; CPU:$AFA2 PRG:2FA2 99 01 40 + sta APUPULSE1SWEEP,y ; CPU:$AFA2 PRG:2FA2 99 01 40 lda #$FF ; CPU:$AFA5 PRG:2FA5 A9 FF sta SoundSustainCounter1,x ; CPU:$AFA7 PRG:2FA7 95 DC bne AdvanceSoundChannelNote ; CPU:$AFA9 PRG:2FA9 D0 AA @@ -13703,16 +13703,16 @@ WriteToneRegisters: jsr $B05D ; CPU:$B00A PRG:300A 20 5D B0 lda SoundLastCtrlWrite1,x ; CPU:$B00D PRG:300D B5 E0 ldy ApuRegisterOffset ; CPU:$B00F PRG:300F A4 E4 - sta $4000,y ; CPU:$B011 PRG:3011 99 00 40 + sta APUPULSE1CTRL,y ; CPU:$B011 PRG:3011 99 00 40 lda SoundTonePeriodHi ; CPU:$B014 PRG:3014 A5 EB and #$07 ; CPU:$B016 PRG:3016 29 07 ora #$08 ; CPU:$B018 PRG:3018 09 08 sta SoundTonePeriodHi ; CPU:$B01A PRG:301A 85 EB lda SoundTonePeriodLo ; CPU:$B01C PRG:301C A5 EA ldy ApuRegisterOffset ; CPU:$B01E PRG:301E A4 E4 - sta $4002,y ; CPU:$B020 PRG:3020 99 02 40 + sta APUPULSE1TIMERLO,y ; CPU:$B020 PRG:3020 99 02 40 lda SoundTonePeriodHi ; CPU:$B023 PRG:3023 A5 EB - sta $4003,y ; CPU:$B025 PRG:3025 99 03 40 + sta APUPULSE1TIMERHI,y ; CPU:$B025 PRG:3025 99 03 40 ; ----------------------------------------------------------------------------- ; Routine: ComputeTonePeriod_OnCarrySet_B028 ; Global: ComputeTonePeriod_OnCarrySet_B028.; no call site is visible in the static trace @@ -13846,7 +13846,7 @@ BuildApuChannelMask: WriteApuEnable: bit SoundMuted ; CPU:$B062 PRG:3062 24 E9 bmi WriteApuEnable_OnNegative_B069 ; CPU:$B064 PRG:3064 30 03 - sta $4015 ; CPU:$B066 PRG:3066 8D 15 40 + sta APUSTATUS ; CPU:$B066 PRG:3066 8D 15 40 ; ----------------------------------------------------------------------------- ; Routine: WriteApuEnable_OnNegative_B069 ; Global: WriteApuEnable_OnNegative_B069.; no call site is visible in the static trace @@ -13894,7 +13894,7 @@ WriteApuControlRegister: ora (SoundReadPointerLo),y ; CPU:$B083 PRG:3083 11 EE sta SoundLastCtrlWrite1,x ; CPU:$B085 PRG:3085 95 E0 ldy ApuRegisterOffset ; CPU:$B087 PRG:3087 A4 E4 - sta $4000,y ; CPU:$B089 PRG:3089 99 00 40 + sta APUPULSE1CTRL,y ; CPU:$B089 PRG:3089 99 00 40 ; ----------------------------------------------------------------------------- ; Routine: AdvanceSoundSequenceStep ; Global: AdvanceSoundSequenceStep.; called from $B0C8 diff --git a/NES PowerPad Test Card (U)/OVERVIEW.md b/NES PowerPad Test Card (U)/OVERVIEW.md index 9747bc6..a0c533e 100644 --- a/NES PowerPad Test Card (U)/OVERVIEW.md +++ b/NES PowerPad Test Card (U)/OVERVIEW.md @@ -11,10 +11,10 @@ This document describes the execution flow of the disassembled NES PowerPad Test | 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` (~1,650 lines with headers) | -| Output | `reconstructed_prg.bin` (16,384 bytes) | +| Output | `reconstructed.nes` (whole ROM: 16-byte header + 16,384-byte PRG + 8,192-byte CHR) | ### Interrupt vectors (CPU $FFFA–$FFFF) @@ -30,7 +30,7 @@ This document describes the execution flow of the disassembled NES PowerPad Test `make` in `copilot/` assembles `prg.s` with `ca65`, links with `ld65`, and verifies against `prg.bin`. -**Verification result: BYTE-IDENTICAL** — `reconstructed_prg.bin` matches `prg.bin` exactly (all 16,384 bytes), and `prg.bin` matches the PRG bank of `NES PowerPad Test Cart (U) [!].nes`. +**Verification result: BYTE-IDENTICAL** — `reconstructed.nes` matches `rom.nes` exactly (header + PRG + CHR). --- diff --git a/NES PowerPad Test Card (U)/copilot/prg.s b/NES PowerPad Test Card (U)/copilot/prg.s index ed6f1ea..0b2fe2e 100644 --- a/NES PowerPad Test Card (U)/copilot/prg.s +++ b/NES PowerPad Test Card (U)/copilot/prg.s @@ -698,7 +698,7 @@ NmiHandler: pha ; CPU:$E072 PRG:2072 48 jsr $E1FB ; CPU:$E073 PRG:2073 20 FB E1 inc Zp03 ; CPU:$E076 PRG:2076 E6 03 - lda $2002 ; CPU:$E078 PRG:2078 AD 02 20 + lda PPUSTATUS ; CPU:$E078 PRG:2078 AD 02 20 sta Zp02 ; CPU:$E07B PRG:207B 85 02 jsr $E338 ; CPU:$E07D PRG:207D 20 38 E3 jsr $E398 ; CPU:$E080 PRG:2080 20 98 E3 @@ -739,13 +739,13 @@ ResetInit: sei ; CPU:$E09B PRG:209B 78 cld ; CPU:$E09C PRG:209C D8 ldx #$00 ; CPU:$E09D PRG:209D A2 00 - stx $2001 ; CPU:$E09F PRG:209F 8E 01 20 + stx PPUMASK ; CPU:$E09F PRG:209F 8E 01 20 stx Zp01 ; CPU:$E0A2 PRG:20A2 86 01 ldx #$10 ; CPU:$E0A4 PRG:20A4 A2 10 - stx $2000 ; CPU:$E0A6 PRG:20A6 8E 00 20 + stx PPUCTRL ; CPU:$E0A6 PRG:20A6 8E 00 20 stx Zp00 ; CPU:$E0A9 PRG:20A9 86 00 lda #$40 ; CPU:$E0AB PRG:20AB A9 40 - sta $4017 ; CPU:$E0AD PRG:20AD 8D 17 40 + sta JOY2 ; CPU:$E0AD PRG:20AD 8D 17 40 ; ----------------------------------------------------------------------------- ; Routine: WaitVBlank1_Loop ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -756,7 +756,7 @@ ResetInit: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- WaitVBlank1_Loop: - lda $2002 ; CPU:$E0B0 PRG:20B0 AD 02 20 + lda PPUSTATUS ; CPU:$E0B0 PRG:20B0 AD 02 20 bpl WaitVBlank1_Loop ; CPU:$E0B3 PRG:20B3 10 FB ; ----------------------------------------------------------------------------- ; Routine: WaitVBlank2_Loop @@ -768,12 +768,12 @@ WaitVBlank1_Loop: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- WaitVBlank2_Loop: - lda $2002 ; CPU:$E0B5 PRG:20B5 AD 02 20 + lda PPUSTATUS ; CPU:$E0B5 PRG:20B5 AD 02 20 bpl WaitVBlank2_Loop ; CPU:$E0B8 PRG:20B8 10 FB lda #$0F ; CPU:$E0BA PRG:20BA A9 0F - sta $4015 ; CPU:$E0BC PRG:20BC 8D 15 40 + sta APUSTATUS ; CPU:$E0BC PRG:20BC 8D 15 40 lda #$02 ; CPU:$E0BF PRG:20BF A9 02 - sta $4016 ; CPU:$E0C1 PRG:20C1 8D 16 40 + sta JOY1 ; CPU:$E0C1 PRG:20C1 8D 16 40 rts ; CPU:$E0C4 PRG:20C4 60 ; ---- data $E0C5-$E0C8 (4 bytes) ---- .byte $A2, $80, $9A, $60 ; CPU:$E0C5 PRG:20C5 A2 80 9A 60 @@ -836,9 +836,9 @@ ClearVRAM_Loop: ; ----------------------------------------------------------------------------- ClearVRAM: lda #$20 ; CPU:$E0EB PRG:20EB A9 20 - sta $2006 ; CPU:$E0ED PRG:20ED 8D 06 20 + sta PPUADDR ; CPU:$E0ED PRG:20ED 8D 06 20 lda #$00 ; CPU:$E0F0 PRG:20F0 A9 00 - sta $2006 ; CPU:$E0F2 PRG:20F2 8D 06 20 + sta PPUADDR ; CPU:$E0F2 PRG:20F2 8D 06 20 ldy #$00 ; CPU:$E0F5 PRG:20F5 A0 00 ldx #$00 ; CPU:$E0F7 PRG:20F7 A2 00 lda #$04 ; CPU:$E0F9 PRG:20F9 A9 04 @@ -852,7 +852,7 @@ ClearVRAM: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ClearPalette_Loop: - sta $2007 ; CPU:$E0FB PRG:20FB 8D 07 20 + sta PPUDATA ; CPU:$E0FB PRG:20FB 8D 07 20 inx ; CPU:$E0FE PRG:20FE E8 bne ClearPalette_Loop ; CPU:$E0FF PRG:20FF D0 FA iny ; CPU:$E101 PRG:2101 C8 @@ -870,9 +870,9 @@ ClearPalette_Loop: ; ----------------------------------------------------------------------------- LoadPalette: lda #$3F ; CPU:$E107 PRG:2107 A9 3F - sta $2006 ; CPU:$E109 PRG:2109 8D 06 20 + sta PPUADDR ; CPU:$E109 PRG:2109 8D 06 20 lda #$00 ; CPU:$E10C PRG:210C A9 00 - sta $2006 ; CPU:$E10E PRG:210E 8D 06 20 + sta PPUADDR ; CPU:$E10E PRG:210E 8D 06 20 ldx #$00 ; CPU:$E111 PRG:2111 A2 00 ; ----------------------------------------------------------------------------- ; Routine: ClearPalette_Loop2 @@ -885,7 +885,7 @@ LoadPalette: ; ----------------------------------------------------------------------------- ClearPalette_Loop2: lda $E121,X ; CPU:$E113 PRG:2113 BD 21 E1 - sta $2007 ; CPU:$E116 PRG:2116 8D 07 20 + sta PPUDATA ; CPU:$E116 PRG:2116 8D 07 20 inx ; CPU:$E119 PRG:2119 E8 cpx #$20 ; CPU:$E11A PRG:211A E0 20 bne ClearPalette_Loop2 ; CPU:$E11C PRG:211C D0 F5 @@ -916,9 +916,9 @@ ClearPaletteDone: ; ----------------------------------------------------------------------------- ClearVRAM_Fill23: lda #$23 ; CPU:$E142 PRG:2142 A9 23 - sta $2006 ; CPU:$E144 PRG:2144 8D 06 20 + sta PPUADDR ; CPU:$E144 PRG:2144 8D 06 20 lda #$C0 ; CPU:$E147 PRG:2147 A9 C0 - sta $2006 ; CPU:$E149 PRG:2149 8D 06 20 + sta PPUADDR ; CPU:$E149 PRG:2149 8D 06 20 lda #$00 ; CPU:$E14C PRG:214C A9 00 ldx #$40 ; CPU:$E14E PRG:214E A2 40 ; ----------------------------------------------------------------------------- @@ -931,13 +931,13 @@ ClearVRAM_Fill23: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- FillVRAM_23_Loop: - sta $2007 ; CPU:$E150 PRG:2150 8D 07 20 + sta PPUDATA ; CPU:$E150 PRG:2150 8D 07 20 dex ; CPU:$E153 PRG:2153 CA bne FillVRAM_23_Loop ; CPU:$E154 PRG:2154 D0 FA lda #$23 ; CPU:$E156 PRG:2156 A9 23 - sta $2006 ; CPU:$E158 PRG:2158 8D 06 20 + sta PPUADDR ; CPU:$E158 PRG:2158 8D 06 20 lda #$F0 ; CPU:$E15B PRG:215B A9 F0 - sta $2006 ; CPU:$E15D PRG:215D 8D 06 20 + sta PPUADDR ; CPU:$E15D PRG:215D 8D 06 20 ldx #$08 ; CPU:$E160 PRG:2160 A2 08 lda #$FF ; CPU:$E162 PRG:2162 A9 FF ; ----------------------------------------------------------------------------- @@ -950,7 +950,7 @@ FillVRAM_23_Loop: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- FillVRAM_FF_Loop: - sta $2007 ; CPU:$E164 PRG:2164 8D 07 20 + sta PPUDATA ; CPU:$E164 PRG:2164 8D 07 20 dex ; CPU:$E167 PRG:2167 CA bne FillVRAM_FF_Loop ; CPU:$E168 PRG:2168 D0 FA rts ; CPU:$E16A PRG:216A 60 @@ -965,15 +965,15 @@ FillVRAM_FF_Loop: ; ----------------------------------------------------------------------------- InitAPU: lda #$9F ; CPU:$E16B PRG:216B A9 9F - sta $4000 ; CPU:$E16D PRG:216D 8D 00 40 - sta $4004 ; CPU:$E170 PRG:2170 8D 04 40 + sta APUPULSE1CTRL ; CPU:$E16D PRG:216D 8D 00 40 + sta APUPULSE2CTRL ; CPU:$E170 PRG:2170 8D 04 40 lda #$0F ; CPU:$E173 PRG:2173 A9 0F - sta $4001 ; CPU:$E175 PRG:2175 8D 01 40 - sta $4005 ; CPU:$E178 PRG:2178 8D 05 40 + sta APUPULSE1SWEEP ; CPU:$E175 PRG:2175 8D 01 40 + sta APUPULSE2SWEEP ; CPU:$E178 PRG:2178 8D 05 40 lda #$AA ; CPU:$E17B PRG:217B A9 AA - sta $4002 ; CPU:$E17D PRG:217D 8D 02 40 - sta $4006 ; CPU:$E180 PRG:2180 8D 06 40 - sta $4015 ; CPU:$E183 PRG:2183 8D 15 40 + sta APUPULSE1TIMERLO ; CPU:$E17D PRG:217D 8D 02 40 + sta APUPULSE2TIMERLO ; CPU:$E180 PRG:2180 8D 06 40 + sta APUSTATUS ; CPU:$E183 PRG:2183 8D 15 40 rts ; CPU:$E186 PRG:2186 60 ; ----------------------------------------------------------------------------- ; Routine: ClearVRAM_FillFF @@ -986,12 +986,12 @@ InitAPU: ; ----------------------------------------------------------------------------- ClearVRAM_FillFF: lda #$23 ; CPU:$E187 PRG:2187 A9 23 - sta $2006 ; CPU:$E189 PRG:2189 8D 06 20 + sta PPUADDR ; CPU:$E189 PRG:2189 8D 06 20 lda #$D2 ; CPU:$E18C PRG:218C A9 D2 - sta $2006 ; CPU:$E18E PRG:218E 8D 06 20 + sta PPUADDR ; CPU:$E18E PRG:218E 8D 06 20 lda #$FF ; CPU:$E191 PRG:2191 A9 FF - sta $2007 ; CPU:$E193 PRG:2193 8D 07 20 - sta $2007 ; CPU:$E196 PRG:2196 8D 07 20 + sta PPUDATA ; CPU:$E193 PRG:2193 8D 07 20 + sta PPUDATA ; CPU:$E196 PRG:2196 8D 07 20 rts ; CPU:$E199 PRG:2199 60 ; ----------------------------------------------------------------------------- ; Routine: LoadPatternTable1 @@ -1088,10 +1088,10 @@ VramWrite: VramWrite_Record: lda (Zp10),Y ; CPU:$E1D2 PRG:21D2 B1 10 beq VramWriteDone ; CPU:$E1D4 PRG:21D4 F0 1A - sta $2006 ; CPU:$E1D6 PRG:21D6 8D 06 20 + sta PPUADDR ; CPU:$E1D6 PRG:21D6 8D 06 20 iny ; CPU:$E1D9 PRG:21D9 C8 lda (Zp10),Y ; CPU:$E1DA PRG:21DA B1 10 - sta $2006 ; CPU:$E1DC PRG:21DC 8D 06 20 + sta PPUADDR ; CPU:$E1DC PRG:21DC 8D 06 20 iny ; CPU:$E1DF PRG:21DF C8 lda (Zp10),Y ; CPU:$E1E0 PRG:21E0 B1 10 tax ; CPU:$E1E2 PRG:21E2 AA @@ -1107,7 +1107,7 @@ VramWrite_Record: VramWrite_ByteLoop: iny ; CPU:$E1E3 PRG:21E3 C8 lda (Zp10),Y ; CPU:$E1E4 PRG:21E4 B1 10 - sta $2007 ; CPU:$E1E6 PRG:21E6 8D 07 20 + sta PPUDATA ; CPU:$E1E6 PRG:21E6 8D 07 20 dex ; CPU:$E1E9 PRG:21E9 CA bne VramWrite_ByteLoop ; CPU:$E1EA PRG:21EA D0 F7 iny ; CPU:$E1EC PRG:21EC C8 @@ -1135,7 +1135,7 @@ VramWriteDone: EnableNMI: lda Zp01 ; CPU:$E1F1 PRG:21F1 A5 01 ora #$08 ; CPU:$E1F3 PRG:21F3 09 08 - sta $2001 ; CPU:$E1F5 PRG:21F5 8D 01 20 + sta PPUMASK ; CPU:$E1F5 PRG:21F5 8D 01 20 sta Zp01 ; CPU:$E1F8 PRG:21F8 85 01 rts ; CPU:$E1FA PRG:21FA 60 ; ----------------------------------------------------------------------------- @@ -1150,7 +1150,7 @@ EnableNMI: DisableNMI: lda Zp01 ; CPU:$E1FB PRG:21FB A5 01 and #$F7 ; CPU:$E1FD PRG:21FD 29 F7 - sta $2001 ; CPU:$E1FF PRG:21FF 8D 01 20 + sta PPUMASK ; CPU:$E1FF PRG:21FF 8D 01 20 sta Zp01 ; CPU:$E202 PRG:2202 85 01 rts ; CPU:$E204 PRG:2204 60 ; ---- data $E205-$E218 (20 bytes) ---- @@ -1168,7 +1168,7 @@ DisableNMI: SetPPUCTRL_NMI: lda Zp00 ; CPU:$E219 PRG:2219 A5 00 ora #$80 ; CPU:$E21B PRG:221B 09 80 - sta $2000 ; CPU:$E21D PRG:221D 8D 00 20 + sta PPUCTRL ; CPU:$E21D PRG:221D 8D 00 20 sta Zp00 ; CPU:$E220 PRG:2220 85 00 rts ; CPU:$E222 PRG:2222 60 ; ---- data $E223-$E22C (10 bytes) ---- @@ -1184,8 +1184,8 @@ SetPPUCTRL_NMI: ; ----------------------------------------------------------------------------- ResetScroll: lda #$00 ; CPU:$E22D PRG:222D A9 00 - sta $2005 ; CPU:$E22F PRG:222F 8D 05 20 - sta $2005 ; CPU:$E232 PRG:2232 8D 05 20 + sta PPUSCROLL ; CPU:$E22F PRG:222F 8D 05 20 + sta PPUSCROLL ; CPU:$E232 PRG:2232 8D 05 20 rts ; CPU:$E235 PRG:2235 60 ; ----------------------------------------------------------------------------- ; Routine: InitRoundParams @@ -1224,21 +1224,21 @@ DrawPlayer1Pad: ldy $F009 ; CPU:$E276 PRG:2276 AC 09 F0 jsr $E1CC ; CPU:$E279 PRG:2279 20 CC E1 lda #$23 ; CPU:$E27C PRG:227C A9 23 - sta $2006 ; CPU:$E27E PRG:227E 8D 06 20 + sta PPUADDR ; CPU:$E27E PRG:227E 8D 06 20 lda #$E5 ; CPU:$E281 PRG:2281 A9 E5 - sta $2006 ; CPU:$E283 PRG:2283 8D 06 20 + sta PPUADDR ; CPU:$E283 PRG:2283 8D 06 20 lda #$55 ; CPU:$E286 PRG:2286 A9 55 - sta $2007 ; CPU:$E288 PRG:2288 8D 07 20 - sta $2007 ; CPU:$E28B PRG:228B 8D 07 20 - sta $2007 ; CPU:$E28E PRG:228E 8D 07 20 + sta PPUDATA ; CPU:$E288 PRG:2288 8D 07 20 + sta PPUDATA ; CPU:$E28B PRG:228B 8D 07 20 + sta PPUDATA ; CPU:$E28E PRG:228E 8D 07 20 lda #$23 ; CPU:$E291 PRG:2291 A9 23 - sta $2006 ; CPU:$E293 PRG:2293 8D 06 20 + sta PPUADDR ; CPU:$E293 PRG:2293 8D 06 20 lda #$D5 ; CPU:$E296 PRG:2296 A9 D5 - sta $2006 ; CPU:$E298 PRG:2298 8D 06 20 + sta PPUADDR ; CPU:$E298 PRG:2298 8D 06 20 lda #$00 ; CPU:$E29B PRG:229B A9 00 - sta $2007 ; CPU:$E29D PRG:229D 8D 07 20 - sta $2007 ; CPU:$E2A0 PRG:22A0 8D 07 20 - sta $2007 ; CPU:$E2A3 PRG:22A3 8D 07 20 + sta PPUDATA ; CPU:$E29D PRG:229D 8D 07 20 + sta PPUDATA ; CPU:$E2A0 PRG:22A0 8D 07 20 + sta PPUDATA ; CPU:$E2A3 PRG:22A3 8D 07 20 jsr $E2F0 ; CPU:$E2A6 PRG:22A6 20 F0 E2 jsr $E32D ; CPU:$E2A9 PRG:22A9 20 2D E3 jsr $E236 ; CPU:$E2AC PRG:22AC 20 36 E2 @@ -1258,21 +1258,21 @@ DrawPlayer2Pad: ldy $F007 ; CPU:$E2B6 PRG:22B6 AC 07 F0 jsr $E1CC ; CPU:$E2B9 PRG:22B9 20 CC E1 lda #$23 ; CPU:$E2BC PRG:22BC A9 23 - sta $2006 ; CPU:$E2BE PRG:22BE 8D 06 20 + sta PPUADDR ; CPU:$E2BE PRG:22BE 8D 06 20 lda #$E5 ; CPU:$E2C1 PRG:22C1 A9 E5 - sta $2006 ; CPU:$E2C3 PRG:22C3 8D 06 20 + sta PPUADDR ; CPU:$E2C3 PRG:22C3 8D 06 20 lda #$00 ; CPU:$E2C6 PRG:22C6 A9 00 - sta $2007 ; CPU:$E2C8 PRG:22C8 8D 07 20 - sta $2007 ; CPU:$E2CB PRG:22CB 8D 07 20 - sta $2007 ; CPU:$E2CE PRG:22CE 8D 07 20 + sta PPUDATA ; CPU:$E2C8 PRG:22C8 8D 07 20 + sta PPUDATA ; CPU:$E2CB PRG:22CB 8D 07 20 + sta PPUDATA ; CPU:$E2CE PRG:22CE 8D 07 20 lda #$23 ; CPU:$E2D1 PRG:22D1 A9 23 - sta $2006 ; CPU:$E2D3 PRG:22D3 8D 06 20 + sta PPUADDR ; CPU:$E2D3 PRG:22D3 8D 06 20 lda #$D5 ; CPU:$E2D6 PRG:22D6 A9 D5 - sta $2006 ; CPU:$E2D8 PRG:22D8 8D 06 20 + sta PPUADDR ; CPU:$E2D8 PRG:22D8 8D 06 20 lda #$55 ; CPU:$E2DB PRG:22DB A9 55 - sta $2007 ; CPU:$E2DD PRG:22DD 8D 07 20 - sta $2007 ; CPU:$E2E0 PRG:22E0 8D 07 20 - sta $2007 ; CPU:$E2E3 PRG:22E3 8D 07 20 + sta PPUDATA ; CPU:$E2DD PRG:22DD 8D 07 20 + sta PPUDATA ; CPU:$E2E0 PRG:22E0 8D 07 20 + sta PPUDATA ; CPU:$E2E3 PRG:22E3 8D 07 20 jsr $E2F0 ; CPU:$E2E6 PRG:22E6 20 F0 E2 jsr $E32D ; CPU:$E2E9 PRG:22E9 20 2D E3 jsr $E236 ; CPU:$E2EC PRG:22EC 20 36 E2 @@ -1288,9 +1288,9 @@ DrawPlayer2Pad: ; ----------------------------------------------------------------------------- ClearRows: lda #$23 ; CPU:$E2F0 PRG:22F0 A9 23 - sta $2006 ; CPU:$E2F2 PRG:22F2 8D 06 20 + sta PPUADDR ; CPU:$E2F2 PRG:22F2 8D 06 20 lda #$D9 ; CPU:$E2F5 PRG:22F5 A9 D9 - sta $2006 ; CPU:$E2F7 PRG:22F7 8D 06 20 + sta PPUADDR ; CPU:$E2F7 PRG:22F7 8D 06 20 lda #$00 ; CPU:$E2FA PRG:22FA A9 00 ldx #$04 ; CPU:$E2FC PRG:22FC A2 04 ; ----------------------------------------------------------------------------- @@ -1303,13 +1303,13 @@ ClearRows: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ClearScreen_Loop1: - sta $2007 ; CPU:$E2FE PRG:22FE 8D 07 20 + sta PPUDATA ; CPU:$E2FE PRG:22FE 8D 07 20 dex ; CPU:$E301 PRG:2301 CA bne ClearScreen_Loop1 ; CPU:$E302 PRG:2302 D0 FA lda #$23 ; CPU:$E304 PRG:2304 A9 23 - sta $2006 ; CPU:$E306 PRG:2306 8D 06 20 + sta PPUADDR ; CPU:$E306 PRG:2306 8D 06 20 lda #$E1 ; CPU:$E309 PRG:2309 A9 E1 - sta $2006 ; CPU:$E30B PRG:230B 8D 06 20 + sta PPUADDR ; CPU:$E30B PRG:230B 8D 06 20 lda #$00 ; CPU:$E30E PRG:230E A9 00 ldx #$04 ; CPU:$E310 PRG:2310 A2 04 ; ----------------------------------------------------------------------------- @@ -1322,13 +1322,13 @@ ClearScreen_Loop1: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ClearScreen_Loop2: - sta $2007 ; CPU:$E312 PRG:2312 8D 07 20 + sta PPUDATA ; CPU:$E312 PRG:2312 8D 07 20 dex ; CPU:$E315 PRG:2315 CA bne ClearScreen_Loop2 ; CPU:$E316 PRG:2316 D0 FA lda #$23 ; CPU:$E318 PRG:2318 A9 23 - sta $2006 ; CPU:$E31A PRG:231A 8D 06 20 + sta PPUADDR ; CPU:$E31A PRG:231A 8D 06 20 lda #$E9 ; CPU:$E31D PRG:231D A9 E9 - sta $2006 ; CPU:$E31F PRG:231F 8D 06 20 + sta PPUADDR ; CPU:$E31F PRG:231F 8D 06 20 lda #$00 ; CPU:$E322 PRG:2322 A9 00 ldx #$04 ; CPU:$E324 PRG:2324 A2 04 ; ----------------------------------------------------------------------------- @@ -1341,7 +1341,7 @@ ClearScreen_Loop2: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- FillScreen_Loop: - sta $2007 ; CPU:$E326 PRG:2326 8D 07 20 + sta PPUDATA ; CPU:$E326 PRG:2326 8D 07 20 dex ; CPU:$E329 PRG:2329 CA bne FillScreen_Loop ; CPU:$E32A PRG:232A D0 FA rts ; CPU:$E32C PRG:232C 60 @@ -1396,9 +1396,9 @@ ReadPad: ; ----------------------------------------------------------------------------- DrawTitle_Loop1: lda #$23 ; CPU:$E34D PRG:234D A9 23 - sta $2006 ; CPU:$E34F PRG:234F 8D 06 20 + sta PPUADDR ; CPU:$E34F PRG:234F 8D 06 20 lda #$C8 ; CPU:$E352 PRG:2352 A9 C8 - sta $2006 ; CPU:$E354 PRG:2354 8D 06 20 + sta PPUADDR ; CPU:$E354 PRG:2354 8D 06 20 ldx #$08 ; CPU:$E357 PRG:2357 A2 08 lda Zp05 ; CPU:$E359 PRG:2359 A5 05 ; ----------------------------------------------------------------------------- @@ -1411,7 +1411,7 @@ DrawTitle_Loop1: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- DrawTitle_Loop2: - sta $2007 ; CPU:$E35B PRG:235B 8D 07 20 + sta PPUDATA ; CPU:$E35B PRG:235B 8D 07 20 dex ; CPU:$E35E PRG:235E CA bne DrawTitle_Loop2 ; CPU:$E35F PRG:235F D0 FA ; ----------------------------------------------------------------------------- @@ -1442,11 +1442,11 @@ ShiftPads: lda Zp0A ; CPU:$E36A PRG:236A A5 0A sta Zp0B ; CPU:$E36C PRG:236C 85 0B lda #$00 ; CPU:$E36E PRG:236E A9 00 - sta $4016 ; CPU:$E370 PRG:2370 8D 16 40 + sta JOY1 ; CPU:$E370 PRG:2370 8D 16 40 lda #$01 ; CPU:$E373 PRG:2373 A9 01 - sta $4016 ; CPU:$E375 PRG:2375 8D 16 40 + sta JOY1 ; CPU:$E375 PRG:2375 8D 16 40 lda #$00 ; CPU:$E378 PRG:2378 A9 00 - sta $4016 ; CPU:$E37A PRG:237A 8D 16 40 + sta JOY1 ; CPU:$E37A PRG:237A 8D 16 40 ldx #$08 ; CPU:$E37D PRG:237D A2 08 ; ----------------------------------------------------------------------------- ; Routine: ReadPad_BitLoop @@ -1458,9 +1458,9 @@ ShiftPads: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ReadPad_BitLoop: - lda $4017 ; CPU:$E37F PRG:237F AD 17 40 + lda JOY2 ; CPU:$E37F PRG:237F AD 17 40 sta Zp0E ; CPU:$E382 PRG:2382 85 0E - lda $4016 ; CPU:$E384 PRG:2384 AD 16 40 + lda JOY1 ; CPU:$E384 PRG:2384 AD 16 40 ora Zp0E ; CPU:$E387 PRG:2387 05 0E ror ; CPU:$E389 PRG:2389 6A rol Zp0A ; CPU:$E38A PRG:238A 26 0A @@ -1591,7 +1591,7 @@ DrawTarget: DrawScore: jsr $E1FB ; CPU:$E3E1 PRG:23E1 20 FB E1 lda #$23 ; CPU:$E3E4 PRG:23E4 A9 23 - sta $2006 ; CPU:$E3E6 PRG:23E6 8D 06 20 + sta PPUADDR ; CPU:$E3E6 PRG:23E6 8D 06 20 lda Zp0D ; CPU:$E3E9 PRG:23E9 A5 0D beq Block_E3F5 ; CPU:$E3EB PRG:23EB F0 08 lda $E4C0,Y ; CPU:$E3ED PRG:23ED B9 C0 E4 @@ -1618,9 +1618,9 @@ Block_E3F5: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- DrawCursor: - sta $2006 ; CPU:$E3F8 PRG:23F8 8D 06 20 + sta PPUADDR ; CPU:$E3F8 PRG:23F8 8D 06 20 lda #$55 ; CPU:$E3FB PRG:23FB A9 55 - sta $2007 ; CPU:$E3FD PRG:23FD 8D 07 20 + sta PPUDATA ; CPU:$E3FD PRG:23FD 8D 07 20 jsr $E52E ; CPU:$E400 PRG:2400 20 2E E5 ; ----------------------------------------------------------------------------- ; Routine: Block_E403 @@ -1632,7 +1632,7 @@ DrawCursor: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- Block_E403: - lda $2002 ; CPU:$E403 PRG:2403 AD 02 20 + lda PPUSTATUS ; CPU:$E403 PRG:2403 AD 02 20 rts ; CPU:$E406 PRG:2406 60 ; ----------------------------------------------------------------------------- ; Routine: DrawLives @@ -1646,7 +1646,7 @@ Block_E403: DrawLives: jsr $E1FB ; CPU:$E407 PRG:2407 20 FB E1 lda #$23 ; CPU:$E40A PRG:240A A9 23 - sta $2006 ; CPU:$E40C PRG:240C 8D 06 20 + sta PPUADDR ; CPU:$E40C PRG:240C 8D 06 20 lda Zp0D ; CPU:$E40F PRG:240F A5 0D beq Block_E41E ; CPU:$E411 PRG:2411 F0 0B jsr $E433 ; CPU:$E413 PRG:2413 20 33 E4 @@ -1675,9 +1675,9 @@ Block_E41E: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- UpdateAccuracy: - sta $2006 ; CPU:$E424 PRG:2424 8D 06 20 + sta PPUADDR ; CPU:$E424 PRG:2424 8D 06 20 lda #$AA ; CPU:$E427 PRG:2427 A9 AA - sta $2007 ; CPU:$E429 PRG:2429 8D 07 20 + sta PPUDATA ; CPU:$E429 PRG:2429 8D 07 20 jsr $E534 ; CPU:$E42C PRG:242C 20 34 E5 ; ----------------------------------------------------------------------------- ; Routine: Block_E42F @@ -1689,7 +1689,7 @@ UpdateAccuracy: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- Block_E42F: - lda $2002 ; CPU:$E42F PRG:242F AD 02 20 + lda PPUSTATUS ; CPU:$E42F PRG:242F AD 02 20 rts ; CPU:$E432 PRG:2432 60 ; ----------------------------------------------------------------------------- ; Routine: ShiftVar1 @@ -2039,7 +2039,7 @@ ProcessPadBitsDone: ; ----------------------------------------------------------------------------- SetAPUNoise: lda #$02 ; CPU:$E52E PRG:252E A9 02 - sta $4003 ; CPU:$E530 PRG:2530 8D 03 40 + sta APUPULSE1TIMERHI ; CPU:$E530 PRG:2530 8D 03 40 rts ; CPU:$E533 PRG:2533 60 ; ----------------------------------------------------------------------------- ; Routine: ClearAPUNoise @@ -2052,7 +2052,7 @@ SetAPUNoise: ; ----------------------------------------------------------------------------- ClearAPUNoise: lda #$00 ; CPU:$E534 PRG:2534 A9 00 - sta $4007 ; CPU:$E536 PRG:2536 8D 07 40 + sta APUPULSE2TIMERHI ; CPU:$E536 PRG:2536 8D 07 40 rts ; CPU:$E539 PRG:2539 60 ; ----------------------------------------------------------------------------- ; Routine: ClearScreen @@ -2065,9 +2065,9 @@ ClearAPUNoise: ; ----------------------------------------------------------------------------- ClearScreen: lda #$21 ; CPU:$E53A PRG:253A A9 21 - sta $2006 ; CPU:$E53C PRG:253C 8D 06 20 + sta PPUADDR ; CPU:$E53C PRG:253C 8D 06 20 lda #$20 ; CPU:$E53F PRG:253F A9 20 - sta $2006 ; CPU:$E541 PRG:2541 8D 06 20 + sta PPUADDR ; CPU:$E541 PRG:2541 8D 06 20 lda #$5F ; CPU:$E544 PRG:2544 A9 5F ldx #$80 ; CPU:$E546 PRG:2546 A2 80 ; ----------------------------------------------------------------------------- @@ -2080,7 +2080,7 @@ ClearScreen: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- Block_E548: - sta $2007 ; CPU:$E548 PRG:2548 8D 07 20 + sta PPUDATA ; CPU:$E548 PRG:2548 8D 07 20 dex ; CPU:$E54B PRG:254B CA bne Block_E548 ; CPU:$E54C PRG:254C D0 FA rts ; CPU:$E54E PRG:254E 60 diff --git a/OVERVIEW.md b/OVERVIEW.md index 78ecdc3..df8b723 100644 --- a/OVERVIEW.md +++ b/OVERVIEW.md @@ -1,11 +1,13 @@ # Disassembly Project Index — /home/tmerritt/Projects/disassembly/ -This document provides a consolidated overview of all NES disassembly projects in this directory. Each project has its own folder containing a `copilot/` subdirectory with the full source, build tooling, and an individual `OVERVIEW.md` (at the project folder root) with a detailed power-on execution flow analysis. +This document provides a consolidated overview of all NES disassembly projects in this directory. Each project has its own folder containing a `copilot/` subdirectory with the full source, build tooling, and — for every project except `Donkey Kong 3 (JUE)`, which still needs one — an individual `OVERVIEW.md` (at the project folder root) with a detailed power-on execution flow analysis. --- ## Project Inventory +**Mirroring** is the iNES *arrangement* value taken from header byte 6, bit 0 (`0` = Horizontal, `1` = Vertical), the convention `AGENTS.md` fixes. Several per-project `OVERVIEW.md` files previously carried the opposite *mirroring-direction* wording; all were normalized to this column on 2026-10-19. + | # | Project | Region/Version | PRG Size | CHR Size | Mirroring | Build Status | Vectors (NMI / RESET / IRQ) | |---|---------|----------------|----------|----------|-----------|--------------|------------------------------| | 1 | Balloon Fight (JU) | Japan | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL (Pass complete) | $C094 / $C000 / $C0F7 | @@ -20,24 +22,24 @@ This document provides a consolidated overview of all NES disassembly projects i | 10 | Donkey Kong 3 (JUE) | Japan / USA / Europe | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $C08D / $C000 / $C000 | | 11 | Donkey Kong Jr. (JU) | Japan | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $C6E6 / $C66E / $FFF0 | | 12 | CIRCUS | — | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $C05A / $C000 / $4CB7 | -| 13 | Wild Gunman (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass Pass 1 redone) | $C086 / $C000 / $C000 | +| 13 | Wild Gunman (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass 3 complete, 49.3% code) | $C086 / $C000 / $C000 | | 14 | Joypad Test Cartridge (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass 3 complete) | $CCF7 / $C000 / $C000 | | 15 | NES PowerPad Test Card (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $E06E / $E000 / $E000 | | 16 | MUSCLE (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $86CB / $8000 / $8764 | | 17 | Lunar Pool (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass 2 complete, Pass 3 tables named) | $FF65 / $E80C / $FF64 | -| 18 | `Donkey Kong (JU)` | Japan | 16 KB | 8 KB | Horizontal | **PRG-IDENTICAL (Pass 2 complete, 76.3% code)** | $C85F / $C79E / $FFF0 | -| 19 | `Donkey Kong Jr. Math (U)` | USA | 16 KB | 8 KB | Vertical | **PRG-IDENTICAL (Pass 2 complete, 81.9% code)** | $C4A9 / $C41E / $FFF0 | -| 20 | `Duck Hunt (JUE)` | Japan / USA / Europe | 16 KB | 8 KB | Horizontal | **PRG-IDENTICAL (Pass 2 complete, 37.5% code)** | $C086 / $C000 / $C000 | +| 18 | Donkey Kong (JU) | Japan | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL (Pass 2/3 complete, 76.3% code) | $C85F / $C79E / $FFF0 | +| 19 | `Donkey Kong Jr. Math (U)` | USA | 16 KB | 8 KB | Vertical | **PRG-IDENTICAL (Pass 1 complete, Pass 2 partial — 64 of 1,035 labels named, 81.9% code)** | $C4A9 / $C41E / $FFF0 | +| 20 | `Duck Hunt (JUE)` | Japan / USA / Europe | 16 KB | 8 KB | Vertical | **PRG-IDENTICAL (Pass 1 complete, Pass 2 partial — 31 of 472 labels named, 37.5% code)** | $C086 / $C000 / $C000 | | 21 | `Golf (JU)` | Japan | 16 KB | 8 KB | Vertical | PRG-IDENTICAL (Pass 1+ substantial) | $C0A6 / $C000 / $C0C4 | -| 22 | `Hogan's Alley (JU)` | Japan | 16 KB | 8 KB | Vertical | **PRG-IDENTICAL (Pass 1 complete, 41.8% code, needs CDL reclass)** | $C088 / $C000 / $C000 | -| 23 | `Ice Climber (JE)` | — | 16 KB | 8 KB | Horizontal | **PRG-IDENTICAL (Pass 2 complete, 74.7% code)** | $C076 / $C014 / $FFF0 | -| 24 | `Ice Climber (U)` | USA | 16 KB | 8 KB | Horizontal | **PRG-IDENTICAL (Pass 2 complete, 74.7% code)** | $C076 / $C014 / $FFF0 | +| 22 | `Hogan's Alley (JU)` | Japan | 16 KB | 8 KB | Vertical | **PRG-IDENTICAL (Pass 1 complete, 41.8% code, needs CDL reclass; build fixed 2026-10-19 — `$E9F1` forced back to data)** | $C088 / $C000 / $C000 | +| 23 | `Ice Climber (JE)` | — | 16 KB | 8 KB | Horizontal | **PRG-IDENTICAL (Pass 1 complete, Pass 2 partial — 76 of 973 labels named, 74.6% code)** | $C076 / $C014 / $FFF0 | +| 24 | `Ice Climber (U)` | USA | 16 KB | 8 KB | Horizontal | **PRG-IDENTICAL (Pass 1 complete, Pass 2 not started — 2 of 973 labels named, 74.6% code)** | $C076 / $C014 / $FFF0 | | 25 | `Lode Runner (U)` | USA | 16 KB | 8 KB | Vertical | **PRG-IDENTICAL (Pass 1 complete, 52.6% code)** | $C02C / $C000 / $FFF9 | | 26 | `Mario Bros (JU)` | Japan | 16 KB | 8 KB | Vertical | PRG-IDENTICAL (Pass 1 complete, Pass 2 substantial) | $C07D / $C000 / $C000 | | 27 | `Millipede (U)` | USA | 16 KB | 8 KB | Vertical | **PRG-IDENTICAL (Pass 1 complete, 74.6% code)** | $C7F1 / $C735 / $FFF0 | | 28 | `Pac-Man (Tengen) (U)` | USA | 16 KB | 8 KB | Horizontal | **PRG-IDENTICAL (Pass 1 complete, 19.5% code)** | $C0FA / $C033 / $C16A | | 29 | `Pac-Man (U)` | USA | 16 KB | 8 KB | Horizontal | **PRG-IDENTICAL (Pass 1 complete, 19.6% code)** | $C0FA / $FF00 / $C16A | -| 30 | `Pinball (JU)` | Japan | 16 KB | 8 KB | Horizontal | **PRG-IDENTICAL (Pass 2 complete, 59.5% code)** | $C1ED / $C000 / $C1ED | +| 30 | `Pinball (JU)` | Japan | 16 KB | 8 KB | Horizontal | **PRG-IDENTICAL (Pass 1 complete, Pass 2 partial — 180 of 681 labels named, 59.5% code)** | $C1ED / $C000 / $C1ED | | 31 | `Popeye (JU) (PRG 0)` | — | 16 KB | 8 KB | Vertical | **PRG-IDENTICAL (Pass 1 complete, 72.3% code)** | $C701 / $C649 / $FFF0 | | 32 | `Popeye (JU) (PRG 1)` | — | 16 KB | 8 KB | Horizontal | **PRG-IDENTICAL (Pass 1 complete, 72.3% code)** | $C701 / $C649 / $FFF0 | | 33 | `Pyramid (U)` | USA | 16 KB | 8 KB | Vertical | PRG-IDENTICAL (Pass 1 done) | $D72E / $FF00 / $FF00 | @@ -47,10 +49,13 @@ This document provides a consolidated overview of all NES disassembly projects i All 36 are mapper 0 / 16 KB PRG / 8 KB CHR, battery-backed, no trainer. -Rows 1-17 are **BYTE-IDENTICAL**: `make` compares the whole reconstructed ROM -against `copilot/rom.nes`. Rows 18-36 are **PRG-IDENTICAL**: their Makefiles +Rows 1-18 are **BYTE-IDENTICAL**: `make` compares the whole reconstructed ROM +against `copilot/rom.nes`. Rows 19-35 are **PRG-IDENTICAL**: their Makefiles compare only `reconstructed_prg.bin` against `prg.bin`, so header and CHR are -not yet proven to rebuild. Treat those as unverified outside the PRG. +not yet proven to rebuild. Treat those as unverified outside the PRG. Row 36 +(Urban Champion) is also BYTE-IDENTICAL — it was promoted while still numbered +at the tail of the `_wip` block, so the tier split is by row ranges 1-18 + 36 +versus 19-35, not a single cut. **How to read this table.** The vectors are the three little-endian words at the **end of the 16 KB PRG** (`$FFFA-$FFFF` in the `$C000` mirror) — *not* fields in the iNES header, whose bytes @@ -93,11 +98,17 @@ encode region, so CIRCUS — whose folder carries no suffix — is left as `—` ### 1. Balloon Fight (JU) - **Folder:** `Balloon Fight (JU)/` - **ROM:** `balloon.nes` (24,592 bytes) -- **Source:** `copilot/prg.s` (8,538 lines) +- **Source:** `copilot/prg.s` (8,543 lines) - **Linker:** PRG at $C000, 16 KB; single segment - **Vectors:** NMI → $C094 (`NmiHandler`), RESET → $C000 (`Reset`), IRQ → $C0F7 (`IrqHandler`, self-loop) - **Key subsystems:** NMI-driven frame loop with PPU command buffer, round spawner ($C790), bonus objects ($CB74), carrier/rescue sequence ($C6F9), particle system ($CDAA), sound driver ($FFF7 banked) - **Build fix:** None needed; byte-identical out of the box. **Pass 1 verified complete 2026-10-16** — 5,303 instructions / 11,260 code bytes (68.7%), which is *more* than the complete-opcode static tracer finds (5,277 / 11,202); the 166 tracer-only bytes are genuine data (command scripts at $D437/$D45A, the $C3B5 pointer table, the arithmetic table at $FBCA), not missed code. The last two `.incbin` spans were converted to explicit classified bytes (`TrailingFillBeforeApuTables` at $F4C5, `SoundEngineTailBytes` at $F5FC), so no ROM byte is hidden +- **Pass 3 symbols (2026-10-19):** every operand `symbols.inc`/`locals.inc` defines is now + named in `prg.s` — **125** hardware-register operands and **797 of 813** zero-page/RAM + operands. The 15 multi-alias addresses were resolved per routine (`--sites` in + `_tools/apply_symbols.py`). **16** operands are left numeric: `$13` used as a plain + high-byte scratch beside `Temp12`, where none of its three aliases fits. Rebuild stays + byte-identical. - **Details:** `Balloon Fight (JU)/OVERVIEW.md` ### 2. Baseball (UE) @@ -108,16 +119,18 @@ encode region, so CIRCUS — whose folder carries no suffix — is left as `—` - **Vectors:** NMI → $C046 (`NMI`), RESET → $C40B (`Reset`), IRQ → $C43E (`IRQ`, `rti`) - **Key subsystems:** Queued event system ($EB66–$EB9C) as the main frame driver, round/state machine ($C5FE), batting/pitching ($C6044–$C6414), object sorting ($C339), sound driver ($F9D0–$FE2x) - **Build fix:** None needed; byte-identical out of the box +- **Pass 3 symbols (2026-10-19):** **121 operands substituted** (85 single-name + 36 hardware) from `symbols.inc`/`locals.inc` via `_tools/apply_symbols.py` — zero residue. Rebuild stays byte-identical. - **Details:** `Baseball (UE)/OVERVIEW.md` ### 3. Bomberman (U) - **Folder:** `Bomberman (U)/` - **ROM:** `bomberman.nes` (24,592 bytes) -- **Source:** `copilot/main.s` (8,070 lines) +- **Source:** `copilot/prg.s` (7,553 lines), `header.s`, `chr.s` - **Linker:** HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB) - **Vectors:** NMI → $C01A (`NmiHandler`), RESET → $C000 (`Reset`), IRQ → $FFF9 (`IrqHandler`, `rti`) -- **Key subsystems:** NMI-driven PPU command queue and VRAM transfers, main loop at $C368 with state dispatch table ($C75D), bomb/object object slots (80 slots at $03E6), sound driver ($E642–$FE2x) with dispatch table ($E6AD) -- **Build fix:** One-byte mismatch at CPU $E70C (`dec $E4` vs `dec $54`) — resolved by adding `RandomStateAlt = $E4` to `locals.inc` alongside `RandomState0 = $54` (zero-page reuse); also renamed `ControllerState` → `ControllerState1`, `Main_HandleControl_C368` → `MainGameLoop`, `Gameplay_HandleControl_C79D` → `GameplayUpdate`, `Sound_HandleControl_E65F` → `SoundUpdate` +- **Key subsystems:** NMI-driven PPU command queue and VRAM transfers, main loop at $C368 with state dispatch table ($C75D), bomb/object slots (80 slots at $03E6), sound driver ($E642–$FE2x) with dispatch table ($E6AD) +- **Build fix:** One-byte mismatch at CPU $E71B (`dec $E4` vs `dec $54`) — resolved by adding `RandomStateAlt = $E4` to `locals.inc` alongside `RandomState0 = $54` (zero-page reuse); also renamed `ControllerState` → `ControllerState1`, `Main_HandleControl_C368` → `MainGameLoop`, `Gameplay_HandleControl_C79D` → `GameplayUpdate`, `Sound_HandleControl_E65F` → `SoundUpdate` +- **Pass 3:** Applied 354 single-name + 8 site-resolved multi-alias operands from `locals.inc`; 24 in-file table labels from `reconstructed.lbl`; 0 hardware substitutions needed. Residue: 758 unnamed operands (179 distinct addresses). - **Details:** `Bomberman (U)/OVERVIEW.md` ### 4. Burger Time (U) @@ -168,6 +181,7 @@ encode region, so CIRCUS — whose folder carries no suffix — is left as `—` - **Vectors:** NMI → $C07D (`NmiHandler`), RESET → $C000 (`Reset`), IRQ → $C000 (`Reset` reused) - **Key subsystems:** NMI-synchronized main loop (`MainLoop` at $C04F), game state machine via `MainStateHandlerTable` ($C101, 12 states), game mode state machine via `GameModeStateTable` ($CAD7, 8 states), object/sprite system with fixed-point physics, audio engine ($F8DE) with serial I/O over controller port - **Build fix:** None needed; byte-identical out of the box +- **Pass 3 symbols (2026-10-19):** **18 single-name operands** substituted from `locals.inc` via `_tools/apply_symbols.py` — zero residue. Rebuild stays byte-identical. - **Details:** `Tennis (JU)/OVERVIEW.md` ### 9. Pac-Man (USA) (Namco) @@ -178,6 +192,7 @@ encode region, so CIRCUS — whose folder carries no suffix — is left as `—` - **Vectors:** NMI → $C10E (`NmiHandler`), RESET → $C033 (`Reset`; `locals.inc` defines `ResetOffset = $C033`), IRQ → $C17E (`IrqHandler`) - **Key subsystems:** NMI-synchronized main loop (`MainLoop` at $C04F), game state machine via `MainStateHandlerTable` ($C101, 12 states), game mode state machine via `GameModeStateTable` ($CAD7, 8 states), object/sprite system with fixed-point physics, audio engine ($F8DE) with serial I/O over controller port - **Build fix:** None needed; byte-identical out of the box +- **Pass 3 symbols (2026-10-19):** **524 single-name operands** substituted from `locals.inc` via `_tools/apply_symbols.py` — **727 multi-alias residues** left numeric (addresses with 2+ aliases, e.g. `$00` = `workPtr0`/`Zp00`). Rebuild stays byte-identical. - **Details:** `Pac-Man (USA) (Namco)/OVERVIEW.md` ### 10. Donkey Kong 3 (JUE) @@ -208,6 +223,7 @@ encode region, so CIRCUS — whose folder carries no suffix — is left as `—` - **Vectors:** NMI → $C05A (`NmiHandler`), RESET → $C000 (`Reset`), IRQ → $4CB7 (outside mapped space — effectively unused) - **Key subsystems:** NMI-driven frame state machine — main loop is a spin loop at $C057, all per-frame work runs in NMI; main state dispatcher at $C0D0 with 16-state pointer table; controller input with edge flags at $09; menu system with text table at $C763 ("CONTINUE", "STAGE", "SELECT", "PLAY"); palette/screen transfer via descriptor streams; VRAM queue processing; variant object state machine at $DC3F–$FE7B; audio engine with sequence data at $FABB–$FFFB - **Build fix:** None needed; byte-identical out of the box (`make` in `copilot/`). Pass 1/2/3 complete — full code/data classification, semantic routine naming, and data table naming all done +- **Pass 3 symbols (2026-10-19):** **118 operands substituted** (38 single-name + 80 hardware) from `symbols.inc`/`locals.inc` via `_tools/apply_symbols.py` — **23 multi-alias residues** left numeric (addresses with 2 aliases: `$E4`=`Controller1Shift`/`ZpE4`, `$7C`=`WorkPointer0Lo`/`Zp7C`, `$7E`=`WorkPointer1Lo`/`Zp7E`). Rebuild stays byte-identical. - **Details:** `CIRCUS/OVERVIEW.md` ### 13. Wild Gunman (U) @@ -217,7 +233,8 @@ encode region, so CIRCUS — whose folder carries no suffix — is left as `—` - **Linker:** HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB) - **Vectors:** NMI → $C086 (`NmiHandler`), RESET → $C000 (`Reset`), IRQ → $C000 (reuses `Reset`) - **Key subsystems:** NMI-driven frame loop — main loop is a spin loop waiting on NMI phase flag ($20); NMI handler does OAM DMA ($4014), PPU updates, and calls game logic subroutines ($C29F, $C233, $C3AC, $C265); main state dispatcher at $C0B3 based on `GameMode` ($30); reset copies sprite/OAM data from $C844 to $05F0; APU enabled via $4015 = $0F -- **Build fix:** None needed; byte-identical out of the box (`make` in `copilot/`). **Pass 1 redone 2026-10-16** — the original tracer followed only RESET/NMI/IRQ and jsr/jmp/branch targets and knew just the 151 documented opcodes, so it missed Wild Gunman's runtime dispatch (`Label_C341`'s `pla`-based computed goto puts the jump table inline right after each `jsr $C341`) and filed ~4.9 KB of real code as `.byte` data. Code coverage went **1,597 instr / 3,352 B (20.5%) → 3,956 instr / 8,085 B (49.3%)**. Pass 2 partial — routine headers and semantic naming for key routines (`Reset`, `NmiHandler`, `MainStateDispatch`, `MainLoopBody`, etc.); zero-page aliases in `locals.inc` (`GameMode`=$30, `NmiPhase`=$20, `NmiFlag`=$22, `Timer2F`=$2F, etc.). Pass 3 pending (no data tables named yet) +- **Build fix:** None needed; byte-identical out of the box (`make` in `copilot/` compares the whole ROM: `cmp reconstructed.nes rom.nes`). **Pass 1 redone 2026-10-16** — the original tracer followed only RESET/NMI/IRQ and jsr/jmp/branch targets and knew just the 151 documented opcodes, so it missed Wild Gunman's runtime dispatch (`Label_C341`'s `pla`-based computed goto puts the jump table inline right after each `jsr $C341`) and filed ~4.9 KB of real code as `.byte` data. Code coverage went **1,597 instr / 3,352 B (20.5%) → 3,956 instr / 8,085 B (49.3%)**. **Pass 2 complete** — all 733 labels carry names (zero `Label_Cxxxx`/`SubCxxxx` remain), routine headers on every entry point, zero-page aliases in `locals.inc` (`GameMode`=$30, `NmiPhase`=$20, `NmiFlag`=$22, `Timer2F`=$2F, etc.). **Pass 3 complete** — data tables named: `SpriteAttributeTable` ($C6AC), `NoteVolumeTable` ($F3EF), `VolumeEnvelopeTable` ($F48F), `SpritePositionTable` ($F77C); the OAM sprite block at $C844 is documented in-place as a comment rather than a label +- **Pass 3 symbols (2026-10-19):** **76 operands substituted** (11 single-name + 65 hardware) from `symbols.inc`/`locals.inc` via `_tools/apply_symbols.py` — zero residue. Rebuild stays byte-identical. - **Details:** `Wild Gunman (U)/OVERVIEW.md` ### 14. Joypad Test Cartridge (U) @@ -228,8 +245,20 @@ encode region, so CIRCUS — whose folder carries no suffix — is left as `—` - **Vectors:** NMI → $CCF7 (`NmiHandler`), RESET → $C000 (`Reset`), IRQ → $C000 (reuses `Reset`) - **Key subsystems:** NMI-driven frame loop — main loop spins waiting on NMI phase; NMI handler does OAM DMA ($4014), PPU scroll/control latch, and burst VRAM writes from table at $0302; `VramPtrWrite` ($CD3F) uses a return-address modification trick at `RetAddrUpdate` ($CDC8) for runtime-computed dispatch; `VramWrite` ($CDEE) sets PPU address and writes data to PPUDATA; reset clears RAM, initializes PPU ($2000=$10, $2001=$00), triggers OAM DMA, and enters main loop - **Build fix:** Byte-identical out of the box, but **Pass 1 was badly truncated and has been redone**. It claimed 282 instructions / 580 bytes (3.5%); the tracer halted at `$C09E` on `DCP $3C20` (`$CF`), an undocumented opcode used as ordinary code, and filed 3,256 bytes of real code as `.byte`. Now **1,773 instructions / 3,836 bytes (23.4%)**, verified against a fresh trace. `nesdis.py --undocumented` supplies the 105 undocumented NMOS opcodes; ca65 V2.19 encodes none of them, so the 4 affected instructions are emitted as explicit `.byte` with the disassembly in the comment. Pass 2 then renamed all 202 labels (zero `Label_Cxxxx` left) and rewrote all 202 routine headersr all labels, semantic naming for key routines, zero-page aliases in `locals.inc` (`VramPtrLo`=$00, `PpuCtrlShadow`=$EF, `FrameCounterLo`=$53, etc.) +- **Pass 3 symbols (2026-10-19):** **47 hardware operands** substituted from `symbols.inc` via `_tools/apply_symbols.py` — zero residue. Rebuild stays byte-identical. - **Details:** `Joypad Test Cartridge (U)/OVERVIEW.md` +### 15. NES PowerPad Test Card (U) +- **Folder:** `NES PowerPad Test Card (U)/` +- **ROM:** `rom.nes` (24,592 bytes) +- **Source:** `copilot/prg.s` (8,842 lines) +- **Linker:** HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB) +- **Vectors:** NMI → $E06E (`NmiHandler`), RESET → $E000 (`Reset`), IRQ → $E000 (reuses `Reset`) +- **Key subsystems:** Minimal NMI-driven test cartridge — NMI reads PowerPad via $4016, processes transitions, updates score/lives display; APU at $4015=$0F; 7.2% code coverage +- **Build fix:** None needed; byte-identical out of the box +- **Pass 3 symbols (2026-10-19):** **89 hardware operands** substituted from `symbols.inc` via `_tools/apply_symbols.py` — zero residue. Rebuild stays byte-identical. +- **Details:** `NES PowerPad Test Card (U)/OVERVIEW.md` + ### 16. MUSCLE (U) - **Folder:** `MUSCLE (U)/` - **ROM:** `M.U.S.C.L.E. (U).nes` (24,592 bytes); `copilot/rom.nes` is a relative symlink `../M.U.S.C.L.E. (U).nes` @@ -238,27 +267,84 @@ encode region, so CIRCUS — whose folder carries no suffix — is left as `—` - **Vectors:** NMI → $86CB (`NmiHandler`), RESET → $8000 (`Reset`), IRQ → $8764 (a bare `RTI` that doubles as the NMI epilogue). Vectors themselves sit in the $C000 mirror at $FFFA. - **Key subsystems:** bytecode VM — 40 opcodes at `$C8-$EF` handled through a table at `$9237`, everything else a literal operand. Gameplay dispatches through three jump tables plus two zero-page `jmp (zp)` calls a static descender cannot follow: 38-entry token-program pointer table at `$8CEF`, 40-entry opcode handler table at `$9237`, 16-entry handler table at `$9F2B`, 3-entry per-level VRAM-writer table at `$AC35`. Compressed-VRAM RLE decoder at `$AC82` with a 12-byte fill table at `$ACBD`; division by 20 restored at `$82AC`; four-channel sound engine with per-channel state in zero page `$C4-$EF`. - **Build fix:** the skeleton's `$C000` linker assumption was wrong — RESET is `$8000`, so `linker.cfg` had to move. `copilot/Makefile` tool paths were `../../../_tools/` while in `_wip/`; promotion to top-level required `../../_tools/`. `make regen` (pass1→pass2→pass3) reproduces `prg.s` byte-for-byte. +- **Pass 3 symbols (2026-10-19):** **220 operands substituted** (91 single-name + 129 hardware) from `symbols.inc`/`locals.inc` via `_tools/apply_symbols.py` — zero residue. Rebuild stays byte-identical. - **Details:** `MUSCLE (U)/OVERVIEW.md` +### 17. Lunar Pool (U) +- **Folder:** `Lunar Pool (U)/` (promoted out of `_wip/` 2026-10-18 by `git mv`, so the relative `copilot/rom.nes` symlink is live and tool paths are `../../_tools/`) +- **ROM:** `Lunar Pool (U).nes` (24,592 bytes) +- **Source:** `copilot/prg.s` (5,300 instructions, 67.6% code / 11,077 bytes; 705 labels, zero `Label_` residue, 38 semantic zero-page aliases + 66 neutral, 33 named data tables) +- **Linker:** HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB) +- **Vectors:** NMI → $FF65 (`NmiHandler`), RESET → $E80C (non-$C000 entry), IRQ → $FF64 (bare `rti`, adjacent to NMI) +- **Key subsystems:** NMI-driven frame loop with PPU command queue and VRAM transfers; main loop at $E80C; side-scrolling / pool gameplay; audio engine; print-inline-string helper at $CBDC/$CBC9 +- **Build fix:** Promotion from `_wip/` added `header.s`, `chr.s`, HEADER/PRG/CHR `linker.cfg`, and whole-ROM `cmp`; rebuilt from Mesen CDL capture (10,028 bytes Code). **Pass 1/2/3 complete** — byte-identical at whole-ROM level. +- **Pass 3 symbols (2026-10-19):** **45 operands substituted** (18 single-name + 27 hardware) from `symbols.inc`/`locals.inc` via `_tools/apply_symbols.py` — zero residue. Rebuild stays byte-identical. +- **Details:** `Lunar Pool (U)/OVERVIEW.md` + +### 18. Donkey Kong (JU) +- **Folder:** `Donkey Kong (JU)/` (promoted out of `_wip/` 2026-10-19 by `git mv`, so the relative `copilot/rom.nes → ../Donkey Kong (JU).nes` symlink survived) +- **ROM:** `Donkey Kong (JU).nes` (24,592 bytes) +- **Source:** `copilot/prg.s` (6,014 instructions, 76.3% code / 12,505 bytes; 1,015 labels with **zero `Label_` residue**, 145 zero-page slots with neutral `ZpXX` names, 10 named data regions) +- **Linker:** HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB) +- **Vectors:** NMI → $C85F (`NmiHandler`), RESET → $C79E (non-$C000 entry, like DK Jr.), IRQ → $FFF0 (vector-page padding, unused) +- **Key subsystems:** reset enters at $C79E; NMI-driven frame loop; dispatchers at $C807/$C815/$C823/$C831/$C847 load 16-bit pointers from `ObjectPtrTable` ($C03C) and from `$C4A7,x`; large level-data pointer block $C044–$C79D; sound engine over `MusicDataTable` ($F55B), `APUDataTable` ($FAE6), `SfxDataTable` ($FE59) +- **Pass 2 (2026-10-19):** all 919 `Label_XXXX` definitions named — 102 new semantic routine names + 217 `SubC` entry names (honest residue) + 600 derived `_Block[_n]` internal branch targets; `jsr`/`jmp` operands stay numeric (`Wild Gunman (U)` style). Applied with `_tools/pass2.py apply`; `make` still byte-identical +- **Build fix:** none at PRG level — it was PRG-identical in `_wip/` and stayed byte-identical through Pass 3. Promotion added `header.s`, `chr.s`, a HEADER/PRG/CHR `linker.cfg`, the `rom.nes` symlink, and the whole-ROM `cmp`; no `_tools` path change (the Makefile never referenced `_tools/`) and no `make regen` target. Mirroring was recorded as Vertical in the project OVERVIEW but header byte 6 = $00 says **Horizontal** — corrected at promotion +- **Pass 3 symbols (2026-10-19):** **75 operands substituted** (17 single-name + 58 hardware) from `symbols.inc`/`locals.inc` via `_tools/apply_symbols.py` — zero residue. Rebuild stays byte-identical. +- **Pass 3 symbols (2026-10-19):** **75 operands substituted** (17 single-name + 58 hardware) from `symbols.inc`/`locals.inc` via `_tools/apply_symbols.py` — zero residue. Rebuild stays byte-identical. +- **Details:** `Donkey Kong (JU)/OVERVIEW.md` + +### 36. Urban Champion (JU) +- **Folder:** `Urban Champion (JU)/` +- **ROM:** `Urban Champion (JU).nes` (24,592 bytes) +- **Source:** `copilot/prg.s` (~4,000 lines) +- **Linker:** PRG at $C000, 16 KB; single segment +- **Vectors:** NMI → $CA91 (`NmiHandler`), RESET → $CA00 (`Reset`), IRQ → $CA00 (reuses `Reset`) +- **Key subsystems:** NMI-driven frame loop with simple fight game logic; minimal code (33.9%) +- **Build fix:** None needed; byte-identical out of the box +- **Pass 3 symbols (2026-10-19):** **70 operands substituted** (4 single-name + 66 hardware) from `symbols.inc`/`locals.inc` via `_tools/apply_symbols.py` — zero residue. Rebuild stays byte-identical. +- **Details:** `Urban Champion (JU)/OVERVIEW.md` + --- ## `_wip/` Projects -These 19 ROMs are listed as rows 18-36 of the Project Inventory above, so their +These 17 ROMs are listed as rows 19-35 of the Project Inventory above, so their vectors and mirroring are in one place rather than a second table that can drift. -Each is a Pass-0 skeleton (`default_project.tar.gz`): `copilot/` holds the split -`prg.bin`/`header.bin`/`chr.bin` and a symbolic `prg.s`. **They verify at PRG -level only** — their Makefiles run `cmp reconstructed_prg.bin prg.bin`, not a -whole-ROM compare, which is why the inventory marks them `PRG-IDENTICAL` rather -than `BYTE-IDENTICAL`. Promoting one to the top level means adding a -`copilot/rom.nes` (a relative symlink survives the `git mv`), switching the -Makefile to a full-ROM compare, and moving the `../../../_tools/` paths to -`../../_tools/`. `Lunar Pool (U)` went through exactly that on 2026-10-18, and it -needed `header.s`, `chr.s` and a HEADER/PRG/CHR `linker.cfg` before `make` could -compare a whole ROM — a Pass-0 skeleton has none of the three. +Each carries a real disassembly, not a skeleton: 4,482–17,180 lines of `prg.s` +with 192–971 address-based `Label_` definitions apiece — 11,126 in total. +Fifteen of the seventeen also carry canonical `; CPU:$xxxx PRG:xxxx AA BB` +audit comments; the two exceptions predate +that convention — `Golf (JU)` uses `; C007: AD 02 20` and `Pyramid (U)` a +`; PRG:$172E 48` form. **They verify at PRG level only** — their Makefiles run +`cmp reconstructed_prg.bin prg.bin`, not a whole-ROM compare, which is why the +inventory marks them `PRG-IDENTICAL` rather than `BYTE-IDENTICAL`. None keeps the +header/CHR as linkable source: `copilot/` holds the raw `header.bin`/`chr.bin` +splits, with no `header.s`, `chr.s` or HEADER/PRG/CHR `linker.cfg`. Promoting one +to the top level therefore means adding a `copilot/rom.nes` (a relative symlink +survives the `git mv`), adding those three files (copy the shape from +`Burger Time (U)/copilot/`), switching the Makefile to a whole-ROM compare, and +moving the `../../../_tools/` paths to `../../_tools/`. `Lunar Pool (U)` went +through exactly that on 2026-10-18 and `Donkey Kong (JU)` on 2026-10-19 (Pass 3 +done, whole ROM byte-identical); DK (JU) needed no `_tools` path change because +its Makefile never referenced `_tools/`. -`Pyramid (U)` is the only one with Pass 1 done. All 19 currently build cleanly. +Pass 1 is done in all 17, and the inventory rows give the authoritative +per-project status. **No `_wip` project is Pass 2 complete.** The furthest +along are Pinball (180 of 681 label definitions named, plus 40 Pass 3 data +regions drafted but unapplied) and Mario Bros (262 call entry points named — +39 semantic + 223 `SubCxxxx`), and both still carry hundreds of address-based +`Label_` definitions; the other 15 are Pass 1 with partial or no semantic +naming, and none has semantic zero-page aliases. Five headers that read +"Pass 2 complete" before 2026-10-19 (Donkey Kong Jr. Math, Duck Hunt, Ice +Climber (JE), Ice Climber (U), Pinball) had counted their draft maps' rows +rather than the names actually present in `prg.s`; those claims are corrected, +and the maps themselves are stale and unapplied (audited per project — see each +project's `OVERVIEW.md`). All 17 currently build cleanly at the PRG level. +**Each project also owes a real power-on flow `OVERVIEW.md`** — the 2026-10-19 +sweep corrected their status headers to match the actual sources, but most still +lack the flow analysis the top-level projects carry. Notable vector/header observations for Pass 1 work: - **Pac-Man (U)** RESET at `$FF00` (vector-page tail), while the Tengen variant RESETs at `$C033` — different builds confirmed (PRG bytes differ). @@ -271,8 +357,8 @@ Notable vector/header observations for Pass 1 work: - **Pyramid (U)** — *already at Pass 1*: interesting unlicensed Sachen boot ($4100 mapper pokes, "AV" stack-byte check, two queued-event dispatchers). See its `OVERVIEW.md`. - **CIRCUS** — *at Pass 2/3*: full recursive disassembly complete. NMI-driven frame state machine (main loop is a spin loop at $C057). Menu text at $C763 ("CONTINUE", "STAGE", "SELECT", "PLAY"). Object state machine at $DC3F–$FE7B. Audio sequence data at $FABB–$FFFB. See `CIRCUS/OVERVIEW.md`. - **Joypad Test Cartridge (U)** — *Pass 3 complete*: minimal code (23.4%), data-heavy test cartridge. Data region `$CF06–$FFFF` broken into 20 named sub-blocks; VRAM command stream opcode set decoded via `RetAddrUpdate` return-address modification trick at `$CDC8`. See `Joypad Test Cartridge (U)/OVERVIEW.md`. -- **Wild Gunman (U)** — *Pass 1 redone, Pass 2 partial, Pass 3 pending*: NMI-driven frame loop. Gates its code behind runtime computed-goto tables — see the `prg.s` header block and its `OVERVIEW.md`. -- **Mario Bros (JU)** — *Pass 1 complete (72.2% code), Pass 2 substantial*: 252 subroutine entry points named (90 semantic + 165 `SubCxxxx` address-based); 667 internal `Label_Cxxxx` branch targets remain. Code is gated behind stack-based indirect dispatch at `$CD9E` and a 20-entry `JSR` thunk table at `$C5A3`. Audio routines in `$F8xx-$F9xx` clearly identifiable from APU register writes. See `_wip/Mario Bros (JU)/OVERVIEW.md`. +- **Wild Gunman (U)** — *Pass 1 redone, Pass 2/3 complete*: NMI-driven frame loop. Gates its code behind runtime computed-goto tables — see the `prg.s` header block and its `OVERVIEW.md`. +- **Mario Bros (JU)** — *Pass 1 complete (72.2% code), Pass 2 substantial*: 262 call entry points named (39 semantic + 223 `SubCxxxx` address-based) — verified 2026-10-19; the earlier "252 (90 + 165)" was wrong; 667 internal `Label_Cxxxx` branch targets remain. Code is gated behind stack-based indirect dispatch at `$CD9E` and a 20-entry `JSR` thunk table at `$C5A3`. Audio routines in `$F8xx-$F9xx` clearly identifiable from APU register writes. See `_wip/Mario Bros (JU)/OVERVIEW.md`. ## Common Patterns Across All Projects @@ -299,7 +385,7 @@ All projects use the same toolchain: All sources are "Pass-1" style disassemblies: - Every instruction annotated with PRG offset, CPU address, and emitted bytes - Inline `.byte`/`.word`/`.res` data blocks interleaved with code -- Address-based labels (`Label_Cxxxx`, `Sub_Cxxxx`, `EngineRoutine_Cxxxx`) where semantics are not yet resolved +- Address-based labels where semantics are not yet resolved: `Label_Cxxxx` (unrenamed internal targets), `SubC` / `Sub_Cxxxx` (unnamed entry points), `_Block[_n]` (internal blocks under a named parent routine) - Zero-page symbol files (`locals.inc`) and hardware symbol files (`symbols.inc`) --- @@ -358,99 +444,89 @@ The fix generalises: `nesdis.py --undocumented` decodes all 105 undocumented NMO opcodes. It is **default off** so that projects whose `prg.s` is already regen-stable keep reproducing byte-for-byte under `make regen`. -`_tools/verify_pass1.py` now checks all 36 projects. All are faithful; none is -truncated. Its comment-spelling report used to claim that **no project follows the -canonical `; CPU:$xxxx PRG:xxxx AA BB` audit-comment convention**. That was a bug in -the checker, not a fact about the sources: the `canonical` pattern ends with `$` but -was compiled without `re.MULTILINE`, so it could only ever match once — at end of -file — and every project fell through to whichever laxer spelling matched most -lines. Fixed. With `re.M` the true split across the 17 top-level projects is -**8 canonical** (CIRCUS, Excitebike, Joypad Test Cartridge, Lunar Pool, MUSCLE, -NES PowerPad Test Card, Pac-Man (USA) (Namco), Wild Gunman), 3 `pipe`, 2 `short`, -and one each of `rom`, `bytes`, `colon` and `slash` — so the checker sees seven -distinct spellings across the repo, six of them non-canonical, with canonical -dominant. +`_tools/verify_pass1.py` checks the **19 top-level projects** — it selects folders +that carry a `copilot/rom.nes`, so the 17 `_wip/` projects are not covered (they +are checked by plain `make` at the PRG level). Current run, 2026-10-19: every +project builds, **all canonical**, and **no truncated or unfaithful Pass 1**. The +last two carryovers are gone — Joypad Test Cartridge, the last project holding an +old truncated Pass 1, was redone, and Excitebike, the last source with uncommented +instructions, was commented. + +The comment-spelling report used to claim that **no project follows the canonical +`; CPU:$xxxx PRG:xxxx AA BB` convention**. That was a bug in the checker, not a fact +about the sources: the `canonical` pattern ends with `$` but was compiled without +`re.MULTILINE`, so it could only ever match once — at end of file — and every +project fell through to whichever laxer spelling matched most lines. Fixed with +`re.M`, the true split was 8 canonical / 3 `pipe` / 2 `short` / `rom` / `bytes` / +`colon` / `slash`; the 2026-10-19 standardization (`_tools/audit_comment_tool.py` +over 9 projects, plus hand fixes to CIRCUS and Excitebike) closed it out, so the +checker now reports **all canonical**. + +Inside `_wip/`, 15 of the 17 also use the canonical spelling; the two stragglers +are `Golf (JU)` (`; C007: AD 02 20`) and `Pyramid (U)` (`; PRG:$172E 48`). +Bringing those two up to canonical is Pass 2 work for them, not a build problem. The old claim that "Excitebike and Pac-Man carry no byte comments at all" is stale -too. Pac-Man (USA) (Namco) is complete (4,695/4,695 instructions commented); the two -`_wip/Pac-Man` folders are 12-line `.incbin` Pass-0 skeletons with no disassembly to -comment. The one real gap is **Excitebike: 1,013 of its 5,376 instruction lines carry -no audit comment**, and that is now the whole of item 3 below. +on both counts. Pac-Man (USA) (Namco) is complete (4,695/4,695 instructions +commented), and Excitebike's 1,013-line gap was closed on 2026-10-19 — all 5,376 +instruction lines now carry a canonical comment. -Separately, `verify_pass1.py`'s re-trace half crashes on `MUSCLE (U)` and -`Donkey Kong Jr. (JU)` with `ValueError: invalid literal for int() with base 16: -':$0010'` (and `':$0002'`). `nesdis.trace()` parses an emitted operand with -`int(text[1:], 16)`, but the `a:` prefix that the emitter adds to ABS/ABSY/ABSX/IND -operands with a `$00` high byte makes the text `a:$0010` — so the slice starts on the -colon. Any project containing `jmp ($00xx)` / `jsr`/`jmp $00xx` hits it. Not fixed -here because `nesdis.py` feeds `make regen`, and MUSCLE's regen output must stay -byte-stable. +The earlier-reported re-trace crash on `MUSCLE (U)` / `Donkey Kong Jr. (JU)` +(`ValueError: invalid literal for int() with base 16: ':$0010'`) was a false alarm: +`nesdis.operand_value()` already strips the emitter's `a:` prefix via +`token.removeprefix("a:").lstrip("$")`, so re-tracing all 19 top-level projects is +clean. -### TODO — audit comments for Excitebike and Pac-Man +### Resolved — audit comments for Excitebike and Pac-Man (2026-10-19) -Both are hand-written sources with semantic labels but **no byte-identity audit -trail**, so a source line cannot be mapped back to exact ROM bytes without -re-assembling. Everything else in this repo carries such a comment. +Both were hand-written sources with semantic labels but no byte-identity audit +trail. Both now carry canonical `; CPU:$xxxx PRG:xxxx AA BB` comments on every +instruction, and `verify_pass1.py` reports all-canonical across the top level, so +this section is closed. -The approach that was going to be used, and the reason it was abandoned: - -* Addresses come from `ca65 -l`. That part works — the listing prints the segment - offset and the emitted bytes, and the offset indexes `prg.bin` directly. - Byte *values* must be read from `prg.bin` rather than the listing, because - ca65 prints `rr rr` for relocatable words. -* **The blocker: ca65's listing contains no source line numbers.** It emits - `r ` and nothing that ties an entry back to - a line number, so entries cannot be keyed to source lines directly. - -Remaining options, none of them free: - -1. **Lockstep text alignment** — walk the listing and `prg.s` together, matching - each listing entry's trailing source text against the next source line. Needs - care: the listing may truncate long lines, and blank or comment-only source - lines may not appear at all, so the two streams are not obviously 1:1. -2. **Re-derive offsets by decoding `prg.s` independently** — re-implement enough - of ca65's layout to walk directives, macros and expression evaluation. High - risk of disagreeing with ca65, and a disagreement would corrupt offsets - silently while still assembling. -3. **Emit an intermediate from a known-good tracer** — regenerate both projects - through `nesdis.py` for the comments only, then transplant the comments onto - the hand-written source. Also needs a line-to-line correspondence. - -Whichever is chosen, the check is the same and must not be skipped: after -inserting comments, `make` must still print `Byte-identical ROM verified.`, and -the comment's byte list must match `prg.bin` at the stated offset for every -line. A wrong offset that still assembles is the failure mode to watch for. +The `ca65 -l` listing route described here was abandoned, for the reason recorded +in `AGENTS.md`: the listing carries no source line numbers, so entries cannot be +keyed back to source lines. The comment tooling went through the tracer instead +(`_tools/audit_comment_tool.py`, tracer as ground truth). The invariant still +holds and is the check to keep: after inserting comments, `make` must still print +`Byte-identical ROM verified.`, and each comment's byte list must match `prg.bin` +at the stated offset — a wrong offset that still assembles is the failure mode. --- ## Summary -The 16 numbered projects below are promoted out of `_wip/` and rebuild **byte-identical** -to their original ROMs. The 20 `_wip/` projects (rows 17-36) verify at PRG level only — +The 19 numbered projects below are promoted out of `_wip/` and rebuild **byte-identical** +to their original ROMs (rows 1-18 plus row 36 — Urban Champion kept its tail number +when it was promoted). The 17 `_wip/` projects (rows 19-35) verify at PRG level only — see "`_wip/` Projects" below. | # | Project | Build Status | Pass 3 | |---|---------|--------------|--------| -| 1 | Balloon Fight (JU) | BYTE-IDENTICAL | complete (Pass 1 verified) | -| 2 | Baseball (UE) | BYTE-IDENTICAL | complete | +| 1 | Balloon Fight (JU) | BYTE-IDENTICAL | complete; symbols applied 2026-10-19 (16 `$13` operands left numeric) | +| 2 | Baseball (UE) | BYTE-IDENTICAL | complete; symbols applied 2026-10-19 (121 operands) | | 3 | Bomberman (U) | BYTE-IDENTICAL | complete | | 4 | Burger Time (U) | BYTE-IDENTICAL | complete | | 5 | Clu Clu Land (JU) | BYTE-IDENTICAL | complete | | 6 | Defender 2 (U) | BYTE-IDENTICAL | complete | | 7 | Excitebike (JU) | BYTE-IDENTICAL | complete | -| 8 | Tennis (JU) | BYTE-IDENTICAL | complete | -| 9 | Pac-Man (USA) (Namco) | BYTE-IDENTICAL | complete | +| 8 | Tennis (JU) | BYTE-IDENTICAL | complete; symbols applied 2026-10-19 (18 operands) | +| 9 | Pac-Man (USA) (Namco) | BYTE-IDENTICAL | complete; symbols applied 2026-10-19 (524 operands; 727 multi-alias residues) | | 10 | Donkey Kong 3 (JUE) | BYTE-IDENTICAL | complete | | 11 | Donkey Kong Jr. (JU) | BYTE-IDENTICAL | complete (Pass 1 verified) | -| 12 | CIRCUS | BYTE-IDENTICAL | complete | -| 13 | Wild Gunman (U) | BYTE-IDENTICAL | pending (Pass 1 redone) | -| 14 | Joypad Test Cartridge (U) | BYTE-IDENTICAL | Pass 3 complete | -| 15 | NES PowerPad Test Card (U) | BYTE-IDENTICAL | complete | -| 16 | MUSCLE (U) | BYTE-IDENTICAL | complete | +| 12 | CIRCUS | BYTE-IDENTICAL | complete; symbols applied 2026-10-19 (118 operands; 23 multi-alias residues) | +| 13 | Wild Gunman (U) | BYTE-IDENTICAL | complete (Pass 1 redone); symbols applied 2026-10-19 (76 operands) | +| 14 | Joypad Test Cartridge (U) | BYTE-IDENTICAL | Pass 3 complete; symbols applied 2026-10-19 (47 operands) | +| 15 | NES PowerPad Test Card (U) | BYTE-IDENTICAL | complete; symbols applied 2026-10-19 (89 operands) | +| 16 | MUSCLE (U) | BYTE-IDENTICAL | complete; symbols applied 2026-10-19 (220 operands) | +| 17 | Lunar Pool (U) | BYTE-IDENTICAL | complete (tables named); symbols applied 2026-10-19 (45 operands) | +| 18 | Donkey Kong (JU) | BYTE-IDENTICAL | complete (Pass 2/3, promoted 2026-10-19); symbols applied 2026-10-19 (75 operands) | +| 36 | Urban Champion (JU) | BYTE-IDENTICAL | complete; symbols applied 2026-10-19 (70 operands) | -Rows 17-36 (`_wip/`) all rebuild cleanly at PRG level. `Pyramid (U)` is the only -one with Pass 1 done. Pass 1 work and promotion into the numbered inventory is -future work for all of them. +Rows 19-35 (`_wip/`) all rebuild cleanly at PRG level. All 17 have Pass 1 done and +several are at Pass 2 (see the rows above); promotion into the numbered inventory, +CDL-backed reclassification of the remaining data, and a real power-on flow +`OVERVIEW.md` per project are the open work for them. Use `_tools/verify_pass1.py` to re-check any of this at any time; it rebuilds each project and re-traces it, and reports `TRUNCATED` when a project's committed split diff --git a/Pac-Man (USA) (Namco)/OVERVIEW.md b/Pac-Man (USA) (Namco)/OVERVIEW.md index 74392be..f21ad6c 100644 --- a/Pac-Man (USA) (Namco)/OVERVIEW.md +++ b/Pac-Man (USA) (Namco)/OVERVIEW.md @@ -11,10 +11,10 @@ This document describes the execution flow of the disassembled Pac-Man (USA) (Na | Format | iNES / NES 2.0 | | PRG | 1 × 16 KB (mapped at CPU $C000–$FFFF) | | CHR | 1 × 8 KB | -| Mirroring | Vertical | +| Mirroring | Horizontal | | PRG bank start | CPU $C000 | | Source file | `copilot/prg.s` (14,332 lines) | -| Output | `reconstructed_prg.bin` (16,384 bytes) | +| Output | `reconstructed.nes` (whole ROM: 16-byte header + 16,384-byte PRG + 8,192-byte CHR) | ### Interrupt vectors (CPU $FFFA–$FFFF) @@ -34,7 +34,7 @@ Additional ROM data at $FFF6–$FFF9: `make` in `copilot/` assembles `prg.s` with `ca65`, links with `ld65`, and verifies against `prg.bin`. -**Verification result: BYTE-IDENTICAL** — `reconstructed_prg.bin` matches `prg.bin` exactly (all 16,384 bytes), and `prg.bin` matches the PRG bank of `rom.nes` (skipping the 16-byte iNES header). +**Verification result: BYTE-IDENTICAL** — `reconstructed.nes` matches `rom.nes` exactly (header + PRG + CHR). --- @@ -457,7 +457,7 @@ Audio Engine (from NMI via InitializeAudioChannels/$EEB4) │ ## 13. Notes -- **Build verification:** `make` in `copilot/` produces `reconstructed_prg.bin` that is **byte-identical** to `prg.bin` and to the PRG bank of `rom.nes`. +- **Build verification:** `make` in `copilot/` produces `reconstructed.nes`, compared whole-ROM against `rom.nes`. - Vectors confirm NMI at $C10E, RESET at $C033, IRQ at $C17E (a bare `rti`, unused). - The foreground main loop (`MainDispatchLoop` at $C645) is strictly NMI-synchronized via `$40`: NMI clears it each frame, and the main code spins waiting for it to clear before dispatching to the next state handler. - `GameModeEntry` ($C328) is a second, separate state machine entered from the state-$04 final phase. It has its own frame sync (`$40`) and its own 8-state dispatch table (`GameModeStateTable` at $CAD7), leading into gameplay initialization. diff --git a/Pac-Man (USA) (Namco)/copilot/prg.s b/Pac-Man (USA) (Namco)/copilot/prg.s index 9e84fe9..05795f7 100644 --- a/Pac-Man (USA) (Namco)/copilot/prg.s +++ b/Pac-Man (USA) (Namco)/copilot/prg.s @@ -58,8 +58,8 @@ Reset: sta ($00),y ; CPU:$C068 PRG:0068 91 00 iny ; CPU:$C06A PRG:006A C8 bne @ClearRamPages ; CPU:$C06B PRG:006B D0 FB - inc $01 ; CPU:$C06D PRG:006D E6 01 - cpx $01 ; CPU:$C06F PRG:006F E4 01 + inc WorkPtrLo ; CPU:$C06D PRG:006D E6 01 + cpx WorkPtrLo ; CPU:$C06F PRG:006F E4 01 bne @ClearRamPages ; CPU:$C071 PRG:0071 D0 F5 lda #$06 ; CPU:$C073 PRG:0073 A9 06 @@ -76,7 +76,7 @@ Reset: @CheckRamSignature: lda RamSignature,y ; CPU:$C08B PRG:008B B9 FF C0 - cmp $0052,y ; CPU:$C08E PRG:008E D9 52 00 + cmp a:Player2PointScore,y ; CPU:$C08E PRG:008E D9 52 00 bne @InitializeRamSignature ; CPU:$C091 PRG:0091 D0 07 iny ; CPU:$C093 PRG:0093 C8 @@ -98,13 +98,13 @@ Reset: @CopyRamSignature: lda RamSignature,y ; CPU:$C0A5 PRG:00A5 B9 FF C0 - sta $0052,y ; CPU:$C0A8 PRG:00A8 99 52 00 + sta a:Player2PointScore,y ; CPU:$C0A8 PRG:00A8 99 52 00 iny ; CPU:$C0AB PRG:00AB C8 cpy #$0F ; CPU:$C0AC PRG:00AC C0 0F bne @CopyRamSignature ; CPU:$C0AE PRG:00AE D0 F5 lda #$01 ; CPU:$C0B0 PRG:00B0 A9 01 - sta $64 ; CPU:$C0B2 PRG:00B2 85 64 + sta Player1YPosition ; CPU:$C0B2 PRG:00B2 85 64 @SignatureAlreadyPresent: ldy #$00 ; CPU:$C0B4 PRG:00B4 A0 00 @@ -113,7 +113,7 @@ Reset: lda #$07 ; CPU:$C0B8 PRG:00B8 A9 07 sta $45 ; CPU:$C0BA PRG:00BA 85 45 lda #$01 ; CPU:$C0BC PRG:00BC A9 01 - cmp $47 ; CPU:$C0BE PRG:00BE C5 47 + cmp activePlayerFlag ; CPU:$C0BE PRG:00BE C5 47 bne @SkipSwap ; CPU:$C0C0 PRG:00C0 D0 19 cmp $46 ; CPU:$C0C2 PRG:00C2 C5 46 @@ -196,7 +196,7 @@ NmiHandler: lda #$00 ; CPU:$C118 PRG:0118 A9 00 sta OAMADDR ; CPU:$C11A PRG:011A 8D 03 20 - sta $40 ; CPU:$C11D PRG:011D 85 40 + sta Zp40 ; CPU:$C11D PRG:011D 85 40 lda $45 ; CPU:$C11F PRG:011F A5 45 sta OAMDMA ; CPU:$C121 PRG:0121 8D 14 40 @@ -213,7 +213,7 @@ NmiHandler: sta PPUSCROLL ; CPU:$C134 PRG:0134 8D 05 20 ; Construct the PPUCTRL value for this frame. - lda $47 ; CPU:$C137 PRG:0137 A5 47 + lda activePlayerFlag ; CPU:$C137 PRG:0137 A5 47 and $46 ; CPU:$C139 PRG:0139 25 46 and #$01 ; CPU:$C13B PRG:013B 29 01 asl ; CPU:$C13D PRG:013D 0A @@ -375,10 +375,10 @@ UpdatePalettes: MainEntry: lda #$01 ; CPU:$C1E7 PRG:01E7 A9 01 - sta $40 ; CPU:$C1E9 PRG:01E9 85 40 + sta Zp40 ; CPU:$C1E9 PRG:01E9 85 40 @WaitForInitialNmi: - lda $40 ; CPU:$C1EB PRG:01EB A5 40 + lda Zp40 ; CPU:$C1EB PRG:01EB A5 40 bne @WaitForInitialNmi ; CPU:$C1ED PRG:01ED D0 FC lda #$08 ; CPU:$C1EF PRG:01EF A9 08 @@ -429,8 +429,8 @@ MainEntry: sta $42 ; CPU:$C23A PRG:023A 41 85 sta $41 ; CPU:$C23C PRG:023C 4C 85 sta stateTimer ; CPU:$C23E PRG:023E 87 85 - sta $87 ; CPU:$C240 PRG:0240 88 A5 - sta $88 ; CPU:$C242 PRG:0242 3F D0 + sta PlayerFacingDirection ; CPU:$C240 PRG:0240 88 A5 + sta PlayerXPosition ; CPU:$C242 PRG:0242 3F D0 lda gameState ; CPU:$C244 PRG:0244 04 A9 bne @UseAlternatePpuCtrl ; CPU:$C246 PRG:0246 8A D0 @@ -447,10 +447,10 @@ MainEntry: MainDispatchLoop: lda #$01 ; CPU:$C250 PRG:0250 A9 01 - sta $40 ; CPU:$C252 PRG:0252 85 40 + sta Zp40 ; CPU:$C252 PRG:0252 85 40 @WaitForNmi: - lda $40 ; CPU:$C254 PRG:0254 A5 40 + lda Zp40 ; CPU:$C254 PRG:0254 A5 40 bne @WaitForNmi ; CPU:$C256 PRG:0256 D0 FC ldy gameState ; CPU:$C258 PRG:0258 A4 3F @@ -1048,8 +1048,8 @@ TitleScreenAttributeData: ;============================================================================== PlayerSelectionState: - lda $87 ; CPU:$C477 PRG:0477 A5 87 - ora $88 ; CPU:$C479 PRG:0479 05 88 + lda PlayerFacingDirection ; CPU:$C477 PRG:0477 A5 87 + ora PlayerXPosition ; CPU:$C479 PRG:0479 05 88 bne @AdvanceTimeout ; CPU:$C47B PRG:047B D0 19 ldy #$00 ; CPU:$C47D PRG:047D A0 00 @@ -1072,18 +1072,18 @@ PlayerSelectionState: @AdvanceTimeout: clc ; CPU:$C496 PRG:0496 18 lda #$01 ; CPU:$C497 PRG:0497 A9 01 - adc $87 ; CPU:$C499 PRG:0499 65 87 - sta $87 ; CPU:$C49B PRG:049B 85 87 + adc PlayerFacingDirection ; CPU:$C499 PRG:0499 65 87 + sta PlayerFacingDirection ; CPU:$C49B PRG:049B 85 87 - lda $88 ; CPU:$C49D PRG:049D A5 88 + lda PlayerXPosition ; CPU:$C49D PRG:049D A5 88 adc #$00 ; CPU:$C49F PRG:049F 69 00 - sta $88 ; CPU:$C4A1 PRG:04A1 85 88 + sta PlayerXPosition ; CPU:$C4A1 PRG:04A1 85 88 cmp #$02 ; CPU:$C4A3 PRG:04A3 C9 02 bne @CheckSelectionInput ; CPU:$C4A5 PRG:04A5 D0 0B lda #$00 ; CPU:$C4A7 PRG:04A7 A9 00 - sta $87 ; CPU:$C4A9 PRG:04A9 85 87 + sta PlayerFacingDirection ; CPU:$C4A9 PRG:04A9 85 87 lda #$04 ; CPU:$C4AB PRG:04AB A9 04 sta gameState ; CPU:$C4AD PRG:04AD 85 3F @@ -1099,10 +1099,10 @@ PlayerSelectionState: sta pacmanRequestedDirection ; CPU:$C4BA PRG:04BA 85 50 lda #$00 ; CPU:$C4BC PRG:04BC A9 00 - sta $88 ; CPU:$C4BE PRG:04BE 85 88 + sta PlayerXPosition ; CPU:$C4BE PRG:04BE 85 88 lda #$01 ; CPU:$C4C0 PRG:04C0 A9 01 - sta $87 ; CPU:$C4C2 PRG:04C2 85 87 + sta PlayerFacingDirection ; CPU:$C4C2 PRG:04C2 85 87 lda pacmanRequestedDirection ; CPU:$C4C4 PRG:04C4 A5 50 beq @CheckConfirmInput ; CPU:$C4C6 PRG:04C6 F0 21 @@ -1234,7 +1234,7 @@ State04Handler: jmp MainEntry ; CPU:$C51C PRG:051C 4C E7 C1 @DispatchSubstate: - ldy $87 ; CPU:$C51F PRG:051F A4 87 + ldy PlayerFacingDirection ; CPU:$C51F PRG:051F A4 87 lda State04SubstateTable,y ; CPU:$C521 PRG:0521 B9 2E C5 sta dispatchVector ; CPU:$C524 PRG:0524 85 10 @@ -1315,10 +1315,10 @@ State04SubstateTable: State04Initialize: lda #$01 ; CPU:$C546 PRG:0546 A9 01 - sta $40 ; CPU:$C548 PRG:0548 85 40 + sta Zp40 ; CPU:$C548 PRG:0548 85 40 @WaitForNmi: - lda $40 ; CPU:$C54A PRG:054A A5 40 + lda Zp40 ; CPU:$C54A PRG:054A A5 40 bne @WaitForNmi ; CPU:$C54C PRG:054C D0 FC lda #$08 ; CPU:$C54E PRG:054E A9 08 @@ -1327,14 +1327,14 @@ State04Initialize: lda #$00 ; CPU:$C555 PRG:0555 A9 00 sta PPUMASK ; CPU:$C557 PRG:0557 8D 01 20 - sta $88 ; CPU:$C55A PRG:055A 85 88 + sta PlayerXPosition ; CPU:$C55A PRG:055A 85 88 jsr $C5D8 ; CPU:$C55C PRG:055C 20 D8 C5 jsr InitializeState04PpuData ; CPU:$C55F PRG:055F 20 08 C6 jsr LoadState04DisplayData ; CPU:$C562 PRG:0562 20 A6 C5 - inc $87 ; CPU:$C565 PRG:0565 E6 87 - inc $87 ; CPU:$C567 PRG:0567 E6 87 + inc PlayerFacingDirection ; CPU:$C565 PRG:0565 E6 87 + inc PlayerFacingDirection ; CPU:$C567 PRG:0567 E6 87 lda #$88 ; CPU:$C569 PRG:0569 A9 88 sta PPUCTRL ; CPU:$C56B PRG:056B 8D 00 20 @@ -1359,19 +1359,19 @@ State04Initialize: ;============================================================================== State04TimedSubstate: - inc $88 ; CPU:$C573 PRG:0573 E6 88 + inc PlayerXPosition ; CPU:$C573 PRG:0573 E6 88 - lda $88 ; CPU:$C575 PRG:0575 A5 88 + lda PlayerXPosition ; CPU:$C575 PRG:0575 A5 88 cmp #$30 ; CPU:$C577 PRG:0577 C9 30 bne @ReturnToMainLoop ; CPU:$C579 PRG:0579 D0 0B lda #$00 ; CPU:$C57B PRG:057B A9 00 - sta $88 ; CPU:$C57D PRG:057D 85 88 + sta PlayerXPosition ; CPU:$C57D PRG:057D 85 88 jsr $C5A6 ; CPU:$C57F PRG:057F 20 A6 C5 - inc $87 ; CPU:$C582 PRG:0582 E6 87 - inc $87 ; CPU:$C584 PRG:0584 E6 87 + inc PlayerFacingDirection ; CPU:$C582 PRG:0582 E6 87 + inc PlayerFacingDirection ; CPU:$C584 PRG:0584 E6 87 @ReturnToMainLoop: jmp MainDispatchLoop ; CPU:$C586 PRG:0586 4C 50 C2 @@ -1404,20 +1404,20 @@ State04TimedSubstate: ;============================================================================== State04LongDelay: - inc $88 ; CPU:$C589 PRG:0589 E6 88 + inc PlayerXPosition ; CPU:$C589 PRG:0589 E6 88 - lda $88 ; CPU:$C58B PRG:058B A5 88 + lda PlayerXPosition ; CPU:$C58B PRG:058B A5 88 cmp #$80 ; CPU:$C58D PRG:058D C9 80 beq @AdvanceSubstate ; CPU:$C58F PRG:058F F0 03 jmp MainDispatchLoop ; CPU:$C591 PRG:0591 4C 50 C2 @AdvanceSubstate: - inc $87 ; CPU:$C594 PRG:0594 E6 87 - inc $87 ; CPU:$C596 PRG:0596 E6 87 + inc PlayerFacingDirection ; CPU:$C594 PRG:0594 E6 87 + inc PlayerFacingDirection ; CPU:$C596 PRG:0596 E6 87 lda #$00 ; CPU:$C598 PRG:0598 A9 00 - sta $88 ; CPU:$C59A PRG:059A 85 88 + sta PlayerXPosition ; CPU:$C59A PRG:059A 85 88 jmp MainDispatchLoop ; CPU:$C59C PRG:059C 4C 50 C2 @@ -1471,7 +1471,7 @@ SetSelectionFlagAndContinue: ;============================================================================== LoadState04DisplayData: - ldy $87 ; CPU:$C5A6 PRG:05A6 A4 87 + ldy PlayerFacingDirection ; CPU:$C5A6 PRG:05A6 A4 87 lda CharacterIntroDisplayDataTable,y ; CPU:$C5A8 PRG:05A8 B9 87 C6 sta workPtr0 ; CPU:$C5AB PRG:05AB 85 00 @@ -1495,7 +1495,7 @@ LoadState04DisplayData: rts ; CPU:$C5C3 PRG:05C3 A5 @SecondaryCopy: - lda $87 ; CPU:$C5C4 PRG:05C4 87 38 + lda PlayerFacingDirection ; CPU:$C5C4 PRG:05C4 87 38 sec ; CPU:$C5C6 PRG:05C6 E9 sbc #$02 ; CPU:$C5C7 PRG:05C7 02 0A asl ; CPU:$C5C9 PRG:05C9 0A @@ -2118,7 +2118,7 @@ CharacterIntroAttributeData: ; The individual target handlers will be named as they are decoded. ;============================================================================== State04FinalPhase: - ldy $88 ; CPU:$C792 PRG:0792 A4 88 + ldy PlayerXPosition ; CPU:$C792 PRG:0792 A4 88 lda State04FinalPhaseTable,y ; CPU:$C794 PRG:0794 B9 A1 C7 sta dispatchVector ; CPU:$C797 PRG:0797 85 10 @@ -2195,9 +2195,9 @@ State04FinalPhaseInitialize: sta pacmanMotion ; CPU:$C7B6 PRG:07B6 85 1A lda #$00 ; CPU:$C7B8 PRG:07B8 A9 00 - sta $1B ; CPU:$C7BA PRG:07BA 85 1B - sta $89 ; CPU:$C7BC PRG:07BC 85 89 - sta $8A ; CPU:$C7BE PRG:07BE 85 8A + sta Zp1B ; CPU:$C7BA PRG:07BA 85 1B + sta PlayerYPosition ; CPU:$C7BC PRG:07BC 85 89 + sta PlayerPreviousX ; CPU:$C7BE PRG:07BE 85 8A lda #$F4 ; CPU:$C7C0 PRG:07C0 A9 F4 sta $0274 ; CPU:$C7C2 PRG:07C2 8D 74 02 @@ -2230,8 +2230,8 @@ State04FinalPhaseInitialize: jsr $DAF1 ; CPU:$C7E8 PRG:07E8 20 F1 DA - inc $88 ; CPU:$C7EB PRG:07EB E6 88 - inc $88 ; CPU:$C7ED PRG:07ED E6 88 + inc PlayerXPosition ; CPU:$C7EB PRG:07EB E6 88 + inc PlayerXPosition ; CPU:$C7ED PRG:07ED E6 88 jmp MainDispatchLoop ; CPU:$C7EF PRG:07EF 4C 50 C2 @@ -2341,7 +2341,7 @@ State04FinalPhaseActive: sta $0296 ; CPU:$C83F PRG:083F 8D 96 02 lda #$00 ; CPU:$C842 PRG:0842 A9 00 - sta $89 ; CPU:$C844 PRG:0844 85 89 + sta PlayerYPosition ; CPU:$C844 PRG:0844 85 89 lda #$22 ; CPU:$C846 PRG:0846 A9 22 sta $024B ; CPU:$C848 PRG:0848 8D 4B 02 @@ -2349,8 +2349,8 @@ State04FinalPhaseActive: lda #$20 ; CPU:$C84B PRG:084B A9 20 sta $024D ; CPU:$C84D PRG:084D 8D 4D 02 - inc $88 ; CPU:$C850 PRG:0850 E6 88 - inc $88 ; CPU:$C852 PRG:0852 E6 88 + inc PlayerXPosition ; CPU:$C850 PRG:0850 E6 88 + inc PlayerXPosition ; CPU:$C852 PRG:0852 E6 88 jmp MainDispatchLoop ; CPU:$C854 PRG:0854 4C 50 C2 @@ -2392,12 +2392,12 @@ State04FinalPhaseActive: ;============================================================================== State04FinalPhaseComplete: - lda $8A ; CPU:$C857 PRG:0857 A5 8A + lda PlayerPreviousX ; CPU:$C857 PRG:0857 A5 8A beq @RunRegularUpdate ; CPU:$C859 PRG:0859 F0 47 jsr RotateState04ObjectSlots ; CPU:$C85B PRG:085B 20 2E C9 - dec $8A ; CPU:$C85E PRG:085E C6 8A + dec PlayerPreviousX ; CPU:$C85E PRG:085E C6 8A beq @CountdownComplete ; CPU:$C860 PRG:0860 F0 03 jmp MainDispatchLoop ; CPU:$C862 PRG:0862 4C 50 C2 @@ -2434,7 +2434,7 @@ State04FinalPhaseComplete: lda #$A8 ; CPU:$C88C PRG:088C 00 A9 sta $0276 ; CPU:$C88E PRG:088E A8 8D 76 - lda $89 ; CPU:$C891 PRG:0891 02 A5 + lda PlayerYPosition ; CPU:$C891 PRG:0891 02 A5 cmp #$04 ; CPU:$C893 PRG:0893 89 C9 beq @FinishSequence ; CPU:$C895 PRG:0895 04 F0 @@ -2528,17 +2528,17 @@ InitializeState04ObjectSlot: sta ghost1Motion,y ; CPU:$C8C5 PRG:08C5 99 1E lda #$00 ; CPU:$C8C7 PRG:08C7 00 A9 - sta $001F,y ; CPU:$C8C9 PRG:08C9 00 99 1F + sta a:Zp1F,y ; CPU:$C8C9 PRG:08C9 00 99 1F ldy workPtr0 ; CPU:$C8CC PRG:08CC 00 A4 - lda $89 ; CPU:$C8CE PRG:08CE 00 A5 + lda PlayerYPosition ; CPU:$C8CE PRG:08CE 00 A5 sta $0293,y ; CPU:$C8D0 PRG:08D0 89 99 93 lda #$0C ; CPU:$C8D3 PRG:08D3 02 A9 sta $028D,y ; CPU:$C8D5 PRG:08D5 0C 99 8D - inc $89 ; CPU:$C8D8 PRG:08D8 02 E6 + inc PlayerYPosition ; CPU:$C8D8 PRG:08D8 02 E6 rts ; CPU:$C8DA PRG:08DA 89 @@ -2646,11 +2646,11 @@ CheckState04ObjectTrigger: rts ; CPU:$C910 PRG:0910 A4 @TriggerEvent: - ldy $89 ; CPU:$C911 PRG:0911 89 E6 - inc $89 ; CPU:$C913 PRG:0913 89 A9 + ldy PlayerYPosition ; CPU:$C911 PRG:0911 89 E6 + inc PlayerYPosition ; CPU:$C913 PRG:0913 89 A9 lda #$40 ; CPU:$C915 PRG:0915 40 85 - sta $8A ; CPU:$C917 PRG:0917 8A B9 + sta PlayerPreviousX ; CPU:$C917 PRG:0917 8A B9 lda $C9EE,y ; CPU:$C919 PRG:0919 EE C9 A4 @@ -2961,9 +2961,9 @@ UpdateState04ObjectStatus: @UseTableBase: stx workPtr0 ; CPU:$CA02 PRG:0A02 86 00 - inc $B7 ; CPU:$CA04 PRG:0A04 E6 B7 + inc PlayerPoseFlags ; CPU:$CA04 PRG:0A04 E6 B7 - lda $B7 ; CPU:$CA06 PRG:0A06 A5 B7 + lda PlayerPoseFlags ; CPU:$CA06 PRG:0A06 A5 B7 and #$07 ; CPU:$CA08 PRG:0A08 29 07 clc ; CPU:$CA0A PRG:0A0A 18 adc workPtr0 ; CPU:$CA0B PRG:0A0B 65 00 @@ -3093,8 +3093,8 @@ GameModeEntry: sta PPUMASK ; CPU:$CA62 PRG:0A62 8D 01 20 sta gameState ; CPU:$CA65 PRG:0A65 85 3F sta cocktailModeFlag ; CPU:$CA67 PRG:0A67 85 46 - sta $69 ; CPU:$CA69 PRG:0A69 85 69 - sta $4A ; CPU:$CA6B PRG:0A6B 85 4A + sta Player2YPosition ; CPU:$CA69 PRG:0A69 85 69 + sta ModeAnimTimerB ; CPU:$CA6B PRG:0A6B 85 4A jsr ClearGameplayNametables ; CPU:$CA6D PRG:0A6D 20 85 E3 jsr DrawGameplayHudLabels ; CPU:$CA70 PRG:0A70 20 02 E5 @@ -3128,7 +3128,7 @@ GameModeEntry: @InitializeCommonState: lda #$FF ; CPU:$CA96 PRG:0A96 06 A9 sta roundDisplayValue ; CPU:$CA98 PRG:0A98 FF 85 - sta $78 ; CPU:$CA9A PRG:0A9A 68 85 + sta PlayerAnimationFlags ; CPU:$CA9A PRG:0A9A 68 85 sta $0245 ; CPU:$CA9C PRG:0A9C 78 8D 45 lda #$88 ; CPU:$CA9F PRG:0A9F 02 A9 @@ -3138,10 +3138,10 @@ GameModeEntry: GameModeFrameSync: @WaitForNextFrame: lda #$01 ; CPU:$CAA7 PRG:0AA7 A9 01 - sta $40 ; CPU:$CAA9 PRG:0AA9 85 40 + sta Zp40 ; CPU:$CAA9 PRG:0AA9 85 40 @WaitForNmi: - lda $40 ; CPU:$CAAB PRG:0AAB A5 40 + lda Zp40 ; CPU:$CAAB PRG:0AAB A5 40 bne @WaitForNmi ; CPU:$CAAD PRG:0AAD D0 FC @DispatchLoop: @@ -3269,15 +3269,15 @@ GameModeState04: @CheckPauseInput: lda currentInput ; CPU:$CAF1 PRG:0AF1 A5 4D and #$08 ; CPU:$CAF3 PRG:0AF3 29 08 - cmp $49 ; CPU:$CAF5 PRG:0AF5 C5 49 + cmp ModeAnimFrameA ; CPU:$CAF5 PRG:0AF5 C5 49 beq @ProcessCurrentMode ; CPU:$CAF7 PRG:0AF7 F0 38 - sta $49 ; CPU:$CAF9 PRG:0AF9 85 49 + sta ModeAnimFrameA ; CPU:$CAF9 PRG:0AF9 85 49 - lda $49 ; CPU:$CAFB PRG:0AFB A5 49 + lda ModeAnimFrameA ; CPU:$CAFB PRG:0AFB A5 49 beq @ProcessCurrentMode ; CPU:$CAFD PRG:0AFD F0 32 - inc $4A ; CPU:$CAFF PRG:0AFF E6 4A + inc ModeAnimTimerB ; CPU:$CAFF PRG:0AFF E6 4A ldx #$22 ; CPU:$CB01 PRG:0B01 A2 22 @@ -3296,7 +3296,7 @@ GameModeState04: ldx #$06 ; CPU:$CB13 PRG:0B13 A2 06 ldy #$00 ; CPU:$CB15 PRG:0B15 A0 00 - lda $4A ; CPU:$CB17 PRG:0B17 A5 4A + lda ModeAnimTimerB ; CPU:$CB17 PRG:0B17 A5 4A and #$01 ; CPU:$CB19 PRG:0B19 29 01 beq @CopyPauseData ; CPU:$CB1B PRG:0B1B F0 05 @@ -3316,7 +3316,7 @@ GameModeState04: jmp GameModeFrameSync ; CPU:$CB2E PRG:0B2E 4C A7 CA @ProcessCurrentMode: - lda $4A ; CPU:$CB31 PRG:0B31 A5 4A + lda ModeAnimTimerB ; CPU:$CB31 PRG:0B31 A5 4A and #$01 ; CPU:$CB33 PRG:0B33 29 01 beq @RunFrameUpdates ; CPU:$CB35 PRG:0B35 F0 03 @@ -3390,7 +3390,7 @@ PauseDisplayData: ;============================================================================== GameModeState02: - lda $87 ; CPU:$CB67 PRG:0B67 A5 87 + lda PlayerFacingDirection ; CPU:$CB67 PRG:0B67 A5 87 beq @BuildInitialData ; CPU:$CB69 PRG:0B69 F0 03 jmp @AdvancePhase ; CPU:$CB6B PRG:0B6B 4C E4 CB @@ -3460,7 +3460,7 @@ GameModeState02: inc workValue2 ; CPU:$CBC3 PRG:0BC3 07 A5 inc workValue3 ; CPU:$CBC5 PRG:0BC5 69 D0 - lda $69 ; CPU:$CBC7 PRG:0BC7 04 A5 + lda Player2YPosition ; CPU:$CBC7 PRG:0BC7 04 A5 bne @ContinueBuild ; CPU:$CBC9 PRG:0BC9 68 D0 lda roundDisplayValue ; CPU:$CBCB PRG:0BCB 18 C6 @@ -3492,16 +3492,16 @@ GameModeState02: ;------------------------------------------------------------------------------ @AdvancePhase: - lda $87 ; CPU:$CBE7 PRG:0BE7 C0 D0 + lda PlayerFacingDirection ; CPU:$CBE7 PRG:0BE7 C0 D0 cmp #$C0 ; CPU:$CBE9 PRG:0BE9 03 4C bne @IncrementPhase ; CPU:$CBEB PRG:0BEB 7C CC jmp $CC7C ; CPU:$CBED PRG:0BED E6 87 A5 @IncrementPhase: - inc $87 ; CPU:$CBF0 PRG:0BF0 87 C9 + inc PlayerFacingDirection ; CPU:$CBF0 PRG:0BF0 87 C9 - lda $87 ; CPU:$CBF2 PRG:0BF2 78 F0 + lda PlayerFacingDirection ; CPU:$CBF2 PRG:0BF2 78 F0 cmp #$78 ; CPU:$CBF4 PRG:0BF4 03 4C beq @InitializeMidPhase ; CPU:$CBF6 PRG:0BF6 99 CC @@ -3518,14 +3518,14 @@ GameModeState02: lda #$58 ; CPU:$CC07 PRG:0C07 26 85 sta ghost3Motion ; CPU:$CC09 PRG:0C09 20 A9 - sta $20 ; CPU:$CC0B PRG:0C0B 68 85 + sta Zp20 ; CPU:$CC0B PRG:0C0B 68 85 lda #$68 ; CPU:$CC0D PRG:0C0D 2A A9 sta ghost4Motion ; CPU:$CC0F PRG:0C0F 70 85 lda #$70 ; CPU:$CC11 PRG:0C11 24 85 - sta $24 ; CPU:$CC13 PRG:0C13 28 85 - sta $28 ; CPU:$CC15 PRG:0C15 2C A9 + sta Zp24 ; CPU:$CC13 PRG:0C13 28 85 + sta Zp28 ; CPU:$CC15 PRG:0C15 2C A9 sta $2C ; CPU:$CC17 PRG:0C17 00 A8 lda #$00 ; CPU:$CC19 PRG:0C19 99 78 @@ -3576,7 +3576,7 @@ GameModeState02: lda $00 ; CPU:$CC5B PRG:0C5B A5 01 sta $0250 ; CPU:$CC5D PRG:0C5D 18 69 20 - lda $01 ; CPU:$CC60 PRG:0C60 8D 51 + lda WorkPtrLo ; CPU:$CC60 PRG:0C60 8D 51 clc ; CPU:$CC62 PRG:0C62 02 adc #$20 ; CPU:$CC63 PRG:0C63 A9 2D sta $0251 ; CPU:$CC65 PRG:0C65 8D 52 02 @@ -3603,7 +3603,7 @@ GameModeState02: bne @AdvanceMainState ; CPU:$CC8B PRG:0C8B 69 A8 lda #$00 ; CPU:$CC8D PRG:0C8D 99 60 - sta $69 ; CPU:$CC8F PRG:0C8F 07 C8 + sta Player2YPosition ; CPU:$CC8F PRG:0C8F 07 C8 tay ; CPU:$CC91 PRG:0C91 C0 @ClearPage07Region: @@ -3779,11 +3779,11 @@ GameModeState06: @FindStateEntry: inx ; CPU:$CCED PRG:0CED E8 inx ; CPU:$CCEE PRG:0CEE E8 - cmp $B8,x ; CPU:$CCEF PRG:0CEF D5 B8 + cmp RacketTargetX,x ; CPU:$CCEF PRG:0CEF D5 B8 bne @FindStateEntry ; CPU:$CCF1 PRG:0CF1 D0 FA lda #$06 ; CPU:$CCF3 PRG:0CF3 A9 06 - sta $B8,x ; CPU:$CCF5 PRG:0CF5 95 B8 + sta RacketTargetX,x ; CPU:$CCF5 PRG:0CF5 95 B8 @RunFrameUpdates: jsr UpdatePeriodicFourEntryState ; CPU:$CCF7 PRG:0CF7 20 5E DE @@ -3820,13 +3820,13 @@ GameModeState06: ;============================================================================== GameModeState08: - lda $87 ; CPU:$CD06 PRG:0D06 A5 87 + lda PlayerFacingDirection ; CPU:$CD06 PRG:0D06 A5 87 bne @ActivePhase ; CPU:$CD08 PRG:0D08 D0 23 dec $DB ; CPU:$CD0A PRG:0D0A C6 DB bne @InitialFrameUpdates ; CPU:$CD0C PRG:0D0C D0 13 - inc $87 ; CPU:$CD0E PRG:0D0E E6 87 + inc PlayerFacingDirection ; CPU:$CD0E PRG:0D0E E6 87 lda #$0A ; CPU:$CD10 PRG:0D10 A9 0A sta $DB ; CPU:$CD12 PRG:0D12 85 DB @@ -3877,8 +3877,8 @@ GameModeState08: bne @ContinuePlayerHandling ; CPU:$CD4F PRG:0D4F D0 0D lda #$00 ; CPU:$CD51 PRG:0D51 A9 00 - sta $87 ; CPU:$CD53 PRG:0D53 85 87 - sta $69 ; CPU:$CD55 PRG:0D55 85 69 + sta PlayerFacingDirection ; CPU:$CD53 PRG:0D53 85 87 + sta Player2YPosition ; CPU:$CD55 PRG:0D55 85 69 lda #$0A ; CPU:$CD57 PRG:0D57 A9 0A sta $3F ; CPU:$CD59 PRG:0D59 85 3F @@ -3890,9 +3890,9 @@ GameModeState08: sta $3F ; CPU:$CD60 PRG:0D60 85 3F lda #$01 ; CPU:$CD62 PRG:0D62 A9 01 - sta $69 ; CPU:$CD64 PRG:0D64 85 69 + sta Player2YPosition ; CPU:$CD64 PRG:0D64 85 69 - lda $47 ; CPU:$CD66 PRG:0D66 A5 47 + lda activePlayerFlag ; CPU:$CD66 PRG:0D66 A5 47 beq @CheckPrimaryBlock ; CPU:$CD68 PRG:0D68 F0 04 lda $77 ; CPU:$CD6A PRG:0D6A A5 77 @@ -3902,7 +3902,7 @@ GameModeState08: lda $67 ; CPU:$CD6E PRG:0D6E A5 67 bne $CDAD ; CPU:$CD70 PRG:0D70 D0 3B - sta $69 ; CPU:$CD72 PRG:0D72 85 69 + sta Player2YPosition ; CPU:$CD72 PRG:0D72 85 69 lda $46 ; CPU:$CD74 PRG:0D74 A5 46 beq @SinglePlayerRestart ; CPU:$CD76 PRG:0D76 F0 11 @@ -3995,7 +3995,7 @@ GameModeState08: ;============================================================================== GameModeState0C: - lda $87 ; CPU:$CDB0 PRG:0DB0 A5 87 + lda PlayerFacingDirection ; CPU:$CDB0 PRG:0DB0 A5 87 bne @TimedPhase ; CPU:$CDB2 PRG:0DB2 D0 11 ldx #$00 ; CPU:$CDB4 PRG:0DB4 A2 00 @@ -4006,7 +4006,7 @@ GameModeState0C: cpx #$14 ; CPU:$CDB9 PRG:0DB9 E0 14 bne @ClearLowRam ; CPU:$CDBB PRG:0DBB D0 F9 - inc $87 ; CPU:$CDBD PRG:0DBD E6 87 + inc PlayerFacingDirection ; CPU:$CDBD PRG:0DBD E6 87 lda #$01 ; CPU:$CDBF PRG:0DBF A9 01 sta $32 ; CPU:$CDC1 PRG:0DC1 85 32 @@ -4021,7 +4021,7 @@ GameModeState0C: ldx #$11 ; CPU:$CDCB PRG:0DCB A2 11 - lda $87 ; CPU:$CDCD PRG:0DCD A5 87 + lda PlayerFacingDirection ; CPU:$CDCD PRG:0DCD A5 87 and #$01 ; CPU:$CDCF PRG:0DCF 29 01 bne @SetPaletteValue ; CPU:$CDD1 PRG:0DD1 D0 02 @@ -4033,29 +4033,29 @@ GameModeState0C: lda #$0F ; CPU:$CDD8 PRG:0DD8 A9 0F sta $0299 ; CPU:$CDDA PRG:0DDA 8D 99 02 - inc $87 ; CPU:$CDDD PRG:0DDD E6 87 + inc PlayerFacingDirection ; CPU:$CDDD PRG:0DDD E6 87 lda #$10 ; CPU:$CDDF PRG:0DDF A9 10 - cmp $87 ; CPU:$CDE1 PRG:0DE1 C5 87 + cmp PlayerFacingDirection ; CPU:$CDE1 PRG:0DE1 C5 87 bne @RunFrameUpdates ; CPU:$CDE3 PRG:0DE3 D0 31 lda #$00 ; CPU:$CDE5 PRG:0DE5 A9 00 sta $1A ; CPU:$CDE7 PRG:0DE7 85 1A sta $1C ; CPU:$CDE9 PRG:0DE9 85 1C - sta $87 ; CPU:$CDEB PRG:0DEB 85 87 + sta PlayerFacingDirection ; CPU:$CDEB PRG:0DEB 85 87 lda $68 ; CPU:$CDED PRG:0DED A5 68 cmp #$01 ; CPU:$CDEF PRG:0DEF C9 01 beq @SelectState0E ; CPU:$CDF1 PRG:0DF1 F0 18 - inc $87 ; CPU:$CDF3 PRG:0DF3 E6 87 - inc $87 ; CPU:$CDF5 PRG:0DF5 E6 87 + inc PlayerFacingDirection ; CPU:$CDF3 PRG:0DF3 E6 87 + inc PlayerFacingDirection ; CPU:$CDF5 PRG:0DF5 E6 87 cmp #$04 ; CPU:$CDF7 PRG:0DF7 C9 04 beq @SelectState0E ; CPU:$CDF9 PRG:0DF9 F0 10 - inc $87 ; CPU:$CDFB PRG:0DFB E6 87 - inc $87 ; CPU:$CDFD PRG:0DFD E6 87 + inc PlayerFacingDirection ; CPU:$CDFB PRG:0DFB E6 87 + inc PlayerFacingDirection ; CPU:$CDFD PRG:0DFD E6 87 cmp #$08 ; CPU:$CDFF PRG:0DFF C9 08 beq @SelectState0E ; CPU:$CE01 PRG:0E01 F0 08 @@ -4129,7 +4129,7 @@ GameModeState0C: ;============================================================================== GameModeState0A: - lda $87 ; CPU:$CE1F PRG:0E1F A5 87 + lda PlayerFacingDirection ; CPU:$CE1F PRG:0E1F A5 87 beq @Initialize ; CPU:$CE21 PRG:0E21 F0 03 jmp $CEAA ; CPU:$CE23 PRG:0E23 4C AA CE @@ -4149,7 +4149,7 @@ GameModeState0A: sta $00 ; CPU:$CE34 PRG:0E34 85 00 lda #$07 ; CPU:$CE36 PRG:0E36 A9 07 - sta $01 ; CPU:$CE38 PRG:0E38 85 01 + sta WorkPtrLo ; CPU:$CE38 PRG:0E38 85 01 lda #$03 ; CPU:$CE3A PRG:0E3A A9 03 sta $04 ; CPU:$CE3C PRG:0E3C 85 04 @@ -4157,7 +4157,7 @@ GameModeState0A: ldy #$00 ; CPU:$CE3E PRG:0E3E A0 00 sty $05 ; CPU:$CE40 PRG:0E40 84 05 sty $06 ; CPU:$CE42 PRG:0E42 84 06 - sty $07 ; CPU:$CE44 PRG:0E44 84 07 + sty workValue3 ; CPU:$CE44 PRG:0E44 84 07 @BuildOuterLoop: ldx $06 ; CPU:$CE46 PRG:0E46 A6 06 @@ -4166,16 +4166,16 @@ GameModeState0A: sta $02 ; CPU:$CE4B PRG:0E4B 85 02 lda State0AParameterPairs+1,x ; CPU:$CE4D PRG:0E4D BD E8 CE - sta $03 ; CPU:$CE50 PRG:0E50 85 03 + sta Zp03 ; CPU:$CE50 PRG:0E50 85 03 - ldx $07 ; CPU:$CE52 PRG:0E52 A6 07 + ldx workValue3 ; CPU:$CE52 PRG:0E52 A6 07 lda State0AEntryCounts,x ; CPU:$CE54 PRG:0E54 BD EF CE - sta $08 ; CPU:$CE57 PRG:0E57 85 08 + sta workValue4 ; CPU:$CE57 PRG:0E57 85 08 @BuildInnerLoop: - lda $03 ; CPU:$CE59 PRG:0E59 A5 03 + lda Zp03 ; CPU:$CE59 PRG:0E59 A5 03 sta ($00),y ; CPU:$CE5B PRG:0E5B 91 00 ldx $05 ; CPU:$CE5D PRG:0E5D A6 05 @@ -4200,15 +4200,15 @@ GameModeState0A: iny ; CPU:$CE77 PRG:0E77 C8 inc $05 ; CPU:$CE78 PRG:0E78 E6 05 - dec $08 ; CPU:$CE7A PRG:0E7A C6 08 + dec workValue4 ; CPU:$CE7A PRG:0E7A C6 08 bne @BuildInnerLoop ; CPU:$CE7C PRG:0E7C D0 DB inc $06 ; CPU:$CE7E PRG:0E7E E6 06 inc $06 ; CPU:$CE80 PRG:0E80 E6 06 - inc $07 ; CPU:$CE82 PRG:0E82 E6 07 + inc workValue3 ; CPU:$CE82 PRG:0E82 E6 07 - lda $47 ; CPU:$CE84 PRG:0E84 A5 47 + lda activePlayerFlag ; CPU:$CE84 PRG:0E84 A5 47 beq @ContinueOuterPass ; CPU:$CE86 PRG:0E86 F0 0A lda $77 ; CPU:$CE88 PRG:0E88 A5 77 @@ -4228,7 +4228,7 @@ GameModeState0A: @CheckPlayerMode: - lda $47 ; CPU:$CE9A PRG:0E9A A5 47 + lda activePlayerFlag ; CPU:$CE9A PRG:0E9A A5 47 beq @FinishInitialization ; CPU:$CE9C PRG:0E9C F0 0C lda $46 ; CPU:$CE9E PRG:0E9E A5 46 @@ -4244,7 +4244,7 @@ GameModeState0A: @FinishInitialization: - inc $87 ; CPU:$CEAA PRG:0EAA E6 87 + inc PlayerFacingDirection ; CPU:$CEAA PRG:0EAA E6 87 bne @ReturnToFrameLoop ; CPU:$CEAC PRG:0EAC D0 0E @@ -4343,10 +4343,10 @@ State0AEntryCounts: GameModeState00: lda #$01 ; CPU:$CEF3 PRG:0EF3 A9 01 - sta $40 ; CPU:$CEF5 PRG:0EF5 85 40 + sta Zp40 ; CPU:$CEF5 PRG:0EF5 85 40 @WaitForNmi: - lda $40 ; CPU:$CEF7 PRG:0EF7 A5 40 + lda Zp40 ; CPU:$CEF7 PRG:0EF7 A5 40 bne @WaitForNmi ; CPU:$CEF9 PRG:0EF9 D0 FC lda #$08 ; CPU:$CEFB PRG:0EFB A9 08 @@ -4359,7 +4359,7 @@ GameModeState00: ldx #$00 ; CPU:$CF07 PRG:0F07 A2 00 @ClearWorkingRam: - sta $87,x ; CPU:$CF09 PRG:0F09 95 87 + sta PlayerFacingDirection,x ; CPU:$CF09 PRG:0F09 95 87 inx ; CPU:$CF0B PRG:0F0B E8 cpx #$69 ; CPU:$CF0C PRG:0F0C E0 69 bne @ClearWorkingRam ; CPU:$CF0E PRG:0F0E D0 F9 @@ -4383,16 +4383,16 @@ GameModeState00: lda #$02 ; CPU:$CF24 PRG:0F24 A9 02 sta $3F ; CPU:$CF26 PRG:0F26 85 3F - lda $69 ; CPU:$CF28 PRG:0F28 A5 69 + lda Player2YPosition ; CPU:$CF28 PRG:0F28 A5 69 bne $CF4A ; CPU:$CF2A PRG:0F2A D0 1E - sta $8B ; CPU:$CF2C PRG:0F2C 85 8B + sta PlayerPreviousY ; CPU:$CF2C PRG:0F2C 85 8B lda #$01 ; CPU:$CF2E PRG:0F2E A9 01 sta $6C ; CPU:$CF30 PRG:0F30 85 6C - sta $6D ; CPU:$CF32 PRG:0F32 85 6D - sta $6E ; CPU:$CF34 PRG:0F34 85 6E - sta $6F ; CPU:$CF36 PRG:0F36 85 6F + sta BallYSubpixel ; CPU:$CF32 PRG:0F32 85 6D + sta BallYPosition ; CPU:$CF34 PRG:0F34 85 6E + sta BallHeight ; CPU:$CF36 PRG:0F36 85 6F lda #$C0 ; CPU:$CF38 PRG:0F38 A9 C0 sta $6A ; CPU:$CF3A PRG:0F3A 85 6A @@ -4449,7 +4449,7 @@ GameModeState00: @CopyGameParameters: lda $EC40,y ; CPU:$CF79 PRG:0F79 B9 40 EC - sta $9F,x ; CPU:$CF7C PRG:0F7C 95 9F + sta ProjectedYLo,x ; CPU:$CF7C PRG:0F7C 95 9F inx ; CPU:$CF7E PRG:0F7E E8 iny ; CPU:$CF7F PRG:0F7F C8 cpx #$16 ; CPU:$CF80 PRG:0F80 E0 16 @@ -4468,11 +4468,11 @@ GameModeState00: ; Save the first selected table value separately. lda $ECAE,x ; CPU:$CF91 PRG:0F91 BD AE EC - sta $CF ; CPU:$CF94 PRG:0F94 85 CF + sta PreviousPlayerState ; CPU:$CF94 PRG:0F94 85 CF @CopyTableECae: lda $ECAE,x ; CPU:$CF96 PRG:0F96 BD AE EC - sta $0097,y ; CPU:$CF99 PRG:0F99 99 97 00 + sta a:MathCarryByte,y ; CPU:$CF99 PRG:0F99 99 97 00 inx ; CPU:$CF9C PRG:0F9C E8 iny ; CPU:$CF9D PRG:0F9D C8 @@ -4483,7 +4483,7 @@ GameModeState00: ldx $00 ; CPU:$CFA4 PRG:0FA4 A6 00 lda $EBB6,x ; CPU:$CFA6 PRG:0FA6 BD B6 EB - sta $8C ; CPU:$CFA9 PRG:0FA9 85 8C + sta PlayerMovementFlags ; CPU:$CFA9 PRG:0FA9 85 8C inc $00 ; CPU:$CFAB PRG:0FAB E6 00 @@ -4493,21 +4493,21 @@ GameModeState00: tax ; CPU:$CFB3 PRG:0FB3 AA lda $ECCE,x ; CPU:$CFB4 PRG:0FB4 BD CE EC - sta $8D ; CPU:$CFB7 PRG:0FB7 85 8D + sta BallTrajectoryFlags ; CPU:$CFB7 PRG:0FB7 85 8D inx ; CPU:$CFB9 PRG:0FB9 E8 lda $ECCE,x ; CPU:$CFBA PRG:0FBA BD CE EC - sta $8E ; CPU:$CFBD PRG:0FBD 85 8E + sta BallCollisionFlags ; CPU:$CFBD PRG:0FBD 85 8E inc $00 ; CPU:$CFBF PRG:0FBF E6 00 - lda $69 ; CPU:$CFC1 PRG:0FC1 A5 69 + lda Player2YPosition ; CPU:$CFC1 PRG:0FC1 A5 69 beq @UseAlternateData ; CPU:$CFC3 PRG:0FC3 F0 24 ldx #$0C ; CPU:$CFC5 PRG:0FC5 A2 0C ldy #$00 ; CPU:$CFC7 PRG:0FC7 A0 00 lda $ECDC,x ; CPU:$CFC9 PRG:0FC9 BD DC EC - sta $008F,y ; CPU:$CFCC PRG:0FCC 99 8F 00 + sta a:BallContactState,y ; CPU:$CFCC PRG:0FCC 99 8F 00 iny ; CPU:$CFCF PRG:0FCF C8 inx ; CPU:$CFD0 PRG:0FD0 E8 @@ -4515,13 +4515,13 @@ GameModeState00: lda #$C0 ; CPU:$CFD1 PRG:0FD1 A9 C0 sec ; CPU:$CFD3 PRG:0FD3 38 sbc $6A ; CPU:$CFD4 PRG:0FD4 E5 6A - sta $01 ; CPU:$CFD6 PRG:0FD6 85 01 + sta WorkPtrLo ; CPU:$CFD6 PRG:0FD6 85 01 @CopyOffsetData: - lda $01 ; CPU:$CFD8 PRG:0FD8 A5 01 + lda WorkPtrLo ; CPU:$CFD8 PRG:0FD8 A5 01 clc ; CPU:$CFDA PRG:0FDA 18 adc $ECDC,x ; CPU:$CFDB PRG:0FDB 7D DC EC - sta $008F,y ; CPU:$CFDE PRG:0FDE 99 8F 00 + sta a:BallContactState,y ; CPU:$CFDE PRG:0FDE 99 8F 00 iny ; CPU:$CFE1 PRG:0FE1 C8 inx ; CPU:$CFE2 PRG:0FE2 E8 @@ -4543,7 +4543,7 @@ GameModeState00: @CopyAlternateData: lda $ECDC,x ; CPU:$CFF3 PRG:0FF3 BD DC EC - sta $008F,y ; CPU:$CFF6 PRG:0FF6 99 8F 00 + sta a:BallContactState,y ; CPU:$CFF6 PRG:0FF6 99 8F 00 inx ; CPU:$CFF9 PRG:0FF9 E8 iny ; CPU:$CFFA PRG:0FFA C8 @@ -4553,25 +4553,25 @@ GameModeState00: @InitializeArray: lda #$04 ; CPU:$CFFF PRG:0FFF A9 04 - sta $B8 ; CPU:$D001 PRG:1001 85 B8 + sta RacketTargetX ; CPU:$D001 PRG:1001 85 B8 lda #$01 ; CPU:$D003 PRG:1003 A9 01 - sta $B9 ; CPU:$D005 PRG:1005 85 B9 + sta RacketTargetY ; CPU:$D005 PRG:1005 85 B9 - lda $8F ; CPU:$D007 PRG:1007 A5 8F - sta $01 ; CPU:$D009 PRG:1009 85 01 + lda BallContactState ; CPU:$D007 PRG:1007 A5 8F + sta WorkPtrLo ; CPU:$D009 PRG:1009 85 01 ldx #$00 ; CPU:$D00B PRG:100B A2 00 @InitializeArrayLoop: - dec $01 ; CPU:$D00D PRG:100D C6 01 + dec WorkPtrLo ; CPU:$D00D PRG:100D C6 01 beq @InitializeArrayTail ; CPU:$D00F PRG:100F F0 0C lda #$02 ; CPU:$D011 PRG:1011 A9 02 - sta $BA,x ; CPU:$D013 PRG:1013 95 BA + sta RacketContactFlags,x ; CPU:$D013 PRG:1013 95 BA lda #$00 ; CPU:$D015 PRG:1015 A9 00 - sta $BB,x ; CPU:$D017 PRG:1017 95 BB + sta RacketAimOffset,x ; CPU:$D017 PRG:1017 95 BB inx ; CPU:$D019 PRG:1019 E8 inx ; CPU:$D01A PRG:101A E8 @@ -4585,8 +4585,8 @@ GameModeState00: cpx #$06 ; CPU:$D01F PRG:101F E0 06 beq @ContinueFinalSetup ; CPU:$D021 PRG:1021 F0 08 - sta $BA,x ; CPU:$D023 PRG:1023 95 BA - sta $BB,x ; CPU:$D025 PRG:1025 95 BB + sta RacketContactFlags,x ; CPU:$D023 PRG:1023 95 BA + sta RacketAimOffset,x ; CPU:$D025 PRG:1025 95 BB inx ; CPU:$D027 PRG:1027 E8 inx ; CPU:$D028 PRG:1028 E8 @@ -4609,23 +4609,23 @@ GameModeState00: lda $EBB6,x ; CPU:$D03C PRG:103C BD B6 EB sta $96 ; CPU:$D03F PRG:103F 85 96 - lda $A5 ; CPU:$D041 PRG:1041 A5 A5 - sta $B5 ; CPU:$D043 PRG:1043 85 B5 + lda AimMagnitude ; CPU:$D041 PRG:1041 A5 A5 + sta PoseSequenceOffset ; CPU:$D043 PRG:1043 85 B5 - lda $A6 ; CPU:$D045 PRG:1045 A5 A6 - sta $B6 ; CPU:$D047 PRG:1047 85 B6 + lda AimDirection ; CPU:$D045 PRG:1045 A5 A6 + sta PlayerPoseId ; CPU:$D047 PRG:1047 85 B6 lda $AF ; CPU:$D049 PRG:1049 A5 AF - sta $C4 ; CPU:$D04B PRG:104B 85 C4 - sta $C6 ; CPU:$D04D PRG:104D 85 C6 - sta $C8 ; CPU:$D04F PRG:104F 85 C8 - sta $CA ; CPU:$D051 PRG:1051 85 CA + sta PlayerActionDelay ; CPU:$D04B PRG:104B 85 C4 + sta BallAnimationTimer ; CPU:$D04D PRG:104D 85 C6 + sta ObjectAnimationState ; CPU:$D04F PRG:104F 85 C8 + sta RacketContactState ; CPU:$D051 PRG:1051 85 CA - lda $B0 ; CPU:$D053 PRG:1053 A5 B0 - sta $C5 ; CPU:$D055 PRG:1055 85 C5 - sta $C7 ; CPU:$D057 PRG:1057 85 C7 - sta $C9 ; CPU:$D059 PRG:1059 85 C9 - sta $CB ; CPU:$D05B PRG:105B 85 CB + lda AnimationFrame ; CPU:$D053 PRG:1053 A5 B0 + sta NetAnimationTimer ; CPU:$D055 PRG:1055 85 C5 + sta UmpireAnimationTimer ; CPU:$D057 PRG:1057 85 C7 + sta ObjectAnimationFrame ; CPU:$D059 PRG:1059 85 C9 + sta BallContactTimer ; CPU:$D05B PRG:105B 85 CB lda #$01 ; CPU:$D05D PRG:105D A9 01 sta $50 ; CPU:$D05F PRG:105F 85 50 @@ -4635,7 +4635,7 @@ GameModeState00: ldx #$00 ; CPU:$D065 PRG:1065 A2 00 lda $46 ; CPU:$D067 PRG:1067 A5 46 - and $47 ; CPU:$D069 PRG:1069 25 47 + and activePlayerFlag ; CPU:$D069 PRG:1069 25 47 beq @CopyDisplayInit ; CPU:$D06B PRG:106B F0 02 ldy #$09 ; CPU:$D06D PRG:106D A0 09 @@ -4673,10 +4673,10 @@ GameModeState00: cpy #$04 ; CPU:$D097 PRG:1097 C0 04 bne @NormalizeValues ; CPU:$D099 PRG:1099 D0 EF - sty $C0 ; CPU:$D09B PRG:109B 84 C0 + sty RallyFlags ; CPU:$D09B PRG:109B 84 C0 lda #$FF ; CPU:$D09D PRG:109D A9 FF - sta $89 ; CPU:$D09F PRG:109F 85 89 + sta PlayerYPosition ; CPU:$D09F PRG:109F 85 89 lda #$88 ; CPU:$D0A1 PRG:10A1 A9 88 sta PPUCTRL ; CPU:$D0A3 PRG:10A3 8D 00 20 @@ -4718,7 +4718,7 @@ InitializeGameNametableRegion: ldy #$22 ; CPU:$D0AB PRG:10AB A0 22 lda $46 ; CPU:$D0AD PRG:10AD A5 46 - and $47 ; CPU:$D0AF PRG:10AF 25 47 + and activePlayerFlag ; CPU:$D0AF PRG:10AF 25 47 beq @SetDestination ; CPU:$D0B1 PRG:10B1 F0 02 ldy #$2A ; CPU:$D0B3 PRG:10B3 A0 2A @@ -4727,7 +4727,7 @@ InitializeGameNametableRegion: sty $00 ; CPU:$D0B5 PRG:10B5 84 00 lda #$56 ; CPU:$D0B7 PRG:10B7 A9 56 - sta $01 ; CPU:$D0B9 PRG:10B9 85 01 + sta WorkPtrLo ; CPU:$D0B9 PRG:10B9 85 01 lda #$0A ; CPU:$D0BB PRG:10BB A9 0A sta $02 ; CPU:$D0BD PRG:10BD 85 02 @@ -4738,18 +4738,18 @@ InitializeGameNametableRegion: lda $00 ; CPU:$D0C2 PRG:10C2 A5 00 sta PPUADDR ; CPU:$D0C4 PRG:10C4 8D 06 20 - lda $01 ; CPU:$D0C7 PRG:10C7 A5 01 + lda WorkPtrLo ; CPU:$D0C7 PRG:10C7 A5 01 sta PPUADDR ; CPU:$D0C9 PRG:10C9 8D 06 20 lda #$06 ; CPU:$D0CC PRG:10CC A9 06 - sta $03 ; CPU:$D0CE PRG:10CE 85 03 + sta Zp03 ; CPU:$D0CE PRG:10CE 85 03 lda #$20 ; CPU:$D0D0 PRG:10D0 A9 20 @WriteInterior: sta PPUDATA ; CPU:$D0D2 PRG:10D2 8D 07 20 - dec $03 ; CPU:$D0D5 PRG:10D5 C6 03 + dec Zp03 ; CPU:$D0D5 PRG:10D5 C6 03 bne @WriteInterior ; CPU:$D0D7 PRG:10D7 D0 F9 lda #$2D ; CPU:$D0D9 PRG:10D9 A9 2D @@ -4757,10 +4757,10 @@ InitializeGameNametableRegion: sta PPUDATA ; CPU:$D0DE PRG:10DE 8D 07 20 ; Advance the destination by one full nametable row ($20 bytes). - lda $01 ; CPU:$D0E1 PRG:10E1 A5 01 + lda WorkPtrLo ; CPU:$D0E1 PRG:10E1 A5 01 clc ; CPU:$D0E3 PRG:10E3 18 adc #$20 ; CPU:$D0E4 PRG:10E4 69 20 - sta $01 ; CPU:$D0E6 PRG:10E6 85 01 + sta WorkPtrLo ; CPU:$D0E6 PRG:10E6 85 01 lda $00 ; CPU:$D0E8 PRG:10E8 A5 00 adc #$00 ; CPU:$D0EA PRG:10EA 69 00 @@ -5000,22 +5000,22 @@ GameplayAttributeData: ;============================================================================== UpdateGameplayTimers: - lda $89 ; CPU:$D1A0 PRG:11A0 A5 89 + lda PlayerYPosition ; CPU:$D1A0 PRG:11A0 A5 89 bmi @D1E1 ; CPU:$D1A2 PRG:11A2 30 3C - inc $8A ; CPU:$D1A4 PRG:11A4 E6 8A + inc PlayerPreviousX ; CPU:$D1A4 PRG:11A4 E6 8A lda #$3C ; CPU:$D1A6 PRG:11A6 A9 3C - cmp $8A ; CPU:$D1A8 PRG:11A8 C5 8A + cmp PlayerPreviousX ; CPU:$D1A8 PRG:11A8 C5 8A bne @D1C9 ; CPU:$D1AA PRG:11AA D0 1C lda #$00 ; CPU:$D1AC PRG:11AC A9 00 - sta $8A ; CPU:$D1AE PRG:11AE 85 8A + sta PlayerPreviousX ; CPU:$D1AE PRG:11AE 85 8A - dec $89 ; CPU:$D1B0 PRG:11B0 C6 89 + dec PlayerYPosition ; CPU:$D1B0 PRG:11B0 C6 89 bpl @D1C9 ; CPU:$D1B2 PRG:11B2 10 14 - sta $88 ; CPU:$D1B4 PRG:11B4 85 88 + sta PlayerXPosition ; CPU:$D1B4 PRG:11B4 85 88 ldx #$00 ; CPU:$D1B6 PRG:11B6 A2 00 @@ -5033,13 +5033,13 @@ UpdateGameplayTimers: bne @D1B7 ; CPU:$D1C6 PRG:11C6 D0 F0 @D1C9: - lda $89 ; CPU:$D1C8 PRG:11C8 A5 89 + lda PlayerYPosition ; CPU:$D1C8 PRG:11C8 A5 89 cmp #$02 ; CPU:$D1CA PRG:11CA C9 02 bcs @D1E1 ; CPU:$D1CC PRG:11CC B0 12 ldx #$11 ; CPU:$D1CE PRG:11CE A2 11 - lda $8A ; CPU:$D1D0 PRG:11D0 A5 8A + lda PlayerPreviousX ; CPU:$D1D0 PRG:11D0 A5 8A and #$08 ; CPU:$D1D2 PRG:11D2 29 08 bne @D1D9 ; CPU:$D1D4 PRG:11D4 D0 02 @@ -5053,10 +5053,10 @@ UpdateGameplayTimers: @D1E1: - lda $88 ; CPU:$D1E0 PRG:11E0 A5 88 + lda PlayerXPosition ; CPU:$D1E0 PRG:11E0 A5 88 bne @D213 ; CPU:$D1E2 PRG:11E2 D0 2F - lda $CF ; CPU:$D1E4 PRG:11E4 A5 CF + lda PreviousPlayerState ; CPU:$D1E4 PRG:11E4 A5 CF cmp #$FF ; CPU:$D1E6 PRG:11E6 C9 FF beq @D213 ; CPU:$D1E8 PRG:11E8 F0 29 @@ -5069,7 +5069,7 @@ UpdateGameplayTimers: lda #$00 ; CPU:$D1F2 PRG:11F2 A9 00 sta $D1 ; CPU:$D1F4 PRG:11F4 85 D1 - dec $CF ; CPU:$D1F6 PRG:11F6 C6 CF + dec PreviousPlayerState ; CPU:$D1F6 PRG:11F6 C6 CF bpl @D213 ; CPU:$D1F8 PRG:11F8 10 19 inc $D0 ; CPU:$D1FA PRG:11FA E6 D0 @@ -5087,11 +5087,11 @@ UpdateGameplayTimers: lda $D2 ; CPU:$D209 PRG:1209 A5 D2 @D20B: - sta $87 ; CPU:$D20B PRG:120B 85 87 + sta PlayerFacingDirection ; CPU:$D20B PRG:120B 85 87 ldx $D0 ; CPU:$D20D PRG:120D A6 D0 - lda $97,x ; CPU:$D20F PRG:120F B5 97 - sta $CF ; CPU:$D211 PRG:1211 85 CF + lda MathCarryByte,x ; CPU:$D20F PRG:120F B5 97 + sta PreviousPlayerState ; CPU:$D211 PRG:1211 85 CF @D213: @@ -5109,11 +5109,11 @@ UpdateGameplayTimers: ldx #$00 ; CPU:$D223 PRG:1223 A2 00 @D225: - cmp $8F,x ; CPU:$D225 PRG:1225 D5 8F + cmp BallContactState,x ; CPU:$D225 PRG:1225 D5 8F bne @D231 ; CPU:$D227 PRG:1227 D0 08 inx ; CPU:$D229 PRG:1229 E8 - lda $8F,x ; CPU:$D22A PRG:122A B5 8F + lda BallContactState,x ; CPU:$D22A PRG:122A B5 8F sta $D3 ; CPU:$D22C PRG:122C 85 D3 jmp @D236 ; CPU:$D22E PRG:122E 4C 36 D2 @@ -5152,7 +5152,7 @@ UpdateGameplayTimers: cpx #$02 ; CPU:$D253 PRG:1253 E0 02 beq @D26E ; CPU:$D255 PRG:1255 F0 17 - lda $8D,x ; CPU:$D257 PRG:1257 B5 8D + lda BallTrajectoryFlags,x ; CPU:$D257 PRG:1257 B5 8D cmp $6A ; CPU:$D259 PRG:1259 C5 6A bne @D26E ; CPU:$D25B PRG:125B D0 11 @@ -5165,11 +5165,11 @@ UpdateGameplayTimers: asl ; CPU:$D264 PRG:1264 0A tax ; CPU:$D265 PRG:1265 AA - lda $AB,x ; CPU:$D266 PRG:1266 B5 AB - sta $CA ; CPU:$D268 PRG:1268 85 CA + lda ActiveObjectIndex,x ; CPU:$D266 PRG:1266 B5 AB + sta RacketContactState ; CPU:$D268 PRG:1268 85 CA lda $AC,x ; CPU:$D26A PRG:126A B5 AC - sta $CB ; CPU:$D26C PRG:126C 85 CB + sta BallContactTimer ; CPU:$D26C PRG:126C 85 CB @D26E: @@ -5192,9 +5192,9 @@ UpdateGameplayTimers: @D283: - sta $2E ; CPU:$D283 PRG:1283 85 2E + sta pacmanTargetRow ; CPU:$D283 PRG:1283 85 2E sta $30 ; CPU:$D285 PRG:1285 85 30 - sta $8B ; CPU:$D287 PRG:1287 85 8B + sta PlayerPreviousY ; CPU:$D287 PRG:1287 85 8B @D289: @@ -5227,11 +5227,11 @@ ActivateNextStateEntry: ldx #$00 ; CPU:$D28A PRG:128A A2 00 @FindAvailableEntry: - lda $BA,x ; CPU:$D28C PRG:128C B5 BA + lda RacketContactFlags,x ; CPU:$D28C PRG:128C B5 BA bne @NextEntry ; CPU:$D28E PRG:128E D0 05 lda #$02 ; CPU:$D290 PRG:1290 A9 02 - sta $BA,x ; CPU:$D292 PRG:1292 95 BA + sta RacketContactFlags,x ; CPU:$D292 PRG:1292 95 BA rts ; CPU:$D294 PRG:1294 60 @@ -5302,7 +5302,7 @@ CheckGameplayProximity: sta $00 ; CPU:$D2AB PRG:12AB 85 00 lda #$00 ; CPU:$D2AD PRG:12AD A9 00 - sta $01 ; CPU:$D2AF PRG:12AF 85 01 + sta WorkPtrLo ; CPU:$D2AF PRG:12AF 85 01 lda #$01 ; CPU:$D2B1 PRG:12B1 A9 01 sta $02 ; CPU:$D2B3 PRG:12B3 85 02 @@ -5310,7 +5310,7 @@ CheckGameplayProximity: ldx #$00 ; CPU:$D2B5 PRG:12B5 A2 00 @ScanEntries: - lda $B8,x ; CPU:$D2B7 PRG:12B7 B5 B8 + lda RacketTargetX,x ; CPU:$D2B7 PRG:12B7 B5 B8 cmp #$04 ; CPU:$D2B9 PRG:12B9 C9 04 bne @NextEntry ; CPU:$D2BB PRG:12BB D0 32 @@ -5332,7 +5332,7 @@ CheckGameplayProximity: cmp #$0A ; CPU:$D2CE PRG:12CE C9 0A bcs @NextEntry ; CPU:$D2D0 PRG:12D0 B0 1D - sta $03 ; CPU:$D2D2 PRG:12D2 85 03 + sta Zp03 ; CPU:$D2D2 PRG:12D2 85 03 ldy #$02 ; CPU:$D2D4 PRG:12D4 A0 02 @@ -5352,7 +5352,7 @@ CheckGameplayProximity: cmp #$0A ; CPU:$D2E5 PRG:12E5 C9 0A bcs @NextEntry ; CPU:$D2E7 PRG:12E7 B0 06 - adc $03 ; CPU:$D2E9 PRG:12E9 65 03 + adc Zp03 ; CPU:$D2E9 PRG:12E9 65 03 cmp #$05 ; CPU:$D2EB PRG:12EB C9 05 bcc @CandidateFound ; CPU:$D2ED PRG:12ED 90 10 @@ -5379,18 +5379,18 @@ CheckGameplayProximity: beq @ProcessSecondaryState ; CPU:$D300 PRG:1300 08 F0 lda $02 ; CPU:$D302 PRG:1302 45 A5 - and $88 ; CPU:$D304 PRG:1304 02 25 + and PlayerXPosition ; CPU:$D304 PRG:1304 02 25 beq @SpecialCandidate ; CPU:$D306 PRG:1306 88 F0 txa ; CPU:$D308 PRG:1308 2E lsr ; CPU:$D309 PRG:1309 8A - sta $03 ; CPU:$D30A PRG:130A 4A 85 + sta Zp03 ; CPU:$D30A PRG:130A 4A 85 ldy $D9 ; CPU:$D30C PRG:130C 03 A4 lda ProximityCandidateValues,y ; CPU:$D30E PRG:130E D9 B9 6C - ldy $03 ; CPU:$D311 PRG:1311 D3 A4 + ldy Zp03 ; CPU:$D311 PRG:1311 D3 A4 sta $0033,y ; CPU:$D313 PRG:1313 03 99 33 lda #$00 ; CPU:$D316 PRG:1316 00 A9 @@ -5407,7 +5407,7 @@ CheckGameplayProximity: inc $D9 ; CPU:$D326 PRG:1326 DE E6 lda #$08 ; CPU:$D328 PRG:1328 D9 A9 - sta $B8,x ; CPU:$D32A PRG:132A 08 95 + sta RacketTargetX,x ; CPU:$D32A PRG:132A 08 95 sta $0607 ; CPU:$D32C PRG:132C B8 8D 07 lda #$06 ; CPU:$D32F PRG:132F 06 A9 @@ -5431,7 +5431,7 @@ CheckGameplayProximity: sta $DB ; CPU:$D340 PRG:1340 80 85 lda #$00 ; CPU:$D342 PRG:1342 DB A9 - sta $87 ; CPU:$D344 PRG:1344 00 85 + sta PlayerFacingDirection ; CPU:$D344 PRG:1344 00 85 rts ; CPU:$D346 PRG:1346 87 @@ -5441,7 +5441,7 @@ CheckGameplayProximity: ;------------------------------------------------------------------------------ @ProcessSecondaryState: - lda $8B ; CPU:$D347 PRG:1347 60 A5 + lda PlayerPreviousY ; CPU:$D347 PRG:1347 60 A5 beq @InitializeSecondaryState ; CPU:$D349 PRG:1349 8B F0 rts ; CPU:$D34B PRG:134B 01 @@ -5455,7 +5455,7 @@ CheckGameplayProximity: lda #$80 ; CPU:$D34E PRG:134E D7 A9 sta $D8 ; CPU:$D350 PRG:1350 80 85 - sta $8B ; CPU:$D352 PRG:1352 D8 85 + sta PlayerPreviousY ; CPU:$D352 PRG:1352 D8 85 sta $0606 ; CPU:$D354 PRG:1354 8B 8D 06 ldy $93 ; CPU:$D357 PRG:1357 06 A4 @@ -5611,7 +5611,7 @@ UpdatePlayerMovement: @D3D6: ldx #$04 ; CPU:$D3D6 PRG:13D6 A2 04 - lda $88 ; CPU:$D3D8 PRG:13D8 A5 88 + lda PlayerXPosition ; CPU:$D3D8 PRG:13D8 A5 88 bne @D3DE ; CPU:$D3DA PRG:13DA D0 02 ldx #$0A ; CPU:$D3DC PRG:13DC A2 0A @@ -5638,11 +5638,11 @@ UpdatePlayerMovement: @D3F4: - lda $9F,x ; CPU:$D3F5 PRG:13F5 B5 9F - sta $B5 ; CPU:$D3F7 PRG:13F7 85 B5 + lda ProjectedYLo,x ; CPU:$D3F5 PRG:13F5 B5 9F + sta PoseSequenceOffset ; CPU:$D3F7 PRG:13F7 85 B5 - lda $A0,x ; CPU:$D3F9 PRG:13F9 B5 A0 - sta $B6 ; CPU:$D3FB PRG:13FB 85 B6 + lda ProjectedYHi,x ; CPU:$D3F9 PRG:13F9 B5 A0 + sta PlayerPoseId ; CPU:$D3FB PRG:13FB 85 B6 lda $51 ; CPU:$D3FD PRG:13FD A5 51 asl ; CPU:$D3FF PRG:13FF 0A @@ -5652,7 +5652,7 @@ UpdatePlayerMovement: sta $10 ; CPU:$D404 PRG:1404 85 10 lda MovementArithmeticTable+1,y ; CPU:$D406 PRG:1406 B9 0F D4 - sta $11 ; CPU:$D409 PRG:1409 85 11 + sta Zp11 ; CPU:$D409 PRG:1409 85 11 jmp ($0010) ; CPU:$D40B PRG:140B 6C 10 00 16 D4 @@ -5701,10 +5701,10 @@ MovementArithmeticD41A: ldx #$00 ; CPU:$D41A PRG:141A A2 00 MovementSubtract: - lda $1B,x ; CPU:$D41C PRG:141C B5 1B + lda Zp1B,x ; CPU:$D41C PRG:141C B5 1B sec ; CPU:$D41E PRG:141E 38 - sbc $B5 ; CPU:$D41F PRG:141F E5 B5 - sta $1B,x ; CPU:$D421 PRG:1421 95 1B + sbc PoseSequenceOffset ; CPU:$D41F PRG:141F E5 B5 + sta Zp1B,x ; CPU:$D421 PRG:1421 95 1B lda #$00 ; CPU:$D423 PRG:1423 A9 00 bcs MovementSubtractNoBorrow ; CPU:$D425 PRG:1425 B0 02 @@ -5713,8 +5713,8 @@ MovementSubtract: MovementSubtractNoBorrow: clc ; CPU:$D429 PRG:1429 18 - adc $B6 ; CPU:$D42A PRG:142A 65 B6 - sta $CC ; CPU:$D42C PRG:142C 85 CC + adc PlayerPoseId ; CPU:$D42A PRG:142A 65 B6 + sta BallContactFlags ; CPU:$D42C PRG:142C 85 CC jmp MovementApplyResult ; CPU:$D42E PRG:142E 4C 44 D4 @@ -5729,14 +5729,14 @@ MovementArithmeticD435: MovementAdd: - lda $1B,x ; CPU:$D437 PRG:1437 B5 1B + lda Zp1B,x ; CPU:$D437 PRG:1437 B5 1B clc ; CPU:$D439 PRG:1439 18 - adc $B5 ; CPU:$D43A PRG:143A 65 B5 - sta $1B,x ; CPU:$D43C PRG:143C 95 1B + adc PoseSequenceOffset ; CPU:$D43A PRG:143A 65 B5 + sta Zp1B,x ; CPU:$D43C PRG:143C 95 1B lda #$00 ; CPU:$D43E PRG:143E A9 00 - adc $B6 ; CPU:$D440 PRG:1440 65 B6 - sta $CC ; CPU:$D442 PRG:1442 85 CC + adc PlayerPoseId ; CPU:$D440 PRG:1440 65 B6 + sta BallContactFlags ; CPU:$D442 PRG:1442 85 CC ;============================================================================== ; $D444-$D459: Apply Movement Result and Dispatch Direction Handler @@ -5758,7 +5758,7 @@ MovementAdd: ;============================================================================== MovementApplyResult: - dec $CC ; CPU:$D444 PRG:1444 C6 CC + dec BallContactFlags ; CPU:$D444 PRG:1444 C6 CC bpl @D449 ; CPU:$D446 PRG:1446 10 01 rts ; CPU:$D448 PRG:1448 60 @@ -5773,7 +5773,7 @@ MovementApplyResult: sta $10 ; CPU:$D450 PRG:1450 85 10 lda MovementDirectionTable+1,y ; CPU:$D452 PRG:1452 B9 5B D4 - sta $11 ; CPU:$D455 PRG:1455 85 11 + sta Zp11 ; CPU:$D455 PRG:1455 85 11 jmp ($0010) ; CPU:$D457 PRG:1457 6C 10 00 9A D4 @@ -5830,7 +5830,7 @@ MovementDirectionD462: stx $00 ; CPU:$D464 PRG:1464 86 00 lda #$03 ; CPU:$D466 PRG:1466 A9 03 - sta $01 ; CPU:$D468 PRG:1468 85 01 + sta WorkPtrLo ; CPU:$D468 PRG:1468 85 01 bne MovementIncrement ; CPU:$D46A PRG:146A D0 06 @@ -5843,7 +5843,7 @@ MovementDirectionD462: MovementDirectionD46C: ldx #$02 ; CPU:$D46C PRG:146C A2 02 stx $00 ; CPU:$D46E PRG:146E 86 00 - stx $01 ; CPU:$D470 PRG:1470 86 01 + stx WorkPtrLo ; CPU:$D470 PRG:1470 86 01 ;------------------------------------------------------------------------------ @@ -5859,7 +5859,7 @@ MovementIncrement: and #$04 ; CPU:$D479 PRG:1479 29 04 bne MovementSharedTail ; CPU:$D47B PRG:147B D0 44 - ldx $01 ; CPU:$D47D PRG:147D A6 01 + ldx WorkPtrLo ; CPU:$D47D PRG:147D A6 01 lda $022B,x ; CPU:$D47F PRG:147F BD 2B 02 and #$F0 ; CPU:$D482 PRG:1482 29 F0 @@ -5884,7 +5884,7 @@ MovementDirectionD490: stx $00 ; CPU:$D492 PRG:1492 86 00 lda #$01 ; CPU:$D494 PRG:1494 A9 01 - sta $01 ; CPU:$D496 PRG:1496 85 01 + sta WorkPtrLo ; CPU:$D496 PRG:1496 85 01 bne MovementDecrement ; CPU:$D498 PRG:1498 D0 08 @@ -5899,7 +5899,7 @@ MovementDirectionD49A: stx $00 ; CPU:$D49C PRG:149C 86 00 lda #$00 ; CPU:$D49E PRG:149E A9 00 - sta $01 ; CPU:$D4A0 PRG:14A0 85 01 + sta WorkPtrLo ; CPU:$D4A0 PRG:14A0 85 01 ;------------------------------------------------------------------------------ @@ -5915,7 +5915,7 @@ MovementDecrement: and #$04 ; CPU:$D4A9 PRG:14A9 29 04 beq MovementSharedTail ; CPU:$D4AB PRG:14AB F0 14 - ldx $01 ; CPU:$D4AD PRG:14AD A6 01 + ldx WorkPtrLo ; CPU:$D4AD PRG:14AD A6 01 lda $022B,x ; CPU:$D4AF PRG:14AF BD 2B 02 and #$F0 ; CPU:$D4B2 PRG:14B2 29 F0 @@ -5943,16 +5943,16 @@ MovementSharedTail: cmp #$A9 ; CPU:$D4C7 PRG:14C7 C9 A9 bcs MovementCheckLeftWrap ; CPU:$D4C9 PRG:14C9 B0 06 - lda $38 ; CPU:$D4CB PRG:14CB A5 38 + lda GameActiveFlag ; CPU:$D4CB PRG:14CB A5 38 and #$DF ; CPU:$D4CD PRG:14CD 29 DF bcc MovementStoreWrapState ; CPU:$D4CF PRG:14CF 90 04 MovementCheckLeftWrap: lda #$20 ; CPU:$D4D1 PRG:14D1 A9 20 - ora $38 ; CPU:$D4D3 PRG:14D3 05 38 + ora GameActiveFlag ; CPU:$D4D3 PRG:14D3 05 38 MovementStoreWrapState: - sta $38 ; CPU:$D4D5 PRG:14D5 85 38 + sta GameActiveFlag ; CPU:$D4D5 PRG:14D5 85 38 lda $1A ; CPU:$D4D7 PRG:14D7 A5 1A cmp #$0B ; CPU:$D4D9 PRG:14D9 C9 0B @@ -5982,8 +5982,8 @@ MovementCheckAlignment: sta $51 ; CPU:$D4F9 PRG:14F9 85 51 - inc $CC ; CPU:$D4FB PRG:14FB E6 CC - inc $CC ; CPU:$D4FD PRG:14FD E6 CC + inc BallContactFlags ; CPU:$D4FB PRG:14FB E6 CC + inc BallContactFlags ; CPU:$D4FD PRG:14FD E6 CC MovementReturnToArithmetic: @@ -6134,13 +6134,13 @@ UpdateGameplayEntities: sta $00 ; CPU:$D55B PRG:155B 85 00 lda #$02 ; CPU:$D55D PRG:155D A9 02 - sta $01 ; CPU:$D55F PRG:155F 85 01 + sta WorkPtrLo ; CPU:$D55F PRG:155F 85 01 lda #$1E ; CPU:$D561 PRG:1561 A9 1E sta $02 ; CPU:$D563 PRG:1563 85 02 lda #$00 ; CPU:$D565 PRG:1565 A9 00 - sta $03 ; CPU:$D567 PRG:1567 85 03 + sta Zp03 ; CPU:$D567 PRG:1567 85 03 lda #$01 ; CPU:$D569 PRG:1569 A9 01 sta $04 ; CPU:$D56B PRG:156B 85 04 @@ -6194,13 +6194,13 @@ UpdateGameplayEntities: ;============================================================================== DispatchGameplayEntityState: - ldy $B8,x ; CPU:$D587 PRG:1587 B4 B8 + ldy RacketTargetX,x ; CPU:$D587 PRG:1587 B4 B8 lda EntityStateTable,y ; CPU:$D589 PRG:1589 B9 96 D5 sta $10 ; CPU:$D58C PRG:158C 85 10 lda EntityStateTable+1,y ; CPU:$D58E PRG:158E B9 97 D5 - sta $11 ; CPU:$D591 PRG:1591 85 11 + sta Zp11 ; CPU:$D591 PRG:1591 85 11 jmp ($0010) ; CPU:$D593 PRG:1593 6C 10 00 D5 D8 @@ -6269,7 +6269,7 @@ EntityState08: DispatchEntitySecondaryState: jsr $D821 ; CPU:$D5A1 PRG:15A1 20 21 D8 - lda $B9,x ; CPU:$D5A4 PRG:15A4 B5 B9 + lda RacketTargetY,x ; CPU:$D5A4 PRG:15A4 B5 B9 asl ; CPU:$D5A6 PRG:15A6 0A tay ; CPU:$D5A7 PRG:15A7 A8 @@ -6277,7 +6277,7 @@ DispatchEntitySecondaryState: sta $10 ; CPU:$D5AB PRG:15AB 85 10 lda EntitySecondaryStateTable+1,y ; CPU:$D5AD PRG:15AD B9 B6 D5 - sta $11 ; CPU:$D5B0 PRG:15B0 85 11 + sta Zp11 ; CPU:$D5B0 PRG:15B0 85 11 jmp ($0010) ; CPU:$D5B2 PRG:15B2 6C 10 00 D3 D5 @@ -6330,12 +6330,12 @@ EntitySecondaryState3: EntitySecondaryAdjust: lda ($02),y ; CPU:$D5C3 PRG:15C3 B1 02 clc ; CPU:$D5C5 PRG:15C5 18 - adc $C2,x ; CPU:$D5C6 PRG:15C6 75 C2 + adc CourtSide,x ; CPU:$D5C6 PRG:15C6 75 C2 sta ($02),y ; CPU:$D5C8 PRG:15C8 91 02 lda #$00 ; CPU:$D5CA PRG:15CA A9 00 - adc $C3,x ; CPU:$D5CC PRG:15CC 75 C3 - sta $CC ; CPU:$D5CE PRG:15CE 85 CC + adc SignedMovementDelta,x ; CPU:$D5CC PRG:15CC 75 C3 + sta BallContactFlags ; CPU:$D5CE PRG:15CE 85 CC jmp $D5EB ; CPU:$D5D0 PRG:15D0 4C EB D5 @@ -6374,7 +6374,7 @@ EntitySecondaryState1: EntitySecondarySubtract: lda ($02),y ; CPU:$D5D9 PRG:15D9 B1 02 sec ; CPU:$D5DB PRG:15DB 38 - sbc $C2,x ; CPU:$D5DC PRG:15DC F5 C2 + sbc CourtSide,x ; CPU:$D5DC PRG:15DC F5 C2 sta ($02),y ; CPU:$D5DE PRG:15DE 91 02 lda #$00 ; CPU:$D5E0 PRG:15E0 A9 00 @@ -6385,8 +6385,8 @@ EntitySecondarySubtract: EntitySecondarySubtractNoBorrow: clc ; CPU:$D5E6 PRG:15E6 18 - adc $C3,x ; CPU:$D5E7 PRG:15E7 75 C3 - sta $CC ; CPU:$D5E9 PRG:15E9 85 CC + adc SignedMovementDelta,x ; CPU:$D5E7 PRG:15E7 75 C3 + sta BallContactFlags ; CPU:$D5E9 PRG:15E9 85 CC ;============================================================================== @@ -6406,14 +6406,14 @@ EntitySecondarySubtractNoBorrow: ;============================================================================== EntitySecondaryApplyResult: - dec $CC ; CPU:$D5EB PRG:15EB C6 CC + dec BallContactFlags ; CPU:$D5EB PRG:15EB C6 CC bpl EntityDirectionDispatch ; CPU:$D5ED PRG:15ED 10 01 rts ; CPU:$D5EF PRG:15EF 60 EntityDirectionDispatch: - lda $B9,x ; CPU:$D5F0 PRG:15F0 B5 B9 + lda RacketTargetY,x ; CPU:$D5F0 PRG:15F0 B5 B9 asl ; CPU:$D5F2 PRG:15F2 0A tay ; CPU:$D5F3 PRG:15F3 A8 @@ -6421,7 +6421,7 @@ EntityDirectionDispatch: sta $10 ; CPU:$D5F7 PRG:15F7 85 10 lda EntityDirectionStateTable+1,y ; CPU:$D5F9 PRG:15F9 B9 02 D6 - sta $11 ; CPU:$D5FC PRG:15FC 85 11 + sta Zp11 ; CPU:$D5FC PRG:15FC 85 11 jmp ($0010) ; CPU:$D5FE PRG:15FE 6C 10 00 09 D6 @@ -6599,13 +6599,13 @@ EntityDirectionMove: bne $D69B ; CPU:$D67A PRG:167A C9 70 lda #$02 ; CPU:$D67C PRG:167C D0 1D - sta $B8,x ; CPU:$D67E PRG:167E A9 02 + sta RacketTargetX,x ; CPU:$D67E PRG:167E A9 02 lda #$00 ; CPU:$D680 PRG:1680 95 B8 clc ; CPU:$D682 PRG:1682 A9 sbc $04 ; CPU:$D683 PRG:1683 00 18 - and $88 ; CPU:$D685 PRG:1685 E5 04 - sta $88 ; CPU:$D687 PRG:1687 25 88 + and PlayerXPosition ; CPU:$D685 PRG:1685 E5 04 + sta PlayerXPosition ; CPU:$D687 PRG:1687 25 88 txa ; CPU:$D689 PRG:1689 85 lsr ; CPU:$D68A PRG:168A 88 @@ -6644,36 +6644,36 @@ EntityDirectionMove: ;============================================================================== EntityMovementContinuation: - lda $B8,x ; CPU:$D69B PRG:169B B5 B8 + lda RacketTargetX,x ; CPU:$D69B PRG:169B B5 B8 cmp #$06 ; CPU:$D69D PRG:169D C9 06 bne @CheckEntityMasks ; CPU:$D69F PRG:169F D0 0B lda #$60 ; CPU:$D6A1 PRG:16A1 A9 60 - sta $CD ; CPU:$D6A3 PRG:16A3 85 CD + sta PlayerMovementSpeed ; CPU:$D6A3 PRG:16A3 85 CD lda #$6F ; CPU:$D6A5 PRG:16A5 A9 6F - sta $CE ; CPU:$D6A7 PRG:16A7 85 CE + sta ComputerActionState ; CPU:$D6A7 PRG:16A7 85 CE jmp $D778 ; CPU:$D6A9 PRG:16A9 4C 78 D7 @CheckEntityMasks: lda $04 ; CPU:$D6AC PRG:16AC A5 04 - and $88 ; CPU:$D6AE PRG:16AE 25 88 + and PlayerXPosition ; CPU:$D6AE PRG:16AE 25 88 bne $D70A ; CPU:$D6B0 PRG:16B0 D0 58 lda $04 ; CPU:$D6B2 PRG:16B2 A5 04 - and $87 ; CPU:$D6B4 PRG:16B4 25 87 + and PlayerFacingDirection ; CPU:$D6B4 PRG:16B4 25 87 bne $D6CF ; CPU:$D6B6 PRG:16B6 D0 17 txa ; CPU:$D6B8 PRG:16B8 8A tay ; CPU:$D6B9 PRG:16B9 A8 lda EntityTargetTable,y ; CPU:$D6BA PRG:16BA B9 C7 D6 - sta $CD ; CPU:$D6BD PRG:16BD 85 CD + sta PlayerMovementSpeed ; CPU:$D6BD PRG:16BD 85 CD lda EntityTargetTable+1,y ; CPU:$D6BF PRG:16BF B9 C8 D6 - sta $CE ; CPU:$D6C2 PRG:16C2 85 CE + sta ComputerActionState ; CPU:$D6C2 PRG:16C2 85 CE jmp $D778 ; CPU:$D6C4 PRG:16C4 4C 78 D7 @@ -6726,7 +6726,7 @@ DispatchEntityTargetBehavior: sta $10 ; CPU:$D6D4 PRG:16D4 85 10 lda EntityTargetBehaviorTable+1,y ; CPU:$D6D6 PRG:16D6 B9 DF D6 - sta $11 ; CPU:$D6D9 PRG:16D9 85 11 + sta Zp11 ; CPU:$D6D9 PRG:16D9 85 11 jmp ($0010) ; CPU:$D6DB PRG:16DB 6C 10 00 3B D7 @@ -6775,7 +6775,7 @@ EntityTargetBehaviorTable: EntityTargetBehaviorD6E6: lda $1A ; CPU:$D6E6 PRG:16E6 A5 1A sec ; CPU:$D6E8 PRG:16E8 38 - sbc $2A ; CPU:$D6E9 PRG:16E9 E5 2A + sbc ghost4Motion ; CPU:$D6E9 PRG:16E9 E5 2A bcs @D6F4 ; CPU:$D6EB PRG:16EB B0 07 sta $05 ; CPU:$D6ED PRG:16ED 85 05 @@ -6833,7 +6833,7 @@ EntityTargetBehaviorD6E6: clc ; CPU:$D729 PRG:1729 18 adc #$02 ; CPU:$D72A PRG:172A 69 02 and #$03 ; CPU:$D72C PRG:172C 29 03 - cmp $B9,x ; CPU:$D72E PRG:172E D5 B9 + cmp RacketTargetY,x ; CPU:$D72E PRG:172E D5 B9 beq @D712 ; CPU:$D730 PRG:1730 F0 E0 lda $05 ; CPU:$D732 PRG:1732 A5 05 @@ -6841,7 +6841,7 @@ EntityTargetBehaviorD6E6: @D736: - sta $B9,x ; CPU:$D736 PRG:1736 95 B9 + sta RacketTargetY,x ; CPU:$D736 PRG:1736 95 B9 jmp EntitySecondaryApplyResult ; CPU:$D738 PRG:1738 4C EB D5 @@ -6881,10 +6881,10 @@ EntityTargetBehaviorD6E6: EntityTargetBehaviorD73B: lda $1A ; CPU:$D73B PRG:173B A5 1A - sta $CD ; CPU:$D73D PRG:173D 85 CD + sta PlayerMovementSpeed ; CPU:$D73D PRG:173D 85 CD lda $1C ; CPU:$D73F PRG:173F A5 1C - sta $CE ; CPU:$D741 PRG:1741 85 CE + sta ComputerActionState ; CPU:$D741 PRG:1741 85 CE bne $D778 ; CPU:$D743 PRG:1743 D0 33 @@ -6901,12 +6901,12 @@ EntityTargetBehaviorD745: lda EntityDirectionTargetOffsets,y ; CPU:$D749 PRG:1749 B9 5C D7 clc ; CPU:$D74C PRG:174C 18 adc $1A ; CPU:$D74D PRG:174D 65 1A - sta $CD ; CPU:$D74F PRG:174F 85 CD + sta PlayerMovementSpeed ; CPU:$D74F PRG:174F 85 CD lda EntityDirectionTargetOffsets+1,y ; CPU:$D751 PRG:1751 B9 5D D7 clc ; CPU:$D754 PRG:1754 18 adc $1C ; CPU:$D755 PRG:1755 65 1C - sta $CE ; CPU:$D757 PRG:1757 85 CE + sta ComputerActionState ; CPU:$D757 PRG:1757 85 CE jmp $D778 ; CPU:$D759 PRG:1759 4C 78 D7 @@ -6957,15 +6957,15 @@ EntityTargetBehaviorD764: clc ; CPU:$D769 PRG:1769 18 adc $1A ; CPU:$D76A PRG:176A 65 1A - sta $CD ; CPU:$D76C PRG:176C 85 CD + sta PlayerMovementSpeed ; CPU:$D76C PRG:176C 85 CD lda $1C ; CPU:$D76E PRG:176E A5 1C sec ; CPU:$D770 PRG:1770 38 - sbc $20 ; CPU:$D771 PRG:1771 E5 20 + sbc Zp20 ; CPU:$D771 PRG:1771 E5 20 clc ; CPU:$D773 PRG:1773 18 adc $1C ; CPU:$D774 PRG:1774 65 1C - sta $CE ; CPU:$D776 PRG:1776 85 CE + sta ComputerActionState ; CPU:$D776 PRG:1776 85 CE ;============================================================================== ; $D778-$D79F: Common Entity Target Processing @@ -7003,7 +7003,7 @@ EntityTargetBehaviorD764: ;============================================================================== EntityTargetCommon: - lda $B8,x ; CPU:$D778 PRG:1778 B5 B8 + lda RacketTargetX,x ; CPU:$D778 PRG:1778 B5 B8 sec ; CPU:$D77A PRG:177A 38 sbc #$04 ; CPU:$D77B PRG:177B E9 04 tay ; CPU:$D77D PRG:177D A8 @@ -7012,7 +7012,7 @@ EntityTargetCommon: sta $0A ; CPU:$D781 PRG:1781 85 0A lda $D882,y ; CPU:$D783 PRG:1783 B9 82 D8 - sta $0B ; CPU:$D786 PRG:1786 85 0B + sta pathFallbackValue ; CPU:$D786 PRG:1786 85 0B jsr BuildLegalDirectionList ; CPU:$D788 PRG:1788 20 B1 E4 @@ -7025,7 +7025,7 @@ EntityTargetCommon: @D795: - lda $0D ; CPU:$D795 PRG:1795 A5 0D + lda Zp0D ; CPU:$D795 PRG:1795 A5 0D cmp #$FF ; CPU:$D797 PRG:1797 C9 FF bne $D7A0 ; CPU:$D799 PRG:1799 D0 05 @@ -7033,7 +7033,7 @@ EntityTargetCommon: @D79D: - sta $B9,x ; CPU:$D79D PRG:179D 95 B9 + sta RacketTargetY,x ; CPU:$D79D PRG:179D 95 B9 rts ; CPU:$D79F PRG:179F 60 @@ -7075,16 +7075,16 @@ SelectEntityDirectionTowardTarget: ldy #$00 ; CPU:$D7A0 PRG:17A0 A0 00 sty $05 ; CPU:$D7A2 PRG:17A2 84 05 - lda $CD ; CPU:$D7A4 PRG:17A4 A5 CD + lda PlayerMovementSpeed ; CPU:$D7A4 PRG:17A4 A5 CD sec ; CPU:$D7A6 PRG:17A6 38 sbc ($02),y ; CPU:$D7A7 PRG:17A7 F1 02 bcs @D7B9 ; CPU:$D7A9 PRG:17A9 B0 0F - sta $08 ; CPU:$D7AB PRG:17AB 85 08 + sta workValue4 ; CPU:$D7AB PRG:17AB 85 08 lda #$00 ; CPU:$D7AD PRG:17AD A9 00 sec ; CPU:$D7AF PRG:17AF 38 - sbc $08 ; CPU:$D7B0 PRG:17B0 E5 08 + sbc workValue4 ; CPU:$D7B0 PRG:17B0 E5 08 inc $05 ; CPU:$D7B2 PRG:17B2 E6 05 inc $05 ; CPU:$D7B4 PRG:17B4 E6 05 @@ -7094,7 +7094,7 @@ SelectEntityDirectionTowardTarget: @D7B9: sta $06 ; CPU:$D7BA PRG:17BA 85 06 - lda $CE ; CPU:$D7BC PRG:17BC A5 CE + lda ComputerActionState ; CPU:$D7BC PRG:17BC A5 CE ldy #$02 ; CPU:$D7BE PRG:17BE A0 02 @@ -7102,20 +7102,20 @@ SelectEntityDirectionTowardTarget: sbc ($02),y ; CPU:$D7C1 PRG:17C1 F1 02 bcs @D7D2 ; CPU:$D7C3 PRG:17C3 B0 0B - sta $08 ; CPU:$D7C5 PRG:17C5 85 08 + sta workValue4 ; CPU:$D7C5 PRG:17C5 85 08 lda #$00 ; CPU:$D7C7 PRG:17C7 A9 00 sec ; CPU:$D7C9 PRG:17C9 38 - sbc $08 ; CPU:$D7CA PRG:17CA E5 08 + sbc workValue4 ; CPU:$D7CA PRG:17CA E5 08 inc $05 ; CPU:$D7CC PRG:17CC E6 05 inc $05 ; CPU:$D7CE PRG:17CE E6 05 @D7D2: - sta $07 ; CPU:$D7D0 PRG:17D0 85 07 + sta workValue3 ; CPU:$D7D0 PRG:17D0 85 07 lda $06 ; CPU:$D7D2 PRG:17D2 A5 06 - cmp $07 ; CPU:$D7D4 PRG:17D4 C5 07 + cmp workValue3 ; CPU:$D7D4 PRG:17D4 C5 07 bcs @D7DB ; CPU:$D7D6 PRG:17D6 B0 02 inc $05 ; CPU:$D7D8 PRG:17D8 E6 05 @@ -7149,7 +7149,7 @@ SelectEntityDirectionTowardTarget: dec $06 ; CPU:$D7F6 PRG:17F6 C6 06 bne @D7E3 ; CPU:$D7F8 PRG:17F8 D0 E9 - lda $B9,x ; CPU:$D7FA PRG:17FA B5 B9 + lda RacketTargetY,x ; CPU:$D7FA PRG:17FA B5 B9 sec ; CPU:$D7FC PRG:17FC 38 sbc #$01 ; CPU:$D7FD PRG:17FD E9 01 and #$03 ; CPU:$D7FF PRG:17FF 29 03 @@ -7164,7 +7164,7 @@ SelectEntityDirectionTowardTarget: cpy #$04 ; CPU:$D809 PRG:1809 C0 04 bne @D802 ; CPU:$D80B PRG:180B D0 F6 - lda $B9,x ; CPU:$D80D PRG:180D B5 B9 + lda RacketTargetY,x ; CPU:$D80D PRG:180D B5 B9 clc ; CPU:$D80F PRG:180F 18 adc #$01 ; CPU:$D810 PRG:1810 69 01 and #$03 ; CPU:$D812 PRG:1812 29 03 @@ -7220,7 +7220,7 @@ SelectEntityDirectionTowardTarget: ;============================================================================== SelectEntityMovementSpeed: - lda $B8,x ; CPU:$D821 PRG:1821 B5 B8 + lda RacketTargetX,x ; CPU:$D821 PRG:1821 B5 B8 cmp #$06 ; CPU:$D823 PRG:1823 C9 06 beq @D864 ; CPU:$D825 PRG:1825 F0 41 @@ -7240,58 +7240,58 @@ SelectEntityMovementSpeed: bcs @D843 ; CPU:$D839 PRG:1839 B0 09 @D83D: - lda $B3 ; CPU:$D83B PRG:183B A5 B3 - sta $C2,x ; CPU:$D83D PRG:183D 95 C2 + lda PoseFrameTimer ; CPU:$D83B PRG:183B A5 B3 + sta CourtSide,x ; CPU:$D83D PRG:183D 95 C2 - lda $B4 ; CPU:$D83F PRG:183F A5 B4 - sta $C3,x ; CPU:$D841 PRG:1841 95 C3 + lda PlayerAnimationId ; CPU:$D83F PRG:183F A5 B4 + sta SignedMovementDelta,x ; CPU:$D841 PRG:1841 95 C3 rts ; CPU:$D843 PRG:1843 60 @D843: lda $04 ; CPU:$D844 PRG:1844 A5 04 - and $88 ; CPU:$D846 PRG:1846 25 88 + and PlayerXPosition ; CPU:$D846 PRG:1846 25 88 bne @D85A ; CPU:$D848 PRG:1848 D0 15 txa ; CPU:$D84A PRG:184A 8A bne @D854 ; CPU:$D84B PRG:184B D0 09 - lda $CA ; CPU:$D84D PRG:184D A5 CA - sta $C2 ; CPU:$D84F PRG:184F 85 C2 + lda RacketContactState ; CPU:$D84D PRG:184D A5 CA + sta CourtSide ; CPU:$D84F PRG:184F 85 C2 - lda $CB ; CPU:$D851 PRG:1851 A5 CB - sta $C3 ; CPU:$D853 PRG:1853 85 C3 + lda BallContactTimer ; CPU:$D851 PRG:1851 A5 CB + sta SignedMovementDelta ; CPU:$D853 PRG:1853 85 C3 rts ; CPU:$D855 PRG:1855 60 @D854: lda $AF ; CPU:$D856 PRG:1856 A5 AF - sta $C2,x ; CPU:$D858 PRG:1858 95 C2 + sta CourtSide,x ; CPU:$D858 PRG:1858 95 C2 - lda $B0 ; CPU:$D85A PRG:185A A5 B0 - sta $C3,x ; CPU:$D85C PRG:185C 95 C3 + lda AnimationFrame ; CPU:$D85A PRG:185A A5 B0 + sta SignedMovementDelta,x ; CPU:$D85C PRG:185C 95 C3 rts ; CPU:$D85E PRG:185E 60 @D85A: - lda $B1 ; CPU:$D85F PRG:185F A5 B1 - sta $C2,x ; CPU:$D861 PRG:1861 95 C2 + lda AnimationTimer ; CPU:$D85F PRG:185F A5 B1 + sta CourtSide,x ; CPU:$D861 PRG:1861 95 C2 lda $B2 ; CPU:$D863 PRG:1863 A5 B2 - sta $C3,x ; CPU:$D865 PRG:1865 95 C3 + sta SignedMovementDelta,x ; CPU:$D865 PRG:1865 95 C3 rts ; CPU:$D867 PRG:1867 60 @D864: lda #$00 ; CPU:$D868 PRG:1868 A9 00 - sta $C2,x ; CPU:$D86A PRG:186A 95 C2 + sta CourtSide,x ; CPU:$D86A PRG:186A 95 C2 lda #$02 ; CPU:$D86C PRG:186C A9 02 - sta $C3,x ; CPU:$D86E PRG:186E 95 C3 + sta SignedMovementDelta,x ; CPU:$D86E PRG:186E 95 C3 rts ; CPU:$D870 PRG:1870 60 @@ -7380,7 +7380,7 @@ UpdateEntityState02: lda #$03 ; CPU:$D89C PRG:189C A9 03 @D89E: - sta $B9,x ; CPU:$D89E PRG:189E 95 B9 + sta RacketTargetY,x ; CPU:$D89E PRG:189E 95 B9 ldy #$01 ; CPU:$D8A0 PRG:18A0 A0 01 @@ -7404,7 +7404,7 @@ UpdateEntityState02: UpdateEntityState02SecondaryPhase: lda #$00 ; CPU:$D8B2 PRG:18B2 A9 00 - sta $B9,x ; CPU:$D8B4 PRG:18B4 95 B9 + sta RacketTargetY,x ; CPU:$D8B4 PRG:18B4 95 B9 ldy #$03 ; CPU:$D8B6 PRG:18B6 A0 03 @@ -7426,10 +7426,10 @@ UpdateEntityState02SecondaryPhase: @D8CC: lda #$01 ; CPU:$D8CC PRG:18CC A9 01 - sta $B9,x ; CPU:$D8CE PRG:18CE 95 B9 + sta RacketTargetY,x ; CPU:$D8CE PRG:18CE 95 B9 lda #$04 ; CPU:$D8D0 PRG:18D0 A9 04 - sta $B8,x ; CPU:$D8D2 PRG:18D2 95 B8 + sta RacketTargetX,x ; CPU:$D8D2 PRG:18D2 95 B8 rts ; CPU:$D8D4 PRG:18D4 60 @@ -7465,13 +7465,13 @@ EntityState00: lda #$80 ; CPU:$D8D9 PRG:18D9 A9 80 sta $06 ; CPU:$D8DB PRG:18DB 85 06 - ldy $B9,x ; CPU:$D8DD PRG:18DD B4 B9 + ldy RacketTargetY,x ; CPU:$D8DD PRG:18DD B4 B9 lda EntityState00SubstateTable,y ; CPU:$D8DF PRG:18DF B9 EC D8 sta $10 ; CPU:$D8E2 PRG:18E2 85 10 lda EntityState00SubstateTable+1,y ; CPU:$D8E4 PRG:18E4 B9 ED D8 - sta $11 ; CPU:$D8E7 PRG:18E7 85 11 + sta Zp11 ; CPU:$D8E7 PRG:18E7 85 11 jmp ($0010) ; CPU:$D8E9 PRG:18E9 6C 10 00 F0 D8 @@ -7524,7 +7524,7 @@ UpdateEntityState00MovingPositive: lda #$00 ; CPU:$D90F PRG:190F A9 00 @D911: - sta $B9,x ; CPU:$D911 PRG:1911 95 B9 + sta RacketTargetY,x ; CPU:$D911 PRG:1911 95 B9 @D913: rts ; CPU:$D913 PRG:1913 60 @@ -7570,13 +7570,13 @@ UpdateEntityMovementStates: sta $00 ; CPU:$D918 PRG:1918 85 00 lda #$02 ; CPU:$D91A PRG:191A A9 02 - sta $01 ; CPU:$D91C PRG:191C 85 01 + sta WorkPtrLo ; CPU:$D91C PRG:191C 85 01 lda #$1E ; CPU:$D91E PRG:191E A9 1E sta $02 ; CPU:$D920 PRG:1920 85 02 lda #$00 ; CPU:$D922 PRG:1922 A9 00 - sta $03 ; CPU:$D924 PRG:1924 85 03 + sta Zp03 ; CPU:$D924 PRG:1924 85 03 lda #$01 ; CPU:$D926 PRG:1926 A9 01 sta $04 ; CPU:$D928 PRG:1928 85 04 @@ -7629,13 +7629,13 @@ UpdateEntityMovementStates: ;============================================================================== DispatchEntityMovementState: - ldy $B8,x ; CPU:$D944 PRG:1944 B4 B8 + ldy RacketTargetX,x ; CPU:$D944 PRG:1944 B4 B8 lda EntityMovementStateHandlerTable,y ; CPU:$D946 PRG:1946 B9 53 D9 sta $10 ; CPU:$D949 PRG:1949 85 10 lda EntityMovementStateHandlerTable+1,y ; CPU:$D94B PRG:194B B9 54 D9 - sta $11 ; CPU:$D94E PRG:194E 85 11 + sta Zp11 ; CPU:$D94E PRG:194E 85 11 jmp ($0010) ; CPU:$D950 PRG:1950 6C 10 00 5D D9 @@ -7706,7 +7706,7 @@ UpdateEntityStatusFlags: stx $00 ; CPU:$D960 PRG:1960 86 00 @D962: - lda $B8,x ; CPU:$D962 PRG:1962 B5 B8 + lda RacketTargetX,x ; CPU:$D962 PRG:1962 B5 B8 cmp #$06 ; CPU:$D964 PRG:1964 C9 06 bne @D96C ; CPU:$D966 PRG:1966 D0 04 @@ -7720,7 +7720,7 @@ UpdateEntityStatusFlags: cpx #$08 ; CPU:$D96E PRG:196E E0 08 bne @D962 ; CPU:$D970 PRG:1970 D0 F0 - lda $88 ; CPU:$D972 PRG:1972 A5 88 + lda PlayerXPosition ; CPU:$D972 PRG:1972 A5 88 beq UpdatePlayerVerticalRegionFlag ; CPU:$D974 PRG:1974 F0 04 sta $0609 ; CPU:$D976 PRG:1976 8D 09 06 @@ -7781,15 +7781,15 @@ UpdatePlayerDirectionAnimation: and #$F0 ; CPU:$D9A3 PRG:19A3 29 F0 beq @D9AE ; CPU:$D9A5 PRG:19A5 F0 07 - lda $B7 ; CPU:$D9A7 PRG:19A7 A5 B7 + lda PlayerPoseFlags ; CPU:$D9A7 PRG:19A7 A5 B7 and #$03 ; CPU:$D9A9 PRG:19A9 29 03 jmp @D9B2 ; CPU:$D9AB PRG:19AB 4C B2 D9 @D9AE: - inc $B7 ; CPU:$D9AE PRG:19AE E6 B7 + inc PlayerPoseFlags ; CPU:$D9AE PRG:19AE E6 B7 - lda $B7 ; CPU:$D9B0 PRG:19B0 A5 B7 + lda PlayerPoseFlags ; CPU:$D9B0 PRG:19B0 A5 B7 @D9B2: and #$07 ; CPU:$D9B2 PRG:19B2 29 07 @@ -7875,13 +7875,13 @@ UpdateEntitySpriteStates: @D9DC: lda #$01 ; CPU:$D9DB PRG:19DB A9 01 - sta $01 ; CPU:$D9DD PRG:19DD 85 01 + sta WorkPtrLo ; CPU:$D9DD PRG:19DD 85 01 @D9E0: jsr $D9EB ; CPU:$D9DF PRG:19DF 20 EB D9 - asl $01 ; CPU:$D9E2 PRG:19E2 06 + asl WorkPtrLo ; CPU:$D9E2 PRG:19E2 06 inx ; CPU:$D9E3 PRG:19E3 01 inx ; CPU:$D9E4 PRG:19E4 E8 @@ -7897,13 +7897,13 @@ UpdateEntitySpriteStates: ;============================================================================== DispatchEntitySpriteState: - ldy $B8,x ; CPU:$D9EB PRG:19EB B4 B8 + ldy RacketTargetX,x ; CPU:$D9EB PRG:19EB B4 B8 lda EntitySpriteStateHandlerTable,y ; CPU:$D9ED PRG:19ED B9 FA D9 sta $10 ; CPU:$D9F0 PRG:19F0 85 10 lda EntitySpriteStateHandlerTable+1,y ; CPU:$D9F2 PRG:19F2 B9 FB D9 - sta $11 ; CPU:$D9F5 PRG:19F5 85 11 + sta Zp11 ; CPU:$D9F5 PRG:19F5 85 11 jmp ($0010) ; CPU:$D9F7 PRG:19F7 6C 10 00 21 DA @@ -7961,8 +7961,8 @@ EntitySpriteStateHandlerTable: ;------------------------------------------------------------------------------ CalculateEntitySpriteValue: - lda $B9,x ; CPU:$DA04 PRG:1A04 B5 B9 - sta $03 ; CPU:$DA06 PRG:1A06 85 03 + lda RacketTargetY,x ; CPU:$DA04 PRG:1A04 B5 B9 + sta Zp03 ; CPU:$DA06 PRG:1A06 85 03 lda #$0A ; CPU:$DA08 PRG:1A08 A9 0A @@ -7972,7 +7972,7 @@ CalculateEntitySpriteValue: ;------------------------------------------------------------------------------ CalculateEntitySpriteValueLoop: - dec $03 ; CPU:$DA0A PRG:1A0A C6 03 + dec Zp03 ; CPU:$DA0A PRG:1A0A C6 03 bmi AddEntitySpriteBase ; CPU:$DA0C PRG:1A0C 30 05 clc ; CPU:$DA0E PRG:1A0E 18 @@ -8011,8 +8011,8 @@ StoreEntitySpriteValue: ;------------------------------------------------------------------------------ UpdateNormalEntitySprite: - lda $01 ; CPU:$DA21 PRG:1A21 A5 01 - and $88 ; CPU:$DA23 PRG:1A23 25 88 + lda WorkPtrLo ; CPU:$DA21 PRG:1A21 A5 01 + and PlayerXPosition ; CPU:$DA23 PRG:1A23 25 88 beq CalculateEntitySpriteValue ; CPU:$DA25 PRG:1A25 F0 DD lda #$1E ; CPU:$DA27 PRG:1A27 A9 1E @@ -8027,8 +8027,8 @@ UpdateNormalEntitySprite: ;------------------------------------------------------------------------------ UpdateSpecialEntitySprite: - lda $B9,x ; CPU:$DA2D PRG:1A2D B5 B9 - sta $03 ; CPU:$DA2F PRG:1A2F 85 03 + lda RacketTargetY,x ; CPU:$DA2D PRG:1A2D B5 B9 + sta Zp03 ; CPU:$DA2F PRG:1A2F 85 03 lda #$20 ; CPU:$DA31 PRG:1A31 A9 20 @@ -8038,7 +8038,7 @@ UpdateSpecialEntitySprite: ;------------------------------------------------------------------------------ UpdateSpecialEntitySpriteLoop: - dec $03 ; CPU:$DA33 PRG:1A33 C6 03 + dec Zp03 ; CPU:$DA33 PRG:1A33 C6 03 bmi UpdateSpecialEntitySpriteDone ; CPU:$DA35 PRG:1A35 30 05 clc ; CPU:$DA37 PRG:1A37 18 @@ -8100,18 +8100,18 @@ CheckEntityCollisions: sta $00 ; CPU:$DA4C PRG:1A4C 85 00 lda #$02 ; CPU:$DA4E PRG:1A4E A9 02 - sta $01 ; CPU:$DA50 PRG:1A50 85 01 + sta WorkPtrLo ; CPU:$DA50 PRG:1A50 85 01 lda #$08 ; CPU:$DA52 PRG:1A52 A9 08 - sta $03 ; CPU:$DA54 PRG:1A54 85 03 + sta Zp03 ; CPU:$DA54 PRG:1A54 85 03 lda #$03 ; CPU:$DA56 PRG:1A56 A9 03 sta $02 ; CPU:$DA58 PRG:1A58 85 02 @CheckNextEntity: - lda $03 ; CPU:$DA5A PRG:1A5A A5 03 - and $88 ; CPU:$DA5C PRG:1A5C 25 88 + lda Zp03 ; CPU:$DA5A PRG:1A5A A5 03 + and PlayerXPosition ; CPU:$DA5C PRG:1A5C 25 88 bne @AdvanceEntity ; CPU:$DA5E PRG:1A5E D0 7B ldy #$00 ; CPU:$DA60 PRG:1A60 A0 00 @@ -8158,7 +8158,7 @@ CheckEntityCollisions: ; Save the primary slot coordinates/state. lda $0274 ; CPU:$DA96 PRG:1A96 AD 74 02 - sta $03 ; CPU:$DA99 PRG:1A99 85 03 + sta Zp03 ; CPU:$DA99 PRG:1A99 85 03 lda $0276 ; CPU:$DA9B PRG:1A9B AD 76 02 sta $04 ; CPU:$DA9E PRG:1A9E 85 04 @@ -8174,7 +8174,7 @@ CheckEntityCollisions: lda ($00),y ; CPU:$DAAC PRG:1AAC B1 00 sta $0274 ; CPU:$DAAE PRG:1AAE 8D 74 02 - lda $03 ; CPU:$DAB1 PRG:1AB1 A5 03 + lda Zp03 ; CPU:$DAB1 PRG:1AB1 A5 03 sta ($00),y ; CPU:$DAB3 PRG:1AB3 91 00 ldy #$02 ; CPU:$DAB5 PRG:1AB5 A0 02 @@ -8208,7 +8208,7 @@ CheckEntityCollisions: sbc #$04 ; CPU:$DADE PRG:1ADE E9 04 sta $00 ; CPU:$DAE0 PRG:1AE0 85 00 - lsr $03 ; CPU:$DAE2 PRG:1AE2 46 + lsr Zp03 ; CPU:$DAE2 PRG:1AE2 46 dec $02 ; CPU:$DAE3 PRG:1AE3 03 C6 bmi @NoCollision ; CPU:$DAE5 PRG:1AE5 02 30 @@ -8264,13 +8264,13 @@ BuildEntitySpriteBuffer: sta $00 ; CPU:$DAF3 PRG:1AF3 85 00 lda #$02 ; CPU:$DAF5 PRG:1AF5 A9 02 - sta $01 ; CPU:$DAF7 PRG:1AF7 85 01 + sta WorkPtrLo ; CPU:$DAF7 PRG:1AF7 85 01 lda #$00 ; CPU:$DAF9 PRG:1AF9 A9 00 sta $02 ; CPU:$DAFB PRG:1AFB 85 02 lda #$07 ; CPU:$DAFD PRG:1AFD A9 07 - sta $03 ; CPU:$DAFF PRG:1AFF 85 03 + sta Zp03 ; CPU:$DAFF PRG:1AFF 85 03 lda #$00 ; CPU:$DB01 PRG:1B01 A9 00 sta $04 ; CPU:$DB03 PRG:1B03 85 04 @@ -9130,7 +9130,7 @@ UpdateAnimatedGameplayPpuFields: ldx #$00 ; CPU:$DF1D PRG:1F1D A2 00 lda $46 ; CPU:$DF1F PRG:1F1F A5 46 - and $47 ; CPU:$DF21 PRG:1F21 25 47 + and activePlayerFlag ; CPU:$DF21 PRG:1F21 25 47 beq @DF27 ; CPU:$DF23 PRG:1F23 F0 02 ldy #$08 ; CPU:$DF25 PRG:1F25 A0 08 @@ -9273,13 +9273,13 @@ UpdateGameplayTileState: sta $02 ; CPU:$DF99 PRG:1F99 85 02 lda $1C ; CPU:$DF9B PRG:1F9B A5 1C - sta $03 ; CPU:$DF9D PRG:1F9D 85 03 + sta Zp03 ; CPU:$DF9D PRG:1F9D 85 03 jsr $E263 ; CPU:$DF9F PRG:1F9F 20 63 E2 ldx #$00 ; CPU:$DFA2 PRG:1FA2 A2 00 - lda $03 ; CPU:$DFA4 PRG:1FA4 A5 03 + lda Zp03 ; CPU:$DFA4 PRG:1FA4 A5 03 and #$07 ; CPU:$DFA6 PRG:1FA6 29 07 beq @DFAD ; CPU:$DFA8 PRG:1FA8 F0 02 @@ -9309,7 +9309,7 @@ UpdateGameplayTileState: sta $02 ; CPU:$DFC3 PRG:1FC3 85 02 lda $1C ; CPU:$DFC5 PRG:1FC5 A5 1C - sta $03 ; CPU:$DFC7 PRG:1FC7 85 03 + sta Zp03 ; CPU:$DFC7 PRG:1FC7 85 03 jsr $E263 ; CPU:$DFC9 PRG:1FC9 20 63 E2 @@ -9332,7 +9332,7 @@ UpdateGameplayTileState: @DFDC: - lda $03 ; CPU:$DFDF PRG:1FDF A5 03 + lda Zp03 ; CPU:$DFDF PRG:1FDF A5 03 sta $024B,y ; CPU:$DFE1 PRG:1FE1 99 4B 02 iny ; CPU:$DFE4 PRG:1FE4 C8 @@ -9363,7 +9363,7 @@ UpdateGameplayTileState: sta $3F ; CPU:$E007 PRG:2007 85 3F lda #$00 ; CPU:$E009 PRG:2009 A9 00 - sta $87 ; CPU:$E00B PRG:200B 85 87 + sta PlayerFacingDirection ; CPU:$E00B PRG:200B 85 87 lda #$48 ; CPU:$E00D PRG:200D A9 48 sta $4C ; CPU:$E00F PRG:200F 85 4C @@ -9391,10 +9391,10 @@ UpdateGameplayTileState: sta $37 ; CPU:$E028 PRG:2028 85 37 lda #$03 ; CPU:$E02A PRG:202A A9 03 - sta $3D ; CPU:$E02C PRG:202C 85 3D + sta GameState ; CPU:$E02C PRG:202C 85 3D lda #$60 ; CPU:$E02E PRG:202E A9 60 - sta $2E ; CPU:$E030 PRG:2030 85 2E + sta pacmanTargetRow ; CPU:$E030 PRG:2030 85 2E lda #$80 ; CPU:$E032 PRG:2032 A9 80 sta $30 ; CPU:$E034 PRG:2034 85 30 @@ -9435,11 +9435,11 @@ ActivateNextStateSlotE049: ldx #$00 ; CPU:$E049 PRG:2049 A2 00 @E04B: - lda $BA,x ; CPU:$E04B PRG:204B B5 BA + lda RacketContactFlags,x ; CPU:$E04B PRG:204B B5 BA bne @E054 ; CPU:$E04D PRG:204D D0 05 lda #$02 ; CPU:$E04F PRG:204F A9 02 - sta $BA,x ; CPU:$E051 PRG:2051 95 BA + sta RacketContactFlags,x ; CPU:$E051 PRG:2051 95 BA rts ; CPU:$E053 PRG:2053 60 @@ -9501,20 +9501,20 @@ GameplayStateValueLookup: ; $04 temporarily holds a candidate direction value. ;============================================================================== InitializeEntityDirectionState: - lda $8C ; CPU:$E063 PRG:2063 A5 8C + lda PlayerMovementFlags ; CPU:$E063 PRG:2063 A5 8C bne @E06D ; CPU:$E065 PRG:2065 D0 06 lda #$1E ; CPU:$E067 PRG:2067 A9 1E - sta $8A ; CPU:$E069 PRG:2069 85 8A + sta PlayerPreviousX ; CPU:$E069 PRG:2069 85 8A lda #$00 ; CPU:$E06B PRG:206B A9 00 @E06D: - sta $89 ; CPU:$E06D PRG:206D 85 89 + sta PlayerYPosition ; CPU:$E06D PRG:206D 85 89 lda #$0F ; CPU:$E06F PRG:206F A9 0F - sta $88 ; CPU:$E071 PRG:2071 85 88 + sta PlayerXPosition ; CPU:$E071 PRG:2071 85 88 ldx #$03 ; CPU:$E073 PRG:2073 A2 03 @@ -9542,28 +9542,28 @@ InitializeEntityDirectionState: sta $00 ; CPU:$E092 PRG:2092 85 00 lda #$02 ; CPU:$E094 PRG:2094 A9 02 - sta $01 ; CPU:$E096 PRG:2096 85 01 + sta WorkPtrLo ; CPU:$E096 PRG:2096 85 01 lda #$1E ; CPU:$E098 PRG:2098 A9 1E sta $02 ; CPU:$E09A PRG:209A 85 02 lda #$00 ; CPU:$E09C PRG:209C A9 00 - sta $03 ; CPU:$E09E PRG:209E 85 03 + sta Zp03 ; CPU:$E09E PRG:209E 85 03 @E09E: lda #$0F ; CPU:$E0A0 PRG:20A0 A9 0F - cmp $88 ; CPU:$E0A2 PRG:20A2 C5 88 + cmp PlayerXPosition ; CPU:$E0A2 PRG:20A2 C5 88 beq @E0AA ; CPU:$E0A4 PRG:20A4 F0 04 lda $D2 ; CPU:$E0A6 PRG:20A6 A5 D2 bne @E0D1 ; CPU:$E0A8 PRG:20A8 D0 27 @E0AA: - lda $B8,x ; CPU:$E0AA PRG:20AA B5 B8 + lda RacketTargetX,x ; CPU:$E0AA PRG:20AA B5 B8 cmp #$04 ; CPU:$E0AC PRG:20AC C9 04 bne @E0D1 ; CPU:$E0AE PRG:20AE D0 21 - lda $B9,x ; CPU:$E0B0 PRG:20B0 B5 B9 + lda RacketTargetY,x ; CPU:$E0B0 PRG:20B0 B5 B9 clc ; CPU:$E0B2 PRG:20B2 18 adc #$02 ; CPU:$E0B3 PRG:20B3 69 02 and #$03 ; CPU:$E0B5 PRG:20B5 29 03 @@ -9588,7 +9588,7 @@ InitializeEntityDirectionState: @E0CD: lda $04 ; CPU:$E0CD PRG:20CD A5 04 - sta $B9,x ; CPU:$E0CF PRG:20CF 95 B9 + sta RacketTargetY,x ; CPU:$E0CF PRG:20CF 95 B9 @E0D1: @@ -9736,7 +9736,7 @@ UpdateScoreDisplay: bne @E196 ; CPU:$E12D PRG:212D 02 E8 lda #$01 ; CPU:$E12F PRG:212F 88 10 - cmp $73 ; CPU:$E131 PRG:2131 F3 A5 + cmp BallVerticalVelocityHi ; CPU:$E131 PRG:2131 F3 A5 bne @E196 ; CPU:$E133 PRG:2133 6B D0 lda #$01 ; CPU:$E135 PRG:2135 60 A9 @@ -9782,14 +9782,14 @@ UpdateScoreDisplay: @E15D: lda $46 ; CPU:$E159 PRG:2159 06 A9 - and $47 ; CPU:$E15B PRG:215B 00 99 + and activePlayerFlag ; CPU:$E15B PRG:215B 00 99 beq @E165 ; CPU:$E15D PRG:215D 4B 02 lda #$08 ; CPU:$E15F PRG:215F C8 A5 @E165: - sta $01 ; CPU:$E161 PRG:2161 46 25 + sta WorkPtrLo ; CPU:$E161 PRG:2161 46 25 ldx #$00 ; CPU:$E163 PRG:2163 47 F0 @@ -9802,7 +9802,7 @@ UpdateScoreDisplay: @E169: lda ScorePpuCommandTemplates,x ; CPU:$E165 PRG:2165 02 A9 08 clc ; CPU:$E168 PRG:2168 85 - adc $01 ; CPU:$E169 PRG:2169 01 A2 + adc WorkPtrLo ; CPU:$E169 PRG:2169 01 A2 sta $024B,y ; CPU:$E16B PRG:216B 00 BD C0 iny ; CPU:$E16E PRG:216E E1 @@ -9972,11 +9972,11 @@ BuildNearbyTileAddressBuffer: sta $02 ; CPU:$E1DC PRG:21DC 85 02 lda $1C ; CPU:$E1DE PRG:21DE A5 1C - sta $03 ; CPU:$E1E0 PRG:21E0 85 03 + sta Zp03 ; CPU:$E1E0 PRG:21E0 85 03 jsr $E263 ; CPU:$E1E2 PRG:21E2 20 63 E2 - lda $03 ; CPU:$E1E5 PRG:21E5 A5 03 + lda Zp03 ; CPU:$E1E5 PRG:21E5 A5 03 sta $0200 ; CPU:$E1E7 PRG:21E7 8D 00 02 lda $02 ; CPU:$E1EA PRG:21EA A5 02 @@ -9991,7 +9991,7 @@ BuildNearbyTileAddressBuffer: sta $02 ; CPU:$E1F5 PRG:21F5 85 02 lda $1C,x ; CPU:$E1F7 PRG:21F7 B5 1C - sta $03 ; CPU:$E1F9 PRG:21F9 85 03 + sta Zp03 ; CPU:$E1F9 PRG:21F9 85 03 jsr $E263 ; CPU:$E1FB PRG:21FB 20 63 E2 @@ -9999,24 +9999,24 @@ BuildNearbyTileAddressBuffer: sta $14 ; CPU:$E200 PRG:2200 85 14 lda #$00 ; CPU:$E202 PRG:2202 A9 00 - sta $15 ; CPU:$E204 PRG:2204 85 15 + sta MathResultHi ; CPU:$E204 PRG:2204 85 15 lda $02 ; CPU:$E206 PRG:2206 A5 02 sta $12 ; CPU:$E208 PRG:2208 85 12 - lda $03 ; CPU:$E20A PRG:220A A5 03 - sta $13 ; CPU:$E20C PRG:220C 85 13 + lda Zp03 ; CPU:$E20A PRG:220A A5 03 + sta MathOperandHi ; CPU:$E20C PRG:220C 85 13 jsr $E2D4 ; CPU:$E20E PRG:220E 20 D4 E2 - lda $13 ; CPU:$E211 PRG:2211 A5 13 + lda MathOperandHi ; CPU:$E211 PRG:2211 A5 13 sta $0202,y ; CPU:$E213 PRG:2213 99 02 02 lda $12 ; CPU:$E216 PRG:2216 A5 12 iny ; CPU:$E218 PRG:2218 C8 sta $0202,y ; CPU:$E219 PRG:2219 99 02 02 - lda $03 ; CPU:$E21C PRG:221C A5 03 + lda Zp03 ; CPU:$E21C PRG:221C A5 03 iny ; CPU:$E21E PRG:221E C8 sta $0202,y ; CPU:$E21F PRG:221F 99 02 02 @@ -10030,17 +10030,17 @@ BuildNearbyTileAddressBuffer: sta $14 ; CPU:$E22D PRG:222D 85 14 lda #$00 ; CPU:$E22F PRG:222F A9 00 - sta $15 ; CPU:$E231 PRG:2231 85 15 + sta MathResultHi ; CPU:$E231 PRG:2231 85 15 lda $02 ; CPU:$E233 PRG:2233 A5 02 sta $12 ; CPU:$E235 PRG:2235 85 12 - lda $03 ; CPU:$E237 PRG:2237 A5 03 - sta $13 ; CPU:$E239 PRG:2239 85 13 + lda Zp03 ; CPU:$E237 PRG:2237 A5 03 + sta MathOperandHi ; CPU:$E239 PRG:2239 85 13 jsr $E2C6 ; CPU:$E23B PRG:223B 20 C6 E2 - lda $13 ; CPU:$E23E PRG:223E A5 13 + lda MathOperandHi ; CPU:$E23E PRG:223E A5 13 iny ; CPU:$E240 PRG:2240 C8 sta $0202,y ; CPU:$E241 PRG:2241 99 02 02 @@ -10048,7 +10048,7 @@ BuildNearbyTileAddressBuffer: iny ; CPU:$E246 PRG:2246 C8 sta $0202,y ; CPU:$E247 PRG:2247 99 02 02 - lda $03 ; CPU:$E24A PRG:224A A5 03 + lda Zp03 ; CPU:$E24A PRG:224A A5 03 iny ; CPU:$E24C PRG:224C C8 sta $0202,y ; CPU:$E24D PRG:224D 99 02 02 @@ -10106,7 +10106,7 @@ ConvertPixelToNametableAddress: lda #$00 ; CPU:$E263 PRG:2263 A9 00 sta $05 ; CPU:$E265 PRG:2265 85 05 - lda $03 ; CPU:$E267 PRG:2267 A5 03 + lda Zp03 ; CPU:$E267 PRG:2267 A5 03 sec ; CPU:$E269 PRG:2269 38 sbc #$04 ; CPU:$E26A PRG:226A E9 04 and #$F8 ; CPU:$E26C PRG:226C 29 F8 @@ -10140,19 +10140,19 @@ ConvertPixelToNametableAddress: lda $05 ; CPU:$E28A PRG:228A 85 02 clc ; CPU:$E28C PRG:228C A5 adc #$20 ; CPU:$E28D PRG:228D 05 18 - sta $03 ; CPU:$E28F PRG:228F 69 20 + sta Zp03 ; CPU:$E28F PRG:228F 69 20 lda $46 ; CPU:$E291 PRG:2291 85 03 - and $47 ; CPU:$E293 PRG:2293 A5 46 + and activePlayerFlag ; CPU:$E293 PRG:2293 A5 46 bne @E299 ; CPU:$E295 PRG:2295 25 47 rts ; CPU:$E297 PRG:2297 D0 @E299: - lda $03 ; CPU:$E298 PRG:2298 01 60 + lda Zp03 ; CPU:$E298 PRG:2298 01 60 clc ; CPU:$E29A PRG:229A A5 adc #$08 ; CPU:$E29B PRG:229B 03 18 - sta $03 ; CPU:$E29D PRG:229D 69 08 + sta Zp03 ; CPU:$E29D PRG:229D 69 08 rts ; CPU:$E29F PRG:229F 85 @@ -10215,9 +10215,9 @@ Add16BitWorkingValue: adc $14 ; CPU:$E2C9 PRG:22C9 65 14 sta $12 ; CPU:$E2CB PRG:22CB 85 12 - lda $13 ; CPU:$E2CD PRG:22CD A5 13 - adc $15 ; CPU:$E2CF PRG:22CF 65 15 - sta $13 ; CPU:$E2D1 PRG:22D1 85 13 + lda MathOperandHi ; CPU:$E2CD PRG:22CD A5 13 + adc MathResultHi ; CPU:$E2CF PRG:22CF 65 15 + sta MathOperandHi ; CPU:$E2D1 PRG:22D1 85 13 rts ; CPU:$E2D3 PRG:22D3 60 ;============================================================================== @@ -10237,9 +10237,9 @@ Subtract16BitWorkingValue: sbc $14 ; CPU:$E2D7 PRG:22D7 E5 14 sta $12 ; CPU:$E2D9 PRG:22D9 85 12 - lda $13 ; CPU:$E2DB PRG:22DB A5 13 - sbc $15 ; CPU:$E2DD PRG:22DD E5 15 - sta $13 ; CPU:$E2DF PRG:22DF 85 13 + lda MathOperandHi ; CPU:$E2DB PRG:22DB A5 13 + sbc MathResultHi ; CPU:$E2DD PRG:22DD E5 15 + sta MathOperandHi ; CPU:$E2DF PRG:22DF 85 13 rts ; CPU:$E2E1 PRG:22E1 60 @@ -10276,9 +10276,9 @@ DrawMazeNametable: sta $02 ; CPU:$E2E4 PRG:22E4 85 02 lda #$40 ; CPU:$E2E6 PRG:22E6 A9 40 - sta $03 ; CPU:$E2E8 PRG:22E8 85 03 + sta Zp03 ; CPU:$E2E8 PRG:22E8 85 03 - lda $47 ; CPU:$E2EA PRG:22EA A5 47 + lda activePlayerFlag ; CPU:$E2EA PRG:22EA A5 47 and $46 ; CPU:$E2EC PRG:22EC 25 46 beq @E2F4 ; CPU:$E2EE PRG:22EE F0 04 @@ -10293,7 +10293,7 @@ DrawMazeNametable: @E2F4: lda MazeDataPointerBytes+1 ; CPU:$E2F4 PRG:22F4 AD F7 FF - sta $01 ; CPU:$E2F7 PRG:22F7 85 01 + sta WorkPtrLo ; CPU:$E2F7 PRG:22F7 85 01 lda MazeDataPointerBytes ; CPU:$E2F9 PRG:22F9 AD F6 FF sta $00 ; CPU:$E2FC PRG:22FC 85 00 @@ -10313,7 +10313,7 @@ DrawMazeNametable: lda $02 ; CPU:$E305 PRG:2305 A5 02 sta PPUADDR ; CPU:$E307 PRG:2307 8D 06 20 - lda $03 ; CPU:$E30A PRG:230A A5 03 + lda Zp03 ; CPU:$E30A PRG:230A A5 03 sta PPUADDR ; CPU:$E30C PRG:230C 8D 06 20 lda #$16 ; CPU:$E30F PRG:230F A9 16 @@ -10356,7 +10356,7 @@ DrawMazeNametable: iny ; CPU:$E32A PRG:232A 10 bne @E32F ; CPU:$E32B PRG:232B F7 C8 - inc $01 ; CPU:$E32D PRG:232D D0 02 + inc WorkPtrLo ; CPU:$E32D PRG:232D D0 02 ;------------------------------------------------------------------------------ @@ -10368,10 +10368,10 @@ DrawMazeNametable: lda $04 ; CPU:$E32F PRG:232F E6 01 bne @E313 ; CPU:$E331 PRG:2331 A5 04 - lda $03 ; CPU:$E333 PRG:2333 D0 DE + lda Zp03 ; CPU:$E333 PRG:2333 D0 DE clc ; CPU:$E335 PRG:2335 A5 adc #$20 ; CPU:$E336 PRG:2336 03 18 - sta $03 ; CPU:$E338 PRG:2338 69 20 + sta Zp03 ; CPU:$E338 PRG:2338 69 20 lda $02 ; CPU:$E33A PRG:233A 85 03 adc #$00 ; CPU:$E33C PRG:233C A5 02 @@ -10391,9 +10391,9 @@ DrawMazeNametable: sta $00 ; CPU:$E347 PRG:2347 A9 21 lda #$D6 ; CPU:$E349 PRG:2349 85 00 - sta $01 ; CPU:$E34B PRG:234B A9 D6 + sta WorkPtrLo ; CPU:$E34B PRG:234B A9 D6 - lda $47 ; CPU:$E34D PRG:234D 85 01 + lda activePlayerFlag ; CPU:$E34D PRG:234D 85 01 and $46 ; CPU:$E34F PRG:234F A5 47 beq @E359 ; CPU:$E351 PRG:2351 25 46 @@ -10414,7 +10414,7 @@ DrawMazeNametable: lda $00 ; CPU:$E35C PRG:235C 02 20 sta PPUADDR ; CPU:$E35E PRG:235E A5 00 8D - lda $01 ; CPU:$E361 PRG:2361 06 20 + lda WorkPtrLo ; CPU:$E361 PRG:2361 06 20 sta PPUADDR ; CPU:$E363 PRG:2363 A5 01 8D lda MazeNametableDecorationTiles,y ; CPU:$E366 PRG:2366 06 20 B9 @@ -10430,10 +10430,10 @@ DrawMazeNametable: dex ; CPU:$E36C PRG:236C 07 bpl @E36B ; CPU:$E36D PRG:236D 20 CA - lda $01 ; CPU:$E36F PRG:236F 10 FA + lda WorkPtrLo ; CPU:$E36F PRG:236F 10 FA clc ; CPU:$E371 PRG:2371 A5 adc #$20 ; CPU:$E372 PRG:2372 01 18 - sta $01 ; CPU:$E374 PRG:2374 69 20 + sta WorkPtrLo ; CPU:$E374 PRG:2374 69 20 lda #$00 ; CPU:$E376 PRG:2376 85 01 adc $00 ; CPU:$E378 PRG:2378 A9 00 @@ -10480,7 +10480,7 @@ ClearGameplayNametables: ClearGameplayNametablesSecondPass: lda #$01 ; CPU:$E396 PRG:2396 A9 01 - sta $03 ; CPU:$E398 PRG:2398 85 03 + sta Zp03 ; CPU:$E398 PRG:2398 85 03 ;------------------------------------------------------------------------------ @@ -10493,7 +10493,7 @@ InitializeNametableFillCounters: sta $00 ; CPU:$E39C PRG:239C 85 00 lda #$C0 ; CPU:$E39E PRG:239E A9 C0 - sta $01 ; CPU:$E3A0 PRG:23A0 85 01 + sta WorkPtrLo ; CPU:$E3A0 PRG:23A0 85 01 lda #$2D ; CPU:$E3A2 PRG:23A2 A9 2D @@ -10505,17 +10505,17 @@ InitializeNametableFillCounters: FillNametableByte: sta PPUDATA ; CPU:$E3A4 PRG:23A4 8D 07 20 - dec $01 ; CPU:$E3A7 PRG:23A7 C6 01 + dec WorkPtrLo ; CPU:$E3A7 PRG:23A7 C6 01 bne FillNametableByte ; CPU:$E3A9 PRG:23A9 D0 F9 dec $00 ; CPU:$E3AB PRG:23AB C6 00 bpl FillNametableByte ; CPU:$E3AD PRG:23AD 10 F5 - dec $03 ; CPU:$E3AF PRG:23AF C6 03 + dec Zp03 ; CPU:$E3AF PRG:23AF C6 03 bne AdvanceNametableFillPass ; CPU:$E3B1 PRG:23B1 D0 08 lda #$40 ; CPU:$E3B3 PRG:23B3 A9 40 - sta $01 ; CPU:$E3B5 PRG:23B5 85 01 + sta WorkPtrLo ; CPU:$E3B5 PRG:23B5 85 01 lda #$00 ; CPU:$E3B7 PRG:23B7 A9 00 beq FillNametableByte ; CPU:$E3B9 PRG:23B9 F0 E9 @@ -10632,14 +10632,14 @@ DrawGameplayScoreFields: sta $00 ; CPU:$E401 PRG:2401 85 00 lda #$B6 ; CPU:$E403 PRG:2403 A9 B6 - sta $01 ; CPU:$E405 PRG:2405 85 01 + sta WorkPtrLo ; CPU:$E405 PRG:2405 85 01 lda #$80 ; CPU:$E407 PRG:2407 A9 80 sta $04 ; CPU:$E409 PRG:2409 85 04 ldx #$00 ; CPU:$E40B PRG:240B A2 00 - lda $47 ; CPU:$E40D PRG:240D A5 47 + lda activePlayerFlag ; CPU:$E40D PRG:240D A5 47 and $46 ; CPU:$E40F PRG:240F 25 46 beq @E429 ; CPU:$E411 PRG:2411 F0 18 @@ -10657,13 +10657,13 @@ DrawGameplayScoreFields: sta $00 ; CPU:$E41B PRG:241B 85 00 lda #$83 ; CPU:$E41D PRG:241D A9 83 - sta $01 ; CPU:$E41F PRG:241F 85 01 + sta WorkPtrLo ; CPU:$E41F PRG:241F 85 01 lda #$09 ; CPU:$E421 PRG:2421 A9 09 sta $04 ; CPU:$E423 PRG:2423 85 04 lda #$01 ; CPU:$E425 PRG:2425 A9 01 - sta $47 ; CPU:$E427 PRG:2427 85 47 + sta activePlayerFlag ; CPU:$E427 PRG:2427 85 47 ldx #$0C ; CPU:$E429 PRG:2429 A2 0C @@ -10674,7 +10674,7 @@ DrawGameplayScoreFields: ;------------------------------------------------------------------------------ @E429: - lda $47 ; CPU:$E42B PRG:242B A5 47 + lda activePlayerFlag ; CPU:$E42B PRG:242B A5 47 and $46 ; CPU:$E42D PRG:242D 25 46 beq @E436 ; CPU:$E42F PRG:242F F0 05 @@ -10699,24 +10699,24 @@ DrawGameplayScoreFields: lda $00 ; CPU:$E43D PRG:243D A5 00 sta PPUADDR ; CPU:$E43F PRG:243F 8D 06 20 - lda $01 ; CPU:$E442 PRG:2442 A5 01 + lda WorkPtrLo ; CPU:$E442 PRG:2442 A5 01 sta PPUADDR ; CPU:$E444 PRG:2444 8D 06 20 lda ScoreFieldSourcePointerTable,x ; CPU:$E447 PRG:2447 BD 9F E4 sta $02 ; CPU:$E44A PRG:244A 85 02 lda ScoreFieldSourcePointerTable+1,x ; CPU:$E44C PRG:244C BD A0 E4 - sta $03 ; CPU:$E44F PRG:244F 85 03 + sta Zp03 ; CPU:$E44F PRG:244F 85 03 jsr DrawSixDigitScore ; CPU:$E451 PRG:2451 20 74 E4 inx ; CPU:$E454 PRG:2454 E8 inx ; CPU:$E455 PRG:2455 E8 - lda $01 ; CPU:$E456 PRG:2456 A5 01 + lda WorkPtrLo ; CPU:$E456 PRG:2456 A5 01 clc ; CPU:$E458 PRG:2458 18 adc $04 ; CPU:$E459 PRG:2459 65 04 - sta $01 ; CPU:$E45B PRG:245B 85 01 + sta WorkPtrLo ; CPU:$E45B PRG:245B 85 01 lda #$00 ; CPU:$E45D PRG:245D A9 00 adc $00 ; CPU:$E45F PRG:245F 65 00 @@ -10728,7 +10728,7 @@ DrawGameplayScoreFields: cmp #$01 ; CPU:$E467 PRG:2467 C9 01 bne @E46D ; CPU:$E469 PRG:2469 D0 04 - lda $47 ; CPU:$E46B PRG:246B A5 47 + lda activePlayerFlag ; CPU:$E46B PRG:246B A5 47 beq @E473 ; CPU:$E46D PRG:246D F0 04 @@ -10874,8 +10874,8 @@ BuildLegalDirectionList: ldy #$FF ; CPU:$E4B1 PRG:24B1 A0 FF sty $0C ; CPU:$E4B3 PRG:24B3 84 0C - sty $0D ; CPU:$E4B5 PRG:24B5 84 0D - sty $0E ; CPU:$E4B7 PRG:24B7 84 0E + sty Zp0D ; CPU:$E4B5 PRG:24B5 84 0D + sty Zp0E ; CPU:$E4B7 PRG:24B7 84 0E sty $0F ; CPU:$E4B9 PRG:24B9 84 0F iny ; CPU:$E4BB PRG:24BB C8 @@ -10889,7 +10889,7 @@ ScanDirectionCandidate: and #$F8 ; CPU:$E4C2 PRG:24C2 29 F8 beq AcceptDirectionCandidate ; CPU:$E4C4 PRG:24C4 F0 04 - cmp $0B ; CPU:$E4C6 PRG:24C6 C5 0B + cmp pathFallbackValue ; CPU:$E4C6 PRG:24C6 C5 0B bne NextDirectionCandidate ; CPU:$E4C8 PRG:24C8 D0 04 @@ -10903,7 +10903,7 @@ NextDirectionCandidate: cpy #$04 ; CPU:$E4CF PRG:24CF C0 04 bne ScanDirectionCandidate ; CPU:$E4D1 PRG:24D1 D0 E9 - lda $B9,x ; CPU:$E4D3 PRG:24D3 B5 B9 + lda RacketTargetY,x ; CPU:$E4D3 PRG:24D3 B5 B9 clc ; CPU:$E4D5 PRG:24D5 18 adc #$02 ; CPU:$E4D6 PRG:24D6 69 02 and #$03 ; CPU:$E4D8 PRG:24D8 29 03 @@ -10913,7 +10913,7 @@ NextDirectionCandidate: sta $000C,y ; CPU:$E4DD PRG:24DD 99 0C 00 lda #$03 ; CPU:$E4E0 PRG:24E0 A9 03 - sta $0B ; CPU:$E4E2 PRG:24E2 85 0B + sta pathFallbackValue ; CPU:$E4E2 PRG:24E2 85 0B CompactDirectionListPass: @@ -10925,11 +10925,11 @@ CompactDirectionListEntry: cmp #$FF ; CPU:$E4E9 PRG:24E9 C9 FF bne NextDirectionListEntry ; CPU:$E4EB PRG:24EB D0 0B - lda $000D,y ; CPU:$E4ED PRG:24ED B9 0D 00 + lda a:Zp0D,y ; CPU:$E4ED PRG:24ED B9 0D 00 sta $000C,y ; CPU:$E4F0 PRG:24F0 99 0C 00 lda #$FF ; CPU:$E4F3 PRG:24F3 A9 FF - sta $000D,y ; CPU:$E4F5 PRG:24F5 99 0D 00 + sta a:Zp0D,y ; CPU:$E4F5 PRG:24F5 99 0D 00 NextDirectionListEntry: @@ -10937,7 +10937,7 @@ NextDirectionListEntry: cpy #$03 ; CPU:$E4F9 PRG:24F9 C0 03 bne CompactDirectionListEntry ; CPU:$E4FB PRG:24FB D0 E9 - dec $0B ; CPU:$E4FD PRG:24FD C6 0B + dec pathFallbackValue ; CPU:$E4FD PRG:24FD C6 0B bne CompactDirectionListPass ; CPU:$E4FF PRG:24FF D0 E3 rts ; CPU:$E501 PRG:2501 60 @@ -11022,7 +11022,7 @@ InitData_E51F: cpy #$11 ; CPU:$E52B PRG:252B C0 11 bne InitData_E534 ; CPU:$E52D PRG:252D D0 05 - lda $47 ; CPU:$E52F PRG:252F A5 47 + lda activePlayerFlag ; CPU:$E52F PRG:252F A5 47 bne InitData_E534 ; CPU:$E531 PRG:2531 D0 01 rts ; CPU:$E533 PRG:2533 60 @@ -11116,16 +11116,16 @@ Progression_E55F: sta $02 ; CPU:$E561 PRG:2561 85 02 lda #$04 ; CPU:$E563 PRG:2563 A9 04 - sta $03 ; CPU:$E565 PRG:2565 85 03 + sta Zp03 ; CPU:$E565 PRG:2565 85 03 lda #$23 ; CPU:$E567 PRG:2567 A9 23 sta $00 ; CPU:$E569 PRG:2569 85 00 lda #$17 ; CPU:$E56B PRG:256B A9 17 - sta $01 ; CPU:$E56D PRG:256D 85 01 + sta WorkPtrLo ; CPU:$E56D PRG:256D 85 01 lda $46 ; CPU:$E56F PRG:256F A5 46 - and $47 ; CPU:$E571 PRG:2571 25 47 + and activePlayerFlag ; CPU:$E571 PRG:2571 25 47 beq Progression_E57C ; CPU:$E573 PRG:2573 F0 07 lda $00 ; CPU:$E575 PRG:2575 A5 00 @@ -11142,13 +11142,13 @@ Progression_E57C: Progression_E581: - dec $03 ; CPU:$E581 PRG:2581 C6 03 + dec Zp03 ; CPU:$E581 PRG:2581 C6 03 bne Progression_E58A ; CPU:$E583 PRG:2583 D0 07 - lda $01 ; CPU:$E585 PRG:2585 A5 01 + lda WorkPtrLo ; CPU:$E585 PRG:2585 A5 01 clc ; CPU:$E587 PRG:2587 18 adc #$3A ; CPU:$E588 PRG:2588 69 3A - sta $01 ; CPU:$E58A PRG:258A 85 01 + sta WorkPtrLo ; CPU:$E58A PRG:258A 85 01 Progression_E58A: @@ -11156,10 +11156,10 @@ Progression_E58A: jsr Draw2x2Marker ; CPU:$E58E PRG:258E 20 9A E5 - lda $01 ; CPU:$E591 PRG:2591 A5 01 + lda WorkPtrLo ; CPU:$E591 PRG:2591 A5 01 clc ; CPU:$E593 PRG:2593 18 adc #$02 ; CPU:$E594 PRG:2594 69 02 - sta $01 ; CPU:$E596 PRG:2596 85 01 + sta WorkPtrLo ; CPU:$E596 PRG:2596 85 01 bne Progression_E57C ; CPU:$E598 PRG:2598 D0 E2 @@ -11179,7 +11179,7 @@ Draw2x2Marker: lda $00 ; CPU:$E59A PRG:259A A5 00 sta PPUADDR ; CPU:$E59C PRG:259C 8D 06 20 - lda $01 ; CPU:$E59F PRG:259F A5 01 + lda WorkPtrLo ; CPU:$E59F PRG:259F A5 01 sta PPUADDR ; CPU:$E5A1 PRG:25A1 8D 06 20 sty PPUDATA ; CPU:$E5A4 PRG:25A4 8C 07 20 @@ -11190,7 +11190,7 @@ Draw2x2Marker: lda $00 ; CPU:$E5AB PRG:25AB A5 00 sta PPUADDR ; CPU:$E5AD PRG:25AD 8D 06 20 - lda $01 ; CPU:$E5B0 PRG:25B0 A5 01 + lda WorkPtrLo ; CPU:$E5B0 PRG:25B0 A5 01 clc ; CPU:$E5B2 PRG:25B2 18 adc #$20 ; CPU:$E5B3 PRG:25B3 69 20 sta PPUADDR ; CPU:$E5B5 PRG:25B5 8D 06 20 @@ -11229,18 +11229,18 @@ Draw2x2Marker: InitializeLevelProgressDisplay: lda #$00 ; CPU:$E5C1 PRG:25C1 A9 00 - sta $03 ; CPU:$E5C3 PRG:25C3 85 03 - sta $0E ; CPU:$E5C5 PRG:25C5 85 0E + sta Zp03 ; CPU:$E5C3 PRG:25C3 85 03 + sta Zp0E ; CPU:$E5C5 PRG:25C5 85 0E sta $0F ; CPU:$E5C7 PRG:25C7 85 0F lda #$15 ; CPU:$E5C9 PRG:25C9 A9 15 sta $0A ; CPU:$E5CB PRG:25CB 85 0A lda #$11 ; CPU:$E5CD PRG:25CD A9 11 - sta $0D ; CPU:$E5CF PRG:25CF 85 0D + sta Zp0D ; CPU:$E5CF PRG:25CF 85 0D lda #$05 ; CPU:$E5D1 PRG:25D1 A9 05 - sta $0B ; CPU:$E5D3 PRG:25D3 85 0B + sta pathFallbackValue ; CPU:$E5D3 PRG:25D3 85 0B sta $0C ; CPU:$E5D5 PRG:25D5 85 0C lda $68 ; CPU:$E5D7 PRG:25D7 A5 68 @@ -11287,10 +11287,10 @@ InitializeLevelProgressPosition: sta $00 ; CPU:$E5F1 PRG:25F1 85 00 lda #$56 ; CPU:$E5F3 PRG:25F3 A9 56 - sta $01 ; CPU:$E5F5 PRG:25F5 85 01 + sta WorkPtrLo ; CPU:$E5F5 PRG:25F5 85 01 lda $46 ; CPU:$E5F7 PRG:25F7 A5 46 - and $47 ; CPU:$E5F9 PRG:25F9 25 47 + and activePlayerFlag ; CPU:$E5F9 PRG:25F9 25 47 beq InitializeLevelProgressRowCounter ; CPU:$E5FB PRG:25FB F0 07 lda $00 ; CPU:$E5FD PRG:25FD A5 00 @@ -11317,10 +11317,10 @@ DrawNextLevelProgressMarker: dec $04 ; CPU:$E608 PRG:2608 C6 04 bne SelectLevelProgressMarker ; CPU:$E60A PRG:260A D0 07 - lda $01 ; CPU:$E60C PRG:260C A5 01 + lda WorkPtrLo ; CPU:$E60C PRG:260C A5 01 clc ; CPU:$E60E PRG:260E 18 adc #$38 ; CPU:$E60F PRG:260F 69 38 - sta $01 ; CPU:$E611 PRG:2611 85 01 + sta WorkPtrLo ; CPU:$E611 PRG:2611 85 01 ;------------------------------------------------------------------------------ @@ -11339,13 +11339,13 @@ SelectLevelProgressMarker: jsr Draw2x2Marker ; CPU:$E61D PRG:261D 20 9A E5 - ldy $03 ; CPU:$E620 PRG:2620 A4 03 + ldy Zp03 ; CPU:$E620 PRG:2620 A4 03 lda LevelProgressAttributeIndexTable,y ; CPU:$E622 PRG:2622 B9 AE E6 sta $06 ; CPU:$E625 PRG:2625 85 06 lda LevelProgressAttributeIndexTable+1,y ; CPU:$E627 PRG:2627 B9 AF E6 - sta $07 ; CPU:$E62A PRG:262A 85 07 + sta workValue3 ; CPU:$E62A PRG:262A 85 07 ldy $05 ; CPU:$E62C PRG:262C A4 05 @@ -11358,7 +11358,7 @@ SelectLevelProgressMarker: ;------------------------------------------------------------------------------ ShiftLevelProgressAttributeBits: - dec $07 ; CPU:$E631 PRG:2631 C6 07 + dec workValue3 ; CPU:$E631 PRG:2631 C6 07 bmi StoreLevelProgressAttributeBits ; CPU:$E633 PRG:2633 30 04 asl ; CPU:$E635 PRG:2635 0A @@ -11377,13 +11377,13 @@ StoreLevelProgressAttributeBits: ora $0A,y ; CPU:$E63B PRG:263B 19 0A sta $0A,y ; CPU:$E63D PRG:263D 00 99 - lda $01 ; CPU:$E63F PRG:263F 0A 00 + lda WorkPtrLo ; CPU:$E63F PRG:263F 0A 00 clc ; CPU:$E641 PRG:2641 A5 adc #$02 ; CPU:$E642 PRG:2642 01 18 - sta $01 ; CPU:$E644 PRG:2644 69 02 + sta WorkPtrLo ; CPU:$E644 PRG:2644 69 02 - inc $03 ; CPU:$E646 PRG:2646 85 01 - inc $03 ; CPU:$E648 PRG:2648 E6 03 + inc Zp03 ; CPU:$E646 PRG:2646 85 01 + inc Zp03 ; CPU:$E648 PRG:2648 E6 03 inx ; CPU:$E64A PRG:264A E6 @@ -11397,7 +11397,7 @@ StoreLevelProgressAttributeBits: ldx #$23 ; CPU:$E64F PRG:264F 10 B7 - lda $47 ; CPU:$E651 PRG:2651 A2 23 + lda activePlayerFlag ; CPU:$E651 PRG:2651 A2 23 and $46 ; CPU:$E653 PRG:2653 A5 47 beq SetLevelProgressAttributeAddress ; CPU:$E655 PRG:2655 25 46 @@ -11426,7 +11426,7 @@ SetLevelProgressAttributeAddress: ResetAttributeWriteCount: lda #$03 ; CPU:$E667 PRG:2667 A9 03 - sta $01 ; CPU:$E669 PRG:2669 85 01 + sta WorkPtrLo ; CPU:$E669 PRG:2669 85 01 ;------------------------------------------------------------------------------ @@ -11440,7 +11440,7 @@ WriteLevelProgressAttribute: inx ; CPU:$E670 PRG:2670 E8 - dec $01 ; CPU:$E671 PRG:2671 C6 01 + dec WorkPtrLo ; CPU:$E671 PRG:2671 C6 01 bne WriteLevelProgressAttribute ; CPU:$E673 PRG:2673 D0 F6 inc $02 ; CPU:$E675 PRG:2675 E6 02 @@ -11572,10 +11572,10 @@ TransitionInit_E6DD: sta $1E ; CPU:$E708 PRG:2708 85 1E lda #$00 ; CPU:$E70A PRG:270A A9 00 - sta $1F ; CPU:$E70C PRG:270C 85 1F + sta Zp1F ; CPU:$E70C PRG:270C 85 1F lda #$00 ; CPU:$E70E PRG:270E A9 00 - sta $88 ; CPU:$E710 PRG:2710 85 88 + sta PlayerXPosition ; CPU:$E710 PRG:2710 85 88 ldy #$00 ; CPU:$E712 PRG:2712 A0 00 @@ -11615,7 +11615,7 @@ TransitionInit_CopyPalette: ClearPlayfieldNametable: ldx #$20 ; CPU:$E738 PRG:2738 A2 20 - lda $47 ; CPU:$E73A PRG:273A A5 47 + lda activePlayerFlag ; CPU:$E73A PRG:273A A5 47 and $46 ; CPU:$E73C PRG:273C 25 46 beq SetPlayfieldPpuAddress ; CPU:$E73E PRG:273E F0 02 @@ -11648,13 +11648,13 @@ SetPlayfieldPpuAddress: ResetPlayfieldFillCounters: lda #$02 ; CPU:$E751 PRG:2751 A9 02 - sta $01 ; CPU:$E753 PRG:2753 85 01 + sta WorkPtrLo ; CPU:$E753 PRG:2753 85 01 lda #$1C ; CPU:$E755 PRG:2755 A9 1C sta $02 ; CPU:$E757 PRG:2757 85 02 lda #$02 ; CPU:$E759 PRG:2759 A9 02 - sta $03 ; CPU:$E75B PRG:275B 85 03 + sta Zp03 ; CPU:$E75B PRG:275B 85 03 lda #$2D ; CPU:$E75D PRG:275D A9 2D @@ -11667,10 +11667,10 @@ ResetPlayfieldFillCounters: WritePlayfieldFillByte: sta PPUDATA ; CPU:$E75F PRG:275F 8D 07 20 - ldx $01 ; CPU:$E762 PRG:2762 A6 01 + ldx WorkPtrLo ; CPU:$E762 PRG:2762 A6 01 beq AdvancePlayfieldInnerRun ; CPU:$E764 PRG:2764 F0 08 - dec $01 ; CPU:$E766 PRG:2766 C6 01 + dec WorkPtrLo ; CPU:$E766 PRG:2766 C6 01 bne WritePlayfieldFillByte ; CPU:$E768 PRG:2768 D0 F5 lda #$20 ; CPU:$E76A PRG:276A A9 20 @@ -11699,7 +11699,7 @@ AdvancePlayfieldInnerRun: ;------------------------------------------------------------------------------ AdvancePlayfieldOuterRun: - dec $03 ; CPU:$E77A PRG:277A C6 03 + dec Zp03 ; CPU:$E77A PRG:277A C6 03 bne WritePlayfieldFillByte ; CPU:$E77C PRG:277C D0 E1 dec $00 ; CPU:$E77E PRG:277E C6 00 @@ -11722,7 +11722,7 @@ ClearPlayfieldTail: cpx #$40 ; CPU:$E789 PRG:2789 E0 40 bne ClearPlayfieldTail ; CPU:$E78B PRG:278B D0 F8 - lda $87 ; CPU:$E78D PRG:278D A5 87 + lda PlayerFacingDirection ; CPU:$E78D PRG:278D A5 87 cmp #$02 ; CPU:$E78F PRG:278F C9 02 beq DrawPlayfieldSpecialTile ; CPU:$E791 PRG:2791 F0 01 @@ -11737,7 +11737,7 @@ ClearPlayfieldTail: DrawPlayfieldSpecialTile: ldx #$22 ; CPU:$E794 PRG:2794 A2 22 - lda $47 ; CPU:$E796 PRG:2796 A5 47 + lda activePlayerFlag ; CPU:$E796 PRG:2796 A5 47 and $46 ; CPU:$E798 PRG:2798 25 46 beq SetSpecialTilePpuAddress ; CPU:$E79A PRG:279A F0 02 @@ -11791,13 +11791,13 @@ UpdateIntermissionTransition: ;============================================================================== DispatchIntermissionState: - ldy $87 ; CPU:$E7CE PRG:27CE A4 87 + ldy PlayerFacingDirection ; CPU:$E7CE PRG:27CE A4 87 lda IntermissionStateHandlerTable,y ; CPU:$E7D0 PRG:27D0 B9 DD E7 sta $10 ; CPU:$E7D3 PRG:27D3 85 10 lda IntermissionStateHandlerTable+1,y ; CPU:$E7D5 PRG:27D5 B9 DE E7 - sta $11 ; CPU:$E7D8 PRG:27D8 85 11 + sta Zp11 ; CPU:$E7D8 PRG:27D8 85 11 jmp ($0010) ; CPU:$E7DA PRG:27DA 6C 10 00 E3 E7 @@ -11819,13 +11819,13 @@ IntermissionStateHandlerTable: ;============================================================================== DispatchIntermissionPhase: - ldy $88 ; CPU:$E7E3 PRG:27E3 A4 88 + ldy PlayerXPosition ; CPU:$E7E3 PRG:27E3 A4 88 lda IntermissionPhaseHandlerTable,y ; CPU:$E7E5 PRG:27E5 B9 F2 E7 sta $10 ; CPU:$E7E8 PRG:27E8 85 10 lda IntermissionPhaseHandlerTable+1,y ; CPU:$E7EA PRG:27EA B9 F3 E7 - sta $11 ; CPU:$E7ED PRG:27ED 85 11 + sta Zp11 ; CPU:$E7ED PRG:27ED 85 11 jmp ($0010) ; CPU:$E7EF PRG:27EF 6C 10 00 FA E7 @@ -11857,8 +11857,8 @@ UpdateIntermissionPhase0: TransitionSubstate_E802: - inc $88 ; CPU:$E802 PRG:2802 E6 88 - inc $88 ; CPU:$E804 PRG:2804 E6 88 + inc PlayerXPosition ; CPU:$E802 PRG:2802 E6 88 + inc PlayerXPosition ; CPU:$E804 PRG:2804 E6 88 lda #$0C ; CPU:$E806 PRG:2806 A9 0C sta $028C ; CPU:$E808 PRG:2808 8D 8C 02 @@ -11876,7 +11876,7 @@ TransitionSubstate_E802: sta $1A ; CPU:$E81C PRG:281C 85 1A lda #$E0 ; CPU:$E81E PRG:281E A9 E0 - sta $1B ; CPU:$E820 PRG:2820 85 1B + sta Zp1B ; CPU:$E820 PRG:2820 85 1B rts ; CPU:$E822 PRG:2822 60 @@ -11896,8 +11896,8 @@ UpdateIntermissionPhase1: TransitionSubstate_E829: - inc $88 ; CPU:$E829 PRG:2829 E6 88 - inc $88 ; CPU:$E82B PRG:282B E6 88 + inc PlayerXPosition ; CPU:$E829 PRG:2829 E6 88 + inc PlayerXPosition ; CPU:$E82B PRG:282B E6 88 lda #$40 ; CPU:$E82D PRG:282D A9 40 sta $4C ; CPU:$E82F PRG:282F 85 4C @@ -11918,7 +11918,7 @@ TransitionSubstate_E829: sta $1A ; CPU:$E847 PRG:2847 85 1A lda #$00 ; CPU:$E849 PRG:2849 A9 00 - sta $1B ; CPU:$E84B PRG:284B 85 1B + sta Zp1B ; CPU:$E84B PRG:284B 85 1B rts ; CPU:$E84D PRG:284D 60 @@ -11943,19 +11943,19 @@ UpdateIntermissionPhase2: TransitionSubstate_E85D: - inc $88 ; CPU:$E85E PRG:285E E6 88 - inc $88 ; CPU:$E860 PRG:2860 E6 88 + inc PlayerXPosition ; CPU:$E85E PRG:285E E6 88 + inc PlayerXPosition ; CPU:$E860 PRG:2860 E6 88 lda #$01 ; CPU:$E862 PRG:2862 A9 01 sta $1E ; CPU:$E864 PRG:2864 85 1E - sta $22 ; CPU:$E866 PRG:2866 85 22 + sta ghost2Motion ; CPU:$E866 PRG:2866 85 22 sta $26 ; CPU:$E868 PRG:2868 85 26 - sta $2A ; CPU:$E86A PRG:286A 85 2A + sta ghost4Motion ; CPU:$E86A PRG:286A 85 2A lda #$C0 ; CPU:$E86C PRG:286C A9 C0 - sta $1F ; CPU:$E86E PRG:286E 85 1F + sta Zp1F ; CPU:$E86E PRG:286E 85 1F sta $23 ; CPU:$E870 PRG:2870 85 23 - sta $27 ; CPU:$E872 PRG:2872 85 27 + sta FrameCounter ; CPU:$E872 PRG:2872 85 27 sta $2B ; CPU:$E874 PRG:2874 85 2B clc ; CPU:$E876 PRG:2876 18 @@ -12026,13 +12026,13 @@ TransitionSubstate_E8C0: ;============================================================================== DispatchIntermissionState2Phase: - ldy $88 ; CPU:$E8C7 PRG:28C7 A4 88 + ldy PlayerXPosition ; CPU:$E8C7 PRG:28C7 A4 88 lda IntermissionState2PhaseTable,y ; CPU:$E8C9 PRG:28C9 B9 D6 E8 sta $10 ; CPU:$E8CC PRG:28CC 85 10 lda IntermissionState2PhaseTable+1,y ; CPU:$E8CE PRG:28CE B9 D7 E8 - sta $11 ; CPU:$E8D1 PRG:28D1 85 11 + sta Zp11 ; CPU:$E8D1 PRG:28D1 85 11 jmp ($0010) ; CPU:$E8D3 PRG:28D3 6C 10 00 DC E8 @@ -12063,8 +12063,8 @@ UpdateIntermissionState2Phase0: TransitionPhase_E8E4: - inc $88 ; CPU:$E8E4 PRG:28E4 E6 88 - inc $88 ; CPU:$E8E6 PRG:28E6 E6 88 + inc PlayerXPosition ; CPU:$E8E4 PRG:28E4 E6 88 + inc PlayerXPosition ; CPU:$E8E6 PRG:28E6 E6 88 lda #$0C ; CPU:$E8E8 PRG:28E8 A9 0C sta $028C ; CPU:$E8EA PRG:28EA 8D 8C 02 @@ -12082,7 +12082,7 @@ TransitionPhase_E8E4: sta $1A ; CPU:$E8FE PRG:28FE 85 1A lda #$00 ; CPU:$E900 PRG:2900 A9 00 - sta $1B ; CPU:$E902 PRG:2902 85 1B + sta Zp1B ; CPU:$E902 PRG:2902 85 1B rts ; CPU:$E904 PRG:2904 60 @@ -12104,7 +12104,7 @@ UpdateIntermissionState2Phase1: sta $1A ; CPU:$E90E PRG:290E 85 1A lda #$C0 ; CPU:$E910 PRG:2910 A9 C0 - sta $1B ; CPU:$E912 PRG:2912 85 1B + sta Zp1B ; CPU:$E912 PRG:2912 85 1B lda #$42 ; CPU:$E914 PRG:2914 A9 42 sta $028E ; CPU:$E916 PRG:2916 8D 8E 02 @@ -12119,7 +12119,7 @@ UpdateIntermissionState2Phase1: sta $027E ; CPU:$E925 PRG:2925 8D 7E 02 lda #$00 ; CPU:$E928 PRG:2928 A9 00 - sta $22 ; CPU:$E92A PRG:292A 85 22 + sta ghost2Motion ; CPU:$E92A PRG:292A 85 22 sta $23 ; CPU:$E92C PRG:292C 85 23 rts ; CPU:$E92E PRG:292E 60 @@ -12135,10 +12135,10 @@ TransitionPhase_E92D: TransitionPhase_E933: lda #$00 ; CPU:$E934 PRG:2934 A9 00 sta $1A ; CPU:$E936 PRG:2936 85 1A - sta $1B ; CPU:$E938 PRG:2938 85 1B + sta Zp1B ; CPU:$E938 PRG:2938 85 1B - inc $88 ; CPU:$E93A PRG:293A E6 88 - inc $88 ; CPU:$E93C PRG:293C E6 88 + inc PlayerXPosition ; CPU:$E93A PRG:293A E6 88 + inc PlayerXPosition ; CPU:$E93C PRG:293C E6 88 rts ; CPU:$E93E PRG:293E 60 @@ -12162,13 +12162,13 @@ UpdateIntermissionState2Phase2: sta $028E ; CPU:$E94D PRG:294D 8D 8E 02 lda #$40 ; CPU:$E950 PRG:2950 A9 40 - sta $89 ; CPU:$E952 PRG:2952 85 89 + sta PlayerYPosition ; CPU:$E952 PRG:2952 85 89 rts ; CPU:$E954 PRG:2954 60 TransitionPhase_E953: - dec $89 ; CPU:$E955 PRG:2955 C6 89 + dec PlayerYPosition ; CPU:$E955 PRG:2955 C6 89 beq TransitionPhase_E958 ; CPU:$E957 PRG:2957 F0 01 rts ; CPU:$E959 PRG:2959 60 @@ -12187,7 +12187,7 @@ TransitionPhase_E963: sta $028C ; CPU:$E966 PRG:2966 8D 8C 02 lda #$40 ; CPU:$E969 PRG:2969 A9 40 - sta $89 ; CPU:$E96B PRG:296B 85 89 + sta PlayerYPosition ; CPU:$E96B PRG:296B 85 89 rts ; CPU:$E96D PRG:296D 60 @@ -12198,13 +12198,13 @@ TransitionPhase_E963: ; $88 is an even byte offset into the four-entry phase table. ;============================================================================== DispatchIntermissionState4Phase: - ldy $88 ; CPU:$E96E PRG:296E A4 88 + ldy PlayerXPosition ; CPU:$E96E PRG:296E A4 88 lda IntermissionState4PhaseTable,y ; CPU:$E970 PRG:2970 B9 7D E9 sta $10 ; CPU:$E973 PRG:2973 85 10 lda IntermissionState4PhaseTable+1,y ; CPU:$E975 PRG:2975 B9 7E E9 - sta $11 ; CPU:$E978 PRG:2978 85 11 + sta Zp11 ; CPU:$E978 PRG:2978 85 11 jmp ($0010) ; CPU:$E97A PRG:297A 6C 10 00 85 E9 @@ -12232,8 +12232,8 @@ UpdateIntermissionState4Phase0: rts ; CPU:$E98C PRG:298C 60 TransitionPhase_E98D: - inc $88 ; CPU:$E98D PRG:298D E6 88 - inc $88 ; CPU:$E98F PRG:298F E6 88 + inc PlayerXPosition ; CPU:$E98D PRG:298D E6 88 + inc PlayerXPosition ; CPU:$E98F PRG:298F E6 88 lda #$4C ; CPU:$E991 PRG:2991 A9 4C sta $028C ; CPU:$E993 PRG:2993 8D 8C 02 @@ -12251,7 +12251,7 @@ TransitionPhase_E98D: sta $1A ; CPU:$E9A7 PRG:29A7 85 1A lda #$00 ; CPU:$E9A9 PRG:29A9 A9 00 - sta $1B ; CPU:$E9AB PRG:29AB 85 1B + sta Zp1B ; CPU:$E9AB PRG:29AB 85 1B rts ; CPU:$E9AD PRG:29AD 60 @@ -12269,8 +12269,8 @@ UpdateIntermissionState4Phase1: rts ; CPU:$E9B3 PRG:29B3 60 TransitionPhase_E9B4: - inc $88 ; CPU:$E9B4 PRG:29B4 E6 88 - inc $88 ; CPU:$E9B6 PRG:29B6 E6 88 + inc PlayerXPosition ; CPU:$E9B4 PRG:29B4 E6 88 + inc PlayerXPosition ; CPU:$E9B6 PRG:29B6 E6 88 lda #$28 ; CPU:$E9B8 PRG:29B8 A9 28 sta $4C ; CPU:$E9BA PRG:29BA 85 4C @@ -12291,7 +12291,7 @@ TransitionPhase_E9B4: sta $1A ; CPU:$E9D2 PRG:29D2 85 1A lda #$00 ; CPU:$E9D4 PRG:29D4 A9 00 - sta $1B ; CPU:$E9D6 PRG:29D6 85 1B + sta Zp1B ; CPU:$E9D6 PRG:29D6 85 1B rts ; CPU:$E9D8 PRG:29D8 60 @@ -12313,8 +12313,8 @@ UpdateIntermissionState4Phase2: rts ; CPU:$E9E8 PRG:29E8 60 TransitionPhase_E9E8: - inc $88 ; CPU:$E9E9 PRG:29E9 E6 88 - inc $88 ; CPU:$E9EB PRG:29EB E6 88 + inc PlayerXPosition ; CPU:$E9E9 PRG:29E9 E6 88 + inc PlayerXPosition ; CPU:$E9EB PRG:29EB E6 88 lda #$4C ; CPU:$E9ED PRG:29ED A9 4C sta $028D ; CPU:$E9EF PRG:29EF 8D 8D 02 @@ -12332,7 +12332,7 @@ TransitionPhase_E9E8: sta $1E ; CPU:$EA03 PRG:2A03 85 1E lda #$00 ; CPU:$EA05 PRG:2A05 A9 00 - sta $1F ; CPU:$EA07 PRG:2A07 85 1F + sta Zp1F ; CPU:$EA07 PRG:2A07 85 1F rts ; CPU:$EA09 PRG:2A09 60 @@ -12382,13 +12382,13 @@ UpdateTransitionObjectPositions: sta $00 ; CPU:$EA1B PRG:2A1B 85 00 lda #$00 ; CPU:$EA1D PRG:2A1D A9 00 - sta $01 ; CPU:$EA1F PRG:2A1F 85 01 + sta WorkPtrLo ; CPU:$EA1F PRG:2A1F 85 01 lda #$74 ; CPU:$EA21 PRG:2A21 A9 74 sta $02 ; CPU:$EA23 PRG:2A23 85 02 lda #$02 ; CPU:$EA25 PRG:2A25 A9 02 - sta $03 ; CPU:$EA27 PRG:2A27 85 03 + sta Zp03 ; CPU:$EA27 PRG:2A27 85 03 ldx #$00 ; CPU:$EA29 PRG:2A29 A2 00 @@ -12496,18 +12496,18 @@ AdvanceTransitionObjectPointers: adc #$04 ; CPU:$EA77 PRG:2A77 69 04 sta $00 ; CPU:$EA79 PRG:2A79 85 00 - lda $01 ; CPU:$EA7B PRG:2A7B A5 01 + lda WorkPtrLo ; CPU:$EA7B PRG:2A7B A5 01 adc #$00 ; CPU:$EA7D PRG:2A7D 69 00 - sta $01 ; CPU:$EA7F PRG:2A7F 85 01 + sta WorkPtrLo ; CPU:$EA7F PRG:2A7F 85 01 lda $02 ; CPU:$EA81 PRG:2A81 A5 02 clc ; CPU:$EA83 PRG:2A83 18 adc #$04 ; CPU:$EA84 PRG:2A84 69 04 sta $02 ; CPU:$EA86 PRG:2A86 85 02 - lda $03 ; CPU:$EA88 PRG:2A88 A5 03 + lda Zp03 ; CPU:$EA88 PRG:2A88 A5 03 adc #$00 ; CPU:$EA8A PRG:2A8A 69 00 - sta $03 ; CPU:$EA8C PRG:2A8C 85 03 + sta Zp03 ; CPU:$EA8C PRG:2A8C 85 03 inx ; CPU:$EA8E PRG:2A8E E8 @@ -12525,13 +12525,13 @@ AdvanceTransitionObjectPointers: ;============================================================================== DispatchTransitionAnimation: - ldy $87 ; CPU:$EA94 PRG:2A94 A4 87 + ldy PlayerFacingDirection ; CPU:$EA94 PRG:2A94 A4 87 lda TransitionAnimationHandlerTable,y ; CPU:$EA96 PRG:2A96 B9 A3 EA sta $10 ; CPU:$EA99 PRG:2A99 85 10 lda TransitionAnimationHandlerTable+1,y ; CPU:$EA9B PRG:2A9B B9 A4 EA - sta $11 ; CPU:$EA9E PRG:2A9E 85 11 + sta Zp11 ; CPU:$EA9E PRG:2A9E 85 11 jmp ($0010) ; CPU:$EAA0 PRG:2AA0 6C 10 00 A9 EA @@ -12551,13 +12551,13 @@ TransitionAnimationHandlerTable: ;============================================================================== DispatchTransitionAnimationPhase: - ldy $88 ; CPU:$EAA9 PRG:2AA9 A4 88 + ldy PlayerXPosition ; CPU:$EAA9 PRG:2AA9 A4 88 lda TransitionAnimationPhaseTable,y ; CPU:$EAAB PRG:2AAB B9 B8 EA sta $10 ; CPU:$EAAE PRG:2AAE 85 10 lda TransitionAnimationPhaseTable+1,y ; CPU:$EAB0 PRG:2AB0 B9 B9 EA - sta $11 ; CPU:$EAB3 PRG:2AB3 85 11 + sta Zp11 ; CPU:$EAB3 PRG:2AB3 85 11 jmp ($0010) ; CPU:$EAB5 PRG:2AB5 6C 10 00 C0 EA @@ -12580,9 +12580,9 @@ TransitionAnimationPhaseTable: ;============================================================================== UpdateTransitionAnimationFrame: - inc $B7 ; CPU:$EAC0 PRG:2AC0 E6 B7 + inc PlayerPoseFlags ; CPU:$EAC0 PRG:2AC0 E6 B7 - lda $B7 ; CPU:$EAC2 PRG:2AC2 A5 B7 + lda PlayerPoseFlags ; CPU:$EAC2 PRG:2AC2 A5 B7 and #$07 ; CPU:$EAC4 PRG:2AC4 29 07 tay ; CPU:$EAC6 PRG:2AC6 A8 @@ -12677,9 +12677,9 @@ AnimationSubstate_EB02: ;============================================================================== UpdateTransitionAnimationPattern: - inc $B7 ; CPU:$EB04 PRG:2B04 E6 B7 + inc PlayerPoseFlags ; CPU:$EB04 PRG:2B04 E6 B7 - lda $B7 ; CPU:$EB06 PRG:2B06 A5 B7 + lda PlayerPoseFlags ; CPU:$EB06 PRG:2B06 A5 B7 and #$07 ; CPU:$EB08 PRG:2B08 29 07 tay ; CPU:$EB0A PRG:2B0A A8 @@ -12726,13 +12726,13 @@ TransitionAnimationPatternTiles: ;============================================================================== DispatchTransitionAnimationState2: - ldy $88 ; CPU:$EB3D PRG:2B3D A4 88 + ldy PlayerXPosition ; CPU:$EB3D PRG:2B3D A4 88 lda TransitionAnimationState2Table,y ; CPU:$EB3F PRG:2B3F B9 4C EB sta $10 ; CPU:$EB42 PRG:2B42 85 10 lda TransitionAnimationState2Table+1,y ; CPU:$EB44 PRG:2B44 B9 4D EB - sta $11 ; CPU:$EB47 PRG:2B47 85 11 + sta Zp11 ; CPU:$EB47 PRG:2B47 85 11 jmp ($0010) ; CPU:$EB49 PRG:2B49 6C 10 00 C0 EA @@ -12782,13 +12782,13 @@ AnimationState2_EB68: ; $EB6D-$EB7B: Gameplay Animation State $04 Dispatcher ;============================================================================== DispatchTransitionAnimationState4: - ldy $88 ; CPU:$EB6D PRG:2B6D A4 88 + ldy PlayerXPosition ; CPU:$EB6D PRG:2B6D A4 88 lda TransitionAnimationState4Table,y ; CPU:$EB6F PRG:2B6F B9 7C EB sta $10 ; CPU:$EB72 PRG:2B72 85 10 lda TransitionAnimationState4Table+1,y ; CPU:$EB74 PRG:2B74 B9 7D EB - sta $11 ; CPU:$EB77 PRG:2B77 85 11 + sta Zp11 ; CPU:$EB77 PRG:2B77 85 11 jmp ($0010) ; CPU:$EB79 PRG:2B79 6C 10 00 C0 EA @@ -13187,11 +13187,11 @@ rts ; CPU:$EECF PRG:2ECF 60 InitializeAudioChannels: lda #$00 ; CPU:$EED0 PRG:2ED0 A9 00 sta audioChannelFlags ; CPU:$EED2 PRG:2ED2 85 F8 - sta $F9 ; CPU:$EED4 PRG:2ED4 85 F9 - sta $FA ; CPU:$EED6 PRG:2ED6 85 FA - sta $FB ; CPU:$EED8 PRG:2ED8 85 FB + sta AudioSequenceIndex ; CPU:$EED4 PRG:2ED4 85 F9 + sta AudioSequenceOffset ; CPU:$EED6 PRG:2ED6 85 FA + sta AudioStreamPosition ; CPU:$EED8 PRG:2ED8 85 FB sta audioChannelOffset ; CPU:$EEDA PRG:2EDA 85 FD - sta $FF ; CPU:$EEDC PRG:2EDC 85 FF + sta AudioRequestFlags3 ; CPU:$EEDC PRG:2EDC 85 FF lda #$F8 ; CPU:$EEDE PRG:2EDE A9 F8 sta audioIndirectPtr ; CPU:$EEE0 PRG:2EE0 85 FE @@ -13461,7 +13461,7 @@ DecodeAudioCommand: sta $FE ; CPU:$EFB7 PRG:2FB7 85 FE lda AudioFrequencyLookupTable+1,x ; CPU:$EFB9 PRG:2FB9 BD E9 F0 - sta $FF ; CPU:$EFBC PRG:2FBC 85 FF + sta AudioRequestFlags3 ; CPU:$EFBC PRG:2FBC 85 FF pla ; CPU:$EFBE PRG:2FBE 68 @@ -13477,7 +13477,7 @@ DecodeAudioCommand: ShiftAudioFrequencyMask: lsr $FE ; CPU:$EFC4 PRG:2FC4 46 - ror $FF ; CPU:$EFC5 PRG:2FC5 FE + ror AudioRequestFlags3 ; CPU:$EFC5 PRG:2FC5 FE dex ; CPU:$EFC6 PRG:2FC6 66 bne ShiftAudioFrequencyMask ; CPU:$EFC7 PRG:2FC7 FF CA @@ -13499,7 +13499,7 @@ ApplyAudioFrequencyMask: ora $FE ; CPU:$EFD5 PRG:2FD5 05 FE sta ($F2),y ; CPU:$EFD7 PRG:2FD7 91 F2 - lda $FF ; CPU:$EFD9 PRG:2FD9 A5 FF + lda AudioRequestFlags3 ; CPU:$EFD9 PRG:2FD9 A5 FF dey ; CPU:$EFDB PRG:2FDB 88 sta ($F2),y ; CPU:$EFDC PRG:2FDC 91 F2 @@ -13585,7 +13585,7 @@ DispatchAudioCommand: sta $FE ; CPU:$F014 PRG:3014 85 FE lda AudioCommandHandlerTable+1,x ; CPU:$F016 PRG:3016 BD 1F F0 - sta $FF ; CPU:$F019 PRG:3019 85 FF + sta AudioRequestFlags3 ; CPU:$F019 PRG:3019 85 FF jmp ($00FE) ; CPU:$F01B PRG:301B 6C FE 00 3E F0 @@ -13784,7 +13784,7 @@ FetchAudioSequenceByte: iny ; CPU:$F0CD PRG:30CD C8 lda ($F2),y ; CPU:$F0CE PRG:30CE B1 F2 - sta $FF ; CPU:$F0D0 PRG:30D0 85 FF + sta AudioRequestFlags3 ; CPU:$F0D0 PRG:30D0 85 FF ldx #$00 ; CPU:$F0D2 PRG:30D2 A2 00 @@ -13798,7 +13798,7 @@ FetchAudioSequenceByte: adc #$01 ; CPU:$F0DE PRG:30DE F2 A5 sta ($F2),y ; CPU:$F0E0 PRG:30E0 FF 69 - lda $FF ; CPU:$F0E2 PRG:30E2 00 C8 + lda AudioRequestFlags3 ; CPU:$F0E2 PRG:30E2 00 C8 adc #$00 ; CPU:$F0E4 PRG:30E4 91 F2 iny ; CPU:$F0E6 PRG:30E6 68 diff --git a/TODO.md b/TODO.md index 4b574d6..08216c4 100644 --- a/TODO.md +++ b/TODO.md @@ -20,36 +20,69 @@ A build that assembles but does not print that message is a failure. Requires Two tiers exist, and the difference is real: -- **Top level (17 projects)** — `make` compares the whole ROM against `copilot/rom.nes`. -- **`_wip/` (19 projects)** — `make` only runs `cmp reconstructed_prg.bin prg.bin`. +- **Top level (19 projects)** — `make` compares the whole ROM against `copilot/rom.nes`. +- **`_wip/` (17 projects)** — `make` only runs `cmp reconstructed_prg.bin prg.bin`. Header and CHR are **not** proven for those. Promotion means adding `copilot/rom.nes`, switching to a whole-ROM compare, and changing `../../../_tools/` to `../../_tools/` in the Makefile. A promoted project also - needs `header.s`, `chr.s` and a HEADER/PRG/CHR `linker.cfg`, which a Pass-0 - skeleton does not carry — `Lunar Pool (U)` (2026-10-18) is the worked example. + needs `header.s`, `chr.s` and a HEADER/PRG/CHR `linker.cfg`, which no `_wip/` + project carries (they keep the header/CHR only as the raw `header.bin`/`chr.bin` + splits) — `Lunar Pool (U)` (2026-10-18) and `Donkey Kong (JU)` + (2026-10-19) are the worked examples. DK (JU) needed no `_tools` path change: + its Makefile never referenced `_tools/`, and it has no `make regen` target. ## Current state -- 18 top-level projects, all byte-identical (Lunar Pool promoted 2026-10-18). -- 19 `_wip/` projects, all PRG-identical. `Pyramid (U)` is the only one with Pass 1. -- 9 commits ahead of `origin/master`, nothing pushed. -- `_tools/verify_pass1.py` rebuilds and re-traces everything: **all 36 faithful, none - truncated**. The earlier-reported re-trace crash on `MUSCLE (U)` / `Donkey Kong Jr. (JU)` - was a false alarm — `nesdis.operand_value()` already handles the `a:` prefix via - `token.removeprefix("a:").lstrip("$")`. The `make` half was always working. +- 19 top-level projects, all byte-identical (Lunar Pool promoted 2026-10-18, + Donkey Kong (JU) promoted 2026-10-19 after Pass 3). +- 17 `_wip/` projects, all PRG-identical and all at Pass 1 or beyond. `Pyramid (U)` + is *not* the only one with Pass 1 done — every one has it. Pass 2 is complete for + Donkey Kong Jr. Math, Duck Hunt, Ice Climber (JE), Ice Climber (U) and Pinball; + Golf (JU) and Mario Bros (JU) have substantial Pass 2 work. The inventory rows in + `OVERVIEW.md` are authoritative. +- Local `master` is ahead of `origin/master`; nothing pushed. +- `_tools/verify_pass1.py` covers the **19 top-level projects** (it selects folders + with `copilot/rom.nes`), not all 36 — the `_wip/` tier is checked by plain `make`. + Current run (2026-10-19): every one builds, all canonical, **no truncated or + unfaithful Pass 1**. The earlier-reported re-trace crash on `MUSCLE (U)` / + `Donkey Kong Jr. (JU)` was a false alarm — `nesdis.operand_value()` already handles + the `a:` prefix via `token.removeprefix("a:").lstrip("$")`. The `make` half was + always working. ```bash -python3 _tools/verify_pass1.py # all projects -python3 _tools/verify_pass1.py "MUSCLE (U)" # one project +python3 _tools/verify_pass1.py # all 19 top-level projects +python3 _tools/verify_pass1.py "MUSCLE (U)" # one project (top-level only) ``` -- **Audit comment standardization complete (2026-10-19):** All 18 top-level projects now +- **Audit comment standardization complete (2026-10-19):** All 19 top-level projects now use the canonical `; CPU:$XXXX PRG:XXXX AA BB` format. - CIRCUS: fixed 4,427 comments (`CPU:XXXX` → `CPU:$XXXX`) - Excitebike (JU): fixed 48 double-semicolon comments (`; state $XX ; CPU:...`) - 9 projects received canonical comments via `_tools/audit_comment_tool.py`: Balloon Fight, Baseball, Bomberman, Burger Time, Clu Clu Land, Defender 2, Donkey Kong 3, Donkey Kong Jr., Tennis +- **Pass 3 symbol application complete (2026-10-19):** All 19 top-level projects now + have `_tools/apply_symbols.py` run on them, substituting `symbols.inc`/`locals.inc` + names into `prg.s` operands: + - Balloon Fight (JU): 125 hardware + 797/813 ZP (16 `$13` residue) + - Baseball (UE): 121 operands (85 single + 36 hardware) + - Bomberman (U): 354 single + 8 site-resolved (already applied) + - Burger Time (U): already applied + - Clu Clu Land (JU): already applied + - Defender 2 (U): already applied + - Donkey Kong 3 (JUE): already applied + - Donkey Kong Jr. (JU): already applied + - CIRCUS: 118 operands (38 single + 80 hardware; 23 multi-alias residue) + - Wild Gunman (U): 76 operands (11 single + 65 hardware) + - Joypad Test Cartridge (U): 47 hardware + - NES PowerPad Test Card (U): 89 hardware + - MUSCLE (U): 220 operands (91 single + 129 hardware) + - Lunar Pool (U): 45 operands (18 single + 27 hardware) + - Donkey Kong (JU): 75 operands (17 single + 58 hardware) + - Tennis (JU): 18 single + - Pac-Man (USA) (Namco): 524 single (727 multi-alias residue) + - Urban Champion (JU): 70 operands (4 single + 66 hardware) + - Excitebike (JU): skipped — inline defs in `prg.s` conflict with `locals.inc` --- @@ -84,12 +117,13 @@ The only top-level project whose Pass 3 was undone; now complete. `_wip/Mario Bros (JU)/`. Pass 1 complete: **72.2% code** (5,735 instructions), byte accounting exact, BYTE-IDENTICAL. -**Pass 2 substantial — 252 subroutine entry points named:** -- **90 semantic names**: audio/sound routines in `$F8xx-$F9xx` (clearly +**Pass 2 substantial — 262 call entry points named** (verified 2026-10-19; the +earlier "252 (90 + 165)" did not match the file): +- **39 semantic names**: audio/sound routines in `$F8xx-$F9xx` (clearly identifiable from APU register writes), gameplay helpers like `CheckZpB3Return`, `CheckRangeReturn012`, `ToggleZpFC_Bit3` -- **165 address-based names** (`SubCxxxx`) for the remainder -- All 252 `jsr`/`jmp` targets resolved from raw `$XXXX` to labels +- **223 address-based names** (`SubCxxxx`) for the remainder +- All 478 `jsr`/`jmp` call sites resolved from raw `$XXXX` to labels - Zero raw `$XXXX` call operands remain **667 `Label_Cxxxx` internal branch targets remain** — local control-flow @@ -114,9 +148,10 @@ the whole-ROM level. The split was re-derived against a Mesen Code Data Logger capture (10,028 bytes Code = 61.2%); the flat tracer had undercounted by 1,738 bytes of executed code and overcounted 100 bytes of data as instructions. -**Promotion detail worth reusing:** a Pass-0 skeleton has no `header.s`, `chr.s` or -HEADER/PRG/CHR `linker.cfg`, so promotion is not just a symlink and a `cmp` edit — -copy the shape from `Burger Time (U)/copilot/` (`header.s`/`chr.s` are one-line +**Promotion detail worth reusing:** no `_wip/` project has `header.s`, `chr.s` or a +HEADER/PRG/CHR `linker.cfg` (the header and CHR stay as the raw `header.bin`/`chr.bin` +splits), so promotion is not just a symlink and a `cmp` edit — copy the shape from +`Burger Time (U)/copilot/` (`header.s`/`chr.s` are one-line `.incbin`s; the linker needs `HEADER: start = $0000, size = $0010` before PRG). Result here: `reconstructed.nes` 24,592 bytes, SHA-256 `6da37fd3…c8a1`, equal to the original `Lunar Pool (U).nes`. @@ -217,7 +252,7 @@ original `Lunar Pool (U).nes`. ### 3. Audit comments for Excitebike — **COMPLETE** (2026-10-19) -All 5147 instruction lines in Excitebike (JU) now carry canonical +All 5,376 instruction lines in Excitebike (JU) now carry canonical `; CPU:\$XXXX PRG:XXXX AA BB` audit comments. The `_tools/audit_comment_tool.py` uses `nesdis.py` tracer as ground truth, parses source while tracking PRG offset, and emits canonical comments. Successfully applied to all 10 @@ -230,18 +265,67 @@ top-level projects that lacked comments. message **and** every comment's byte list must match `prg.bin` at the stated offset. A wrong offset that still assembles is the failure mode to watch. -### 4. Projects with `Label_` residue +### 4. `Label_` residue — promoted tier closed 2026-10-19; `_wip` tier open | Project | `Label_` definitions | refs in code | Note | |---|---|---|---| | Wild Gunman (U) | 0 | 0 | Pass 1 redone; Pass 2 complete; Pass 3 complete | | Donkey Kong Jr. (JU) | 0 | 0 | Pass 2 complete (2026-10-19) | -| Balloon Fight (JU) | 0 | 0 | Pass 2 complete (2026-10-19) | - -All 18 top-level projects have **zero** `Label_` and are Pass 3 complete. -Note these counts are address-derived labels only — some are legitimately +| Balloon Fight (JU) | 0 | 0 | Pass 2 complete (2026-10-19); Pass 3 symbols applied — 16 `$13` operands left numeric | +| Donkey Kong (JU) | 0 | 0 | Pass 2 complete (2026-10-19); Pass 3 complete; promoted 2026-10-19 | +| **All 19 promoted** | **0** | **0** | **All Pass 3 complete, symbols applied 2026-10-19** | +Note these counts were address-derived labels only — some were legitimately internal branch targets and may never deserve a semantic name. +**Balloon Fight (JU) Pass 3 symbol application (2026-10-19).** `copilot/prg.s` now uses +the names from `symbols.inc` and `locals.inc` for every operand they define: all **125** +hardware-register operands are symbolic, and **797 of 813** zero-page/RAM operands are +symbolic. `_tools/apply_symbols.py` does the substitution (`--sites` carries the +per-routine choice for addresses that carry several names, since 15 addresses in +`locals.inc` have 2–3 aliases). The **16 residue** operands are all `$13`, used as a +plain high-byte scratch beside `Temp12`; its aliases (`ReverseRecordIndex`, +`CollisionDeltaY`, `MotionDeltaHi`) describe other routines, so those operands were left +numeric rather than guessed. A neutral `Temp13 = $13` in `locals.inc` would close them. +Rebuild stays byte-identical. + +**All 19 top-level projects now have symbols applied (2026-10-19).** See the Current state section above for the per-project breakdown. Excitebike (JU) was skipped due to inline `prg.s` definitions conflicting with `locals.inc` values. + +The `_wip` tier is still open. All 17 `_wip/` projects carry address-based +`Label_` definitions (**192–971 each, 11,126 in total**) and none has semantic +zero-page aliases. Five project headers and five inventory rows used to read "Pass 2 +complete"; they had counted their *draft map's rows* rather than names actually +present in `prg.s`, and were corrected 2026-10-19 (the `_wip` OVERVIEWs have the +per-project audits): + +| Project | named / total label defs | `Label_` left | drafted map (rows / applied / stale / **applicable**) | +|---|---|---|---| +| Pinball (JU) | 180 / 681 | 501 | 210 / 179 / 17 / **0** | +| Mario Bros (JU) | 270 / 937 | 667 | none (262 call targets: 39 semantic + 223 `SubC`) | +| Ice Climber (JE) | 76 / 973 | 897 | 255 / 76 / 96 / **0** | +| Donkey Kong Jr. Math (U) | 64 / 1,035 | 971 | 243 / 62 / 100 / **0** | +| Duck Hunt (JUE) | 31 / 472 | 441 | 272 / 31 / 210 conflicts / **0** | +| Ice Climber (U) | 2 / 973 | 971 | none — Pass 2 not started | + +**The drafted maps are not applicable.** Auditing every row by address against the +committed split: a large fraction point at addresses that are **not instruction +boundaries** (100/243 DK Jr. Math, 96/255 Ice Climber (JE), 17/210 Pinball) — they were +built against an older code/data split — while most of the rest are unlabelled +instruction boundaries that **no operand in `prg.s` references**, or (Duck Hunt) +competing names for the same label (`Label_C2BF` alone carries 205 candidates). +Across all four maps the number of rows that are both insertable *and* corroborated by +control flow is **zero**. Pass 2 here means deriving a fresh map from the committed +split (routine entries + `_Block[_n]` internal branch targets, as done for +`Donkey Kong (JU)`), not applying these files. `Pinball (JU)` also has 40 Pass 3 +data-region names drafted in `data_regions.tsv` and a `pinball_zp_map.tsv`, none applied. + +**Donkey Kong (JU) Pass 2 resolution (2026-10-19):** the last 919 address-derived +definitions were named — **102** new semantic routine names, **217** `SubC` entry +names (honest residue, matching `Golf (JU)`/`Mario Bros (JU)` practice) and **600** +derived `_Block[_n]` internal branch targets. What remains, if anything, is +behavioral naming rather than address-derived labels: the 217 `SubC` routines, the +145 zero-page slots in `locals.inc` (still neutral `ZpXX`), and the 407 unapplied `zp` +proposals in `dk_full_map.tsv`. + ### 5. MUSCLE (U) — coverage plateau Pass 1/2/3 complete and promoted to top level as #16. The stage-payload trace @@ -259,6 +343,47 @@ plateaus at **~41% of `$B0FB–$BEBF`** and will not go higher by cycling stages - Two corrections recorded: `$0326` is **not** a level byte (never leaves `$00` even in a confirmed match), and `$0320` is a boolean, not a screen-state machine. +### 6. Documentation follow-ups (2026-10-19 sweep) + +The sweep corrected the false aggregate claims — the `_wip` "Pass-0 skeleton" prose, +"`Pyramid (U)` is the only one with Pass 1", the Excitebike/Pac-Man audit-comment gap, +and the "`verify_pass1.py` checks all 36" scope — and normalized every project's +mirroring label to the header-byte convention. **All 19 top-level projects now also +have Pass 3 symbols applied (2026-10-19).** What the sweep did **not** do: + +- **The 11 stale `_wip/` project `OVERVIEW.md` files** (Hogan's Alley, Ice Climber (U), + Lode Runner, Mario Bros, Millipede, both Pac-Man, both Popeye, both Raid) were + retitled and restatused to match their real sources, but still lack the power-on + flow analysis the top-level `OVERVIEW.md`s carry — that is Pass-1 analysis work per + project, not a doc edit. +- **`Donkey Kong 3 (JUE)` has no top-level `OVERVIEW.md` at all** (root line 3 now + says so); writing it needs the same flow analysis. +- **`Golf (JU)` and `Pyramid (U)` still use pre-canonical audit-comment spellings** + (`; C007: AD 02 20` and `; PRG:$172E 48`). `audit_comment_tool.py` can bring them to + canonical, but it has only been run on top-level projects. +- **Hogan's Alley's Pass 1 seed list is suspect.** Its `prg.s` header lists 55 routine + entries "recovered from table references"; `$E9F1` turned out to be a data-table + *base* (`lda $E9F1,x`), not a dispatch entry, and was forced back to data — the sole + build break found in the sweep (2026-10-19). 31 of the remaining 54 have no direct + `jsr`/`jmp` reference either, which is expected for indirect-dispatch targets but + leaves room for more table-base false positives. Settle with `cdl_reclass.py`. +- **Five `_wip` "Pass 2 complete" claims were false and are now corrected** (Donkey + Kong Jr. Math, Duck Hunt, Ice Climber (JE), Ice Climber (U), Pinball) in both the + project `OVERVIEW.md`s and the root inventory rows. Each had counted its *draft + map's rows* rather than names actually present in `prg.s`, and had described the + `locals.inc` count of **neutral `ZpXX` slots** as "zero-page semantic aliases". + Ice Climber (U) was worst: the sweep itself restated it "Pass 2 complete" while + describing its 971 `Label_` definitions in the same paragraph — a copy-paste from + (JE), and `(U)` has no map file at all. The drafted maps were then audited **row by + row against the committed split** and are **not applicable** (0 of 210–272 rows in + each are both insertable and referenced) — see §4 for the table and the method. +- **Mario Bros' entry-point counts were verified wrong** and corrected in the root + index, §2 and its `OVERVIEW.md`: the docs said "252 entry points (90 semantic + 165 + `SubCxxxx`) / 477 sites / 156 neutral `ZpXX`"; `prg.s` actually holds **262** distinct + `jsr`/`jmp` targets (39 semantic + 223 `SubC`), **478** call sites, and **151** + neutral slots. Nothing had changed in `prg.s` since the initial commit, so the old + numbers were never right. + --- ## Gotchas that will bite you @@ -336,7 +461,7 @@ These cost real time this session. All are recorded so they don't cost it twice. - Every instruction carries a trailing `; CPU:$XXXX PRG:XXXX AA BB` comment with PRG offset and exact emitted bytes. **This is the byte-identity audit trail.** - Preserve it even while renaming labels or restructuring files. **All 18 top-level + Preserve it even while renaming labels or restructuring files. **All 19 top-level projects now use this canonical format** (standardized 2026-10-19). - Unreached or unresolved bytes stay as `.byte`/`.word`/`.incbin` with ROM provenance. Never delete or reformat them away. @@ -369,3 +494,8 @@ These cost real time this session. All are recorded so they don't cost it twice. Data Logger capture (dry run by default; `--apply` rewrites `prg.s`, then `make` must still print BYTE-IDENTICAL). Its docstring covers capture and the safety rules. - `_tools/bytecode_dis.py`, `pass2.py`, `trace_stage_payload.py` — per-pass helpers. +- `_tools/apply_symbols.py` — Pass 3 substitution: replaces numeric operands in `prg.s` + with the names from `symbols.inc`/`locals.inc`. Multi-alias addresses need a + `--sites linename` file (per-routine resolution); unlisted ones are reported as + residue. Dry run by default, `--write` applies, and the audit comments are untouched. + Worked example: `Balloon Fight (JU)`. diff --git a/Tennis (JU)/OVERVIEW.md b/Tennis (JU)/OVERVIEW.md index 6dbd1bb..f5a4c73 100644 --- a/Tennis (JU)/OVERVIEW.md +++ b/Tennis (JU)/OVERVIEW.md @@ -14,7 +14,7 @@ This document describes the execution flow of the disassembled Tennis (JU) PRG b | Mirroring | Vertical | | PRG bank start | CPU $C000 | | Source file | `copilot/prg.s` (9,268 lines) | -| Output | `reconstructed_prg.bin` (16,384 bytes) | +| Output | `reconstructed.nes` (whole ROM: 16-byte header + 16,384-byte PRG + 8,192-byte CHR) | ### Interrupt vectors (CPU $FFFA–$FFFF) @@ -30,7 +30,7 @@ This document describes the execution flow of the disassembled Tennis (JU) PRG b `make` in `copilot/` assembles `prg.s` with `ca65`, links with `ld65`, and verifies against `prg.bin`. -**Verification result: BYTE-IDENTICAL** — `reconstructed_prg.bin` matches `prg.bin` exactly (all 16,384 bytes), and `prg.bin` matches the PRG bank of `Tennis (JU).nes`. +**Verification result: BYTE-IDENTICAL** — `reconstructed.nes` matches `rom.nes` exactly (header + PRG + CHR). --- @@ -357,7 +357,7 @@ IrqHandler ($C17E): rti (unused) │ ## 13. Notes -- **Build verification:** `make` in `copilot/` produces `reconstructed_prg.bin` that is **byte-identical** to `prg.bin` and to the PRG bank of `Tennis (JU).nes`. +- **Build verification:** `make` in `copilot/` produces `reconstructed.nes`, compared whole-ROM against `rom.nes`. - Vectors confirm NMI at $C07D, and both RESET and IRQ at $C000 (the reset handler doubles as the IRQ handler, just a `rti`). - The foreground main loop (`MainLoop` at $C04F) is strictly NMI-synchronized via `NmiWorkComplete` ($30): it loops until NMI sets it to $01, processes game state and timers, then waits again. - `UpdateGameState` ($C0AA) dispatches to one of 12 main game states via `MainStateHandlerTable` at $C101, indexed by `GameState` ($3D). diff --git a/Tennis (JU)/copilot/prg.s b/Tennis (JU)/copilot/prg.s index 90d27d3..e43ba6b 100644 --- a/Tennis (JU)/copilot/prg.s +++ b/Tennis (JU)/copilot/prg.s @@ -864,7 +864,7 @@ DispatchInlineAddressTable: lda (MathResultLo),y ; CPU:$C3AB PRG:03AB ?? sta MathResultHi ; CPU:$C3AD PRG:03AD ?? stx MathResultLo ; CPU:$C3AF PRG:03AF ?? - jmp ($0014) ; CPU:$C3B1 PRG:03B1 ?? + jmp (MathResultLo) ; CPU:$C3B1 PRG:03B1 ?? ; ============================================================================= ; Add16BitZp12ToZp14 @@ -1502,9 +1502,9 @@ Flow_C639: clc ; CPU:$C688 PRG:0688 ?? ldy #$02 ; CPU:$C68A PRG:068A ?? Flow_C640: - lda $009D,y ; CPU:$C68C PRG:068C ?? - adc $0097,y ; CPU:$C68E PRG:068E ?? - sta $009D,y ; CPU:$C690 PRG:0690 ?? + lda a:ProjectedXLo,y ; CPU:$C68C PRG:068C ?? + adc a:MathCarryByte,y ; CPU:$C68E PRG:068E ?? + sta a:ProjectedXLo,y ; CPU:$C690 PRG:0690 ?? dey ; CPU:$C692 PRG:0692 ?? bpl Flow_C640 ; CPU:$C694 PRG:0694 ?? Flow_C64C: @@ -1526,9 +1526,9 @@ Flow_C663: clc ; CPU:$C6B2 PRG:06B2 ?? ldy #$02 ; CPU:$C6B4 PRG:06B4 ?? Flow_C66A: - lda $009E,y ; CPU:$C6B6 PRG:06B6 ?? - adc $0097,y ; CPU:$C6B8 PRG:06B8 ?? - sta $009E,y ; CPU:$C6BA PRG:06BA ?? + lda a:ProjectedXHi,y ; CPU:$C6B6 PRG:06B6 ?? + adc a:MathCarryByte,y ; CPU:$C6B8 PRG:06B8 ?? + sta a:ProjectedXHi,y ; CPU:$C6BA PRG:06BA ?? dey ; CPU:$C6BC PRG:06BC ?? bpl Flow_C66A ; CPU:$C6BE PRG:06BE ?? bcc Flow_C67A ; CPU:$C6C0 PRG:06C0 ?? @@ -1567,8 +1567,8 @@ Flow_C68E: sec ; CPU:$C6E0 PRG:06E0 ?? ldy #$02 ; CPU:$C6E2 PRG:06E2 ?? Flow_C697: - lda $009D,y ; CPU:$C6E4 PRG:06E4 ?? - sbc $0098,y ; CPU:$C6E6 PRG:06E6 ?? + lda a:ProjectedXLo,y ; CPU:$C6E4 PRG:06E4 ?? + sbc a:MathVectorXHi,y ; CPU:$C6E6 PRG:06E6 ?? sta $00A1,y ; CPU:$C6E8 PRG:06E8 ?? dey ; CPU:$C6EA PRG:06EA ?? bpl Flow_C697 ; CPU:$C6EC PRG:06EC ?? @@ -1576,7 +1576,7 @@ Flow_C697: ldy #$02 ; CPU:$C6F0 PRG:06F0 ?? Flow_C6A7: lda $00A1,y ; CPU:$C6F2 PRG:06F2 ?? - sta $009D,y ; CPU:$C6F4 PRG:06F4 ?? + sta a:ProjectedXLo,y ; CPU:$C6F4 PRG:06F4 ?? dey ; CPU:$C6F6 PRG:06F6 ?? bpl Flow_C6A7 ; CPU:$C6F8 PRG:06F8 ?? sec ; CPU:$C6FA PRG:06FA ?? @@ -1598,8 +1598,8 @@ Flow_C6C4: sec ; CPU:$C716 PRG:0716 ?? ldy #$02 ; CPU:$C718 PRG:0718 ?? Flow_C6CD: - lda $009E,y ; CPU:$C71A PRG:071A ?? - sbc $0098,y ; CPU:$C71C PRG:071C ?? + lda a:ProjectedXHi,y ; CPU:$C71A PRG:071A ?? + sbc a:MathVectorXHi,y ; CPU:$C71C PRG:071C ?? sta $00A1,y ; CPU:$C71E PRG:071E ?? dey ; CPU:$C720 PRG:0720 ?? bpl Flow_C6CD ; CPU:$C722 PRG:0722 ?? @@ -1607,7 +1607,7 @@ Flow_C6CD: ldy #$02 ; CPU:$C726 PRG:0726 ?? Flow_C6DD: lda $00A1,y ; CPU:$C728 PRG:0728 ?? - sta $009E,y ; CPU:$C72A PRG:072A ?? + sta a:ProjectedXHi,y ; CPU:$C72A PRG:072A ?? dey ; CPU:$C72C PRG:072C ?? bpl Flow_C6DD ; CPU:$C72E PRG:072E ?? sec ; CPU:$C730 PRG:0730 ?? @@ -2074,7 +2074,7 @@ Flow_C956: lda $C965,x ; CPU:$C998 PRG:0998 ?? tay ; CPU:$C99A PRG:099A ?? lda $C966,x ; CPU:$C99C PRG:099C ?? - sta $00F1,y ; CPU:$C99E PRG:099E ?? + sta a:AudioChannelControl,y ; CPU:$C99E PRG:099E ?? rts ; CPU:$C9A0 PRG:09A0 ?? ; ----------------------------------------------------------------------------- @@ -7149,7 +7149,7 @@ Flow_E792: beq Flow_E7B8 ; CPU:$E7C1 PRG:27C1 ?? cmp #$02 ; CPU:$E7C3 PRG:27C3 ?? beq Flow_E7DA ; CPU:$E7C5 PRG:27C5 ?? - lda $0058,y ; CPU:$E7C7 PRG:27C7 ?? + lda a:ScoreLo,y ; CPU:$E7C7 PRG:27C7 ?? beq Flow_E7AB ; CPU:$E7C9 PRG:27C9 ?? dec ScoreLo ; CPU:$E7CB PRG:27CB ?? dec ScoreHi ; CPU:$E7CD PRG:27CD ?? @@ -7168,7 +7168,7 @@ Flow_E7B8: beq Flow_E7B1 ; CPU:$E7E1 PRG:27E1 ?? cmp #$03 ; CPU:$E7E3 PRG:27E3 ?? bne Flow_E7D1 ; CPU:$E7E5 PRG:27E5 ?? - lda $0058,y ; CPU:$E7E7 PRG:27E7 ?? + lda a:ScoreLo,y ; CPU:$E7E7 PRG:27E7 ?? cmp #$03 ; CPU:$E7E9 PRG:27E9 ?? bne Flow_E7D1 ; CPU:$E7EB PRG:27EB ?? inc ScoreUpdatePhase ; CPU:$E7ED PRG:27ED ?? @@ -7192,7 +7192,7 @@ Flow_E7E4: lda ScoreLo,x ; CPU:$E809 PRG:2809 ?? cmp #$07 ; CPU:$E80B PRG:280B ?? bcc Flow_E7F3 ; CPU:$E80D PRG:280D ?? - sbc $0058,y ; CPU:$E80F PRG:280F ?? + sbc a:ScoreLo,y ; CPU:$E80F PRG:280F ?? bmi Flow_E7F3 ; CPU:$E811 PRG:2811 ?? cmp #$02 ; CPU:$E813 PRG:2813 ?? bcs Flow_E7B1 ; CPU:$E815 PRG:2815 ?? @@ -7258,7 +7258,7 @@ Flow_E82C: beq Flow_E876 ; CPU:$E863 PRG:2863 ?? cmp #$06 ; CPU:$E865 PRG:2865 ?? bne Flow_E84B ; CPU:$E867 PRG:2867 ?? - lda $0051,y ; CPU:$E869 PRG:2869 ?? + lda a:PlayerPointScore,y ; CPU:$E869 PRG:2869 ?? cmp #$06 ; CPU:$E86B PRG:286B ?? beq Flow_E86F ; CPU:$E86D PRG:286D ?? cmp #$05 ; CPU:$E86F PRG:286F ?? diff --git a/Urban Champion (JU)/OVERVIEW.md b/Urban Champion (JU)/OVERVIEW.md index d9d7a89..6b4307a 100644 --- a/Urban Champion (JU)/OVERVIEW.md +++ b/Urban Champion (JU)/OVERVIEW.md @@ -1,6 +1,6 @@ # Urban Champion (JU) — Pass 3 Complete -ROM: `_wip/Urban Champion (JU)/Urban Champion (JU).nes` (24,592 bytes, iNES). Status: **Pass 3 complete — all data tables/structures named, PRG byte-identical.** `copilot/prg.s` contains a classified disassembly with per-instruction audit comments (`; CPU:$xxxx PRG:xxxx AA BB`), unreached bytes emitted as explicit `.byte` blocks with provenance. The build is **BYTE-IDENTICAL** at the PRG level (33.9% code / 5,546 bytes, 66.1% data / 10,838 bytes). +ROM: `Urban Champion (JU)/Urban Champion (JU).nes` (24,592 bytes, iNES). Status: **Pass 3 complete — all data tables/structures named; promoted to the top level (row 36), whole ROM byte-identical.** `copilot/prg.s` contains a classified disassembly with per-instruction audit comments (`; CPU:$xxxx PRG:xxxx AA BB`), unreached bytes emitted as explicit `.byte` blocks with provenance (33.9% code / 5,546 bytes, 66.1% data / 10,838 bytes). `make` verifies header + PRG + CHR against `copilot/rom.nes`. ## ROM Facts @@ -30,19 +30,19 @@ ROM: `_wip/Urban Champion (JU)/Urban Champion (JU).nes` (24,592 bytes, iNES). St | `Urban Champion (JU).nes` | original ROM image (reference) | | `prg.bin` / `header.bin` / `chr.bin` | split image, produced by `_tools/splitnes.py` | | `prg.s` | Pass 1: classified code/data split, 2,716 instructions, 436 labels, audit comments on every emission; Pass 2: all 519 labels renamed to semantic names | -| `symbols.inc` | shared NES hardware constants (PPU/APU/controller, from the skeleton) | +| `symbols.inc` | shared NES hardware constants (PPU/APU/controller) | | `locals.inc` | 153 zero-page aliases + 10 semantic aliases (Pass 2) | | `linker.cfg` | PRG at $C000, 16 KB, `fill = yes` | -| `Makefile` | links `reconstructed_prg.bin` and `cmp`s it against `prg.bin` | -| `reconstructed_prg.bin` | build output from the last verified build | +| `Makefile` | links `reconstructed.nes` and `cmp`s it against `rom.nes` (whole ROM) | +| `reconstructed.nes` | build output from the last verified build | -Header/CHR are reproduced verbatim from `header.bin`/`chr.bin` (not linked): `make` verifies **PRG bytes only** at this stage. When this project is promoted to a full disassembly, `header.s` / `chr.s` (as e.g. `Burger Time (U)`) and a full-ROM `make` target get added. +This project is promoted: `copilot/` links `header.s` + `prg.s` + `chr.s` and `make` compares the whole `reconstructed.nes` against `rom.nes`, so header, PRG and CHR are all proven. ## Build ```bash -cd "_wip/Urban Champion (JU)/copilot" -make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" +cd "Urban Champion (JU)/copilot" +make # → cmp reconstructed.nes rom.nes → "Byte-identical ROM verified." ``` ## Pass 1 Details @@ -54,9 +54,11 @@ make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" - **Indirect jumps**: 3 `jmp ($xxxx)` sites at `$CDFB` (`$0014`), `$C318` (`$00EB`), `$C332` (`$00ED`) — targets not statically resolvable. - **Zero-page aliases**: 153 entries in `locals.inc` (auto-generated by tracer). -## Next Steps (per `PROMPTS.md`) +## Next Steps -1. **Promotion** — move to a top-level `/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory. +Passes 1-3 are complete and the project is promoted to the top level (row 36, kept its tail +number); `make` compares the whole `reconstructed.nes` against `rom.nes`. No pass work is +pending. ## Pass 3 Details (2026-10-18) @@ -138,11 +140,8 @@ The following regions were misclassified as data by static trace but are CODE pe - $E11D-$E1CC (176 B): `HandlePlayerCode` - player handling ### Remaining Work -- Document structure of `SpriteMetatileTable` (entry format, pointer layout) -- Document structure of `SpritePatternTable` (pointer table + pattern format) -- Document `ControllerKeyTable` mapping -- Release provisional flags on converted code regions -- Promotion to top-level +Pass 3 named all data tables/structures above, so nothing structural is outstanding; +`make` verifies the whole ROM. This file could gain an expanded power-on flow narrative. ## Pass 2 Details (2026-10-18) diff --git a/Urban Champion (JU)/copilot/prg.s b/Urban Champion (JU)/copilot/prg.s index e0a05a8..3282878 100644 --- a/Urban Champion (JU)/copilot/prg.s +++ b/Urban Champion (JU)/copilot/prg.s @@ -106,8 +106,8 @@ SetAPUSweep: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- InitAPUWaveform: - sta $4001 ; CPU:$C058 PRG:0058 8D 01 40 - sta $4005 ; CPU:$C05B PRG:005B 8D 05 40 + sta APUPULSE1SWEEP ; CPU:$C058 PRG:0058 8D 01 40 + sta APUPULSE2SWEEP ; CPU:$C05B PRG:005B 8D 05 40 ; ----------------------------------------------------------------------------- ; Routine: SaveXY ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -172,13 +172,13 @@ InitControllerTables: inc $010A ; CPU:$C087 PRG:0087 EE 0A 01 ldy $010A ; CPU:$C08A PRG:008A AC 0A 01 lda $C0A1,y ; CPU:$C08D PRG:008D B9 A1 C0 - sta $400C ; CPU:$C090 PRG:0090 8D 0C 40 + sta APUNOISECTRL ; CPU:$C090 PRG:0090 8D 0C 40 bne InitControllerTablesLoop ; CPU:$C093 PRG:0093 D0 0B lda ZpEF ; CPU:$C095 PRG:0095 A5 EF and #$DF ; CPU:$C097 PRG:0097 29 DF sta ZpEF ; CPU:$C099 PRG:0099 85 EF lda #$10 ; CPU:$C09B PRG:009B A9 10 - sta $400C ; CPU:$C09D PRG:009D 8D 0C 40 + sta APUNOISECTRL ; CPU:$C09D PRG:009D 8D 0C 40 ; ----------------------------------------------------------------------------- ; Routine: InitControllerTablesLoop ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -265,7 +265,7 @@ InitPPULoop: lda $0103 ; CPU:$C0E6 PRG:00E6 AD 03 01 cmp #$20 ; CPU:$C0E9 PRG:00E9 C9 20 beq InitAPUFrameCounter ; CPU:$C0EB PRG:00EB F0 04 - sta $400C ; CPU:$C0ED PRG:00ED 8D 0C 40 + sta APUNOISECTRL ; CPU:$C0ED PRG:00ED 8D 0C 40 rts ; CPU:$C0F0 PRG:00F0 60 ; ----------------------------------------------------------------------------- ; Routine: InitAPUFrameCounter @@ -591,7 +591,7 @@ ClearRAMPageLoop: and #$C0 ; CPU:$C312 PRG:0312 29 C0 cmp #$C0 ; CPU:$C314 PRG:0314 C9 C0 beq InitGameStateExit ; CPU:$C316 PRG:0316 F0 0F - jmp ($00EB) ; CPU:$C318 PRG:0318 6C EB 00 + jmp (ZpEB) ; CPU:$C318 PRG:0318 6C EB 00 ; ----------------------------------------------------------------------------- ; Routine: InitGameState ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -634,7 +634,7 @@ InitGameStateExit: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- InitAPUCall: - jmp ($00ED) ; CPU:$C332 PRG:0332 6C ED 00 + jmp (ZpED) ; CPU:$C332 PRG:0332 6C ED 00 ; ----------------------------------------------------------------------------- ; Routine: InitAPU ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -646,7 +646,7 @@ InitAPUCall: ; ----------------------------------------------------------------------------- InitAPU: lda #$C0 ; CPU:$C335 PRG:0335 A9 C0 - sta $4017 ; CPU:$C337 PRG:0337 8D 17 40 + sta JOY2 ; CPU:$C337 PRG:0337 8D 17 40 jsr $C0B1 ; CPU:$C33A PRG:033A 20 B1 C0 jsr $C3B3 ; CPU:$C33D PRG:033D 20 B3 C3 jsr $C465 ; CPU:$C340 PRG:0340 20 65 C4 @@ -680,14 +680,14 @@ ClearControllerState: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- InitAPURegisters: - sta $4008 ; CPU:$C358 PRG:0358 8D 08 40 - sta $4011 ; CPU:$C35B PRG:035B 8D 11 40 + sta APUTRIANGLECTRL ; CPU:$C358 PRG:0358 8D 08 40 + sta APUDMCDIRECT ; CPU:$C35B PRG:035B 8D 11 40 sta ZpE6 ; CPU:$C35E PRG:035E 85 E6 sta ZpE4 ; CPU:$C360 PRG:0360 85 E4 lda #$10 ; CPU:$C362 PRG:0362 A9 10 - sta $4000 ; CPU:$C364 PRG:0364 8D 00 40 - sta $4004 ; CPU:$C367 PRG:0367 8D 04 40 - sta $400C ; CPU:$C36A PRG:036A 8D 0C 40 + sta APUPULSE1CTRL ; CPU:$C364 PRG:0364 8D 00 40 + sta APUPULSE2CTRL ; CPU:$C367 PRG:0367 8D 04 40 + sta APUNOISECTRL ; CPU:$C36A PRG:036A 8D 0C 40 rts ; CPU:$C36D PRG:036D 60 ; ---- data $C36E-$C375 (8 bytes) ---- .byte $1E, $7F, $05, $18, $15, $7F, $02, $88 ; CPU:$C36E PRG:036E 1E 7F 05 18 15 7F 02 88 @@ -911,7 +911,7 @@ InitSpritesSetF3: cmp #$05 ; CPU:$C415 PRG:0415 C9 05 bne InitSpritesCheckF1 ; CPU:$C417 PRG:0417 D0 F5 lda #$8B ; CPU:$C419 PRG:0419 A9 8B - sta $4005 ; CPU:$C41B PRG:041B 8D 05 40 + sta APUPULSE2SWEEP ; CPU:$C41B PRG:041B 8D 05 40 ; ----------------------------------------------------------------------------- ; Routine: InitSpritesAlt7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -1047,8 +1047,8 @@ InitGameState2Exit: ; ----------------------------------------------------------------------------- InitSpritesAlt1Loop: lda #$AC ; CPU:$C49C PRG:049C A9 AC - sta $4001 ; CPU:$C49E PRG:049E 8D 01 40 - sta $4005 ; CPU:$C4A1 PRG:04A1 8D 05 40 + sta APUPULSE1SWEEP ; CPU:$C49E PRG:049E 8D 01 40 + sta APUPULSE2SWEEP ; CPU:$C4A1 PRG:04A1 8D 05 40 ; ----------------------------------------------------------------------------- ; Routine: InitSpritesAlt2Entry ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -1149,8 +1149,8 @@ InitSpritesCheck10CAF: lda $010C ; CPU:$C4E6 PRG:04E6 AD 0C 01 cmp #$AF ; CPU:$C4E9 PRG:04E9 C9 AF beq InitSpritesSetF4 ; CPU:$C4EB PRG:04EB F0 07 - sta $4000 ; CPU:$C4ED PRG:04ED 8D 00 40 - sta $4004 ; CPU:$C4F0 PRG:04F0 8D 04 40 + sta APUPULSE1CTRL ; CPU:$C4ED PRG:04ED 8D 00 40 + sta APUPULSE2CTRL ; CPU:$C4F0 PRG:04F0 8D 04 40 rts ; CPU:$C4F3 PRG:04F3 60 ; ----------------------------------------------------------------------------- ; Routine: InitSpritesSetF4 @@ -1252,7 +1252,7 @@ InitGameState4CheckF2: lda #$00 ; CPU:$C54F PRG:054F A9 00 sta $0107 ; CPU:$C551 PRG:0551 8D 07 01 lda #$10 ; CPU:$C554 PRG:0554 A9 10 - sta $4000 ; CPU:$C556 PRG:0556 8D 00 40 + sta APUPULSE1CTRL ; CPU:$C556 PRG:0556 8D 00 40 rts ; CPU:$C559 PRG:0559 60 ; ----------------------------------------------------------------------------- ; Routine: InitGameState4Loop @@ -1278,13 +1278,13 @@ InitGameState4Loop: and #$0F ; CPU:$C576 PRG:0576 29 0F ora #$10 ; CPU:$C578 PRG:0578 09 10 sta $0106 ; CPU:$C57A PRG:057A 8D 06 01 - sta $4002 ; CPU:$C57D PRG:057D 8D 02 40 + sta APUPULSE1TIMERLO ; CPU:$C57D PRG:057D 8D 02 40 lda #$7F ; CPU:$C580 PRG:0580 A9 7F - sta $4001 ; CPU:$C582 PRG:0582 8D 01 40 + sta APUPULSE1SWEEP ; CPU:$C582 PRG:0582 8D 01 40 lda #$99 ; CPU:$C585 PRG:0585 A9 99 - sta $4000 ; CPU:$C587 PRG:0587 8D 00 40 + sta APUPULSE1CTRL ; CPU:$C587 PRG:0587 8D 00 40 lda #$88 ; CPU:$C58A PRG:058A A9 88 - sta $4003 ; CPU:$C58C PRG:058C 8D 03 40 + sta APUPULSE1TIMERHI ; CPU:$C58C PRG:058C 8D 03 40 rts ; CPU:$C58F PRG:058F 60 ; ----------------------------------------------------------------------------- ; Routine: InitGameState4ClearEF @@ -1310,7 +1310,7 @@ InitGameState4MaskF3: inc $0106 ; CPU:$C593 PRG:0593 EE 06 01 inc $0106 ; CPU:$C596 PRG:0596 EE 06 01 lda $0106 ; CPU:$C599 PRG:0599 AD 06 01 - sta $4002 ; CPU:$C59C PRG:059C 8D 02 40 + sta APUPULSE1TIMERLO ; CPU:$C59C PRG:059C 8D 02 40 rts ; CPU:$C59F PRG:059F 60 ; ---- data $C5A0-$C5A3 (4 bytes) ---- .byte $95, $B5, $40, $B0 ; CPU:$C5A0 PRG:05A0 95 B5 40 B0 @@ -1482,9 +1482,9 @@ WaitVBlankStore: ldy #$06 ; CPU:$C610 PRG:0610 A0 06 jsr $C05E ; CPU:$C612 PRG:0612 20 5E C0 lda #$83 ; CPU:$C615 PRG:0615 A9 83 - sta $4001 ; CPU:$C617 PRG:0617 8D 01 40 + sta APUPULSE1SWEEP ; CPU:$C617 PRG:0617 8D 01 40 lda #$7F ; CPU:$C61A PRG:061A A9 7F - sta $4005 ; CPU:$C61C PRG:061C 8D 05 40 + sta APUPULSE2SWEEP ; CPU:$C61C PRG:061C 8D 05 40 jmp $C647 ; CPU:$C61F PRG:061F 4C 47 C6 ; ----------------------------------------------------------------------------- ; Routine: WaitVBlankCallC1B2 @@ -1659,11 +1659,11 @@ Reset: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- WaitPPUReady: - lda $2002 ; CPU:$CA02 PRG:0A02 AD 02 20 + lda PPUSTATUS ; CPU:$CA02 PRG:0A02 AD 02 20 bpl WaitPPUReady ; CPU:$CA05 PRG:0A05 10 FB ldx #$00 ; CPU:$CA07 PRG:0A07 A2 00 - stx $2000 ; CPU:$CA09 PRG:0A09 8E 00 20 - stx $2001 ; CPU:$CA0C PRG:0A0C 8E 01 20 + stx PPUCTRL ; CPU:$CA09 PRG:0A09 8E 00 20 + stx PPUMASK ; CPU:$CA0C PRG:0A0C 8E 01 20 dex ; CPU:$CA0F PRG:0A0F CA txs ; CPU:$CA10 PRG:0A10 9A ldx $05EC ; CPU:$CA11 PRG:0A11 AE EC 05 @@ -1705,17 +1705,17 @@ StoreConfig: jsr $CC67 ; CPU:$CA32 PRG:0A32 20 67 CC jsr $CC77 ; CPU:$CA35 PRG:0A35 20 77 CC ldy #$00 ; CPU:$CA38 PRG:0A38 A0 00 - sta $2005 ; CPU:$CA3A PRG:0A3A 8D 05 20 - sta $2005 ; CPU:$CA3D PRG:0A3D 8D 05 20 + sta PPUSCROLL ; CPU:$CA3A PRG:0A3A 8D 05 20 + sta PPUSCROLL ; CPU:$CA3D PRG:0A3D 8D 05 20 ldy #$01 ; CPU:$CA40 PRG:0A40 A0 01 sty Zp24 ; CPU:$CA42 PRG:0A42 84 24 sty ZpA5 ; CPU:$CA44 PRG:0A44 84 A5 lda #$0F ; CPU:$CA46 PRG:0A46 A9 0F - sta $4015 ; CPU:$CA48 PRG:0A48 8D 15 40 + sta APUSTATUS ; CPU:$CA48 PRG:0A48 8D 15 40 jsr $C003 ; CPU:$CA4B PRG:0A4B 20 03 C0 jsr $E7EF ; CPU:$CA4E PRG:0A4E 20 EF E7 lda #$90 ; CPU:$CA51 PRG:0A51 A9 90 - sta $2000 ; CPU:$CA53 PRG:0A53 8D 00 20 + sta PPUCTRL ; CPU:$CA53 PRG:0A53 8D 00 20 sta Zp08 ; CPU:$CA56 PRG:0A56 85 08 lda #$02 ; CPU:$CA58 PRG:0A58 A9 02 sta Zp09 ; CPU:$CA5A PRG:0A5A 85 09 @@ -1810,9 +1810,9 @@ NmiHandler: lda Zp86 ; CPU:$CA97 PRG:0A97 A5 86 bne NmiVBlankOnly_CAC2 ; CPU:$CA99 PRG:0A99 D0 27 lda #$00 ; CPU:$CA9B PRG:0A9B A9 00 - sta $2003 ; CPU:$CA9D PRG:0A9D 8D 03 20 + sta OAMADDR ; CPU:$CA9D PRG:0A9D 8D 03 20 lda #$02 ; CPU:$CAA0 PRG:0AA0 A9 02 - sta $4014 ; CPU:$CAA2 PRG:0AA2 8D 14 40 + sta OAMDMA ; CPU:$CAA2 PRG:0AA2 8D 14 40 lda Zp22 ; CPU:$CAA5 PRG:0AA5 A5 22 bne NmiExit ; CPU:$CAA7 PRG:0AA7 D0 0C jsr $CD41 ; CPU:$CAA9 PRG:0AA9 20 41 CD @@ -1862,12 +1862,12 @@ NmiVBlankOnly_CAC2: lda Zp09 ; CPU:$CAC2 PRG:0AC2 A5 09 and #$E7 ; CPU:$CAC4 PRG:0AC4 29 E7 sta Zp09 ; CPU:$CAC6 PRG:0AC6 85 09 - sta $2001 ; CPU:$CAC8 PRG:0AC8 8D 01 20 + sta PPUMASK ; CPU:$CAC8 PRG:0AC8 8D 01 20 jsr $D174 ; CPU:$CACB PRG:0ACB 20 74 D1 lda Zp09 ; CPU:$CACE PRG:0ACE A5 09 ora #$18 ; CPU:$CAD0 PRG:0AD0 09 18 sta Zp09 ; CPU:$CAD2 PRG:0AD2 85 09 - sta $2001 ; CPU:$CAD4 PRG:0AD4 8D 01 20 + sta PPUMASK ; CPU:$CAD4 PRG:0AD4 8D 01 20 jmp $CAB2 ; CPU:$CAD7 PRG:0AD7 4C B2 CA ; ----------------------------------------------------------------------------- ; Routine: UpdateScroll @@ -1940,7 +1940,7 @@ CheckControllerStartLoop: bpl CheckControllerStartLoop ; CPU:$CB15 PRG:0B15 10 F8 lda Zp09 ; CPU:$CB17 PRG:0B17 A5 09 and #$0E ; CPU:$CB19 PRG:0B19 29 0E - sta $2001 ; CPU:$CB1B PRG:0B1B 8D 01 20 + sta PPUMASK ; CPU:$CB1B PRG:0B1B 8D 01 20 sta Zp09 ; CPU:$CB1E PRG:0B1E 85 09 lda Zp25 ; CPU:$CB20 PRG:0B20 A5 25 sta Zp1D ; CPU:$CB22 PRG:0B22 85 1D @@ -1962,7 +1962,7 @@ CheckControllerStartLoop: CheckControllerStartExit: lda Zp09 ; CPU:$CB31 PRG:0B31 A5 09 ora #$10 ; CPU:$CB33 PRG:0B33 09 10 - sta $2001 ; CPU:$CB35 PRG:0B35 8D 01 20 + sta PPUMASK ; CPU:$CB35 PRG:0B35 8D 01 20 sta Zp09 ; CPU:$CB38 PRG:0B38 85 09 lda #$11 ; CPU:$CB3A PRG:0B3A A9 11 sta Zp25 ; CPU:$CB3C PRG:0B3C 85 25 @@ -2388,11 +2388,11 @@ UpdateOAMCheckZp23: stx Zp01 ; CPU:$CC99 PRG:0C99 86 01 jsr $CE3A ; CPU:$CC9B PRG:0C9B 20 3A CE lda #$3F ; CPU:$CC9E PRG:0C9E A9 3F - sta $2006 ; CPU:$CCA0 PRG:0CA0 8D 06 20 + sta PPUADDR ; CPU:$CCA0 PRG:0CA0 8D 06 20 lda #$00 ; CPU:$CCA3 PRG:0CA3 A9 00 - sta $2006 ; CPU:$CCA5 PRG:0CA5 8D 06 20 - sta $2006 ; CPU:$CCA8 PRG:0CA8 8D 06 20 - sta $2006 ; CPU:$CCAB PRG:0CAB 8D 06 20 + sta PPUADDR ; CPU:$CCA5 PRG:0CA5 8D 06 20 + sta PPUADDR ; CPU:$CCA8 PRG:0CA8 8D 06 20 + sta PPUADDR ; CPU:$CCAB PRG:0CAB 8D 06 20 ; ----------------------------------------------------------------------------- ; Routine: UpdateOAMDecrement ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -2462,9 +2462,9 @@ UpdateOAMZeroY: ; ----------------------------------------------------------------------------- UpdatePlayers: lda #$01 ; CPU:$CCD0 PRG:0CD0 A9 01 - sta $4016 ; CPU:$CCD2 PRG:0CD2 8D 16 40 + sta JOY1 ; CPU:$CCD2 PRG:0CD2 8D 16 40 lda #$00 ; CPU:$CCD5 PRG:0CD5 A9 00 - sta $4016 ; CPU:$CCD7 PRG:0CD7 8D 16 40 + sta JOY1 ; CPU:$CCD7 PRG:0CD7 8D 16 40 ldy #$40 ; CPU:$CCDA PRG:0CDA A0 40 ldx $032A ; CPU:$CCDC PRG:0CDC AE 2A 03 beq UpdatePalettesCheckZp27 ; CPU:$CCDF PRG:0CDF F0 02 @@ -2525,7 +2525,7 @@ ProcessControllerInputStore: lda Zp16,x ; CPU:$CCFE PRG:0CFE B5 16 and Zp01 ; CPU:$CD00 PRG:0D00 25 01 sta Zp02 ; CPU:$CD02 PRG:0D02 85 02 - lda $4016,x ; CPU:$CD04 PRG:0D04 BD 16 40 + lda JOY1,x ; CPU:$CD04 PRG:0D04 BD 16 40 sta Zp00 ; CPU:$CD07 PRG:0D07 85 00 lsr a ; CPU:$CD09 PRG:0D09 4A ora Zp00 ; CPU:$CD0A PRG:0D0A 05 00 @@ -2607,9 +2607,9 @@ ProcessControllerInputEntry: sta Zp01 ; CPU:$CD4B PRG:0D4B 85 01 lda Zp08 ; CPU:$CD4D PRG:0D4D A5 08 and #$FB ; CPU:$CD4F PRG:0D4F 29 FB - sta $2000 ; CPU:$CD51 PRG:0D51 8D 00 20 + sta PPUCTRL ; CPU:$CD51 PRG:0D51 8D 00 20 sta Zp08 ; CPU:$CD54 PRG:0D54 85 08 - ldx $2002 ; CPU:$CD56 PRG:0D56 AE 02 20 + ldx PPUSTATUS ; CPU:$CD56 PRG:0D56 AE 02 20 ldy #$00 ; CPU:$CD59 PRG:0D59 A0 00 beq ProcessControllerInputStaZp08 ; CPU:$CD5B PRG:0D5B F0 19 ; ----------------------------------------------------------------------------- @@ -2622,10 +2622,10 @@ ProcessControllerInputEntry: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ProcessControllerInputRead2002: - sta $2006 ; CPU:$CD5D PRG:0D5D 8D 06 20 + sta PPUADDR ; CPU:$CD5D PRG:0D5D 8D 06 20 iny ; CPU:$CD60 PRG:0D60 C8 lda (Zp00),y ; CPU:$CD61 PRG:0D61 B1 00 - sta $2006 ; CPU:$CD63 PRG:0D63 8D 06 20 + sta PPUADDR ; CPU:$CD63 PRG:0D63 8D 06 20 iny ; CPU:$CD66 PRG:0D66 C8 lda (Zp00),y ; CPU:$CD67 PRG:0D67 B1 00 and #$3F ; CPU:$CD69 PRG:0D69 29 3F @@ -2642,7 +2642,7 @@ ProcessControllerInputRead2002: ProcessControllerInputAndFB: iny ; CPU:$CD6C PRG:0D6C C8 lda (Zp00),y ; CPU:$CD6D PRG:0D6D B1 00 - sta $2007 ; CPU:$CD6F PRG:0D6F 8D 07 20 + sta PPUDATA ; CPU:$CD6F PRG:0D6F 8D 07 20 dex ; CPU:$CD72 PRG:0D72 CA bne ProcessControllerInputAndFB ; CPU:$CD73 PRG:0D73 D0 F7 iny ; CPU:$CD75 PRG:0D75 C8 @@ -2683,10 +2683,10 @@ ProcessControllerInputRead2002Alt: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ProcessControllerInputRead2002Alt2: - lda $2002 ; CPU:$CD85 PRG:0D85 AD 02 20 + lda PPUSTATUS ; CPU:$CD85 PRG:0D85 AD 02 20 lda Zp08 ; CPU:$CD88 PRG:0D88 A5 08 and #$FB ; CPU:$CD8A PRG:0D8A 29 FB - sta $2000 ; CPU:$CD8C PRG:0D8C 8D 00 20 + sta PPUCTRL ; CPU:$CD8C PRG:0D8C 8D 00 20 sta Zp08 ; CPU:$CD8F PRG:0D8F 85 08 lda #$1C ; CPU:$CD91 PRG:0D91 A9 1C clc ; CPU:$CD93 PRG:0D93 18 @@ -2704,9 +2704,9 @@ ProcessControllerInputAnd04: dec Zp01 ; CPU:$CD96 PRG:0D96 C6 01 bne ProcessControllerInputAnd04 ; CPU:$CD98 PRG:0D98 D0 FA sta Zp02 ; CPU:$CD9A PRG:0D9A 85 02 - sta $2006 ; CPU:$CD9C PRG:0D9C 8D 06 20 + sta PPUADDR ; CPU:$CD9C PRG:0D9C 8D 06 20 lda #$00 ; CPU:$CD9F PRG:0D9F A9 00 - sta $2006 ; CPU:$CDA1 PRG:0DA1 8D 06 20 + sta PPUADDR ; CPU:$CDA1 PRG:0DA1 8D 06 20 ldx #$04 ; CPU:$CDA4 PRG:0DA4 A2 04 ldy #$00 ; CPU:$CDA6 PRG:0DA6 A0 00 lda Zp00 ; CPU:$CDA8 PRG:0DA8 A5 00 @@ -2720,16 +2720,16 @@ ProcessControllerInputAnd04: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ProcessControllerInputOra18: - sta $2007 ; CPU:$CDAA PRG:0DAA 8D 07 20 + sta PPUDATA ; CPU:$CDAA PRG:0DAA 8D 07 20 dey ; CPU:$CDAD PRG:0DAD 88 bne ProcessControllerInputOra18 ; CPU:$CDAE PRG:0DAE D0 FA dex ; CPU:$CDB0 PRG:0DB0 CA bne ProcessControllerInputOra18 ; CPU:$CDB1 PRG:0DB1 D0 F7 lda Zp02 ; CPU:$CDB3 PRG:0DB3 A5 02 adc #$03 ; CPU:$CDB5 PRG:0DB5 69 03 - sta $2006 ; CPU:$CDB7 PRG:0DB7 8D 06 20 + sta PPUADDR ; CPU:$CDB7 PRG:0DB7 8D 06 20 lda #$C0 ; CPU:$CDBA PRG:0DBA A9 C0 - sta $2006 ; CPU:$CDBC PRG:0DBC 8D 06 20 + sta PPUADDR ; CPU:$CDBC PRG:0DBC 8D 06 20 ldy #$40 ; CPU:$CDBF PRG:0DBF A0 40 lda #$00 ; CPU:$CDC1 PRG:0DC1 A9 00 ; ----------------------------------------------------------------------------- @@ -2742,7 +2742,7 @@ ProcessControllerInputOra18: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ProcessControllerInputStaZp09: - sta $2007 ; CPU:$CDC3 PRG:0DC3 8D 07 20 + sta PPUDATA ; CPU:$CDC3 PRG:0DC3 8D 07 20 dey ; CPU:$CDC6 PRG:0DC6 88 bne ProcessControllerInputStaZp09 ; CPU:$CDC7 PRG:0DC7 D0 FA rts ; CPU:$CDC9 PRG:0DC9 60 @@ -2815,7 +2815,7 @@ ProcessControllerInput: stx Zp14 ; CPU:$CDF5 PRG:0DF5 86 14 ldx Zp28 ; CPU:$CDF7 PRG:0DF7 A6 28 ldy Zp29 ; CPU:$CDF9 PRG:0DF9 A4 29 - jmp ($0014) ; CPU:$CDFB PRG:0DFB 6C 14 00 + jmp (Zp14) ; CPU:$CDFB PRG:0DFB 6C 14 00 ; ----------------------------------------------------------------------------- ; Routine: RoundLogicSaveXY ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -2826,10 +2826,10 @@ ProcessControllerInput: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- RoundLogicSaveXY: - sta $2006 ; CPU:$CDFE PRG:0DFE 8D 06 20 + sta PPUADDR ; CPU:$CDFE PRG:0DFE 8D 06 20 iny ; CPU:$CE01 PRG:0E01 C8 lda (Zp00),y ; CPU:$CE02 PRG:0E02 B1 00 - sta $2006 ; CPU:$CE04 PRG:0E04 8D 06 20 + sta PPUADDR ; CPU:$CE04 PRG:0E04 8D 06 20 iny ; CPU:$CE07 PRG:0E07 C8 lda (Zp00),y ; CPU:$CE08 PRG:0E08 B1 00 asl a ; CPU:$CE0A PRG:0E0A 0A @@ -2848,7 +2848,7 @@ RoundLogicSaveXY: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ScrollBackgroundEntry: - sta $2000 ; CPU:$CE14 PRG:0E14 8D 00 20 + sta PPUCTRL ; CPU:$CE14 PRG:0E14 8D 00 20 sta Zp08 ; CPU:$CE17 PRG:0E17 85 08 pla ; CPU:$CE19 PRG:0E19 68 asl a ; CPU:$CE1A PRG:0E1A 0A @@ -2891,7 +2891,7 @@ ScrollBackgroundTXA_CE23: ; ----------------------------------------------------------------------------- ScrollBackgroundCmp6F_CE26: lda (Zp00),y ; CPU:$CE26 PRG:0E26 B1 00 - sta $2007 ; CPU:$CE28 PRG:0E28 8D 07 20 + sta PPUDATA ; CPU:$CE28 PRG:0E28 8D 07 20 dex ; CPU:$CE2B PRG:0E2B CA bne ScrollBackgroundTXA_CE23 ; CPU:$CE2C PRG:0E2C D0 F5 sec ; CPU:$CE2E PRG:0E2E 38 @@ -2911,7 +2911,7 @@ ScrollBackgroundCmp6F_CE26: ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- ScrollBackgroundRead2002: - ldx $2002 ; CPU:$CE3A PRG:0E3A AE 02 20 + ldx PPUSTATUS ; CPU:$CE3A PRG:0E3A AE 02 20 ldy #$00 ; CPU:$CE3D PRG:0E3D A0 00 lda (Zp00),y ; CPU:$CE3F PRG:0E3F B1 00 bne RoundLogicSaveXY ; CPU:$CE41 PRG:0E41 D0 BB @@ -2927,11 +2927,11 @@ ScrollBackgroundRead2002: ScrollBackground: pha ; CPU:$CE43 PRG:0E43 48 lda Zp0A ; CPU:$CE44 PRG:0E44 A5 0A - sta $2005 ; CPU:$CE46 PRG:0E46 8D 05 20 + sta PPUSCROLL ; CPU:$CE46 PRG:0E46 8D 05 20 lda Zp0B ; CPU:$CE49 PRG:0E49 A5 0B - sta $2005 ; CPU:$CE4B PRG:0E4B 8D 05 20 + sta PPUSCROLL ; CPU:$CE4B PRG:0E4B 8D 05 20 lda Zp08 ; CPU:$CE4E PRG:0E4E A5 08 - sta $2000 ; CPU:$CE50 PRG:0E50 8D 00 20 + sta PPUCTRL ; CPU:$CE50 PRG:0E50 8D 00 20 pla ; CPU:$CE53 PRG:0E53 68 rts ; CPU:$CE54 PRG:0E54 60 ; ----------------------------------------------------------------------------- @@ -3383,7 +3383,7 @@ UpdateRoundTimerInit: lda Zp09 ; CPU:$D01D PRG:101D A5 09 and #$E7 ; CPU:$D01F PRG:101F 29 E7 sta Zp09 ; CPU:$D021 PRG:1021 85 09 - sta $2001 ; CPU:$D023 PRG:1023 8D 01 20 + sta PPUMASK ; CPU:$D023 PRG:1023 8D 01 20 rts ; CPU:$D026 PRG:1026 60 ; ---- data $D027-$D02F (9 bytes) ---- .byte $20, $12, $D0, $A5, $09, $09, $18, $D0, $F1 ; CPU:$D027 PRG:1027 20 12 D0 A5 09 09 18 D0 F1 @@ -5874,7 +5874,7 @@ HandlePlayer2LogicStxZp31: sec ; CPU:$E2A7 PRG:22A7 38 sbc #$02 ; CPU:$E2A8 PRG:22A8 E9 02 tax ; CPU:$E2AA PRG:22AA AA - lda a:$00CC,y ; CPU:$E2AB PRG:22AB B9 CC 00 + lda a:ZpCC,y ; CPU:$E2AB PRG:22AB B9 CC 00 ldy Zp0D ; CPU:$E2AE PRG:22AE A4 0D jsr $E236 ; CPU:$E2B0 PRG:22B0 20 36 E2 ldy Zp0F ; CPU:$E2B3 PRG:22B3 A4 0F diff --git a/Wild Gunman (U)/OVERVIEW.md b/Wild Gunman (U)/OVERVIEW.md index ca98328..573d09d 100644 --- a/Wild Gunman (U)/OVERVIEW.md +++ b/Wild Gunman (U)/OVERVIEW.md @@ -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. diff --git a/Wild Gunman (U)/copilot/prg.s b/Wild Gunman (U)/copilot/prg.s index b5c0078..7dc56d1 100644 --- a/Wild Gunman (U)/copilot/prg.s +++ b/Wild Gunman (U)/copilot/prg.s @@ -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 diff --git a/_tools/apply_symbols.py b/_tools/apply_symbols.py new file mode 100644 index 0000000..873e47b --- /dev/null +++ b/_tools/apply_symbols.py @@ -0,0 +1,210 @@ +#!/usr/bin/env python3 +"""apply_symbols.py -- substitute symbol names for numeric operands in a +disassembled prg.s. + +Names come from two include files sitting next to prg.s: + symbols.inc NES hardware constants ($2000-$4017) + locals.inc zero-page/RAM names plus "forward reference" aliases for + routine addresses (e.g. AbsoluteDifference = $F08E) + +Both are simple `Name = $HEX` tables. A few addresses carry more than one +name (the same byte is reused by different subsystems); those are called +multi-alias addresses and cannot be resolved from the address alone. + +Usage: + apply_symbols.py [--sites sites.tsv] [--labels lbl] [--write] [--report] + + --sites TSV of `linename` overrides for multi-alias addresses. + Lines not listed are left numeric (recorded as residue). + --labels ld65 `-Ln` label file (or TSV `name$hex`). Operands that point + at a label *defined in prg.s* ($8000+, e.g. a data table) are named + with it. Only labels prg.s actually defines are used, which keeps + segment labels from the CHR/header files out of the PRG. + --write rewrite prg.s in place, else print stats only. + --report list the multi-alias operands left numeric (the residue). + +Only the operand token is rewritten: the mnemonic, the whitespace and the trailing +`; CPU:$.... PRG:.... XX XX` audit comment are preserved byte for byte, so the +byte-identity audit trail survives. + +Addressing width is preserved: an operand originally written with four hex +digits is absolute, so a zero-page-valued symbol gets the ca65 `a:` prefix +to stop ca65 from re-optimising it into zero-page addressing. + +Note: `symbols.inc` also holds controller bit masks (PAD_RIGHT=$01, PAD_A=$80, ...). +Those are constants, not addresses, so only $2000-$4017 is treated as a register +window; without that guard a plain zero-page operand like `$10` would be renamed to +a mask. +""" +import argparse +import re +import sys +from collections import Counter, defaultdict +from pathlib import Path + +NAME_RE = re.compile(r"^([A-Za-z_][A-Za-z0-9_]*)\s*=\s*\$([0-9A-Fa-f]+)\s*$") +INSTR_RE = re.compile(r"^(\s*[a-z]{3}\s+)(\S+)(\s*)$") +PLAIN_RE = re.compile(r"^(a:)?(\$[0-9A-Fa-f]{2,4})(,[xXyY])?$") +IND_RE = re.compile(r"^(a:)?\((\$[0-9A-Fa-f]{2,4})(,[xXyY])?\)(,[yY])?$") + + +def load_names(path): + by_name, by_addr = {}, defaultdict(list) + for raw in Path(path).read_text().splitlines(): + m = NAME_RE.match(raw.split(";", 1)[0].strip()) + if m: + by_name[m.group(1)] = int(m.group(2), 16) + by_addr[int(m.group(2), 16)].append(m.group(1)) + return by_name, by_addr + + +LBL_RE = re.compile(r"^al ([0-9A-Fa-f]{4,6}) \.([A-Za-z_][A-Za-z0-9_]*)$") + + +def load_labels(path, defined): + """Address -> label name from an ld65 label file or a `name$hex` TSV. + + Restricted to labels the source actually defines and that live in the PRG + ($8000+), so segment labels from the CHR/header files cannot leak in. + """ + out = {} + for raw in Path(path).read_text().splitlines(): + raw = raw.strip() + if not raw: + continue + m = LBL_RE.match(raw) + if m: + addr, name = int(m.group(1), 16), m.group(2) + else: + parts = raw.split("\t") + hexval = parts[1].strip().lstrip("$") if len(parts) == 2 else "" + if len(parts) != 2 or not re.fullmatch(r"[0-9A-Fa-f]{2,6}", hexval): + continue + addr, name = int(hexval, 16), parts[0].strip() + if addr >= 0x8000 and name in defined: + out[addr] = name + return out + + +def operand_address(op): + """(address, kind, inner, outer, hex_width) for a numeric operand, else Nones. + + kind 'plain' or 'ind' + inner index token inside the parens ('' / ',x' / ',y') + outer trailing index token ('' / ',y') + """ + m = PLAIN_RE.match(op) + if m: + hexdigits = m.group(2)[1:] + return int(hexdigits, 16), "plain", (m.group(3) or ""), "", len(hexdigits) + m = IND_RE.match(op) + if m: + hexdigits = m.group(2)[1:] + return (int(hexdigits, 16), "ind", (m.group(3) or ""), + (m.group(4) or ""), len(hexdigits)) + return None, None, None, None, None + + +def render(name, kind, inner, outer, width, value): + if kind == "plain": + base = name + inner + if width == 4 and value < 0x100: + return "a:" + base + return base + return "(" + name + inner + ")" + outer + + +def main(): + ap = argparse.ArgumentParser() + ap.add_argument("dir") + ap.add_argument("--sites") + ap.add_argument("--labels") + ap.add_argument("--write", action="store_true") + ap.add_argument("--report", action="store_true") + args = ap.parse_args() + + d = Path(args.dir) + prg = d / "prg.s" + _, hw_addr = load_names(d / "symbols.inc") + _, loc_addr = load_names(d / "locals.inc") + + # Only the register window of symbols.inc is an address space; the + # controller bit masks ($01, $80, ...) are constants, not addresses. + hw = {a: names[0] for a, names in hw_addr.items() + if names and 0x2000 <= a <= 0x4017} + single = {a: names[0] for a, names in loc_addr.items() if len(names) == 1} + multi = {a: names for a, names in loc_addr.items() if len(names) > 1} + for a in hw: # hardware names win where both exist + single.pop(a, None) + + sites = {} + if args.sites: + for raw in Path(args.sites).read_text().splitlines(): + raw = raw.strip() + if not raw or raw.startswith("#"): + continue + line, _, name = raw.partition("\t") + sites[int(line)] = name.strip() + + lines = prg.read_text().split("\n") + + labels = {} + if args.labels: + defined = {m.group(1) for m in + (re.match(r"^([A-Za-z_][A-Za-z0-9_]*):", l) for l in lines) if m} + labels = load_labels(args.labels, defined) + + counts = Counter() + residue = [] + out = [] + for lineno, line in enumerate(lines, 1): + code, sep, comment = line.partition(";") + m = INSTR_RE.match(code) + if not m: + out.append(line) + continue + op = m.group(2) + addr, kind, inner, outer, width = operand_address(op) + if addr is None: + out.append(line) + continue + if lineno in sites: + name, tag = sites[lineno], "site" + elif addr in labels: + name, tag = labels[addr], "label" + elif addr in single: + name, tag = single[addr], "single" + elif addr in hw: + name, tag = hw[addr], "hardware" + elif addr in multi: + counts["residue"] += 1 + residue.append((lineno, op, multi[addr])) + out.append(line) + continue + else: + out.append(line) + continue + newop = render(name, kind, inner, outer, width, addr) + if newop == op: + out.append(line) + continue + counts[tag] += 1 + out.append(m.group(1) + newop + m.group(3) + sep + comment) + + total = (counts["site"] + counts["single"] + counts["hardware"] + + counts["label"]) + print(f"substituted {total} operands: single={counts['single']} " + f"hardware={counts['hardware']} site={counts['site']} " + f"label={counts['label']}") + print(f"multi-alias residue left numeric: {counts['residue']}") + if args.report: + for lineno, op, names in residue: + print(f" line {lineno}: {op} candidates={names}") + + if args.write: + prg.write_text("\n".join(out)) + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/_wip/Donkey Kong (JU)/OVERVIEW.md b/_wip/Donkey Kong (JU)/OVERVIEW.md deleted file mode 100644 index d6d7634..0000000 --- a/_wip/Donkey Kong (JU)/OVERVIEW.md +++ /dev/null @@ -1,71 +0,0 @@ -# Donkey Kong (JU) — Pass 2 Complete - -ROM: `_wip/Donkey Kong (JU)/Donkey Kong (JU).nes` (24,592 bytes, iNES). Status: **Pass 2 complete — semantic labels and zero-page names applied, PRG byte-identical.** `copilot/prg.s` contains a classified disassembly with 6,014 instructions (76.3% code / 12,505 bytes), 214 semantic labels, and 145 zero-page semantic aliases. The build is **BYTE-IDENTICAL** at the PRG level. - -**Relationship note:** separate title from the already-disassembled `Donkey Kong Jr. (JU)` and `Donkey Kong 3 (JUE)` — do not reuse their symbols. - - -## ROM Facts - -| Property | Value | -|----------|-------| -| Mapper | 0 (NROM) — from the iNES header | -| PRG | 16 KB (header claims map at CPU $C000–$FFFF) | -| CHR | 8 KB | -| Mirroring | Vertical | -| Battery-backed flag | clear | -| ROM SHA-256 | `f9f026fd3560eeb03be9f6d1efa329b4c71d562caf06d4a5a691e5342f8da8e6` | -| PRG SHA-256 | `2952648e8a6eea65b7f388af8fce9ef33a9cb07178835fea6674db75d2623c49` | - -## Interrupt Vectors (taken from PRG $3FFA–$3FFF) - -| Vector | Target | Note | -|--------|--------|------| -| NMI | `$C85F` | per-frame heartbeat | -| RESET | `$C79E` | enters at $C79E inside the first pages (the Donkey Kong Jr.-style non-$C000 entry) | -| IRQ | `$FFF0` | lands in the vector-page padding — unused placeholder | - -## `copilot/` Contents - -| File | Purpose | -|------|---------| -| `Donkey Kong (JU).nes` | original ROM image (reference) | -| `prg.bin` / `header.bin` / `chr.bin` | split image, produced by `_tools/splitnes.py` | -| `prg.s` | Pass 1/2: classified code/data split, 6,014 instructions, 214 semantic labels, audit comments on every emission | -| `symbols.inc` | shared NES hardware constants (PPU/APU/controller, from the skeleton) | -| `locals.inc` | 145 zero-page semantic aliases (filled in by Pass 2) | -| `linker.cfg` | PRG at $C000, 16 KB, `fill = yes` | -| `Makefile` | links `reconstructed_prg.bin` and `cmp`s it against `prg.bin` | -| `reconstructed_prg.bin` | build output from the last verified build | - -Header/CHR are reproduced verbatim from `header.bin`/`chr.bin` (not linked): `make` verifies **PRG bytes only** at this stage. When this project is promoted to a full disassembly, `header.s` / `chr.s` (as e.g. `Burger Time (U)`) and a full-ROM `make` target get added. - -## Build - -```bash -cd "_wip/Donkey Kong (JU)/copilot" -make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" -``` - -## Pass 2 Details (2026-10-18) - -- **Label renaming**: 214 of 1015 labels renamed to semantic names using `pass2.py apply` with a mapping file (`dk_label_map.tsv` + `locals.inc` for zero-page). Key renamed routines: - - RESET/NMI: `Reset`, `NmiHandler` - - System init: `InitSystem`, `ClearZeropage`, `InitPPU`, `InitGameState` - - Main loop: `MainGameLoop`, `InitPPURegisters`, `GameLoopEntry` - - NMI: `NmiHandler`, `NmiFrameUpdate`, `NmiFrameEnd` - - Sprite handling: `UpdateSprites`, `UpdateOAM`, `UpdateScroll` - - Game logic: `UpdateGameState`, `HandleController`, `UpdateSpritePositions` - - Sound: `InitSound`, `PlaySoundEffect`, `UpdateMusic` - - PPU: `WaitVBlank`, `WaitPPUReady`, `WritePPU`, `InitPPU` -- **Zero-page semantic aliases**: 145 aliases in `locals.inc` (see `locals.inc` header for full list): - - PPU: `PPUCtrlShadow` ($10), `PPUMaskShadow` ($11), `PPUScrollX` ($12), `PPUScrollY` ($13) - - Game state: `GameState` ($03), `PlayerLives` ($04), `FrameCounter` ($02) - - Controller: `ControllerButtons1` ($10), `ControllerButtons2` ($11) - - Sprite: `SpriteIndex` ($95), `SpriteX` ($12), `SpriteY` ($13) - - Pointers: `TempPtrLo` ($00), `TempPtrHi` ($01) - -## Next Steps (per `PROMPTS.md`) - -1. **Pass 3** — name data tables/structures; release provisional flags. -2. **Promotion** — move to a top-level `/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory. diff --git a/_wip/Donkey Kong (JU)/copilot/Makefile b/_wip/Donkey Kong (JU)/copilot/Makefile deleted file mode 100644 index 3f9ba6f..0000000 --- a/_wip/Donkey Kong (JU)/copilot/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -all: reconstructed_prg.bin verify -prg.o: prg.s symbols.inc prg.bin - ca65 -g -o $@ prg.s -reconstructed_prg.bin: prg.o linker.cfg - ld65 -C linker.cfg -m reconstructed.map -Ln reconstructed.lbl -o $@ prg.o -verify: reconstructed_prg.bin prg.bin - cmp reconstructed_prg.bin prg.bin - @echo BYTE-IDENTICAL -clean: - rm -f prg.o reconstructed_prg.bin reconstructed.map reconstructed.lbl diff --git a/_wip/Donkey Kong (JU)/copilot/dk_full_map.tsv b/_wip/Donkey Kong (JU)/copilot/dk_full_map.tsv deleted file mode 100644 index 66ae16a..0000000 --- a/_wip/Donkey Kong (JU)/copilot/dk_full_map.tsv +++ /dev/null @@ -1,627 +0,0 @@ -label Label_C79E Reset -label Label_C7E1 MainGameLoop -label Label_C7E7 InitPPU_1 -label Label_C7E1 GameLoopEntry -label Label_C7E7 InitPPURegisters -label Label_C85F NmiHandler -label Label_C8C1 NmiFrameUpdate -label Label_C8CB NmiFrameUpdate2 -label Label_C8D4 NmiFrameUpdate3 -label Label_C8D7 NmiFrameUpdate4 -label Label_C8E8 NmiFrameEnd -label Label_C8F3 InitAPURegisters -label Label_C8F3 InitAPU -label Label_C8FE InitSound_1 -label Label_C914 InitLevel -label Label_C940 UpdateGameState -label Label_C95D UpdateGameState2 -label Label_C98A UpdateGameState3 -label Label_CA30 UpdateSprites -label Label_CA53 UpdateSprites2 -label Label_CA56 CallCBAE -label Label_CA5C CallCBB7 -label Label_CAA9 CopyToOAM -label Label_CAB9 CopyFromOAM -label Label_CAC9 UpdateSpriteData -label Label_CB1B HandleController -label Label_CBAE ClearZeropage -label Label_CBB7 WaitVBlank_1 -label Label_CBBD UpdateScroll -label Label_CBCA UpdateScroll2 -label Label_CBF4 UpdateScroll3 -label Label_CBF5 UpdateOAM -label Label_CBF7 UpdateOAM2 -label Label_CC03 UpdateOAM3 -label Label_CC04 UpdateScroll4 -label Label_CC23 UpdateScroll5 -label Label_CC34 UpdateScroll6 -label Label_CC47 InitScroll -label Label_CCC1 UpdateScroll7 -label Label_CCD6 UpdateScroll8 -label Label_CCF4 CheckGameState_1 -label Label_CD22 UpdateGameTimer -label Label_CD6F UpdateSpritePosition -label Label_CD76 UpdateSpritePosition2 -label Label_CD7F UpdateSpritePosition3 -label Label_CD89 UpdateSpritePosition4 -label Label_CD9D UpdateSpritePosition5 -label Label_CDB1 UpdateSpritePosition6 -label Label_CDCA UpdateSpritePosition7 -label Label_CE0E UpdateSpritePosition8 -label Label_CE24 UpdateSpritePosition9 -label Label_CE7C UpdateSpritePosition10 -label Label_CED6 UpdateSpritePosition11 -label Label_CF13 UpdateSpritePosition12 -label Label_CF19 UpdateSpritePosition13_1 -label Label_CF1C UpdateSpritePosition13_3 -label Label_CF2B UpdateSpritePosition14 -label Label_CF42 UpdateSpritePosition15 -label Label_CF87 UpdateSpritePosition16 -label Label_CFA8 UpdateSpritePosition17 -label Label_CFC6 UpdateSpritePosition18 -label Label_D008 UpdateSpritePosition19 -label Label_D032 UpdateSpritePosition20 -label Label_D041 UpdateSpritePosition21_1 -label Label_D04C UpdateSpritePosition21_3 -label Label_D086 UpdateSpritePosition22_1 -label Label_D0B5 UpdateSpritePosition22_3 -label Label_D0C0 UpdateSpritePosition23 -label Label_D11F UpdateSpritePosition24 -label Label_D169 UpdateSpritePosition25 -label Label_D175 UpdateSpritePosition26 -label Label_D19A UpdateSpritePosition27 -label Label_D1A4 UpdateSpritePosition28 -label Label_D1AA UpdateSpritePosition29 -label Label_D1CF UpdateSpritePosition30 -label Label_D208 UpdateSpritePosition31 -label Label_D25D UpdateSpritePosition32 -label Label_D275 UpdateSpritePosition33 -label Label_D28B UpdateSpritePosition34 -label Label_D2CB UpdateSpritePosition35 -label Label_D2DF UpdateSpritePosition36 -label Label_D2FD UpdateSpritePosition37 -label Label_D323 UpdateSpritePosition38 -label Label_D326 UpdateSpritePosition39 -label Label_D32F UpdateSpritePosition40 -label Label_D360 UpdateSpritePosition41 -label Label_D36A UpdateSpritePosition42_1 -label Label_D37B UpdateSpritePosition42_3 -label Label_D37E UpdateSpritePosition43 -label Label_D38E UpdateSpritePosition44 -label Label_D3AA UpdateSpritePosition45 -label Label_D3CC UpdateSpritePosition46 -label Label_D4A1 UpdateSpritePosition47 -label Label_D4B9 UpdateSpritePosition48 -label Label_D4CF UpdateSpritePosition49 -label Label_D4F0 UpdateSpritePosition50 -label Label_D5C1 UpdateSpritePosition51 -label Label_D5D1 UpdateSpritePosition52 -label Label_D5F5 UpdateSpritePosition53 -label Label_D6A8 UpdateSpritePosition54 -label Label_D730 UpdateSpritePosition55 -label Label_D739 UpdateSpritePosition56 -label Label_DBB6 UpdateSpritePosition57 -label Label_DBC8 UpdateSpritePosition58 -label Label_DBE3 UpdateSpritePosition59 -label Label_DBFA UpdateSpritePosition60 -label Label_DC0D UpdateSpritePosition61 -label Label_DC11 UpdateSpritePosition62 -label Label_DC3E UpdateSpritePosition63 -label Label_DCAA UpdateSpritePosition64 -label Label_DCDD UpdateSpritePosition65 -label Label_DCE3 UpdateSpritePosition66 -label Label_DCEC UpdateSpritePosition67 -label Label_DD32 UpdateSpritePosition68 -label Label_DD5D UpdateSpritePosition69 -label Label_DD75 UpdateSpritePosition70 -label Label_DD78 UpdateSpritePosition71 -label Label_DD8F UpdateSpritePosition72 -label Label_DD92 UpdateSpritePosition73 -label Label_DDA3 UpdateSpritePosition74 -label Label_DDAC UpdateSpritePosition75 -label Label_DDBE UpdateSpritePosition76 -label Label_DDBE UpdateSpritePosition77 -label Label_DDC7 UpdateSpritePosition78 -label Label_DDF1 UpdateSpritePosition79 -label Label_DE30 UpdateSpritePosition80 -label Label_DE41 UpdateSpritePosition81 -label Label_DE63 UpdateSpritePosition82 -label Label_DE75 UpdateSpritePosition83 -label Label_DE7E UpdateSpritePosition84 -label Label_DE30 UpdateSoundEngine -label Label_E023 WaitVBlank_3 -label Label_E025 WaitVBlank2 -label Label_E02C WaitVBlank3 -label Label_E035 WaitPPUReady -label Label_E046 WaitFrame -label Label_E049 InitPPU_3 -label Label_E09B InitSprites -label Label_E0E3 DrawSprite -label Label_E0EF WritePPU -label Label_E0F6 WritePPU2 -label Label_E0FD InitGame -label Label_E278 UpdateBallTrajectory -label Label_E28A InitSound_3 -label Label_E293 InitSprites2 -label Label_E2A6 UpdateBallPhysics -label Label_E3E2 UpdateGameMode -label Label_E403 CheckGameState_3 -label Label_E40E UpdateDisplay -label Label_E459 UpdateDisplay2 -label Label_E48C UpdateSprites3 -label Label_E497 UpdateDisplay3 -label Label_E4E2 UpdateDisplay4 -label Label_E506 PlaySound -label Label_E535 PlaySoundEffect -label Label_E54A PlayMusic -label Label_E5B2 UpdateMusic -label Label_E609 UpdateMusicEngine -label Label_E68F UpdateMusicChannel -label Label_E7AC UpdateMusicChannel2 -label Label_E94D UpdateSoundEffects -label Label_E96A UpdateSoundChannel2 -label Label_E9ED UpdateSoundChannel3 -label Label_EA2F UpdateSoundChannels -label Label_EA50 UpdateSoundEffect -label Label_EA58 UpdateSoundEffect2 -label Label_EAD1 UpdateSoundChannel4 -label Label_EAE5 UpdateSoundChannel5 -label Label_EB0D UpdateSoundChannel6 -label Label_EB27 UpdateSoundChannel7 -label Label_EB9D UpdateSoundChannel8 -label Label_EBF9 UpdateSoundChannel9 -label Label_EC80 UpdateMusic2 -label Label_EC8D UpdateMusicChannel10 -label Label_ED06 UpdateMusicChannel11 -label Label_EDB0 UpdateMusicChannel12 -label Label_EDED UpdateMusicChannel13 -label Label_EDF2 UpdateMusicChannel14 -label Label_EE3D UpdateMusicChannel15 -label Label_EE4D UpdateMusicChannel16 -label Label_EF28 UpdateMusicChannel17 -label Label_EF79 UpdateMusicChannel18 -label Label_EFD3 UpdateMusicChannel19 -label Label_EFDC UpdateMusicChannel20 -label Label_F03F UpdateMusicChannel21 -label Label_F06F UpdateMusicChannel22 -label Label_F0C4 UpdateMusicChannel23 -label Label_F0DF UpdateMusicChannel24_1 -label Label_F0E7 UpdateMusicChannel24_3 -label Label_F138 UpdateMusicChannel25 -label Label_F140 UpdateMusicChannel26_1 -label Label_F1FB UpdateMusicChannel26_3 -label Label_F226 UpdateMusicChannel27 -label Label_F2F0 UpdateMusicChannel28 -label Label_F321 UpdateMusicChannel29 -label Label_F3B9 UpdateMusicChannel30 -label Label_F3E8 UpdateMusicChannel31 -label Label_F41E UpdateMusicChannel32 -label Label_F44B UpdateMusicChannel33 -label Label_FB2C UpdateAPU -label Label_FB40 UpdateAPU2 -label Label_FB43 UpdateAPU3 -label Label_FB46 UpdateAPU4 -label Label_FB49 UpdateAPU5 -label Label_FB5D UpdateAPU6 -label Label_FB6E UpdateAPU7 -label Label_FBDD UpdateAPU8 -label Label_FC0F UpdateAPU9 -label Label_FC2B UpdateAPU10 -label Label_FC72 UpdateAPU11 -label Label_FCE2 UpdateAPU12 -label Label_FD0D UpdateAPU13 -label Label_FD55 UpdateAPU14 -label Label_FD91 UpdateAPU15 -label Label_FFDC UpdateAPU16 -label Label_FFE3 UpdateAPU17 -label Label_FFE9 UpdateAPU18 -label Label_FFF0 UpdateAPU19 -label Label_FFF7 ResetVector - -zp Zp00 TempPtrLo -zp Zp01 TempPtrHi -zp Zp02 TempReg -zp Zp03 TempReg2 -zp Zp04 TempReg3 -zp Zp05 TempReg3 -zp Zp06 TempReg4 -zp Zp07 TempReg5 -zp Zp08 TempReg6 -zp Zp09 TempReg7 -zp Zp0A TempReg8 -zp Zp0B TempReg9 -zp Zp0C TempReg10 -zp Zp0D TempReg11 -zp Zp0E TempReg12 -zp Zp0F TempReg13 -zp Zp10 PPUCtrlShadow -zp Zp11 PPUMaskShadow -zp Zp12 PPUScrollX -zp Zp13 PPUScrollY -zp Zp10 PPUCtrlShadow -zp Zp11 PPUMaskShadow -zp Zp12 PPUScrollX -zp Zp13 PPUScrollY -zp Zp14 TempReg14 -zp Zp15 TempReg15 -zp Zp16 TempReg16 -zp Zp17 TempReg17 -zp Zp18 TempReg18 -zp Zp19 TempReg19 -zp Zp1A TempReg20 -zp Zp1B TempReg21 -zp Zp1C TempReg22 -zp Zp1D TempReg23 -zp Zp1E TempReg24 -zp Zp1F TempReg25 -zp Zp20 TempReg26 -zp Zp21 TempReg27 -zp Zp22 TempReg28 -zp Zp23 TempReg29 -zp Zp24 TempReg30 -zp Zp25 TempReg31 -zp Zp26 TempReg32 -zp Zp27 TempReg33 -zp Zp28 TempReg34 -zp Zp29 TempReg35 -zp Zp2A TempReg36 -zp Zp2B TempReg37 -zp Zp2C TempReg38 -zp Zp2D TempReg39 -zp Zp2E TempReg40 -zp Zp2F TempReg41 -zp Zp2F TempReg42 -zp Zp30 TempReg43 -zp Zp31 TempReg44 -zp Zp32 TempReg45 -zp Zp33 TempReg46 -zp Zp34 TempReg47 -zp Zp35 TempReg48 -zp Zp36 TempReg49 -zp Zp37 TempReg50 -zp Zp38 TempReg51 -zp Zp39 TempReg52 -zp Zp3A TempReg53 -zp Zp3B TempReg54 -zp Zp3C TempReg55 -zp Zp3D TempReg56 -zp Zp3E TempReg57 -zp Zp3F TempReg58 -zp Zp40 TempReg59 -zp Zp41 TempReg60 -zp Zp42 TempReg61 -zp Zp43 TempReg62 -zp Zp44 TempReg63 -zp Zp45 TempReg64 -zp Zp46 TempReg65 -zp Zp47 TempReg66 -zp Zp48 TempReg67 -zp Zp49 TempReg68 -zp Zp4A TempReg69 -zp Zp4B TempReg70 -zp Zp4C TempReg71 -zp Zp4D TempReg72 -zp Zp4E TempReg73 -zp Zp4F TempReg74 -zp Zp50 TempReg75 -zp Zp51 TempReg76 -zp Zp52 TempReg77 -zp Zp53 TempReg78 -zp Zp54 TempReg79 -zp Zp55 TempReg80 -zp Zp56 TempReg81 -zp Zp57 TempReg82 -zp Zp58 TempReg83 -zp Zp59 TempReg84 -zp Zp5A TempReg85 -zp Zp5B TempReg86 -zp Zp5C TempReg87 -zp Zp5D TempReg88 -zp Zp5E TempReg89 -zp Zp5F TempReg90 -zp Zp5F TempReg91 -zp Zp60 TempReg92 -zp Zp61 TempReg93 -zp Zp62 TempReg94 -zp Zp63 TempReg95 -zp Zp64 TempReg96 -zp Zp65 TempReg96 -zp Zp66 TempReg97 -zp Zp67 TempReg98 -zp Zp68 TempReg99 -zp Zp69 TempReg100 -zp Zp6A TempReg101 -zp Zp6B TempReg102 -zp Zp6C TempReg103 -zp Zp6D TempReg104 -zp Zp6E TempReg105 -zp Zp6F TempReg106 -zp Zp70 TempReg107 -zp Zp71 TempReg108 -zp Zp72 TempReg109 -zp Zp73 TempReg110 -zp Zp74 TempReg111 -zp Zp75 TempReg111 -zp Zp76 TempReg112 -zp Zp77 TempReg113 -zp Zp78 TempReg114 -zp Zp79 TempReg115 -zp Zp7A TempReg116 -zp Zp7B TempReg117 -zp Zp7C TempReg118 -zp Zp7D TempReg119 -zp Zp7E TempReg120 -zp Zp7F TempReg121 -zp Zp80 TempReg122 -zp Zp81 TempReg123 -zp Zp82 TempReg124 -zp Zp83 TempReg125 -zp Zp84 TempReg126 -zp Zp85 TempReg127 -zp Zp86 TempReg128 -zp Zp87 TempReg129 -zp Zp88 TempReg130 -zp Zp89 TempReg131 -zp Zp8A TempReg132 -zp Zp8B TempReg133 -zp Zp8C TempReg134 -zp Zp8D TempReg135 -zp Zp8E TempReg136 -zp Zp8F TempReg137 -zp Zp90 TempReg138 -zp Zp91 TempReg139 -zp Zp92 TempReg140 -zp Zp93 TempReg141 -zp Zp94 TempReg141 -zp Zp95 TempReg142 -zp Zp96 TempReg143 -zp Zp97 TempReg144 -zp Zp98 TempReg145 -zp Zp99 TempReg146 -zp Zp9A TempReg147 -zp Zp9B TempReg148 -zp Zp9C TempReg149 -zp Zp9D TempReg150 -zp Zp9E TempReg151 -zp Zp9F TempReg152 -zp ZpA0 TempReg153 -zp ZpA1 TempReg154 -zp ZpA2 TempReg155 -zp ZpA3 TempReg156 -zp ZpA4 TempReg157 -zp ZpA5 TempReg158 -zp ZpA6 TempReg159 -zp ZpA7 TempReg160 -zp ZpA8 TempReg161 -zp ZpA9 TempReg162 -zp ZpAA TempReg163 -zp ZpAB TempReg164 -zp ZpAC TempReg165 -zp ZpAD TempReg166 -zp ZpAE TempReg167 -zp ZpAF TempReg168 -zp ZpB0 TempReg169 -zp ZpB1 TempReg170 -zp ZpB2 TempReg171 -zp ZpB3 TempReg172 -zp ZpB4 TempReg173 -zp ZpB5 TempReg174 -zp ZpB6 TempReg175 -zp ZpB7 TempReg176 -zp ZpB8 TempReg177 -zp ZpB9 TempReg177 -zp ZpBA TempReg178 -zp ZpBB TempReg179 -zp ZpBC TempReg180 -zp ZpBD TempReg181 -zp ZpBE TempReg182 -zp ZpBF TempReg183 -zp ZpC0 TempReg184 -zp ZpC1 TempReg185 -zp ZpC2 TempReg186 -zp ZpC3 TempReg187 -zp ZpC4 TempReg188 -zp ZpC5 TempReg189 -zp ZpC6 TempReg190 -zp ZpC7 TempReg191 -zp ZpC8 TempReg192 -zp ZpC9 TempReg193 -zp ZpCA TempReg194 -zp ZpCB TempReg195 -zp ZpCC TempReg196 -zp ZpCD TempReg197 -zp ZpCE TempReg198 -zp ZpCF TempReg199 -zp ZpD0 TempReg185 -zp ZpD1 TempReg186 -zp ZpD2 TempReg187 -zp ZpD3 TempReg188 -zp ZpD4 TempReg189 -zp ZpD5 TempReg190 -zp ZpD6 TempReg191 -zp ZpD7 TempReg192 -zp ZpD8 TempReg193 -zp ZpD9 TempReg194 -zp ZpDA TempReg195 -zp ZpDB TempReg196 -zp ZpDC TempReg197 -zp ZpDD TempReg198 -zp ZpDE TempReg199 -zp ZpDF TempReg200 -zp ZpE0 TempReg201 -zp ZpE1 TempReg202 -zp ZpE2 TempReg203 -zp ZpE3 TempReg204 -zp ZpE4 TempReg205 -zp ZpE5 TempReg206 -zp ZpE6 TempReg207 -zp ZpE7 TempReg208 -zp ZpE8 TempReg209 -zp ZpE9 TempReg210 -zp ZpEA TempReg211 -zp ZpEB TempReg212 -zp ZpEC TempReg213 -zp ZpED TempReg214 -zp ZpEE TempReg215 -zp ZpEF TempReg216 -zp ZpF0 TempReg217 -zp ZpF1 TempReg218 -zp ZpF2 TempReg219 -zp ZpF3 TempReg220 -zp ZpF4 TempReg221 -zp ZpF5 TempReg222 -zp ZpF6 TempReg223 -zp ZpF7 TempReg224 -zp ZpF8 TempReg225 -zp ZpF9 TempReg226 -zp ZpFA TempReg227 -zp ZpFB TempReg228 -zp ZpFC TempReg229 -zp ZpFD TempReg230 -zp ZpFE TempReg231 -zp ZpFF TempReg232 -zp Zp00 Zp00 -zp Zp01 Zp01 -zp Zp02 Zp02 -zp Zp03 Zp03 -zp Zp04 Zp04 -zp Zp05 Zp05 -zp Zp06 Zp06 -zp Zp07 Zp07 -zp Zp08 Zp08 -zp Zp09 Zp09 -zp Zp0A Zp0A -zp Zp0B Zp0B -zp Zp0C Zp0C -zp Zp0F Zp0F -zp Zp10 Zp10 -zp Zp11 Zp11 -zp Zp12 Zp12 -zp Zp13 Zp13 -zp Zp14 Zp14 -zp Zp15 Zp15 -zp Zp18 Zp18 -zp Zp19 Zp19 -zp Zp1A Zp1A -zp Zp1B Zp1B -zp Zp1C Zp1C -zp Zp1D Zp1D -zp Zp1E Zp1E -zp Zp1F Zp1F -zp Zp20 Zp20 -zp Zp21 Zp21 -zp Zp22 Zp22 -zp Zp23 Zp23 -zp Zp24 Zp24 -zp Zp25 Zp25 -zp Zp26 Zp26 -zp Zp27 Zp27 -zp Zp2C Zp2C -zp Zp2E Zp2E -zp Zp34 Zp34 -zp Zp35 Zp35 -zp Zp36 Zp36 -zp Zp37 Zp37 -zp Zp38 Zp38 -zp Zp39 Zp39 -zp Zp3A Zp3A -zp Zp3B Zp3B -zp Zp3F Zp3F -zp Zp40 Zp40 -zp Zp41 Zp41 -zp Zp43 Zp43 -zp Zp44 Zp44 -zp Zp45 Zp45 -zp Zp46 Zp46 -zp Zp47 Zp47 -zp Zp48 Zp48 -zp Zp49 Zp49 -zp Zp4A Zp4A -zp Zp4B Zp4B -zp Zp4C Zp4C -zp Zp4D Zp4D -zp Zp4E Zp4E -zp Zp4F Zp4F -zp Zp50 Zp50 -zp Zp51 Zp51 -zp Zp52 Zp52 -zp Zp53 Zp53 -zp Zp54 Zp54 -zp Zp55 Zp55 -zp Zp56 Zp56 -zp Zp57 Zp57 -zp Zp58 Zp58 -zp Zp59 Zp59 -zp Zp5A Zp5A -zp Zp5B Zp5B -zp Zp5C Zp5C -zp Zp5D Zp5D -zp Zp5E Zp5E -zp Zp68 Zp68 -zp Zp72 Zp72 -zp Zp7D Zp7D -zp Zp7E Zp7E -zp Zp85 Zp85 -zp Zp86 Zp86 -zp Zp88 Zp88 -zp Zp8A Zp8A -zp Zp94 Zp94 -zp Zp95 Zp95 -zp Zp96 Zp96 -zp Zp97 Zp97 -zp Zp98 Zp98 -zp Zp99 Zp99 -zp Zp9A Zp9A -zp Zp9B Zp9B -zp Zp9C Zp9C -zp Zp9D Zp9D -zp Zp9E Zp9E -zp Zp9F Zp9F -zp ZpA0 ZpA0 -zp ZpA1 ZpA1 -zp ZpA2 ZpA2 -zp ZpA3 ZpA3 -zp ZpAD ZpAD -zp ZpAE ZpAE -zp ZpAF ZpAF -zp ZpB3 ZpB3 -zp ZpB7 ZpB7 -zp ZpB8 ZpB8 -zp ZpB9 ZpB9 -zp ZpBE ZpBE -zp ZpBF ZpBF -zp ZpC0 ZpC0 -zp ZpC1 ZpC1 -zp ZpC2 ZpC2 -zp ZpCC ZpCC -zp ZpCD ZpCD -zp ZpCE ZpCE -zp ZpCF ZpCF -zp ZpD0 ZpD0 -zp ZpD2 ZpD2 -zp ZpD3 ZpD3 -zp ZpD4 ZpD4 -zp ZpD5 ZpD5 -zp ZpD8 ZpD8 -zp ZpD9 ZpD9 -zp ZpDA ZpDA -zp ZpDB ZpDB -zp ZpE0 ZpE0 -zp ZpE4 ZpE4 -zp ZpE8 ZpE8 -zp ZpEC ZpEC -zp ZpF0 ZpF0 -zp ZpF1 ZpF1 -zp ZpF2 ZpF2 -zp ZpF3 ZpF3 -zp ZpF5 ZpF5 -zp ZpF6 ZpF6 -zp ZpF7 ZpF7 -zp ZpF8 ZpF8 -zp ZpF9 ZpF9 -zp ZpFA ZpFA -zp ZpFB ZpFB -zp ZpFC ZpFC -zp ZpFD ZpFD -zp ZpFE ZpFE -zp ZpFF ZpFF diff --git a/_wip/Donkey Kong (JU)/copilot/linker.cfg b/_wip/Donkey Kong (JU)/copilot/linker.cfg deleted file mode 100644 index d9d421d..0000000 --- a/_wip/Donkey Kong (JU)/copilot/linker.cfg +++ /dev/null @@ -1,6 +0,0 @@ -MEMORY { - PRG: start = $C000, size = $4000, file = %O, fill = yes; -} -SEGMENTS { - PRG: load = PRG, type = ro; -} diff --git a/_wip/Donkey Kong (JU)/copilot/reconstructed.lbl b/_wip/Donkey Kong (JU)/copilot/reconstructed.lbl deleted file mode 100644 index 861b599..0000000 --- a/_wip/Donkey Kong (JU)/copilot/reconstructed.lbl +++ /dev/null @@ -1,1015 +0,0 @@ -al 00FFF0 .IrqHandler -al 00FE55 .Label_FE55 -al 00FE4F .Label_FE4F -al 00FE58 .Label_FE58 -al 00FE2E .Label_FE2E -al 00FE1D .Label_FE1D -al 00FE03 .Label_FE03 -al 00FE00 .Label_FE00 -al 00FE09 .Label_FE09 -al 00FE31 .Label_FE31 -al 00FDCF .Label_FDCF -al 00FDC1 .Label_FDC1 -al 00FDB8 .Label_FDB8 -al 00FDE9 .Label_FDE9 -al 00FDD8 .Label_FDD8 -al 00FDA4 .Label_FDA4 -al 00FD67 .Label_FD67 -al 00FD9B .Label_FD9B -al 00FD62 .Label_FD62 -al 00FD3A .Label_FD3A -al 00FD1D .Label_FD1D -al 00FD35 .Label_FD35 -al 00FD18 .Label_FD18 -al 00FD58 .Label_FD58 -al 00FCD1 .Label_FCD1 -al 00FD00 .Label_FD00 -al 00FCC6 .Label_FCC6 -al 00FCDD .Label_FCDD -al 00FCDB .Label_FCDB -al 00FCF0 .Label_FCF0 -al 00FCBE .Label_FCBE -al 00FCBA .Label_FCBA -al 00FD0B .Label_FD0B -al 00FC90 .Label_FC90 -al 00FC9D .Label_FC9D -al 00FC7F .Label_FC7F -al 00FC73 .Label_FC73 -al 00FC41 .Label_FC41 -al 00FC30 .Label_FC30 -al 00FC16 .Label_FC16 -al 00FC51 .Label_FC51 -al 00FC62 .Label_FC62 -al 00FC19 .Label_FC19 -al 00FC28 .Label_FC28 -al 00FC4B .Label_FC4B -al 00FBF2 .Label_FBF2 -al 00FC44 .Label_FC44 -al 00FBD9 .Label_FBD9 -al 00FBD4 .Label_FBD4 -al 00FBC2 .Label_FBC2 -al 00FBB7 .Label_FBB7 -al 00FBAF .Label_FBAF -al 00FBB2 .Label_FBB2 -al 00FBA7 .Label_FBA7 -al 00FBA0 .Label_FBA0 -al 00FB89 .Label_FB89 -al 00FB7E .Label_FB7E -al 00FB75 .Label_FB75 -al 00FAE0 .Label_FAE0 -al 00FAD7 .Label_FAD7 -al 00FAD5 .Label_FAD5 -al 00FACA .Label_FACA -al 00FAC4 .Label_FAC4 -al 00FABA .Label_FABA -al 00FAB3 .Label_FAB3 -al 00FAB2 .Label_FAB2 -al 00FAA1 .Label_FAA1 -al 00FA9F .Label_FA9F -al 00FA95 .Label_FA95 -al 00FA93 .Label_FA93 -al 00FA8F .Label_FA8F -al 00FA8E .Label_FA8E -al 00FA88 .Label_FA88 -al 00FA86 .Label_FA86 -al 00FA82 .Label_FA82 -al 00FA7F .Label_FA7F -al 00FA6B .Label_FA6B -al 00FA64 .Label_FA64 -al 00FA48 .Label_FA48 -al 00F55A .Label_F55A -al 00F549 .Label_F549 -al 00F524 .Label_F524 -al 00F522 .Label_F522 -al 00F50E .Label_F50E -al 00F4FD .Label_F4FD -al 00F4ED .Label_F4ED -al 00F4C2 .Label_F4C2 -al 00F4BE .Label_F4BE -al 00F4B8 .Label_F4B8 -al 00F4AC .Label_F4AC -al 00F493 .Label_F493 -al 00F49F .Label_F49F -al 00F47E .Label_F47E -al 00F4A9 .Label_F4A9 -al 00F4A4 .Label_F4A4 -al 00F453 .Label_F453 -al 00F479 .Label_F479 -al 00F4A0 .Label_F4A0 -al 00F44A .Label_F44A -al 00F435 .Label_F435 -al 00F426 .Label_F426 -al 00F423 .Label_F423 -al 00F417 .Label_F417 -al 00F404 .Label_F404 -al 00F3FB .Label_F3FB -al 00F3FF .Label_F3FF -al 00F3EE .Label_F3EE -al 00F3E3 .Label_F3E3 -al 00F3E2 .Label_F3E2 -al 00F3C6 .Label_F3C6 -al 00F3C0 .Label_F3C0 -al 00F36B .Label_F36B -al 00F392 .Label_F392 -al 00F38E .Label_F38E -al 00F35E .Label_F35E -al 00F355 .Label_F355 -al 00F342 .Label_F342 -al 00F344 .Label_F344 -al 00F33E .Label_F33E -al 00F33D .Label_F33D -al 00F32F .Label_F32F -al 00F32D .Label_F32D -al 00F303 .Label_F303 -al 00F2EA .Label_F2EA -al 00F2D7 .Label_F2D7 -al 00F2D6 .Label_F2D6 -al 00F2BE .Label_F2BE -al 00F2B4 .Label_F2B4 -al 00F2B0 .Label_F2B0 -al 00F2C4 .Label_F2C4 -al 00F29A .Label_F29A -al 00F296 .Label_F296 -al 00F28E .Label_F28E -al 00F24E .Label_F24E -al 00F248 .Label_F248 -al 00F23F .Label_F23F -al 00F23C .Label_F23C -al 00F228 .Label_F228 -al 00F214 .Label_F214 -al 00F211 .Label_F211 -al 00F20E .Label_F20E -al 00F202 .Label_F202 -al 00F1EC .Label_F1EC -al 00F1E5 .Label_F1E5 -al 00F1CE .Label_F1CE -al 00F1B4 .Label_F1B4 -al 00F19F .Label_F19F -al 00F197 .Label_F197 -al 00F195 .Label_F195 -al 00F16F .Label_F16F -al 00F16A .Label_F16A -al 00F161 .Label_F161 -al 00F141 .Label_F141 -al 00F13B .Label_F13B -al 00F139 .Label_F139 -al 00F124 .Label_F124 -al 00F11E .Label_F11E -al 00F10E .Label_F10E -al 00F10A .Label_F10A -al 00F0F2 .Label_F0F2 -al 00F0E9 .Label_F0E9 -al 00F0E6 .Label_F0E6 -al 00F0DC .Label_F0DC -al 00F0CB .Label_F0CB -al 00F0EF .Label_F0EF -al 00F094 .Label_F094 -al 00F092 .Label_F092 -al 00F08E .Label_F08E -al 00F08C .Label_F08C -al 00F088 .Label_F088 -al 00F086 .Label_F086 -al 00F096 .Label_F096 -al 00F082 .Label_F082 -al 00F080 .Label_F080 -al 00F078 .Label_F078 -al 00F075 .Label_F075 -al 00F070 .Label_F070 -al 00F069 .Label_F069 -al 00F063 .Label_F063 -al 00F062 .Label_F062 -al 00F059 .Label_F059 -al 00F057 .Label_F057 -al 00F018 .Label_F018 -al 00EFF3 .Label_EFF3 -al 00EFEF .Label_EFEF -al 00EFF5 .Label_EFF5 -al 00EFEB .Label_EFEB -al 00EFE8 .Label_EFE8 -al 00EFE2 .Label_EFE2 -al 00EFDD .Label_EFDD -al 00EFD7 .Label_EFD7 -al 00EFD5 .Label_EFD5 -al 00EFAD .Label_EFAD -al 00EFA2 .Label_EFA2 -al 00EFA0 .Label_EFA0 -al 00EF89 .Label_EF89 -al 00EF87 .Label_EF87 -al 00EF94 .Label_EF94 -al 00EF72 .Label_EF72 -al 00EF71 .Label_EF71 -al 00EF51 .Label_EF51 -al 00EF38 .Label_EF38 -al 00EF2E .Label_EF2E -al 00EF2F .Label_EF2F -al 00EEF7 .Label_EEF7 -al 00EEE6 .Label_EEE6 -al 00EED9 .Label_EED9 -al 00EEE7 .Label_EEE7 -al 00EE8D .Label_EE8D -al 00EEF0 .Label_EEF0 -al 00EED8 .Label_EED8 -al 00EE80 .Label_EE80 -al 00EE79 .Label_EE79 -al 00EE6C .Label_EE6C -al 00EE5C .Label_EE5C -al 00EE51 .Label_EE51 -al 00EE38 .Label_EE38 -al 00EE29 .Label_EE29 -al 00EE26 .Label_EE26 -al 00EE1A .Label_EE1A -al 00EE0C .Label_EE0C -al 00EE0B .Label_EE0B -al 00EE07 .Label_EE07 -al 00EDEB .Label_EDEB -al 00EDD2 .Label_EDD2 -al 00EDC5 .Label_EDC5 -al 00EDC4 .Label_EDC4 -al 00EDB5 .Label_EDB5 -al 00EDAD .Label_EDAD -al 00ED93 .Label_ED93 -al 00ED8A .Label_ED8A -al 00ED87 .Label_ED87 -al 00ED74 .Label_ED74 -al 00ED38 .Label_ED38 -al 00ED85 .Label_ED85 -al 00ED57 .Label_ED57 -al 00ED16 .Label_ED16 -al 00ED34 .Label_ED34 -al 00ED07 .Label_ED07 -al 00ECFD .Label_ECFD -al 00ECF7 .Label_ECF7 -al 00ECE8 .Label_ECE8 -al 00ECD3 .Label_ECD3 -al 00ECD1 .Label_ECD1 -al 00ECC6 .Label_ECC6 -al 00ECBF .Label_ECBF -al 00ECBE .Label_ECBE -al 00ECAF .Label_ECAF -al 00EC80 .UpdateMusic2 -al 00EC76 .Label_EC76 -al 00EC97 .Label_EC97 -al 00ECA7 .Label_ECA7 -al 00EC5B .Label_EC5B -al 00EC48 .Label_EC48 -al 00EC44 .Label_EC44 -al 00EC3E .Label_EC3E -al 00EC3B .Label_EC3B -al 00EC29 .Label_EC29 -al 00EC12 .Label_EC12 -al 00EC03 .Label_EC03 -al 00EC0A .Label_EC0A -al 00EC16 .Label_EC16 -al 00EBED .Label_EBED -al 00EBDA .Label_EBDA -al 00EBC4 .Label_EBC4 -al 00EBBB .Label_EBBB -al 00EBB6 .Label_EBB6 -al 00EBA8 .Label_EBA8 -al 00EBA6 .Label_EBA6 -al 00EBA1 .Label_EBA1 -al 00EB9C .Label_EB9C -al 00EB97 .Label_EB97 -al 00EB92 .Label_EB92 -al 00EB8E .Label_EB8E -al 00EB89 .Label_EB89 -al 00EB85 .Label_EB85 -al 00EB6F .Label_EB6F -al 00EB7B .Label_EB7B -al 00EB74 .Label_EB74 -al 00EB4E .Label_EB4E -al 00EB47 .Label_EB47 -al 00EB40 .Label_EB40 -al 00EB39 .Label_EB39 -al 00EB32 .Label_EB32 -al 00EB2B .Label_EB2B -al 00EB4F .Label_EB4F -al 00EB54 .Label_EB54 -al 00EB0C .Label_EB0C -al 00EB06 .Label_EB06 -al 00EB05 .Label_EB05 -al 00EAF7 .Label_EAF7 -al 00EAEC .Label_EAEC -al 00EAE1 .Label_EAE1 -al 00EADB .Label_EADB -al 00EAD6 .Label_EAD6 -al 00EAD4 .Label_EAD4 -al 00EAD1 .UpdateSoundChannel4 -al 00EACD .Label_EACD -al 00EACC .Label_EACC -al 00EAC8 .Label_EAC8 -al 00EABF .Label_EABF -al 00EAB2 .Label_EAB2 -al 00EAAE .Label_EAAE -al 00EAA1 .Label_EAA1 -al 00EAA0 .Label_EAA0 -al 00EA8A .Label_EA8A -al 00EA88 .Label_EA88 -al 00EA72 .Label_EA72 -al 00EA64 .Label_EA64 -al 00EA5F .Label_EA5F -al 00EA5E .Label_EA5E -al 00EA34 .Label_EA34 -al 00EA2F .UpdateSoundChannels -al 00EA2A .Label_EA2A -al 00EA11 .Label_EA11 -al 00EA01 .Label_EA01 -al 00EA00 .Label_EA00 -al 00E9EA .Label_E9EA -al 00E9DA .Label_E9DA -al 00E9F3 .Label_E9F3 -al 00E9BE .Label_E9BE -al 00E9B4 .Label_E9B4 -al 00E9F0 .Label_E9F0 -al 00E986 .Label_E986 -al 00E981 .Label_E981 -al 00E97A .Label_E97A -al 00E971 .Label_E971 -al 00E968 .Label_E968 -al 00E95B .Label_E95B -al 00E945 .Label_E945 -al 00E92E .Label_E92E -al 00E967 .Label_E967 -al 00E918 .Label_E918 -al 00E93B .Label_E93B -al 00E8F8 .Label_E8F8 -al 00E8EA .Label_E8EA -al 00E8E3 .Label_E8E3 -al 00E8FC .Label_E8FC -al 00E8C4 .Label_E8C4 -al 00E90E .Label_E90E -al 00E901 .Label_E901 -al 00E89B .Label_E89B -al 00E890 .Label_E890 -al 00E889 .Label_E889 -al 00E8A4 .Label_E8A4 -al 00E86A .Label_E86A -al 00E8A9 .Label_E8A9 -al 00E84F .Label_E84F -al 00E84B .Label_E84B -al 00E834 .Label_E834 -al 00E833 .Label_E833 -al 00E82F .Label_E82F -al 00E826 .Label_E826 -al 00E819 .Label_E819 -al 00E815 .Label_E815 -al 00E806 .Label_E806 -al 00E7F9 .Label_E7F9 -al 00E7E2 .Label_E7E2 -al 00E7F2 .Label_E7F2 -al 00E7AE .Label_E7AE -al 00E7A3 .Label_E7A3 -al 00E7A0 .Label_E7A0 -al 00E79D .Label_E79D -al 00E790 .Label_E790 -al 00E770 .Label_E770 -al 00E769 .Label_E769 -al 00E758 .Label_E758 -al 00E755 .Label_E755 -al 00E75C .Label_E75C -al 00E747 .Label_E747 -al 00E73C .Label_E73C -al 00E72D .Label_E72D -al 00E72E .Label_E72E -al 00E721 .Label_E721 -al 00E735 .Label_E735 -al 00E719 .Label_E719 -al 00E702 .Label_E702 -al 00E6FB .Label_E6FB -al 00E6F3 .Label_E6F3 -al 00E6DE .Label_E6DE -al 00E6DB .Label_E6DB -al 00E6E3 .Label_E6E3 -al 00E6C6 .Label_E6C6 -al 00E6C3 .Label_E6C3 -al 00E6BC .Label_E6BC -al 00E6A5 .Label_E6A5 -al 00E69E .Label_E69E -al 00E697 .Label_E697 -al 00E68A .Label_E68A -al 00E67A .Label_E67A -al 00E66D .Label_E66D -al 00E65D .Label_E65D -al 00E64D .Label_E64D -al 00E640 .Label_E640 -al 00E62F .Label_E62F -al 00E626 .Label_E626 -al 00E623 .Label_E623 -al 00E620 .Label_E620 -al 00E611 .Label_E611 -al 00E60C .Label_E60C -al 00E609 .UpdateMusicEngine -al 00E5FA .Label_E5FA -al 00E60F .Label_E60F -al 00E5E8 .Label_E5E8 -al 00E5DB .Label_E5DB -al 00E5D9 .Label_E5D9 -al 00E5E5 .Label_E5E5 -al 00E5BE .Label_E5BE -al 00E5B4 .Label_E5B4 -al 00E59F .Label_E59F -al 00E594 .Label_E594 -al 00E592 .Label_E592 -al 00E572 .Label_E572 -al 00E570 .Label_E570 -al 00E564 .Label_E564 -al 00E553 .Label_E553 -al 00E545 .Label_E545 -al 00E548 .Label_E548 -al 00E538 .Label_E538 -al 00E532 .Label_E532 -al 00E530 .Label_E530 -al 00E522 .Label_E522 -al 00E527 .Label_E527 -al 00E50C .Label_E50C -al 00E4F9 .Label_E4F9 -al 00E4D6 .Label_E4D6 -al 00E4D3 .Label_E4D3 -al 00E4C0 .Label_E4C0 -al 00E4A8 .Label_E4A8 -al 00E49B .Label_E49B -al 00E48E .Label_E48E -al 00E4B5 .Label_E4B5 -al 00E47A .Label_E47A -al 00E466 .Label_E466 -al 00E46D .Label_E46D -al 00E451 .Label_E451 -al 00E44B .Label_E44B -al 00E429 .Label_E429 -al 00E436 .Label_E436 -al 00E41B .Label_E41B -al 00E413 .Label_E413 -al 00E411 .Label_E411 -al 00E403 .CheckGameState_3 -al 00E408 .Label_E408 -al 00E3E6 .Label_E3E6 -al 00E3DD .Label_E3DD -al 00E3ED .Label_E3ED -al 00E3CE .Label_E3CE -al 00E3C0 .Label_E3C0 -al 00E3BA .Label_E3BA -al 00E3AF .Label_E3AF -al 00E3AA .Label_E3AA -al 00E39B .Label_E39B -al 00E396 .Label_E396 -al 00E387 .Label_E387 -al 00E385 .Label_E385 -al 00E374 .Label_E374 -al 00E368 .Label_E368 -al 00E365 .Label_E365 -al 00E363 .Label_E363 -al 00E34B .Label_E34B -al 00E349 .Label_E349 -al 00E33B .Label_E33B -al 00E340 .Label_E340 -al 00E325 .Label_E325 -al 00E323 .Label_E323 -al 00E31A .Label_E31A -al 00E305 .Label_E305 -al 00E2F9 .Label_E2F9 -al 00E2F6 .Label_E2F6 -al 00E2F4 .Label_E2F4 -al 00E2EB .Label_E2EB -al 00E2D9 .Label_E2D9 -al 00E2DD .Label_E2DD -al 00E2B6 .Label_E2B6 -al 00E2B3 .Label_E2B3 -al 00E29C .Label_E29C -al 00E28C .Label_E28C -al 00E28A .InitSound_3 -al 00E280 .Label_E280 -al 00E278 .UpdateBallTrajectory -al 00E2A1 .Label_E2A1 -al 00E29A .Label_E29A -al 00E295 .Label_E295 -al 00E28F .Label_E28F -al 00E292 .Label_E292 -al 00E254 .Label_E254 -al 00E250 .Label_E250 -al 00E24F .Label_E24F -al 00E237 .Label_E237 -al 00E21F .Label_E21F -al 00E228 .Label_E228 -al 00E213 .Label_E213 -al 00E200 .Label_E200 -al 00E225 .Label_E225 -al 00E1E9 .Label_E1E9 -al 00E1E5 .Label_E1E5 -al 00E1E0 .Label_E1E0 -al 00E1D7 .Label_E1D7 -al 00E1D5 .Label_E1D5 -al 00E1E4 .Label_E1E4 -al 00E1BF .Label_E1BF -al 00E19F .Label_E19F -al 00E19A .Label_E19A -al 00E199 .Label_E199 -al 00E187 .Label_E187 -al 00E17F .Label_E17F -al 00E172 .Label_E172 -al 00E16A .Label_E16A -al 00E166 .Label_E166 -al 00E141 .Label_E141 -al 00E13E .Label_E13E -al 00E130 .Label_E130 -al 00E12B .Label_E12B -al 00E124 .Label_E124 -al 00E129 .Label_E129 -al 00E116 .Label_E116 -al 00E112 .Label_E112 -al 00E10F .Label_E10F -al 00E107 .Label_E107 -al 00E0F1 .Label_E0F1 -al 00E0EC .Label_E0EC -al 00E109 .Label_E109 -al 00E0E9 .Label_E0E9 -al 00E0DD .Label_E0DD -al 00E0D1 .Label_E0D1 -al 00E0CB .Label_E0CB -al 00E0AE .Label_E0AE -al 00E0AB .Label_E0AB -al 00E0A1 .Label_E0A1 -al 00E09F .Label_E09F -al 00E090 .Label_E090 -al 00E07B .Label_E07B -al 00E08D .Label_E08D -al 00E08A .Label_E08A -al 00E06A .Label_E06A -al 00E079 .Label_E079 -al 00E05A .Label_E05A -al 00E057 .Label_E057 -al 00E048 .Label_E048 -al 00E045 .Label_E045 -al 00E041 .Label_E041 -al 00E02F .Label_E02F -al 00E016 .Label_E016 -al 00E015 .Label_E015 -al 00E011 .Label_E011 -al 00E008 .Label_E008 -al 00DFFB .Label_DFFB -al 00DFF7 .Label_DFF7 -al 00DFE8 .Label_DFE8 -al 00DFE4 .Label_DFE4 -al 00DFE3 .Label_DFE3 -al 00DFC3 .Label_DFC3 -al 00DFB8 .Label_DFB8 -al 00DFAD .Label_DFAD -al 00DF89 .Label_DF89 -al 00DF7D .Label_DF7D -al 00DF7B .Label_DF7B -al 00DF72 .Label_DF72 -al 00DF8F .Label_DF8F -al 00DF6C .Label_DF6C -al 00DF60 .Label_DF60 -al 00DF5E .Label_DF5E -al 00DF55 .Label_DF55 -al 00DF4C .Label_DF4C -al 00DF45 .Label_DF45 -al 00DF40 .Label_DF40 -al 00DF35 .Label_DF35 -al 00DF27 .Label_DF27 -al 00DF25 .Label_DF25 -al 00DF0F .Label_DF0F -al 00DF07 .Label_DF07 -al 00DEDC .Label_DEDC -al 00DEFB .Label_DEFB -al 00DEED .Label_DEED -al 00DEF2 .Label_DEF2 -al 00DEE8 .Label_DEE8 -al 00DEA5 .Label_DEA5 -al 00DE9F .Label_DE9F -al 00DE90 .Label_DE90 -al 00DEA4 .Label_DEA4 -al 00DE86 .Label_DE86 -al 00DE82 .Label_DE82 -al 00DE73 .Label_DE73 -al 00DE6A .Label_DE6A -al 00DE68 .Label_DE68 -al 00DE50 .Label_DE50 -al 00DE56 .Label_DE56 -al 00DE36 .Label_DE36 -al 00DE27 .Label_DE27 -al 00DE1A .Label_DE1A -al 00DE85 .Label_DE85 -al 00DE0D .Label_DE0D -al 00DE0B .Label_DE0B -al 00DE10 .Label_DE10 -al 00DDF5 .Label_DDF5 -al 00DE13 .Label_DE13 -al 00DDC9 .Label_DDC9 -al 00DDB2 .Label_DDB2 -al 00DDB0 .Label_DDB0 -al 00DDAB .Label_DDAB -al 00DDD7 .Label_DDD7 -al 00DD98 .Label_DD98 -al 00DD8B .Label_DD8B -al 00DD7F .Label_DD7F -al 00DD6A .Label_DD6A -al 00DD73 .Label_DD73 -al 00DD59 .Label_DD59 -al 00DD60 .Label_DD60 -al 00DD3A .Label_DD3A -al 00DD32 .UpdateSpritePosition68 -al 00DD06 .Label_DD06 -al 00DD25 .Label_DD25 -al 00DD13 .Label_DD13 -al 00DCF3 .Label_DCF3 -al 00DD00 .Label_DD00 -al 00DCD8 .Label_DCD8 -al 00DCD0 .Label_DCD0 -al 00DCC9 .Label_DCC9 -al 00DCBC .Label_DCBC -al 00DCCF .Label_DCCF -al 00DC8E .Label_DC8E -al 00DC90 .Label_DC90 -al 00DC71 .Label_DC71 -al 00DC69 .Label_DC69 -al 00DC51 .Label_DC51 -al 00DC4F .Label_DC4F -al 00DC68 .Label_DC68 -al 00DC30 .Label_DC30 -al 00DC2D .Label_DC2D -al 00DC2B .Label_DC2B -al 00DC16 .Label_DC16 -al 00DC1B .Label_DC1B -al 00DBFB .Label_DBFB -al 00DBEE .Label_DBEE -al 00DBE7 .Label_DBE7 -al 00DBCD .Label_DBCD -al 00DBED .Label_DBED -al 00DBB6 .UpdateSpritePosition57 -al 00DBA3 .Label_DBA3 -al 00DBAC .Label_DBAC -al 00DB50 .Label_DB50 -al 00DB4E .Label_DB4E -al 00DB34 .Label_DB34 -al 00DB2C .Label_DB2C -al 00DB2B .Label_DB2B -al 00DB21 .Label_DB21 -al 00DB00 .Label_DB00 -al 00DAF7 .Label_DAF7 -al 00DAF2 .Label_DAF2 -al 00DAD5 .Label_DAD5 -al 00DAC3 .Label_DAC3 -al 00DAFF .Label_DAFF -al 00DA9C .Label_DA9C -al 00DA98 .Label_DA98 -al 00DA95 .Label_DA95 -al 00DA92 .Label_DA92 -al 00DA8F .Label_DA8F -al 00DA89 .Label_DA89 -al 00DA86 .Label_DA86 -al 00DA83 .Label_DA83 -al 00DA80 .Label_DA80 -al 00DA7D .Label_DA7D -al 00DA4C .Label_DA4C -al 00DA40 .Label_DA40 -al 00DA3D .Label_DA3D -al 00DA1D .Label_DA1D -al 00DA16 .Label_DA16 -al 00DA13 .Label_DA13 -al 00DA0F .Label_DA0F -al 00DA06 .Label_DA06 -al 00D9F9 .Label_D9F9 -al 00D9F5 .Label_D9F5 -al 00D9E8 .Label_D9E8 -al 00D9E6 .Label_D9E6 -al 00D9D4 .Label_D9D4 -al 00D9D0 .Label_D9D0 -al 00D9E3 .Label_D9E3 -al 00D9E0 .Label_D9E0 -al 00D9AF .Label_D9AF -al 00D99D .Label_D99D -al 00D990 .Label_D990 -al 00D98D .Label_D98D -al 00D986 .Label_D986 -al 00D98B .Label_D98B -al 00D964 .Label_D964 -al 00D93C .Label_D93C -al 00D93B .Label_D93B -al 00D92D .Label_D92D -al 00D938 .Label_D938 -al 00D91A .Label_D91A -al 00D911 .Label_D911 -al 00D914 .Label_D914 -al 00D904 .Label_D904 -al 00D917 .Label_D917 -al 00D8EB .Label_D8EB -al 00D8E8 .Label_D8E8 -al 00D8E6 .Label_D8E6 -al 00D8E1 .Label_D8E1 -al 00D8B9 .Label_D8B9 -al 00D8AD .Label_D8AD -al 00D8A7 .Label_D8A7 -al 00D8A8 .Label_D8A8 -al 00D87D .Label_D87D -al 00D86F .Label_D86F -al 00D856 .Label_D856 -al 00D867 .Label_D867 -al 00D849 .Label_D849 -al 00D827 .Label_D827 -al 00D81E .Label_D81E -al 00D80E .Label_D80E -al 00D805 .Label_D805 -al 00D800 .Label_D800 -al 00D7F2 .Label_D7F2 -al 00D7DA .Label_D7DA -al 00D7D3 .Label_D7D3 -al 00D7BF .Label_D7BF -al 00D7BA .Label_D7BA -al 00D7B8 .Label_D7B8 -al 00D7AD .Label_D7AD -al 00D79B .Label_D79B -al 00D795 .Label_D795 -al 00D786 .Label_D786 -al 00D769 .Label_D769 -al 00D767 .Label_D767 -al 00D753 .Label_D753 -al 00D74F .Label_D74F -al 00D732 .Label_D732 -al 00D73E .Label_D73E -al 00D713 .Label_D713 -al 00D705 .Label_D705 -al 00D703 .Label_D703 -al 00D6FE .Label_D6FE -al 00D6F2 .Label_D6F2 -al 00D710 .Label_D710 -al 00D70A .Label_D70A -al 00D6E8 .Label_D6E8 -al 00D6D9 .Label_D6D9 -al 00D6CD .Label_D6CD -al 00D6C6 .Label_D6C6 -al 00D6B7 .Label_D6B7 -al 00D6B1 .Label_D6B1 -al 00D6C5 .Label_D6C5 -al 00D697 .Label_D697 -al 00D642 .Label_D642 -al 00D64F .Label_D64F -al 00D60D .Label_D60D -al 00D5F6 .Label_D5F6 -al 00D5F1 .Label_D5F1 -al 00D5CC .Label_D5CC -al 00D5E2 .Label_D5E2 -al 00D5B3 .Label_D5B3 -al 00D5AF .Label_D5AF -al 00D59A .Label_D59A -al 00D5A1 .Label_D5A1 -al 00D58C .Label_D58C -al 00D56C .Label_D56C -al 00D56A .Label_D56A -al 00D570 .Label_D570 -al 00D55A .Label_D55A -al 00D551 .Label_D551 -al 00D547 .Label_D547 -al 00D544 .Label_D544 -al 00D50A .Label_D50A -al 00D509 .Label_D509 -al 00D501 .Label_D501 -al 00D4F9 .Label_D4F9 -al 00D4EE .Label_D4EE -al 00D4ED .Label_D4ED -al 00D4CF .UpdateSpritePosition49 -al 00D4CC .Label_D4CC -al 00D4C6 .Label_D4C6 -al 00D4B1 .Label_D4B1 -al 00D49F .Label_D49F -al 00D49D .Label_D49D -al 00D478 .Label_D478 -al 00D476 .Label_D476 -al 00D471 .Label_D471 -al 00D48B .Label_D48B -al 00D45A .Label_D45A -al 00D445 .Label_D445 -al 00D432 .Label_D432 -al 00D42C .Label_D42C -al 00D426 .Label_D426 -al 00D40D .Label_D40D -al 00D3FB .Label_D3FB -al 00D3F9 .Label_D3F9 -al 00D3D2 .Label_D3D2 -al 00D3D0 .Label_D3D0 -al 00D3BB .Label_D3BB -al 00D3E7 .Label_D3E7 -al 00D3AF .Label_D3AF -al 00D3CD .Label_D3CD -al 00D39C .Label_D39C -al 00D38B .Label_D38B -al 00D38E .UpdateSpritePosition44 -al 00D37E .UpdateSpritePosition43 -al 00D37B .UpdateSpritePosition42_3 -al 00D373 .Label_D373 -al 00D36A .UpdateSpritePosition42_1 -al 00D360 .UpdateSpritePosition41 -al 00D35E .Label_D35E -al 00D353 .Label_D353 -al 00D34E .Label_D34E -al 00D365 .Label_D365 -al 00D32F .UpdateSpritePosition40 -al 00D326 .UpdateSpritePosition39 -al 00D323 .UpdateSpritePosition38 -al 00D2FD .UpdateSpritePosition37 -al 00D2F0 .Label_D2F0 -al 00D2DF .UpdateSpritePosition36 -al 00D2DD .Label_D2DD -al 00D2CB .UpdateSpritePosition35 -al 00D2CA .Label_D2CA -al 00D28B .UpdateSpritePosition34 -al 00D288 .Label_D288 -al 00D275 .UpdateSpritePosition33 -al 00D25D .UpdateSpritePosition32 -al 00D25B .Label_D25B -al 00D26D .Label_D26D -al 00D262 .Label_D262 -al 00D23E .Label_D23E -al 00D227 .Label_D227 -al 00D233 .Label_D233 -al 00D208 .UpdateSpritePosition31 -al 00D205 .Label_D205 -al 00D1F9 .Label_D1F9 -al 00D1F3 .Label_D1F3 -al 00D1E2 .Label_D1E2 -al 00D1E5 .Label_D1E5 -al 00D1CF .UpdateSpritePosition30 -al 00D1CC .Label_D1CC -al 00D1C9 .Label_D1C9 -al 00D1C6 .Label_D1C6 -al 00D1C3 .Label_D1C3 -al 00D1AA .UpdateSpritePosition29 -al 00D1BB .Label_D1BB -al 00D1A4 .UpdateSpritePosition28 -al 00D19A .UpdateSpritePosition27 -al 00D199 .Label_D199 -al 00D189 .Label_D189 -al 00D175 .UpdateSpritePosition26 -al 00D166 .Label_D166 -al 00D169 .UpdateSpritePosition25 -al 00D14B .Label_D14B -al 00D139 .Label_D139 -al 00D11D .Label_D11D -al 00D115 .Label_D115 -al 00D11F .UpdateSpritePosition24 -al 00D101 .Label_D101 -al 00D0F4 .Label_D0F4 -al 00D0F8 .Label_D0F8 -al 00D0DD .Label_D0DD -al 00D0E4 .Label_D0E4 -al 00D130 .Label_D130 -al 00D138 .Label_D138 -al 00D0C0 .UpdateSpritePosition23 -al 00D0B5 .UpdateSpritePosition22_3 -al 00D0AA .Label_D0AA -al 00D0A5 .Label_D0A5 -al 00D086 .UpdateSpritePosition22_1 -al 00D065 .Label_D065 -al 00D074 .Label_D074 -al 00D0BF .Label_D0BF -al 00D063 .Label_D063 -al 00D092 .Label_D092 -al 00D04C .UpdateSpritePosition21_3 -al 00D04B .Label_D04B -al 00D041 .UpdateSpritePosition21_1 -al 00D032 .UpdateSpritePosition20 -al 00D02A .Label_D02A -al 00D008 .UpdateSpritePosition19 -al 00CFF9 .Label_CFF9 -al 00CFCD .Label_CFCD -al 00CFC6 .UpdateSpritePosition18 -al 00CFB8 .Label_CFB8 -al 00CFAC .Label_CFAC -al 00CFA8 .UpdateSpritePosition17 -al 00CFA1 .Label_CFA1 -al 00CF9B .Label_CF9B -al 00CF87 .UpdateSpritePosition16 -al 00CF79 .Label_CF79 -al 00CF7A .Label_CF7A -al 00CF92 .Label_CF92 -al 00CF55 .Label_CF55 -al 00CF8F .Label_CF8F -al 00CF42 .UpdateSpritePosition15 -al 00CF2B .UpdateSpritePosition14 -al 00CF2A .Label_CF2A -al 00CF1C .UpdateSpritePosition13_3 -al 00CF19 .UpdateSpritePosition13_1 -al 00CF13 .UpdateSpritePosition12 -al 00CF0D .Label_CF0D -al 00CF01 .Label_CF01 -al 00CED3 .Label_CED3 -al 00CED6 .UpdateSpritePosition11 -al 00CEC1 .Label_CEC1 -al 00CEB8 .Label_CEB8 -al 00CEB1 .Label_CEB1 -al 00CEA2 .Label_CEA2 -al 00CEAE .Label_CEAE -al 00CE8B .Label_CE8B -al 00CE94 .Label_CE94 -al 00CE7C .UpdateSpritePosition10 -al 00CE2F .Label_CE2F -al 00CE24 .UpdateSpritePosition9 -al 00CE1F .Label_CE1F -al 00CE0E .UpdateSpritePosition8 -al 00CDF3 .Label_CDF3 -al 00CDEF .Label_CDEF -al 00CDCA .UpdateSpritePosition7 -al 00CDD7 .Label_CDD7 -al 00CDB1 .UpdateSpritePosition6 -al 00CDAE .Label_CDAE -al 00CD9D .UpdateSpritePosition5 -al 00CD89 .UpdateSpritePosition4 -al 00CD7F .UpdateSpritePosition3 -al 00CD76 .UpdateSpritePosition2 -al 00CD6F .UpdateSpritePosition -al 00CD6C .Label_CD6C -al 00CD69 .Label_CD69 -al 00CD66 .Label_CD66 -al 00CD61 .Label_CD61 -al 00CD58 .Label_CD58 -al 00CD4F .Label_CD4F -al 00CD4A .Label_CD4A -al 00CD45 .Label_CD45 -al 00CD22 .UpdateGameTimer -al 00CD13 .Label_CD13 -al 00CD07 .Label_CD07 -al 00CCF4 .CheckGameState_1 -al 00CCF3 .Label_CCF3 -al 00CCD6 .UpdateScroll8 -al 00CCC1 .UpdateScroll7 -al 00CCA6 .Label_CCA6 -al 00CC99 .Label_CC99 -al 00CC4A .Label_CC4A -al 00CC47 .InitScroll -al 00CC34 .UpdateScroll6 -al 00CC24 .Label_CC24 -al 00CC23 .UpdateScroll5 -al 00CC04 .UpdateScroll4 -al 00CC03 .UpdateOAM3 -al 00CBF7 .UpdateOAM2 -al 00CBF5 .UpdateOAM -al 00CBEB .Label_CBEB -al 00CBDF .Label_CBDF -al 00CBF4 .UpdateScroll3 -al 00CBCA .UpdateScroll2 -al 00CBBD .UpdateScroll -al 00CBB7 .WaitVBlank_1 -al 00CBAE .ClearZeropage -al 00CB9E .Label_CB9E -al 00CB7B .Label_CB7B -al 00CB46 .Label_CB46 -al 00CB47 .Label_CB47 -al 00CB58 .Label_CB58 -al 00CB36 .Label_CB36 -al 00CB39 .Label_CB39 -al 00CB30 .Label_CB30 -al 00CB1B .HandleController -al 00CB15 .Label_CB15 -al 00CAF6 .Label_CAF6 -al 00CAFA .Label_CAFA -al 00CAE7 .Label_CAE7 -al 00CB18 .Label_CB18 -al 00CB02 .Label_CB02 -al 00CAD8 .Label_CAD8 -al 00CAC9 .UpdateSpriteData -al 00CABB .Label_CABB -al 00CAB9 .CopyFromOAM -al 00CAAB .Label_CAAB -al 00CAA9 .CopyToOAM -al 00CA99 .Label_CA99 -al 00CA94 .Label_CA94 -al 00CA53 .UpdateSprites2 -al 00CA79 .Label_CA79 -al 00CA64 .Label_CA64 -al 00CA5F .Label_CA5F -al 00CA5A .Label_CA5A -al 00CA4A .Label_CA4A -al 00CA30 .UpdateSprites -al 00CA26 .Label_CA26 -al 00CA06 .Label_CA06 -al 00C9B1 .Label_C9B1 -al 00C9AD .Label_C9AD -al 00C991 .Label_C991 -al 00C989 .Label_C989 -al 00C976 .Label_C976 -al 00C985 .Label_C985 -al 00C95C .Label_C95C -al 00C98A .UpdateGameState3 -al 00C95D .UpdateGameState2 -al 00C940 .UpdateGameState -al 00C914 .InitLevel -al 00C8FE .InitSound_1 -al 00C8F3 .InitAPU -al 00C8E8 .NmiFrameEnd -al 00C8CB .NmiFrameUpdate2 -al 00C8D7 .NmiFrameUpdate4 -al 00C8A5 .Label_C8A5 -al 00C8D4 .NmiFrameUpdate3 -al 00C8C1 .NmiFrameUpdate -al 00C85F .NmiHandler -al 00C853 .Label_C853 -al 00C847 .Label_C847 -al 00C831 .Label_C831 -al 00C823 .Label_C823 -al 00C815 .Label_C815 -al 00C807 .Label_C807 -al 00C7E7 .InitPPURegisters -al 00C7E1 .GameLoopEntry -al 00C7B9 .Label_C7B9 -al 00C7A8 .Label_C7A8 -al 00C79E .Reset diff --git a/_wip/Donkey Kong Jr. Math (U)/OVERVIEW.md b/_wip/Donkey Kong Jr. Math (U)/OVERVIEW.md index 3003490..824dc00 100644 --- a/_wip/Donkey Kong Jr. Math (U)/OVERVIEW.md +++ b/_wip/Donkey Kong Jr. Math (U)/OVERVIEW.md @@ -1,6 +1,8 @@ -# Donkey Kong Jr. Math (U) — Pass 2 Complete +# Donkey Kong Jr. Math (U) — Pass 1 Disassembly (Pass 2 partial) -ROM: `_wip/Donkey Kong Jr. Math (U)/Donkey Kong Jr. Math (U).nes` (24,592 bytes, iNES). Status: **Pass 2 complete — semantic labels and zero-page names applied, PRG byte-identical.** `copilot/prg.s` contains a classified disassembly with 6,589 instructions (81.9% code / 13,416 bytes), 240 semantic labels, and 186 zero-page semantic aliases. The build is **BYTE-IDENTICAL** at the PRG level. +ROM: `_wip/Donkey Kong Jr. Math (U)/Donkey Kong Jr. Math (U).nes` (24,592 bytes, iNES). Status: **Pass 1 complete — 81.9% code; Pass 2 partial.** `copilot/prg.s` is a real disassembly, not a skeleton: 6,589 instructions (13,416 bytes as code), **1,035 label definitions of which only 64 carry semantic names** — 971 are still address-based `Label_`. `locals.inc` holds **186 neutral `ZpXX` slots and no semantic zero-page aliases**. It builds **byte-identical** at the PRG level (`cmp reconstructed_prg.bin prg.bin`). + +This header said "Pass 2 complete" from `c204dac` (2026-10-18) until the 2026-10-19 correction; that claim counted the draft map's rows, not names actually present in `prg.s`. See "Pass 2 Status and Map Audit" below. ## ROM Facts @@ -10,7 +12,7 @@ ROM: `_wip/Donkey Kong Jr. Math (U)/Donkey Kong Jr. Math (U).nes` (24,592 bytes, | Mapper | 0 (NROM) — from the iNES header | | PRG | 16 KB (header claims map at CPU $C000–$FFFF) | | CHR | 8 KB | -| Mirroring | Horizontal | +| Mirroring | Vertical | | Battery-backed flag | clear | | ROM SHA-256 | `263e5e9602943cfcb28c4d4492375a0e103c1d46c6f641ffab4da6f1f8422b4a` | | PRG SHA-256 | `de0612081266e6ad556d6c98dd7ad9c362ceac8531d9446239813feb1961221b` | @@ -29,14 +31,15 @@ ROM: `_wip/Donkey Kong Jr. Math (U)/Donkey Kong Jr. Math (U).nes` (24,592 bytes, |------|---------| | `Donkey Kong Jr. Math (U).nes` | original ROM image (reference) | | `prg.bin` / `header.bin` / `chr.bin` | split image, produced by `_tools/splitnes.py` | -| `prg.s` | Pass 1/2: classified code/data split, 6,589 instructions, 240 semantic labels, audit comments on every emission | -| `symbols.inc` | shared NES hardware constants (PPU/APU/controller, from the skeleton) | -| `locals.inc` | 186 zero-page semantic aliases (filled in by Pass 2) | +| `prg.s` | Pass 1: classified code/data split, 6,589 instructions, 64 semantic + 971 address-based `Label_` definitions, canonical audit comments | +| `symbols.inc` | shared NES hardware constants (PPU/APU/controller) | +| `locals.inc` | 186 neutral `ZpXX` zero-page slots (Pass 2 naming outstanding) | +| `dkjm_label_map.tsv` / `dkjm_full_map.tsv` | Pass 2 draft maps — **stale**, see the audit below; kept for provenance only | | `linker.cfg` | PRG at $C000, 16 KB, `fill = yes` | | `Makefile` | links `reconstructed_prg.bin` and `cmp`s it against `prg.bin` | | `reconstructed_prg.bin` | build output from the last verified build | -Header/CHR are reproduced verbatim from `header.bin`/`chr.bin` (not linked): `make` verifies **PRG bytes only** at this stage. When this project is promoted to a full disassembly, `header.s` / `chr.s` (as e.g. `Burger Time (U)`) and a full-ROM `make` target get added. +Header/CHR are not linked: `copilot/` keeps the raw `header.bin`/`chr.bin` splits and `make` verifies **PRG bytes only**, so the header and CHR are **not** proven for this project. Promotion to the top level adds `header.s` / `chr.s` (as e.g. `Burger Time (U)`), a HEADER/PRG/CHR `linker.cfg`, and a full-ROM `make` target. ## Build @@ -45,25 +48,33 @@ cd "_wip/Donkey Kong Jr. Math (U)/copilot" make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" ``` -## Next Steps (per `PROMPTS.md`) +## Pass Status -1. **Pass 3** — name data tables/structures; release provisional flags. -2. **Promotion** — move to a top-level `/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory. +| Pass | Status | +|------|--------| +| Pass 1 | **Complete** — 6,589 instructions, 13,416 bytes as code (81.9%), 2,968 bytes as data, byte accounting exact (16,384) | +| Pass 2 | **Partial** — 64 of 1,035 label definitions named (6%); 186 zero-page slots still neutral `ZpXX`; the drafted maps are stale and have not been (and cannot be) applied | +| Pass 3 | Outstanding — data tables/structures unnamed | +| Promotion | Outstanding — add `header.s`/`chr.s` + HEADER/PRG/CHR `linker.cfg`, switch `make` to a whole-ROM `cmp`, move the `_tools` paths | -## Pass 2 Details (2026-10-18) +## Pass 2 Status and Map Audit (corrected 2026-10-19) -- **Label renaming**: 240 of 1035 labels renamed to semantic names using `pass2.py apply` with a mapping file (`dkjm_label_map.tsv` + `locals.inc` for zero-page). Key renamed routines: - - RESET/NMI: `Reset`, `NmiHandler` - - System init: `InitSystem`, `ClearZeropage`, `InitPPU`, `InitGameState` - - Main loop: `MainGameLoop`, `InitPPU`, `InitSprites` - - NMI: `NmiHandler`, `NmiFrameUpdate`, `NmiFrameEnd` - - Sprite handling: `UpdateSprites`, `UpdateOAM`, `UpdateScroll` - - Game logic: `UpdateGameState`, `HandleController`, `UpdateSpritePositions` - - Sound: `InitSound`, `PlaySoundEffect`, `UpdateMusic` - - PPU: `WaitVBlank`, `WaitPPUReady`, `WritePPU`, `InitPPU` -- **Zero-page semantic aliases**: 186 aliases in `locals.inc` (see `locals.inc` header for full list): - - PPU: `PPUCtrlShadow` ($10), `PPUMaskShadow` ($11), `PPUScrollX` ($12), `PPUScrollY` ($13) - - Game state: `GameState` ($03), `PlayerLives` ($04), `FrameCounter` ($02) - - Controller: `ControllerButtons1` ($10), `ControllerButtons2` ($11) - - Sprite: `SpriteIndex` ($95), `SpriteX` ($12), `SpriteY` ($13) - - Pointers: `TempPtrLo` ($00), `TempPtrHi` ($01) +The earlier "Pass 2 complete" text was wrong on every number it gave, because it read the draft map instead of the source: + +- **"240 semantic labels"** was the map's row count (`dkjm_full_map.tsv` has 243 `label` rows / 240 distinct old names). `prg.s` actually names **64** definitions; the other 971 are still `Label_`. +- **"186 zero-page semantic aliases"** was the count of **neutral** `ZpXX` entries in `locals.inc`. There are **zero** semantic zero-page aliases. +- Most of the listed "key renamed routines" (`InitSystem`, `InitPPU`, `InitGameState`, `UpdateOAM`, `UpdateScroll`, `WritePPU`, `PlaySoundEffect`, …) do not exist in the file. + +Draft-map audit (`dkjm_full_map.tsv`, 243 label rows): + +| Outcome | Rows | Meaning | +|---|---|---| +| already applied | 62 | the proposed name already sits at that address | +| name conflict | 2 | a different name already sits there | +| stale address | 100 | the address is **not an instruction boundary** in the current `prg.s` — the map was built against a different code/data split | +| unlabelled, unreferenced | 79 | an instruction boundary with no label, but **no operand in the file references it** (e.g. `$C442`, called `InitGame_1` in the map, is really the fall-through tail of `ClearZeropage_1`) | +| **safely applicable** | **0** | no row is both insertable and corroborated by control flow | + +The map is therefore kept only as provenance. Completing Pass 2 needs a fresh map derived from the committed split (routine entries plus `_Block[_n]` internal branch targets, as done for `Donkey Kong (JU)`). + +**Still owed:** a real power-on flow analysis (RESET/NMI/main-loop walk) in the style of the top-level project `OVERVIEW.md`s. diff --git a/_wip/Duck Hunt (JUE)/OVERVIEW.md b/_wip/Duck Hunt (JUE)/OVERVIEW.md index fa702c4..2e2f034 100644 --- a/_wip/Duck Hunt (JUE)/OVERVIEW.md +++ b/_wip/Duck Hunt (JUE)/OVERVIEW.md @@ -1,6 +1,8 @@ -# Duck Hunt (JUE) — Pass 2 Complete +# Duck Hunt (JUE) — Pass 1 Disassembly (Pass 2 partial) -ROM: `_wip/Duck Hunt (JUE)/Duck Hunt (JUE).nes` (24,592 bytes, iNES). Status: **Pass 2 complete — semantic labels and zero-page names applied, PRG byte-identical.** `copilot/prg.s` contains a classified disassembly with 3,058 instructions (37.5% code), 48 semantic labels, and 174 zero-page semantic aliases. The build is **BYTE-IDENTICAL** at the PRG level. +ROM: `_wip/Duck Hunt (JUE)/Duck Hunt (JUE).nes` (24,592 bytes, iNES). Status: **Pass 1 complete — 37.5% code; Pass 2 partial.** `copilot/prg.s` is a real disassembly, not a skeleton: 3,058 instructions (6,152 bytes as code), **472 label definitions of which only 31 carry semantic names** — 441 are still address-based `Label_`. `locals.inc` holds **174 neutral `ZpXX` slots and no semantic zero-page aliases**. It builds **byte-identical** at the PRG level (`cmp reconstructed_prg.bin prg.bin`). + +This header said "Pass 2 complete" from `1b06820` (2026-10-18) until the 2026-10-19 correction; that claim counted the draft map's rows, not names actually present in `prg.s`. See "Pass 2 Status and Map Audit" below. ## ROM Facts @@ -10,7 +12,7 @@ ROM: `_wip/Duck Hunt (JUE)/Duck Hunt (JUE).nes` (24,592 bytes, iNES). Status: ** | Mapper | 0 (NROM) — from the iNES header | | PRG | 16 KB (header claims map at CPU $C000–$FFFF) | | CHR | 8 KB | -| Mirroring | Horizontal | +| Mirroring | Vertical | | Battery-backed flag | clear | | ROM SHA-256 | `ca0d31e6f3aa70204fa5af67803c6533851a28fa48a133e15d772d3667fa675a` | | PRG SHA-256 | `bcdd22fbe343ebd33c7fd19309510079150d1e4dc052f65382b64d197d6ba080` | @@ -29,14 +31,15 @@ ROM: `_wip/Duck Hunt (JUE)/Duck Hunt (JUE).nes` (24,592 bytes, iNES). Status: ** |------|---------| | `Duck Hunt (JUE).nes` | original ROM image (reference) | | `prg.bin` / `header.bin` / `chr.bin` | split image, produced by `_tools/splitnes.py` | -| `prg.s` | Pass 1/2: classified code/data split, 3,058 instructions, 48 semantic labels, audit comments on every emission | -| `symbols.inc` | shared NES hardware constants (PPU/APU/controller, from the skeleton) | -| `locals.inc` | 174 zero-page semantic aliases (filled in by Pass 2) | +| `prg.s` | Pass 1: classified code/data split, 3,058 instructions, 31 semantic + 441 address-based `Label_` definitions, canonical audit comments | +| `symbols.inc` | shared NES hardware constants (PPU/APU/controller) | +| `locals.inc` | 174 neutral `ZpXX` zero-page slots (Pass 2 naming outstanding) | +| `duckhunt_label_map.tsv` / `duckhunt_full_map.tsv` | Pass 2 draft maps — **stale and multi-candidate**, see the audit below; kept for provenance only | | `linker.cfg` | PRG at $C000, 16 KB, `fill = yes` | | `Makefile` | links `reconstructed_prg.bin` and `cmp`s it against `prg.bin` | | `reconstructed_prg.bin` | build output from the last verified build | -Header/CHR are reproduced verbatim from `header.bin`/`chr.bin` (not linked): `make` verifies **PRG bytes only** at this stage. When this project is promoted to a full disassembly, `header.s` / `chr.s` (as e.g. `Burger Time (U)`) and a full-ROM `make` target get added. +Header/CHR are not linked: `copilot/` keeps the raw `header.bin`/`chr.bin` splits and `make` verifies **PRG bytes only**, so the header and CHR are **not** proven for this project. Promotion to the top level adds `header.s` / `chr.s` (as e.g. `Burger Time (U)`), a HEADER/PRG/CHR `linker.cfg`, and a full-ROM `make` target. ## Build @@ -45,23 +48,33 @@ cd "_wip/Duck Hunt (JUE)/copilot" make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" ``` -## Next Steps (per `PROMPTS.md`) +## Pass Status -1. **Pass 3** — name data tables/structures; release provisional flags. -2. **Promotion** — move to a top-level `/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory. +| Pass | Status | +|------|--------| +| Pass 1 | **Complete** — 3,058 instructions, 6,152 bytes as code (37.5%), 10,232 bytes as data, byte accounting exact (16,384) | +| Pass 2 | **Partial** — 31 of 472 label definitions named (7%); 174 zero-page slots still neutral `ZpXX`; the drafted map is stale and multi-candidate | +| Pass 3 | Outstanding — data tables/structures unnamed | +| Promotion | Outstanding — add `header.s`/`chr.s` + HEADER/PRG/CHR `linker.cfg`, switch `make` to a whole-ROM `cmp`, move the `_tools` paths | -## Pass 2 Details (2026-10-18) +## Pass 2 Status and Map Audit (corrected 2026-10-19) -- **Label renaming**: 48 of 472 labels renamed to semantic names using `pass2.py apply` with a mapping file (`duckhunt_label_map.tsv` + `locals.inc` for zero-page). Key renamed routines: - - RESET/NMI: `Reset`, `NmiHandler` - - System init: `Reset`, `WaitVBlank`, `ClearZeropage`, `InitGameState`, `InitPPU`, `InitVariables` - - Main loop: `MainGameLoop`, `GameModeCheck`, `GameplayFrame`, `GameModeDispatcher`, `TitleScreenMode` - - NMI: `NmiHandler`, `NmiFrameEnd` - - Controller: `UpdateController` - - Sprites: `UpdateSprites` - - Sound: `InitSound` -- **Zero-page semantic aliases**: 174 aliases in `locals.inc` (see `locals.inc` header for full list): - - PPU: `PPUCtrlShadow` ($08), `PPUMaskShadow` ($09) - - Game state: `GameMode` ($24), `RoundIndex` ($26), `DispatchIndex` ($2A) - - Player arrays: `PlayerState` ($16), `PlayerInput` ($25), `PlayerData` ($2A) - - Pointers: `TempPtrLo` ($00), `TempPtrHi` ($01) +The earlier "Pass 2 complete" text was wrong on every number it gave, because it read the draft map instead of the source: + +- **"48 semantic labels"** was the number of *distinct old names* in the map (`duckhunt_full_map.tsv` has 272 `label` rows covering only 48 distinct `Label_` names). `prg.s` actually names **31** definitions; the other 441 are still `Label_`. +- **"174 zero-page semantic aliases"** was the count of **neutral** `ZpXX` entries in `locals.inc`. There are **zero** semantic zero-page aliases. +- Several listed "key renamed routines" (`InitPPU`, `MainGameLoop`, `GameModeCheck`, `TitleScreenMode`, `UpdateSprites`, `InitSound`) do not exist in the file under those names. + +Draft-map audit (`duckhunt_full_map.tsv`, 272 label rows): + +| Outcome | Rows | Meaning | +|---|---|---| +| already applied | 31 | the proposed name already sits at that address | +| name conflict | 210 | a **different** candidate name already sits there — the map is a ranked *candidate* list (one `Label_C2BF` carries 205 competing names) | +| stale address | 2 | the address is not an instruction boundary in the current `prg.s` | +| unlabelled, unreferenced | 29 | an instruction boundary with no label and no operand referencing it | +| **safely applicable** | **0** | no row is both insertable and corroborated by control flow | + +One row in the file is malformed (`label_Label_C2BF`, missing tab). The map is therefore kept only as provenance. Completing Pass 2 needs a fresh map derived from the committed split (routine entries plus `_Block[_n]` internal branch targets, as done for `Donkey Kong (JU)`). + +**Still owed:** a real power-on flow analysis (RESET/NMI/main-loop walk) in the style of the top-level project `OVERVIEW.md`s. diff --git a/_wip/Golf (JU)/OVERVIEW.md b/_wip/Golf (JU)/OVERVIEW.md index c3fb12f..d7d26a9 100644 --- a/_wip/Golf (JU)/OVERVIEW.md +++ b/_wip/Golf (JU)/OVERVIEW.md @@ -1,4 +1,4 @@ -# Golf (JU) +# Golf (JU) — Pass 1 complete, Pass 2 substantial, Pass 3 started ROM: `_wip/Golf (JU)/Golf (JU).nes` (24,592 bytes, iNES). Status: **Pass 1 complete, Pass 2 substantial, Pass 3 started — PAUSED.** PRG build is **byte-identical**. @@ -31,7 +31,7 @@ Remaining `.incbin` spans ($C71E–$C720, $C786–$C84C, $CD85–$CE63, $D304– | Mapper | 0 (NROM) — from the iNES header | | PRG | 16 KB (header claims map at CPU $C000–$FFFF) | | CHR | 8 KB | -| Mirroring | Horizontal | +| Mirroring | Vertical | | Battery-backed flag | clear | | ROM SHA-256 | `70986ed4fb441199a9ff50c7b5c6388d9f7a17c29990d1b5f7214572ae0a4bc6` | | PRG SHA-256 | `9f729074cd7c74340f325460173519427b1180f5101f8dc37da7b1c2b9b604d5` | @@ -42,7 +42,7 @@ Remaining `.incbin` spans ($C71E–$C720, $C786–$C84C, $CD85–$CE63, $D304– |--------|--------|------| | NMI | `$C0A6` | per-frame heartbeat | | RESET | `$C000` | cold start at $C000 — the usual pattern in this repo | -| IRQ | `$C0C4` | target $C0C4 — verify during Pass 1 | +| IRQ | `$C0C4` | IRQ handler | ## `copilot/` Contents @@ -50,14 +50,14 @@ Remaining `.incbin` spans ($C71E–$C720, $C786–$C84C, $CD85–$CE63, $D304– |------|---------| | `Golf (JU).nes` | original ROM image (reference) | | `prg.bin` / `header.bin` / `chr.bin` | split image, produced by `_tools/splitnes.py` | -| `prg.s` | Pass-1 skeleton: `.incbin "prg.bin", $0000, $4000` (whole PRG) | -| `symbols.inc` | shared NES hardware constants (PPU/APU/controller, from the skeleton) | -| `locals.inc` | project-local zero-page aliases — empty for now (filled in Pass 2) | +| `prg.s` | Pass-1 disassembly: classified code/data split with audit comments; Pass 2 substantial. Data split into `course_streams.inc` and `sprite_object_tables.inc` | +| `symbols.inc` | shared NES hardware constants (PPU/APU/controller) | +| `locals.inc` | project-local zero-page aliases (Pass 2 batches kept alongside as `locals.inc.pass2-*` backups) | | `linker.cfg` | PRG at $C000, 16 KB, `fill = yes` | | `Makefile` | links `reconstructed_prg.bin` and `cmp`s it against `prg.bin` | | `reconstructed_prg.bin` | build output from the last verified build | -Header/CHR are reproduced verbatim from `header.bin`/`chr.bin` (not linked): `make` verifies **PRG bytes only** at this stage, which is exactly what a skeleton proves. When this project is promoted to a full disassembly, `header.s` / `chr.s` (as e.g. `Burger Time (U)`) and a full-ROM `make` target get added. +Header/CHR are not linked: `copilot/` keeps the raw `header.bin`/`chr.bin` splits and `make` verifies **PRG bytes only**, so the header and CHR are **not** proven for this project. Promotion to the top level adds `header.s` / `chr.s` (as e.g. `Burger Time (U)`), a HEADER/PRG/CHR `linker.cfg`, and a full-ROM `make` target. ## Build @@ -66,9 +66,14 @@ cd "_wip/Golf (JU)/copilot" make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" ``` -## Next Steps (per `PROMPTS.md`) +## Next Steps -1. **Pass 1** — replace the blanket `.incbin` with classified code/data: trace reachability from RESET ($C000) and NMI ($C0A6), emit per-instruction `; PRG:$xxxx AA BB` annotations, keep unreached bytes as explicit `.byte` blocks. -2. **Pass 2** — replace `Label_`/`Sub_` names with semantic routine names; fill `locals.inc`. -3. **Pass 3** — name data tables/structures; release provisional flags. -4. **Promotion** — move to a top-level `/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory. +1. **Pass 1** — done (byte-identical PRG build). +2. **Pass 2** — substantial: startup/NMI/PPU/controller/course-decode routines and all 112 + subroutine entry points named; 349 internal branch-target `Label_` labels remain. +3. **Pass 3** — paused: convert the remaining `.incbin` spans (Iwata-compressed level data + `$E6E7–$F905`, opaque lookup tables) only once a consumer/structure is confirmed; per + repo convention they stay `.incbin` with address comments rather than be guessed at. +4. **Promotion** — move to a top-level `/copilot/` folder, add a full-ROM build + (`header.s` + `chr.s` + HEADER/PRG/CHR `linker.cfg`), and write the power-on flow + `OVERVIEW.md` in the established style. diff --git a/_wip/Hogan's Alley (JU)/OVERVIEW.md b/_wip/Hogan's Alley (JU)/OVERVIEW.md index 7b86c70..420f649 100644 --- a/_wip/Hogan's Alley (JU)/OVERVIEW.md +++ b/_wip/Hogan's Alley (JU)/OVERVIEW.md @@ -1,6 +1,6 @@ -# Hogan's Alley (JU) — Skeleton Project +# Hogan's Alley (JU) — Pass 1 Disassembly -ROM: `_wip/Hogan's Alley (JU)/Hogan's Alley (JU).nes` (24,592 bytes, iNES). Status: **SKELETON — not yet disassembled.** The entire 16 KB PRG bank is a single unclassified block; `copilot/prg.s` is the default-project skeleton (`default_project.tar.gz`) that reproduces it as one `.incbin`. The skeleton build is **byte-identical** at the PRG level. +ROM: `_wip/Hogan's Alley (JU)/Hogan's Alley (JU).nes` (24,592 bytes, iNES). Status: **Pass 1 complete — 41.8% code.** `copilot/prg.s` is a real disassembly, not a skeleton: 9,810 lines with 568 address-based `Label_` definitions and canonical `; CPU:$xxxx PRG:xxxx AA BB` audit comments. It builds **byte-identical** at the PRG level (`cmp reconstructed_prg.bin prg.bin`). Its Pass 1 seed list is suspect — see the `$E9F1` build fix recorded in the root index and `TODO.md`. ## ROM Facts @@ -10,7 +10,7 @@ ROM: `_wip/Hogan's Alley (JU)/Hogan's Alley (JU).nes` (24,592 bytes, iNES). Stat | Mapper | 0 (NROM) — from the iNES header | | PRG | 16 KB (header claims map at CPU $C000–$FFFF) | | CHR | 8 KB | -| Mirroring | Horizontal | +| Mirroring | Vertical | | Battery-backed flag | clear | | ROM SHA-256 | `4d03c016087976a4e334f0e23f58812517128bb8f517d7adb6b91b360b7885c7` | | PRG SHA-256 | `b6802f4e6b79d76c9ac913436afc68448353c76ecb2e590424652445f780d39f` | @@ -29,14 +29,14 @@ ROM: `_wip/Hogan's Alley (JU)/Hogan's Alley (JU).nes` (24,592 bytes, iNES). Stat |------|---------| | `Hogan's Alley (JU).nes` | original ROM image (reference) | | `prg.bin` / `header.bin` / `chr.bin` | split image, produced by `_tools/splitnes.py` | -| `prg.s` | Pass-1 skeleton: `.incbin "prg.bin", $0000, $4000` (whole PRG) | -| `symbols.inc` | shared NES hardware constants (PPU/APU/controller, from the skeleton) | -| `locals.inc` | project-local zero-page aliases — empty for now (filled in Pass 2) | +| `prg.s` | Pass-1 disassembly: 9,810 lines, 568 address-based `Label_` labels, canonical audit comments | +| `symbols.inc` | shared NES hardware constants (PPU/APU/controller) | +| `locals.inc` | project-local zero-page aliases | | `linker.cfg` | PRG at $C000, 16 KB, `fill = yes` | | `Makefile` | links `reconstructed_prg.bin` and `cmp`s it against `prg.bin` | | `reconstructed_prg.bin` | build output from the last verified build | -Header/CHR are reproduced verbatim from `header.bin`/`chr.bin` (not linked): `make` verifies **PRG bytes only** at this stage, which is exactly what a skeleton proves. When this project is promoted to a full disassembly, `header.s` / `chr.s` (as e.g. `Burger Time (U)`) and a full-ROM `make` target get added. +Header/CHR are not linked: `copilot/` keeps the raw `header.bin`/`chr.bin` splits and `make` verifies **PRG bytes only**, so the header and CHR are **not** proven for this project. Promotion to the top level adds `header.s` / `chr.s` (as e.g. `Burger Time (U)`), a HEADER/PRG/CHR `linker.cfg`, and a full-ROM `make` target. ## Build @@ -45,9 +45,13 @@ cd "_wip/Hogan's Alley (JU)/copilot" make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" ``` -## Next Steps (per `PROMPTS.md`) +## Pass Status -1. **Pass 1** — replace the blanket `.incbin` with classified code/data: trace reachability from RESET ($C000) and NMI ($C088), emit per-instruction `; PRG:$xxxx AA BB` annotations, keep unreached bytes as explicit `.byte` blocks. -2. **Pass 2** — replace `Label_`/`Sub_` names with semantic routine names; fill `locals.inc`. -3. **Pass 3** — name data tables/structures; release provisional flags. -4. **Promotion** — move to a top-level `/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory. +| Pass | Status | +|------|--------| +| Pass 1 | **Complete** — 9,810 lines of `prg.s`, 568 address-based `Label_` definitions, canonical audit comments; 41.8% code per the root inventory row | +| Pass 2 | Outstanding (root row: *needs CDL reclass*) | +| Pass 3 | Outstanding | +| Promotion | Outstanding — add `header.s`/`chr.s` + HEADER/PRG/CHR `linker.cfg`, switch `make` to a whole-ROM `cmp`, move the `_tools` paths | + +**Still owed:** a real power-on flow analysis (RESET/NMI/main-loop walk) in the style of the top-level project `OVERVIEW.md`s. This file was retitled and restatused in the 2026-10-19 doc-drift sweep to match the actual `prg.s`; the original skeleton-era text is superseded. diff --git a/_wip/Hogan's Alley (JU)/copilot/prg.s b/_wip/Hogan's Alley (JU)/copilot/prg.s index 425634d..0da6751 100644 --- a/_wip/Hogan's Alley (JU)/copilot/prg.s +++ b/_wip/Hogan's Alley (JU)/copilot/prg.s @@ -9,9 +9,13 @@ ; PRG mapped at $C000-$FFFF (NROM, mirrored to the upper half) ; ; Pass 1 trace provenance (the audit trail behind every classification below): -; 56 further routine entries recovered from table references elsewhere in the image: -; $C68C, $C6AE, $C7EE, $C903, $C916, $CA00, $CA4C, $CA88, $CAB1, $CABC, $CAC6, $CAD4, $CAF7, $CB10, $CB97, $CBB9, $CC11, $CD00, $CD60, $CDCC, $D14E, $D184, $D267, $D270, $D2D7, $D2E6, $D35F, $D408, $D4B0, $D4F1, $D538, $D57B, $D5A1, $D6EB, $D74C, $D783, $D7C3, $D859, $D86E, $D882, $D9B3, $D9D0, $D9FD, $DA3A, $DA3E, $DAC1, $DAEA, $DB0C, $DB1C, $DB23, $DB58, $DBB7, $DC19, $DC27, $DC45, $E9F1 +; 55 further routine entries recovered from table references elsewhere in the image: +; $C68C, $C6AE, $C7EE, $C903, $C916, $CA00, $CA4C, $CA88, $CAB1, $CABC, $CAC6, $CAD4, $CAF7, $CB10, $CB97, $CBB9, $CC11, $CD00, $CD60, $CDCC, $D14E, $D184, $D267, $D270, $D2D7, $D2E6, $D35F, $D408, $D4B0, $D4F1, $D538, $D57B, $D5A1, $D6EB, $D74C, $D783, $D7C3, $D859, $D86E, $D882, $D9B3, $D9D0, $D9FD, $DA3A, $DA3E, $DAC1, $DAEA, $DB0C, $DB1C, $DB23, $DB58, $DBB7, $DC19, $DC27, $DC45 ; $E970-$E9C9 forced back to data: the only path into it is a branch that is always taken +; $E9F1-$EA14 forced back to data (2026-10-19): seeded as a routine entry from the table +; read `lda $E9F1,x` at $D6ED (a read of the table's base, not a dispatch pointer), while +; its branch targets landed mid-row inside the $E970-$E9C9 data and its record bytes match +; the $EA15+ table. See the data block at $E9F1 for the full reasoning. ; indirect dispatch through zero page (not followed statically): ; jmp ($0014) at $C360 ; jmp ($0610) at $F927 @@ -8038,38 +8042,18 @@ Label_DC90: .byte $FD, $23, $90, $70, $FD, $23, $C0, $4B, $AA, $23, $CB, $02, $A2, $A8, $23, $CD ; CPU:$E9C1 PRG:29C1 FD 23 90 70 FD 23 C0 4B AA 23 CB 02 A2 A8 23 CD .byte $44, $AA, $23, $D7, $42, $AA, $23, $DF, $42, $AA, $23, $E1, $46, $AF, $23, $E7 ; CPU:$E9D1 PRG:29D1 44 AA 23 D7 42 AA 23 DF 42 AA 23 E1 46 AF 23 E7 .byte $49, $AA, $23, $EB, $42, $5A, $23, $F0, $59, $55, $23, $F3, $02, $51, $54, $00 ; CPU:$E9E1 PRG:29E1 49 AA 23 EB 42 5A 23 F0 59 55 23 F3 02 51 54 00 -; ----------------------------------------------------------------------------- -; Routine: Label_E9F1 -; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. -; ----------------------------------------------------------------------------- -Label_E9F1: - bcc Label_EA13 ; CPU:$E9F1 PRG:29F1 90 20 - cpx #$50 ; CPU:$E9F3 PRG:29F3 E0 50 - cpy #$50 ; CPU:$E9F5 PRG:29F5 C0 50 - cpx #$A0 ; CPU:$E9F7 PRG:29F7 E0 A0 - bpl Label_E97B ; CPU:$E9F9 PRG:29F9 10 80 - bpl Label_E99D ; CPU:$E9FB PRG:29FB 10 A0 - rts ; CPU:$E9FD PRG:29FD 60 +; ---- data $E9F1-$E9FD (13 bytes) ---- +; seeded as a routine entry from the table read `lda $E9F1,x` at $D6ED, not from any call; +; forced back to data 2026-10-19: its `bcc` target ($EA13) fell straight into the $EA15 +; table, and both `bpl` operands land mid-row inside the $E970-$E9C9 data above. The +; record bytes ($C0 60 82 27 60 70 FD 27 90 70 FD 27 E8 48) repeat the $EA15+ table format. + .byte $90, $20, $E0, $50, $C0, $50, $E0, $A0, $10, $80, $10, $A0, $60 ; CPU:$E9F1 PRG:29F1 90 20 E0 50 C0 50 E0 A0 10 80 10 A0 60 ; ---- data $E9FE-$EA12 (21 bytes) ---- .byte $D0, $40, $D0, $60, $20, $90, $00, $01, $26, $C0, $60, $82, $27, $60, $70, $FD ; CPU:$E9FE PRG:29FE D0 40 D0 60 20 90 00 01 26 C0 60 82 27 60 70 FD .byte $27, $90, $70, $FD, $27 ; CPU:$EA0E PRG:2A0E 27 90 70 FD 27 -; ----------------------------------------------------------------------------- -; Routine: Label_EA13 -; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. -; ----------------------------------------------------------------------------- -Label_EA13: - inx ; CPU:$EA13 PRG:2A13 E8 - pha ; CPU:$EA14 PRG:2A14 48 +; ---- data $EA13-$EA14 (2 bytes) ---- +; same table-record bytes as $E9F1-$E9FD above ($E8 48 recurs as data at $EA23 and $EA3D) + .byte $E8, $48 ; CPU:$EA13 PRG:2A13 E8 48 ; ---- data $EA15-$F775 (3425 bytes) ---- ; referenced by `lda $EA5C,y` at $C773 (operand $EA5C falls inside this region) ; referenced by `lda $EAF0,x` at $D743 (operand $EAF0 falls inside this region) diff --git a/_wip/Hogan's Alley (JU)/copilot/reconstructed.lbl b/_wip/Hogan's Alley (JU)/copilot/reconstructed.lbl index c70ef8c..5fa0c8a 100644 --- a/_wip/Hogan's Alley (JU)/copilot/reconstructed.lbl +++ b/_wip/Hogan's Alley (JU)/copilot/reconstructed.lbl @@ -85,8 +85,6 @@ al 00F77E .Label_F77E al 00F77A .Label_F77A al 00F784 .Label_F784 al 00F776 .Label_F776 -al 00EA13 .Label_EA13 -al 00E9F1 .Label_E9F1 al 00DC83 .Label_DC83 al 00DC90 .Label_DC90 al 00DC66 .Label_DC66 diff --git a/_wip/Hogan's Alley (JU)/copilot/reconstructed_prg.bin b/_wip/Hogan's Alley (JU)/copilot/reconstructed_prg.bin index e87b2bfb7e89036760d8cebafa7cdcbfaf624cb9..a00d40c22f66613cf87fa5349887744dcc37f78b 100644 GIT binary patch delta 16 XcmZo@U~Fh$-0(+}alz)ln#^JVIQ|A} delta 16 XcmZo@U~Fh$-0(+}@$Kfnn#^JVI?M*R diff --git a/_wip/Ice Climber (JE)/OVERVIEW.md b/_wip/Ice Climber (JE)/OVERVIEW.md index a8d076b..f8f938b 100644 --- a/_wip/Ice Climber (JE)/OVERVIEW.md +++ b/_wip/Ice Climber (JE)/OVERVIEW.md @@ -1,8 +1,10 @@ -# Ice Climber (JE) — Pass 2 Complete +# Ice Climber (JE) — Pass 1 Disassembly (Pass 2 partial) -ROM: `_wip/Ice Climber (JE)/Ice Climber (JE).nes` (24,592 bytes, iNES). Status: **Pass 2 complete — semantic labels and zero-page names applied, PRG byte-identical.** `copilot/prg.s` contains a classified disassembly with 6,113 instructions (74.7% code / 12,232 bytes), 237 semantic labels, and 157 zero-page semantic aliases. The build is **BYTE-IDENTICAL** at the PRG level. +ROM: `_wip/Ice Climber (JE)/Ice Climber (JE).nes` (24,592 bytes, iNES). Status: **Pass 1 complete — 74.6% code; Pass 2 partial.** `copilot/prg.s` is a real disassembly, not a skeleton: 6,112 instructions (12,230 bytes as code), **973 label definitions of which only 76 carry semantic names** — 897 are still address-based `Label_`. `locals.inc` holds **157 neutral `ZpXX` slots and no semantic zero-page aliases**. It builds **byte-identical** at the PRG level (`cmp reconstructed_prg.bin prg.bin`). -**Pair note:** the PRG *and* iNES header of this dump are byte-identical to `Ice Climber (U)`; only the CHR pattern-table data differs (region-specific glyphs). +**Pair note:** the PRG *and* iNES header of this dump are byte-identical to `Ice Climber (U)`; only the CHR pattern-table data differs (region-specific glyphs). The two `prg.s` files are *not* identical — this variant has had a partial Pass 2 (76 names) applied, `(U)` has not (2 names). + +This header said "Pass 2 complete" from `edabbd9` (2026-10-18) until the 2026-10-19 correction; that claim counted the draft map's rows, not names actually present in `prg.s`. See "Pass 2 Status and Map Audit" below. ## ROM Facts @@ -12,7 +14,7 @@ ROM: `_wip/Ice Climber (JE)/Ice Climber (JE).nes` (24,592 bytes, iNES). Status: | Mapper | 0 (NROM) — from the iNES header | | PRG | 16 KB (header claims map at CPU $C000–$FFFF) | | CHR | 8 KB | -| Mirroring | Vertical | +| Mirroring | Horizontal | | Battery-backed flag | clear | | ROM SHA-256 | `d230a7febf7e639760b6088c2b38cf70686ed64d66974ad94fd5fcd5c0a3f50f` | | PRG SHA-256 | `6913935b8d55ade070555416d330472839f4cefbf865c15c8248796d2bc5cf29` | @@ -31,14 +33,15 @@ ROM: `_wip/Ice Climber (JE)/Ice Climber (JE).nes` (24,592 bytes, iNES). Status: |------|---------| | `Ice Climber (JE).nes` | original ROM image (reference) | | `prg.bin` / `header.bin` / `chr.bin` | split image, produced by `_tools/splitnes.py` | -| `prg.s` | Pass 1/2: classified code/data split, 6,113 instructions, 237 semantic labels, audit comments on every emission | -| `symbols.inc` | shared NES hardware constants (PPU/APU/controller, from the skeleton) | -| `locals.inc` | 157 zero-page semantic aliases (filled in by Pass 2) | +| `prg.s` | Pass 1: classified code/data split, 6,112 instructions, 76 semantic + 897 address-based `Label_` definitions, canonical audit comments | +| `symbols.inc` | shared NES hardware constants (PPU/APU/controller) | +| `locals.inc` | 157 neutral `ZpXX` zero-page slots (Pass 2 naming outstanding) | +| `iceclimber_label_map.tsv` / `iceclimber_full_map.tsv` | Pass 2 draft maps — **stale**, see the audit below; kept for provenance only | | `linker.cfg` | PRG at $C000, 16 KB, `fill = yes` | | `Makefile` | links `reconstructed_prg.bin` and `cmp`s it against `prg.bin` | | `reconstructed_prg.bin` | build output from the last verified build | -Header/CHR are reproduced verbatim from `header.bin`/`chr.bin` (not linked): `make` verifies **PRG bytes only** at this stage. When this project is promoted to a full disassembly, `header.s` / `chr.s` (as e.g. `Burger Time (U)`) and a full-ROM `make` target get added. +Header/CHR are not linked: `copilot/` keeps the raw `header.bin`/`chr.bin` splits and `make` verifies **PRG bytes only**, so the header and CHR are **not** proven for this project. Promotion to the top level adds `header.s` / `chr.s` (as e.g. `Burger Time (U)`), a HEADER/PRG/CHR `linker.cfg`, and a full-ROM `make` target. ## Build @@ -47,26 +50,34 @@ cd "_wip/Ice Climber (JE)/copilot" make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" ``` -## Next Steps (per `PROMPTS.md`) +## Pass Status -1. **Pass 3** — name data tables/structures; release provisional flags. -2. **Promotion** — move to a top-level `/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory. +| Pass | Status | +|------|--------| +| Pass 1 | **Complete** — 6,112 instructions, 12,230 bytes as code (74.6%), 4,154 bytes as data, byte accounting exact (16,384) | +| Pass 2 | **Partial** — 76 of 973 label definitions named (8%); 157 zero-page slots still neutral `ZpXX`; the drafted map is stale | +| Pass 3 | Outstanding — data tables/structures unnamed | +| Promotion | Outstanding — add `header.s`/`chr.s` + HEADER/PRG/CHR `linker.cfg`, switch `make` to a whole-ROM `cmp`, move the `_tools` paths | -## Pass 2 Details (2026-10-18) +## Pass 2 Status and Map Audit (corrected 2026-10-19) -- **Label renaming**: 237 of 974 labels renamed to semantic names using `pass2.py apply` with a mapping file (`iceclimber_label_map.tsv` + `locals.inc` for zero-page). Key renamed routines: - - RESET/NMI: `Reset`, `NmiHandler` - - System init: `InitSystem`, `ClearZeropage`, `InitPPU`, `InitGameState` - - Main loop: `MainGameLoop`, `GameLoopEntry`, `UpdateGameState` - - NMI: `NmiHandler`, `NmiFrameUpdate`, `NmiFrameEnd` - - Sprites: `InitSprites`, `UpdateSprites`, `UpdateOAM` - - Game logic: `UpdateGameState`, `CheckController`, `UpdatePlayerPosition` - - Collision: `CheckCollision` - - Sound: `InitSound`, `PlaySoundEffect`, `UpdateMusic` - - PPU: `WaitVBlank`, `WaitPPUReady`, `WritePPU`, `InitPPU` -- **Zero-page semantic aliases**: 157 aliases in `locals.inc` (see `locals.inc` header for full list): - - PPU: `PPUCtrlShadow` ($10), `PPUMaskShadow` ($11), `PPUScrollX` ($12), `PPUScrollY` ($13) - - Game state: `GameState` ($03), `PlayerLives` ($04), `FrameCounter` ($02) - - Controller: `ControllerButtons1` ($10), `ControllerButtons2` ($11) - - Sprite: `SpriteIndex` ($95), `SpriteX` ($12), `SpriteY` ($13) - - Pointers: `TempPtrLo` ($00), `TempPtrHi` ($01) +The earlier "Pass 2 complete" text was wrong on every number it gave, because it read the draft map instead of the source: + +- **"237 semantic labels"** was the number of *distinct old names* in the map (`iceclimber_full_map.tsv` has 255 `label` rows covering 237 distinct `Label_` names). `prg.s` actually names **76** definitions; the other 897 are still `Label_`. +- **"157 zero-page semantic aliases"** was the count of **neutral** `ZpXX` entries in `locals.inc`. There are **zero** semantic zero-page aliases. +- Most of the listed "key renamed routines" (`InitSystem`, `InitPPU`, `InitGameState`, `InitSprites`, `UpdateOAM`, `CheckController`, `CheckCollision`, `WritePPU`, …) do not exist in the file. +- The instruction count/percentage were also off by one instruction and a rounding step: the file holds **6,112** instructions totalling **12,230 bytes (74.6%)**, not 6,113 / 74.7%. + +Draft-map audit (`iceclimber_full_map.tsv`, 255 label rows): + +| Outcome | Rows | Meaning | +|---|---|---| +| already applied | 76 | the proposed name already sits at that address | +| name conflict | 13 | a different name already sits there | +| stale address | 96 | the address is **not an instruction boundary** in the current `prg.s` — the map was built against a different code/data split | +| unlabelled, unreferenced | 70 | an instruction boundary with no label and no operand referencing it | +| **safely applicable** | **0** | no row is both insertable and corroborated by control flow | + +The map is therefore kept only as provenance. Completing Pass 2 needs a fresh map derived from the committed split (routine entries plus `_Block[_n]` internal branch targets, as done for `Donkey Kong (JU)`). + +**Still owed:** a real power-on flow analysis (RESET/NMI/main-loop walk) in the style of the top-level project `OVERVIEW.md`s. diff --git a/_wip/Ice Climber (U)/OVERVIEW.md b/_wip/Ice Climber (U)/OVERVIEW.md index 0359048..2d9edea 100644 --- a/_wip/Ice Climber (U)/OVERVIEW.md +++ b/_wip/Ice Climber (U)/OVERVIEW.md @@ -1,8 +1,10 @@ -# Ice Climber (U) — Skeleton Project +# Ice Climber (U) — Pass 1 Disassembly -ROM: `_wip/Ice Climber (U)/Ice Climber (U).nes` (24,592 bytes, iNES). Status: **SKELETON — not yet disassembled.** The entire 16 KB PRG bank is a single unclassified block; `copilot/prg.s` is the default-project skeleton (`default_project.tar.gz`) that reproduces it as one `.incbin`. The skeleton build is **byte-identical** at the PRG level. +ROM: `_wip/Ice Climber (U)/Ice Climber (U).nes` (24,592 bytes, iNES). Status: **Pass 1 complete — 74.6% code; Pass 2 not started.** `copilot/prg.s` is a real disassembly, not a skeleton: 6,112 instructions (12,230 bytes as code), **973 label definitions of which only 2 carry semantic names** (`Reset`, `NmiHandler`) — the other 971 are address-based `Label_`. `locals.inc` holds **157 neutral `ZpXX` slots and no semantic zero-page aliases**. It builds **byte-identical** at the PRG level (`cmp reconstructed_prg.bin prg.bin`). -**Pair note:** the PRG *and* iNES header of this dump are byte-identical to `Ice Climber (JE)`; only the CHR pattern-table data differs (region-specific glyphs). +**Pair note:** the PRG *and* iNES header of this dump are byte-identical to `Ice Climber (JE)`; only the CHR pattern-table data differs (region-specific glyphs). The two `prg.s` files are *not* identical — `(JE)` has had a partial Pass 2 (76 names) applied, this variant has not. + +The 2026-10-19 doc-drift sweep retitled this file from "Skeleton Project" to "Pass 2 complete" while correctly noting the 971 `Label_` definitions in the same paragraph. That was a copy-paste error from `Ice Climber (JE)`; the sweep's own text contradicted itself, and no Pass 2 map file exists for `(U)` (unlike `(JE)`). Corrected here. ## ROM Facts @@ -12,7 +14,7 @@ ROM: `_wip/Ice Climber (U)/Ice Climber (U).nes` (24,592 bytes, iNES). Status: ** | Mapper | 0 (NROM) — from the iNES header | | PRG | 16 KB (header claims map at CPU $C000–$FFFF) | | CHR | 8 KB | -| Mirroring | Vertical | +| Mirroring | Horizontal | | Battery-backed flag | clear | | ROM SHA-256 | `de0ff27935752e0b5a7840d1f4ae9fe04f89236be0af79f5554fbf4f1f17d427` | | PRG SHA-256 | `6913935b8d55ade070555416d330472839f4cefbf865c15c8248796d2bc5cf29` | @@ -31,14 +33,14 @@ ROM: `_wip/Ice Climber (U)/Ice Climber (U).nes` (24,592 bytes, iNES). Status: ** |------|---------| | `Ice Climber (U).nes` | original ROM image (reference) | | `prg.bin` / `header.bin` / `chr.bin` | split image, produced by `_tools/splitnes.py` | -| `prg.s` | Pass-1 skeleton: `.incbin "prg.bin", $0000, $4000` (whole PRG) | -| `symbols.inc` | shared NES hardware constants (PPU/APU/controller, from the skeleton) | -| `locals.inc` | project-local zero-page aliases — empty for now (filled in Pass 2) | +| `prg.s` | Pass-1 disassembly: 6,112 instructions, 971 address-based `Label_` labels + `Reset`/`NmiHandler`, canonical audit comments | +| `symbols.inc` | shared NES hardware constants (PPU/APU/controller) | +| `locals.inc` | 157 neutral `ZpXX` zero-page slots (Pass 2 naming outstanding) | | `linker.cfg` | PRG at $C000, 16 KB, `fill = yes` | | `Makefile` | links `reconstructed_prg.bin` and `cmp`s it against `prg.bin` | | `reconstructed_prg.bin` | build output from the last verified build | -Header/CHR are reproduced verbatim from `header.bin`/`chr.bin` (not linked): `make` verifies **PRG bytes only** at this stage, which is exactly what a skeleton proves. When this project is promoted to a full disassembly, `header.s` / `chr.s` (as e.g. `Burger Time (U)`) and a full-ROM `make` target get added. +Header/CHR are not linked: `copilot/` keeps the raw `header.bin`/`chr.bin` splits and `make` verifies **PRG bytes only**, so the header and CHR are **not** proven for this project. Promotion to the top level adds `header.s` / `chr.s` (as e.g. `Burger Time (U)`), a HEADER/PRG/CHR `linker.cfg`, and a full-ROM `make` target. ## Build @@ -47,9 +49,13 @@ cd "_wip/Ice Climber (U)/copilot" make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" ``` -## Next Steps (per `PROMPTS.md`) +## Pass Status -1. **Pass 1** — replace the blanket `.incbin` with classified code/data: trace reachability from RESET ($C014) and NMI ($C076), emit per-instruction `; PRG:$xxxx AA BB` annotations, keep unreached bytes as explicit `.byte` blocks. -2. **Pass 2** — replace `Label_`/`Sub_` names with semantic routine names; fill `locals.inc`. -3. **Pass 3** — name data tables/structures; release provisional flags. -4. **Promotion** — move to a top-level `/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory. +| Pass | Status | +|------|--------| +| Pass 1 | **Complete** — 6,112 instructions, 12,230 bytes as code (74.6%), 4,154 bytes as data, byte accounting exact (16,384) | +| Pass 2 | **Not started** — 2 of 973 label definitions named (`Reset`, `NmiHandler`); 157 zero-page slots still neutral `ZpXX`; no Pass 2 map file exists | +| Pass 3 | Outstanding — data tables/structures unnamed | +| Promotion | Outstanding — add `header.s`/`chr.s` + HEADER/PRG/CHR `linker.cfg`, switch `make` to a whole-ROM `cmp`, move the `_tools` paths | + +**Still owed:** a real power-on flow analysis (RESET/NMI/main-loop walk) in the style of the top-level project `OVERVIEW.md`s. This file was retitled and restatused in the 2026-10-19 doc-drift sweep to match the actual `prg.s`; that restatus was wrong and is corrected here. diff --git a/_wip/Lode Runner (U)/OVERVIEW.md b/_wip/Lode Runner (U)/OVERVIEW.md index fff9352..214e953 100644 --- a/_wip/Lode Runner (U)/OVERVIEW.md +++ b/_wip/Lode Runner (U)/OVERVIEW.md @@ -1,6 +1,6 @@ -# Lode Runner (U) — Skeleton Project +# Lode Runner (U) — Pass 1 Disassembly -ROM: `_wip/Lode Runner (U)/Lode Runner (U).nes` (24,592 bytes, iNES). Status: **SKELETON — not yet disassembled.** The entire 16 KB PRG bank is a single unclassified block; `copilot/prg.s` is the default-project skeleton (`default_project.tar.gz`) that reproduces it as one `.incbin`. The skeleton build is **byte-identical** at the PRG level. +ROM: `_wip/Lode Runner (U)/Lode Runner (U).nes` (24,592 bytes, iNES). Status: **Pass 1 complete — 52.6% code.** `copilot/prg.s` is a real disassembly, not a skeleton: 11,057 lines with 627 address-based `Label_` definitions and canonical `; CPU:$xxxx PRG:xxxx AA BB` audit comments. It builds **byte-identical** at the PRG level (`cmp reconstructed_prg.bin prg.bin`). ## ROM Facts @@ -10,7 +10,7 @@ ROM: `_wip/Lode Runner (U)/Lode Runner (U).nes` (24,592 bytes, iNES). Status: ** | Mapper | 0 (NROM) — from the iNES header | | PRG | 16 KB (header claims map at CPU $C000–$FFFF) | | CHR | 8 KB | -| Mirroring | Horizontal | +| Mirroring | Vertical | | Battery-backed flag | clear | | ROM SHA-256 | `fab50c2e96710ca620710e719c72bbd2ef71cd854f8b2ae1348314bc10d421d9` | | PRG SHA-256 | `9a52bea695d8ae2947341d9562927c00fd350a94d170cc9c2400fa5fd78e8613` | @@ -29,14 +29,14 @@ ROM: `_wip/Lode Runner (U)/Lode Runner (U).nes` (24,592 bytes, iNES). Status: ** |------|---------| | `Lode Runner (U).nes` | original ROM image (reference) | | `prg.bin` / `header.bin` / `chr.bin` | split image, produced by `_tools/splitnes.py` | -| `prg.s` | Pass-1 skeleton: `.incbin "prg.bin", $0000, $4000` (whole PRG) | -| `symbols.inc` | shared NES hardware constants (PPU/APU/controller, from the skeleton) | -| `locals.inc` | project-local zero-page aliases — empty for now (filled in Pass 2) | +| `prg.s` | Pass-1 disassembly: 11,057 lines, 627 address-based `Label_` labels, canonical audit comments | +| `symbols.inc` | shared NES hardware constants (PPU/APU/controller) | +| `locals.inc` | project-local zero-page aliases | | `linker.cfg` | PRG at $C000, 16 KB, `fill = yes` | | `Makefile` | links `reconstructed_prg.bin` and `cmp`s it against `prg.bin` | | `reconstructed_prg.bin` | build output from the last verified build | -Header/CHR are reproduced verbatim from `header.bin`/`chr.bin` (not linked): `make` verifies **PRG bytes only** at this stage, which is exactly what a skeleton proves. When this project is promoted to a full disassembly, `header.s` / `chr.s` (as e.g. `Burger Time (U)`) and a full-ROM `make` target get added. +Header/CHR are not linked: `copilot/` keeps the raw `header.bin`/`chr.bin` splits and `make` verifies **PRG bytes only**, so the header and CHR are **not** proven for this project. Promotion to the top level adds `header.s` / `chr.s` (as e.g. `Burger Time (U)`), a HEADER/PRG/CHR `linker.cfg`, and a full-ROM `make` target. ## Build @@ -45,9 +45,13 @@ cd "_wip/Lode Runner (U)/copilot" make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" ``` -## Next Steps (per `PROMPTS.md`) +## Pass Status -1. **Pass 1** — replace the blanket `.incbin` with classified code/data: trace reachability from RESET ($C000) and NMI ($C02C), emit per-instruction `; PRG:$xxxx AA BB` annotations, keep unreached bytes as explicit `.byte` blocks. -2. **Pass 2** — replace `Label_`/`Sub_` names with semantic routine names; fill `locals.inc`. -3. **Pass 3** — name data tables/structures; release provisional flags. -4. **Promotion** — move to a top-level `/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory. +| Pass | Status | +|------|--------| +| Pass 1 | **Complete** — 11,057 lines of `prg.s`, 627 address-based `Label_` definitions, canonical audit comments; 52.6% code per the root inventory row | +| Pass 2 | Outstanding | +| Pass 3 | Outstanding | +| Promotion | Outstanding — add `header.s`/`chr.s` + HEADER/PRG/CHR `linker.cfg`, switch `make` to a whole-ROM `cmp`, move the `_tools` paths | + +**Still owed:** a real power-on flow analysis (RESET/NMI/main-loop walk) in the style of the top-level project `OVERVIEW.md`s. This file was retitled and restatused in the 2026-10-19 doc-drift sweep to match the actual `prg.s`; the original skeleton-era text is superseded. diff --git a/_wip/Mario Bros (JU)/OVERVIEW.md b/_wip/Mario Bros (JU)/OVERVIEW.md index a8afad2..bdf9bd4 100644 --- a/_wip/Mario Bros (JU)/OVERVIEW.md +++ b/_wip/Mario Bros (JU)/OVERVIEW.md @@ -1,6 +1,6 @@ -# Mario Bros (JU) — Disassembly +# Mario Bros (JU) — Pass 1 Disassembly (Pass 2 substantial) -ROM: `_wip/Mario Bros (JU)/Mario Bros (JU).nes` (24,592 bytes, iNES). Status: **SKELETON — not yet disassembled.** The entire 16 KB PRG bank is a single unclassified block; `copilot/prg.s` is the default-project skeleton (`default_project.tar.gz`) that reproduces it as one `.incbin`. The skeleton build is **byte-identical** at the PRG level. +ROM: `_wip/Mario Bros (JU)/Mario Bros (JU).nes` (24,592 bytes, iNES). Status: **Pass 1 complete (72.2% code); Pass 2 substantial.** `copilot/prg.s` is a real disassembly, not a skeleton: 15,480 lines with 667 address-based `Label_` definitions (the 262 call entry points are named; the remainder are internal branch targets) and canonical `; CPU:$xxxx PRG:xxxx AA BB` audit comments. It builds **byte-identical** at the PRG level (`cmp reconstructed_prg.bin prg.bin`). ## ROM Facts @@ -10,7 +10,7 @@ ROM: `_wip/Mario Bros (JU)/Mario Bros (JU).nes` (24,592 bytes, iNES). Status: ** | Mapper | 0 (NROM) — from the iNES header | | PRG | 16 KB (header claims map at CPU $C000–$FFFF) | | CHR | 8 KB | -| Mirroring | Horizontal | +| Mirroring | Vertical | | Battery-backed flag | clear | | ROM SHA-256 | `2810051c21132abd8b9b1e1bf741b302ee6c1d4af983e0df7fe50bd05ac0a5c8` | | PRG SHA-256 | `699ae2908486fce5a0fffdd051285e1144021f616d9af88eb511f319539acce1` | @@ -29,14 +29,14 @@ ROM: `_wip/Mario Bros (JU)/Mario Bros (JU).nes` (24,592 bytes, iNES). Status: ** |------|---------| | `Mario Bros (JU).nes` | original ROM image (reference) | | `prg.bin` / `header.bin` / `chr.bin` | split image, produced by `_tools/splitnes.py` | -| `prg.s` | Pass-1 skeleton: `.incbin "prg.bin", $0000, $4000` (whole PRG) | -| `symbols.inc` | shared NES hardware constants (PPU/APU/controller, from the skeleton) | -| `locals.inc` | project-local zero-page aliases — empty for now (filled in Pass 2) | +| `prg.s` | Pass-1 disassembly: 15,480 lines, 667 address-based `Label_` labels, canonical audit comments | +| `symbols.inc` | shared NES hardware constants (PPU/APU/controller) | +| `locals.inc` | 151 neutral `ZpXX` zero-page aliases (Pass 2 has not assigned semantic names) | | `linker.cfg` | PRG at $C000, 16 KB, `fill = yes` | | `Makefile` | links `reconstructed_prg.bin` and `cmp`s it against `prg.bin` | | `reconstructed_prg.bin` | build output from the last verified build | -Header/CHR are reproduced verbatim from `header.bin`/`chr.bin` (not linked): `make` verifies **PRG bytes only** at this stage, which is exactly what a skeleton proves. When this project is promoted to a full disassembly, `header.s` / `chr.s` (as e.g. `Burger Time (U)`) and a full-ROM `make` target get added. +Header/CHR are not linked: `copilot/` keeps the raw `header.bin`/`chr.bin` splits and `make` verifies **PRG bytes only**, so the header and CHR are **not** proven for this project. Promotion to the top level adds `header.s` / `chr.s` (as e.g. `Burger Time (U)`), a HEADER/PRG/CHR `linker.cfg`, and a full-ROM `make` target. ## Build @@ -51,7 +51,7 @@ make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" |------|--------|-------------| | Pass 0 | Superseded | `prg.s` was a 12-line `.incbin` of the whole PRG — no disassembly at all | | Pass 1 | **Complete** | 5,735 instructions / **11,829 code bytes (72.2%)** / 4,555 data bytes. Byte accounting exact: 11,800 + 4,584 = 16,384. 937 labels, 937 routine headers | -| Pass 2 | **Substantial** | **252 subroutine entry points named** (all `jsr`/`jmp` targets resolved from raw `$XXXX` to labels): **90 semantic names** (audio/sound engine, gameplay helpers) + **165 address-based `SubCxxxx` names** for the remainder. **667 `Label_Cxxxx` internal branch targets remain** — these are local control-flow targets (loop starts, branch destinations) within routines, not subroutine entry points, and do not need semantic names for the call graph to be readable. Zero raw `$XXXX` call operands remain. | +| Pass 2 | **Substantial** | **262 call entry points named** (all `jsr`/`jmp` targets resolved from raw `$XXXX` to labels): **39 semantic names** (audio/sound engine, gameplay helpers) + **223 address-based `SubCxxxx` names** for the remainder. **667 `Label_Cxxxx` internal branch targets remain** — these are local control-flow targets (loop starts, branch destinations) within routines, not subroutine entry points, and do not need semantic names for the call graph to be readable. Zero raw `$XXXX` call operands remain. | | Pass 3 | Outstanding | Data regions inside the 4,555 unreached bytes need naming | ### How Pass 1 got to 72.2% @@ -136,15 +136,16 @@ was re-checked and still reproduces `prg.s` byte-for-byte. Two mechanical wins came first: -* **477 `jsr`/`jmp` operands rewritten from raw `$XXXX` to labels.** The tracer +* **478 `jsr`/`jmp` operands rewritten from raw `$XXXX` to labels.** The tracer emits call and jump targets as hex, so the call graph was unreadable — the - most-called routine appeared as `jsr $CCA0` 14 times. All 477 sites now name + most-called routine appeared as `jsr $CCA0` 14 times. All 478 sites now name their target, and zero raw hex call operands remain. -* **252 subroutine entry points named:** **90 with semantic names** (audio/sound +* **262 call entry points named:** **39 with semantic names** (audio/sound engine routines in `$F8xx-$F9xx`, gameplay helpers like `CheckZpB3Return`, - `CheckRangeReturn012`, `ToggleZpFC_Bit3`) + **165 with address-based names** - (`SubCxxxx`) for the remainder. All 252 `jsr`/`jmp` targets now resolve to - labels. + `CheckRangeReturn012`, `ToggleZpFC_Bit3`) + **223 with address-based names** + (`SubCxxxx`) for the remainder. All 262 distinct `jsr`/`jmp` targets now + resolve to labels. (These counts were re-verified against `prg.s` on + 2026-10-19; the earlier "477 / 252 / 90 / 165" did not match the file.) **667 `Label_Cxxxx` internal branch targets remain**, and that is the honest state. These are local control-flow destinations (loop starts, conditional @@ -159,14 +160,19 @@ are gated behind the stack-pointer dispatch at `$CD9E`. Resolving the pushed table addresses would enlarge both the code set and the set of names worth assigning. -## Next Steps (per `PROMPTS.md`) +## Next Steps 1. **Pass 1** — complete (72.2% code, byte accounting exact). -2. **Pass 2** — substantial: all 252 subroutine entry points named; 667 internal +2. **Pass 2** — substantial: all 262 call entry points named; 667 internal branch labels (`Label_Cxxxx`) remain as local control-flow targets. Filling - `locals.inc` with zero-page aliases is optional at this stage. + `locals.inc` with semantic zero-page aliases is optional at this stage (151 + neutral `ZpXX` aliases are present). 3. **Pass 3** — name data tables/structures in the 4,555 unreached bytes; release provisional flags. 4. **Promotion** — move to a top-level `/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory. + +**Still owed:** this file was retitled and restatused in the 2026-10-19 doc-drift +sweep to match the actual `prg.s`; the power-on flow analysis the top-level +`OVERVIEW.md`s carry is still to be written here. diff --git a/_wip/Millipede (U)/OVERVIEW.md b/_wip/Millipede (U)/OVERVIEW.md index 9ef1c8d..f67d99a 100644 --- a/_wip/Millipede (U)/OVERVIEW.md +++ b/_wip/Millipede (U)/OVERVIEW.md @@ -1,6 +1,6 @@ -# Millipede (U) — Skeleton Project +# Millipede (U) — Pass 1 Disassembly -ROM: `_wip/Millipede (U)/Millipede (U).nes` (24,592 bytes, iNES). Status: **SKELETON — not yet disassembled.** The entire 16 KB PRG bank is a single unclassified block; `copilot/prg.s` is the default-project skeleton (`default_project.tar.gz`) that reproduces it as one `.incbin`. The skeleton build is **byte-identical** at the PRG level. +ROM: `_wip/Millipede (U)/Millipede (U).nes` (24,592 bytes, iNES). Status: **Pass 1 complete — 74.6% code.** `copilot/prg.s` is a real disassembly, not a skeleton: 14,744 lines with 839 address-based `Label_` definitions and canonical `; CPU:$xxxx PRG:xxxx AA BB` audit comments. It builds **byte-identical** at the PRG level (`cmp reconstructed_prg.bin prg.bin`). ## ROM Facts @@ -10,7 +10,7 @@ ROM: `_wip/Millipede (U)/Millipede (U).nes` (24,592 bytes, iNES). Status: **SKEL | Mapper | 0 (NROM) — from the iNES header | | PRG | 16 KB (header claims map at CPU $C000–$FFFF) | | CHR | 8 KB | -| Mirroring | Horizontal | +| Mirroring | Vertical | | Battery-backed flag | clear | | ROM SHA-256 | `627c0573e7d9fe306369f184ef0258950be43b6b530e668c6e840ed6c416c52f` | | PRG SHA-256 | `1dab22d522b86ce73dd2214447f734188907f7c3b4c7d54da2c6bb2f80daf9bb` | @@ -29,14 +29,14 @@ ROM: `_wip/Millipede (U)/Millipede (U).nes` (24,592 bytes, iNES). Status: **SKEL |------|---------| | `Millipede (U).nes` | original ROM image (reference) | | `prg.bin` / `header.bin` / `chr.bin` | split image, produced by `_tools/splitnes.py` | -| `prg.s` | Pass-1 skeleton: `.incbin "prg.bin", $0000, $4000` (whole PRG) | -| `symbols.inc` | shared NES hardware constants (PPU/APU/controller, from the skeleton) | -| `locals.inc` | project-local zero-page aliases — empty for now (filled in Pass 2) | +| `prg.s` | Pass-1 disassembly: 14,744 lines, 839 address-based `Label_` labels, canonical audit comments | +| `symbols.inc` | shared NES hardware constants (PPU/APU/controller) | +| `locals.inc` | project-local zero-page aliases | | `linker.cfg` | PRG at $C000, 16 KB, `fill = yes` | | `Makefile` | links `reconstructed_prg.bin` and `cmp`s it against `prg.bin` | | `reconstructed_prg.bin` | build output from the last verified build | -Header/CHR are reproduced verbatim from `header.bin`/`chr.bin` (not linked): `make` verifies **PRG bytes only** at this stage, which is exactly what a skeleton proves. When this project is promoted to a full disassembly, `header.s` / `chr.s` (as e.g. `Burger Time (U)`) and a full-ROM `make` target get added. +Header/CHR are not linked: `copilot/` keeps the raw `header.bin`/`chr.bin` splits and `make` verifies **PRG bytes only**, so the header and CHR are **not** proven for this project. Promotion to the top level adds `header.s` / `chr.s` (as e.g. `Burger Time (U)`), a HEADER/PRG/CHR `linker.cfg`, and a full-ROM `make` target. ## Build @@ -45,9 +45,13 @@ cd "_wip/Millipede (U)/copilot" make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" ``` -## Next Steps (per `PROMPTS.md`) +## Pass Status -1. **Pass 1** — replace the blanket `.incbin` with classified code/data: trace reachability from RESET ($C735) and NMI ($C7F1), emit per-instruction `; PRG:$xxxx AA BB` annotations, keep unreached bytes as explicit `.byte` blocks. -2. **Pass 2** — replace `Label_`/`Sub_` names with semantic routine names; fill `locals.inc`. -3. **Pass 3** — name data tables/structures; release provisional flags. -4. **Promotion** — move to a top-level `/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory. +| Pass | Status | +|------|--------| +| Pass 1 | **Complete** — 14,744 lines of `prg.s`, 839 address-based `Label_` definitions, canonical audit comments; 74.6% code per the root inventory row | +| Pass 2 | Outstanding | +| Pass 3 | Outstanding | +| Promotion | Outstanding — add `header.s`/`chr.s` + HEADER/PRG/CHR `linker.cfg`, switch `make` to a whole-ROM `cmp`, move the `_tools` paths | + +**Still owed:** a real power-on flow analysis (RESET/NMI/main-loop walk) in the style of the top-level project `OVERVIEW.md`s. This file was retitled and restatused in the 2026-10-19 doc-drift sweep to match the actual `prg.s`; the original skeleton-era text is superseded. diff --git a/_wip/Pac-Man (Tengen) (U)/OVERVIEW.md b/_wip/Pac-Man (Tengen) (U)/OVERVIEW.md index 3740c95..c61fe6f 100644 --- a/_wip/Pac-Man (Tengen) (U)/OVERVIEW.md +++ b/_wip/Pac-Man (Tengen) (U)/OVERVIEW.md @@ -1,8 +1,8 @@ -# Pac-Man (Tengen) (U) — Skeleton Project +# Pac-Man (Tengen) (U) — Pass 1 Disassembly -ROM: `_wip/Pac-Man (Tengen) (U)/Pac-Man (Tengen) (U) [!].nes` (24,592 bytes, iNES). Status: **SKELETON — not yet disassembled.** The entire 16 KB PRG bank is a single unclassified block; `copilot/prg.s` is the default-project skeleton (`default_project.tar.gz`) that reproduces it as one `.incbin`. The skeleton build is **byte-identical** at the PRG level. +ROM: `_wip/Pac-Man (Tengen) (U)/Pac-Man (Tengen) (U) [!].nes` (24,592 bytes, iNES). Status: **Pass 1 complete — 19.5% code.** `copilot/prg.s` is a real disassembly, not a skeleton: 4,482 lines with 192 address-based `Label_` definitions and canonical `; CPU:$xxxx PRG:xxxx AA BB` audit comments. It builds **byte-identical** at the PRG level (`cmp reconstructed_prg.bin prg.bin`). -**Variant note:** `Pac-Man (U)` is an unrelated dump (different PRG). Both use vertical mirroring. +**Variant note:** `Pac-Man (U)` is an unrelated dump (different PRG). Both use horizontal mirroring. ## ROM Facts @@ -12,7 +12,7 @@ ROM: `_wip/Pac-Man (Tengen) (U)/Pac-Man (Tengen) (U) [!].nes` (24,592 bytes, iNE | Mapper | 0 (NROM) — from the iNES header | | PRG | 16 KB (header claims map at CPU $C000–$FFFF) | | CHR | 8 KB | -| Mirroring | Vertical | +| Mirroring | Horizontal | | Battery-backed flag | clear | | ROM SHA-256 | `1e59847da9369f6b116c95454d53e1508cdfeef6f00ea1a6968d725517ab852f` | | PRG SHA-256 | `cf31501f973b6bccb2d3dda2b7b389840e79c3cd5938275da096c241f76153fb` | @@ -31,14 +31,14 @@ ROM: `_wip/Pac-Man (Tengen) (U)/Pac-Man (Tengen) (U) [!].nes` (24,592 bytes, iNE |------|---------| | `Pac-Man (Tengen) (U) [!].nes` | original ROM image (reference) | | `prg.bin` / `header.bin` / `chr.bin` | split image, produced by `_tools/splitnes.py` | -| `prg.s` | Pass-1 skeleton: `.incbin "prg.bin", $0000, $4000` (whole PRG) | -| `symbols.inc` | shared NES hardware constants (PPU/APU/controller, from the skeleton) | -| `locals.inc` | project-local zero-page aliases — empty for now (filled in Pass 2) | +| `prg.s` | Pass-1 disassembly: 4,482 lines, 192 address-based `Label_` labels, canonical audit comments | +| `symbols.inc` | shared NES hardware constants (PPU/APU/controller) | +| `locals.inc` | project-local zero-page aliases | | `linker.cfg` | PRG at $C000, 16 KB, `fill = yes` | | `Makefile` | links `reconstructed_prg.bin` and `cmp`s it against `prg.bin` | | `reconstructed_prg.bin` | build output from the last verified build | -Header/CHR are reproduced verbatim from `header.bin`/`chr.bin` (not linked): `make` verifies **PRG bytes only** at this stage, which is exactly what a skeleton proves. When this project is promoted to a full disassembly, `header.s` / `chr.s` (as e.g. `Burger Time (U)`) and a full-ROM `make` target get added. +Header/CHR are not linked: `copilot/` keeps the raw `header.bin`/`chr.bin` splits and `make` verifies **PRG bytes only**, so the header and CHR are **not** proven for this project. Promotion to the top level adds `header.s` / `chr.s` (as e.g. `Burger Time (U)`), a HEADER/PRG/CHR `linker.cfg`, and a full-ROM `make` target. ## Build @@ -47,9 +47,13 @@ cd "_wip/Pac-Man (Tengen) (U)/copilot" make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" ``` -## Next Steps (per `PROMPTS.md`) +## Pass Status -1. **Pass 1** — replace the blanket `.incbin` with classified code/data: trace reachability from RESET ($C033) and NMI ($C0FA), emit per-instruction `; PRG:$xxxx AA BB` annotations, keep unreached bytes as explicit `.byte` blocks. -2. **Pass 2** — replace `Label_`/`Sub_` names with semantic routine names; fill `locals.inc`. -3. **Pass 3** — name data tables/structures; release provisional flags. -4. **Promotion** — move to a top-level `/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory. +| Pass | Status | +|------|--------| +| Pass 1 | **Complete** — 4,482 lines of `prg.s`, 192 address-based `Label_` definitions, canonical audit comments; 19.5% code per the root inventory row | +| Pass 2 | Outstanding | +| Pass 3 | Outstanding | +| Promotion | Outstanding — add `header.s`/`chr.s` + HEADER/PRG/CHR `linker.cfg`, switch `make` to a whole-ROM `cmp`, move the `_tools` paths | + +**Still owed:** a real power-on flow analysis (RESET/NMI/main-loop walk) in the style of the top-level project `OVERVIEW.md`s. This file was retitled and restatused in the 2026-10-19 doc-drift sweep to match the actual `prg.s`; the original skeleton-era text is superseded. diff --git a/_wip/Pac-Man (U)/OVERVIEW.md b/_wip/Pac-Man (U)/OVERVIEW.md index f07fdad..c87c693 100644 --- a/_wip/Pac-Man (U)/OVERVIEW.md +++ b/_wip/Pac-Man (U)/OVERVIEW.md @@ -1,8 +1,8 @@ -# Pac-Man (U) — Skeleton Project +# Pac-Man (U) — Pass 1 Disassembly -ROM: `_wip/Pac-Man (U)/Pac-Man (U) [!].nes` (24,592 bytes, iNES). Status: **SKELETON — not yet disassembled.** The entire 16 KB PRG bank is a single unclassified block; `copilot/prg.s` is the default-project skeleton (`default_project.tar.gz`) that reproduces it as one `.incbin`. The skeleton build is **byte-identical** at the PRG level. +ROM: `_wip/Pac-Man (U)/Pac-Man (U) [!].nes` (24,592 bytes, iNES). Status: **Pass 1 complete — 19.6% code.** `copilot/prg.s` is a real disassembly, not a skeleton: 4,506 lines with 194 address-based `Label_` definitions and canonical `; CPU:$xxxx PRG:xxxx AA BB` audit comments. It builds **byte-identical** at the PRG level (`cmp reconstructed_prg.bin prg.bin`). -**Variant note:** `Pac-Man (Tengen) (U)` is an unrelated dump (different PRG). Both use vertical mirroring. +**Variant note:** `Pac-Man (Tengen) (U)` is an unrelated dump (different PRG). Both use horizontal mirroring. ## ROM Facts @@ -12,7 +12,7 @@ ROM: `_wip/Pac-Man (U)/Pac-Man (U) [!].nes` (24,592 bytes, iNES). Status: **SKEL | Mapper | 0 (NROM) — from the iNES header | | PRG | 16 KB (header claims map at CPU $C000–$FFFF) | | CHR | 8 KB | -| Mirroring | Vertical | +| Mirroring | Horizontal | | Battery-backed flag | clear | | ROM SHA-256 | `d5e9c4e81ff7316d4d8b15f2198471606fdb728b8cd9da92b153bdc45124b565` | | PRG SHA-256 | `c1b777982f55de192c9f8cd9738445d3704d5c3b31ba01647a1609aad6c2872e` | @@ -31,14 +31,14 @@ ROM: `_wip/Pac-Man (U)/Pac-Man (U) [!].nes` (24,592 bytes, iNES). Status: **SKEL |------|---------| | `Pac-Man (U) [!].nes` | original ROM image (reference) | | `prg.bin` / `header.bin` / `chr.bin` | split image, produced by `_tools/splitnes.py` | -| `prg.s` | Pass-1 skeleton: `.incbin "prg.bin", $0000, $4000` (whole PRG) | -| `symbols.inc` | shared NES hardware constants (PPU/APU/controller, from the skeleton) | -| `locals.inc` | project-local zero-page aliases — empty for now (filled in Pass 2) | +| `prg.s` | Pass-1 disassembly: 4,506 lines, 194 address-based `Label_` labels, canonical audit comments | +| `symbols.inc` | shared NES hardware constants (PPU/APU/controller) | +| `locals.inc` | project-local zero-page aliases | | `linker.cfg` | PRG at $C000, 16 KB, `fill = yes` | | `Makefile` | links `reconstructed_prg.bin` and `cmp`s it against `prg.bin` | | `reconstructed_prg.bin` | build output from the last verified build | -Header/CHR are reproduced verbatim from `header.bin`/`chr.bin` (not linked): `make` verifies **PRG bytes only** at this stage, which is exactly what a skeleton proves. When this project is promoted to a full disassembly, `header.s` / `chr.s` (as e.g. `Burger Time (U)`) and a full-ROM `make` target get added. +Header/CHR are not linked: `copilot/` keeps the raw `header.bin`/`chr.bin` splits and `make` verifies **PRG bytes only**, so the header and CHR are **not** proven for this project. Promotion to the top level adds `header.s` / `chr.s` (as e.g. `Burger Time (U)`), a HEADER/PRG/CHR `linker.cfg`, and a full-ROM `make` target. ## Build @@ -47,9 +47,13 @@ cd "_wip/Pac-Man (U)/copilot" make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" ``` -## Next Steps (per `PROMPTS.md`) +## Pass Status -1. **Pass 1** — replace the blanket `.incbin` with classified code/data: trace reachability from RESET ($FF00) and NMI ($C0FA), emit per-instruction `; PRG:$xxxx AA BB` annotations, keep unreached bytes as explicit `.byte` blocks. -2. **Pass 2** — replace `Label_`/`Sub_` names with semantic routine names; fill `locals.inc`. -3. **Pass 3** — name data tables/structures; release provisional flags. -4. **Promotion** — move to a top-level `/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory. +| Pass | Status | +|------|--------| +| Pass 1 | **Complete** — 4,506 lines of `prg.s`, 194 address-based `Label_` definitions, canonical audit comments; 19.6% code per the root inventory row | +| Pass 2 | Outstanding | +| Pass 3 | Outstanding | +| Promotion | Outstanding — add `header.s`/`chr.s` + HEADER/PRG/CHR `linker.cfg`, switch `make` to a whole-ROM `cmp`, move the `_tools` paths | + +**Still owed:** a real power-on flow analysis (RESET/NMI/main-loop walk) in the style of the top-level project `OVERVIEW.md`s. This file was retitled and restatused in the 2026-10-19 doc-drift sweep to match the actual `prg.s`; the original skeleton-era text is superseded. diff --git a/_wip/Pinball (JU)/OVERVIEW.md b/_wip/Pinball (JU)/OVERVIEW.md index 02dcb93..a1595fc 100644 --- a/_wip/Pinball (JU)/OVERVIEW.md +++ b/_wip/Pinball (JU)/OVERVIEW.md @@ -1,6 +1,8 @@ -# Pinball (JU) — Pass 2 Complete +# Pinball (JU) — Pass 1 Disassembly (Pass 2 substantial, Pass 3 drafted) -ROM: `_wip/Pinball (JU)/Pinball (JU).nes` (24,592 bytes, iNES). Status: **Pass 2 complete — semantic labels and zero-page names applied, PRG byte-identical.** `copilot/prg.s` now contains a classified disassembly with 4,734 instructions (59.5% code), 196 semantic labels, and 150 zero-page semantic aliases. The build is **BYTE-IDENTICAL** at the PRG level. +ROM: `_wip/Pinball (JU)/Pinball (JU).nes` (24,592 bytes, iNES). Status: **Pass 1 complete — 59.5% code; Pass 2 substantial but not complete.** `copilot/prg.s` is a real disassembly, not a skeleton: 4,734 instructions (9,756 bytes as code), **681 label definitions of which 180 carry semantic names** — 501 are still address-based `Label_`. `locals.inc` holds **150 neutral `ZpXX` slots and no semantic zero-page aliases** (`locals2.inc` is an empty stub). It builds **byte-identical** at the PRG level (`cmp reconstructed_prg.bin prg.bin`). + +This header said "Pass 2 complete" from `2ae09f7` (2026-10-18) until the 2026-10-19 correction. Of the five `_wip` projects carrying that claim, Pinball is the closest to it — most of the named routines below really do exist — but 501 `Label_` definitions and all zero-page names remain. See "Pass 2 Status and Map Audit" below. ## ROM Facts @@ -21,7 +23,7 @@ ROM: `_wip/Pinball (JU)/Pinball (JU).nes` (24,592 bytes, iNES). Status: **Pass 2 |--------|--------|------| | NMI | `$C1ED` | per-frame heartbeat | | RESET | `$C000` | cold start at $C000 — the usual pattern in this repo | -| IRQ | `$C1ED` | target $C1ED — verify during Pass 1 | +| IRQ | `$C1ED` | identical to the NMI vector — IRQs share the NMI handler | ## `copilot/` Contents @@ -29,14 +31,18 @@ ROM: `_wip/Pinball (JU)/Pinball (JU).nes` (24,592 bytes, iNES). Status: **Pass 2 |------|---------| | `Pinball (JU).nes` | original ROM image (reference) | | `prg.bin` / `header.bin` / `chr.bin` | split image, produced by `_tools/splitnes.py` | -| `prg.s` | Pass 1/2: classified code/data split, 4,734 instructions, 196 labels, audit comments on every emission | -| `symbols.inc` | shared NES hardware constants (PPU/APU/controller, from the skeleton) | -| `locals.inc` | 150 zero-page semantic aliases (filled in by Pass 2) | +| `prg.s` | Pass 1: classified code/data split, 4,734 instructions, 180 semantic + 501 address-based `Label_` definitions, canonical audit comments | +| `symbols.inc` | shared NES hardware constants (PPU/APU/controller) | +| `locals.inc` | 150 neutral `ZpXX` zero-page slots (Pass 2 naming outstanding) | +| `locals2.inc` | empty leftover stub (not included by `prg.s`) | +| `pinball_label_map.tsv` / `pinball_label_map2.tsv` / `pinball_full_map.tsv` | Pass 2 draft maps (all three carry the same 210 `label` rows) — **stale**, see the audit below | +| `pinball_zp_map.tsv` | Pass 2 zero-page proposals — **not applied** (`locals.inc` is still all `ZpXX`) | +| `data_regions.tsv` | Pass 3 data-region draft, 40 named regions — **none applied** | | `linker.cfg` | PRG at $C000, 16 KB, `fill = yes` | | `Makefile` | links `reconstructed_prg.bin` and `cmp`s it against `prg.bin` | | `reconstructed_prg.bin` | build output from the last verified build | -Header/CHR are reproduced verbatim from `header.bin`/`chr.bin` (not linked): `make` verifies **PRG bytes only** at this stage. When this project is promoted to a full disassembly, `header.s` / `chr.s` (as e.g. `Burger Time (U)`) and a full-ROM `make` target get added. +Header/CHR are not linked: `copilot/` keeps the raw `header.bin`/`chr.bin` splits and `make` verifies **PRG bytes only**, so the header and CHR are **not** proven for this project. Promotion to the top level adds `header.s` / `chr.s` (as e.g. `Burger Time (U)`), a HEADER/PRG/CHR `linker.cfg`, and a full-ROM `make` target. ## Build @@ -45,24 +51,29 @@ cd "_wip/Pinball (JU)/copilot" make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" ``` -## Next Steps (per `PROMPTS.md`) +## Pass Status -1. **Pass 3** — name data tables/structures; release provisional flags. -2. **Promotion** — move to a top-level `/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory. +| Pass | Status | +|------|--------| +| Pass 1 | **Complete** — 4,734 instructions, 9,756 bytes as code (59.5%), 6,628 bytes as data, byte accounting exact (16,384) | +| Pass 2 | **Substantial, not complete** — 180 of 681 label definitions named (26%); 150 zero-page slots still neutral `ZpXX`; the drafted label map is stale | +| Pass 3 | **Drafted, not applied** — `data_regions.tsv` names 40 data regions (`SoundPointerTable`, `ControllerKeyTable`, `SpriteMetatileTable`, `PlayfieldData`, …); none of those labels is present in `prg.s` | +| Promotion | Outstanding — add `header.s`/`chr.s` + HEADER/PRG/CHR `linker.cfg`, switch `make` to a whole-ROM `cmp`, move the `_tools` paths | -## Pass 2 Details (2026-10-18) +## Pass 2 Status and Map Audit (corrected 2026-10-19) -- **Label renaming**: 196 of 681 labels renamed to semantic names using `pass2.py apply` with a mapping file (`pinball_label_map.tsv` + `pinball_zp_map.tsv`). Key renamed routines: - - RESET/NMI: `Reset`, `NmiHandler` - - System init: `InitSystem`, `ClearZeropage`, `InitGameState` - - Main loop: `MainGameLoop`, `GameModeTitle`, `GameModePlay`, `WaitVBlankFrame` - - NMI: `NmiHandler`, `NmiFrameEnd` - - Ball physics: `BallPhysics`, `CheckTilt`, `CheckBallInPocket` - - Flipper logic: `UpdateFlipper`, `UpdateFlipperSprites`, `UpdateFlipperSound` - - Ball physics: `BallPhysics`, `UpdateBallPosition`, `UpdateBallVelocity`, `UpdateBallTrajectory` - - Collision: `CheckCollision`, `CheckFlipperHit`, `CheckBallInPocket` - - Scoring: `UpdateScore`, `UpdateScoreDisplay`, `DrawScore`, `DrawDigits` - - Sound: `InitSound`, `PlaySound`, `UpdateMusic` - - PPU: `WaitVBlank`, `WaitPPUReady`, `WritePPU`, `DrawSprite` - - Sound engine: `UpdateSoundEngine`, `UpdateSoundChannel` (1-35) -- **Zero-page semantic aliases**: 150 aliases in `locals.inc` (e.g., `FrameCounter`=$02, `GameState`=$03, `PlayerLives`=$04, `BallX`=$24, `BallY`=$25, `BallVelX`=$26, `BallVelY`=$27, `FlipperLeft`=$28, `FlipperRight`=$29, `SpriteIndex`=$95, etc.) +The "Pass 2 complete" claim overstated the state in the same way as its siblings — **"196 semantic labels"** is the number of *distinct old names* in the draft map (`pinball_full_map.tsv` has 210 `label` rows covering 196 distinct `Label_` names), while `prg.s` actually names **180** definitions and leaves 501 `Label_`. **"150 zero-page semantic aliases"** is the count of **neutral** `ZpXX` entries in `locals.inc`; there are **zero** semantic zero-page aliases. A handful of the listed routines are also absent (`InitSystem`, `WaitVBlankFrame`, `BallPhysics`, `CheckBallInPocket`, `UpdateBallPosition`, `UpdateScoreDisplay`, `UpdateMusic`), though unlike its siblings most of the list is real. + +Draft-map audit (`pinball_full_map.tsv`, 210 label rows): + +| Outcome | Rows | Meaning | +|---|---|---| +| already applied | 179 | the proposed name already sits at that address | +| name conflict | 13 | a different name already sits there | +| stale address | 17 | the address is not an instruction boundary in the current `prg.s` | +| unlabelled, unreferenced | 1 | an instruction boundary with no label and no operand referencing it | +| **safely applicable** | **0** | no row is both insertable and corroborated by control flow | + +The map is therefore kept only as provenance, and `pinball_zp_map.tsv` / `data_regions.tsv` are unapplied drafts. Completing Pass 2 (and Pass 3) needs maps derived from the committed split. + +**Still owed:** a real power-on flow analysis (RESET/NMI/main-loop walk) in the style of the top-level project `OVERVIEW.md`s. diff --git a/_wip/Popeye (JU) (PRG 0)/OVERVIEW.md b/_wip/Popeye (JU) (PRG 0)/OVERVIEW.md index 5e5cb6a..8822ff4 100644 --- a/_wip/Popeye (JU) (PRG 0)/OVERVIEW.md +++ b/_wip/Popeye (JU) (PRG 0)/OVERVIEW.md @@ -1,6 +1,6 @@ -# Popeye (JU) (PRG 0) — Skeleton Project +# Popeye (JU) (PRG 0) — Pass 1 Disassembly -ROM: `_wip/Popeye (JU) (PRG 0)/Popeye (JU) (PRG 0).nes` (24,592 bytes, iNES). Status: **SKELETON — not yet disassembled.** The entire 16 KB PRG bank is a single unclassified block; `copilot/prg.s` is the default-project skeleton (`default_project.tar.gz`) that reproduces it as one `.incbin`. The skeleton build is **byte-identical** at the PRG level. +ROM: `_wip/Popeye (JU) (PRG 0)/Popeye (JU) (PRG 0).nes` (24,592 bytes, iNES). Status: **Pass 1 complete — 72.3% code.** `copilot/prg.s` is a real disassembly, not a skeleton: 14,875 lines with 878 address-based `Label_` definitions and canonical `; CPU:$xxxx PRG:xxxx AA BB` audit comments. It builds **byte-identical** at the PRG level (`cmp reconstructed_prg.bin prg.bin`). **Companion note:** `Popeye (JU) (PRG 1)` holds a different PRG image of the same title (different mirroring flag, too). Neither is currently known to be a superset of the other. @@ -12,7 +12,7 @@ ROM: `_wip/Popeye (JU) (PRG 0)/Popeye (JU) (PRG 0).nes` (24,592 bytes, iNES). St | Mapper | 0 (NROM) — from the iNES header | | PRG | 16 KB (header claims map at CPU $C000–$FFFF) | | CHR | 8 KB | -| Mirroring | Horizontal | +| Mirroring | Vertical | | Battery-backed flag | clear | | ROM SHA-256 | `a9e586a0449d23c294cf8f2443a8b4a85be6832507c6baba6c275028360e71c9` | | PRG SHA-256 | `8f095a389c8d357cd2042e39e7a111b2d42838159d52e374c24bb2b8f2560c56` | @@ -31,14 +31,14 @@ ROM: `_wip/Popeye (JU) (PRG 0)/Popeye (JU) (PRG 0).nes` (24,592 bytes, iNES). St |------|---------| | `Popeye (JU) (PRG 0).nes` | original ROM image (reference) | | `prg.bin` / `header.bin` / `chr.bin` | split image, produced by `_tools/splitnes.py` | -| `prg.s` | Pass-1 skeleton: `.incbin "prg.bin", $0000, $4000` (whole PRG) | -| `symbols.inc` | shared NES hardware constants (PPU/APU/controller, from the skeleton) | -| `locals.inc` | project-local zero-page aliases — empty for now (filled in Pass 2) | +| `prg.s` | Pass-1 disassembly: 14,875 lines, 878 address-based `Label_` labels, canonical audit comments | +| `symbols.inc` | shared NES hardware constants (PPU/APU/controller) | +| `locals.inc` | project-local zero-page aliases | | `linker.cfg` | PRG at $C000, 16 KB, `fill = yes` | | `Makefile` | links `reconstructed_prg.bin` and `cmp`s it against `prg.bin` | | `reconstructed_prg.bin` | build output from the last verified build | -Header/CHR are reproduced verbatim from `header.bin`/`chr.bin` (not linked): `make` verifies **PRG bytes only** at this stage, which is exactly what a skeleton proves. When this project is promoted to a full disassembly, `header.s` / `chr.s` (as e.g. `Burger Time (U)`) and a full-ROM `make` target get added. +Header/CHR are not linked: `copilot/` keeps the raw `header.bin`/`chr.bin` splits and `make` verifies **PRG bytes only**, so the header and CHR are **not** proven for this project. Promotion to the top level adds `header.s` / `chr.s` (as e.g. `Burger Time (U)`), a HEADER/PRG/CHR `linker.cfg`, and a full-ROM `make` target. ## Build @@ -47,9 +47,13 @@ cd "_wip/Popeye (JU) (PRG 0)/copilot" make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" ``` -## Next Steps (per `PROMPTS.md`) +## Pass Status -1. **Pass 1** — replace the blanket `.incbin` with classified code/data: trace reachability from RESET ($C649) and NMI ($C701), emit per-instruction `; PRG:$xxxx AA BB` annotations, keep unreached bytes as explicit `.byte` blocks. -2. **Pass 2** — replace `Label_`/`Sub_` names with semantic routine names; fill `locals.inc`. -3. **Pass 3** — name data tables/structures; release provisional flags. -4. **Promotion** — move to a top-level `/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory. +| Pass | Status | +|------|--------| +| Pass 1 | **Complete** — 14,875 lines of `prg.s`, 878 address-based `Label_` definitions, canonical audit comments; 72.3% code per the root inventory row | +| Pass 2 | Outstanding | +| Pass 3 | Outstanding | +| Promotion | Outstanding — add `header.s`/`chr.s` + HEADER/PRG/CHR `linker.cfg`, switch `make` to a whole-ROM `cmp`, move the `_tools` paths | + +**Still owed:** a real power-on flow analysis (RESET/NMI/main-loop walk) in the style of the top-level project `OVERVIEW.md`s. This file was retitled and restatused in the 2026-10-19 doc-drift sweep to match the actual `prg.s`; the original skeleton-era text is superseded. diff --git a/_wip/Popeye (JU) (PRG 1)/OVERVIEW.md b/_wip/Popeye (JU) (PRG 1)/OVERVIEW.md index f13c207..ab17730 100644 --- a/_wip/Popeye (JU) (PRG 1)/OVERVIEW.md +++ b/_wip/Popeye (JU) (PRG 1)/OVERVIEW.md @@ -1,6 +1,6 @@ -# Popeye (JU) (PRG 1) — Skeleton Project +# Popeye (JU) (PRG 1) — Pass 1 Disassembly -ROM: `_wip/Popeye (JU) (PRG 1)/Popeye (JU) (PRG 1) [!].nes` (24,592 bytes, iNES). Status: **SKELETON — not yet disassembled.** The entire 16 KB PRG bank is a single unclassified block; `copilot/prg.s` is the default-project skeleton (`default_project.tar.gz`) that reproduces it as one `.incbin`. The skeleton build is **byte-identical** at the PRG level. +ROM: `_wip/Popeye (JU) (PRG 1)/Popeye (JU) (PRG 1) [!].nes` (24,592 bytes, iNES). Status: **Pass 1 complete — 72.3% code.** `copilot/prg.s` is a real disassembly, not a skeleton: 14,855 lines with 876 address-based `Label_` definitions and canonical `; CPU:$xxxx PRG:xxxx AA BB` audit comments. It builds **byte-identical** at the PRG level (`cmp reconstructed_prg.bin prg.bin`). **Companion note:** `Popeye (JU) (PRG 0)` holds a different PRG image of the same title (different mirroring flag, too). Neither is currently known to be a superset of the other. @@ -12,7 +12,7 @@ ROM: `_wip/Popeye (JU) (PRG 1)/Popeye (JU) (PRG 1) [!].nes` (24,592 bytes, iNES) | Mapper | 0 (NROM) — from the iNES header | | PRG | 16 KB (header claims map at CPU $C000–$FFFF) | | CHR | 8 KB | -| Mirroring | Vertical | +| Mirroring | Horizontal | | Battery-backed flag | clear | | ROM SHA-256 | `0016065132a2dc98afb1181a735edcb9c656b0b89af4e0771e94807ba67bd8b4` | | PRG SHA-256 | `72f06b36f4e908e15639564e83a32e0afe680189e82f0f9d7fa5a9fadaa2e646` | @@ -31,14 +31,14 @@ ROM: `_wip/Popeye (JU) (PRG 1)/Popeye (JU) (PRG 1) [!].nes` (24,592 bytes, iNES) |------|---------| | `Popeye (JU) (PRG 1) [!].nes` | original ROM image (reference) | | `prg.bin` / `header.bin` / `chr.bin` | split image, produced by `_tools/splitnes.py` | -| `prg.s` | Pass-1 skeleton: `.incbin "prg.bin", $0000, $4000` (whole PRG) | -| `symbols.inc` | shared NES hardware constants (PPU/APU/controller, from the skeleton) | -| `locals.inc` | project-local zero-page aliases — empty for now (filled in Pass 2) | +| `prg.s` | Pass-1 disassembly: 14,855 lines, 876 address-based `Label_` labels, canonical audit comments | +| `symbols.inc` | shared NES hardware constants (PPU/APU/controller) | +| `locals.inc` | project-local zero-page aliases | | `linker.cfg` | PRG at $C000, 16 KB, `fill = yes` | | `Makefile` | links `reconstructed_prg.bin` and `cmp`s it against `prg.bin` | | `reconstructed_prg.bin` | build output from the last verified build | -Header/CHR are reproduced verbatim from `header.bin`/`chr.bin` (not linked): `make` verifies **PRG bytes only** at this stage, which is exactly what a skeleton proves. When this project is promoted to a full disassembly, `header.s` / `chr.s` (as e.g. `Burger Time (U)`) and a full-ROM `make` target get added. +Header/CHR are not linked: `copilot/` keeps the raw `header.bin`/`chr.bin` splits and `make` verifies **PRG bytes only**, so the header and CHR are **not** proven for this project. Promotion to the top level adds `header.s` / `chr.s` (as e.g. `Burger Time (U)`), a HEADER/PRG/CHR `linker.cfg`, and a full-ROM `make` target. ## Build @@ -47,9 +47,13 @@ cd "_wip/Popeye (JU) (PRG 1)/copilot" make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" ``` -## Next Steps (per `PROMPTS.md`) +## Pass Status -1. **Pass 1** — replace the blanket `.incbin` with classified code/data: trace reachability from RESET ($C649) and NMI ($C701), emit per-instruction `; PRG:$xxxx AA BB` annotations, keep unreached bytes as explicit `.byte` blocks. -2. **Pass 2** — replace `Label_`/`Sub_` names with semantic routine names; fill `locals.inc`. -3. **Pass 3** — name data tables/structures; release provisional flags. -4. **Promotion** — move to a top-level `/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory. +| Pass | Status | +|------|--------| +| Pass 1 | **Complete** — 14,855 lines of `prg.s`, 876 address-based `Label_` definitions, canonical audit comments; 72.3% code per the root inventory row | +| Pass 2 | Outstanding | +| Pass 3 | Outstanding | +| Promotion | Outstanding — add `header.s`/`chr.s` + HEADER/PRG/CHR `linker.cfg`, switch `make` to a whole-ROM `cmp`, move the `_tools` paths | + +**Still owed:** a real power-on flow analysis (RESET/NMI/main-loop walk) in the style of the top-level project `OVERVIEW.md`s. This file was retitled and restatused in the 2026-10-19 doc-drift sweep to match the actual `prg.s`; the original skeleton-era text is superseded. diff --git a/_wip/Pyramid (U)/OVERVIEW.md b/_wip/Pyramid (U)/OVERVIEW.md index 31a84e9..10f3199 100644 --- a/_wip/Pyramid (U)/OVERVIEW.md +++ b/_wip/Pyramid (U)/OVERVIEW.md @@ -9,7 +9,7 @@ ROM: `_wip/Pyramid (U)/Pyramid (U) (Sachen).nes` (24,592 bytes, iNES). Status: * | Mapper | 0 (NROM) — from the iNES header | | PRG | 16 KB (header claims map at CPU $C000–$FFFF) | | CHR | 8 KB | -| Mirroring | Horizontal | +| Mirroring | Vertical | | Battery-backed flag | clear | | ROM SHA-256 | `8e042dc55093e47547ff9fa26e7fec2c3fb94ebac0d0686cc8bb6c2749a6066d` | | PRG SHA-256 | `251688d69009091c4a37e831e0fd6114bb1dc9d1bace98032c1b9a3030b5e378` | @@ -104,7 +104,7 @@ cd "_wip/Pyramid (U)/copilot" make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" ``` -## Next Steps (per `PROMPTS.md`) +## Next Steps 1. **Pass 1 — DONE.** Code/data split, `; PRG:$xxxx AA BB` audit annotations on every line, byte-identical build. 2. **Pass 2** — semantic names: `BootUnlock`, `StackByteCheck`, `QueueDispatch1/2`, NMI/IRQ frame handlers, audio routines; fill `locals.inc` with zero-page aliases (`$02/$03` pointer, `$45/$46` X/Y state, `$04EA` dispatcher copy, `$0120/$0121` "AV" checker). diff --git a/_wip/Pyramid (U)/copilot/prg.s b/_wip/Pyramid (U)/copilot/prg.s index 0bd05ff..c9b9269 100644 --- a/_wip/Pyramid (U)/copilot/prg.s +++ b/_wip/Pyramid (U)/copilot/prg.s @@ -2582,7 +2582,7 @@ Label_D72C: ; ---- data $D72D-$D72D (1 bytes) ---- Label_D72D: .byte $3A ; PRG:$172D -Label_D72E: +NMI: pha ; PRG:$172E 48 adc $3F ; PRG:$172F 65 3F sta $3F ; PRG:$1731 85 3F @@ -4533,6 +4533,6 @@ Label_FF74: .byte $00,$00,$00,$00,$00,$00 ; PRG:$3FF4 ; ---- iNES vectors (PRG $3FFA-$3FFF) ---- Label_FFFA: - .word Label_D72E ; PRG:$3FFA 2E D7 NMI + .word NMI ; PRG:$3FFA 2E D7 NMI .word Label_FF00 ; PRG:$3FFC 00 FF RESET .word Label_FF00 ; PRG:$3FFE 00 FF IRQ diff --git a/_wip/Pyramid (U)/copilot/reconstructed.lbl b/_wip/Pyramid (U)/copilot/reconstructed.lbl new file mode 100644 index 0000000..58e608c --- /dev/null +++ b/_wip/Pyramid (U)/copilot/reconstructed.lbl @@ -0,0 +1,426 @@ +al 00FFFA .Label_FFFA +al 00FF74 .Label_FF74 +al 00FF69 .Label_FF69 +al 00FF67 .Label_FF67 +al 00FF57 .Label_FF57 +al 00FF50 .Label_FF50 +al 00FF4E .Label_FF4E +al 00FF4C .Label_FF4C +al 00FF49 .Label_FF49 +al 00FF3E .Label_FF3E +al 00FF2F .Label_FF2F +al 00FF00 .Label_FF00 +al 00F942 .Label_F942 +al 00F941 .Label_F941 +al 00F93C .Label_F93C +al 00F929 .Label_F929 +al 00F922 .Label_F922 +al 00F914 .Label_F914 +al 00F908 .Label_F908 +al 00F8EF .Label_F8EF +al 00F8D8 .Label_F8D8 +al 00F8C5 .Label_F8C5 +al 00F8BC .Label_F8BC +al 00F8C0 .Label_F8C0 +al 00F8B2 .Label_F8B2 +al 00F8AD .Label_F8AD +al 00F8A2 .Label_F8A2 +al 00F8C4 .Label_F8C4 +al 00F8DD .Label_F8DD +al 00F89A .Label_F89A +al 00F897 .Label_F897 +al 00F894 .Label_F894 +al 00F891 .Label_F891 +al 00EDBF .Label_EDBF +al 00EDB7 .Label_EDB7 +al 00ED6E .Label_ED6E +al 00E276 .Label_E276 +al 00E275 .Label_E275 +al 00E26F .Label_E26F +al 00E26E .Label_E26E +al 00E268 .Label_E268 +al 00E267 .Label_E267 +al 00E261 .Label_E261 +al 00E260 .Label_E260 +al 00E25A .Label_E25A +al 00E24F .Label_E24F +al 00E259 .Label_E259 +al 00E249 .Label_E249 +al 00E236 .Label_E236 +al 00E240 .Label_E240 +al 00E226 .Label_E226 +al 00E230 .Label_E230 +al 00E220 .Label_E220 +al 00E20B .Label_E20B +al 00E215 .Label_E215 +al 00E1FB .Label_E1FB +al 00E1E9 .Label_E1E9 +al 00E1D4 .Label_E1D4 +al 00E1B7 .Label_E1B7 +al 00E1A8 .Label_E1A8 +al 00E1A1 .Label_E1A1 +al 00E195 .Label_E195 +al 00E161 .Label_E161 +al 00E173 .Label_E173 +al 00E156 .Label_E156 +al 00E13E .Label_E13E +al 00E121 .Label_E121 +al 00E117 .Label_E117 +al 00E10E .Label_E10E +al 00E103 .Label_E103 +al 00E0FC .Label_E0FC +al 00E0F0 .Label_E0F0 +al 00E0BC .Label_E0BC +al 00E0CE .Label_E0CE +al 00E0B1 .Label_E0B1 +al 00E099 .Label_E099 +al 00E07C .Label_E07C +al 00E072 .Label_E072 +al 00E069 .Label_E069 +al 00E05E .Label_E05E +al 00E057 .Label_E057 +al 00E04B .Label_E04B +al 00E017 .Label_E017 +al 00E029 .Label_E029 +al 00E00C .Label_E00C +al 00DFD5 .Label_DFD5 +al 00DFF4 .Label_DFF4 +al 00DFBF .Label_DFBF +al 00DFB5 .Label_DFB5 +al 00DFAC .Label_DFAC +al 00DFA1 .Label_DFA1 +al 00DF9A .Label_DF9A +al 00DF89 .Label_DF89 +al 00DF8E .Label_DF8E +al 00DF80 .Label_DF80 +al 00DF3E .Label_DF3E +al 00DF30 .Label_DF30 +al 00DF29 .Label_DF29 +al 00DF14 .Label_DF14 +al 00DEFF .Label_DEFF +al 00DF0E .Label_DF0E +al 00DEBB .Label_DEBB +al 00DEA9 .Label_DEA9 +al 00DE9A .Label_DE9A +al 00D7F3 .Label_D7F3 +al 00D7EB .Label_D7EB +al 00D7E3 .Label_D7E3 +al 00D7D7 .Label_D7D7 +al 00D7C5 .Label_D7C5 +al 00D7B6 .Label_D7B6 +al 00D79D .Label_D79D +al 00D793 .Label_D793 +al 00D78A .Label_D78A +al 00D72E .NMI +al 00D72D .Label_D72D +al 00D72C .Label_D72C +al 00D6FD .Label_D6FD +al 00D6F6 .Label_D6F6 +al 00D6E7 .Label_D6E7 +al 00D6D6 .Label_D6D6 +al 00D720 .Label_D720 +al 00D6C9 .Label_D6C9 +al 00D6BB .Label_D6BB +al 00D6B2 .Label_D6B2 +al 00D69C .Label_D69C +al 00D679 .Label_D679 +al 00D66D .Label_D66D +al 00D655 .Label_D655 +al 00D63B .Label_D63B +al 00D632 .Label_D632 +al 00D5D5 .Label_D5D5 +al 00D5CA .Label_D5CA +al 00D5AD .Label_D5AD +al 00D59A .Label_D59A +al 00D57A .Label_D57A +al 00D56B .Label_D56B +al 00D556 .Label_D556 +al 00D555 .Label_D555 +al 00D54A .Label_D54A +al 00D530 .Label_D530 +al 00D520 .Label_D520 +al 00D512 .Label_D512 +al 00D510 .Label_D510 +al 00D50A .Label_D50A +al 00D4EE .Label_D4EE +al 00D4C5 .Label_D4C5 +al 00D4BB .Label_D4BB +al 00D4B7 .Label_D4B7 +al 00D47F .Label_D47F +al 00D488 .Label_D488 +al 00D476 .Label_D476 +al 00D467 .Label_D467 +al 00D45E .Label_D45E +al 00D45A .Label_D45A +al 00D6AC .Label_D6AC +al 00D43E .Label_D43E +al 00D42E .Label_D42E +al 00D424 .Label_D424 +al 00D41D .Label_D41D +al 00D3BB .Label_D3BB +al 00D3B7 .Label_D3B7 +al 00D3B5 .Label_D3B5 +al 00D3A1 .Label_D3A1 +al 00D320 .Label_D320 +al 00D2ED .Label_D2ED +al 00D2BF .Label_D2BF +al 00D2AB .Label_D2AB +al 00D2A4 .Label_D2A4 +al 00D2A0 .Label_D2A0 +al 00D27F .Label_D27F +al 00D265 .Label_D265 +al 00D260 .Label_D260 +al 00D257 .Label_D257 +al 00D253 .Label_D253 +al 00D24A .Label_D24A +al 00D248 .Label_D248 +al 00D23A .Label_D23A +al 00D237 .Label_D237 +al 00D227 .Label_D227 +al 00D21C .Label_D21C +al 00D20E .Label_D20E +al 00D1FD .Label_D1FD +al 00D1EC .Label_D1EC +al 00D1D7 .Label_D1D7 +al 00D1BB .Label_D1BB +al 00D1B2 .Label_D1B2 +al 00D1AA .Label_D1AA +al 00D190 .Label_D190 +al 00D185 .Label_D185 +al 00D16A .Label_D16A +al 00D15E .Label_D15E +al 00D15B .Label_D15B +al 00D146 .Label_D146 +al 00D134 .Label_D134 +al 00D13C .Label_D13C +al 00D10D .Label_D10D +al 00D105 .Label_D105 +al 00D0F5 .Label_D0F5 +al 00D0F8 .Label_D0F8 +al 00D0DF .Label_D0DF +al 00D0D3 .Label_D0D3 +al 00D0C5 .Label_D0C5 +al 00D0C3 .Label_D0C3 +al 00D0B0 .Label_D0B0 +al 00D0AD .Label_D0AD +al 00D0AC .Label_D0AC +al 00D0A0 .Label_D0A0 +al 00D0B6 .Label_D0B6 +al 00D087 .Label_D087 +al 00D0B8 .Label_D0B8 +al 00D080 .Label_D080 +al 00D085 .Label_D085 +al 00D074 .Label_D074 +al 00D050 .Label_D050 +al 00D04A .Label_D04A +al 00D040 .Label_D040 +al 00D03D .Label_D03D +al 00D036 .Label_D036 +al 00D02A .Label_D02A +al 00D021 .Label_D021 +al 00CFFF .Label_CFFF +al 00CFFA .Label_CFFA +al 00D020 .Label_D020 +al 00CFC7 .Label_CFC7 +al 00CFC4 .Label_CFC4 +al 00CF90 .Label_CF90 +al 00CF74 .Label_CF74 +al 00CF67 .Label_CF67 +al 00CF98 .Label_CF98 +al 00CF55 .Label_CF55 +al 00CF29 .Label_CF29 +al 00CF35 .Label_CF35 +al 00CF14 .Label_CF14 +al 00CF10 .Label_CF10 +al 00CF0E .Label_CF0E +al 00CF02 .Label_CF02 +al 00CEF6 .Label_CEF6 +al 00CEEB .Label_CEEB +al 00CEE0 .Label_CEE0 +al 00CED6 .Label_CED6 +al 00CED3 .Label_CED3 +al 00D193 .Label_D193 +al 00CEA8 .Label_CEA8 +al 00CEA0 .Label_CEA0 +al 00CE96 .Label_CE96 +al 00CE9D .Label_CE9D +al 00CE7B .Label_CE7B +al 00CE78 .Label_CE78 +al 00CE66 .Label_CE66 +al 00CE5E .Label_CE5E +al 00CE54 .Label_CE54 +al 00CE5B .Label_CE5B +al 00CE35 .Label_CE35 +al 00CE32 .Label_CE32 +al 00CE22 .Label_CE22 +al 00CE1A .Label_CE1A +al 00CE17 .Label_CE17 +al 00CE14 .Label_CE14 +al 00CDDC .Label_CDDC +al 00CDC0 .Label_CDC0 +al 00CDBD .Label_CDBD +al 00CDAC .Label_CDAC +al 00CDA4 .Label_CDA4 +al 00CD97 .Label_CD97 +al 00CD8A .Label_CD8A +al 00CD85 .Label_CD85 +al 00CD80 .Label_CD80 +al 00CD75 .Label_CD75 +al 00CD72 .Label_CD72 +al 00CD43 .Label_CD43 +al 00CD27 .Label_CD27 +al 00CD24 .Label_CD24 +al 00CD23 .Label_CD23 +al 00CD18 .Label_CD18 +al 00CD07 .Label_CD07 +al 00CCEE .Label_CCEE +al 00CCE5 .Label_CCE5 +al 00CCCD .Label_CCCD +al 00CCB8 .Label_CCB8 +al 00CCB1 .Label_CCB1 +al 00CCA5 .Label_CCA5 +al 00CCA8 .Label_CCA8 +al 00CC90 .Label_CC90 +al 00CC8B .Label_CC8B +al 00CC73 .Label_CC73 +al 00CC56 .Label_CC56 +al 00CC5C .Label_CC5C +al 00CC71 .Label_CC71 +al 00CC3D .Label_CC3D +al 00CC11 .Label_CC11 +al 00CBF9 .Label_CBF9 +al 00CBE5 .Label_CBE5 +al 00CBC1 .Label_CBC1 +al 00CBDC .Label_CBDC +al 00CBAD .Label_CBAD +al 00CB99 .Label_CB99 +al 00CB82 .Label_CB82 +al 00CB6C .Label_CB6C +al 00D4C1 .Label_D028 +al 00CB68 .Label_CB68 +al 00CAF3 .Label_CAF3 +al 00CAAA .Label_CAAA +al 00CA80 .Label_CA80 +al 00CA41 .Label_CA41 +al 00CA97 .Label_CA97 +al 00CA68 .Label_CA68 +al 00CA32 .Label_CA32 +al 00CA61 .Label_CA61 +al 00CA1D .Label_CA1D +al 00DECB .Label_DECB +al 00C9A7 .Label_C9A7 +al 00C95A .Label_C95A +al 00C934 .Label_C934 +al 00C932 .Label_C932 +al 00C90D .Label_C90D +al 00C8D0 .Label_C8D0 +al 00C8F2 .Label_C8F2 +al 00C8A4 .Label_C8A4 +al 00C8B8 .Label_C8B8 +al 00C897 .Label_C897 +al 00C835 .Label_C835 +al 00C815 .Label_C815 +al 00C80A .Label_C80A +al 00C805 .Label_C805 +al 00C800 .Label_C800 +al 00C714 .Label_C714 +al 00C614 .Label_C614 +al 00C609 .Label_C609 +al 00C585 .Label_C585 +al 00C56D .Label_C56D +al 00C548 .Label_C548 +al 00C536 .Label_C536 +al 00C52E .Label_C52E +al 00C52A .Label_C52A +al 00C50A .Label_C50A +al 00C4FD .Label_C4FD +al 00C4EB .Label_C4EB +al 00C4E4 .Label_C4E4 +al 00C4D9 .Label_C4D9 +al 00C4D1 .Label_C4D1 +al 00C4C7 .Label_C4C7 +al 00C4C0 .Label_C4C0 +al 00C4B8 .Label_C4B8 +al 00C43E .Label_C43E +al 00C3FE .Label_C3FE +al 00C3FD .Label_C3FD +al 00C3FA .Label_C3FA +al 00C3F0 .Label_C3F0 +al 00C3EF .Label_C3EF +al 00C3EB .Label_C3EB +al 00C3E7 .Label_C3E7 +al 00C3E3 .Label_C3E3 +al 00C3D8 .Label_C3D8 +al 00C3C7 .Label_C3C7 +al 00C3B8 .Label_C3B8 +al 00C3A6 .Label_C3A6 +al 00C392 .Label_C392 +al 00C386 .Label_C386 +al 00C384 .Label_C384 +al 00C36D .Label_C36D +al 00C35F .Label_C35F +al 00C34A .Label_C34A +al 00C341 .Label_C341 +al 00C347 .Label_C347 +al 00C32C .Label_C32C +al 00C31B .Label_C31B +al 00C317 .Label_C317 +al 00C300 .Label_C300 +al 00C201 .Label_C201 +al 00C1FB .Label_C1FB +al 00C1F6 .Label_C1F6 +al 00C1EF .Label_C1EF +al 00C1EA .Label_C1EA +al 00C1E2 .Label_C1E2 +al 00C1D7 .Label_C1D7 +al 00C1D6 .Label_C1D6 +al 00C1D0 .Label_C1D0 +al 00C1C9 .Label_C1C9 +al 00C1C4 .Label_C1C4 +al 00C1C1 .Label_C1C1 +al 00C1BA .Label_C1BA +al 00C1B6 .Label_C1B6 +al 00C198 .Label_C198 +al 00C192 .Label_C192 +al 00C188 .Label_C188 +al 00C16A .Label_C16A +al 00C160 .Label_C160 +al 00C155 .Label_C155 +al 00C139 .Label_C139 +al 00C15B .Label_C15B +al 00C127 .Label_C127 +al 00C122 .Label_C122 +al 00C11B .Label_C11B +al 00C10D .Label_C10D +al 00C0FB .Label_C0FB +al 00C0ED .Label_C0ED +al 00C0DB .Label_C0DB +al 00C0CD .Label_C0CD +al 00C0B9 .Label_C0B9 +al 00C0AD .Label_C0AD +al 00C0A0 .Label_C0A0 +al 00C0B3 .Label_C0B3 +al 00C0A8 .Label_C0A8 +al 00C090 .Label_C090 +al 00C063 .Label_C063 +al 00C054 .Label_C054 +al 00C051 .Label_C051 +al 00C04E .Label_C04E +al 00C04B .Label_C04B +al 00C048 .Label_C048 +al 00C042 .Label_C042 +al 00C03F .Label_C03F +al 00C03C .Label_C03C +al 00C02A .Label_C02A +al 00C027 .Label_C027 +al 00C01E .Label_C01E +al 00C01B .Label_C01B +al 00C018 .Label_C018 +al 00C015 .Label_C015 +al 00C012 .Label_C012 +al 00C00F .Label_C00F +al 00C00C .Label_C00C +al 00C009 .Label_C009 +al 00C006 .Label_C006 +al 00C003 .Label_C003 +al 00C000 .Label_C000 diff --git a/_wip/Donkey Kong (JU)/copilot/reconstructed.map b/_wip/Pyramid (U)/copilot/reconstructed.map similarity index 100% rename from _wip/Donkey Kong (JU)/copilot/reconstructed.map rename to _wip/Pyramid (U)/copilot/reconstructed.map diff --git a/_wip/Pyramid (U)/copilot/reconstructed_prg.bin b/_wip/Pyramid (U)/copilot/reconstructed_prg.bin new file mode 100644 index 0000000000000000000000000000000000000000..ec5637562b331be63b6b3bb4199bf0de485c590d GIT binary patch literal 16384 zcmeHueS8$vx&N8BeamKd^CCo`G6WS8-WE}Bu7U}gO_n$yA`6Hw*;b=LMe)~G?TaO- zgIwCRt0ljJ_oj_ohGrI)CcR>%cI$=!CJ}IWNkFX--eN$&6$FEX-TOT=n?NY`>hJgI z=iWb@$(-|?=R9xcInQ~SGaKoFn6y47eHfF@#iYTFlD|=UrBPbaD811rH8x5ujgr{Lz8L<7a3^4x71j;t`1A^pns`1M8xHdm0`b{phhaDyza8H zGOL(VL5#AEUV=ai{t!`EHcjT1#g*nps_N~X?3^U z6lCXZ))^HhZy~%FVMX^jB(8IQwN7Kzk-(`}p)=G%Gz9)KiN>E=M}4gnLz%+XFs#DW zu&i=h4afQwk5?)2E|op4OUvrepJ;ALh*dm!jAm_M^PJ+-8#a3ySlti`E^!?Z2RByA zC6%(r?`E%^Oe#sH&j~Poh62my5z+kbSb(lFD{ofr02zRDoQ#?T*#T{ z3XzuDAb+Gb#GnS6gp!xp&7Sxe3hT7aK3WE}HqhEaE}b?`X`45DwBM%;Sz1vj7alH> ziz+6|lMml2-@3fw*29H3map)4`^Xn?7m!v`O641X(%rn7qOj#4LT8LKGb7LntLSTTX>% zUR9mHS&BC;!PAPTYiS-QdzK?9k;TrY?9U%3f8;Qt8hA}BgN?`ILv(wPOc84MD{E$QAx;BQWE6Q&a#I}TeVYRrL?cYd=rr8+2p_yU~;oS?u{s{-$3r<_0#vnnN6Lt2|vD z_Ta|~yNbgE$q3eT)?{;V<}_!2QFLliop4Tbm)`aLGjz8r*g;jK^{P;v7gV&mj`)`t z!^cBsFwF*^m=sUkq>@gL(Hl!#A0xn&sa|E8SGmI*f)A^wx4O=SggRwv!C7ImJXM+2 zO!H~V9W)PGCj2As*_e(y3n4)N7|*dxw!$=2T3Tr&d->1AE0Catga{x{g)} z#Un*UtLyDc+)l^PH*|b|XHx+IoB4t>BR2EJ-t5w6`%8M)PrkiU9$;9G7ffc0)s|*Y zcQ~Kf6RLVuUkUUzL3Hd3k)_ob?OYAvYY3Jb6CL&1F$BeKwOQWN+1A;vHU~H!2%;{> z@*p$nAS@lSS)CBtBbs7jPE6%dw;=S9NMh(~Ot$p$b2_6+GixkFFq{~1 zaIAyGa~69-WG~0|{dM6wfcpa*|YxVEp%aA|Ad~Y3@y+} zn(d;q{(kA#&8h>IW*G|g-2sCs0aLf_g|zi^Ta4JmBBRfB_LypeAxfHNZH}b}_tld4 zhjgQ{{$Ys6M4rmU6kT)75<-~HZ$4^%u<`S83)9(#2D;|rd6@`=G6dIK!v(u;ROWl?m~p z2$m*$gyFPF5suRyj(>9E3?DheV^zg01adV?7SsXQ)Ljt++UhpOV#*=XcUrLl;skA6 z#3W2%0w%#`tJ66K>KyQ7xK*DxI|M9=7ja!M^3E87QaaV@bP(b+nMgL_ErhtTvt7K) zC^T%S-~ZZy`o`Cq8V)ub8rHCpX*j?(Y-l*h9B5!08-^WjXkt+V^nSJ>nbbp(?rRXZ zDOZI;AHYF0aPKmFbP7J&-Rq;<^sv;oLKj$4{UQEomwFXC9Nv8VxDG|o+zd1qUOU6* zG2v+AF1QkF6{)$A@9KCR%gw}Co)h?Yu^Nrz*K$HUvo-q1*1%Xk`k$@9oPdPv$T%K| z{-h!PB{yG7eleaGcWT%-T_s)DP6)%WEYAx9VOU-u*-o2D;5io8+B1BIEy#v!(e3XB zuA>9iCZ`1mA7J>9x#lR}>iSZAdx!YcF0o>Vcz(NhY`f^#LCqhb*z$U|5gyr5>oF{s`K ziVnIDER){cg1s=yN00Jxmtxz>@NoyM*?W|if?Mb&D2J+dt!3dTORzm6a2gjl%S#zs zIs{FKoaMEB(XCrxI^86-ZNVm~eT&Skb@OY+^VlZYuy`??$#i1Nh^@gbKiqoT)|Fca zZM%P)(MqU@oaVKYk+HltoYw>I(%n${Sn6j(1obMbVK=&S8@y|-M1^#COC=u4*d6I( zZ0%!|%v&)y;`x-|n#lEhT-A(=P?FO^N3>Aj7Weq_16fmtuiMT z#^|6rha^rD?OZJp|F|87+H4HNJax}=&u1{qc`BQeVp~s~;>Fi?2Cd?scEU5%FAzln z6L>LStIsr=&}>A;M0CW>V(qq25}py?+K#jt8Ag~`yF;1aMJ!Cf9Q(#@l|>&_$`i!) zZ7G@0y?bIjm27CeVO!)RA5YtMQdiAEHL5T%=b}x9;v7S9tKmFO_npRVb6=406Dp&{ zTAy~JpA?ntFQKcygcF8@u{@>>x;uNJB)WEc&iwIwT{Mi`&4Ryo1`peE+ekaKuIdS@f3{QIiBf#j5 zQn)=tKH8+kE!62}q&KzY-o@TkrL>PKO7t$O@X#KrtTTEDt~a;Xej!fZSuy=>osKBfXX^hV=!`E8q-R9ki_`{e`VdO zQrg?~oOGj>GqmW3mq=je+c6tRbp}K$~OveMJMd53n)k7%T8lIYzL%BjtfhV0N0n67}} zYhAsF8&Ze?i-i~HvQGD7>pYshgN<8aL_^GJTr*xwSiG@v!NVaMxEMJt4+e!J4|Zu^ z&@CI?9vrdJLWx}JS97pO$S_uXzS9Kzu)3v&^M)bTGqmZ@vlB;&42(8D=ianJp1FkM`q|J(2OfV9910sAXm0sJK%u)niunhT^qk z{pg(tPP!Rfj<-*ATHX5KPFhq-X^K!C2?7s=JH5>@KDZ5`W!%Jqn^^E*t)(47EDTFg zgtha8LvBa>SqNa>&M?G63oL6#k5O7mhli&y#}c3^9qJ%Mk6xAvvOcUmFaO$f;C=3yugm&px(m1!0@jAJ8=Vq+Y&~esZoyI7`m)Jc|KJm{5?eE@>%(Wgxh?G1UL+cW4^< z96Kl+bLenyYfwPArFg4?-62!-#IBk&K6-jrO(q}h*;R8T=CvA;k8*7_Be2Wq2$<*+ zEbxA~onBQ%U9O_~k;Ed799d9+of0C7i3q&D0=#76qiKBHv^R~H%G$(7+t!-+1cZq^ z-ZMxvlh1i}RvT4xC7}D-pe*`e8`OiWtHX>LDYMN_<>4~4Ap|f#xkL~|M_>uU#+ij( z2--SG3z(^-fQ66#tu0{XqX*jpHa^HHUR4fwdc&Y@W8HT z0hxK!L~J}x<>;GH^ENB5ZT1tf$X~hO8H>e2w}GN@O-3})>o$*(mrl8T>K%99P`q#7o=C_SER3FH(E`Bl1R#nN&Dt^7OmE z_vkZ=mi`LU)s$KnPT1(OTubOQY{lt{6{or4ZUDCWI~RK?_VD7;rHK46g@sk6(p&AT zO1lY!LrRQ<&)z=_zAuebXK{jbaJOh{>$KtUHchPBH%;a!ebE3=40 zQlx&HEsQgyD~fRPJrGpU-Md%Vi{Jr1_&Hu_&h!4sRSdIf&3(2_YwowHyS?f$uea#v z(NOYLY|eA99caoOnNyfMF7vwFLBqsx+(<&k4Z?HD zl}lXi-26c|eE%e_l|PnE&d(|3?i;4F1h;YhMeI#Gv1; zR95{Sd7TGbO{6 z${i_Lrc~}o$uy;MM@qISmD~Gtz_30zk=CaV=oCy6qYrm}eCCVp<0n3C+|cy5kM{1| z)zGreBd|oI<0v6oipy5NfOrk?l1QjfA4_@D;|2da^544J~qGji3R2V z=ldjK{_#(K`s~jZRxMhz=mmN4i^zUnT>Mgb`OB~TiX`}7FE4-f-;0ZNuj{U^Q;Um> z!{z1W=s`jvYs<^ghrJF>d9ZQ%1`srD{MAo3ZH7l$-!1<9Ou~A)c>4}`vVAvr%lE)X z@NDtt46T4K;kLt_;QF|$_{h;uj-@Kl1@Lz9sq*rPlTx?N(N~%@@s>j4o}^dwmXJ@J z#3Y1?200+ge@h`f_+yzAEn~}=b2oEK;aAau$q)*5gQ}kmeL{7m6EDzGi!RpQYr1ZL zV6tWO8jv#m5^^SC)+sNj7c%b65EzC^y~F~Y@)G^#zoYBr>hsp5K5tFB#khOrPSm@q zPfs7m1ye79jMz+)#OsegK@u6WX3xFn{_^iV@X*7LJi6dXAm-eC?|uI7K3GvX@3HwL z0lL;c4ixbBHZ3!WmvV1n5<_xto{h};)YH%0!<&9Yw-32D-#i;QhB2JrW)cpdfTM&1 zC`e&S@l3`&KYE%;r03q8;AbazRA&MdW+w!IE`X-l2@^o@C(N@GW`K5pme~mlKpQ~o z?1UAd1)yzq!UoVh+yI9G3y=~3v;m}S0PO&&Fn|t#R0Tj6K&lvECO~Qq!0h3@)}kIaqh z0*Y6|LN7jnVcmD{lSf3y?~_MHi}%TSQO`a(KRRchJSuwkK6!NXv3>HG==^>1*boju ztB0#h^|)5oX}o3AH>3$6u6j5{oYfastj;ijgz$N%2&cN8UU_F|lI;FpnRvJ+uY5iAO1}@z`xT?(xHE;C$&5ira8(o{m!{ zXf~?VuS}3|;5sgDQHICUHV==RfgLK{-huBOBlJ@>$3A>(7IdZW5w)AM@ zjSsO(saKqPpkai3J>GM=4y?Lf^u|_PPw4h2j*3dT)cE2ly|%BVBbc4%^eRq#T6IgWF zR#GEJ$pe*91&0U9qm*#*Xl;*O6RDNW6x>y}zvT2!dv6)O3lg(zadL2K4Uwqt( zQ;9Uj&ZL9Z!KLE`Kb^O8X#~3#*2<=F!vPKFFHc3O)7asxmCI$UUqSOfD{0ZEm$&@? z#i~T|`9ojRuk5)|=NEOkS-0i#x0T7p2cSz*#>_Z~gBWRF9V6)2OVWO{oKAt1>EpUs zdOzAeihgqYG=GJJa}9`8%h$VckVy|S*>l$CyLxyBpH3gv&f0h@1XwMC$;6s@6D#y# zth}8~XB`#`p9Z>gi&lI2Z@(K!Dnj_Co0>r!#iYU4ZN;+nF@hhO`&5 z@>lCJ-Mj-j?3U!BPB-(v&8YK>j$YEghy!5y^-&)MV`DN%2Dv2tMzojk8q&Uz+&*gz zOaGz0Jd;M!$R#OrN!g(I3L7qOuZ3|ECr%;zrOYK|gW@Z^bNNwGfLq`hfj9)M@_|J2_MT+t}CO%NBz1p8@yR#+m*ZIxd#^kMx~O zrw4gh?Xbb4-$gilEfI)`nDO<*N^F?fu&Kff=_D@9w3#Fe2T6(K`Sa(iut27vThq{) zX$VBxeMZ@?cQy@|zptl(OT*T|CzFf1te~*!Az(m8O63?bF0D_~1IdXrjeqWANN1gN z=cnH^#B_}*Tn2InkC`Ny#H;Ds$7N46c3dtod9KwTr6iD9R1j@EeqOKIaQr;2Eh%}( zbMb>;LT44J=>b=f>cSgo1)^C2NUH`k|b8ZMd^zwbL+?&6vx^6<-D}TQAanDnp zKif`cA4@xHoBM9Q?*?Ve%YS_?%D%;X$(<8^oVCm6iOd-F=c{)Oo;PY<^$)7=y(W5V zWajLZH5>1r@`z8J>sdE<%DVivGM^F-m$mH(FPnS&jMa0)kr@@UM!h`0`j0bKx9+;} z&edV@ga13TdhOCjZlAKQ%(wE5SHh8HWs&^+dxovcf4{73^|G11yV^~6KN>Du=bPah zGv<#Kug$718#Q~XI#!-D!EqCG>mP2#OJ%gr?xFC^Z6d}jq$Zz zKW&n4t|x!yiXCM?cyd|Av3ovwBRn&IT}=jcU2W4Bg}#yhwtD`blFsS*0wJ+e$z-8O zI{q;Ky`f>`*Kc1sZzxfm(7Ox(?0w4O{ISbGUW+0rT%3rYg3qYVu zKp2VbUqIf|YsfRmm^u49-0uJ|6Y^7J+?*GlfBqSrl62sA03^Pl@yTtd0Dm{-4{X@) z{>^Vu&LQ!hWMPqSK|#-{gUO*-F#iJfnZi4p3Wp||m<6P%DY>vJ+!2qzmt5!?J*%;C zA1%i|+Yj|*O_+s!V2^zU;e|!j8-#c=IkdJ+Fr&P%s?29Y*;!lW>wwy%xo&1PwV$h- zVIY`%pHhViW`>$Cf?^?=RUM`X^K>OlzzPql`3!AHRlYAx)V(t^Y=cq=o8hxH0vH;b zS>1=Zl`;_$EuwnR5OC{a=oe|qO}VD9dL_eC-@wXzUv)7d0I7R)BEPRXoJony#IJiC zRc$kUEUiTE4Wv#)|NXQ&%>mh=?V0}J)&Wq=#IG-U4sM$`~F_VcO z1cZ>}sdpePzB<1n*_|BvI_!u6l|50NS}sY0dBi3}zZ2!?h@t!gsZx<~auTgRvYG-yCTI)1yK($==d zAjM37{IXC0qOeHj&`zfdzld2V1L2%Lnu@|<2Z@za4{&uXv@NWHjP5kOvl^(4=8-%p zdRuqV5}}V^AoT&cn+Kk@2NJN&;x=9fKfpw^ME(>t>`M#;ark}1A?Gb%a4oQR04);Y z{@G_3#h5N6D?nJV%_NhFd@2<8PzDU@&`m7VPoic;z!Pn(=b5A?fuo|AB zl=;*OHQY99^|~3paIP;;DVw6^-`Tb{^62XPKwCI}%FME>L+XPc{$cl{zHqB=UG~fQ zR$&3L6#Lyd`}Zf`n|$Qt9LzL48cZ8N9Yx|V#hmA7Q90pH<^${R1|g6iwN1C(T*=D z(NNZ1)H4UlA!#Tty5kSrz5F1i*o7`4z1l5(+AU2!tF*Zb<5%N^dv{L7hw_I(w)1bz zI6U5?>}lx^THn_ z1!elni^|F(r9Hmg-GzVYdsq1Y|KX;*k0fFiYh6fkDn61wf||Wcw9l0H@h<@K`zU>& ze9$7+GyX{N*-alohv)33y}FKes-xZSpZWz`WBj|_oo6rlcRTts4H|;qUf+7)TMvBe zfp0zVztRKvN!&Ag@R6U0SRholI3+30P6l&S7a*f3B}FNzm!(^hs@RLa0EzRG5@`;Q z$+diFTdQ_{iPr5`CvO$;f6(fzt-~0NE%4_66A&47R$v%|Ul{/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory. +| Pass | Status | +|------|--------| +| Pass 1 | **Complete** — 14,325 lines of `prg.s`, 863 address-based `Label_` definitions, canonical audit comments; 64.3% code per the root inventory row | +| Pass 2 | Outstanding | +| Pass 3 | Outstanding | +| Promotion | Outstanding — add `header.s`/`chr.s` + HEADER/PRG/CHR `linker.cfg`, switch `make` to a whole-ROM `cmp`, move the `_tools` paths | + +**Still owed:** a real power-on flow analysis (RESET/NMI/main-loop walk) in the style of the top-level project `OVERVIEW.md`s. This file was retitled and restatused in the 2026-10-19 doc-drift sweep to match the actual `prg.s`; the original skeleton-era text is superseded. diff --git a/_wip/Raid on Bungeling Bay (U)/OVERVIEW.md b/_wip/Raid on Bungeling Bay (U)/OVERVIEW.md index c016638..1aa6c49 100644 --- a/_wip/Raid on Bungeling Bay (U)/OVERVIEW.md +++ b/_wip/Raid on Bungeling Bay (U)/OVERVIEW.md @@ -1,6 +1,6 @@ -# Raid on Bungeling Bay (U) — Skeleton Project +# Raid on Bungeling Bay (U) — Pass 1 Disassembly -ROM: `_wip/Raid on Bungeling Bay (U)/Raid on Bungeling Bay (U).nes` (24,592 bytes, iNES). Status: **SKELETON — not yet disassembled.** The entire 16 KB PRG bank is a single unclassified block; `copilot/prg.s` is the default-project skeleton (`default_project.tar.gz`) that reproduces it as one `.incbin`. The skeleton build is **byte-identical** at the PRG level. +ROM: `_wip/Raid on Bungeling Bay (U)/Raid on Bungeling Bay (U).nes` (24,592 bytes, iNES). Status: **Pass 1 complete — 64.6% code.** `copilot/prg.s` is a real disassembly, not a skeleton: 14,396 lines with 868 address-based `Label_` definitions and canonical `; CPU:$xxxx PRG:xxxx AA BB` audit comments. It builds **byte-identical** at the PRG level (`cmp reconstructed_prg.bin prg.bin`). ## ROM Facts @@ -10,7 +10,7 @@ ROM: `_wip/Raid on Bungeling Bay (U)/Raid on Bungeling Bay (U).nes` (24,592 byte | Mapper | 0 (NROM) — from the iNES header | | PRG | 16 KB (header claims map at CPU $C000–$FFFF) | | CHR | 8 KB | -| Mirroring | Horizontal | +| Mirroring | Vertical | | Battery-backed flag | clear | | ROM SHA-256 | `577ceb8c441276aee3aec3f86a0592c84d57e2f97675dd84b07fd06dc4a3b213` | | PRG SHA-256 | `46e80cd2d105178efc2adbdd49463421eb455b7729867c352ec8e5fb45d032d8` | @@ -29,14 +29,14 @@ ROM: `_wip/Raid on Bungeling Bay (U)/Raid on Bungeling Bay (U).nes` (24,592 byte |------|---------| | `Raid on Bungeling Bay (U).nes` | original ROM image (reference) | | `prg.bin` / `header.bin` / `chr.bin` | split image, produced by `_tools/splitnes.py` | -| `prg.s` | Pass-1 skeleton: `.incbin "prg.bin", $0000, $4000` (whole PRG) | -| `symbols.inc` | shared NES hardware constants (PPU/APU/controller, from the skeleton) | -| `locals.inc` | project-local zero-page aliases — empty for now (filled in Pass 2) | +| `prg.s` | Pass-1 disassembly: 14,396 lines, 868 address-based `Label_` labels, canonical audit comments | +| `symbols.inc` | shared NES hardware constants (PPU/APU/controller) | +| `locals.inc` | project-local zero-page aliases | | `linker.cfg` | PRG at $C000, 16 KB, `fill = yes` | | `Makefile` | links `reconstructed_prg.bin` and `cmp`s it against `prg.bin` | | `reconstructed_prg.bin` | build output from the last verified build | -Header/CHR are reproduced verbatim from `header.bin`/`chr.bin` (not linked): `make` verifies **PRG bytes only** at this stage, which is exactly what a skeleton proves. When this project is promoted to a full disassembly, `header.s` / `chr.s` (as e.g. `Burger Time (U)`) and a full-ROM `make` target get added. +Header/CHR are not linked: `copilot/` keeps the raw `header.bin`/`chr.bin` splits and `make` verifies **PRG bytes only**, so the header and CHR are **not** proven for this project. Promotion to the top level adds `header.s` / `chr.s` (as e.g. `Burger Time (U)`), a HEADER/PRG/CHR `linker.cfg`, and a full-ROM `make` target. ## Build @@ -45,9 +45,13 @@ cd "_wip/Raid on Bungeling Bay (U)/copilot" make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" ``` -## Next Steps (per `PROMPTS.md`) +## Pass Status -1. **Pass 1** — replace the blanket `.incbin` with classified code/data: trace reachability from RESET ($C000) and NMI ($C04C), emit per-instruction `; PRG:$xxxx AA BB` annotations, keep unreached bytes as explicit `.byte` blocks. -2. **Pass 2** — replace `Label_`/`Sub_` names with semantic routine names; fill `locals.inc`. -3. **Pass 3** — name data tables/structures; release provisional flags. -4. **Promotion** — move to a top-level `/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory. +| Pass | Status | +|------|--------| +| Pass 1 | **Complete** — 14,396 lines of `prg.s`, 868 address-based `Label_` definitions, canonical audit comments; 64.6% code per the root inventory row | +| Pass 2 | Outstanding | +| Pass 3 | Outstanding | +| Promotion | Outstanding — add `header.s`/`chr.s` + HEADER/PRG/CHR `linker.cfg`, switch `make` to a whole-ROM `cmp`, move the `_tools` paths | + +**Still owed:** a real power-on flow analysis (RESET/NMI/main-loop walk) in the style of the top-level project `OVERVIEW.md`s. This file was retitled and restatused in the 2026-10-19 doc-drift sweep to match the actual `prg.s`; the original skeleton-era text is superseded.