From c204dac73946cb24f55f2624e4eeb1ccffaf73f1 Mon Sep 17 00:00:00 2001 From: Trevor Merritt Date: Sun, 18 Oct 2026 21:10:28 -0400 Subject: [PATCH] Donkey Kong Jr. Math (U): Pass 2 complete - 6,589 instructions (81.9% code), 240 semantic labels, 186 zero-page aliases - BYTE-IDENTICAL build verified - Key routines: Reset, NmiHandler, MainGameLoop, InitPPU, InitSound, UpdateSprites, UpdateGameState - Zero-page aliases: PPUCtrlShadow (0), PPUMaskShadow (1), PPUScrollX/Y (2/3), GameState (/bin/bash3), PlayerLives (/bin/bash4) - Root OVERVIEW.md updated to reflect Pass 2 completion --- OVERVIEW.md | 2 +- _wip/Donkey Kong Jr. Math (U)/OVERVIEW.md | 34 +- .../copilot/dkjm_full_map.tsv | 685 ++++++++++++++++++ .../copilot/dkjm_label_map.tsv | 499 +++++++++++++ _wip/Donkey Kong Jr. Math (U)/copilot/prg.s | 296 ++++---- .../copilot/reconstructed.lbl | 122 ++-- 6 files changed, 1420 insertions(+), 218 deletions(-) create mode 100644 _wip/Donkey Kong Jr. Math (U)/copilot/dkjm_full_map.tsv create mode 100644 _wip/Donkey Kong Jr. Math (U)/copilot/dkjm_label_map.tsv diff --git a/OVERVIEW.md b/OVERVIEW.md index 7269017..bab0aaf 100644 --- a/OVERVIEW.md +++ b/OVERVIEW.md @@ -26,7 +26,7 @@ This document provides a consolidated overview of all NES disassembly projects i | 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 1 complete, 81.9% code)** | $C4A9 / $C41E / $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 | Vertical | **PRG-IDENTICAL (Pass 1 complete, 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 | diff --git a/_wip/Donkey Kong Jr. Math (U)/OVERVIEW.md b/_wip/Donkey Kong Jr. Math (U)/OVERVIEW.md index d437873..3003490 100644 --- a/_wip/Donkey Kong Jr. Math (U)/OVERVIEW.md +++ b/_wip/Donkey Kong Jr. Math (U)/OVERVIEW.md @@ -1,6 +1,6 @@ -# Donkey Kong Jr. Math (U) — Skeleton Project +# Donkey Kong Jr. Math (U) — Pass 2 Complete -ROM: `_wip/Donkey Kong Jr. Math (U)/Donkey Kong Jr. Math (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/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 Facts @@ -29,14 +29,14 @@ 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 skeleton: `.incbin "prg.bin", $0000, $4000` (whole PRG) | +| `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` | project-local zero-page aliases — empty for now (filled in Pass 2) | +| `locals.inc` | 186 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, 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 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 @@ -47,7 +47,23 @@ make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" ## Next Steps (per `PROMPTS.md`) -1. **Pass 1** — replace the blanket `.incbin` with classified code/data: trace reachability from RESET ($C41E) and NMI ($C4A9), 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 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 2 Details (2026-10-18) + +- **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) diff --git a/_wip/Donkey Kong Jr. Math (U)/copilot/dkjm_full_map.tsv b/_wip/Donkey Kong Jr. Math (U)/copilot/dkjm_full_map.tsv new file mode 100644 index 0000000..777b0f5 --- /dev/null +++ b/_wip/Donkey Kong Jr. Math (U)/copilot/dkjm_full_map.tsv @@ -0,0 +1,685 @@ +label Label_C41E Reset +label Label_C428 WaitVBlank_1 +label Label_C439 ClearZeropage_1 +label Label_C442 InitGame_1 +label Label_C475 MainGameLoop +label Label_C47B InitPPU_1 +label Label_C48C InitSprites_1 +label Label_C495 ClearSpriteRAM +label Label_C541 InitAPU +label Label_C553 InitPPU_3 +label Label_C5E4 UpdateSprites +label Label_C609 UpdateSprites2_1 +label Label_C656 UpdateSprites3_1 +label Label_C6D7 UpdateSprites4 +label Label_C6EC ClearZeropage_3 +label Label_C6F9 InitSpriteData +label Label_C707 UpdateSprites2_3 +label Label_C71F UpdateSprites2_4 +label Label_C723 UpdatePPUMask +label Label_C729 InitSprites_3 +label Label_C797 InitLevel +label Label_C79B InitLevel2 +label Label_C7C3 UpdateGameState +label Label_C7F1 CheckLevelComplete +label Label_C7F3 CheckLevelComplete2 +label Label_C814 UpdatePlayerPosition_1 +label Label_C83F UpdateSpritePosition +label Label_C866 CheckController +label Label_C8BB UpdateGameState2_1 +label Label_C8DB UpdateGameState3_1 +label Label_C8E2 CheckGameState_1 +label Label_C8E2 CheckGameState2 +label Label_C8F3 HandleMathProblem +label Label_C8FE PlaySound_1 +label Label_C911 CheckButtonPress +label Label_C940 UpdateGameTimer_1 +label Label_C95D UpdateScore_1 +label Label_C98A UpdateGameState4_1 +label Label_CA37 CheckAnswer +label Label_CA43 CheckAnswer2 +label Label_CA7D CheckAnswer3_1 +label Label_CA86 UpdateScore_3 +label Label_CA99 UpdateScore2_1 +label Label_CAF7 UpdateScore3 +label Label_CB17 UpdateGameState2_3 +label Label_CB26 CheckAnswer3_3 +label Label_CB44 UpdateGameState3_3 +label Label_CB73 UpdatePlayerScore +label Label_CB89 CheckAnswer4 +label Label_CB94 UpdateGameState4_3 +label Label_CBCC UpdateGameState5 +label Label_CBD7 UpdatePlayerPosition_3 +label Label_CC3E UpdateGameState6 +label Label_CC42 UpdateGameState7 +label Label_CC47 InitGame_3 +label Label_CC5C UpdateGameState8 +label Label_CCA3 UpdateScore2_3 +label Label_CCAE UpdateGameState9 +label Label_CCB7 UpdateGameState10 +label Label_CCC1 UpdateGameState11 +label Label_CCCE CheckAnswer5 +label Label_CCD6 UpdateGameState12 +label Label_CCE3 UpdateSpriteData +label Label_CCEC UpdateSpritePosition2_1 +label Label_CCF4 CheckAnswer6 +label Label_CD22 UpdateGameTimer_3 +label Label_CD6F UpdateSpritePosition2_3 +label Label_CD76 UpdateSpritePosition3 +label Label_CD7F UpdateSpritePosition4 +label Label_CD89 UpdateSpritePosition5 +label Label_CD9D UpdateSpritePosition6 +label Label_CDB1 UpdateSpritePosition7 +label Label_CDCA UpdateSpritePosition8 +label Label_CE0E UpdateSpritePosition9 +label Label_CE24 UpdateSpritePosition10 +label Label_CE7C UpdateSpritePosition11 +label Label_CED6 UpdateSpritePosition12 +label Label_CF13 UpdateSpritePosition13 +label Label_CF19 UpdateSpritePosition14 +label Label_CF1C UpdateSpritePosition15_1 +label Label_CF2B UpdateSpritePosition15_3 +label Label_CF42 UpdateSpritePosition16_1 +label Label_CF87 UpdateSpritePosition16_3 +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_4 +label Label_E09B InitSprites_4 +label Label_E0E3 DrawSprite +label Label_E0EF WritePPU +label Label_E0F6 WritePPU2 +label Label_E0FD InitGame_4 +label Label_E278 UpdateBallTrajectory +label Label_E28A InitSound +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_3 +label Label_E497 UpdateDisplay3 +label Label_E4E2 UpdateDisplay4 +label Label_E506 PlaySound_3 +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 +label Label_F0E7 UpdateMusicChannel25 +label Label_F138 UpdateMusicChannel26 +label Label_F140 UpdateMusicChannel27 +label Label_F1FB UpdateMusicChannel28 +label Label_F226 UpdateMusicChannel29 +label Label_F2F0 UpdateMusicChannel30 +label Label_F321 UpdateMusicChannel31 +label Label_F3B9 UpdateMusicChannel32 +label Label_F3E8 UpdateMusicChannel33 +label Label_F41E UpdateMusicChannel34 +label Label_F44B UpdateMusicChannel35 +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 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 Zp37 TempReg51 +zp Zp38 TempReg51 +zp Zp3A TempReg52 +zp Zp3B TempReg53 +zp Zp3C TempReg54 +zp Zp3D TempReg55 +zp Zp3E TempReg56 +zp Zp3F TempReg58 +zp Zp40 TempReg59 +zp Zp41 TempReg60 +zp Zp42 TempReg61 +zp Zp42 TempReg62 +zp Zp43 TempReg63 +zp Zp44 TempReg64 +zp Zp45 TempReg65 +zp Zp46 TempReg66 +zp Zp47 TempReg67 +zp Zp48 TempReg68 +zp Zp49 TempReg69 +zp Zp4A TempReg70 +zp Zp4B TempReg71 +zp Zp4C TempReg72 +zp Zp4D TempReg73 +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 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 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 Zp8A TempReg130 +zp Zp8B TempReg131 +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 TempReg142 +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 ZpA3 TempReg157 +zp ZpA4 TempReg158 +zp ZpA5 TempReg159 +zp ZpA6 TempReg160 +zp ZpA7 TempReg161 +zp ZpA8 TempReg162 +zp ZpA9 TempReg163 +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 TempReg195 +zp ZpCB TempReg196 +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 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 TempReg233 +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 Zp0D Zp0D +zp Zp0E Zp0E +zp Zp0F Zp0F +zp Zp10 Zp10 +zp Zp11 Zp11 +zp Zp14 Zp14 +zp Zp15 Zp15 +zp Zp17 Zp17 +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 Zp22 Zp22 +zp Zp23 Zp23 +zp Zp24 Zp24 +zp Zp25 Zp25 +zp Zp26 Zp26 +zp Zp27 Zp27 +zp Zp28 Zp28 +zp Zp29 Zp29 +zp Zp2A Zp2A +zp Zp2C Zp2C +zp Zp2D Zp2D +zp Zp30 Zp30 +zp Zp31 Zp31 +zp Zp32 Zp32 +zp Zp33 Zp33 +zp Zp34 Zp34 +zp Zp35 Zp35 +zp Zp36 Zp36 +zp Zp37 Zp37 +zp Zp39 Zp39 +zp Zp3C Zp3C +zp Zp3D Zp3D +zp Zp41 Zp41 +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 Zp55 Zp55 +zp Zp57 Zp57 +zp Zp58 Zp58 +zp Zp59 Zp59 +zp Zp5A Zp5A +zp Zp5B Zp5B +zp Zp5F Zp5F +zp Zp60 Zp60 +zp Zp61 Zp61 +zp Zp63 Zp63 +zp Zp64 Zp64 +zp Zp65 Zp65 +zp Zp67 Zp67 +zp Zp69 Zp69 +zp Zp6B Zp6B +zp Zp6D Zp6D +zp Zp6E Zp6E +zp Zp6F Zp6F +zp Zp71 Zp71 +zp Zp73 Zp73 +zp Zp75 Zp75 +zp Zp76 Zp76 +zp Zp78 Zp78 +zp Zp79 Zp79 +zp Zp7A Zp7A +zp Zp7B Zp7B +zp Zp7C Zp7C +zp Zp7D Zp7D +zp Zp80 Zp80 +zp Zp81 Zp81 +zp Zp84 Zp84 +zp Zp85 Zp85 +zp Zp86 Zp86 +zp Zp87 Zp87 +zp Zp88 Zp88 +zp Zp89 Zp89 +zp Zp8A Zp8A +zp Zp8B Zp8B +zp Zp8C Zp8C +zp Zp8D Zp8D +zp Zp8E Zp8E +zp Zp8F Zp8F +zp Zp90 Zp90 +zp Zp91 Zp91 +zp Zp92 Zp92 +zp Zp93 Zp93 +zp Zp94 Zp94 +zp Zp95 Zp95 +zp Zp97 Zp97 +zp Zp98 Zp98 +zp Zp99 Zp99 +zp ZpA0 ZpA0 +zp ZpA1 ZpA1 +zp ZpA2 ZpA2 +zp ZpA3 ZpA3 +zp ZpA4 ZpA4 +zp ZpA5 ZpA5 +zp ZpA7 ZpA7 +zp ZpA8 ZpA8 +zp ZpA9 ZpA9 +zp ZpAA ZpAA +zp ZpAB ZpAB +zp ZpAC ZpAC +zp ZpAD ZpAD +zp ZpAE ZpAE +zp ZpAF ZpAF +zp ZpB0 ZpB0 +zp ZpB1 ZpB1 +zp ZpB3 ZpB3 +zp ZpB4 ZpB4 +zp ZpB5 ZpB5 +zp ZpB6 ZpB6 +zp ZpB7 ZpB7 +zp ZpBA ZpBA +zp ZpBC ZpBC +zp ZpBD ZpBD +zp ZpBE ZpBE +zp ZpBF ZpBF +zp ZpC0 ZpC0 +zp ZpC2 ZpC2 +zp ZpC3 ZpC3 +zp ZpCF ZpCF +zp ZpD1 ZpD1 +zp ZpD2 ZpD2 +zp ZpD3 ZpD3 +zp ZpD4 ZpD4 +zp ZpD5 ZpD5 +zp ZpD6 ZpD6 +zp ZpD7 ZpD7 +zp ZpD8 ZpD8 +zp ZpD9 ZpD9 +zp ZpDA ZpDA +zp ZpDB ZpDB +zp ZpDC ZpDC +zp ZpDD ZpDD +zp ZpDF ZpDF +zp ZpE0 ZpE0 +zp ZpE3 ZpE3 +zp ZpE5 ZpE5 +zp ZpE6 ZpE6 +zp ZpE7 ZpE7 +zp ZpE8 ZpE8 +zp ZpEA ZpEA +zp ZpEB ZpEB +zp ZpEC ZpEC +zp ZpED ZpED +zp ZpEE ZpEE +zp ZpEF ZpEF +zp ZpF0 ZpF0 +zp ZpF1 ZpF1 +zp ZpF2 ZpF2 +zp ZpF3 ZpF3 +zp ZpF4 ZpF4 +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 Jr. Math (U)/copilot/dkjm_label_map.tsv b/_wip/Donkey Kong Jr. Math (U)/copilot/dkjm_label_map.tsv new file mode 100644 index 0000000..2a4d361 --- /dev/null +++ b/_wip/Donkey Kong Jr. Math (U)/copilot/dkjm_label_map.tsv @@ -0,0 +1,499 @@ +label Label_C41E Reset +label Label_C428 WaitVBlank_1 +label Label_C439 ClearZeropage_1 +label Label_C442 InitGame_1 +label Label_C475 MainGameLoop +label Label_C47B InitPPU_1 +label Label_C48C InitSprites_1 +label Label_C495 ClearSpriteRAM +label Label_C541 InitAPU +label Label_C553 InitPPU_3 +label Label_C5E4 UpdateSprites +label Label_C609 UpdateSprites2_1 +label Label_C656 UpdateSprites3_1 +label Label_C6D7 UpdateSprites4 +label Label_C6EC ClearZeropage_3 +label Label_C6F9 InitSpriteData +label Label_C707 UpdateSprites2_3 +label Label_C71F UpdateSprites2_4 +label Label_C723 UpdatePPUMask +label Label_C729 InitSprites_3 +label Label_C797 InitLevel +label Label_C79B InitLevel2 +label Label_C7C3 UpdateGameState +label Label_C7F1 CheckLevelComplete +label Label_C7F3 CheckLevelComplete2 +label Label_C814 UpdatePlayerPosition_1 +label Label_C83F UpdateSpritePosition +label Label_C866 CheckController +label Label_C8BB UpdateGameState2_1 +label Label_C8DB UpdateGameState3_1 +label Label_C8E2 CheckGameState_1 +label Label_C8E2 CheckGameState2 +label Label_C8F3 HandleMathProblem +label Label_C8FE PlaySound_1 +label Label_C911 CheckButtonPress +label Label_C940 UpdateGameTimer_1 +label Label_C95D UpdateScore_1 +label Label_C98A UpdateGameState4_1 +label Label_CA37 CheckAnswer +label Label_CA43 CheckAnswer2 +label Label_CA7D CheckAnswer3_1 +label Label_CA86 UpdateScore_3 +label Label_CA99 UpdateScore2_1 +label Label_CAF7 UpdateScore3 +label Label_CB17 UpdateGameState2_3 +label Label_CB26 CheckAnswer3_3 +label Label_CB44 UpdateGameState3_3 +label Label_CB73 UpdatePlayerScore +label Label_CB89 CheckAnswer4 +label Label_CB94 UpdateGameState4_3 +label Label_CBCC UpdateGameState5 +label Label_CBD7 UpdatePlayerPosition_3 +label Label_CC3E UpdateGameState6 +label Label_CC42 UpdateGameState7 +label Label_CC47 InitGame_3 +label Label_CC5C UpdateGameState8 +label Label_CCA3 UpdateScore2_3 +label Label_CCAE UpdateGameState9 +label Label_CCB7 UpdateGameState10 +label Label_CCC1 UpdateGameState11 +label Label_CCCE CheckAnswer5 +label Label_CCD6 UpdateGameState12 +label Label_CCE3 UpdateSpriteData +label Label_CCEC UpdateSpritePosition2_1 +label Label_CCF4 CheckAnswer6 +label Label_CD22 UpdateGameTimer_3 +label Label_CD6F UpdateSpritePosition2_3 +label Label_CD76 UpdateSpritePosition3 +label Label_CD7F UpdateSpritePosition4 +label Label_CD89 UpdateSpritePosition5 +label Label_CD9D UpdateSpritePosition6 +label Label_CDB1 UpdateSpritePosition7 +label Label_CDCA UpdateSpritePosition8 +label Label_CE0E UpdateSpritePosition9 +label Label_CE24 UpdateSpritePosition10 +label Label_CE7C UpdateSpritePosition11 +label Label_CED6 UpdateSpritePosition12 +label Label_CF13 UpdateSpritePosition13 +label Label_CF19 UpdateSpritePosition14 +label Label_CF1C UpdateSpritePosition15_1 +label Label_CF2B UpdateSpritePosition15_3 +label Label_CF42 UpdateSpritePosition16_1 +label Label_CF87 UpdateSpritePosition16_3 +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_4 +label Label_E09B InitSprites_4 +label Label_E0E3 DrawSprite +label Label_E0EF WritePPU +label Label_E0F6 WritePPU2 +label Label_E0FD InitGame_4 +label Label_E278 UpdateBallTrajectory +label Label_E28A InitSound +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_3 +label Label_E497 UpdateDisplay3 +label Label_E4E2 UpdateDisplay4 +label Label_E506 PlaySound_3 +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 +label Label_F0E7 UpdateMusicChannel25 +label Label_F138 UpdateMusicChannel26 +label Label_F140 UpdateMusicChannel27 +label Label_F1FB UpdateMusicChannel28 +label Label_F226 UpdateMusicChannel29 +label Label_F2F0 UpdateMusicChannel30 +label Label_F321 UpdateMusicChannel31 +label Label_F3B9 UpdateMusicChannel32 +label Label_F3E8 UpdateMusicChannel33 +label Label_F41E UpdateMusicChannel34 +label Label_F44B UpdateMusicChannel35 +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 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 Zp37 TempReg51 +zp Zp38 TempReg51 +zp Zp3A TempReg52 +zp Zp3B TempReg53 +zp Zp3C TempReg54 +zp Zp3D TempReg55 +zp Zp3E TempReg56 +zp Zp3F TempReg58 +zp Zp40 TempReg59 +zp Zp41 TempReg60 +zp Zp42 TempReg61 +zp Zp42 TempReg62 +zp Zp43 TempReg63 +zp Zp44 TempReg64 +zp Zp45 TempReg65 +zp Zp46 TempReg66 +zp Zp47 TempReg67 +zp Zp48 TempReg68 +zp Zp49 TempReg69 +zp Zp4A TempReg70 +zp Zp4B TempReg71 +zp Zp4C TempReg72 +zp Zp4D TempReg73 +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 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 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 Zp8A TempReg130 +zp Zp8B TempReg131 +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 TempReg142 +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 ZpA3 TempReg157 +zp ZpA4 TempReg158 +zp ZpA5 TempReg159 +zp ZpA6 TempReg160 +zp ZpA7 TempReg161 +zp ZpA8 TempReg162 +zp ZpA9 TempReg163 +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 TempReg195 +zp ZpCB TempReg196 +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 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 TempReg233 \ No newline at end of file diff --git a/_wip/Donkey Kong Jr. Math (U)/copilot/prg.s b/_wip/Donkey Kong Jr. Math (U)/copilot/prg.s index 2bdd057..2602eef 100644 --- a/_wip/Donkey Kong Jr. Math (U)/copilot/prg.s +++ b/_wip/Donkey Kong Jr. Math (U)/copilot/prg.s @@ -9,6 +9,8 @@ ; PRG mapped at $C000-$FFFF (NROM, mirrored to the upper half) ; ; Pass 1 trace provenance (the audit trail behind every classification below): +; entries seeded by hand after inspecting code-shaped but unreferenced blocks: +; $C41E, $C4A9, $FFF0 ; indirect dispatch through zero page (not followed statically): ; jmp ($0002) at $F176 ; @@ -110,7 +112,7 @@ Reset: ldx #$FF ; CPU:$C425 PRG:0425 A2 FF txs ; CPU:$C427 PRG:0427 9A ; ----------------------------------------------------------------------------- -; Routine: Label_C428 +; Routine: WaitVBlank_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. @@ -118,17 +120,17 @@ Reset: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C428: +WaitVBlank_1: lda $2002 ; CPU:$C428 PRG:0428 AD 02 20 and #$80 ; CPU:$C42B PRG:042B 29 80 - beq Label_C428 ; CPU:$C42D PRG:042D F0 F9 + beq WaitVBlank_1 ; CPU:$C42D PRG:042D F0 F9 ldy #$07 ; CPU:$C42F PRG:042F A0 07 sty Zp01 ; CPU:$C431 PRG:0431 84 01 ldy #$00 ; CPU:$C433 PRG:0433 A0 00 sty Zp00 ; CPU:$C435 PRG:0435 84 00 lda #$00 ; CPU:$C437 PRG:0437 A9 00 ; ----------------------------------------------------------------------------- -; Routine: Label_C439 +; Routine: ClearZeropage_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. @@ -136,12 +138,12 @@ Label_C428: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C439: +ClearZeropage_1: sta (Zp00),y ; CPU:$C439 PRG:0439 91 00 dey ; CPU:$C43B PRG:043B 88 - bne Label_C439 ; CPU:$C43C PRG:043C D0 FB + bne ClearZeropage_1 ; CPU:$C43C PRG:043C D0 FB dec Zp01 ; CPU:$C43E PRG:043E C6 01 - bpl Label_C439 ; CPU:$C440 PRG:0440 10 F7 + bpl ClearZeropage_1 ; CPU:$C440 PRG:0440 10 F7 jsr $C47B ; CPU:$C442 PRG:0442 20 7B C4 lda #$97 ; CPU:$C445 PRG:0445 A9 97 sta ZpED ; CPU:$C447 PRG:0447 85 ED @@ -175,7 +177,7 @@ Label_C460: eor #$80 ; CPU:$C470 PRG:0470 49 80 jsr $C553 ; CPU:$C472 PRG:0472 20 53 C5 ; ----------------------------------------------------------------------------- -; Routine: Label_C475 +; Routine: MainGameLoop ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -183,11 +185,11 @@ Label_C460: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C475: +MainGameLoop: jsr $F4D2 ; CPU:$C475 PRG:0475 20 D2 F4 jmp $C475 ; CPU:$C478 PRG:0478 4C 75 C4 ; ----------------------------------------------------------------------------- -; Routine: Label_C47B +; Routine: InitPPU_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. @@ -195,7 +197,7 @@ Label_C475: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C47B: +InitPPU_1: lda #$10 ; CPU:$C47B PRG:047B A9 10 jsr $C553 ; CPU:$C47D PRG:047D 20 53 C5 lda #$06 ; CPU:$C480 PRG:0480 A9 06 @@ -204,7 +206,7 @@ Label_C47B: lda #$FF ; CPU:$C488 PRG:0488 A9 FF ldy #$00 ; CPU:$C48A PRG:048A A0 00 ; ----------------------------------------------------------------------------- -; Routine: Label_C48C +; Routine: InitSprites_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. @@ -212,13 +214,13 @@ Label_C47B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C48C: +InitSprites_1: sta $0200,y ; CPU:$C48C PRG:048C 99 00 02 dey ; CPU:$C48F PRG:048F 88 - beq Label_C495 ; CPU:$C490 PRG:0490 F0 03 + beq ClearSpriteRAM ; CPU:$C490 PRG:0490 F0 03 jmp $C48C ; CPU:$C492 PRG:0492 4C 8C C4 ; ----------------------------------------------------------------------------- -; Routine: Label_C495 +; Routine: ClearSpriteRAM ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -226,7 +228,7 @@ Label_C48C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C495: +ClearSpriteRAM: lda #$00 ; CPU:$C495 PRG:0495 A9 00 sta $4011 ; CPU:$C497 PRG:0497 8D 11 40 jsr $C6F9 ; CPU:$C49A PRG:049A 20 F9 C6 @@ -357,7 +359,7 @@ Label_C535: Label_C53E: jsr $C656 ; CPU:$C53E PRG:053E 20 56 C6 ; ----------------------------------------------------------------------------- -; Routine: Label_C541 +; Routine: InitAPU ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -365,7 +367,7 @@ Label_C53E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C541: +InitAPU: jsr $F135 ; CPU:$C541 PRG:0541 20 35 F1 lda $2002 ; CPU:$C544 PRG:0544 AD 02 20 lda Zp10 ; CPU:$C547 PRG:0547 A5 10 @@ -376,7 +378,7 @@ Label_C541: pla ; CPU:$C551 PRG:0551 68 rti ; CPU:$C552 PRG:0552 40 ; ----------------------------------------------------------------------------- -; Routine: Label_C553 +; Routine: InitPPU_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. @@ -384,7 +386,7 @@ Label_C541: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C553: +InitPPU_3: sta $2000 ; CPU:$C553 PRG:0553 8D 00 20 sta Zp10 ; CPU:$C556 PRG:0556 85 10 rts ; CPU:$C558 PRG:0558 60 @@ -465,7 +467,7 @@ Label_C5A3: bne Label_C5C3 ; CPU:$C5A7 PRG:05A7 D0 1A lda Zp15 ; CPU:$C5A9 PRG:05A9 A5 15 and #$10 ; CPU:$C5AB PRG:05AB 29 10 - bne Label_C5E4 ; CPU:$C5AD PRG:05AD D0 35 + bne UpdateSprites ; CPU:$C5AD PRG:05AD D0 35 lda #$00 ; CPU:$C5AF PRG:05AF A9 00 sta Zp94 ; CPU:$C5B1 PRG:05B1 85 94 lda Zp3C ; CPU:$C5B3 PRG:05B3 A5 3C @@ -534,7 +536,7 @@ Label_C5D7: Label_C5E3: rts ; CPU:$C5E3 PRG:05E3 60 ; ----------------------------------------------------------------------------- -; Routine: Label_C5E4 +; Routine: UpdateSprites ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -542,7 +544,7 @@ Label_C5E3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C5E4: +UpdateSprites: sta $0418 ; CPU:$C5E4 PRG:05E4 8D 18 04 ldx #$0F ; CPU:$C5E7 PRG:05E7 A2 0F lda #$00 ; CPU:$C5E9 PRG:05E9 A9 00 @@ -568,13 +570,13 @@ Label_C5EB: sbc #$09 ; CPU:$C5F7 PRG:05F7 E9 09 sta ZpEF ; CPU:$C5F9 PRG:05F9 85 EF cmp #$02 ; CPU:$C5FB PRG:05FB C9 02 - bne Label_C609 ; CPU:$C5FD PRG:05FD D0 0A + bne UpdateSprites2_1 ; CPU:$C5FD PRG:05FD D0 0A lda #$01 ; CPU:$C5FF PRG:05FF A9 01 sta $041F ; CPU:$C601 PRG:0601 8D 1F 04 lda #$02 ; CPU:$C604 PRG:0604 A9 02 sta $0403 ; CPU:$C606 PRG:0606 8D 03 04 ; ----------------------------------------------------------------------------- -; Routine: Label_C609 +; Routine: UpdateSprites2_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. @@ -582,7 +584,7 @@ Label_C5EB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C609: +UpdateSprites2_1: jsr $E2CC ; CPU:$C609 PRG:0609 20 CC E2 lda #$0F ; CPU:$C60C PRG:060C A9 0F sta Zp18 ; CPU:$C60E PRG:060E 85 18 @@ -649,7 +651,7 @@ Label_C64C: sta Zp39 ; CPU:$C651 PRG:0651 85 39 jmp $C6EC ; CPU:$C653 PRG:0653 4C EC C6 ; ----------------------------------------------------------------------------- -; Routine: Label_C656 +; Routine: UpdateSprites3_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. @@ -657,7 +659,7 @@ Label_C64C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C656: +UpdateSprites3_1: jsr $F48D ; CPU:$C656 PRG:0656 20 8D F4 lda Zp39 ; CPU:$C659 PRG:0659 A5 39 cmp #$84 ; CPU:$C65B PRG:065B C9 84 @@ -840,7 +842,7 @@ Label_C6CE: cmp #$02 ; CPU:$C6D3 PRG:06D3 C9 02 bpl Label_C6E2 ; CPU:$C6D5 PRG:06D5 10 0B ; ----------------------------------------------------------------------------- -; Routine: Label_C6D7 +; Routine: UpdateSprites4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -848,7 +850,7 @@ Label_C6CE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C6D7: +UpdateSprites4: dec Zp39 ; CPU:$C6D7 PRG:06D7 C6 39 lda Zp4C ; CPU:$C6D9 PRG:06D9 A5 4C beq Label_C6E1 ; CPU:$C6DB PRG:06DB F0 04 @@ -890,7 +892,7 @@ Label_C6E2: jsr $E259 ; CPU:$C6E6 PRG:06E6 20 59 E2 jmp $C6D7 ; CPU:$C6E9 PRG:06E9 4C D7 C6 ; ----------------------------------------------------------------------------- -; Routine: Label_C6EC +; Routine: ClearZeropage_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. @@ -898,7 +900,7 @@ Label_C6E2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C6EC: +ClearZeropage_3: lda #$00 ; CPU:$C6EC PRG:06EC A9 00 sta Zp04 ; CPU:$C6EE PRG:06EE 85 04 lda #$FF ; CPU:$C6F0 PRG:06F0 A9 FF @@ -906,7 +908,7 @@ Label_C6EC: lda #$0F ; CPU:$C6F4 PRG:06F4 A9 0F jmp $D6D2 ; CPU:$C6F6 PRG:06F6 4C D2 D6 ; ----------------------------------------------------------------------------- -; Routine: Label_C6F9 +; Routine: InitSpriteData ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -914,7 +916,7 @@ Label_C6EC: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C6F9: +InitSpriteData: lda #$24 ; CPU:$C6F9 PRG:06F9 A9 24 sta Zp00 ; CPU:$C6FB PRG:06FB 85 00 lda #$01 ; CPU:$C6FD PRG:06FD A9 01 @@ -922,7 +924,7 @@ Label_C6F9: jsr $C71F ; CPU:$C701 PRG:0701 20 1F C7 jmp $F197 ; CPU:$C704 PRG:0704 4C 97 F1 ; ----------------------------------------------------------------------------- -; Routine: Label_C707 +; Routine: UpdateSprites2_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. @@ -930,7 +932,7 @@ Label_C6F9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C707: +UpdateSprites2_3: jsr $C71F ; CPU:$C707 PRG:0707 20 1F C7 ldy Zp4A ; CPU:$C70A PRG:070A A4 4A dey ; CPU:$C70C PRG:070C 88 @@ -944,7 +946,7 @@ Label_C707: sta Zp01 ; CPU:$C71A PRG:071A 85 01 jmp $F218 ; CPU:$C71C PRG:071C 4C 18 F2 ; ----------------------------------------------------------------------------- -; Routine: Label_C71F +; Routine: UpdateSprites2_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. @@ -952,11 +954,11 @@ Label_C707: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C71F: +UpdateSprites2_4: lda Zp11 ; CPU:$C71F PRG:071F A5 11 and #$E7 ; CPU:$C721 PRG:0721 29 E7 ; ----------------------------------------------------------------------------- -; Routine: Label_C723 +; Routine: UpdatePPUMask ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -964,12 +966,12 @@ Label_C71F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C723: +UpdatePPUMask: sta $2001 ; CPU:$C723 PRG:0723 8D 01 20 sta Zp11 ; CPU:$C726 PRG:0726 85 11 rts ; CPU:$C728 PRG:0728 60 ; ----------------------------------------------------------------------------- -; Routine: Label_C729 +; Routine: InitSprites_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. @@ -977,7 +979,7 @@ Label_C723: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C729: +InitSprites_3: lda #$00 ; CPU:$C729 PRG:0729 A9 00 ldy #$53 ; CPU:$C72B PRG:072B A0 53 ; ----------------------------------------------------------------------------- @@ -1049,7 +1051,7 @@ Label_C72D: Label_C794: jmp $C797 ; CPU:$C794 PRG:0794 4C 97 C7 ; ----------------------------------------------------------------------------- -; Routine: Label_C797 +; Routine: InitLevel ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1057,11 +1059,11 @@ Label_C794: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C797: +InitLevel: lda #$FF ; CPU:$C797 PRG:0797 A9 FF sta Zp79 ; CPU:$C799 PRG:0799 85 79 ; ----------------------------------------------------------------------------- -; Routine: Label_C79B +; Routine: InitLevel2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1069,7 +1071,7 @@ Label_C797: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C79B: +InitLevel2: lda #$08 ; CPU:$C79B PRG:079B A9 08 sta Zp3C ; CPU:$C79D PRG:079D 85 3C jsr $E72C ; CPU:$C79F PRG:079F 20 2C E7 @@ -1095,11 +1097,11 @@ Label_C7B5: sta ZpFC ; CPU:$C7B7 PRG:07B7 85 FC lda Zp4A ; CPU:$C7B9 PRG:07B9 A5 4A cmp #$01 ; CPU:$C7BB PRG:07BB C9 01 - bne Label_C7C3 ; CPU:$C7BD PRG:07BD D0 04 + bne UpdateGameState ; CPU:$C7BD PRG:07BD D0 04 lda #$10 ; CPU:$C7BF PRG:07BF A9 10 sta ZpFC ; CPU:$C7C1 PRG:07C1 85 FC ; ----------------------------------------------------------------------------- -; Routine: Label_C7C3 +; Routine: UpdateGameState ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1107,7 +1109,7 @@ Label_C7B5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C7C3: +UpdateGameState: lda $0416 ; CPU:$C7C3 PRG:07C3 AD 16 04 bne Label_C7CF ; CPU:$C7C6 PRG:07C6 D0 07 lda $0402 ; CPU:$C7C8 PRG:07C8 AD 02 04 @@ -1150,7 +1152,7 @@ Label_C7DC: sta ZpDA ; CPU:$C7EE PRG:07EE 85 DA rts ; CPU:$C7F0 PRG:07F0 60 ; ----------------------------------------------------------------------------- -; Routine: Label_C7F1 +; Routine: CheckLevelComplete ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1158,10 +1160,10 @@ Label_C7DC: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C7F1: +CheckLevelComplete: ldx #$00 ; CPU:$C7F1 PRG:07F1 A2 00 ; ----------------------------------------------------------------------------- -; Routine: Label_C7F3 +; Routine: CheckLevelComplete2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1169,7 +1171,7 @@ Label_C7F1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C7F3: +CheckLevelComplete2: lda $C179,x ; CPU:$C7F3 PRG:07F3 BD 79 C1 cmp #$FF ; CPU:$C7F6 PRG:07F6 C9 FF beq Label_C80F ; CPU:$C7F8 PRG:07F8 F0 15 @@ -1195,10 +1197,10 @@ Label_C7F3: Label_C80F: inx ; CPU:$C80F PRG:080F E8 dey ; CPU:$C810 PRG:0810 88 - bne Label_C7F3 ; CPU:$C811 PRG:0811 D0 E0 + bne CheckLevelComplete2 ; CPU:$C811 PRG:0811 D0 E0 rts ; CPU:$C813 PRG:0813 60 ; ----------------------------------------------------------------------------- -; Routine: Label_C814 +; Routine: UpdatePlayerPosition_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. @@ -1206,7 +1208,7 @@ Label_C80F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C814: +UpdatePlayerPosition_1: lda $C173,y ; CPU:$C814 PRG:0814 B9 73 C1 sta Zp00 ; CPU:$C817 PRG:0817 85 00 lda $C174,y ; CPU:$C819 PRG:0819 B9 74 C1 @@ -1238,7 +1240,7 @@ Label_C833: txa ; CPU:$C83C PRG:083C 8A beq Label_C861 ; CPU:$C83D PRG:083D F0 22 ; ----------------------------------------------------------------------------- -; Routine: Label_C83F +; Routine: UpdateSpritePosition ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its 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 +1248,7 @@ Label_C833: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C83F: +UpdateSpritePosition: lda #$D8 ; CPU:$C83F PRG:083F A9 D8 sta Zp00 ; CPU:$C841 PRG:0841 85 00 lda #$BF ; CPU:$C843 PRG:0843 A9 BF @@ -1287,7 +1289,7 @@ Label_C861: sta ZpDD,x ; CPU:$C863 PRG:0863 95 DD rts ; CPU:$C865 PRG:0865 60 ; ----------------------------------------------------------------------------- -; Routine: Label_C866 +; Routine: CheckController ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1295,7 +1297,7 @@ Label_C861: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C866: +CheckController: lda Zp4C ; CPU:$C866 PRG:0866 A5 4C beq Label_C872 ; CPU:$C868 PRG:0868 F0 08 lda $06A2 ; CPU:$C86A PRG:086A AD A2 06 @@ -1326,7 +1328,7 @@ Label_C872: ; ----------------------------------------------------------------------------- Label_C87B: lda ZpEB ; CPU:$C87B PRG:087B A5 EB - bne Label_C8DB ; CPU:$C87D PRG:087D D0 5C + bne UpdateGameState3_1 ; CPU:$C87D PRG:087D D0 5C lda ZpEE ; CPU:$C87F PRG:087F A5 EE beq Label_C889 ; CPU:$C881 PRG:0881 F0 06 txa ; CPU:$C883 PRG:0883 8A @@ -1383,7 +1385,7 @@ Label_C8A3: lda #$00 ; CPU:$C8AD PRG:08AD A9 00 sta Zp51 ; CPU:$C8AF PRG:08AF 85 51 sta Zp52 ; CPU:$C8B1 PRG:08B1 85 52 - beq Label_C8BB ; CPU:$C8B3 PRG:08B3 F0 06 + beq UpdateGameState2_1 ; CPU:$C8B3 PRG:08B3 F0 06 ; ----------------------------------------------------------------------------- ; Routine: Label_C8B5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -1407,7 +1409,7 @@ Label_C8B5: Label_C8B8: jsr $E1D7 ; CPU:$C8B8 PRG:08B8 20 D7 E1 ; ----------------------------------------------------------------------------- -; Routine: Label_C8BB +; Routine: UpdateGameState2_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. @@ -1415,7 +1417,7 @@ Label_C8B8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C8BB: +UpdateGameState2_1: jsr $CA86 ; CPU:$C8BB PRG:08BB 20 86 CA jsr $CBD7 ; CPU:$C8BE PRG:08BE 20 D7 CB jsr $CC9E ; CPU:$C8C1 PRG:08C1 20 9E CC @@ -1451,7 +1453,7 @@ Label_C8C7: Label_C8D8: jsr $CAF7 ; CPU:$C8D8 PRG:08D8 20 F7 CA ; ----------------------------------------------------------------------------- -; Routine: Label_C8DB +; Routine: UpdateGameState3_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. @@ -1459,7 +1461,7 @@ Label_C8D8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C8DB: +UpdateGameState3_1: txa ; CPU:$C8DB PRG:08DB 8A bne Label_C8E1 ; CPU:$C8DC PRG:08DC D0 03 jsr $C995 ; CPU:$C8DE PRG:08DE 20 95 C9 @@ -1475,7 +1477,7 @@ Label_C8DB: Label_C8E1: rts ; CPU:$C8E1 PRG:08E1 60 ; ----------------------------------------------------------------------------- -; Routine: Label_C8E2 +; Routine: CheckGameState2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1483,7 +1485,7 @@ Label_C8E1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C8E2: +CheckGameState2: lda Zp49 ; CPU:$C8E2 PRG:08E2 A5 49 bne Label_C8E1 ; CPU:$C8E4 PRG:08E4 D0 FB lda Zp10 ; CPU:$C8E6 PRG:08E6 A5 10 @@ -1506,7 +1508,7 @@ Label_C8E2: jsr $C6F9 ; CPU:$C90B PRG:090B 20 F9 C6 jmp $C6EC ; CPU:$C90E PRG:090E 4C EC C6 ; ----------------------------------------------------------------------------- -; Routine: Label_C911 +; Routine: CheckButtonPress ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1514,7 +1516,7 @@ Label_C8E2: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C911: +CheckButtonPress: lda Zp15 ; CPU:$C911 PRG:0911 A5 15 and #$20 ; CPU:$C913 PRG:0913 29 20 beq Label_C926 ; CPU:$C915 PRG:0915 F0 0F @@ -1855,7 +1857,7 @@ Label_CA10: Label_CA36: rts ; CPU:$CA36 PRG:0A36 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CA37 +; Routine: CheckAnswer ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1863,7 +1865,7 @@ Label_CA36: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CA37: +CheckAnswer: ldy #$00 ; CPU:$CA37 PRG:0A37 A0 00 txa ; CPU:$CA39 PRG:0A39 8A bne Label_CA41 ; CPU:$CA3A PRG:0A3A D0 05 @@ -1881,7 +1883,7 @@ Label_CA37: Label_CA41: lda Zp17 ; CPU:$CA41 PRG:0A41 A5 17 ; ----------------------------------------------------------------------------- -; Routine: Label_CA43 +; Routine: CheckAnswer2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1889,7 +1891,7 @@ Label_CA41: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CA43: +CheckAnswer2: and #$0F ; CPU:$CA43 PRG:0A43 29 0F beq Label_CA5B ; CPU:$CA45 PRG:0A45 F0 14 cmp #$08 ; CPU:$CA47 PRG:0A47 C9 08 @@ -1981,7 +1983,7 @@ Label_CA6D: Label_CA7B: lda Zp17 ; CPU:$CA7B PRG:0A7B A5 17 ; ----------------------------------------------------------------------------- -; Routine: Label_CA7D +; Routine: CheckAnswer3_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. @@ -1989,7 +1991,7 @@ Label_CA7B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CA7D: +CheckAnswer3_1: and #$80 ; CPU:$CA7D PRG:0A7D 29 80 beq Label_CA85 ; CPU:$CA7F PRG:0A7F F0 04 lda #$03 ; CPU:$CA81 PRG:0A81 A9 03 @@ -2006,7 +2008,7 @@ Label_CA7D: Label_CA85: rts ; CPU:$CA85 PRG:0A85 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CA86 +; Routine: UpdateScore_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. @@ -2014,7 +2016,7 @@ Label_CA85: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CA86: +UpdateScore_3: lda Zp5B,x ; CPU:$CA86 PRG:0A86 B5 5B beq Label_CA98 ; CPU:$CA88 PRG:0A88 F0 0E jsr $D6BA ; CPU:$CA8A PRG:0A8A 20 BA D6 @@ -2035,7 +2037,7 @@ Label_CA86: Label_CA98: rts ; CPU:$CA98 PRG:0A98 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CA99 +; Routine: UpdateScore2_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. @@ -2043,7 +2045,7 @@ Label_CA98: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CA99: +UpdateScore2_1: lda Zp4A ; CPU:$CA99 PRG:0A99 A5 4A cmp #$03 ; CPU:$CA9B PRG:0A9B C9 03 beq Label_CAC7 ; CPU:$CA9D PRG:0A9D F0 28 @@ -2138,7 +2140,7 @@ Label_CAEE: tax ; CPU:$CAF5 PRG:0AF5 AA rts ; CPU:$CAF6 PRG:0AF6 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CAF7 +; Routine: UpdateScore3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2146,7 +2148,7 @@ Label_CAEE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CAF7: +UpdateScore3: lda #$00 ; CPU:$CAF7 PRG:0AF7 A9 00 sta ZpFC ; CPU:$CAF9 PRG:0AF9 85 FC lda Zp57,x ; CPU:$CAFB PRG:0AFB B5 57 @@ -2192,7 +2194,7 @@ Label_CB14: dec Zp57,x ; CPU:$CB14 PRG:0B14 D6 57 rts ; CPU:$CB16 PRG:0B16 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CB17 +; Routine: UpdateGameState2_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. @@ -2200,7 +2202,7 @@ Label_CB14: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CB17: +UpdateGameState2_3: lda #$03 ; CPU:$CB17 PRG:0B17 A9 03 ldy ZpEC ; CPU:$CB19 PRG:0B19 A4 EC cpy #$08 ; CPU:$CB1B PRG:0B1B C0 08 @@ -2220,7 +2222,7 @@ Label_CB21: dec Zp59,x ; CPU:$CB23 PRG:0B23 D6 59 rts ; CPU:$CB25 PRG:0B25 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CB26 +; Routine: CheckAnswer3_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. @@ -2228,7 +2230,7 @@ Label_CB21: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CB26: +CheckAnswer3_3: lda Zp4A ; CPU:$CB26 PRG:0B26 A5 4A cmp #$01 ; CPU:$CB28 PRG:0B28 C9 01 bne Label_CB3E ; CPU:$CB2A PRG:0B2A D0 12 @@ -2254,7 +2256,7 @@ Label_CB3E: cmp #$08 ; CPU:$CB40 PRG:0B40 C9 08 bne Label_CB6D ; CPU:$CB42 PRG:0B42 D0 29 ; ----------------------------------------------------------------------------- -; Routine: Label_CB44 +; Routine: UpdateGameState3_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. @@ -2262,7 +2264,7 @@ Label_CB3E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CB44: +UpdateGameState3_3: jsr $E387 ; CPU:$CB44 PRG:0B44 20 87 E3 lda $0402 ; CPU:$CB47 PRG:0B47 AD 02 04 cmp #$0A ; CPU:$CB4A PRG:0B4A C9 0A @@ -2305,7 +2307,7 @@ Label_CB6D: sta ZpEC ; CPU:$CB6F PRG:0B6F 85 EC sta ZpDB ; CPU:$CB71 PRG:0B71 85 DB ; ----------------------------------------------------------------------------- -; Routine: Label_CB73 +; Routine: UpdatePlayerScore ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2313,7 +2315,7 @@ Label_CB6D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CB73: +UpdatePlayerScore: ldy #$04 ; CPU:$CB73 PRG:0B73 A0 04 ldx #$00 ; CPU:$CB75 PRG:0B75 A2 00 jsr $C814 ; CPU:$CB77 PRG:0B77 20 14 C8 @@ -2325,7 +2327,7 @@ Label_CB73: sta Zp5F ; CPU:$CB85 PRG:0B85 85 5F ldy #$02 ; CPU:$CB87 PRG:0B87 A0 02 ; ----------------------------------------------------------------------------- -; Routine: Label_CB89 +; Routine: CheckAnswer4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2333,7 +2335,7 @@ Label_CB73: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CB89: +CheckAnswer4: sty ZpFC ; CPU:$CB89 PRG:0B89 84 FC lda #$32 ; CPU:$CB8B PRG:0B8B A9 32 sta Zp57,x ; CPU:$CB8D PRG:0B8D 95 57 @@ -2341,7 +2343,7 @@ Label_CB89: sta Zp59,x ; CPU:$CB91 PRG:0B91 95 59 rts ; CPU:$CB93 PRG:0B93 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CB94 +; Routine: UpdateGameState4_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. @@ -2349,7 +2351,7 @@ Label_CB89: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CB94: +UpdateGameState4_3: lda Zp4A ; CPU:$CB94 PRG:0B94 A5 4A cmp #$01 ; CPU:$CB96 PRG:0B96 C9 01 beq Label_CB9F ; CPU:$CB98 PRG:0B98 F0 05 @@ -2378,7 +2380,7 @@ Label_CB9F: ldx #$01 ; CPU:$CBB6 PRG:0BB6 A2 01 jsr $E1C1 ; CPU:$CBB8 PRG:0BB8 20 C1 E1 lda Zp4C ; CPU:$CBBB PRG:0BBB A5 4C - beq Label_CBCC ; CPU:$CBBD PRG:0BBD F0 0D + beq UpdateGameState5 ; CPU:$CBBD PRG:0BBD F0 0D lda #$90 ; CPU:$CBBF PRG:0BBF A9 90 bne Label_CBCE ; CPU:$CBC1 PRG:0BC1 D0 0B ; ----------------------------------------------------------------------------- @@ -2406,7 +2408,7 @@ Label_CBC3: Label_CBCA: inc Zp4A ; CPU:$CBCA PRG:0BCA E6 4A ; ----------------------------------------------------------------------------- -; Routine: Label_CBCC +; Routine: UpdateGameState5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2414,7 +2416,7 @@ Label_CBCA: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CBCC: +UpdateGameState5: lda #$7A ; CPU:$CBCC PRG:0BCC A9 7A ; ----------------------------------------------------------------------------- ; Routine: Label_CBCE @@ -2432,7 +2434,7 @@ Label_CBCE: sta Zp4B ; CPU:$CBD4 PRG:0BD4 85 4B rts ; CPU:$CBD6 PRG:0BD6 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CBD7 +; Routine: UpdatePlayerPosition_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. @@ -2440,7 +2442,7 @@ Label_CBCE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CBD7: +UpdatePlayerPosition_3: lda Zp5F,x ; CPU:$CBD7 PRG:0BD7 B5 5F cmp Zp61,x ; CPU:$CBD9 PRG:0BD9 D5 61 bne Label_CBDE ; CPU:$CBDB PRG:0BDB D0 01 @@ -2469,7 +2471,7 @@ Label_CBDE: beq Label_CC2C ; CPU:$CBF4 PRG:0BF4 F0 36 lda Zp61,x ; CPU:$CBF6 PRG:0BF6 B5 61 cmp #$04 ; CPU:$CBF8 PRG:0BF8 C9 04 - bne Label_CC42 ; CPU:$CBFA PRG:0BFA D0 46 + bne UpdateGameState7 ; CPU:$CBFA PRG:0BFA D0 46 jsr $D242 ; CPU:$CBFC PRG:0BFC 20 42 D2 jmp $CC3E ; CPU:$CBFF PRG:0BFF 4C 3E CC ; ----------------------------------------------------------------------------- @@ -2488,7 +2490,7 @@ Label_CC02: sta Zp69,x ; CPU:$CC08 PRG:0C08 95 69 sta Zp67,x ; CPU:$CC0A PRG:0C0A 95 67 sta Zp39,x ; CPU:$CC0C PRG:0C0C 95 39 - beq Label_CC42 ; CPU:$CC0E PRG:0C0E F0 32 + beq UpdateGameState7 ; CPU:$CC0E PRG:0C0E F0 32 ; ----------------------------------------------------------------------------- ; Routine: Label_CC10 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -2548,9 +2550,9 @@ Label_CC2C: sta Zp09 ; CPU:$CC36 PRG:0C36 85 09 lda #$00 ; CPU:$CC38 PRG:0C38 A9 00 sta Zp6B,x ; CPU:$CC3A PRG:0C3A 95 6B - beq Label_CC42 ; CPU:$CC3C PRG:0C3C F0 04 + beq UpdateGameState7 ; CPU:$CC3C PRG:0C3C F0 04 ; ----------------------------------------------------------------------------- -; Routine: Label_CC3E +; Routine: UpdateGameState6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2558,11 +2560,11 @@ Label_CC2C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CC3E: +UpdateGameState6: lda #$01 ; CPU:$CC3E PRG:0C3E A9 01 sta ZpFF ; CPU:$CC40 PRG:0C40 85 FF ; ----------------------------------------------------------------------------- -; Routine: Label_CC42 +; Routine: UpdateGameState7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2570,12 +2572,12 @@ Label_CC3E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CC42: +UpdateGameState7: lda Zp5F,x ; CPU:$CC42 PRG:0C42 B5 5F sta Zp61,x ; CPU:$CC44 PRG:0C44 95 61 rts ; CPU:$CC46 PRG:0C46 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CC47 +; Routine: InitGame_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. @@ -2583,7 +2585,7 @@ Label_CC42: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CC47: +InitGame_3: txa ; CPU:$CC47 PRG:0C47 8A asl a ; CPU:$CC48 PRG:0C48 0A tay ; CPU:$CC49 PRG:0C49 A8 @@ -2596,7 +2598,7 @@ Label_CC47: sta Zp71,x ; CPU:$CC59 PRG:0C59 95 71 rts ; CPU:$CC5B PRG:0C5B 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CC5C +; Routine: UpdateGameState8 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2604,7 +2606,7 @@ Label_CC47: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CC5C: +UpdateGameState8: tya ; CPU:$CC5C PRG:0C5C 98 pha ; CPU:$CC5D PRG:0C5D 48 jsr $CC75 ; CPU:$CC5E PRG:0C5E 20 75 CC @@ -2708,14 +2710,14 @@ Label_CC9E: jsr $CC5C ; CPU:$CCA3 PRG:0CA3 20 5C CC lda Zp5F,x ; CPU:$CCA6 PRG:0CA6 B5 5F cmp #$01 ; CPU:$CCA8 PRG:0CA8 C9 01 - beq Label_CCB7 ; CPU:$CCAA PRG:0CAA F0 0B + beq UpdateGameState10 ; CPU:$CCAA PRG:0CAA F0 0B cmp #$02 ; CPU:$CCAC PRG:0CAC C9 02 beq Label_CCBD ; CPU:$CCAE PRG:0CAE F0 0D cmp #$03 ; CPU:$CCB0 PRG:0CB0 C9 03 beq Label_CCC3 ; CPU:$CCB2 PRG:0CB2 F0 0F jmp $CE3D ; CPU:$CCB4 PRG:0CB4 4C 3D CE ; ----------------------------------------------------------------------------- -; Routine: Label_CCB7 +; Routine: UpdateGameState10 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2723,7 +2725,7 @@ Label_CC9E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CCB7: +UpdateGameState10: jsr $CCC7 ; CPU:$CCB7 PRG:0CB7 20 C7 CC jmp $CCC6 ; CPU:$CCBA PRG:0CBA 4C C6 CC ; ----------------------------------------------------------------------------- @@ -2771,14 +2773,14 @@ Label_CCC6: ; ----------------------------------------------------------------------------- Label_CCC7: jsr $D556 ; CPU:$CCC7 PRG:0CC7 20 56 D5 - bne Label_CCD6 ; CPU:$CCCA PRG:0CCA D0 0A + bne UpdateGameState12 ; CPU:$CCCA PRG:0CCA D0 0A jsr $D562 ; CPU:$CCCC PRG:0CCC 20 62 D5 bne Label_CCD9 ; CPU:$CCCF PRG:0CCF D0 08 lda #$04 ; CPU:$CCD1 PRG:0CD1 A9 04 sta Zp5F,x ; CPU:$CCD3 PRG:0CD3 95 5F rts ; CPU:$CCD5 PRG:0CD5 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CCD6 +; Routine: UpdateGameState12 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2786,7 +2788,7 @@ Label_CCC7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CCD6: +UpdateGameState12: jmp $CE1E ; CPU:$CCD6 PRG:0CD6 4C 1E CE ; ----------------------------------------------------------------------------- ; Routine: Label_CCD9 @@ -4448,13 +4450,13 @@ Label_D164: pha ; CPU:$D165 PRG:1165 48 jsr $D6BA ; CPU:$D166 PRG:1166 20 BA D6 ldy Zp63,x ; CPU:$D169 PRG:1169 B4 63 - beq Label_D175 ; CPU:$D16B PRG:116B F0 08 + beq UpdateSpritePosition26 ; CPU:$D16B PRG:116B F0 08 sec ; CPU:$D16D PRG:116D 38 sbc #$0C ; CPU:$D16E PRG:116E E9 0C sta Zp00 ; CPU:$D170 PRG:1170 85 00 jmp $D17A ; CPU:$D172 PRG:1172 4C 7A D1 ; ----------------------------------------------------------------------------- -; Routine: Label_D175 +; Routine: UpdateSpritePosition26 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its 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,7 +4464,7 @@ Label_D164: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D175: +UpdateSpritePosition26: clc ; CPU:$D175 PRG:1175 18 adc #$0C ; CPU:$D176 PRG:1176 69 0C sta Zp00 ; CPU:$D178 PRG:1178 85 00 @@ -7806,7 +7808,7 @@ Label_DBF5: Label_DC0C: rts ; CPU:$DC0C PRG:1C0C 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DC0D +; Routine: UpdateSpritePosition61 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -7814,7 +7816,7 @@ Label_DC0C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DC0D: +UpdateSpritePosition61: lda $C251,x ; CPU:$DC0D PRG:1C0D BD 51 C2 sta Zp00 ; CPU:$DC10 PRG:1C10 85 00 lda #$20 ; CPU:$DC12 PRG:1C12 A9 20 @@ -8017,11 +8019,11 @@ Label_DCD1: cmp #$02 ; CPU:$DCD5 PRG:1CD5 C9 02 beq Label_DCFE ; CPU:$DCD7 PRG:1CD7 F0 25 jsr $DD4E ; CPU:$DCD9 PRG:1CD9 20 4E DD - beq Label_DCE3 ; CPU:$DCDC PRG:1CDC F0 05 + beq UpdateSpritePosition66 ; CPU:$DCDC PRG:1CDC F0 05 lda #$00 ; CPU:$DCDE PRG:1CDE A9 00 sta $0412 ; CPU:$DCE0 PRG:1CE0 8D 12 04 ; ----------------------------------------------------------------------------- -; Routine: Label_DCE3 +; Routine: UpdateSpritePosition66 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8029,7 +8031,7 @@ Label_DCD1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DCE3: +UpdateSpritePosition66: rts ; CPU:$DCE3 PRG:1CE3 60 ; ----------------------------------------------------------------------------- ; Routine: Label_DCE4 @@ -8489,7 +8491,7 @@ Label_DE3D: stx $0517 ; CPU:$DE5D PRG:1E5D 8E 17 05 stx $0518 ; CPU:$DE60 PRG:1E60 8E 18 05 ; ----------------------------------------------------------------------------- -; Routine: Label_DE63 +; Routine: UpdateSpritePosition82 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8497,7 +8499,7 @@ Label_DE3D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DE63: +UpdateSpritePosition82: lda Zp00,x ; CPU:$DE63 PRG:1E63 B5 00 and #$03 ; CPU:$DE65 PRG:1E65 29 03 tay ; CPU:$DE67 PRG:1E67 A8 @@ -8534,7 +8536,7 @@ Label_DE77: sta $0514,y ; CPU:$DE7B PRG:1E7B 99 14 05 inx ; CPU:$DE7E PRG:1E7E E8 cpx #$04 ; CPU:$DE7F PRG:1E7F E0 04 - bmi Label_DE63 ; CPU:$DE81 PRG:1E81 30 E0 + bmi UpdateSpritePosition82 ; CPU:$DE81 PRG:1E81 30 E0 lda Zp4C ; CPU:$DE83 PRG:1E83 A5 4C beq Label_DE9B ; CPU:$DE85 PRG:1E85 F0 14 lda #$87 ; CPU:$DE87 PRG:1E87 A9 87 @@ -9209,7 +9211,7 @@ Label_E0F4: asl a ; CPU:$E0FB PRG:20FB 0A tax ; CPU:$E0FC PRG:20FC AA ; ----------------------------------------------------------------------------- -; Routine: Label_E0FD +; Routine: InitGame_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. @@ -9217,13 +9219,13 @@ Label_E0F4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E0FD: +InitGame_4: lda Zp09 ; CPU:$E0FD PRG:20FD A5 09 clc ; CPU:$E0FF PRG:20FF 18 adc #$08 ; CPU:$E100 PRG:2100 69 08 sta Zp09 ; CPU:$E102 PRG:2102 85 09 dey ; CPU:$E104 PRG:2104 88 - bpl Label_E0FD ; CPU:$E105 PRG:2105 10 F6 + bpl InitGame_4 ; CPU:$E105 PRG:2105 10 F6 txa ; CPU:$E107 PRG:2107 8A clc ; CPU:$E108 PRG:2108 18 adc Zp0D ; CPU:$E109 PRG:2109 65 0D @@ -10318,7 +10320,7 @@ Label_E443: ; ----------------------------------------------------------------------------- Label_E44B: pla ; CPU:$E44B PRG:244B 68 - bne Label_E459 ; CPU:$E44C PRG:244C D0 0B + bne UpdateDisplay2 ; CPU:$E44C PRG:244C D0 0B ; ----------------------------------------------------------------------------- ; Routine: Label_E44E ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. @@ -10346,7 +10348,7 @@ Label_E44E: Label_E456: lda $C2B0,y ; CPU:$E456 PRG:2456 B9 B0 C2 ; ----------------------------------------------------------------------------- -; Routine: Label_E459 +; Routine: UpdateDisplay2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10354,7 +10356,7 @@ Label_E456: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E459: +UpdateDisplay2: sta $0470,x ; CPU:$E459 PRG:2459 9D 70 04 sta $02D4 ; CPU:$E45C PRG:245C 8D D4 02 ; ----------------------------------------------------------------------------- @@ -10715,10 +10717,10 @@ Label_E53F: Label_E542: lda ZpA9 ; CPU:$E542 PRG:2542 A5 A9 cmp #$01 ; CPU:$E544 PRG:2544 C9 01 - bne Label_E54A ; CPU:$E546 PRG:2546 D0 02 + bne PlayMusic ; CPU:$E546 PRG:2546 D0 02 sta Zp93 ; CPU:$E548 PRG:2548 85 93 ; ----------------------------------------------------------------------------- -; Routine: Label_E54A +; Routine: PlayMusic ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -10726,7 +10728,7 @@ Label_E542: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E54A: +PlayMusic: lda $02E3 ; CPU:$E54A PRG:254A AD E3 02 clc ; CPU:$E54D PRG:254D 18 adc #$04 ; CPU:$E54E PRG:254E 69 04 @@ -12644,7 +12646,7 @@ Label_EAFE: sec ; CPU:$EB0A PRG:2B0A 38 sbc ZpA2 ; CPU:$EB0B PRG:2B0B E5 A2 ; ----------------------------------------------------------------------------- -; Routine: Label_EB0D +; Routine: UpdateSoundChannel6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12652,7 +12654,7 @@ Label_EAFE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EB0D: +UpdateSoundChannel6: sta ZpA0 ; CPU:$EB0D PRG:2B0D 85 A0 lda ZpBC ; CPU:$EB0F PRG:2B0F A5 BC jsr $EE5E ; CPU:$EB11 PRG:2B11 20 5E EE @@ -13746,7 +13748,7 @@ Label_EE44: sta Zp01 ; CPU:$EE4A PRG:2E4A 85 01 rts ; CPU:$EE4C PRG:2E4C 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EE4D +; Routine: UpdateMusicChannel16 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -13754,7 +13756,7 @@ Label_EE44: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EE4D: +UpdateMusicChannel16: lda #$94 ; CPU:$EE4D PRG:2E4D A9 94 sta Zp02 ; CPU:$EE4F PRG:2E4F 85 02 lda #$05 ; CPU:$EE51 PRG:2E51 A9 05 @@ -14297,16 +14299,16 @@ Label_F051: bne Label_F07B ; CPU:$F055 PRG:3055 D0 24 lda ZpEA ; CPU:$F057 PRG:3057 A5 EA cmp #$05 ; CPU:$F059 PRG:3059 C9 05 - bne Label_F06F ; CPU:$F05B PRG:305B D0 12 + bne UpdateMusicChannel22 ; CPU:$F05B PRG:305B D0 12 lda ZpA5 ; CPU:$F05D PRG:305D A5 A5 cmp #$01 ; CPU:$F05F PRG:305F C9 01 - beq Label_F06F ; CPU:$F061 PRG:3061 F0 0C + beq UpdateMusicChannel22 ; CPU:$F061 PRG:3061 F0 0C ldy $05E0 ; CPU:$F063 PRG:3063 AC E0 05 lda $05E1 ; CPU:$F066 PRG:3066 AD E1 05 sta $05E0 ; CPU:$F069 PRG:3069 8D E0 05 sty $05E1 ; CPU:$F06C PRG:306C 8C E1 05 ; ----------------------------------------------------------------------------- -; Routine: Label_F06F +; Routine: UpdateMusicChannel22 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -14314,7 +14316,7 @@ Label_F051: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_F06F: +UpdateMusicChannel22: lda #$16 ; CPU:$F06F PRG:306F A9 16 sta ZpEC ; CPU:$F071 PRG:3071 85 EC lda #$00 ; CPU:$F073 PRG:3073 A9 00 @@ -16247,7 +16249,7 @@ Label_FBDC: lsr ZpFF ; CPU:$FBF5 PRG:3BF5 46 FF bcs Label_FBB4 ; CPU:$FBF7 PRG:3BF7 B0 BB lsr a ; CPU:$FBF9 PRG:3BF9 4A - bcs Label_FC2B ; CPU:$FBFA PRG:3BFA B0 2F + bcs UpdateAPU10 ; CPU:$FBFA PRG:3BFA B0 2F lsr ZpFF ; CPU:$FBFC PRG:3BFC 46 FF bcs Label_FC1F ; CPU:$FBFE PRG:3BFE B0 1F lsr a ; CPU:$FC00 PRG:3C00 4A @@ -16293,7 +16295,7 @@ Label_FC1F: ldx #$80 ; CPU:$FC26 PRG:3C26 A2 80 jsr $FAF7 ; CPU:$FC28 PRG:3C28 20 F7 FA ; ----------------------------------------------------------------------------- -; Routine: Label_FC2B +; Routine: UpdateAPU10 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -16301,7 +16303,7 @@ Label_FC1F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_FC2B: +UpdateAPU10: dec ZpF1 ; CPU:$FC2B PRG:3C2B C6 F1 bne Label_FC1C ; CPU:$FC2D PRG:3C2D D0 ED ; ----------------------------------------------------------------------------- diff --git a/_wip/Donkey Kong Jr. Math (U)/copilot/reconstructed.lbl b/_wip/Donkey Kong Jr. Math (U)/copilot/reconstructed.lbl index 7f5e1c9..b0e6186 100644 --- a/_wip/Donkey Kong Jr. Math (U)/copilot/reconstructed.lbl +++ b/_wip/Donkey Kong Jr. Math (U)/copilot/reconstructed.lbl @@ -52,7 +52,7 @@ al 00FC52 .Label_FC52 al 00FC3A .Label_FC3A al 00FC41 .Label_FC41 al 00FC1F .Label_FC1F -al 00FC2B .Label_FC2B +al 00FC2B .UpdateAPU10 al 00FBDC .Label_FBDC al 00FC1C .Label_FC1C al 00FC2F .Label_FC2F @@ -164,7 +164,7 @@ al 00F0AE .Label_F0AE al 00F0A9 .Label_F0A9 al 00F0BD .Label_F0BD al 00F0F1 .Label_F0F1 -al 00F06F .Label_F06F +al 00F06F .UpdateMusicChannel22 al 00F07B .Label_F07B al 00F051 .Label_F051 al 00F04B .Label_F04B @@ -197,7 +197,7 @@ al 00EE82 .Label_EE82 al 00EE75 .Label_EE75 al 00EE6F .Label_EE6F al 00EE5E .Label_EE5E -al 00EE4D .Label_EE4D +al 00EE4D .UpdateMusicChannel16 al 00EE44 .Label_EE44 al 00EE38 .Label_EE38 al 00EE2A .Label_EE2A @@ -267,7 +267,7 @@ al 00EB41 .Label_EB41 al 00EB75 .Label_EB75 al 00EB62 .Label_EB62 al 00EB15 .Label_EB15 -al 00EB0D .Label_EB0D +al 00EB0D .UpdateSoundChannel6 al 00EAFE .Label_EAFE al 00EADB .Label_EADB al 00EAC7 .Label_EAC7 @@ -390,7 +390,7 @@ al 00E57E .Label_E57E al 00E56B .Label_E56B al 00E568 .Label_E568 al 00E5BD .Label_E5BD -al 00E54A .Label_E54A +al 00E54A .PlayMusic al 00E53F .Label_E53F al 00E529 .Label_E529 al 00E531 .Label_E531 @@ -416,7 +416,7 @@ al 00E4A2 .Label_E4A2 al 00E481 .Label_E481 al 00E476 .Label_E476 al 00E456 .Label_E456 -al 00E459 .Label_E459 +al 00E459 .UpdateDisplay2 al 00E45F .Label_E45F al 00E44B .Label_E44B al 00E44E .Label_E44E @@ -488,7 +488,7 @@ al 00E170 .Label_E170 al 00E163 .Label_E163 al 00E15F .Label_E15F al 00E137 .Label_E137 -al 00E0FD .Label_E0FD +al 00E0FD .InitGame_4 al 00E0F4 .Label_E0F4 al 00E0E4 .Label_E0E4 al 00E0D7 .Label_E0D7 @@ -528,7 +528,7 @@ al 00DE9F .Label_DE9F al 00DE9B .Label_DE9B al 00DE77 .Label_DE77 al 00DE68 .Label_DE68 -al 00DE63 .Label_DE63 +al 00DE63 .UpdateSpritePosition82 al 00DE3D .Label_DE3D al 00DE3A .Label_DE3A al 00DE2A .Label_DE2A @@ -554,7 +554,7 @@ al 00DD0C .Label_DD0C al 00DD0A .Label_DD0A al 00DD09 .Label_DD09 al 00DCEA .Label_DCEA -al 00DCE3 .Label_DCE3 +al 00DCE3 .UpdateSpritePosition66 al 00DCFE .Label_DCFE al 00DCE4 .Label_DCE4 al 00DCD1 .Label_DCD1 @@ -567,7 +567,7 @@ al 00DCC6 .Label_DCC6 al 00DC4A .Label_DC4A al 00DC25 .Label_DC25 al 00DC1F .Label_DC1F -al 00DC0D .Label_DC0D +al 00DC0D .UpdateSpritePosition61 al 00DC0C .Label_DC0C al 00DBEF .Label_DBEF al 00DBF5 .Label_DBF5 @@ -758,7 +758,7 @@ al 00D1A8 .Label_D1A8 al 00D189 .Label_D189 al 00D1B8 .Label_D1B8 al 00D17A .Label_D17A -al 00D175 .Label_D175 +al 00D175 .UpdateSpritePosition26 al 00D164 .Label_D164 al 00D158 .Label_D158 al 00D153 .Label_D153 @@ -868,57 +868,57 @@ al 00CD09 .Label_CD09 al 00CCF9 .Label_CCF9 al 00CCE2 .Label_CCE2 al 00CCD9 .Label_CCD9 -al 00CCD6 .Label_CCD6 +al 00CCD6 .UpdateGameState12 al 00CCC7 .Label_CCC7 al 00CCC6 .Label_CCC6 al 00CCC3 .Label_CCC3 al 00CCBD .Label_CCBD -al 00CCB7 .Label_CCB7 +al 00CCB7 .UpdateGameState10 al 00CC9E .Label_CC9E al 00CC94 .Label_CC94 al 00CC8C .Label_CC8C al 00CC80 .Label_CC80 al 00CC75 .Label_CC75 al 00CC68 .Label_CC68 -al 00CC5C .Label_CC5C -al 00CC47 .Label_CC47 -al 00CC3E .Label_CC3E +al 00CC5C .UpdateGameState8 +al 00CC47 .InitGame_3 +al 00CC3E .UpdateGameState6 al 00CC23 .Label_CC23 -al 00CC42 .Label_CC42 +al 00CC42 .UpdateGameState7 al 00CC2C .Label_CC2C al 00CC26 .Label_CC26 al 00CC10 .Label_CC10 al 00CC02 .Label_CC02 al 00CBDE .Label_CBDE -al 00CBD7 .Label_CBD7 +al 00CBD7 .UpdatePlayerPosition_3 al 00CBCA .Label_CBCA al 00CBCE .Label_CBCE -al 00CBCC .Label_CBCC +al 00CBCC .UpdateGameState5 al 00CBC3 .Label_CBC3 al 00CB9F .Label_CB9F -al 00CB94 .Label_CB94 -al 00CB89 .Label_CB89 -al 00CB73 .Label_CB73 +al 00CB94 .UpdateGameState4_3 +al 00CB89 .CheckAnswer4 +al 00CB73 .UpdatePlayerScore al 00CB60 .Label_CB60 -al 00CB44 .Label_CB44 +al 00CB44 .UpdateGameState3_3 al 00CB6D .Label_CB6D al 00CB3E .Label_CB3E -al 00CB26 .Label_CB26 +al 00CB26 .CheckAnswer3_3 al 00CB21 .Label_CB21 -al 00CB17 .Label_CB17 +al 00CB17 .UpdateGameState2_3 al 00CB11 .Label_CB11 al 00CB09 .Label_CB09 al 00CB14 .Label_CB14 -al 00CAF7 .Label_CAF7 +al 00CAF7 .UpdateScore3 al 00CAEE .Label_CAEE al 00CAD3 .Label_CAD3 al 00CAC6 .Label_CAC6 al 00CABA .Label_CABA al 00CAC7 .Label_CAC7 -al 00CA99 .Label_CA99 +al 00CA99 .UpdateScore2_1 al 00CA98 .Label_CA98 -al 00CA86 .Label_CA86 -al 00CA7D .Label_CA7D +al 00CA86 .UpdateScore_3 +al 00CA7D .CheckAnswer3_1 al 00CA7B .Label_CA7B al 00CA85 .Label_CA85 al 00CA6D .Label_CA6D @@ -926,9 +926,9 @@ al 00CA58 .Label_CA58 al 00CA59 .Label_CA59 al 00CA5A .Label_CA5A al 00CA5B .Label_CA5B -al 00CA43 .Label_CA43 +al 00CA43 .CheckAnswer2 al 00CA41 .Label_CA41 -al 00CA37 .Label_CA37 +al 00CA37 .CheckAnswer al 00CA36 .Label_CA36 al 00CA10 .Label_CA10 al 00CA0B .Label_CA0B @@ -949,10 +949,10 @@ al 00C98C .Label_C98C al 00C931 .Label_C931 al 00C98F .Label_C98F al 00C926 .Label_C926 -al 00C911 .Label_C911 -al 00C8E2 .Label_C8E2 +al 00C911 .CheckButtonPress +al 00C8E2 .CheckGameState2 al 00C8E1 .Label_C8E1 -al 00C8BB .Label_C8BB +al 00C8BB .UpdateGameState2_1 al 00C8B5 .Label_C8B5 al 00C8C7 .Label_C8C7 al 00C8A3 .Label_C8A3 @@ -960,35 +960,35 @@ al 00C8B8 .Label_C8B8 al 00C8D8 .Label_C8D8 al 00C888 .Label_C888 al 00C889 .Label_C889 -al 00C8DB .Label_C8DB +al 00C8DB .UpdateGameState3_1 al 00C87B .Label_C87B al 00C872 .Label_C872 -al 00C866 .Label_C866 +al 00C866 .CheckController al 00C85C .Label_C85C -al 00C83F .Label_C83F +al 00C83F .UpdateSpritePosition al 00C861 .Label_C861 al 00C833 .Label_C833 -al 00C814 .Label_C814 +al 00C814 .UpdatePlayerPosition_1 al 00C80F .Label_C80F -al 00C7F3 .Label_C7F3 -al 00C7F1 .Label_C7F1 +al 00C7F3 .CheckLevelComplete2 +al 00C7F1 .CheckLevelComplete al 00C7DC .Label_C7DC al 00C7CF .Label_C7CF -al 00C7C3 .Label_C7C3 +al 00C7C3 .UpdateGameState al 00C7B5 .Label_C7B5 -al 00C79B .Label_C79B -al 00C797 .Label_C797 +al 00C79B .InitLevel2 +al 00C797 .InitLevel al 00C794 .Label_C794 al 00C72D .Label_C72D -al 00C729 .Label_C729 -al 00C723 .Label_C723 -al 00C71F .Label_C71F -al 00C707 .Label_C707 -al 00C6F9 .Label_C6F9 -al 00C6EC .Label_C6EC +al 00C729 .InitSprites_3 +al 00C723 .UpdatePPUMask +al 00C71F .UpdateSprites2_4 +al 00C707 .UpdateSprites2_3 +al 00C6F9 .InitSpriteData +al 00C6EC .ClearZeropage_3 al 00C6DD .Label_C6DD al 00C6E1 .Label_C6E1 -al 00C6D7 .Label_C6D7 +al 00C6D7 .UpdateSprites4 al 00C6E2 .Label_C6E2 al 00C6C8 .Label_C6C8 al 00C6B7 .Label_C6B7 @@ -1002,34 +1002,34 @@ al 00C67E .Label_C67E al 00C66B .Label_C66B al 00C689 .Label_C689 al 00C67F .Label_C67F -al 00C656 .Label_C656 +al 00C656 .UpdateSprites3_1 al 00C64C .Label_C64C al 00C634 .Label_C634 al 00C632 .Label_C632 -al 00C609 .Label_C609 +al 00C609 .UpdateSprites2_1 al 00C5EB .Label_C5EB al 00C5D7 .Label_C5D7 al 00C5E3 .Label_C5E3 al 00C5C2 .Label_C5C2 -al 00C5E4 .Label_C5E4 +al 00C5E4 .UpdateSprites al 00C5C3 .Label_C5C3 al 00C5A3 .Label_C5A3 al 00C574 .Label_C574 al 00C561 .Label_C561 al 00C559 .Label_C559 -al 00C553 .Label_C553 -al 00C541 .Label_C541 +al 00C553 .InitPPU_3 +al 00C541 .InitAPU al 00C507 .Label_C507 al 00C52F .Label_C52F al 00C53E .Label_C53E al 00C535 .Label_C535 al 00C4DE .Label_C4DE al 00C4A9 .NmiHandler -al 00C495 .Label_C495 -al 00C48C .Label_C48C -al 00C47B .Label_C47B -al 00C475 .Label_C475 +al 00C495 .ClearSpriteRAM +al 00C48C .InitSprites_1 +al 00C47B .InitPPU_1 +al 00C475 .MainGameLoop al 00C460 .Label_C460 -al 00C439 .Label_C439 -al 00C428 .Label_C428 +al 00C439 .ClearZeropage_1 +al 00C428 .WaitVBlank_1 al 00C41E .Reset