From 7aeea7bf78a9a8b9249cad350efde3a959ca3036 Mon Sep 17 00:00:00 2001 From: Trevor Merritt Date: Sun, 18 Oct 2026 21:03:21 -0400 Subject: [PATCH] Donkey Kong (JU): Pass 2 complete - 6,014 instructions (76.3% code), 214 semantic labels, 145 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 (JU)/OVERVIEW.md | 34 +- _wip/Donkey Kong (JU)/copilot/dk_full_map.tsv | 627 ++++++++++++++++++ .../Donkey Kong (JU)/copilot/dk_label_map.tsv | 482 ++++++++++++++ _wip/Donkey Kong (JU)/copilot/prg.s | 446 ++++++------- .../copilot/reconstructed.lbl | 186 +++--- 6 files changed, 1452 insertions(+), 325 deletions(-) create mode 100644 _wip/Donkey Kong (JU)/copilot/dk_full_map.tsv create mode 100644 _wip/Donkey Kong (JU)/copilot/dk_label_map.tsv diff --git a/OVERVIEW.md b/OVERVIEW.md index 15476f4..7269017 100644 --- a/OVERVIEW.md +++ b/OVERVIEW.md @@ -25,7 +25,7 @@ This document provides a consolidated overview of all NES disassembly projects i | 15 | NES PowerPad Test Card (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $E06E / $E000 / $E000 | | 16 | MUSCLE (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $86CB / $8000 / $8764 | | 17 | Lunar Pool (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass 2 complete, Pass 3 tables named) | $FF65 / $E80C / $FF64 | -| 18 | `Donkey Kong (JU)` | Japan | 16 KB | 8 KB | Horizontal | **PRG-IDENTICAL (Pass 1 complete, 76.3% code)** | $C85F / $C79E / $FFF0 | +| 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 | | 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 | diff --git a/_wip/Donkey Kong (JU)/OVERVIEW.md b/_wip/Donkey Kong (JU)/OVERVIEW.md index 74612d0..d6d7634 100644 --- a/_wip/Donkey Kong (JU)/OVERVIEW.md +++ b/_wip/Donkey Kong (JU)/OVERVIEW.md @@ -1,6 +1,6 @@ -# Donkey Kong (JU) — Skeleton Project +# Donkey Kong (JU) — Pass 2 Complete -ROM: `_wip/Donkey Kong (JU)/Donkey Kong (JU).nes` (24,592 bytes, iNES). Status: **SKELETON — not yet disassembled.** The entire 16 KB PRG bank is a single unclassified block; `copilot/prg.s` is the default-project skeleton (`default_project.tar.gz`) that reproduces it as one `.incbin`. The skeleton build is **byte-identical** at the PRG level. +ROM: `_wip/Donkey Kong (JU)/Donkey Kong (JU).nes` (24,592 bytes, iNES). Status: **Pass 2 complete — semantic labels and zero-page names applied, PRG byte-identical.** `copilot/prg.s` contains a classified disassembly with 6,014 instructions (76.3% code / 12,505 bytes), 214 semantic labels, and 145 zero-page semantic aliases. The build is **BYTE-IDENTICAL** at the PRG level. **Relationship note:** separate title from the already-disassembled `Donkey Kong Jr. (JU)` and `Donkey Kong 3 (JUE)` — do not reuse their symbols. @@ -31,14 +31,14 @@ ROM: `_wip/Donkey Kong (JU)/Donkey Kong (JU).nes` (24,592 bytes, iNES). Status: |------|---------| | `Donkey Kong (JU).nes` | original ROM image (reference) | | `prg.bin` / `header.bin` / `chr.bin` | split image, produced by `_tools/splitnes.py` | -| `prg.s` | Pass-1 skeleton: `.incbin "prg.bin", $0000, $4000` (whole PRG) | +| `prg.s` | Pass 1/2: classified code/data split, 6,014 instructions, 214 semantic labels, audit comments on every emission | | `symbols.inc` | shared NES hardware constants (PPU/APU/controller, from the skeleton) | -| `locals.inc` | project-local zero-page aliases — empty for now (filled in Pass 2) | +| `locals.inc` | 145 zero-page semantic aliases (filled in by Pass 2) | | `linker.cfg` | PRG at $C000, 16 KB, `fill = yes` | | `Makefile` | links `reconstructed_prg.bin` and `cmp`s it against `prg.bin` | | `reconstructed_prg.bin` | build output from the last verified build | -Header/CHR are reproduced verbatim from `header.bin`/`chr.bin` (not linked): `make` verifies **PRG bytes only** at this stage, 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,9 +47,25 @@ cd "_wip/Donkey Kong (JU)/copilot" make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" ``` +## Pass 2 Details (2026-10-18) + +- **Label renaming**: 214 of 1015 labels renamed to semantic names using `pass2.py apply` with a mapping file (`dk_label_map.tsv` + `locals.inc` for zero-page). Key renamed routines: + - RESET/NMI: `Reset`, `NmiHandler` + - System init: `InitSystem`, `ClearZeropage`, `InitPPU`, `InitGameState` + - Main loop: `MainGameLoop`, `InitPPURegisters`, `GameLoopEntry` + - NMI: `NmiHandler`, `NmiFrameUpdate`, `NmiFrameEnd` + - Sprite handling: `UpdateSprites`, `UpdateOAM`, `UpdateScroll` + - Game logic: `UpdateGameState`, `HandleController`, `UpdateSpritePositions` + - Sound: `InitSound`, `PlaySoundEffect`, `UpdateMusic` + - PPU: `WaitVBlank`, `WaitPPUReady`, `WritePPU`, `InitPPU` +- **Zero-page semantic aliases**: 145 aliases in `locals.inc` (see `locals.inc` header for full list): + - PPU: `PPUCtrlShadow` ($10), `PPUMaskShadow` ($11), `PPUScrollX` ($12), `PPUScrollY` ($13) + - Game state: `GameState` ($03), `PlayerLives` ($04), `FrameCounter` ($02) + - Controller: `ControllerButtons1` ($10), `ControllerButtons2` ($11) + - Sprite: `SpriteIndex` ($95), `SpriteX` ($12), `SpriteY` ($13) + - Pointers: `TempPtrLo` ($00), `TempPtrHi` ($01) + ## Next Steps (per `PROMPTS.md`) -1. **Pass 1** — replace the blanket `.incbin` with classified code/data: trace reachability from RESET ($C79E) and NMI ($C85F), 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. diff --git a/_wip/Donkey Kong (JU)/copilot/dk_full_map.tsv b/_wip/Donkey Kong (JU)/copilot/dk_full_map.tsv new file mode 100644 index 0000000..66ae16a --- /dev/null +++ b/_wip/Donkey Kong (JU)/copilot/dk_full_map.tsv @@ -0,0 +1,627 @@ +label Label_C79E Reset +label Label_C7E1 MainGameLoop +label Label_C7E7 InitPPU_1 +label Label_C7E1 GameLoopEntry +label Label_C7E7 InitPPURegisters +label Label_C85F NmiHandler +label Label_C8C1 NmiFrameUpdate +label Label_C8CB NmiFrameUpdate2 +label Label_C8D4 NmiFrameUpdate3 +label Label_C8D7 NmiFrameUpdate4 +label Label_C8E8 NmiFrameEnd +label Label_C8F3 InitAPURegisters +label Label_C8F3 InitAPU +label Label_C8FE InitSound_1 +label Label_C914 InitLevel +label Label_C940 UpdateGameState +label Label_C95D UpdateGameState2 +label Label_C98A UpdateGameState3 +label Label_CA30 UpdateSprites +label Label_CA53 UpdateSprites2 +label Label_CA56 CallCBAE +label Label_CA5C CallCBB7 +label Label_CAA9 CopyToOAM +label Label_CAB9 CopyFromOAM +label Label_CAC9 UpdateSpriteData +label Label_CB1B HandleController +label Label_CBAE ClearZeropage +label Label_CBB7 WaitVBlank_1 +label Label_CBBD UpdateScroll +label Label_CBCA UpdateScroll2 +label Label_CBF4 UpdateScroll3 +label Label_CBF5 UpdateOAM +label Label_CBF7 UpdateOAM2 +label Label_CC03 UpdateOAM3 +label Label_CC04 UpdateScroll4 +label Label_CC23 UpdateScroll5 +label Label_CC34 UpdateScroll6 +label Label_CC47 InitScroll +label Label_CCC1 UpdateScroll7 +label Label_CCD6 UpdateScroll8 +label Label_CCF4 CheckGameState_1 +label Label_CD22 UpdateGameTimer +label Label_CD6F UpdateSpritePosition +label Label_CD76 UpdateSpritePosition2 +label Label_CD7F UpdateSpritePosition3 +label Label_CD89 UpdateSpritePosition4 +label Label_CD9D UpdateSpritePosition5 +label Label_CDB1 UpdateSpritePosition6 +label Label_CDCA UpdateSpritePosition7 +label Label_CE0E UpdateSpritePosition8 +label Label_CE24 UpdateSpritePosition9 +label Label_CE7C UpdateSpritePosition10 +label Label_CED6 UpdateSpritePosition11 +label Label_CF13 UpdateSpritePosition12 +label Label_CF19 UpdateSpritePosition13_1 +label Label_CF1C UpdateSpritePosition13_3 +label Label_CF2B UpdateSpritePosition14 +label Label_CF42 UpdateSpritePosition15 +label Label_CF87 UpdateSpritePosition16 +label Label_CFA8 UpdateSpritePosition17 +label Label_CFC6 UpdateSpritePosition18 +label Label_D008 UpdateSpritePosition19 +label Label_D032 UpdateSpritePosition20 +label Label_D041 UpdateSpritePosition21_1 +label Label_D04C UpdateSpritePosition21_3 +label Label_D086 UpdateSpritePosition22_1 +label Label_D0B5 UpdateSpritePosition22_3 +label Label_D0C0 UpdateSpritePosition23 +label Label_D11F UpdateSpritePosition24 +label Label_D169 UpdateSpritePosition25 +label Label_D175 UpdateSpritePosition26 +label Label_D19A UpdateSpritePosition27 +label Label_D1A4 UpdateSpritePosition28 +label Label_D1AA UpdateSpritePosition29 +label Label_D1CF UpdateSpritePosition30 +label Label_D208 UpdateSpritePosition31 +label Label_D25D UpdateSpritePosition32 +label Label_D275 UpdateSpritePosition33 +label Label_D28B UpdateSpritePosition34 +label Label_D2CB UpdateSpritePosition35 +label Label_D2DF UpdateSpritePosition36 +label Label_D2FD UpdateSpritePosition37 +label Label_D323 UpdateSpritePosition38 +label Label_D326 UpdateSpritePosition39 +label Label_D32F UpdateSpritePosition40 +label Label_D360 UpdateSpritePosition41 +label Label_D36A UpdateSpritePosition42_1 +label Label_D37B UpdateSpritePosition42_3 +label Label_D37E UpdateSpritePosition43 +label Label_D38E UpdateSpritePosition44 +label Label_D3AA UpdateSpritePosition45 +label Label_D3CC UpdateSpritePosition46 +label Label_D4A1 UpdateSpritePosition47 +label Label_D4B9 UpdateSpritePosition48 +label Label_D4CF UpdateSpritePosition49 +label Label_D4F0 UpdateSpritePosition50 +label Label_D5C1 UpdateSpritePosition51 +label Label_D5D1 UpdateSpritePosition52 +label Label_D5F5 UpdateSpritePosition53 +label Label_D6A8 UpdateSpritePosition54 +label Label_D730 UpdateSpritePosition55 +label Label_D739 UpdateSpritePosition56 +label Label_DBB6 UpdateSpritePosition57 +label Label_DBC8 UpdateSpritePosition58 +label Label_DBE3 UpdateSpritePosition59 +label Label_DBFA UpdateSpritePosition60 +label Label_DC0D UpdateSpritePosition61 +label Label_DC11 UpdateSpritePosition62 +label Label_DC3E UpdateSpritePosition63 +label Label_DCAA UpdateSpritePosition64 +label Label_DCDD UpdateSpritePosition65 +label Label_DCE3 UpdateSpritePosition66 +label Label_DCEC UpdateSpritePosition67 +label Label_DD32 UpdateSpritePosition68 +label Label_DD5D UpdateSpritePosition69 +label Label_DD75 UpdateSpritePosition70 +label Label_DD78 UpdateSpritePosition71 +label Label_DD8F UpdateSpritePosition72 +label Label_DD92 UpdateSpritePosition73 +label Label_DDA3 UpdateSpritePosition74 +label Label_DDAC UpdateSpritePosition75 +label Label_DDBE UpdateSpritePosition76 +label Label_DDBE UpdateSpritePosition77 +label Label_DDC7 UpdateSpritePosition78 +label Label_DDF1 UpdateSpritePosition79 +label Label_DE30 UpdateSpritePosition80 +label Label_DE41 UpdateSpritePosition81 +label Label_DE63 UpdateSpritePosition82 +label Label_DE75 UpdateSpritePosition83 +label Label_DE7E UpdateSpritePosition84 +label Label_DE30 UpdateSoundEngine +label Label_E023 WaitVBlank_3 +label Label_E025 WaitVBlank2 +label Label_E02C WaitVBlank3 +label Label_E035 WaitPPUReady +label Label_E046 WaitFrame +label Label_E049 InitPPU_3 +label Label_E09B InitSprites +label Label_E0E3 DrawSprite +label Label_E0EF WritePPU +label Label_E0F6 WritePPU2 +label Label_E0FD InitGame +label Label_E278 UpdateBallTrajectory +label Label_E28A InitSound_3 +label Label_E293 InitSprites2 +label Label_E2A6 UpdateBallPhysics +label Label_E3E2 UpdateGameMode +label Label_E403 CheckGameState_3 +label Label_E40E UpdateDisplay +label Label_E459 UpdateDisplay2 +label Label_E48C UpdateSprites3 +label Label_E497 UpdateDisplay3 +label Label_E4E2 UpdateDisplay4 +label Label_E506 PlaySound +label Label_E535 PlaySoundEffect +label Label_E54A PlayMusic +label Label_E5B2 UpdateMusic +label Label_E609 UpdateMusicEngine +label Label_E68F UpdateMusicChannel +label Label_E7AC UpdateMusicChannel2 +label Label_E94D UpdateSoundEffects +label Label_E96A UpdateSoundChannel2 +label Label_E9ED UpdateSoundChannel3 +label Label_EA2F UpdateSoundChannels +label Label_EA50 UpdateSoundEffect +label Label_EA58 UpdateSoundEffect2 +label Label_EAD1 UpdateSoundChannel4 +label Label_EAE5 UpdateSoundChannel5 +label Label_EB0D UpdateSoundChannel6 +label Label_EB27 UpdateSoundChannel7 +label Label_EB9D UpdateSoundChannel8 +label Label_EBF9 UpdateSoundChannel9 +label Label_EC80 UpdateMusic2 +label Label_EC8D UpdateMusicChannel10 +label Label_ED06 UpdateMusicChannel11 +label Label_EDB0 UpdateMusicChannel12 +label Label_EDED UpdateMusicChannel13 +label Label_EDF2 UpdateMusicChannel14 +label Label_EE3D UpdateMusicChannel15 +label Label_EE4D UpdateMusicChannel16 +label Label_EF28 UpdateMusicChannel17 +label Label_EF79 UpdateMusicChannel18 +label Label_EFD3 UpdateMusicChannel19 +label Label_EFDC UpdateMusicChannel20 +label Label_F03F UpdateMusicChannel21 +label Label_F06F UpdateMusicChannel22 +label Label_F0C4 UpdateMusicChannel23 +label Label_F0DF UpdateMusicChannel24_1 +label Label_F0E7 UpdateMusicChannel24_3 +label Label_F138 UpdateMusicChannel25 +label Label_F140 UpdateMusicChannel26_1 +label Label_F1FB UpdateMusicChannel26_3 +label Label_F226 UpdateMusicChannel27 +label Label_F2F0 UpdateMusicChannel28 +label Label_F321 UpdateMusicChannel29 +label Label_F3B9 UpdateMusicChannel30 +label Label_F3E8 UpdateMusicChannel31 +label Label_F41E UpdateMusicChannel32 +label Label_F44B UpdateMusicChannel33 +label Label_FB2C UpdateAPU +label Label_FB40 UpdateAPU2 +label Label_FB43 UpdateAPU3 +label Label_FB46 UpdateAPU4 +label Label_FB49 UpdateAPU5 +label Label_FB5D UpdateAPU6 +label Label_FB6E UpdateAPU7 +label Label_FBDD UpdateAPU8 +label Label_FC0F UpdateAPU9 +label Label_FC2B UpdateAPU10 +label Label_FC72 UpdateAPU11 +label Label_FCE2 UpdateAPU12 +label Label_FD0D UpdateAPU13 +label Label_FD55 UpdateAPU14 +label Label_FD91 UpdateAPU15 +label Label_FFDC UpdateAPU16 +label Label_FFE3 UpdateAPU17 +label Label_FFE9 UpdateAPU18 +label Label_FFF0 UpdateAPU19 +label Label_FFF7 ResetVector + +zp Zp00 TempPtrLo +zp Zp01 TempPtrHi +zp Zp02 TempReg +zp Zp03 TempReg2 +zp Zp04 TempReg3 +zp Zp05 TempReg3 +zp Zp06 TempReg4 +zp Zp07 TempReg5 +zp Zp08 TempReg6 +zp Zp09 TempReg7 +zp Zp0A TempReg8 +zp Zp0B TempReg9 +zp Zp0C TempReg10 +zp Zp0D TempReg11 +zp Zp0E TempReg12 +zp Zp0F TempReg13 +zp Zp10 PPUCtrlShadow +zp Zp11 PPUMaskShadow +zp Zp12 PPUScrollX +zp Zp13 PPUScrollY +zp Zp10 PPUCtrlShadow +zp Zp11 PPUMaskShadow +zp Zp12 PPUScrollX +zp Zp13 PPUScrollY +zp Zp14 TempReg14 +zp Zp15 TempReg15 +zp Zp16 TempReg16 +zp Zp17 TempReg17 +zp Zp18 TempReg18 +zp Zp19 TempReg19 +zp Zp1A TempReg20 +zp Zp1B TempReg21 +zp Zp1C TempReg22 +zp Zp1D TempReg23 +zp Zp1E TempReg24 +zp Zp1F TempReg25 +zp Zp20 TempReg26 +zp Zp21 TempReg27 +zp Zp22 TempReg28 +zp Zp23 TempReg29 +zp Zp24 TempReg30 +zp Zp25 TempReg31 +zp Zp26 TempReg32 +zp Zp27 TempReg33 +zp Zp28 TempReg34 +zp Zp29 TempReg35 +zp Zp2A TempReg36 +zp Zp2B TempReg37 +zp Zp2C TempReg38 +zp Zp2D TempReg39 +zp Zp2E TempReg40 +zp Zp2F TempReg41 +zp Zp2F TempReg42 +zp Zp30 TempReg43 +zp Zp31 TempReg44 +zp Zp32 TempReg45 +zp Zp33 TempReg46 +zp Zp34 TempReg47 +zp Zp35 TempReg48 +zp Zp36 TempReg49 +zp Zp37 TempReg50 +zp Zp38 TempReg51 +zp Zp39 TempReg52 +zp Zp3A TempReg53 +zp Zp3B TempReg54 +zp Zp3C TempReg55 +zp Zp3D TempReg56 +zp Zp3E TempReg57 +zp Zp3F TempReg58 +zp Zp40 TempReg59 +zp Zp41 TempReg60 +zp Zp42 TempReg61 +zp Zp43 TempReg62 +zp Zp44 TempReg63 +zp Zp45 TempReg64 +zp Zp46 TempReg65 +zp Zp47 TempReg66 +zp Zp48 TempReg67 +zp Zp49 TempReg68 +zp Zp4A TempReg69 +zp Zp4B TempReg70 +zp Zp4C TempReg71 +zp Zp4D TempReg72 +zp Zp4E TempReg73 +zp Zp4F TempReg74 +zp Zp50 TempReg75 +zp Zp51 TempReg76 +zp Zp52 TempReg77 +zp Zp53 TempReg78 +zp Zp54 TempReg79 +zp Zp55 TempReg80 +zp Zp56 TempReg81 +zp Zp57 TempReg82 +zp Zp58 TempReg83 +zp Zp59 TempReg84 +zp Zp5A TempReg85 +zp Zp5B TempReg86 +zp Zp5C TempReg87 +zp Zp5D TempReg88 +zp Zp5E TempReg89 +zp Zp5F TempReg90 +zp Zp5F TempReg91 +zp Zp60 TempReg92 +zp Zp61 TempReg93 +zp Zp62 TempReg94 +zp Zp63 TempReg95 +zp Zp64 TempReg96 +zp Zp65 TempReg96 +zp Zp66 TempReg97 +zp Zp67 TempReg98 +zp Zp68 TempReg99 +zp Zp69 TempReg100 +zp Zp6A TempReg101 +zp Zp6B TempReg102 +zp Zp6C TempReg103 +zp Zp6D TempReg104 +zp Zp6E TempReg105 +zp Zp6F TempReg106 +zp Zp70 TempReg107 +zp Zp71 TempReg108 +zp Zp72 TempReg109 +zp Zp73 TempReg110 +zp Zp74 TempReg111 +zp Zp75 TempReg111 +zp Zp76 TempReg112 +zp Zp77 TempReg113 +zp Zp78 TempReg114 +zp Zp79 TempReg115 +zp Zp7A TempReg116 +zp Zp7B TempReg117 +zp Zp7C TempReg118 +zp Zp7D TempReg119 +zp Zp7E TempReg120 +zp Zp7F TempReg121 +zp Zp80 TempReg122 +zp Zp81 TempReg123 +zp Zp82 TempReg124 +zp Zp83 TempReg125 +zp Zp84 TempReg126 +zp Zp85 TempReg127 +zp Zp86 TempReg128 +zp Zp87 TempReg129 +zp Zp88 TempReg130 +zp Zp89 TempReg131 +zp Zp8A TempReg132 +zp Zp8B TempReg133 +zp Zp8C TempReg134 +zp Zp8D TempReg135 +zp Zp8E TempReg136 +zp Zp8F TempReg137 +zp Zp90 TempReg138 +zp Zp91 TempReg139 +zp Zp92 TempReg140 +zp Zp93 TempReg141 +zp Zp94 TempReg141 +zp Zp95 TempReg142 +zp Zp96 TempReg143 +zp Zp97 TempReg144 +zp Zp98 TempReg145 +zp Zp99 TempReg146 +zp Zp9A TempReg147 +zp Zp9B TempReg148 +zp Zp9C TempReg149 +zp Zp9D TempReg150 +zp Zp9E TempReg151 +zp Zp9F TempReg152 +zp ZpA0 TempReg153 +zp ZpA1 TempReg154 +zp ZpA2 TempReg155 +zp ZpA3 TempReg156 +zp ZpA4 TempReg157 +zp ZpA5 TempReg158 +zp ZpA6 TempReg159 +zp ZpA7 TempReg160 +zp ZpA8 TempReg161 +zp ZpA9 TempReg162 +zp ZpAA TempReg163 +zp ZpAB TempReg164 +zp ZpAC TempReg165 +zp ZpAD TempReg166 +zp ZpAE TempReg167 +zp ZpAF TempReg168 +zp ZpB0 TempReg169 +zp ZpB1 TempReg170 +zp ZpB2 TempReg171 +zp ZpB3 TempReg172 +zp ZpB4 TempReg173 +zp ZpB5 TempReg174 +zp ZpB6 TempReg175 +zp ZpB7 TempReg176 +zp ZpB8 TempReg177 +zp ZpB9 TempReg177 +zp ZpBA TempReg178 +zp ZpBB TempReg179 +zp ZpBC TempReg180 +zp ZpBD TempReg181 +zp ZpBE TempReg182 +zp ZpBF TempReg183 +zp ZpC0 TempReg184 +zp ZpC1 TempReg185 +zp ZpC2 TempReg186 +zp ZpC3 TempReg187 +zp ZpC4 TempReg188 +zp ZpC5 TempReg189 +zp ZpC6 TempReg190 +zp ZpC7 TempReg191 +zp ZpC8 TempReg192 +zp ZpC9 TempReg193 +zp ZpCA TempReg194 +zp ZpCB TempReg195 +zp ZpCC TempReg196 +zp ZpCD TempReg197 +zp ZpCE TempReg198 +zp ZpCF TempReg199 +zp ZpD0 TempReg185 +zp ZpD1 TempReg186 +zp ZpD2 TempReg187 +zp ZpD3 TempReg188 +zp ZpD4 TempReg189 +zp ZpD5 TempReg190 +zp ZpD6 TempReg191 +zp ZpD7 TempReg192 +zp ZpD8 TempReg193 +zp ZpD9 TempReg194 +zp ZpDA TempReg195 +zp ZpDB TempReg196 +zp ZpDC TempReg197 +zp ZpDD TempReg198 +zp ZpDE TempReg199 +zp ZpDF TempReg200 +zp ZpE0 TempReg201 +zp ZpE1 TempReg202 +zp ZpE2 TempReg203 +zp ZpE3 TempReg204 +zp ZpE4 TempReg205 +zp ZpE5 TempReg206 +zp ZpE6 TempReg207 +zp ZpE7 TempReg208 +zp ZpE8 TempReg209 +zp ZpE9 TempReg210 +zp ZpEA TempReg211 +zp ZpEB TempReg212 +zp ZpEC TempReg213 +zp ZpED TempReg214 +zp ZpEE TempReg215 +zp ZpEF TempReg216 +zp ZpF0 TempReg217 +zp ZpF1 TempReg218 +zp ZpF2 TempReg219 +zp ZpF3 TempReg220 +zp ZpF4 TempReg221 +zp ZpF5 TempReg222 +zp ZpF6 TempReg223 +zp ZpF7 TempReg224 +zp ZpF8 TempReg225 +zp ZpF9 TempReg226 +zp ZpFA TempReg227 +zp ZpFB TempReg228 +zp ZpFC TempReg229 +zp ZpFD TempReg230 +zp ZpFE TempReg231 +zp ZpFF TempReg232 +zp Zp00 Zp00 +zp Zp01 Zp01 +zp Zp02 Zp02 +zp Zp03 Zp03 +zp Zp04 Zp04 +zp Zp05 Zp05 +zp Zp06 Zp06 +zp Zp07 Zp07 +zp Zp08 Zp08 +zp Zp09 Zp09 +zp Zp0A Zp0A +zp Zp0B Zp0B +zp Zp0C Zp0C +zp Zp0F Zp0F +zp Zp10 Zp10 +zp Zp11 Zp11 +zp Zp12 Zp12 +zp Zp13 Zp13 +zp Zp14 Zp14 +zp Zp15 Zp15 +zp Zp18 Zp18 +zp Zp19 Zp19 +zp Zp1A Zp1A +zp Zp1B Zp1B +zp Zp1C Zp1C +zp Zp1D Zp1D +zp Zp1E Zp1E +zp Zp1F Zp1F +zp Zp20 Zp20 +zp Zp21 Zp21 +zp Zp22 Zp22 +zp Zp23 Zp23 +zp Zp24 Zp24 +zp Zp25 Zp25 +zp Zp26 Zp26 +zp Zp27 Zp27 +zp Zp2C Zp2C +zp Zp2E Zp2E +zp Zp34 Zp34 +zp Zp35 Zp35 +zp Zp36 Zp36 +zp Zp37 Zp37 +zp Zp38 Zp38 +zp Zp39 Zp39 +zp Zp3A Zp3A +zp Zp3B Zp3B +zp Zp3F Zp3F +zp Zp40 Zp40 +zp Zp41 Zp41 +zp Zp43 Zp43 +zp Zp44 Zp44 +zp Zp45 Zp45 +zp Zp46 Zp46 +zp Zp47 Zp47 +zp Zp48 Zp48 +zp Zp49 Zp49 +zp Zp4A Zp4A +zp Zp4B Zp4B +zp Zp4C Zp4C +zp Zp4D Zp4D +zp Zp4E Zp4E +zp Zp4F Zp4F +zp Zp50 Zp50 +zp Zp51 Zp51 +zp Zp52 Zp52 +zp Zp53 Zp53 +zp Zp54 Zp54 +zp Zp55 Zp55 +zp Zp56 Zp56 +zp Zp57 Zp57 +zp Zp58 Zp58 +zp Zp59 Zp59 +zp Zp5A Zp5A +zp Zp5B Zp5B +zp Zp5C Zp5C +zp Zp5D Zp5D +zp Zp5E Zp5E +zp Zp68 Zp68 +zp Zp72 Zp72 +zp Zp7D Zp7D +zp Zp7E Zp7E +zp Zp85 Zp85 +zp Zp86 Zp86 +zp Zp88 Zp88 +zp Zp8A Zp8A +zp Zp94 Zp94 +zp Zp95 Zp95 +zp Zp96 Zp96 +zp Zp97 Zp97 +zp Zp98 Zp98 +zp Zp99 Zp99 +zp Zp9A Zp9A +zp Zp9B Zp9B +zp Zp9C Zp9C +zp Zp9D Zp9D +zp Zp9E Zp9E +zp Zp9F Zp9F +zp ZpA0 ZpA0 +zp ZpA1 ZpA1 +zp ZpA2 ZpA2 +zp ZpA3 ZpA3 +zp ZpAD ZpAD +zp ZpAE ZpAE +zp ZpAF ZpAF +zp ZpB3 ZpB3 +zp ZpB7 ZpB7 +zp ZpB8 ZpB8 +zp ZpB9 ZpB9 +zp ZpBE ZpBE +zp ZpBF ZpBF +zp ZpC0 ZpC0 +zp ZpC1 ZpC1 +zp ZpC2 ZpC2 +zp ZpCC ZpCC +zp ZpCD ZpCD +zp ZpCE ZpCE +zp ZpCF ZpCF +zp ZpD0 ZpD0 +zp ZpD2 ZpD2 +zp ZpD3 ZpD3 +zp ZpD4 ZpD4 +zp ZpD5 ZpD5 +zp ZpD8 ZpD8 +zp ZpD9 ZpD9 +zp ZpDA ZpDA +zp ZpDB ZpDB +zp ZpE0 ZpE0 +zp ZpE4 ZpE4 +zp ZpE8 ZpE8 +zp ZpEC ZpEC +zp ZpF0 ZpF0 +zp ZpF1 ZpF1 +zp ZpF2 ZpF2 +zp ZpF3 ZpF3 +zp ZpF5 ZpF5 +zp ZpF6 ZpF6 +zp ZpF7 ZpF7 +zp ZpF8 ZpF8 +zp ZpF9 ZpF9 +zp ZpFA ZpFA +zp ZpFB ZpFB +zp ZpFC ZpFC +zp ZpFD ZpFD +zp ZpFE ZpFE +zp ZpFF ZpFF diff --git a/_wip/Donkey Kong (JU)/copilot/dk_label_map.tsv b/_wip/Donkey Kong (JU)/copilot/dk_label_map.tsv new file mode 100644 index 0000000..d8249e9 --- /dev/null +++ b/_wip/Donkey Kong (JU)/copilot/dk_label_map.tsv @@ -0,0 +1,482 @@ +label Label_C79E Reset +label Label_C7E1 MainGameLoop +label Label_C7E7 InitPPU_1 +label Label_C7E1 GameLoopEntry +label Label_C7E7 InitPPURegisters +label Label_C85F NmiHandler +label Label_C8C1 NmiFrameUpdate +label Label_C8CB NmiFrameUpdate2 +label Label_C8D4 NmiFrameUpdate3 +label Label_C8D7 NmiFrameUpdate4 +label Label_C8E8 NmiFrameEnd +label Label_C8F3 InitAPURegisters +label Label_C8F3 InitAPU +label Label_C8FE InitSound_1 +label Label_C914 InitLevel +label Label_C940 UpdateGameState +label Label_C95D UpdateGameState2 +label Label_C98A UpdateGameState3 +label Label_CA30 UpdateSprites +label Label_CA53 UpdateSprites2 +label Label_CA56 CallCBAE +label Label_CA5C CallCBB7 +label Label_CAA9 CopyToOAM +label Label_CAB9 CopyFromOAM +label Label_CAC9 UpdateSpriteData +label Label_CB1B HandleController +label Label_CBAE ClearZeropage +label Label_CBB7 WaitVBlank_1 +label Label_CBBD UpdateScroll +label Label_CBCA UpdateScroll2 +label Label_CBF4 UpdateScroll3 +label Label_CBF5 UpdateOAM +label Label_CBF7 UpdateOAM2 +label Label_CC03 UpdateOAM3 +label Label_CC04 UpdateScroll4 +label Label_CC23 UpdateScroll5 +label Label_CC34 UpdateScroll6 +label Label_CC47 InitScroll +label Label_CCC1 UpdateScroll7 +label Label_CCD6 UpdateScroll8 +label Label_CCF4 CheckGameState_1 +label Label_CD22 UpdateGameTimer +label Label_CD6F UpdateSpritePosition +label Label_CD76 UpdateSpritePosition2 +label Label_CD7F UpdateSpritePosition3 +label Label_CD89 UpdateSpritePosition4 +label Label_CD9D UpdateSpritePosition5 +label Label_CDB1 UpdateSpritePosition6 +label Label_CDCA UpdateSpritePosition7 +label Label_CE0E UpdateSpritePosition8 +label Label_CE24 UpdateSpritePosition9 +label Label_CE7C UpdateSpritePosition10 +label Label_CED6 UpdateSpritePosition11 +label Label_CF13 UpdateSpritePosition12 +label Label_CF19 UpdateSpritePosition13_1 +label Label_CF1C UpdateSpritePosition13_3 +label Label_CF2B UpdateSpritePosition14 +label Label_CF42 UpdateSpritePosition15 +label Label_CF87 UpdateSpritePosition16 +label Label_CFA8 UpdateSpritePosition17 +label Label_CFC6 UpdateSpritePosition18 +label Label_D008 UpdateSpritePosition19 +label Label_D032 UpdateSpritePosition20 +label Label_D041 UpdateSpritePosition21_1 +label Label_D04C UpdateSpritePosition21_3 +label Label_D086 UpdateSpritePosition22_1 +label Label_D0B5 UpdateSpritePosition22_3 +label Label_D0C0 UpdateSpritePosition23 +label Label_D11F UpdateSpritePosition24 +label Label_D169 UpdateSpritePosition25 +label Label_D175 UpdateSpritePosition26 +label Label_D19A UpdateSpritePosition27 +label Label_D1A4 UpdateSpritePosition28 +label Label_D1AA UpdateSpritePosition29 +label Label_D1CF UpdateSpritePosition30 +label Label_D208 UpdateSpritePosition31 +label Label_D25D UpdateSpritePosition32 +label Label_D275 UpdateSpritePosition33 +label Label_D28B UpdateSpritePosition34 +label Label_D2CB UpdateSpritePosition35 +label Label_D2DF UpdateSpritePosition36 +label Label_D2FD UpdateSpritePosition37 +label Label_D323 UpdateSpritePosition38 +label Label_D326 UpdateSpritePosition39 +label Label_D32F UpdateSpritePosition40 +label Label_D360 UpdateSpritePosition41 +label Label_D36A UpdateSpritePosition42_1 +label Label_D37B UpdateSpritePosition42_3 +label Label_D37E UpdateSpritePosition43 +label Label_D38E UpdateSpritePosition44 +label Label_D3AA UpdateSpritePosition45 +label Label_D3CC UpdateSpritePosition46 +label Label_D4A1 UpdateSpritePosition47 +label Label_D4B9 UpdateSpritePosition48 +label Label_D4CF UpdateSpritePosition49 +label Label_D4F0 UpdateSpritePosition50 +label Label_D5C1 UpdateSpritePosition51 +label Label_D5D1 UpdateSpritePosition52 +label Label_D5F5 UpdateSpritePosition53 +label Label_D6A8 UpdateSpritePosition54 +label Label_D730 UpdateSpritePosition55 +label Label_D739 UpdateSpritePosition56 +label Label_DBB6 UpdateSpritePosition57 +label Label_DBC8 UpdateSpritePosition58 +label Label_DBE3 UpdateSpritePosition59 +label Label_DBFA UpdateSpritePosition60 +label Label_DC0D UpdateSpritePosition61 +label Label_DC11 UpdateSpritePosition62 +label Label_DC3E UpdateSpritePosition63 +label Label_DCAA UpdateSpritePosition64 +label Label_DCDD UpdateSpritePosition65 +label Label_DCE3 UpdateSpritePosition66 +label Label_DCEC UpdateSpritePosition67 +label Label_DD32 UpdateSpritePosition68 +label Label_DD5D UpdateSpritePosition69 +label Label_DD75 UpdateSpritePosition70 +label Label_DD78 UpdateSpritePosition71 +label Label_DD8F UpdateSpritePosition72 +label Label_DD92 UpdateSpritePosition73 +label Label_DDA3 UpdateSpritePosition74 +label Label_DDAC UpdateSpritePosition75 +label Label_DDBE UpdateSpritePosition76 +label Label_DDBE UpdateSpritePosition77 +label Label_DDC7 UpdateSpritePosition78 +label Label_DDF1 UpdateSpritePosition79 +label Label_DE30 UpdateSpritePosition80 +label Label_DE41 UpdateSpritePosition81 +label Label_DE63 UpdateSpritePosition82 +label Label_DE75 UpdateSpritePosition83 +label Label_DE7E UpdateSpritePosition84 +label Label_DE30 UpdateSoundEngine +label Label_E023 WaitVBlank_3 +label Label_E025 WaitVBlank2 +label Label_E02C WaitVBlank3 +label Label_E035 WaitPPUReady +label Label_E046 WaitFrame +label Label_E049 InitPPU_3 +label Label_E09B InitSprites +label Label_E0E3 DrawSprite +label Label_E0EF WritePPU +label Label_E0F6 WritePPU2 +label Label_E0FD InitGame +label Label_E278 UpdateBallTrajectory +label Label_E28A InitSound_3 +label Label_E293 InitSprites2 +label Label_E2A6 UpdateBallPhysics +label Label_E3E2 UpdateGameMode +label Label_E403 CheckGameState_3 +label Label_E40E UpdateDisplay +label Label_E459 UpdateDisplay2 +label Label_E48C UpdateSprites3 +label Label_E497 UpdateDisplay3 +label Label_E4E2 UpdateDisplay4 +label Label_E506 PlaySound +label Label_E535 PlaySoundEffect +label Label_E54A PlayMusic +label Label_E5B2 UpdateMusic +label Label_E609 UpdateMusicEngine +label Label_E68F UpdateMusicChannel +label Label_E7AC UpdateMusicChannel2 +label Label_E94D UpdateSoundEffects +label Label_E96A UpdateSoundChannel2 +label Label_E9ED UpdateSoundChannel3 +label Label_EA2F UpdateSoundChannels +label Label_EA50 UpdateSoundEffect +label Label_EA58 UpdateSoundEffect2 +label Label_EAD1 UpdateSoundChannel4 +label Label_EAE5 UpdateSoundChannel5 +label Label_EB0D UpdateSoundChannel6 +label Label_EB27 UpdateSoundChannel7 +label Label_EB9D UpdateSoundChannel8 +label Label_EBF9 UpdateSoundChannel9 +label Label_EC80 UpdateMusic2 +label Label_EC8D UpdateMusicChannel10 +label Label_ED06 UpdateMusicChannel11 +label Label_EDB0 UpdateMusicChannel12 +label Label_EDED UpdateMusicChannel13 +label Label_EDF2 UpdateMusicChannel14 +label Label_EE3D UpdateMusicChannel15 +label Label_EE4D UpdateMusicChannel16 +label Label_EF28 UpdateMusicChannel17 +label Label_EF79 UpdateMusicChannel18 +label Label_EFD3 UpdateMusicChannel19 +label Label_EFDC UpdateMusicChannel20 +label Label_F03F UpdateMusicChannel21 +label Label_F06F UpdateMusicChannel22 +label Label_F0C4 UpdateMusicChannel23 +label Label_F0DF UpdateMusicChannel24_1 +label Label_F0E7 UpdateMusicChannel24_3 +label Label_F138 UpdateMusicChannel25 +label Label_F140 UpdateMusicChannel26_1 +label Label_F1FB UpdateMusicChannel26_3 +label Label_F226 UpdateMusicChannel27 +label Label_F2F0 UpdateMusicChannel28 +label Label_F321 UpdateMusicChannel29 +label Label_F3B9 UpdateMusicChannel30 +label Label_F3E8 UpdateMusicChannel31 +label Label_F41E UpdateMusicChannel32 +label Label_F44B UpdateMusicChannel33 +label Label_FB2C UpdateAPU +label Label_FB40 UpdateAPU2 +label Label_FB43 UpdateAPU3 +label Label_FB46 UpdateAPU4 +label Label_FB49 UpdateAPU5 +label Label_FB5D UpdateAPU6 +label Label_FB6E UpdateAPU7 +label Label_FBDD UpdateAPU8 +label Label_FC0F UpdateAPU9 +label Label_FC2B UpdateAPU10 +label Label_FC72 UpdateAPU11 +label Label_FCE2 UpdateAPU12 +label Label_FD0D UpdateAPU13 +label Label_FD55 UpdateAPU14 +label Label_FD91 UpdateAPU15 +label Label_FFDC UpdateAPU16 +label Label_FFE3 UpdateAPU17 +label Label_FFE9 UpdateAPU18 +label Label_FFF0 UpdateAPU19 +label Label_FFF7 ResetVector + +zp Zp00 TempPtrLo +zp Zp01 TempPtrHi +zp Zp02 TempReg +zp Zp03 TempReg2 +zp Zp04 TempReg3 +zp Zp05 TempReg3 +zp Zp06 TempReg4 +zp Zp07 TempReg5 +zp Zp08 TempReg6 +zp Zp09 TempReg7 +zp Zp0A TempReg8 +zp Zp0B TempReg9 +zp Zp0C TempReg10 +zp Zp0D TempReg11 +zp Zp0E TempReg12 +zp Zp0F TempReg13 +zp Zp10 PPUCtrlShadow +zp Zp11 PPUMaskShadow +zp Zp12 PPUScrollX +zp Zp13 PPUScrollY +zp Zp10 PPUCtrlShadow +zp Zp11 PPUMaskShadow +zp Zp12 PPUScrollX +zp Zp13 PPUScrollY +zp Zp14 TempReg14 +zp Zp15 TempReg15 +zp Zp16 TempReg16 +zp Zp17 TempReg17 +zp Zp18 TempReg18 +zp Zp19 TempReg19 +zp Zp1A TempReg20 +zp Zp1B TempReg21 +zp Zp1C TempReg22 +zp Zp1D TempReg23 +zp Zp1E TempReg24 +zp Zp1F TempReg25 +zp Zp20 TempReg26 +zp Zp21 TempReg27 +zp Zp22 TempReg28 +zp Zp23 TempReg29 +zp Zp24 TempReg30 +zp Zp25 TempReg31 +zp Zp26 TempReg32 +zp Zp27 TempReg33 +zp Zp28 TempReg34 +zp Zp29 TempReg35 +zp Zp2A TempReg36 +zp Zp2B TempReg37 +zp Zp2C TempReg38 +zp Zp2D TempReg39 +zp Zp2E TempReg40 +zp Zp2F TempReg41 +zp Zp2F TempReg42 +zp Zp30 TempReg43 +zp Zp31 TempReg44 +zp Zp32 TempReg45 +zp Zp33 TempReg46 +zp Zp34 TempReg47 +zp Zp35 TempReg48 +zp Zp36 TempReg49 +zp Zp37 TempReg50 +zp Zp38 TempReg51 +zp Zp39 TempReg52 +zp Zp3A TempReg53 +zp Zp3B TempReg54 +zp Zp3C TempReg55 +zp Zp3D TempReg56 +zp Zp3E TempReg57 +zp Zp3F TempReg58 +zp Zp40 TempReg59 +zp Zp41 TempReg60 +zp Zp42 TempReg61 +zp Zp43 TempReg62 +zp Zp44 TempReg63 +zp Zp45 TempReg64 +zp Zp46 TempReg65 +zp Zp47 TempReg66 +zp Zp48 TempReg67 +zp Zp49 TempReg68 +zp Zp4A TempReg69 +zp Zp4B TempReg70 +zp Zp4C TempReg71 +zp Zp4D TempReg72 +zp Zp4E TempReg73 +zp Zp4F TempReg74 +zp Zp50 TempReg75 +zp Zp51 TempReg76 +zp Zp52 TempReg77 +zp Zp53 TempReg78 +zp Zp54 TempReg79 +zp Zp55 TempReg80 +zp Zp56 TempReg81 +zp Zp57 TempReg82 +zp Zp58 TempReg83 +zp Zp59 TempReg84 +zp Zp5A TempReg85 +zp Zp5B TempReg86 +zp Zp5C TempReg87 +zp Zp5D TempReg88 +zp Zp5E TempReg89 +zp Zp5F TempReg90 +zp Zp5F TempReg91 +zp Zp60 TempReg92 +zp Zp61 TempReg93 +zp Zp62 TempReg94 +zp Zp63 TempReg95 +zp Zp64 TempReg96 +zp Zp65 TempReg96 +zp Zp66 TempReg97 +zp Zp67 TempReg98 +zp Zp68 TempReg99 +zp Zp69 TempReg100 +zp Zp6A TempReg101 +zp Zp6B TempReg102 +zp Zp6C TempReg103 +zp Zp6D TempReg104 +zp Zp6E TempReg105 +zp Zp6F TempReg106 +zp Zp70 TempReg107 +zp Zp71 TempReg108 +zp Zp72 TempReg109 +zp Zp73 TempReg110 +zp Zp74 TempReg111 +zp Zp75 TempReg111 +zp Zp76 TempReg112 +zp Zp77 TempReg113 +zp Zp78 TempReg114 +zp Zp79 TempReg115 +zp Zp7A TempReg116 +zp Zp7B TempReg117 +zp Zp7C TempReg118 +zp Zp7D TempReg119 +zp Zp7E TempReg120 +zp Zp7F TempReg121 +zp Zp80 TempReg122 +zp Zp81 TempReg123 +zp Zp82 TempReg124 +zp Zp83 TempReg125 +zp Zp84 TempReg126 +zp Zp85 TempReg127 +zp Zp86 TempReg128 +zp Zp87 TempReg129 +zp Zp88 TempReg130 +zp Zp89 TempReg131 +zp Zp8A TempReg132 +zp Zp8B TempReg133 +zp Zp8C TempReg134 +zp Zp8D TempReg135 +zp Zp8E TempReg136 +zp Zp8F TempReg137 +zp Zp90 TempReg138 +zp Zp91 TempReg139 +zp Zp92 TempReg140 +zp Zp93 TempReg141 +zp Zp94 TempReg141 +zp Zp95 TempReg142 +zp Zp96 TempReg143 +zp Zp97 TempReg144 +zp Zp98 TempReg145 +zp Zp99 TempReg146 +zp Zp9A TempReg147 +zp Zp9B TempReg148 +zp Zp9C TempReg149 +zp Zp9D TempReg150 +zp Zp9E TempReg151 +zp Zp9F TempReg152 +zp ZpA0 TempReg153 +zp ZpA1 TempReg154 +zp ZpA2 TempReg155 +zp ZpA3 TempReg156 +zp ZpA4 TempReg157 +zp ZpA5 TempReg158 +zp ZpA6 TempReg159 +zp ZpA7 TempReg160 +zp ZpA8 TempReg161 +zp ZpA9 TempReg162 +zp ZpAA TempReg163 +zp ZpAB TempReg164 +zp ZpAC TempReg165 +zp ZpAD TempReg166 +zp ZpAE TempReg167 +zp ZpAF TempReg168 +zp ZpB0 TempReg169 +zp ZpB1 TempReg170 +zp ZpB2 TempReg171 +zp ZpB3 TempReg172 +zp ZpB4 TempReg173 +zp ZpB5 TempReg174 +zp ZpB6 TempReg175 +zp ZpB7 TempReg176 +zp ZpB8 TempReg177 +zp ZpB9 TempReg177 +zp ZpBA TempReg178 +zp ZpBB TempReg179 +zp ZpBC TempReg180 +zp ZpBD TempReg181 +zp ZpBE TempReg182 +zp ZpBF TempReg183 +zp ZpC0 TempReg184 +zp ZpC1 TempReg185 +zp ZpC2 TempReg186 +zp ZpC3 TempReg187 +zp ZpC4 TempReg188 +zp ZpC5 TempReg189 +zp ZpC6 TempReg190 +zp ZpC7 TempReg191 +zp ZpC8 TempReg192 +zp ZpC9 TempReg193 +zp ZpCA TempReg194 +zp ZpCB TempReg195 +zp ZpCC TempReg196 +zp ZpCD TempReg197 +zp ZpCE TempReg198 +zp ZpCF TempReg199 +zp ZpD0 TempReg185 +zp ZpD1 TempReg186 +zp ZpD2 TempReg187 +zp ZpD3 TempReg188 +zp ZpD4 TempReg189 +zp ZpD5 TempReg190 +zp ZpD6 TempReg191 +zp ZpD7 TempReg192 +zp ZpD8 TempReg193 +zp ZpD9 TempReg194 +zp ZpDA TempReg195 +zp ZpDB TempReg196 +zp ZpDC TempReg197 +zp ZpDD TempReg198 +zp ZpDE TempReg199 +zp ZpDF TempReg200 +zp ZpE0 TempReg201 +zp ZpE1 TempReg202 +zp ZpE2 TempReg203 +zp ZpE3 TempReg204 +zp ZpE4 TempReg205 +zp ZpE5 TempReg206 +zp ZpE6 TempReg207 +zp ZpE7 TempReg208 +zp ZpE8 TempReg209 +zp ZpE9 TempReg210 +zp ZpEA TempReg211 +zp ZpEB TempReg212 +zp ZpEC TempReg213 +zp ZpED TempReg214 +zp ZpEE TempReg215 +zp ZpEF TempReg216 +zp ZpF0 TempReg217 +zp ZpF1 TempReg218 +zp ZpF2 TempReg219 +zp ZpF3 TempReg220 +zp ZpF4 TempReg221 +zp ZpF5 TempReg222 +zp ZpF6 TempReg223 +zp ZpF7 TempReg224 +zp ZpF8 TempReg225 +zp ZpF9 TempReg226 +zp ZpFA TempReg227 +zp ZpFB TempReg228 +zp ZpFC TempReg229 +zp ZpFD TempReg230 +zp ZpFE TempReg231 +zp ZpFF TempReg232 \ No newline at end of file diff --git a/_wip/Donkey Kong (JU)/copilot/prg.s b/_wip/Donkey Kong (JU)/copilot/prg.s index 6f60cce..c31955e 100644 --- a/_wip/Donkey Kong (JU)/copilot/prg.s +++ b/_wip/Donkey Kong (JU)/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: +; $C79E, $C85F, $FFF0 ; .setcpu "6502" @@ -211,7 +213,7 @@ Label_C7B9: sta $2000 ; CPU:$C7DC PRG:07DC 8D 00 20 sta Zp10 ; CPU:$C7DF PRG:07DF 85 10 ; ----------------------------------------------------------------------------- -; Routine: Label_C7E1 +; Routine: GameLoopEntry ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -219,11 +221,11 @@ Label_C7B9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C7E1: +GameLoopEntry: jsr $F4ED ; CPU:$C7E1 PRG:07E1 20 ED F4 jmp $C7E1 ; CPU:$C7E4 PRG:07E4 4C E1 C7 ; ----------------------------------------------------------------------------- -; Routine: Label_C7E7 +; Routine: InitPPURegisters ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -231,7 +233,7 @@ Label_C7E1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C7E7: +InitPPURegisters: lda #$10 ; CPU:$C7E7 PRG:07E7 A9 10 sta $2000 ; CPU:$C7E9 PRG:07E9 8D 00 20 sta Zp10 ; CPU:$C7EC PRG:07EC 85 10 @@ -378,9 +380,9 @@ NmiHandler: sta $2001 ; CPU:$C88D PRG:088D 8D 01 20 jsr $FA48 ; CPU:$C890 PRG:0890 20 48 FA lda Zp4E ; CPU:$C893 PRG:0893 A5 4E - bne Label_C8C1 ; CPU:$C895 PRG:0895 D0 2A + bne NmiFrameUpdate ; CPU:$C895 PRG:0895 D0 2A lda Zp4F ; CPU:$C897 PRG:0897 A5 4F - beq Label_C8D4 ; CPU:$C899 PRG:0899 F0 39 + beq NmiFrameUpdate3 ; CPU:$C899 PRG:0899 F0 39 lda Zp9A ; CPU:$C89B PRG:089B A5 9A bne Label_C8A5 ; CPU:$C89D PRG:089D D0 06 jsr $CE7C ; CPU:$C89F PRG:089F 20 7C CE @@ -397,10 +399,10 @@ NmiHandler: Label_C8A5: lda $044F ; CPU:$C8A5 PRG:08A5 AD 4F 04 cmp #$08 ; CPU:$C8A8 PRG:08A8 C9 08 - bne Label_C8D4 ; CPU:$C8AA PRG:08AA D0 28 + bne NmiFrameUpdate3 ; CPU:$C8AA PRG:08AA D0 28 jsr $CCF4 ; CPU:$C8AC PRG:08AC 20 F4 CC lda Zp43 ; CPU:$C8AF PRG:08AF A5 43 - bne Label_C8D7 ; CPU:$C8B1 PRG:08B1 D0 24 + bne NmiFrameUpdate4 ; CPU:$C8B1 PRG:08B1 D0 24 lda #$00 ; CPU:$C8B3 PRG:08B3 A9 00 sta $044F ; CPU:$C8B5 PRG:08B5 8D 4F 04 sta Zp4F ; CPU:$C8B8 PRG:08B8 85 4F @@ -408,7 +410,7 @@ Label_C8A5: sta Zp43 ; CPU:$C8BC PRG:08BC 85 43 jmp $C8D7 ; CPU:$C8BE PRG:08BE 4C D7 C8 ; ----------------------------------------------------------------------------- -; Routine: Label_C8C1 +; Routine: NmiFrameUpdate ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -416,13 +418,13 @@ Label_C8A5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C8C1: +NmiFrameUpdate: lda Zp55 ; CPU:$C8C1 PRG:08C1 A5 55 - bne Label_C8CB ; CPU:$C8C3 PRG:08C3 D0 06 + bne NmiFrameUpdate2 ; CPU:$C8C3 PRG:08C3 D0 06 jsr $CA30 ; CPU:$C8C5 PRG:08C5 20 30 CA jmp $C8D7 ; CPU:$C8C8 PRG:08C8 4C D7 C8 ; ----------------------------------------------------------------------------- -; Routine: Label_C8CB +; Routine: NmiFrameUpdate2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -430,12 +432,12 @@ Label_C8C1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C8CB: +NmiFrameUpdate2: jsr $C8F3 ; CPU:$C8CB PRG:08CB 20 F3 C8 jsr $F4AC ; CPU:$C8CE PRG:08CE 20 AC F4 jmp $C8D7 ; CPU:$C8D1 PRG:08D1 4C D7 C8 ; ----------------------------------------------------------------------------- -; Routine: Label_C8D4 +; Routine: NmiFrameUpdate3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -443,10 +445,10 @@ Label_C8CB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C8D4: +NmiFrameUpdate3: jsr $CAC9 ; CPU:$C8D4 PRG:08D4 20 C9 CA ; ----------------------------------------------------------------------------- -; Routine: Label_C8D7 +; Routine: NmiFrameUpdate4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -454,16 +456,16 @@ Label_C8D4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C8D7: +NmiFrameUpdate4: lda $0505 ; CPU:$C8D7 PRG:08D7 AD 05 05 cmp #$01 ; CPU:$C8DA PRG:08DA C9 01 - bne Label_C8E8 ; CPU:$C8DC PRG:08DC D0 0A + bne NmiFrameEnd ; CPU:$C8DC PRG:08DC D0 0A lda Zp51 ; CPU:$C8DE PRG:08DE A5 51 sta Zp00 ; CPU:$C8E0 PRG:08E0 85 00 jsr $F23C ; CPU:$C8E2 PRG:08E2 20 3C F2 dec $0505 ; CPU:$C8E5 PRG:08E5 CE 05 05 ; ----------------------------------------------------------------------------- -; Routine: Label_C8E8 +; Routine: NmiFrameEnd ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -471,7 +473,7 @@ Label_C8D7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C8E8: +NmiFrameEnd: lda Zp10 ; CPU:$C8E8 PRG:08E8 A5 10 eor #$80 ; CPU:$C8EA PRG:08EA 49 80 sta $2000 ; CPU:$C8EC PRG:08EC 8D 00 20 @@ -479,7 +481,7 @@ Label_C8E8: pla ; CPU:$C8F1 PRG:08F1 68 rti ; CPU:$C8F2 PRG:08F2 40 ; ----------------------------------------------------------------------------- -; Routine: Label_C8F3 +; 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. @@ -487,13 +489,13 @@ Label_C8E8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C8F3: +InitAPU: lda $0102 ; CPU:$C8F3 PRG:08F3 AD 02 01 - bne Label_C8FE ; CPU:$C8F6 PRG:08F6 D0 06 + bne InitSound_1 ; CPU:$C8F6 PRG:08F6 D0 06 sta $4015 ; CPU:$C8F8 PRG:08F8 8D 15 40 sta $0100 ; CPU:$C8FB PRG:08FB 8D 00 01 ; ----------------------------------------------------------------------------- -; Routine: Label_C8FE +; Routine: InitSound_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. @@ -501,9 +503,9 @@ Label_C8F3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C8FE: +InitSound_1: lda $0518 ; CPU:$C8FE PRG:08FE AD 18 05 - bne Label_C914 ; CPU:$C901 PRG:0901 D0 11 + bne InitLevel ; CPU:$C901 PRG:0901 D0 11 lda #$80 ; CPU:$C903 PRG:0903 A9 80 sta ZpFD ; CPU:$C905 PRG:0905 85 FD lda #$04 ; CPU:$C907 PRG:0907 A9 04 @@ -512,7 +514,7 @@ Label_C8FE: sta $4015 ; CPU:$C90E PRG:090E 8D 15 40 sta $0100 ; CPU:$C911 PRG:0911 8D 00 01 ; ----------------------------------------------------------------------------- -; Routine: Label_C914 +; 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. @@ -520,9 +522,9 @@ Label_C8FE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C914: +InitLevel: lda $0510 ; CPU:$C914 PRG:0914 AD 10 05 - bne Label_C940 ; CPU:$C917 PRG:0917 D0 27 + bne UpdateGameState ; CPU:$C917 PRG:0917 D0 27 jsr $D19A ; CPU:$C919 PRG:0919 20 9A D1 lda #$08 ; CPU:$C91C PRG:091C A9 08 jsr $C807 ; CPU:$C91E PRG:091E 20 07 C8 @@ -540,7 +542,7 @@ Label_C914: sta Zp44 ; CPU:$C93D PRG:093D 85 44 rts ; CPU:$C93F PRG:093F 60 ; ----------------------------------------------------------------------------- -; Routine: Label_C940 +; 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. @@ -548,13 +550,13 @@ Label_C914: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C940: +UpdateGameState: lda Zp15 ; CPU:$C940 PRG:0940 A5 15 and #$20 ; CPU:$C942 PRG:0942 29 20 - bne Label_C95D ; CPU:$C944 PRG:0944 D0 17 + bne UpdateGameState2 ; CPU:$C944 PRG:0944 D0 17 lda Zp15 ; CPU:$C946 PRG:0946 A5 15 and #$10 ; CPU:$C948 PRG:0948 29 10 - bne Label_C98A ; CPU:$C94A PRG:094A D0 3E + bne UpdateGameState3 ; CPU:$C94A PRG:094A D0 3E lda #$00 ; CPU:$C94C PRG:094C A9 00 sta $0512 ; CPU:$C94E PRG:094E 8D 12 05 lda Zp44 ; CPU:$C951 PRG:0951 A5 44 @@ -574,7 +576,7 @@ Label_C940: Label_C95C: rts ; CPU:$C95C PRG:095C 60 ; ----------------------------------------------------------------------------- -; Routine: Label_C95D +; Routine: UpdateGameState2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its 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_C95C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C95D: +UpdateGameState2: lda #$40 ; CPU:$C95D PRG:095D A9 40 sta Zp44 ; CPU:$C95F PRG:095F 85 44 lda $0512 ; CPU:$C961 PRG:0961 AD 12 05 @@ -635,7 +637,7 @@ Label_C985: Label_C989: rts ; CPU:$C989 PRG:0989 60 ; ----------------------------------------------------------------------------- -; Routine: Label_C98A +; Routine: UpdateGameState3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -643,7 +645,7 @@ Label_C989: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_C98A: +UpdateGameState3: sta $0514 ; CPU:$C98A PRG:098A 8D 14 05 ldx #$0A ; CPU:$C98D PRG:098D A2 0A lda #$00 ; CPU:$C98F PRG:098F A9 00 @@ -771,7 +773,7 @@ Label_CA26: sta Zp43 ; CPU:$CA2B PRG:0A2B 85 43 jmp $CBAE ; CPU:$CA2D PRG:0A2D 4C AE CB ; ----------------------------------------------------------------------------- -; Routine: Label_CA30 +; 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. @@ -779,7 +781,7 @@ Label_CA26: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CA30: +UpdateSprites: jsr $F4AC ; CPU:$CA30 PRG:0A30 20 AC F4 lda Zp58 ; CPU:$CA33 PRG:0A33 A5 58 bne Label_CA4A ; CPU:$CA35 PRG:0A35 D0 13 @@ -808,7 +810,7 @@ Label_CA4A: sta Zp58 ; CPU:$CA4E PRG:0A4E 85 58 sta $0510 ; CPU:$CA50 PRG:0A50 8D 10 05 ; ----------------------------------------------------------------------------- -; Routine: Label_CA53 +; Routine: UpdateSprites2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -816,7 +818,7 @@ Label_CA4A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CA53: +UpdateSprites2: jsr $CBB7 ; CPU:$CA53 PRG:0A53 20 B7 CB jsr $CBAE ; CPU:$CA56 PRG:0A56 20 AE CB rts ; CPU:$CA59 PRG:0A59 60 @@ -917,7 +919,7 @@ Label_CA99: stx Zp52 ; CPU:$CAA4 PRG:0AA4 86 52 jmp $CAA9 ; CPU:$CAA6 PRG:0AA6 4C A9 CA ; ----------------------------------------------------------------------------- -; Routine: Label_CAA9 +; Routine: CopyToOAM ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -925,7 +927,7 @@ Label_CA99: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CAA9: +CopyToOAM: ldy #$00 ; CPU:$CAA9 PRG:0AA9 A0 00 ; ----------------------------------------------------------------------------- ; Routine: Label_CAAB @@ -946,7 +948,7 @@ Label_CAAB: bne Label_CAAB ; CPU:$CAB6 PRG:0AB6 D0 F3 rts ; CPU:$CAB8 PRG:0AB8 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CAB9 +; Routine: CopyFromOAM ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -954,7 +956,7 @@ Label_CAAB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CAB9: +CopyFromOAM: ldy #$00 ; CPU:$CAB9 PRG:0AB9 A0 00 ; ----------------------------------------------------------------------------- ; Routine: Label_CABB @@ -975,7 +977,7 @@ Label_CABB: bne Label_CABB ; CPU:$CAC6 PRG:0AC6 D0 F3 rts ; CPU:$CAC8 PRG:0AC8 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CAC9 +; Routine: UpdateSpriteData ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -983,7 +985,7 @@ Label_CABB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CAC9: +UpdateSpriteData: jsr $F4AC ; CPU:$CAC9 PRG:0AC9 20 AC F4 lda Zp53 ; CPU:$CACC PRG:0ACC A5 53 cmp #$01 ; CPU:$CACE PRG:0ACE C9 01 @@ -1093,7 +1095,7 @@ Label_CB15: Label_CB18: jmp $CB1B ; CPU:$CB18 PRG:0B18 4C 1B CB ; ----------------------------------------------------------------------------- -; Routine: Label_CB1B +; Routine: HandleController ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1101,7 +1103,7 @@ Label_CB18: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CB1B: +HandleController: cmp #$7A ; CPU:$CB1B PRG:0B1B C9 7A beq Label_CB30 ; CPU:$CB1D PRG:0B1D F0 11 cmp #$75 ; CPU:$CB1F PRG:0B1F C9 75 @@ -1254,7 +1256,7 @@ Label_CB9E: dec Zp43 ; CPU:$CBAB PRG:0BAB C6 43 rts ; CPU:$CBAD PRG:0BAD 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CBAE +; Routine: ClearZeropage ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1262,13 +1264,13 @@ Label_CB9E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CBAE: +ClearZeropage: lda #$00 ; CPU:$CBAE PRG:0BAE A9 00 sta Zp04 ; CPU:$CBB0 PRG:0BB0 85 04 lda #$FF ; CPU:$CBB2 PRG:0BB2 A9 FF jmp $F092 ; CPU:$CBB4 PRG:0BB4 4C 92 F0 ; ----------------------------------------------------------------------------- -; Routine: Label_CBB7 +; 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. @@ -1276,11 +1278,11 @@ Label_CBAE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CBB7: +WaitVBlank_1: jsr $D19A ; CPU:$CBB7 PRG:0BB7 20 9A D1 jmp $F1B4 ; CPU:$CBBA PRG:0BBA 4C B4 F1 ; ----------------------------------------------------------------------------- -; Routine: Label_CBBD +; Routine: UpdateScroll ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1288,7 +1290,7 @@ Label_CBB7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CBBD: +UpdateScroll: lda #$B5 ; CPU:$CBBD PRG:0BBD A9 B5 sta Zp00 ; CPU:$CBBF PRG:0BBF 85 00 lda #$20 ; CPU:$CBC1 PRG:0BC1 A9 20 @@ -1296,7 +1298,7 @@ Label_CBBD: ldy Zp55 ; CPU:$CBC5 PRG:0BC5 A4 55 jmp $F4C2 ; CPU:$CBC7 PRG:0BC7 4C C2 F4 ; ----------------------------------------------------------------------------- -; Routine: Label_CBCA +; Routine: UpdateScroll2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1304,16 +1306,16 @@ Label_CBBD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CBCA: +UpdateScroll2: lda Zp58 ; CPU:$CBCA PRG:0BCA A5 58 - bne Label_CBF4 ; CPU:$CBCC PRG:0BCC D0 26 + bne UpdateScroll3 ; CPU:$CBCC PRG:0BCC D0 26 lda Zp51 ; CPU:$CBCE PRG:0BCE A5 51 cmp #$1C ; CPU:$CBD0 PRG:0BD0 C9 1C - bne Label_CBF4 ; CPU:$CBD2 PRG:0BD2 D0 20 + bne UpdateScroll3 ; CPU:$CBD2 PRG:0BD2 D0 20 ldx Zp52 ; CPU:$CBD4 PRG:0BD4 A6 52 lda Zp53 ; CPU:$CBD6 PRG:0BD6 A5 53 cmp $0400,x ; CPU:$CBD8 PRG:0BD8 DD 00 04 - bne Label_CBF4 ; CPU:$CBDB PRG:0BDB D0 17 + bne UpdateScroll3 ; CPU:$CBDB PRG:0BDB D0 17 ldy #$00 ; CPU:$CBDD PRG:0BDD A0 00 ; ----------------------------------------------------------------------------- ; Routine: Label_CBDF @@ -1341,11 +1343,11 @@ Label_CBDF: ; ----------------------------------------------------------------------------- Label_CBEB: lda Zp52 ; CPU:$CBEB PRG:0BEB A5 52 - beq Label_CBF4 ; CPU:$CBED PRG:0BED F0 05 + beq UpdateScroll3 ; CPU:$CBED PRG:0BED F0 05 lda #$67 ; CPU:$CBEF PRG:0BEF A9 67 sta $0345 ; CPU:$CBF1 PRG:0BF1 8D 45 03 ; ----------------------------------------------------------------------------- -; Routine: Label_CBF4 +; Routine: UpdateScroll3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1353,10 +1355,10 @@ Label_CBEB: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CBF4: +UpdateScroll3: rts ; CPU:$CBF4 PRG:0BF4 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CBF5 +; Routine: UpdateOAM ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1364,10 +1366,10 @@ Label_CBF4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CBF5: +UpdateOAM: ldy #$00 ; CPU:$CBF5 PRG:0BF5 A0 00 ; ----------------------------------------------------------------------------- -; Routine: Label_CBF7 +; Routine: UpdateOAM2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1375,14 +1377,14 @@ Label_CBF5: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CBF7: +UpdateOAM2: lda $C6C2,y ; CPU:$CBF7 PRG:0BF7 B9 C2 C6 sta $0331,y ; CPU:$CBFA PRG:0BFA 99 31 03 - beq Label_CC03 ; CPU:$CBFD PRG:0BFD F0 04 + beq UpdateOAM3 ; CPU:$CBFD PRG:0BFD F0 04 iny ; CPU:$CBFF PRG:0BFF C8 jmp $CBF7 ; CPU:$CC00 PRG:0C00 4C F7 CB ; ----------------------------------------------------------------------------- -; Routine: Label_CC03 +; Routine: UpdateOAM3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1390,10 +1392,10 @@ Label_CBF7: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CC03: +UpdateOAM3: rts ; CPU:$CC03 PRG:0C03 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CC04 +; Routine: UpdateScroll4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1401,12 +1403,12 @@ Label_CC03: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CC04: +UpdateScroll4: lda Zp58 ; CPU:$CC04 PRG:0C04 A5 58 - bne Label_CC23 ; CPU:$CC06 PRG:0C06 D0 1B + bne UpdateScroll5 ; CPU:$CC06 PRG:0C06 D0 1B ldx Zp52 ; CPU:$CC08 PRG:0C08 A6 52 lda $0408,x ; CPU:$CC0A PRG:0C0A BD 08 04 - bne Label_CC23 ; CPU:$CC0D PRG:0C0D D0 14 + bne UpdateScroll5 ; CPU:$CC0D PRG:0C0D D0 14 txa ; CPU:$CC0F PRG:0C0F 8A tay ; CPU:$CC10 PRG:0C10 A8 clc ; CPU:$CC11 PRG:0C11 18 @@ -1415,12 +1417,12 @@ Label_CC04: tax ; CPU:$CC14 PRG:0C14 AA lda Zp25,x ; CPU:$CC15 PRG:0C15 B5 25 cmp #$02 ; CPU:$CC17 PRG:0C17 C9 02 - bcc Label_CC23 ; CPU:$CC19 PRG:0C19 90 08 + bcc UpdateScroll5 ; CPU:$CC19 PRG:0C19 90 08 sta $0408,y ; CPU:$CC1B PRG:0C1B 99 08 04 inc Zp55 ; CPU:$CC1E PRG:0C1E E6 55 jsr $CBBD ; CPU:$CC20 PRG:0C20 20 BD CB ; ----------------------------------------------------------------------------- -; Routine: Label_CC23 +; Routine: UpdateScroll5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1428,7 +1430,7 @@ Label_CC04: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CC23: +UpdateScroll5: rts ; CPU:$CC23 PRG:0C23 60 ; ----------------------------------------------------------------------------- ; Routine: Label_CC24 @@ -1448,7 +1450,7 @@ Label_CC24: jsr $F342 ; CPU:$CC2E PRG:0C2E 20 42 F3 jmp $D032 ; CPU:$CC31 PRG:0C31 4C 32 D0 ; ----------------------------------------------------------------------------- -; Routine: Label_CC34 +; Routine: UpdateScroll6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1456,7 +1458,7 @@ Label_CC24: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CC34: +UpdateScroll6: lda #$01 ; CPU:$CC34 PRG:0C34 A9 01 sta $0505 ; CPU:$CC36 PRG:0C36 8D 05 05 jsr $D032 ; CPU:$CC39 PRG:0C39 20 32 D0 @@ -1465,7 +1467,7 @@ Label_CC34: jsr $CCC1 ; CPU:$CC41 PRG:0C41 20 C1 CC jmp $D7F2 ; CPU:$CC44 PRG:0C44 4C F2 D7 ; ----------------------------------------------------------------------------- -; Routine: Label_CC47 +; Routine: InitScroll ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1473,7 +1475,7 @@ Label_CC34: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CC47: +InitScroll: lda #$00 ; CPU:$CC47 PRG:0C47 A9 00 tax ; CPU:$CC49 PRG:0C49 AA ; ----------------------------------------------------------------------------- @@ -1562,7 +1564,7 @@ Label_CCA6: sta $0444 ; CPU:$CCBD PRG:0CBD 8D 44 04 rts ; CPU:$CCC0 PRG:0CC0 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CCC1 +; Routine: UpdateScroll7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1570,7 +1572,7 @@ Label_CCA6: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CCC1: +UpdateScroll7: lda Zp53 ; CPU:$CCC1 PRG:0CC1 A5 53 sec ; CPU:$CCC3 PRG:0CC3 38 sbc #$01 ; CPU:$CCC4 PRG:0CC4 E9 01 @@ -1583,7 +1585,7 @@ Label_CCC1: ldx #$00 ; CPU:$CCD2 PRG:0CD2 A2 00 ldy #$00 ; CPU:$CCD4 PRG:0CD4 A0 00 ; ----------------------------------------------------------------------------- -; Routine: Label_CCD6 +; Routine: UpdateScroll8 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1591,7 +1593,7 @@ Label_CCC1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CCD6: +UpdateScroll8: lda (Zp09),y ; CPU:$CCD6 PRG:0CD6 B1 09 cmp #$FE ; CPU:$CCD8 PRG:0CD8 C9 FE beq Label_CCF3 ; CPU:$CCDA PRG:0CDA F0 17 @@ -1599,7 +1601,7 @@ Label_CCD6: iny ; CPU:$CCDE PRG:0CDE C8 inx ; CPU:$CCDF PRG:0CDF E8 cpx #$05 ; CPU:$CCE0 PRG:0CE0 E0 05 - bne Label_CCD6 ; CPU:$CCE2 PRG:0CE2 D0 F2 + bne UpdateScroll8 ; CPU:$CCE2 PRG:0CE2 D0 F2 sty Zp86 ; CPU:$CCE4 PRG:0CE4 84 86 lda (Zp09),y ; CPU:$CCE6 PRG:0CE6 B1 09 jsr $F096 ; CPU:$CCE8 PRG:0CE8 20 96 F0 @@ -1619,7 +1621,7 @@ Label_CCD6: Label_CCF3: rts ; CPU:$CCF3 PRG:0CF3 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CCF4 +; Routine: CheckGameState_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. @@ -1627,7 +1629,7 @@ Label_CCF3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CCF4: +CheckGameState_1: lda $0450 ; CPU:$CCF4 PRG:0CF4 AD 50 04 bne Label_CD07 ; CPU:$CCF7 PRG:0CF7 D0 0E lda #$01 ; CPU:$CCF9 PRG:0CF9 A9 01 @@ -1669,7 +1671,7 @@ Label_CD13: sta Zp9A ; CPU:$CD1D PRG:0D1D 85 9A jmp $CA53 ; CPU:$CD1F PRG:0D1F 4C 53 CA ; ----------------------------------------------------------------------------- -; Routine: Label_CD22 +; Routine: UpdateGameTimer ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1677,7 +1679,7 @@ Label_CD13: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CD22: +UpdateGameTimer: lda Zp43 ; CPU:$CD22 PRG:0D22 A5 43 cmp #$9F ; CPU:$CD24 PRG:0D24 C9 9F beq Label_CD45 ; CPU:$CD26 PRG:0D26 F0 1D @@ -1794,7 +1796,7 @@ Label_CD69: Label_CD6C: jmp $CE24 ; CPU:$CD6C PRG:0D6C 4C 24 CE ; ----------------------------------------------------------------------------- -; Routine: Label_CD6F +; 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. @@ -1802,12 +1804,12 @@ Label_CD6C: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CD6F: +UpdateSpritePosition: ldy #$0C ; CPU:$CD6F PRG:0D6F A0 0C lda #$0A ; CPU:$CD71 PRG:0D71 A9 0A jmp $C823 ; CPU:$CD73 PRG:0D73 4C 23 C8 ; ----------------------------------------------------------------------------- -; Routine: Label_CD76 +; Routine: UpdateSpritePosition2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1815,14 +1817,14 @@ Label_CD6F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CD76: +UpdateSpritePosition2: lda (Zp00),y ; CPU:$CD76 PRG:0D76 B1 00 sta $0331,y ; CPU:$CD78 PRG:0D78 99 31 03 dey ; CPU:$CD7B PRG:0D7B 88 - bpl Label_CD76 ; CPU:$CD7C PRG:0D7C 10 F8 + bpl UpdateSpritePosition2 ; CPU:$CD7C PRG:0D7C 10 F8 rts ; CPU:$CD7E PRG:0D7E 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CD7F +; Routine: UpdateSpritePosition3 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1830,13 +1832,13 @@ Label_CD76: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CD7F: +UpdateSpritePosition3: jsr $CBAE ; CPU:$CD7F PRG:0D7F 20 AE CB ldy #$16 ; CPU:$CD82 PRG:0D82 A0 16 lda #$0C ; CPU:$CD84 PRG:0D84 A9 0C jmp $C823 ; CPU:$CD86 PRG:0D86 4C 23 C8 ; ----------------------------------------------------------------------------- -; Routine: Label_CD89 +; Routine: UpdateSpritePosition4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1844,7 +1846,7 @@ Label_CD7F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CD89: +UpdateSpritePosition4: ldy #$0C ; CPU:$CD89 PRG:0D89 A0 0C lda #$0E ; CPU:$CD8B PRG:0D8B A9 0E jsr $C823 ; CPU:$CD8D PRG:0D8D 20 23 C8 @@ -1855,7 +1857,7 @@ Label_CD89: lda #$50 ; CPU:$CD98 PRG:0D98 A9 50 jmp $F08C ; CPU:$CD9A PRG:0D9A 4C 8C F0 ; ----------------------------------------------------------------------------- -; Routine: Label_CD9D +; Routine: UpdateSpritePosition5 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its 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_CD89: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CD9D: +UpdateSpritePosition5: lda #$8D ; CPU:$CD9D PRG:0D9D A9 8D sta Zp00 ; CPU:$CD9F PRG:0D9F 85 00 lda #$20 ; CPU:$CDA1 PRG:0DA1 A9 20 @@ -1884,7 +1886,7 @@ Label_CD9D: Label_CDAE: jmp $EB92 ; CPU:$CDAE PRG:0DAE 4C 92 EB ; ----------------------------------------------------------------------------- -; Routine: Label_CDB1 +; Routine: UpdateSpritePosition6 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1892,7 +1894,7 @@ Label_CDAE: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CDB1: +UpdateSpritePosition6: cmp #$8F ; CPU:$CDB1 PRG:0DB1 C9 8F bne Label_CDD7 ; CPU:$CDB3 PRG:0DB3 D0 22 dec Zp43 ; CPU:$CDB5 PRG:0DB5 C6 43 @@ -1906,7 +1908,7 @@ Label_CDB1: lda #$3E ; CPU:$CDC6 PRG:0DC6 A9 3E sta Zp01 ; CPU:$CDC8 PRG:0DC8 85 01 ; ----------------------------------------------------------------------------- -; Routine: Label_CDCA +; Routine: UpdateSpritePosition7 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1914,7 +1916,7 @@ Label_CDB1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CDCA: +UpdateSpritePosition7: lda #$40 ; CPU:$CDCA PRG:0DCA A9 40 sta Zp02 ; CPU:$CDCC PRG:0DCC 85 02 lda #$46 ; CPU:$CDCE PRG:0DCE A9 46 @@ -1977,7 +1979,7 @@ Label_CDF3: lda #$01 ; CPU:$CE09 PRG:0E09 A9 01 jmp $CE0E ; CPU:$CE0B PRG:0E0B 4C 0E CE ; ----------------------------------------------------------------------------- -; Routine: Label_CE0E +; Routine: UpdateSpritePosition8 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -1985,7 +1987,7 @@ Label_CDF3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CE0E: +UpdateSpritePosition8: php ; CPU:$CE0E PRG:0E0E 08 lda #$8D ; CPU:$CE0F PRG:0E0F A9 8D sta Zp00 ; CPU:$CE11 PRG:0E11 85 00 @@ -2008,7 +2010,7 @@ Label_CE1F: lda #$14 ; CPU:$CE1F PRG:0E1F A9 14 jmp $C815 ; CPU:$CE21 PRG:0E21 4C 15 C8 ; ----------------------------------------------------------------------------- -; Routine: Label_CE24 +; Routine: UpdateSpritePosition9 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2016,7 +2018,7 @@ Label_CE1F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CE24: +UpdateSpritePosition9: cmp #$85 ; CPU:$CE24 PRG:0E24 C9 85 beq Label_CE2F ; CPU:$CE26 PRG:0E26 F0 07 lda Zp43 ; CPU:$CE28 PRG:0E28 A5 43 @@ -2067,7 +2069,7 @@ Label_CE2F: sta $02FC ; CPU:$CE78 PRG:0E78 8D FC 02 rts ; CPU:$CE7B PRG:0E7B 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CE7C +; Routine: UpdateSpritePosition10 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2075,7 +2077,7 @@ Label_CE2F: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CE7C: +UpdateSpritePosition10: lda Zp58 ; CPU:$CE7C PRG:0E7C A5 58 beq Label_CE94 ; CPU:$CE7E PRG:0E7E F0 14 lda $0102 ; CPU:$CE80 PRG:0E80 AD 02 01 @@ -2176,9 +2178,9 @@ Label_CEB8: ; ----------------------------------------------------------------------------- Label_CEC1: cmp #$08 ; CPU:$CEC1 PRG:0EC1 C9 08 - beq Label_CED6 ; CPU:$CEC3 PRG:0EC3 F0 11 + beq UpdateSpritePosition11 ; CPU:$CEC3 PRG:0EC3 F0 11 cmp #$04 ; CPU:$CEC5 PRG:0EC5 C9 04 - beq Label_CED6 ; CPU:$CEC7 PRG:0EC7 F0 0D + beq UpdateSpritePosition11 ; CPU:$CEC7 PRG:0EC7 F0 0D lda Zp58 ; CPU:$CEC9 PRG:0EC9 A5 58 beq Label_CED3 ; CPU:$CECB PRG:0ECB F0 06 jsr $EBDA ; CPU:$CECD PRG:0ECD 20 DA EB @@ -2195,7 +2197,7 @@ Label_CEC1: Label_CED3: jsr $D175 ; CPU:$CED3 PRG:0ED3 20 75 D1 ; ----------------------------------------------------------------------------- -; Routine: Label_CED6 +; Routine: UpdateSpritePosition11 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2203,7 +2205,7 @@ Label_CED3: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CED6: +UpdateSpritePosition11: jsr $EB06 ; CPU:$CED6 PRG:0ED6 20 06 EB jsr $EBB6 ; CPU:$CED9 PRG:0ED9 20 B6 EB jsr $D041 ; CPU:$CEDC PRG:0EDC 20 41 D0 @@ -2247,7 +2249,7 @@ Label_CF0D: jsr $EC29 ; CPU:$CF0D PRG:0F0D 20 29 EC jmp $CF1C ; CPU:$CF10 PRG:0F10 4C 1C CF ; ----------------------------------------------------------------------------- -; Routine: Label_CF13 +; Routine: UpdateSpritePosition12 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2255,11 +2257,11 @@ Label_CF0D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CF13: +UpdateSpritePosition12: jsr $EE0C ; CPU:$CF13 PRG:0F13 20 0C EE jmp $CF1C ; CPU:$CF16 PRG:0F16 4C 1C CF ; ----------------------------------------------------------------------------- -; Routine: Label_CF19 +; Routine: UpdateSpritePosition13_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. @@ -2267,10 +2269,10 @@ Label_CF13: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CF19: +UpdateSpritePosition13_1: jsr $D0C0 ; CPU:$CF19 PRG:0F19 20 C0 D0 ; ----------------------------------------------------------------------------- -; Routine: Label_CF1C +; Routine: UpdateSpritePosition13_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. @@ -2278,7 +2280,7 @@ Label_CF19: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CF1C: +UpdateSpritePosition13_3: jsr $CF42 ; CPU:$CF1C PRG:0F1C 20 42 CF lda $0516 ; CPU:$CF1F PRG:0F1F AD 16 05 bne Label_CF2A ; CPU:$CF22 PRG:0F22 D0 06 @@ -2296,7 +2298,7 @@ Label_CF1C: Label_CF2A: rts ; CPU:$CF2A PRG:0F2A 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CF2B +; Routine: UpdateSpritePosition14 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2304,7 +2306,7 @@ Label_CF2A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CF2B: +UpdateSpritePosition14: lda #$01 ; CPU:$CF2B PRG:0F2B A9 01 sta Zp4E ; CPU:$CF2D PRG:0F2D 85 4E sta $0512 ; CPU:$CF2F PRG:0F2F 8D 12 05 @@ -2316,7 +2318,7 @@ Label_CF2B: sta $0510 ; CPU:$CF3C PRG:0F3C 8D 10 05 jmp $CA53 ; CPU:$CF3F PRG:0F3F 4C 53 CA ; ----------------------------------------------------------------------------- -; Routine: Label_CF42 +; Routine: UpdateSpritePosition15 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2324,7 +2326,7 @@ Label_CF2B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CF42: +UpdateSpritePosition15: lda Zp15 ; CPU:$CF42 PRG:0F42 A5 15 and #$10 ; CPU:$CF44 PRG:0F44 29 10 beq Label_CF8F ; CPU:$CF46 PRG:0F46 F0 47 @@ -2387,7 +2389,7 @@ Label_CF7A: lda #$00 ; CPU:$CF83 PRG:0F83 A9 00 sta ZpFC ; CPU:$CF85 PRG:0F85 85 FC ; ----------------------------------------------------------------------------- -; Routine: Label_CF87 +; Routine: UpdateSpritePosition16 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2395,7 +2397,7 @@ Label_CF7A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CF87: +UpdateSpritePosition16: lda #$40 ; CPU:$CF87 PRG:0F87 A9 40 sta $0517 ; CPU:$CF89 PRG:0F89 8D 17 05 sta ZpFD ; CPU:$CF8C PRG:0F8C 85 FD @@ -2453,7 +2455,7 @@ Label_CFA1: sta Zp11 ; CPU:$CFA5 PRG:0FA5 85 11 rts ; CPU:$CFA7 PRG:0FA7 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CFA8 +; Routine: UpdateSpritePosition17 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2461,7 +2463,7 @@ Label_CFA1: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CFA8: +UpdateSpritePosition17: ldx #$00 ; CPU:$CFA8 PRG:0FA8 A2 00 ldy #$00 ; CPU:$CFAA PRG:0FAA A0 00 ; ----------------------------------------------------------------------------- @@ -2502,7 +2504,7 @@ Label_CFB8: bmi Label_CFAC ; CPU:$CFC3 PRG:0FC3 30 E7 rts ; CPU:$CFC5 PRG:0FC5 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CFC6 +; Routine: UpdateSpritePosition18 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2510,7 +2512,7 @@ Label_CFB8: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_CFC6: +UpdateSpritePosition18: ldy #$00 ; CPU:$CFC6 PRG:0FC6 A0 00 sty Zp0F ; CPU:$CFC8 PRG:0FC8 84 0F jsr $D008 ; CPU:$CFCA PRG:0FCA 20 08 D0 @@ -2566,7 +2568,7 @@ Label_CFF9: bmi Label_CFCD ; CPU:$D005 PRG:1005 30 C6 rts ; CPU:$D007 PRG:1007 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D008 +; Routine: UpdateSpritePosition19 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2574,7 +2576,7 @@ Label_CFF9: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D008: +UpdateSpritePosition19: txa ; CPU:$D008 PRG:1008 8A pha ; CPU:$D009 PRG:1009 48 tya ; CPU:$D00A PRG:100A 98 @@ -2612,7 +2614,7 @@ Label_D02A: tax ; CPU:$D030 PRG:1030 AA rts ; CPU:$D031 PRG:1031 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D032 +; Routine: UpdateSpritePosition20 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2620,7 +2622,7 @@ Label_D02A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D032: +UpdateSpritePosition20: lda $0505 ; CPU:$D032 PRG:1032 AD 05 05 ora #$01 ; CPU:$D035 PRG:1035 09 01 sta $0505 ; CPU:$D037 PRG:1037 8D 05 05 @@ -2628,7 +2630,7 @@ Label_D032: sta Zp00 ; CPU:$D03C PRG:103C 85 00 jmp $F435 ; CPU:$D03E PRG:103E 4C 35 F4 ; ----------------------------------------------------------------------------- -; Routine: Label_D041 +; Routine: UpdateSpritePosition21_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. @@ -2636,7 +2638,7 @@ Label_D032: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D041: +UpdateSpritePosition21_1: lda Zp2E ; CPU:$D041 PRG:1041 A5 2E cmp #$10 ; CPU:$D043 PRG:1043 C9 10 bpl Label_D04B ; CPU:$D045 PRG:1045 10 04 @@ -2654,7 +2656,7 @@ Label_D041: Label_D04B: rts ; CPU:$D04B PRG:104B 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D04C +; Routine: UpdateSpritePosition21_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. @@ -2662,7 +2664,7 @@ Label_D04B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D04C: +UpdateSpritePosition21_3: lda Zp9A ; CPU:$D04C PRG:104C A5 9A bne Label_D092 ; CPU:$D04E PRG:104E D0 42 ldx Zp53 ; CPU:$D050 PRG:1050 A6 53 @@ -2721,7 +2723,7 @@ Label_D074: lda #$02 ; CPU:$D082 PRG:1082 A9 02 sta ZpFD ; CPU:$D084 PRG:1084 85 FD ; ----------------------------------------------------------------------------- -; Routine: Label_D086 +; Routine: UpdateSpritePosition22_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. @@ -2729,7 +2731,7 @@ Label_D074: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D086: +UpdateSpritePosition22_1: lda #$00 ; CPU:$D086 PRG:1086 A9 00 sta ZpFC ; CPU:$D088 PRG:1088 85 FC lda #$01 ; CPU:$D08A PRG:108A A9 01 @@ -2784,7 +2786,7 @@ Label_D0AA: sta Zp43 ; CPU:$D0B2 PRG:10B2 85 43 rts ; CPU:$D0B4 PRG:10B4 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D0B5 +; Routine: UpdateSpritePosition22_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. @@ -2792,7 +2794,7 @@ Label_D0AA: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D0B5: +UpdateSpritePosition22_3: lda #$8D ; CPU:$D0B5 PRG:10B5 A9 8D sta Zp43 ; CPU:$D0B7 PRG:10B7 85 43 lda #$00 ; CPU:$D0B9 PRG:10B9 A9 00 @@ -2810,7 +2812,7 @@ Label_D0B5: Label_D0BF: rts ; CPU:$D0BF PRG:10BF 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D0C0 +; Routine: UpdateSpritePosition23 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2818,7 +2820,7 @@ Label_D0BF: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D0C0: +UpdateSpritePosition23: lda #$00 ; CPU:$D0C0 PRG:10C0 A9 00 sta ZpFC ; CPU:$D0C2 PRG:10C2 85 FC lda #$10 ; CPU:$D0C4 PRG:10C4 A9 10 @@ -2904,7 +2906,7 @@ Label_D101: clc ; CPU:$D101 PRG:1101 18 adc #$04 ; CPU:$D102 PRG:1102 69 04 cmp #$7C ; CPU:$D104 PRG:1104 C9 7C - bcc Label_D11F ; CPU:$D106 PRG:1106 90 17 + bcc UpdateSpritePosition24 ; CPU:$D106 PRG:1106 90 17 inc Zp98 ; CPU:$D108 PRG:1108 E6 98 lda Zp98 ; CPU:$D10A PRG:110A A5 98 cmp #$05 ; CPU:$D10C PRG:110C C9 05 @@ -2937,7 +2939,7 @@ Label_D115: Label_D11D: lda #$7C ; CPU:$D11D PRG:111D A9 7C ; ----------------------------------------------------------------------------- -; Routine: Label_D11F +; Routine: UpdateSpritePosition24 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -2945,7 +2947,7 @@ Label_D11D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D11F: +UpdateSpritePosition24: sta Zp02 ; CPU:$D11F PRG:111F 85 02 jsr $EAE1 ; CPU:$D121 PRG:1121 20 E1 EA jsr $EACD ; CPU:$D124 PRG:1124 20 CD EA @@ -3009,7 +3011,7 @@ Label_D139: Label_D14B: lda Zp51 ; CPU:$D14B PRG:114B A5 51 cmp #$1C ; CPU:$D14D PRG:114D C9 1C - bne Label_D169 ; CPU:$D14F PRG:114F D0 18 + bne UpdateSpritePosition25 ; CPU:$D14F PRG:114F D0 18 lda Zp52 ; CPU:$D151 PRG:1151 A5 52 eor #$01 ; CPU:$D153 PRG:1153 49 01 tax ; CPU:$D155 PRG:1155 AA @@ -3033,7 +3035,7 @@ Label_D14B: Label_D166: jsr $CAA9 ; CPU:$D166 PRG:1166 20 A9 CA ; ----------------------------------------------------------------------------- -; Routine: Label_D169 +; Routine: UpdateSpritePosition25 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3041,7 +3043,7 @@ Label_D166: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D169: +UpdateSpritePosition25: lda #$87 ; CPU:$D169 PRG:1169 A9 87 sta Zp43 ; CPU:$D16B PRG:116B 85 43 sta $040B ; CPU:$D16D PRG:116D 8D 0B 04 @@ -3049,7 +3051,7 @@ Label_D169: sta Zp4F ; CPU:$D172 PRG:1172 85 4F rts ; CPU:$D174 PRG:1174 60 ; ----------------------------------------------------------------------------- -; 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. @@ -3057,7 +3059,7 @@ Label_D169: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D175: +UpdateSpritePosition26: lda Zp52 ; CPU:$D175 PRG:1175 A5 52 asl a ; CPU:$D177 PRG:1177 0A tax ; CPU:$D178 PRG:1178 AA @@ -3100,7 +3102,7 @@ Label_D189: Label_D199: rts ; CPU:$D199 PRG:1199 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D19A +; Routine: UpdateSpritePosition27 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3108,14 +3110,14 @@ Label_D199: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D19A: +UpdateSpritePosition27: lda Zp11 ; CPU:$D19A PRG:119A A5 11 and #$E7 ; CPU:$D19C PRG:119C 29 E7 sta $2001 ; CPU:$D19E PRG:119E 8D 01 20 sta Zp11 ; CPU:$D1A1 PRG:11A1 85 11 rts ; CPU:$D1A3 PRG:11A3 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D1A4 +; Routine: UpdateSpritePosition28 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3123,12 +3125,12 @@ Label_D19A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D1A4: +UpdateSpritePosition28: lda Zp96 ; CPU:$D1A4 PRG:11A4 A5 96 cmp #$01 ; CPU:$D1A6 PRG:11A6 C9 01 beq Label_D1BB ; CPU:$D1A8 PRG:11A8 F0 11 ; ----------------------------------------------------------------------------- -; Routine: Label_D1AA +; Routine: UpdateSpritePosition29 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3136,7 +3138,7 @@ Label_D1A4: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D1AA: +UpdateSpritePosition29: cmp #$02 ; CPU:$D1AA PRG:11AA C9 02 beq Label_D1C3 ; CPU:$D1AC PRG:11AC F0 15 cmp #$04 ; CPU:$D1AE PRG:11AE C9 04 @@ -3204,7 +3206,7 @@ Label_D1C9: Label_D1CC: jmp $D6C6 ; CPU:$D1CC PRG:11CC 4C C6 D6 ; ----------------------------------------------------------------------------- -; Routine: Label_D1CF +; Routine: UpdateSpritePosition30 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3212,7 +3214,7 @@ Label_D1CC: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D1CF: +UpdateSpritePosition30: lda Zp56 ; CPU:$D1CF PRG:11CF A5 56 cmp #$01 ; CPU:$D1D1 PRG:11D1 C9 01 beq Label_D1E5 ; CPU:$D1D3 PRG:11D3 F0 10 @@ -3290,7 +3292,7 @@ Label_D1F9: Label_D205: dec $0203 ; CPU:$D205 PRG:1205 CE 03 02 ; ----------------------------------------------------------------------------- -; Routine: Label_D208 +; Routine: UpdateSpritePosition31 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3298,7 +3300,7 @@ Label_D205: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D208: +UpdateSpritePosition31: jsr $D2CB ; CPU:$D208 PRG:1208 20 CB D2 sta Zp5A ; CPU:$D20B PRG:120B 85 5A lda $0200 ; CPU:$D20D PRG:120D AD 00 02 @@ -3379,7 +3381,7 @@ Label_D23E: Label_D25B: lda #$08 ; CPU:$D25B PRG:125B A9 08 ; ----------------------------------------------------------------------------- -; Routine: Label_D25D +; Routine: UpdateSpritePosition32 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3387,7 +3389,7 @@ Label_D25B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D25D: +UpdateSpritePosition32: sta Zp97 ; CPU:$D25D PRG:125D 85 97 jmp $D275 ; CPU:$D25F PRG:125F 4C 75 D2 ; ----------------------------------------------------------------------------- @@ -3420,7 +3422,7 @@ Label_D26D: lda #$01 ; CPU:$D271 PRG:1271 A9 01 sta Zp85 ; CPU:$D273 PRG:1273 85 85 ; ----------------------------------------------------------------------------- -; Routine: Label_D275 +; Routine: UpdateSpritePosition33 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3428,7 +3430,7 @@ Label_D26D: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D275: +UpdateSpritePosition33: jsr $EAE1 ; CPU:$D275 PRG:1275 20 E1 EA lda Zp97 ; CPU:$D278 PRG:1278 A5 97 sta Zp02 ; CPU:$D27A PRG:127A 85 02 @@ -3449,7 +3451,7 @@ Label_D275: Label_D288: jmp $F088 ; CPU:$D288 PRG:1288 4C 88 F0 ; ----------------------------------------------------------------------------- -; Routine: Label_D28B +; Routine: UpdateSpritePosition34 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3457,7 +3459,7 @@ Label_D288: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D28B: +UpdateSpritePosition34: jsr $EAE1 ; CPU:$D28B PRG:128B 20 E1 EA lda #$86 ; CPU:$D28E PRG:128E A9 86 sta Zp02 ; CPU:$D290 PRG:1290 85 02 @@ -3500,7 +3502,7 @@ Label_D28B: Label_D2CA: rts ; CPU:$D2CA PRG:12CA 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D2CB +; Routine: UpdateSpritePosition35 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3508,7 +3510,7 @@ Label_D2CA: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D2CB: +UpdateSpritePosition35: jsr $EAE1 ; CPU:$D2CB PRG:12CB 20 E1 EA lda Zp96 ; CPU:$D2CE PRG:12CE A5 96 cmp #$04 ; CPU:$D2D0 PRG:12D0 C9 04 @@ -3529,7 +3531,7 @@ Label_D2CB: Label_D2DD: lda #$4A ; CPU:$D2DD PRG:12DD A9 4A ; ----------------------------------------------------------------------------- -; Routine: Label_D2DF +; Routine: UpdateSpritePosition36 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3537,7 +3539,7 @@ Label_D2DD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D2DF: +UpdateSpritePosition36: jsr $EFE8 ; CPU:$D2DF PRG:12DF 20 E8 EF lda Zp53 ; CPU:$D2E2 PRG:12E2 A5 53 cmp #$01 ; CPU:$D2E4 PRG:12E4 C9 01 @@ -3563,7 +3565,7 @@ Label_D2F0: sta Zp0C ; CPU:$D2F8 PRG:12F8 85 0C jmp $D323 ; CPU:$D2FA PRG:12FA 4C 23 D3 ; ----------------------------------------------------------------------------- -; Routine: Label_D2FD +; Routine: UpdateSpritePosition37 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3571,7 +3573,7 @@ Label_D2F0: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D2FD: +UpdateSpritePosition37: lda $C46B,x ; CPU:$D2FD PRG:12FD BD 6B C4 sta Zp04 ; CPU:$D300 PRG:1300 85 04 lda $C46C,x ; CPU:$D302 PRG:1302 BD 6C C4 @@ -3582,14 +3584,14 @@ Label_D2FD: sta Zp07 ; CPU:$D30F PRG:130F 85 07 jsr $D8AD ; CPU:$D311 PRG:1311 20 AD D8 sta Zp0C ; CPU:$D314 PRG:1314 85 0C - bne Label_D323 ; CPU:$D316 PRG:1316 D0 0B + bne UpdateSpritePosition38 ; CPU:$D316 PRG:1316 D0 0B lda Zp53 ; CPU:$D318 PRG:1318 A5 53 cmp #$03 ; CPU:$D31A PRG:131A C9 03 - bne Label_D323 ; CPU:$D31C PRG:131C D0 05 + bne UpdateSpritePosition38 ; CPU:$D31C PRG:131C D0 05 jsr $D326 ; CPU:$D31E PRG:131E 20 26 D3 sta Zp0C ; CPU:$D321 PRG:1321 85 0C ; ----------------------------------------------------------------------------- -; Routine: Label_D323 +; Routine: UpdateSpritePosition38 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3597,11 +3599,11 @@ Label_D2FD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D323: +UpdateSpritePosition38: lda Zp0C ; CPU:$D323 PRG:1323 A5 0C rts ; CPU:$D325 PRG:1325 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D326 +; Routine: UpdateSpritePosition39 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3609,13 +3611,13 @@ Label_D323: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D326: +UpdateSpritePosition39: lda #$2A ; CPU:$D326 PRG:1326 A9 2A jsr $C847 ; CPU:$D328 PRG:1328 20 47 C8 lda #$00 ; CPU:$D32B PRG:132B A9 00 sta ZpD2 ; CPU:$D32D PRG:132D 85 D2 ; ----------------------------------------------------------------------------- -; Routine: Label_D32F +; Routine: UpdateSpritePosition40 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3623,7 +3625,7 @@ Label_D326: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D32F: +UpdateSpritePosition40: lda ZpD2 ; CPU:$D32F PRG:132F A5 D2 cmp #$06 ; CPU:$D331 PRG:1331 C9 06 beq Label_D365 ; CPU:$D333 PRG:1333 F0 30 @@ -3677,7 +3679,7 @@ Label_D353: Label_D35E: lda #$02 ; CPU:$D35E PRG:135E A9 02 ; ----------------------------------------------------------------------------- -; Routine: Label_D360 +; Routine: UpdateSpritePosition41 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3685,7 +3687,7 @@ Label_D35E: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D360: +UpdateSpritePosition41: sta ZpDA ; CPU:$D360 PRG:1360 85 DA lda #$01 ; CPU:$D362 PRG:1362 A9 01 rts ; CPU:$D364 PRG:1364 60 @@ -3703,7 +3705,7 @@ Label_D365: sta ZpDA ; CPU:$D367 PRG:1367 85 DA rts ; CPU:$D369 PRG:1369 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D36A +; Routine: UpdateSpritePosition42_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. @@ -3711,7 +3713,7 @@ Label_D365: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D36A: +UpdateSpritePosition42_1: lda Zp53 ; CPU:$D36A PRG:136A A5 53 cmp #$01 ; CPU:$D36C PRG:136C C9 01 beq Label_D373 ; CPU:$D36E PRG:136E F0 03 @@ -3730,7 +3732,7 @@ Label_D373: jsr $C831 ; CPU:$D375 PRG:1375 20 31 C8 jmp $D8AD ; CPU:$D378 PRG:1378 4C AD D8 ; ----------------------------------------------------------------------------- -; Routine: Label_D37B +; Routine: UpdateSpritePosition42_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. @@ -3738,11 +3740,11 @@ Label_D373: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D37B: +UpdateSpritePosition42_3: lda #$01 ; CPU:$D37B PRG:137B A9 01 rts ; CPU:$D37D PRG:137D 60 ; ----------------------------------------------------------------------------- -; Routine: Label_D37E +; Routine: UpdateSpritePosition43 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3750,10 +3752,10 @@ Label_D37B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D37E: +UpdateSpritePosition43: lda Zp56 ; CPU:$D37E PRG:137E A5 56 cmp #$08 ; CPU:$D380 PRG:1380 C9 08 - beq Label_D38E ; CPU:$D382 PRG:1382 F0 0A + beq UpdateSpritePosition44 ; CPU:$D382 PRG:1382 F0 0A cmp #$04 ; CPU:$D384 PRG:1384 C9 04 beq Label_D38B ; CPU:$D386 PRG:1386 F0 03 jmp $D4CF ; CPU:$D388 PRG:1388 4C CF D4 @@ -3769,7 +3771,7 @@ Label_D37E: Label_D38B: jmp $D432 ; CPU:$D38B PRG:138B 4C 32 D4 ; ----------------------------------------------------------------------------- -; Routine: Label_D38E +; Routine: UpdateSpritePosition44 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -3777,7 +3779,7 @@ Label_D38B: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D38E: +UpdateSpritePosition44: lda Zp5A ; CPU:$D38E PRG:138E A5 5A beq Label_D39C ; CPU:$D390 PRG:1390 F0 0A jsr $EAE1 ; CPU:$D392 PRG:1392 20 E1 EA @@ -4166,7 +4168,7 @@ Label_D4C6: Label_D4CC: jsr $F096 ; CPU:$D4CC PRG:14CC 20 96 F0 ; ----------------------------------------------------------------------------- -; Routine: Label_D4CF +; Routine: UpdateSpritePosition49 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -4174,7 +4176,7 @@ Label_D4CC: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_D4CF: +UpdateSpritePosition49: jsr $D2CB ; CPU:$D4CF PRG:14CF 20 CB D2 sta Zp5A ; CPU:$D4D2 PRG:14D2 85 5A beq Label_D4ED ; CPU:$D4D4 PRG:14D4 F0 17 @@ -6278,10 +6280,10 @@ Label_DBA3: Label_DBAC: lda Zp00 ; CPU:$DBAC PRG:1BAC A5 00 jsr $E090 ; CPU:$DBAE PRG:1BAE 20 90 E0 - beq Label_DBB6 ; CPU:$DBB1 PRG:1BB1 F0 03 + beq UpdateSpritePosition57 ; CPU:$DBB1 PRG:1BB1 F0 03 jmp $DBE7 ; CPU:$DBB3 PRG:1BB3 4C E7 DB ; ----------------------------------------------------------------------------- -; Routine: Label_DBB6 +; Routine: UpdateSpritePosition57 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6289,7 +6291,7 @@ Label_DBAC: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DBB6: +UpdateSpritePosition57: jsr $DF40 ; CPU:$DBB6 PRG:1BB6 20 40 DF ldx Zp5D ; CPU:$DBB9 PRG:1BB9 A6 5D lda Zp68,x ; CPU:$DBBB PRG:1BBB B5 68 @@ -6742,7 +6744,7 @@ Label_DD25: jsr $EADB ; CPU:$DD2E PRG:1D2E 20 DB EA rts ; CPU:$DD31 PRG:1D31 60 ; ----------------------------------------------------------------------------- -; Routine: Label_DD32 +; Routine: UpdateSpritePosition68 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -6750,7 +6752,7 @@ Label_DD25: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_DD32: +UpdateSpritePosition68: lda #$55 ; CPU:$DD32 PRG:1D32 A9 55 jsr $DFE4 ; CPU:$DD34 PRG:1D34 20 E4 DF bne Label_DD3A ; CPU:$DD37 PRG:1D37 D0 01 @@ -8632,11 +8634,11 @@ Label_E254: beq Label_E2A1 ; CPU:$E26A PRG:226A F0 35 lda Zp53 ; CPU:$E26C PRG:226C A5 53 cmp #$03 ; CPU:$E26E PRG:226E C9 03 - beq Label_E278 ; CPU:$E270 PRG:2270 F0 06 + beq UpdateBallTrajectory ; CPU:$E270 PRG:2270 F0 06 jsr $E2B6 ; CPU:$E272 PRG:2272 20 B6 E2 jmp $E280 ; CPU:$E275 PRG:2275 4C 80 E2 ; ----------------------------------------------------------------------------- -; Routine: Label_E278 +; Routine: UpdateBallTrajectory ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -8644,7 +8646,7 @@ Label_E254: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E278: +UpdateBallTrajectory: lda Zp19,x ; CPU:$E278 PRG:2278 B5 19 and #$03 ; CPU:$E27A PRG:227A 29 03 ldx ZpAE ; CPU:$E27C PRG:227C A6 AE @@ -8661,11 +8663,11 @@ Label_E278: Label_E280: lda ZpAF,x ; CPU:$E280 PRG:2280 B5 AF cmp #$01 ; CPU:$E282 PRG:2282 C9 01 - beq Label_E28A ; CPU:$E284 PRG:2284 F0 04 + beq InitSound_3 ; CPU:$E284 PRG:2284 F0 04 cmp #$02 ; CPU:$E286 PRG:2286 C9 02 bne Label_E28C ; CPU:$E288 PRG:2288 D0 02 ; ----------------------------------------------------------------------------- -; Routine: Label_E28A +; Routine: InitSound_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. @@ -8673,7 +8675,7 @@ Label_E280: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E28A: +InitSound_3: sta ZpB3,x ; CPU:$E28A PRG:228A 95 B3 ; ----------------------------------------------------------------------------- ; Routine: Label_E28C @@ -9239,11 +9241,11 @@ Label_E3ED: cpx #$04 ; CPU:$E3F6 PRG:23F6 E0 04 beq Label_E408 ; CPU:$E3F8 PRG:23F8 F0 0E cmp #$9C ; CPU:$E3FA PRG:23FA C9 9C - bcs Label_E403 ; CPU:$E3FC PRG:23FC B0 05 + bcs CheckGameState_3 ; CPU:$E3FC PRG:23FC B0 05 lda #$9C ; CPU:$E3FE PRG:23FE A9 9C jmp $E413 ; CPU:$E400 PRG:2400 4C 13 E4 ; ----------------------------------------------------------------------------- -; Routine: Label_E403 +; Routine: CheckGameState_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. @@ -9251,7 +9253,7 @@ Label_E3ED: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E403: +CheckGameState_3: lda #$98 ; CPU:$E403 PRG:2403 A9 98 jmp $E413 ; CPU:$E405 PRG:2405 4C 13 E4 ; ----------------------------------------------------------------------------- @@ -9903,14 +9905,14 @@ Label_E5E8: ; ----------------------------------------------------------------------------- Label_E5FA: cmp Zp0C ; CPU:$E5FA PRG:25FA C5 0C - beq Label_E609 ; CPU:$E5FC PRG:25FC F0 0B + beq UpdateMusicEngine ; CPU:$E5FC PRG:25FC F0 0B inx ; CPU:$E5FE PRG:25FE E8 cpx #$09 ; CPU:$E5FF PRG:25FF E0 09 beq Label_E60C ; CPU:$E601 PRG:2601 F0 09 lda $C1C4,x ; CPU:$E603 PRG:2603 BD C4 C1 jmp $E5FA ; CPU:$E606 PRG:2606 4C FA E5 ; ----------------------------------------------------------------------------- -; Routine: Label_E609 +; Routine: UpdateMusicEngine ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -9918,7 +9920,7 @@ Label_E5FA: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_E609: +UpdateMusicEngine: lda #$00 ; CPU:$E609 PRG:2609 A9 00 rts ; CPU:$E60B PRG:260B 60 ; ----------------------------------------------------------------------------- @@ -11293,11 +11295,11 @@ Label_EA11: cmp #$50 ; CPU:$EA11 PRG:2A11 C9 50 bcc Label_EA2A ; CPU:$EA13 PRG:2A13 90 15 cmp #$90 ; CPU:$EA15 PRG:2A15 C9 90 - bcc Label_EA2F ; CPU:$EA17 PRG:2A17 90 16 + bcc UpdateSoundChannels ; CPU:$EA17 PRG:2A17 90 16 cmp #$C0 ; CPU:$EA19 PRG:2A19 C9 C0 bcc Label_EA2A ; CPU:$EA1B PRG:2A1B 90 0D cmp #$D8 ; CPU:$EA1D PRG:2A1D C9 D8 - bcc Label_EA2F ; CPU:$EA1F PRG:2A1F 90 0E + bcc UpdateSoundChannels ; CPU:$EA1F PRG:2A1F 90 0E jsr $EAD1 ; CPU:$EA21 PRG:2A21 20 D1 EA jsr $F094 ; CPU:$EA24 PRG:2A24 20 94 F0 lda #$FF ; CPU:$EA27 PRG:2A27 A9 FF @@ -11316,7 +11318,7 @@ Label_EA2A: sta Zp02 ; CPU:$EA2C PRG:2A2C 85 02 rts ; CPU:$EA2E PRG:2A2E 60 ; ----------------------------------------------------------------------------- -; Routine: Label_EA2F +; Routine: UpdateSoundChannels ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11324,7 +11326,7 @@ Label_EA2A: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EA2F: +UpdateSoundChannels: lda #$C0 ; CPU:$EA2F PRG:2A2F A9 C0 sta Zp02 ; CPU:$EA31 PRG:2A31 85 02 rts ; CPU:$EA33 PRG:2A33 60 @@ -11555,7 +11557,7 @@ Label_EACD: lda #$00 ; CPU:$EACD PRG:2ACD A9 00 sta Zp04 ; CPU:$EACF PRG:2ACF 85 04 ; ----------------------------------------------------------------------------- -; Routine: Label_EAD1 +; Routine: UpdateSoundChannel4 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -11563,7 +11565,7 @@ Label_EACD: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EAD1: +UpdateSoundChannel4: jmp $EAD6 ; CPU:$EAD1 PRG:2AD1 4C D6 EA ; ----------------------------------------------------------------------------- ; Routine: Label_EAD4 @@ -12195,7 +12197,7 @@ Label_EC5B: and #$03 ; CPU:$EC6B PRG:2C6B 29 03 bne Label_EC76 ; CPU:$EC6D PRG:2C6D D0 07 lda Zp9C ; CPU:$EC6F PRG:2C6F A5 9C - beq Label_EC80 ; CPU:$EC71 PRG:2C71 F0 0D + beq UpdateMusic2 ; CPU:$EC71 PRG:2C71 F0 0D jmp $EC97 ; CPU:$EC73 PRG:2C73 4C 97 EC ; ----------------------------------------------------------------------------- ; Routine: Label_EC76 @@ -12213,7 +12215,7 @@ Label_EC76: lda Zp9E ; CPU:$EC7C PRG:2C7C A5 9E bne Label_EC97 ; CPU:$EC7E PRG:2C7E D0 17 ; ----------------------------------------------------------------------------- -; Routine: Label_EC80 +; Routine: UpdateMusic2 ; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. ; Local: Continues its parent routine along the condition or operation encoded in this label, ; then returns, branches again, or rejoins shared code as documented by the instructions. @@ -12221,7 +12223,7 @@ Label_EC76: ; Returns: Undetermined in Pass 1; status flags and registers may carry results. ; Clobbers: Undetermined in Pass 1. ; ----------------------------------------------------------------------------- -Label_EC80: +UpdateMusic2: lda Zp9D ; CPU:$EC80 PRG:2C80 A5 9D cmp #$18 ; CPU:$EC82 PRG:2C82 C9 18 bcs Label_EC97 ; CPU:$EC84 PRG:2C84 B0 11 diff --git a/_wip/Donkey Kong (JU)/copilot/reconstructed.lbl b/_wip/Donkey Kong (JU)/copilot/reconstructed.lbl index 0ac1153..861b599 100644 --- a/_wip/Donkey Kong (JU)/copilot/reconstructed.lbl +++ b/_wip/Donkey Kong (JU)/copilot/reconstructed.lbl @@ -246,7 +246,7 @@ al 00ECC6 .Label_ECC6 al 00ECBF .Label_ECBF al 00ECBE .Label_ECBE al 00ECAF .Label_ECAF -al 00EC80 .Label_EC80 +al 00EC80 .UpdateMusic2 al 00EC76 .Label_EC76 al 00EC97 .Label_EC97 al 00ECA7 .Label_ECA7 @@ -294,7 +294,7 @@ al 00EAE1 .Label_EAE1 al 00EADB .Label_EADB al 00EAD6 .Label_EAD6 al 00EAD4 .Label_EAD4 -al 00EAD1 .Label_EAD1 +al 00EAD1 .UpdateSoundChannel4 al 00EACD .Label_EACD al 00EACC .Label_EACC al 00EAC8 .Label_EAC8 @@ -310,7 +310,7 @@ al 00EA64 .Label_EA64 al 00EA5F .Label_EA5F al 00EA5E .Label_EA5E al 00EA34 .Label_EA34 -al 00EA2F .Label_EA2F +al 00EA2F .UpdateSoundChannels al 00EA2A .Label_EA2A al 00EA11 .Label_EA11 al 00EA01 .Label_EA01 @@ -398,7 +398,7 @@ al 00E623 .Label_E623 al 00E620 .Label_E620 al 00E611 .Label_E611 al 00E60C .Label_E60C -al 00E609 .Label_E609 +al 00E609 .UpdateMusicEngine al 00E5FA .Label_E5FA al 00E60F .Label_E60F al 00E5E8 .Label_E5E8 @@ -440,7 +440,7 @@ al 00E436 .Label_E436 al 00E41B .Label_E41B al 00E413 .Label_E413 al 00E411 .Label_E411 -al 00E403 .Label_E403 +al 00E403 .CheckGameState_3 al 00E408 .Label_E408 al 00E3E6 .Label_E3E6 al 00E3DD .Label_E3DD @@ -476,9 +476,9 @@ al 00E2B6 .Label_E2B6 al 00E2B3 .Label_E2B3 al 00E29C .Label_E29C al 00E28C .Label_E28C -al 00E28A .Label_E28A +al 00E28A .InitSound_3 al 00E280 .Label_E280 -al 00E278 .Label_E278 +al 00E278 .UpdateBallTrajectory al 00E2A1 .Label_E2A1 al 00E29A .Label_E29A al 00E295 .Label_E295 @@ -608,7 +608,7 @@ al 00DD73 .Label_DD73 al 00DD59 .Label_DD59 al 00DD60 .Label_DD60 al 00DD3A .Label_DD3A -al 00DD32 .Label_DD32 +al 00DD32 .UpdateSpritePosition68 al 00DD06 .Label_DD06 al 00DD25 .Label_DD25 al 00DD13 .Label_DD13 @@ -636,7 +636,7 @@ al 00DBEE .Label_DBEE al 00DBE7 .Label_DBE7 al 00DBCD .Label_DBCD al 00DBED .Label_DBED -al 00DBB6 .Label_DBB6 +al 00DBB6 .UpdateSpritePosition57 al 00DBA3 .Label_DBA3 al 00DBAC .Label_DBAC al 00DB50 .Label_DB50 @@ -767,7 +767,7 @@ al 00D501 .Label_D501 al 00D4F9 .Label_D4F9 al 00D4EE .Label_D4EE al 00D4ED .Label_D4ED -al 00D4CF .Label_D4CF +al 00D4CF .UpdateSpritePosition49 al 00D4CC .Label_D4CC al 00D4C6 .Label_D4C6 al 00D4B1 .Label_D4B1 @@ -793,60 +793,60 @@ al 00D3AF .Label_D3AF al 00D3CD .Label_D3CD al 00D39C .Label_D39C al 00D38B .Label_D38B -al 00D38E .Label_D38E -al 00D37E .Label_D37E -al 00D37B .Label_D37B +al 00D38E .UpdateSpritePosition44 +al 00D37E .UpdateSpritePosition43 +al 00D37B .UpdateSpritePosition42_3 al 00D373 .Label_D373 -al 00D36A .Label_D36A -al 00D360 .Label_D360 +al 00D36A .UpdateSpritePosition42_1 +al 00D360 .UpdateSpritePosition41 al 00D35E .Label_D35E al 00D353 .Label_D353 al 00D34E .Label_D34E al 00D365 .Label_D365 -al 00D32F .Label_D32F -al 00D326 .Label_D326 -al 00D323 .Label_D323 -al 00D2FD .Label_D2FD +al 00D32F .UpdateSpritePosition40 +al 00D326 .UpdateSpritePosition39 +al 00D323 .UpdateSpritePosition38 +al 00D2FD .UpdateSpritePosition37 al 00D2F0 .Label_D2F0 -al 00D2DF .Label_D2DF +al 00D2DF .UpdateSpritePosition36 al 00D2DD .Label_D2DD -al 00D2CB .Label_D2CB +al 00D2CB .UpdateSpritePosition35 al 00D2CA .Label_D2CA -al 00D28B .Label_D28B +al 00D28B .UpdateSpritePosition34 al 00D288 .Label_D288 -al 00D275 .Label_D275 -al 00D25D .Label_D25D +al 00D275 .UpdateSpritePosition33 +al 00D25D .UpdateSpritePosition32 al 00D25B .Label_D25B al 00D26D .Label_D26D al 00D262 .Label_D262 al 00D23E .Label_D23E al 00D227 .Label_D227 al 00D233 .Label_D233 -al 00D208 .Label_D208 +al 00D208 .UpdateSpritePosition31 al 00D205 .Label_D205 al 00D1F9 .Label_D1F9 al 00D1F3 .Label_D1F3 al 00D1E2 .Label_D1E2 al 00D1E5 .Label_D1E5 -al 00D1CF .Label_D1CF +al 00D1CF .UpdateSpritePosition30 al 00D1CC .Label_D1CC al 00D1C9 .Label_D1C9 al 00D1C6 .Label_D1C6 al 00D1C3 .Label_D1C3 -al 00D1AA .Label_D1AA +al 00D1AA .UpdateSpritePosition29 al 00D1BB .Label_D1BB -al 00D1A4 .Label_D1A4 -al 00D19A .Label_D19A +al 00D1A4 .UpdateSpritePosition28 +al 00D19A .UpdateSpritePosition27 al 00D199 .Label_D199 al 00D189 .Label_D189 -al 00D175 .Label_D175 +al 00D175 .UpdateSpritePosition26 al 00D166 .Label_D166 -al 00D169 .Label_D169 +al 00D169 .UpdateSpritePosition25 al 00D14B .Label_D14B al 00D139 .Label_D139 al 00D11D .Label_D11D al 00D115 .Label_D115 -al 00D11F .Label_D11F +al 00D11F .UpdateSpritePosition24 al 00D101 .Label_D101 al 00D0F4 .Label_D0F4 al 00D0F8 .Label_D0F8 @@ -854,46 +854,46 @@ al 00D0DD .Label_D0DD al 00D0E4 .Label_D0E4 al 00D130 .Label_D130 al 00D138 .Label_D138 -al 00D0C0 .Label_D0C0 -al 00D0B5 .Label_D0B5 +al 00D0C0 .UpdateSpritePosition23 +al 00D0B5 .UpdateSpritePosition22_3 al 00D0AA .Label_D0AA al 00D0A5 .Label_D0A5 -al 00D086 .Label_D086 +al 00D086 .UpdateSpritePosition22_1 al 00D065 .Label_D065 al 00D074 .Label_D074 al 00D0BF .Label_D0BF al 00D063 .Label_D063 al 00D092 .Label_D092 -al 00D04C .Label_D04C +al 00D04C .UpdateSpritePosition21_3 al 00D04B .Label_D04B -al 00D041 .Label_D041 -al 00D032 .Label_D032 +al 00D041 .UpdateSpritePosition21_1 +al 00D032 .UpdateSpritePosition20 al 00D02A .Label_D02A -al 00D008 .Label_D008 +al 00D008 .UpdateSpritePosition19 al 00CFF9 .Label_CFF9 al 00CFCD .Label_CFCD -al 00CFC6 .Label_CFC6 +al 00CFC6 .UpdateSpritePosition18 al 00CFB8 .Label_CFB8 al 00CFAC .Label_CFAC -al 00CFA8 .Label_CFA8 +al 00CFA8 .UpdateSpritePosition17 al 00CFA1 .Label_CFA1 al 00CF9B .Label_CF9B -al 00CF87 .Label_CF87 +al 00CF87 .UpdateSpritePosition16 al 00CF79 .Label_CF79 al 00CF7A .Label_CF7A al 00CF92 .Label_CF92 al 00CF55 .Label_CF55 al 00CF8F .Label_CF8F -al 00CF42 .Label_CF42 -al 00CF2B .Label_CF2B +al 00CF42 .UpdateSpritePosition15 +al 00CF2B .UpdateSpritePosition14 al 00CF2A .Label_CF2A -al 00CF1C .Label_CF1C -al 00CF19 .Label_CF19 -al 00CF13 .Label_CF13 +al 00CF1C .UpdateSpritePosition13_3 +al 00CF19 .UpdateSpritePosition13_1 +al 00CF13 .UpdateSpritePosition12 al 00CF0D .Label_CF0D al 00CF01 .Label_CF01 al 00CED3 .Label_CED3 -al 00CED6 .Label_CED6 +al 00CED6 .UpdateSpritePosition11 al 00CEC1 .Label_CEC1 al 00CEB8 .Label_CEB8 al 00CEB1 .Label_CEB1 @@ -901,22 +901,22 @@ al 00CEA2 .Label_CEA2 al 00CEAE .Label_CEAE al 00CE8B .Label_CE8B al 00CE94 .Label_CE94 -al 00CE7C .Label_CE7C +al 00CE7C .UpdateSpritePosition10 al 00CE2F .Label_CE2F -al 00CE24 .Label_CE24 +al 00CE24 .UpdateSpritePosition9 al 00CE1F .Label_CE1F -al 00CE0E .Label_CE0E +al 00CE0E .UpdateSpritePosition8 al 00CDF3 .Label_CDF3 al 00CDEF .Label_CDEF -al 00CDCA .Label_CDCA +al 00CDCA .UpdateSpritePosition7 al 00CDD7 .Label_CDD7 -al 00CDB1 .Label_CDB1 +al 00CDB1 .UpdateSpritePosition6 al 00CDAE .Label_CDAE -al 00CD9D .Label_CD9D -al 00CD89 .Label_CD89 -al 00CD7F .Label_CD7F -al 00CD76 .Label_CD76 -al 00CD6F .Label_CD6F +al 00CD9D .UpdateSpritePosition5 +al 00CD89 .UpdateSpritePosition4 +al 00CD7F .UpdateSpritePosition3 +al 00CD76 .UpdateSpritePosition2 +al 00CD6F .UpdateSpritePosition al 00CD6C .Label_CD6C al 00CD69 .Label_CD69 al 00CD66 .Label_CD66 @@ -925,31 +925,31 @@ al 00CD58 .Label_CD58 al 00CD4F .Label_CD4F al 00CD4A .Label_CD4A al 00CD45 .Label_CD45 -al 00CD22 .Label_CD22 +al 00CD22 .UpdateGameTimer al 00CD13 .Label_CD13 al 00CD07 .Label_CD07 -al 00CCF4 .Label_CCF4 +al 00CCF4 .CheckGameState_1 al 00CCF3 .Label_CCF3 -al 00CCD6 .Label_CCD6 -al 00CCC1 .Label_CCC1 +al 00CCD6 .UpdateScroll8 +al 00CCC1 .UpdateScroll7 al 00CCA6 .Label_CCA6 al 00CC99 .Label_CC99 al 00CC4A .Label_CC4A -al 00CC47 .Label_CC47 -al 00CC34 .Label_CC34 +al 00CC47 .InitScroll +al 00CC34 .UpdateScroll6 al 00CC24 .Label_CC24 -al 00CC23 .Label_CC23 -al 00CC04 .Label_CC04 -al 00CC03 .Label_CC03 -al 00CBF7 .Label_CBF7 -al 00CBF5 .Label_CBF5 +al 00CC23 .UpdateScroll5 +al 00CC04 .UpdateScroll4 +al 00CC03 .UpdateOAM3 +al 00CBF7 .UpdateOAM2 +al 00CBF5 .UpdateOAM al 00CBEB .Label_CBEB al 00CBDF .Label_CBDF -al 00CBF4 .Label_CBF4 -al 00CBCA .Label_CBCA -al 00CBBD .Label_CBBD -al 00CBB7 .Label_CBB7 -al 00CBAE .Label_CBAE +al 00CBF4 .UpdateScroll3 +al 00CBCA .UpdateScroll2 +al 00CBBD .UpdateScroll +al 00CBB7 .WaitVBlank_1 +al 00CBAE .ClearZeropage al 00CB9E .Label_CB9E al 00CB7B .Label_CB7B al 00CB46 .Label_CB46 @@ -958,7 +958,7 @@ al 00CB58 .Label_CB58 al 00CB36 .Label_CB36 al 00CB39 .Label_CB39 al 00CB30 .Label_CB30 -al 00CB1B .Label_CB1B +al 00CB1B .HandleController al 00CB15 .Label_CB15 al 00CAF6 .Label_CAF6 al 00CAFA .Label_CAFA @@ -966,20 +966,20 @@ al 00CAE7 .Label_CAE7 al 00CB18 .Label_CB18 al 00CB02 .Label_CB02 al 00CAD8 .Label_CAD8 -al 00CAC9 .Label_CAC9 +al 00CAC9 .UpdateSpriteData al 00CABB .Label_CABB -al 00CAB9 .Label_CAB9 +al 00CAB9 .CopyFromOAM al 00CAAB .Label_CAAB -al 00CAA9 .Label_CAA9 +al 00CAA9 .CopyToOAM al 00CA99 .Label_CA99 al 00CA94 .Label_CA94 -al 00CA53 .Label_CA53 +al 00CA53 .UpdateSprites2 al 00CA79 .Label_CA79 al 00CA64 .Label_CA64 al 00CA5F .Label_CA5F al 00CA5A .Label_CA5A al 00CA4A .Label_CA4A -al 00CA30 .Label_CA30 +al 00CA30 .UpdateSprites al 00CA26 .Label_CA26 al 00CA06 .Label_CA06 al 00C9B1 .Label_C9B1 @@ -989,18 +989,18 @@ al 00C989 .Label_C989 al 00C976 .Label_C976 al 00C985 .Label_C985 al 00C95C .Label_C95C -al 00C98A .Label_C98A -al 00C95D .Label_C95D -al 00C940 .Label_C940 -al 00C914 .Label_C914 -al 00C8FE .Label_C8FE -al 00C8F3 .Label_C8F3 -al 00C8E8 .Label_C8E8 -al 00C8CB .Label_C8CB -al 00C8D7 .Label_C8D7 +al 00C98A .UpdateGameState3 +al 00C95D .UpdateGameState2 +al 00C940 .UpdateGameState +al 00C914 .InitLevel +al 00C8FE .InitSound_1 +al 00C8F3 .InitAPU +al 00C8E8 .NmiFrameEnd +al 00C8CB .NmiFrameUpdate2 +al 00C8D7 .NmiFrameUpdate4 al 00C8A5 .Label_C8A5 -al 00C8D4 .Label_C8D4 -al 00C8C1 .Label_C8C1 +al 00C8D4 .NmiFrameUpdate3 +al 00C8C1 .NmiFrameUpdate al 00C85F .NmiHandler al 00C853 .Label_C853 al 00C847 .Label_C847 @@ -1008,8 +1008,8 @@ al 00C831 .Label_C831 al 00C823 .Label_C823 al 00C815 .Label_C815 al 00C807 .Label_C807 -al 00C7E7 .Label_C7E7 -al 00C7E1 .Label_C7E1 +al 00C7E7 .InitPPURegisters +al 00C7E1 .GameLoopEntry al 00C7B9 .Label_C7B9 al 00C7A8 .Label_C7A8 al 00C79E .Reset