diff --git a/AGENTS.md b/AGENTS.md index 684fa35..37116ad 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -32,5 +32,6 @@ cd "/copilot" && make # builds reconstructed.nes, then cmp vs rom.nes - Zero pages are reused across modes; aliases may be required in `locals.inc` (e.g. `RandomStateAlt = $E4` beside `RandomState0 = $54`). - Donkey Kong Jr. is architecturally different: reset entry is $C66E, the reset path idles forever in an LFSR loop, and the entire frame state machine runs inside NMI. Its `DeferredTaskHandlerTable` entry 0 deliberately mirrors the IRQ vector word at $BFFE. - IRQ vectors often point at unused/data targets in these games — verify before assuming a handler is broken. +- Unlicensed titles break static-trace assumptions: Pyramid (U) pokes a mapper unlock at `$4100` (beyond the register space) despite a mapper-0 header, and dispatches through `jmp ($0002)` built from RAM — trace via its two queue tables (`$C3A6`, `$CCD5`), and do NOT fall-through-seed gaps that follow `rts`/`jmp`/`brk` (that misclassifies data as code). - ROM filenames contain spaces; builds `incbin` a space-free `rom.nes` inside `copilot/`. Keep that copy/symlink working and don't rename it. - `.gitignore` contains `ROMS/*` but the actual directory is `_ROMS` — the pattern matches nothing, so ROM binaries stay tracked. Check before committing large blobs. diff --git a/OVERVIEW.md b/OVERVIEW.md index ed3f7b3..7171f3a 100644 --- a/OVERVIEW.md +++ b/OVERVIEW.md @@ -136,7 +136,47 @@ This document provides a consolidated overview of all NES disassembly projects i --- +## Skeleton Projects (under `_wip/`) +25 additional ROMs awaiting full disassembly. Each is set up as a Pass-0 skeleton (`default_project.tar.gz`): `copilot/` contains the split `prg.bin`/`header.bin`/`chr.bin`, a symbolic skeleton `prg.s`, and builds **BYTE-IDENTICAL** at the PRG level. Mapper 0 / 16 KB PRG / 8 KB CHR for all. + +| Project | Vectors (NMI/RESET/IRQ) | Mir. | Status | +|---------|--------------------------|------|--------| +| `CIRCUS` | $C05A / $C000 / $C4B7 | H | BYTE-IDENTICAL | +| `Donkey Kong (JU)` | $C85F / $C79E / $FFF0 | V | BYTE-IDENTICAL | +| `Donkey Kong Jr. Math (U)` | $C4A9 / $C41E / $FFF0 | H | BYTE-IDENTICAL | +| `Duck Hunt (JUE)` | $C086 / $C000 / $C000 | H | BYTE-IDENTICAL | +| `Golf (JU)` | $C0A6 / $C000 / $C0C4 | H | BYTE-IDENTICAL | +| `Hogan's Alley (JU)` | $C088 / $C000 / $C000 | H | BYTE-IDENTICAL | +| `Ice Climber (JE)` | $C076 / $C014 / $FFF0 | V | BYTE-IDENTICAL | +| `Ice Climber (U)` | $C076 / $C014 / $FFF0 | V | BYTE-IDENTICAL | +| `Joypad Test Cartridge (U)` | $CCF7 / $C000 / $C000 | H | BYTE-IDENTICAL | +| `Lode Runner (U)` | $C02C / $C000 / $FFF9 | H | BYTE-IDENTICAL | +| `Lunar Pool (U)` | $FF65 / $E80C / $FF64 | H | BYTE-IDENTICAL | +| `MUSCLE (U)` | $86CB / $8000 / $8764 | H | BYTE-IDENTICAL | +| `Mario Bros (JU)` | $C07D / $C000 / $C000 | H | BYTE-IDENTICAL | +| `Millipede (U)` | $C7F1 / $C735 / $FFF0 | H | BYTE-IDENTICAL | +| `NES PowerPad Test Card (U)` | $E06E / $E000 / $E000 | H | BYTE-IDENTICAL | +| `Pac-Man (Tengen) (U)` | $C0FA / $C033 / $C16A | V | BYTE-IDENTICAL | +| `Pac-Man (U)` | $C0FA / $FF00 / $C16A | V | BYTE-IDENTICAL | +| `Pinball (JU)` | $C1ED / $C000 / $C1ED | H | BYTE-IDENTICAL | +| `Popeye (JU) (PRG 0)` | $C701 / $C649 / $FFF0 | H | BYTE-IDENTICAL | +| `Popeye (JU) (PRG 1)` | $C701 / $C649 / $FFF0 | V | BYTE-IDENTICAL | +| `Pyramid (U)` | $D72E / $FF00 / $FF00 | H | **Pass 1 done** — classified code/data, byte-identical; see `_wip/Pyramid (U)/OVERVIEW.md` | +| `Raid on Bungeling Bay (U)` | $C04C / $C000 / $C2C0 | H | BYTE-IDENTICAL | +| `Raid on Bungeling Bay (U) [a2]` | $C04C / $C000 / $C2C0 | V | BYTE-IDENTICAL | +| `Urban Champion (JU)` | $CA91 / $CA00 / $CA00 | H | BYTE-IDENTICAL | +| `Wild Gunman (U)` | $C086 / $C000 / $C000 | H | BYTE-IDENTICAL | + +Notable vector/header observations for Pass 1 work: +- **Pac-Man (U)** RESET at `$FF00` (vector-page tail), while the Tengen variant RESETs at `$C033` — different builds confirmed (PRG bytes differ). +- **MUSCLE (U)** vectors sit in the `$8000-EFFF` window — inconsistent with the `prg.s` skeleton's expected `$C000-$FFFF` mapping; verify the header/image match before Pass 1. +- **Lunar Pool (U)** NMI `$FF65` / IRQ `$FF64` are adjacent in the vector page; RESET `$E80C`. +- **NES PowerPad Test Card (U)** RESET/IRQ both at `$E000`, far from the usual `$C000`-page entries. +- **Ice Climber (JE) vs (U)**: byte-identical PRG *and* header — only the CHR differs (~regional title graphic). +- **Popeye (JU) PRG 0 vs PRG 1**: different PRG binaries (and mirroring); same vectors. +- **Raid on Bungeling Bay (U) vs [a2]**: `[a2]` differs in mirroring only per header, but PRGs differ — separate builds. +- **Pyramid (U)** — *already at Pass 1*: interesting unlicensed Sachen boot ($4100 mapper pokes, "AV" stack-byte check, two queued-event dispatchers). See its `OVERVIEW.md`. ## Common Patterns Across All Projects @@ -206,4 +246,6 @@ All 11 projects in this repository rebuild **byte-identical** to their original | 10 | Donkey Kong 3 (JUE) | BYTE-IDENTICAL | | 11 | Donkey Kong Jr. (JU) | BYTE-IDENTICAL (Pass 1) | -Every project builds successfully with `make` in the `copilot/` folder, and every reconstructed ROM matches the original byte-for-byte. Donkey Kong Jr. shares the same byte-identical build guarantee; its remaining Pass 2/3 work is semantic renaming and table decoding, not build-correctness. \ No newline at end of file +Every project builds successfully with `make` in the `copilot/` folder, and every reconstructed ROM matches the original byte-for-byte. Donkey Kong Jr. shares the same byte-identical build guarantee; its remaining Pass 2/3 work is semantic renaming and table decoding, not build-correctness. + +The 25 `_wip/` skeleton projects above also all rebuild byte-identical (PRG level); all Pass 1 work and promotion to this index's numbered inventory is future work. \ No newline at end of file diff --git a/PROMPTS.md b/PROMPTS.md index 241fab1..29fdd3a 100644 --- a/PROMPTS.md +++ b/PROMPTS.md @@ -1,4 +1,4 @@ -Donkey Kong Jr disassembly project. +CIRCUS disassembly project. you will disassemble a NES rom. I will provide you with the skeleton project as a tar.gz file renamed to txt. build the byte identical rom. once you have completed a first pass to identify the code vs the data blocks, stop and provide me with the code. The goal is a byte-identical disassembly. Identify code and data sections. After the first pass, take a second pass and replace the known labels. Pass a third time to better identify use of code and data tables naming more appropriately. with code blocks that are generated, each method will have a local and global description, the parameters and the return value(s). for each instruction, include a comment at the end of the line with the offset followed by the actual bytes that are expected to be encoded. during building the byte exact source, include the remaining incbin line so we can cycle through builds quickly and efficently. diff --git a/_wip/CIRCUS/copilot/locals.inc b/_wip/CIRCUS/copilot/locals.inc index 1eabab5..81c85fd 100644 --- a/_wip/CIRCUS/copilot/locals.inc +++ b/_wip/CIRCUS/copilot/locals.inc @@ -1,2 +1,161 @@ -; CIRCUS zero-page aliases (declared during Pass 2). -; These intentionally conservative names will be refined in Passes 2 and 3. +; CIRCUS application-specific RAM aliases - Pass 2 +; Generated from a complete static trace of direct zero-page accesses. +; ZpXX names indicate confirmed storage with a role not yet unique enough for a behavioral name. + +Zp00 = $00 ; 24 refs; reads=13; writes=14; ClearInternalRamLoop, InitializeVramQueue, RunMainStateDispatcher +StateSubstage = $01 ; 14 refs; reads=12; writes=6; SecondaryStateHandlerPointerTable, ContinueStateInitialization, UpdateMenuState_OnNonzero_C237 +Zp01 = $01 ; indexed structure-field alias +StateTimer = $02 ; 21 refs; reads=13; writes=15; InitializeCurrentScreen, UpdateMenuState, FinishStateHandler +Zp02 = $02 ; indexed structure-field alias +Zp03 = $03 ; 25 refs; reads=18; writes=7; FinishStateHandler_OnZero_C2D2, FinishStateHandler_OnNonnegative_C2EB, FinishStateHandler_OnNonzero_C32D +Zp04 = $04 ; 11 refs; reads=7; writes=8; NmiHandler, FinishNmiPpuUpdates, ResetPpuScroll +Zp05 = $05 ; 6 refs; reads=4; writes=2; AdvanceRoundTransition_OnZero_C34B, ReadControllers_OnNonzero_C40D, ReadControllers_StoreAndContinue_C444 +Zp06 = $06 ; 2 refs; reads=1; writes=1; ProcessAudioFrame_JoinBranchPaths_F8AD, DecodeAudioStream_OnNotEqualFD_F902 +Zp07 = $07 ; 4 refs; reads=2; writes=2; ReadControllers_StoreAndContinue_C444, ProcessAudioFrame_JoinBranchPaths_F8AD, DecodeAudioStream_OnNotEqualFD_F902 +Zp08 = $08 ; 4 refs; reads=1; writes=3; RequestAudioSequence_OnNonzero_F835, DecodeAudioStream_IncrementAndContinue_F8E1, ExecuteAudioCommand_OnEqual04_FA80 +ControllerEdgeFlags = $09 ; 22 refs; reads=17; writes=6; RunMainStateDispatcher, UpdateMenuState, ReadControllers_CallNext_C64B +Zp09 = $09 ; indexed structure-field alias +Zp0A = $0A ; 11 refs; reads=5; writes=6; FinishStateHandler_OnZero_C28F, FinishStateHandler_LoadAndContinue_C2AB, FinishStateHandler_OnNonnegative_C2EB +Zp0B = $0B ; 4 refs; reads=2; writes=2; FinishStateHandler_OnNonnegative_C2EB, AdvanceRoundTransition_OnZero_C39A, ExecuteAudioCommand_JoinBranchPaths_FA12 +Zp0C = $0C ; 16 refs; reads=12; writes=4; DispatchVariantObjectUpdate_OnZero_D82E, DispatchVariantObjectUpdate_JoinBranchPaths_D88A, DispatchVariantObjectUpdate_OnBelow40_D8B7 +Zp0D = $0D ; 6 refs; reads=5; writes=1; DispatchVariantObjectUpdate_OnZero_DA20, ObjectStateLookupTables_OnNonnegative_F34D, ExecuteAudioCommand_OnZero_F9D1 +Zp0E = $0E ; 7 refs; reads=2; writes=5; UpdateMenuState_OnZero_C22B, FinishStateHandler_OnNonzero_C31B, ReadControllers_OnNonzero_C40D +Zp0F = $0F ; 18 refs; reads=11; writes=9; ReadControllers_JoinBranchPaths_C8E2, DispatchVariantObjectUpdate_JoinBranchPaths_D971, DispatchVariantObjectUpdate_OnEqualF0_D9E6 +Zp10 = $10 ; 2 refs; reads=1; writes=1; ExecuteAudioCommand_OnNonzero_F99B, ExecuteAudioCommand_OnZero_F9D1 +Zp12 = $12 ; 1 refs; reads=1; writes=0; SetPaletteRamAddress_OnZero_CA29 +Zp1E = $1E ; 2 refs; reads=1; writes=1; RequestAudioSequence, RequestAudioSequence_OnZero_F85D +Zp23 = $23 ; 1 refs; reads=1; writes=0; SetPaletteRamAddress_LoadAndContinue_CA31 +Zp2F = $2F ; 4 refs; reads=2; writes=2; RequestAudioSequence, RequestAudioSequence_OnNonzero_F835, RequestAudioSequence_OnEqual08_F867 +Zp34 = $34 ; 1 refs; reads=1; writes=0; SetPaletteRamAddress_LoadAndContinue_CA31 +Zp40 = $40 ; 2 refs; reads=1; writes=1; RequestAudioSequence, RequestAudioSequence_JoinBranchPaths_F873 +Zp45 = $45 ; 1 refs; reads=1; writes=0; SetPaletteRamAddress_LoadAndContinue_CA25 +Zp4F = $4F ; 2 refs; reads=1; writes=1; RequestAudioSequence, RequestAudioSequence_JoinBranchPaths_F873 +Zp50 = $50 ; 6 refs; reads=5; writes=2; ReadControllers_LoadAndContinue_C470, ReadControllers_OnNonzero_C480, ReadControllers_OnNonnegative_C591 +Zp51 = $51 ; 5 refs; reads=2; writes=3; SetupScreenPaletteTransfer_LoadIndexAndContinue_CF58, SetupScreenPaletteTransfer_OnZero_D1DC, SetupScreenPaletteTransfer_LoadIndexAndContinue_D1E4 +Zp52 = $52 ; 5 refs; reads=5; writes=0; ObjectStateLookupTables_OnCarrySet_E548, ObjectStateLookupTables_JoinBranchPaths_E581, ObjectStateLookupTables_OnNonnegative_EC68 +PpuCtrlShadow = $53 ; 11 refs; reads=8; writes=3; WriteMaskedPpuControl, InitializeApuAndPpu_LoadAndContinue_C3C1, SetPaletteRamAddress_LoadAndContinue_CA4B +PpuMaskShadow = $54 ; 3 refs; reads=1; writes=2; ApplyPpuMaskShadow, SetVisiblePpuMask, ConfigurePpuForScreenTransfer +Zp56 = $56 ; 11 refs; reads=6; writes=5; DispatchVariantObjectUpdate_OnNotEqual02_D84A, DispatchVariantObjectUpdate_OnNotEqual03_D86F, DispatchVariantObjectUpdate_OnNonzero_D987 +Zp59 = $59 ; 1 refs; reads=0; writes=1; ClearInternalRamLoop +Zp5F = $5F ; 2 refs; reads=1; writes=1; FinishStateHandler_OnNonzero_C32D +Zp60 = $60 ; 3 refs; reads=3; writes=1; FinishStateHandler_OnZero_C28F, AdvanceRoundTransition_OnZero_C34B, ReadControllers_LoadAndContinue_C67B +Zp61 = $61 ; 6 refs; reads=4; writes=2; FinishStateHandler_OnZero_C2B2, AdvanceRoundTransition_OnZero_C39A, ReadControllers_LoadAndContinue_C62D +CurrentGameVariant = $63 ; 11 refs; reads=10; writes=1; ReadControllers_LoadIndexAndContinue_C835, ReadControllers_OnEqual06_C8C1, SetupScreenPaletteTransfer_LoadAndContinue_CD28 +Zp64 = $64 ; 13 refs; reads=12; writes=1; ReadControllers_LoadIndexAndContinue_C835, ReadControllers_OnZero_C897, SetupScreenPaletteTransfer_LoadAndContinue_CF0D +Zp65 = $65 ; 1 refs; reads=0; writes=1; ReadControllers_JoinBranchPaths_C845 +Zp66 = $66 ; 8 refs; reads=6; writes=4; AdvanceRoundTransition_OnZero_C34B, ReadControllers_OnZero_C897, ReadControllers_OnOverflowClear_C8B3 +Zp67 = $67 ; 2 refs; reads=1; writes=2; AdvanceRoundTransition_OnZero_C34B +Zp68 = $68 ; 5 refs; reads=4; writes=1; SetupScreenPaletteTransfer_LoadAndContinue_CF0D, DispatchVariantObjectUpdate_LoadAndContinue_DA05, ObjectStateLookupTables_OnZero_E685 +Zp69 = $69 ; 7 refs; reads=6; writes=1; ReadControllers_OnEqual06_C8C1, SetupScreenPaletteTransfer_LoadAndContinue_CF0D, DispatchVariantObjectUpdate_LoadAndContinue_DA05 +Zp6A = $6A ; 20 refs; reads=16; writes=4; ReadControllers_JoinBranchPaths_C8E2, SetPaletteRamAddress_LoadAndContinue_CC20, SetPaletteRamAddress_OnNonzero_CC40 +Zp6B = $6B ; 17 refs; reads=12; writes=7; ReadControllers_JoinBranchPaths_C8B5, ReadControllers_OnEqual06_C8C1, ReadControllers_OnAtLeast02_C8D7 +Zp6C = $6C ; 4 refs; reads=1; writes=4; ObjectStateLookupTables_LoadAndContinue_E5B0, ObjectStateLookupTables_OnNonnegative_EC68, ObjectStateLookupTables_OnNonnegative_EC89 +Zp6D = $6D ; 9 refs; reads=7; writes=8; ReadControllers_JoinBranchPaths_C8B5, InitializeRoundParameters, ObjectStateLookupTables_OnZero_E659 +Zp6E = $6E ; 4 refs; reads=1; writes=3; FinishStateHandler_OnNonnegative_C2EB, AdvanceRoundTransition_OnZero_C34B, AdvanceRoundTransition_OnZero_C382 +Zp6F = $6F ; 2 refs; reads=1; writes=1; ReadControllers_LoadAndContinue_C889 +Zp70 = $70 ; 28 refs; reads=18; writes=10; ObjectStateLookupTables_JoinBranchPaths_E64C, ObjectStateLookupTables_OnBelow08_E667, ObjectStateLookupTables_OnNonzero_E7A9 +Zp71 = $71 ; 7 refs; reads=5; writes=2; ObjectStateLookupTables_OnZero_E685, ObjectStateLookupTables_OnZero_E814, ObjectStateLookupTables_LoadAndContinue_E82C +Zp72 = $72 ; 4 refs; reads=1; writes=3; ObjectStateLookupTables_OnZero_E693, ObjectStateLookupTables_OnZero_EA68, ObjectStateLookupTables_LoadIndexAndContinue_F2DB +Zp73 = $73 ; 34 refs; reads=21; writes=13; SetPaletteRamAddress_LoadAndContinue_CC6C, DispatchVariantObjectUpdate_OnZero_DA3E, DispatchVariantObjectUpdate_OnNonzero_DA76 +Zp74 = $74 ; 56 refs; reads=41; writes=23; SetPaletteRamAddress_LoadAndContinue_CC6C, DispatchVariantObjectUpdate_OnNotEqual02_D84A, DispatchVariantObjectUpdate_OnNotEqual03_D86F +Zp75 = $75 ; 6 refs; reads=3; writes=3; ObjectStateLookupTables_JoinBranchPaths_E823, ObjectStateLookupTables_OnNonzero_E8A8, ObjectStateLookupTables_OnAtLeast04_EB7B +Zp76 = $76 ; 30 refs; reads=9; writes=21; DispatchVariantObjectUpdate_JoinBranchPaths_DAB3, DispatchVariantObjectUpdate_StoreAndContinue_DADA, DispatchVariantObjectUpdate_OnCarrySet_DAE4 +Zp77 = $77 ; 69 refs; reads=33; writes=37; SetPaletteRamAddress_LoadAndContinue_CC16, SetPaletteRamAddress_LoadAndContinue_CC20, SetPaletteRamAddress_OnNonzero_CC40 +Zp78 = $78 ; 22 refs; reads=9; writes=13; SetPaletteRamAddress_LoadAndContinue_CC16, SetPaletteRamAddress_LoadAndContinue_CC20, SetupScreenPaletteTransfer_LoadAndContinue_CEE5 +Zp79 = $79 ; 28 refs; reads=17; writes=18; ReadControllers_JoinBranchPaths_C845, ReadControllers_OnNonzero_C861, SetupScreenPaletteTransfer_LoadAndContinue_D1E8 +Zp7A = $7A ; 17 refs; reads=8; writes=9; SetPaletteRamAddress_LoadAndContinue_CC20, SetupScreenPaletteTransfer_LoadAndContinue_D1E8, SetupScreenPaletteTransfer_OnNonzero_D206 +Zp7B = $7B ; 27 refs; reads=14; writes=15; SetupScreenPaletteTransfer_OnZero_D21D, SetupScreenPaletteTransfer_OnZero_D255, SetupScreenPaletteTransfer_OnNonzero_D270 +WorkPointer0Lo = $7C ; 24 refs; reads=14; writes=10; ReadControllers_OnNonzero_C861, SetupScreenPaletteTransfer_CallNext_CEB7, SetupScreenPaletteTransfer_CallNext_D1C4 +Zp7C = $7C ; indexed structure-field alias +WorkPointer0Hi = $7D ; 10 refs; reads=2; writes=9; ReadControllers_OnNonzero_C861, ReadControllers_OnNonzero_C87C, SetupScreenPaletteTransfer_CallNext_CEB7 +Zp7D = $7D ; indexed structure-field alias +WorkPointer1Lo = $7E ; 12 refs; reads=4; writes=8; SetPaletteRamAddress_LoadAndContinue_CBE4, SetupScreenPaletteTransfer_LoadAndContinue_D1E8, SetupScreenPaletteTransfer_OnNonzero_D206 +Zp7E = $7E ; indexed structure-field alias +WorkPointer1Hi = $7F ; 17 refs; reads=10; writes=11; SetPaletteRamAddress_LoadAndContinue_CBE4, SetupScreenPaletteTransfer_LoadAndContinue_D1E8, SetupScreenPaletteTransfer_OnNonzero_D206 +Zp7F = $7F ; indexed structure-field alias +Zp80 = $80 ; 9 refs; reads=2; writes=7; ReadControllers_OnNonzero_C861, DispatchVariantObjectUpdate_OnCarrySet_D9AB, DispatchVariantObjectUpdate_OnNonzero_D9C4 +Zp81 = $81 ; 2 refs; reads=0; writes=2; ObjectStateLookupTables_OnZero_E685, ObjectStateLookupTables_LoadIndexAndContinue_F2DB +Zp82 = $82 ; 2 refs; reads=0; writes=2; ObjectStateLookupTables_OnZero_E693, ObjectStateLookupTables_LoadIndexAndContinue_F2DB +Zp83 = $83 ; 7 refs; reads=3; writes=4; DispatchVariantObjectUpdate_OnZero_DA3E, DispatchVariantObjectUpdate_JoinBranchPaths_DAB3, DispatchVariantObjectUpdate_OnCarrySet_DAE4 +Zp84 = $84 ; 17 refs; reads=13; writes=10; DispatchVariantObjectUpdate_OnNotEqual03_D91A, DispatchVariantObjectUpdate_OnNotEqual03_D93D, DispatchVariantObjectUpdate_OnCarrySet_D9AB +Zp86 = $86 ; 5 refs; reads=0; writes=5; DispatchVariantObjectUpdate_JoinBranchPaths_DAB3, DispatchVariantObjectUpdate_OnEqual00_DC1B, DispatchVariantObjectUpdate_OnEqual03_DC21 +Zp87 = $87 ; 9 refs; reads=5; writes=4; ObjectStateLookupTables_LoadAndContinue_EE5F, ObjectStateLookupTables_OnNonzero_EEBB, ObjectStateLookupTables_LoadAndContinue_F342 +Zp88 = $88 ; 1 refs; reads=1; writes=0; ObjectStateLookupTables_OnZero_F356 +Zp89 = $89 ; 2 refs; reads=1; writes=1; ProcessQueuedVramUpdates_LoadAndContinue_D2FD, ExecuteVramDescriptorStream +Zp8A = $8A ; 2 refs; reads=1; writes=1; ExecuteVramDescriptorStream, ExecuteVramDescriptorStream_OnNonzero_D35F +Zp8B = $8B ; 2 refs; reads=1; writes=1; SetupScreenPaletteTransfer_OnZero_D255, ObjectStateLookupTables_StoreIndexAndContinue_ED26 +Zp8C = $8C ; 22 refs; reads=9; writes=13; SetPaletteRamAddress_LoadAndContinue_CBE4, SetPaletteRamAddress_LoadAndContinue_CC6C, SetupScreenPaletteTransfer_LoadAndContinue_D1E8 +Zp8D = $8D ; 3 refs; reads=2; writes=1; SetPaletteRamAddress_LoadAndContinue_CBE4, SetPaletteRamAddress_LoadAndContinue_CC62, ObjectStateLookupTables_OnNonzero_F5D8 +Zp8E = $8E ; 11 refs; reads=5; writes=6; SetPaletteRamAddress_LoadAndContinue_CBE4, SetPaletteRamAddress_LoadAndContinue_CC6C, SetupScreenPaletteTransfer_LoadAndContinue_D1E8 +Zp8F = $8F ; 4 refs; reads=2; writes=2; SetPaletteRamAddress_LoadAndContinue_CC62, SetupScreenPaletteTransfer_CallNext_D1C4, ObjectStateLookupTables_OnNonnegative_E905 +Zp90 = $90 ; 4 refs; reads=3; writes=2; ObjectStateLookupTables_LoadAndContinue_E61D, ObjectStateLookupTables_LoadAndContinue_F08C, ObjectStateLookupTables_OnZero_F09E +Zp91 = $91 ; 2 refs; reads=1; writes=1; ObjectStateLookupTables_LoadIndexAndContinue_F0A8, ObjectStateLookupTables_OnNonzero_F155 +Zp92 = $92 ; 3 refs; reads=3; writes=2; ObjectStateLookupTables_LoadAndContinue_EFC7, ObjectStateLookupTables_OnEqual02_EFDC +Zp94 = $94 ; 3 refs; reads=2; writes=1; ObjectStateLookupTables_LoadAndContinue_EFC7, ObjectStateLookupTables_OnEqual02_EFDC +Zp98 = $98 ; 3 refs; reads=2; writes=2; ObjectStateLookupTables_OnZero_E5D1, ObjectStateLookupTables_JoinBranchPaths_E618 +Zp9A = $9A ; 2 refs; reads=1; writes=1; ObjectStateLookupTables_LoadAndContinue_E7BA +Zp9B = $9B ; 6 refs; reads=3; writes=4; ReadControllers_JoinBranchPaths_C8E2, ObjectStateLookupTables_LoadIndexAndContinue_E484, ObjectStateLookupTables_JoinBranchPaths_E4AA +Zp9C = $9C ; 2 refs; reads=1; writes=1; ObjectStateLookupTables_LoadIndexAndContinue_E521, ObjectStateLookupTables_OnNonzero_E86C +Zp9D = $9D ; 2 refs; reads=2; writes=1; ObjectStateLookupTables_LoadAndContinue_E509 +ZpA7 = $A7 ; 3 refs; reads=1; writes=3; ObjectStateLookupTables_OnNonzero_EEBB, ObjectStateLookupTables_LoadAndContinue_F08C, ObjectStateLookupTables_OnZero_F09E +ZpA8 = $A8 ; 4 refs; reads=2; writes=2; ObjectStateLookupTables_LoadAndContinue_F08C, ObjectStateLookupTables_OnZero_F09E, ObjectStateLookupTables_OnCarryClear_F141 +ZpAA = $AA ; 3 refs; reads=3; writes=1; ObjectStateLookupTables_OnBelow08_F672, ObjectStateLookupTables_OnCarryClear_F693, ObjectStateLookupTables_OnEqualFF_F6B6 +ZpAB = $AB ; 3 refs; reads=2; writes=2; ReadControllers_JoinBranchPaths_C8B5, ReadControllers_JoinBranchPaths_C8D9, ObjectStateLookupTables_OnCarrySet_F44E +ZpAD = $AD ; 5 refs; reads=4; writes=3; ReadControllers_JoinBranchPaths_C8B5, ObjectStateLookupTables_OnBelow08_F672, ObjectStateLookupTables_JoinBranchPaths_F6E3 +ZpAE = $AE ; 2 refs; reads=1; writes=1; ObjectStateLookupTables_JoinBranchPaths_F4F5, ObjectStateLookupTables_LoadAndContinue_F540 +ZpAF = $AF ; 5 refs; reads=2; writes=3; DispatchVariantObjectUpdate_JoinBranchPaths_D971, ObjectStateLookupTables_OnCarrySet_F131, ObjectStateLookupTables_JoinBranchPaths_F495 +ZpB0 = $B0 ; 2 refs; reads=1; writes=1; ObjectStateLookupTables_OnNotEqual40_E62D, ObjectStateLookupTables_OnBelow01_F6DD +ZpB3 = $B3 ; 3 refs; reads=1; writes=2; ObjectStateLookupTables_LoadIndexAndContinue_EED9, ObjectStateLookupTables_OnZero_EEFF, ObjectStateLookupTables_OnAtLeastA4_EF3D +ZpB8 = $B8 ; 6 refs; reads=2; writes=4; ReadControllers_JoinBranchPaths_C8E2, DispatchVariantObjectUpdate_JoinBranchPaths_D971, DispatchVariantObjectUpdate_OnEqualF0_D9E6 +ZpBE = $BE ; 5 refs; reads=3; writes=3; DispatchVariantObjectUpdate_OnNonzero_DA76, ObjectStateLookupTables_LoadAndContinue_EE5F, ObjectStateLookupTables_JoinBranchPaths_EE86 +ZpBF = $BF ; 5 refs; reads=5; writes=2; DispatchVariantObjectUpdate_OnZero_D912, DispatchVariantObjectUpdate_OnNotEqual02_D935, ObjectStateLookupTables_LoadAndContinue_EE0A +ZpC0 = $C0 ; 1 refs; reads=0; writes=1; ObjectStateLookupTables_OnBelow01_F6DD +ZpC5 = $C5 ; 1 refs; reads=1; writes=0; ReadControllers_CallNext_C64B +ZpC6 = $C6 ; 1 refs; reads=1; writes=1; ReadControllers_CallNext_C64B +ZpC7 = $C7 ; 3 refs; reads=2; writes=1; ObjectStateLookupTables_OnCarrySet_F44E, ObjectStateLookupTables_OnZero_F4BE, ObjectStateLookupTables_OnNonnegative_F5CD +ZpC9 = $C9 ; 6 refs; reads=3; writes=3; DispatchVariantObjectUpdate_OnZero_D887, DispatchVariantObjectUpdate_OnNonzero_D945, DispatchVariantObjectUpdate_OnCarryClear_D959 +ZpCA = $CA ; 13 refs; reads=7; writes=6; DispatchVariantObjectUpdate_JoinBranchPaths_D885, DispatchVariantObjectUpdate_OnCarryClear_D8AF, DispatchVariantObjectUpdate_OnCarryClear_D8D7 +ZpCB = $CB ; 4 refs; reads=2; writes=3; DispatchVariantObjectUpdate_OnNonzero_DA60, DispatchVariantObjectUpdate_OnNonzero_DA76, ObjectStateLookupTables_OnNonnegative_F0BD +ZpCC = $CC ; 2 refs; reads=1; writes=1; UpdateMenuSelection_LoadAndContinue_D5DF, ObjectStateLookupTables_JoinBranchPaths_DCE6 +ZpCD = $CD ; 6 refs; reads=3; writes=4; ReadControllers_JoinBranchPaths_C8E2, DispatchVariantObjectUpdate_OnCarryClear_D959, DispatchVariantObjectUpdate_OnZero_DA19 +ZpCE = $CE ; 6 refs; reads=2; writes=4; DispatchVariantObjectUpdate_JoinBranchPaths_D839, DispatchVariantObjectUpdate_OnZero_D858, DispatchVariantObjectUpdate_OnZero_D87F +ZpCF = $CF ; 2 refs; reads=1; writes=2; ReadControllers_JoinBranchPaths_C8E2, ObjectStateLookupTables_LoadAndContinue_F601 +ZpD0 = $D0 ; 5 refs; reads=3; writes=2; ObjectStateLookupTables_OnNonzero_E86C, ObjectStateLookupTables_OnZero_E8E9, ObjectStateLookupTables_OnZero_E9B3 +ZpD1 = $D1 ; 1 refs; reads=0; writes=1; ObjectStateLookupTables_OnNonnegative_E980 +ZpD2 = $D2 ; 3 refs; reads=3; writes=2; ObjectStateLookupTables_JoinBranchPaths_F267, ObjectStateLookupTables_JoinBranchPaths_F2A0, ObjectStateLookupTables_OnZero_F356 +ZpD3 = $D3 ; 5 refs; reads=4; writes=3; ObjectStateLookupTables_JoinBranchPaths_F474, ObjectStateLookupTables_LoadIndexAndContinue_F479, ObjectStateLookupTables_OnCarrySet_F4BB +ZpD4 = $D4 ; 1 refs; reads=0; writes=1; ObjectStateLookupTables_OnEqualFE_E9A9 +ZpD5 = $D5 ; 4 refs; reads=3; writes=2; ObjectStateLookupTables_OnCarrySet_F44E, ObjectStateLookupTables_CallNext_F5C6, ObjectStateLookupTables_OnNonnegative_F5CD +ZpD6 = $D6 ; 3 refs; reads=1; writes=2; ObjectStateLookupTables_OnCarrySet_F44E, ObjectStateLookupTables_LoadIndexAndContinue_F479, ObjectStateLookupTables_JoinBranchPaths_F495 +ZpD7 = $D7 ; 2 refs; reads=1; writes=1; ObjectStateLookupTables_LoadAndContinue_F540 +ZpD9 = $D9 ; 4 refs; reads=0; writes=4; ReadControllers_OnNonnegative_C900, ObjectStateLookupTables_OnEqual20_E8CD, ObjectStateLookupTables_OnNonzero_EBE7 +ZpDB = $DB ; 1 refs; reads=0; writes=1; ObjectStateLookupTables_OnNonzero_E849 +ZpDE = $DE ; 10 refs; reads=5; writes=5; ReadControllers_JoinBranchPaths_C8E2, DispatchVariantObjectUpdate_LoadIndexAndContinue_D824, DispatchVariantObjectUpdate_OnNonzero_D8E4 +ZpDF = $DF ; 18 refs; reads=15; writes=4; ReadControllers_JoinBranchPaths_C8E2, DispatchVariantObjectUpdate_OnCarrySet_D820, DispatchVariantObjectUpdate_JoinBranchPaths_D88A +IndirectPointerLo = $E0 ; 13 refs; reads=1; writes=12; ClearUpperRamPages, SelectNametableClearPage_OnNonzero_C3E2, ReadControllers_LoadIndexAndContinue_C4BA +IndirectPointerHi = $E1 ; 14 refs; reads=3; writes=13; ClearUpperRamPages, ClearUpperRamPageLoop, SelectNametableClearPage_OnNonzero_C3E2 +TransferByteCount = $E2 ; 7 refs; reads=3; writes=7; SelectNametableClearPage_OnNonzero_C3E2, ClearPpuPage_OnNonzero_C3FA, ReadControllers_OnNonzero_C4AF +ZpE3 = $E3 ; 3 refs; reads=1; writes=3; ReadControllers_OnCarryClear_C4EA, ReadControllers_LoadAndContinue_C67B, ReadControllers_OnNonnegative_C68D +Controller1Shift = $E4 ; 10 refs; reads=6; writes=5; ReadControllers_OnNonzero_C40D, ReadControllers_StoreAndContinue_C444, ReadControllers_OnNonzero_C454 +ZpE4 = $E4 ; indexed structure-field alias +Controller2Shift = $E5 ; 4 refs; reads=2; writes=3; ReadControllers_OnNonzero_C40D, ReadControllers_OnNonzero_C454, ReadControllers_OnCarryClear_C4EA +ControllerReadScratch = $E7 ; 4 refs; reads=2; writes=2; ReadControllers_OnNonzero_C40D +ZpE8 = $E8 ; 3 refs; reads=2; writes=1; ReadControllers_StoreIndexAndContinue_C6F3, ReadControllers_OnBelow0A_C70D +ZpEE = $EE ; 4 refs; reads=2; writes=2; ReadControllers_StoreIndexAndContinue_C6F3, ReadControllers_OnBelow0A_C70D +ZpEF = $EF ; 7 refs; reads=4; writes=4; ReadControllers_LoadAndContinue_C5B2, ReadControllers_OnNonnegative_C5B6, ReadControllers_StoreIndexAndContinue_C6F3 +ZpF0 = $F0 ; 8 refs; reads=4; writes=6; DecodeAudioStream_OnZero_F962, ExecuteAudioCommand_OnNotEqualE0_FA23, ExecuteAudioCommand_OnNonzero_FA32 +ZpF1 = $F1 ; 4 refs; reads=2; writes=3; DecodeAudioStream_OnZero_F962, ExecuteAudioCommand_OnNotEqual0C_FA62, ExecuteAudioCommand_JumpNext_FA73 +ZpF2 = $F2 ; 1 refs; reads=0; writes=1; RequestAudioSequence_OnNonzero_F835 +ZpF3 = $F3 ; 1 refs; reads=0; writes=1; RequestAudioSequence_OnNonzero_F835 +AudioChannelStructOffset = $F4 ; 8 refs; reads=7; writes=1; ProcessAudioFrame_OnCarryClear_F880, ProcessAudioFrame_OnZero_F88B, DecodeAudioStream_OnZero_F921 +AudioApuRegisterOffset = $F5 ; 14 refs; reads=13; writes=1; ProcessAudioFrame_OnCarryClear_F880, ProcessAudioFrame_OnNotEqual54_F895, ProcessAudioFrame_OnNonnegative_F89E +AudioSequencePointerLo = $F6 ; 5 refs; reads=4; writes=2; ProcessAudioFrame_JoinBranchPaths_F8AD, DecodeAudioStream, ExecuteAudioCommand_OnNotEqual08_F981 +AudioSequencePointerHi = $F7 ; 4 refs; reads=3; writes=2; ProcessAudioFrame_JoinBranchPaths_F8AD, DecodeAudioStream, ExecuteAudioCommand_OnNotEqual08_F981 +SavedObjectIndex = $F8 ; 7 refs; reads=4; writes=3; SetPaletteRamAddress_StoreIndexAndContinue_CC7E, SetPaletteRamAddress_OnCarryClear_CC8C, SetPaletteRamAddress_StoreIndexAndContinue_CC8F +SavedObjectSlot = $F9 ; 21 refs; reads=14; writes=7; SetPaletteRamAddress_StoreIndexAndContinue_CB2D, SetPaletteRamAddress_JoinBranchPaths_CB4B, ObjectStateLookupTables_OnNonzero_E601 +SavedTransferIndex = $FA ; 8 refs; reads=4; writes=4; UpdateMenuSelection_OnZero_D627, UpdateMenuSelection_OnNonzero_D62B, ObjectStateLookupTables_LoadAndContinue_E562 +NmiDelayCounter = $FB ; 3 refs; reads=2; writes=2; NmiHandler, ReadControllers_LoadAndContinue_C4C8 +ZpFF = $FF ; 2 refs; reads=1; writes=1; FinishStateHandler_OnNonzero_C32D + +MenuSelectionIndex = $0302 +VariantSequenceCounter = $03B0 diff --git a/_wip/CIRCUS/copilot/prg.s b/_wip/CIRCUS/copilot/prg.s index 5213cd9..9c60395 100644 --- a/_wip/CIRCUS/copilot/prg.s +++ b/_wip/CIRCUS/copilot/prg.s @@ -1,7 +1,8 @@ -; CIRCUS NES disassembly - Pass 1 (skeleton) -; Generated from the supplied 16 KiB PRG image. -; Pass 1 classifies recursively reachable code, inline address tables, vectors, -; and untraced/data regions. All PRG data bytes are emitted explicitly with .byte directives. +; CIRCUS NES disassembly - Pass 2 +; Byte-oriented ca65 source generated from the supplied 16 KiB PRG image. +; Recursively reachable instructions are emitted explicitly with address/byte comments. +; All Pass 1 .incbin spans are now explicit classified bytes; no ROM bytes are hidden. +; Pass 2 replaces address-derived labels, RAM aliases, and table names while preserving byte identity. .setcpu "6502" @@ -9,4 +10,12746 @@ .include "locals.inc" .segment "PRG" -.incbin "prg.bin", $0000, $4000 + +; ----------------------------------------------------------------------------- +; Routine: Reset +; Global: Initialize CPU, RAM, PPU state, and enter the main program loop. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Reset: + cld ; CPU:C000 PRG:0000 D8 + sei ; CPU:C001 PRG:0001 78 +; ----------------------------------------------------------------------------- +; Routine: WaitForFirstPpuWarmup +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +WaitForFirstPpuWarmup: + lda $2002 ; CPU:C002 PRG:0002 AD 02 20 + bpl WaitForFirstPpuWarmup ; CPU:C005 PRG:0005 10 FB +; ----------------------------------------------------------------------------- +; Routine: WaitForSecondPpuWarmup +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +WaitForSecondPpuWarmup: + lda $2002 ; CPU:C007 PRG:0007 AD 02 20 + bpl WaitForSecondPpuWarmup ; CPU:C00A PRG:000A 10 FB + jsr $C0B8 ; CPU:C00C PRG:000C 20 B8 C0 + ldx #$FF ; CPU:C00F PRG:000F A2 FF + txs ; CPU:C011 PRG:0011 9A + ldx #$10 ; CPU:C012 PRG:0012 A2 10 +; ----------------------------------------------------------------------------- +; Routine: VerifyStackRamPattern +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +VerifyStackRamPattern: + txa ; CPU:C014 PRG:0014 8A + cmp $07EF,x ; CPU:C015 PRG:0015 DD EF 07 + bne ClearInternalRamPages ; CPU:C018 PRG:0018 D0 05 + dex ; CPU:C01A PRG:001A CA + bne VerifyStackRamPattern ; CPU:C01B PRG:001B D0 F7 + beq ClearUpperRamPages ; CPU:C01D PRG:001D F0 0E +; ----------------------------------------------------------------------------- +; Routine: ClearInternalRamPages +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ClearInternalRamPages: + ldy #$57 ; CPU:C01F PRG:001F A0 57 + lda #$00 ; CPU:C021 PRG:0021 A9 00 +; ----------------------------------------------------------------------------- +; Routine: ClearInternalRamLoop +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ClearInternalRamLoop: + sta a:Zp00,y ; CPU:C023 PRG:0023 99 00 00 + iny ; CPU:C026 PRG:0026 C8 + bne ClearInternalRamLoop ; CPU:C027 PRG:0027 D0 FA + lda #$02 ; CPU:C029 PRG:0029 A9 02 + sta Zp59 ; CPU:C02B PRG:002B 85 59 +; ----------------------------------------------------------------------------- +; Routine: ClearUpperRamPages +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ClearUpperRamPages: + ldy #$EF ; CPU:C02D PRG:002D A0 EF + lda #$07 ; CPU:C02F PRG:002F A9 07 + sta IndirectPointerHi ; CPU:C031 PRG:0031 85 E1 + lda #$00 ; CPU:C033 PRG:0033 A9 00 + sta IndirectPointerLo ; CPU:C035 PRG:0035 85 E0 +; ----------------------------------------------------------------------------- +; Routine: ClearUpperRamPageLoop +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ClearUpperRamPageLoop: + sta ($E0),y ; CPU:C037 PRG:0037 91 E0 + dey ; CPU:C039 PRG:0039 88 + bne ClearUpperRamPageLoop ; CPU:C03A PRG:003A D0 FB + dec IndirectPointerHi ; CPU:C03C PRG:003C C6 E1 + bmi InitializeVramQueue ; CPU:C03E PRG:003E 30 06 + bne ClearUpperRamPageLoop ; CPU:C040 PRG:0040 D0 F5 + ldy #$56 ; CPU:C042 PRG:0042 A0 56 + bne ClearUpperRamPageLoop ; CPU:C044 PRG:0044 D0 F1 +; ----------------------------------------------------------------------------- +; Routine: InitializeVramQueue +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +InitializeVramQueue: + sta Zp00 ; CPU:C046 PRG:0046 85 00 + sta $0700 ; CPU:C048 PRG:0048 8D 00 07 + ldx #$10 ; CPU:C04B PRG:004B A2 10 +; ----------------------------------------------------------------------------- +; Routine: InitializeStackPattern +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +InitializeStackPattern: + txa ; CPU:C04D PRG:004D 8A + sta $07EF,x ; CPU:C04E PRG:004E 9D EF 07 + dex ; CPU:C051 PRG:0051 CA + bne InitializeStackPattern ; CPU:C052 PRG:0052 D0 F9 + jsr $C3B8 ; CPU:C054 PRG:0054 20 B8 C3 +; ----------------------------------------------------------------------------- +; Routine: EnterMainLoop +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +EnterMainLoop: + jmp $C057 ; CPU:C057 PRG:0057 4C 57 C0 +; ----------------------------------------------------------------------------- +; Routine: NmiHandler +; Global: Preserve registers and perform the per-frame PPU, input, state, and audio work. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +NmiHandler: + pha ; CPU:C05A PRG:005A 48 + txa ; CPU:C05B PRG:005B 8A + pha ; CPU:C05C PRG:005C 48 + tya ; CPU:C05D PRG:005D 98 + pha ; CPU:C05E PRG:005E 48 + lda $2002 ; CPU:C05F PRG:005F AD 02 20 + lda Zp04 ; CPU:C062 PRG:0062 A5 04 + bne ResetPpuScroll ; CPU:C064 PRG:0064 D0 23 + lda #$00 ; CPU:C066 PRG:0066 A9 00 + sta $2003 ; CPU:C068 PRG:0068 8D 03 20 + lda #$02 ; CPU:C06B PRG:006B A9 02 + sta $4014 ; CPU:C06D PRG:006D 8D 14 40 + inc Zp04 ; CPU:C070 PRG:0070 E6 04 + jsr $C0B8 ; CPU:C072 PRG:0072 20 B8 C0 + jsr $C1B7 ; CPU:C075 PRG:0075 20 B7 C1 + lda NmiDelayCounter ; CPU:C078 PRG:0078 A5 FB + beq ApplyPpuMaskShadow ; CPU:C07A PRG:007A F0 06 + dec NmiDelayCounter ; CPU:C07C PRG:007C C6 FB + lda #$00 ; CPU:C07E PRG:007E A9 00 + beq FinishNmiPpuUpdates ; CPU:C080 PRG:0080 F0 02 +; ----------------------------------------------------------------------------- +; Routine: ApplyPpuMaskShadow +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ApplyPpuMaskShadow: + lda PpuMaskShadow ; CPU:C082 PRG:0082 A5 54 +; ----------------------------------------------------------------------------- +; Routine: FinishNmiPpuUpdates +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +FinishNmiPpuUpdates: + sta $2001 ; CPU:C084 PRG:0084 8D 01 20 + dec Zp04 ; CPU:C087 PRG:0087 C6 04 +; ----------------------------------------------------------------------------- +; Routine: ResetPpuScroll +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ResetPpuScroll: + lda $2002 ; CPU:C089 PRG:0089 AD 02 20 + lda #$00 ; CPU:C08C PRG:008C A9 00 + sta $2005 ; CPU:C08E PRG:008E 8D 05 20 + sta $2005 ; CPU:C091 PRG:0091 8D 05 20 + lda #$7E ; CPU:C094 PRG:0094 A9 7E + jsr $C0C5 ; CPU:C096 PRG:0096 20 C5 C0 + jsr $F87C ; CPU:C099 PRG:0099 20 7C F8 + lda Zp04 ; CPU:C09C PRG:009C A5 04 + beq RunNmiGameLogic ; CPU:C09E PRG:009E F0 05 + jsr $C0C3 ; CPU:C0A0 PRG:00A0 20 C3 C0 + bne RestoreNmiRegisters ; CPU:C0A3 PRG:00A3 D0 0D +; ----------------------------------------------------------------------------- +; Routine: RunNmiGameLogic +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +RunNmiGameLogic: + inc Zp04 ; CPU:C0A5 PRG:00A5 E6 04 + jsr $C402 ; CPU:C0A7 PRG:00A7 20 02 C4 + jsr $C0C3 ; CPU:C0AA PRG:00AA 20 C3 C0 + jsr $C0D0 ; CPU:C0AD PRG:00AD 20 D0 C0 + dec Zp04 ; CPU:C0B0 PRG:00B0 C6 04 +; ----------------------------------------------------------------------------- +; Routine: RestoreNmiRegisters +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +RestoreNmiRegisters: + pla ; CPU:C0B2 PRG:00B2 68 + tay ; CPU:C0B3 PRG:00B3 A8 + pla ; CPU:C0B4 PRG:00B4 68 + tax ; CPU:C0B5 PRG:00B5 AA + pla ; CPU:C0B6 PRG:00B6 68 + rti ; CPU:C0B7 PRG:00B7 40 +; ----------------------------------------------------------------------------- +; Routine: InitializePpuControl +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +InitializePpuControl: + lda #$08 ; CPU:C0B8 PRG:00B8 A9 08 + sta $2000 ; CPU:C0BA PRG:00BA 8D 00 20 + lda #$00 ; CPU:C0BD PRG:00BD A9 00 + sta $2001 ; CPU:C0BF PRG:00BF 8D 01 20 + rts ; CPU:C0C2 PRG:00C2 60 +; ----------------------------------------------------------------------------- +; Routine: WritePpuCtrlShadowMasked +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +WritePpuCtrlShadowMasked: + lda #$FE ; CPU:C0C3 PRG:00C3 A9 FE +; ----------------------------------------------------------------------------- +; Routine: WriteMaskedPpuControl +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +WriteMaskedPpuControl: + and PpuCtrlShadow ; CPU:C0C5 PRG:00C5 25 53 + sta $2000 ; CPU:C0C7 PRG:00C7 8D 00 20 + rts ; CPU:C0CA PRG:00CA 60 +; ----------------------------------------------------------------------------- +; Routine: SetVisiblePpuMask +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetVisiblePpuMask: + lda #$1E ; CPU:C0CB PRG:00CB A9 1E + sta PpuMaskShadow ; CPU:C0CD PRG:00CD 85 54 + rts ; CPU:C0CF PRG:00CF 60 +; ----------------------------------------------------------------------------- +; Routine: RunMainStateDispatcher +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +RunMainStateDispatcher: + inc ControllerEdgeFlags ; CPU:C0D0 PRG:00D0 E6 09 + lda Zp00 ; CPU:C0D2 PRG:00D2 A5 00 + jsr $C4CD ; CPU:C0D4 PRG:00D4 20 CD C4 + +MainStateHandlerPointerTable: + .byte $07, $C1, $07, $C1, $E9, $C0, $F9, $C0, $07, $C1, $1A, $C8, $00, $C1, $07, $C1 ; CPU:$C0D7 PRG:00D7 07 C1 07 C1 E9 C0 F9 C0 07 C1 1A C8 00 C1 07 C1 + .byte $08, $C1, $A6, $01, $F0, $1A, $20, $6D, $D7, $A5, $0A, $F0, $13 ; CPU:$C0E7 PRG:00E7 08 C1 A6 01 F0 1A 20 6D D7 A5 0A F0 13 + +; ----------------------------------------------------------------------------- +; Routine: DispatchInitialState +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchInitialState: + lda #$00 ; CPU:C0F4 PRG:00F4 A9 00 + jmp $C342 ; CPU:C0F6 PRG:00F6 4C 42 C3 + +InitialStateDispatchTailTable: + .byte $A5, $01, $D0, $0A, $4C, $64, $C5, $A6, $01, $D0, $03, $4C, $63, $CA, $60, $20 ; CPU:$C0F9 PRG:00F9 A5 01 D0 0A 4C 64 C5 A6 01 D0 03 4C 63 CA 60 20 + .byte $63, $CA, $A5, $63, $C9, $04, $D0, $06, $20, $AB, $D9, $20, $B6, $DB, $A6, $01 ; CPU:$C109 PRG:0109 63 CA A5 63 C9 04 D0 06 20 AB D9 20 B6 DB A6 01 + .byte $F0, $1D, $CA, $F0, $42, $C6, $02, $D0, $E5, $A6, $63, $E8, $E0, $06, $D0, $02 ; CPU:$C119 PRG:0119 F0 1D CA F0 42 C6 02 D0 E5 A6 63 E8 E0 06 D0 02 + .byte $A2, $01, $86, $63, $E6, $60, $A9, $00, $85, $CC, $85, $67, $4C, $40, $C3, $20 ; CPU:$C129 PRG:0129 A2 01 86 63 E6 60 A9 00 85 CC 85 67 4C 40 C3 20 + .byte $0D, $CF, $20, $49, $CF, $A6, $64, $BD, $B2, $C1, $A8, $A2, $00, $A5, $63, $C9 ; CPU:$C139 PRG:0139 0D CF 20 49 CF A6 64 BD B2 C1 A8 A2 00 A5 63 C9 + .byte $03, $F0, $02, $A2, $10, $A9, $00, $95, $80, $20, $EC, $C9, $88, $D0, $F6, $20 ; CPU:$C149 PRG:0149 03 F0 02 A2 10 A9 00 95 80 20 EC C9 88 D0 F6 20 + .byte $E4, $D4, $A9, $01, $85, $CC, $60, $A5, $09, $4A, $B0, $03, $20, $6D, $CE, $AD ; CPU:$C159 PRG:0159 E4 D4 A9 01 85 CC 60 A5 09 4A B0 03 20 6D CE AD + .byte $0B, $03, $D0, $14, $A5, $09, $29, $0F, $D0, $06, $A5, $76, $49, $01, $85, $76 ; CPU:$C169 PRG:0169 0B 03 D0 14 A5 09 29 0F D0 06 A5 76 49 01 85 76 + .byte $20, $25, $CA, $90, $03, $EE, $0B, $03, $20, $DD, $C9, $20, $04, $CA, $F0, $1D ; CPU:$C179 PRG:0179 20 25 CA 90 03 EE 0B 03 20 DD C9 20 04 CA F0 1D + .byte $20, $4E, $D5, $A9, $47, $20, $0D, $F8, $A9, $00, $85, $EA, $A9, $0A, $85, $EB ; CPU:$C189 PRG:0189 20 4E D5 A9 47 20 0D F8 A9 00 85 EA A9 0A 85 EB + .byte $20, $C4, $C6, $20, $25, $CA, $90, $04, $A9, $02, $85, $CC, $60, $20, $25, $CA ; CPU:$C199 PRG:0199 20 C4 C6 20 25 CA 90 04 A9 02 85 CC 60 20 25 CA + .byte $90, $FA, $A9, $02, $85, $CC, $4C, $50, $C2, $05, $05, $02, $01, $04 ; CPU:$C1A9 PRG:01A9 90 FA A9 02 85 CC 4C 50 C2 05 05 02 01 04 + +; ----------------------------------------------------------------------------- +; Routine: RunSecondaryStateDispatcher +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +RunSecondaryStateDispatcher: + lda Zp00 ; CPU:C1B7 PRG:01B7 A5 00 + jsr $C1D5 ; CPU:C1B9 PRG:01B9 20 D5 C1 + ldx Zp00 ; CPU:C1BC PRG:01BC A6 00 + lda $C1CC,x ; CPU:C1BE PRG:01BE BD CC C1 + beq ReturnFromSecondaryDispatcher ; CPU:C1C1 PRG:01C1 F0 08 + bmi DispatchSecondaryState ; CPU:C1C3 PRG:01C3 30 03 + jmp $C64B ; CPU:C1C5 PRG:01C5 4C 4B C6 +; ----------------------------------------------------------------------------- +; Routine: DispatchSecondaryState +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchSecondaryState: + jmp $C45D ; CPU:C1C8 PRG:01C8 4C 5D C4 +; ----------------------------------------------------------------------------- +; Routine: ReturnFromSecondaryDispatcher +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReturnFromSecondaryDispatcher: + rts ; CPU:C1CB PRG:01CB 60 + +SecondaryStateEligibilityTable: + .byte $FF, $FF, $FF, $00, $00, $01, $01, $01, $01 ; CPU:$C1CC PRG:01CC FF FF FF 00 00 01 01 01 01 + +; ----------------------------------------------------------------------------- +; Routine: DispatchStateHandler +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchStateHandler: + jsr $C4CD ; CPU:C1D5 PRG:01D5 20 CD C4 + nop ; CPU:C1D8 PRG:01D8 EA + cmp ($12,x) ; CPU:C1D9 PRG:01D9 C1 12 + +SecondaryStateHandlerPointerTable: + .byte $C2, $3A, $C2, $5D, $C2, $7D, $C2, $F5, $C2, $03, $C3, $60, $C3, $8B, $C3 ; CPU:$C1DB PRG:01DB C2 3A C2 5D C2 7D C2 F5 C2 03 C3 60 C3 8B C3 + + ldx StateSubstage ; CPU:C1EA PRG:01EA A6 01 + beq ContinueStateInitialization ; CPU:C1EC PRG:01EC F0 1E + dex ; CPU:C1EE PRG:01EE CA + beq InitializeCurrentScreen ; CPU:C1EF PRG:01EF F0 08 + jsr $C3AA ; CPU:C1F1 PRG:01F1 20 AA C3 + lda #$00 ; CPU:C1F4 PRG:01F4 A9 00 + jmp $C2A7 ; CPU:C1F6 PRG:01F6 4C A7 C2 +; ----------------------------------------------------------------------------- +; Routine: InitializeCurrentScreen +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +InitializeCurrentScreen: + dec StateTimer ; CPU:C1F9 PRG:01F9 C6 02 + bne ReturnFromSecondaryDispatcher ; CPU:C1FB PRG:01FB D0 CE + jsr $C3BE ; CPU:C1FD PRG:01FD 20 BE C3 + jsr $C0B8 ; CPU:C200 PRG:0200 20 B8 C0 + jsr $C3D6 ; CPU:C203 PRG:0203 20 D6 C3 + jsr $C4C8 ; CPU:C206 PRG:0206 20 C8 C4 + jmp $C254 ; CPU:C209 PRG:0209 4C 54 C2 +; ----------------------------------------------------------------------------- +; Routine: ContinueStateInitialization +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ContinueStateInitialization: + jsr $C3D6 ; CPU:C20C PRG:020C 20 D6 C3 + jmp $C250 ; CPU:C20F PRG:020F 4C 50 C2 + lda StateSubstage ; CPU:C212 PRG:0212 A5 01 + bne UpdateMenuState ; CPU:C214 PRG:0214 D0 06 + jsr $CCD9 ; CPU:C216 PRG:0216 20 D9 CC + jmp $C254 ; CPU:C219 PRG:0219 4C 54 C2 +; ----------------------------------------------------------------------------- +; Routine: UpdateMenuState +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +UpdateMenuState: + jsr $D597 ; CPU:C21C PRG:021C 20 97 D5 + lda ControllerEdgeFlags ; CPU:C21F PRG:021F A5 09 + lsr a ; CPU:C221 PRG:0221 4A + bcc UpdateMenuState_OnCarryClear_C228 ; CPU:C222 PRG:0222 90 04 + dec StateTimer ; CPU:C224 PRG:0224 C6 02 + beq UpdateMenuState_OnZero_C22B ; CPU:C226 PRG:0226 F0 03 +; ----------------------------------------------------------------------------- +; Routine: UpdateMenuState_OnCarryClear_C228 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +UpdateMenuState_OnCarryClear_C228: + jmp $C58F ; CPU:C228 PRG:0228 4C 8F C5 +; ----------------------------------------------------------------------------- +; Routine: UpdateMenuState_OnZero_C22B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +UpdateMenuState_OnZero_C22B: + lda Zp0E ; CPU:C22B PRG:022B A5 0E + bne UpdateMenuState_OnNonzero_C237 ; CPU:C22D PRG:022D D0 08 + lda #$F0 ; CPU:C22F PRG:022F A9 F0 + sta $0200 ; CPU:C231 PRG:0231 8D 00 02 + jmp $C2A5 ; CPU:C234 PRG:0234 4C A5 C2 +; ----------------------------------------------------------------------------- +; Routine: UpdateMenuState_OnNonzero_C237 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +UpdateMenuState_OnNonzero_C237: + jmp $C470 ; CPU:C237 PRG:0237 4C 70 C4 + ldx StateSubstage ; CPU:C23A PRG:023A A6 01 + beq UpdateMenuState_OnZero_C241 ; CPU:C23C PRG:023C F0 03 + jmp $D280 ; CPU:C23E PRG:023E 4C 80 D2 +; ----------------------------------------------------------------------------- +; Routine: UpdateMenuState_OnZero_C241 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +UpdateMenuState_OnZero_C241: + jsr $CCD0 ; CPU:C241 PRG:0241 20 D0 CC + jsr $C3D6 ; CPU:C244 PRG:0244 20 D6 C3 + jsr $D73E ; CPU:C247 PRG:0247 20 3E D7 + jsr $C5CB ; CPU:C24A PRG:024A 20 CB C5 + jsr $C4C8 ; CPU:C24D PRG:024D 20 C8 C4 +; ----------------------------------------------------------------------------- +; Routine: UpdateMenuState_LoadAndContinue_C250 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +UpdateMenuState_LoadAndContinue_C250: + lda #$20 ; CPU:C250 PRG:0250 A9 20 +; ----------------------------------------------------------------------------- +; Routine: FinishStateHandler +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +FinishStateHandler: + sta StateTimer ; CPU:C252 PRG:0252 85 02 +; ----------------------------------------------------------------------------- +; Routine: FinishStateHandler_OnNonzero_C254 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +FinishStateHandler_OnNonzero_C254: + inc StateSubstage ; CPU:C254 PRG:0254 E6 01 + rts ; CPU:C256 PRG:0256 60 +; ----------------------------------------------------------------------------- +; Routine: FinishStateHandler_OnZero_C257 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +FinishStateHandler_OnZero_C257: + jsr $C2A5 ; CPU:C257 PRG:0257 20 A5 C2 + pla ; CPU:C25A PRG:025A 68 + pla ; CPU:C25B PRG:025B 68 + rts ; CPU:C25C PRG:025C 60 + ldx StateSubstage ; CPU:C25D PRG:025D A6 01 + beq FinishStateHandler_OnZero_C271 ; CPU:C25F PRG:025F F0 10 + dec StateTimer ; CPU:C261 PRG:0261 C6 02 + beq FinishStateHandler_OnZero_C257 ; CPU:C263 PRG:0263 F0 F2 + lda #$08 ; CPU:C265 PRG:0265 A9 08 + and StateTimer ; CPU:C267 PRG:0267 25 02 + bne FinishStateHandler_OnNonzero_C26E ; CPU:C269 PRG:0269 D0 03 + jmp $C5B2 ; CPU:C26B PRG:026B 4C B2 C5 +; ----------------------------------------------------------------------------- +; Routine: FinishStateHandler_OnNonzero_C26E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +FinishStateHandler_OnNonzero_C26E: + jmp $C5C3 ; CPU:C26E PRG:026E 4C C3 C5 +; ----------------------------------------------------------------------------- +; Routine: FinishStateHandler_OnZero_C271 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +FinishStateHandler_OnZero_C271: + jsr $CA3B ; CPU:C271 PRG:0271 20 3B CA + jsr $CBDA ; CPU:C274 PRG:0274 20 DA CB + lda #$50 ; CPU:C277 PRG:0277 A9 50 + sta StateTimer ; CPU:C279 PRG:0279 85 02 + bne FinishStateHandler_OnNonzero_C254 ; CPU:C27B PRG:027B D0 D7 + ldx StateSubstage ; CPU:C27D PRG:027D A6 01 + beq ContinueStateInitialization ; CPU:C27F PRG:027F F0 8B + dex ; CPU:C281 PRG:0281 CA + beq FinishStateHandler_OnZero_C2D2 ; CPU:C282 PRG:0282 F0 4E + dex ; CPU:C284 PRG:0284 CA + beq FinishStateHandler_OnZero_C2B2 ; CPU:C285 PRG:0285 F0 2B + lda StateTimer ; CPU:C287 PRG:0287 A5 02 + beq FinishStateHandler_OnZero_C28F ; CPU:C289 PRG:0289 F0 04 + dec StateTimer ; CPU:C28B PRG:028B C6 02 + bne FinishStateHandler_JoinBranchPaths_C2B1 ; CPU:C28D PRG:028D D0 22 +; ----------------------------------------------------------------------------- +; Routine: FinishStateHandler_OnZero_C28F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +FinishStateHandler_OnZero_C28F: + jsr $CA25 ; CPU:C28F PRG:028F 20 25 CA + bcc FinishStateHandler_JoinBranchPaths_C2B1 ; CPU:C292 PRG:0292 90 1D + lda #$87 ; CPU:C294 PRG:0294 A9 87 + jsr $C4E3 ; CPU:C296 PRG:0296 20 E3 C4 + jsr $C835 ; CPU:C299 PRG:0299 20 35 C8 + jsr $C4C8 ; CPU:C29C PRG:029C 20 C8 C4 + dec Zp60 ; CPU:C29F PRG:029F C6 60 + lda #$01 ; CPU:C2A1 PRG:02A1 A9 01 + sta Zp0A ; CPU:C2A3 PRG:02A3 85 0A +; ----------------------------------------------------------------------------- +; Routine: FinishStateHandler_OnNonzero_C2A5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +FinishStateHandler_OnNonzero_C2A5: + lda #$20 ; CPU:C2A5 PRG:02A5 A9 20 +; ----------------------------------------------------------------------------- +; Routine: FinishStateHandler_StoreAndContinue_C2A7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +FinishStateHandler_StoreAndContinue_C2A7: + sta StateTimer ; CPU:C2A7 PRG:02A7 85 02 + inc Zp00 ; CPU:C2A9 PRG:02A9 E6 00 +; ----------------------------------------------------------------------------- +; Routine: FinishStateHandler_LoadAndContinue_C2AB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +FinishStateHandler_LoadAndContinue_C2AB: + lda #$00 ; CPU:C2AB PRG:02AB A9 00 + sta Zp0A ; CPU:C2AD PRG:02AD 85 0A + sta StateSubstage ; CPU:C2AF PRG:02AF 85 01 +; ----------------------------------------------------------------------------- +; Routine: FinishStateHandler_JoinBranchPaths_C2B1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +FinishStateHandler_JoinBranchPaths_C2B1: + rts ; CPU:C2B1 PRG:02B1 60 +; ----------------------------------------------------------------------------- +; Routine: FinishStateHandler_OnZero_C2B2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +FinishStateHandler_OnZero_C2B2: + dec StateTimer ; CPU:C2B2 PRG:02B2 C6 02 + bne FinishStateHandler_JoinBranchPaths_C2B1 ; CPU:C2B4 PRG:02B4 D0 FB + lda #$07 ; CPU:C2B6 PRG:02B6 A9 07 + jsr $C4E3 ; CPU:C2B8 PRG:02B8 20 E3 C4 + ldx #$E0 ; CPU:C2BB PRG:02BB A2 E0 + lda #$06 ; CPU:C2BD PRG:02BD A9 06 + jsr $C53F ; CPU:C2BF PRG:02BF 20 3F C5 + lda Zp61 ; CPU:C2C2 PRG:02C2 A5 61 + jsr $C637 ; CPU:C2C4 PRG:02C4 20 37 C6 + jsr $C5CB ; CPU:C2C7 PRG:02C7 20 CB C5 + jsr $C4C8 ; CPU:C2CA PRG:02CA 20 C8 C4 + lda #$80 ; CPU:C2CD PRG:02CD A9 80 + jmp $C252 ; CPU:C2CF PRG:02CF 4C 52 C2 +; ----------------------------------------------------------------------------- +; Routine: FinishStateHandler_OnZero_C2D2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +FinishStateHandler_OnZero_C2D2: + dec StateTimer ; CPU:C2D2 PRG:02D2 C6 02 + bne FinishStateHandler_JoinBranchPaths_C2B1 ; CPU:C2D4 PRG:02D4 D0 DB + jsr $CCD0 ; CPU:C2D6 PRG:02D6 20 D0 CC + jsr $CA5C ; CPU:C2D9 PRG:02D9 20 5C CA + ldx #$01 ; CPU:C2DC PRG:02DC A2 01 + lda Zp03 ; CPU:C2DE PRG:02DE A5 03 + asl a ; CPU:C2E0 PRG:02E0 0A + asl a ; CPU:C2E1 PRG:02E1 0A + bpl FinishStateHandler_OnNonnegative_C2EB ; CPU:C2E2 PRG:02E2 10 07 + lda #$05 ; CPU:C2E4 PRG:02E4 A9 05 + jsr $C6AD ; CPU:C2E6 PRG:02E6 20 AD C6 + ldx #$50 ; CPU:C2E9 PRG:02E9 A2 50 +; ----------------------------------------------------------------------------- +; Routine: FinishStateHandler_OnNonnegative_C2EB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +FinishStateHandler_OnNonnegative_C2EB: + jsr $CB2D ; CPU:C2EB PRG:02EB 20 2D CB + jsr $C4C8 ; CPU:C2EE PRG:02EE 20 C8 C4 + txa ; CPU:C2F1 PRG:02F1 8A + jmp $C252 ; CPU:C2F2 PRG:02F2 4C 52 C2 + jsr $D280 ; CPU:C2F5 PRG:02F5 20 80 D2 + lda #$08 ; CPU:C2F8 PRG:02F8 A9 08 + ldx Zp0B ; CPU:C2FA PRG:02FA A6 0B + bne AdvanceRoundTransition ; CPU:C2FC PRG:02FC D0 44 + lda Zp0A ; CPU:C2FE PRG:02FE A5 0A + bne FinishStateHandler_OnNonzero_C2A5 ; CPU:C300 PRG:0300 D0 A3 + rts ; CPU:C302 PRG:0302 60 + lda Zp00 ; CPU:C303 PRG:0303 A5 00 + sta Zp6E ; CPU:C305 PRG:0305 85 6E + ldx StateSubstage ; CPU:C307 PRG:0307 A6 01 + beq AdvanceRoundTransition_OnZero_C34B ; CPU:C309 PRG:0309 F0 40 + lda #$04 ; CPU:C30B PRG:030B A9 04 + jsr $C6AD ; CPU:C30D PRG:030D 20 AD C6 + lda Zp03 ; CPU:C310 PRG:0310 A5 03 + and #$20 ; CPU:C312 PRG:0312 29 20 + bne FinishStateHandler_OnNonzero_C31B ; CPU:C314 PRG:0314 D0 05 + lda #$85 ; CPU:C316 PRG:0316 A9 85 + jsr $C4E3 ; CPU:C318 PRG:0318 20 E3 C4 +; ----------------------------------------------------------------------------- +; Routine: FinishStateHandler_OnNonzero_C31B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +FinishStateHandler_OnNonzero_C31B: + lda #$06 ; CPU:C31B PRG:031B A9 06 + sta Zp00 ; CPU:C31D PRG:031D 85 00 + lda #$00 ; CPU:C31F PRG:031F A9 00 + sta Zp0E ; CPU:C321 PRG:0321 85 0E + jmp $C2A7 ; CPU:C323 PRG:0323 4C A7 C2 +; ----------------------------------------------------------------------------- +; Routine: FinishStateHandler_OnNonzero_C326 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +FinishStateHandler_OnNonzero_C326: + lda $0100 ; CPU:C326 PRG:0326 AD 00 01 + beq FinishStateHandler_OnZero_C340 ; CPU:C329 PRG:0329 F0 15 +; ----------------------------------------------------------------------------- +; Routine: FinishStateHandler_LoadIndexAndContinue_C32B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +FinishStateHandler_LoadIndexAndContinue_C32B: + ldx #$80 ; CPU:C32B PRG:032B A2 80 +; ----------------------------------------------------------------------------- +; Routine: FinishStateHandler_OnNonzero_C32D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +FinishStateHandler_OnNonzero_C32D: + lda Zp5F,x ; CPU:C32D PRG:032D B5 5F + ldy a:ZpFF,x ; CPU:C32F PRG:032F BC FF 00 + sta a:ZpFF,x ; CPU:C332 PRG:0332 9D FF 00 + sty Zp5F,x ; CPU:C335 PRG:0335 94 5F + dex ; CPU:C337 PRG:0337 CA + bne FinishStateHandler_OnNonzero_C32D ; CPU:C338 PRG:0338 D0 F3 + lda Zp03 ; CPU:C33A PRG:033A A5 03 + eor #$80 ; CPU:C33C PRG:033C 49 80 + sta Zp03 ; CPU:C33E PRG:033E 85 03 +; ----------------------------------------------------------------------------- +; Routine: FinishStateHandler_OnZero_C340 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +FinishStateHandler_OnZero_C340: + lda #$04 ; CPU:C340 PRG:0340 A9 04 +; ----------------------------------------------------------------------------- +; Routine: AdvanceRoundTransition +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +AdvanceRoundTransition: + sta Zp00 ; CPU:C342 PRG:0342 85 00 + lda #$20 ; CPU:C344 PRG:0344 A9 20 + sta StateTimer ; CPU:C346 PRG:0346 85 02 + jmp $C2AB ; CPU:C348 PRG:0348 4C AB C2 +; ----------------------------------------------------------------------------- +; Routine: AdvanceRoundTransition_OnZero_C34B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +AdvanceRoundTransition_OnZero_C34B: + jsr $C3D6 ; CPU:C34B PRG:034B 20 D6 C3 + jsr $C5CB ; CPU:C34E PRG:034E 20 CB C5 + jsr $C4C8 ; CPU:C351 PRG:0351 20 C8 C4 + inc Zp67 ; CPU:C354 PRG:0354 E6 67 + lda Zp60 ; CPU:C356 PRG:0356 A5 60 + bne FinishStateHandler_OnNonzero_C326 ; CPU:C358 PRG:0358 D0 CC + jsr $CA5C ; CPU:C35A PRG:035A 20 5C CA + inc StateSubstage ; CPU:C35D PRG:035D E6 01 + rts ; CPU:C35F PRG:035F 60 + ldy #$00 ; CPU:C360 PRG:0360 A0 00 + sty Zp67 ; CPU:C362 PRG:0362 84 67 + sty Zp66 ; CPU:C364 PRG:0364 84 66 + sty Zp6E ; CPU:C366 PRG:0366 84 6E + lda $0100 ; CPU:C368 PRG:0368 AD 00 01 + bne AdvanceRoundTransition_JoinBranchPaths_C376 ; CPU:C36B PRG:036B D0 09 + lda Zp05 ; CPU:C36D PRG:036D A5 05 + and #$10 ; CPU:C36F PRG:036F 29 10 + beq AdvanceRoundTransition_JoinBranchPaths_C376 ; CPU:C371 PRG:0371 F0 03 + jmp $C45D ; CPU:C373 PRG:0373 4C 5D C4 +; ----------------------------------------------------------------------------- +; Routine: AdvanceRoundTransition_JoinBranchPaths_C376 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +AdvanceRoundTransition_JoinBranchPaths_C376: + dec StateTimer ; CPU:C376 PRG:0376 C6 02 + bne AdvanceRoundTransition_JoinBranchPaths_C399 ; CPU:C378 PRG:0378 D0 1F + lda $0100 ; CPU:C37A PRG:037A AD 00 01 + beq AdvanceRoundTransition_OnZero_C382 ; CPU:C37D PRG:037D F0 03 + jmp $C32B ; CPU:C37F PRG:037F 4C 2B C3 +; ----------------------------------------------------------------------------- +; Routine: AdvanceRoundTransition_OnZero_C382 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +AdvanceRoundTransition_OnZero_C382: + lda Zp03 ; CPU:C382 PRG:0382 A5 03 + and #$BF ; CPU:C384 PRG:0384 29 BF + sta Zp03 ; CPU:C386 PRG:0386 85 03 + jmp $C0F4 ; CPU:C388 PRG:0388 4C F4 C0 + jsr $D5DF ; CPU:C38B PRG:038B 20 DF D5 + lda Zp00 ; CPU:C38E PRG:038E A5 00 + sta Zp6E ; CPU:C390 PRG:0390 85 6E + ldx StateSubstage ; CPU:C392 PRG:0392 A6 01 + beq AdvanceRoundTransition_OnZero_C39A ; CPU:C394 PRG:0394 F0 04 + dex ; CPU:C396 PRG:0396 CA + beq AdvanceRoundTransition_JoinBranchPaths_C399 ; CPU:C397 PRG:0397 F0 00 +; ----------------------------------------------------------------------------- +; Routine: AdvanceRoundTransition_JoinBranchPaths_C399 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +AdvanceRoundTransition_JoinBranchPaths_C399: + rts ; CPU:C399 PRG:0399 60 +; ----------------------------------------------------------------------------- +; Routine: AdvanceRoundTransition_OnZero_C39A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +AdvanceRoundTransition_OnZero_C39A: + clc ; CPU:C39A PRG:039A 18 + ldx #$00 ; CPU:C39B PRG:039B A2 00 + stx Zp0B ; CPU:C39D PRG:039D 86 0B + lda Zp61 ; CPU:C39F PRG:039F A5 61 + inx ; CPU:C3A1 PRG:03A1 E8 + jsr $C6F3 ; CPU:C3A2 PRG:03A2 20 F3 C6 + sta Zp61 ; CPU:C3A5 PRG:03A5 85 61 + jmp $C250 ; CPU:C3A7 PRG:03A7 4C 50 C2 +; ----------------------------------------------------------------------------- +; Routine: AdvanceRoundTransition_CallNext_C3AA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +AdvanceRoundTransition_CallNext_C3AA: + jsr $C753 ; CPU:C3AA PRG:03AA 20 53 C7 + lda #$03 ; CPU:C3AD PRG:03AD A9 03 + jsr $C4E3 ; CPU:C3AF PRG:03AF 20 E3 C4 + jsr $C5B2 ; CPU:C3B2 PRG:03B2 20 B2 C5 + jmp $C4C8 ; CPU:C3B5 PRG:03B5 4C C8 C4 +; ----------------------------------------------------------------------------- +; Routine: AdvanceRoundTransition_CallNext_C3B8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +AdvanceRoundTransition_CallNext_C3B8: + jsr $C3D6 ; CPU:C3B8 PRG:03B8 20 D6 C3 + jmp $C3C1 ; CPU:C3BB PRG:03BB 4C C1 C3 +; ----------------------------------------------------------------------------- +; Routine: InitializeApuAndPpu +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +InitializeApuAndPpu: + jsr $CCD9 ; CPU:C3BE PRG:03BE 20 D9 CC +; ----------------------------------------------------------------------------- +; Routine: InitializeApuAndPpu_LoadAndContinue_C3C1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +InitializeApuAndPpu_LoadAndContinue_C3C1: + lda #$1F ; CPU:C3C1 PRG:03C1 A9 1F + sta $4015 ; CPU:C3C3 PRG:03C3 8D 15 40 + lda #$C0 ; CPU:C3C6 PRG:03C6 A9 C0 + sta $4017 ; CPU:C3C8 PRG:03C8 8D 17 40 + jsr $C0CB ; CPU:C3CB PRG:03CB 20 CB C0 + lda #$88 ; CPU:C3CE PRG:03CE A9 88 + sta PpuCtrlShadow ; CPU:C3D0 PRG:03D0 85 53 + sta $2000 ; CPU:C3D2 PRG:03D2 8D 00 20 + rts ; CPU:C3D5 PRG:03D5 60 +; ----------------------------------------------------------------------------- +; Routine: InitializeNametablePages +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +InitializeNametablePages: + jsr $C556 ; CPU:C3D6 PRG:03D6 20 56 C5 + jsr $C3E0 ; CPU:C3D9 PRG:03D9 20 E0 C3 + lda #$2C ; CPU:C3DC PRG:03DC A9 2C + bne SelectNametableClearPage_OnNonzero_C3E2 ; CPU:C3DE PRG:03DE D0 02 +; ----------------------------------------------------------------------------- +; Routine: SelectNametableClearPage +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SelectNametableClearPage: + lda #$20 ; CPU:C3E0 PRG:03E0 A9 20 +; ----------------------------------------------------------------------------- +; Routine: SelectNametableClearPage_OnNonzero_C3E2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SelectNametableClearPage_OnNonzero_C3E2: + sta IndirectPointerHi ; CPU:C3E2 PRG:03E2 85 E1 + ldy #$04 ; CPU:C3E4 PRG:03E4 A0 04 + lda #$00 ; CPU:C3E6 PRG:03E6 A9 00 + sta IndirectPointerLo ; CPU:C3E8 PRG:03E8 85 E0 + sta TransferByteCount ; CPU:C3EA PRG:03EA 85 E2 +; ----------------------------------------------------------------------------- +; Routine: SelectNametableClearPage_OnNonzero_C3EC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SelectNametableClearPage_OnNonzero_C3EC: + jsr $C3F5 ; CPU:C3EC PRG:03EC 20 F5 C3 + inc IndirectPointerHi ; CPU:C3EF PRG:03EF E6 E1 + dey ; CPU:C3F1 PRG:03F1 88 + bne SelectNametableClearPage_OnNonzero_C3EC ; CPU:C3F2 PRG:03F2 D0 F8 + rts ; CPU:C3F4 PRG:03F4 60 +; ----------------------------------------------------------------------------- +; Routine: ClearPpuPage +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ClearPpuPage: + lda #$00 ; CPU:C3F5 PRG:03F5 A9 00 + jsr $C4BA ; CPU:C3F7 PRG:03F7 20 BA C4 +; ----------------------------------------------------------------------------- +; Routine: ClearPpuPage_OnNonzero_C3FA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ClearPpuPage_OnNonzero_C3FA: + sta $2007 ; CPU:C3FA PRG:03FA 8D 07 20 + dec TransferByteCount ; CPU:C3FD PRG:03FD C6 E2 + bne ClearPpuPage_OnNonzero_C3FA ; CPU:C3FF PRG:03FF D0 F9 + rts ; CPU:C401 PRG:0401 60 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers: + ldx #$01 ; CPU:C402 PRG:0402 A2 01 + stx $4016 ; CPU:C404 PRG:0404 8E 16 40 + dex ; CPU:C407 PRG:0407 CA + stx $4016 ; CPU:C408 PRG:0408 8E 16 40 + ldy #$08 ; CPU:C40B PRG:040B A0 08 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnNonzero_C40D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnNonzero_C40D: + lda $4016 ; CPU:C40D PRG:040D AD 16 40 + sta ControllerReadScratch ; CPU:C410 PRG:0410 85 E7 + lsr a ; CPU:C412 PRG:0412 4A + ora ControllerReadScratch ; CPU:C413 PRG:0413 05 E7 + lsr a ; CPU:C415 PRG:0415 4A + rol Controller1Shift ; CPU:C416 PRG:0416 26 E4 + lda $4017 ; CPU:C418 PRG:0418 AD 17 40 + sta ControllerReadScratch ; CPU:C41B PRG:041B 85 E7 + lsr a ; CPU:C41D PRG:041D 4A + ora ControllerReadScratch ; CPU:C41E PRG:041E 05 E7 + lsr a ; CPU:C420 PRG:0420 4A + rol Controller2Shift ; CPU:C421 PRG:0421 26 E5 + dey ; CPU:C423 PRG:0423 88 + bne ReadControllers_OnNonzero_C40D ; CPU:C424 PRG:0424 D0 E7 + lda Zp05 ; CPU:C426 PRG:0426 A5 05 + and #$10 ; CPU:C428 PRG:0428 29 10 + eor Zp0E ; CPU:C42A PRG:042A 45 0E + sta Zp0E ; CPU:C42C PRG:042C 85 0E + lda Zp03 ; CPU:C42E PRG:042E A5 03 + and #$20 ; CPU:C430 PRG:0430 29 20 + beq ReadControllers_OnZero_C44E ; CPU:C432 PRG:0432 F0 1A + lda Zp03 ; CPU:C434 PRG:0434 A5 03 + and #$F0 ; CPU:C436 PRG:0436 29 F0 + cmp #$E0 ; CPU:C438 PRG:0438 C9 E0 + beq ReadControllers_OnEqualE0_C452 ; CPU:C43A PRG:043A F0 16 + lda Controller1Shift ; CPU:C43C PRG:043C A5 E4 + jsr $C458 ; CPU:C43E PRG:043E 20 58 C4 + inx ; CPU:C441 PRG:0441 E8 + lda Controller1Shift,x ; CPU:C442 PRG:0442 B5 E4 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_StoreAndContinue_C444 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_StoreAndContinue_C444: + tay ; CPU:C444 PRG:0444 A8 + eor Zp07,x ; CPU:C445 PRG:0445 55 07 + and Controller1Shift,x ; CPU:C447 PRG:0447 35 E4 + sta Zp05,x ; CPU:C449 PRG:0449 95 05 + sty Zp07,x ; CPU:C44B PRG:044B 94 07 + rts ; CPU:C44D PRG:044D 60 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnZero_C44E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnZero_C44E: + lda #$FF ; CPU:C44E PRG:044E A9 FF + bne ReadControllers_OnNonzero_C454 ; CPU:C450 PRG:0450 D0 02 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnEqualE0_C452 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnEqualE0_C452: + lda #$30 ; CPU:C452 PRG:0452 A9 30 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnNonzero_C454 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnNonzero_C454: + and Controller1Shift ; CPU:C454 PRG:0454 25 E4 + ora Controller2Shift ; CPU:C456 PRG:0456 05 E5 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_StoreAndContinue_C458 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_StoreAndContinue_C458: + sta Controller1Shift ; CPU:C458 PRG:0458 85 E4 + jmp $C444 ; CPU:C45A PRG:045A 4C 44 C4 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_LoadAndContinue_C45D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_LoadAndContinue_C45D: + lda Zp05 ; CPU:C45D PRG:045D A5 05 + and #$30 ; CPU:C45F PRG:045F 29 30 + beq ReadControllers_OnZero_C488 ; CPU:C461 PRG:0461 F0 25 + ldx #$00 ; CPU:C463 PRG:0463 A2 00 + stx StateTimer ; CPU:C465 PRG:0465 86 02 + ldx Zp00 ; CPU:C467 PRG:0467 A6 00 + dex ; CPU:C469 PRG:0469 CA + bne ReadControllers_OnNonzero_C489 ; CPU:C46A PRG:046A D0 1D + and #$20 ; CPU:C46C PRG:046C 29 20 + bne ReadControllers_OnNonzero_C480 ; CPU:C46E PRG:046E D0 10 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_LoadAndContinue_C470 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_LoadAndContinue_C470: + lda #$00 ; CPU:C470 PRG:0470 A9 00 + sta Zp0E ; CPU:C472 PRG:0472 85 0E + ldx Zp50 ; CPU:C474 PRG:0474 A6 50 + lda $C4A6,x ; CPU:C476 PRG:0476 BD A6 C4 + sta Zp03 ; CPU:C479 PRG:0479 85 03 + lda #$03 ; CPU:C47B PRG:047B A9 03 + jmp $C342 ; CPU:C47D PRG:047D 4C 42 C3 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnNonzero_C480 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnNonzero_C480: + inc Zp50 ; CPU:C480 PRG:0480 E6 50 + lda Zp50 ; CPU:C482 PRG:0482 A5 50 + and #$03 ; CPU:C484 PRG:0484 29 03 + sta Zp50 ; CPU:C486 PRG:0486 85 50 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnZero_C488 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnZero_C488: + rts ; CPU:C488 PRG:0488 60 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnNonzero_C489 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnNonzero_C489: + and #$10 ; CPU:C489 PRG:0489 29 10 + sta Zp0E ; CPU:C48B PRG:048B 85 0E + jsr $C0B8 ; CPU:C48D PRG:048D 20 B8 C0 + jsr $CCD9 ; CPU:C490 PRG:0490 20 D9 CC + jsr $C3D6 ; CPU:C493 PRG:0493 20 D6 C3 + jsr $C58F ; CPU:C496 PRG:0496 20 8F C5 + jsr $C3AA ; CPU:C499 PRG:0499 20 AA C3 + jsr $C0C3 ; CPU:C49C PRG:049C 20 C3 C0 + lda #$01 ; CPU:C49F PRG:049F A9 01 + sta Zp00 ; CPU:C4A1 PRG:04A1 85 00 + jmp $C2AB ; CPU:C4A3 PRG:04A3 4C AB C2 + +ControllerBitMaskTable: + .byte $40, $48, $60, $68 ; CPU:$C4A6 PRG:04A6 40 48 60 68 + +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_CallNext_C4AA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_CallNext_C4AA: + jsr $C4BA ; CPU:C4AA PRG:04AA 20 BA C4 + ldy #$00 ; CPU:C4AD PRG:04AD A0 00 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnNonzero_C4AF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnNonzero_C4AF: + lda ($E4),y ; CPU:C4AF PRG:04AF B1 E4 + sta $2007 ; CPU:C4B1 PRG:04B1 8D 07 20 + iny ; CPU:C4B4 PRG:04B4 C8 + dec TransferByteCount ; CPU:C4B5 PRG:04B5 C6 E2 + bne ReadControllers_OnNonzero_C4AF ; CPU:C4B7 PRG:04B7 D0 F6 + rts ; CPU:C4B9 PRG:04B9 60 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_LoadIndexAndContinue_C4BA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_LoadIndexAndContinue_C4BA: + ldx $2002 ; CPU:C4BA PRG:04BA AE 02 20 + ldx IndirectPointerHi ; CPU:C4BD PRG:04BD A6 E1 + stx $2006 ; CPU:C4BF PRG:04BF 8E 06 20 + ldx IndirectPointerLo ; CPU:C4C2 PRG:04C2 A6 E0 + stx $2006 ; CPU:C4C4 PRG:04C4 8E 06 20 + rts ; CPU:C4C7 PRG:04C7 60 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_LoadAndContinue_C4C8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_LoadAndContinue_C4C8: + lda #$07 ; CPU:C4C8 PRG:04C8 A9 07 + sta NmiDelayCounter ; CPU:C4CA PRG:04CA 85 FB + rts ; CPU:C4CC PRG:04CC 60 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_StoreAndContinue_C4CD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_StoreAndContinue_C4CD: + asl a ; CPU:C4CD PRG:04CD 0A + tay ; CPU:C4CE PRG:04CE A8 + iny ; CPU:C4CF PRG:04CF C8 + pla ; CPU:C4D0 PRG:04D0 68 + sta IndirectPointerLo ; CPU:C4D1 PRG:04D1 85 E0 + pla ; CPU:C4D3 PRG:04D3 68 + sta IndirectPointerHi ; CPU:C4D4 PRG:04D4 85 E1 + lda ($E0),y ; CPU:C4D6 PRG:04D6 B1 E0 + tax ; CPU:C4D8 PRG:04D8 AA + iny ; CPU:C4D9 PRG:04D9 C8 + lda ($E0),y ; CPU:C4DA PRG:04DA B1 E0 + sta IndirectPointerHi ; CPU:C4DC PRG:04DC 85 E1 + stx IndirectPointerLo ; CPU:C4DE PRG:04DE 86 E0 + jmp ($00E0) ; CPU:C4E0 PRG:04E0 6C E0 00 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_LoadIndexAndContinue_C4E3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_LoadIndexAndContinue_C4E3: + ldx #$FF ; CPU:C4E3 PRG:04E3 A2 FF + asl a ; CPU:C4E5 PRG:04E5 0A + tay ; CPU:C4E6 PRG:04E6 A8 + bcc ReadControllers_OnCarryClear_C4EA ; CPU:C4E7 PRG:04E7 90 01 + inx ; CPU:C4E9 PRG:04E9 E8 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnCarryClear_C4EA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnCarryClear_C4EA: + lda #$C2 ; CPU:C4EA PRG:04EA A9 C2 + sta Controller1Shift ; CPU:C4EC PRG:04EC 85 E4 + lda #$FF ; CPU:C4EE PRG:04EE A9 FF + sta Controller2Shift ; CPU:C4F0 PRG:04F0 85 E5 + lda ($E4),y ; CPU:C4F2 PRG:04F2 B1 E4 + sta TransferByteCount ; CPU:C4F4 PRG:04F4 85 E2 + iny ; CPU:C4F6 PRG:04F6 C8 + lda ($E4),y ; CPU:C4F7 PRG:04F7 B1 E4 + sta ZpE3 ; CPU:C4F9 PRG:04F9 85 E3 + txa ; CPU:C4FB PRG:04FB 8A + jmp $C505 ; CPU:C4FC PRG:04FC 4C 05 C5 + +VramCommandParameterTable: + .byte $A9, $00, $F0, $02, $A9, $FF ; CPU:$C4FF PRG:04FF A9 00 F0 02 A9 FF + +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_StoreAndContinue_C505 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_StoreAndContinue_C505: + sta Controller1Shift ; CPU:C505 PRG:0505 85 E4 + ldy #$00 ; CPU:C507 PRG:0507 A0 00 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnEqualFE_C509 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnEqualFE_C509: + lda ($E2),y ; CPU:C509 PRG:0509 B1 E2 + sta IndirectPointerLo ; CPU:C50B PRG:050B 85 E0 + iny ; CPU:C50D PRG:050D C8 + lda ($E2),y ; CPU:C50E PRG:050E B1 E2 + sta IndirectPointerHi ; CPU:C510 PRG:0510 85 E1 + iny ; CPU:C512 PRG:0512 C8 + jsr $C4BA ; CPU:C513 PRG:0513 20 BA C4 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnZero_C516 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnZero_C516: + lda ($E2),y ; CPU:C516 PRG:0516 B1 E2 + iny ; CPU:C518 PRG:0518 C8 + cmp #$FD ; CPU:C519 PRG:0519 C9 FD + bcc ReadControllers_OnBelowFD_C527 ; CPU:C51B PRG:051B 90 0A + beq ReadControllers_OnEqualFD_C530 ; CPU:C51D PRG:051D F0 11 + cmp #$FE ; CPU:C51F PRG:051F C9 FE + beq ReadControllers_OnEqualFE_C509 ; CPU:C521 PRG:0521 F0 E6 + cmp #$FF ; CPU:C523 PRG:0523 C9 FF + beq ReadControllers_OnEqualFF_C52F ; CPU:C525 PRG:0525 F0 08 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnBelowFD_C527 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnBelowFD_C527: + and Controller1Shift ; CPU:C527 PRG:0527 25 E4 + sta $2007 ; CPU:C529 PRG:0529 8D 07 20 + jmp $C516 ; CPU:C52C PRG:052C 4C 16 C5 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnEqualFF_C52F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnEqualFF_C52F: + rts ; CPU:C52F PRG:052F 60 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnEqualFD_C530 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnEqualFD_C530: + lda ($E2),y ; CPU:C530 PRG:0530 B1 E2 + tax ; CPU:C532 PRG:0532 AA + iny ; CPU:C533 PRG:0533 C8 + lda ($E2),y ; CPU:C534 PRG:0534 B1 E2 + iny ; CPU:C536 PRG:0536 C8 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnNonzero_C537 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnNonzero_C537: + sta $2007 ; CPU:C537 PRG:0537 8D 07 20 + dex ; CPU:C53A PRG:053A CA + bne ReadControllers_OnNonzero_C537 ; CPU:C53B PRG:053B D0 FA + beq ReadControllers_OnZero_C516 ; CPU:C53D PRG:053D F0 D7 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_StoreAndContinue_C53F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_StoreAndContinue_C53F: + clc ; CPU:C53F PRG:053F 18 + adc Zp00,x ; CPU:C540 PRG:0540 75 00 + sta Zp00,x ; CPU:C542 PRG:0542 95 00 + bcc ReadControllers_OnCarryClear_C548 ; CPU:C544 PRG:0544 90 02 + inc Zp01,x ; CPU:C546 PRG:0546 F6 01 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnCarryClear_C548 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnCarryClear_C548: + rts ; CPU:C548 PRG:0548 60 + +OamInitializationData: + .byte $88, $B1, $E0, $91, $E2, $98, $D0, $F8, $60, $E6, $03, $E6, $02 ; CPU:$C549 PRG:0549 88 B1 E0 91 E2 98 D0 F8 60 E6 03 E6 02 + +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_LoadAndContinue_C556 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_LoadAndContinue_C556: + lda #$F4 ; CPU:C556 PRG:0556 A9 F4 + ldx #$00 ; CPU:C558 PRG:0558 A2 00 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnNonzero_C55A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnNonzero_C55A: + sta $0200,x ; CPU:C55A PRG:055A 9D 00 02 + inx ; CPU:C55D PRG:055D E8 + inx ; CPU:C55E PRG:055E E8 + inx ; CPU:C55F PRG:055F E8 + inx ; CPU:C560 PRG:0560 E8 + bne ReadControllers_OnNonzero_C55A ; CPU:C561 PRG:0561 D0 F7 + rts ; CPU:C563 PRG:0563 60 + +SpriteTransferParameterTable: + .byte $A2, $5D, $A5, $03, $29, $20, $08, $F0, $02, $A2, $5A, $A9, $00, $95, $00, $E8 ; CPU:$C564 PRG:0564 A2 5D A5 03 29 20 08 F0 02 A2 5A A9 00 95 00 E8 + .byte $D0, $FB, $A2, $FC, $BD, $FA, $FE, $95, $64, $E8, $D0, $F8, $28, $D0, $01, $60 ; CPU:$C574 PRG:0574 D0 FB A2 FC BD FA FE 95 64 E8 D0 F8 28 D0 01 60 + .byte $A2, $20, $B5, $5F, $9D, $FF, $00, $CA, $D0, $F8, $60 ; CPU:$C584 PRG:0584 A2 20 B5 5F 9D FF 00 CA D0 F8 60 + +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_LoadIndexAndContinue_C58F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_LoadIndexAndContinue_C58F: + ldx #$07 ; CPU:C58F PRG:058F A2 07 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnNonnegative_C591 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnNonnegative_C591: + lda $C5A6,x ; CPU:C591 PRG:0591 BD A6 C5 + sta $0200,x ; CPU:C594 PRG:0594 9D 00 02 + dex ; CPU:C597 PRG:0597 CA + bpl ReadControllers_OnNonnegative_C591 ; CPU:C598 PRG:0598 10 F7 + ldx Zp50 ; CPU:C59A PRG:059A A6 50 + lda $C5AE,x ; CPU:C59C PRG:059C BD AE C5 + sta $0200 ; CPU:C59F PRG:059F 8D 00 02 + sta $0204 ; CPU:C5A2 PRG:05A2 8D 04 02 + rts ; CPU:C5A5 PRG:05A5 60 + +ScreenObjectParameterTable: + .byte $00, $B0, $00, $4E, $00, $B1, $00, $56, $A8, $B0, $B8, $C0 ; CPU:$C5A6 PRG:05A6 00 B0 00 4E 00 B1 00 56 A8 B0 B8 C0 + +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_LoadAndContinue_C5B2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_LoadAndContinue_C5B2: + lda #$03 ; CPU:C5B2 PRG:05B2 A9 03 + sta ZpEF ; CPU:C5B4 PRG:05B4 85 EF +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnNonnegative_C5B6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnNonnegative_C5B6: + lda ZpEF ; CPU:C5B6 PRG:05B6 A5 EF + clc ; CPU:C5B8 PRG:05B8 18 + adc #$0E ; CPU:C5B9 PRG:05B9 69 0E + jsr $C4E3 ; CPU:C5BB PRG:05BB 20 E3 C4 + dec ZpEF ; CPU:C5BE PRG:05BE C6 EF + bpl ReadControllers_OnNonnegative_C5B6 ; CPU:C5C0 PRG:05C0 10 F4 + rts ; CPU:C5C2 PRG:05C2 60 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_LoadAndContinue_C5C3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_LoadAndContinue_C5C3: + lda Zp50 ; CPU:C5C3 PRG:05C3 A5 50 + clc ; CPU:C5C5 PRG:05C5 18 + adc #$8E ; CPU:C5C6 PRG:05C6 69 8E + jmp $C4E3 ; CPU:C5C8 PRG:05C8 4C E3 C4 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_CallNext_C5CB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_CallNext_C5CB: + jsr $D714 ; CPU:C5CB PRG:05CB 20 14 D7 + jsr $D575 ; CPU:C5CE PRG:05CE 20 75 D5 + lda #$00 ; CPU:C5D1 PRG:05D1 A9 00 + jsr $C4E3 ; CPU:C5D3 PRG:05D3 20 E3 C4 + lda Zp03 ; CPU:C5D6 PRG:05D6 A5 03 + adc Zp03 ; CPU:C5D8 PRG:05D8 65 03 + bpl ReadControllers_OnNonnegative_C5E0 ; CPU:C5DA PRG:05DA 10 04 + and #$40 ; CPU:C5DC PRG:05DC 29 40 + beq ReadControllers_OnZero_C5EC ; CPU:C5DE PRG:05DE F0 0C +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnNonnegative_C5E0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnNonnegative_C5E0: + lda #$02 ; CPU:C5E0 PRG:05E0 A9 02 + jsr $C4E3 ; CPU:C5E2 PRG:05E2 20 E3 C4 + lda Zp03 ; CPU:C5E5 PRG:05E5 A5 03 + eor #$80 ; CPU:C5E7 PRG:05E7 49 80 + jsr $C5F7 ; CPU:C5E9 PRG:05E9 20 F7 C5 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnZero_C5EC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnZero_C5EC: + jsr $C67B ; CPU:C5EC PRG:05EC 20 7B C6 + jsr $C62D ; CPU:C5EF PRG:05EF 20 2D C6 + jsr $C606 ; CPU:C5F2 PRG:05F2 20 06 C6 + lda Zp03 ; CPU:C5F5 PRG:05F5 A5 03 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_LoadAndContinue_C5F7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_LoadAndContinue_C5F7: + bmi ReadControllers_OnNegative_C613 ; CPU:C5F7 PRG:05F7 30 1A + lda #$65 ; CPU:C5F9 PRG:05F9 A9 65 + sta IndirectPointerLo ; CPU:C5FB PRG:05FB 85 E0 + lda #$20 ; CPU:C5FD PRG:05FD A9 20 + sta IndirectPointerHi ; CPU:C5FF PRG:05FF 85 E1 + ldy #$5D ; CPU:C601 PRG:0601 A0 5D + jmp $C61D ; CPU:C603 PRG:0603 4C 1D C6 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_LoadAndContinue_C606 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_LoadAndContinue_C606: + lda #$6F ; CPU:C606 PRG:0606 A9 6F + sta IndirectPointerLo ; CPU:C608 PRG:0608 85 E0 + lda #$20 ; CPU:C60A PRG:060A A9 20 + sta IndirectPointerHi ; CPU:C60C PRG:060C 85 E1 + ldy #$57 ; CPU:C60E PRG:060E A0 57 + jmp $C61D ; CPU:C610 PRG:0610 4C 1D C6 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnNegative_C613 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnNegative_C613: + lda #$85 ; CPU:C613 PRG:0613 A9 85 + sta IndirectPointerLo ; CPU:C615 PRG:0615 85 E0 + lda #$20 ; CPU:C617 PRG:0617 A9 20 + sta IndirectPointerHi ; CPU:C619 PRG:0619 85 E1 + ldy #$5A ; CPU:C61B PRG:061B A0 5A +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_CallNext_C61D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_CallNext_C61D: + jsr $C4BA ; CPU:C61D PRG:061D 20 BA C4 + ldx #$03 ; CPU:C620 PRG:0620 A2 03 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnNonzero_C622 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnNonzero_C622: + lda a:Zp02,y ; CPU:C622 PRG:0622 B9 02 00 + jsr $C63A ; CPU:C625 PRG:0625 20 3A C6 + dey ; CPU:C628 PRG:0628 88 + dex ; CPU:C629 PRG:0629 CA + bne ReadControllers_OnNonzero_C622 ; CPU:C62A PRG:062A D0 F6 + rts ; CPU:C62C PRG:062C 60 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_LoadAndContinue_C62D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_LoadAndContinue_C62D: + lda #$7C ; CPU:C62D PRG:062D A9 7C + sta IndirectPointerLo ; CPU:C62F PRG:062F 85 E0 + lda #$20 ; CPU:C631 PRG:0631 A9 20 + sta IndirectPointerHi ; CPU:C633 PRG:0633 85 E1 + lda Zp61 ; CPU:C635 PRG:0635 A5 61 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_CallNext_C637 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_CallNext_C637: + jsr $C4BA ; CPU:C637 PRG:0637 20 BA C4 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_CallNext_C63A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_CallNext_C63A: + pha ; CPU:C63A PRG:063A 48 + lsr a ; CPU:C63B PRG:063B 4A + lsr a ; CPU:C63C PRG:063C 4A + lsr a ; CPU:C63D PRG:063D 4A + lsr a ; CPU:C63E PRG:063E 4A + jsr $C643 ; CPU:C63F PRG:063F 20 43 C6 + pla ; CPU:C642 PRG:0642 68 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_StoreAndContinue_C643 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_StoreAndContinue_C643: + and #$0F ; CPU:C643 PRG:0643 29 0F + ora #$30 ; CPU:C645 PRG:0645 09 30 + sta $2007 ; CPU:C647 PRG:0647 8D 07 20 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnCarrySet_C64A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnCarrySet_C64A: + rts ; CPU:C64A PRG:064A 60 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_CallNext_C64B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_CallNext_C64B: + jsr $D575 ; CPU:C64B PRG:064B 20 75 D5 + lda Zp03 ; CPU:C64E PRG:064E A5 03 + ror a ; CPU:C650 PRG:0650 6A + bcs ReadControllers_OnCarrySet_C64A ; CPU:C651 PRG:0651 B0 F7 + lda ControllerEdgeFlags ; CPU:C653 PRG:0653 A5 09 + and #$03 ; CPU:C655 PRG:0655 29 03 + jsr $C4CD ; CPU:C657 PRG:0657 20 CD C4 + asl ZpC6 ; CPU:C65A PRG:065A 06 C6 + sbc ZpC5,x ; CPU:C65C PRG:065C F5 C5 + +ObjectPositionLookupTable: + .byte $7B, $C6, $62, $C6, $A9, $1F, $85, $E4, $A2, $01, $A5, $09, $29, $20, $F0, $02 ; CPU:$C65E PRG:065E 7B C6 62 C6 A9 1F 85 E4 A2 01 A5 09 29 20 F0 02 + .byte $A2, $81, $A5, $03, $29, $80, $F0, $01, $E8, $8A, $4C, $E3, $C4 ; CPU:$C66E PRG:066E A2 81 A5 03 29 80 F0 01 E8 8A 4C E3 C4 + +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_LoadAndContinue_C67B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_LoadAndContinue_C67B: + lda #$9D ; CPU:C67B PRG:067B A9 9D + sta IndirectPointerLo ; CPU:C67D PRG:067D 85 E0 + lda #$20 ; CPU:C67F PRG:067F A9 20 + sta IndirectPointerHi ; CPU:C681 PRG:0681 85 E1 + lda Zp60 ; CPU:C683 PRG:0683 A5 60 + sta ZpE3 ; CPU:C685 PRG:0685 85 E3 + lda #$05 ; CPU:C687 PRG:0687 A9 05 + sta TransferByteCount ; CPU:C689 PRG:0689 85 E2 + ldy #$19 ; CPU:C68B PRG:068B A0 19 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnNonnegative_C68D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnNonnegative_C68D: + dec ZpE3 ; CPU:C68D PRG:068D C6 E3 + bpl ReadControllers_OnNonnegative_C693 ; CPU:C68F PRG:068F 10 02 + ldy #$00 ; CPU:C691 PRG:0691 A0 00 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnNonnegative_C693 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnNonnegative_C693: + jsr $C4BA ; CPU:C693 PRG:0693 20 BA C4 + sty $2007 ; CPU:C696 PRG:0696 8C 07 20 + ldx #$E0 ; CPU:C699 PRG:0699 A2 E0 + lda #$01 ; CPU:C69B PRG:069B A9 01 + eor #$FF ; CPU:C69D PRG:069D 49 FF + sec ; CPU:C69F PRG:069F 38 + adc Zp00,x ; CPU:C6A0 PRG:06A0 75 00 + sta Zp00,x ; CPU:C6A2 PRG:06A2 95 00 + bcs ReadControllers_OnCarrySet_C6A8 ; CPU:C6A4 PRG:06A4 B0 02 + dec Zp01,x ; CPU:C6A6 PRG:06A6 D6 01 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnCarrySet_C6A8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnCarrySet_C6A8: + dec TransferByteCount ; CPU:C6A8 PRG:06A8 C6 E2 + bpl ReadControllers_OnNonnegative_C68D ; CPU:C6AA PRG:06AA 10 E1 + rts ; CPU:C6AC PRG:06AC 60 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_CallNext_C6AD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_CallNext_C6AD: + jsr $C4E3 ; CPU:C6AD PRG:06AD 20 E3 C4 + ldy Zp03 ; CPU:C6B0 PRG:06B0 A4 03 + bpl ReadControllers_OnNonnegative_C6C3 ; CPU:C6B2 PRG:06B2 10 0F + ldy #$32 ; CPU:C6B4 PRG:06B4 A0 32 + lda #$07 ; CPU:C6B6 PRG:06B6 A9 07 + ldx #$E0 ; CPU:C6B8 PRG:06B8 A2 E0 + jsr $C53F ; CPU:C6BA PRG:06BA 20 3F C5 + jsr $C4BA ; CPU:C6BD PRG:06BD 20 BA C4 + sty $2007 ; CPU:C6C0 PRG:06C0 8C 07 20 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnNonnegative_C6C3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnNonnegative_C6C3: + rts ; CPU:C6C3 PRG:06C3 60 + +ObjectAttributeLookupTable: + .byte $A9, $00, $85, $E9, $A5, $03, $0A, $10, $25, $A9, $5D, $90, $02, $A9, $5A, $85 ; CPU:$C6C4 PRG:06C4 A9 00 85 E9 A5 03 0A 10 25 A9 5D 90 02 A9 5A 85 + .byte $EC, $A0, $00, $84, $ED, $A2, $03, $18, $B1, $EC, $20, $F7, $C6, $91, $EC, $C8 ; CPU:$C6D4 PRG:06D4 EC A0 00 84 ED A2 03 18 B1 EC 20 F7 C6 91 EC C8 + .byte $CA, $D0, $F5, $90, $38, $A2, $02, $A9, $99, $95, $57, $CA, $10, $FB, $60 ; CPU:$C6E4 PRG:06E4 CA D0 F5 90 38 A2 02 A9 99 95 57 CA 10 FB 60 + +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_StoreIndexAndContinue_C6F3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_StoreIndexAndContinue_C6F3: + stx ZpE8 ; CPU:C6F3 PRG:06F3 86 E8 + ldx #$00 ; CPU:C6F5 PRG:06F5 A2 00 + sta ZpEF ; CPU:C6F7 PRG:06F7 85 EF + and #$F0 ; CPU:C6F9 PRG:06F9 29 F0 + sta ZpEE ; CPU:C6FB PRG:06FB 85 EE + eor ZpEF ; CPU:C6FD PRG:06FD 45 EF + sta ZpEF ; CPU:C6FF PRG:06FF 85 EF + lda ZpE8,x ; CPU:C701 PRG:0701 B5 E8 + and #$0F ; CPU:C703 PRG:0703 29 0F + adc ZpEF ; CPU:C705 PRG:0705 65 EF + cmp #$0A ; CPU:C707 PRG:0707 C9 0A + bcc ReadControllers_OnBelow0A_C70D ; CPU:C709 PRG:0709 90 02 + adc #$05 ; CPU:C70B PRG:070B 69 05 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnBelow0A_C70D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnBelow0A_C70D: + adc ZpEE ; CPU:C70D PRG:070D 65 EE + sta ZpEE ; CPU:C70F PRG:070F 85 EE + lda ZpE8,x ; CPU:C711 PRG:0711 B5 E8 + and #$F0 ; CPU:C713 PRG:0713 29 F0 + adc ZpEE ; CPU:C715 PRG:0715 65 EE + bcs ReadControllers_OnCarrySet_C71D ; CPU:C717 PRG:0717 B0 04 + cmp #$A0 ; CPU:C719 PRG:0719 C9 A0 + bcc ReadControllers_OnBelowA0_C720 ; CPU:C71B PRG:071B 90 03 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnCarrySet_C71D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnCarrySet_C71D: + sbc #$A0 ; CPU:C71D PRG:071D E9 A0 + sec ; CPU:C71F PRG:071F 38 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnBelowA0_C720 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnBelowA0_C720: + rts ; CPU:C720 PRG:0720 60 + +GameplayModeParameterTable: + .byte $C5, $62, $90, $15, $A2, $04, $A5, $62, $18, $20, $F3, $C6, $90, $02, $A9, $FF ; CPU:$C721 PRG:0721 C5 62 90 15 A2 04 A5 62 18 20 F3 C6 90 02 A9 FF + .byte $85, $62, $E6, $60, $A9, $06, $20, $0D, $F8, $A0, $02, $B9, $57, $00, $D1, $EC ; CPU:$C731 PRG:0731 85 62 E6 60 A9 06 20 0D F8 A0 02 B9 57 00 D1 EC + .byte $90, $05, $D0, $0D, $88, $10, $F4, $A0, $02, $B1, $EC, $99, $57, $00, $88, $10 ; CPU:$C741 PRG:0741 90 05 D0 0D 88 10 F4 A0 02 B1 EC 99 57 00 88 10 + .byte $F8, $60 ; CPU:$C751 PRG:0751 F8 60 + +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_LoadAndContinue_C753 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_LoadAndContinue_C753: + lda #$0A ; CPU:C753 PRG:0753 A9 0A + jsr $C4E3 ; CPU:C755 PRG:0755 20 E3 C4 + lda #$09 ; CPU:C758 PRG:0758 A9 09 + jsr $C4E3 ; CPU:C75A PRG:075A 20 E3 C4 + jsr $C0CB ; CPU:C75D PRG:075D 20 CB C0 + lda #$00 ; CPU:C760 PRG:0760 A9 00 + rts ; CPU:C762 PRG:0762 60 + +GameplayObjectPointerTable: + .byte $8B, $21, $43, $4F, $4E, $54, $49, $4E, $55, $45, $FF, $6C, $20, $48, $49, $16 ; CPU:$C763 PRG:0763 8B 21 43 4F 4E 54 49 4E 55 45 FF 6C 20 48 49 16 + .byte $FE, $76, $20, $53, $54, $41, $47, $45, $16, $FE, $8C, $20, $F0, $F1, $D3, $84 ; CPU:$C773 PRG:0773 FE 76 20 53 54 41 47 45 16 FE 8C 20 F0 F1 D3 84 + .byte $8F, $16, $FE, $62, $20, $31, $50, $16, $FF, $82, $20, $32, $50, $16, $FF, $EB ; CPU:$C783 PRG:0783 8F 16 FE 62 20 31 50 16 FF 82 20 32 50 16 FF EB + .byte $21, $53, $54, $41, $47, $45, $00, $00, $00, $FF, $6B, $22, $50, $4C, $41, $59 ; CPU:$C793 PRG:0793 21 53 54 41 47 45 00 00 00 FF 6B 22 50 4C 41 59 + .byte $00, $53, $45, $4C, $45, $43, $54, $FE, $AA, $20, $3A, $00, $31, $39, $38, $36 ; CPU:$C7A3 PRG:07A3 00 53 45 4C 45 43 54 FE AA 20 3A 00 31 39 38 36 + .byte $00, $4B, $4F, $4E, $41, $4D, $49, $FE, $0A, $22, $00, $42, $59, $40, $53, $4F ; CPU:$C7B3 PRG:07B3 00 4B 4F 4E 41 4D 49 FE 0A 22 00 42 59 40 53 4F + .byte $46, $54, $40, $50, $52, $4F, $FE, $AC, $22, $31, $00, $50, $4C, $41, $59, $45 ; CPU:$C7C3 PRG:07C3 46 54 40 50 52 4F FE AC 22 31 00 50 4C 41 59 45 + .byte $52, $00, $00, $41, $FF, $CC, $22, $31, $00, $50, $4C, $41, $59, $45, $52, $00 ; CPU:$C7D3 PRG:07D3 52 00 00 41 FF CC 22 31 00 50 4C 41 59 45 52 00 + .byte $00, $42, $FF, $EC, $22, $32, $00, $50, $4C, $41, $59, $45, $52, $53, $00, $41 ; CPU:$C7E3 PRG:07E3 00 42 FF EC 22 32 00 50 4C 41 59 45 52 53 00 41 + .byte $FF, $0C, $23, $32, $00, $50, $4C, $41, $59, $45, $52, $53, $00, $42, $FF, $8A ; CPU:$C7F3 PRG:07F3 FF 0C 23 32 00 50 4C 41 59 45 52 53 00 42 FF 8A + .byte $21, $47, $41, $4D, $45, $00, $00, $4F, $56, $45, $52, $FE, $EB, $21, $50, $4C ; CPU:$C803 PRG:0803 21 47 41 4D 45 00 00 4F 56 45 52 FE EB 21 50 4C + .byte $41, $59, $45, $52, $00, $31, $FF, $A5, $07, $85, $0C, $A5, $05, $85, $0D, $20 ; CPU:$C813 PRG:0813 41 59 45 52 00 31 FF A5 07 85 0C A5 05 85 0D 20 + .byte $63, $CA, $20, $B1, $CA, $B0, $06, $20, $F3, $D3, $20, $91, $C9, $20, $DD, $C9 ; CPU:$C823 PRG:0823 63 CA 20 B1 CA B0 06 20 F3 D3 20 91 C9 20 DD C9 + .byte $18, $60 ; CPU:$C833 PRG:0833 18 60 + +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_LoadIndexAndContinue_C835 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_LoadIndexAndContinue_C835: + ldy #$01 ; CPU:C835 PRG:0835 A0 01 + ldx CurrentGameVariant ; CPU:C837 PRG:0837 A6 63 + dex ; CPU:C839 PRG:0839 CA + stx Zp64 ; CPU:C83A PRG:083A 86 64 + cpx #$01 ; CPU:C83C PRG:083C E0 01 + beq ReadControllers_JoinBranchPaths_C845 ; CPU:C83E PRG:083E F0 05 + cpx #$04 ; CPU:C840 PRG:0840 E0 04 + beq ReadControllers_JoinBranchPaths_C845 ; CPU:C842 PRG:0842 F0 01 + dey ; CPU:C844 PRG:0844 88 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_JoinBranchPaths_C845 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_JoinBranchPaths_C845: + sty Zp65 ; CPU:C845 PRG:0845 84 65 + lda #$04 ; CPU:C847 PRG:0847 A9 04 + sta $032F ; CPU:C849 PRG:0849 8D 2F 03 + ldy #$00 ; CPU:C84C PRG:084C A0 00 + sty Zp0E ; CPU:C84E PRG:084E 84 0E + jsr $C889 ; CPU:C850 PRG:0850 20 89 C8 + jsr $D2FD ; CPU:C853 PRG:0853 20 FD D2 + jsr $C556 ; CPU:C856 PRG:0856 20 56 C5 + ldx #$F0 ; CPU:C859 PRG:0859 A2 F0 + lda #$07 ; CPU:C85B PRG:085B A9 07 + sta Zp79 ; CPU:C85D PRG:085D 85 79 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnNonzero_C85F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnNonzero_C85F: + ldy #$08 ; CPU:C85F PRG:085F A0 08 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnNonzero_C861 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnNonzero_C861: + lda #$00 ; CPU:C861 PRG:0861 A9 00 + sta Zp80,x ; CPU:C863 PRG:0863 95 80 + inx ; CPU:C865 PRG:0865 E8 + dey ; CPU:C866 PRG:0866 88 + bne ReadControllers_OnNonzero_C861 ; CPU:C867 PRG:0867 D0 F8 + txa ; CPU:C869 PRG:0869 8A + clc ; CPU:C86A PRG:086A 18 + adc #$08 ; CPU:C86B PRG:086B 69 08 + tax ; CPU:C86D PRG:086D AA + dec Zp79 ; CPU:C86E PRG:086E C6 79 + bne ReadControllers_OnNonzero_C85F ; CPU:C870 PRG:0870 D0 ED + ldx #$04 ; CPU:C872 PRG:0872 A2 04 + stx WorkPointer0Hi ; CPU:C874 PRG:0874 86 7D + ldx #$03 ; CPU:C876 PRG:0876 A2 03 + ldy #$00 ; CPU:C878 PRG:0878 A0 00 + sty WorkPointer0Lo ; CPU:C87A PRG:087A 84 7C +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnNonzero_C87C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnNonzero_C87C: + lda #$00 ; CPU:C87C PRG:087C A9 00 + sta ($7C),y ; CPU:C87E PRG:087E 91 7C + dey ; CPU:C880 PRG:0880 88 + bne ReadControllers_OnNonzero_C87C ; CPU:C881 PRG:0881 D0 F9 + inc WorkPointer0Hi ; CPU:C883 PRG:0883 E6 7D + dex ; CPU:C885 PRG:0885 CA + bne ReadControllers_OnNonzero_C87C ; CPU:C886 PRG:0886 D0 F4 + rts ; CPU:C888 PRG:0888 60 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_LoadAndContinue_C889 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_LoadAndContinue_C889: + bit Zp03 ; CPU:C889 PRG:0889 24 03 + bvc ReadControllers_OnOverflowClear_C8B3 ; CPU:C88B PRG:088B 50 26 + lda Zp6F ; CPU:C88D PRG:088D A5 6F + beq ReadControllers_OnZero_C897 ; CPU:C88F PRG:088F F0 06 + lda #$00 ; CPU:C891 PRG:0891 A9 00 + sta Zp6F ; CPU:C893 PRG:0893 85 6F + beq ReadControllers_JoinBranchPaths_C8B5 ; CPU:C895 PRG:0895 F0 1E +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnZero_C897 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnZero_C897: + lda Zp6E ; CPU:C897 PRG:0897 A5 6E + cmp #$06 ; CPU:C899 PRG:0899 C9 06 + beq ReadControllers_OnEqual06_C8C1 ; CPU:C89B PRG:089B F0 24 + ldy Zp64 ; CPU:C89D PRG:089D A4 64 + bne ReadControllers_JoinBranchPaths_C8B5 ; CPU:C89F PRG:089F D0 14 + inc Zp66 ; CPU:C8A1 PRG:08A1 E6 66 + lda Zp66 ; CPU:C8A3 PRG:08A3 A5 66 + cmp #$02 ; CPU:C8A5 PRG:08A5 C9 02 + bcs ReadControllers_JoinBranchPaths_C8B5 ; CPU:C8A7 PRG:08A7 B0 0C + bit Zp03 ; CPU:C8A9 PRG:08A9 24 03 + bvc ReadControllers_JoinBranchPaths_C8B5 ; CPU:C8AB PRG:08AB 50 08 + lda Zp03 ; CPU:C8AD PRG:08AD A5 03 + and #$08 ; CPU:C8AF PRG:08AF 29 08 + beq ReadControllers_JoinBranchPaths_C8B5 ; CPU:C8B1 PRG:08B1 F0 02 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnOverflowClear_C8B3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnOverflowClear_C8B3: + inc Zp66 ; CPU:C8B3 PRG:08B3 E6 66 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_JoinBranchPaths_C8B5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_JoinBranchPaths_C8B5: + ldy #$00 ; CPU:C8B5 PRG:08B5 A0 00 + sty Zp6B ; CPU:C8B7 PRG:08B7 84 6B + sty Zp6D ; CPU:C8B9 PRG:08B9 84 6D + sty ZpAD ; CPU:C8BB PRG:08BB 84 AD + sty ZpAB ; CPU:C8BD PRG:08BD 84 AB + beq ReadControllers_JoinBranchPaths_C8E2 ; CPU:C8BF PRG:08BF F0 21 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnEqual06_C8C1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnEqual06_C8C1: + lda Zp69 ; CPU:C8C1 PRG:08C1 A5 69 + ldy CurrentGameVariant ; CPU:C8C3 PRG:08C3 A4 63 + cpy #$04 ; CPU:C8C5 PRG:08C5 C0 04 + bne ReadControllers_OnNotEqual04_C8D3 ; CPU:C8C7 PRG:08C7 D0 0A + cmp #$03 ; CPU:C8C9 PRG:08C9 C9 03 + bcs ReadControllers_JoinBranchPaths_C8D9 ; CPU:C8CB PRG:08CB B0 0C + cmp #$02 ; CPU:C8CD PRG:08CD C9 02 + bcs ReadControllers_OnAtLeast02_C8D7 ; CPU:C8CF PRG:08CF B0 06 + dec Zp6B ; CPU:C8D1 PRG:08D1 C6 6B +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnNotEqual04_C8D3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnNotEqual04_C8D3: + cmp #$02 ; CPU:C8D3 PRG:08D3 C9 02 + bcs ReadControllers_JoinBranchPaths_C8D9 ; CPU:C8D5 PRG:08D5 B0 02 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnAtLeast02_C8D7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnAtLeast02_C8D7: + dec Zp6B ; CPU:C8D7 PRG:08D7 C6 6B +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_JoinBranchPaths_C8D9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_JoinBranchPaths_C8D9: + cpy #$05 ; CPU:C8D9 PRG:08D9 C0 05 + bne ReadControllers_JoinBranchPaths_C8E2 ; CPU:C8DB PRG:08DB D0 05 + lda ZpAB ; CPU:C8DD PRG:08DD A5 AB + lsr a ; CPU:C8DF PRG:08DF 4A + sta Zp6B ; CPU:C8E0 PRG:08E0 85 6B +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_JoinBranchPaths_C8E2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_JoinBranchPaths_C8E2: + ldy #$00 ; CPU:C8E2 PRG:08E2 A0 00 + sty Zp9B ; CPU:C8E4 PRG:08E4 84 9B + sty Zp6A ; CPU:C8E6 PRG:08E6 84 6A + sty ZpCF ; CPU:C8E8 PRG:08E8 84 CF + sty Zp0F ; CPU:C8EA PRG:08EA 84 0F + sty ZpDE ; CPU:C8EC PRG:08EC 84 DE + sty ZpDF ; CPU:C8EE PRG:08EE 84 DF + sty ZpCD ; CPU:C8F0 PRG:08F0 84 CD + sty $0388 ; CPU:C8F2 PRG:08F2 8C 88 03 + sty $03FF ; CPU:C8F5 PRG:08F5 8C FF 03 + ldy #$01 ; CPU:C8F8 PRG:08F8 A0 01 + sty ZpB8 ; CPU:C8FA PRG:08FA 84 B8 + lda #$00 ; CPU:C8FC PRG:08FC A9 00 + ldx #$04 ; CPU:C8FE PRG:08FE A2 04 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_OnNonnegative_C900 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_OnNonnegative_C900: + sta ZpD9,x ; CPU:C900 PRG:0900 95 D9 + dex ; CPU:C902 PRG:0902 CA + bpl ReadControllers_OnNonnegative_C900 ; CPU:C903 PRG:0903 10 FB + rts ; CPU:C905 PRG:0905 60 + +InputDirectionLookupTable: + .byte $A5, $64, $0A, $AA, $BD, $28, $C9, $85, $7C, $BD, $29, $C9, $85, $7D, $A0, $00 ; CPU:$C906 PRG:0906 A5 64 0A AA BD 28 C9 85 7C BD 29 C9 85 7D A0 00 + .byte $B1, $7C, $85, $79, $A5, $7C, $18, $69, $01, $85, $7C, $90, $02, $E6, $7D, $4C ; CPU:$C916 PRG:0916 B1 7C 85 79 A5 7C 18 69 01 85 7C 90 02 E6 7D 4C + .byte $DE, $CF, $32, $C9, $43, $C9, $54, $C9, $6F, $C9, $80, $C9, $02, $07, $01, $06 ; CPU:$C926 PRG:0926 DE CF 32 C9 43 C9 54 C9 6F C9 80 C9 02 07 01 06 + .byte $68, $A6, $30, $00, $00, $07, $01, $08, $80, $BE, $28, $00, $1A, $02, $07, $01 ; CPU:$C936 PRG:0936 68 A6 30 00 00 07 01 08 80 BE 28 00 1A 02 07 01 + .byte $06, $20, $68, $40, $00, $03, $07, $00, $12, $B8, $F4, $00, $01, $1F, $04, $07 ; CPU:$C946 PRG:0946 06 20 68 40 00 03 07 00 12 B8 F4 00 01 1F 04 07 + .byte $01, $06, $20, $A0, $3C, $00, $03, $07, $01, $09, $38, $B8, $38, $00, $20, $04 ; CPU:$C956 PRG:0956 01 06 20 A0 3C 00 03 07 01 09 38 B8 38 00 20 04 + .byte $00, $09, $5C, $B8, $04, $00, $09, $80, $B8, $02, $07, $01, $06, $20, $A1, $2A ; CPU:$C966 PRG:0966 00 09 5C B8 04 00 09 80 B8 02 07 01 06 20 A1 2A + .byte $00, $00, $07, $01, $13, $38, $B5, $20, $00, $10, $02, $07, $01, $06, $20, $4A ; CPU:$C976 PRG:0976 00 00 07 01 13 38 B5 20 00 10 02 07 01 06 20 4A + .byte $16, $00, $06, $07, $00, $12, $B8, $F4, $00, $01, $1F, $24, $03, $50, $0B, $AC ; CPU:$C986 PRG:0986 16 00 06 07 00 12 B8 F4 00 01 1F 24 03 50 0B AC + .byte $06, $04, $D0, $06, $EE, $06, $04, $4C, $51, $CB, $20, $0D, $CF, $20, $49, $CF ; CPU:$C996 PRG:0996 06 04 D0 06 EE 06 04 4C 51 CB 20 0D CF 20 49 CF + .byte $24, $03, $50, $13, $20, $44, $D5, $A6, $0F, $D0, $0C, $20, $04, $CA, $D0, $07 ; CPU:$C9A6 PRG:09A6 24 03 50 13 20 44 D5 A6 0F D0 0C 20 04 CA D0 07 + .byte $E6, $0F, $E6, $CF, $4C, $DC, $DC, $A6, $52, $E8, $E0, $06, $90, $02, $A2, $00 ; CPU:$C9B6 PRG:09B6 E6 0F E6 CF 4C DC DC A6 52 E8 E0 06 90 02 A2 00 + .byte $86, $52, $20, $CE, $C9, $4C, $32, $CD, $A5, $64, $20, $CD, $C4, $32, $E5, $D9 ; CPU:$C9C6 PRG:09C6 86 52 20 CE C9 4C 32 CD A5 64 20 CD C4 32 E5 D9 + .byte $E9, $41, $EC, $8F, $EF, $63, $F1, $A6, $64, $BD, $E7, $C9, $85, $79, $4C, $01 ; CPU:$C9D6 PRG:09D6 E9 41 EC 8F EF 63 F1 A6 64 BD E7 C9 85 79 4C 01 + .byte $D0, $07, $07, $04, $02, $06 ; CPU:$C9E6 PRG:09E6 D0 07 07 04 02 06 + +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_Return_C9EC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_Return_C9EC: + txa ; CPU:C9EC PRG:09EC 8A + clc ; CPU:C9ED PRG:09ED 18 + adc #$10 ; CPU:C9EE PRG:09EE 69 10 + tax ; CPU:C9F0 PRG:09F0 AA + rts ; CPU:C9F1 PRG:09F1 60 +; ----------------------------------------------------------------------------- +; Routine: ReadControllers_Return_C9F2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReadControllers_Return_C9F2: + txa ; CPU:C9F2 PRG:09F2 8A + sec ; CPU:C9F3 PRG:09F3 38 + sbc #$10 ; CPU:C9F4 PRG:09F4 E9 10 + tax ; CPU:C9F6 PRG:09F6 AA + rts ; CPU:C9F7 PRG:09F7 60 + +ObjectSlotOffsetTable: + .byte $98, $18, $69, $10, $A8, $60, $98, $38, $E9, $10, $A8, $60, $AD, $43, $03, $0D ; CPU:$C9F8 PRG:09F8 98 18 69 10 A8 60 98 38 E9 10 A8 60 AD 43 03 0D + .byte $42, $03, $0D, $41, $03, $0D, $40, $03, $60 ; CPU:$CA08 PRG:0A08 42 03 0D 41 03 0D 40 03 60 + +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress: + lda $2002 ; CPU:CA11 PRG:0A11 AD 02 20 + lda #$3F ; CPU:CA14 PRG:0A14 A9 3F + sta $2006 ; CPU:CA16 PRG:0A16 8D 06 20 + lda #$00 ; CPU:CA19 PRG:0A19 A9 00 + sta $2006 ; CPU:CA1B PRG:0A1B 8D 06 20 + sta $2006 ; CPU:CA1E PRG:0A1E 8D 06 20 + sta $2006 ; CPU:CA21 PRG:0A21 8D 06 20 + rts ; CPU:CA24 PRG:0A24 60 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_LoadAndContinue_CA25 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_LoadAndContinue_CA25: + lda Zp45 ; CPU:CA25 PRG:0A25 A5 45 + bne SetPaletteRamAddress_OnNonzero_CA2F ; CPU:CA27 PRG:0A27 D0 06 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_OnZero_CA29 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_OnZero_CA29: + lda Zp12 ; CPU:CA29 PRG:0A29 A5 12 + bne SetPaletteRamAddress_OnNonzero_CA2F ; CPU:CA2B PRG:0A2B D0 02 + sec ; CPU:CA2D PRG:0A2D 38 + rts ; CPU:CA2E PRG:0A2E 60 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_OnNonzero_CA2F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_OnNonzero_CA2F: + clc ; CPU:CA2F PRG:0A2F 18 + rts ; CPU:CA30 PRG:0A30 60 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_LoadAndContinue_CA31 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_LoadAndContinue_CA31: + lda Zp34 ; CPU:CA31 PRG:0A31 A5 34 + bne SetPaletteRamAddress_OnNonzero_CA2F ; CPU:CA33 PRG:0A33 D0 FA + lda Zp23 ; CPU:CA35 PRG:0A35 A5 23 + bne SetPaletteRamAddress_OnNonzero_CA2F ; CPU:CA37 PRG:0A37 D0 F6 + beq SetPaletteRamAddress_OnZero_CA29 ; CPU:CA39 PRG:0A39 F0 EE +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_LoadIndexAndContinue_CA3B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_LoadIndexAndContinue_CA3B: + ldx #$03 ; CPU:CA3B PRG:0A3B A2 03 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_OnNonnegative_CA3D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_OnNonnegative_CA3D: + lda $CA47,x ; CPU:CA3D PRG:0A3D BD 47 CA + jsr $F80D ; CPU:CA40 PRG:0A40 20 0D F8 + dex ; CPU:CA43 PRG:0A43 CA + bpl SetPaletteRamAddress_OnNonnegative_CA3D ; CPU:CA44 PRG:0A44 10 F7 + rts ; CPU:CA46 PRG:0A46 60 + +PpuControlMaskTable: + .byte $C0, $80, $40, $00 ; CPU:$CA47 PRG:0A47 C0 80 40 00 + +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_LoadAndContinue_CA4B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_LoadAndContinue_CA4B: + lda PpuCtrlShadow ; CPU:CA4B PRG:0A4B A5 53 + ora #$04 ; CPU:CA4D PRG:0A4D 09 04 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_StoreAndContinue_CA4F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_StoreAndContinue_CA4F: + sta PpuCtrlShadow ; CPU:CA4F PRG:0A4F 85 53 + sta $2000 ; CPU:CA51 PRG:0A51 8D 00 20 + rts ; CPU:CA54 PRG:0A54 60 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_LoadAndContinue_CA55 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_LoadAndContinue_CA55: + lda PpuCtrlShadow ; CPU:CA55 PRG:0A55 A5 53 + and #$FB ; CPU:CA57 PRG:0A57 29 FB + jmp $CA4F ; CPU:CA59 PRG:0A59 4C 4F CA +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_LoadAndContinue_CA5C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_LoadAndContinue_CA5C: + lda PpuCtrlShadow ; CPU:CA5C PRG:0A5C A5 53 + and #$FE ; CPU:CA5E PRG:0A5E 29 FE + jmp $CA4F ; CPU:CA60 PRG:0A60 4C 4F CA + +PpuTimingParameterTable: + .byte $AD, $02, $20, $29, $40, $D0, $F9, $8D, $10, $04, $20, $CE, $CF, $AD, $2F, $03 ; CPU:$CA63 PRG:0A63 AD 02 20 29 40 D0 F9 8D 10 04 20 CE CF AD 2F 03 + .byte $F0, $0B, $CE, $2F, $03, $D0, $36, $A9, $00, $85, $FB, $F0, $30, $AD, $02, $20 ; CPU:$CA73 PRG:0A73 F0 0B CE 2F 03 D0 36 A9 00 85 FB F0 30 AD 02 20 + .byte $29, $40, $D0, $06, $EA, $CE, $10, $04, $D0, $F3, $A2, $1A, $CA, $D0, $FD, $A6 ; CPU:$CA83 PRG:0A83 29 40 D0 06 EA CE 10 04 D0 F3 A2 1A CA D0 FD A6 + .byte $6A, $A5, $6B, $4A, $A5, $53, $29, $FC, $69, $00, $85, $53, $AD, $02, $20, $EA ; CPU:$CA93 PRG:0A93 6A A5 6B 4A A5 53 29 FC 69 00 85 53 AD 02 20 EA + .byte $8E, $05, $20, $A2, $00, $8E, $05, $20, $A5, $53, $8D, $00, $20, $60, $AE, $0C ; CPU:$CAA3 PRG:0AA3 8E 05 20 A2 00 8E 05 20 A5 53 8D 00 20 60 AE 0C + .byte $03, $CA, $F0, $0C, $CA, $F0, $50, $A5, $0E, $F0, $03, $EE, $0C, $03, $18, $60 ; CPU:$CAB3 PRG:0AB3 03 CA F0 0C CA F0 50 A5 0E F0 03 EE 0C 03 18 60 + .byte $EE, $0C, $03, $EE, $10, $03, $A9, $16, $20, $0D, $F8, $A9, $C0, $20, $0D, $F8 ; CPU:$CAC3 PRG:0AC3 EE 0C 03 EE 10 03 A9 16 20 0D F8 A9 C0 20 0D F8 + .byte $A9, $2E, $85, $8E, $A9, $05, $85, $79, $A9, $60, $85, $8C, $A2, $04, $A0, $00 ; CPU:$CAD3 PRG:0AD3 A9 2E 85 8E A9 05 85 79 A9 60 85 8C A2 04 A0 00 + .byte $A5, $8E, $9D, $00, $02, $E8, $B9, $28, $CB, $9D, $00, $02, $C8, $E8, $A9, $01 ; CPU:$CAE3 PRG:0AE3 A5 8E 9D 00 02 E8 B9 28 CB 9D 00 02 C8 E8 A9 01 + .byte $9D, $00, $02, $E8, $A5, $8C, $9D, $00, $02, $E8, $A5, $8C, $18, $69, $08, $85 ; CPU:$CAF3 PRG:0AF3 9D 00 02 E8 A5 8C 9D 00 02 E8 A5 8C 18 69 08 85 + .byte $8C, $C6, $79, $D0, $DB, $38, $60, $A5, $0E, $F0, $0E, $A5, $09, $29, $0F, $D0 ; CPU:$CB03 PRG:0B03 8C C6 79 D0 DB 38 60 A5 0E F0 0E A5 09 29 0F D0 + .byte $F4, $A5, $09, $29, $10, $D0, $B9, $F0, $08, $A9, $00, $8D, $0C, $03, $8D, $10 ; CPU:$CB13 PRG:0B13 F4 A5 09 29 10 D0 B9 F0 08 A9 00 8D 0C 03 8D 10 + .byte $03, $A9, $F4, $D0, $AD, $5B, $6A, $6B, $7A, $7B ; CPU:$CB23 PRG:0B23 03 A9 F4 D0 AD 5B 6A 6B 7A 7B + +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_StoreIndexAndContinue_CB2D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_StoreIndexAndContinue_CB2D: + stx SavedObjectSlot ; CPU:CB2D PRG:0B2D 86 F9 + lda #$00 ; CPU:CB2F PRG:0B2F A9 00 + sta $0340 ; CPU:CB31 PRG:0B31 8D 40 03 + sta $0341 ; CPU:CB34 PRG:0B34 8D 41 03 + sta $0342 ; CPU:CB37 PRG:0B37 8D 42 03 + ldx #$05 ; CPU:CB3A PRG:0B3A A2 05 + ldy #$02 ; CPU:CB3C PRG:0B3C A0 02 + lda Zp66 ; CPU:CB3E PRG:0B3E A5 66 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_OnNonzero_CB40 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_OnNonzero_CB40: + sec ; CPU:CB40 PRG:0B40 38 + sbc #$04 ; CPU:CB41 PRG:0B41 E9 04 + beq SetPaletteRamAddress_JoinBranchPaths_CB4B ; CPU:CB43 PRG:0B43 F0 06 + bmi SetPaletteRamAddress_JoinBranchPaths_CB4B ; CPU:CB45 PRG:0B45 30 04 + dex ; CPU:CB47 PRG:0B47 CA + dey ; CPU:CB48 PRG:0B48 88 + bne SetPaletteRamAddress_OnNonzero_CB40 ; CPU:CB49 PRG:0B49 D0 F5 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_JoinBranchPaths_CB4B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_JoinBranchPaths_CB4B: + stx $0343 ; CPU:CB4B PRG:0B4B 8E 43 03 + ldx SavedObjectSlot ; CPU:CB4E PRG:0B4E A6 F9 + rts ; CPU:CB50 PRG:0B50 60 + +SpriteLayoutTable: + .byte $A0, $00, $F0, $02, $A0, $01, $A9, $00, $8D, $06, $40, $8D, $07, $40, $8D, $0A ; CPU:$CB51 PRG:0B51 A0 00 F0 02 A0 01 A9 00 8D 06 40 8D 07 40 8D 0A + .byte $40, $8D, $0B, $40, $A6, $63, $E0, $05, $F0, $0A, $E0, $03, $F0, $09, $E0, $02 ; CPU:$CB61 PRG:0B61 40 8D 0B 40 A6 63 E0 05 F0 0A E0 03 F0 09 E0 02 + .byte $F0, $05, $D0, $06, $18, $69, $0A, $18, $69, $0A, $AA, $C0, $01, $F0, $05, $BD ; CPU:$CB71 PRG:0B71 F0 05 D0 06 18 69 0A 18 69 0A AA C0 01 F0 05 BD + .byte $BC, $CB, $D0, $03, $BD, $BD, $CB, $85, $2E, $85, $3F, $BD, $BE, $CB, $85, $26 ; CPU:$CB81 PRG:0B81 BC CB D0 03 BD BD CB 85 2E 85 3F BD BE CB 85 26 + .byte $BD, $BF, $CB, $85, $37, $BD, $C0, $CB, $85, $30, $BD, $C1, $CB, $85, $31, $BD ; CPU:$CB91 PRG:0B91 BD BF CB 85 37 BD C0 CB 85 30 BD C1 CB 85 31 BD + .byte $C2, $CB, $8D, $04, $40, $BD, $C3, $CB, $8D, $08, $40, $BD, $C4, $CB, $86, $F9 ; CPU:$CBA1 PRG:0BA1 C2 CB 8D 04 40 BD C3 CB 8D 08 40 BD C4 CB 86 F9 + .byte $20, $0D, $F8, $A6, $F9, $BD, $C5, $CB, $4C, $0D, $F8, $07, $05, $7A, $20, $02 ; CPU:$CBB1 PRG:0BB1 20 0D F8 A6 F9 BD C5 CB 4C 0D F8 07 05 7A 20 02 + .byte $05, $7A, $20, $4E, $8F, $07, $05, $BA, $2E, $02, $05, $BA, $2E, $50, $91, $04 ; CPU:$CBC1 PRG:0BC1 05 7A 20 4E 8F 07 05 BA 2E 02 05 BA 2E 50 91 04 + .byte $03, $FA, $24, $00, $07, $FA, $24, $52, $93 ; CPU:$CBD1 PRG:0BD1 03 FA 24 00 07 FA 24 52 93 + +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_LoadAndContinue_CBDA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_LoadAndContinue_CBDA: + lda #$54 ; CPU:CBDA PRG:0BDA A9 54 + jsr $F80D ; CPU:CBDC PRG:0BDC 20 0D F8 + lda #$D5 ; CPU:CBDF PRG:0BDF A9 D5 + jmp $F80D ; CPU:CBE1 PRG:0BE1 4C 0D F8 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_LoadAndContinue_CBE4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_LoadAndContinue_CBE4: + txa ; CPU:CBE4 PRG:0BE4 8A + pha ; CPU:CBE5 PRG:0BE5 48 + tya ; CPU:CBE6 PRG:0BE6 98 + pha ; CPU:CBE7 PRG:0BE7 48 + lda #$00 ; CPU:CBE8 PRG:0BE8 A9 00 + sta WorkPointer1Hi ; CPU:CBEA PRG:0BEA 85 7F + sta WorkPointer1Lo ; CPU:CBEC PRG:0BEC 85 7E + lda Zp8E ; CPU:CBEE PRG:0BEE A5 8E + and #$F8 ; CPU:CBF0 PRG:0BF0 29 F8 + asl a ; CPU:CBF2 PRG:0BF2 0A + rol WorkPointer1Hi ; CPU:CBF3 PRG:0BF3 26 7F + asl a ; CPU:CBF5 PRG:0BF5 0A + rol WorkPointer1Hi ; CPU:CBF6 PRG:0BF6 26 7F + sta WorkPointer1Lo ; CPU:CBF8 PRG:0BF8 85 7E + lda Zp8D ; CPU:CBFA PRG:0BFA A5 8D + and #$01 ; CPU:CBFC PRG:0BFC 29 01 + asl a ; CPU:CBFE PRG:0BFE 0A + asl a ; CPU:CBFF PRG:0BFF 0A + clc ; CPU:CC00 PRG:0C00 18 + adc #$20 ; CPU:CC01 PRG:0C01 69 20 + adc WorkPointer1Hi ; CPU:CC03 PRG:0C03 65 7F + sta WorkPointer1Hi ; CPU:CC05 PRG:0C05 85 7F + lda Zp8C ; CPU:CC07 PRG:0C07 A5 8C + lsr a ; CPU:CC09 PRG:0C09 4A + lsr a ; CPU:CC0A PRG:0C0A 4A + lsr a ; CPU:CC0B PRG:0C0B 4A + clc ; CPU:CC0C PRG:0C0C 18 + adc WorkPointer1Lo ; CPU:CC0D PRG:0C0D 65 7E + sta WorkPointer1Lo ; CPU:CC0F PRG:0C0F 85 7E + pla ; CPU:CC11 PRG:0C11 68 + tay ; CPU:CC12 PRG:0C12 A8 + pla ; CPU:CC13 PRG:0C13 68 + tax ; CPU:CC14 PRG:0C14 AA + rts ; CPU:CC15 PRG:0C15 60 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_LoadAndContinue_CC16 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_LoadAndContinue_CC16: + lda $0501,x ; CPU:CC16 PRG:0C16 BD 01 05 + sta Zp77 ; CPU:CC19 PRG:0C19 85 77 + lda $0502,x ; CPU:CC1B PRG:0C1B BD 02 05 + sta Zp78 ; CPU:CC1E PRG:0C1E 85 78 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_LoadAndContinue_CC20 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_LoadAndContinue_CC20: + lda Zp6B ; CPU:CC20 PRG:0C20 A5 6B + and #$01 ; CPU:CC22 PRG:0C22 29 01 + sta Zp7A ; CPU:CC24 PRG:0C24 85 7A + lda Zp78 ; CPU:CC26 PRG:0C26 A5 78 + and #$01 ; CPU:CC28 PRG:0C28 29 01 + sta Zp78 ; CPU:CC2A PRG:0C2A 85 78 + cmp Zp7A ; CPU:CC2C PRG:0C2C C5 7A + bne SetPaletteRamAddress_OnNonzero_CC40 ; CPU:CC2E PRG:0C2E D0 10 + lda Zp77 ; CPU:CC30 PRG:0C30 A5 77 + cmp Zp6A ; CPU:CC32 PRG:0C32 C5 6A + bcs SetPaletteRamAddress_OnCarrySet_CC3B ; CPU:CC34 PRG:0C34 B0 05 + jsr $CC50 ; CPU:CC36 PRG:0C36 20 50 CC + sec ; CPU:CC39 PRG:0C39 38 + rts ; CPU:CC3A PRG:0C3A 60 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_OnCarrySet_CC3B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_OnCarrySet_CC3B: + jsr $CC5B ; CPU:CC3B PRG:0C3B 20 5B CC + clc ; CPU:CC3E PRG:0C3E 18 + rts ; CPU:CC3F PRG:0C3F 60 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_OnNonzero_CC40 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_OnNonzero_CC40: + lda Zp77 ; CPU:CC40 PRG:0C40 A5 77 + cmp Zp6A ; CPU:CC42 PRG:0C42 C5 6A + bcs SetPaletteRamAddress_OnCarrySet_CC4B ; CPU:CC44 PRG:0C44 B0 05 + jsr $CC50 ; CPU:CC46 PRG:0C46 20 50 CC + clc ; CPU:CC49 PRG:0C49 18 + rts ; CPU:CC4A PRG:0C4A 60 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_OnCarrySet_CC4B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_OnCarrySet_CC4B: + jsr $CC5B ; CPU:CC4B PRG:0C4B 20 5B CC + sec ; CPU:CC4E PRG:0C4E 38 + rts ; CPU:CC4F PRG:0C4F 60 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_LoadAndContinue_CC50 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_LoadAndContinue_CC50: + lda #$00 ; CPU:CC50 PRG:0C50 A9 00 + sec ; CPU:CC52 PRG:0C52 38 + sbc Zp6A ; CPU:CC53 PRG:0C53 E5 6A + clc ; CPU:CC55 PRG:0C55 18 + adc Zp77 ; CPU:CC56 PRG:0C56 65 77 + sta Zp77 ; CPU:CC58 PRG:0C58 85 77 + rts ; CPU:CC5A PRG:0C5A 60 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_StoreAndContinue_CC5B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_StoreAndContinue_CC5B: + sec ; CPU:CC5B PRG:0C5B 38 + sbc Zp6A ; CPU:CC5C PRG:0C5C E5 6A + sta Zp77 ; CPU:CC5E PRG:0C5E 85 77 + clc ; CPU:CC60 PRG:0C60 18 + rts ; CPU:CC61 PRG:0C61 60 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_LoadAndContinue_CC62 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_LoadAndContinue_CC62: + lda Zp8F ; CPU:CC62 PRG:0C62 A5 8F + sta $03C8,y ; CPU:CC64 PRG:0C64 99 C8 03 + lda Zp8D ; CPU:CC67 PRG:0C67 A5 8D + sta $03C9,y ; CPU:CC69 PRG:0C69 99 C9 03 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_LoadAndContinue_CC6C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_LoadAndContinue_CC6C: + lda Zp73,x ; CPU:CC6C PRG:0C6C B5 73 + clc ; CPU:CC6E PRG:0C6E 18 + adc Zp8E ; CPU:CC6F PRG:0C6F 65 8E + sta $03CA,y ; CPU:CC71 PRG:0C71 99 CA 03 + lda Zp74,x ; CPU:CC74 PRG:0C74 B5 74 + clc ; CPU:CC76 PRG:0C76 18 + adc Zp8C ; CPU:CC77 PRG:0C77 65 8C + sta $03CB,y ; CPU:CC79 PRG:0C79 99 CB 03 + sec ; CPU:CC7C PRG:0C7C 38 + rts ; CPU:CC7D PRG:0C7D 60 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_StoreIndexAndContinue_CC7E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_StoreIndexAndContinue_CC7E: + stx SavedObjectIndex ; CPU:CC7E PRG:0C7E 86 F8 + ldx #$00 ; CPU:CC80 PRG:0C80 A2 00 + jsr $CC94 ; CPU:CC82 PRG:0C82 20 94 CC + bcc SetPaletteRamAddress_OnCarryClear_CC8C ; CPU:CC85 PRG:0C85 90 05 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_LoadIndexAndContinue_CC87 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_LoadIndexAndContinue_CC87: + ldx #$01 ; CPU:CC87 PRG:0C87 A2 01 + jsr $CC94 ; CPU:CC89 PRG:0C89 20 94 CC +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_OnCarryClear_CC8C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_OnCarryClear_CC8C: + ldx SavedObjectIndex ; CPU:CC8C PRG:0C8C A6 F8 + rts ; CPU:CC8E PRG:0C8E 60 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_StoreIndexAndContinue_CC8F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_StoreIndexAndContinue_CC8F: + stx SavedObjectIndex ; CPU:CC8F PRG:0C8F 86 F8 + jmp $CC87 ; CPU:CC91 PRG:0C91 4C 87 CC +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_LoadAndContinue_CC94 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_LoadAndContinue_CC94: + lda $03D0,x ; CPU:CC94 PRG:0C94 BD D0 03 + clc ; CPU:CC97 PRG:0C97 18 + adc $03C8,x ; CPU:CC98 PRG:0C98 7D C8 03 + sta $03CD ; CPU:CC9B PRG:0C9B 8D CD 03 + lda $03D2,x ; CPU:CC9E PRG:0C9E BD D2 03 + clc ; CPU:CCA1 PRG:0CA1 18 + adc $03D0,x ; CPU:CCA2 PRG:0CA2 7D D0 03 + sec ; CPU:CCA5 PRG:0CA5 38 + sbc $03CA,x ; CPU:CCA6 PRG:0CA6 FD CA 03 + bcc SetPaletteRamAddress_OnCarryClear_CCB2 ; CPU:CCA9 PRG:0CA9 90 07 + cmp $03CD ; CPU:CCAB PRG:0CAB CD CD 03 + beq SetPaletteRamAddress_JoinBranchPaths_CCB4 ; CPU:CCAE PRG:0CAE F0 04 + bcc SetPaletteRamAddress_JoinBranchPaths_CCB4 ; CPU:CCB0 PRG:0CB0 90 02 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_OnCarryClear_CCB2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_OnCarryClear_CCB2: + clc ; CPU:CCB2 PRG:0CB2 18 + rts ; CPU:CCB3 PRG:0CB3 60 +; ----------------------------------------------------------------------------- +; Routine: SetPaletteRamAddress_JoinBranchPaths_CCB4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteRamAddress_JoinBranchPaths_CCB4: + sec ; CPU:CCB4 PRG:0CB4 38 + rts ; CPU:CCB5 PRG:0CB5 60 +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer: + jsr $D31E ; CPU:CCB6 PRG:0CB6 20 1E D3 + lda $CCE6 ; CPU:CCB9 PRG:0CB9 AD E6 CC + sta Controller1Shift ; CPU:CCBC PRG:0CBC 85 E4 + lda $CCE7 ; CPU:CCBE PRG:0CBE AD E7 CC + sta Controller2Shift ; CPU:CCC1 PRG:0CC1 85 E5 + lda #$00 ; CPU:CCC3 PRG:0CC3 A9 00 + sta IndirectPointerLo ; CPU:CCC5 PRG:0CC5 85 E0 + lda #$3F ; CPU:CCC7 PRG:0CC7 A9 3F + sta IndirectPointerHi ; CPU:CCC9 PRG:0CC9 85 E1 + lda #$20 ; CPU:CCCB PRG:0CCB A9 20 + sta TransferByteCount ; CPU:CCCD PRG:0CCD 85 E2 + rts ; CPU:CCCF PRG:0CCF 60 +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_CallNext_CCD0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_CallNext_CCD0: + jsr $CCB6 ; CPU:CCD0 PRG:0CD0 20 B6 CC +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_CallNext_CCD3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_CallNext_CCD3: + jsr $C4AA ; CPU:CCD3 PRG:0CD3 20 AA C4 + jmp $CA11 ; CPU:CCD6 PRG:0CD6 4C 11 CA +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_CallNext_CCD9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_CallNext_CCD9: + jsr $CCB6 ; CPU:CCD9 PRG:0CD9 20 B6 CC + ldx #$E4 ; CPU:CCDC PRG:0CDC A2 E4 + lda #$20 ; CPU:CCDE PRG:0CDE A9 20 + jsr $C53F ; CPU:CCE0 PRG:0CE0 20 3F C5 + jmp $CCD3 ; CPU:CCE3 PRG:0CE3 4C D3 CC + +MenuPaletteData: + .byte $E8, $CC, $0F, $30, $15, $2C, $0F, $30, $16, $19, $0F, $30, $16, $10, $0F, $30 ; CPU:$CCE6 PRG:0CE6 E8 CC 0F 30 15 2C 0F 30 16 19 0F 30 16 10 0F 30 + .byte $16, $28, $0F, $36, $03, $06, $0F, $30, $10, $17, $0F, $36, $15, $2C, $0F, $30 ; CPU:$CCF6 PRG:0CF6 16 28 0F 36 03 06 0F 30 10 17 0F 36 15 2C 0F 30 + .byte $27, $16, $0F, $30, $16, $2C, $0F, $30, $16, $3C, $0F, $30, $16, $10, $0F, $16 ; CPU:$CD06 PRG:0D06 27 16 0F 30 16 2C 0F 30 16 3C 0F 30 16 10 0F 16 + .byte $2C, $29, $0F, $30, $12, $17, $0F, $30, $10, $17, $0F, $2C, $16, $36, $0F, $30 ; CPU:$CD16 PRG:0D16 2C 29 0F 30 12 17 0F 30 10 17 0F 2C 16 36 0F 30 + .byte $27, $16 ; CPU:$CD26 PRG:0D26 27 16 + +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_LoadAndContinue_CD28 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_LoadAndContinue_CD28: + lda CurrentGameVariant ; CPU:CD28 PRG:0D28 A5 63 + cmp #$01 ; CPU:CD2A PRG:0D2A C9 01 + rts ; CPU:CD2C PRG:0D2C 60 +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_LoadIndexAndContinue_CD2D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_LoadIndexAndContinue_CD2D: + ldx CurrentGameVariant ; CPU:CD2D PRG:0D2D A6 63 + cpx #$01 ; CPU:CD2F PRG:0D2F E0 01 + rts ; CPU:CD31 PRG:0D31 60 + +MenuScreenParameterTable: + .byte $A2, $90, $86, $F9, $A5, $63, $C9, $02, $F0, $11, $C9, $05, $F0, $11, $A9, $00 ; CPU:$CD32 PRG:0D32 A2 90 86 F9 A5 63 C9 02 F0 11 C9 05 F0 11 A9 00 + .byte $A0, $B0, $20, $61, $CD, $20, $68, $CD, $4C, $E8, $CD, $A0, $68, $D0, $02, $A0 ; CPU:$CD42 PRG:0D42 A0 B0 20 61 CD 20 68 CD 4C E8 CD A0 68 D0 02 A0 + .byte $78, $A9, $04, $20, $61, $CD, $20, $68, $CD, $20, $C7, $CD, $4C, $E8, $CD, $8D ; CPU:$CD52 PRG:0D52 78 A9 04 20 61 CD 20 68 CD 20 C7 CD 4C E8 CD 8D + .byte $94, $05, $8C, $93, $05, $60, $A5, $52, $C9, $03, $D0, $F9, $A5, $6C, $D0, $F5 ; CPU:$CD62 PRG:0D62 94 05 8C 93 05 60 A5 52 C9 03 D0 F9 A5 6C D0 F5 + .byte $AD, $90, $05, $D0, $29, $A6, $69, $A4, $63, $C0, $05, $D0, $01, $CA, $8A, $D0 ; CPU:$CD72 PRG:0D72 AD 90 05 D0 29 A6 69 A4 63 C0 05 D0 01 CA 8A D0 + .byte $E4, $C0, $05, $D0, $08, $A6, $68, $E0, $A0, $B0, $DA, $A2, $A0, $8E, $91, $05 ; CPU:$CD82 PRG:0D82 E4 C0 05 D0 08 A6 68 E0 A0 B0 DA A2 A0 8E 91 05 + .byte $A2, $90, $20, $6E, $F0, $A9, $FF, $8D, $90, $05, $A2, $90, $D0, $24, $A6, $69 ; CPU:$CD92 PRG:0D92 A2 90 20 6E F0 A9 FF 8D 90 05 A2 90 D0 24 A6 69 + .byte $CA, $D0, $F2, $A6, $68, $A5, $63, $C9, $05, $D0, $06, $E0, $F0, $90, $E6, $B0 ; CPU:$CDA2 PRG:0DA2 CA D0 F2 A6 68 A5 63 C9 05 D0 06 E0 F0 90 E6 B0 + .byte $04, $E0, $80, $90, $E0, $A9, $00, $8D, $90, $05, $A6, $65, $D0, $02, $A9, $67 ; CPU:$CDB2 PRG:0DB2 04 E0 80 90 E0 A9 00 8D 90 05 A6 65 D0 02 A9 67 + .byte $A2, $90, $4C, $26, $ED, $A2, $90, $BD, $00, $05, $F0, $99, $20, $16, $CC, $B0 ; CPU:$CDC2 PRG:0DC2 A2 90 4C 26 ED A2 90 BD 00 05 F0 99 20 16 CC B0 + .byte $14, $A2, $00, $69, $10, $85, $84, $90, $02, $A2, $01, $86, $85, $A9, $7F, $85 ; CPU:$CDD2 PRG:0DD2 14 A2 00 69 10 85 84 90 02 A2 01 86 85 A9 7F 85 + .byte $83, $A9, $01, $85, $80, $60, $A2, $90, $BD, $00, $05, $F0, $F8, $20, $16, $CC ; CPU:$CDE2 PRG:0DE2 83 A9 01 85 80 60 A2 90 BD 00 05 F0 F8 20 16 CC + .byte $B0, $F3, $A5, $74, $C9, $20, $90, $ED, $A5, $CB, $D0, $E9, $A5, $73, $18, $69 ; CPU:$CDF2 PRG:0DF2 B0 F3 A5 74 C9 20 90 ED A5 CB D0 E9 A5 73 18 69 + .byte $18, $A4, $64, $C0, $00, $D0, $05, $A5, $83, $18, $69, $0C, $DD, $03, $05, $90 ; CPU:$CE02 PRG:0E02 18 A4 64 C0 00 D0 05 A5 83 18 69 0C DD 03 05 90 + .byte $D4, $E9, $04, $DD, $03, $05, $B0, $CD, $20, $03, $E9, $A4, $64, $C0, $00, $D0 ; CPU:$CE12 PRG:0E12 D4 E9 04 DD 03 05 B0 CD 20 03 E9 A4 64 C0 00 D0 + .byte $03, $20, $1F, $E9, $20, $9E, $CE, $A4, $65, $F0, $03, $20, $8E, $CE, $20, $8F ; CPU:$CE22 PRG:0E22 03 20 1F E9 20 9E CE A4 65 F0 03 20 8E CE 20 8F + .byte $CC, $90, $B2, $A2, $90, $BD, $03, $05, $18, $69, $EA, $A4, $65, $D0, $02, $69 ; CPU:$CE32 PRG:0E32 CC 90 B2 A2 90 BD 03 05 18 69 EA A4 65 D0 02 69 + .byte $01, $85, $73, $20, $2D, $CD, $D0, $0A, $18, $69, $08, $85, $83, $38, $E9, $18 ; CPU:$CE42 PRG:0E42 01 85 73 20 2D CD D0 0A 18 69 08 85 83 38 E9 18 + .byte $85, $73, $20, $38, $DC, $A9, $00, $85, $DF, $20, $3B, $CA, $20, $DA, $CB, $A9 ; CPU:$CE52 PRG:0E52 85 73 20 38 DC A9 00 85 DF 20 3B CA 20 DA CB A9 + .byte $0A, $85, $76, $A9, $00, $8D, $0B, $03, $E6, $0B, $60, $A2, $90, $20, $16, $CC ; CPU:$CE62 PRG:0E62 0A 85 76 A9 00 8D 0B 03 E6 0B 60 A2 90 20 16 CC + .byte $69, $0C, $C5, $74, $F0, $15, $90, $0A, $E6, $74, $20, $28, $CD, $D0, $0C, $E6 ; CPU:$CE72 PRG:0E72 69 0C C5 74 F0 15 90 0A E6 74 20 28 CD D0 0C E6 + .byte $84, $60, $C6, $74, $20, $28, $CD, $D0, $02, $C6, $84, $60, $A9, $20, $8D, $C9 ; CPU:$CE82 PRG:0E82 84 60 C6 74 20 28 CD D0 02 C6 84 60 A9 20 8D C9 + .byte $03, $AD, $91, $05, $18, $69, $08, $85, $77, $4C, $AB, $CE, $A9, $18, $8D, $C9 ; CPU:$CE92 PRG:0E92 03 AD 91 05 18 69 08 85 77 4C AB CE A9 18 8D C9 + .byte $03, $A9, $08, $18, $6D, $91, $05, $85, $77, $AD, $92, $05, $85, $78, $20, $20 ; CPU:$CEA2 PRG:0EA2 03 A9 08 18 6D 91 05 85 77 AD 92 05 85 78 20 20 + .byte $CC, $8D, $CB, $03, $60 ; CPU:$CEB2 PRG:0EB2 CC 8D CB 03 60 + +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_CallNext_CEB7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_CallNext_CEB7: + jsr $CF0D ; CPU:CEB7 PRG:0EB7 20 0D CF + jsr $CF9D ; CPU:CEBA PRG:0EBA 20 9D CF + lda $CFB8 ; CPU:CEBD PRG:0EBD AD B8 CF + sta WorkPointer0Hi ; CPU:CEC0 PRG:0EC0 85 7D + lda $CFB7 ; CPU:CEC2 PRG:0EC2 AD B7 CF + sta WorkPointer0Lo ; CPU:CEC5 PRG:0EC5 85 7C + jsr $CEE3 ; CPU:CEC7 PRG:0EC7 20 E3 CE + jsr $CFB3 ; CPU:CECA PRG:0ECA 20 B3 CF + lda $CFB8 ; CPU:CECD PRG:0ECD AD B8 CF + sta WorkPointer0Hi ; CPU:CED0 PRG:0ED0 85 7D + lda $CFB7 ; CPU:CED2 PRG:0ED2 AD B7 CF + sta WorkPointer0Lo ; CPU:CED5 PRG:0ED5 85 7C + jsr $CEE3 ; CPU:CED7 PRG:0ED7 20 E3 CE + jsr $CFB3 ; CPU:CEDA PRG:0EDA 20 B3 CF + jsr $CF58 ; CPU:CEDD PRG:0EDD 20 58 CF + jmp $D280 ; CPU:CEE0 PRG:0EE0 4C 80 D2 +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_LoadIndexAndContinue_CEE3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_LoadIndexAndContinue_CEE3: + ldy #$00 ; CPU:CEE3 PRG:0EE3 A0 00 +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_LoadAndContinue_CEE5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_LoadAndContinue_CEE5: + lda $2002 ; CPU:CEE5 PRG:0EE5 AD 02 20 + lda Zp78 ; CPU:CEE8 PRG:0EE8 A5 78 + sta $2006 ; CPU:CEEA PRG:0EEA 8D 06 20 + lda Zp77 ; CPU:CEED PRG:0EED A5 77 + sta $2006 ; CPU:CEEF PRG:0EEF 8D 06 20 +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_LoadAndContinue_CEF2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_LoadAndContinue_CEF2: + lda ($7C),y ; CPU:CEF2 PRG:0EF2 B1 7C + iny ; CPU:CEF4 PRG:0EF4 C8 + tax ; CPU:CEF5 PRG:0EF5 AA + inx ; CPU:CEF6 PRG:0EF6 E8 + bne SetupScreenPaletteTransfer_OnNonzero_CEFA ; CPU:CEF7 PRG:0EF7 D0 01 + rts ; CPU:CEF9 PRG:0EF9 60 +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_OnNonzero_CEFA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_OnNonzero_CEFA: + inx ; CPU:CEFA PRG:0EFA E8 + beq SetupScreenPaletteTransfer_OnZero_CF03 ; CPU:CEFB PRG:0EFB F0 06 + sta $2007 ; CPU:CEFD PRG:0EFD 8D 07 20 + jmp $CEF2 ; CPU:CF00 PRG:0F00 4C F2 CE +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_OnZero_CF03 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_OnZero_CF03: + lda Zp77 ; CPU:CF03 PRG:0F03 A5 77 + clc ; CPU:CF05 PRG:0F05 18 + adc #$20 ; CPU:CF06 PRG:0F06 69 20 + sta Zp77 ; CPU:CF08 PRG:0F08 85 77 + jmp $CEE5 ; CPU:CF0A PRG:0F0A 4C E5 CE +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_LoadAndContinue_CF0D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_LoadAndContinue_CF0D: + lda Zp64 ; CPU:CF0D PRG:0F0D A5 64 + asl a ; CPU:CF0F PRG:0F0F 0A + tax ; CPU:CF10 PRG:0F10 AA + sec ; CPU:CF11 PRG:0F11 38 + lda $CF3F,x ; CPU:CF12 PRG:0F12 BD 3F CF + sbc Zp6A ; CPU:CF15 PRG:0F15 E5 6A + sta Zp68 ; CPU:CF17 PRG:0F17 85 68 + lda $CF40,x ; CPU:CF19 PRG:0F19 BD 40 CF + sbc Zp6B ; CPU:CF1C PRG:0F1C E5 6B + sta Zp69 ; CPU:CF1E PRG:0F1E 85 69 + tay ; CPU:CF20 PRG:0F20 A8 + ldx #$00 ; CPU:CF21 PRG:0F21 A2 00 + stx $040F ; CPU:CF23 PRG:0F23 8E 0F 04 + lda Zp6A ; CPU:CF26 PRG:0F26 A5 6A + cmp #$80 ; CPU:CF28 PRG:0F28 C9 80 + tya ; CPU:CF2A PRG:0F2A 98 + bcc SetupScreenPaletteTransfer_JoinBranchPaths_CF30 ; CPU:CF2B PRG:0F2B 90 03 + clc ; CPU:CF2D PRG:0F2D 18 + adc #$01 ; CPU:CF2E PRG:0F2E 69 01 +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_JoinBranchPaths_CF30 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_JoinBranchPaths_CF30: + cmp #$0A ; CPU:CF30 PRG:0F30 C9 0A + bcc SetupScreenPaletteTransfer_OnBelow0A_CF3B ; CPU:CF32 PRG:0F32 90 07 + sbc #$0A ; CPU:CF34 PRG:0F34 E9 0A + inc $040F ; CPU:CF36 PRG:0F36 EE 0F 04 + bne SetupScreenPaletteTransfer_JoinBranchPaths_CF30 ; CPU:CF39 PRG:0F39 D0 F5 +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_OnBelow0A_CF3B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_OnBelow0A_CF3B: + sta $040E ; CPU:CF3B PRG:0F3B 8D 0E 04 + rts ; CPU:CF3E PRG:0F3E 60 + +ScreenDescriptorPointerTable: + .byte $00, $0A, $00, $07, $00, $08, $00, $14, $00, $05, $A5, $6A, $C9, $80, $B0, $06 ; CPU:$CF3F PRG:0F3F 00 0A 00 07 00 08 00 14 00 05 A5 6A C9 80 B0 06 + .byte $20, $9D, $CF, $4C, $58, $CF, $20, $B3, $CF ; CPU:$CF4F PRG:0F4F 20 9D CF 4C 58 CF 20 B3 CF + +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_LoadIndexAndContinue_CF58 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_LoadIndexAndContinue_CF58: + ldx Zp51 ; CPU:CF58 PRG:0F58 A6 51 + lda #$01 ; CPU:CF5A PRG:0F5A A9 01 + sta $0700,x ; CPU:CF5C PRG:0F5C 9D 00 07 + inx ; CPU:CF5F PRG:0F5F E8 + lda Zp78 ; CPU:CF60 PRG:0F60 A5 78 + sta $0700,x ; CPU:CF62 PRG:0F62 9D 00 07 + inx ; CPU:CF65 PRG:0F65 E8 + lda Zp77 ; CPU:CF66 PRG:0F66 A5 77 + clc ; CPU:CF68 PRG:0F68 18 + adc #$21 ; CPU:CF69 PRG:0F69 69 21 + sta $0700,x ; CPU:CF6B PRG:0F6B 9D 00 07 + inx ; CPU:CF6E PRG:0F6E E8 + lda #$02 ; CPU:CF6F PRG:0F6F A9 02 + sta $0700,x ; CPU:CF71 PRG:0F71 9D 00 07 + inx ; CPU:CF74 PRG:0F74 E8 + lda #$FF ; CPU:CF75 PRG:0F75 A9 FF + sta $0700,x ; CPU:CF77 PRG:0F77 9D 00 07 + inx ; CPU:CF7A PRG:0F7A E8 + lda $040F ; CPU:CF7B PRG:0F7B AD 0F 04 + and #$0F ; CPU:CF7E PRG:0F7E 29 0F + beq SetupScreenPaletteTransfer_OnZero_CF86 ; CPU:CF80 PRG:0F80 F0 04 + ora #$30 ; CPU:CF82 PRG:0F82 09 30 + bne SetupScreenPaletteTransfer_OnNonzero_CF88 ; CPU:CF84 PRG:0F84 D0 02 +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_OnZero_CF86 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_OnZero_CF86: + lda #$00 ; CPU:CF86 PRG:0F86 A9 00 +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_OnNonzero_CF88 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_OnNonzero_CF88: + sta $0700,x ; CPU:CF88 PRG:0F88 9D 00 07 + inx ; CPU:CF8B PRG:0F8B E8 + lda $040E ; CPU:CF8C PRG:0F8C AD 0E 04 + and #$0F ; CPU:CF8F PRG:0F8F 29 0F + ora #$30 ; CPU:CF91 PRG:0F91 09 30 + sta $0700,x ; CPU:CF93 PRG:0F93 9D 00 07 + inx ; CPU:CF96 PRG:0F96 E8 + lda #$00 ; CPU:CF97 PRG:0F97 A9 00 + sta $0700,x ; CPU:CF99 PRG:0F99 9D 00 07 + rts ; CPU:CF9C PRG:0F9C 60 +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_LoadAndContinue_CF9D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_LoadAndContinue_CF9D: + lda #$01 ; CPU:CF9D PRG:0F9D A9 01 +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_OnZero_CF9F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_OnZero_CF9F: + sta Zp77 ; CPU:CF9F PRG:0F9F 85 77 + lda Zp6B ; CPU:CFA1 PRG:0FA1 A5 6B + and #$01 ; CPU:CFA3 PRG:0FA3 29 01 + eor Zp77 ; CPU:CFA5 PRG:0FA5 45 77 + asl a ; CPU:CFA7 PRG:0FA7 0A + asl a ; CPU:CFA8 PRG:0FA8 0A + clc ; CPU:CFA9 PRG:0FA9 18 + adc #$23 ; CPU:CFAA PRG:0FAA 69 23 + sta Zp78 ; CPU:CFAC PRG:0FAC 85 78 + lda #$41 ; CPU:CFAE PRG:0FAE A9 41 + sta Zp77 ; CPU:CFB0 PRG:0FB0 85 77 + rts ; CPU:CFB2 PRG:0FB2 60 +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_LoadAndContinue_CFB3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_LoadAndContinue_CFB3: + lda #$00 ; CPU:CFB3 PRG:0FB3 A9 00 + beq SetupScreenPaletteTransfer_OnZero_CF9F ; CPU:CFB5 PRG:0FB5 F0 E8 + lda $10CF,y ; CPU:CFB7 PRG:0FB7 B9 CF 10 + ora ($11),y ; CPU:CFBA PRG:0FBA 11 11 + ora ($11),y ; CPU:CFBC PRG:0FBC 11 11 + +ScreenDescriptorData: + .byte $12, $FE, $3B, $00, $00, $30, $5B, $7A, $FE, $20, $21, $21, $21, $21, $22, $FF ; CPU:$CFBE PRG:0FBE 12 FE 3B 00 00 30 5B 7A FE 20 21 21 21 21 22 FF + .byte $A2, $03, $BD, $DA, $CF, $9D, $00, $02, $CA, $10, $F7, $60, $26, $5A, $02, $EC ; CPU:$CFCE PRG:0FCE A2 03 BD DA CF 9D 00 02 CA 10 F7 60 26 5A 02 EC + .byte $A2, $00, $86, $8C, $A0, $00, $B1, $7C, $C8, $85, $7A, $B1, $7C, $C8, $95, $70 ; CPU:$CFDE PRG:0FDE A2 00 86 8C A0 00 B1 7C C8 85 7A B1 7C C8 95 70 + .byte $E8, $C6, $7A, $D0, $F6, $C6, $79, $F0, $09, $A6, $8C, $20, $EC, $C9, $86, $8C ; CPU:$CFEE PRG:0FEE E8 C6 7A D0 F6 C6 79 F0 09 A6 8C 20 EC C9 86 8C + .byte $D0, $E4, $60, $A5, $70, $F0, $FB, $A2, $00, $86, $78, $A9, $00, $8D, $0F, $03 ; CPU:$CFFE PRG:0FFE D0 E4 60 A5 70 F0 FB A2 00 86 78 A9 00 8D 0F 03 + .byte $8D, $16, $03, $A6, $78, $B5, $70, $85, $89, $B5, $71, $85, $8A, $B5, $72, $F0 ; CPU:$D00E PRG:100E 8D 16 03 A6 78 B5 70 85 89 B5 71 85 8A B5 72 F0 + .byte $7A, $85, $8B, $B5, $73, $85, $8C, $B5, $74, $85, $8D, $B5, $75, $29, $01, $85 ; CPU:$D01E PRG:101E 7A 85 8B B5 73 85 8C B5 74 85 8D B5 75 29 01 85 + .byte $8E, $B5, $77, $85, $8F, $B5, $76, $0A, $A8, $B9, $58, $D1, $85, $7C, $B9, $59 ; CPU:$D02E PRG:102E 8E B5 77 85 8F B5 76 0A A8 B9 58 D1 85 7C B9 59 + .byte $D1, $85, $7D, $86, $78, $A0, $00, $A5, $8A, $85, $77, $10, $45, $B1, $7C, $C8 ; CPU:$D03E PRG:103E D1 85 7D 86 78 A0 00 A5 8A 85 77 10 45 B1 7C C8 + .byte $85, $7A, $E6, $77, $F0, $24, $A5, $64, $C9, $00, $D0, $05, $A9, $01, $8D, $0F ; CPU:$D04E PRG:104E 85 7A E6 77 F0 24 A5 64 C9 00 D0 05 A9 01 8D 0F + .byte $03, $B1, $7C, $C8, $85, $7B, $18, $65, $7A, $85, $77, $A5, $8F, $38, $E5, $77 ; CPU:$D05E PRG:105E 03 B1 7C C8 85 7B 18 65 7A 85 77 A5 8F 38 E5 77 + .byte $F0, $26, $18, $65, $7B, $85, $7B, $4C, $96, $D0, $B1, $7C, $C8, $18, $65, $7A ; CPU:$D06E PRG:106E F0 26 18 65 7B 85 7B 4C 96 D0 B1 7C C8 18 65 7A + .byte $85, $7A, $A9, $00, $85, $7B, $A5, $8F, $38, $E5, $7A, $F0, $0B, $85, $7B, $4C ; CPU:$D07E PRG:107E 85 7A A9 00 85 7B A5 8F 38 E5 7A F0 0B 85 7B 4C + .byte $96, $D0, $85, $7A, $A9, $00, $85, $7B, $20, $AD, $D0, $C6, $79, $F0, $0F, $A5 ; CPU:$D08E PRG:108E 96 D0 85 7A A9 00 85 7B 20 AD D0 C6 79 F0 0F A5 + .byte $78, $18, $69, $10, $85, $78, $A9, $00, $8D, $16, $03, $4C, $09, $D0, $60, $A6 ; CPU:$D09E PRG:109E 78 18 69 10 85 78 A9 00 8D 16 03 4C 09 D0 60 A6 + .byte $8B, $A5, $89, $F0, $75, $B1, $7C, $18, $65, $8D, $20, $0C, $D1, $9D, $03, $02 ; CPU:$D0AE PRG:10AE 8B A5 89 F0 75 B1 7C 18 65 8D 20 0C D1 9D 03 02 + .byte $C8, $B1, $7C, $C8, $9D, $01, $02, $AD, $16, $03, $D0, $03, $20, $42, $D1, $C9 ; CPU:$D0BE PRG:10BE C8 B1 7C C8 9D 01 02 AD 16 03 D0 03 20 42 D1 C9 + .byte $02, $D0, $06, $AD, $17, $03, $4C, $DA, $D0, $B1, $7C, $C8, $9D, $02, $02, $A5 ; CPU:$D0CE PRG:10CE 02 D0 06 AD 17 03 4C DA D0 B1 7C C8 9D 02 02 A5 + .byte $77, $F0, $04, $A9, $F8, $D0, $05, $B1, $7C, $18, $65, $8C, $C8, $9D, $00, $02 ; CPU:$D0DE PRG:10DE 77 F0 04 A9 F8 D0 05 B1 7C 18 65 8C C8 9D 00 02 + .byte $A5, $7A, $C9, $03, $B0, $0E, $AD, $0F, $03, $F0, $09, $BD, $00, $02, $38, $E9 ; CPU:$D0EE PRG:10EE A5 7A C9 03 B0 0E AD 0F 03 F0 09 BD 00 02 38 E9 + .byte $10, $9D, $00, $02, $E8, $E8, $E8, $E8, $C6, $7A, $D0, $A9, $F0, $2D, $48, $B1 ; CPU:$D0FE PRG:10FE 10 9D 00 02 E8 E8 E8 E8 C6 7A D0 A9 F0 2D 48 B1 + .byte $7C, $30, $04, $90, $0D, $B0, $02, $B0, $09, $A5, $8E, $29, $01, $49, $01, $4C ; CPU:$D10E PRG:110E 7C 30 04 90 0D B0 02 B0 09 A5 8E 29 01 49 01 4C + .byte $24, $D1, $A5, $8E, $29, $01, $85, $77, $68, $60, $A9, $F4, $9D, $00, $02, $E8 ; CPU:$D11E PRG:111E 24 D1 A5 8E 29 01 85 77 68 60 A9 F4 9D 00 02 E8 + .byte $E8, $E8, $E8, $A5, $7A, $F0, $04, $C6, $7A, $D0, $EF, $A5, $7B, $F0, $04, $C6 ; CPU:$D12E PRG:112E E8 E8 E8 A5 7A F0 04 C6 7A D0 EF A5 7B F0 04 C6 + .byte $7B, $10, $E7, $60, $EE, $16, $03, $B1, $7C, $C9, $FF, $F0, $08, $EE, $16, $03 ; CPU:$D13E PRG:113E 7B 10 E7 60 EE 16 03 B1 7C C9 FF F0 08 EE 16 03 + .byte $B1, $7C, $8D, $17, $03, $AD, $16, $03, $C8, $60, $03, $DD, $16, $DD, $F0, $DC ; CPU:$D14E PRG:114E B1 7C 8D 17 03 AD 16 03 C8 60 03 DD 16 DD F0 DC + .byte $29, $DD, $3C, $DD, $4F, $DD, $62, $DD, $75, $DD, $88, $DD, $9B, $DD, $1B, $E2 ; CPU:$D15E PRG:115E 29 DD 3C DD 4F DD 62 DD 75 DD 88 DD 9B DD 1B E2 + .byte $34, $E2, $AE, $DD, $D9, $DD, $04, $DE, $2B, $DE, $52, $DE, $8C, $DE, $C6, $DE ; CPU:$D16E PRG:116E 34 E2 AE DD D9 DD 04 DE 2B DE 52 DE 8C DE C6 DE + .byte $00, $DF, $0D, $DF, $1A, $DF, $27, $DF, $34, $DF, $41, $DF, $4E, $DF, $5B, $DF ; CPU:$D17E PRG:117E 00 DF 0D DF 1A DF 27 DF 34 DF 41 DF 4E DF 5B DF + .byte $74, $DF, $8D, $DF, $A6, $DF, $BF, $DF, $D2, $DF, $16, $E0, $3B, $E0, $09, $E0 ; CPU:$D18E PRG:118E 74 DF 8D DF A6 DF BF DF D2 DF 16 E0 3B E0 09 E0 + .byte $89, $E0, $A7, $E0, $BF, $E0, $D4, $E0, $E6, $E0, $FB, $E0, $10, $E1, $2E, $E1 ; CPU:$D19E PRG:119E 89 E0 A7 E0 BF E0 D4 E0 E6 E0 FB E0 10 E1 2E E1 + .byte $46, $E1, $5E, $E1, $76, $E1, $94, $E1, $A9, $E1, $BE, $E1, $D0, $E1, $E5, $E1 ; CPU:$D1AE PRG:11AE 46 E1 5E E1 76 E1 94 E1 A9 E1 BE E1 D0 E1 E5 E1 + .byte $FD, $E1, $85, $E0, $60, $E0 ; CPU:$D1BE PRG:11BE FD E1 85 E0 60 E0 + +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_CallNext_D1C4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_CallNext_D1C4: + jsr $CBE4 ; CPU:D1C4 PRG:11C4 20 E4 CB + txa ; CPU:D1C7 PRG:11C7 8A + pha ; CPU:D1C8 PRG:11C8 48 + lda Zp8F ; CPU:D1C9 PRG:11C9 A5 8F + asl a ; CPU:D1CB PRG:11CB 0A + tax ; CPU:D1CC PRG:11CC AA + lda $D2DD,x ; CPU:D1CD PRG:11CD BD DD D2 + sta WorkPointer0Lo ; CPU:D1D0 PRG:11D0 85 7C + lda $D2DE,x ; CPU:D1D2 PRG:11D2 BD DE D2 + sta WorkPointer0Hi ; CPU:D1D5 PRG:11D5 85 7D + pla ; CPU:D1D7 PRG:11D7 68 + tax ; CPU:D1D8 PRG:11D8 AA + jsr $D1E4 ; CPU:D1D9 PRG:11D9 20 E4 D1 +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_OnZero_D1DC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_OnZero_D1DC: + stx Zp51 ; CPU:D1DC PRG:11DC 86 51 + lda #$00 ; CPU:D1DE PRG:11DE A9 00 + sta $0700,x ; CPU:D1E0 PRG:11E0 9D 00 07 + rts ; CPU:D1E3 PRG:11E3 60 +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_LoadIndexAndContinue_D1E4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_LoadIndexAndContinue_D1E4: + ldy #$00 ; CPU:D1E4 PRG:11E4 A0 00 + ldx Zp51 ; CPU:D1E6 PRG:11E6 A6 51 +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_LoadAndContinue_D1E8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_LoadAndContinue_D1E8: + lda WorkPointer1Lo ; CPU:D1E8 PRG:11E8 A5 7E + sta Zp79 ; CPU:D1EA PRG:11EA 85 79 + lda WorkPointer1Hi ; CPU:D1EC PRG:11EC A5 7F + sta Zp7A ; CPU:D1EE PRG:11EE 85 7A + lda ($7C),y ; CPU:D1F0 PRG:11F0 B1 7C + beq SetupScreenPaletteTransfer_OnZero_D1DC ; CPU:D1F2 PRG:11F2 F0 E8 + sta $0700,x ; CPU:D1F4 PRG:11F4 9D 00 07 + iny ; CPU:D1F7 PRG:11F7 C8 + lda ($7C),y ; CPU:D1F8 PRG:11F8 B1 7C + beq SetupScreenPaletteTransfer_OnZero_D21D ; CPU:D1FA PRG:11FA F0 21 + stx Zp8C ; CPU:D1FC PRG:11FC 86 8C + sty Zp8E ; CPU:D1FE PRG:11FE 84 8E + ldx #$00 ; CPU:D200 PRG:1200 A2 00 + stx Zp77 ; CPU:D202 PRG:1202 86 77 + ldy #$05 ; CPU:D204 PRG:1204 A0 05 +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_OnNonzero_D206 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_OnNonzero_D206: + asl a ; CPU:D206 PRG:1206 0A + rol Zp77 ; CPU:D207 PRG:1207 26 77 + dey ; CPU:D209 PRG:1209 88 + bne SetupScreenPaletteTransfer_OnNonzero_D206 ; CPU:D20A PRG:120A D0 FA + clc ; CPU:D20C PRG:120C 18 + adc WorkPointer1Lo ; CPU:D20D PRG:120D 65 7E + sta Zp79 ; CPU:D20F PRG:120F 85 79 + lda #$00 ; CPU:D211 PRG:1211 A9 00 + adc WorkPointer1Hi ; CPU:D213 PRG:1213 65 7F + adc Zp77 ; CPU:D215 PRG:1215 65 77 + sta Zp7A ; CPU:D217 PRG:1217 85 7A + ldx Zp8C ; CPU:D219 PRG:1219 A6 8C + ldy Zp8E ; CPU:D21B PRG:121B A4 8E +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_OnZero_D21D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_OnZero_D21D: + iny ; CPU:D21D PRG:121D C8 + lda ($7C),y ; CPU:D21E PRG:121E B1 7C + beq SetupScreenPaletteTransfer_OnZero_D255 ; CPU:D220 PRG:1220 F0 33 + stx Zp8C ; CPU:D222 PRG:1222 86 8C + sty Zp8E ; CPU:D224 PRG:1224 84 8E + sta Zp77 ; CPU:D226 PRG:1226 85 77 + lda #$20 ; CPU:D228 PRG:1228 A9 20 + sta Zp7B ; CPU:D22A PRG:122A 85 7B + lda Zp79 ; CPU:D22C PRG:122C A5 79 + and #$E0 ; CPU:D22E PRG:122E 29 E0 + sta Zp78 ; CPU:D230 PRG:1230 85 78 + lda Zp79 ; CPU:D232 PRG:1232 A5 79 + and #$1F ; CPU:D234 PRG:1234 29 1F + clc ; CPU:D236 PRG:1236 18 + adc Zp77 ; CPU:D237 PRG:1237 65 77 + bit Zp7B ; CPU:D239 PRG:1239 24 7B + php ; CPU:D23B PRG:123B 08 + ldx #$00 ; CPU:D23C PRG:123C A2 00 + plp ; CPU:D23E PRG:123E 28 + beq SetupScreenPaletteTransfer_OnZero_D243 ; CPU:D23F PRG:123F F0 02 + ldx #$04 ; CPU:D241 PRG:1241 A2 04 +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_OnZero_D243 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_OnZero_D243: + stx Zp77 ; CPU:D243 PRG:1243 86 77 + and #$1F ; CPU:D245 PRG:1245 29 1F + ora Zp78 ; CPU:D247 PRG:1247 05 78 + sta Zp79 ; CPU:D249 PRG:1249 85 79 + lda Zp7A ; CPU:D24B PRG:124B A5 7A + eor Zp77 ; CPU:D24D PRG:124D 45 77 + sta Zp7A ; CPU:D24F PRG:124F 85 7A + ldx Zp8C ; CPU:D251 PRG:1251 A6 8C + ldy Zp8E ; CPU:D253 PRG:1253 A4 8E +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_OnZero_D255 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_OnZero_D255: + inx ; CPU:D255 PRG:1255 E8 + lda Zp7A ; CPU:D256 PRG:1256 A5 7A + sta $0700,x ; CPU:D258 PRG:1258 9D 00 07 + inx ; CPU:D25B PRG:125B E8 + lda Zp79 ; CPU:D25C PRG:125C A5 79 + sta $0700,x ; CPU:D25E PRG:125E 9D 00 07 + iny ; CPU:D261 PRG:1261 C8 + lda ($7C),y ; CPU:D262 PRG:1262 B1 7C + sta Zp7B ; CPU:D264 PRG:1264 85 7B + inx ; CPU:D266 PRG:1266 E8 + sta $0700,x ; CPU:D267 PRG:1267 9D 00 07 + lda Zp8B ; CPU:D26A PRG:126A A5 8B + inx ; CPU:D26C PRG:126C E8 + sta $0700,x ; CPU:D26D PRG:126D 9D 00 07 +; ----------------------------------------------------------------------------- +; Routine: SetupScreenPaletteTransfer_OnNonzero_D270 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupScreenPaletteTransfer_OnNonzero_D270: + iny ; CPU:D270 PRG:1270 C8 + lda ($7C),y ; CPU:D271 PRG:1271 B1 7C + inx ; CPU:D273 PRG:1273 E8 + sta $0700,x ; CPU:D274 PRG:1274 9D 00 07 + dec Zp7B ; CPU:D277 PRG:1277 C6 7B + bne SetupScreenPaletteTransfer_OnNonzero_D270 ; CPU:D279 PRG:1279 D0 F5 + iny ; CPU:D27B PRG:127B C8 + inx ; CPU:D27C PRG:127C E8 + jmp $D1E8 ; CPU:D27D PRG:127D 4C E8 D1 +; ----------------------------------------------------------------------------- +; Routine: ProcessQueuedVramUpdates +; Global: Consume the queued VRAM command stream at $0700 and write it to the PPU. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ProcessQueuedVramUpdates: + ldx #$00 ; CPU:D280 PRG:1280 A2 00 +; ----------------------------------------------------------------------------- +; Routine: ProcessQueuedVramUpdates_LoadAndContinue_D282 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ProcessQueuedVramUpdates_LoadAndContinue_D282: + lda $0700,x ; CPU:D282 PRG:1282 BD 00 07 + beq ProcessQueuedVramUpdates_OnZero_D2CD ; CPU:D285 PRG:1285 F0 46 + cmp #$01 ; CPU:D287 PRG:1287 C9 01 + beq ProcessQueuedVramUpdates_OnEqual01_D291 ; CPU:D289 PRG:1289 F0 06 + lda PpuCtrlShadow ; CPU:D28B PRG:128B A5 53 + ora #$04 ; CPU:D28D PRG:128D 09 04 + bne ProcessQueuedVramUpdates_OnNonzero_D295 ; CPU:D28F PRG:128F D0 04 +; ----------------------------------------------------------------------------- +; Routine: ProcessQueuedVramUpdates_OnEqual01_D291 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ProcessQueuedVramUpdates_OnEqual01_D291: + lda PpuCtrlShadow ; CPU:D291 PRG:1291 A5 53 + and #$7B ; CPU:D293 PRG:1293 29 7B +; ----------------------------------------------------------------------------- +; Routine: ProcessQueuedVramUpdates_OnNonzero_D295 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ProcessQueuedVramUpdates_OnNonzero_D295: + sta $2000 ; CPU:D295 PRG:1295 8D 00 20 + lda $2002 ; CPU:D298 PRG:1298 AD 02 20 + inx ; CPU:D29B PRG:129B E8 + lda $0700,x ; CPU:D29C PRG:129C BD 00 07 + sta $2006 ; CPU:D29F PRG:129F 8D 06 20 + inx ; CPU:D2A2 PRG:12A2 E8 + lda $0700,x ; CPU:D2A3 PRG:12A3 BD 00 07 + sta $2006 ; CPU:D2A6 PRG:12A6 8D 06 20 + inx ; CPU:D2A9 PRG:12A9 E8 + lda $0700,x ; CPU:D2AA PRG:12AA BD 00 07 + tay ; CPU:D2AD PRG:12AD A8 + inx ; CPU:D2AE PRG:12AE E8 + lda $0700,x ; CPU:D2AF PRG:12AF BD 00 07 + cmp #$FF ; CPU:D2B2 PRG:12B2 C9 FF + bne ProcessQueuedVramUpdates_JoinBranchPaths_D2C2 ; CPU:D2B4 PRG:12B4 D0 0C +; ----------------------------------------------------------------------------- +; Routine: ProcessQueuedVramUpdates_OnNonzero_D2B6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ProcessQueuedVramUpdates_OnNonzero_D2B6: + inx ; CPU:D2B6 PRG:12B6 E8 + lda $0700,x ; CPU:D2B7 PRG:12B7 BD 00 07 + sta $2007 ; CPU:D2BA PRG:12BA 8D 07 20 + dey ; CPU:D2BD PRG:12BD 88 + bne ProcessQueuedVramUpdates_OnNonzero_D2B6 ; CPU:D2BE PRG:12BE D0 F6 + beq ProcessQueuedVramUpdates_OnZero_D2C9 ; CPU:D2C0 PRG:12C0 F0 07 +; ----------------------------------------------------------------------------- +; Routine: ProcessQueuedVramUpdates_JoinBranchPaths_D2C2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ProcessQueuedVramUpdates_JoinBranchPaths_D2C2: + inx ; CPU:D2C2 PRG:12C2 E8 + sta $2007 ; CPU:D2C3 PRG:12C3 8D 07 20 + dey ; CPU:D2C6 PRG:12C6 88 + bne ProcessQueuedVramUpdates_JoinBranchPaths_D2C2 ; CPU:D2C7 PRG:12C7 D0 F9 +; ----------------------------------------------------------------------------- +; Routine: ProcessQueuedVramUpdates_OnZero_D2C9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ProcessQueuedVramUpdates_OnZero_D2C9: + inx ; CPU:D2C9 PRG:12C9 E8 + jmp $D282 ; CPU:D2CA PRG:12CA 4C 82 D2 +; ----------------------------------------------------------------------------- +; Routine: ProcessQueuedVramUpdates_OnZero_D2CD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ProcessQueuedVramUpdates_OnZero_D2CD: + lda #$00 ; CPU:D2CD PRG:12CD A9 00 + sta Zp51 ; CPU:D2CF PRG:12CF 85 51 + sta $0700 ; CPU:D2D1 PRG:12D1 8D 00 07 + lda PpuCtrlShadow ; CPU:D2D4 PRG:12D4 A5 53 + and #$7B ; CPU:D2D6 PRG:12D6 29 7B + sta $2000 ; CPU:D2D8 PRG:12D8 8D 00 20 + clc ; CPU:D2DB PRG:12DB 18 + rts ; CPU:D2DC PRG:12DC 60 + +VramDescriptorPointerTable: + .byte $4D, $E2, $72, $E2, $83, $E2, $91, $E2, $9F, $E2, $B6, $E2, $D5, $E2, $F9, $E2 ; CPU:$D2DD PRG:12DD 4D E2 72 E2 83 E2 91 E2 9F E2 B6 E2 D5 E2 F9 E2 + .byte $1D, $E3, $3A, $E3, $5E, $E3, $6B, $E3, $78, $E3, $89, $E3, $9A, $E3, $AF, $E3 ; CPU:$D2ED PRG:12ED 1D E3 3A E3 5E E3 6B E3 78 E3 89 E3 9A E3 AF E3 + +; ----------------------------------------------------------------------------- +; Routine: ProcessQueuedVramUpdates_LoadAndContinue_D2FD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ProcessQueuedVramUpdates_LoadAndContinue_D2FD: + lda #$00 ; CPU:D2FD PRG:12FD A9 00 + sta $2001 ; CPU:D2FF PRG:12FF 8D 01 20 + lda Zp64 ; CPU:D302 PRG:1302 A5 64 + asl a ; CPU:D304 PRG:1304 0A + asl a ; CPU:D305 PRG:1305 0A + tax ; CPU:D306 PRG:1306 AA + jsr $D342 ; CPU:D307 PRG:1307 20 42 D3 + ldx Zp89 ; CPU:D30A PRG:130A A6 89 + jsr $D342 ; CPU:D30C PRG:130C 20 42 D3 + jsr $CEB7 ; CPU:D30F PRG:130F 20 B7 CE + jsr $D575 ; CPU:D312 PRG:1312 20 75 D5 + lda #$00 ; CPU:D315 PRG:1315 A9 00 + sta $2000 ; CPU:D317 PRG:1317 8D 00 20 + lda $2002 ; CPU:D31A PRG:131A AD 02 20 + rts ; CPU:D31D PRG:131D 60 +; ----------------------------------------------------------------------------- +; Routine: ConfigurePpuForScreenTransfer +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ConfigurePpuForScreenTransfer: + lda #$1E ; CPU:D31E PRG:131E A9 1E + sta PpuMaskShadow ; CPU:D320 PRG:1320 85 54 + lda #$E7 ; CPU:D322 PRG:1322 A9 E7 + and PpuCtrlShadow ; CPU:D324 PRG:1324 25 53 + ora #$08 ; CPU:D326 PRG:1326 09 08 + sta PpuCtrlShadow ; CPU:D328 PRG:1328 85 53 + sta $2000 ; CPU:D32A PRG:132A 8D 00 20 + rts ; CPU:D32D PRG:132D 60 + +VramDescriptorDispatchTable: + .byte $AA, $D3, $B9, $D3, $E1, $D3, $C8, $D3, $AA, $D3, $B9, $D3, $AA, $D3, $B9, $D3 ; CPU:$D32E PRG:132E AA D3 B9 D3 E1 D3 C8 D3 AA D3 B9 D3 AA D3 B9 D3 + .byte $EA, $D3, $C8, $D3 ; CPU:$D33E PRG:133E EA D3 C8 D3 + +; ----------------------------------------------------------------------------- +; Routine: ExecuteVramDescriptorStream +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteVramDescriptorStream: + ldy $D32E,x ; CPU:D342 PRG:1342 BC 2E D3 + inx ; CPU:D345 PRG:1345 E8 + lda $D32E,x ; CPU:D346 PRG:1346 BD 2E D3 + inx ; CPU:D349 PRG:1349 E8 + stx Zp89 ; CPU:D34A PRG:134A 86 89 + sty WorkPointer0Lo ; CPU:D34C PRG:134C 84 7C + sta WorkPointer0Hi ; CPU:D34E PRG:134E 85 7D + ldy #$00 ; CPU:D350 PRG:1350 A0 00 + lda ($7C),y ; CPU:D352 PRG:1352 B1 7C + sta Zp8A ; CPU:D354 PRG:1354 85 8A + and #$0F ; CPU:D356 PRG:1356 29 0F + sta Zp79 ; CPU:D358 PRG:1358 85 79 + iny ; CPU:D35A PRG:135A C8 + sty Zp7B ; CPU:D35B PRG:135B 84 7B + bne ExecuteVramDescriptorStream_OnNonzero_D365 ; CPU:D35D PRG:135D D0 06 +; ----------------------------------------------------------------------------- +; Routine: ExecuteVramDescriptorStream_OnNonzero_D35F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteVramDescriptorStream_OnNonzero_D35F: + ldy Zp7B ; CPU:D35F PRG:135F A4 7B + lda Zp8A ; CPU:D361 PRG:1361 A5 8A + bmi ExecuteVramDescriptorStream_OnNegative_D375 ; CPU:D363 PRG:1363 30 10 +; ----------------------------------------------------------------------------- +; Routine: ExecuteVramDescriptorStream_OnNonzero_D365 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteVramDescriptorStream_OnNonzero_D365: + lda $2002 ; CPU:D365 PRG:1365 AD 02 20 + lda ($7C),y ; CPU:D368 PRG:1368 B1 7C + tax ; CPU:D36A PRG:136A AA + iny ; CPU:D36B PRG:136B C8 + lda ($7C),y ; CPU:D36C PRG:136C B1 7C + sta $2006 ; CPU:D36E PRG:136E 8D 06 20 + stx $2006 ; CPU:D371 PRG:1371 8E 06 20 + iny ; CPU:D374 PRG:1374 C8 +; ----------------------------------------------------------------------------- +; Routine: ExecuteVramDescriptorStream_OnNegative_D375 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteVramDescriptorStream_OnNegative_D375: + lda ($7C),y ; CPU:D375 PRG:1375 B1 7C + sta WorkPointer1Lo ; CPU:D377 PRG:1377 85 7E + iny ; CPU:D379 PRG:1379 C8 + lda ($7C),y ; CPU:D37A PRG:137A B1 7C + sta WorkPointer1Hi ; CPU:D37C PRG:137C 85 7F + iny ; CPU:D37E PRG:137E C8 + sty Zp7B ; CPU:D37F PRG:137F 84 7B + jsr $D389 ; CPU:D381 PRG:1381 20 89 D3 + dec Zp79 ; CPU:D384 PRG:1384 C6 79 + bne ExecuteVramDescriptorStream_OnNonzero_D35F ; CPU:D386 PRG:1386 D0 D7 +; ----------------------------------------------------------------------------- +; Routine: ExecuteVramDescriptorStream_OnEqual5A_D388 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteVramDescriptorStream_OnEqual5A_D388: + rts ; CPU:D388 PRG:1388 60 +; ----------------------------------------------------------------------------- +; Routine: WriteVramDescriptorPayload +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +WriteVramDescriptorPayload: + ldy #$00 ; CPU:D389 PRG:1389 A0 00 +; ----------------------------------------------------------------------------- +; Routine: WriteVramDescriptorPayload_OnNonzero_D38B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +WriteVramDescriptorPayload_OnNonzero_D38B: + lda ($7E),y ; CPU:D38B PRG:138B B1 7E + cmp #$5A ; CPU:D38D PRG:138D C9 5A + beq ExecuteVramDescriptorStream_OnEqual5A_D388 ; CPU:D38F PRG:138F F0 F7 + cmp #$57 ; CPU:D391 PRG:1391 C9 57 + beq WriteVramDescriptorPayload_OnEqual57_D39B ; CPU:D393 PRG:1393 F0 06 + sta $2007 ; CPU:D395 PRG:1395 8D 07 20 +; ----------------------------------------------------------------------------- +; Routine: WriteVramDescriptorPayload_OnZero_D398 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +WriteVramDescriptorPayload_OnZero_D398: + iny ; CPU:D398 PRG:1398 C8 + bne WriteVramDescriptorPayload_OnNonzero_D38B ; CPU:D399 PRG:1399 D0 F0 +; ----------------------------------------------------------------------------- +; Routine: WriteVramDescriptorPayload_OnEqual57_D39B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +WriteVramDescriptorPayload_OnEqual57_D39B: + iny ; CPU:D39B PRG:139B C8 + lda ($7E),y ; CPU:D39C PRG:139C B1 7E + tax ; CPU:D39E PRG:139E AA + iny ; CPU:D39F PRG:139F C8 + lda ($7E),y ; CPU:D3A0 PRG:13A0 B1 7E +; ----------------------------------------------------------------------------- +; Routine: WriteVramDescriptorPayload_OnNonzero_D3A2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +WriteVramDescriptorPayload_OnNonzero_D3A2: + sta $2007 ; CPU:D3A2 PRG:13A2 8D 07 20 + dex ; CPU:D3A5 PRG:13A5 CA + bne WriteVramDescriptorPayload_OnNonzero_D3A2 ; CPU:D3A6 PRG:13A6 D0 FA + beq WriteVramDescriptorPayload_OnZero_D398 ; CPU:D3A8 PRG:13A8 F0 EE + stx IndirectPointerLo ; CPU:D3AA PRG:13AA 86 E0 + jsr $E3C4 ; CPU:D3AC PRG:13AC 20 C4 E3 + +VramDescriptorRecords: + .byte $77, $E4, $59, $E4, $63, $E4, $6D, $E4, $28, $E4, $86, $E0, $24, $C4, $E3, $77 ; CPU:$D3AF PRG:13AF 77 E4 59 E4 63 E4 6D E4 28 E4 86 E0 24 C4 E3 77 + .byte $E4, $59, $E4, $63, $E4, $6D, $E4, $28, $E4, $06, $60, $22, $C4, $E3, $00, $23 ; CPU:$D3BF PRG:13BF E4 59 E4 63 E4 6D E4 28 E4 06 60 22 C4 E3 00 23 + .byte $6D, $E4, $C0, $23, $3F, $E4, $60, $26, $C4, $E3, $00, $27, $6D, $E4, $C0, $27 ; CPU:$D3CF PRG:13CF 6D E4 C0 23 3F E4 60 26 C4 E3 00 27 6D E4 C0 27 + .byte $3F, $E4, $02, $00, $22, $20, $E4, $00, $26, $20, $E4, $02, $E0, $20, $24, $E4 ; CPU:$D3DF PRG:13DF 3F E4 02 00 22 20 E4 00 26 20 E4 02 E0 20 24 E4 + .byte $E0, $24, $24, $E4, $A0, $00, $A6, $64, $F0, $40, $CA, $F0, $61, $CA, $F0, $20 ; CPU:$D3EF PRG:13EF E0 24 24 E4 A0 00 A6 64 F0 40 CA F0 61 CA F0 20 + .byte $CA, $F0, $08, $AE, $27, $03, $F0, $2F, $4C, $8E, $D4, $AE, $8E, $03, $F0, $27 ; CPU:$D3FF PRG:13FF CA F0 08 AE 27 03 F0 2F 4C 8E D4 AE 8E 03 F0 27 + .byte $AE, $23, $03, $F0, $22, $CA, $F0, $7A, $CA, $F0, $76, $CA, $F0, $72, $D0, $6E ; CPU:$D40F PRG:140F AE 23 03 F0 22 CA F0 7A CA F0 76 CA F0 72 D0 6E + .byte $A5, $DF, $D0, $13, $A8, $A2, $02, $B5, $D9, $F0, $01, $C8, $CA, $10, $F8, $98 ; CPU:$D41F PRG:141F A5 DF D0 13 A8 A2 02 B5 D9 F0 01 C8 CA 10 F8 98 + .byte $F0, $05, $88, $F0, $5D, $D0, $47, $4C, $CE, $D4, $AE, $3F, $03, $D0, $48, $AE ; CPU:$D42F PRG:142F F0 05 88 F0 5D D0 47 4C CE D4 AE 3F 03 D0 48 AE + .byte $21, $03, $D0, $3A, $A5, $DF, $D0, $EF, $A2, $02, $B5, $D9, $F0, $06, $C8, $E0 ; CPU:$D43F PRG:143F 21 03 D0 3A A5 DF D0 EF A2 02 B5 D9 F0 06 C8 E0 + .byte $02, $D0, $01, $C8, $CA, $10, $F3, $98, $F0, $DD, $88, $4C, $91, $D4, $A5, $DF ; CPU:$D44F PRG:144F 02 D0 01 C8 CA 10 F3 98 F0 DD 88 4C 91 D4 A5 DF + .byte $D0, $D5, $A8, $A2, $04, $B5, $D9, $F0, $06, $C8, $E0, $02, $B0, $01, $C8, $CA ; CPU:$D45F PRG:145F D0 D5 A8 A2 04 B5 D9 F0 06 C8 E0 02 B0 01 C8 CA + .byte $10, $F3, $98, $F0, $C2, $88, $F0, $1A, $88, $F0, $16, $88, $D0, $04, $A0, $FD ; CPU:$D46F PRG:146F 10 F3 98 F0 C2 88 F0 1A 88 F0 16 88 D0 04 A0 FD + .byte $30, $05, $88, $F0, $0B, $A0, $FF, $A9, $05, $20, $0D, $F8, $C8, $C8, $C8, $C8 ; CPU:$D47F PRG:147F 30 05 88 F0 0B A0 FF A9 05 20 0D F8 C8 C8 C8 C8 + .byte $C8, $C8, $20, $FC, $C8, $8D, $21, $03, $8D, $27, $03, $8D, $3F, $03, $8C, $24 ; CPU:$D48F PRG:148F C8 C8 20 FC C8 8D 21 03 8D 27 03 8D 3F 03 8C 24 + .byte $03, $B9, $C7, $D4, $85, $EA, $A9, $00, $85, $EB, $20, $C4, $C6, $A5, $64, $C9 ; CPU:$D49F PRG:149F 03 B9 C7 D4 85 EA A9 00 85 EB 20 C4 C6 A5 64 C9 + .byte $03, $F0, $09, $AC, $24, $03, $F0, $0D, $C0, $03, $90, $09, $A0, $01, $8C, $02 ; CPU:$D4AF PRG:14AF 03 F0 09 AC 24 03 F0 0D C0 03 90 09 A0 01 8C 02 + .byte $04, $88, $8C, $25, $03, $4C, $CE, $D4, $01, $02, $04, $05, $08, $10, $50, $AD ; CPU:$D4BF PRG:14BF 04 88 8C 25 03 4C CE D4 01 02 04 05 08 10 50 AD + .byte $02, $04, $F0, $20, $AD, $25, $03, $D0, $07, $A9, $1F, $8D, $25, $03, $D0, $15 ; CPU:$D4CF PRG:14CF 02 04 F0 20 AD 25 03 D0 07 A9 1F 8D 25 03 D0 15 + .byte $CE, $25, $03, $D0, $0F, $A0, $18, $A9, $F4, $99, $00, $02, $99, $04, $02, $A9 ; CPU:$D4DF PRG:14DF CE 25 03 D0 0F A0 18 A9 F4 99 00 02 99 04 02 A9 + .byte $00, $8D, $02, $04, $60, $A4, $64, $C0, $03, $F0, $13, $A5, $73, $18, $69, $F4 ; CPU:$D4EF PRG:14EF 00 8D 02 04 60 A4 64 C0 03 F0 13 A5 73 18 69 F4 + .byte $C0, $04, $D0, $02, $69, $2C, $8D, $39, $03, $A5, $74, $8D, $38, $03, $A0, $18 ; CPU:$D4FF PRG:14FF C0 04 D0 02 69 2C 8D 39 03 A5 74 8D 38 03 A0 18 + .byte $AD, $39, $03, $99, $00, $02, $99, $04, $02, $AE, $24, $03, $BD, $3D, $D5, $99 ; CPU:$D50F PRG:150F AD 39 03 99 00 02 99 04 02 AE 24 03 BD 3D D5 99 + .byte $01, $02, $F0, $02, $A9, $03, $99, $05, $02, $A9, $03, $99, $02, $02, $99, $06 ; CPU:$D51F PRG:151F 01 02 F0 02 A9 03 99 05 02 A9 03 99 02 02 99 06 + .byte $02, $AD, $38, $03, $99, $03, $02, $18, $69, $08, $99, $07, $02, $60, $A7, $12 ; CPU:$D52F PRG:152F 02 AD 38 03 99 03 02 18 69 08 99 07 02 60 A7 12 + .byte $22, $23, $94, $A4, $EF, $A5, $0F, $D0, $F4, $A5, $09, $29, $0F, $D0, $EE, $A2 ; CPU:$D53F PRG:153F 22 23 94 A4 EF A5 0F D0 F4 A5 09 29 0F D0 EE A2 + .byte $00, $DE, $41, $03, $10, $0A, $A9, $09, $9D, $41, $03, $E8, $E0, $03, $D0, $F1 ; CPU:$D54F PRG:154F 00 DE 41 03 10 0A A9 09 9D 41 03 E8 E0 03 D0 F1 + .byte $AD, $43, $03, $D0, $D8, $A5, $00, $C9, $05, $D0, $D2, $AD, $01, $04, $D0, $CD ; CPU:$D55F PRG:155F AD 43 03 D0 D8 A5 00 C9 05 D0 D2 AD 01 04 D0 CD + .byte $EE, $01, $04, $4C, $55, $CB ; CPU:$D56F PRG:156F EE 01 04 4C 55 CB + +; ----------------------------------------------------------------------------- +; Routine: WriteVramDescriptorPayload_LoadAndContinue_D575 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +WriteVramDescriptorPayload_LoadAndContinue_D575: + lda #$40 ; CPU:D575 PRG:1575 A9 40 + sta WorkPointer1Lo ; CPU:D577 PRG:1577 85 7E + lda #$03 ; CPU:D579 PRG:1579 A9 03 + sta WorkPointer1Hi ; CPU:D57B PRG:157B 85 7F + lda $2002 ; CPU:D57D PRG:157D AD 02 20 + lda #$20 ; CPU:D580 PRG:1580 A9 20 + sta $2006 ; CPU:D582 PRG:1582 8D 06 20 + lda #$92 ; CPU:D585 PRG:1585 A9 92 + sta $2006 ; CPU:D587 PRG:1587 8D 06 20 + ldy #$03 ; CPU:D58A PRG:158A A0 03 +; ----------------------------------------------------------------------------- +; Routine: WriteVramDescriptorPayload_OnNonnegative_D58C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +WriteVramDescriptorPayload_OnNonnegative_D58C: + lda ($7E),y ; CPU:D58C PRG:158C B1 7E + ora #$30 ; CPU:D58E PRG:158E 09 30 + sta $2007 ; CPU:D590 PRG:1590 8D 07 20 + dey ; CPU:D593 PRG:1593 88 + bpl WriteVramDescriptorPayload_OnNonnegative_D58C ; CPU:D594 PRG:1594 10 F6 + rts ; CPU:D596 PRG:1596 60 +; ----------------------------------------------------------------------------- +; Routine: UpdateMenuSelection +; Global: Update the four-item menu selection and transfer its highlight graphics. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +UpdateMenuSelection: + lda ControllerEdgeFlags ; CPU:D597 PRG:1597 A5 09 + and #$07 ; CPU:D599 PRG:1599 29 07 + bne UpdateMenuSelection_JoinBranchPaths_D5F1 ; CPU:D59B PRG:159B D0 54 + inc $0302 ; CPU:D59D PRG:159D EE 02 03 + lda $0302 ; CPU:D5A0 PRG:15A0 AD 02 03 + eor #$03 ; CPU:D5A3 PRG:15A3 49 03 + bne UpdateMenuSelection_OnNonzero_D5AA ; CPU:D5A5 PRG:15A5 D0 03 + sta $0302 ; CPU:D5A7 PRG:15A7 8D 02 03 +; ----------------------------------------------------------------------------- +; Routine: UpdateMenuSelection_OnNonzero_D5AA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +UpdateMenuSelection_OnNonzero_D5AA: + asl a ; CPU:D5AA PRG:15AA 0A + tay ; CPU:D5AB PRG:15AB A8 + lda $D63B,y ; CPU:D5AC PRG:15AC B9 3B D6 + sta WorkPointer0Lo ; CPU:D5AF PRG:15AF 85 7C + lda $D63C,y ; CPU:D5B1 PRG:15B1 B9 3C D6 + sta WorkPointer0Hi ; CPU:D5B4 PRG:15B4 85 7D + lda $D64D ; CPU:D5B6 PRG:15B6 AD 4D D6 + sta WorkPointer1Lo ; CPU:D5B9 PRG:15B9 85 7E + lda $D64E ; CPU:D5BB PRG:15BB AD 4E D6 + sta WorkPointer1Hi ; CPU:D5BE PRG:15BE 85 7F + jsr $D657 ; CPU:D5C0 PRG:15C0 20 57 D6 + ldy #$00 ; CPU:D5C3 PRG:15C3 A0 00 + ldx #$0C ; CPU:D5C5 PRG:15C5 A2 0C +; ----------------------------------------------------------------------------- +; Routine: UpdateMenuSelection_OnNonzero_D5C7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +UpdateMenuSelection_OnNonzero_D5C7: + lda ($7E),y ; CPU:D5C7 PRG:15C7 B1 7E + sta $2007 ; CPU:D5C9 PRG:15C9 8D 07 20 + iny ; CPU:D5CC PRG:15CC C8 + dex ; CPU:D5CD PRG:15CD CA + bne UpdateMenuSelection_OnNonzero_D5C7 ; CPU:D5CE PRG:15CE D0 F7 + ldy #$00 ; CPU:D5D0 PRG:15D0 A0 00 + ldx #$04 ; CPU:D5D2 PRG:15D2 A2 04 +; ----------------------------------------------------------------------------- +; Routine: UpdateMenuSelection_OnNonzero_D5D4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +UpdateMenuSelection_OnNonzero_D5D4: + lda ($7C),y ; CPU:D5D4 PRG:15D4 B1 7C + sta $2007 ; CPU:D5D6 PRG:15D6 8D 07 20 + iny ; CPU:D5D9 PRG:15D9 C8 + dex ; CPU:D5DA PRG:15DA CA + bne UpdateMenuSelection_OnNonzero_D5D4 ; CPU:D5DB PRG:15DB D0 F7 + beq UpdateMenuSelection_OnZero_D624 ; CPU:D5DD PRG:15DD F0 45 +; ----------------------------------------------------------------------------- +; Routine: UpdateMenuSelection_LoadAndContinue_D5DF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +UpdateMenuSelection_LoadAndContinue_D5DF: + bit Zp03 ; CPU:D5DF PRG:15DF 24 03 + bvc UpdateMenuSelection_JoinBranchPaths_D5F1 ; CPU:D5E1 PRG:15E1 50 0E + lda ZpCC ; CPU:D5E3 PRG:15E3 A5 CC + beq UpdateMenuSelection_JoinBranchPaths_D5F1 ; CPU:D5E5 PRG:15E5 F0 0A + cmp #$02 ; CPU:D5E7 PRG:15E7 C9 02 + beq UpdateMenuSelection_OnEqual02_D5FC ; CPU:D5E9 PRG:15E9 F0 11 + lda ControllerEdgeFlags ; CPU:D5EB PRG:15EB A5 09 + and #$03 ; CPU:D5ED PRG:15ED 29 03 + beq UpdateMenuSelection_OnZero_D5F2 ; CPU:D5EF PRG:15EF F0 01 +; ----------------------------------------------------------------------------- +; Routine: UpdateMenuSelection_JoinBranchPaths_D5F1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +UpdateMenuSelection_JoinBranchPaths_D5F1: + rts ; CPU:D5F1 PRG:15F1 60 +; ----------------------------------------------------------------------------- +; Routine: UpdateMenuSelection_OnZero_D5F2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +UpdateMenuSelection_OnZero_D5F2: + ldx #$04 ; CPU:D5F2 PRG:15F2 A2 04 + ldy #$00 ; CPU:D5F4 PRG:15F4 A0 00 + lda ControllerEdgeFlags ; CPU:D5F6 PRG:15F6 A5 09 + and #$04 ; CPU:D5F8 PRG:15F8 29 04 + bne UpdateMenuSelection_OnNonzero_D5FE ; CPU:D5FA PRG:15FA D0 02 +; ----------------------------------------------------------------------------- +; Routine: UpdateMenuSelection_OnEqual02_D5FC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +UpdateMenuSelection_OnEqual02_D5FC: + ldx #$10 ; CPU:D5FC PRG:15FC A2 10 +; ----------------------------------------------------------------------------- +; Routine: UpdateMenuSelection_OnNonzero_D5FE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +UpdateMenuSelection_OnNonzero_D5FE: + lda $D64F ; CPU:D5FE PRG:15FE AD 4F D6 + sta WorkPointer0Lo ; CPU:D601 PRG:1601 85 7C + lda $D650 ; CPU:D603 PRG:1603 AD 50 D6 + sta WorkPointer0Hi ; CPU:D606 PRG:1606 85 7D + stx Zp77 ; CPU:D608 PRG:1608 86 77 + sty Zp78 ; CPU:D60A PRG:160A 84 78 + jsr $D665 ; CPU:D60C PRG:160C 20 65 D6 + jsr $D657 ; CPU:D60F PRG:160F 20 57 D6 + ldx #$10 ; CPU:D612 PRG:1612 A2 10 + ldy #$00 ; CPU:D614 PRG:1614 A0 00 +; ----------------------------------------------------------------------------- +; Routine: UpdateMenuSelection_OnNonzero_D616 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +UpdateMenuSelection_OnNonzero_D616: + lda ($7E),y ; CPU:D616 PRG:1616 B1 7E + sta $2007 ; CPU:D618 PRG:1618 8D 07 20 + iny ; CPU:D61B PRG:161B C8 + dex ; CPU:D61C PRG:161C CA + cpx Zp77 ; CPU:D61D PRG:161D E4 77 + beq UpdateMenuSelection_OnZero_D627 ; CPU:D61F PRG:161F F0 06 +; ----------------------------------------------------------------------------- +; Routine: UpdateMenuSelection_JumpNext_D621 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +UpdateMenuSelection_JumpNext_D621: + txa ; CPU:D621 PRG:1621 8A + bne UpdateMenuSelection_OnNonzero_D616 ; CPU:D622 PRG:1622 D0 F2 +; ----------------------------------------------------------------------------- +; Routine: UpdateMenuSelection_OnZero_D624 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +UpdateMenuSelection_OnZero_D624: + jmp $CA11 ; CPU:D624 PRG:1624 4C 11 CA +; ----------------------------------------------------------------------------- +; Routine: UpdateMenuSelection_OnZero_D627 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +UpdateMenuSelection_OnZero_D627: + sty SavedTransferIndex ; CPU:D627 PRG:1627 84 FA + ldy #$00 ; CPU:D629 PRG:1629 A0 00 +; ----------------------------------------------------------------------------- +; Routine: UpdateMenuSelection_OnNonzero_D62B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +UpdateMenuSelection_OnNonzero_D62B: + lda ($7C),y ; CPU:D62B PRG:162B B1 7C + sta $2007 ; CPU:D62D PRG:162D 8D 07 20 + iny ; CPU:D630 PRG:1630 C8 + dex ; CPU:D631 PRG:1631 CA + cpx Zp78 ; CPU:D632 PRG:1632 E4 78 + bne UpdateMenuSelection_OnNonzero_D62B ; CPU:D634 PRG:1634 D0 F5 + ldy SavedTransferIndex ; CPU:D636 PRG:1636 A4 FA + jmp $D621 ; CPU:D638 PRG:1638 4C 21 D6 + +MenuItemPointerTable: + .byte $41, $D6, $45, $D6, $49, $D6, $0F, $16, $2C, $28, $0F, $2C, $28, $16, $0F, $28 ; CPU:$D63B PRG:163B 41 D6 45 D6 49 D6 0F 16 2C 28 0F 2C 28 16 0F 28 + .byte $16, $2C, $08, $CD, $51, $D6, $0F, $14, $30, $29, $E8, $CC ; CPU:$D64B PRG:164B 16 2C 08 CD 51 D6 0F 14 30 29 E8 CC + +; ----------------------------------------------------------------------------- +; Routine: SetPaletteAddress +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteAddress: + lda $2002 ; CPU:D657 PRG:1657 AD 02 20 + lda #$3F ; CPU:D65A PRG:165A A9 3F + sta $2006 ; CPU:D65C PRG:165C 8D 06 20 + lda #$00 ; CPU:D65F PRG:165F A9 00 + sta $2006 ; CPU:D661 PRG:1661 8D 06 20 + rts ; CPU:D664 PRG:1664 60 +; ----------------------------------------------------------------------------- +; Routine: LoadMenuDescriptorPointer +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +LoadMenuDescriptorPointer: + lda $D655 ; CPU:D665 PRG:1665 AD 55 D6 + sta WorkPointer1Lo ; CPU:D668 PRG:1668 85 7E + lda $D656 ; CPU:D66A PRG:166A AD 56 D6 + sta WorkPointer1Hi ; CPU:D66D PRG:166D 85 7F + rts ; CPU:D66F PRG:166F 60 + +MenuVramDescriptorData: + .byte $E7, $20, $00, $90, $A0, $80, $90, $A0, $80, $90, $A0, $80, $90, $A0, $80, $90 ; CPU:$D670 PRG:1670 E7 20 00 90 A0 80 90 A0 80 90 A0 80 90 A0 80 90 + .byte $A0, $80, $90, $00, $FE, $07, $21, $A0, $FE, $18, $21, $80, $FE, $27, $21, $90 ; CPU:$D680 PRG:1680 A0 80 90 00 FE 07 21 A0 FE 18 21 80 FE 27 21 90 + .byte $00, $00, $00, $B0, $B1, $B2, $B3, $B4, $B5, $B6, $B7, $FE, $38, $21, $90, $FE ; CPU:$D690 PRG:1690 00 00 00 B0 B1 B2 B3 B4 B5 B6 B7 FE 38 21 90 FE + .byte $47, $21, $80, $00, $00, $00, $C0, $C1, $C2, $C3, $C4, $C5, $C6, $C7, $FE, $58 ; CPU:$D6A0 PRG:16A0 47 21 80 00 00 00 C0 C1 C2 C3 C4 C5 C6 C7 FE 58 + .byte $21, $A0, $FE, $67, $21, $A0, $00, $00, $00, $00, $B0, $B1, $B8, $B9, $DE, $DF ; CPU:$D6B0 PRG:16B0 21 A0 FE 67 21 A0 00 00 00 00 B0 B1 B8 B9 DE DF + .byte $BC, $D0, $D1, $00, $00, $00, $80, $FE, $87, $21, $90, $00, $00, $00, $00, $C0 ; CPU:$D6C0 PRG:16C0 BC D0 D1 00 00 00 80 FE 87 21 90 00 00 00 00 C0 + .byte $C1, $C8, $C9, $EE, $EF, $CC, $E0, $E1, $00, $00, $00, $90, $FE, $A7, $21, $80 ; CPU:$D6D0 PRG:16D0 C1 C8 C9 EE EF CC E0 E1 00 00 00 90 FE A7 21 80 + .byte $FE, $B8, $21, $A0, $FE, $C7, $21, $00, $90, $80, $A0, $90, $80, $A0, $90, $80 ; CPU:$D6E0 PRG:16E0 FE B8 21 A0 FE C7 21 00 90 80 A0 90 80 A0 90 80 + .byte $A0, $90, $80, $A0, $90, $80, $A0, $90, $00, $FF, $C8, $23, $00, $C0, $FD, $04 ; CPU:$D6F0 PRG:16F0 A0 90 80 A0 90 80 A0 90 00 FF C8 23 00 C0 FD 04 + .byte $F0, $30, $00, $00, $CC, $FD, $04, $00, $33, $00, $00, $CC, $FD, $04, $F0, $33 ; CPU:$D700 PRG:1700 F0 30 00 00 CC FD 04 00 33 00 00 CC FD 04 F0 33 + .byte $FD, $19, $00, $FF ; CPU:$D710 PRG:1710 FD 19 00 FF + +; ----------------------------------------------------------------------------- +; Routine: SetPaletteAddress_LoadAndContinue_D714 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetPaletteAddress_LoadAndContinue_D714: + lda #$0C ; CPU:D714 PRG:1714 A9 0C + jsr $C4E3 ; CPU:D716 PRG:1716 20 E3 C4 + jsr $CA4B ; CPU:D719 PRG:1719 20 4B CA + lda #$0D ; CPU:D71C PRG:171C A9 0D + jsr $C4E3 ; CPU:D71E PRG:171E 20 E3 C4 + jmp $CA55 ; CPU:D721 PRG:1721 4C 55 CA + +MenuTileData: + .byte $42, $20, $FD, $1C, $24, $FE, $A2, $20, $FD, $1C, $29, $FF, $41, $20, $23, $26 ; CPU:$D724 PRG:1724 42 20 FD 1C 24 FE A2 20 FD 1C 29 FF 41 20 23 26 + .byte $26, $28, $FE, $5E, $20, $25, $27, $27, $2A, $FF ; CPU:$D734 PRG:1734 26 28 FE 5E 20 25 27 27 2A FF + +; ----------------------------------------------------------------------------- +; Routine: InitializeRoundParameters +; Global: Clear round state and load variant-dependent gameplay parameters. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +InitializeRoundParameters: + ldx #$00 ; CPU:D73E PRG:173E A2 00 + stx $03B2 ; CPU:D740 PRG:1740 8E B2 03 + stx $0341 ; CPU:D743 PRG:1743 8E 41 03 + stx $0342 ; CPU:D746 PRG:1746 8E 42 03 + stx $0343 ; CPU:D749 PRG:1749 8E 43 03 + stx $03B1 ; CPU:D74C PRG:174C 8E B1 03 + stx Zp6D ; CPU:D74F PRG:174F 86 6D + stx Zp6A ; CPU:D751 PRG:1751 86 6A + stx Zp6B ; CPU:D753 PRG:1753 86 6B + stx Zp66 ; CPU:D755 PRG:1755 86 66 + ldx #$02 ; CPU:D757 PRG:1757 A2 02 + lda $03B0 ; CPU:D759 PRG:1759 AD B0 03 + lsr a ; CPU:D75C PRG:175C 4A + bcc InitializeRoundParameters_OnCarryClear_D761 ; CPU:D75D PRG:175D 90 02 + ldx #$04 ; CPU:D75F PRG:175F A2 04 +; ----------------------------------------------------------------------------- +; Routine: InitializeRoundParameters_OnCarryClear_D761 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +InitializeRoundParameters_OnCarryClear_D761: + stx CurrentGameVariant ; CPU:D761 PRG:1761 86 63 + lda #$00 ; CPU:D763 PRG:1763 A9 00 + sta Zp61 ; CPU:D765 PRG:1765 85 61 + inc $03B0 ; CPU:D767 PRG:1767 EE B0 03 + jmp $C835 ; CPU:D76A PRG:176A 4C 35 C8 + +RoundParameterTable: + .byte $A2, $06, $A5, $63, $C9, $04, $F0, $02, $A2, $03, $E4, $6B, $F0, $46, $A9, $00 ; CPU:$D76D PRG:176D A2 06 A5 63 C9 04 F0 02 A2 03 E4 6B F0 46 A9 00 + .byte $AC, $B1, $03, $D0, $32, $AC, $B2, $03, $B9, $C5, $D7, $E0, $06, $F0, $03, $B9 ; CPU:$D77D PRG:177D AC B1 03 D0 32 AC B2 03 B9 C5 D7 E0 06 F0 03 B9 + .byte $E7, $D7, $8D, $B3, $03, $8D, $B4, $03, $C8, $B9, $C5, $D7, $E0, $06, $F0, $03 ; CPU:$D78D PRG:178D E7 D7 8D B3 03 8D B4 03 C8 B9 C5 D7 E0 06 F0 03 + .byte $B9, $E7, $D7, $8D, $B1, $03, $C8, $8C, $B2, $03, $A5, $05, $29, $30, $85, $77 ; CPU:$D79D PRG:179D B9 E7 D7 8D B1 03 C8 8C B2 03 A5 05 29 30 85 77 + .byte $AD, $B4, $03, $29, $CF, $05, $77, $85, $0D, $AD, $B3, $03, $85, $0C, $CE, $B1 ; CPU:$D7AD PRG:17AD AD B4 03 29 CF 05 77 85 0D AD B3 03 85 0C CE B1 + .byte $03, $4C, $22, $C8, $E6, $0A, $18, $60, $00, $7A, $80, $0E, $00, $62, $02, $26 ; CPU:$D7BD PRG:17BD 03 4C 22 C8 E6 0A 18 60 00 7A 80 0E 00 62 02 26 + .byte $82, $22, $00, $56, $02, $40, $82, $18, $02, $9A, $00, $28, $80, $08, $00, $28 ; CPU:$D7CD PRG:17CD 82 22 00 56 02 40 82 18 02 9A 00 28 80 08 00 28 + .byte $00, $14, $00, $04, $02, $82, $82, $16, $00, $B4, $01, $90, $81, $10, $01, $50 ; CPU:$D7DD PRG:17DD 00 14 00 04 02 82 82 16 00 B4 01 90 81 10 01 50 + .byte $81, $10, $01, $80, $81, $10, $01, $60, $81, $10, $01, $80, $00, $20, $81, $10 ; CPU:$D7ED PRG:17ED 81 10 01 80 81 10 01 60 81 10 01 80 00 20 81 10 + .byte $01, $60, $81, $10, $01, $88, $81, $10, $01, $40 ; CPU:$D7FD PRG:17FD 01 60 81 10 01 88 81 10 01 40 + +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate: + lda Zp64 ; CPU:D807 PRG:1807 A5 64 + jsr $C4CD ; CPU:D809 PRG:1809 20 CD C4 + +VariantObjectHandlerPointerTable: + .byte $14, $D8, $8D, $D8, $51, $D9, $5F, $D9 ; CPU:$D80C PRG:180C 14 D8 8D D8 51 D9 5F D9 + + jsr $DA05 ; CPU:D814 PRG:1814 20 05 DA + bcs DispatchVariantObjectUpdate_OnCarrySet_D820 ; CPU:D817 PRG:1817 B0 07 + lda #$30 ; CPU:D819 PRG:1819 A9 30 + sta Zp77 ; CPU:D81B PRG:181B 85 77 + jmp $D8E4 ; CPU:D81D PRG:181D 4C E4 D8 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnCarrySet_D820 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnCarrySet_D820: + ldx ZpDF ; CPU:D820 PRG:1820 A6 DF + beq DispatchVariantObjectUpdate_OnZero_D82E ; CPU:D822 PRG:1822 F0 0A +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_LoadIndexAndContinue_D824 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_LoadIndexAndContinue_D824: + ldx ZpDE ; CPU:D824 PRG:1824 A6 DE + dex ; CPU:D826 PRG:1826 CA + beq DispatchVariantObjectUpdate_OnZero_D83F ; CPU:D827 PRG:1827 F0 16 + dex ; CPU:D829 PRG:1829 CA + beq DispatchVariantObjectUpdate_JoinBranchPaths_D860 ; CPU:D82A PRG:182A F0 34 + bne DispatchVariantObjectUpdate_JoinBranchPaths_D839 ; CPU:D82C PRG:182C D0 0B +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnZero_D82E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnZero_D82E: + lda Zp0C ; CPU:D82E PRG:182E A5 0C + and #$03 ; CPU:D830 PRG:1830 29 03 + tax ; CPU:D832 PRG:1832 AA + dex ; CPU:D833 PRG:1833 CA + beq DispatchVariantObjectUpdate_OnZero_D83F ; CPU:D834 PRG:1834 F0 09 + dex ; CPU:D836 PRG:1836 CA + beq DispatchVariantObjectUpdate_JoinBranchPaths_D860 ; CPU:D837 PRG:1837 F0 27 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_JoinBranchPaths_D839 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_JoinBranchPaths_D839: + lda #$00 ; CPU:D839 PRG:1839 A9 00 + sta ZpCE ; CPU:D83B PRG:183B 85 CE + beq DispatchVariantObjectUpdate_JoinBranchPaths_D885 ; CPU:D83D PRG:183D F0 46 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnZero_D83F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnZero_D83F: + lda CurrentGameVariant ; CPU:D83F PRG:183F A5 63 + cmp #$02 ; CPU:D841 PRG:1841 C9 02 + bne DispatchVariantObjectUpdate_OnNotEqual02_D84A ; CPU:D843 PRG:1843 D0 05 + jsr $D9F7 ; CPU:D845 PRG:1845 20 F7 D9 + bcc DispatchVariantObjectUpdate_JoinBranchPaths_D889 ; CPU:D848 PRG:1848 90 3F +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNotEqual02_D84A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNotEqual02_D84A: + lda #$01 ; CPU:D84A PRG:184A A9 01 + sta Zp56 ; CPU:D84C PRG:184C 85 56 + jsr $F7EE ; CPU:D84E PRG:184E 20 EE F7 + ldx $0405 ; CPU:D851 PRG:1851 AE 05 04 + beq DispatchVariantObjectUpdate_OnZero_D858 ; CPU:D854 PRG:1854 F0 02 + dec Zp74,x ; CPU:D856 PRG:1856 D6 74 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnZero_D858 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnZero_D858: + lda #$FF ; CPU:D858 PRG:1858 A9 FF + sta ZpCE ; CPU:D85A PRG:185A 85 CE + lda #$01 ; CPU:D85C PRG:185C A9 01 + bne DispatchVariantObjectUpdate_JoinBranchPaths_D885 ; CPU:D85E PRG:185E D0 25 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_JoinBranchPaths_D860 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_JoinBranchPaths_D860: + lda CurrentGameVariant ; CPU:D860 PRG:1860 A5 63 + cmp #$02 ; CPU:D862 PRG:1862 C9 02 + beq DispatchVariantObjectUpdate_OnEqual02_D86A ; CPU:D864 PRG:1864 F0 04 + cmp #$03 ; CPU:D866 PRG:1866 C9 03 + bne DispatchVariantObjectUpdate_OnNotEqual03_D86F ; CPU:D868 PRG:1868 D0 05 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnEqual02_D86A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnEqual02_D86A: + jsr $D9FB ; CPU:D86A PRG:186A 20 FB D9 + bcc DispatchVariantObjectUpdate_JoinBranchPaths_D889 ; CPU:D86D PRG:186D 90 1A +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNotEqual03_D86F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNotEqual03_D86F: + lda #$01 ; CPU:D86F PRG:186F A9 01 + sta Zp56 ; CPU:D871 PRG:1871 85 56 + jsr $F7FC ; CPU:D873 PRG:1873 20 FC F7 + bmi DispatchVariantObjectUpdate_JoinBranchPaths_D839 ; CPU:D876 PRG:1876 30 C1 + ldx $0405 ; CPU:D878 PRG:1878 AE 05 04 + beq DispatchVariantObjectUpdate_OnZero_D87F ; CPU:D87B PRG:187B F0 02 + inc Zp74,x ; CPU:D87D PRG:187D F6 74 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnZero_D87F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnZero_D87F: + lda #$FF ; CPU:D87F PRG:187F A9 FF + sta ZpCE ; CPU:D881 PRG:1881 85 CE + lda #$02 ; CPU:D883 PRG:1883 A9 02 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_JoinBranchPaths_D885 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_JoinBranchPaths_D885: + sta ZpCA ; CPU:D885 PRG:1885 85 CA +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnZero_D887 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnZero_D887: + sta ZpC9 ; CPU:D887 PRG:1887 85 C9 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_JoinBranchPaths_D889 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_JoinBranchPaths_D889: + rts ; CPU:D889 PRG:1889 60 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_JoinBranchPaths_D88A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_JoinBranchPaths_D88A: + jmp $D824 ; CPU:D88A PRG:188A 4C 24 D8 + jsr $DA05 ; CPU:D88D PRG:188D 20 05 DA + bcc DispatchVariantObjectUpdate_OnCarryClear_D8E0 ; CPU:D890 PRG:1890 90 4E + lda Zp74 ; CPU:D892 PRG:1892 A5 74 + cmp #$40 ; CPU:D894 PRG:1894 C9 40 + bcc DispatchVariantObjectUpdate_OnBelow40_D8B7 ; CPU:D896 PRG:1896 90 1F + lda ZpDF ; CPU:D898 PRG:1898 A5 DF + bne DispatchVariantObjectUpdate_JoinBranchPaths_D88A ; CPU:D89A PRG:189A D0 EE + lda Zp0C ; CPU:D89C PRG:189C A5 0C + and #$02 ; CPU:D89E PRG:189E 29 02 + beq DispatchVariantObjectUpdate_OnZero_D82E ; CPU:D8A0 PRG:18A0 F0 8C +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_D8A2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_D8A2: + ldx Zp74 ; CPU:D8A2 PRG:18A2 A6 74 + cpx #$10 ; CPU:D8A4 PRG:18A4 E0 10 + bcc DispatchVariantObjectUpdate_JoinBranchPaths_D860 ; CPU:D8A6 PRG:18A6 90 B8 + lda ControllerEdgeFlags ; CPU:D8A8 PRG:18A8 A5 09 + lsr a ; CPU:D8AA PRG:18AA 4A + bcc DispatchVariantObjectUpdate_OnCarryClear_D8AF ; CPU:D8AB PRG:18AB 90 02 + dec Zp74 ; CPU:D8AD PRG:18AD C6 74 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnCarryClear_D8AF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnCarryClear_D8AF: + lda #$02 ; CPU:D8AF PRG:18AF A9 02 + sta ZpCA ; CPU:D8B1 PRG:18B1 85 CA +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_D8B3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_D8B3: + lda #$00 ; CPU:D8B3 PRG:18B3 A9 00 + beq DispatchVariantObjectUpdate_OnZero_D887 ; CPU:D8B5 PRG:18B5 F0 D0 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnBelow40_D8B7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnBelow40_D8B7: + lda ZpDF ; CPU:D8B7 PRG:18B7 A5 DF + bne DispatchVariantObjectUpdate_JoinBranchPaths_D88A ; CPU:D8B9 PRG:18B9 D0 CF + lda Zp0C ; CPU:D8BB PRG:18BB A5 0C + and #$02 ; CPU:D8BD PRG:18BD 29 02 + bne DispatchVariantObjectUpdate_OnNonzero_D8A2 ; CPU:D8BF PRG:18BF D0 E1 + lda Zp0C ; CPU:D8C1 PRG:18C1 A5 0C + and #$01 ; CPU:D8C3 PRG:18C3 29 01 + bne DispatchVariantObjectUpdate_OnNonzero_D8CA ; CPU:D8C5 PRG:18C5 D0 03 + jmp $D94E ; CPU:D8C7 PRG:18C7 4C 4E D9 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_D8CA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_D8CA: + ldx Zp74 ; CPU:D8CA PRG:18CA A6 74 + cpx #$40 ; CPU:D8CC PRG:18CC E0 40 + bcs DispatchVariantObjectUpdate_JoinBranchPaths_D8DD ; CPU:D8CE PRG:18CE B0 0D + lda ControllerEdgeFlags ; CPU:D8D0 PRG:18D0 A5 09 + lsr a ; CPU:D8D2 PRG:18D2 4A + bcc DispatchVariantObjectUpdate_OnCarryClear_D8D7 ; CPU:D8D3 PRG:18D3 90 02 + inc Zp74 ; CPU:D8D5 PRG:18D5 E6 74 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnCarryClear_D8D7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnCarryClear_D8D7: + lda #$01 ; CPU:D8D7 PRG:18D7 A9 01 + sta ZpCA ; CPU:D8D9 PRG:18D9 85 CA + bne DispatchVariantObjectUpdate_OnNonzero_D8B3 ; CPU:D8DB PRG:18DB D0 D6 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_JoinBranchPaths_D8DD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_JoinBranchPaths_D8DD: + jmp $D858 ; CPU:D8DD PRG:18DD 4C 58 D8 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnCarryClear_D8E0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnCarryClear_D8E0: + lda #$10 ; CPU:D8E0 PRG:18E0 A9 10 + sta Zp77 ; CPU:D8E2 PRG:18E2 85 77 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_D8E4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_D8E4: + lda ZpDF ; CPU:D8E4 PRG:18E4 A5 DF + beq DispatchVariantObjectUpdate_OnZero_D8F2 ; CPU:D8E6 PRG:18E6 F0 0A + ldx ZpDE ; CPU:D8E8 PRG:18E8 A6 DE + dex ; CPU:D8EA PRG:18EA CA + beq DispatchVariantObjectUpdate_OnZero_D924 ; CPU:D8EB PRG:18EB F0 37 + dex ; CPU:D8ED PRG:18ED CA + beq DispatchVariantObjectUpdate_OnZero_D8FF ; CPU:D8EE PRG:18EE F0 0F + bne DispatchVariantObjectUpdate_OnNonzero_D94E ; CPU:D8F0 PRG:18F0 D0 5C +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnZero_D8F2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnZero_D8F2: + lda Zp0C ; CPU:D8F2 PRG:18F2 A5 0C + and #$03 ; CPU:D8F4 PRG:18F4 29 03 + tax ; CPU:D8F6 PRG:18F6 AA + dex ; CPU:D8F7 PRG:18F7 CA + beq DispatchVariantObjectUpdate_OnZero_D924 ; CPU:D8F8 PRG:18F8 F0 2A + dex ; CPU:D8FA PRG:18FA CA + beq DispatchVariantObjectUpdate_OnZero_D8FF ; CPU:D8FB PRG:18FB F0 02 + bne DispatchVariantObjectUpdate_OnNonzero_D94E ; CPU:D8FD PRG:18FD D0 4F +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnZero_D8FF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnZero_D8FF: + ldx Zp74 ; CPU:D8FF PRG:18FF A6 74 + cpx Zp77 ; CPU:D901 PRG:1901 E4 77 + bcs DispatchVariantObjectUpdate_OnCarrySet_D908 ; CPU:D903 PRG:1903 B0 03 + jmp $D860 ; CPU:D905 PRG:1905 4C 60 D8 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnCarrySet_D908 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnCarrySet_D908: + jsr $CD2D ; CPU:D908 PRG:1908 20 2D CD + beq DispatchVariantObjectUpdate_OnZero_D912 ; CPU:D90B PRG:190B F0 05 + jsr $D9FB ; CPU:D90D PRG:190D 20 FB D9 + bcc DispatchVariantObjectUpdate_JoinBranchPaths_D920 ; CPU:D910 PRG:1910 90 0E +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnZero_D912 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnZero_D912: + dec Zp74 ; CPU:D912 PRG:1912 C6 74 + cpx #$03 ; CPU:D914 PRG:1914 E0 03 + bne DispatchVariantObjectUpdate_OnNotEqual03_D91A ; CPU:D916 PRG:1916 D0 02 + dec ZpBF ; CPU:D918 PRG:1918 C6 BF +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNotEqual03_D91A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNotEqual03_D91A: + cpx #$01 ; CPU:D91A PRG:191A E0 01 + bne DispatchVariantObjectUpdate_JoinBranchPaths_D920 ; CPU:D91C PRG:191C D0 02 + dec Zp84 ; CPU:D91E PRG:191E C6 84 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_JoinBranchPaths_D920 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_JoinBranchPaths_D920: + lda #$02 ; CPU:D920 PRG:1920 A9 02 + bne DispatchVariantObjectUpdate_OnNonzero_D945 ; CPU:D922 PRG:1922 D0 21 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnZero_D924 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnZero_D924: + ldx Zp74 ; CPU:D924 PRG:1924 A6 74 + cpx #$E8 ; CPU:D926 PRG:1926 E0 E8 + bcs DispatchVariantObjectUpdate_JoinBranchPaths_D8DD ; CPU:D928 PRG:1928 B0 B3 + ldx CurrentGameVariant ; CPU:D92A PRG:192A A6 63 + cpx #$02 ; CPU:D92C PRG:192C E0 02 + bne DispatchVariantObjectUpdate_OnNotEqual02_D935 ; CPU:D92E PRG:192E D0 05 + jsr $D9F3 ; CPU:D930 PRG:1930 20 F3 D9 + bcc DispatchVariantObjectUpdate_JoinBranchPaths_D943 ; CPU:D933 PRG:1933 90 0E +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNotEqual02_D935 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNotEqual02_D935: + inc Zp74 ; CPU:D935 PRG:1935 E6 74 + cpx #$03 ; CPU:D937 PRG:1937 E0 03 + bne DispatchVariantObjectUpdate_OnNotEqual03_D93D ; CPU:D939 PRG:1939 D0 02 + inc ZpBF ; CPU:D93B PRG:193B E6 BF +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNotEqual03_D93D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNotEqual03_D93D: + cpx #$01 ; CPU:D93D PRG:193D E0 01 + bne DispatchVariantObjectUpdate_JoinBranchPaths_D943 ; CPU:D93F PRG:193F D0 02 + inc Zp84 ; CPU:D941 PRG:1941 E6 84 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_JoinBranchPaths_D943 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_JoinBranchPaths_D943: + lda #$01 ; CPU:D943 PRG:1943 A9 01 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_D945 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_D945: + sta ZpCA ; CPU:D945 PRG:1945 85 CA + lda #$00 ; CPU:D947 PRG:1947 A9 00 + sta ZpCE ; CPU:D949 PRG:1949 85 CE + sta ZpC9 ; CPU:D94B PRG:194B 85 C9 + rts ; CPU:D94D PRG:194D 60 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_D94E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_D94E: + jmp $D839 ; CPU:D94E PRG:194E 4C 39 D8 + jsr $DA05 ; CPU:D951 PRG:1951 20 05 DA + bcc DispatchVariantObjectUpdate_OnCarryClear_D959 ; CPU:D954 PRG:1954 90 03 + jmp $D820 ; CPU:D956 PRG:1956 4C 20 D8 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnCarryClear_D959 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnCarryClear_D959: + lda #$3C ; CPU:D959 PRG:1959 A9 3C + sta Zp77 ; CPU:D95B PRG:195B 85 77 + bne DispatchVariantObjectUpdate_OnNonzero_D8E4 ; CPU:D95D PRG:195D D0 85 + ldx Zp0C ; CPU:D95F PRG:195F A6 0C + lda $0320 ; CPU:D961 PRG:1961 AD 20 03 + ora $031F ; CPU:D964 PRG:1964 0D 1F 03 + bne DispatchVariantObjectUpdate_JoinBranchPaths_D971 ; CPU:D967 PRG:1967 D0 08 + lda ZpCD ; CPU:D969 PRG:1969 A5 CD + ora ZpDF ; CPU:D96B PRG:196B 05 DF + beq DispatchVariantObjectUpdate_JoinBranchPaths_D971 ; CPU:D96D PRG:196D F0 02 + ldx ZpC9 ; CPU:D96F PRG:196F A6 C9 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_JoinBranchPaths_D971 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_JoinBranchPaths_D971: + stx Zp0C ; CPU:D971 PRG:1971 86 0C + lda ZpAF ; CPU:D973 PRG:1973 A5 AF + bne DispatchVariantObjectUpdate_OnNonzero_D9C4 ; CPU:D975 PRG:1975 D0 4D + lda Zp0F ; CPU:D977 PRG:1977 A5 0F + bne DispatchVariantObjectUpdate_OnNonzero_D997 ; CPU:D979 PRG:1979 D0 1C + lda ZpB8 ; CPU:D97B PRG:197B A5 B8 + bne DispatchVariantObjectUpdate_OnNonzero_D985 ; CPU:D97D PRG:197D D0 06 + lda ZpDE ; CPU:D97F PRG:197F A5 DE + ldx ZpDF ; CPU:D981 PRG:1981 A6 DF + bne DispatchVariantObjectUpdate_OnNonzero_D987 ; CPU:D983 PRG:1983 D0 02 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_D985 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_D985: + lda Zp0C ; CPU:D985 PRG:1985 A5 0C +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_D987 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_D987: + and #$03 ; CPU:D987 PRG:1987 29 03 + asl a ; CPU:D989 PRG:1989 0A + tax ; CPU:D98A PRG:198A AA + lda $D9BC,x ; CPU:D98B PRG:198B BD BC D9 + sta Zp56 ; CPU:D98E PRG:198E 85 56 + lda $D9BD,x ; CPU:D990 PRG:1990 BD BD D9 + sta ZpC9 ; CPU:D993 PRG:1993 85 C9 + sta ZpCA ; CPU:D995 PRG:1995 85 CA +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_D997 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_D997: + jsr $DA05 ; CPU:D997 PRG:1997 20 05 DA + bcs DispatchVariantObjectUpdate_OnCarrySet_D9B9 ; CPU:D99A PRG:199A B0 1D + lda #$02 ; CPU:D99C PRG:199C A9 02 + sta ZpCA ; CPU:D99E PRG:199E 85 CA + lda Zp74 ; CPU:D9A0 PRG:19A0 A5 74 + adc #$01 ; CPU:D9A2 PRG:19A2 69 01 + tax ; CPU:D9A4 PRG:19A4 AA + adc #$10 ; CPU:D9A5 PRG:19A5 69 10 + bcs DispatchVariantObjectUpdate_OnCarrySet_D9AB ; CPU:D9A7 PRG:19A7 B0 02 + stx Zp74 ; CPU:D9A9 PRG:19A9 86 74 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnCarrySet_D9AB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnCarrySet_D9AB: + clc ; CPU:D9AB PRG:19AB 18 + lda Zp84 ; CPU:D9AC PRG:19AC A5 84 + adc #$01 ; CPU:D9AE PRG:19AE 69 01 + sta Zp84 ; CPU:D9B0 PRG:19B0 85 84 + bcc DispatchVariantObjectUpdate_JoinBranchPaths_D9B8 ; CPU:D9B2 PRG:19B2 90 04 + lda #$00 ; CPU:D9B4 PRG:19B4 A9 00 + sta Zp80 ; CPU:D9B6 PRG:19B6 85 80 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_JoinBranchPaths_D9B8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_JoinBranchPaths_D9B8: + rts ; CPU:D9B8 PRG:19B8 60 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnCarrySet_D9B9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnCarrySet_D9B9: + jmp $F7EE ; CPU:D9B9 PRG:19B9 4C EE F7 + +VariantModeLookupTable: + .byte $02, $00, $03, $01, $01, $02, $02, $00 ; CPU:$D9BC PRG:19BC 02 00 03 01 01 02 02 00 + +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_D9C4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_D9C4: + lda Zp80 ; CPU:D9C4 PRG:19C4 A5 80 + beq DispatchVariantObjectUpdate_JoinBranchPaths_D9B8 ; CPU:D9C6 PRG:19C6 F0 F0 + lda Zp84 ; CPU:D9C8 PRG:19C8 A5 84 + clc ; CPU:D9CA PRG:19CA 18 + adc #$02 ; CPU:D9CB PRG:19CB 69 02 + sta Zp84 ; CPU:D9CD PRG:19CD 85 84 + bcs DispatchVariantObjectUpdate_OnCarrySet_D9E2 ; CPU:D9CF PRG:19CF B0 11 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_LoadAndContinue_D9D1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_LoadAndContinue_D9D1: + lda $0590 ; CPU:D9D1 PRG:19D1 AD 90 05 + beq DispatchVariantObjectUpdate_JoinBranchPaths_D9B8 ; CPU:D9D4 PRG:19D4 F0 E2 + lda Zp84 ; CPU:D9D6 PRG:19D6 A5 84 + adc #$08 ; CPU:D9D8 PRG:19D8 69 08 + cmp #$F0 ; CPU:D9DA PRG:19DA C9 F0 + bcc DispatchVariantObjectUpdate_JoinBranchPaths_D9B8 ; CPU:D9DC PRG:19DC 90 DA + lda #$00 ; CPU:D9DE PRG:19DE A9 00 + beq DispatchVariantObjectUpdate_OnEqualF0_D9E6 ; CPU:D9E0 PRG:19E0 F0 04 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnCarrySet_D9E2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnCarrySet_D9E2: + lda #$00 ; CPU:D9E2 PRG:19E2 A9 00 + sta Zp80 ; CPU:D9E4 PRG:19E4 85 80 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnEqualF0_D9E6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnEqualF0_D9E6: + sta ZpB8 ; CPU:D9E6 PRG:19E6 85 B8 + lda ZpDF ; CPU:D9E8 PRG:19E8 A5 DF + bne DispatchVariantObjectUpdate_JoinBranchPaths_D9B8 ; CPU:D9EA PRG:19EA D0 CC + lda Zp0F ; CPU:D9EC PRG:19EC A5 0F + bne DispatchVariantObjectUpdate_JoinBranchPaths_D9B8 ; CPU:D9EE PRG:19EE D0 C8 + jmp $F131 ; CPU:D9F0 PRG:19F0 4C 31 F1 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_LoadAndContinue_D9F3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_LoadAndContinue_D9F3: + lda #$B4 ; CPU:D9F3 PRG:19F3 A9 B4 + bne DispatchVariantObjectUpdate_OnNonzero_D9FD ; CPU:D9F5 PRG:19F5 D0 06 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_LoadAndContinue_D9F7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_LoadAndContinue_D9F7: + lda #$C0 ; CPU:D9F7 PRG:19F7 A9 C0 + bne DispatchVariantObjectUpdate_OnNonzero_D9FD ; CPU:D9F9 PRG:19F9 D0 02 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_LoadAndContinue_D9FB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_LoadAndContinue_D9FB: + lda #$80 ; CPU:D9FB PRG:19FB A9 80 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_D9FD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_D9FD: + clc ; CPU:D9FD PRG:19FD 18 + adc $032D ; CPU:D9FE PRG:19FE 6D 2D 03 + sta $032D ; CPU:DA01 PRG:1A01 8D 2D 03 + rts ; CPU:DA04 PRG:1A04 60 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_LoadAndContinue_DA05 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_LoadAndContinue_DA05: + lda Zp69 ; CPU:DA05 PRG:1A05 A5 69 + bne DispatchVariantObjectUpdate_OnNonzero_DA0F ; CPU:DA07 PRG:1A07 D0 06 + lda Zp68 ; CPU:DA09 PRG:1A09 A5 68 + cmp #$C0 ; CPU:DA0B PRG:1A0B C9 C0 + bcc DispatchVariantObjectUpdate_OnBelowC0_DA10 ; CPU:DA0D PRG:1A0D 90 01 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_DA0F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_DA0F: + sec ; CPU:DA0F PRG:1A0F 38 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnBelowC0_DA10 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnBelowC0_DA10: + rts ; CPU:DA10 PRG:1A10 60 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_LoadAndContinue_DA11 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_LoadAndContinue_DA11: + lda $038E ; CPU:DA11 PRG:1A11 AD 8E 03 + beq DispatchVariantObjectUpdate_OnZero_DA19 ; CPU:DA14 PRG:1A14 F0 03 + jmp $DB01 ; CPU:DA16 PRG:1A16 4C 01 DB +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnZero_DA19 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnZero_DA19: + lda ZpCD ; CPU:DA19 PRG:1A19 A5 CD + beq DispatchVariantObjectUpdate_OnZero_DA20 ; CPU:DA1B PRG:1A1B F0 03 + jmp $DB31 ; CPU:DA1D PRG:1A1D 4C 31 DB +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnZero_DA20 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnZero_DA20: + lda ZpDF ; CPU:DA20 PRG:1A20 A5 DF + bne DispatchVariantObjectUpdate_OnNonzero_DA71 ; CPU:DA22 PRG:1A22 D0 4D + lda Zp0D ; CPU:DA24 PRG:1A24 A5 0D + and #$C0 ; CPU:DA26 PRG:1A26 29 C0 + bne DispatchVariantObjectUpdate_OnNonzero_DA2D ; CPU:DA28 PRG:1A28 D0 03 + jmp $DAFD ; CPU:DA2A PRG:1A2A 4C FD DA +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_DA2D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_DA2D: + lda #$01 ; CPU:DA2D PRG:1A2D A9 01 + sta $0313 ; CPU:DA2F PRG:1A2F 8D 13 03 + sta $031F ; CPU:DA32 PRG:1A32 8D 1F 03 + lda #$02 ; CPU:DA35 PRG:1A35 A9 02 + jsr $CD2D ; CPU:DA37 PRG:1A37 20 2D CD + beq DispatchVariantObjectUpdate_OnZero_DA3E ; CPU:DA3A PRG:1A3A F0 02 + lda #$03 ; CPU:DA3C PRG:1A3C A9 03 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnZero_DA3E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnZero_DA3E: + jsr $F80D ; CPU:DA3E PRG:1A3E 20 0D F8 + lda Zp64 ; CPU:DA41 PRG:1A41 A5 64 + asl a ; CPU:DA43 PRG:1A43 0A + tay ; CPU:DA44 PRG:1A44 A8 + lda $DBAA,y ; CPU:DA45 PRG:1A45 B9 AA DB + sta $03A2 ; CPU:DA48 PRG:1A48 8D A2 03 + lda $DBAB,y ; CPU:DA4B PRG:1A4B B9 AB DB + sta $03A0 ; CPU:DA4E PRG:1A4E 8D A0 03 + lda Zp73 ; CPU:DA51 PRG:1A51 A5 73 + sta $03A3 ; CPU:DA53 PRG:1A53 8D A3 03 + jsr $CD28 ; CPU:DA56 PRG:1A56 20 28 CD + bne DispatchVariantObjectUpdate_OnNonzero_DA60 ; CPU:DA59 PRG:1A59 D0 05 + lda Zp83 ; CPU:DA5B PRG:1A5B A5 83 + sta $03A7 ; CPU:DA5D PRG:1A5D 8D A7 03 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_DA60 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_DA60: + lda #$00 ; CPU:DA60 PRG:1A60 A9 00 + sta $03A1 ; CPU:DA62 PRG:1A62 8D A1 03 + inc ZpCB ; CPU:DA65 PRG:1A65 E6 CB + lda Zp0C ; CPU:DA67 PRG:1A67 A5 0C + and #$03 ; CPU:DA69 PRG:1A69 29 03 + sta ZpDE ; CPU:DA6B PRG:1A6B 85 DE + inc ZpDF ; CPU:DA6D PRG:1A6D E6 DF + bne DispatchVariantObjectUpdate_OnNonzero_DA76 ; CPU:DA6F PRG:1A6F D0 05 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_DA71 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_DA71: + lda #$00 ; CPU:DA71 PRG:1A71 A9 00 + sta $031F ; CPU:DA73 PRG:1A73 8D 1F 03 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_DA76 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_DA76: + lda $03A1 ; CPU:DA76 PRG:1A76 AD A1 03 + sec ; CPU:DA79 PRG:1A79 38 + sbc $03A0 ; CPU:DA7A PRG:1A7A ED A0 03 + sta $03A1 ; CPU:DA7D PRG:1A7D 8D A1 03 + lda $03A2 ; CPU:DA80 PRG:1A80 AD A2 03 + sbc #$00 ; CPU:DA83 PRG:1A83 E9 00 + sta $03A2 ; CPU:DA85 PRG:1A85 8D A2 03 + bpl DispatchVariantObjectUpdate_JoinBranchPaths_DAB3 ; CPU:DA88 PRG:1A88 10 29 + lda #$00 ; CPU:DA8A PRG:1A8A A9 00 + sta ZpCB ; CPU:DA8C PRG:1A8C 85 CB + sta ZpBE ; CPU:DA8E PRG:1A8E 85 BE + lda Zp73 ; CPU:DA90 PRG:1A90 A5 73 + ldy CurrentGameVariant ; CPU:DA92 PRG:1A92 A4 63 + cpy #$03 ; CPU:DA94 PRG:1A94 C0 03 + beq DispatchVariantObjectUpdate_OnEqual03_DA9C ; CPU:DA96 PRG:1A96 F0 04 + cpy #$04 ; CPU:DA98 PRG:1A98 C0 04 + bne DispatchVariantObjectUpdate_JoinBranchPaths_DAAE ; CPU:DA9A PRG:1A9A D0 12 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnEqual03_DA9C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnEqual03_DA9C: + ldy ZpB8 ; CPU:DA9C PRG:1A9C A4 B8 + bne DispatchVariantObjectUpdate_JoinBranchPaths_DAAE ; CPU:DA9E PRG:1A9E D0 0E + cmp #$C0 ; CPU:DAA0 PRG:1AA0 C9 C0 + bcc DispatchVariantObjectUpdate_JoinBranchPaths_DAB3 ; CPU:DAA2 PRG:1AA2 90 0F + ldy #$02 ; CPU:DAA4 PRG:1AA4 A0 02 + sty Zp0F ; CPU:DAA6 PRG:1AA6 84 0F + jsr $CA3B ; CPU:DAA8 PRG:1AA8 20 3B CA + jmp $DC95 ; CPU:DAAB PRG:1AAB 4C 95 DC +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_JoinBranchPaths_DAAE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_JoinBranchPaths_DAAE: + cmp $03A3 ; CPU:DAAE PRG:1AAE CD A3 03 + bcs DispatchVariantObjectUpdate_OnCarrySet_DAE4 ; CPU:DAB1 PRG:1AB1 B0 31 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_JoinBranchPaths_DAB3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_JoinBranchPaths_DAB3: + lda Zp73 ; CPU:DAB3 PRG:1AB3 A5 73 + sec ; CPU:DAB5 PRG:1AB5 38 + sbc $03A2 ; CPU:DAB6 PRG:1AB6 ED A2 03 + sta Zp73 ; CPU:DAB9 PRG:1AB9 85 73 + jsr $CD28 ; CPU:DABB PRG:1ABB 20 28 CD + bne DispatchVariantObjectUpdate_OnNonzero_DAD2 ; CPU:DABE PRG:1ABE D0 12 + lda #$00 ; CPU:DAC0 PRG:1AC0 A9 00 + sta Zp76 ; CPU:DAC2 PRG:1AC2 85 76 + lda Zp83 ; CPU:DAC4 PRG:1AC4 A5 83 + sec ; CPU:DAC6 PRG:1AC6 38 + sbc $03A2 ; CPU:DAC7 PRG:1AC7 ED A2 03 + sta Zp83 ; CPU:DACA PRG:1ACA 85 83 + lda #$1C ; CPU:DACC PRG:1ACC A9 1C + sta Zp86 ; CPU:DACE PRG:1ACE 85 86 + bne DispatchVariantObjectUpdate_OnNonzero_DAFF ; CPU:DAD0 PRG:1AD0 D0 2D +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_DAD2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_DAD2: + lda Zp64 ; CPU:DAD2 PRG:1AD2 A5 64 + cmp #$03 ; CPU:DAD4 PRG:1AD4 C9 03 + beq DispatchVariantObjectUpdate_OnEqual03_DADF ; CPU:DAD6 PRG:1AD6 F0 07 + lda #$02 ; CPU:DAD8 PRG:1AD8 A9 02 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_StoreAndContinue_DADA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_StoreAndContinue_DADA: + sta Zp76 ; CPU:DADA PRG:1ADA 85 76 + jmp $DAFF ; CPU:DADC PRG:1ADC 4C FF DA +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnEqual03_DADF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnEqual03_DADF: + lda #$02 ; CPU:DADF PRG:1ADF A9 02 + jmp $DADA ; CPU:DAE1 PRG:1AE1 4C DA DA +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnCarrySet_DAE4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnCarrySet_DAE4: + lda $03A3 ; CPU:DAE4 PRG:1AE4 AD A3 03 + sta Zp73 ; CPU:DAE7 PRG:1AE7 85 73 + lda #$01 ; CPU:DAE9 PRG:1AE9 A9 01 + sta Zp76 ; CPU:DAEB PRG:1AEB 85 76 + jsr $CD28 ; CPU:DAED PRG:1AED 20 28 CD + bne DispatchVariantObjectUpdate_OnNonzero_DAF7 ; CPU:DAF0 PRG:1AF0 D0 05 + lda $03A7 ; CPU:DAF2 PRG:1AF2 AD A7 03 + sta Zp83 ; CPU:DAF5 PRG:1AF5 85 83 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_DAF7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_DAF7: + ldy #$00 ; CPU:DAF7 PRG:1AF7 A0 00 + sty ZpDE ; CPU:DAF9 PRG:1AF9 84 DE + sty ZpDF ; CPU:DAFB PRG:1AFB 84 DF +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_Return_DAFD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_Return_DAFD: + clc ; CPU:DAFD PRG:1AFD 18 + rts ; CPU:DAFE PRG:1AFE 60 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_DAFF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_DAFF: + sec ; CPU:DAFF PRG:1AFF 38 + rts ; CPU:DB00 PRG:1B00 60 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_IncrementAndContinue_DB01 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_IncrementAndContinue_DB01: + inc $0320 ; CPU:DB01 PRG:1B01 EE 20 03 + lda #$01 ; CPU:DB04 PRG:1B04 A9 01 + jsr $F80D ; CPU:DB06 PRG:1B06 20 0D F8 + ldy #$00 ; CPU:DB09 PRG:1B09 A0 00 + lda Zp64 ; CPU:DB0B PRG:1B0B A5 64 + cmp #$03 ; CPU:DB0D PRG:1B0D C9 03 + beq DispatchVariantObjectUpdate_OnEqual03_DB13 ; CPU:DB0F PRG:1B0F F0 02 + ldy #$02 ; CPU:DB11 PRG:1B11 A0 02 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnEqual03_DB13 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnEqual03_DB13: + lda $DBB2,y ; CPU:DB13 PRG:1B13 B9 B2 DB + sta $03A6 ; CPU:DB16 PRG:1B16 8D A6 03 + lda $DBB3,y ; CPU:DB19 PRG:1B19 B9 B3 DB + sta $03A4 ; CPU:DB1C PRG:1B1C 8D A4 03 + lda Zp73 ; CPU:DB1F PRG:1B1F A5 73 + sta $03A7 ; CPU:DB21 PRG:1B21 8D A7 03 + ldy #$00 ; CPU:DB24 PRG:1B24 A0 00 + sty $03A5 ; CPU:DB26 PRG:1B26 8C A5 03 + iny ; CPU:DB29 PRG:1B29 C8 + sty $0388 ; CPU:DB2A PRG:1B2A 8C 88 03 + inc ZpCD ; CPU:DB2D PRG:1B2D E6 CD + bne DispatchVariantObjectUpdate_OnNonzero_DB36 ; CPU:DB2F PRG:1B2F D0 05 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_LoadAndContinue_DB31 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_LoadAndContinue_DB31: + lda #$00 ; CPU:DB31 PRG:1B31 A9 00 + sta $0320 ; CPU:DB33 PRG:1B33 8D 20 03 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_DB36 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_DB36: + lda #$00 ; CPU:DB36 PRG:1B36 A9 00 + sta $038E ; CPU:DB38 PRG:1B38 8D 8E 03 + jsr $DB97 ; CPU:DB3B PRG:1B3B 20 97 DB + bpl DispatchVariantObjectUpdate_JoinBranchPaths_DB5B ; CPU:DB3E PRG:1B3E 10 1B + lda #$00 ; CPU:DB40 PRG:1B40 A9 00 + sta $0388 ; CPU:DB42 PRG:1B42 8D 88 03 + lda CurrentGameVariant ; CPU:DB45 PRG:1B45 A5 63 + cmp #$05 ; CPU:DB47 PRG:1B47 C9 05 + beq DispatchVariantObjectUpdate_JoinBranchPaths_DB5B ; CPU:DB49 PRG:1B49 F0 10 + lda Zp73 ; CPU:DB4B PRG:1B4B A5 73 + cmp $03A7 ; CPU:DB4D PRG:1B4D CD A7 03 + bcc DispatchVariantObjectUpdate_OnCarryClear_DB56 ; CPU:DB50 PRG:1B50 90 04 + ldy #$01 ; CPU:DB52 PRG:1B52 A0 01 + sty Zp76 ; CPU:DB54 PRG:1B54 84 76 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnCarryClear_DB56 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnCarryClear_DB56: + cmp $03A3 ; CPU:DB56 PRG:1B56 CD A3 03 + bcs DispatchVariantObjectUpdate_OnCarrySet_DB82 ; CPU:DB59 PRG:1B59 B0 27 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_JoinBranchPaths_DB5B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_JoinBranchPaths_DB5B: + lda Zp73 ; CPU:DB5B PRG:1B5B A5 73 + sec ; CPU:DB5D PRG:1B5D 38 + sbc $03A6 ; CPU:DB5E PRG:1B5E ED A6 03 + sta Zp73 ; CPU:DB61 PRG:1B61 85 73 + ldy CurrentGameVariant ; CPU:DB63 PRG:1B63 A4 63 + cpy #$05 ; CPU:DB65 PRG:1B65 C0 05 + beq DispatchVariantObjectUpdate_OnEqual05_DB74 ; CPU:DB67 PRG:1B67 F0 0B + lda $0388 ; CPU:DB69 PRG:1B69 AD 88 03 + beq DispatchVariantObjectUpdate_JoinBranchPaths_DB80 ; CPU:DB6C PRG:1B6C F0 12 + lda #$02 ; CPU:DB6E PRG:1B6E A9 02 + sta Zp76 ; CPU:DB70 PRG:1B70 85 76 + beq DispatchVariantObjectUpdate_JoinBranchPaths_DB80 ; CPU:DB72 PRG:1B72 F0 0C +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnEqual05_DB74 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnEqual05_DB74: + lda #$02 ; CPU:DB74 PRG:1B74 A9 02 + ldy Zp73 ; CPU:DB76 PRG:1B76 A4 73 + cpy #$70 ; CPU:DB78 PRG:1B78 C0 70 + bcc DispatchVariantObjectUpdate_OnBelow70_DB7E ; CPU:DB7A PRG:1B7A 90 02 + adc #$01 ; CPU:DB7C PRG:1B7C 69 01 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnBelow70_DB7E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnBelow70_DB7E: + sta Zp76 ; CPU:DB7E PRG:1B7E 85 76 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_JoinBranchPaths_DB80 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_JoinBranchPaths_DB80: + sec ; CPU:DB80 PRG:1B80 38 + rts ; CPU:DB81 PRG:1B81 60 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnCarrySet_DB82 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnCarrySet_DB82: + lda $03A3 ; CPU:DB82 PRG:1B82 AD A3 03 + sta Zp73 ; CPU:DB85 PRG:1B85 85 73 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_LoadAndContinue_DB87 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_LoadAndContinue_DB87: + lda #$00 ; CPU:DB87 PRG:1B87 A9 00 + sta ZpDF ; CPU:DB89 PRG:1B89 85 DF + sta ZpDE ; CPU:DB8B PRG:1B8B 85 DE + sta ZpCD ; CPU:DB8D PRG:1B8D 85 CD + sta $0386 ; CPU:DB8F PRG:1B8F 8D 86 03 + sta $0323 ; CPU:DB92 PRG:1B92 8D 23 03 + clc ; CPU:DB95 PRG:1B95 18 + rts ; CPU:DB96 PRG:1B96 60 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_LoadAndContinue_DB97 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_LoadAndContinue_DB97: + lda $03A5 ; CPU:DB97 PRG:1B97 AD A5 03 + sec ; CPU:DB9A PRG:1B9A 38 + sbc $03A4 ; CPU:DB9B PRG:1B9B ED A4 03 + sta $03A5 ; CPU:DB9E PRG:1B9E 8D A5 03 + lda $03A6 ; CPU:DBA1 PRG:1BA1 AD A6 03 + sbc #$00 ; CPU:DBA4 PRG:1BA4 E9 00 + sta $03A6 ; CPU:DBA6 PRG:1BA6 8D A6 03 + rts ; CPU:DBA9 PRG:1BA9 60 + +ObjectMovementParameterPairs: + .byte $04, $1A, $04, $1A, $04, $1C, $04, $1C, $03, $25, $06, $25 ; CPU:$DBAA PRG:1BAA 04 1A 04 1A 04 1C 04 1C 03 25 06 25 + +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_LoadIndexAndContinue_DBB6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_LoadIndexAndContinue_DBB6: + ldx ZpCA ; CPU:DBB6 PRG:1BB6 A6 CA + ldy Zp64 ; CPU:DBB8 PRG:1BB8 A4 64 + cpy #$03 ; CPU:DBBA PRG:1BBA C0 03 + beq DispatchVariantObjectUpdate_OnEqual03_DBCE ; CPU:DBBC PRG:1BBC F0 10 + txa ; CPU:DBBE PRG:1BBE 8A + and #$03 ; CPU:DBBF PRG:1BBF 29 03 + beq DispatchVariantObjectUpdate_OnZero_DC38 ; CPU:DBC1 PRG:1BC1 F0 75 + lda $0313 ; CPU:DBC3 PRG:1BC3 AD 13 03 + bne DispatchVariantObjectUpdate_OnNonzero_DBDA ; CPU:DBC6 PRG:1BC6 D0 12 + lda $DC52,x ; CPU:DBC8 PRG:1BC8 BD 52 DC + jmp $DBD1 ; CPU:DBCB PRG:1BCB 4C D1 DB +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnEqual03_DBCE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnEqual03_DBCE: + lda $DC55,x ; CPU:DBCE PRG:1BCE BD 55 DC +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_StoreAndContinue_DBD1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_StoreAndContinue_DBD1: + clc ; CPU:DBD1 PRG:1BD1 18 + adc $0336 ; CPU:DBD2 PRG:1BD2 6D 36 03 + sta $0336 ; CPU:DBD5 PRG:1BD5 8D 36 03 + bcc DispatchVariantObjectUpdate_OnCarryClear_DC2C ; CPU:DBD8 PRG:1BD8 90 52 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_DBDA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_DBDA: + lda #$00 ; CPU:DBDA PRG:1BDA A9 00 + sta $0313 ; CPU:DBDC PRG:1BDC 8D 13 03 + cpy #$03 ; CPU:DBDF PRG:1BDF C0 03 + beq DispatchVariantObjectUpdate_OnEqual03_DBE7 ; CPU:DBE1 PRG:1BE1 F0 04 + cpx #$02 ; CPU:DBE3 PRG:1BE3 E0 02 + beq DispatchVariantObjectUpdate_OnEqual02_DC2D ; CPU:DBE5 PRG:1BE5 F0 46 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnEqual03_DBE7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnEqual03_DBE7: + inc $038B ; CPU:DBE7 PRG:1BE7 EE 8B 03 + lda $038B ; CPU:DBEA PRG:1BEA AD 8B 03 + and #$03 ; CPU:DBED PRG:1BED 29 03 + eor #$03 ; CPU:DBEF PRG:1BEF 49 03 + bne DispatchVariantObjectUpdate_OnNonzero_DBF6 ; CPU:DBF1 PRG:1BF1 D0 03 + sta $038B ; CPU:DBF3 PRG:1BF3 8D 8B 03 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNonzero_DBF6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNonzero_DBF6: + tax ; CPU:DBF6 PRG:1BF6 AA +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnNotEqual00_DBF7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnNotEqual00_DBF7: + cpy #$01 ; CPU:DBF7 PRG:1BF7 C0 01 + beq DispatchVariantObjectUpdate_JoinBranchPaths_DC27 ; CPU:DBF9 PRG:1BF9 F0 2C + cpy #$02 ; CPU:DBFB PRG:1BFB C0 02 + beq DispatchVariantObjectUpdate_JoinBranchPaths_DC27 ; CPU:DBFD PRG:1BFD F0 28 + cpy #$04 ; CPU:DBFF PRG:1BFF C0 04 + beq DispatchVariantObjectUpdate_JoinBranchPaths_DC27 ; CPU:DC01 PRG:1C01 F0 24 + lda ZpDF ; CPU:DC03 PRG:1C03 A5 DF + ora Zp0F ; CPU:DC05 PRG:1C05 05 0F + bne DispatchVariantObjectUpdate_JoinBranchPaths_DC17 ; CPU:DC07 PRG:1C07 D0 0E + lda Zp00 ; CPU:DC09 PRG:1C09 A5 00 + cmp #$08 ; CPU:DC0B PRG:1C0B C9 08 + beq DispatchVariantObjectUpdate_JoinBranchPaths_DC17 ; CPU:DC0D PRG:1C0D F0 08 + lda Zp76 ; CPU:DC0F PRG:1C0F A5 76 + eor #$01 ; CPU:DC11 PRG:1C11 49 01 + and #$01 ; CPU:DC13 PRG:1C13 29 01 + sta Zp76 ; CPU:DC15 PRG:1C15 85 76 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_JoinBranchPaths_DC17 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_JoinBranchPaths_DC17: + cpy #$03 ; CPU:DC17 PRG:1C17 C0 03 + beq DispatchVariantObjectUpdate_OnEqual03_DC21 ; CPU:DC19 PRG:1C19 F0 06 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnEqual00_DC1B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnEqual00_DC1B: + lda $DC49,x ; CPU:DC1B PRG:1C1B BD 49 DC + sta Zp86 ; CPU:DC1E PRG:1C1E 85 86 + rts ; CPU:DC20 PRG:1C20 60 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnEqual03_DC21 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnEqual03_DC21: + lda $DC4C,x ; CPU:DC21 PRG:1C21 BD 4C DC + sta Zp86 ; CPU:DC24 PRG:1C24 85 86 + rts ; CPU:DC26 PRG:1C26 60 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_JoinBranchPaths_DC27 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_JoinBranchPaths_DC27: + lda $DC4F,x ; CPU:DC27 PRG:1C27 BD 4F DC + sta Zp76 ; CPU:DC2A PRG:1C2A 85 76 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnCarryClear_DC2C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnCarryClear_DC2C: + rts ; CPU:DC2C PRG:1C2C 60 +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnEqual02_DC2D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnEqual02_DC2D: + inc $038C ; CPU:DC2D PRG:1C2D EE 8C 03 + lda $038C ; CPU:DC30 PRG:1C30 AD 8C 03 + and #$01 ; CPU:DC33 PRG:1C33 29 01 + jmp $DBF6 ; CPU:DC35 PRG:1C35 4C F6 DB +; ----------------------------------------------------------------------------- +; Routine: DispatchVariantObjectUpdate_OnZero_DC38 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchVariantObjectUpdate_OnZero_DC38: + ldx #$01 ; CPU:DC38 PRG:1C38 A2 01 + stx $0313 ; CPU:DC3A PRG:1C3A 8E 13 03 + ldx #$00 ; CPU:DC3D PRG:1C3D A2 00 + ldy Zp64 ; CPU:DC3F PRG:1C3F A4 64 + cpy #$00 ; CPU:DC41 PRG:1C41 C0 00 + bne DispatchVariantObjectUpdate_OnNotEqual00_DBF7 ; CPU:DC43 PRG:1C43 D0 B2 + stx Zp76 ; CPU:DC45 PRG:1C45 86 76 + beq DispatchVariantObjectUpdate_OnEqual00_DC1B ; CPU:DC47 PRG:1C47 F0 D2 + +ObjectStateLookupTables: + .byte $1A, $1B, $1C, $10, $11, $12, $03, $04, $05, $00, $20, $10, $20, $30, $10 ; CPU:$DC49 PRG:1C49 1A 1B 1C 10 11 12 03 04 05 00 20 10 20 30 10 + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_DC58 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_DC58: + ldx Zp0F ; CPU:DC58 PRG:1C58 A6 0F + dex ; CPU:DC5A PRG:1C5A CA + beq ObjectStateLookupTables_OnZero_DC9B ; CPU:DC5B PRG:1C5B F0 3E + dex ; CPU:DC5D PRG:1C5D CA + beq ObjectStateLookupTables_OnZero_DC6C ; CPU:DC5E PRG:1C5E F0 0C + dex ; CPU:DC60 PRG:1C60 CA + beq ObjectStateLookupTables_OnZero_DC65 ; CPU:DC61 PRG:1C61 F0 02 + bne ObjectStateLookupTables_OnNonzero_DCB3 ; CPU:DC63 PRG:1C63 D0 4E +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_DC65 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_DC65: + jsr $CA25 ; CPU:DC65 PRG:1C65 20 25 CA + bcc ObjectStateLookupTables_JoinBranchPaths_DCC0 ; CPU:DC68 PRG:1C68 90 56 + bcs ObjectStateLookupTables_OnCarrySet_DCC6 ; CPU:DC6A PRG:1C6A B0 5A +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_DC6C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_DC6C: + ldx Zp64 ; CPU:DC6C PRG:1C6C A6 64 + cpx #$03 ; CPU:DC6E PRG:1C6E E0 03 + beq ObjectStateLookupTables_JoinBranchPaths_DC8A ; CPU:DC70 PRG:1C70 F0 18 + cpx #$01 ; CPU:DC72 PRG:1C72 E0 01 + bne ObjectStateLookupTables_JoinBranchPaths_DC8A ; CPU:DC74 PRG:1C74 D0 14 + lda $0314 ; CPU:DC76 PRG:1C76 AD 14 03 + beq ObjectStateLookupTables_JoinBranchPaths_DC8A ; CPU:DC79 PRG:1C79 F0 0F + jsr $CA25 ; CPU:DC7B PRG:1C7B 20 25 CA + bcc ObjectStateLookupTables_JoinBranchPaths_DCC0 ; CPU:DC7E PRG:1C7E 90 40 + lda #$08 ; CPU:DC80 PRG:1C80 A9 08 + jsr $F80D ; CPU:DC82 PRG:1C82 20 0D F8 + lda #$00 ; CPU:DC85 PRG:1C85 A9 00 + sta $0314 ; CPU:DC87 PRG:1C87 8D 14 03 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_DC8A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_DC8A: + lda Zp73 ; CPU:DC8A PRG:1C8A A5 73 + clc ; CPU:DC8C PRG:1C8C 18 + adc #$02 ; CPU:DC8D PRG:1C8D 69 02 + sta Zp73 ; CPU:DC8F PRG:1C8F 85 73 + cmp #$C0 ; CPU:DC91 PRG:1C91 C9 C0 + bcc ObjectStateLookupTables_JoinBranchPaths_DCC0 ; CPU:DC93 PRG:1C93 90 2B +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_DC95 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_DC95: + lda #$09 ; CPU:DC95 PRG:1C95 A9 09 + sta Zp76 ; CPU:DC97 PRG:1C97 85 76 + bne ObjectStateLookupTables_JoinBranchPaths_DCDF ; CPU:DC99 PRG:1C99 D0 44 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_DC9B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_DC9B: + jsr $CA3B ; CPU:DC9B PRG:1C9B 20 3B CA + inc $0314 ; CPU:DC9E PRG:1C9E EE 14 03 + lda Zp64 ; CPU:DCA1 PRG:1CA1 A5 64 + cmp #$03 ; CPU:DCA3 PRG:1CA3 C9 03 + bne ObjectStateLookupTables_JoinBranchPaths_DCDF ; CPU:DCA5 PRG:1CA5 D0 38 + lda #$08 ; CPU:DCA7 PRG:1CA7 A9 08 + bne ObjectStateLookupTables_JoinBranchPaths_DCE6 ; CPU:DCA9 PRG:1CA9 D0 3B +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_DCAB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_DCAB: + ldx Zp0F ; CPU:DCAB PRG:1CAB A6 0F + dex ; CPU:DCAD PRG:1CAD CA + beq ObjectStateLookupTables_OnZero_DCD4 ; CPU:DCAE PRG:1CAE F0 24 + dex ; CPU:DCB0 PRG:1CB0 CA + beq ObjectStateLookupTables_OnZero_DCC1 ; CPU:DCB1 PRG:1CB1 F0 0E +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_DCB3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_DCB3: + jsr $CA31 ; CPU:DCB3 PRG:1CB3 20 31 CA + bcc ObjectStateLookupTables_JoinBranchPaths_DCC0 ; CPU:DCB6 PRG:1CB6 90 08 + lda #$00 ; CPU:DCB8 PRG:1CB8 A9 00 + sta Zp0F ; CPU:DCBA PRG:1CBA 85 0F + lda #$01 ; CPU:DCBC PRG:1CBC A9 01 + sta Zp0A ; CPU:DCBE PRG:1CBE 85 0A +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_DCC0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_DCC0: + rts ; CPU:DCC0 PRG:1CC0 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_DCC1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_DCC1: + jsr $CA25 ; CPU:DCC1 PRG:1CC1 20 25 CA + bcc ObjectStateLookupTables_JoinBranchPaths_DCC0 ; CPU:DCC4 PRG:1CC4 90 FA +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_DCC6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_DCC6: + lda #$0B ; CPU:DCC6 PRG:1CC6 A9 0B + jsr $F80D ; CPU:DCC8 PRG:1CC8 20 0D F8 + lda #$4C ; CPU:DCCB PRG:1CCB A9 4C + jsr $F80D ; CPU:DCCD PRG:1CCD 20 0D F8 + lda #$8D ; CPU:DCD0 PRG:1CD0 A9 8D + bne ObjectStateLookupTables_JoinBranchPaths_DCE6 ; CPU:DCD2 PRG:1CD2 D0 12 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_DCD4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_DCD4: + lda #$1E ; CPU:DCD4 PRG:1CD4 A9 1E + sta Zp76 ; CPU:DCD6 PRG:1CD6 85 76 + lda #$1D ; CPU:DCD8 PRG:1CD8 A9 1D + sta Zp86 ; CPU:DCDA PRG:1CDA 85 86 + jsr $CA3B ; CPU:DCDC PRG:1CDC 20 3B CA +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_DCDF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_DCDF: + lda #$09 ; CPU:DCDF PRG:1CDF A9 09 + jsr $F80D ; CPU:DCE1 PRG:1CE1 20 0D F8 + lda #$CA ; CPU:DCE4 PRG:1CE4 A9 CA +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_DCE6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_DCE6: + jsr $F80D ; CPU:DCE6 PRG:1CE6 20 0D F8 + inc Zp0F ; CPU:DCE9 PRG:1CE9 E6 0F + lda #$02 ; CPU:DCEB PRG:1CEB A9 02 + sta ZpCC ; CPU:DCED PRG:1CED 85 CC + rts ; CPU:DCEF PRG:1CEF 60 + +MetaspriteAndObjectFrameData: + .byte $00, $50, $02, $00, $00, $66, $08, $00, $76, $10, $08, $51, $00, $08, $67, $08 ; CPU:$DCF0 PRG:1CF0 00 50 02 00 00 66 08 00 76 10 08 51 00 08 67 08 + .byte $08, $77, $10, $00, $07, $02, $00, $00, $6C, $08, $00, $7C, $10, $08, $09, $00 ; CPU:$DD00 PRG:1D00 08 77 10 00 07 02 00 00 6C 08 00 7C 10 08 09 00 + .byte $08, $6D, $08, $08, $7D, $10, $00, $5E, $02, $00, $00, $6E, $08, $00, $7E, $10 ; CPU:$DD10 PRG:1D10 08 6D 08 08 7D 10 00 5E 02 00 00 6E 08 00 7E 10 + .byte $08, $5F, $00, $08, $6F, $08, $08, $7F, $10, $00, $50, $02, $00, $00, $60, $08 ; CPU:$DD20 PRG:1D20 08 5F 00 08 6F 08 08 7F 10 00 50 02 00 00 60 08 + .byte $00, $70, $10, $08, $51, $00, $08, $61, $08, $08, $71, $10, $00, $50, $02, $00 ; CPU:$DD30 PRG:1D30 00 70 10 08 51 00 08 61 08 08 71 10 00 50 02 00 + .byte $00, $62, $08, $00, $72, $10, $08, $51, $00, $08, $63, $08, $08, $73, $10, $00 ; CPU:$DD40 PRG:1D40 00 62 08 00 72 10 08 51 00 08 63 08 08 73 10 00 + .byte $50, $02, $00, $00, $64, $08, $00, $74, $10, $08, $51, $00, $08, $65, $08, $08 ; CPU:$DD50 PRG:1D50 50 02 00 00 64 08 00 74 10 08 51 00 08 65 08 08 + .byte $75, $10, $00, $0E, $02, $00, $00, $1E, $08, $00, $2E, $10, $08, $0F, $00, $08 ; CPU:$DD60 PRG:1D60 75 10 00 0E 02 00 00 1E 08 00 2E 10 08 0F 00 08 + .byte $1F, $08, $08, $2F, $10, $00, $3C, $02, $00, $00, $4C, $08, $00, $5C, $10, $08 ; CPU:$DD70 PRG:1D70 1F 08 08 2F 10 00 3C 02 00 00 4C 08 00 5C 10 08 + .byte $3D, $00, $08, $4D, $08, $08, $5D, $10, $00, $0E, $02, $00, $00, $3E, $08, $00 ; CPU:$DD80 PRG:1D80 3D 00 08 4D 08 08 5D 10 00 0E 02 00 00 3E 08 00 + .byte $4E, $10, $08, $0F, $00, $08, $3F, $08, $08, $4F, $10, $00, $58, $02, $00, $00 ; CPU:$DD90 PRG:1D90 4E 10 08 0F 00 08 3F 08 08 4F 10 00 58 02 00 00 + .byte $68, $08, $00, $78, $10, $08, $59, $00, $08, $69, $08, $08, $79, $10, $08, $02 ; CPU:$DDA0 PRG:1DA0 68 08 00 78 10 08 59 00 08 69 08 08 79 10 08 02 + .byte $00, $17, $FF, $03, $00, $08, $0D, $00, $E8, $04, $08, $03, $F0, $02, $18, $03 ; CPU:$DDB0 PRG:1DB0 00 17 FF 03 00 08 0D 00 E8 04 08 03 F0 02 18 03 + .byte $F8, $00, $17, $03, $08, $00, $17, $03, $10, $02, $18, $83, $28, $04, $08, $83 ; CPU:$DDC0 PRG:1DC0 F8 00 17 03 08 00 17 03 10 02 18 83 28 04 08 83 + .byte $30, $00, $17, $83, $18, $00, $17, $83, $20, $08, $02, $00, $19, $FF, $03, $00 ; CPU:$DDD0 PRG:1DD0 30 00 17 83 18 00 17 83 20 08 02 00 19 FF 03 00 + .byte $08, $0D, $00, $E8, $04, $0A, $03, $F0, $02, $1A, $03, $F8, $00, $19, $03, $08 ; CPU:$DDE0 PRG:1DE0 08 0D 00 E8 04 0A 03 F0 02 1A 03 F8 00 19 03 08 + .byte $00, $19, $03, $10, $02, $1A, $83, $28, $04, $0A, $83, $30, $00, $19, $83, $18 ; CPU:$DDF0 PRG:1DF0 00 19 03 10 02 1A 83 28 04 0A 83 30 00 19 83 18 + .byte $00, $19, $83, $20, $07, $02, $00, $08, $FF, $43, $00, $02, $18, $43, $08, $04 ; CPU:$DE00 PRG:1E00 00 19 83 20 07 02 00 08 FF 43 00 02 18 43 08 04 + .byte $17, $43, $10, $04, $17, $43, $18, $04, $17, $43, $20, $02, $18, $C3, $38, $00 ; CPU:$DE10 PRG:1E10 17 43 10 04 17 43 18 04 17 43 20 02 18 C3 38 00 + .byte $08, $C3, $40, $04, $17, $C3, $28, $04, $17, $C3, $30, $07, $02, $00, $0A, $FF ; CPU:$DE20 PRG:1E20 08 C3 40 04 17 C3 28 04 17 C3 30 07 02 00 0A FF + .byte $43, $00, $02, $1A, $43, $08, $04, $19, $43, $10, $04, $19, $43, $18, $04, $19 ; CPU:$DE30 PRG:1E30 43 00 02 1A 43 08 04 19 43 10 04 19 43 18 04 19 + .byte $43, $20, $02, $1A, $C3, $38, $00, $0A, $C3, $40, $04, $19, $C3, $28, $04, $19 ; CPU:$DE40 PRG:1E40 43 20 02 1A C3 38 00 0A C3 40 04 19 C3 28 04 19 + .byte $C3, $30, $00, $CA, $01, $00, $00, $DA, $08, $00, $00, $10, $08, $CB, $00, $08 ; CPU:$DE50 PRG:1E50 C3 30 00 CA 01 00 00 DA 08 00 00 10 08 CB 00 08 + .byte $DB, $08, $08, $EB, $10, $10, $CC, $00, $10, $DC, $08, $10, $EC, $10, $18, $00 ; CPU:$DE60 PRG:1E60 DB 08 08 EB 10 10 CC 00 10 DC 08 10 EC 10 18 00 + .byte $F8, $18, $DD, $00, $18, $ED, $08, $18, $FD, $10, $20, $BD, $F8, $20, $CD, $00 ; CPU:$DE70 PRG:1E70 F8 18 DD 00 18 ED 08 18 FD 10 20 BD F8 20 CD 00 + .byte $20, $DE, $08, $20, $EE, $10, $28, $BE, $F8, $28, $CE, $00, $00, $D5, $01, $00 ; CPU:$DE80 PRG:1E80 20 DE 08 20 EE 10 28 BE F8 28 CE 00 00 D5 01 00 + .byte $00, $E5, $08, $00, $F5, $10, $08, $D6, $00, $08, $E6, $08, $08, $F6, $10, $10 ; CPU:$DE90 PRG:1E90 00 E5 08 00 F5 10 08 D6 00 08 E6 08 08 F6 10 10 + .byte $D7, $00, $10, $E7, $08, $10, $F7, $10, $18, $D9, $F8, $18, $D8, $00, $18, $E8 ; CPU:$DEA0 PRG:1EA0 D7 00 10 E7 08 10 F7 10 18 D9 F8 18 D8 00 18 E8 + .byte $08, $18, $F8, $10, $20, $B8, $F8, $20, $C8, $00, $20, $E9, $08, $20, $F9, $10 ; CPU:$DEB0 PRG:1EB0 08 18 F8 10 20 B8 F8 20 C8 00 20 E9 08 20 F9 10 + .byte $28, $B9, $F8, $28, $C9, $00, $00, $D0, $01, $00, $00, $E0, $08, $00, $00, $10 ; CPU:$DEC0 PRG:1EC0 28 B9 F8 28 C9 00 00 D0 01 00 00 E0 08 00 00 10 + .byte $08, $D1, $00, $08, $E1, $08, $08, $F1, $10, $10, $D2, $00, $10, $E2, $08, $10 ; CPU:$DED0 PRG:1ED0 08 D1 00 08 E1 08 08 F1 10 10 D2 00 10 E2 08 10 + .byte $F2, $10, $18, $C3, $F8, $18, $D3, $00, $18, $E3, $08, $18, $00, $10, $20, $C4 ; CPU:$DEE0 PRG:1EE0 F2 10 18 C3 F8 18 D3 00 18 E3 08 18 00 10 20 C4 + .byte $F8, $20, $D4, $00, $20, $E4, $08, $20, $F4, $10, $28, $C5, $F8, $28, $C6, $00 ; CPU:$DEF0 PRG:1EF0 F8 20 D4 00 20 E4 08 20 F4 10 28 C5 F8 28 C6 00 + .byte $00, $10, $01, $00, $00, $20, $08, $08, $11, $00, $08, $21, $08, $00, $10, $01 ; CPU:$DF00 PRG:1F00 00 10 01 00 00 20 08 08 11 00 08 21 08 00 10 01 + .byte $00, $00, $52, $08, $08, $11, $00, $08, $53, $08, $00, $10, $01, $00, $00, $34 ; CPU:$DF10 PRG:1F10 00 00 52 08 08 11 00 08 53 08 00 10 01 00 00 34 + .byte $08, $08, $11, $00, $08, $35, $08, $00, $10, $02, $00, $00, $20, $08, $08, $11 ; CPU:$DF20 PRG:1F20 08 08 11 00 08 35 08 00 10 02 00 00 20 08 08 11 + .byte $00, $08, $21, $08, $00, $10, $02, $00, $00, $52, $08, $08, $11, $00, $08, $53 ; CPU:$DF30 PRG:1F30 00 08 21 08 00 10 02 00 00 52 08 08 11 00 08 53 + .byte $08, $00, $10, $02, $00, $00, $34, $08, $08, $11, $00, $08, $35, $08, $00, $26 ; CPU:$DF40 PRG:1F40 08 00 10 02 00 00 34 08 08 11 00 08 35 08 00 26 + .byte $02, $00, $00, $2C, $08, $08, $1D, $00, $08, $2D, $08, $00, $30, $00, $00, $00 ; CPU:$DF50 PRG:1F50 02 00 00 2C 08 08 1D 00 08 2D 08 00 30 00 00 00 + .byte $40, $08, $08, $31, $00, $08, $41, $08, $10, $32, $00, $10, $42, $08, $18, $33 ; CPU:$DF60 PRG:1F60 40 08 08 31 00 08 41 08 10 32 00 10 42 08 18 33 + .byte $00, $18, $43, $08, $00, $38, $00, $00, $00, $48, $08, $08, $39, $00, $08, $49 ; CPU:$DF70 PRG:1F70 00 18 43 08 00 38 00 00 00 48 08 08 39 00 08 49 + .byte $08, $10, $3A, $00, $10, $4A, $08, $18, $3B, $00, $18, $4B, $08, $00, $44, $00 ; CPU:$DF80 PRG:1F80 08 10 3A 00 10 4A 08 18 3B 00 18 4B 08 00 44 00 + .byte $00, $00, $54, $08, $08, $45, $00, $08, $55, $08, $10, $46, $00, $10, $56, $08 ; CPU:$DF90 PRG:1F90 00 00 54 08 08 45 00 08 55 08 10 46 00 10 56 08 + .byte $18, $47, $00, $18, $57, $08, $00, $8C, $00, $00, $00, $9C, $08, $08, $8D, $00 ; CPU:$DFA0 PRG:1FA0 18 47 00 18 57 08 00 8C 00 00 00 9C 08 08 8D 00 + .byte $08, $9D, $08, $10, $8E, $00, $10, $9E, $08, $18, $8F, $00, $18, $9F, $08, $00 ; CPU:$DFB0 PRG:1FB0 08 9D 08 10 8E 00 10 9E 08 18 8F 00 18 9F 08 00 + .byte $04, $02, $00, $00, $14, $08, $00, $24, $10, $08, $05, $00, $08, $15, $08, $08 ; CPU:$DFC0 PRG:1FC0 04 02 00 00 14 08 00 24 10 08 05 00 08 15 08 08 + .byte $25, $10, $00, $01, $01, $00, $00, $01, $08, $00, $01, $10, $00, $01, $18, $00 ; CPU:$DFD0 PRG:1FD0 25 10 00 01 01 00 00 01 08 00 01 10 00 01 18 00 + .byte $01, $20, $00, $01, $28, $00, $01, $30, $00, $01, $38, $00, $01, $40, $08, $06 ; CPU:$DFE0 PRG:1FE0 01 20 00 01 28 00 01 30 00 01 38 00 01 40 08 06 + .byte $00, $08, $06, $08, $08, $06, $10, $08, $06, $18, $08, $06, $20, $08, $06, $28 ; CPU:$DFF0 PRG:1FF0 00 08 06 08 08 06 10 08 06 18 08 06 20 08 06 28 + .byte $08, $06, $30, $08, $06, $38, $08, $06, $40, $00, $0B, $02, $00, $00, $1B, $08 ; CPU:$E000 PRG:2000 08 06 30 08 06 38 08 06 40 00 0B 02 00 00 1B 08 + .byte $08, $0C, $00, $08, $1C, $08, $00, $85, $FF, $03, $00, $00, $86, $03, $08, $00 ; CPU:$E010 PRG:2010 08 0C 00 08 1C 08 00 85 FF 03 00 00 86 03 08 00 + .byte $85, $83, $10, $08, $88, $03, $00, $08, $87, $03, $08, $08, $88, $83, $10, $10 ; CPU:$E020 PRG:2020 85 83 10 08 88 03 00 08 87 03 08 08 88 83 10 10 + .byte $85, $43, $00, $10, $86, $43, $08, $10, $85, $C3, $10, $00, $89, $FF, $03, $00 ; CPU:$E030 PRG:2030 85 43 00 10 86 43 08 10 85 C3 10 00 89 FF 03 00 + .byte $00, $96, $C3, $08, $00, $97, $C3, $10, $08, $8A, $03, $00, $08, $95, $03, $08 ; CPU:$E040 PRG:2040 00 96 C3 08 00 97 C3 10 08 8A 03 00 08 95 03 08 + .byte $08, $8A, $C3, $10, $10, $97, $03, $00, $10, $96, $03, $08, $10, $89, $C3, $10 ; CPU:$E050 PRG:2050 08 8A C3 10 10 97 03 00 10 96 03 08 10 89 C3 10 + .byte $00, $97, $FF, $43, $00, $00, $96, $43, $08, $00, $89, $83, $10, $08, $8A, $43 ; CPU:$E060 PRG:2060 00 97 FF 43 00 00 96 43 08 00 89 83 10 08 8A 43 + .byte $00, $08, $95, $43, $08, $08, $8A, $83, $10, $10, $89, $43, $00, $10, $96, $83 ; CPU:$E070 PRG:2070 00 08 95 43 08 08 8A 83 10 10 89 43 00 10 96 83 + .byte $08, $10, $97, $83, $10, $00, $F3, $03, $00, $09, $00, $00, $C0, $03, $00, $F8 ; CPU:$E080 PRG:2080 08 10 97 83 10 00 F3 03 00 09 00 00 C0 03 00 F8 + .byte $C1, $00, $F0, $C2, $00, $F0, $F0, $08, $E8, $C0, $08, $E0, $C1, $08, $D8, $C2 ; CPU:$E090 PRG:2090 C1 00 F0 C2 00 F0 F0 08 E8 C0 08 E0 C1 08 D8 C2 + .byte $08, $D8, $F0, $10, $D0, $C0, $10, $07, $00, $00, $FB, $03, $00, $F8, $FB, $04 ; CPU:$E0A0 PRG:20A0 08 D8 F0 10 D0 C0 10 07 00 00 FB 03 00 F8 FB 04 + .byte $F0, $FB, $08, $E8, $FB, $0C, $E0, $FB, $10, $D8, $FB, $14, $D0, $FB, $18, $06 ; CPU:$E0B0 PRG:20B0 F0 FB 08 E8 FB 0C E0 FB 10 D8 FB 14 D0 FB 18 06 + .byte $00, $00, $B2, $03, $00, $F8, $B2, $06, $F0, $B2, $0C, $E8, $B2, $12, $E0, $B2 ; CPU:$E0C0 PRG:20C0 00 00 B2 03 00 F8 B2 06 F0 B2 0C E8 B2 12 E0 B2 + .byte $18, $D8, $B2, $1E, $05, $00, $00, $B4, $03, $00, $F8, $B4, $08, $F0, $B4, $10 ; CPU:$E0D0 PRG:20D0 18 D8 B2 1E 05 00 00 B4 03 00 F8 B4 08 F0 B4 10 + .byte $E8, $B4, $18, $E0, $B4, $20, $06, $00, $00, $B3, $03, $00, $FA, $B3, $08, $F4 ; CPU:$E0E0 PRG:20E0 E8 B4 18 E0 B4 20 06 00 00 B3 03 00 FA B3 08 F4 + .byte $B3, $10, $EE, $B3, $18, $E8, $B3, $20, $E2, $B3, $28, $06, $00, $00, $B7, $03 ; CPU:$E0F0 PRG:20F0 B3 10 EE B3 18 E8 B3 20 E2 B3 28 06 00 00 B7 03 + .byte $00, $FC, $B7, $08, $F8, $B7, $10, $F4, $B7, $18, $F0, $B7, $20, $EC, $B7, $28 ; CPU:$E100 PRG:2100 00 FC B7 08 F8 B7 10 F4 B7 18 F0 B7 20 EC B7 28 + .byte $09, $00, $00, $C7, $03, $00, $00, $BA, $08, $00, $BB, $10, $F8, $BC, $10, $F8 ; CPU:$E110 PRG:2110 09 00 00 C7 03 00 00 BA 08 00 BB 10 F8 BC 10 F8 + .byte $C7, $18, $F8, $BA, $20, $F8, $BB, $28, $F0, $BC, $28, $F0, $C7, $30, $07, $00 ; CPU:$E120 PRG:2120 C7 18 F8 BA 20 F8 BB 28 F0 BC 28 F0 C7 30 07 00 + .byte $00, $AC, $03, $00, $00, $8B, $08, $00, $9B, $10, $FC, $AC, $18, $FC, $8B, $20 ; CPU:$E130 PRG:2130 00 AC 03 00 00 8B 08 00 9B 10 FC AC 18 FC 8B 20 + .byte $FC, $9B, $28, $F8, $AC, $30, $07, $00, $00, $AB, $03, $00, $00, $AB, $08, $00 ; CPU:$E140 PRG:2140 FC 9B 28 F8 AC 30 07 00 00 AB 03 00 00 AB 08 00 + .byte $AB, $10, $00, $AB, $18, $00, $AB, $20, $00, $AB, $28, $00, $AB, $30, $07, $00 ; CPU:$E150 PRG:2150 AB 10 00 AB 18 00 AB 20 00 AB 28 00 AB 30 07 00 + .byte $00, $AC, $43, $00, $00, $8B, $08, $00, $9B, $10, $04, $AC, $18, $04, $8B, $20 ; CPU:$E160 PRG:2160 00 AC 43 00 00 8B 08 00 9B 10 04 AC 18 04 8B 20 + .byte $04, $9B, $28, $08, $AC, $30, $09, $00, $00, $C7, $43, $00, $00, $BA, $08, $00 ; CPU:$E170 PRG:2170 04 9B 28 08 AC 30 09 00 00 C7 43 00 00 BA 08 00 + .byte $BB, $10, $08, $BC, $10, $08, $C7, $18, $08, $BA, $20, $08, $BB, $28, $10, $BC ; CPU:$E180 PRG:2180 BB 10 08 BC 10 08 C7 18 08 BA 20 08 BB 28 10 BC + .byte $28, $10, $C7, $30, $06, $00, $00, $B7, $43, $00, $04, $B7, $08, $08, $B7, $10 ; CPU:$E190 PRG:2190 28 10 C7 30 06 00 00 B7 43 00 04 B7 08 08 B7 10 + .byte $0C, $B7, $18, $10, $B7, $20, $14, $B7, $28, $06, $00, $00, $B3, $43, $00, $06 ; CPU:$E1A0 PRG:21A0 0C B7 18 10 B7 20 14 B7 28 06 00 00 B3 43 00 06 + .byte $B3, $08, $0C, $B3, $10, $12, $B3, $18, $18, $B3, $20, $1E, $B3, $28, $05, $00 ; CPU:$E1B0 PRG:21B0 B3 08 0C B3 10 12 B3 18 18 B3 20 1E B3 28 05 00 + .byte $00, $B4, $43, $00, $08, $B4, $08, $10, $B4, $10, $18, $B4, $18, $20, $B4, $20 ; CPU:$E1C0 PRG:21C0 00 B4 43 00 08 B4 08 10 B4 10 18 B4 18 20 B4 20 + .byte $06, $00, $00, $B2, $43, $00, $08, $B2, $06, $10, $B2, $0C, $18, $B2, $12, $20 ; CPU:$E1D0 PRG:21D0 06 00 00 B2 43 00 08 B2 06 10 B2 0C 18 B2 12 20 + .byte $B2, $18, $28, $B2, $1E, $07, $00, $00, $FB, $43, $00, $08, $FB, $04, $10, $FB ; CPU:$E1E0 PRG:21E0 B2 18 28 B2 1E 07 00 00 FB 43 00 08 FB 04 10 FB + .byte $08, $18, $FB, $0C, $20, $FB, $10, $28, $FB, $14, $30, $FB, $18, $09, $00, $00 ; CPU:$E1F0 PRG:21F0 08 18 FB 0C 20 FB 10 28 FB 14 30 FB 18 09 00 00 + .byte $C0, $43, $00, $08, $C1, $00, $10, $C2, $00, $10, $F0, $08, $18, $C0, $08, $20 ; CPU:$E200 PRG:2200 C0 43 00 08 C1 00 10 C2 00 10 F0 08 18 C0 08 20 + .byte $C1, $08, $28, $C2, $08, $28, $F0, $10, $30, $C0, $10, $00, $82, $FF, $02, $00 ; CPU:$E210 PRG:2210 C1 08 28 C2 08 28 F0 10 30 C0 10 00 82 FF 02 00 + .byte $00, $92, $02, $08, $00, $A2, $02, $10, $08, $83, $02, $00, $08, $93, $02, $08 ; CPU:$E220 PRG:2220 00 92 02 08 00 A2 02 10 08 83 02 00 08 93 02 08 + .byte $08, $A3, $02, $10, $00, $80, $FF, $02, $00, $00, $90, $02, $08, $00, $A0, $02 ; CPU:$E230 PRG:2230 08 A3 02 10 00 80 FF 02 00 00 90 02 08 00 A0 02 + .byte $10, $08, $81, $02, $00, $08, $91, $02, $08, $08, $A1, $02, $10, $01, $00, $00 ; CPU:$E240 PRG:2240 10 08 81 02 00 08 91 02 08 08 A1 02 10 01 00 00 + .byte $05, $0B, $0C, $0D, $0E, $0F, $01, $01, $00, $05, $1B, $1C, $1D, $1E, $1F, $01 ; CPU:$E250 PRG:2250 05 0B 0C 0D 0E 0F 01 01 00 05 1B 1C 1D 1E 1F 01 + .byte $02, $00, $05, $1B, $1C, $1D, $1E, $1F, $01, $03, $00, $05, $2B, $2C, $2D, $2E ; CPU:$E260 PRG:2260 02 00 05 1B 1C 1D 1E 1F 01 03 00 05 2B 2C 2D 2E + .byte $2F, $00, $01, $00, $00, $04, $67, $EA, $EB, $EC, $01, $01, $00, $04, $67, $FA ; CPU:$E270 PRG:2270 2F 00 01 00 00 04 67 EA EB EC 01 01 00 04 67 FA + .byte $FB, $FC, $00, $01, $00, $00, $02, $CA, $CB, $01, $01, $00, $03, $DA, $DB, $DC ; CPU:$E280 PRG:2280 FB FC 00 01 00 00 02 CA CB 01 01 00 03 DA DB DC + .byte $00, $01, $00, $00, $02, $67, $BE, $01, $01, $00, $03, $CD, $CE, $CF, $00, $01 ; CPU:$E290 PRG:2290 00 01 00 00 02 67 BE 01 01 00 03 CD CE CF 00 01 + .byte $00, $00, $06, $D4, $D5, $D6, $D7, $D5, $D8, $01, $01, $02, $02, $D2, $E7, $01 ; CPU:$E2A0 PRG:22A0 00 00 06 D4 D5 D6 D7 D5 D8 01 01 02 02 D2 E7 01 + .byte $02, $02, $02, $D2, $E7, $00, $02, $00, $00, $02, $62, $72, $02, $00, $01, $02 ; CPU:$E2B0 PRG:22B0 02 02 02 D2 E7 00 02 00 00 02 62 72 02 00 01 02 + .byte $63, $73, $02, $00, $02, $02, $64, $74, $02, $00, $03, $02, $65, $75, $02, $00 ; CPU:$E2C0 PRG:22C0 63 73 02 00 02 02 64 74 02 00 03 02 65 75 02 00 + .byte $04, $02, $66, $76, $00, $02, $00, $00, $03, $81, $91, $A1, $02, $00, $01, $03 ; CPU:$E2D0 PRG:22D0 04 02 66 76 00 02 00 00 03 81 91 A1 02 00 01 03 + .byte $82, $92, $A2, $02, $00, $02, $03, $83, $93, $A3, $02, $00, $FF, $03, $67, $67 ; CPU:$E2E0 PRG:22E0 82 92 A2 02 00 02 03 83 93 A3 02 00 FF 03 67 67 + .byte $67, $02, $00, $03, $03, $67, $67, $67, $00, $02, $00, $00, $03, $67, $94, $67 ; CPU:$E2F0 PRG:22F0 67 02 00 03 03 67 67 67 00 02 00 00 03 67 94 67 + .byte $02, $00, $01, $03, $85, $95, $A5, $02, $00, $02, $03, $86, $96, $A6, $02, $00 ; CPU:$E300 PRG:2300 02 00 01 03 85 95 A5 02 00 02 03 86 96 A6 02 00 + .byte $03, $03, $87, $97, $A7, $02, $00, $04, $03, $67, $67, $67, $00, $02, $00, $00 ; CPU:$E310 PRG:2310 03 03 87 97 A7 02 00 04 03 67 67 67 00 02 00 00 + .byte $03, $88, $98, $A8, $02, $00, $01, $03, $89, $99, $A9, $02, $00, $02, $03, $8A ; CPU:$E320 PRG:2320 03 88 98 A8 02 00 01 03 89 99 A9 02 00 02 03 8A + .byte $9A, $AA, $02, $00, $03, $03, $8B, $9B, $AB, $00, $02, $00, $00, $03, $8C, $9C ; CPU:$E330 PRG:2330 9A AA 02 00 03 03 8B 9B AB 00 02 00 00 03 8C 9C + .byte $AC, $02, $00, $01, $03, $8D, $9D, $AD, $02, $00, $02, $03, $8E, $9E, $AE, $02 ; CPU:$E340 PRG:2340 AC 02 00 01 03 8D 9D AD 02 00 02 03 8E 9E AE 02 + .byte $00, $03, $03, $67, $9F, $67, $02, $00, $FF, $03, $67, $67, $67, $00, $02, $00 ; CPU:$E350 PRG:2350 00 03 03 67 9F 67 02 00 FF 03 67 67 67 00 02 00 + .byte $00, $02, $E2, $F2, $02, $00, $01, $02, $E2, $F2, $00, $02, $00, $00, $02, $E4 ; CPU:$E360 PRG:2360 00 02 E2 F2 02 00 01 02 E2 F2 00 02 00 00 02 E4 + .byte $F4, $02, $00, $01, $02, $E4, $F4, $00, $01, $00, $00, $04, $E2, $E3, $E3, $E2 ; CPU:$E370 PRG:2370 F4 02 00 01 02 E4 F4 00 01 00 00 04 E2 E3 E3 E2 + .byte $01, $01, $00, $04, $F2, $F3, $F3, $F2, $00, $01, $00, $00, $04, $E4, $E5, $E5 ; CPU:$E380 PRG:2380 01 01 00 04 F2 F3 F3 F2 00 01 00 00 04 E4 E5 E5 + .byte $E4, $01, $01, $00, $04, $F4, $F3, $F3, $F4, $00, $01, $00, $00, $06, $E2, $E3 ; CPU:$E390 PRG:2390 E4 01 01 00 04 F4 F3 F3 F4 00 01 00 00 06 E2 E3 + .byte $E3, $E3, $E3, $E2, $01, $01, $00, $06, $F2, $F3, $F3, $F3, $F3, $F2, $00, $01 ; CPU:$E3A0 PRG:23A0 E3 E3 E3 E2 01 01 00 06 F2 F3 F3 F3 F3 F2 00 01 + .byte $00, $00, $06, $E4, $E5, $E5, $E5, $E5, $E4, $01, $01, $00, $06, $F4, $F3, $F3 ; CPU:$E3B0 PRG:23B0 00 00 06 E4 E5 E5 E5 E5 E4 01 01 00 06 F4 F3 F3 + .byte $F3, $F3, $F4, $00, $57, $0A, $5F, $3C, $3D, $3E, $3F, $57, $12, $5F, $57, $0A ; CPU:$E3C0 PRG:23C0 F3 F3 F4 00 57 0A 5F 3C 3D 3E 3F 57 12 5F 57 0A + .byte $5E, $68, $69, $6A, $6B, $57, $1C, $5E, $78, $00, $00, $7B, $57, $12, $5E, $61 ; CPU:$E3D0 PRG:23D0 5E 68 69 6A 6B 57 1C 5E 78 00 00 7B 57 12 5E 61 + .byte $60, $61, $60, $61, $60, $61, $60, $61, $60, $6C, $6D, $00, $6F, $61, $60, $61 ; CPU:$E3E0 PRG:23E0 60 61 60 61 60 61 60 61 60 6C 6D 00 6F 61 60 61 + .byte $60, $61, $60, $61, $60, $61, $60, $61, $60, $61, $60, $61, $60, $61, $60, $71 ; CPU:$E3F0 PRG:23F0 60 61 60 61 60 61 60 61 60 61 60 61 60 61 60 71 + .byte $70, $71, $70, $71, $70, $71, $70, $71, $70, $7C, $7D, $7E, $7F, $71, $70, $71 ; CPU:$E400 PRG:2400 70 71 70 71 70 71 70 71 70 7C 7D 7E 7F 71 70 71 + .byte $70, $71, $70, $71, $70, $71, $70, $71, $70, $71, $70, $71, $70, $71, $70, $5A ; CPU:$E410 PRG:2410 70 71 70 71 70 71 70 71 70 71 70 71 70 71 70 5A + .byte $57, $20, $A4, $5A, $57, $20, $E8, $5A, $57, $08, $00, $57, $08, $A0, $0F, $0F ; CPU:$E420 PRG:2420 57 20 A4 5A 57 20 E8 5A 57 08 00 57 08 A0 0F 0F + .byte $8B, $2E, $57, $04, $0F, $57, $08, $55, $57, $18, $55, $57, $08, $05, $5A, $57 ; CPU:$E430 PRG:2430 8B 2E 57 04 0F 57 08 55 57 18 55 57 08 05 5A 57 + .byte $08, $00, $57, $08, $A0, $57, $08, $00, $57, $08, $AA, $57, $08, $AA, $0F, $0F ; CPU:$E440 PRG:2440 08 00 57 08 A0 57 08 00 57 08 AA 57 08 AA 0F 0F + .byte $8B, $2E, $57, $04, $0F, $57, $10, $55, $5A, $57, $20, $67, $57, $20, $77, $57 ; CPU:$E450 PRG:2450 8B 2E 57 04 0F 57 10 55 5A 57 20 67 57 20 77 57 + .byte $40, $67, $5A, $57, $20, $67, $57, $20, $77, $57, $40, $67, $5A, $57, $40, $67 ; CPU:$E460 PRG:2460 40 67 5A 57 20 67 57 20 77 57 40 67 5A 57 40 67 + .byte $57, $20, $77, $57, $60, $67, $5A, $57, $20, $79, $57, $20, $77, $57, $20, $18 ; CPU:$E470 PRG:2470 57 20 77 57 60 67 5A 57 20 79 57 20 77 57 20 18 + .byte $57, $20, $67, $5A ; CPU:$E480 PRG:2480 57 20 67 5A + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_E484 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_E484: + ldy Zp9B ; CPU:E484 PRG:2484 A4 9B + beq ObjectStateLookupTables_JoinBranchPaths_E4B3 ; CPU:E486 PRG:2486 F0 2B + dey ; CPU:E488 PRG:2488 88 + beq ObjectStateLookupTables_OnZero_E4B4 ; CPU:E489 PRG:2489 F0 29 + jsr $DB97 ; CPU:E48B PRG:248B 20 97 DB + bpl ObjectStateLookupTables_OnNonnegative_E497 ; CPU:E48E PRG:248E 10 07 + lda $0218 ; CPU:E490 PRG:2490 AD 18 02 + cmp #$B0 ; CPU:E493 PRG:2493 C9 B0 + bcs ObjectStateLookupTables_JoinBranchPaths_E4AA ; CPU:E495 PRG:2495 B0 13 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_E497 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_E497: + lda $0218 ; CPU:E497 PRG:2497 AD 18 02 + sec ; CPU:E49A PRG:249A 38 + sbc $03A6 ; CPU:E49B PRG:249B ED A6 03 + sta $0218 ; CPU:E49E PRG:249E 8D 18 02 + jsr $E521 ; CPU:E4A1 PRG:24A1 20 21 E5 + jsr $E509 ; CPU:E4A4 PRG:24A4 20 09 E5 + jmp $E4E0 ; CPU:E4A7 PRG:24A7 4C E0 E4 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_E4AA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_E4AA: + lda #$F4 ; CPU:E4AA PRG:24AA A9 F4 + sta $0218 ; CPU:E4AC PRG:24AC 8D 18 02 + lda #$00 ; CPU:E4AF PRG:24AF A9 00 + sta Zp9B ; CPU:E4B1 PRG:24B1 85 9B +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_E4B3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_E4B3: + rts ; CPU:E4B3 PRG:24B3 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_E4B4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_E4B4: + lda ZpDF ; CPU:E4B4 PRG:24B4 A5 DF + bne ObjectStateLookupTables_JoinBranchPaths_E4B3 ; CPU:E4B6 PRG:24B6 D0 FB + lda #$04 ; CPU:E4B8 PRG:24B8 A9 04 + jsr $F80D ; CPU:E4BA PRG:24BA 20 0D F8 + lda #$04 ; CPU:E4BD PRG:24BD A9 04 + sta $03A6 ; CPU:E4BF PRG:24BF 8D A6 03 + lda #$13 ; CPU:E4C2 PRG:24C2 A9 13 + sta $03A4 ; CPU:E4C4 PRG:24C4 8D A4 03 + lda #$00 ; CPU:E4C7 PRG:24C7 A9 00 + sta $03A5 ; CPU:E4C9 PRG:24C9 8D A5 03 + jsr $E521 ; CPU:E4CC PRG:24CC 20 21 E5 + ldy #$02 ; CPU:E4CF PRG:24CF A0 02 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_E4D1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_E4D1: + lda $E4DD,y ; CPU:E4D1 PRG:24D1 B9 DD E4 + sta $0218,y ; CPU:E4D4 PRG:24D4 99 18 02 + dey ; CPU:E4D7 PRG:24D7 88 + bpl ObjectStateLookupTables_OnNonnegative_E4D1 ; CPU:E4D8 PRG:24D8 10 F7 + inc Zp9B ; CPU:E4DA PRG:24DA E6 9B + rts ; CPU:E4DC PRG:24DC 60 + +GameplayDispatchTable_E4DD: + .byte $B0, $02, $03 ; CPU:$E4DD PRG:24DD B0 02 03 + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_CallNext_E4E0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_CallNext_E4E0: + jsr $E91F ; CPU:E4E0 PRG:24E0 20 1F E9 + lda #$08 ; CPU:E4E3 PRG:24E3 A9 08 + sta $03C8 ; CPU:E4E5 PRG:24E5 8D C8 03 + sta $03C9 ; CPU:E4E8 PRG:24E8 8D C9 03 + lda $0218 ; CPU:E4EB PRG:24EB AD 18 02 + sta $03CA ; CPU:E4EE PRG:24EE 8D CA 03 + lda $021B ; CPU:E4F1 PRG:24F1 AD 1B 02 + sta $03CB ; CPU:E4F4 PRG:24F4 8D CB 03 + jsr $CC7E ; CPU:E4F7 PRG:24F7 20 7E CC + bcs ObjectStateLookupTables_OnCarrySet_E504 ; CPU:E4FA PRG:24FA B0 08 + jsr $E903 ; CPU:E4FC PRG:24FC 20 03 E9 + jsr $CC7E ; CPU:E4FF PRG:24FF 20 7E CC + bcc ObjectStateLookupTables_JoinBranchPaths_E4B3 ; CPU:E502 PRG:2502 90 AF +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_E504 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_E504: + inc $033F ; CPU:E504 PRG:2504 EE 3F 03 + bne ObjectStateLookupTables_JoinBranchPaths_E4AA ; CPU:E507 PRG:2507 D0 A1 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_E509 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_E509: + lda ControllerEdgeFlags ; CPU:E509 PRG:2509 A5 09 + and #$03 ; CPU:E50B PRG:250B 29 03 + bne ObjectStateLookupTables_JoinBranchPaths_E4B3 ; CPU:E50D PRG:250D D0 A4 + inc Zp9D ; CPU:E50F PRG:250F E6 9D + lda Zp9D ; CPU:E511 PRG:2511 A5 9D + and #$03 ; CPU:E513 PRG:2513 29 03 + tay ; CPU:E515 PRG:2515 A8 + lda $E51D,y ; CPU:E516 PRG:2516 B9 1D E5 + sta $0219 ; CPU:E519 PRG:2519 8D 19 02 + rts ; CPU:E51C PRG:251C 60 + +GameplayPositionLookup_E51D: + .byte $02, $36, $13, $37 ; CPU:$E51D PRG:251D 02 36 13 37 + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_E521 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_E521: + ldx Zp9C ; CPU:E521 PRG:2521 A6 9C + jsr $CC16 ; CPU:E523 PRG:2523 20 16 CC + clc ; CPU:E526 PRG:2526 18 + adc #$08 ; CPU:E527 PRG:2527 69 08 + sta $021B ; CPU:E529 PRG:2529 8D 1B 02 + rts ; CPU:E52C PRG:252C 60 + +GameplayHandlerTable_E52D: + .byte $E6, $CF, $4C, $06, $C9, $A6, $CF, $F0, $F7, $A5, $0F, $F0, $03 ; CPU:$E52D PRG:252D E6 CF 4C 06 C9 A6 CF F0 F7 A5 0F F0 03 + + jmp $DCAB ; CPU:E53A PRG:253A 4C AB DC + jsr $D807 ; CPU:E53D PRG:253D 20 07 D8 + jsr $DA11 ; CPU:E540 PRG:2540 20 11 DA + bcs ObjectStateLookupTables_OnCarrySet_E548 ; CPU:E543 PRG:2543 B0 03 + jsr $DBB6 ; CPU:E545 PRG:2545 20 B6 DB +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_E548 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_E548: + jsr $E61D ; CPU:E548 PRG:2548 20 1D E6 + jsr $E7BA ; CPU:E54B PRG:254B 20 BA E7 + jsr $E79F ; CPU:E54E PRG:254E 20 9F E7 + jsr $E5B0 ; CPU:E551 PRG:2551 20 B0 E5 + jsr $E838 ; CPU:E554 PRG:2554 20 38 E8 + jsr $E484 ; CPU:E557 PRG:2557 20 84 E4 + lda Zp52 ; CPU:E55A PRG:255A A5 52 + bne ObjectStateLookupTables_JoinBranchPaths_E581 ; CPU:E55C PRG:255C D0 23 + ldx #$20 ; CPU:E55E PRG:255E A2 20 + ldy #$02 ; CPU:E560 PRG:2560 A0 02 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_E562 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_E562: + lda $0500,x ; CPU:E562 PRG:2562 BD 00 05 + beq ObjectStateLookupTables_OnZero_E578 ; CPU:E565 PRG:2565 F0 11 + lda $0504,x ; CPU:E567 PRG:2567 BD 04 05 + eor #$01 ; CPU:E56A PRG:256A 49 01 + sta $0504,x ; CPU:E56C PRG:256C 9D 04 05 + lda #$FF ; CPU:E56F PRG:256F A9 FF + sty SavedTransferIndex ; CPU:E571 PRG:2571 84 FA + jsr $ED26 ; CPU:E573 PRG:2573 20 26 ED + ldy SavedTransferIndex ; CPU:E576 PRG:2576 A4 FA +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_E578 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_E578: + dey ; CPU:E578 PRG:2578 88 + beq ObjectStateLookupTables_JoinBranchPaths_E581 ; CPU:E579 PRG:2579 F0 06 + jsr $C9EC ; CPU:E57B PRG:257B 20 EC C9 + jsr $E562 ; CPU:E57E PRG:257E 20 62 E5 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_E581 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_E581: + lda Zp52 ; CPU:E581 PRG:2581 A5 52 + cmp #$05 ; CPU:E583 PRG:2583 C9 05 + bne ObjectStateLookupTables_OnNotEqual05_E593 ; CPU:E585 PRG:2585 D0 0C + ldx #$10 ; CPU:E587 PRG:2587 A2 10 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_E589 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_E589: + jsr $E59A ; CPU:E589 PRG:2589 20 9A E5 + bcs ObjectStateLookupTables_OnCarrySet_E594 ; CPU:E58C PRG:258C B0 06 + jsr $C9F2 ; CPU:E58E PRG:258E 20 F2 C9 + bpl ObjectStateLookupTables_OnNonnegative_E589 ; CPU:E591 PRG:2591 10 F6 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNotEqual05_E593 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNotEqual05_E593: + rts ; CPU:E593 PRG:2593 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_E594 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_E594: + lda #$00 ; CPU:E594 PRG:2594 A9 00 + ldy #$67 ; CPU:E596 PRG:2596 A0 67 + bne ObjectStateLookupTables_OnNonzero_E601 ; CPU:E598 PRG:2598 D0 67 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_E59A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_E59A: + lda $0500,x ; CPU:E59A PRG:259A BD 00 05 + beq ObjectStateLookupTables_JoinBranchPaths_E5AC ; CPU:E59D PRG:259D F0 0D + jsr $CC16 ; CPU:E59F PRG:259F 20 16 CC + bcc ObjectStateLookupTables_JoinBranchPaths_E5AC ; CPU:E5A2 PRG:25A2 90 08 + cmp #$20 ; CPU:E5A4 PRG:25A4 C9 20 + bcc ObjectStateLookupTables_JoinBranchPaths_E5AC ; CPU:E5A6 PRG:25A6 90 04 + cmp #$D0 ; CPU:E5A8 PRG:25A8 C9 D0 + bcc ObjectStateLookupTables_OnBelowD0_E5AE ; CPU:E5AA PRG:25AA 90 02 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_E5AC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_E5AC: + clc ; CPU:E5AC PRG:25AC 18 + rts ; CPU:E5AD PRG:25AD 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnBelowD0_E5AE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnBelowD0_E5AE: + sec ; CPU:E5AE PRG:25AE 38 + rts ; CPU:E5AF PRG:25AF 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_E5B0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_E5B0: + lda #$00 ; CPU:E5B0 PRG:25B0 A9 00 + sta Zp6C ; CPU:E5B2 PRG:25B2 85 6C + lda ZpCA ; CPU:E5B4 PRG:25B4 A5 CA + cmp #$02 ; CPU:E5B6 PRG:25B6 C9 02 + beq ObjectStateLookupTables_JoinBranchPaths_E61C ; CPU:E5B8 PRG:25B8 F0 62 + lda Zp6A ; CPU:E5BA PRG:25BA A5 6A + cmp #$E0 ; CPU:E5BC PRG:25BC C9 E0 + bcc ObjectStateLookupTables_JoinBranchPaths_E618 ; CPU:E5BE PRG:25BE 90 58 + cmp #$E8 ; CPU:E5C0 PRG:25C0 C9 E8 + bcs ObjectStateLookupTables_JoinBranchPaths_E618 ; CPU:E5C2 PRG:25C2 B0 54 + lda #$01 ; CPU:E5C4 PRG:25C4 A9 01 + sta Zp6C ; CPU:E5C6 PRG:25C6 85 6C + ldx #$00 ; CPU:E5C8 PRG:25C8 A2 00 + lda $0500,x ; CPU:E5CA PRG:25CA BD 00 05 + beq ObjectStateLookupTables_OnZero_E5D1 ; CPU:E5CD PRG:25CD F0 02 + ldx #$10 ; CPU:E5CF PRG:25CF A2 10 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_E5D1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_E5D1: + lda Zp98 ; CPU:E5D1 PRG:25D1 A5 98 + bne ObjectStateLookupTables_JoinBranchPaths_E61C ; CPU:E5D3 PRG:25D3 D0 47 + inc Zp98 ; CPU:E5D5 PRG:25D5 E6 98 + lda Zp6A ; CPU:E5D7 PRG:25D7 A5 6A + and #$F8 ; CPU:E5D9 PRG:25D9 29 F8 + sta $0501,x ; CPU:E5DB PRG:25DB 9D 01 05 + clc ; CPU:E5DE PRG:25DE 18 + adc #$08 ; CPU:E5DF PRG:25DF 69 08 + sta $0521,x ; CPU:E5E1 PRG:25E1 9D 21 05 + jsr $F06E ; CPU:E5E4 PRG:25E4 20 6E F0 + sta $0522,x ; CPU:E5E7 PRG:25E7 9D 22 05 + lda #$C0 ; CPU:E5EA PRG:25EA A9 C0 + sta $0503,x ; CPU:E5EC PRG:25EC 9D 03 05 + lda #$B0 ; CPU:E5EF PRG:25EF A9 B0 + sta $0523,x ; CPU:E5F1 PRG:25F1 9D 23 05 + lda #$01 ; CPU:E5F4 PRG:25F4 A9 01 + sta $0504,x ; CPU:E5F6 PRG:25F6 9D 04 05 + lda #$02 ; CPU:E5F9 PRG:25F9 A9 02 + sta $0524,x ; CPU:E5FB PRG:25FB 9D 24 05 + lda #$FF ; CPU:E5FE PRG:25FE A9 FF + tay ; CPU:E600 PRG:2600 A8 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_E601 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_E601: + sta $0500,x ; CPU:E601 PRG:2601 9D 00 05 + sta $0520,x ; CPU:E604 PRG:2604 9D 20 05 + tya ; CPU:E607 PRG:2607 98 + pha ; CPU:E608 PRG:2608 48 + stx SavedObjectSlot ; CPU:E609 PRG:2609 86 F9 + jsr $ED26 ; CPU:E60B PRG:260B 20 26 ED + lda SavedObjectSlot ; CPU:E60E PRG:260E A5 F9 + clc ; CPU:E610 PRG:2610 18 + adc #$20 ; CPU:E611 PRG:2611 69 20 + tax ; CPU:E613 PRG:2613 AA + pla ; CPU:E614 PRG:2614 68 + jmp $ED26 ; CPU:E615 PRG:2615 4C 26 ED +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_E618 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_E618: + lda #$00 ; CPU:E618 PRG:2618 A9 00 + sta Zp98 ; CPU:E61A PRG:261A 85 98 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_E61C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_E61C: + rts ; CPU:E61C PRG:261C 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_E61D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_E61D: + lda Zp74 ; CPU:E61D PRG:261D A5 74 + cmp #$40 ; CPU:E61F PRG:261F C9 40 + bcs ObjectStateLookupTables_JoinBranchPaths_E631 ; CPU:E621 PRG:2621 B0 0E + lda Zp90 ; CPU:E623 PRG:2623 A5 90 + bne ObjectStateLookupTables_OnNotEqual40_E62D ; CPU:E625 PRG:2625 D0 06 + ldy #$20 ; CPU:E627 PRG:2627 A0 20 + ldx #$40 ; CPU:E629 PRG:2629 A2 40 + bne ObjectStateLookupTables_OnNonzero_E636 ; CPU:E62B PRG:262B D0 09 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNotEqual40_E62D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNotEqual40_E62D: + lda ZpB0 ; CPU:E62D PRG:262D A5 B0 + beq ObjectStateLookupTables_OnZero_E632 ; CPU:E62F PRG:262F F0 01 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_E631 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_E631: + rts ; CPU:E631 PRG:2631 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_E632 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_E632: + ldy #$40 ; CPU:E632 PRG:2632 A0 40 + ldx #$20 ; CPU:E634 PRG:2634 A2 20 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_E636 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_E636: + sty Zp8C ; CPU:E636 PRG:2636 84 8C + lda ZpCA ; CPU:E638 PRG:2638 A5 CA + beq ObjectStateLookupTables_JoinBranchPaths_E64C ; CPU:E63A PRG:263A F0 10 + lsr a ; CPU:E63C PRG:263C 4A + bcs ObjectStateLookupTables_JoinBranchPaths_E64C ; CPU:E63D PRG:263D B0 0D + rts ; CPU:E63F PRG:263F 60 + +GameplayParameterTable_E640: + .byte $A5, $6A, $C9, $F0, $D0, $EB, $A9, $00, $85, $77, $F0, $13 ; CPU:$E640 PRG:2640 A5 6A C9 F0 D0 EB A9 00 85 77 F0 13 + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_E64C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_E64C: + jsr $E6B0 ; CPU:E64C PRG:264C 20 B0 E6 + lda Zp70,x ; CPU:E64F PRG:264F B5 70 + beq ObjectStateLookupTables_OnZero_E659 ; CPU:E651 PRG:2651 F0 06 + lda Zp74,x ; CPU:E653 PRG:2653 B5 74 + cmp Zp7B ; CPU:E655 PRG:2655 C5 7B + bcs ObjectStateLookupTables_JoinBranchPaths_E631 ; CPU:E657 PRG:2657 B0 D8 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_E659 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_E659: + inc Zp6D ; CPU:E659 PRG:2659 E6 6D + lda #$00 ; CPU:E65B PRG:265B A9 00 + beq ObjectStateLookupTables_OnZero_E661 ; CPU:E65D PRG:265D F0 02 + lda #$01 ; CPU:E65F PRG:265F A9 01 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_E661 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_E661: + sta Zp78 ; CPU:E661 PRG:2661 85 78 + ldx Zp8C ; CPU:E663 PRG:2663 A6 8C + ldy #$00 ; CPU:E665 PRG:2665 A0 00 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnBelow08_E667 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnBelow08_E667: + lda $E6A0,y ; CPU:E667 PRG:2667 B9 A0 E6 + sta Zp70,x ; CPU:E66A PRG:266A 95 70 + lda $E6A8,y ; CPU:E66C PRG:266C B9 A8 E6 + sta Zp80,x ; CPU:E66F PRG:266F 95 80 + inx ; CPU:E671 PRG:2671 E8 + iny ; CPU:E672 PRG:2672 C8 + cpy #$08 ; CPU:E673 PRG:2673 C0 08 + bcc ObjectStateLookupTables_OnBelow08_E667 ; CPU:E675 PRG:2675 90 F0 + ldx Zp8C ; CPU:E677 PRG:2677 A6 8C + lda Zp78 ; CPU:E679 PRG:2679 A5 78 + beq ObjectStateLookupTables_OnZero_E685 ; CPU:E67B PRG:267B F0 08 + lda #$00 ; CPU:E67D PRG:267D A9 00 + sta Zp74,x ; CPU:E67F PRG:267F 95 74 + lda #$0C ; CPU:E681 PRG:2681 A9 0C + sta Zp84,x ; CPU:E683 PRG:2683 95 84 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_E685 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_E685: + lda Zp77 ; CPU:E685 PRG:2685 A5 77 + beq ObjectStateLookupTables_OnZero_E693 ; CPU:E687 PRG:2687 F0 0A + lda Zp68 ; CPU:E689 PRG:2689 A5 68 + beq ObjectStateLookupTables_OnZero_E693 ; CPU:E68B PRG:268B F0 06 + lda #$FE ; CPU:E68D PRG:268D A9 FE + sta Zp71,x ; CPU:E68F PRG:268F 95 71 + sta Zp81,x ; CPU:E691 PRG:2691 95 81 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_E693 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_E693: + cpx #$20 ; CPU:E693 PRG:2693 E0 20 + beq ObjectStateLookupTables_OnEqual20_E69F ; CPU:E695 PRG:2695 F0 08 + lda #$D8 ; CPU:E697 PRG:2697 A9 D8 + sta Zp72,x ; CPU:E699 PRG:2699 95 72 + lda #$44 ; CPU:E69B PRG:269B A9 44 + sta Zp82,x ; CPU:E69D PRG:269D 95 82 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnEqual20_E69F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnEqual20_E69F: + rts ; CPU:E69F PRG:269F 60 + +GameplayParameterTable_E6A0: + .byte $01, $FF, $B0, $78, $F3, $00, $0C, $0A, $01, $FF, $20, $68, $FF, $00, $0E, $09 ; CPU:$E6A0 PRG:26A0 01 FF B0 78 F3 00 0C 0A 01 FF 20 68 FF 00 0E 09 + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_CallNext_E6B0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_CallNext_E6B0: + jsr $E6C9 ; CPU:E6B0 PRG:26B0 20 C9 E6 + sta Zp77 ; CPU:E6B3 PRG:26B3 85 77 + lda Zp64 ; CPU:E6B5 PRG:26B5 A5 64 + asl a ; CPU:E6B7 PRG:26B7 0A + asl a ; CPU:E6B8 PRG:26B8 0A + jsr $F7E9 ; CPU:E6B9 PRG:26B9 20 E9 F7 + adc Zp77 ; CPU:E6BC PRG:26BC 65 77 + tay ; CPU:E6BE PRG:26BE A8 + lda $E6DF,y ; CPU:E6BF PRG:26BF B9 DF E6 + sta Zp7B ; CPU:E6C2 PRG:26C2 85 7B + and #$03 ; CPU:E6C4 PRG:26C4 29 03 + sta Zp77 ; CPU:E6C6 PRG:26C6 85 77 + rts ; CPU:E6C8 PRG:26C8 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_E6C9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_E6C9: + lda Zp6D ; CPU:E6C9 PRG:26C9 A5 6D + and #$0F ; CPU:E6CB PRG:26CB 29 0F + sta Zp77 ; CPU:E6CD PRG:26CD 85 77 + ldy Zp66 ; CPU:E6CF PRG:26CF A4 66 + dey ; CPU:E6D1 PRG:26D1 88 + cpy #$03 ; CPU:E6D2 PRG:26D2 C0 03 + bcc ObjectStateLookupTables_OnBelow03_E6D8 ; CPU:E6D4 PRG:26D4 90 02 + ldy #$03 ; CPU:E6D6 PRG:26D6 A0 03 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnBelow03_E6D8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnBelow03_E6D8: + tya ; CPU:E6D8 PRG:26D8 98 + jsr $F7E9 ; CPU:E6D9 PRG:26D9 20 E9 F7 + adc Zp77 ; CPU:E6DC PRG:26DC 65 77 + rts ; CPU:E6DE PRG:26DE 60 + +GameplayObjectDescriptorData_E6DF: + .byte $70, $40, $70, $20, $70, $11, $10, $70, $20, $30, $50, $60, $30, $20, $70, $10 ; CPU:$E6DF PRG:26DF 70 40 70 20 70 11 10 70 20 30 50 60 30 20 70 10 + .byte $90, $70, $71, $A0, $70, $60, $90, $70, $61, $A0, $60, $60, $08, $E8, $11, $80 ; CPU:$E6EF PRG:26EF 90 70 71 A0 70 60 90 70 61 A0 60 60 08 E8 11 80 + .byte $A0, $61, $60, $08, $E8, $11, $A0, $60, $60, $A1, $60, $B0, $50, $09, $E8, $10 ; CPU:$E6FF PRG:26FF A0 61 60 08 E8 11 A0 60 60 A1 60 B0 50 09 E8 10 + .byte $B1, $50, $50, $09, $E8, $10, $B1, $40, $B0, $41, $C0, $08, $E9, $10, $B0, $40 ; CPU:$E70F PRG:270F B1 50 50 09 E8 10 B1 40 B0 41 C0 08 E9 10 B0 40 + .byte $80, $A0, $68, $80, $68, $90, $50, $60, $B0, $A0, $68, $99, $98, $60, $B0, $C0 ; CPU:$E71F PRG:271F 80 A0 68 80 68 90 50 60 B0 A0 68 99 98 60 B0 C0 + .byte $80, $A0, $B8, $99, $98, $C0, $99, $50, $C0, $C8, $68, $99, $E7, $60, $B0, $C8 ; CPU:$E72F PRG:272F 80 A0 B8 99 98 C0 99 50 C0 C8 68 99 E7 60 B0 C8 + .byte $80, $68, $99, $E7, $98, $D0, $C0, $68, $99, $C0, $D0, $68, $99, $E7, $B0, $D0 ; CPU:$E73F PRG:273F 80 68 99 E7 98 D0 C0 68 99 C0 D0 68 99 E7 B0 D0 + .byte $80, $68, $99, $E7, $98, $68, $99, $E7, $80, $68, $D0, $99, $D0, $68, $99, $E7 ; CPU:$E74F PRG:274F 80 68 99 E7 98 68 99 E7 80 68 D0 99 D0 68 99 E7 + .byte $D0, $80, $B8, $80, $D0, $90, $D0, $80, $C8, $C0, $90, $C8, $90, $D0, $A0, $88 ; CPU:$E75F PRG:275F D0 80 B8 80 D0 90 D0 80 C8 C0 90 C8 90 D0 A0 88 + .byte $B0, $C0, $B0, $B0, $C8, $B0, $B8, $C0, $B0, $B0, $C8, $B0, $B8, $C0, $B0, $B8 ; CPU:$E76F PRG:276F B0 C0 B0 B0 C8 B0 B8 C0 B0 B0 C8 B0 B8 C0 B0 B8 + .byte $C8, $C8, $C8, $D0, $C8, $C8, $C8, $D0, $C8, $C8, $C8, $D0, $C8, $C8, $C8, $D0 ; CPU:$E77F PRG:277F C8 C8 C8 D0 C8 C8 C8 D0 C8 C8 C8 D0 C8 C8 C8 D0 + .byte $C8, $C8, $C8, $D0, $C8, $C8, $D0, $D0, $C8, $D0, $D0, $C8, $D0, $D0, $C8, $D0 ; CPU:$E78F PRG:278F C8 C8 C8 D0 C8 C8 D0 D0 C8 D0 D0 C8 D0 D0 C8 D0 + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_E79F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_E79F: + lda ControllerEdgeFlags ; CPU:E79F PRG:279F A5 09 + and #$07 ; CPU:E7A1 PRG:27A1 29 07 + bne ObjectStateLookupTables_OnNonzero_E7B9 ; CPU:E7A3 PRG:27A3 D0 14 + ldy #$04 ; CPU:E7A5 PRG:27A5 A0 04 + ldx #$20 ; CPU:E7A7 PRG:27A7 A2 20 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_E7A9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_E7A9: + lda Zp70,x ; CPU:E7A9 PRG:27A9 B5 70 + beq ObjectStateLookupTables_OnZero_E7B3 ; CPU:E7AB PRG:27AB F0 06 + lda Zp76,x ; CPU:E7AD PRG:27AD B5 76 + eor #$01 ; CPU:E7AF PRG:27AF 49 01 + sta Zp76,x ; CPU:E7B1 PRG:27B1 95 76 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_E7B3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_E7B3: + jsr $C9EC ; CPU:E7B3 PRG:27B3 20 EC C9 + dey ; CPU:E7B6 PRG:27B6 88 + bne ObjectStateLookupTables_OnNonzero_E7A9 ; CPU:E7B7 PRG:27B7 D0 F0 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_E7B9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_E7B9: + rts ; CPU:E7B9 PRG:27B9 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_E7BA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_E7BA: + lda ZpCA ; CPU:E7BA PRG:27BA A5 CA + and ZpCE ; CPU:E7BC PRG:27BC 25 CE + tay ; CPU:E7BE PRG:27BE A8 + lda $E7E5,y ; CPU:E7BF PRG:27BF B9 E5 E7 + clc ; CPU:E7C2 PRG:27C2 18 + adc Zp9A ; CPU:E7C3 PRG:27C3 65 9A + sta Zp9A ; CPU:E7C5 PRG:27C5 85 9A + bcc ObjectStateLookupTables_JoinBranchPaths_E82B ; CPU:E7C7 PRG:27C7 90 62 + lda $E7E8,y ; CPU:E7C9 PRG:27C9 B9 E8 E7 + sta Zp77 ; CPU:E7CC PRG:27CC 85 77 + ldy #$03 ; CPU:E7CE PRG:27CE A0 03 + ldx #$20 ; CPU:E7D0 PRG:27D0 A2 20 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_E7D2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_E7D2: + sty SavedTransferIndex ; CPU:E7D2 PRG:27D2 84 FA + jsr $E7EB ; CPU:E7D4 PRG:27D4 20 EB E7 + ldy SavedTransferIndex ; CPU:E7D7 PRG:27D7 A4 FA + jsr $C9EC ; CPU:E7D9 PRG:27D9 20 EC C9 + dey ; CPU:E7DC PRG:27DC 88 + bpl ObjectStateLookupTables_OnNonnegative_E7D2 ; CPU:E7DD PRG:27DD 10 F3 + jsr $E9BC ; CPU:E7DF PRG:27DF 20 BC E9 + jmp $E97E ; CPU:E7E2 PRG:27E2 4C 7E E9 + +GameplayDispatchTable_E7E5: + .byte $5F, $B0, $94, $FF, $FE, $01 ; CPU:$E7E5 PRG:27E5 5F B0 94 FF FE 01 + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_E7EB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_E7EB: + lda Zp70,x ; CPU:E7EB PRG:27EB B5 70 + beq ObjectStateLookupTables_JoinBranchPaths_E82B ; CPU:E7ED PRG:27ED F0 3C + lda Zp74,x ; CPU:E7EF PRG:27EF B5 74 + clc ; CPU:E7F1 PRG:27F1 18 + adc Zp77 ; CPU:E7F2 PRG:27F2 65 77 + sta Zp74,x ; CPU:E7F4 PRG:27F4 95 74 + lda Zp77 ; CPU:E7F6 PRG:27F6 A5 77 + bmi ObjectStateLookupTables_OnNegative_E7FE ; CPU:E7F8 PRG:27F8 30 04 + bcc ObjectStateLookupTables_JoinBranchPaths_E82B ; CPU:E7FA PRG:27FA 90 2F + bcs ObjectStateLookupTables_OnCarrySet_E80A ; CPU:E7FC PRG:27FC B0 0C +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNegative_E7FE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNegative_E7FE: + bcs ObjectStateLookupTables_JoinBranchPaths_E82B ; CPU:E7FE PRG:27FE B0 2B + jsr $E82C ; CPU:E800 PRG:2800 20 2C E8 + txa ; CPU:E803 PRG:2803 8A + and #$10 ; CPU:E804 PRG:2804 29 10 + bne ObjectStateLookupTables_JoinBranchPaths_E823 ; CPU:E806 PRG:2806 D0 1B + beq ObjectStateLookupTables_OnZero_E814 ; CPU:E808 PRG:2808 F0 0A +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_E80A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_E80A: + jsr $E82C ; CPU:E80A PRG:280A 20 2C E8 + txa ; CPU:E80D PRG:280D 8A + dec Zp6D ; CPU:E80E PRG:280E C6 6D + and #$10 ; CPU:E810 PRG:2810 29 10 + beq ObjectStateLookupTables_JoinBranchPaths_E823 ; CPU:E812 PRG:2812 F0 0F +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_E814 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_E814: + lda Zp71,x ; CPU:E814 PRG:2814 B5 71 + cmp #$FE ; CPU:E816 PRG:2816 C9 FE + bne ObjectStateLookupTables_OnNotEqualFE_E81A ; CPU:E818 PRG:2818 D0 00 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNotEqualFE_E81A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNotEqualFE_E81A: + lda #$00 ; CPU:E81A PRG:281A A9 00 + jsr $E823 ; CPU:E81C PRG:281C 20 23 E8 + txa ; CPU:E81F PRG:281F 8A + eor #$10 ; CPU:E820 PRG:2820 49 10 + tax ; CPU:E822 PRG:2822 AA +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_E823 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_E823: + lda #$00 ; CPU:E823 PRG:2823 A9 00 + sta Zp70,x ; CPU:E825 PRG:2825 95 70 + lda #$01 ; CPU:E827 PRG:2827 A9 01 + sta Zp75,x ; CPU:E829 PRG:2829 95 75 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_E82B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_E82B: + rts ; CPU:E82B PRG:282B 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_E82C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_E82C: + lda Zp71,x ; CPU:E82C PRG:282C B5 71 + cmp #$FE ; CPU:E82E PRG:282E C9 FE + bne ObjectStateLookupTables_OnNotEqualFE_E837 ; CPU:E830 PRG:2830 D0 05 + lda #$00 ; CPU:E832 PRG:2832 A9 00 + sta $03FF ; CPU:E834 PRG:2834 8D FF 03 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNotEqualFE_E837 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNotEqualFE_E837: + rts ; CPU:E837 PRG:2837 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_E838 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_E838: + lda #$02 ; CPU:E838 PRG:2838 A9 02 + sta Zp7B ; CPU:E83A PRG:283A 85 7B + jsr $E91F ; CPU:E83C PRG:283C 20 1F E9 + jmp $E845 ; CPU:E83F PRG:283F 4C 45 E8 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_CallNext_E842 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_CallNext_E842: + jsr $E903 ; CPU:E842 PRG:2842 20 03 E9 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_E845 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_E845: + ldy #$02 ; CPU:E845 PRG:2845 A0 02 + ldx #$20 ; CPU:E847 PRG:2847 A2 20 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_E849 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_E849: + lda $0500,x ; CPU:E849 PRG:2849 BD 00 05 + beq ObjectStateLookupTables_JoinBranchPaths_E88F ; CPU:E84C PRG:284C F0 41 + jsr $E92E ; CPU:E84E PRG:284E 20 2E E9 + bcs ObjectStateLookupTables_JoinBranchPaths_E88F ; CPU:E851 PRG:2851 B0 3C + lda ZpDF ; CPU:E853 PRG:2853 A5 DF + beq ObjectStateLookupTables_JoinBranchPaths_E88A ; CPU:E855 PRG:2855 F0 33 + jsr $CC8F ; CPU:E857 PRG:2857 20 8F CC + bcc ObjectStateLookupTables_JoinBranchPaths_E88F ; CPU:E85A PRG:285A 90 33 + lda #$01 ; CPU:E85C PRG:285C A9 01 + sta ZpDB ; CPU:E85E PRG:285E 85 DB + lda $0343 ; CPU:E860 PRG:2860 AD 43 03 + lsr a ; CPU:E863 PRG:2863 4A + bcs ObjectStateLookupTables_OnCarrySet_E86A ; CPU:E864 PRG:2864 B0 04 + lda #$03 ; CPU:E866 PRG:2866 A9 03 + bne ObjectStateLookupTables_OnNonzero_E86C ; CPU:E868 PRG:2868 D0 02 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_E86A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_E86A: + lda #$07 ; CPU:E86A PRG:286A A9 07 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_E86C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_E86C: + cmp $0342 ; CPU:E86C PRG:286C CD 42 03 + bne ObjectStateLookupTables_JoinBranchPaths_E88A ; CPU:E86F PRG:286F D0 19 + lda $0218 ; CPU:E871 PRG:2871 AD 18 02 + cmp #$F4 ; CPU:E874 PRG:2874 C9 F4 + bne ObjectStateLookupTables_JoinBranchPaths_E88A ; CPU:E876 PRG:2876 D0 12 + lda ZpCA ; CPU:E878 PRG:2878 A5 CA + cmp #$02 ; CPU:E87A PRG:287A C9 02 + bne ObjectStateLookupTables_JoinBranchPaths_E88A ; CPU:E87C PRG:287C D0 0C + lda ZpD0 ; CPU:E87E PRG:287E A5 D0 + ora Zp9B ; CPU:E880 PRG:2880 05 9B + bne ObjectStateLookupTables_JoinBranchPaths_E88A ; CPU:E882 PRG:2882 D0 06 + lda #$01 ; CPU:E884 PRG:2884 A9 01 + sta Zp9B ; CPU:E886 PRG:2886 85 9B + stx Zp9C ; CPU:E888 PRG:2888 86 9C +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_E88A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_E88A: + jsr $CC7E ; CPU:E88A PRG:288A 20 7E CC + bcs ObjectStateLookupTables_OnCarrySet_E8FE ; CPU:E88D PRG:288D B0 6F +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_E88F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_E88F: + dey ; CPU:E88F PRG:288F 88 + beq ObjectStateLookupTables_OnZero_E897 ; CPU:E890 PRG:2890 F0 05 + jsr $C9EC ; CPU:E892 PRG:2892 20 EC C9 + bne ObjectStateLookupTables_OnNonzero_E849 ; CPU:E895 PRG:2895 D0 B2 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_E897 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_E897: + lda #$02 ; CPU:E897 PRG:2897 A9 02 + sta Zp79 ; CPU:E899 PRG:2899 85 79 + ldy #$03 ; CPU:E89B PRG:289B A0 03 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_E89D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_E89D: + lda $E97A,y ; CPU:E89D PRG:289D B9 7A E9 + sta a:Zp8C,y ; CPU:E8A0 PRG:28A0 99 8C 00 + dey ; CPU:E8A3 PRG:28A3 88 + bpl ObjectStateLookupTables_OnNonnegative_E89D ; CPU:E8A4 PRG:28A4 10 F7 + ldx #$20 ; CPU:E8A6 PRG:28A6 A2 20 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_E8A8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_E8A8: + lda Zp75,x ; CPU:E8A8 PRG:28A8 B5 75 + bne ObjectStateLookupTables_JoinBranchPaths_E8D7 ; CPU:E8AA PRG:28AA D0 2B + ldy #$36 ; CPU:E8AC PRG:28AC A0 36 + lda Zp71,x ; CPU:E8AE PRG:28AE B5 71 + cmp #$FF ; CPU:E8B0 PRG:28B0 C9 FF + beq ObjectStateLookupTables_OnEqualFF_E8B6 ; CPU:E8B2 PRG:28B2 F0 02 + ldy #$26 ; CPU:E8B4 PRG:28B4 A0 26 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnEqualFF_E8B6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnEqualFF_E8B6: + sty Zp8E ; CPU:E8B6 PRG:28B6 84 8E + jsr $E969 ; CPU:E8B8 PRG:28B8 20 69 E9 + lda ZpDF ; CPU:E8BB PRG:28BB A5 DF + beq ObjectStateLookupTables_OnZero_E8D2 ; CPU:E8BD PRG:28BD F0 13 + jsr $CC8F ; CPU:E8BF PRG:28BF 20 8F CC + bcc ObjectStateLookupTables_JoinBranchPaths_E8D7 ; CPU:E8C2 PRG:28C2 90 13 + lda #$00 ; CPU:E8C4 PRG:28C4 A9 00 + cpx #$20 ; CPU:E8C6 PRG:28C6 E0 20 + beq ObjectStateLookupTables_OnEqual20_E8CD ; CPU:E8C8 PRG:28C8 F0 03 + clc ; CPU:E8CA PRG:28CA 18 + adc #$01 ; CPU:E8CB PRG:28CB 69 01 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnEqual20_E8CD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnEqual20_E8CD: + tax ; CPU:E8CD PRG:28CD AA + lda #$01 ; CPU:E8CE PRG:28CE A9 01 + sta ZpD9,x ; CPU:E8D0 PRG:28D0 95 D9 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_E8D2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_E8D2: + jsr $CC7E ; CPU:E8D2 PRG:28D2 20 7E CC + bcs ObjectStateLookupTables_OnCarrySet_E8FE ; CPU:E8D5 PRG:28D5 B0 27 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_E8D7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_E8D7: + dec Zp79 ; CPU:E8D7 PRG:28D7 C6 79 + beq ObjectStateLookupTables_OnZero_E8E2 ; CPU:E8D9 PRG:28D9 F0 07 + txa ; CPU:E8DB PRG:28DB 8A + clc ; CPU:E8DC PRG:28DC 18 + adc #$20 ; CPU:E8DD PRG:28DD 69 20 + tax ; CPU:E8DF PRG:28DF AA + bne ObjectStateLookupTables_OnNonzero_E8A8 ; CPU:E8E0 PRG:28E0 D0 C6 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_E8E2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_E8E2: + dec Zp7B ; CPU:E8E2 PRG:28E2 C6 7B + beq ObjectStateLookupTables_OnZero_E8E9 ; CPU:E8E4 PRG:28E4 F0 03 + jmp $E842 ; CPU:E8E6 PRG:28E6 4C 42 E8 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_E8E9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_E8E9: + lda ZpD0 ; CPU:E8E9 PRG:28E9 A5 D0 + beq ObjectStateLookupTables_JoinBranchPaths_E902 ; CPU:E8EB PRG:28EB F0 15 + jsr $E95C ; CPU:E8ED PRG:28ED 20 5C E9 + jsr $CC7E ; CPU:E8F0 PRG:28F0 20 7E CC + bcc ObjectStateLookupTables_JoinBranchPaths_E902 ; CPU:E8F3 PRG:28F3 90 0D + ldx #$01 ; CPU:E8F5 PRG:28F5 A2 01 + stx $0321 ; CPU:E8F7 PRG:28F7 8E 21 03 + stx $03FF ; CPU:E8FA PRG:28FA 8E FF 03 + rts ; CPU:E8FD PRG:28FD 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_E8FE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_E8FE: + lda #$01 ; CPU:E8FE PRG:28FE A9 01 + sta Zp0F ; CPU:E900 PRG:2900 85 0F +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_E902 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_E902: + rts ; CPU:E902 PRG:2902 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_E903 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_E903: + ldy #$03 ; CPU:E903 PRG:2903 A0 03 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_E905 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_E905: + lda $E96E,y ; CPU:E905 PRG:2905 B9 6E E9 + sta a:Zp8C,y ; CPU:E908 PRG:2908 99 8C 00 + dey ; CPU:E90B PRG:290B 88 + bpl ObjectStateLookupTables_OnNonnegative_E905 ; CPU:E90C PRG:290C 10 F7 + lda Zp61 ; CPU:E90E PRG:290E A5 61 + cmp #$05 ; CPU:E910 PRG:2910 C9 05 + bne ObjectStateLookupTables_OnNotEqual05_E918 ; CPU:E912 PRG:2912 D0 04 + lda #$10 ; CPU:E914 PRG:2914 A9 10 + sta Zp8F ; CPU:E916 PRG:2916 85 8F +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNotEqual05_E918 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNotEqual05_E918: + ldx #$00 ; CPU:E918 PRG:2918 A2 00 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_E91A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_E91A: + ldy #$08 ; CPU:E91A PRG:291A A0 08 + jmp $CC62 ; CPU:E91C PRG:291C 4C 62 CC +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_E91F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_E91F: + ldy #$03 ; CPU:E91F PRG:291F A0 03 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_E921 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_E921: + lda $E972,y ; CPU:E921 PRG:2921 B9 72 E9 + sta a:Zp8C,y ; CPU:E924 PRG:2924 99 8C 00 + dey ; CPU:E927 PRG:2927 88 + bpl ObjectStateLookupTables_OnNonnegative_E921 ; CPU:E928 PRG:2928 10 F7 + ldx #$10 ; CPU:E92A PRG:292A A2 10 + bne ObjectStateLookupTables_OnNonzero_E91A ; CPU:E92C PRG:292C D0 EC +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_E92E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_E92E: + lda #$1C ; CPU:E92E PRG:292E A9 1C + sta $03C8 ; CPU:E930 PRG:2930 8D C8 03 + lda #$0A ; CPU:E933 PRG:2933 A9 0A + sta $03C9 ; CPU:E935 PRG:2935 8D C9 03 + clc ; CPU:E938 PRG:2938 18 + lda $0503,x ; CPU:E939 PRG:2939 BD 03 05 + adc #$08 ; CPU:E93C PRG:293C 69 08 + sta $03CA ; CPU:E93E PRG:293E 8D CA 03 + clc ; CPU:E941 PRG:2941 18 + lda $0501,x ; CPU:E942 PRG:2942 BD 01 05 + adc #$07 ; CPU:E945 PRG:2945 69 07 + sta Zp77 ; CPU:E947 PRG:2947 85 77 + lda $0502,x ; CPU:E949 PRG:2949 BD 02 05 + bcc ObjectStateLookupTables_OnCarryClear_E950 ; CPU:E94C PRG:294C 90 02 + eor #$01 ; CPU:E94E PRG:294E 49 01 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarryClear_E950 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarryClear_E950: + sta Zp78 ; CPU:E950 PRG:2950 85 78 + jsr $CC20 ; CPU:E952 PRG:2952 20 20 CC + bcs ObjectStateLookupTables_OnCarrySet_E95B ; CPU:E955 PRG:2955 B0 04 + sta $03CB ; CPU:E957 PRG:2957 8D CB 03 + clc ; CPU:E95A PRG:295A 18 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_E95B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_E95B: + rts ; CPU:E95B PRG:295B 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_E95C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_E95C: + ldy #$03 ; CPU:E95C PRG:295C A0 03 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_E95E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_E95E: + lda $E976,y ; CPU:E95E PRG:295E B9 76 E9 + sta a:Zp8C,y ; CPU:E961 PRG:2961 99 8C 00 + dey ; CPU:E964 PRG:2964 88 + bpl ObjectStateLookupTables_OnNonnegative_E95E ; CPU:E965 PRG:2965 10 F7 + ldx #$60 ; CPU:E967 PRG:2967 A2 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_E969 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_E969: + ldy #$00 ; CPU:E969 PRG:2969 A0 00 + jmp $CC62 ; CPU:E96B PRG:296B 4C 62 CC + +GameplayParameterTable_E96E: + .byte $02, $0C, $01, $15, $07, $16, $04, $08, $04, $08, $04, $08, $0B, $02, $36, $04 ; CPU:$E96E PRG:296E 02 0C 01 15 07 16 04 08 04 08 04 08 0B 02 36 04 + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_E97E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_E97E: + ldy #$05 ; CPU:E97E PRG:297E A0 05 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_E980 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_E980: + lda $E9B6,y ; CPU:E980 PRG:2980 B9 B6 E9 + sta a:ZpD1,y ; CPU:E983 PRG:2983 99 D1 00 + dey ; CPU:E986 PRG:2986 88 + bpl ObjectStateLookupTables_OnNonnegative_E980 ; CPU:E987 PRG:2987 10 F7 + lda $03FF ; CPU:E989 PRG:2989 AD FF 03 + beq ObjectStateLookupTables_OnZero_E992 ; CPU:E98C PRG:298C F0 04 + lda #$00 ; CPU:E98E PRG:298E A9 00 + beq ObjectStateLookupTables_OnZero_E9B3 ; CPU:E990 PRG:2990 F0 21 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_E992 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_E992: + ldy #$40 ; CPU:E992 PRG:2992 A0 40 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_E994 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_E994: + lda a:Zp70,y ; CPU:E994 PRG:2994 B9 70 00 + beq ObjectStateLookupTables_OnZero_E9A0 ; CPU:E997 PRG:2997 F0 07 + lda a:Zp71,y ; CPU:E999 PRG:2999 B9 71 00 + cmp #$FE ; CPU:E99C PRG:299C C9 FE + beq ObjectStateLookupTables_OnEqualFE_E9A9 ; CPU:E99E PRG:299E F0 09 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_E9A0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_E9A0: + tya ; CPU:E9A0 PRG:29A0 98 + sec ; CPU:E9A1 PRG:29A1 38 + sbc #$20 ; CPU:E9A2 PRG:29A2 E9 20 + tay ; CPU:E9A4 PRG:29A4 A8 + bne ObjectStateLookupTables_OnNonzero_E994 ; CPU:E9A5 PRG:29A5 D0 ED + beq ObjectStateLookupTables_OnZero_E9B3 ; CPU:E9A7 PRG:29A7 F0 0A +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnEqualFE_E9A9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnEqualFE_E9A9: + lda a:Zp74,y ; CPU:E9A9 PRG:29A9 B9 74 00 + clc ; CPU:E9AC PRG:29AC 18 + adc #$03 ; CPU:E9AD PRG:29AD 69 03 + sta ZpD4 ; CPU:E9AF PRG:29AF 85 D4 + lda #$01 ; CPU:E9B1 PRG:29B1 A9 01 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_E9B3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_E9B3: + sta ZpD0 ; CPU:E9B3 PRG:29B3 85 D0 + rts ; CPU:E9B5 PRG:29B5 60 + +GameplayParameterTable_E9B6: + .byte $04, $A0, $70, $F6, $00, $22 ; CPU:$E9B6 PRG:29B6 04 A0 70 F6 00 22 + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_E9BC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_E9BC: + ldy #$40 ; CPU:E9BC PRG:29BC A0 40 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_E9BE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_E9BE: + lda a:Zp70,y ; CPU:E9BE PRG:29BE B9 70 00 + beq ObjectStateLookupTables_OnZero_E9CE ; CPU:E9C1 PRG:29C1 F0 0B + lda a:Zp74,y ; CPU:E9C3 PRG:29C3 B9 74 00 + clc ; CPU:E9C6 PRG:29C6 18 + adc #$0C ; CPU:E9C7 PRG:29C7 69 0C + sta a:Zp84,y ; CPU:E9C9 PRG:29C9 99 84 00 + lda #$01 ; CPU:E9CC PRG:29CC A9 01 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_E9CE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_E9CE: + sta a:Zp80,y ; CPU:E9CE PRG:29CE 99 80 00 + tya ; CPU:E9D1 PRG:29D1 98 + sec ; CPU:E9D2 PRG:29D2 38 + sbc #$20 ; CPU:E9D3 PRG:29D3 E9 20 + tay ; CPU:E9D5 PRG:29D5 A8 + bne ObjectStateLookupTables_OnNonzero_E9BE ; CPU:E9D6 PRG:29D6 D0 E6 + rts ; CPU:E9D8 PRG:29D8 60 + +GameplayDispatchTable_E9D9: + .byte $A6, $CF, $D0, $03, $4C, $2D, $E5, $A5, $0F, $F0, $03 ; CPU:$E9D9 PRG:29D9 A6 CF D0 03 4C 2D E5 A5 0F F0 03 + + jmp $DC58 ; CPU:E9E4 PRG:29E4 4C 58 DC + jsr $D807 ; CPU:E9E7 PRG:29E7 20 07 D8 + jsr $DA11 ; CPU:E9EA PRG:29EA 20 11 DA + bcs ObjectStateLookupTables_OnCarrySet_E9F2 ; CPU:E9ED PRG:29ED B0 03 + jsr $DBB6 ; CPU:E9EF PRG:29EF 20 B6 DB +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_E9F2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_E9F2: + jsr $EBD0 ; CPU:E9F2 PRG:29F2 20 D0 EB + jsr $EA82 ; CPU:E9F5 PRG:29F5 20 82 EA + lda Zp03 ; CPU:E9F8 PRG:29F8 A5 03 + and #$08 ; CPU:E9FA PRG:29FA 29 08 + bne ObjectStateLookupTables_OnNonzero_EA04 ; CPU:E9FC PRG:29FC D0 06 + lda Zp74 ; CPU:E9FE PRG:29FE A5 74 + cmp #$80 ; CPU:EA00 PRG:2A00 C9 80 + bcs ObjectStateLookupTables_JoinBranchPaths_EA1F ; CPU:EA02 PRG:2A02 B0 1B +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_EA04 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_EA04: + lda $0404 ; CPU:EA04 PRG:2A04 AD 04 04 + cmp #$03 ; CPU:EA07 PRG:2A07 C9 03 + bcs ObjectStateLookupTables_JoinBranchPaths_EA1F ; CPU:EA09 PRG:2A09 B0 14 + jsr $E6B0 ; CPU:EA0B PRG:2A0B 20 B0 E6 + sta $0403 ; CPU:EA0E PRG:2A0E 8D 03 04 + ldy #$05 ; CPU:EA11 PRG:2A11 A0 05 + ldx #$20 ; CPU:EA13 PRG:2A13 A2 20 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_EA15 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_EA15: + lda Zp70,x ; CPU:EA15 PRG:2A15 B5 70 + beq ObjectStateLookupTables_JoinBranchPaths_EA20 ; CPU:EA17 PRG:2A17 F0 07 + lda Zp74,x ; CPU:EA19 PRG:2A19 B5 74 + cmp Zp7B ; CPU:EA1B PRG:2A1B C5 7B + bcc ObjectStateLookupTables_JoinBranchPaths_EA20 ; CPU:EA1D PRG:2A1D 90 01 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_EA1F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_EA1F: + rts ; CPU:EA1F PRG:2A1F 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_EA20 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_EA20: + jsr $C9EC ; CPU:EA20 PRG:2A20 20 EC C9 + dey ; CPU:EA23 PRG:2A23 88 + bne ObjectStateLookupTables_OnNonzero_EA15 ; CPU:EA24 PRG:2A24 D0 EF + lda $0403 ; CPU:EA26 PRG:2A26 AD 03 04 + lsr a ; CPU:EA29 PRG:2A29 4A + bcc ObjectStateLookupTables_OnCarryClear_EA39 ; CPU:EA2A PRG:2A2A 90 0D + ldx #$20 ; CPU:EA2C PRG:2A2C A2 20 + ldy #$02 ; CPU:EA2E PRG:2A2E A0 02 + lda Zp69 ; CPU:EA30 PRG:2A30 A5 69 + bne ObjectStateLookupTables_OnNonzero_EA3D ; CPU:EA32 PRG:2A32 D0 09 + lda #$00 ; CPU:EA34 PRG:2A34 A9 00 + sta $0403 ; CPU:EA36 PRG:2A36 8D 03 04 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarryClear_EA39 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarryClear_EA39: + ldx #$40 ; CPU:EA39 PRG:2A39 A2 40 + ldy #$03 ; CPU:EA3B PRG:2A3B A0 03 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_EA3D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_EA3D: + lda Zp70,x ; CPU:EA3D PRG:2A3D B5 70 + beq ObjectStateLookupTables_OnZero_EA49 ; CPU:EA3F PRG:2A3F F0 08 + dey ; CPU:EA41 PRG:2A41 88 + beq ObjectStateLookupTables_OnZero_EA75 ; CPU:EA42 PRG:2A42 F0 31 + jsr $C9EC ; CPU:EA44 PRG:2A44 20 EC C9 + bne ObjectStateLookupTables_OnNonzero_EA3D ; CPU:EA47 PRG:2A47 D0 F4 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_EA49 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_EA49: + inc Zp6D ; CPU:EA49 PRG:2A49 E6 6D + inc $0404 ; CPU:EA4B PRG:2A4B EE 04 04 + stx SavedObjectSlot ; CPU:EA4E PRG:2A4E 86 F9 + ldy #$00 ; CPU:EA50 PRG:2A50 A0 00 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnBelow07_EA52 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnBelow07_EA52: + lda $EA76,y ; CPU:EA52 PRG:2A52 B9 76 EA + sta Zp70,x ; CPU:EA55 PRG:2A55 95 70 + inx ; CPU:EA57 PRG:2A57 E8 + iny ; CPU:EA58 PRG:2A58 C8 + cpy #$07 ; CPU:EA59 PRG:2A59 C0 07 + bcc ObjectStateLookupTables_OnBelow07_EA52 ; CPU:EA5B PRG:2A5B 90 F5 + ldx SavedObjectSlot ; CPU:EA5D PRG:2A5D A6 F9 + lda $0403 ; CPU:EA5F PRG:2A5F AD 03 04 + beq ObjectStateLookupTables_OnZero_EA68 ; CPU:EA62 PRG:2A62 F0 04 + lda #$16 ; CPU:EA64 PRG:2A64 A9 16 + sta Zp76,x ; CPU:EA66 PRG:2A66 95 76 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_EA68 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_EA68: + txa ; CPU:EA68 PRG:2A68 8A + jsr $F7E4 ; CPU:EA69 PRG:2A69 20 E4 F7 + sec ; CPU:EA6C PRG:2A6C 38 + sbc #$02 ; CPU:EA6D PRG:2A6D E9 02 + tay ; CPU:EA6F PRG:2A6F A8 + lda $EA7D,y ; CPU:EA70 PRG:2A70 B9 7D EA + sta Zp72,x ; CPU:EA73 PRG:2A73 95 72 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_EA75 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_EA75: + rts ; CPU:EA75 PRG:2A75 60 + +GameplayLookupTable_EA76: + .byte $01, $04, $38, $70, $F7, $00, $13, $38, $48, $58, $68, $78 ; CPU:$EA76 PRG:2A76 01 04 38 70 F7 00 13 38 48 58 68 78 + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_EA82 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_EA82: + ldy #$05 ; CPU:EA82 PRG:2A82 A0 05 + sty Zp79 ; CPU:EA84 PRG:2A84 84 79 + ldx #$20 ; CPU:EA86 PRG:2A86 A2 20 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_EA88 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_EA88: + stx SavedObjectSlot ; CPU:EA88 PRG:2A88 86 F9 + lda Zp70,x ; CPU:EA8A PRG:2A8A B5 70 + beq ObjectStateLookupTables_OnZero_EA9D ; CPU:EA8C PRG:2A8C F0 0F + lda Zp79 ; CPU:EA8E PRG:2A8E A5 79 + cmp #$04 ; CPU:EA90 PRG:2A90 C9 04 + bcs ObjectStateLookupTables_OnAtLeast04_EA9A ; CPU:EA92 PRG:2A92 B0 06 + jsr $EB23 ; CPU:EA94 PRG:2A94 20 23 EB + jmp $EA9D ; CPU:EA97 PRG:2A97 4C 9D EA +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnAtLeast04_EA9A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnAtLeast04_EA9A: + jsr $EAA8 ; CPU:EA9A PRG:2A9A 20 A8 EA +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_EA9D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_EA9D: + dec Zp79 ; CPU:EA9D PRG:2A9D C6 79 + beq ObjectStateLookupTables_OnZero_EA75 ; CPU:EA9F PRG:2A9F F0 D4 + ldx SavedObjectSlot ; CPU:EAA1 PRG:2AA1 A6 F9 + jsr $C9EC ; CPU:EAA3 PRG:2AA3 20 EC C9 + bne ObjectStateLookupTables_OnNonzero_EA88 ; CPU:EAA6 PRG:2AA6 D0 E0 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_EAA8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_EAA8: + lda #$02 ; CPU:EAA8 PRG:2AA8 A9 02 + sta Zp77 ; CPU:EAAA PRG:2AAA 85 77 + jsr $EB67 ; CPU:EAAC PRG:2AAC 20 67 EB + lda $060A,x ; CPU:EAAF PRG:2AAF BD 0A 06 + bne ObjectStateLookupTables_OnNonzero_EAF3 ; CPU:EAB2 PRG:2AB2 D0 3F + lda Zp74,x ; CPU:EAB4 PRG:2AB4 B5 74 + sta Zp77 ; CPU:EAB6 PRG:2AB6 85 77 + sbc #$12 ; CPU:EAB8 PRG:2AB8 E9 12 + sta Zp78 ; CPU:EABA PRG:2ABA 85 78 + ldy #$03 ; CPU:EABC PRG:2ABC A0 03 + ldx #$40 ; CPU:EABE PRG:2ABE A2 40 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_EAC0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_EAC0: + lda Zp70,x ; CPU:EAC0 PRG:2AC0 B5 70 + beq ObjectStateLookupTables_JoinBranchPaths_EACE ; CPU:EAC2 PRG:2AC2 F0 0A + lda Zp74,x ; CPU:EAC4 PRG:2AC4 B5 74 + cmp Zp77 ; CPU:EAC6 PRG:2AC6 C5 77 + bcs ObjectStateLookupTables_JoinBranchPaths_EACE ; CPU:EAC8 PRG:2AC8 B0 04 + cmp Zp78 ; CPU:EACA PRG:2ACA C5 78 + bcs ObjectStateLookupTables_OnCarrySet_EADB ; CPU:EACC PRG:2ACC B0 0D +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_EACE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_EACE: + dey ; CPU:EACE PRG:2ACE 88 + beq ObjectStateLookupTables_OnZero_EAD6 ; CPU:EACF PRG:2ACF F0 05 + jsr $C9EC ; CPU:EAD1 PRG:2AD1 20 EC C9 + bne ObjectStateLookupTables_OnNonzero_EAC0 ; CPU:EAD4 PRG:2AD4 D0 EA +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_EAD6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_EAD6: + lda #$40 ; CPU:EAD6 PRG:2AD6 A9 40 + jmp $EB98 ; CPU:EAD8 PRG:2AD8 4C 98 EB +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_EADB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_EADB: + ldx SavedObjectSlot ; CPU:EADB PRG:2ADB A6 F9 + inc $060A,x ; CPU:EADD PRG:2ADD FE 0A 06 + lda #$04 ; CPU:EAE0 PRG:2AE0 A9 04 + sta $060C,x ; CPU:EAE2 PRG:2AE2 9D 0C 06 + lda #$00 ; CPU:EAE5 PRG:2AE5 A9 00 + sta $060B,x ; CPU:EAE7 PRG:2AE7 9D 0B 06 + lda #$19 ; CPU:EAEA PRG:2AEA A9 19 + sta Zp76,x ; CPU:EAEC PRG:2AEC 95 76 + lda Zp73,x ; CPU:EAEE PRG:2AEE B5 73 + sta $060D,x ; CPU:EAF0 PRG:2AF0 9D 0D 06 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_EAF3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_EAF3: + ldx SavedObjectSlot ; CPU:EAF3 PRG:2AF3 A6 F9 + lda $060B,x ; CPU:EAF5 PRG:2AF5 BD 0B 06 + sec ; CPU:EAF8 PRG:2AF8 38 + sbc #$38 ; CPU:EAF9 PRG:2AF9 E9 38 + sta $060B,x ; CPU:EAFB PRG:2AFB 9D 0B 06 + lda $060C,x ; CPU:EAFE PRG:2AFE BD 0C 06 + sbc #$00 ; CPU:EB01 PRG:2B01 E9 00 + sta $060C,x ; CPU:EB03 PRG:2B03 9D 0C 06 + bpl ObjectStateLookupTables_OnNonnegative_EB0F ; CPU:EB06 PRG:2B06 10 07 + lda Zp73,x ; CPU:EB08 PRG:2B08 B5 73 + cmp $060D,x ; CPU:EB0A PRG:2B0A DD 0D 06 + bcs ObjectStateLookupTables_OnCarrySet_EB18 ; CPU:EB0D PRG:2B0D B0 09 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_EB0F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_EB0F: + lda Zp73,x ; CPU:EB0F PRG:2B0F B5 73 + sec ; CPU:EB11 PRG:2B11 38 + sbc $060C,x ; CPU:EB12 PRG:2B12 FD 0C 06 + sta Zp73,x ; CPU:EB15 PRG:2B15 95 73 + rts ; CPU:EB17 PRG:2B17 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_EB18 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_EB18: + lda $060D,x ; CPU:EB18 PRG:2B18 BD 0D 06 + sta Zp73,x ; CPU:EB1B PRG:2B1B 95 73 + lda #$00 ; CPU:EB1D PRG:2B1D A9 00 + sta $060A,x ; CPU:EB1F PRG:2B1F 9D 0A 06 + rts ; CPU:EB22 PRG:2B22 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_EB23 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_EB23: + lda Zp74,x ; CPU:EB23 PRG:2B23 B5 74 + sbc #$10 ; CPU:EB25 PRG:2B25 E9 10 + sta Zp77 ; CPU:EB27 PRG:2B27 85 77 + adc #$20 ; CPU:EB29 PRG:2B29 69 20 + sta Zp78 ; CPU:EB2B PRG:2B2B 85 78 + ldy #$02 ; CPU:EB2D PRG:2B2D A0 02 + ldx #$20 ; CPU:EB2F PRG:2B2F A2 20 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_EB31 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_EB31: + lda Zp70,x ; CPU:EB31 PRG:2B31 B5 70 + beq ObjectStateLookupTables_JoinBranchPaths_EB3F ; CPU:EB33 PRG:2B33 F0 0A + lda Zp74,x ; CPU:EB35 PRG:2B35 B5 74 + cmp Zp77 ; CPU:EB37 PRG:2B37 C5 77 + bcc ObjectStateLookupTables_JoinBranchPaths_EB3F ; CPU:EB39 PRG:2B39 90 04 + cmp Zp78 ; CPU:EB3B PRG:2B3B C5 78 + bcc ObjectStateLookupTables_OnCarryClear_EB56 ; CPU:EB3D PRG:2B3D 90 17 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_EB3F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_EB3F: + dey ; CPU:EB3F PRG:2B3F 88 + beq ObjectStateLookupTables_OnZero_EB46 ; CPU:EB40 PRG:2B40 F0 04 + ldx #$30 ; CPU:EB42 PRG:2B42 A2 30 + bne ObjectStateLookupTables_OnNonzero_EB31 ; CPU:EB44 PRG:2B44 D0 EB +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_EB46 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_EB46: + jsr $EB5A ; CPU:EB46 PRG:2B46 20 5A EB + ldx SavedObjectSlot ; CPU:EB49 PRG:2B49 A6 F9 + lda #$01 ; CPU:EB4B PRG:2B4B A9 01 + sta Zp77 ; CPU:EB4D PRG:2B4D 85 77 + jsr $EB67 ; CPU:EB4F PRG:2B4F 20 67 EB + lda #$20 ; CPU:EB52 PRG:2B52 A9 20 + bne ObjectStateLookupTables_OnNonzero_EB98 ; CPU:EB54 PRG:2B54 D0 42 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarryClear_EB56 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarryClear_EB56: + lda SavedObjectSlot ; CPU:EB56 PRG:2B56 A5 F9 + bne ObjectStateLookupTables_OnNonzero_EB63 ; CPU:EB58 PRG:2B58 D0 09 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_EB5A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_EB5A: + lda $0405 ; CPU:EB5A PRG:2B5A AD 05 04 + cmp SavedObjectSlot ; CPU:EB5D PRG:2B5D C5 F9 + bne ObjectStateLookupTables_OnNonzero_EB66 ; CPU:EB5F PRG:2B5F D0 05 + lda #$00 ; CPU:EB61 PRG:2B61 A9 00 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_EB63 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_EB63: + sta $0405 ; CPU:EB63 PRG:2B63 8D 05 04 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_EB66 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_EB66: + rts ; CPU:EB66 PRG:2B66 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_EB67 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_EB67: + lda ZpC9 ; CPU:EB67 PRG:2B67 A5 C9 + and ZpCE ; CPU:EB69 PRG:2B69 25 CE + tay ; CPU:EB6B PRG:2B6B A8 + lda $EBCA,y ; CPU:EB6C PRG:2B6C B9 CA EB + pha ; CPU:EB6F PRG:2B6F 48 + lda Zp79 ; CPU:EB70 PRG:2B70 A5 79 + cmp #$04 ; CPU:EB72 PRG:2B72 C9 04 + bcs ObjectStateLookupTables_OnAtLeast04_EB7B ; CPU:EB74 PRG:2B74 B0 05 + pla ; CPU:EB76 PRG:2B76 68 + lda $EBCD,y ; CPU:EB77 PRG:2B77 B9 CD EB + pha ; CPU:EB7A PRG:2B7A 48 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnAtLeast04_EB7B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnAtLeast04_EB7B: + pla ; CPU:EB7B PRG:2B7B 68 + adc $0608,x ; CPU:EB7C PRG:2B7C 7D 08 06 + sta $0608,x ; CPU:EB7F PRG:2B7F 9D 08 06 + bcc ObjectStateLookupTables_OnCarryClear_EB95 ; CPU:EB82 PRG:2B82 90 11 + lda Zp74,x ; CPU:EB84 PRG:2B84 B5 74 + sbc Zp77 ; CPU:EB86 PRG:2B86 E5 77 + sta Zp74,x ; CPU:EB88 PRG:2B88 95 74 + bcs ObjectStateLookupTables_OnCarrySet_EB97 ; CPU:EB8A PRG:2B8A B0 0B + lda #$00 ; CPU:EB8C PRG:2B8C A9 00 + sta Zp70,x ; CPU:EB8E PRG:2B8E 95 70 + sta Zp75,x ; CPU:EB90 PRG:2B90 95 75 + dec $0404 ; CPU:EB92 PRG:2B92 CE 04 04 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarryClear_EB95 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarryClear_EB95: + pla ; CPU:EB95 PRG:2B95 68 + pla ; CPU:EB96 PRG:2B96 68 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_EB97 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_EB97: + rts ; CPU:EB97 PRG:2B97 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_EB98 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_EB98: + ldx SavedObjectSlot ; CPU:EB98 PRG:2B98 A6 F9 + clc ; CPU:EB9A PRG:2B9A 18 + adc $0609,x ; CPU:EB9B PRG:2B9B 7D 09 06 + sta $0609,x ; CPU:EB9E PRG:2B9E 9D 09 06 + bcc ObjectStateLookupTables_JoinBranchPaths_EBC3 ; CPU:EBA1 PRG:2BA1 90 20 + lda $060E,x ; CPU:EBA3 PRG:2BA3 BD 0E 06 + clc ; CPU:EBA6 PRG:2BA6 18 + adc #$01 ; CPU:EBA7 PRG:2BA7 69 01 + cmp #$03 ; CPU:EBA9 PRG:2BA9 C9 03 + bcc ObjectStateLookupTables_OnBelow03_EBAF ; CPU:EBAB PRG:2BAB 90 02 + lda #$00 ; CPU:EBAD PRG:2BAD A9 00 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnBelow03_EBAF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnBelow03_EBAF: + sta $060E,x ; CPU:EBAF PRG:2BAF 9D 0E 06 + tay ; CPU:EBB2 PRG:2BB2 A8 + lda $EBC4,y ; CPU:EBB3 PRG:2BB3 B9 C4 EB + ldx Zp79 ; CPU:EBB6 PRG:2BB6 A6 79 + cpx #$04 ; CPU:EBB8 PRG:2BB8 E0 04 + bcs ObjectStateLookupTables_OnAtLeast04_EBBF ; CPU:EBBA PRG:2BBA B0 03 + lda $EBC7,y ; CPU:EBBC PRG:2BBC B9 C7 EB +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnAtLeast04_EBBF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnAtLeast04_EBBF: + ldx SavedObjectSlot ; CPU:EBBF PRG:2BBF A6 F9 + sta Zp76,x ; CPU:EBC1 PRG:2BC1 95 76 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_EBC3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_EBC3: + rts ; CPU:EBC3 PRG:2BC3 60 + +GameplayLookupTable_EBC4: + .byte $16, $17, $18, $13, $14, $15, $C0, $FF, $80, $80, $FF, $40 ; CPU:$EBC4 PRG:2BC4 16 17 18 13 14 15 C0 FF 80 80 FF 40 + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_CallNext_EBD0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_CallNext_EBD0: + jsr $E903 ; CPU:EBD0 PRG:2BD0 20 03 E9 + ldy #$03 ; CPU:EBD3 PRG:2BD3 A0 03 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_EBD5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_EBD5: + lda $EC15,y ; CPU:EBD5 PRG:2BD5 B9 15 EC + sta a:Zp8C,y ; CPU:EBD8 PRG:2BD8 99 8C 00 + dey ; CPU:EBDB PRG:2BDB 88 + bpl ObjectStateLookupTables_OnNonnegative_EBD5 ; CPU:EBDC PRG:2BDC 10 F7 + ldx #$20 ; CPU:EBDE PRG:2BDE A2 20 + jsr $E969 ; CPU:EBE0 PRG:2BE0 20 69 E9 + lda #$05 ; CPU:EBE3 PRG:2BE3 A9 05 + sta Zp79 ; CPU:EBE5 PRG:2BE5 85 79 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_EBE7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_EBE7: + stx SavedObjectSlot ; CPU:EBE7 PRG:2BE7 86 F9 + lda Zp70,x ; CPU:EBE9 PRG:2BE9 B5 70 + beq ObjectStateLookupTables_JoinBranchPaths_EC0A ; CPU:EBEB PRG:2BEB F0 1D + jsr $CC6C ; CPU:EBED PRG:2BED 20 6C CC + lda ZpDF ; CPU:EBF0 PRG:2BF0 A5 DF + beq ObjectStateLookupTables_OnZero_EC05 ; CPU:EBF2 PRG:2BF2 F0 11 + jsr $CC8F ; CPU:EBF4 PRG:2BF4 20 8F CC + bcc ObjectStateLookupTables_JoinBranchPaths_EC0A ; CPU:EBF7 PRG:2BF7 90 11 + txa ; CPU:EBF9 PRG:2BF9 8A + jsr $F7E4 ; CPU:EBFA PRG:2BFA 20 E4 F7 + tax ; CPU:EBFD PRG:2BFD AA + dex ; CPU:EBFE PRG:2BFE CA + dex ; CPU:EBFF PRG:2BFF CA + lda #$01 ; CPU:EC00 PRG:2C00 A9 01 + sta a:ZpD9,x ; CPU:EC02 PRG:2C02 9D D9 00 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_EC05 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_EC05: + jsr $CC7E ; CPU:EC05 PRG:2C05 20 7E CC + bcs ObjectStateLookupTables_OnCarrySet_EC19 ; CPU:EC08 PRG:2C08 B0 0F +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_EC0A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_EC0A: + dec Zp79 ; CPU:EC0A PRG:2C0A C6 79 + beq ObjectStateLookupTables_JoinBranchPaths_EBC3 ; CPU:EC0C PRG:2C0C F0 B5 + ldx SavedObjectSlot ; CPU:EC0E PRG:2C0E A6 F9 + jsr $C9EC ; CPU:EC10 PRG:2C10 20 EC C9 + bne ObjectStateLookupTables_OnNonzero_EBE7 ; CPU:EC13 PRG:2C13 D0 D2 + +GameplayModeTable_EC15: + .byte $02, $06, $04, $0C ; CPU:$EC15 PRG:2C15 02 06 04 0C + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_EC19 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_EC19: + lda #$10 ; CPU:EC19 PRG:2C19 A9 10 + sta $0314 ; CPU:EC1B PRG:2C1B 8D 14 03 + jmp $E8FE ; CPU:EC1E PRG:2C1E 4C FE E8 + +GameplayInitializationTable_EC21: + .byte $A2, $FF, $8E, $06, $05, $8E, $16, $05, $8E, $26, $05, $E8, $86, $BE, $86, $B9 ; CPU:$EC21 PRG:2C21 A2 FF 8E 06 05 8E 16 05 8E 26 05 E8 86 BE 86 B9 + .byte $86, $B3, $86, $87, $86, $97, $E8, $86, $B8, $A2, $38, $86, $BF, $4C, $2D, $E5 ; CPU:$EC31 PRG:2C31 86 B3 86 87 86 97 E8 86 B8 A2 38 86 BF 4C 2D E5 + .byte $A6, $CF, $F0, $DC, $A5, $0F, $F0, $06 ; CPU:$EC41 PRG:2C41 A6 CF F0 DC A5 0F F0 06 + + jsr $DC58 ; CPU:EC49 PRG:2C49 20 58 DC + jmp $EC60 ; CPU:EC4C PRG:2C4C 4C 60 EC + jsr $D807 ; CPU:EC4F PRG:2C4F 20 07 D8 + jsr $DA11 ; CPU:EC52 PRG:2C52 20 11 DA + bcs ObjectStateLookupTables_OnCarrySet_EC5A ; CPU:EC55 PRG:2C55 B0 03 + jsr $DBB6 ; CPU:EC57 PRG:2C57 20 B6 DB +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_EC5A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_EC5A: + jsr $EE5F ; CPU:EC5A PRG:2C5A 20 5F EE + jsr $EED9 ; CPU:EC5D PRG:2C5D 20 D9 EE +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_CallNext_EC60 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_CallNext_EC60: + jsr $ED42 ; CPU:EC60 PRG:2C60 20 42 ED + jsr $ECA1 ; CPU:EC63 PRG:2C63 20 A1 EC + ldx #$20 ; CPU:EC66 PRG:2C66 A2 20 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_EC68 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_EC68: + ldy $0506,x ; CPU:EC68 PRG:2C68 BC 06 05 + bpl ObjectStateLookupTables_OnNonnegative_EC89 ; CPU:EC6B PRG:2C6B 10 1C + jsr $C9F2 ; CPU:EC6D PRG:2C6D 20 F2 C9 + bpl ObjectStateLookupTables_OnNonnegative_EC68 ; CPU:EC70 PRG:2C70 10 F6 + lda Zp52 ; CPU:EC72 PRG:2C72 A5 52 + cmp #$05 ; CPU:EC74 PRG:2C74 C9 05 + bne ObjectStateLookupTables_OnNotEqual05_EC88 ; CPU:EC76 PRG:2C76 D0 10 + lda #$00 ; CPU:EC78 PRG:2C78 A9 00 + sta Zp6C ; CPU:EC7A PRG:2C7A 85 6C + ldx #$20 ; CPU:EC7C PRG:2C7C A2 20 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_EC7E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_EC7E: + jsr $E59A ; CPU:EC7E PRG:2C7E 20 9A E5 + bcs ObjectStateLookupTables_OnCarrySet_EC8F ; CPU:EC81 PRG:2C81 B0 0C + jsr $C9F2 ; CPU:EC83 PRG:2C83 20 F2 C9 + bpl ObjectStateLookupTables_OnNonnegative_EC7E ; CPU:EC86 PRG:2C86 10 F6 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNotEqual05_EC88 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNotEqual05_EC88: + rts ; CPU:EC88 PRG:2C88 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_EC89 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_EC89: + lda #$00 ; CPU:EC89 PRG:2C89 A9 00 + sta Zp51 ; CPU:EC8B PRG:2C8B 85 51 + inc Zp6C ; CPU:EC8D PRG:2C8D E6 6C +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_EC8F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_EC8F: + lda #$FF ; CPU:EC8F PRG:2C8F A9 FF + sta $0506,x ; CPU:EC91 PRG:2C91 9D 06 05 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_EC94 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_EC94: + lda #$00 ; CPU:EC94 PRG:2C94 A9 00 + sta $0500,x ; CPU:EC96 PRG:2C96 9D 00 05 + sta $0505,x ; CPU:EC99 PRG:2C99 9D 05 05 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_EC9C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_EC9C: + lda #$67 ; CPU:EC9C PRG:2C9C A9 67 + jmp $ED26 ; CPU:EC9E PRG:2C9E 4C 26 ED +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_ECA1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_ECA1: + lda Zp69 ; CPU:ECA1 PRG:2CA1 A5 69 + beq ObjectStateLookupTables_JoinBranchPaths_ECD4 ; CPU:ECA3 PRG:2CA3 F0 2F + cmp #$01 ; CPU:ECA5 PRG:2CA5 C9 01 + bne ObjectStateLookupTables_OnNotEqual01_ECAF ; CPU:ECA7 PRG:2CA7 D0 06 + lda Zp68 ; CPU:ECA9 PRG:2CA9 A5 68 + cmp #$18 ; CPU:ECAB PRG:2CAB C9 18 + bcc ObjectStateLookupTables_JoinBranchPaths_ECD4 ; CPU:ECAD PRG:2CAD 90 25 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNotEqual01_ECAF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNotEqual01_ECAF: + lda Zp52 ; CPU:ECAF PRG:2CAF A5 52 + cmp #$04 ; CPU:ECB1 PRG:2CB1 C9 04 + bne ObjectStateLookupTables_JoinBranchPaths_ECD4 ; CPU:ECB3 PRG:2CB3 D0 1F + ldx #$90 ; CPU:ECB5 PRG:2CB5 A2 90 + lda $0500,x ; CPU:ECB7 PRG:2CB7 BD 00 05 + beq ObjectStateLookupTables_JoinBranchPaths_ECC2 ; CPU:ECBA PRG:2CBA F0 06 + jsr $CC16 ; CPU:ECBC PRG:2CBC 20 16 CC + bcs ObjectStateLookupTables_JoinBranchPaths_ECC2 ; CPU:ECBF PRG:2CBF B0 01 + rts ; CPU:ECC1 PRG:2CC1 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_ECC2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_ECC2: + lda ZpC9 ; CPU:ECC2 PRG:2CC2 A5 C9 + cmp #$02 ; CPU:ECC4 PRG:2CC4 C9 02 + beq ObjectStateLookupTables_JoinBranchPaths_ECD4 ; CPU:ECC6 PRG:2CC6 F0 0C + ldx #$20 ; CPU:ECC8 PRG:2CC8 A2 20 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_ECCA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_ECCA: + lda $0500,x ; CPU:ECCA PRG:2CCA BD 00 05 + beq ObjectStateLookupTables_OnZero_ECD5 ; CPU:ECCD PRG:2CCD F0 06 + jsr $C9F2 ; CPU:ECCF PRG:2CCF 20 F2 C9 + bpl ObjectStateLookupTables_OnNonnegative_ECCA ; CPU:ECD2 PRG:2CD2 10 F6 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_ECD4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_ECD4: + rts ; CPU:ECD4 PRG:2CD4 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_ECD5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_ECD5: + jsr $E6B0 ; CPU:ECD5 PRG:2CD5 20 B0 E6 + stx Zp8C ; CPU:ECD8 PRG:2CD8 86 8C + ldx #$20 ; CPU:ECDA PRG:2CDA A2 20 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_ECDC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_ECDC: + cpx Zp8C ; CPU:ECDC PRG:2CDC E4 8C + beq ObjectStateLookupTables_JoinBranchPaths_ECF4 ; CPU:ECDE PRG:2CDE F0 14 + lda $0500,x ; CPU:ECE0 PRG:2CE0 BD 00 05 + beq ObjectStateLookupTables_JoinBranchPaths_ECF4 ; CPU:ECE3 PRG:2CE3 F0 0F + jsr $CC16 ; CPU:ECE5 PRG:2CE5 20 16 CC + bcs ObjectStateLookupTables_OnCarrySet_ECF0 ; CPU:ECE8 PRG:2CE8 B0 06 + cmp Zp7B ; CPU:ECEA PRG:2CEA C5 7B + bcs ObjectStateLookupTables_JoinBranchPaths_ECD4 ; CPU:ECEC PRG:2CEC B0 E6 + bcc ObjectStateLookupTables_JoinBranchPaths_ECF4 ; CPU:ECEE PRG:2CEE 90 04 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_ECF0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_ECF0: + cmp #$21 ; CPU:ECF0 PRG:2CF0 C9 21 + bcc ObjectStateLookupTables_JoinBranchPaths_ECD4 ; CPU:ECF2 PRG:2CF2 90 E0 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_ECF4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_ECF4: + jsr $C9F2 ; CPU:ECF4 PRG:2CF4 20 F2 C9 + bpl ObjectStateLookupTables_OnNonnegative_ECDC ; CPU:ECF7 PRG:2CF7 10 E3 + ldx Zp8C ; CPU:ECF9 PRG:2CF9 A6 8C + lda Zp6A ; CPU:ECFB PRG:2CFB A5 6A + and #$F8 ; CPU:ECFD PRG:2CFD 29 F8 + sta $0501,x ; CPU:ECFF PRG:2CFF 9D 01 05 + lda Zp6B ; CPU:ED02 PRG:2D02 A5 6B + and #$01 ; CPU:ED04 PRG:2D04 29 01 + eor #$01 ; CPU:ED06 PRG:2D06 49 01 + sta $0502,x ; CPU:ED08 PRG:2D08 9D 02 05 + lda #$B8 ; CPU:ED0B PRG:2D0B A9 B8 + sta $0503,x ; CPU:ED0D PRG:2D0D 9D 03 05 + lda #$06 ; CPU:ED10 PRG:2D10 A9 06 + sta $0504,x ; CPU:ED12 PRG:2D12 9D 04 05 + lda #$01 ; CPU:ED15 PRG:2D15 A9 01 + sta $0505,x ; CPU:ED17 PRG:2D17 9D 05 05 + inc Zp6D ; CPU:ED1A PRG:2D1A E6 6D +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_ED1C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_ED1C: + lda #$FF ; CPU:ED1C PRG:2D1C A9 FF + sta $0506,x ; CPU:ED1E PRG:2D1E 9D 06 05 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_ED21 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_ED21: + lda #$FF ; CPU:ED21 PRG:2D21 A9 FF + sta $0500,x ; CPU:ED23 PRG:2D23 9D 00 05 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_StoreIndexAndContinue_ED26 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_StoreIndexAndContinue_ED26: + stx SavedObjectSlot ; CPU:ED26 PRG:2D26 86 F9 + sta Zp8B ; CPU:ED28 PRG:2D28 85 8B + lda #$04 ; CPU:ED2A PRG:2D2A A9 04 + sta Zp79 ; CPU:ED2C PRG:2D2C 85 79 + ldy #$00 ; CPU:ED2E PRG:2D2E A0 00 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_ED30 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_ED30: + lda $0501,x ; CPU:ED30 PRG:2D30 BD 01 05 + sta a:Zp8C,y ; CPU:ED33 PRG:2D33 99 8C 00 + iny ; CPU:ED36 PRG:2D36 C8 + inx ; CPU:ED37 PRG:2D37 E8 + dec Zp79 ; CPU:ED38 PRG:2D38 C6 79 + bne ObjectStateLookupTables_OnNonzero_ED30 ; CPU:ED3A PRG:2D3A D0 F4 + jsr $D1C4 ; CPU:ED3C PRG:2D3C 20 C4 D1 + ldx SavedObjectSlot ; CPU:ED3F PRG:2D3F A6 F9 + rts ; CPU:ED41 PRG:2D41 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_CallNext_ED42 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_CallNext_ED42: + jsr $ED51 ; CPU:ED42 PRG:2D42 20 51 ED + jsr $EDFE ; CPU:ED45 PRG:2D45 20 FE ED + lda Zp52 ; CPU:ED48 PRG:2D48 A5 52 + cmp #$03 ; CPU:ED4A PRG:2D4A C9 03 + bcs ObjectStateLookupTables_OnAtLeast03_ED65 ; CPU:ED4C PRG:2D4C B0 17 + jmp $EE28 ; CPU:ED4E PRG:2D4E 4C 28 EE +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_ED51 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_ED51: + ldy #$02 ; CPU:ED51 PRG:2D51 A0 02 + ldx #$10 ; CPU:ED53 PRG:2D53 A2 10 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_ED55 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_ED55: + lda Zp70,x ; CPU:ED55 PRG:2D55 B5 70 + beq ObjectStateLookupTables_OnZero_ED60 ; CPU:ED57 PRG:2D57 F0 07 + sty SavedTransferIndex ; CPU:ED59 PRG:2D59 84 FA + jsr $ED66 ; CPU:ED5B PRG:2D5B 20 66 ED + ldy SavedTransferIndex ; CPU:ED5E PRG:2D5E A4 FA +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_ED60 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_ED60: + ldx #$20 ; CPU:ED60 PRG:2D60 A2 20 + dey ; CPU:ED62 PRG:2D62 88 + bne ObjectStateLookupTables_OnNonzero_ED55 ; CPU:ED63 PRG:2D63 D0 F0 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnAtLeast03_ED65 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnAtLeast03_ED65: + rts ; CPU:ED65 PRG:2D65 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_ED66 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_ED66: + lda Zp77,x ; CPU:ED66 PRG:2D66 B5 77 + bne ObjectStateLookupTables_JoinBranchPaths_ED8D ; CPU:ED68 PRG:2D68 D0 23 + jsr $EDB3 ; CPU:ED6A PRG:2D6A 20 B3 ED + jsr $EE0A ; CPU:ED6D PRG:2D6D 20 0A EE + lda ZpDE ; CPU:ED70 PRG:2D70 A5 DE + beq ObjectStateLookupTables_JoinBranchPaths_ED8C ; CPU:ED72 PRG:2D72 F0 18 + lda #$00 ; CPU:ED74 PRG:2D74 A9 00 + sta Zp70,x ; CPU:ED76 PRG:2D76 95 70 + lda Zp74,x ; CPU:ED78 PRG:2D78 B5 74 + sta Zp77 ; CPU:ED7A PRG:2D7A 85 77 + ldx #$20 ; CPU:ED7C PRG:2D7C A2 20 + jsr $EEC2 ; CPU:ED7E PRG:2D7E 20 C2 EE + lda #$02 ; CPU:ED81 PRG:2D81 A9 02 + ldy ZpDE ; CPU:ED83 PRG:2D83 A4 DE + dey ; CPU:ED85 PRG:2D85 88 + beq ObjectStateLookupTables_OnZero_ED8A ; CPU:ED86 PRG:2D86 F0 02 + lda #$01 ; CPU:ED88 PRG:2D88 A9 01 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_ED8A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_ED8A: + sta Zp77,x ; CPU:ED8A PRG:2D8A 95 77 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_ED8C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_ED8C: + rts ; CPU:ED8C PRG:2D8C 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_ED8D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_ED8D: + ldy Zp77,x ; CPU:ED8D PRG:2D8D B4 77 + beq ObjectStateLookupTables_JoinBranchPaths_ED8C ; CPU:ED8F PRG:2D8F F0 FB + ldy #$00 ; CPU:ED91 PRG:2D91 A0 00 + jsr $EDE7 ; CPU:ED93 PRG:2D93 20 E7 ED + ldy Zp77,x ; CPU:ED96 PRG:2D96 B4 77 + lda Zp74,x ; CPU:ED98 PRG:2D98 B5 74 + cpy #$01 ; CPU:ED9A PRG:2D9A C0 01 + beq ObjectStateLookupTables_OnEqual01_EDA7 ; CPU:ED9C PRG:2D9C F0 09 + sec ; CPU:ED9E PRG:2D9E 38 + sbc #$02 ; CPU:ED9F PRG:2D9F E9 02 + sta Zp74,x ; CPU:EDA1 PRG:2DA1 95 74 + bcs ObjectStateLookupTables_JoinBranchPaths_ED8C ; CPU:EDA3 PRG:2DA3 B0 E7 + bcc ObjectStateLookupTables_OnCarryClear_EDAE ; CPU:EDA5 PRG:2DA5 90 07 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnEqual01_EDA7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnEqual01_EDA7: + clc ; CPU:EDA7 PRG:2DA7 18 + adc #$02 ; CPU:EDA8 PRG:2DA8 69 02 + sta Zp74,x ; CPU:EDAA PRG:2DAA 95 74 + bcc ObjectStateLookupTables_JoinBranchPaths_ED8C ; CPU:EDAC PRG:2DAC 90 DE +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarryClear_EDAE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarryClear_EDAE: + lda #$00 ; CPU:EDAE PRG:2DAE A9 00 + sta Zp70,x ; CPU:EDB0 PRG:2DB0 95 70 + rts ; CPU:EDB2 PRG:2DB2 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_EDB3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_EDB3: + lda Zp0F ; CPU:EDB3 PRG:2DB3 A5 0F + bne ObjectStateLookupTables_JoinBranchPaths_EDFA ; CPU:EDB5 PRG:2DB5 D0 43 + lda #$20 ; CPU:EDB7 PRG:2DB7 A9 20 + jsr $EDF3 ; CPU:EDB9 PRG:2DB9 20 F3 ED + bcc ObjectStateLookupTables_JoinBranchPaths_EDFA ; CPU:EDBC PRG:2DBC 90 3C + ldy ZpCA ; CPU:EDBE PRG:2DBE A4 CA +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_IncrementAndContinue_EDC0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_IncrementAndContinue_EDC0: + beq ObjectStateLookupTables_JoinBranchPaths_EDFA ; CPU:EDC0 PRG:2DC0 F0 38 + dey ; CPU:EDC2 PRG:2DC2 88 + beq ObjectStateLookupTables_OnZero_EDD3 ; CPU:EDC3 PRG:2DC3 F0 0E + inc $0608,x ; CPU:EDC5 PRG:2DC5 FE 08 06 + lda $0608,x ; CPU:EDC8 PRG:2DC8 BD 08 06 + cmp #$03 ; CPU:EDCB PRG:2DCB C9 03 + bcc ObjectStateLookupTables_JoinBranchPaths_EDDD ; CPU:EDCD PRG:2DCD 90 0E + lda #$00 ; CPU:EDCF PRG:2DCF A9 00 + beq ObjectStateLookupTables_JoinBranchPaths_EDDD ; CPU:EDD1 PRG:2DD1 F0 0A +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_EDD3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_EDD3: + dec $0608,x ; CPU:EDD3 PRG:2DD3 DE 08 06 + lda $0608,x ; CPU:EDD6 PRG:2DD6 BD 08 06 + bpl ObjectStateLookupTables_JoinBranchPaths_EDDD ; CPU:EDD9 PRG:2DD9 10 02 + lda #$02 ; CPU:EDDB PRG:2DDB A9 02 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_EDDD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_EDDD: + sta $0608,x ; CPU:EDDD PRG:2DDD 9D 08 06 + tay ; CPU:EDE0 PRG:2DE0 A8 + lda $EDFB,y ; CPU:EDE1 PRG:2DE1 B9 FB ED + sta Zp76,x ; CPU:EDE4 PRG:2DE4 95 76 + rts ; CPU:EDE6 PRG:2DE6 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_EDE7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_EDE7: + lda #$40 ; CPU:EDE7 PRG:2DE7 A9 40 + jsr $EDF3 ; CPU:EDE9 PRG:2DE9 20 F3 ED + bcc ObjectStateLookupTables_JoinBranchPaths_EDFA ; CPU:EDEC PRG:2DEC 90 0C + ldy Zp77,x ; CPU:EDEE PRG:2DEE B4 77 + jmp $EDC0 ; CPU:EDF0 PRG:2DF0 4C C0 ED +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_StoreAndContinue_EDF3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_StoreAndContinue_EDF3: + clc ; CPU:EDF3 PRG:2DF3 18 + adc $0609,x ; CPU:EDF4 PRG:2DF4 7D 09 06 + sta $0609,x ; CPU:EDF7 PRG:2DF7 9D 09 06 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_EDFA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_EDFA: + rts ; CPU:EDFA PRG:2DFA 60 + +GameplayLookupTable_EDFB: + .byte $20, $21, $35 ; CPU:$EDFB PRG:2DFB 20 21 35 + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_EDFE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_EDFE: + ldx #$30 ; CPU:EDFE PRG:2DFE A2 30 + lda Zp70,x ; CPU:EE00 PRG:2E00 B5 70 + beq ObjectStateLookupTables_JoinBranchPaths_EDFA ; CPU:EE02 PRG:2E02 F0 F6 + lda Zp75,x ; CPU:EE04 PRG:2E04 B5 75 + bne ObjectStateLookupTables_JoinBranchPaths_EDFA ; CPU:EE06 PRG:2E06 D0 F2 + beq ObjectStateLookupTables_JoinBranchPaths_ED8D ; CPU:EE08 PRG:2E08 F0 83 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_EE0A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_EE0A: + lda Zp84 ; CPU:EE0A PRG:2E0A A5 84 + cmp ZpBF ; CPU:EE0C PRG:2E0C C5 BF + beq ObjectStateLookupTables_JoinBranchPaths_EE27 ; CPU:EE0E PRG:2E0E F0 17 + bcc ObjectStateLookupTables_OnCarryClear_EE1D ; CPU:EE10 PRG:2E10 90 0B + dec Zp84 ; CPU:EE12 PRG:2E12 C6 84 + lda Zp84 ; CPU:EE14 PRG:2E14 A5 84 + cmp ZpBF ; CPU:EE16 PRG:2E16 C5 BF + beq ObjectStateLookupTables_JoinBranchPaths_EE27 ; CPU:EE18 PRG:2E18 F0 0D + dec Zp84 ; CPU:EE1A PRG:2E1A C6 84 + rts ; CPU:EE1C PRG:2E1C 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarryClear_EE1D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarryClear_EE1D: + inc Zp84 ; CPU:EE1D PRG:2E1D E6 84 + lda Zp84 ; CPU:EE1F PRG:2E1F A5 84 + cmp ZpBF ; CPU:EE21 PRG:2E21 C5 BF + beq ObjectStateLookupTables_JoinBranchPaths_EE27 ; CPU:EE23 PRG:2E23 F0 02 + inc Zp84 ; CPU:EE25 PRG:2E25 E6 84 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_EE27 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_EE27: + rts ; CPU:EE27 PRG:2E27 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_CallNext_EE28 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_CallNext_EE28: + jsr $F7DA ; CPU:EE28 PRG:2E28 20 DA F7 + lda $0500,x ; CPU:EE2B PRG:2E2B BD 00 05 + beq ObjectStateLookupTables_JoinBranchPaths_EE27 ; CPU:EE2E PRG:2E2E F0 F7 + lda $0509,x ; CPU:EE30 PRG:2E30 BD 09 05 + clc ; CPU:EE33 PRG:2E33 18 + adc #$80 ; CPU:EE34 PRG:2E34 69 80 + sta $0509,x ; CPU:EE36 PRG:2E36 9D 09 05 + bcc ObjectStateLookupTables_JoinBranchPaths_EE27 ; CPU:EE39 PRG:2E39 90 EC + lda $0501,x ; CPU:EE3B PRG:2E3B BD 01 05 + sec ; CPU:EE3E PRG:2E3E 38 + sbc #$02 ; CPU:EE3F PRG:2E3F E9 02 + sta $0501,x ; CPU:EE41 PRG:2E41 9D 01 05 + bcs ObjectStateLookupTables_OnCarrySet_EE4E ; CPU:EE44 PRG:2E44 B0 08 + lda $0502,x ; CPU:EE46 PRG:2E46 BD 02 05 + eor #$01 ; CPU:EE49 PRG:2E49 49 01 + sta $0502,x ; CPU:EE4B PRG:2E4B 9D 02 05 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_EE4E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_EE4E: + ldy $0504,x ; CPU:EE4E PRG:2E4E BC 04 05 + iny ; CPU:EE51 PRG:2E51 C8 + tya ; CPU:EE52 PRG:2E52 98 + cpy #$0A ; CPU:EE53 PRG:2E53 C0 0A + bcc ObjectStateLookupTables_OnBelow0A_EE59 ; CPU:EE55 PRG:2E55 90 02 + lda #$06 ; CPU:EE57 PRG:2E57 A9 06 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnBelow0A_EE59 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnBelow0A_EE59: + sta $0504,x ; CPU:EE59 PRG:2E59 9D 04 05 + jmp $ED21 ; CPU:EE5C PRG:2E5C 4C 21 ED +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_EE5F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_EE5F: + lda ZpBE ; CPU:EE5F PRG:2E5F A5 BE + ora Zp87 ; CPU:EE61 PRG:2E61 05 87 + bne ObjectStateLookupTables_JoinBranchPaths_EE8F ; CPU:EE63 PRG:2E63 D0 2A + lda Zp80 ; CPU:EE65 PRG:2E65 A5 80 + beq ObjectStateLookupTables_JoinBranchPaths_EE8F ; CPU:EE67 PRG:2E67 F0 26 + lda #$08 ; CPU:EE69 PRG:2E69 A9 08 + sta Zp77 ; CPU:EE6B PRG:2E6B 85 77 + jsr $EF74 ; CPU:EE6D PRG:2E6D 20 74 EF + ldx #$20 ; CPU:EE70 PRG:2E70 A2 20 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_EE72 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_EE72: + lda $0506,x ; CPU:EE72 PRG:2E72 BD 06 05 + bpl ObjectStateLookupTables_JoinBranchPaths_EE86 ; CPU:EE75 PRG:2E75 10 0F + lda $0500,x ; CPU:EE77 PRG:2E77 BD 00 05 + beq ObjectStateLookupTables_JoinBranchPaths_EE86 ; CPU:EE7A PRG:2E7A F0 0A + jsr $EF53 ; CPU:EE7C PRG:2E7C 20 53 EF + bcs ObjectStateLookupTables_JoinBranchPaths_EE86 ; CPU:EE7F PRG:2E7F B0 05 + jsr $CC8F ; CPU:EE81 PRG:2E81 20 8F CC + bcs ObjectStateLookupTables_OnCarrySet_EE90 ; CPU:EE84 PRG:2E84 B0 0A +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_EE86 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_EE86: + jsr $C9F2 ; CPU:EE86 PRG:2E86 20 F2 C9 + bpl ObjectStateLookupTables_OnNonnegative_EE72 ; CPU:EE89 PRG:2E89 10 E7 + lda #$00 ; CPU:EE8B PRG:2E8B A9 00 + sta ZpBE ; CPU:EE8D PRG:2E8D 85 BE +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_EE8F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_EE8F: + rts ; CPU:EE8F PRG:2E8F 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_EE90 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_EE90: + inc ZpBE ; CPU:EE90 PRG:2E90 E6 BE + lda #$67 ; CPU:EE92 PRG:2E92 A9 67 + sta $0506,x ; CPU:EE94 PRG:2E94 9D 06 05 + ldx #$30 ; CPU:EE97 PRG:2E97 A2 30 + jsr $EEC2 ; CPU:EE99 PRG:2E99 20 C2 EE + lda ZpCA ; CPU:EE9C PRG:2E9C A5 CA + beq ObjectStateLookupTables_OnZero_EEB5 ; CPU:EE9E PRG:2E9E F0 15 + sec ; CPU:EEA0 PRG:2EA0 38 + sbc #$01 ; CPU:EEA1 PRG:2EA1 E9 01 + beq ObjectStateLookupTables_OnZero_EEAD ; CPU:EEA3 PRG:2EA3 F0 08 + lda #$01 ; CPU:EEA5 PRG:2EA5 A9 01 + sta Zp77 ; CPU:EEA7 PRG:2EA7 85 77 + lda #$02 ; CPU:EEA9 PRG:2EA9 A9 02 + bne ObjectStateLookupTables_OnNonzero_EEBB ; CPU:EEAB PRG:2EAB D0 0E +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_EEAD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_EEAD: + lda #$02 ; CPU:EEAD PRG:2EAD A9 02 + sta Zp77 ; CPU:EEAF PRG:2EAF 85 77 + lda #$01 ; CPU:EEB1 PRG:2EB1 A9 01 + bne ObjectStateLookupTables_OnNonzero_EEBB ; CPU:EEB3 PRG:2EB3 D0 06 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_EEB5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_EEB5: + lda #$02 ; CPU:EEB5 PRG:2EB5 A9 02 + sta Zp77 ; CPU:EEB7 PRG:2EB7 85 77 + lda #$00 ; CPU:EEB9 PRG:2EB9 A9 00 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_EEBB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_EEBB: + sta ZpA7 ; CPU:EEBB PRG:2EBB 85 A7 + lda Zp77 ; CPU:EEBD PRG:2EBD A5 77 + sta Zp87 ; CPU:EEBF PRG:2EBF 85 87 + rts ; CPU:EEC1 PRG:2EC1 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_EEC2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_EEC2: + lda #$01 ; CPU:EEC2 PRG:2EC2 A9 01 + sta Zp70,x ; CPU:EEC4 PRG:2EC4 95 70 + lda #$B8 ; CPU:EEC6 PRG:2EC6 A9 B8 + sta Zp73,x ; CPU:EEC8 PRG:2EC8 95 73 + lda Zp77 ; CPU:EECA PRG:2ECA A5 77 + sta Zp74,x ; CPU:EECC PRG:2ECC 95 74 + lda #$00 ; CPU:EECE PRG:2ECE A9 00 + sta Zp75,x ; CPU:EED0 PRG:2ED0 95 75 + sta Zp77,x ; CPU:EED2 PRG:2ED2 95 77 + lda #$20 ; CPU:EED4 PRG:2ED4 A9 20 + sta Zp76,x ; CPU:EED6 PRG:2ED6 95 76 + rts ; CPU:EED8 PRG:2ED8 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_EED9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_EED9: + ldx ZpB3 ; CPU:EED9 PRG:2ED9 A6 B3 + bne ObjectStateLookupTables_OnNonzero_EEE9 ; CPU:EEDB PRG:2EDB D0 0C + lda ZpDF ; CPU:EEDD PRG:2EDD A5 DF + bne ObjectStateLookupTables_OnNonzero_EEEA ; CPU:EEDF PRG:2EDF D0 09 + lda ZpBE ; CPU:EEE1 PRG:2EE1 A5 BE + beq ObjectStateLookupTables_JoinBranchPaths_EF38 ; CPU:EEE3 PRG:2EE3 F0 53 + ldx #$01 ; CPU:EEE5 PRG:2EE5 A2 01 + stx Zp0F ; CPU:EEE7 PRG:2EE7 86 0F +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_EEE9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_EEE9: + rts ; CPU:EEE9 PRG:2EE9 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_EEEA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_EEEA: + jsr $E903 ; CPU:EEEA PRG:2EEA 20 03 E9 + ldx #$10 ; CPU:EEED PRG:2EED A2 10 + lda Zp70,x ; CPU:EEEF PRG:2EEF B5 70 + beq ObjectStateLookupTables_OnZero_EEFF ; CPU:EEF1 PRG:2EF1 F0 0C + lda #$00 ; CPU:EEF3 PRG:2EF3 A9 00 + sta Zp77 ; CPU:EEF5 PRG:2EF5 85 77 + jsr $EF74 ; CPU:EEF7 PRG:2EF7 20 74 EF + jsr $CC8F ; CPU:EEFA PRG:2EFA 20 8F CC + bcs ObjectStateLookupTables_JoinBranchPaths_EF38 ; CPU:EEFD PRG:2EFD B0 39 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_EEFF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_EEFF: + lda Zp73 ; CPU:EEFF PRG:2EFF A5 73 + cmp #$A4 ; CPU:EF01 PRG:2F01 C9 A4 + bcc ObjectStateLookupTables_OnBelowA4_EF09 ; CPU:EF03 PRG:2F03 90 04 + lda #$01 ; CPU:EF05 PRG:2F05 A9 01 + sta ZpB3 ; CPU:EF07 PRG:2F07 85 B3 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnBelowA4_EF09 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnBelowA4_EF09: + jsr $E903 ; CPU:EF09 PRG:2F09 20 03 E9 + ldx #$20 ; CPU:EF0C PRG:2F0C A2 20 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_EF0E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_EF0E: + lda $0500,x ; CPU:EF0E PRG:2F0E BD 00 05 + beq ObjectStateLookupTables_JoinBranchPaths_EF2F ; CPU:EF11 PRG:2F11 F0 1C + jsr $EF53 ; CPU:EF13 PRG:2F13 20 53 EF + bcs ObjectStateLookupTables_JoinBranchPaths_EF2F ; CPU:EF16 PRG:2F16 B0 17 + stx SavedObjectSlot ; CPU:EF18 PRG:2F18 86 F9 + jsr $CC8F ; CPU:EF1A PRG:2F1A 20 8F CC + bcc ObjectStateLookupTables_JoinBranchPaths_EF2F ; CPU:EF1D PRG:2F1D 90 10 + txa ; CPU:EF1F PRG:2F1F 8A + jsr $F7DF ; CPU:EF20 PRG:2F20 20 DF F7 + lda #$01 ; CPU:EF23 PRG:2F23 A9 01 + sta ZpD9,x ; CPU:EF25 PRG:2F25 95 D9 + ldx SavedObjectSlot ; CPU:EF27 PRG:2F27 A6 F9 + lda Zp73 ; CPU:EF29 PRG:2F29 A5 73 + cmp #$A4 ; CPU:EF2B PRG:2F2B C9 A4 + bcs ObjectStateLookupTables_OnAtLeastA4_EF3D ; CPU:EF2D PRG:2F2D B0 0E +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_EF2F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_EF2F: + jsr $C9F2 ; CPU:EF2F PRG:2F2F 20 F2 C9 + bpl ObjectStateLookupTables_OnNonnegative_EF0E ; CPU:EF32 PRG:2F32 10 DA + ldx #$00 ; CPU:EF34 PRG:2F34 A2 00 + beq ObjectStateLookupTables_OnZero_EF3A ; CPU:EF36 PRG:2F36 F0 02 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_EF38 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_EF38: + ldx #$01 ; CPU:EF38 PRG:2F38 A2 01 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_EF3A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_EF3A: + stx ZpB8 ; CPU:EF3A PRG:2F3A 86 B8 + rts ; CPU:EF3C PRG:2F3C 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnAtLeastA4_EF3D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnAtLeastA4_EF3D: + lda #$67 ; CPU:EF3D PRG:2F3D A9 67 + sta $0506,x ; CPU:EF3F PRG:2F3F 9D 06 05 + ldx #$A0 ; CPU:EF42 PRG:2F42 A2 A0 + stx Zp73 ; CPU:EF44 PRG:2F44 86 73 + ldx #$10 ; CPU:EF46 PRG:2F46 A2 10 + jsr $EEC2 ; CPU:EF48 PRG:2F48 20 C2 EE + lda #$00 ; CPU:EF4B PRG:2F4B A9 00 + sta ZpDE ; CPU:EF4D PRG:2F4D 85 DE + sta ZpB3 ; CPU:EF4F PRG:2F4F 85 B3 + beq ObjectStateLookupTables_JoinBranchPaths_EF38 ; CPU:EF51 PRG:2F51 F0 E5 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_EF53 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_EF53: + lda #$10 ; CPU:EF53 PRG:2F53 A9 10 + sta $03C9 ; CPU:EF55 PRG:2F55 8D C9 03 + jsr $CC16 ; CPU:EF58 PRG:2F58 20 16 CC + bcs ObjectStateLookupTables_OnCarrySet_EF6F ; CPU:EF5B PRG:2F5B B0 12 + lda $0504,x ; CPU:EF5D PRG:2F5D BD 04 05 + sec ; CPU:EF60 PRG:2F60 38 + sbc #$06 ; CPU:EF61 PRG:2F61 E9 06 + tay ; CPU:EF63 PRG:2F63 A8 + lda $EF70,y ; CPU:EF64 PRG:2F64 B9 70 EF + clc ; CPU:EF67 PRG:2F67 18 + adc Zp77 ; CPU:EF68 PRG:2F68 65 77 + sta $03CB ; CPU:EF6A PRG:2F6A 8D CB 03 + bcs ObjectStateLookupTables_OnCarrySet_EF6F ; CPU:EF6D PRG:2F6D B0 00 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_EF6F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_EF6F: + rts ; CPU:EF6F PRG:2F6F 60 + +GameplayLookupTable_EF70: + .byte $00, $06, $04, $02 ; CPU:$EF70 PRG:2F70 00 06 04 02 + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_EF74 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_EF74: + ldy #$01 ; CPU:EF74 PRG:2F74 A0 01 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_EF76 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_EF76: + lda $EF8D,y ; CPU:EF76 PRG:2F76 B9 8D EF + ldx Zp77 ; CPU:EF79 PRG:2F79 A6 77 + bne ObjectStateLookupTables_OnNonzero_EF80 ; CPU:EF7B PRG:2F7B D0 03 + lda $EF8D,y ; CPU:EF7D PRG:2F7D B9 8D EF +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_EF80 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_EF80: + sta a:Zp8C,y ; CPU:EF80 PRG:2F80 99 8C 00 + dey ; CPU:EF83 PRG:2F83 88 + bpl ObjectStateLookupTables_OnNonnegative_EF76 ; CPU:EF84 PRG:2F84 10 F0 + ldy Zp77 ; CPU:EF86 PRG:2F86 A4 77 + ldx #$10 ; CPU:EF88 PRG:2F88 A2 10 + jmp $CC62 ; CPU:EF8A PRG:2F8A 4C 62 CC + +GameplayLookupTable_EF8D: + .byte $00, $18, $A6, $CF, $F0, $1F, $A5, $0F, $D0, $15 ; CPU:$EF8D PRG:2F8D 00 18 A6 CF F0 1F A5 0F D0 15 + + jsr $DA11 ; CPU:EF97 PRG:2F97 20 11 DA + jsr $F078 ; CPU:EF9A PRG:2F9A 20 78 F0 + jsr $EFC7 ; CPU:EF9D PRG:2F9D 20 C7 EF + jsr $F0B5 ; CPU:EFA0 PRG:2FA0 20 B5 F0 + jsr $F08C ; CPU:EFA3 PRG:2FA3 20 8C F0 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_CallNext_EFA6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_CallNext_EFA6: + jsr $D807 ; CPU:EFA6 PRG:2FA6 20 07 D8 + jmp $DBB6 ; CPU:EFA9 PRG:2FA9 4C B6 DB + jsr $DC58 ; CPU:EFAC PRG:2FAC 20 58 DC + jmp $EFA6 ; CPU:EFAF PRG:2FAF 4C A6 EF + +GameplayLookupTable_EFB2: + .byte $E6, $CF, $A2, $00, $86, $AF, $8E, $23, $03, $E8, $86, $B8, $A5, $6D, $29, $FC ; CPU:$EFB2 PRG:2FB2 E6 CF A2 00 86 AF 8E 23 03 E8 86 B8 A5 6D 29 FC + .byte $85, $6D, $4C, $06, $C9 ; CPU:$EFC2 PRG:2FC2 85 6D 4C 06 C9 + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_EFC7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_EFC7: + lda Zp69 ; CPU:EFC7 PRG:2FC7 A5 69 + cmp #$02 ; CPU:EFC9 PRG:2FC9 C9 02 + bcc ObjectStateLookupTables_JoinBranchPaths_EFF8 ; CPU:EFCB PRG:2FCB 90 2B + lda Zp92 ; CPU:EFCD PRG:2FCD A5 92 + beq ObjectStateLookupTables_OnEqual02_EFDC ; CPU:EFCF PRG:2FCF F0 0B + lda Zp6A ; CPU:EFD1 PRG:2FD1 A5 6A + and #$F8 ; CPU:EFD3 PRG:2FD3 29 F8 + cmp Zp94 ; CPU:EFD5 PRG:2FD5 C5 94 + beq ObjectStateLookupTables_JoinBranchPaths_EFF8 ; CPU:EFD7 PRG:2FD7 F0 1F + dec Zp92 ; CPU:EFD9 PRG:2FD9 C6 92 + rts ; CPU:EFDB PRG:2FDB 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnEqual02_EFDC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnEqual02_EFDC: + jsr $E6C9 ; CPU:EFDC PRG:2FDC 20 C9 E6 + tay ; CPU:EFDF PRG:2FDF A8 + lda $F027,y ; CPU:EFE0 PRG:2FE0 B9 27 F0 + and #$F0 ; CPU:EFE3 PRG:2FE3 29 F0 + sta Zp94 ; CPU:EFE5 PRG:2FE5 85 94 + lda Zp6A ; CPU:EFE7 PRG:2FE7 A5 6A + and #$F8 ; CPU:EFE9 PRG:2FE9 29 F8 + cmp Zp94 ; CPU:EFEB PRG:2FEB C5 94 + bne ObjectStateLookupTables_JoinBranchPaths_EFF8 ; CPU:EFED PRG:2FED D0 09 + jsr $EFF9 ; CPU:EFEF PRG:2FEF 20 F9 EF + inc Zp6D ; CPU:EFF2 PRG:2FF2 E6 6D + inc Zp6D ; CPU:EFF4 PRG:2FF4 E6 6D + inc Zp92 ; CPU:EFF6 PRG:2FF6 E6 92 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_EFF8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_EFF8: + rts ; CPU:EFF8 PRG:2FF8 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_EFF9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_EFF9: + ldx #$20 ; CPU:EFF9 PRG:2FF9 A2 20 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_EFFB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_EFFB: + lda $0500,x ; CPU:EFFB PRG:2FFB BD 00 05 + beq ObjectStateLookupTables_OnZero_F006 ; CPU:EFFE PRG:2FFE F0 06 + jsr $C9F2 ; CPU:F000 PRG:3000 20 F2 C9 + bpl ObjectStateLookupTables_OnNonnegative_EFFB ; CPU:F003 PRG:3003 10 F6 + rts ; CPU:F005 PRG:3005 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_F006 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_F006: + jsr $F067 ; CPU:F006 PRG:3006 20 67 F0 + lda $F027,y ; CPU:F009 PRG:3009 B9 27 F0 + and #$03 ; CPU:F00C PRG:300C 29 03 + sty Zp8E ; CPU:F00E PRG:300E 84 8E + tay ; CPU:F010 PRG:3010 A8 + lda $F023,y ; CPU:F011 PRG:3011 B9 23 F0 + sta $0504,x ; CPU:F014 PRG:3014 9D 04 05 + ldy Zp8E ; CPU:F017 PRG:3017 A4 8E + iny ; CPU:F019 PRG:3019 C8 + lda $F027,y ; CPU:F01A PRG:301A B9 27 F0 + sta $0503,x ; CPU:F01D PRG:301D 9D 03 05 + jmp $ED1C ; CPU:F020 PRG:3020 4C 1C ED + +AudioVoiceParameterTable: + .byte $0E, $0C, $0A, $0E, $78, $98, $B8, $98, $68, $90, $B8, $98, $78, $98, $B8, $90 ; CPU:$F023 PRG:3023 0E 0C 0A 0E 78 98 B8 98 68 90 B8 98 78 98 B8 90 + .byte $78, $90, $B8, $90, $79, $98, $B8, $90, $79, $90, $C9, $98, $79, $90, $B8, $98 ; CPU:$F033 PRG:3033 78 90 B8 90 79 98 B8 90 79 90 C9 98 79 90 B8 98 + .byte $68, $98, $C9, $98, $59, $98, $C9, $98, $7A, $98, $B9, $98, $68, $90, $B9, $78 ; CPU:$F043 PRG:3043 68 98 C9 98 59 98 C9 98 7A 98 B9 98 68 90 B9 78 + .byte $78, $98, $BA, $90, $4A, $98, $AA, $98, $6A, $98, $B9, $90, $68, $98, $AA, $78 ; CPU:$F053 PRG:3053 78 98 BA 90 4A 98 AA 98 6A 98 B9 90 68 98 AA 78 + .byte $58, $98, $C8, $98 ; CPU:$F063 PRG:3063 58 98 C8 98 + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_F067 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_F067: + lda Zp6A ; CPU:F067 PRG:3067 A5 6A + and #$F8 ; CPU:F069 PRG:3069 29 F8 + sta $0501,x ; CPU:F06B PRG:306B 9D 01 05 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_F06E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_F06E: + lda Zp6B ; CPU:F06E PRG:306E A5 6B + and #$01 ; CPU:F070 PRG:3070 29 01 + eor #$01 ; CPU:F072 PRG:3072 49 01 + sta $0502,x ; CPU:F074 PRG:3074 9D 02 05 + rts ; CPU:F077 PRG:3077 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_F078 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_F078: + ldx #$20 ; CPU:F078 PRG:3078 A2 20 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_F07A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_F07A: + jsr $E59A ; CPU:F07A PRG:307A 20 9A E5 + bcs ObjectStateLookupTables_OnCarrySet_F085 ; CPU:F07D PRG:307D B0 06 + jsr $C9F2 ; CPU:F07F PRG:307F 20 F2 C9 + bpl ObjectStateLookupTables_OnNonnegative_F07A ; CPU:F082 PRG:3082 10 F6 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_F084 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_F084: + rts ; CPU:F084 PRG:3084 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_F085 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_F085: + lda Zp6B ; CPU:F085 PRG:3085 A5 6B + beq ObjectStateLookupTables_JoinBranchPaths_F084 ; CPU:F087 PRG:3087 F0 FB + jmp $EC94 ; CPU:F089 PRG:3089 4C 94 EC +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_F08C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_F08C: + lda Zp90 ; CPU:F08C PRG:308C A5 90 + beq ObjectStateLookupTables_OnZero_F09E ; CPU:F08E PRG:308E F0 0E + dec a:ZpA7 ; CPU:F090 PRG:3090 CE A7 00 + bne ObjectStateLookupTables_JoinBranchPaths_F084 ; CPU:F093 PRG:3093 D0 EF + lda #$00 ; CPU:F095 PRG:3095 A9 00 + sta ZpA8 ; CPU:F097 PRG:3097 85 A8 + sta Zp90 ; CPU:F099 PRG:3099 85 90 + jmp $F0A8 ; CPU:F09B PRG:309B 4C A8 F0 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_F09E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_F09E: + lda ZpA8 ; CPU:F09E PRG:309E A5 A8 + beq ObjectStateLookupTables_JoinBranchPaths_F084 ; CPU:F0A0 PRG:30A0 F0 E2 + lda #$03 ; CPU:F0A2 PRG:30A2 A9 03 + sta ZpA7 ; CPU:F0A4 PRG:30A4 85 A7 + inc Zp90 ; CPU:F0A6 PRG:30A6 E6 90 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_F0A8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_F0A8: + ldx Zp91 ; CPU:F0A8 PRG:30A8 A6 91 + lda $0504,x ; CPU:F0AA PRG:30AA BD 04 05 + eor #$01 ; CPU:F0AD PRG:30AD 49 01 + sta $0504,x ; CPU:F0AF PRG:30AF 9D 04 05 + jmp $ED21 ; CPU:F0B2 PRG:30B2 4C 21 ED +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_CallNext_F0B5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_CallNext_F0B5: + jsr $D9D1 ; CPU:F0B5 PRG:30B5 20 D1 D9 + jsr $E903 ; CPU:F0B8 PRG:30B8 20 03 E9 + ldx #$20 ; CPU:F0BB PRG:30BB A2 20 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_F0BD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_F0BD: + lda $0500,x ; CPU:F0BD PRG:30BD BD 00 05 + beq ObjectStateLookupTables_JoinBranchPaths_F0EE ; CPU:F0C0 PRG:30C0 F0 2C + lda ZpCB ; CPU:F0C2 PRG:30C2 A5 CB + ora $0388 ; CPU:F0C4 PRG:30C4 0D 88 03 + bne ObjectStateLookupTables_OnNonzero_F0E4 ; CPU:F0C7 PRG:30C7 D0 1B + jsr $F102 ; CPU:F0C9 PRG:30C9 20 02 F1 + bcs ObjectStateLookupTables_JoinBranchPaths_F0EE ; CPU:F0CC PRG:30CC B0 20 + jsr $CC8F ; CPU:F0CE PRG:30CE 20 8F CC + bcc ObjectStateLookupTables_JoinBranchPaths_F0EE ; CPU:F0D1 PRG:30D1 90 1B + lda Zp73 ; CPU:F0D3 PRG:30D3 A5 73 + clc ; CPU:F0D5 PRG:30D5 18 + adc #$14 ; CPU:F0D6 PRG:30D6 69 14 + cmp $0503,x ; CPU:F0D8 PRG:30D8 DD 03 05 + bcc ObjectStateLookupTables_JoinBranchPaths_F0EE ; CPU:F0DB PRG:30DB 90 11 + sbc #$04 ; CPU:F0DD PRG:30DD E9 04 + cmp $0503,x ; CPU:F0DF PRG:30DF DD 03 05 + bcc ObjectStateLookupTables_OnCarryClear_F141 ; CPU:F0E2 PRG:30E2 90 5D +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_F0E4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_F0E4: + jsr $F0F4 ; CPU:F0E4 PRG:30E4 20 F4 F0 + bcs ObjectStateLookupTables_JoinBranchPaths_F0EE ; CPU:F0E7 PRG:30E7 B0 05 + jsr $CC7E ; CPU:F0E9 PRG:30E9 20 7E CC + bcs ObjectStateLookupTables_OnCarrySet_F131 ; CPU:F0EC PRG:30EC B0 43 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_F0EE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_F0EE: + jsr $C9F2 ; CPU:F0EE PRG:30EE 20 F2 C9 + bpl ObjectStateLookupTables_OnNonnegative_F0BD ; CPU:F0F1 PRG:30F1 10 CA + rts ; CPU:F0F3 PRG:30F3 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_F0F4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_F0F4: + lda #$0B ; CPU:F0F4 PRG:30F4 A9 0B + sta $03C8 ; CPU:F0F6 PRG:30F6 8D C8 03 + lda #$05 ; CPU:F0F9 PRG:30F9 A9 05 + clc ; CPU:F0FB PRG:30FB 18 + adc $0503,x ; CPU:F0FC PRG:30FC 7D 03 05 + sta $03CA ; CPU:F0FF PRG:30FF 8D CA 03 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_F102 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_F102: + lda #$00 ; CPU:F102 PRG:3102 A9 00 + sta $03CB ; CPU:F104 PRG:3104 8D CB 03 + lda $0504,x ; CPU:F107 PRG:3107 BD 04 05 + sec ; CPU:F10A PRG:310A 38 + sbc #$0A ; CPU:F10B PRG:310B E9 0A + lsr a ; CPU:F10D PRG:310D 4A + tay ; CPU:F10E PRG:310E A8 + lda $F12E,y ; CPU:F10F PRG:310F B9 2E F1 + sta $03C9 ; CPU:F112 PRG:3112 8D C9 03 + lda $0501,x ; CPU:F115 PRG:3115 BD 01 05 + clc ; CPU:F118 PRG:3118 18 + adc $03CB ; CPU:F119 PRG:3119 6D CB 03 + sta Zp77 ; CPU:F11C PRG:311C 85 77 + lda $0502,x ; CPU:F11E PRG:311E BD 02 05 + adc #$00 ; CPU:F121 PRG:3121 69 00 + and #$01 ; CPU:F123 PRG:3123 29 01 + sta Zp78 ; CPU:F125 PRG:3125 85 78 + jsr $CC20 ; CPU:F127 PRG:3127 20 20 CC + sta $03CB ; CPU:F12A PRG:312A 8D CB 03 + rts ; CPU:F12D PRG:312D 60 + +AudioObjectOffsetTable: + .byte $0C, $1C, $2C ; CPU:$F12E PRG:312E 0C 1C 2C + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_F131 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_F131: + ldy #$10 ; CPU:F131 PRG:3131 A0 10 + sty $0314 ; CPU:F133 PRG:3133 8C 14 03 + ldy #$00 ; CPU:F136 PRG:3136 A0 00 + sty ZpB8 ; CPU:F138 PRG:3138 84 B8 + ldy #$01 ; CPU:F13A PRG:313A A0 01 + sty ZpAF ; CPU:F13C PRG:313C 84 AF + sty Zp0F ; CPU:F13E PRG:313E 84 0F + rts ; CPU:F140 PRG:3140 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarryClear_F141 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarryClear_F141: + lda Zp74 ; CPU:F141 PRG:3141 A5 74 + sta $0338 ; CPU:F143 PRG:3143 8D 38 03 + lda Zp73 ; CPU:F146 PRG:3146 A5 73 + clc ; CPU:F148 PRG:3148 18 + adc #$0E ; CPU:F149 PRG:3149 69 0E + sta $0339 ; CPU:F14B PRG:314B 8D 39 03 + lda ZpA8 ; CPU:F14E PRG:314E A5 A8 + bne ObjectStateLookupTables_OnNonzero_F155 ; CPU:F150 PRG:3150 D0 03 + inc $0323 ; CPU:F152 PRG:3152 EE 23 03 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_F155 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_F155: + lda #$00 ; CPU:F155 PRG:3155 A9 00 + sta ZpCD ; CPU:F157 PRG:3157 85 CD + stx Zp91 ; CPU:F159 PRG:3159 86 91 + lda #$01 ; CPU:F15B PRG:315B A9 01 + sta ZpA8 ; CPU:F15D PRG:315D 85 A8 + sta $038E ; CPU:F15F PRG:315F 8D 8E 03 + rts ; CPU:F162 PRG:3162 60 + +AudioGameplaySupportData: + .byte $A5, $CF, $20, $CD, $C4, $72, $F1, $86, $F1, $CF, $F1, $49, $F6, $55, $F6, $A2 ; CPU:$F163 PRG:3163 A5 CF 20 CD C4 72 F1 86 F1 CF F1 49 F6 55 F6 A2 + .byte $00, $86, $87, $A2, $00, $86, $D0, $86, $D3, $86, $AA, $A2, $20, $20, $88, $F1 ; CPU:$F173 PRG:3173 00 86 87 A2 00 86 D0 86 D3 86 AA A2 20 20 88 F1 + .byte $4C, $06, $C9, $A2, $40, $86, $7C, $86, $8D, $A5, $AD, $4A, $85, $F8, $20, $58 ; CPU:$F183 PRG:3183 4C 06 C9 A2 40 86 7C 86 8D A5 AD 4A 85 F8 20 58 + .byte $F7, $A0, $0C, $B9, $B5, $F1, $A6, $CF, $F0, $03, $B9, $C2, $F1, $A6, $8D, $95 ; CPU:$F193 PRG:3193 F7 A0 0C B9 B5 F1 A6 CF F0 03 B9 C2 F1 A6 8D 95 + .byte $7C, $C6, $8D, $88, $10, $ED, $20, $DB, $F2, $E6, $CF, $E6, $AD, $E6, $AD, $4C ; CPU:$F1A3 PRG:31A3 7C C6 8D 88 10 ED 20 DB F2 E6 CF E6 AD E6 AD 4C + .byte $72, $F6, $01, $FE, $3C, $3C, $50, $00, $23, $09, $00, $08, $01, $00, $08, $01 ; CPU:$F1B3 PRG:31B3 72 F6 01 FE 3C 3C 50 00 23 09 00 08 01 00 08 01 + .byte $FE, $6C, $3C, $D0, $00, $2C, $09, $00, $08, $02, $00, $05, $A5, $D0, $20, $66 ; CPU:$F1C3 PRG:31C3 FE 6C 3C D0 00 2C 09 00 08 02 00 05 A5 D0 20 66 + .byte $F6, $A0, $00, $84, $D2, $A5, $D0, $C5, $87, $D0, $01, $C8, $84, $88, $B5, $70 ; CPU:$F1D3 PRG:31D3 F6 A0 00 84 D2 A5 D0 C5 87 D0 01 C8 84 88 B5 70 + .byte $F0, $30, $B5, $7F, $10, $04, $A9, $00, $F0, $06, $C9, $10, $90, $02, $A9, $0F ; CPU:$F1E3 PRG:31E3 F0 30 B5 7F 10 04 A9 00 F0 06 C9 10 90 02 A9 0F + .byte $85, $F8, $A2, $06, $A0, $08 ; CPU:$F1F3 PRG:31F3 85 F8 A2 06 A0 08 + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_F1F9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_F1F9: + cmp $F226,y ; CPU:F1F9 PRG:31F9 D9 26 F2 + bcs ObjectStateLookupTables_OnCarrySet_F202 ; CPU:F1FC PRG:31FC B0 04 + dey ; CPU:F1FE PRG:31FE 88 + dex ; CPU:F1FF PRG:31FF CA + bne ObjectStateLookupTables_OnNonzero_F1F9 ; CPU:F200 PRG:3200 D0 F7 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_F202 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_F202: + ldx WorkPointer0Lo ; CPU:F202 PRG:3202 A6 7C + sty Zp79,x ; CPU:F204 PRG:3204 94 79 + ldy SavedObjectIndex ; CPU:F206 PRG:3206 A4 F8 + lda $F22F,y ; CPU:F208 PRG:3208 B9 2F F2 + clc ; CPU:F20B PRG:320B 18 + adc Zp78,x ; CPU:F20C PRG:320C 75 78 + sta Zp78,x ; CPU:F20E PRG:320E 95 78 + bcc ObjectStateLookupTables_OnCarryClear_F215 ; CPU:F210 PRG:3210 90 03 + jsr $F23F ; CPU:F212 PRG:3212 20 3F F2 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarryClear_F215 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarryClear_F215: + lda Zp0F ; CPU:F215 PRG:3215 A5 0F + bne ObjectStateLookupTables_OnNonzero_F21F ; CPU:F217 PRG:3217 D0 06 + jsr $F342 ; CPU:F219 PRG:3219 20 42 F3 + jsr $F6CD ; CPU:F21C PRG:321C 20 CD F6 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_F21F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_F21F: + lda ZpD0 ; CPU:F21F PRG:321F A5 D0 + eor #$01 ; CPU:F221 PRG:3221 49 01 + sta ZpD0 ; CPU:F223 PRG:3223 85 D0 + rts ; CPU:F225 PRG:3225 60 + +MovementStepTable: + .byte $00, $00, $00, $01, $03, $05, $07, $09, $0C, $1C, $20, $28, $20, $28, $28, $30 ; CPU:$F226 PRG:3226 00 00 00 01 03 05 07 09 0C 1C 20 28 20 28 28 30 + .byte $30, $38, $30, $38, $40, $40, $48, $54, $5C ; CPU:$F236 PRG:3236 30 38 30 38 40 40 48 54 5C + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_F23F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_F23F: + ldx WorkPointer0Lo ; CPU:F23F PRG:323F A6 7C + lda Zp7A,x ; CPU:F241 PRG:3241 B5 7A + cmp #$00 ; CPU:F243 PRG:3243 C9 00 + beq ObjectStateLookupTables_OnEqual00_F288 ; CPU:F245 PRG:3245 F0 41 + cmp #$01 ; CPU:F247 PRG:3247 C9 01 + beq ObjectStateLookupTables_OnEqual01_F290 ; CPU:F249 PRG:3249 F0 45 + cmp #$02 ; CPU:F24B PRG:324B C9 02 + beq ObjectStateLookupTables_OnEqual02_F257 ; CPU:F24D PRG:324D F0 08 + lda #$02 ; CPU:F24F PRG:324F A9 02 + sta Zp7A,x ; CPU:F251 PRG:3251 95 7A + lda #$00 ; CPU:F253 PRG:3253 A9 00 + sta Zp7B,x ; CPU:F255 PRG:3255 95 7B +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnEqual02_F257 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnEqual02_F257: + lda Zp7B,x ; CPU:F257 PRG:3257 B5 7B + beq ObjectStateLookupTables_JoinBranchPaths_F267 ; CPU:F259 PRG:3259 F0 0C + lda WorkPointer0Lo,x ; CPU:F25B PRG:325B B5 7C + cmp Zp79,x ; CPU:F25D PRG:325D D5 79 + bcc ObjectStateLookupTables_JoinBranchPaths_F267 ; CPU:F25F PRG:325F 90 06 + lda #$00 ; CPU:F261 PRG:3261 A9 00 + sta Zp7A,x ; CPU:F263 PRG:3263 95 7A + beq ObjectStateLookupTables_JoinBranchPaths_F2BE ; CPU:F265 PRG:3265 F0 57 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_F267 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_F267: + inc ZpD2 ; CPU:F267 PRG:3267 E6 D2 + lda Zp76,x ; CPU:F269 PRG:3269 B5 76 + sec ; CPU:F26B PRG:326B 38 + sbc #$01 ; CPU:F26C PRG:326C E9 01 + sta Zp76,x ; CPU:F26E PRG:326E 95 76 + cmp #$2A ; CPU:F270 PRG:3270 C9 2A + bne ObjectStateLookupTables_OnNotEqual2A_F27A ; CPU:F272 PRG:3272 D0 06 + lda #$01 ; CPU:F274 PRG:3274 A9 01 + sta Zp7B,x ; CPU:F276 PRG:3276 95 7B + bne ObjectStateLookupTables_OnNonzero_F27E ; CPU:F278 PRG:3278 D0 04 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNotEqual2A_F27A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNotEqual2A_F27A: + cmp #$2B ; CPU:F27A PRG:327A C9 2B + bne ObjectStateLookupTables_JoinBranchPaths_F2BE ; CPU:F27C PRG:327C D0 40 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_F27E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_F27E: + sec ; CPU:F27E PRG:327E 38 + lda Zp74,x ; CPU:F27F PRG:327F B5 74 + sbc #$03 ; CPU:F281 PRG:3281 E9 03 + sta Zp74,x ; CPU:F283 PRG:3283 95 74 + jmp $F2BE ; CPU:F285 PRG:3285 4C BE F2 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnEqual00_F288 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnEqual00_F288: + lda #$01 ; CPU:F288 PRG:3288 A9 01 + sta Zp7A,x ; CPU:F28A PRG:328A 95 7A + lda #$00 ; CPU:F28C PRG:328C A9 00 + sta Zp7B,x ; CPU:F28E PRG:328E 95 7B +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnEqual01_F290 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnEqual01_F290: + lda Zp7B,x ; CPU:F290 PRG:3290 B5 7B + beq ObjectStateLookupTables_JoinBranchPaths_F2A0 ; CPU:F292 PRG:3292 F0 0C + lda WorkPointer0Lo,x ; CPU:F294 PRG:3294 B5 7C + cmp Zp79,x ; CPU:F296 PRG:3296 D5 79 + bcc ObjectStateLookupTables_JoinBranchPaths_F2A0 ; CPU:F298 PRG:3298 90 06 + lda #$03 ; CPU:F29A PRG:329A A9 03 + sta Zp7A,x ; CPU:F29C PRG:329C 95 7A + bne ObjectStateLookupTables_JoinBranchPaths_F2BE ; CPU:F29E PRG:329E D0 1E +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_F2A0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_F2A0: + inc ZpD2 ; CPU:F2A0 PRG:32A0 E6 D2 + lda Zp76,x ; CPU:F2A2 PRG:32A2 B5 76 + clc ; CPU:F2A4 PRG:32A4 18 + adc #$01 ; CPU:F2A5 PRG:32A5 69 01 + sta Zp76,x ; CPU:F2A7 PRG:32A7 95 76 + cmp #$2C ; CPU:F2A9 PRG:32A9 C9 2C + bne ObjectStateLookupTables_OnNotEqual2C_F2B3 ; CPU:F2AB PRG:32AB D0 06 + lda #$01 ; CPU:F2AD PRG:32AD A9 01 + sta Zp7B,x ; CPU:F2AF PRG:32AF 95 7B + bne ObjectStateLookupTables_OnNonzero_F2B7 ; CPU:F2B1 PRG:32B1 D0 04 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNotEqual2C_F2B3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNotEqual2C_F2B3: + cmp #$2B ; CPU:F2B3 PRG:32B3 C9 2B + bne ObjectStateLookupTables_JoinBranchPaths_F2BE ; CPU:F2B5 PRG:32B5 D0 07 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_F2B7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_F2B7: + clc ; CPU:F2B7 PRG:32B7 18 + lda Zp74,x ; CPU:F2B8 PRG:32B8 B5 74 + adc #$03 ; CPU:F2BA PRG:32BA 69 03 + sta Zp74,x ; CPU:F2BC PRG:32BC 95 74 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_F2BE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_F2BE: + jsr $F2DB ; CPU:F2BE PRG:32BE 20 DB F2 + ldx WorkPointer0Lo ; CPU:F2C1 PRG:32C1 A6 7C + lda Zp76,x ; CPU:F2C3 PRG:32C3 B5 76 + sec ; CPU:F2C5 PRG:32C5 38 + sbc #$2B ; CPU:F2C6 PRG:32C6 E9 2B + beq ObjectStateLookupTables_OnZero_F2D6 ; CPU:F2C8 PRG:32C8 F0 0C + bpl ObjectStateLookupTables_OnNonnegative_F2D8 ; CPU:F2CA PRG:32CA 10 0C + sta Zp77 ; CPU:F2CC PRG:32CC 85 77 + sec ; CPU:F2CE PRG:32CE 38 + lda #$00 ; CPU:F2CF PRG:32CF A9 00 + sbc Zp77 ; CPU:F2D1 PRG:32D1 E5 77 + jmp $F2D8 ; CPU:F2D3 PRG:32D3 4C D8 F2 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_F2D6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_F2D6: + lda #$00 ; CPU:F2D6 PRG:32D6 A9 00 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_F2D8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_F2D8: + sta WorkPointer0Lo,x ; CPU:F2D8 PRG:32D8 95 7C + rts ; CPU:F2DA PRG:32DA 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_F2DB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_F2DB: + ldx WorkPointer0Lo ; CPU:F2DB PRG:32DB A6 7C + lda Zp70,x ; CPU:F2DD PRG:32DD B5 70 + sta Zp80,x ; CPU:F2DF PRG:32DF 95 80 + lda #$01 ; CPU:F2E1 PRG:32E1 A9 01 + sta Zp81,x ; CPU:F2E3 PRG:32E3 95 81 + lda Zp72,x ; CPU:F2E5 PRG:32E5 B5 72 + sec ; CPU:F2E7 PRG:32E7 38 + sbc #$04 ; CPU:F2E8 PRG:32E8 E9 04 + sta Zp82,x ; CPU:F2EA PRG:32EA 95 82 + lda #$34 ; CPU:F2EC PRG:32EC A9 34 + sta Zp86,x ; CPU:F2EE PRG:32EE 95 86 + lda Zp76,x ; CPU:F2F0 PRG:32F0 B5 76 + sec ; CPU:F2F2 PRG:32F2 38 + sbc #$23 ; CPU:F2F3 PRG:32F3 E9 23 + asl a ; CPU:F2F5 PRG:32F5 0A + tay ; CPU:F2F6 PRG:32F6 A8 + lda #$02 ; CPU:F2F7 PRG:32F7 A9 02 + sta Zp79 ; CPU:F2F9 PRG:32F9 85 79 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_F2FB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_F2FB: + lda $F320,y ; CPU:F2FB PRG:32FB B9 20 F3 + sta Zp77 ; CPU:F2FE PRG:32FE 85 77 + clc ; CPU:F300 PRG:3300 18 + adc Zp73,x ; CPU:F301 PRG:3301 75 73 + sta Zp83,x ; CPU:F303 PRG:3303 95 83 + iny ; CPU:F305 PRG:3305 C8 + inx ; CPU:F306 PRG:3306 E8 + dec Zp79 ; CPU:F307 PRG:3307 C6 79 + bne ObjectStateLookupTables_OnNonzero_F2FB ; CPU:F309 PRG:3309 D0 F0 + lda Zp77 ; CPU:F30B PRG:330B A5 77 + bpl ObjectStateLookupTables_OnNonnegative_F313 ; CPU:F30D PRG:330D 10 04 + bcs ObjectStateLookupTables_JoinBranchPaths_F319 ; CPU:F30F PRG:330F B0 08 + bcc ObjectStateLookupTables_OnCarryClear_F315 ; CPU:F311 PRG:3311 90 02 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_F313 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_F313: + bcc ObjectStateLookupTables_JoinBranchPaths_F319 ; CPU:F313 PRG:3313 90 04 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarryClear_F315 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarryClear_F315: + lda #$01 ; CPU:F315 PRG:3315 A9 01 + bne ObjectStateLookupTables_OnNonzero_F31B ; CPU:F317 PRG:3317 D0 02 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_F319 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_F319: + lda #$00 ; CPU:F319 PRG:3319 A9 00 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_F31B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_F31B: + eor Zp73,x ; CPU:F31B PRG:331B 55 73 + sta Zp83,x ; CPU:F31D PRG:331D 95 83 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_F31F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_F31F: + rts ; CPU:F31F PRG:331F 60 + +MovementCurveTable: + .byte $10, $CC, $17, $CE, $20, $D3, $25, $DA, $2B, $DF, $2D, $E9, $32, $F0, $34, $F8 ; CPU:$F320 PRG:3320 10 CC 17 CE 20 D3 25 DA 2B DF 2D E9 32 F0 34 F8 + .byte $35, $FE, $34, $05, $32, $0D, $2D, $14, $2A, $1D, $25, $23, $1F, $2A, $15, $32 ; CPU:$F330 PRG:3330 35 FE 34 05 32 0D 2D 14 2A 1D 25 23 1F 2A 15 32 + .byte $10, $33 ; CPU:$F340 PRG:3340 10 33 + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_F342 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_F342: + lda Zp0F ; CPU:F342 PRG:3342 A5 0F + bne ObjectStateLookupTables_JoinBranchPaths_F31F ; CPU:F344 PRG:3344 D0 D9 + ldx Zp87 ; CPU:F346 PRG:3346 A6 87 + bpl ObjectStateLookupTables_OnNonnegative_F34D ; CPU:F348 PRG:3348 10 03 + jmp $F479 ; CPU:F34A PRG:334A 4C 79 F4 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_F34D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_F34D: + lda Zp0D ; CPU:F34D PRG:334D A5 0D + and #$C0 ; CPU:F34F PRG:334F 29 C0 + beq ObjectStateLookupTables_OnZero_F356 ; CPU:F351 PRG:3351 F0 03 + jmp $F479 ; CPU:F353 PRG:3353 4C 79 F4 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_F356 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_F356: + jsr $F36D ; CPU:F356 PRG:3356 20 6D F3 + lda Zp88 ; CPU:F359 PRG:3359 A5 88 + beq ObjectStateLookupTables_JoinBranchPaths_F31F ; CPU:F35B PRG:335B F0 C2 + lda ZpD2 ; CPU:F35D PRG:335D A5 D2 + beq ObjectStateLookupTables_JoinBranchPaths_F31F ; CPU:F35F PRG:335F F0 BE + jsr $F3D4 ; CPU:F361 PRG:3361 20 D4 F3 + jsr $F39A ; CPU:F364 PRG:3364 20 9A F3 + jsr $F3B0 ; CPU:F367 PRG:3367 20 B0 F3 + jmp $F3C3 ; CPU:F36A PRG:336A 4C C3 F3 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_F36D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_F36D: + lda Zp87 ; CPU:F36D PRG:336D A5 87 + jsr $F666 ; CPU:F36F PRG:336F 20 66 F6 + lda #$01 ; CPU:F372 PRG:3372 A9 01 + sta Zp56 ; CPU:F374 PRG:3374 85 56 + ldy #$48 ; CPU:F376 PRG:3376 A0 48 + lda Zp76,x ; CPU:F378 PRG:3378 B5 76 + cmp #$2B ; CPU:F37A PRG:337A C9 2B + beq ObjectStateLookupTables_OnEqual2B_F383 ; CPU:F37C PRG:337C F0 05 + bcc ObjectStateLookupTables_OnBelow2B_F386 ; CPU:F37E PRG:337E 90 06 + iny ; CPU:F380 PRG:3380 C8 + iny ; CPU:F381 PRG:3381 C8 + iny ; CPU:F382 PRG:3382 C8 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnEqual2B_F383 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnEqual2B_F383: + iny ; CPU:F383 PRG:3383 C8 + iny ; CPU:F384 PRG:3384 C8 + iny ; CPU:F385 PRG:3385 C8 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnBelow2B_F386 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnBelow2B_F386: + sty Zp77 ; CPU:F386 PRG:3386 84 77 + lda Zp74,x ; CPU:F388 PRG:3388 B5 74 + cmp Zp77 ; CPU:F38A PRG:338A C5 77 + beq ObjectStateLookupTables_OnZero_F3AF ; CPU:F38C PRG:338C F0 21 + bcc ObjectStateLookupTables_OnCarryClear_F395 ; CPU:F38E PRG:338E 90 05 + dec Zp74 ; CPU:F390 PRG:3390 C6 74 + jmp $F588 ; CPU:F392 PRG:3392 4C 88 F5 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarryClear_F395 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarryClear_F395: + inc Zp74 ; CPU:F395 PRG:3395 E6 74 + jmp $F571 ; CPU:F397 PRG:3397 4C 71 F5 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_F39A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_F39A: + ldx WorkPointer0Lo ; CPU:F39A PRG:339A A6 7C + lda WorkPointer0Lo,x ; CPU:F39C PRG:339C B5 7C + tay ; CPU:F39E PRG:339E A8 + lda Zp71,x ; CPU:F39F PRG:339F B5 71 + cmp #$FF ; CPU:F3A1 PRG:33A1 C9 FF + beq ObjectStateLookupTables_OnEqualFF_F3AA ; CPU:F3A3 PRG:33A3 F0 05 + lda $F794,y ; CPU:F3A5 PRG:33A5 B9 94 F7 + bne ObjectStateLookupTables_OnNotEqualFF_F3AD ; CPU:F3A8 PRG:33A8 D0 03 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnEqualFF_F3AA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnEqualFF_F3AA: + lda $F79D,y ; CPU:F3AA PRG:33AA B9 9D F7 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNotEqualFF_F3AD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNotEqualFF_F3AD: + sta Zp73 ; CPU:F3AD PRG:33AD 85 73 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_F3AF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_F3AF: + rts ; CPU:F3AF PRG:33AF 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_F3B0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_F3B0: + ldx WorkPointer0Lo ; CPU:F3B0 PRG:33B0 A6 7C + lda Zp76,x ; CPU:F3B2 PRG:33B2 B5 76 + ldy #$06 ; CPU:F3B4 PRG:33B4 A0 06 + cmp #$2C ; CPU:F3B6 PRG:33B6 C9 2C + bcc ObjectStateLookupTables_JoinBranchPaths_F3C0 ; CPU:F3B8 PRG:33B8 90 06 + iny ; CPU:F3BA PRG:33BA C8 + cmp #$2E ; CPU:F3BB PRG:33BB C9 2E + bcc ObjectStateLookupTables_JoinBranchPaths_F3C0 ; CPU:F3BD PRG:33BD 90 01 + iny ; CPU:F3BF PRG:33BF C8 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_F3C0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_F3C0: + sty Zp76 ; CPU:F3C0 PRG:33C0 84 76 + rts ; CPU:F3C2 PRG:33C2 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_F3C3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_F3C3: + ldx WorkPointer0Lo ; CPU:F3C3 PRG:33C3 A6 7C + lda Zp83,x ; CPU:F3C5 PRG:33C5 B5 83 + clc ; CPU:F3C7 PRG:33C7 18 + adc #$02 ; CPU:F3C8 PRG:33C8 69 02 + sta Zp73 ; CPU:F3CA PRG:33CA 85 73 + lda Zp84,x ; CPU:F3CC PRG:33CC B5 84 + sec ; CPU:F3CE PRG:33CE 38 + sbc #$0E ; CPU:F3CF PRG:33CF E9 0E + sta Zp74 ; CPU:F3D1 PRG:33D1 85 74 + rts ; CPU:F3D3 PRG:33D3 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_CallNext_F3D4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_CallNext_F3D4: + jsr $F42E ; CPU:F3D4 PRG:33D4 20 2E F4 + jsr $F432 ; CPU:F3D7 PRG:33D7 20 32 F4 + ldx WorkPointer0Lo ; CPU:F3DA PRG:33DA A6 7C + lda Zp0C ; CPU:F3DC PRG:33DC A5 0C + and #$03 ; CPU:F3DE PRG:33DE 29 03 + beq ObjectStateLookupTables_JoinBranchPaths_F42D ; CPU:F3E0 PRG:33E0 F0 4B + eor #$03 ; CPU:F3E2 PRG:33E2 49 03 + beq ObjectStateLookupTables_JoinBranchPaths_F42D ; CPU:F3E4 PRG:33E4 F0 47 + lda Zp79,x ; CPU:F3E6 PRG:33E6 B5 79 + sta Zp78 ; CPU:F3E8 PRG:33E8 85 78 + cmp #$02 ; CPU:F3EA PRG:33EA C9 02 + bcs ObjectStateLookupTables_OnAtLeast02_F3F4 ; CPU:F3EC PRG:33EC B0 06 + lda #$40 ; CPU:F3EE PRG:33EE A9 40 + sta Zp77 ; CPU:F3F0 PRG:33F0 85 77 + bne ObjectStateLookupTables_JoinBranchPaths_F404 ; CPU:F3F2 PRG:33F2 D0 10 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnAtLeast02_F3F4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnAtLeast02_F3F4: + lda Zp0C ; CPU:F3F4 PRG:33F4 A5 0C + and #$01 ; CPU:F3F6 PRG:33F6 29 01 + bne ObjectStateLookupTables_OnNonzero_F415 ; CPU:F3F8 PRG:33F8 D0 1B + lda Zp7A,x ; CPU:F3FA PRG:33FA B5 7A + cmp #$01 ; CPU:F3FC PRG:33FC C9 01 + beq ObjectStateLookupTables_OnEqual01_F41F ; CPU:F3FE PRG:33FE F0 1F + cmp #$02 ; CPU:F400 PRG:3400 C9 02 + bne ObjectStateLookupTables_JoinBranchPaths_F42D ; CPU:F402 PRG:3402 D0 29 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_F404 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_F404: + lda WorkPointer1Lo,x ; CPU:F404 PRG:3404 B5 7E + adc #$40 ; CPU:F406 PRG:3406 69 40 + sta WorkPointer1Lo,x ; CPU:F408 PRG:3408 95 7E + bcc ObjectStateLookupTables_JoinBranchPaths_F42D ; CPU:F40A PRG:340A 90 21 + lda WorkPointer1Hi,x ; CPU:F40C PRG:340C B5 7F + cmp #$0F ; CPU:F40E PRG:340E C9 0F + bcs ObjectStateLookupTables_JoinBranchPaths_F42D ; CPU:F410 PRG:3410 B0 1B + inc WorkPointer1Hi,x ; CPU:F412 PRG:3412 F6 7F + rts ; CPU:F414 PRG:3414 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_F415 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_F415: + lda Zp7A,x ; CPU:F415 PRG:3415 B5 7A + cmp #$01 ; CPU:F417 PRG:3417 C9 01 + beq ObjectStateLookupTables_JoinBranchPaths_F404 ; CPU:F419 PRG:3419 F0 E9 + cmp #$02 ; CPU:F41B PRG:341B C9 02 + bne ObjectStateLookupTables_JoinBranchPaths_F42D ; CPU:F41D PRG:341D D0 0E +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnEqual01_F41F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnEqual01_F41F: + lda WorkPointer0Hi,x ; CPU:F41F PRG:341F B5 7D + adc #$40 ; CPU:F421 PRG:3421 69 40 + sta WorkPointer0Hi,x ; CPU:F423 PRG:3423 95 7D + bcc ObjectStateLookupTables_JoinBranchPaths_F42D ; CPU:F425 PRG:3425 90 06 + lda WorkPointer1Hi,x ; CPU:F427 PRG:3427 B5 7F + beq ObjectStateLookupTables_JoinBranchPaths_F42D ; CPU:F429 PRG:3429 F0 02 + dec WorkPointer1Hi,x ; CPU:F42B PRG:342B D6 7F +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_F42D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_F42D: + rts ; CPU:F42D PRG:342D 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_F42E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_F42E: + lda #$0D ; CPU:F42E PRG:342E A9 0D + bne ObjectStateLookupTables_OnNonzero_F434 ; CPU:F430 PRG:3430 D0 02 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_F432 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_F432: + lda #$0E ; CPU:F432 PRG:3432 A9 0E +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_F434 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_F434: + clc ; CPU:F434 PRG:3434 18 + adc WorkPointer0Lo ; CPU:F435 PRG:3435 65 7C + tax ; CPU:F437 PRG:3437 AA + lda Zp70,x ; CPU:F438 PRG:3438 B5 70 + sta Zp7B ; CPU:F43A PRG:343A 85 7B + and #$F0 ; CPU:F43C PRG:343C 29 F0 + jsr $F7E4 ; CPU:F43E PRG:343E 20 E4 F7 + tay ; CPU:F441 PRG:3441 A8 + lda Zp7B ; CPU:F442 PRG:3442 A5 7B + sbc $F7A6,y ; CPU:F444 PRG:3444 F9 A6 F7 + bcs ObjectStateLookupTables_OnCarrySet_F44B ; CPU:F447 PRG:3447 B0 02 + lda #$00 ; CPU:F449 PRG:3449 A9 00 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_F44B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_F44B: + sta Zp70,x ; CPU:F44B PRG:344B 95 70 + rts ; CPU:F44D PRG:344D 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_F44E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_F44E: + lda #$00 ; CPU:F44E PRG:344E A9 00 + sta ZpD6 ; CPU:F450 PRG:3450 85 D6 + lda ZpD5 ; CPU:F452 PRG:3452 A5 D5 + sta Zp87 ; CPU:F454 PRG:3454 85 87 + cmp ZpC7 ; CPU:F456 PRG:3456 C5 C7 + beq ObjectStateLookupTables_OnZero_F45F ; CPU:F458 PRG:3458 F0 05 + inc ZpAB ; CPU:F45A PRG:345A E6 AB + inc $0327 ; CPU:F45C PRG:345C EE 27 03 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_F45F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_F45F: + jsr $F666 ; CPU:F45F PRG:345F 20 66 F6 + lda Zp7B,x ; CPU:F462 PRG:3462 B5 7B + beq ObjectStateLookupTables_JoinBranchPaths_F474 ; CPU:F464 PRG:3464 F0 0E + lda Zp76,x ; CPU:F466 PRG:3466 B5 76 + cmp #$2B ; CPU:F468 PRG:3468 C9 2B + bcs ObjectStateLookupTables_JoinBranchPaths_F474 ; CPU:F46A PRG:346A B0 08 + lda #$01 ; CPU:F46C PRG:346C A9 01 + sta Zp7A,x ; CPU:F46E PRG:346E 95 7A + lda #$00 ; CPU:F470 PRG:3470 A9 00 + sta Zp7B,x ; CPU:F472 PRG:3472 95 7B +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_F474 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_F474: + lda #$00 ; CPU:F474 PRG:3474 A9 00 + sta ZpD3 ; CPU:F476 PRG:3476 85 D3 + rts ; CPU:F478 PRG:3478 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_F479 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_F479: + ldx ZpD3 ; CPU:F479 PRG:3479 A6 D3 + beq ObjectStateLookupTables_OnZero_F4BE ; CPU:F47B PRG:347B F0 41 + dex ; CPU:F47D PRG:347D CA + beq ObjectStateLookupTables_OnZero_F4A6 ; CPU:F47E PRG:347E F0 26 + lda $0388 ; CPU:F480 PRG:3480 AD 88 03 + bne ObjectStateLookupTables_JoinBranchPaths_F495 ; CPU:F483 PRG:3483 D0 10 + jsr $F601 ; CPU:F485 PRG:3485 20 01 F6 + bcs ObjectStateLookupTables_JoinBranchPaths_F4BD ; CPU:F488 PRG:3488 B0 33 + jsr $F612 ; CPU:F48A PRG:348A 20 12 F6 + bcc ObjectStateLookupTables_JoinBranchPaths_F495 ; CPU:F48D PRG:348D 90 06 + lda Zp0C ; CPU:F48F PRG:348F A5 0C + and #$03 ; CPU:F491 PRG:3491 29 03 + sta ZpD6 ; CPU:F493 PRG:3493 85 D6 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_F495 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_F495: + jsr $F5C6 ; CPU:F495 PRG:3495 20 C6 F5 + bcs ObjectStateLookupTables_OnCarrySet_F44E ; CPU:F498 PRG:3498 B0 B4 + jsr $DA11 ; CPU:F49A PRG:349A 20 11 DA + lda ZpD6 ; CPU:F49D PRG:349D A5 D6 + beq ObjectStateLookupTables_JoinBranchPaths_F4BD ; CPU:F49F PRG:349F F0 1C + sta ZpAF ; CPU:F4A1 PRG:34A1 85 AF + jmp $F55D ; CPU:F4A3 PRG:34A3 4C 5D F5 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_F4A6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_F4A6: + jsr $F5C6 ; CPU:F4A6 PRG:34A6 20 C6 F5 + bcs ObjectStateLookupTables_OnCarrySet_F44E ; CPU:F4A9 PRG:34A9 B0 A3 + jsr $F612 ; CPU:F4AB PRG:34AB 20 12 F6 + bcs ObjectStateLookupTables_OnCarrySet_F4BB ; CPU:F4AE PRG:34AE B0 0B + jsr $F601 ; CPU:F4B0 PRG:34B0 20 01 F6 + bcs ObjectStateLookupTables_JoinBranchPaths_F4BD ; CPU:F4B3 PRG:34B3 B0 08 + jsr $F540 ; CPU:F4B5 PRG:34B5 20 40 F5 + jmp $F51D ; CPU:F4B8 PRG:34B8 4C 1D F5 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_F4BB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_F4BB: + inc ZpD3 ; CPU:F4BB PRG:34BB E6 D3 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_F4BD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_F4BD: + rts ; CPU:F4BD PRG:34BD 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_F4BE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_F4BE: + lda #$03 ; CPU:F4BE PRG:34BE A9 03 + jsr $F80D ; CPU:F4C0 PRG:34C0 20 0D F8 + lda #$02 ; CPU:F4C3 PRG:34C3 A9 02 + sta Zp76 ; CPU:F4C5 PRG:34C5 85 76 + lda Zp87 ; CPU:F4C7 PRG:34C7 A5 87 + sta ZpC7 ; CPU:F4C9 PRG:34C9 85 C7 + jsr $F666 ; CPU:F4CB PRG:34CB 20 66 F6 + lda #$FE ; CPU:F4CE PRG:34CE A9 FE + sta Zp87 ; CPU:F4D0 PRG:34D0 85 87 + lda Zp7A,x ; CPU:F4D2 PRG:34D2 B5 7A + sta ZpAF ; CPU:F4D4 PRG:34D4 85 AF + beq ObjectStateLookupTables_OnZero_F4DE ; CPU:F4D6 PRG:34D6 F0 06 + eor #$03 ; CPU:F4D8 PRG:34D8 49 03 + beq ObjectStateLookupTables_OnZero_F4DE ; CPU:F4DA PRG:34DA F0 02 + lda Zp79,x ; CPU:F4DC PRG:34DC B5 79 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_F4DE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_F4DE: + tay ; CPU:F4DE PRG:34DE A8 + lda Zp7B,x ; CPU:F4DF PRG:34DF B5 7B + bne ObjectStateLookupTables_JoinBranchPaths_F4F5 ; CPU:F4E1 PRG:34E1 D0 12 + lda Zp7A,x ; CPU:F4E3 PRG:34E3 B5 7A + cmp #$02 ; CPU:F4E5 PRG:34E5 C9 02 + bne ObjectStateLookupTables_JoinBranchPaths_F4F5 ; CPU:F4E7 PRG:34E7 D0 0C + lda WorkPointer0Lo,x ; CPU:F4E9 PRG:34E9 B5 7C + cmp #$06 ; CPU:F4EB PRG:34EB C9 06 + bcc ObjectStateLookupTables_OnBelow06_F4F3 ; CPU:F4ED PRG:34ED 90 04 + ldy #$00 ; CPU:F4EF PRG:34EF A0 00 + beq ObjectStateLookupTables_JoinBranchPaths_F4F5 ; CPU:F4F1 PRG:34F1 F0 02 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnBelow06_F4F3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnBelow06_F4F3: + ldy #$02 ; CPU:F4F3 PRG:34F3 A0 02 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_F4F5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_F4F5: + lda $F514,y ; CPU:F4F5 PRG:34F5 B9 14 F5 + sta ZpAE ; CPU:F4F8 PRG:34F8 85 AE + lda WorkPointer0Lo,x ; CPU:F4FA PRG:34FA B5 7C + asl a ; CPU:F4FC PRG:34FC 0A + ldy Zp7B,x ; CPU:F4FD PRG:34FD B4 7B + bne ObjectStateLookupTables_OnNonzero_F504 ; CPU:F4FF PRG:34FF D0 03 + clc ; CPU:F501 PRG:3501 18 + adc #$12 ; CPU:F502 PRG:3502 69 12 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_F504 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_F504: + tay ; CPU:F504 PRG:3504 A8 + lda $F7B6,y ; CPU:F505 PRG:3505 B9 B6 F7 + sta $03A2 ; CPU:F508 PRG:3508 8D A2 03 + lda $F7B7,y ; CPU:F50B PRG:350B B9 B7 F7 + sta $03A0 ; CPU:F50E PRG:350E 8D A0 03 + inc ZpD3 ; CPU:F511 PRG:3511 E6 D3 + rts ; CPU:F513 PRG:3513 60 + +GameplayLookupTable_F514: + .byte $00, $20, $40, $60, $80, $A0, $C0, $E0, $FF ; CPU:$F514 PRG:3514 00 20 40 60 80 A0 C0 E0 FF + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_F51D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_F51D: + ldx #$00 ; CPU:F51D PRG:351D A2 00 + sec ; CPU:F51F PRG:351F 38 + lda $03A1 ; CPU:F520 PRG:3520 AD A1 03 + sbc $03A0 ; CPU:F523 PRG:3523 ED A0 03 + sta $03A1 ; CPU:F526 PRG:3526 8D A1 03 + lda $03A2 ; CPU:F529 PRG:3529 AD A2 03 + sbc #$00 ; CPU:F52C PRG:352C E9 00 + sta $03A2 ; CPU:F52E PRG:352E 8D A2 03 + bmi ObjectStateLookupTables_OnNegative_F535 ; CPU:F531 PRG:3531 30 02 + ldx #$01 ; CPU:F533 PRG:3533 A2 01 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNegative_F535 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNegative_F535: + stx ZpCB ; CPU:F535 PRG:3535 86 CB + lda Zp73 ; CPU:F537 PRG:3537 A5 73 + sec ; CPU:F539 PRG:3539 38 + sbc $03A2 ; CPU:F53A PRG:353A ED A2 03 + sta Zp73 ; CPU:F53D PRG:353D 85 73 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_F53F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_F53F: + rts ; CPU:F53F PRG:353F 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_F540 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_F540: + lda ZpAE ; CPU:F540 PRG:3540 A5 AE + beq ObjectStateLookupTables_JoinBranchPaths_F53F ; CPU:F542 PRG:3542 F0 FB + cmp #$FF ; CPU:F544 PRG:3544 C9 FF + beq ObjectStateLookupTables_OnEqualFF_F54E ; CPU:F546 PRG:3546 F0 06 + adc ZpD7 ; CPU:F548 PRG:3548 65 D7 + sta ZpD7 ; CPU:F54A PRG:354A 85 D7 + bcc ObjectStateLookupTables_JoinBranchPaths_F53F ; CPU:F54C PRG:354C 90 F1 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnEqualFF_F54E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnEqualFF_F54E: + lda Zp87 ; CPU:F54E PRG:354E A5 87 + jsr $F666 ; CPU:F550 PRG:3550 20 66 F6 + ldy WorkPointer1Hi,x ; CPU:F553 PRG:3553 B4 7F + cpy #$05 ; CPU:F555 PRG:3555 C0 05 + bcc ObjectStateLookupTables_OnBelow05_F55D ; CPU:F557 PRG:3557 90 04 + lda #$02 ; CPU:F559 PRG:3559 A9 02 + bne ObjectStateLookupTables_OnNotEqual05_F55F ; CPU:F55B PRG:355B D0 02 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnBelow05_F55D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnBelow05_F55D: + lda #$01 ; CPU:F55D PRG:355D A9 01 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNotEqual05_F55F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNotEqual05_F55F: + sta Zp56 ; CPU:F55F PRG:355F 85 56 + lda ZpAF ; CPU:F561 PRG:3561 A5 AF + cmp #$01 ; CPU:F563 PRG:3563 C9 01 + beq ObjectStateLookupTables_OnEqual01_F588 ; CPU:F565 PRG:3565 F0 21 + lda Zp74 ; CPU:F567 PRG:3567 A5 74 + sec ; CPU:F569 PRG:3569 38 + sbc Zp56 ; CPU:F56A PRG:356A E5 56 + bcc ObjectStateLookupTables_OnCarryClear_F570 ; CPU:F56C PRG:356C 90 02 + sta Zp74 ; CPU:F56E PRG:356E 85 74 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarryClear_F570 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarryClear_F570: + rts ; CPU:F570 PRG:3570 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_CallNext_F571 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_CallNext_F571: + jsr $F7FC ; CPU:F571 PRG:3571 20 FC F7 + bmi ObjectStateLookupTables_OnNegative_F587 ; CPU:F574 PRG:3574 30 11 + ldy #$04 ; CPU:F576 PRG:3576 A0 04 + ldx #$20 ; CPU:F578 PRG:3578 A2 20 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_F57A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_F57A: + lda Zp74,x ; CPU:F57A PRG:357A B5 74 + clc ; CPU:F57C PRG:357C 18 + adc Zp56 ; CPU:F57D PRG:357D 65 56 + sta Zp74,x ; CPU:F57F PRG:357F 95 74 + jsr $C9EC ; CPU:F581 PRG:3581 20 EC C9 + dey ; CPU:F584 PRG:3584 88 + bne ObjectStateLookupTables_OnNonzero_F57A ; CPU:F585 PRG:3585 D0 F3 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNegative_F587 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNegative_F587: + rts ; CPU:F587 PRG:3587 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnEqual01_F588 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnEqual01_F588: + jsr $DA05 ; CPU:F588 PRG:3588 20 05 DA + bcs ObjectStateLookupTables_OnCarrySet_F59A ; CPU:F58B PRG:358B B0 0D + clc ; CPU:F58D PRG:358D 18 + lda Zp74 ; CPU:F58E PRG:358E A5 74 + adc Zp56 ; CPU:F590 PRG:3590 65 56 + tax ; CPU:F592 PRG:3592 AA + adc #$10 ; CPU:F593 PRG:3593 69 10 + bcs ObjectStateLookupTables_OnCarrySet_F599 ; CPU:F595 PRG:3595 B0 02 + stx Zp74 ; CPU:F597 PRG:3597 86 74 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_F599 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_F599: + rts ; CPU:F599 PRG:3599 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_F59A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_F59A: + jsr $F7EE ; CPU:F59A PRG:359A 20 EE F7 + ldy #$04 ; CPU:F59D PRG:359D A0 04 + ldx #$20 ; CPU:F59F PRG:359F A2 20 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_F5A1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_F5A1: + lda Zp70,x ; CPU:F5A1 PRG:35A1 B5 70 + beq ObjectStateLookupTables_JoinBranchPaths_F5BF ; CPU:F5A3 PRG:35A3 F0 1A + lda Zp74,x ; CPU:F5A5 PRG:35A5 B5 74 + sec ; CPU:F5A7 PRG:35A7 38 + sbc Zp56 ; CPU:F5A8 PRG:35A8 E5 56 + sta Zp74,x ; CPU:F5AA PRG:35AA 95 74 + lda Zp74,x ; CPU:F5AC PRG:35AC B5 74 + cmp #$08 ; CPU:F5AE PRG:35AE C9 08 + bcs ObjectStateLookupTables_JoinBranchPaths_F5BF ; CPU:F5B0 PRG:35B0 B0 0D + txa ; CPU:F5B2 PRG:35B2 8A + and #$10 ; CPU:F5B3 PRG:35B3 29 10 + bne ObjectStateLookupTables_JoinBranchPaths_F5BF ; CPU:F5B5 PRG:35B5 D0 08 + lda #$00 ; CPU:F5B7 PRG:35B7 A9 00 + sta Zp70,x ; CPU:F5B9 PRG:35B9 95 70 + sta Zp80,x ; CPU:F5BB PRG:35BB 95 80 + beq ObjectStateLookupTables_JoinBranchPaths_F5BF ; CPU:F5BD PRG:35BD F0 00 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_F5BF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_F5BF: + jsr $C9EC ; CPU:F5BF PRG:35BF 20 EC C9 + dey ; CPU:F5C2 PRG:35C2 88 + bne ObjectStateLookupTables_OnNonzero_F5A1 ; CPU:F5C3 PRG:35C3 D0 DC + rts ; CPU:F5C5 PRG:35C5 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_CallNext_F5C6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_CallNext_F5C6: + jsr $E903 ; CPU:F5C6 PRG:35C6 20 03 E9 + lda #$01 ; CPU:F5C9 PRG:35C9 A9 01 + sta ZpD5 ; CPU:F5CB PRG:35CB 85 D5 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_F5CD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_F5CD: + lda ZpD5 ; CPU:F5CD PRG:35CD A5 D5 + ldy ZpD3 ; CPU:F5CF PRG:35CF A4 D3 + dey ; CPU:F5D1 PRG:35D1 88 + bne ObjectStateLookupTables_OnNonzero_F5D8 ; CPU:F5D2 PRG:35D2 D0 04 + cmp ZpC7 ; CPU:F5D4 PRG:35D4 C5 C7 + beq ObjectStateLookupTables_JoinBranchPaths_F5FB ; CPU:F5D6 PRG:35D6 F0 23 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonzero_F5D8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonzero_F5D8: + sec ; CPU:F5D8 PRG:35D8 38 + rol a ; CPU:F5D9 PRG:35D9 2A + adc #$02 ; CPU:F5DA PRG:35DA 69 02 + jsr $F7DA ; CPU:F5DC PRG:35DC 20 DA F7 + lda Zp70,x ; CPU:F5DF PRG:35DF B5 70 + beq ObjectStateLookupTables_JoinBranchPaths_F5FB ; CPU:F5E1 PRG:35E1 F0 18 + lda Zp75,x ; CPU:F5E3 PRG:35E3 B5 75 + bne ObjectStateLookupTables_JoinBranchPaths_F5FB ; CPU:F5E5 PRG:35E5 D0 14 + ldy #$08 ; CPU:F5E7 PRG:35E7 A0 08 + sty Zp8D ; CPU:F5E9 PRG:35E9 84 8D + sty Zp8F ; CPU:F5EB PRG:35EB 84 8F + ldy #$00 ; CPU:F5ED PRG:35ED A0 00 + sty Zp8E ; CPU:F5EF PRG:35EF 84 8E + sty Zp8C ; CPU:F5F1 PRG:35F1 84 8C + jsr $CC62 ; CPU:F5F3 PRG:35F3 20 62 CC + jsr $CC7E ; CPU:F5F6 PRG:35F6 20 7E CC + bcs ObjectStateLookupTables_JoinBranchPaths_F600 ; CPU:F5F9 PRG:35F9 B0 05 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_F5FB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_F5FB: + dec ZpD5 ; CPU:F5FB PRG:35FB C6 D5 + bpl ObjectStateLookupTables_OnNonnegative_F5CD ; CPU:F5FD PRG:35FD 10 CE + clc ; CPU:F5FF PRG:35FF 18 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_F600 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_F600: + rts ; CPU:F600 PRG:3600 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_F601 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_F601: + lda Zp73 ; CPU:F601 PRG:3601 A5 73 + cmp #$C0 ; CPU:F603 PRG:3603 C9 C0 + bcc ObjectStateLookupTables_JoinBranchPaths_F600 ; CPU:F605 PRG:3605 90 F9 + lda #$00 ; CPU:F607 PRG:3607 A9 00 + sta Zp87 ; CPU:F609 PRG:3609 85 87 + inc Zp0F ; CPU:F60B PRG:360B E6 0F + inc ZpCF ; CPU:F60D PRG:360D E6 CF + jmp $DB87 ; CPU:F60F PRG:360F 4C 87 DB +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_F612 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_F612: + lda Zp73 ; CPU:F612 PRG:3612 A5 73 + cmp #$AC ; CPU:F614 PRG:3614 C9 AC + bcc ObjectStateLookupTables_OnBelowAC_F63F ; CPU:F616 PRG:3616 90 27 + ldx #$30 ; CPU:F618 PRG:3618 A2 30 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_F61A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_F61A: + lda $0500,x ; CPU:F61A PRG:361A BD 00 05 + beq ObjectStateLookupTables_JoinBranchPaths_F63A ; CPU:F61D PRG:361D F0 1B + jsr $CC16 ; CPU:F61F PRG:361F 20 16 CC + bcc ObjectStateLookupTables_OnCarryClear_F62A ; CPU:F622 PRG:3622 90 06 + cmp #$E8 ; CPU:F624 PRG:3624 C9 E8 + bcs ObjectStateLookupTables_JoinBranchPaths_F633 ; CPU:F626 PRG:3626 B0 0B + bcc ObjectStateLookupTables_JoinBranchPaths_F63A ; CPU:F628 PRG:3628 90 10 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarryClear_F62A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarryClear_F62A: + sec ; CPU:F62A PRG:362A 38 + sbc #$00 ; CPU:F62B PRG:362B E9 00 + bcc ObjectStateLookupTables_JoinBranchPaths_F633 ; CPU:F62D PRG:362D 90 04 + cmp Zp74 ; CPU:F62F PRG:362F C5 74 + bcs ObjectStateLookupTables_JoinBranchPaths_F63A ; CPU:F631 PRG:3631 B0 07 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_F633 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_F633: + clc ; CPU:F633 PRG:3633 18 + adc #$18 ; CPU:F634 PRG:3634 69 18 + cmp Zp74 ; CPU:F636 PRG:3636 C5 74 + bcs ObjectStateLookupTables_OnCarrySet_F641 ; CPU:F638 PRG:3638 B0 07 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_F63A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_F63A: + jsr $C9F2 ; CPU:F63A PRG:363A 20 F2 C9 + bpl ObjectStateLookupTables_OnNonnegative_F61A ; CPU:F63D PRG:363D 10 DB +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnBelowAC_F63F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnBelowAC_F63F: + clc ; CPU:F63F PRG:363F 18 + rts ; CPU:F640 PRG:3640 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_F641 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_F641: + jsr $DB87 ; CPU:F641 PRG:3641 20 87 DB + inc $038E ; CPU:F644 PRG:3644 EE 8E 03 + sec ; CPU:F647 PRG:3647 38 + rts ; CPU:F648 PRG:3648 60 + +GameplayLookupTable_F649: + .byte $A4, $AB, $B9, $5B, $F6, $85, $AB, $0A, $85, $AD, $E6, $CF, $20, $CF, $F1, $4C ; CPU:$F649 PRG:3649 A4 AB B9 5B F6 85 AB 0A 85 AD E6 CF 20 CF F1 4C + .byte $58, $DC, $00, $00, $02, $02, $04, $04, $06, $06, $06, $A5, $C7 ; CPU:$F659 PRG:3659 58 DC 00 00 02 02 04 04 06 06 06 A5 C7 + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_CallNext_F666 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_CallNext_F666: + and #$01 ; CPU:F666 PRG:3666 29 01 + asl a ; CPU:F668 PRG:3668 0A + adc #$02 ; CPU:F669 PRG:3669 69 02 + jsr $F7E9 ; CPU:F66B PRG:366B 20 E9 F7 + sta WorkPointer0Lo ; CPU:F66E PRG:366E 85 7C + tax ; CPU:F670 PRG:3670 AA +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnZero_F671 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnZero_F671: + rts ; CPU:F671 PRG:3671 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnBelow08_F672 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnBelow08_F672: + lda ZpAA ; CPU:F672 PRG:3672 A5 AA + and #$03 ; CPU:F674 PRG:3674 29 03 + jsr $F7E9 ; CPU:F676 PRG:3676 20 E9 F7 + sta Zp8C ; CPU:F679 PRG:3679 85 8C + lda ZpAD ; CPU:F67B PRG:367B A5 AD + lsr a ; CPU:F67D PRG:367D 4A + eor #$01 ; CPU:F67E PRG:367E 49 01 + jsr $F666 ; CPU:F680 PRG:3680 20 66 F6 + ldy #$00 ; CPU:F683 PRG:3683 A0 00 + lda Zp74,x ; CPU:F685 PRG:3685 B5 74 + clc ; CPU:F687 PRG:3687 18 + adc Zp6A ; CPU:F688 PRG:3688 65 6A + bcc ObjectStateLookupTables_OnCarryClear_F68D ; CPU:F68A PRG:368A 90 01 + iny ; CPU:F68C PRG:368C C8 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarryClear_F68D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarryClear_F68D: + clc ; CPU:F68D PRG:368D 18 + adc #$20 ; CPU:F68E PRG:368E 69 20 + bcc ObjectStateLookupTables_OnCarryClear_F693 ; CPU:F690 PRG:3690 90 01 + iny ; CPU:F692 PRG:3692 C8 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarryClear_F693 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarryClear_F693: + ldx Zp8C ; CPU:F693 PRG:3693 A6 8C + sta $0501,x ; CPU:F695 PRG:3695 9D 01 05 + sty Zp8E ; CPU:F698 PRG:3698 84 8E + tya ; CPU:F69A PRG:369A 98 + eor Zp6B ; CPU:F69B PRG:369B 45 6B + and #$01 ; CPU:F69D PRG:369D 29 01 + sta $0502,x ; CPU:F69F PRG:369F 9D 02 05 + lda #$C0 ; CPU:F6A2 PRG:36A2 A9 C0 + sta $0503,x ; CPU:F6A4 PRG:36A4 9D 03 05 + lda #$05 ; CPU:F6A7 PRG:36A7 A9 05 + sta $0504,x ; CPU:F6A9 PRG:36A9 9D 04 05 + inc ZpAA ; CPU:F6AC PRG:36AC E6 AA + lda #$FF ; CPU:F6AE PRG:36AE A9 FF + sta $0500,x ; CPU:F6B0 PRG:36B0 9D 00 05 + jmp $ED26 ; CPU:F6B3 PRG:36B3 4C 26 ED +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnEqualFF_F6B6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnEqualFF_F6B6: + lda ZpAA ; CPU:F6B6 PRG:36B6 A5 AA + clc ; CPU:F6B8 PRG:36B8 18 + adc #$01 ; CPU:F6B9 PRG:36B9 69 01 + and #$03 ; CPU:F6BB PRG:36BB 29 03 + jsr $F7DA ; CPU:F6BD PRG:36BD 20 DA F7 + lda $0500,x ; CPU:F6C0 PRG:36C0 BD 00 05 + beq ObjectStateLookupTables_OnZero_F671 ; CPU:F6C3 PRG:36C3 F0 AC + lda #$00 ; CPU:F6C5 PRG:36C5 A9 00 + sta $0500,x ; CPU:F6C7 PRG:36C7 9D 00 05 + jmp $EC9C ; CPU:F6CA PRG:36CA 4C 9C EC +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadAndContinue_F6CD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadAndContinue_F6CD: + lda Zp69 ; CPU:F6CD PRG:36CD A5 69 + cmp #$01 ; CPU:F6CF PRG:36CF C9 01 + bcc ObjectStateLookupTables_OnBelow01_F6DD ; CPU:F6D1 PRG:36D1 90 0A + beq ObjectStateLookupTables_OnEqual01_F6D7 ; CPU:F6D3 PRG:36D3 F0 02 + bcs ObjectStateLookupTables_JoinBranchPaths_F6E3 ; CPU:F6D5 PRG:36D5 B0 0C +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnEqual01_F6D7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnEqual01_F6D7: + lda Zp68 ; CPU:F6D7 PRG:36D7 A5 68 + cmp #$0A ; CPU:F6D9 PRG:36D9 C9 0A + bcs ObjectStateLookupTables_JoinBranchPaths_F6E3 ; CPU:F6DB PRG:36DB B0 06 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnBelow01_F6DD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnBelow01_F6DD: + lda #$00 ; CPU:F6DD PRG:36DD A9 00 + sta ZpB0 ; CPU:F6DF PRG:36DF 85 B0 + sta ZpC0 ; CPU:F6E1 PRG:36E1 85 C0 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_JoinBranchPaths_F6E3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_JoinBranchPaths_F6E3: + lda ZpAD ; CPU:F6E3 PRG:36E3 A5 AD + lsr a ; CPU:F6E5 PRG:36E5 4A + bcc ObjectStateLookupTables_OnCarryClear_F6EF ; CPU:F6E6 PRG:36E6 90 07 + inc ZpAD ; CPU:F6E8 PRG:36E8 E6 AD + cmp #$08 ; CPU:F6EA PRG:36EA C9 08 + bcc ObjectStateLookupTables_OnBelow08_F672 ; CPU:F6EC PRG:36EC 90 84 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarrySet_F6EE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarrySet_F6EE: + rts ; CPU:F6EE PRG:36EE 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnCarryClear_F6EF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnCarryClear_F6EF: + sta SavedObjectIndex ; CPU:F6EF PRG:36EF 85 F8 + asl a ; CPU:F6F1 PRG:36F1 0A + tay ; CPU:F6F2 PRG:36F2 A8 + ldx Zp6B ; CPU:F6F3 PRG:36F3 A6 6B + inx ; CPU:F6F5 PRG:36F5 E8 + stx Zp7B ; CPU:F6F6 PRG:36F6 86 7B + lda $F745,y ; CPU:F6F8 PRG:36F8 B9 45 F7 + sta Zp78 ; CPU:F6FB PRG:36FB 85 78 + cmp #$FF ; CPU:F6FD PRG:36FD C9 FF + beq ObjectStateLookupTables_OnEqualFF_F6B6 ; CPU:F6FF PRG:36FF F0 B5 + cmp Zp7B ; CPU:F701 PRG:3701 C5 7B + bne ObjectStateLookupTables_OnNotEqualFF_F70C ; CPU:F703 PRG:3703 D0 07 + lda $F744,y ; CPU:F705 PRG:3705 B9 44 F7 + sta Zp77 ; CPU:F708 PRG:3708 85 77 + cmp Zp6A ; CPU:F70A PRG:370A C5 6A +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNotEqualFF_F70C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNotEqualFF_F70C: + bcs ObjectStateLookupTables_OnCarrySet_F6EE ; CPU:F70C PRG:370C B0 E0 + lda SavedObjectIndex ; CPU:F70E PRG:370E A5 F8 + jsr $F666 ; CPU:F710 PRG:3710 20 66 F6 + inc ZpAD ; CPU:F713 PRG:3713 E6 AD + jsr $CC20 ; CPU:F715 PRG:3715 20 20 CC + sta Zp74,x ; CPU:F718 PRG:3718 95 74 + lda #$3C ; CPU:F71A PRG:371A A9 3C + sta Zp73,x ; CPU:F71C PRG:371C 95 73 + lda #$3C ; CPU:F71E PRG:371E A9 3C + cpx #$20 ; CPU:F720 PRG:3720 E0 20 + beq ObjectStateLookupTables_OnEqual20_F726 ; CPU:F722 PRG:3722 F0 02 + lda #$6C ; CPU:F724 PRG:3724 A9 6C +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnEqual20_F726 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnEqual20_F726: + sta Zp72,x ; CPU:F726 PRG:3726 95 72 + lda #$01 ; CPU:F728 PRG:3728 A9 01 + sta Zp70,x ; CPU:F72A PRG:372A 95 70 + lda #$FE ; CPU:F72C PRG:372C A9 FE + sta Zp71,x ; CPU:F72E PRG:372E 95 71 + jsr $F758 ; CPU:F730 PRG:3730 20 58 F7 + ldy #$07 ; CPU:F733 PRG:3733 A0 07 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_OnNonnegative_F735 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_OnNonnegative_F735: + lda $F1C7,y ; CPU:F735 PRG:3735 B9 C7 F1 + sta WorkPointer0Lo,x ; CPU:F738 PRG:3738 95 7C + dex ; CPU:F73A PRG:373A CA + dey ; CPU:F73B PRG:373B 88 + bpl ObjectStateLookupTables_OnNonnegative_F735 ; CPU:F73C PRG:373C 10 F7 + jsr $F2DB ; CPU:F73E PRG:373E 20 DB F2 + jmp $F6B6 ; CPU:F741 PRG:3741 4C B6 F6 + +GameplayLookupTable_F744: + .byte $50, $00, $D0, $00, $50, $01, $D0, $01, $50, $02, $D0, $02, $50, $03, $D0, $03 ; CPU:$F744 PRG:3744 50 00 D0 00 50 01 D0 01 50 02 D0 02 50 03 D0 03 + .byte $50, $04, $FF, $FF ; CPU:$F754 PRG:3754 50 04 FF FF + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_LoadIndexAndContinue_F758 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_LoadIndexAndContinue_F758: + ldy Zp66 ; CPU:F758 PRG:3758 A4 66 + dey ; CPU:F75A PRG:375A 88 + tya ; CPU:F75B PRG:375B 98 + and #$03 ; CPU:F75C PRG:375C 29 03 + tay ; CPU:F75E PRG:375E A8 + lda $F76C,y ; CPU:F75F PRG:375F B9 6C F7 + clc ; CPU:F762 PRG:3762 18 + adc SavedObjectIndex ; CPU:F763 PRG:3763 65 F8 + tay ; CPU:F765 PRG:3765 A8 + lda $F770,y ; CPU:F766 PRG:3766 B9 70 F7 + sta WorkPointer1Hi,x ; CPU:F769 PRG:3769 95 7F + rts ; CPU:F76B PRG:376B 60 + +SoundRequestTable: + .byte $00, $09, $12, $1B, $0A, $0A, $0B, $0A, $0A, $0A, $0A, $0E, $0A, $0B, $0B, $0A ; CPU:$F76C PRG:376C 00 09 12 1B 0A 0A 0B 0A 0A 0A 0A 0E 0A 0B 0B 0A + .byte $0A, $0D, $0D, $0E, $0E, $0B, $0A, $0F, $0B, $0E, $0A, $0E, $0A, $0F, $0C, $0F ; CPU:$F77C PRG:377C 0A 0D 0D 0E 0E 0B 0A 0F 0B 0E 0A 0E 0A 0F 0C 0F + .byte $0F, $0F, $0F, $0F, $0F, $0F, $0F, $0A, $68, $68, $66, $64, $5D, $5B, $53, $4D ; CPU:$F78C PRG:378C 0F 0F 0F 0F 0F 0F 0F 0A 68 68 66 64 5D 5B 53 4D + .byte $46, $78, $78, $73, $74, $6C, $64, $5E, $55, $4B, $10, $0F, $0E, $0D, $0C, $0B ; CPU:$F79C PRG:379C 46 78 78 73 74 6C 64 5E 55 4B 10 0F 0E 0D 0C 0B + .byte $0A, $09, $08, $07, $06, $05, $04, $03, $02, $01, $00, $20, $00, $1E, $00, $1C ; CPU:$F7AC PRG:37AC 0A 09 08 07 06 05 04 03 02 01 00 20 00 1E 00 1C + .byte $01, $26, $01, $24, $01, $22, $01, $20, $01, $22, $01, $24, $00, $20, $00, $21 ; CPU:$F7BC PRG:37BC 01 26 01 24 01 22 01 20 01 22 01 24 00 20 00 21 + .byte $00, $22, $00, $23, $00, $24, $00, $25, $00, $26, $00, $27, $00, $28 ; CPU:$F7CC PRG:37CC 00 22 00 23 00 24 00 25 00 26 00 27 00 28 + +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_CallNext_F7DA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_CallNext_F7DA: + jsr $F7E9 ; CPU:F7DA PRG:37DA 20 E9 F7 + tax ; CPU:F7DD PRG:37DD AA + rts ; CPU:F7DE PRG:37DE 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_CallNext_F7DF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_CallNext_F7DF: + jsr $F7E4 ; CPU:F7DF PRG:37DF 20 E4 F7 + tax ; CPU:F7E2 PRG:37E2 AA + rts ; CPU:F7E3 PRG:37E3 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_Return_F7E4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_Return_F7E4: + lsr a ; CPU:F7E4 PRG:37E4 4A + lsr a ; CPU:F7E5 PRG:37E5 4A + lsr a ; CPU:F7E6 PRG:37E6 4A + lsr a ; CPU:F7E7 PRG:37E7 4A + rts ; CPU:F7E8 PRG:37E8 60 +; ----------------------------------------------------------------------------- +; Routine: ObjectStateLookupTables_Return_F7E9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ObjectStateLookupTables_Return_F7E9: + asl a ; CPU:F7E9 PRG:37E9 0A + asl a ; CPU:F7EA PRG:37EA 0A + asl a ; CPU:F7EB PRG:37EB 0A + asl a ; CPU:F7EC PRG:37EC 0A + rts ; CPU:F7ED PRG:37ED 60 +; ----------------------------------------------------------------------------- +; Routine: QueueSoundEffect +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +QueueSoundEffect: + clc ; CPU:F7EE PRG:37EE 18 + lda Zp6A ; CPU:F7EF PRG:37EF A5 6A + adc Zp56 ; CPU:F7F1 PRG:37F1 65 56 + sta Zp6A ; CPU:F7F3 PRG:37F3 85 6A + lda Zp6B ; CPU:F7F5 PRG:37F5 A5 6B + adc #$00 ; CPU:F7F7 PRG:37F7 69 00 + sta Zp6B ; CPU:F7F9 PRG:37F9 85 6B + rts ; CPU:F7FB PRG:37FB 60 +; ----------------------------------------------------------------------------- +; Routine: QueueAlternateSoundEffect +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +QueueAlternateSoundEffect: + sec ; CPU:F7FC PRG:37FC 38 + lda Zp6A ; CPU:F7FD PRG:37FD A5 6A + sbc Zp56 ; CPU:F7FF PRG:37FF E5 56 + tax ; CPU:F801 PRG:3801 AA + lda Zp6B ; CPU:F802 PRG:3802 A5 6B + sbc #$00 ; CPU:F804 PRG:3804 E9 00 + bmi QueueAlternateSoundEffect_OnNegative_F80C ; CPU:F806 PRG:3806 30 04 + stx Zp6A ; CPU:F808 PRG:3808 86 6A + sta Zp6B ; CPU:F80A PRG:380A 85 6B +; ----------------------------------------------------------------------------- +; Routine: QueueAlternateSoundEffect_OnNegative_F80C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +QueueAlternateSoundEffect_OnNegative_F80C: + rts ; CPU:F80C PRG:380C 60 +; ----------------------------------------------------------------------------- +; Routine: RequestAudioSequence +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +RequestAudioSequence: + stx Zp4F ; CPU:F80D PRG:380D 86 4F + sty Zp40 ; CPU:F80F PRG:380F 84 40 + sta Zp2F ; CPU:F811 PRG:3811 85 2F + lsr a ; CPU:F813 PRG:3813 4A + lsr a ; CPU:F814 PRG:3814 4A + lsr a ; CPU:F815 PRG:3815 4A + lsr a ; CPU:F816 PRG:3816 4A + and #$0C ; CPU:F817 PRG:3817 29 0C + sta Zp1E ; CPU:F819 PRG:3819 85 1E + lsr a ; CPU:F81B PRG:381B 4A + lsr a ; CPU:F81C PRG:381C 4A + tay ; CPU:F81D PRG:381D A8 + ldx $F878,y ; CPU:F81E PRG:381E BE 78 F8 + lda Zp2F ; CPU:F821 PRG:3821 A5 2F + and #$3F ; CPU:F823 PRG:3823 29 3F + beq RequestAudioSequence_OnZero_F85D ; CPU:F825 PRG:3825 F0 36 + cmp Zp02,x ; CPU:F827 PRG:3827 D5 02 + bcc RequestAudioSequence_JoinBranchPaths_F873 ; CPU:F829 PRG:3829 90 48 + bne RequestAudioSequence_OnNonzero_F835 ; CPU:F82B PRG:382B D0 08 + cmp #$0E ; CPU:F82D PRG:382D C9 0E + bcc RequestAudioSequence_JoinBranchPaths_F873 ; CPU:F82F PRG:382F 90 42 + cmp #$14 ; CPU:F831 PRG:3831 C9 14 + bcs RequestAudioSequence_JoinBranchPaths_F873 ; CPU:F833 PRG:3833 B0 3E +; ----------------------------------------------------------------------------- +; Routine: RequestAudioSequence_OnNonzero_F835 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +RequestAudioSequence_OnNonzero_F835: + sta Zp2F ; CPU:F835 PRG:3835 85 2F + ldy #$00 ; CPU:F837 PRG:3837 A0 00 + sty Zp02,x ; CPU:F839 PRG:3839 94 02 + asl a ; CPU:F83B PRG:383B 0A + tay ; CPU:F83C PRG:383C A8 + lda $FAD1,y ; CPU:F83D PRG:383D B9 D1 FA + sta Zp03,x ; CPU:F840 PRG:3840 95 03 + sta ZpF2 ; CPU:F842 PRG:3842 85 F2 + lda $FAD2,y ; CPU:F844 PRG:3844 B9 D2 FA + sta Zp04,x ; CPU:F847 PRG:3847 95 04 + sta ZpF3 ; CPU:F849 PRG:3849 85 F3 + ldy #$01 ; CPU:F84B PRG:384B A0 01 + sty Zp00,x ; CPU:F84D PRG:384D 94 00 + dey ; CPU:F84F PRG:384F 88 + sty Zp08,x ; CPU:F850 PRG:3850 94 08 + lda ($F2),y ; CPU:F852 PRG:3852 B1 F2 + and #$F0 ; CPU:F854 PRG:3854 29 F0 + cmp #$20 ; CPU:F856 PRG:3856 C9 20 + beq RequestAudioSequence_OnEqual20_F85B ; CPU:F858 PRG:3858 F0 01 + iny ; CPU:F85A PRG:385A C8 +; ----------------------------------------------------------------------------- +; Routine: RequestAudioSequence_OnEqual20_F85B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +RequestAudioSequence_OnEqual20_F85B: + sty Zp0A,x ; CPU:F85B PRG:385B 94 0A +; ----------------------------------------------------------------------------- +; Routine: RequestAudioSequence_OnZero_F85D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +RequestAudioSequence_OnZero_F85D: + lda #$00 ; CPU:F85D PRG:385D A9 00 + ldy Zp1E ; CPU:F85F PRG:385F A4 1E + cpy #$08 ; CPU:F861 PRG:3861 C0 08 + beq RequestAudioSequence_OnEqual08_F867 ; CPU:F863 PRG:3863 F0 02 + lda #$30 ; CPU:F865 PRG:3865 A9 30 +; ----------------------------------------------------------------------------- +; Routine: RequestAudioSequence_OnEqual08_F867 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +RequestAudioSequence_OnEqual08_F867: + sta $4000,y ; CPU:F867 PRG:3867 99 00 40 + sta $4001,y ; CPU:F86A PRG:386A 99 01 40 + lda Zp2F ; CPU:F86D PRG:386D A5 2F + and #$3F ; CPU:F86F PRG:386F 29 3F + sta Zp02,x ; CPU:F871 PRG:3871 95 02 +; ----------------------------------------------------------------------------- +; Routine: RequestAudioSequence_JoinBranchPaths_F873 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +RequestAudioSequence_JoinBranchPaths_F873: + ldx Zp4F ; CPU:F873 PRG:3873 A6 4F + ldy Zp40 ; CPU:F875 PRG:3875 A4 40 + rts ; CPU:F877 PRG:3877 60 + +AudioChannelInitializationTable: + .byte $10, $21, $32, $43 ; CPU:$F878 PRG:3878 10 21 32 43 + +; ----------------------------------------------------------------------------- +; Routine: ProcessAudioFrame +; Global: Advance all active audio channels and update NES APU registers. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ProcessAudioFrame: + ldx #$10 ; CPU:F87C PRG:387C A2 10 + ldy #$00 ; CPU:F87E PRG:387E A0 00 +; ----------------------------------------------------------------------------- +; Routine: ProcessAudioFrame_OnCarryClear_F880 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ProcessAudioFrame_OnCarryClear_F880: + stx AudioChannelStructOffset ; CPU:F880 PRG:3880 86 F4 + sty AudioApuRegisterOffset ; CPU:F882 PRG:3882 84 F5 + lda Zp02,x ; CPU:F884 PRG:3884 B5 02 + beq ProcessAudioFrame_OnZero_F88B ; CPU:F886 PRG:3886 F0 03 + jsr $F8C8 ; CPU:F888 PRG:3888 20 C8 F8 +; ----------------------------------------------------------------------------- +; Routine: ProcessAudioFrame_OnZero_F88B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ProcessAudioFrame_OnZero_F88B: + lda AudioChannelStructOffset ; CPU:F88B PRG:388B A5 F4 + clc ; CPU:F88D PRG:388D 18 + adc #$11 ; CPU:F88E PRG:388E 69 11 + cmp #$54 ; CPU:F890 PRG:3890 C9 54 + bne ProcessAudioFrame_OnNotEqual54_F895 ; CPU:F892 PRG:3892 D0 01 + rts ; CPU:F894 PRG:3894 60 +; ----------------------------------------------------------------------------- +; Routine: ProcessAudioFrame_OnNotEqual54_F895 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ProcessAudioFrame_OnNotEqual54_F895: + tax ; CPU:F895 PRG:3895 AA + lda AudioApuRegisterOffset ; CPU:F896 PRG:3896 A5 F5 + clc ; CPU:F898 PRG:3898 18 + adc #$04 ; CPU:F899 PRG:3899 69 04 + tay ; CPU:F89B PRG:389B A8 + bcc ProcessAudioFrame_OnCarryClear_F880 ; CPU:F89C PRG:389C 90 E2 +; ----------------------------------------------------------------------------- +; Routine: ProcessAudioFrame_OnNonnegative_F89E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ProcessAudioFrame_OnNonnegative_F89E: + sty Zp02,x ; CPU:F89E PRG:389E 94 02 + tya ; CPU:F8A0 PRG:38A0 98 + ldx AudioApuRegisterOffset ; CPU:F8A1 PRG:38A1 A6 F5 + cpx #$08 ; CPU:F8A3 PRG:38A3 E0 08 + beq ProcessAudioFrame_OnEqual08_F8A9 ; CPU:F8A5 PRG:38A5 F0 02 + lda #$30 ; CPU:F8A7 PRG:38A7 A9 30 +; ----------------------------------------------------------------------------- +; Routine: ProcessAudioFrame_OnEqual08_F8A9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ProcessAudioFrame_OnEqual08_F8A9: + sta $4000,x ; CPU:F8A9 PRG:38A9 9D 00 40 + rts ; CPU:F8AC PRG:38AC 60 +; ----------------------------------------------------------------------------- +; Routine: ProcessAudioFrame_JoinBranchPaths_F8AD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ProcessAudioFrame_JoinBranchPaths_F8AD: + iny ; CPU:F8AD PRG:38AD C8 + lda ($F6),y ; CPU:F8AE PRG:38AE B1 F6 + sta Zp03,x ; CPU:F8B0 PRG:38B0 95 03 + iny ; CPU:F8B2 PRG:38B2 C8 + lda ($F6),y ; CPU:F8B3 PRG:38B3 B1 F6 + sta Zp04,x ; CPU:F8B5 PRG:38B5 95 04 + iny ; CPU:F8B7 PRG:38B7 C8 + tya ; CPU:F8B8 PRG:38B8 98 + clc ; CPU:F8B9 PRG:38B9 18 + adc AudioSequencePointerLo ; CPU:F8BA PRG:38BA 65 F6 + sta Zp06,x ; CPU:F8BC PRG:38BC 95 06 + lda #$00 ; CPU:F8BE PRG:38BE A9 00 + adc AudioSequencePointerHi ; CPU:F8C0 PRG:38C0 65 F7 + sta Zp07,x ; CPU:F8C2 PRG:38C2 95 07 +; ----------------------------------------------------------------------------- +; Routine: ProcessAudioFrame_OnNonzero_F8C4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ProcessAudioFrame_OnNonzero_F8C4: + lda #$01 ; CPU:F8C4 PRG:38C4 A9 01 + sta Zp00,x ; CPU:F8C6 PRG:38C6 95 00 +; ----------------------------------------------------------------------------- +; Routine: DecodeAudioStream +; Global: Read and initialize one audio stream/channel record. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DecodeAudioStream: + ldy #$00 ; CPU:F8C8 PRG:38C8 A0 00 + lda Zp03,x ; CPU:F8CA PRG:38CA B5 03 + sta AudioSequencePointerLo ; CPU:F8CC PRG:38CC 85 F6 + lda Zp04,x ; CPU:F8CE PRG:38CE B5 04 + sta AudioSequencePointerHi ; CPU:F8D0 PRG:38D0 85 F7 + dec Zp00,x ; CPU:F8D2 PRG:38D2 D6 00 + beq DecodeAudioStream_OnZero_F8F2 ; CPU:F8D4 PRG:38D4 F0 1C + lda $0310 ; CPU:F8D6 PRG:38D6 AD 10 03 + beq DecodeAudioStream_OnZero_F8EF ; CPU:F8D9 PRG:38D9 F0 14 + lda Zp02,x ; CPU:F8DB PRG:38DB B5 02 + cmp #$16 ; CPU:F8DD PRG:38DD C9 16 + beq DecodeAudioStream_OnEqual16_F8EE ; CPU:F8DF PRG:38DF F0 0D +; ----------------------------------------------------------------------------- +; Routine: DecodeAudioStream_IncrementAndContinue_F8E1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DecodeAudioStream_IncrementAndContinue_F8E1: + inc Zp00,x ; CPU:F8E1 PRG:38E1 F6 00 + tya ; CPU:F8E3 PRG:38E3 98 + sta Zp08,x ; CPU:F8E4 PRG:38E4 95 08 + ldx AudioApuRegisterOffset ; CPU:F8E6 PRG:38E6 A6 F5 + sta $4002,x ; CPU:F8E8 PRG:38E8 9D 02 40 + sta $4003,x ; CPU:F8EB PRG:38EB 9D 03 40 +; ----------------------------------------------------------------------------- +; Routine: DecodeAudioStream_OnEqual16_F8EE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DecodeAudioStream_OnEqual16_F8EE: + rts ; CPU:F8EE PRG:38EE 60 +; ----------------------------------------------------------------------------- +; Routine: DecodeAudioStream_OnZero_F8EF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DecodeAudioStream_OnZero_F8EF: + jmp $F975 ; CPU:F8EF PRG:38EF 4C 75 F9 +; ----------------------------------------------------------------------------- +; Routine: DecodeAudioStream_OnZero_F8F2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DecodeAudioStream_OnZero_F8F2: + lda ($F6),y ; CPU:F8F2 PRG:38F2 B1 F6 + cmp #$FD ; CPU:F8F4 PRG:38F4 C9 FD + bcc DecodeAudioStream_OnBelowFD_F918 ; CPU:F8F6 PRG:38F6 90 20 + bne DecodeAudioStream_OnNotEqualFD_F902 ; CPU:F8F8 PRG:38F8 D0 08 + lda Zp0A,x ; CPU:F8FA PRG:38FA B5 0A + ora #$80 ; CPU:F8FC PRG:38FC 09 80 + sta Zp0A,x ; CPU:F8FE PRG:38FE 95 0A + bne ProcessAudioFrame_JoinBranchPaths_F8AD ; CPU:F900 PRG:3900 D0 AB +; ----------------------------------------------------------------------------- +; Routine: DecodeAudioStream_OnNotEqualFD_F902 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DecodeAudioStream_OnNotEqualFD_F902: + cmp #$FE ; CPU:F902 PRG:3902 C9 FE + beq ProcessAudioFrame_JoinBranchPaths_F8AD ; CPU:F904 PRG:3904 F0 A7 + lda Zp0A,x ; CPU:F906 PRG:3906 B5 0A + bpl ProcessAudioFrame_OnNonnegative_F89E ; CPU:F908 PRG:3908 10 94 + and #$7F ; CPU:F90A PRG:390A 29 7F + sta Zp0A,x ; CPU:F90C PRG:390C 95 0A + lda Zp06,x ; CPU:F90E PRG:390E B5 06 + sta Zp03,x ; CPU:F910 PRG:3910 95 03 + lda Zp07,x ; CPU:F912 PRG:3912 B5 07 + sta Zp04,x ; CPU:F914 PRG:3914 95 04 + bne ProcessAudioFrame_OnNonzero_F8C4 ; CPU:F916 PRG:3916 D0 AC +; ----------------------------------------------------------------------------- +; Routine: DecodeAudioStream_OnBelowFD_F918 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DecodeAudioStream_OnBelowFD_F918: + lda Zp0A,x ; CPU:F918 PRG:3918 B5 0A + and #$7F ; CPU:F91A PRG:391A 29 7F + beq DecodeAudioStream_OnZero_F921 ; CPU:F91C PRG:391C F0 03 + jmp $F9C9 ; CPU:F91E PRG:391E 4C C9 F9 +; ----------------------------------------------------------------------------- +; Routine: DecodeAudioStream_OnZero_F921 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DecodeAudioStream_OnZero_F921: + lda ($F6),y ; CPU:F921 PRG:3921 B1 F6 + and #$F0 ; CPU:F923 PRG:3923 29 F0 + cmp #$20 ; CPU:F925 PRG:3925 C9 20 + bne DecodeAudioStream_OnNotEqual20_F93C ; CPU:F927 PRG:3927 D0 13 + lda ($F6),y ; CPU:F929 PRG:3929 B1 F6 + and #$0F ; CPU:F92B PRG:392B 29 0F + sta Zp01,x ; CPU:F92D PRG:392D 95 01 + iny ; CPU:F92F PRG:392F C8 + lda ($F6),y ; CPU:F930 PRG:3930 B1 F6 + ldx AudioApuRegisterOffset ; CPU:F932 PRG:3932 A6 F5 + sta $4000,x ; CPU:F934 PRG:3934 9D 00 40 + ldx AudioChannelStructOffset ; CPU:F937 PRG:3937 A6 F4 + sta Zp09,x ; CPU:F939 PRG:3939 95 09 + iny ; CPU:F93B PRG:393B C8 +; ----------------------------------------------------------------------------- +; Routine: DecodeAudioStream_OnNotEqual20_F93C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DecodeAudioStream_OnNotEqual20_F93C: + lda Zp01,x ; CPU:F93C PRG:393C B5 01 + sta Zp00,x ; CPU:F93E PRG:393E 95 00 + lda Zp09,x ; CPU:F940 PRG:3940 B5 09 + and #$10 ; CPU:F942 PRG:3942 29 10 + beq DecodeAudioStream_OnZero_F962 ; CPU:F944 PRG:3944 F0 1C + lda Zp09,x ; CPU:F946 PRG:3946 B5 09 + and #$F0 ; CPU:F948 PRG:3948 29 F0 + sta Zp09,x ; CPU:F94A PRG:394A 95 09 + lda ($F6),y ; CPU:F94C PRG:394C B1 F6 + cmp #$F8 ; CPU:F94E PRG:394E C9 F8 + bne DecodeAudioStream_OnNotEqualF8_F955 ; CPU:F950 PRG:3950 D0 03 + iny ; CPU:F952 PRG:3952 C8 + lda ($F6),y ; CPU:F953 PRG:3953 B1 F6 +; ----------------------------------------------------------------------------- +; Routine: DecodeAudioStream_OnNotEqualF8_F955 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DecodeAudioStream_OnNotEqualF8_F955: + lsr a ; CPU:F955 PRG:3955 4A + lsr a ; CPU:F956 PRG:3956 4A + lsr a ; CPU:F957 PRG:3957 4A + lsr a ; CPU:F958 PRG:3958 4A + ora Zp09,x ; CPU:F959 PRG:3959 15 09 + sta Zp09,x ; CPU:F95B PRG:395B 95 09 + ldx AudioApuRegisterOffset ; CPU:F95D PRG:395D A6 F5 + sta $4000,x ; CPU:F95F PRG:395F 9D 00 40 +; ----------------------------------------------------------------------------- +; Routine: DecodeAudioStream_OnZero_F962 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DecodeAudioStream_OnZero_F962: + lda ($F6),y ; CPU:F962 PRG:3962 B1 F6 + and #$07 ; CPU:F964 PRG:3964 29 07 + sta ZpF0 ; CPU:F966 PRG:3966 85 F0 + iny ; CPU:F968 PRG:3968 C8 + lda ($F6),y ; CPU:F969 PRG:3969 B1 F6 + sta ZpF1 ; CPU:F96B PRG:396B 85 F1 + ldx AudioChannelStructOffset ; CPU:F96D PRG:396D A6 F4 + jsr $FA80 ; CPU:F96F PRG:396F 20 80 FA + jmp $FAA9 ; CPU:F972 PRG:3972 4C A9 FA +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand +; Global: Interpret audio stream commands and mutate channel/APU state. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand: + lda Zp0A,x ; CPU:F975 PRG:3975 B5 0A + bne ExecuteAudioCommand_OnNonzero_F97A ; CPU:F977 PRG:3977 D0 01 + rts ; CPU:F979 PRG:3979 60 +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_OnNonzero_F97A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_OnNonzero_F97A: + lda AudioApuRegisterOffset ; CPU:F97A PRG:397A A5 F5 + cmp #$08 ; CPU:F97C PRG:397C C9 08 + bne ExecuteAudioCommand_OnNotEqual08_F981 ; CPU:F97E PRG:397E D0 01 + rts ; CPU:F980 PRG:3980 60 +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_OnNotEqual08_F981 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_OnNotEqual08_F981: + lda AudioSequencePointerLo ; CPU:F981 PRG:3981 A5 F6 + bne ExecuteAudioCommand_OnNonzero_F987 ; CPU:F983 PRG:3983 D0 02 + dec AudioSequencePointerHi ; CPU:F985 PRG:3985 C6 F7 +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_OnNonzero_F987 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_OnNonzero_F987: + dec AudioSequencePointerLo ; CPU:F987 PRG:3987 C6 F6 + ldy #$00 ; CPU:F989 PRG:3989 A0 00 + lda ($F6),y ; CPU:F98B PRG:398B B1 F6 + and #$F0 ; CPU:F98D PRG:398D 29 F0 + cmp #$C0 ; CPU:F98F PRG:398F C9 C0 + bne ExecuteAudioCommand_OnNotEqualC0_F994 ; CPU:F991 PRG:3991 D0 01 + rts ; CPU:F993 PRG:3993 60 +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_OnNotEqualC0_F994 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_OnNotEqualC0_F994: + lda Zp09,x ; CPU:F994 PRG:3994 B5 09 + and #$10 ; CPU:F996 PRG:3996 29 10 + bne ExecuteAudioCommand_OnNonzero_F99B ; CPU:F998 PRG:3998 D0 01 + rts ; CPU:F99A PRG:399A 60 +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_OnNonzero_F99B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_OnNonzero_F99B: + lda Zp0C,x ; CPU:F99B PRG:399B B5 0C + sec ; CPU:F99D PRG:399D 38 + sbc #$01 ; CPU:F99E PRG:399E E9 01 + sta Zp0C,x ; CPU:F9A0 PRG:39A0 95 0C + cmp Zp00,x ; CPU:F9A2 PRG:39A2 D5 00 + bne ExecuteAudioCommand_OnNonzero_F9AE ; CPU:F9A4 PRG:39A4 D0 08 + sec ; CPU:F9A6 PRG:39A6 38 + sbc Zp10,x ; CPU:F9A7 PRG:39A7 F5 10 + bcc ExecuteAudioCommand_JoinBranchPaths_F9B3 ; CPU:F9A9 PRG:39A9 90 08 + beq ExecuteAudioCommand_JoinBranchPaths_F9B3 ; CPU:F9AB PRG:39AB F0 06 + rts ; CPU:F9AD PRG:39AD 60 +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_OnNonzero_F9AE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_OnNonzero_F9AE: + sec ; CPU:F9AE PRG:39AE 38 + sbc #$01 ; CPU:F9AF PRG:39AF E9 01 + sta Zp0C,x ; CPU:F9B1 PRG:39B1 95 0C +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_JoinBranchPaths_F9B3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_JoinBranchPaths_F9B3: + lda Zp09,x ; CPU:F9B3 PRG:39B3 B5 09 + and #$0F ; CPU:F9B5 PRG:39B5 29 0F + sec ; CPU:F9B7 PRG:39B7 38 + sbc #$01 ; CPU:F9B8 PRG:39B8 E9 01 + bpl ExecuteAudioCommand_OnNonnegative_F9BD ; CPU:F9BA PRG:39BA 10 01 + rts ; CPU:F9BC PRG:39BC 60 +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_OnNonnegative_F9BD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_OnNonnegative_F9BD: + lda Zp09,x ; CPU:F9BD PRG:39BD B5 09 + sbc #$01 ; CPU:F9BF PRG:39BF E9 01 + sta Zp09,x ; CPU:F9C1 PRG:39C1 95 09 + ldx AudioApuRegisterOffset ; CPU:F9C3 PRG:39C3 A6 F5 + sta $4000,x ; CPU:F9C5 PRG:39C5 9D 00 40 + rts ; CPU:F9C8 PRG:39C8 60 +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_LoadAndContinue_F9C9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_LoadAndContinue_F9C9: + lda $0310 ; CPU:F9C9 PRG:39C9 AD 10 03 + beq ExecuteAudioCommand_OnZero_F9D1 ; CPU:F9CC PRG:39CC F0 03 + jmp $F8E1 ; CPU:F9CE PRG:39CE 4C E1 F8 +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_OnZero_F9D1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_OnZero_F9D1: + lda ($F6),y ; CPU:F9D1 PRG:39D1 B1 F6 + and #$F0 ; CPU:F9D3 PRG:39D3 29 F0 + cmp #$D0 ; CPU:F9D5 PRG:39D5 C9 D0 + bne ExecuteAudioCommand_OnNotEqualD0_F9FF ; CPU:F9D7 PRG:39D7 D0 26 + lda ($F6),y ; CPU:F9D9 PRG:39D9 B1 F6 + and #$0F ; CPU:F9DB PRG:39DB 29 0F + sta Zp0D,x ; CPU:F9DD PRG:39DD 95 0D + iny ; CPU:F9DF PRG:39DF C8 + lda ($F6),y ; CPU:F9E0 PRG:39E0 B1 F6 + sta Zp05,x ; CPU:F9E2 PRG:39E2 95 05 + ldx AudioApuRegisterOffset ; CPU:F9E4 PRG:39E4 A6 F5 + sta $4000,x ; CPU:F9E6 PRG:39E6 9D 00 40 + iny ; CPU:F9E9 PRG:39E9 C8 + cpx #$08 ; CPU:F9EA PRG:39EA E0 08 + beq ExecuteAudioCommand_JoinBranchPaths_FA12 ; CPU:F9EC PRG:39EC F0 24 + lda ($F6),y ; CPU:F9EE PRG:39EE B1 F6 + lsr a ; CPU:F9F0 PRG:39F0 4A + lsr a ; CPU:F9F1 PRG:39F1 4A + lsr a ; CPU:F9F2 PRG:39F2 4A + lsr a ; CPU:F9F3 PRG:39F3 4A + ldx AudioChannelStructOffset ; CPU:F9F4 PRG:39F4 A6 F4 + sta Zp0F,x ; CPU:F9F6 PRG:39F6 95 0F + lda ($F6),y ; CPU:F9F8 PRG:39F8 B1 F6 + and #$0F ; CPU:F9FA PRG:39FA 29 0F + sta Zp10,x ; CPU:F9FC PRG:39FC 95 10 + iny ; CPU:F9FE PRG:39FE C8 +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_OnNotEqualD0_F9FF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_OnNotEqualD0_F9FF: + ldx AudioApuRegisterOffset ; CPU:F9FF PRG:39FF A6 F5 + cpx #$08 ; CPU:FA01 PRG:3A01 E0 08 + beq ExecuteAudioCommand_JoinBranchPaths_FA12 ; CPU:FA03 PRG:3A03 F0 0D + lda ($F6),y ; CPU:FA05 PRG:3A05 B1 F6 + cmp #$F0 ; CPU:FA07 PRG:3A07 C9 F0 + bne ExecuteAudioCommand_JoinBranchPaths_FA12 ; CPU:FA09 PRG:3A09 D0 07 + iny ; CPU:FA0B PRG:3A0B C8 + lda ($F6),y ; CPU:FA0C PRG:3A0C B1 F6 + sta $4001,x ; CPU:FA0E PRG:3A0E 9D 01 40 + iny ; CPU:FA11 PRG:3A11 C8 +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_JoinBranchPaths_FA12 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_JoinBranchPaths_FA12: + lda ($F6),y ; CPU:FA12 PRG:3A12 B1 F6 + and #$F0 ; CPU:FA14 PRG:3A14 29 F0 + cmp #$E0 ; CPU:FA16 PRG:3A16 C9 E0 + bne ExecuteAudioCommand_OnNotEqualE0_FA23 ; CPU:FA18 PRG:3A18 D0 09 + lda ($F6),y ; CPU:FA1A PRG:3A1A B1 F6 + and #$0F ; CPU:FA1C PRG:3A1C 29 0F + ldx AudioChannelStructOffset ; CPU:FA1E PRG:3A1E A6 F4 + sta Zp0B,x ; CPU:FA20 PRG:3A20 95 0B + iny ; CPU:FA22 PRG:3A22 C8 +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_OnNotEqualE0_FA23 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_OnNotEqualE0_FA23: + jsr $FAA9 ; CPU:FA23 PRG:3A23 20 A9 FA + dey ; CPU:FA26 PRG:3A26 88 + lda ($F6),y ; CPU:FA27 PRG:3A27 B1 F6 + and #$0F ; CPU:FA29 PRG:3A29 29 0F + sta ZpF0 ; CPU:FA2B PRG:3A2B 85 F0 + beq ExecuteAudioCommand_OnZero_FA3A ; CPU:FA2D PRG:3A2D F0 0B + lda Zp0D,x ; CPU:FA2F PRG:3A2F B5 0D + clc ; CPU:FA31 PRG:3A31 18 +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_OnNonzero_FA32 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_OnNonzero_FA32: + adc Zp0D,x ; CPU:FA32 PRG:3A32 75 0D + dec ZpF0 ; CPU:FA34 PRG:3A34 C6 F0 + bne ExecuteAudioCommand_OnNonzero_FA32 ; CPU:FA36 PRG:3A36 D0 FA + beq ExecuteAudioCommand_OnZero_FA3C ; CPU:FA38 PRG:3A38 F0 02 +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_OnZero_FA3A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_OnZero_FA3A: + lda Zp0D,x ; CPU:FA3A PRG:3A3A B5 0D +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_OnZero_FA3C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_OnZero_FA3C: + sta Zp00,x ; CPU:FA3C PRG:3A3C 95 00 + clc ; CPU:FA3E PRG:3A3E 18 + adc Zp0F,x ; CPU:FA3F PRG:3A3F 75 0F + sta Zp0C,x ; CPU:FA41 PRG:3A41 95 0C + lda Zp05,x ; CPU:FA43 PRG:3A43 B5 05 + sta Zp09,x ; CPU:FA45 PRG:3A45 95 09 + ldx AudioApuRegisterOffset ; CPU:FA47 PRG:3A47 A6 F5 + sta $4000,x ; CPU:FA49 PRG:3A49 9D 00 40 + lda ($F6),y ; CPU:FA4C PRG:3A4C B1 F6 + lsr a ; CPU:FA4E PRG:3A4E 4A + lsr a ; CPU:FA4F PRG:3A4F 4A + lsr a ; CPU:FA50 PRG:3A50 4A + lsr a ; CPU:FA51 PRG:3A51 4A + cmp #$0C ; CPU:FA52 PRG:3A52 C9 0C + bne ExecuteAudioCommand_OnNotEqual0C_FA62 ; CPU:FA54 PRG:3A54 D0 0C + lda #$00 ; CPU:FA56 PRG:3A56 A9 00 + cpx #$08 ; CPU:FA58 PRG:3A58 E0 08 + beq ExecuteAudioCommand_OnEqual08_FA5E ; CPU:FA5A PRG:3A5A F0 02 + lda #$30 ; CPU:FA5C PRG:3A5C A9 30 +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_OnEqual08_FA5E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_OnEqual08_FA5E: + sta $4000,x ; CPU:FA5E PRG:3A5E 9D 00 40 + rts ; CPU:FA61 PRG:3A61 60 +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_OnNotEqual0C_FA62 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_OnNotEqual0C_FA62: + ldx AudioChannelStructOffset ; CPU:FA62 PRG:3A62 A6 F4 + asl a ; CPU:FA64 PRG:3A64 0A + tay ; CPU:FA65 PRG:3A65 A8 + lda $FABB,y ; CPU:FA66 PRG:3A66 B9 BB FA + sta ZpF0 ; CPU:FA69 PRG:3A69 85 F0 + iny ; CPU:FA6B PRG:3A6B C8 + lda $FABB,y ; CPU:FA6C PRG:3A6C B9 BB FA + sta ZpF1 ; CPU:FA6F PRG:3A6F 85 F1 + ldy Zp0B,x ; CPU:FA71 PRG:3A71 B4 0B +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_JumpNext_FA73 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_JumpNext_FA73: + tya ; CPU:FA73 PRG:3A73 98 + cmp #$04 ; CPU:FA74 PRG:3A74 C9 04 + beq ExecuteAudioCommand_OnEqual04_FA80 ; CPU:FA76 PRG:3A76 F0 08 + lsr ZpF0 ; CPU:FA78 PRG:3A78 46 F0 + ror ZpF1 ; CPU:FA7A PRG:3A7A 66 F1 + iny ; CPU:FA7C PRG:3A7C C8 + jmp $FA73 ; CPU:FA7D PRG:3A7D 4C 73 FA +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_OnEqual04_FA80 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_OnEqual04_FA80: + lda ZpF0 ; CPU:FA80 PRG:3A80 A5 F0 + ora #$08 ; CPU:FA82 PRG:3A82 09 08 + sta ZpF0 ; CPU:FA84 PRG:3A84 85 F0 + cmp Zp08,x ; CPU:FA86 PRG:3A86 D5 08 + bne ExecuteAudioCommand_OnNonzero_FA98 ; CPU:FA88 PRG:3A88 D0 0E + lda Zp09,x ; CPU:FA8A PRG:3A8A B5 09 + and #$10 ; CPU:FA8C PRG:3A8C 29 10 + beq ExecuteAudioCommand_JoinBranchPaths_FA9A ; CPU:FA8E PRG:3A8E F0 0A + ldx AudioApuRegisterOffset ; CPU:FA90 PRG:3A90 A6 F5 + cpx #$08 ; CPU:FA92 PRG:3A92 E0 08 + beq ExecuteAudioCommand_JoinBranchPaths_FA9A ; CPU:FA94 PRG:3A94 F0 04 + bne ExecuteAudioCommand_OnNotEqual08_FAA1 ; CPU:FA96 PRG:3A96 D0 09 +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_OnNonzero_FA98 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_OnNonzero_FA98: + sta Zp08,x ; CPU:FA98 PRG:3A98 95 08 +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_JoinBranchPaths_FA9A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_JoinBranchPaths_FA9A: + lda ZpF0 ; CPU:FA9A PRG:3A9A A5 F0 + ldx AudioApuRegisterOffset ; CPU:FA9C PRG:3A9C A6 F5 + sta $4003,x ; CPU:FA9E PRG:3A9E 9D 03 40 +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_OnNotEqual08_FAA1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_OnNotEqual08_FAA1: + ldx AudioApuRegisterOffset ; CPU:FAA1 PRG:3AA1 A6 F5 + lda ZpF1 ; CPU:FAA3 PRG:3AA3 A5 F1 + sta $4002,x ; CPU:FAA5 PRG:3AA5 9D 02 40 + rts ; CPU:FAA8 PRG:3AA8 60 +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_LoadIndexAndContinue_FAA9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_LoadIndexAndContinue_FAA9: + iny ; CPU:FAA9 PRG:3AA9 C8 + tya ; CPU:FAAA PRG:3AAA 98 + clc ; CPU:FAAB PRG:3AAB 18 + adc AudioSequencePointerLo ; CPU:FAAC PRG:3AAC 65 F6 + ldx AudioChannelStructOffset ; CPU:FAAE PRG:3AAE A6 F4 + sta Zp03,x ; CPU:FAB0 PRG:3AB0 95 03 + bcc ExecuteAudioCommand_OnCarryClear_FABA ; CPU:FAB2 PRG:3AB2 90 06 + lda AudioSequencePointerHi ; CPU:FAB4 PRG:3AB4 A5 F7 + adc #$00 ; CPU:FAB6 PRG:3AB6 69 00 + sta Zp04,x ; CPU:FAB8 PRG:3AB8 95 04 +; ----------------------------------------------------------------------------- +; Routine: ExecuteAudioCommand_OnCarryClear_FABA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ExecuteAudioCommand_OnCarryClear_FABA: + rts ; CPU:FABA PRG:3ABA 60 + +AudioSequenceAndCommandData: + .byte $06, $AE, $06, $4E, $05, $F4, $05, $9E, $05, $4E, $05, $01, $04, $B9, $04, $76 ; CPU:$FABB PRG:3ABB 06 AE 06 4E 05 F4 05 9E 05 4E 05 01 04 B9 04 76 + .byte $04, $36, $03, $F9, $03, $C0, $03, $8A, $18, $FB, $37, $FB, $4C, $FB, $FF, $FA ; CPU:$FACB PRG:3ACB 04 36 03 F9 03 C0 03 8A 18 FB 37 FB 4C FB FF FA + .byte $5F, $FB, $7E, $FB, $91, $FB, $98, $FB, $D1, $FB, $DC, $FB, $ED, $FB, $08, $FC ; CPU:$FADB PRG:3ADB 5F FB 7E FB 91 FB 98 FB D1 FB DC FB ED FB 08 FC + .byte $23, $FC, $31, $FC, $3F, $FD, $A5, $FD, $25, $FE, $BF, $FE, $18, $FF, $B1, $FC ; CPU:$FAEB PRG:3AEB 23 FC 31 FC 3F FD A5 FD 25 FE BF FE 18 FF B1 FC + .byte $DD, $FC, $A0, $FC, $24, $B0, $E0, $60, $F0, $50, $F0, $40, $F0, $30, $E0, $20 ; CPU:$FAFB PRG:3AFB DD FC A0 FC 24 B0 E0 60 F0 50 F0 40 F0 30 E0 20 + .byte $00, $00, $A0, $20, $00, $00, $70, $20, $00, $00, $30, $20, $FF, $21, $B0, $F1 ; CPU:$FB0B PRG:3B0B 00 00 A0 20 00 00 70 20 00 00 30 20 FF 21 B0 F1 + .byte $70, $F1, $50, $F1, $50, $F1, $78, $C1, $70, $C1, $58, $91, $70, $81, $70, $91 ; CPU:$FB1B PRG:3B1B 70 F1 50 F1 50 F1 78 C1 70 C1 58 91 70 81 70 91 + .byte $60, $81, $48, $A1, $38, $91, $4B, $71, $2B, $51, $28, $FF, $23, $70, $F0, $87 ; CPU:$FB2B PRG:3B2B 60 81 48 A1 38 91 4B 71 2B 51 28 FF 23 70 F0 87 + .byte $D0, $78, $24, $B0, $F0, $87, $D0, $6C, $D0, $5B, $22, $B0, $C0, $55, $B0, $4F ; CPU:$FB3B PRG:3B3B D0 78 24 B0 F0 87 D0 6C D0 5B 22 B0 C0 55 B0 4F + .byte $FF, $21, $B0, $F0, $D0, $F0, $C0, $F0, $B0, $F0, $98, $F0, $88, $F0, $78, $C0 ; CPU:$FB4B PRG:3B4B FF 21 B0 F0 D0 F0 C0 F0 B0 F0 98 F0 88 F0 78 C0 + .byte $6C, $B0, $58, $FF, $23, $B0, $00, $00, $00, $00, $23, $8F, $00, $6A, $00, $47 ; CPU:$FB5B PRG:3B5B 6C B0 58 FF 23 B0 00 00 00 00 23 8F 00 6A 00 47 + .byte $00, $3F, $22, $B0, $F0, $38, $A0, $35, $F0, $2F, $21, $86, $00, $2A, $00, $28 ; CPU:$FB6B PRG:3B6B 00 3F 22 B0 F0 38 A0 35 F0 2F 21 86 00 2A 00 28 + .byte $00, $23, $FF, $24, $E4, $D0, $8E, $F0, $6A, $F0, $54, $F0, $47, $D0, $8E, $F0 ; CPU:$FB7B PRG:3B7B 00 23 FF 24 E4 D0 8E F0 6A F0 54 F0 47 D0 8E F0 + .byte $6A, $F0, $54, $F0, $47, $FF, $21, $70, $F0, $39, $D0, $4A, $FF, $21, $B0, $F0 ; CPU:$FB8B PRG:3B8B 6A F0 54 F0 47 FF 21 70 F0 39 D0 4A FF 21 B0 F0 + .byte $40, $F0, $43, $F0, $45, $F0, $55, $F0, $55, $F0, $5A, $F0, $60, $F0, $65, $F0 ; CPU:$FB9B PRG:3B9B 40 F0 43 F0 45 F0 55 F0 55 F0 5A F0 60 F0 65 F0 + .byte $6A, $F0, $70, $F0, $78, $F0, $80, $F0, $88, $F0, $90, $F0, $98, $F0, $A0, $F0 ; CPU:$FBAB PRG:3BAB 6A F0 70 F0 78 F0 80 F0 88 F0 90 F0 98 F0 A0 F0 + .byte $AA, $F0, $B5, $F0, $C0, $F0, $D0, $F0, $E0, $F0, $F0, $F1, $00, $F1, $10, $F1 ; CPU:$FBBB PRG:3BBB AA F0 B5 F0 C0 F0 D0 F0 E0 F0 F0 F1 00 F1 10 F1 + .byte $28, $F1, $40, $F1, $60, $FF, $23, $70, $F2, $50, $00, $00, $22, $B0, $F1, $F0 ; CPU:$FBCB PRG:3BCB 28 F1 40 F1 60 FF 23 70 F2 50 00 00 22 B0 F1 F0 + .byte $FF, $23, $30, $F0, $0A, $00, $00, $22, $30, $F0, $0D, $2F, $30, $00, $00, $00 ; CPU:$FBDB PRG:3BDB FF 23 30 F0 0A 00 00 22 30 F0 0D 2F 30 00 00 00 + .byte $00, $FF, $D4, $46, $22, $E0, $01, $21, $01, $D6, $46, $22, $E1, $72, $40, $02 ; CPU:$FBEB PRG:3BEB 00 FF D4 46 22 E0 01 21 01 D6 46 22 E1 72 40 02 + .byte $50, $42, $00, $E2, $91, $C1, $B1, $C1, $F0, $9C, $E1, $03, $FF, $D4, $46, $22 ; CPU:$FBFB PRG:3BFB 50 42 00 E2 91 C1 B1 C1 F0 9C E1 03 FF D4 46 22 + .byte $E1, $01, $21, $01, $D6, $46, $22, $E2, $72, $40, $02, $50, $42, $00, $E3, $91 ; CPU:$FC0B PRG:3C0B E1 01 21 01 D6 46 22 E2 72 40 02 50 42 00 E3 91 + .byte $C1, $B1, $C1, $F0, $94, $E1, $03, $FF, $D6, $20, $E2, $43, $43, $03, $03, $E3 ; CPU:$FC1B PRG:3C1B C1 B1 C1 F0 94 E1 03 FF D6 20 E2 43 43 03 03 E3 + .byte $91, $C1, $71, $C1, $03, $FF, $FD, $86, $FC, $61, $71, $70, $60, $41, $71, $61 ; CPU:$FC2B PRG:3C2B 91 C1 71 C1 03 FF FD 86 FC 61 71 70 60 41 71 61 + .byte $60, $40, $21, $61, $41, $E2, $B1, $E1, $11, $21, $43, $C1, $FD, $86, $FC, $21 ; CPU:$FC3B PRG:3C3B 60 40 21 61 41 E2 B1 E1 11 21 43 C1 FD 86 FC 21 + .byte $B1, $91, $71, $61, $41, $21, $11, $21, $41, $60, $70, $61, $41, $21, $E2, $90 ; CPU:$FC4B PRG:3C4B B1 91 71 61 41 21 11 21 41 60 70 61 41 21 E2 90 + .byte $B0, $E1, $10, $20, $40, $60, $71, $71, $71, $71, $70, $60, $73, $81, $91, $91 ; CPU:$FC5B PRG:3C5B B0 E1 10 20 40 60 71 71 71 71 70 60 73 81 91 91 + .byte $90, $70, $60, $70, $95, $91, $B1, $B1, $E0, $22, $E1, $B0, $91, $91, $90, $70 ; CPU:$FC6B PRG:3C6B 90 70 60 70 95 91 B1 B1 E0 22 E1 B0 91 91 90 70 + .byte $61, $71, $71, $11, $41, $21, $21, $21, $FE, $31, $FC, $E2, $B0, $E1, $10, $21 ; CPU:$FC7B PRG:3C7B 61 71 71 11 41 21 21 21 FE 31 FC E2 B0 E1 10 21 + .byte $21, $20, $10, $20, $40, $61, $61, $60, $50, $60, $70, $91, $91, $90, $80, $90 ; CPU:$FC8B PRG:3C8B 21 20 10 20 40 61 61 60 50 60 70 91 91 90 80 90 + .byte $E0, $20, $E1, $95, $FF, $25, $48, $00, $A0, $00, $86, $00, $71, $00, $86, $00 ; CPU:$FC9B PRG:3C9B E0 20 E1 95 FF 25 48 00 A0 00 86 00 71 00 86 00 + .byte $71, $2F, $42, $00, $55, $FF, $27, $B0, $00, $00, $FD, $BC, $FC, $FD, $BC, $FC ; CPU:$FCAB PRG:3CAB 71 2F 42 00 55 FF 27 B0 00 00 FD BC FC FD BC FC + .byte $FF, $26, $B0, $50, $21, $60, $20, $70, $21, $60, $20, $2F, $B0, $00, $00, $26 ; CPU:$FCBB PRG:3CBB FF 26 B0 50 21 60 20 70 21 60 20 2F B0 00 00 26 + .byte $B0, $50, $21, $60, $20, $50, $21, $40, $20, $2F, $B0, $00, $00, $00, $00, $00 ; CPU:$FCCB PRG:3CCB B0 50 21 60 20 50 21 40 20 2F B0 00 00 00 00 00 + .byte $00, $FF, $25, $30, $30, $07, $40, $08, $50, $07, $60, $08, $70, $07, $90, $08 ; CPU:$FCDB PRG:3CDB 00 FF 25 30 30 07 40 08 50 07 60 08 70 07 90 08 + .byte $B0, $07, $C0, $08, $C0, $07, $D0, $07, $D0, $08, $D0, $07, $E0, $08, $E0, $07 ; CPU:$FCEB PRG:3CEB B0 07 C0 08 C0 07 D0 07 D0 08 D0 07 E0 08 E0 07 + .byte $E0, $08, $E0, $07, $E0, $08, $E0, $07, $E0, $08, $D0, $07, $D0, $08, $D0, $07 ; CPU:$FCFB PRG:3CFB E0 08 E0 07 E0 08 E0 07 E0 08 D0 07 D0 08 D0 07 + .byte $D0, $08, $D0, $07, $E0, $08, $E0, $07, $E0, $08, $E0, $07, $D0, $08, $C0, $08 ; CPU:$FD0B PRG:3D0B D0 08 D0 07 E0 08 E0 07 E0 08 E0 07 D0 08 C0 08 + .byte $C0, $08, $B0, $07, $B0, $08, $A0, $07, $A0, $08, $A0, $07, $A0, $08, $A0, $07 ; CPU:$FD1B PRG:3D1B C0 08 B0 07 B0 08 A0 07 A0 08 A0 07 A0 08 A0 07 + .byte $90, $08, $80, $07, $80, $08, $70, $07, $60, $08, $50, $07, $40, $08, $30, $07 ; CPU:$FD2B PRG:3D2B 90 08 80 07 80 08 70 07 60 08 50 07 40 08 30 07 + .byte $F8, $20, $08, $FF, $E2, $C1, $FD, $95, $FD, $21, $91, $11, $91, $11, $91, $21 ; CPU:$FD3B PRG:3D3B F8 20 08 FF E2 C1 FD 95 FD 21 91 11 91 11 91 21 + .byte $91, $21, $91, $E3, $B1, $E2, $81, $41, $81, $91, $90, $70, $61, $41, $FD, $95 ; CPU:$FD4B PRG:3D4B 91 21 91 E3 B1 E2 81 41 81 91 90 70 61 41 FD 95 + .byte $FD, $21, $21, $71, $61, $41, $21, $11, $E3, $B1, $91, $61, $73, $91, $E2, $71 ; CPU:$FD5B PRG:3D5B FD 21 21 71 61 41 21 11 E3 B1 91 61 73 91 E2 71 + .byte $61, $C5, $11, $91, $21, $91, $41, $91, $51, $91, $61, $91, $11, $91, $21, $90 ; CPU:$FD6B PRG:3D6B 61 C5 11 91 21 91 41 91 51 91 61 91 11 91 21 90 + .byte $80, $91, $61, $71, $70, $90, $B1, $71, $61, $E1, $21, $E2, $21, $20, $30, $40 ; CPU:$FD7B PRG:3D7B 80 91 61 71 70 90 B1 71 61 E1 21 E2 21 20 30 40 + .byte $50, $60, $70, $93, $61, $61, $61, $FE, $3F, $FD, $21, $91, $21, $91, $21, $91 ; CPU:$FD8B PRG:3D8B 50 60 70 93 61 61 61 FE 3F FD 21 91 21 91 21 91 + .byte $21, $91, $21, $60, $50, $61, $91, $21, $91, $FF, $FD, $0F, $FE, $21, $10, $20 ; CPU:$FD9B PRG:3D9B 21 91 21 60 50 61 91 21 91 FF FD 0F FE 21 10 20 + .byte $41, $01, $E2, $B1, $A1, $B1, $E1, $41, $26, $C0, $FD, $0F, $FE, $21, $01, $E2 ; CPU:$FDAB PRG:3DAB 41 01 E2 B1 A1 B1 E1 41 26 C0 FD 0F FE 21 01 E2 + .byte $B1, $91, $79, $C1, $70, $50, $40, $20, $43, $72, $70, $E1, $41, $01, $E2, $71 ; CPU:$FDBB PRG:3DBB B1 91 79 C1 70 50 40 20 43 72 70 E1 41 01 E2 71 + .byte $41, $91, $71, $51, $40, $57, $C0, $23, $52, $50, $E1, $21, $E2, $B1, $91, $51 ; CPU:$FDCB PRG:3DCB 41 91 71 51 40 57 C0 23 52 50 E1 21 E2 B1 91 51 + .byte $41, $51, $61, $90, $74, $70, $50, $40, $20, $43, $72, $70, $E1, $71, $51, $41 ; CPU:$FDDB PRG:3DDB 41 51 61 90 74 70 50 40 20 43 72 70 E1 71 51 41 + .byte $11, $41, $21, $11, $20, $E2, $95, $C0, $B1, $E1, $21, $01, $E2, $B1, $E1, $01 ; CPU:$FDEB PRG:3DEB 11 41 21 11 20 E2 95 C0 B1 E1 21 01 E2 B1 E1 01 + .byte $41, $21, $01, $E2, $B0, $E1, $07, $C0, $E2, $B0, $90, $80, $91, $A0, $B0, $E1 ; CPU:$FDFB PRG:3DFB 41 21 01 E2 B0 E1 07 C0 E2 B0 90 80 91 A0 B0 E1 + .byte $00, $FE, $A5, $FD, $E1, $11, $21, $41, $21, $72, $20, $E2, $B1, $71, $B1, $91 ; CPU:$FE0B PRG:3E0B 00 FE A5 FD E1 11 21 41 21 72 20 E2 B1 71 B1 91 + .byte $81, $91, $E1, $45, $41, $61, $51, $41, $31, $FF, $FD, $B9, $FE, $FD, $B9, $FE ; CPU:$FE1B PRG:3E1B 81 91 E1 45 41 61 51 41 31 FF FD B9 FE FD B9 FE + .byte $FD, $A7, $FE, $FD, $A7, $FE, $FD, $B0, $FE, $FD, $B0, $FE, $FD, $B9, $FE, $71 ; CPU:$FE2B PRG:3E2B FD A7 FE FD A7 FE FD B0 FE FD B0 FE FD B9 FE 71 + .byte $21, $41, $61, $FD, $B9, $FE, $FD, $B9, $FE, $FD, $A7, $FE, $FD, $A7, $FE, $FD ; CPU:$FE3B PRG:3E3B 21 41 61 FD B9 FE FD B9 FE FD A7 FE FD A7 FE FD + .byte $B0, $FE, $FD, $B0, $FE, $FD, $B9, $FE, $E2, $73, $C3, $01, $71, $41, $71, $01 ; CPU:$FE4B PRG:3E4B B0 FE FD B0 FE FD B9 FE E2 73 C3 01 71 41 71 01 + .byte $71, $41, $71, $21, $91, $51, $91, $21, $91, $51, $91, $E3, $71, $E2, $51, $21 ; CPU:$FE5B PRG:3E5B 71 41 71 21 91 51 91 21 91 51 91 E3 71 E2 51 21 + .byte $51, $E3, $71, $E2, $51, $21, $51, $01, $71, $61, $71, $01, $71, $61, $71, $01 ; CPU:$FE6B PRG:3E6B 51 E3 71 E2 51 21 51 01 71 61 71 01 71 61 71 01 + .byte $71, $61, $71, $11, $91, $71, $91, $21, $91, $51, $91, $31, $E1, $01, $E3, $91 ; CPU:$FE7B PRG:3E7B 71 61 71 11 91 71 91 21 91 51 91 31 E1 01 E3 91 + .byte $E1, $01, $E3, $71, $E2, $71, $41, $71, $E3, $71, $E2, $51, $21, $51, $01, $71 ; CPU:$FE8B PRG:3E8B E1 01 E3 71 E2 71 41 71 E3 71 E2 51 21 51 01 71 + .byte $41, $71, $21, $E1, $01, $E2, $61, $E1, $01, $FE, $25, $FE, $E2, $91, $E1, $11 ; CPU:$FE9B PRG:3E9B 41 71 21 E1 01 E2 61 E1 01 FE 25 FE E2 91 E1 11 + .byte $E2, $41, $E1, $11, $FF, $E2, $91, $E1, $01, $E2, $21, $E1, $01, $FF, $E2, $71 ; CPU:$FEAB PRG:3EAB E2 41 E1 11 FF E2 91 E1 01 E2 21 E1 01 FF E2 71 + .byte $B1, $21, $B1, $FF, $E1, $03, $FD, $01, $FF, $13, $23, $47, $23, $C3, $13, $23 ; CPU:$FEBB PRG:3EBB B1 21 B1 FF E1 03 FD 01 FF 13 23 47 23 C3 13 23 + .byte $97, $73, $C3, $E1, $03, $FD, $01, $FF, $63, $93, $97, $73, $E1, $67, $43, $47 ; CPU:$FECB PRG:3ECB 97 73 C3 E1 03 FD 01 FF 63 93 97 73 E1 67 43 47 + .byte $23, $E2, $73, $C3, $FD, $0C, $FF, $47, $73, $47, $73, $E1, $2F, $03, $FD, $0C ; CPU:$FEDB PRG:3EDB 23 E2 73 C3 FD 0C FF 47 73 47 73 E1 2F 03 FD 0C + .byte $FF, $E1, $03, $23, $43, $71, $71, $72, $C0, $52, $C0, $41, $41, $42, $C0, $22 ; CPU:$FEEB PRG:3EEB FF E1 03 23 43 71 71 72 C0 52 C0 41 41 42 C0 22 + .byte $C0, $E1, $03, $FE, $BF, $FE, $E2, $B3, $B7, $93, $C3, $83, $93, $B7, $93, $C3 ; CPU:$FEFB PRG:3EFB C0 E1 03 FE BF FE E2 B3 B7 93 C3 83 93 B7 93 C3 + .byte $FF, $E2, $73, $57, $73, $57, $73, $E1, $4F, $23, $E2, $73, $FF, $C7, $FD, $64 ; CPU:$FF0B PRG:3F0B FF E2 73 57 73 57 73 E1 4F 23 E2 73 FF C7 FD 64 + .byte $FF, $E2, $23, $53, $53, $73, $B3, $B3, $23, $73, $73, $73, $B3, $B3, $23, $B3 ; CPU:$FF1B PRG:3F1B FF E2 23 53 53 73 B3 B3 23 73 73 73 B3 B3 23 B3 + .byte $B3, $FD, $64, $FF, $E2, $33, $93, $93, $43, $73, $73, $03, $43, $43, $23, $63 ; CPU:$FF2B PRG:3F2B B3 FD 64 FF E2 33 93 93 43 73 73 03 43 43 23 63 + .byte $63, $73, $C7, $FD, $74, $FF, $03, $43, $43, $E3, $73, $E2, $43, $43, $03, $43 ; CPU:$FF3B PRG:3F3B 63 73 C7 FD 74 FF 03 43 43 E3 73 E2 43 43 03 43 + .byte $43, $E3, $73, $E2, $43, $43, $FD, $74, $FF, $E1, $03, $E2, $B3, $A3, $97, $83 ; CPU:$FF4B PRG:3F4B 43 E3 73 E2 43 43 FD 74 FF E1 03 E2 B3 A3 97 83 + .byte $73, $E3, $73, $E2, $73, $03, $FE, $18, $FF, $E2, $93, $E1, $03, $03, $E2, $23 ; CPU:$FF5B PRG:3F5B 73 E3 73 E2 73 03 FE 18 FF E2 93 E1 03 03 E2 23 + .byte $E1, $03, $03, $E2, $93, $E1, $03, $03, $FF, $23, $73, $73, $E3, $73, $E2, $73 ; CPU:$FF6B PRG:3F6B E1 03 03 E2 93 E1 03 03 FF 23 73 73 E3 73 E2 73 + .byte $73, $23, $73, $73, $E3, $73, $E2, $73, $73, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$FF7B PRG:3F7B 73 23 73 73 E3 73 E2 73 73 FF FF FF FF FF FF FF + .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$FF8B PRG:3F8B FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF + .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$FF9B PRG:3F9B FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF + .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$FFAB PRG:3FAB FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF + .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $6E, $C7, $86, $C7, $8C, $C7, $9D, $C7, $02 ; CPU:$FFBB PRG:3FBB FF FF FF FF FF FF FF 6E C7 86 C7 8C C7 9D C7 02 + .byte $C8, $0F, $C8, $74, $C7, $92, $C7, $CA, $C7, $70, $D6, $FA, $D6, $63, $C7, $24 ; CPU:$FFCB PRG:3FCB C8 0F C8 74 C7 92 C7 CA C7 70 D6 FA D6 63 C7 24 + .byte $D7, $30, $D7, $CA, $C7, $D8, $C7, $E6, $C7, $F4, $C7, $FF, $FF, $FF, $FF, $FF ; CPU:$FFDB PRG:3FDB D7 30 D7 CA C7 D8 C7 E6 C7 F4 C7 FF FF FF FF FF + .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $04, $01, $02, $01, $5A ; CPU:$FFEB PRG:3FEB FF FF FF FF FF FF FF FF FF FF FF 04 01 02 01 5A + .byte $C0, $00, $C0, $B7, $4C ; CPU:$FFFB PRG:3FFB C0 00 C0 B7 4C + diff --git a/_wip/Pyramid (U)/OVERVIEW.md b/_wip/Pyramid (U)/OVERVIEW.md index 0067918..31a84e9 100644 --- a/_wip/Pyramid (U)/OVERVIEW.md +++ b/_wip/Pyramid (U)/OVERVIEW.md @@ -1,7 +1,6 @@ -# Pyramid (U) — Skeleton Project - -ROM: `_wip/Pyramid (U)/Pyramid (U) (Sachen).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. +# Pyramid (U) — Pass 1 +ROM: `_wip/Pyramid (U)/Pyramid (U) (Sachen).nes` (24,592 bytes, iNES). Status: **PASS 1 — code/data split complete, byte-identical.** 5,834 of 16,384 PRG bytes (35.6%) are classified as traced 6502 code (396 labels, 70 distinct `jsr` targets); everything else is explicit `.byte` data with per-line PRG-offset annotations. `make` → `cmp reconstructed_prg.bin prg.bin` → **BYTE-IDENTICAL**. ## ROM Facts @@ -19,9 +18,68 @@ ROM: `_wip/Pyramid (U)/Pyramid (U) (Sachen).nes` (24,592 bytes, iNES). Status: * | Vector | Target | Note | |--------|--------|------| -| NMI | `$D72E` | per-frame heartbeat | -| RESET | `$FF00` | initial execution at $FF00, inside the last PRG page — unusual; PASS 1 should confirm the true cold-start path | -| IRQ | `$FF00` | redirects to RESET — unused placeholder | +| NMI | `$D72E` | normal per-frame engine entry (waits PPU, runs frame state, drives APU silence/queue) | +| RESET | `$FF00` | real cold-start code — see boot chain below | +| IRQ | `$FF00` | redirects to RESET target; `sei` at boot, no `cli` seen on the traced path — IRQ likely never fires | + +## Boot chain (all statically traced from `$FF00`) + +1. `ldx #$FF / txs / sei / cld`, clear PPUCTRL/PPUMASK. +2. Repeated `LDA # / JSR $FF49` — `$FF49` does **`STA $4100`** (write beyond the NES register space, $4000–$4017) followed by a long delay loop ($CE×256-ish iterations ×4 outer). The header claims mapper 0, but on the real Sachen cart these `$4100` pokes are an mapper-unlock/protection sequence. Boot pokes `$30`, `$10/$30/$10+$30` (via `$FF4C` delay variant twice) or `$20/$30/$20` depending on a check. +3. `JSR $FF57` — reads stack page bytes `$0120`/`$0121` and compares against `$41`/`$56` ("A","V"). `SEC` ⇒ proceeds to the `$4100` poke sequence above; `CLC` ⇒ alternate poke sequence, then falls into: +4. `JSR $FF69` — seeds `$0120`/`$0121` with `$41`/`$56`. +5. `JMP $C800` — real init: waits two `$2002` vblank phases, clears `$0000-$07FF`, builds ZP pointer `$D7/$D8 = $C8xx`, zeroes `$00`, writes `$98` to PPUCTRL / `$1A` to PPUMASK. + +`$FF74-$FF7C` (`LDA #$00 / STA $0120 / STA $0121 / RTS`) clears the checker bytes; never called from static paths — emitted as data in the tail block. + +## Dispatcher architecture (two queue + `jmp ($0002)` dispatchers) + +The engine is the classic *queued-task* pattern (same family as the repo's Burger Time / DK Jr. analysis): + +| Dispatcher | Site | Pointer | Vector table | Entries | +|-----------|------|---------|--------------|---------| +| 1 | `$C3A3` | `$0002/$0003` | `$C3A6` | 9: `$C3B6 $C3C7 $C3FD $C35F $C3E3 $C3E7 $C3EB $C3EF $D820` | +| 2 | `$CCCA` | `$0002/$0003` | `$CCD5` | 8: `$CCEE $CD27 $CC90 $CD75 $CD43 $CDA4 $CE1A $CE5E` | + +Both build the pointer with the `TXA / ASL / TAX / LDA $tbl,X / STA $02 / LDA $tbl+1,X / STA $03 / LDX $45 / LDY $46 / jmp ($0002)` idiom; dispatcher 2 additionally copies an 8-byte low-value table from `$CCCD,X` into `$04EA,X` and syncs `$0430/$0431` (X/Y "cursor" state) before the jump. The `jmp ($0002)` sites terminate static traces; the tail at `$CCEB` (`jsr $D2BF / jsr $D476 / jmp $CC90`) re-queues into dispatcher 2. + +**Pass-1 candidates not statically resolvable** (emitted as code where entered only via runtime dispatch, documented for Pass 2 review): `$D7EB` (`EA EA A2 FF 9A / jmp $D655` — alternate cold-start stub, caller unknown), `$C201` (PPUCTRL/PPUMASK setup helper + OAM-buffer splitters, fall-through of the `$2002` wait loop at `$C1F6-$C200`), `$C43E` (division/multiply-style arithmetic helper entered after `rts` at `$C43D`). + +## Code coverage summary (final Pass-1 state) + +| Metric | Value | +|--------|-------| +| Code bytes traced | 5,834 / 16,384 (35.6%) | +| Labels | 396 | +| Distinct `jsr` targets | 70 | +| Data/gap bytes | 10,550 (64.4%) | +| Indirect `jmp ($0002)` sites | 2 (both queue dispatchers) | + +Regions entered only via runtime dispatch (queue-table targets) are traced; remaining unreached bytes sit in the data map below. + +## Data map (unreached bytes, all provenance-checked) + +| Region | Size | Content evidence | +|--------|------|------------------| +| `$C201-$C2FF` tail ($C225-$C2FF) | 219 | zero padding after the PPU-setup helpers | +| `$C34A-$C35E` | 21 | data after the dispatcher-1 `jmp ($0002)` tail | +| `$C3A6-$C3B7` | 18 | dispatcher-1 vector table (9 words) | +| `$C585-$C7FF` | 635 | text/marker tables (tile-index values `$88 $20 $88 $C1`; zero-padded from `$C714`) | +| `$C95A-$C9A6`, `$CAAA-$CAF2`, `$CBC1-$CBDB` | 177 | tile-index/lookup tables read via `lda $tbl,X` | +| `$CCCD-$CCE4` | 24 | dispatcher-2 low-byte table (8) + vector table (8 words) | +| `$D021-$D029` | 9 | brightness ramp `$0F $14 $28 $3C $50 $64` | +| `$D1AA-$D1B1`, `$D2AB-$D2BE` | 28 | small pointer/value tables | +| `$D320-$D3A0` | 129 | per-level byte tables (`$01 $02 $01 $02 ... $00 $08`) | +| `$D467-$D475`, `$D4EE-$D509`, `$D556-$D56A`, `$D5D5-$D631` | 146 | pointer/value pools read via `lda $tbl,X` / `adc` arithmetic | +| `$D69C-$D6AB` | 16 | value ramp `$27 $29 $2B $2D ...` | +| `$D79D-$D7E2` | 37 | small tables flanking the NMI handler | +| `$D7F3-$DE99` | 1,703 | packed level data (`$22 $2F`-patterned runs after the `$D7EB` stub) | +| `$DEBB-$DECA` | 16 | table | +| `$DF3E-$DF7F` | 80 | music frequency table (`$C3 $EC $6A $ED ...`) | +| `$E276-$ED6D` | 2,808 | audio pool: instrument/envelope ramps (`$FA $A8 $80 $3C ...` declining) + APU-register data | +| `$EDBF-$F890` | 2,770 | audio/graphics bulk tables + large `$00` runs (incl. `$F07F-$F890` padding) | +| `$F942-$FEFF` | 1,470 | mostly zeros — padding, save for small tables near `$FA00` | +| `$FF74-$FFF9` | 134 | tail: clear-checker bytes + pure zeros up to the vector page | ## `copilot/` Contents @@ -29,14 +87,15 @@ ROM: `_wip/Pyramid (U)/Pyramid (U) (Sachen).nes` (24,592 bytes, iNES). Status: * |------|---------| | `Pyramid (U) (Sachen).nes` | original ROM image (reference) | | `prg.bin` / `header.bin` / `chr.bin` | split image, produced by `_tools/splitnes.py` | -| `prg.s` | Pass-1 skeleton: `.incbin "prg.bin", $0000, $4000` (whole PRG) | -| `symbols.inc` | shared NES hardware constants (PPU/APU/controller, from the skeleton) | -| `locals.inc` | project-local zero-page aliases — empty for now (filled in Pass 2) | +| `prg.s` | Pass-1 classified source: traced code + explicit `.byte` data, `; PRG:$xxxx AA BB` per line | +| `symbols.inc` | shared NES hardware constants (PPU/APU/controller) | +| `locals.inc` | project-local zero-page aliases — still empty (filled in 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 | +| `prg.s.skeleton` | backup of the pre-classification skeleton (`.incbin`-only) source | -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, exactly like every other `_wip/` skeleton. When this project is promoted to a top-level full disassembly, `header.s` / `chr.s` and a full-ROM `make` target (cf. `Burger Time (U)`) get added. ## Build @@ -47,7 +106,7 @@ make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" ## Next Steps (per `PROMPTS.md`) -1. **Pass 1** — replace the blanket `.incbin` with classified code/data: trace reachability from RESET ($FF00) and NMI ($D72E), emit per-instruction `; PRG:$xxxx AA BB` annotations, keep unreached bytes as explicit `.byte` blocks. -2. **Pass 2** — replace `Label_`/`Sub_` names with semantic routine names; fill `locals.inc`. -3. **Pass 3** — name data tables/structures; release provisional flags. -4. **Promotion** — move to a top-level `/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory. +1. **Pass 1 — DONE.** Code/data split, `; PRG:$xxxx AA BB` audit annotations on every line, byte-identical build. +2. **Pass 2** — semantic names: `BootUnlock`, `StackByteCheck`, `QueueDispatch1/2`, NMI/IRQ frame handlers, audio routines; fill `locals.inc` with zero-page aliases (`$02/$03` pointer, `$45/$46` X/Y state, `$04EA` dispatcher copy, `$0120/$0121` "AV" checker). +3. **Pass 3** — name the data tables (level data at `$D7F3+`, envelope pool at `$E276+`, frequency table at `$DF3E`, ramps). +4. **Promotion** — move to a top-level `/copilot/` folder, add `header.s`/`chr.s` + full-ROM `make`, write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory. diff --git a/_wip/Pyramid (U)/copilot/prg.s b/_wip/Pyramid (U)/copilot/prg.s index 4c7d459..0bd05ff 100644 --- a/_wip/Pyramid (U)/copilot/prg.s +++ b/_wip/Pyramid (U)/copilot/prg.s @@ -1,7 +1,12 @@ -; Pyramid (U) NES disassembly - Pass 1 (skeleton) -; Generated from the supplied 16 KiB PRG image. -; Pass 1 classifies recursively reachable code, inline address tables, vectors, -; and untraced/data regions. All PRG data bytes are emitted explicitly with .byte directives. +; Pyramid (U) (Sachen) NES disassembly - Pass 1 +; Classified from RESET $FF00, NMI $D72E, IRQ=$FF00, and the $C800 boot mainline. +; The unlicensed Sachen boot pokes an unlock value to $4100 and checks stack bytes +; $41/$56 at $0120/$0121 before jumping into $C800. +; Two queued-event dispatchers use RAM pointer $0002/$0003 with vector tables at +; $C3A6 (9 entries) and $CCD5 (8 entries); their head bytes are data below. +; Code reached only through runtime dispatch (seeds D7EB/C201/C43E) is documented +; in OVERVIEW.md. Unreached bytes are emitted as explicit .byte data; every line +; carries its PRG offset for byte-identity audit. .setcpu "6502" @@ -9,4 +14,4525 @@ .include "locals.inc" .segment "PRG" -.incbin "prg.bin", $0000, $4000 + +Label_C000: + jmp $C063 ; PRG:$0000 4C 63 C0 +Label_C003: + jmp $C0B9 ; PRG:$0003 4C B9 C0 +Label_C006: + jmp $C0DB ; PRG:$0006 4C DB C0 +Label_C009: + jmp $C0FB ; PRG:$0009 4C FB C0 +Label_C00C: + jmp $C11B ; PRG:$000C 4C 1B C1 +Label_C00F: + jmp $C160 ; PRG:$000F 4C 60 C1 +Label_C012: + jmp $C192 ; PRG:$0012 4C 92 C1 +Label_C015: + jmp $C188 ; PRG:$0015 4C 88 C1 +Label_C018: + jmp $C1B6 ; PRG:$0018 4C B6 C1 +Label_C01B: + jmp $C1C1 ; PRG:$001B 4C C1 C1 +; ---- data $C01E-$C026 (9 bytes) ---- +Label_C01E: + .byte $4C,$C9,$C1,$4C,$D0,$C1,$4C,$D7 ; PRG:$001E + .byte $C1 ; PRG:$0026 +Label_C027: + jmp $C127 ; PRG:$0027 4C 27 C1 +; ---- data $C02A-$C03B (18 bytes) ---- +Label_C02A: + .byte $4C,$EF,$C1,$4C,$05,$C2,$4C,$01 ; PRG:$002A + .byte $C2,$4C,$25,$C2,$4C,$3A,$C2,$4C ; PRG:$0032 + .byte $94,$C2 ; PRG:$003A +Label_C03C: + jmp $C300 ; PRG:$003C 4C 00 C3 +Label_C03F: + jmp $C317 ; PRG:$003F 4C 17 C3 +; ---- data $C042-$C047 (6 bytes) ---- +Label_C042: + .byte $4C,$4A,$C3,$4C,$3E,$C4 ; PRG:$0042 +Label_C048: + jmp $C4B8 ; PRG:$0048 4C B8 C4 +Label_C04B: + jmp $C4D1 ; PRG:$004B 4C D1 C4 +Label_C04E: + jmp $C4EB ; PRG:$004E 4C EB C4 +Label_C051: + jmp $C536 ; PRG:$0051 4C 36 C5 +; ---- data $C054-$C062 (15 bytes) ---- +Label_C054: + .byte $4C,$85,$C5,$4C,$AB,$C5,$4C,$14 ; PRG:$0054 + .byte $C6,$4C,$62,$C6,$4C,$A3,$C6 ; PRG:$005C +Label_C063: + sta $02 ; PRG:$0063 85 02 + stx $03 ; PRG:$0065 86 03 + ldy #$00 ; PRG:$0067 A0 00 + lda ($02),y ; PRG:$0069 B1 02 + sta $05 ; PRG:$006B 85 05 + jsr $C1D0 ; PRG:$006D 20 D0 C1 + lda ($02),y ; PRG:$0070 B1 02 + sta $06 ; PRG:$0072 85 06 + jsr $C1D0 ; PRG:$0074 20 D0 C1 + jsr $C188 ; PRG:$0077 20 88 C1 + jsr $C1EF ; PRG:$007A 20 EF C1 + lda #$00 ; PRG:$007D A9 00 + sta PPUMASK ; PRG:$007F 8D 01 20 + lda $0700 ; PRG:$0082 AD 00 07 + sta PPUADDR ; PRG:$0085 8D 06 20 + lda $0701 ; PRG:$0088 AD 01 07 + sta PPUADDR ; PRG:$008B 8D 06 20 + ldy #$00 ; PRG:$008E A0 00 +Label_C090: + lda ($02),y ; PRG:$0090 B1 02 + cmp #$FE ; PRG:$0092 C9 FE + bne Label_C0A8 ; PRG:$0094 D0 12 + jsr $C1D0 ; PRG:$0096 20 D0 C1 + lda ($02),y ; PRG:$0099 B1 02 + beq Label_C0B3 ; PRG:$009B F0 16 + tax ; PRG:$009D AA + lda $45 ; PRG:$009E A5 45 +Label_C0A0: + sta PPUDATA ; PRG:$00A0 8D 07 20 + dex ; PRG:$00A3 CA + bne Label_C0A0 ; PRG:$00A4 D0 FA + beq Label_C0AD ; PRG:$00A6 F0 05 +Label_C0A8: + sta $45 ; PRG:$00A8 85 45 + sta PPUDATA ; PRG:$00AA 8D 07 20 +Label_C0AD: + jsr $C1D0 ; PRG:$00AD 20 D0 C1 + jmp $C090 ; PRG:$00B0 4C 90 C0 +Label_C0B3: + lda $01 ; PRG:$00B3 A5 01 + sta PPUCTRL ; PRG:$00B5 8D 00 20 + rts ; PRG:$00B8 60 +Label_C0B9: + sta $02 ; PRG:$00B9 85 02 + stx $03 ; PRG:$00BB 86 03 + lda #$23 ; PRG:$00BD A9 23 + ora $00 ; PRG:$00BF 05 00 + sta $0700 ; PRG:$00C1 8D 00 07 + lda #$C0 ; PRG:$00C4 A9 C0 + sta $0701 ; PRG:$00C6 8D 01 07 + ldy #$00 ; PRG:$00C9 A0 00 + ldx #$02 ; PRG:$00CB A2 02 +Label_C0CD: + lda ($02),y ; PRG:$00CD B1 02 + sta $0700,x ; PRG:$00CF 9D 00 07 + inx ; PRG:$00D2 E8 + iny ; PRG:$00D3 C8 + cpy #$40 ; PRG:$00D4 C0 40 + bcc Label_C0CD ; PRG:$00D6 90 F5 + jmp $C11B ; PRG:$00D8 4C 1B C1 +Label_C0DB: + sta $02 ; PRG:$00DB 85 02 + stx $03 ; PRG:$00DD 86 03 + lda #$3F ; PRG:$00DF A9 3F + sta $0700 ; PRG:$00E1 8D 00 07 + lda #$00 ; PRG:$00E4 A9 00 + sta $0701 ; PRG:$00E6 8D 01 07 + ldx #$02 ; PRG:$00E9 A2 02 + ldy #$00 ; PRG:$00EB A0 00 +Label_C0ED: + lda ($02),y ; PRG:$00ED B1 02 + sta $0700,x ; PRG:$00EF 9D 00 07 + inx ; PRG:$00F2 E8 + iny ; PRG:$00F3 C8 + cpy #$10 ; PRG:$00F4 C0 10 + bcc Label_C0ED ; PRG:$00F6 90 F5 + jmp $C11B ; PRG:$00F8 4C 1B C1 +Label_C0FB: + sta $02 ; PRG:$00FB 85 02 + stx $03 ; PRG:$00FD 86 03 + lda #$3F ; PRG:$00FF A9 3F + sta $0700 ; PRG:$0101 8D 00 07 + lda #$10 ; PRG:$0104 A9 10 + sta $0701 ; PRG:$0106 8D 01 07 + ldx #$02 ; PRG:$0109 A2 02 + ldy #$00 ; PRG:$010B A0 00 +Label_C10D: + lda ($02),y ; PRG:$010D B1 02 + sta $0700,x ; PRG:$010F 9D 00 07 + inx ; PRG:$0112 E8 + iny ; PRG:$0113 C8 + cpy #$10 ; PRG:$0114 C0 10 + bcc Label_C10D ; PRG:$0116 90 F5 + jmp $C11B ; PRG:$0118 4C 1B C1 +Label_C11B: + lda #$FD ; PRG:$011B A9 FD + sta $0700,x ; PRG:$011D 9D 00 07 + inc $04 ; PRG:$0120 E6 04 +Label_C122: + lda $04 ; PRG:$0122 A5 04 + bne Label_C122 ; PRG:$0124 D0 FC + rts ; PRG:$0126 60 +Label_C127: + lda $04 ; PRG:$0127 A5 04 + beq Label_C15B ; PRG:$0129 F0 30 + lda $0700 ; PRG:$012B AD 00 07 + sta PPUADDR ; PRG:$012E 8D 06 20 + lda $0701 ; PRG:$0131 AD 01 07 + sta PPUADDR ; PRG:$0134 8D 06 20 + ldx #$02 ; PRG:$0137 A2 02 +Label_C139: + lda $0700,x ; PRG:$0139 BD 00 07 + cmp #$FD ; PRG:$013C C9 FD + beq Label_C15B ; PRG:$013E F0 1B + cmp #$FE ; PRG:$0140 C9 FE + bne Label_C155 ; PRG:$0142 D0 11 + inx ; PRG:$0144 E8 + lda $0700,x ; PRG:$0145 BD 00 07 + sta PPUADDR ; PRG:$0148 8D 06 20 + inx ; PRG:$014B E8 + lda $0700,x ; PRG:$014C BD 00 07 + sta PPUADDR ; PRG:$014F 8D 06 20 + inx ; PRG:$0152 E8 + bne Label_C139 ; PRG:$0153 D0 E4 +Label_C155: + sta PPUDATA ; PRG:$0155 8D 07 20 + inx ; PRG:$0158 E8 + bne Label_C139 ; PRG:$0159 D0 DE +Label_C15B: + lda #$00 ; PRG:$015B A9 00 + sta $04 ; PRG:$015D 85 04 + rts ; PRG:$015F 60 +Label_C160: + lda #$01 ; PRG:$0160 A9 01 + sta JOY1 ; PRG:$0162 8D 16 40 + ldx #$00 ; PRG:$0165 A2 00 + stx JOY1 ; PRG:$0167 8E 16 40 +Label_C16A: + lda JOY1 ; PRG:$016A AD 16 40 + and #$03 ; PRG:$016D 29 03 + cmp #$01 ; PRG:$016F C9 01 + ror $3D ; PRG:$0171 66 3D + sta $0300,x ; PRG:$0173 9D 00 03 + lda APUFRAMECOUNTER ; PRG:$0176 AD 17 40 + and #$03 ; PRG:$0179 29 03 + cmp #$01 ; PRG:$017B C9 01 + ror $3E ; PRG:$017D 66 3E + sta $0308,x ; PRG:$017F 9D 08 03 + inx ; PRG:$0182 E8 + cpx #$08 ; PRG:$0183 E0 08 + bcc Label_C16A ; PRG:$0185 90 E3 + rts ; PRG:$0187 60 +Label_C188: + txa ; PRG:$0188 8A + pha ; PRG:$0189 48 + ldx #$00 ; PRG:$018A A2 00 + jsr $C198 ; PRG:$018C 20 98 C1 + pla ; PRG:$018F 68 + tax ; PRG:$0190 AA + rts ; PRG:$0191 60 +Label_C192: + lda #$FE ; PRG:$0192 A9 FE + sta $0700,x ; PRG:$0194 9D 00 07 + inx ; PRG:$0197 E8 +Label_C198: + lda $06 ; PRG:$0198 A5 06 + and #$F8 ; PRG:$019A 29 F8 + lsr a ; PRG:$019C 4A + lsr a ; PRG:$019D 4A + lsr a ; PRG:$019E 4A + ora #$20 ; PRG:$019F 09 20 + clc ; PRG:$01A1 18 + adc $00 ; PRG:$01A2 65 00 + sta $0700,x ; PRG:$01A4 9D 00 07 + inx ; PRG:$01A7 E8 + lda $06 ; PRG:$01A8 A5 06 + asl a ; PRG:$01AA 0A + asl a ; PRG:$01AB 0A + asl a ; PRG:$01AC 0A + asl a ; PRG:$01AD 0A + asl a ; PRG:$01AE 0A + ora $05 ; PRG:$01AF 05 05 + sta $0700,x ; PRG:$01B1 9D 00 07 + inx ; PRG:$01B4 E8 + rts ; PRG:$01B5 60 +Label_C1B6: + ldx #$00 ; PRG:$01B6 A2 00 + lda #$FF ; PRG:$01B8 A9 FF +Label_C1BA: + sta $0200,x ; PRG:$01BA 9D 00 02 + inx ; PRG:$01BD E8 + bne Label_C1BA ; PRG:$01BE D0 FA + rts ; PRG:$01C0 60 +Label_C1C1: + clc ; PRG:$01C1 18 + adc $0A ; PRG:$01C2 65 0A +Label_C1C4: + cmp $0A ; PRG:$01C4 C5 0A + bne Label_C1C4 ; PRG:$01C6 D0 FC + rts ; PRG:$01C8 60 +; ---- data $C1C9-$C1CF (7 bytes) ---- +Label_C1C9: + .byte $E6,$0D,$D0,$02,$E6,$0E,$60 ; PRG:$01C9 +Label_C1D0: + inc $02 ; PRG:$01D0 E6 02 + bne Label_C1D6 ; PRG:$01D2 D0 02 + inc $03 ; PRG:$01D4 E6 03 +Label_C1D6: + rts ; PRG:$01D6 60 +Label_C1D7: + pha ; PRG:$01D7 48 + lsr a ; PRG:$01D8 4A + lsr a ; PRG:$01D9 4A + lsr a ; PRG:$01DA 4A + lsr a ; PRG:$01DB 4A + jsr $C1E2 ; PRG:$01DC 20 E2 C1 + pla ; PRG:$01DF 68 + and #$0F ; PRG:$01E0 29 0F +Label_C1E2: + ora #$30 ; PRG:$01E2 09 30 + cmp #$3A ; PRG:$01E4 C9 3A + bcc Label_C1EA ; PRG:$01E6 90 02 + adc #$C6 ; PRG:$01E8 69 C6 +Label_C1EA: + sta $0700,x ; PRG:$01EA 9D 00 07 + inx ; PRG:$01ED E8 + rts ; PRG:$01EE 60 +Label_C1EF: + lda $01 ; PRG:$01EF A5 01 + and #$7F ; PRG:$01F1 29 7F + sta PPUCTRL ; PRG:$01F3 8D 00 20 +Label_C1F6: + lda PPUSTATUS ; PRG:$01F6 AD 02 20 + bmi Label_C1F6 ; PRG:$01F9 30 FB +Label_C1FB: + lda PPUSTATUS ; PRG:$01FB AD 02 20 + bpl Label_C1FB ; PRG:$01FE 10 FB + rts ; PRG:$0200 60 +; ---- data $C201-$C2FF (255 bytes) ---- +Label_C201: + .byte $A9,$A8,$D0,$02,$A9,$28,$8D,$00 ; PRG:$0201 + .byte $20,$A9,$1E,$8D,$01,$20,$A9,$3F ; PRG:$0209 + .byte $8D,$06,$20,$A9,$00,$8D,$06,$20 ; PRG:$0211 + .byte $8D,$06,$20,$8D,$06,$20,$A9,$A8 ; PRG:$0219 + .byte $8D,$00,$20,$60,$A5,$44,$9D,$00 ; PRG:$0221 + .byte $02,$A5,$02,$9D,$01,$02,$A5,$03 ; PRG:$0229 + .byte $9D,$02,$02,$A5,$43,$9D,$03,$02 ; PRG:$0231 + .byte $60,$A5,$45,$48,$A5,$46,$48,$8A ; PRG:$0239 + .byte $85,$45,$CA,$8A,$4A,$A8,$20,$88 ; PRG:$0241 + .byte $C1,$A9,$00,$85,$46,$A2,$02,$A5 ; PRG:$0249 + .byte $45,$29,$01,$D0,$09,$B1,$02,$29 ; PRG:$0251 + .byte $0F,$20,$77,$C2,$C6,$45,$B1,$02 ; PRG:$0259 + .byte $4A,$4A,$4A,$4A,$20,$77,$C2,$C6 ; PRG:$0261 + .byte $45,$88,$10,$E9,$20,$1B,$C1,$68 ; PRG:$0269 + .byte $85,$46,$68,$85,$45,$60,$48,$C9 ; PRG:$0271 + .byte $00,$D0,$0E,$A5,$46,$D0,$0A,$A5 ; PRG:$0279 + .byte $45,$C9,$01,$F0,$04,$68,$4C,$8F ; PRG:$0281 + .byte $C2,$68,$09,$30,$E6,$46,$9D,$00 ; PRG:$0289 + .byte $07,$E8,$60,$A5,$45,$48,$A5,$46 ; PRG:$0291 + .byte $48,$86,$45,$A0,$00,$A2,$00,$B1 ; PRG:$0299 + .byte $02,$29,$F0,$85,$46,$B1,$0D,$29 ; PRG:$02A1 + .byte $F0,$18,$65,$46,$E0,$00,$F0,$05 ; PRG:$02A9 + .byte $18,$69,$10,$A2,$00,$C9,$A0,$90 ; PRG:$02B1 + .byte $04,$E9,$A0,$A2,$01,$85,$46,$B1 ; PRG:$02B9 + .byte $02,$29,$0F,$05,$46,$91,$02,$C6 ; PRG:$02C1 + .byte $45,$F0,$2D,$B1,$02,$29,$0F,$85 ; PRG:$02C9 + .byte $46,$B1,$0D,$29,$0F,$18,$65,$46 ; PRG:$02D1 + .byte $E0,$00,$F0,$05,$18,$69,$01,$A2 ; PRG:$02D9 + .byte $00,$C9,$0A,$90,$04,$E9,$0A,$A2 ; PRG:$02E1 + .byte $10,$85,$46,$B1,$02,$29,$F0,$05 ; PRG:$02E9 + .byte $46,$91,$02,$C8,$C6,$45,$D0,$A7 ; PRG:$02F1 + .byte $68,$85,$46,$68,$85,$45,$60 ; PRG:$02F9 +Label_C300: + txa ; PRG:$0300 8A + adc $3F ; PRG:$0301 65 3F + sta $3F ; PRG:$0303 85 3F + sbc $40 ; PRG:$0305 E5 40 + sta $40 ; PRG:$0307 85 40 + adc $41 ; PRG:$0309 65 41 + sta $41 ; PRG:$030B 85 41 + sbc $42 ; PRG:$030D E5 42 + sta $42 ; PRG:$030F 85 42 + tya ; PRG:$0311 98 + adc $42 ; PRG:$0312 65 42 + sbc $3F ; PRG:$0314 E5 3F + rts ; PRG:$0316 60 +Label_C317: + ldy #$00 ; PRG:$0317 A0 00 + ldx #$FF ; PRG:$0319 A2 FF +Label_C31B: + lda ($02),y ; PRG:$031B B1 02 + sta $05 ; PRG:$031D 85 05 + jsr $C1D0 ; PRG:$031F 20 D0 C1 + lda ($02),y ; PRG:$0322 B1 02 + sta $06 ; PRG:$0324 85 06 + jsr $C1D0 ; PRG:$0326 20 D0 C1 + jsr $C192 ; PRG:$0329 20 92 C1 +Label_C32C: + ldy #$00 ; PRG:$032C A0 00 + lda ($02),y ; PRG:$032E B1 02 + jsr $C1D0 ; PRG:$0330 20 D0 C1 + cmp #$FE ; PRG:$0333 C9 FE + beq Label_C31B ; PRG:$0335 F0 E4 + cmp #$FD ; PRG:$0337 C9 FD + beq Label_C347 ; PRG:$0339 F0 0C + ldy $0C ; PRG:$033B A4 0C + beq Label_C341 ; PRG:$033D F0 02 + lda #$00 ; PRG:$033F A9 00 +Label_C341: + sta $0700,x ; PRG:$0341 9D 00 07 + inx ; PRG:$0344 E8 + bne Label_C32C ; PRG:$0345 D0 E5 +Label_C347: + jmp $C11B ; PRG:$0347 4C 1B C1 +; ---- data $C34A-$C35E (21 bytes) ---- +Label_C34A: + .byte $85,$47,$A0,$00,$84,$45,$84,$46 ; PRG:$034A + .byte $A2,$80,$B1,$02,$9D,$00,$07,$E8 ; PRG:$0352 + .byte $C8,$C0,$10,$90,$F5 ; PRG:$035A +Label_C35F: + lda #$3F ; PRG:$035F A9 3F + sta $0700 ; PRG:$0361 8D 00 07 + lda $47 ; PRG:$0364 A5 47 + sta $0701 ; PRG:$0366 8D 01 07 + ldx #$02 ; PRG:$0369 A2 02 + ldy #$80 ; PRG:$036B A0 80 +Label_C36D: + lda $0700,y ; PRG:$036D B9 00 07 + sta $0700,x ; PRG:$0370 9D 00 07 + inx ; PRG:$0373 E8 + iny ; PRG:$0374 C8 + cpy #$90 ; PRG:$0375 C0 90 + bcc Label_C36D ; PRG:$0377 90 F4 + jsr $C11B ; PRG:$0379 20 1B C1 + jsr $C3FE ; PRG:$037C 20 FE C3 + lda #$05 ; PRG:$037F A9 05 + jsr $C1C1 ; PRG:$0381 20 C1 C1 +Label_C384: + ldx #$00 ; PRG:$0384 A2 00 +Label_C386: + lda $0300,x ; PRG:$0386 BD 00 03 + bne Label_C392 ; PRG:$0389 D0 07 + inx ; PRG:$038B E8 + cpx #$08 ; PRG:$038C E0 08 + bcc Label_C386 ; PRG:$038E 90 F6 + bcs Label_C384 ; PRG:$0390 B0 F2 +Label_C392: + txa ; PRG:$0392 8A + asl a ; PRG:$0393 0A + tax ; PRG:$0394 AA + lda $C3A6,x ; PRG:$0395 BD A6 C3 + sta $02 ; PRG:$0398 85 02 + lda $C3A7,x ; PRG:$039A BD A7 C3 + sta $03 ; PRG:$039D 85 03 + ldx $45 ; PRG:$039F A6 45 + ldy $46 ; PRG:$03A1 A4 46 + jmp ($0002) ; PRG:$03A3 6C 02 00 +; ---- data $C3A6-$C3B7 (18 bytes) ---- +Label_C3A6: + .byte $B6,$C3,$C7,$C3,$FD,$C3,$5F,$C3 ; PRG:$03A6 + .byte $E3,$C3,$E7,$C3,$EB,$C3,$EF,$C3 ; PRG:$03AE + .byte $20,$D8 ; PRG:$03B6 +; ---- data $C3B8-$C3B8 (1 bytes) ---- +Label_C3B8: + .byte $C3 ; PRG:$03B8 + lda $0700,y ; PRG:$03B9 B9 00 07 + clc ; PRG:$03BC 18 + adc #$01 ; PRG:$03BD 69 01 + and #$3F ; PRG:$03BF 29 3F + sta $0700,y ; PRG:$03C1 99 00 07 + jmp $C3FA ; PRG:$03C4 4C FA C3 +Label_C3C7: + jsr $C3D8 ; PRG:$03C7 20 D8 C3 + lda $0700,y ; PRG:$03CA B9 00 07 + sec ; PRG:$03CD 38 + sbc #$01 ; PRG:$03CE E9 01 + and #$3F ; PRG:$03D0 29 3F + sta $0700,y ; PRG:$03D2 99 00 07 + jmp $C3FA ; PRG:$03D5 4C FA C3 +Label_C3D8: + lda $46 ; PRG:$03D8 A5 46 + asl a ; PRG:$03DA 0A + asl a ; PRG:$03DB 0A + clc ; PRG:$03DC 18 + adc $45 ; PRG:$03DD 65 45 + adc #$80 ; PRG:$03DF 69 80 + tay ; PRG:$03E1 A8 + rts ; PRG:$03E2 60 +Label_C3E3: + iny ; PRG:$03E3 C8 + jmp $C3F0 ; PRG:$03E4 4C F0 C3 +Label_C3E7: + dey ; PRG:$03E7 88 + jmp $C3F0 ; PRG:$03E8 4C F0 C3 +Label_C3EB: + dex ; PRG:$03EB CA + jmp $C3F0 ; PRG:$03EC 4C F0 C3 +Label_C3EF: + inx ; PRG:$03EF E8 +Label_C3F0: + txa ; PRG:$03F0 8A + and #$03 ; PRG:$03F1 29 03 + sta $45 ; PRG:$03F3 85 45 + tya ; PRG:$03F5 98 + and #$03 ; PRG:$03F6 29 03 + sta $46 ; PRG:$03F8 85 46 +Label_C3FA: + jmp $C35F ; PRG:$03FA 4C 5F C3 +Label_C3FD: + rts ; PRG:$03FD 60 +Label_C3FE: + lda #$23 ; PRG:$03FE A9 23 + clc ; PRG:$0400 18 + adc $00 ; PRG:$0401 65 00 + sta $0700 ; PRG:$0403 8D 00 07 + lda #$61 ; PRG:$0406 A9 61 + sta $0701 ; PRG:$0408 8D 01 07 + ldx #$02 ; PRG:$040B A2 02 + lda $46 ; PRG:$040D A5 46 + and #$03 ; PRG:$040F 29 03 + ora #$30 ; PRG:$0411 09 30 + sta $0700,x ; PRG:$0413 9D 00 07 + inx ; PRG:$0416 E8 + lda #$2D ; PRG:$0417 A9 2D + sta $0700,x ; PRG:$0419 9D 00 07 + inx ; PRG:$041C E8 + lda $45 ; PRG:$041D A5 45 + and #$03 ; PRG:$041F 29 03 + ora #$30 ; PRG:$0421 09 30 + sta $0700,x ; PRG:$0423 9D 00 07 + inx ; PRG:$0426 E8 + lda #$00 ; PRG:$0427 A9 00 + sta $0700,x ; PRG:$0429 9D 00 07 + inx ; PRG:$042C E8 + sta $0700,x ; PRG:$042D 9D 00 07 + inx ; PRG:$0430 E8 + jsr $C3D8 ; PRG:$0431 20 D8 C3 + lda $0700,y ; PRG:$0434 B9 00 07 + jsr $C1D7 ; PRG:$0437 20 D7 C1 + jsr $C11B ; PRG:$043A 20 1B C1 + rts ; PRG:$043D 60 +; ---- data $C43E-$C4B7 (122 bytes) ---- +Label_C43E: + .byte $86,$49,$85,$48,$A8,$A5,$02,$C0 ; PRG:$043E + .byte $00,$F0,$31,$A5,$0D,$C4,$49,$F0 ; PRG:$0446 + .byte $2B,$A0,$00,$A5,$0D,$38,$E5,$02 ; PRG:$044E + .byte $B0,$08,$C8,$85,$45,$A9,$00,$38 ; PRG:$0456 + .byte $E5,$45,$85,$45,$A6,$49,$20,$D1 ; PRG:$045E + .byte $C4,$A6,$48,$20,$B8,$C4,$85,$45 ; PRG:$0466 + .byte $C0,$00,$F0,$05,$A9,$00,$38,$E5 ; PRG:$046E + .byte $45,$18,$65,$02,$48,$A4,$48,$A5 ; PRG:$0476 + .byte $03,$C0,$00,$F0,$31,$A5,$0E,$C4 ; PRG:$047E + .byte $49,$F0,$2B,$A0,$00,$A5,$0E,$38 ; PRG:$0486 + .byte $E5,$03,$B0,$08,$C8,$85,$45,$A9 ; PRG:$048E + .byte $00,$38,$E5,$45,$85,$45,$A6,$49 ; PRG:$0496 + .byte $20,$D1,$C4,$A6,$48,$20,$B8,$C4 ; PRG:$049E + .byte $85,$45,$C0,$00,$F0,$05,$A9,$00 ; PRG:$04A6 + .byte $38,$E5,$45,$18,$65,$03,$A8,$68 ; PRG:$04AE + .byte $AA,$60 ; PRG:$04B6 +Label_C4B8: + sta $45 ; PRG:$04B8 85 45 + stx $46 ; PRG:$04BA 86 46 + lda #$00 ; PRG:$04BC A9 00 + ldx #$08 ; PRG:$04BE A2 08 +Label_C4C0: + lsr $46 ; PRG:$04C0 46 46 + bcc Label_C4C7 ; PRG:$04C2 90 03 + clc ; PRG:$04C4 18 + adc $45 ; PRG:$04C5 65 45 +Label_C4C7: + lsr a ; PRG:$04C7 4A + ror $47 ; PRG:$04C8 66 47 + dex ; PRG:$04CA CA + bne Label_C4C0 ; PRG:$04CB D0 F3 + tax ; PRG:$04CD AA + lda $47 ; PRG:$04CE A5 47 + rts ; PRG:$04D0 60 +Label_C4D1: + sta $45 ; PRG:$04D1 85 45 + stx $46 ; PRG:$04D3 86 46 + lda #$00 ; PRG:$04D5 A9 00 + ldx #$08 ; PRG:$04D7 A2 08 +Label_C4D9: + asl $45 ; PRG:$04D9 06 45 + rol a ; PRG:$04DB 2A + cmp $46 ; PRG:$04DC C5 46 + bcc Label_C4E4 ; PRG:$04DE 90 04 + sbc $46 ; PRG:$04E0 E5 46 + inc $45 ; PRG:$04E2 E6 45 +Label_C4E4: + dex ; PRG:$04E4 CA + bne Label_C4D9 ; PRG:$04E5 D0 F2 + tax ; PRG:$04E7 AA + lda $45 ; PRG:$04E8 A5 45 + rts ; PRG:$04EA 60 +Label_C4EB: + and #$01 ; PRG:$04EB 29 01 + asl a ; PRG:$04ED 0A + asl a ; PRG:$04EE 0A + asl a ; PRG:$04EF 0A + asl a ; PRG:$04F0 0A + sta $0701 ; PRG:$04F1 8D 01 07 + lda #$3F ; PRG:$04F4 A9 3F + sta $0700 ; PRG:$04F6 8D 00 07 + lda #$1F ; PRG:$04F9 A9 1F + ldx #$02 ; PRG:$04FB A2 02 +Label_C4FD: + sta $0700,x ; PRG:$04FD 9D 00 07 + inx ; PRG:$0500 E8 + cpx #$12 ; PRG:$0501 E0 12 + bcc Label_C4FD ; PRG:$0503 90 F8 + jsr $C11B ; PRG:$0505 20 1B C1 + ldx #$00 ; PRG:$0508 A2 00 +Label_C50A: + stx $45 ; PRG:$050A 86 45 + ldy $C52A,x ; PRG:$050C BC 2A C5 + sty $0701 ; PRG:$050F 8C 01 07 + lda ($02),y ; PRG:$0512 B1 02 + sta $0702 ; PRG:$0514 8D 02 07 + ldx #$03 ; PRG:$0517 A2 03 + jsr $C11B ; PRG:$0519 20 1B C1 + ldx $45 ; PRG:$051C A6 45 + inx ; PRG:$051E E8 + cpx #$0C ; PRG:$051F E0 0C + bcc Label_C50A ; PRG:$0521 90 E7 + lda $02 ; PRG:$0523 A5 02 + ldx $03 ; PRG:$0525 A6 03 + jmp $C0DB ; PRG:$0527 4C DB C0 +; ---- data $C52A-$C52D (4 bytes) ---- +Label_C52A: + .byte $01,$05,$09,$0D ; PRG:$052A +; ---- data $C52E-$C535 (8 bytes) ---- +Label_C52E: + .byte $02,$06,$0A,$0E,$03,$07,$0B,$0F ; PRG:$052E +Label_C536: + and #$01 ; PRG:$0536 29 01 + asl a ; PRG:$0538 0A + asl a ; PRG:$0539 0A + asl a ; PRG:$053A 0A + asl a ; PRG:$053B 0A + sta $0701 ; PRG:$053C 8D 01 07 + lda #$3F ; PRG:$053F A9 3F + sta $0700 ; PRG:$0541 8D 00 07 + ldx #$02 ; PRG:$0544 A2 02 + ldy #$00 ; PRG:$0546 A0 00 +Label_C548: + lda #$0F ; PRG:$0548 A9 0F + sta $0700,x ; PRG:$054A 9D 00 07 + iny ; PRG:$054D C8 + inx ; PRG:$054E E8 + lda ($02),y ; PRG:$054F B1 02 + sta $0700,x ; PRG:$0551 9D 00 07 + iny ; PRG:$0554 C8 + inx ; PRG:$0555 E8 + lda ($02),y ; PRG:$0556 B1 02 + sta $0700,x ; PRG:$0558 9D 00 07 + iny ; PRG:$055B C8 + inx ; PRG:$055C E8 + lda ($02),y ; PRG:$055D B1 02 + sta $0700,x ; PRG:$055F 9D 00 07 + inx ; PRG:$0562 E8 + iny ; PRG:$0563 C8 + cpy #$10 ; PRG:$0564 C0 10 + bcc Label_C548 ; PRG:$0566 90 E0 + jsr $C11B ; PRG:$0568 20 1B C1 + ldx #$0B ; PRG:$056B A2 0B +Label_C56D: + stx $45 ; PRG:$056D 86 45 + ldy $C52A,x ; PRG:$056F BC 2A C5 + sty $0701 ; PRG:$0572 8C 01 07 + lda #$0F ; PRG:$0575 A9 0F + sta $0702 ; PRG:$0577 8D 02 07 + ldx #$03 ; PRG:$057A A2 03 + jsr $C11B ; PRG:$057C 20 1B C1 + ldx $45 ; PRG:$057F A6 45 + dex ; PRG:$0581 CA + bpl Label_C56D ; PRG:$0582 10 E9 + rts ; PRG:$0584 60 +; ---- data $C585-$C608 (132 bytes) ---- +Label_C585: + .byte $88,$20,$88,$C1,$A9,$00,$85,$45 ; PRG:$0585 + .byte $A2,$02,$B1,$02,$D0,$0A,$C0,$00 ; PRG:$058D + .byte $F0,$06,$A5,$45,$F0,$06,$A9,$00 ; PRG:$0595 + .byte $E6,$45,$09,$30,$9D,$00,$07,$E8 ; PRG:$059D + .byte $88,$10,$E7,$4C,$1B,$C1,$A5,$4D ; PRG:$05A5 + .byte $48,$A5,$4E,$48,$A5,$4F,$48,$A2 ; PRG:$05AD + .byte $05,$A9,$00,$95,$50,$CA,$10,$FB ; PRG:$05B5 + .byte $A2,$05,$A8,$A5,$4D,$38,$F9,$05 ; PRG:$05BD + .byte $C6,$85,$4D,$A5,$4E,$C8,$F9,$05 ; PRG:$05C5 + .byte $C6,$85,$4E,$A5,$4F,$C8,$F9,$05 ; PRG:$05CD + .byte $C6,$90,$09,$85,$4F,$F6,$50,$88 ; PRG:$05D5 + .byte $88,$4C,$C0,$C5,$88,$88,$A5,$4D ; PRG:$05DD + .byte $79,$05,$C6,$85,$4D,$C8,$A5,$4E ; PRG:$05E5 + .byte $79,$05,$C6,$85,$4E,$C8,$C8,$CA ; PRG:$05ED + .byte $D0,$C9,$A5,$4D,$85,$50,$68,$85 ; PRG:$05F5 + .byte $4F,$68,$85,$4E,$68,$85,$4D,$60 ; PRG:$05FD + .byte $A0,$86,$01,$10 ; PRG:$0605 +; ---- data $C609-$C613 (11 bytes) ---- +Label_C609: + .byte $27,$00,$E8,$03,$00,$64,$00,$00 ; PRG:$0609 + .byte $0A,$00,$00 ; PRG:$0611 +; ---- data $C614-$C713 (256 bytes) ---- +Label_C614: + .byte $A9,$00,$85,$4F,$85,$4E,$A5,$55 ; PRG:$0614 + .byte $85,$4D,$A2,$04,$A5,$4F,$48,$A5 ; PRG:$061C + .byte $4E,$48,$A5,$4D,$48,$06,$4D,$26 ; PRG:$0624 + .byte $4E,$26,$4F,$06,$4D,$26,$4E,$26 ; PRG:$062C + .byte $4F,$68,$18,$65,$4D,$85,$4D,$68 ; PRG:$0634 + .byte $65,$4E,$85,$4E,$68,$65,$4F,$85 ; PRG:$063C + .byte $4F,$06,$4D,$26,$4E,$26,$4F,$B5 ; PRG:$0644 + .byte $50,$18,$65,$4D,$85,$4D,$A9,$00 ; PRG:$064C + .byte $65,$4E,$85,$4E,$A9,$00,$65,$4F ; PRG:$0654 + .byte $85,$4F,$CA,$10,$BF,$60,$29,$01 ; PRG:$065C + .byte $0A,$0A,$0A,$0A,$8D,$01,$07,$A9 ; PRG:$0664 + .byte $3F,$8D,$00,$07,$A0,$00,$B1,$02 ; PRG:$066C + .byte $A2,$02,$9D,$00,$07,$E8,$E0,$12 ; PRG:$0674 + .byte $90,$F8,$20,$1B,$C1,$A2,$00,$86 ; PRG:$067C + .byte $45,$BC,$2A,$C5,$8C,$01,$07,$B1 ; PRG:$0684 + .byte $02,$8D,$02,$07,$A2,$03,$20,$1B ; PRG:$068C + .byte $C1,$A6,$45,$E8,$E0,$0C,$90,$E7 ; PRG:$0694 + .byte $A5,$02,$A6,$03,$4C,$DB,$C0,$29 ; PRG:$069C + .byte $01,$0A,$0A,$0A,$0A,$8D,$01,$07 ; PRG:$06A4 + .byte $A9,$3F,$8D,$00,$07,$A0,$00,$B1 ; PRG:$06AC + .byte $02,$8D,$0A,$07,$A2,$0B,$86,$45 ; PRG:$06B4 + .byte $BC,$2A,$C5,$8C,$01,$07,$AD,$0A ; PRG:$06BC + .byte $07,$8D,$02,$07,$A2,$03,$20,$1B ; PRG:$06C4 + .byte $C1,$A6,$45,$CA,$10,$E8,$A9,$00 ; PRG:$06CC + .byte $8D,$01,$07,$A9,$1F,$A2,$02,$9D ; PRG:$06D4 + .byte $00,$07,$E8,$E0,$12,$90,$F8,$20 ; PRG:$06DC + .byte $1B,$C1,$60,$00,$00,$00,$00,$00 ; PRG:$06E4 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$06EC + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$06F4 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$06FC + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$0704 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$070C +; ---- data $C714-$C7FF (236 bytes) ---- +Label_C714: + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$0714 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$071C + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$0724 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$072C + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$0734 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$073C + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$0744 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$074C + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$0754 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$075C + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$0764 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$076C + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$0774 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$077C + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$0784 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$078C + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$0794 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$079C + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$07A4 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$07AC + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$07B4 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$07BC + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$07C4 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$07CC + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$07D4 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$07DC + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$07E4 + .byte $00,$00,$00,$00,$00,$01,$02,$03 ; PRG:$07EC + .byte $04,$05,$06,$07,$08,$09,$0A,$0B ; PRG:$07F4 + .byte $0C,$0D,$0E,$0F ; PRG:$07FC +Label_C800: + sei ; PRG:$0800 78 + cld ; PRG:$0801 D8 + ldx #$80 ; PRG:$0802 A2 80 + txs ; PRG:$0804 9A +Label_C805: + lda PPUSTATUS ; PRG:$0805 AD 02 20 + bpl Label_C805 ; PRG:$0808 10 FB +Label_C80A: + lda PPUSTATUS ; PRG:$080A AD 02 20 + bmi Label_C80A ; PRG:$080D 30 FB + jsr $DF0E ; PRG:$080F 20 0E DF + ldx #$00 ; PRG:$0812 A2 00 + txa ; PRG:$0814 8A +Label_C815: + sta $00,x ; PRG:$0815 95 00 + sta $0300,x ; PRG:$0817 9D 00 03 + sta $0400,x ; PRG:$081A 9D 00 04 + sta $0500,x ; PRG:$081D 9D 00 05 + sta $0600,x ; PRG:$0820 9D 00 06 + sta $0700,x ; PRG:$0823 9D 00 07 + inx ; PRG:$0826 E8 + bne Label_C815 ; PRG:$0827 D0 EC + lda #$00 ; PRG:$0829 A9 00 + sta $D7 ; PRG:$082B 85 D7 + lda #$C8 ; PRG:$082D A9 C8 + sta $D8 ; PRG:$082F 85 D8 + inc $D5 ; PRG:$0831 E6 D5 + inc $D6 ; PRG:$0833 E6 D6 +Label_C835: + lda #$C8 ; PRG:$0835 A9 C8 + sta $0403 ; PRG:$0837 8D 03 04 + lda #$00 ; PRG:$083A A9 00 + sta $00 ; PRG:$083C 85 00 + lda #$98 ; PRG:$083E A9 98 + sta PPUCTRL ; PRG:$0840 8D 00 20 + sta $01 ; PRG:$0843 85 01 + lda #$1A ; PRG:$0845 A9 1A + sta PPUMASK ; PRG:$0847 8D 01 20 + sta $07 ; PRG:$084A 85 07 + lda #$33 ; PRG:$084C A9 33 + ldx #$D8 ; PRG:$084E A2 D8 + jsr $C006 ; PRG:$0850 20 06 C0 + jsr $C018 ; PRG:$0853 20 18 C0 + lda #$04 ; PRG:$0856 A9 04 + sta $00 ; PRG:$0858 85 00 + lda #$70 ; PRG:$085A A9 70 + ldx #$DD ; PRG:$085C A2 DD + jsr $C000 ; PRG:$085E 20 00 C0 + lda #$D3 ; PRG:$0861 A9 D3 + ldx #$D8 ; PRG:$0863 A2 D8 + jsr $C003 ; PRG:$0865 20 03 C0 + lda #$00 ; PRG:$0868 A9 00 + sta $00 ; PRG:$086A 85 00 + lda #$3E ; PRG:$086C A9 3E + ldx #$DD ; PRG:$086E A2 DD + jsr $C000 ; PRG:$0870 20 00 C0 + lda #$D3 ; PRG:$0873 A9 D3 + ldx #$D8 ; PRG:$0875 A2 D8 + jsr $C003 ; PRG:$0877 20 03 C0 + lda #$C0 ; PRG:$087A A9 C0 + sta $08 ; PRG:$087C 85 08 + lda #$98 ; PRG:$087E A9 98 + sta PPUCTRL ; PRG:$0880 8D 00 20 + sta $01 ; PRG:$0883 85 01 + lda #$03 ; PRG:$0885 A9 03 + ldx #$D8 ; PRG:$0887 A2 D8 + jsr $C006 ; PRG:$0889 20 06 C0 + lda #$03 ; PRG:$088C A9 03 + ldx #$D8 ; PRG:$088E A2 D8 + jsr $C009 ; PRG:$0890 20 09 C0 + ldx #$00 ; PRG:$0893 A2 00 + ldy #$00 ; PRG:$0895 A0 00 +Label_C897: + lda #$01 ; PRG:$0897 A9 01 + jsr $C01B ; PRG:$0899 20 1B C0 + cpx #$00 ; PRG:$089C E0 00 + beq Label_C8B8 ; PRG:$089E F0 18 + stx $45 ; PRG:$08A0 86 45 + ldx #$00 ; PRG:$08A2 A2 00 +Label_C8A4: + dec $0203,x ; PRG:$08A4 DE 03 02 + dec $0203,x ; PRG:$08A7 DE 03 02 + dec $0203,x ; PRG:$08AA DE 03 02 + dec $0203,x ; PRG:$08AD DE 03 02 + inx ; PRG:$08B0 E8 + inx ; PRG:$08B1 E8 + inx ; PRG:$08B2 E8 + inx ; PRG:$08B3 E8 + cpx $45 ; PRG:$08B4 E4 45 + bcc Label_C8A4 ; PRG:$08B6 90 EC +Label_C8B8: + dec $08 ; PRG:$08B8 C6 08 + dec $08 ; PRG:$08BA C6 08 + dec $08 ; PRG:$08BC C6 08 + dec $08 ; PRG:$08BE C6 08 + beq Label_C8F2 ; PRG:$08C0 F0 30 + lda $08 ; PRG:$08C2 A5 08 + and #$07 ; PRG:$08C4 29 07 + bne Label_C897 ; PRG:$08C6 D0 CF + cpy #$1C ; PRG:$08C8 C0 1C + bcs Label_C897 ; PRG:$08CA B0 CB + lda #$02 ; PRG:$08CC A9 02 + sta $45 ; PRG:$08CE 85 45 +Label_C8D0: + lda $C98B,y ; PRG:$08D0 B9 8B C9 + sta $0200,x ; PRG:$08D3 9D 00 02 + inx ; PRG:$08D6 E8 + lda $C96F,y ; PRG:$08D7 B9 6F C9 + sta $0200,x ; PRG:$08DA 9D 00 02 + inx ; PRG:$08DD E8 + lda #$01 ; PRG:$08DE A9 01 + sta $0200,x ; PRG:$08E0 9D 00 02 + inx ; PRG:$08E3 E8 + lda #$00 ; PRG:$08E4 A9 00 + sta $0200,x ; PRG:$08E6 9D 00 02 + inx ; PRG:$08E9 E8 + iny ; PRG:$08EA C8 + dec $45 ; PRG:$08EB C6 45 + bne Label_C8D0 ; PRG:$08ED D0 E1 + jmp $C897 ; PRG:$08EF 4C 97 C8 +Label_C8F2: + lda #$0E ; PRG:$08F2 A9 0E + sta $07 ; PRG:$08F4 85 07 + lda #$13 ; PRG:$08F6 A9 13 + ldx #$D8 ; PRG:$08F8 A2 D8 + jsr $C006 ; PRG:$08FA 20 06 C0 + lda #$3F ; PRG:$08FD A9 3F + sta $0700 ; PRG:$08FF 8D 00 07 + lda #$01 ; PRG:$0902 A9 01 + sta $0701 ; PRG:$0904 8D 01 07 + ldy #$00 ; PRG:$0907 A0 00 + sty $0A ; PRG:$0909 84 0A + sty $0B ; PRG:$090B 84 0B +Label_C90D: + lda $C95A,y ; PRG:$090D B9 5A C9 + ldx #$02 ; PRG:$0910 A2 02 + sta $0700,x ; PRG:$0912 9D 00 07 + inx ; PRG:$0915 E8 + clc ; PRG:$0916 18 + adc #$10 ; PRG:$0917 69 10 + sta $0700,x ; PRG:$0919 9D 00 07 + inx ; PRG:$091C E8 + jsr $C00C ; PRG:$091D 20 0C C0 + lda #$0A ; PRG:$0920 A9 0A + jsr $C01B ; PRG:$0922 20 1B C0 + lda $0B ; PRG:$0925 A5 0B + bne Label_C932 ; PRG:$0927 D0 09 + iny ; PRG:$0929 C8 + cpy #$0D ; PRG:$092A C0 0D + bcc Label_C90D ; PRG:$092C 90 DF + ldy #$00 ; PRG:$092E A0 00 + beq Label_C90D ; PRG:$0930 F0 DB +Label_C932: + ldy #$00 ; PRG:$0932 A0 00 +Label_C934: + ldx #$02 ; PRG:$0934 A2 02 + lda $C967,y ; PRG:$0936 B9 67 C9 + sta $0700,x ; PRG:$0939 9D 00 07 + inx ; PRG:$093C E8 + iny ; PRG:$093D C8 + lda $C967,y ; PRG:$093E B9 67 C9 + sta $0700,x ; PRG:$0941 9D 00 07 + inx ; PRG:$0944 E8 + jsr $C00C ; PRG:$0945 20 0C C0 + lda #$0A ; PRG:$0948 A9 0A + jsr $C01B ; PRG:$094A 20 1B C0 + iny ; PRG:$094D C8 + cpy #$08 ; PRG:$094E C0 08 + bcc Label_C934 ; PRG:$0950 90 E2 + lda #$3C ; PRG:$0952 A9 3C + jsr $C01B ; PRG:$0954 20 1B C0 + jmp $C9A7 ; PRG:$0957 4C A7 C9 +; ---- data $C95A-$C9A6 (77 bytes) ---- +Label_C95A: + .byte $1C,$1D,$11,$12,$13,$14,$15,$16 ; PRG:$095A + .byte $17,$18,$19,$1A,$1B,$1C,$2C,$0C ; PRG:$0962 + .byte $1C,$01,$02,$1F,$1F,$56,$58,$57 ; PRG:$096A + .byte $59,$5A,$5C,$5B,$5D,$5E,$60,$5F ; PRG:$0972 + .byte $61,$62,$64,$63,$65,$66,$68,$67 ; PRG:$097A + .byte $69,$6A,$6C,$6B,$6D,$6E,$70,$6F ; PRG:$0982 + .byte $71,$6F,$77,$6F,$77,$6F,$77,$6F ; PRG:$098A + .byte $77,$6F,$77,$6F,$77,$6F,$77,$6F ; PRG:$0992 + .byte $77,$6F,$77,$6F,$77,$6F,$77,$6F ; PRG:$099A + .byte $77,$67,$6F,$67,$6F ; PRG:$09A2 +Label_C9A7: + nop ; PRG:$09A7 EA + lda #$00 ; PRG:$09A8 A9 00 + sta $0403 ; PRG:$09AA 8D 03 04 + sta $0404 ; PRG:$09AD 8D 04 04 + lda #$70 ; PRG:$09B0 A9 70 + ldx #$DD ; PRG:$09B2 A2 DD + jsr $C000 ; PRG:$09B4 20 00 C0 + lda #$00 ; PRG:$09B7 A9 00 + sta $0503 ; PRG:$09B9 8D 03 05 + sta $0504 ; PRG:$09BC 8D 04 05 + sta $0505 ; PRG:$09BF 8D 05 05 + sta $0435 ; PRG:$09C2 8D 35 04 + sta $00 ; PRG:$09C5 85 00 + lda #$05 ; PRG:$09C7 A9 05 + sta $0434 ; PRG:$09C9 8D 34 04 + lda #$98 ; PRG:$09CC A9 98 + sta PPUCTRL ; PRG:$09CE 8D 00 20 + sta $01 ; PRG:$09D1 85 01 + lda #$1E ; PRG:$09D3 A9 1E + sta PPUMASK ; PRG:$09D5 8D 01 20 + sta $07 ; PRG:$09D8 85 07 + lda #$33 ; PRG:$09DA A9 33 + ldx #$D8 ; PRG:$09DC A2 D8 + jsr $C006 ; PRG:$09DE 20 06 C0 + jsr $C018 ; PRG:$09E1 20 18 C0 + lda #$53 ; PRG:$09E4 A9 53 + ldx #$D9 ; PRG:$09E6 A2 D9 + jsr $C000 ; PRG:$09E8 20 00 C0 + lda #$93 ; PRG:$09EB A9 93 + ldx #$D8 ; PRG:$09ED A2 D8 + jsr $C003 ; PRG:$09EF 20 03 C0 + lda #$23 ; PRG:$09F2 A9 23 + sta $02 ; PRG:$09F4 85 02 + lda #$D8 ; PRG:$09F6 A9 D8 + sta $03 ; PRG:$09F8 85 03 + lda #$00 ; PRG:$09FA A9 00 + jsr $C04E ; PRG:$09FC 20 4E C0 + lda #$98 ; PRG:$09FF A9 98 + sta PPUCTRL ; PRG:$0A01 8D 00 20 + sta $01 ; PRG:$0A04 85 01 + lda #$1E ; PRG:$0A06 A9 1E + sta PPUMASK ; PRG:$0A08 8D 01 20 + sta $07 ; PRG:$0A0B 85 07 + lda #$00 ; PRG:$0A0D A9 00 + sta $04F6 ; PRG:$0A0F 8D F6 04 + sta $0403 ; PRG:$0A12 8D 03 04 + sta $0404 ; PRG:$0A15 8D 04 04 + lda #$02 ; PRG:$0A18 A9 02 + jsr $DECB ; PRG:$0A1A 20 CB DE +Label_CA1D: + lda $33 ; PRG:$0A1D A5 33 + beq Label_CA61 ; PRG:$0A1F F0 40 + lda $0300 ; PRG:$0A21 AD 00 03 + bne Label_CA32 ; PRG:$0A24 D0 0C + lda $0301 ; PRG:$0A26 AD 01 03 + bne Label_CA68 ; PRG:$0A29 D0 3D + lda $0303 ; PRG:$0A2B AD 03 03 + bne Label_CA97 ; PRG:$0A2E D0 67 + beq Label_CA1D ; PRG:$0A30 F0 EB +Label_CA32: + inc $04F6 ; PRG:$0A32 EE F6 04 + lda $04F6 ; PRG:$0A35 AD F6 04 + cmp #$0A ; PRG:$0A38 C9 0A + bcc Label_CA41 ; PRG:$0A3A 90 05 + lda #$00 ; PRG:$0A3C A9 00 + sta $04F6 ; PRG:$0A3E 8D F6 04 +Label_CA41: + lda #$13 ; PRG:$0A41 A9 13 + sta $05 ; PRG:$0A43 85 05 + lda #$16 ; PRG:$0A45 A9 16 + sta $06 ; PRG:$0A47 85 06 + jsr $C015 ; PRG:$0A49 20 15 C0 + lda $04F6 ; PRG:$0A4C AD F6 04 + ora #$30 ; PRG:$0A4F 09 30 + sta $0702 ; PRG:$0A51 8D 02 07 + ldx #$03 ; PRG:$0A54 A2 03 + jsr $C00C ; PRG:$0A56 20 0C C0 + lda #$0A ; PRG:$0A59 A9 0A + jsr $C01B ; PRG:$0A5B 20 1B C0 + jmp $CA1D ; PRG:$0A5E 4C 1D CA +Label_CA61: + lda #$01 ; PRG:$0A61 A9 01 + sta $0503 ; PRG:$0A63 8D 03 05 + bne Label_CA97 ; PRG:$0A66 D0 2F +Label_CA68: + lda $0506 ; PRG:$0A68 AD 06 05 + eor #$01 ; PRG:$0A6B 49 01 + sta $0506 ; PRG:$0A6D 8D 06 05 + asl a ; PRG:$0A70 0A + asl a ; PRG:$0A71 0A + tay ; PRG:$0A72 A8 + lda #$13 ; PRG:$0A73 A9 13 + sta $05 ; PRG:$0A75 85 05 + lda #$17 ; PRG:$0A77 A9 17 + sta $06 ; PRG:$0A79 85 06 + jsr $C015 ; PRG:$0A7B 20 15 C0 + ldx #$02 ; PRG:$0A7E A2 02 +Label_CA80: + lda $CAAA,y ; PRG:$0A80 B9 AA CA + sta $0700,x ; PRG:$0A83 9D 00 07 + iny ; PRG:$0A86 C8 + inx ; PRG:$0A87 E8 + cpx #$05 ; PRG:$0A88 E0 05 + bcc Label_CA80 ; PRG:$0A8A 90 F4 + jsr $C00C ; PRG:$0A8C 20 0C C0 + lda #$0A ; PRG:$0A8F A9 0A + jsr $C01B ; PRG:$0A91 20 1B C0 + jmp $CA1D ; PRG:$0A94 4C 1D CA +Label_CA97: + lda #$23 ; PRG:$0A97 A9 23 + sta $02 ; PRG:$0A99 85 02 + lda #$D8 ; PRG:$0A9B A9 D8 + sta $03 ; PRG:$0A9D 85 03 + lda #$00 ; PRG:$0A9F A9 00 + jsr $C051 ; PRG:$0AA1 20 51 C0 + jsr $DF0E ; PRG:$0AA4 20 0E DF + jmp $CAF3 ; PRG:$0AA7 4C F3 CA +; ---- data $CAAA-$CAF2 (73 bytes) ---- +Label_CAAA: + .byte $0F,$0E,$00,$00,$0F,$06,$06,$00 ; PRG:$0AAA + .byte $14,$00,$04,$08,$00,$00,$10,$14 ; PRG:$0AB2 + .byte $14,$10,$04,$10,$00,$14,$00,$04 ; PRG:$0ABA + .byte $08,$00,$B1,$C2,$B0,$E1,$A1,$E2 ; PRG:$0AC2 + .byte $B0,$C1,$A1,$C3,$B1,$E3,$B1,$E4 ; PRG:$0ACA + .byte $21,$B1,$C4,$01,$B1,$E2,$02,$B1 ; PRG:$0AD2 + .byte $C2,$B1,$E3,$01,$E2,$B1,$02,$C1 ; PRG:$0ADA + .byte $B1,$21,$E5,$B1,$C3,$02,$B1,$E3 ; PRG:$0AE2 + .byte $B1,$C4,$01,$B1,$E1,$02,$B1,$FF ; PRG:$0AEA + .byte $FF ; PRG:$0AF2 +Label_CAF3: + lda #$00 ; PRG:$0AF3 A9 00 + sta $00 ; PRG:$0AF5 85 00 + lda #$A8 ; PRG:$0AF7 A9 A8 + sta PPUCTRL ; PRG:$0AF9 8D 00 20 + sta $01 ; PRG:$0AFC 85 01 + lda #$1E ; PRG:$0AFE A9 1E + sta PPUMASK ; PRG:$0B00 8D 01 20 + sta $07 ; PRG:$0B03 85 07 + lda #$A2 ; PRG:$0B05 A9 A2 + ldx #$DA ; PRG:$0B07 A2 DA + jsr $C000 ; PRG:$0B09 20 00 C0 + jsr $C018 ; PRG:$0B0C 20 18 C0 + lda #$53 ; PRG:$0B0F A9 53 + ldx #$D8 ; PRG:$0B11 A2 D8 + jsr $C003 ; PRG:$0B13 20 03 C0 + lda #$F3 ; PRG:$0B16 A9 F3 + sta $02 ; PRG:$0B18 85 02 + lda #$D7 ; PRG:$0B1A A9 D7 + sta $03 ; PRG:$0B1C 85 03 + lda #$00 ; PRG:$0B1E A9 00 + jsr $C04E ; PRG:$0B20 20 4E C0 + lda #$43 ; PRG:$0B23 A9 43 + ldx #$D8 ; PRG:$0B25 A2 D8 + jsr $C009 ; PRG:$0B27 20 09 C0 + lda #$A8 ; PRG:$0B2A A9 A8 + sta PPUCTRL ; PRG:$0B2C 8D 00 20 + sta $01 ; PRG:$0B2F 85 01 + lda #$1E ; PRG:$0B31 A9 1E + sta PPUMASK ; PRG:$0B33 8D 01 20 + sta $07 ; PRG:$0B36 85 07 + lda #$00 ; PRG:$0B38 A9 00 + sta $0403 ; PRG:$0B3A 8D 03 04 + sta $0404 ; PRG:$0B3D 8D 04 04 + jsr $D4B7 ; PRG:$0B40 20 B7 D4 + lda #$1E ; PRG:$0B43 A9 1E + jsr $C01B ; PRG:$0B45 20 1B C0 + lda #$00 ; PRG:$0B48 A9 00 + jsr $ED6E ; PRG:$0B4A 20 6E ED + lda #$1E ; PRG:$0B4D A9 1E + jsr $C01B ; PRG:$0B4F 20 1B C0 + lda $0503 ; PRG:$0B52 AD 03 05 + bne Label_CB68 ; PRG:$0B55 D0 11 + lda $0506 ; PRG:$0B57 AD 06 05 + bne Label_CB68 ; PRG:$0B5A D0 0C + lda $04F6 ; PRG:$0B5C AD F6 04 + and #$01 ; PRG:$0B5F 29 01 + tax ; PRG:$0B61 AA + lda $D028,x ; PRG:$0B62 BD 28 D0 + jsr $DECB ; PRG:$0B65 20 CB DE +Label_CB68: + lda #$00 ; PRG:$0B68 A9 00 + ldx #$00 ; PRG:$0B6A A2 00 +Label_CB6C: + sta $0436,x ; PRG:$0B6C 9D 36 04 + inx ; PRG:$0B6F E8 + cpx #$B4 ; PRG:$0B70 E0 B4 + bcc Label_CB6C ; PRG:$0B72 90 F8 + jsr $C03C ; PRG:$0B74 20 3C C0 + and #$0F ; PRG:$0B77 29 0F + tax ; PRG:$0B79 AA + lda $CBC1,x ; PRG:$0B7A BD C1 CB + asl a ; PRG:$0B7D 0A + asl a ; PRG:$0B7E 0A + sta $042F ; PRG:$0B7F 8D 2F 04 +Label_CB82: + ldx $0503 ; PRG:$0B82 AE 03 05 + beq Label_CB99 ; PRG:$0B85 F0 12 + dex ; PRG:$0B87 CA + lda $CAB2,x ; PRG:$0B88 BD B2 CA + sta $042E ; PRG:$0B8B 8D 2E 04 + lda $CAB3,x ; PRG:$0B8E BD B3 CA + sta $042F ; PRG:$0B91 8D 2F 04 + inc $0503 ; PRG:$0B94 EE 03 05 + bne Label_CBAD ; PRG:$0B97 D0 14 +Label_CB99: + lda $042F ; PRG:$0B99 AD 2F 04 + sta $042E ; PRG:$0B9C 8D 2E 04 + jsr $C03C ; PRG:$0B9F 20 3C C0 + and #$0F ; PRG:$0BA2 29 0F + tax ; PRG:$0BA4 AA + lda $CBC1,x ; PRG:$0BA5 BD C1 CB + asl a ; PRG:$0BA8 0A + asl a ; PRG:$0BA9 0A + sta $042F ; PRG:$0BAA 8D 2F 04 +Label_CBAD: + ldx #$04 ; PRG:$0BAD A2 04 + stx $0430 ; PRG:$0BAF 8E 30 04 + ldy #$00 ; PRG:$0BB2 A0 00 + sty $0431 ; PRG:$0BB4 8C 31 04 + jsr $D0D3 ; PRG:$0BB7 20 D3 D0 + cmp #$01 ; PRG:$0BBA C9 01 + beq Label_CBDC ; PRG:$0BBC F0 1E + jmp $D632 ; PRG:$0BBE 4C 32 D6 +; ---- data $CBC1-$CBDB (27 bytes) ---- +Label_CBC1: + .byte $00,$00,$01,$01,$02,$02,$04,$04 ; PRG:$0BC1 + .byte $05,$05,$00,$01,$02,$04,$05,$00 ; PRG:$0BC9 + .byte $14,$0F,$0A,$06,$05,$04,$03,$02 ; PRG:$0BD1 + .byte $02,$02,$02 ; PRG:$0BD9 +Label_CBDC: + ldx $04F6 ; PRG:$0BDC AE F6 04 + cpx #$0A ; PRG:$0BDF E0 0A + bcc Label_CBE5 ; PRG:$0BE1 90 02 + ldx #$0A ; PRG:$0BE3 A2 0A +Label_CBE5: + lda $CBD1,x ; PRG:$0BE5 BD D1 CB + sta $0432 ; PRG:$0BE8 8D 32 04 + lda #$00 ; PRG:$0BEB A9 00 + sta $0A ; PRG:$0BED 85 0A + sta $0B ; PRG:$0BEF 85 0B + sta $0400 ; PRG:$0BF1 8D 00 04 + sta $0401 ; PRG:$0BF4 8D 01 04 + ldx #$07 ; PRG:$0BF7 A2 07 +Label_CBF9: + sta $04EA,x ; PRG:$0BF9 9D EA 04 + dex ; PRG:$0BFC CA + bpl Label_CBF9 ; PRG:$0BFD 10 FA + jsr $D2BF ; PRG:$0BFF 20 BF D2 + jsr $D476 ; PRG:$0C02 20 76 D4 + jsr $D265 ; PRG:$0C05 20 65 D2 + jsr $D1FD ; PRG:$0C08 20 FD D1 + jsr $D1EC ; PRG:$0C0B 20 EC D1 + jsr $D20E ; PRG:$0C0E 20 0E D2 +Label_CC11: + lda $0503 ; PRG:$0C11 AD 03 05 + bne Label_CC3D ; PRG:$0C14 D0 27 + lda $0A ; PRG:$0C16 A5 0A + and #$FC ; PRG:$0C18 29 FC + cmp $0400 ; PRG:$0C1A CD 00 04 + beq Label_CC3D ; PRG:$0C1D F0 1E + pha ; PRG:$0C1F 48 + inc $04F4 ; PRG:$0C20 EE F4 04 + jsr $D476 ; PRG:$0C23 20 76 D4 + pla ; PRG:$0C26 68 + sta $0400 ; PRG:$0C27 8D 00 04 + lsr a ; PRG:$0C2A 4A + lsr a ; PRG:$0C2B 4A + cmp $0432 ; PRG:$0C2C CD 32 04 + bcc Label_CC3D ; PRG:$0C2F 90 0C + lda #$00 ; PRG:$0C31 A9 00 + sta $0400 ; PRG:$0C33 8D 00 04 + sta $0A ; PRG:$0C36 85 0A + ldx #$05 ; PRG:$0C38 A2 05 + jmp $CCB1 ; PRG:$0C3A 4C B1 CC +Label_CC3D: + lda $0503 ; PRG:$0C3D AD 03 05 + beq Label_CC71 ; PRG:$0C40 F0 2F + lda $0505 ; PRG:$0C42 AD 05 05 + and #$1F ; PRG:$0C45 29 1F + bne Label_CC5C ; PRG:$0C47 D0 13 + ldx $0504 ; PRG:$0C49 AE 04 05 + lda $CAC4,x ; PRG:$0C4C BD C4 CA + cmp #$FF ; PRG:$0C4F C9 FF + bne Label_CC56 ; PRG:$0C51 D0 03 + jmp $D655 ; PRG:$0C53 4C 55 D6 +Label_CC56: + sta $0505 ; PRG:$0C56 8D 05 05 + inc $0504 ; PRG:$0C59 EE 04 05 +Label_CC5C: + lda #$14 ; PRG:$0C5C A9 14 + jsr $C01B ; PRG:$0C5E 20 1B C0 + lda $0505 ; PRG:$0C61 AD 05 05 + dec $0505 ; PRG:$0C64 CE 05 05 + and #$E0 ; PRG:$0C67 29 E0 + lsr a ; PRG:$0C69 4A + lsr a ; PRG:$0C6A 4A + lsr a ; PRG:$0C6B 4A + lsr a ; PRG:$0C6C 4A + lsr a ; PRG:$0C6D 4A + jmp $CCB8 ; PRG:$0C6E 4C B8 CC +Label_CC71: + ldx #$00 ; PRG:$0C71 A2 00 +Label_CC73: + stx $0402 ; PRG:$0C73 8E 02 04 + lda $04EA,x ; PRG:$0C76 BD EA 04 + beq Label_CC8B ; PRG:$0C79 F0 10 + lda $0A ; PRG:$0C7B A5 0A + cmp $0401 ; PRG:$0C7D CD 01 04 + beq Label_CC90 ; PRG:$0C80 F0 0E + sta $0401 ; PRG:$0C82 8D 01 04 + dec $04EA,x ; PRG:$0C85 DE EA 04 + jmp $CC90 ; PRG:$0C88 4C 90 CC +Label_CC8B: + lda $0300,x ; PRG:$0C8B BD 00 03 + bne Label_CCA8 ; PRG:$0C8E D0 18 +Label_CC90: + lda $0503 ; PRG:$0C90 AD 03 05 + bne Label_CCA5 ; PRG:$0C93 D0 10 + ldx $0402 ; PRG:$0C95 AE 02 04 + inx ; PRG:$0C98 E8 + cpx #$08 ; PRG:$0C99 E0 08 + bcc Label_CC73 ; PRG:$0C9B 90 D6 + lda $0305 ; PRG:$0C9D AD 05 03 + bne Label_CCA5 ; PRG:$0CA0 D0 03 + sta $04F9 ; PRG:$0CA2 8D F9 04 +Label_CCA5: + jmp $CC11 ; PRG:$0CA5 4C 11 CC +Label_CCA8: + cpx #$05 ; PRG:$0CA8 E0 05 + bne Label_CCB1 ; PRG:$0CAA D0 05 + lda $04F9 ; PRG:$0CAC AD F9 04 + bne Label_CC90 ; PRG:$0CAF D0 DF +Label_CCB1: + lda $CCCD,x ; PRG:$0CB1 BD CD CC + sta $04EA,x ; PRG:$0CB4 9D EA 04 + txa ; PRG:$0CB7 8A +Label_CCB8: + asl a ; PRG:$0CB8 0A + tax ; PRG:$0CB9 AA + lda $CCD5,x ; PRG:$0CBA BD D5 CC + sta $02 ; PRG:$0CBD 85 02 + lda $CCD6,x ; PRG:$0CBF BD D6 CC + sta $03 ; PRG:$0CC2 85 03 + ldx $0430 ; PRG:$0CC4 AE 30 04 + ldy $0431 ; PRG:$0CC7 AC 31 04 + jmp ($0002) ; PRG:$0CCA 6C 02 00 +; ---- data $CCCD-$CCE4 (24 bytes) ---- +Label_CCCD: + .byte $0A,$0A,$00,$00,$01,$03,$06,$06 ; PRG:$0CCD + .byte $EE,$CC,$27,$CD,$90,$CC,$75,$CD ; PRG:$0CD5 + .byte $43,$CD,$A4,$CD,$1A,$CE,$5E,$CE ; PRG:$0CDD +Label_CCE5: + jsr $D2BF ; PRG:$0CE5 20 BF D2 + jsr $D476 ; PRG:$0CE8 20 76 D4 + jmp $CC90 ; PRG:$0CEB 4C 90 CC +Label_CCEE: + lda $04F5 ; PRG:$0CEE AD F5 04 + bne Label_CCE5 ; PRG:$0CF1 D0 F2 + lda $042E ; PRG:$0CF3 AD 2E 04 + pha ; PRG:$0CF6 48 + tax ; PRG:$0CF7 AA + and #$FC ; PRG:$0CF8 29 FC + sta $042E ; PRG:$0CFA 8D 2E 04 + inx ; PRG:$0CFD E8 + txa ; PRG:$0CFE 8A + and #$03 ; PRG:$0CFF 29 03 + ora $042E ; PRG:$0D01 0D 2E 04 + sta $042E ; PRG:$0D04 8D 2E 04 +Label_CD07: + ldx $0430 ; PRG:$0D07 AE 30 04 + ldy $0431 ; PRG:$0D0A AC 31 04 + jsr $D0D3 ; PRG:$0D0D 20 D3 D0 + cmp #$02 ; PRG:$0D10 C9 02 + bne Label_CD18 ; PRG:$0D12 D0 04 + pla ; PRG:$0D14 68 + jmp $CED3 ; PRG:$0D15 4C D3 CE +Label_CD18: + cmp #$01 ; PRG:$0D18 C9 01 + beq Label_CD23 ; PRG:$0D1A F0 07 + pla ; PRG:$0D1C 68 + sta $042E ; PRG:$0D1D 8D 2E 04 + jmp $CCE5 ; PRG:$0D20 4C E5 CC +Label_CD23: + pla ; PRG:$0D23 68 +Label_CD24: + jmp $CCE5 ; PRG:$0D24 4C E5 CC +Label_CD27: + lda $04F5 ; PRG:$0D27 AD F5 04 + bne Label_CD24 ; PRG:$0D2A D0 F8 + lda $042E ; PRG:$0D2C AD 2E 04 + pha ; PRG:$0D2F 48 + tax ; PRG:$0D30 AA + and #$FC ; PRG:$0D31 29 FC + sta $042E ; PRG:$0D33 8D 2E 04 + dex ; PRG:$0D36 CA + txa ; PRG:$0D37 8A + and #$03 ; PRG:$0D38 29 03 + ora $042E ; PRG:$0D3A 0D 2E 04 + sta $042E ; PRG:$0D3D 8D 2E 04 + jmp $CD07 ; PRG:$0D40 4C 07 CD +Label_CD43: + lda $0301 ; PRG:$0D43 AD 01 03 + beq Label_CD72 ; PRG:$0D46 F0 2A + lda $04F5 ; PRG:$0D48 AD F5 04 + bne Label_CD72 ; PRG:$0D4B D0 25 + lda $0434 ; PRG:$0D4D AD 34 04 + beq Label_CD72 ; PRG:$0D50 F0 20 + dec $0434 ; PRG:$0D52 CE 34 04 + jsr $D1FD ; PRG:$0D55 20 FD D1 + lda #$04 ; PRG:$0D58 A9 04 + sta $04F2 ; PRG:$0D5A 8D F2 04 + lda #$00 ; PRG:$0D5D A9 00 + sta $04F3 ; PRG:$0D5F 8D F3 04 + sta $04F4 ; PRG:$0D62 8D F4 04 + lda #$01 ; PRG:$0D65 A9 01 + sta $04F5 ; PRG:$0D67 8D F5 04 + jsr $DF0E ; PRG:$0D6A 20 0E DF + lda #$07 ; PRG:$0D6D A9 07 + jsr $DECB ; PRG:$0D6F 20 CB DE +Label_CD72: + jmp $CCE5 ; PRG:$0D72 4C E5 CC +Label_CD75: + lda #$97 ; PRG:$0D75 A9 97 + sta $02 ; PRG:$0D77 85 02 + lda #$CD ; PRG:$0D79 A9 CD + sta $03 ; PRG:$0D7B 85 03 + jsr $C03F ; PRG:$0D7D 20 3F C0 +Label_CD80: + lda $0303 ; PRG:$0D80 AD 03 03 + bne Label_CD80 ; PRG:$0D83 D0 FB +Label_CD85: + lda $0303 ; PRG:$0D85 AD 03 03 + beq Label_CD85 ; PRG:$0D88 F0 FB +Label_CD8A: + lda $0303 ; PRG:$0D8A AD 03 03 + bne Label_CD8A ; PRG:$0D8D D0 FB + ldy #$00 ; PRG:$0D8F A0 00 + jsr $D1B2 ; PRG:$0D91 20 B2 D1 + jmp $CC90 ; PRG:$0D94 4C 90 CC +; ---- data $CD97-$CDA3 (13 bytes) ---- +Label_CD97: + .byte $0A,$0A,$01,$01,$01,$76,$5B,$82 ; PRG:$0D97 + .byte $83,$11,$01,$01,$FD ; PRG:$0D9F +Label_CDA4: + lda $04F5 ; PRG:$0DA4 AD F5 04 + bne Label_CDAC ; PRG:$0DA7 D0 03 + jmp $CDC0 ; PRG:$0DA9 4C C0 CD +Label_CDAC: + inc $04F3 ; PRG:$0DAC EE F3 04 + jsr $D3A1 ; PRG:$0DAF 20 A1 D3 + bcc Label_CDBD ; PRG:$0DB2 90 09 + jsr $D3B7 ; PRG:$0DB4 20 B7 D3 + lda $0305 ; PRG:$0DB7 AD 05 03 + sta $04F9 ; PRG:$0DBA 8D F9 04 +Label_CDBD: + jmp $CCE5 ; PRG:$0DBD 4C E5 CC +Label_CDC0: + lda #$00 ; PRG:$0DC0 A9 00 + sta $0433 ; PRG:$0DC2 8D 33 04 + jsr $D02A ; PRG:$0DC5 20 2A D0 + bcs Label_CDDC ; PRG:$0DC8 B0 12 + ldx $0430 ; PRG:$0DCA AE 30 04 + ldy $0431 ; PRG:$0DCD AC 31 04 + iny ; PRG:$0DD0 C8 + jsr $D0D3 ; PRG:$0DD1 20 D3 D0 + cmp #$01 ; PRG:$0DD4 C9 01 + beq Label_CE14 ; PRG:$0DD6 F0 3C + cmp #$FF ; PRG:$0DD8 C9 FF + bne Label_CE17 ; PRG:$0DDA D0 3B +Label_CDDC: + jsr $CEA0 ; PRG:$0DDC 20 A0 CE + ldx #$FF ; PRG:$0DDF A2 FF + ldy $0431 ; PRG:$0DE1 AC 31 04 + jsr $D1BB ; PRG:$0DE4 20 BB D1 + ldy $0431 ; PRG:$0DE7 AC 31 04 + iny ; PRG:$0DEA C8 + jsr $D1BB ; PRG:$0DEB 20 BB D1 + jsr $C00C ; PRG:$0DEE 20 0C C0 + jsr $D2A0 ; PRG:$0DF1 20 A0 D2 + lda $33 ; PRG:$0DF4 A5 33 + pha ; PRG:$0DF6 48 + lda #$00 ; PRG:$0DF7 A9 00 + sta $33 ; PRG:$0DF9 85 33 + lda #$01 ; PRG:$0DFB A9 01 + jsr $D7B6 ; PRG:$0DFD 20 B6 D7 + lda #$02 ; PRG:$0E00 A9 02 + jsr $C01B ; PRG:$0E02 20 1B C0 + pla ; PRG:$0E05 68 + sta $33 ; PRG:$0E06 85 33 + jsr $CED6 ; PRG:$0E08 20 D6 CE + lda $0305 ; PRG:$0E0B AD 05 03 + sta $04F9 ; PRG:$0E0E 8D F9 04 + jmp $CB82 ; PRG:$0E11 4C 82 CB +Label_CE14: + inc $0431 ; PRG:$0E14 EE 31 04 +Label_CE17: + jmp $CCE5 ; PRG:$0E17 4C E5 CC +Label_CE1A: + lda $04F5 ; PRG:$0E1A AD F5 04 + bne Label_CE22 ; PRG:$0E1D D0 03 + jmp $CE35 ; PRG:$0E1F 4C 35 CE +Label_CE22: + lda $04F2 ; PRG:$0E22 AD F2 04 + beq Label_CE32 ; PRG:$0E25 F0 0B + dec $04F2 ; PRG:$0E27 CE F2 04 + jsr $D3A1 ; PRG:$0E2A 20 A1 D3 + bcc Label_CE32 ; PRG:$0E2D 90 03 + jsr $D3B7 ; PRG:$0E2F 20 B7 D3 +Label_CE32: + jmp $CCE5 ; PRG:$0E32 4C E5 CC +Label_CE35: + cpx #$00 ; PRG:$0E35 E0 00 + beq Label_CE5B ; PRG:$0E37 F0 22 + lda #$01 ; PRG:$0E39 A9 01 + sta $0433 ; PRG:$0E3B 8D 33 04 + jsr $D02A ; PRG:$0E3E 20 2A D0 + bcs Label_CE5B ; PRG:$0E41 B0 18 + ldx $0430 ; PRG:$0E43 AE 30 04 + ldy $0431 ; PRG:$0E46 AC 31 04 + dex ; PRG:$0E49 CA + jsr $D0D3 ; PRG:$0E4A 20 D3 D0 + cmp #$02 ; PRG:$0E4D C9 02 + bne Label_CE54 ; PRG:$0E4F D0 03 + jmp $CED3 ; PRG:$0E51 4C D3 CE +Label_CE54: + cmp #$01 ; PRG:$0E54 C9 01 + bne Label_CE5B ; PRG:$0E56 D0 03 + dec $0430 ; PRG:$0E58 CE 30 04 +Label_CE5B: + jmp $CCE5 ; PRG:$0E5B 4C E5 CC +Label_CE5E: + lda $04F5 ; PRG:$0E5E AD F5 04 + bne Label_CE66 ; PRG:$0E61 D0 03 + jmp $CE7B ; PRG:$0E63 4C 7B CE +Label_CE66: + lda $04F2 ; PRG:$0E66 AD F2 04 + cmp #$09 ; PRG:$0E69 C9 09 + bcs Label_CE78 ; PRG:$0E6B B0 0B + inc $04F2 ; PRG:$0E6D EE F2 04 + jsr $D3A1 ; PRG:$0E70 20 A1 D3 + bcc Label_CE78 ; PRG:$0E73 90 03 + jsr $D3B7 ; PRG:$0E75 20 B7 D3 +Label_CE78: + jmp $CCE5 ; PRG:$0E78 4C E5 CC +Label_CE7B: + lda #$02 ; PRG:$0E7B A9 02 + sta $0433 ; PRG:$0E7D 8D 33 04 + jsr $D02A ; PRG:$0E80 20 2A D0 + bcs Label_CE9D ; PRG:$0E83 B0 18 + ldx $0430 ; PRG:$0E85 AE 30 04 + ldy $0431 ; PRG:$0E88 AC 31 04 + inx ; PRG:$0E8B E8 + jsr $D0D3 ; PRG:$0E8C 20 D3 D0 + cmp #$02 ; PRG:$0E8F C9 02 + bne Label_CE96 ; PRG:$0E91 D0 03 + jmp $CED3 ; PRG:$0E93 4C D3 CE +Label_CE96: + cmp #$01 ; PRG:$0E96 C9 01 + bne Label_CE9D ; PRG:$0E98 D0 03 + inc $0430 ; PRG:$0E9A EE 30 04 +Label_CE9D: + jmp $CCE5 ; PRG:$0E9D 4C E5 CC +Label_CEA0: + lda $042E ; PRG:$0EA0 AD 2E 04 + asl a ; PRG:$0EA3 0A + asl a ; PRG:$0EA4 0A + tay ; PRG:$0EA5 A8 + ldx #$00 ; PRG:$0EA6 A2 00 +Label_CEA8: + stx $45 ; PRG:$0EA8 86 45 + sty $46 ; PRG:$0EAA 84 46 + lda $D1AE,x ; PRG:$0EAC BD AE D1 + clc ; PRG:$0EAF 18 + adc $0431 ; PRG:$0EB0 6D 31 04 + tay ; PRG:$0EB3 A8 + lda $D1AA,x ; PRG:$0EB4 BD AA D1 + clc ; PRG:$0EB7 18 + adc $0430 ; PRG:$0EB8 6D 30 04 + tax ; PRG:$0EBB AA + jsr $D193 ; PRG:$0EBC 20 93 D1 + ldy $46 ; PRG:$0EBF A4 46 + lda $D330,y ; PRG:$0EC1 B9 30 D3 + eor $0436,x ; PRG:$0EC4 5D 36 04 + sta $0436,x ; PRG:$0EC7 9D 36 04 + ldx $45 ; PRG:$0ECA A6 45 + iny ; PRG:$0ECC C8 + inx ; PRG:$0ECD E8 + cpx #$04 ; PRG:$0ECE E0 04 + bcc Label_CEA8 ; PRG:$0ED0 90 D6 + rts ; PRG:$0ED2 60 +Label_CED3: + jmp $CC90 ; PRG:$0ED3 4C 90 CC +Label_CED6: + lda #$FF ; PRG:$0ED6 A9 FF + sta $48 ; PRG:$0ED8 85 48 + sta $49 ; PRG:$0EDA 85 49 + ldy #$00 ; PRG:$0EDC A0 00 + sty $45 ; PRG:$0EDE 84 45 +Label_CEE0: + sty $46 ; PRG:$0EE0 84 46 + ldx #$00 ; PRG:$0EE2 A2 00 + jsr $D193 ; PRG:$0EE4 20 93 D1 + lda #$0A ; PRG:$0EE7 A9 0A + sta $47 ; PRG:$0EE9 85 47 +Label_CEEB: + lda $0436,x ; PRG:$0EEB BD 36 04 + cmp #$03 ; PRG:$0EEE C9 03 + beq Label_CEF6 ; PRG:$0EF0 F0 04 + cmp #$0C ; PRG:$0EF2 C9 0C + bne Label_CF02 ; PRG:$0EF4 D0 0C +Label_CEF6: + inx ; PRG:$0EF6 E8 + dec $47 ; PRG:$0EF7 C6 47 + bne Label_CEEB ; PRG:$0EF9 D0 F0 + tya ; PRG:$0EFB 98 + ldx $45 ; PRG:$0EFC A6 45 + sta $48,x ; PRG:$0EFE 95 48 + inc $45 ; PRG:$0F00 E6 45 +Label_CF02: + ldy $46 ; PRG:$0F02 A4 46 + iny ; PRG:$0F04 C8 + cpy #$12 ; PRG:$0F05 C0 12 + bcc Label_CEE0 ; PRG:$0F07 90 D7 + lda $45 ; PRG:$0F09 A5 45 + bne Label_CF0E ; PRG:$0F0B D0 01 + rts ; PRG:$0F0D 60 +Label_CF0E: + ldx #$00 ; PRG:$0F0E A2 00 +Label_CF10: + stx $46 ; PRG:$0F10 86 46 + ldy #$00 ; PRG:$0F12 A0 00 +Label_CF14: + sty $47 ; PRG:$0F14 84 47 + lda $0048,y ; PRG:$0F16 B9 48 00 + bmi Label_CF35 ; PRG:$0F19 30 1A + pha ; PRG:$0F1B 48 + tay ; PRG:$0F1C A8 + ldx #$00 ; PRG:$0F1D A2 00 + jsr $D193 ; PRG:$0F1F 20 93 D1 + ldy $46 ; PRG:$0F22 A4 46 + lda $D021,y ; PRG:$0F24 B9 21 D0 + ldy #$0A ; PRG:$0F27 A0 0A +Label_CF29: + sta $0436,x ; PRG:$0F29 9D 36 04 + inx ; PRG:$0F2C E8 + dey ; PRG:$0F2D 88 + bne Label_CF29 ; PRG:$0F2E D0 F9 + pla ; PRG:$0F30 68 + tay ; PRG:$0F31 A8 + jsr $D1B2 ; PRG:$0F32 20 B2 D1 +Label_CF35: + ldy $47 ; PRG:$0F35 A4 47 + iny ; PRG:$0F37 C8 + cpy #$02 ; PRG:$0F38 C0 02 + bcc Label_CF14 ; PRG:$0F3A 90 D8 + lda #$0A ; PRG:$0F3C A9 0A + jsr $C01B ; PRG:$0F3E 20 1B C0 + ldx $46 ; PRG:$0F41 A6 46 + inx ; PRG:$0F43 E8 + cpx #$02 ; PRG:$0F44 E0 02 + bcc Label_CF10 ; PRG:$0F46 90 C8 + lda $33 ; PRG:$0F48 A5 33 + pha ; PRG:$0F4A 48 + lda #$00 ; PRG:$0F4B A9 00 + sta $33 ; PRG:$0F4D 85 33 + lda #$FF ; PRG:$0F4F A9 FF + sta $D0 ; PRG:$0F51 85 D0 + ldy #$00 ; PRG:$0F53 A0 00 +Label_CF55: + sty $46 ; PRG:$0F55 84 46 + lda $0048,y ; PRG:$0F57 B9 48 00 + bmi Label_CF98 ; PRG:$0F5A 30 3C + sta $47 ; PRG:$0F5C 85 47 + lda #$00 ; PRG:$0F5E A9 00 + sta $D4 ; PRG:$0F60 85 D4 + lda #$02 ; PRG:$0F62 A9 02 + jsr $D7B6 ; PRG:$0F64 20 B6 D7 +Label_CF67: + ldy $47 ; PRG:$0F67 A4 47 + cpy $D4 ; PRG:$0F69 C4 D4 + beq Label_CF98 ; PRG:$0F6B F0 2B + ldx #$00 ; PRG:$0F6D A2 00 + jsr $D193 ; PRG:$0F6F 20 93 D1 + ldy #$0A ; PRG:$0F72 A0 0A +Label_CF74: + lda $042C,x ; PRG:$0F74 BD 2C 04 + sta $0436,x ; PRG:$0F77 9D 36 04 + inx ; PRG:$0F7A E8 + dey ; PRG:$0F7B 88 + bne Label_CF74 ; PRG:$0F7C D0 F6 + ldy $47 ; PRG:$0F7E A4 47 + stx $D1 ; PRG:$0F80 86 D1 + ldx $D0 ; PRG:$0F82 A6 D0 + jsr $D1BB ; PRG:$0F84 20 BB D1 + cpx #$40 ; PRG:$0F87 E0 40 + bcc Label_CF90 ; PRG:$0F89 90 05 + jsr $C00C ; PRG:$0F8B 20 0C C0 + ldx #$FF ; PRG:$0F8E A2 FF +Label_CF90: + stx $D0 ; PRG:$0F90 86 D0 + ldx $D1 ; PRG:$0F92 A6 D1 + dec $47 ; PRG:$0F94 C6 47 + bne Label_CF67 ; PRG:$0F96 D0 CF +Label_CF98: + ldy $46 ; PRG:$0F98 A4 46 + iny ; PRG:$0F9A C8 + cpy #$02 ; PRG:$0F9B C0 02 + bcc Label_CF55 ; PRG:$0F9D 90 B6 + lda #$01 ; PRG:$0F9F A9 01 + jsr $C01B ; PRG:$0FA1 20 1B C0 + pla ; PRG:$0FA4 68 + sta $33 ; PRG:$0FA5 85 33 + lda $48 ; PRG:$0FA7 A5 48 + bmi Label_CFC4 ; PRG:$0FA9 30 19 + jsr $CFC7 ; PRG:$0FAB 20 C7 CF + lda $49 ; PRG:$0FAE A5 49 + bmi Label_CFC4 ; PRG:$0FB0 30 12 + jsr $CFC7 ; PRG:$0FB2 20 C7 CF + lda $0434 ; PRG:$0FB5 AD 34 04 + cmp #$FF ; PRG:$0FB8 C9 FF + beq Label_CFC4 ; PRG:$0FBA F0 08 + inc $0434 ; PRG:$0FBC EE 34 04 + lda #$01 ; PRG:$0FBF A9 01 + jsr $DE9A ; PRG:$0FC1 20 9A DE +Label_CFC4: + jmp $D1FD ; PRG:$0FC4 4C FD D1 +Label_CFC7: + lda $0435 ; PRG:$0FC7 AD 35 04 + cmp #$FF ; PRG:$0FCA C9 FF + beq Label_D020 ; PRG:$0FCC F0 52 + inc $0435 ; PRG:$0FCE EE 35 04 + lda $0435 ; PRG:$0FD1 AD 35 04 + ldx #$14 ; PRG:$0FD4 A2 14 + jsr $C04B ; PRG:$0FD6 20 4B C0 + cpx #$00 ; PRG:$0FD9 E0 00 + bne Label_D020 ; PRG:$0FDB D0 43 + lda $04F6 ; PRG:$0FDD AD F6 04 + cmp #$09 ; PRG:$0FE0 C9 09 + bcs Label_D020 ; PRG:$0FE2 B0 3C + inc $04F6 ; PRG:$0FE4 EE F6 04 + jsr $DF0E ; PRG:$0FE7 20 0E DF + lda $0434 ; PRG:$0FEA AD 34 04 + cmp #$FA ; PRG:$0FED C9 FA + bcs Label_CFFA ; PRG:$0FEF B0 09 + clc ; PRG:$0FF1 18 + adc #$05 ; PRG:$0FF2 69 05 + sta $0434 ; PRG:$0FF4 8D 34 04 + jmp $CFFF ; PRG:$0FF7 4C FF CF +Label_CFFA: + lda #$FF ; PRG:$0FFA A9 FF + sta $0434 ; PRG:$0FFC 8D 34 04 +Label_CFFF: + lda #$00 ; PRG:$0FFF A9 00 + jsr $DE9A ; PRG:$1001 20 9A DE + lda $04F6 ; PRG:$1004 AD F6 04 + jsr $DF0E ; PRG:$1007 20 0E DF + lda $0503 ; PRG:$100A AD 03 05 + bne Label_D020 ; PRG:$100D D0 11 + lda $0506 ; PRG:$100F AD 06 05 + bne Label_D020 ; PRG:$1012 D0 0C + lda $04F6 ; PRG:$1014 AD F6 04 + and #$01 ; PRG:$1017 29 01 + tax ; PRG:$1019 AA + lda $D028,x ; PRG:$101A BD 28 D0 + jsr $DECB ; PRG:$101D 20 CB DE +Label_D020: + rts ; PRG:$1020 60 +; ---- data $D021-$D029 (9 bytes) ---- +Label_D021: + .byte $0F,$00,$14,$28,$3C,$50,$64,$01 ; PRG:$1021 + .byte $04 ; PRG:$1029 +Label_D02A: + stx $45 ; PRG:$102A 86 45 + sty $46 ; PRG:$102C 84 46 + lda $042E ; PRG:$102E AD 2E 04 + asl a ; PRG:$1031 0A + asl a ; PRG:$1032 0A + tay ; PRG:$1033 A8 + ldx #$00 ; PRG:$1034 A2 00 +Label_D036: + stx $47 ; PRG:$1036 86 47 + lda $D330,y ; PRG:$1038 B9 30 D3 + ldx #$00 ; PRG:$103B A2 00 +Label_D03D: + cmp $D0C5,x ; PRG:$103D DD C5 D0 +Label_D040: + beq Label_D04A ; PRG:$1040 F0 08 + inx ; PRG:$1042 E8 + cpx #$04 ; PRG:$1043 E0 04 + bcc Label_D03D ; PRG:$1045 90 F6 + jmp $D0B8 ; PRG:$1047 4C B8 D0 +Label_D04A: + tya ; PRG:$104A 98 + pha ; PRG:$104B 48 + stx $48 ; PRG:$104C 86 48 + ldx $47 ; PRG:$104E A6 47 +Label_D050: + lda $D1AE,x ; PRG:$1050 BD AE D1 + clc ; PRG:$1053 18 + adc $46 ; PRG:$1054 65 46 + tay ; PRG:$1056 A8 + lda $D1AA,x ; PRG:$1057 BD AA D1 + clc ; PRG:$105A 18 + adc $45 ; PRG:$105B 65 45 + tax ; PRG:$105D AA + jsr $D193 ; PRG:$105E 20 93 D1 + pla ; PRG:$1061 68 + tay ; PRG:$1062 A8 + lda $D330,y ; PRG:$1063 B9 30 D3 + eor $0436,x ; PRG:$1066 5D 36 04 + cmp #$03 ; PRG:$1069 C9 03 + beq Label_D074 ; PRG:$106B F0 07 + cmp #$0C ; PRG:$106D C9 0C + beq Label_D074 ; PRG:$106F F0 03 + jmp $D087 ; PRG:$1071 4C 87 D0 +Label_D074: + lda $0433 ; PRG:$1074 AD 33 04 + asl a ; PRG:$1077 0A + tax ; PRG:$1078 AA + lda $48 ; PRG:$1079 A5 48 + cmp $D0C9,x ; PRG:$107B DD C9 D0 + beq Label_D085 ; PRG:$107E F0 05 +Label_D080: + cmp $D0CA,x ; PRG:$1080 DD CA D0 + bne Label_D0B8 ; PRG:$1083 D0 33 +Label_D085: + sec ; PRG:$1085 38 + rts ; PRG:$1086 60 +Label_D087: + tya ; PRG:$1087 98 + pha ; PRG:$1088 48 + ldy $0433 ; PRG:$1089 AC 33 04 + beq Label_D0B6 ; PRG:$108C F0 28 + dey ; PRG:$108E 88 + tya ; PRG:$108F 98 + asl a ; PRG:$1090 0A + tay ; PRG:$1091 A8 + lda $D0CF,y ; PRG:$1092 B9 CF D0 + cmp $48 ; PRG:$1095 C5 48 + beq Label_D0A0 ; PRG:$1097 F0 07 + lda $D0D0,y ; PRG:$1099 B9 D0 D0 + cmp $48 ; PRG:$109C C5 48 + bne Label_D0B6 ; PRG:$109E D0 16 +Label_D0A0: + pla ; PRG:$10A0 68 + tay ; PRG:$10A1 A8 + lda $0433 ; PRG:$10A2 AD 33 04 + cmp #$01 ; PRG:$10A5 C9 01 + beq Label_D0AC ; PRG:$10A7 F0 03 + inx ; PRG:$10A9 E8 + bne Label_D0AD ; PRG:$10AA D0 01 +Label_D0AC: + dex ; PRG:$10AC CA +Label_D0AD: + lda $0436,x ; PRG:$10AD BD 36 04 +Label_D0B0: + cmp #$00 ; PRG:$10B0 C9 00 + beq Label_D0B8 ; PRG:$10B2 F0 04 + sec ; PRG:$10B4 38 + rts ; PRG:$10B5 60 +Label_D0B6: + pla ; PRG:$10B6 68 + tay ; PRG:$10B7 A8 +Label_D0B8: + ldx $47 ; PRG:$10B8 A6 47 + iny ; PRG:$10BA C8 + inx ; PRG:$10BB E8 + cpx #$04 ; PRG:$10BC E0 04 + bcs Label_D0C3 ; PRG:$10BE B0 03 + jmp $D036 ; PRG:$10C0 4C 36 D0 +Label_D0C3: + clc ; PRG:$10C3 18 + rts ; PRG:$10C4 60 +; ---- data $D0C5-$D0D2 (14 bytes) ---- +Label_D0C5: + .byte $01,$02,$04,$08,$00,$03,$01,$03 ; PRG:$10C5 + .byte $00,$02,$00,$02,$01,$03 ; PRG:$10CD +Label_D0D3: + stx $45 ; PRG:$10D3 86 45 + sty $46 ; PRG:$10D5 84 46 + lda $042E ; PRG:$10D7 AD 2E 04 + asl a ; PRG:$10DA 0A + asl a ; PRG:$10DB 0A + tay ; PRG:$10DC A8 + ldx #$00 ; PRG:$10DD A2 00 +Label_D0DF: + stx $47 ; PRG:$10DF 86 47 + lda $45 ; PRG:$10E1 A5 45 + lda $45 ; PRG:$10E3 A5 45 + clc ; PRG:$10E5 18 + adc $D1AA,x ; PRG:$10E6 7D AA D1 + cmp #$0A ; PRG:$10E9 C9 0A + bcc Label_D0F8 ; PRG:$10EB 90 0B + lda $D330,y ; PRG:$10ED B9 30 D3 + bne Label_D0F5 ; PRG:$10F0 D0 03 + jmp $D185 ; PRG:$10F2 4C 85 D1 +Label_D0F5: + lda #$00 ; PRG:$10F5 A9 00 + rts ; PRG:$10F7 60 +Label_D0F8: + lda $46 ; PRG:$10F8 A5 46 + clc ; PRG:$10FA 18 + adc $D1AE,x ; PRG:$10FB 7D AE D1 + cmp #$12 ; PRG:$10FE C9 12 + bne Label_D105 ; PRG:$1100 D0 03 + lda #$FF ; PRG:$1102 A9 FF + rts ; PRG:$1104 60 +Label_D105: + lda $D330,y ; PRG:$1105 B9 30 D3 + bne Label_D10D ; PRG:$1108 D0 03 + jmp $D185 ; PRG:$110A 4C 85 D1 +Label_D10D: + tya ; PRG:$110D 98 + pha ; PRG:$110E 48 + ldx $47 ; PRG:$110F A6 47 + lda $D1AE,x ; PRG:$1111 BD AE D1 + clc ; PRG:$1114 18 + adc $46 ; PRG:$1115 65 46 + tay ; PRG:$1117 A8 + lda $D1AA,x ; PRG:$1118 BD AA D1 + clc ; PRG:$111B 18 + adc $45 ; PRG:$111C 65 45 + tax ; PRG:$111E AA + jsr $D193 ; PRG:$111F 20 93 D1 + pla ; PRG:$1122 68 + tay ; PRG:$1123 A8 + lda $0433 ; PRG:$1124 AD 33 04 + bne Label_D13C ; PRG:$1127 D0 13 + lda $D330,y ; PRG:$1129 B9 30 D3 + cmp #$02 ; PRG:$112C C9 02 + beq Label_D134 ; PRG:$112E F0 04 + cmp #$04 ; PRG:$1130 C9 04 + bne Label_D13C ; PRG:$1132 D0 08 +Label_D134: + lda $0436,x ; PRG:$1134 BD 36 04 + beq Label_D13C ; PRG:$1137 F0 03 + lda #$FF ; PRG:$1139 A9 FF + rts ; PRG:$113B 60 +Label_D13C: + lda $0436,x ; PRG:$113C BD 36 04 + sta $48 ; PRG:$113F 85 48 + bne Label_D146 ; PRG:$1141 D0 03 + jmp $D185 ; PRG:$1143 4C 85 D1 +Label_D146: + lda $D330,y ; PRG:$1146 B9 30 D3 + cmp #$03 ; PRG:$1149 C9 03 + beq Label_D15B ; PRG:$114B F0 0E + cmp #$0C ; PRG:$114D C9 0C + beq Label_D15B ; PRG:$114F F0 0A + lda $48 ; PRG:$1151 A5 48 + cmp #$03 ; PRG:$1153 C9 03 + beq Label_D15B ; PRG:$1155 F0 04 + cmp #$0C ; PRG:$1157 C9 0C + bne Label_D15E ; PRG:$1159 D0 03 +Label_D15B: + lda #$FF ; PRG:$115B A9 FF + rts ; PRG:$115D 60 +Label_D15E: + lda $D330,y ; PRG:$115E B9 30 D3 + eor $48 ; PRG:$1161 45 48 + cmp #$11 ; PRG:$1163 C9 11 + bcc Label_D16A ; PRG:$1165 90 03 + lda #$02 ; PRG:$1167 A9 02 + rts ; PRG:$1169 60 +Label_D16A: + cmp #$01 ; PRG:$116A C9 01 + beq Label_D185 ; PRG:$116C F0 17 + cmp #$02 ; PRG:$116E C9 02 + beq Label_D185 ; PRG:$1170 F0 13 + cmp #$03 ; PRG:$1172 C9 03 + beq Label_D185 ; PRG:$1174 F0 0F + cmp #$04 ; PRG:$1176 C9 04 + beq Label_D185 ; PRG:$1178 F0 0B + cmp #$08 ; PRG:$117A C9 08 + beq Label_D185 ; PRG:$117C F0 07 + cmp #$0C ; PRG:$117E C9 0C + beq Label_D185 ; PRG:$1180 F0 03 + lda #$FF ; PRG:$1182 A9 FF + rts ; PRG:$1184 60 +Label_D185: + ldx $47 ; PRG:$1185 A6 47 + iny ; PRG:$1187 C8 + inx ; PRG:$1188 E8 + cpx #$04 ; PRG:$1189 E0 04 + bcs Label_D190 ; PRG:$118B B0 03 + jmp $D0DF ; PRG:$118D 4C DF D0 +Label_D190: + lda #$01 ; PRG:$1190 A9 01 + rts ; PRG:$1192 60 +Label_D193: + lda $45 ; PRG:$1193 A5 45 + pha ; PRG:$1195 48 + tya ; PRG:$1196 98 + asl a ; PRG:$1197 0A + sta $45 ; PRG:$1198 85 45 + asl a ; PRG:$119A 0A + asl a ; PRG:$119B 0A + clc ; PRG:$119C 18 + adc $45 ; PRG:$119D 65 45 + sta $45 ; PRG:$119F 85 45 + txa ; PRG:$11A1 8A + clc ; PRG:$11A2 18 + adc $45 ; PRG:$11A3 65 45 + tax ; PRG:$11A5 AA + pla ; PRG:$11A6 68 + sta $45 ; PRG:$11A7 85 45 + rts ; PRG:$11A9 60 +; ---- data $D1AA-$D1B1 (8 bytes) ---- +Label_D1AA: + .byte $00,$01,$00,$01,$00,$00,$01,$01 ; PRG:$11AA +Label_D1B2: + ldx #$FF ; PRG:$11B2 A2 FF + jsr $D1BB ; PRG:$11B4 20 BB D1 + jsr $C00C ; PRG:$11B7 20 0C C0 + rts ; PRG:$11BA 60 +Label_D1BB: + stx $D0 ; PRG:$11BB 86 D0 + lda #$0A ; PRG:$11BD A9 0A + sta $05 ; PRG:$11BF 85 05 + tya ; PRG:$11C1 98 + clc ; PRG:$11C2 18 + adc #$0A ; PRG:$11C3 69 0A + sta $06 ; PRG:$11C5 85 06 + ldx #$00 ; PRG:$11C7 A2 00 + jsr $D193 ; PRG:$11C9 20 93 D1 + txa ; PRG:$11CC 8A + tay ; PRG:$11CD A8 + ldx $D0 ; PRG:$11CE A6 D0 + lda #$0A ; PRG:$11D0 A9 0A + sta $D2 ; PRG:$11D2 85 D2 + jsr $C012 ; PRG:$11D4 20 12 C0 +Label_D1D7: + sty $45 ; PRG:$11D7 84 45 + lda $0436,y ; PRG:$11D9 B9 36 04 + tay ; PRG:$11DC A8 + lda $D2AB,y ; PRG:$11DD B9 AB D2 + sta $0700,x ; PRG:$11E0 9D 00 07 + inx ; PRG:$11E3 E8 + ldy $45 ; PRG:$11E4 A4 45 + iny ; PRG:$11E6 C8 + dec $D2 ; PRG:$11E7 C6 D2 + bne Label_D1D7 ; PRG:$11E9 D0 EC + rts ; PRG:$11EB 60 +Label_D1EC: + lda #$00 ; PRG:$11EC A9 00 + sta $0C ; PRG:$11EE 85 0C + lda $04F6 ; PRG:$11F0 AD F6 04 + jsr $D248 ; PRG:$11F3 20 48 D2 + ldx #$18 ; PRG:$11F6 A2 18 + ldy #$18 ; PRG:$11F8 A0 18 + jmp $D21C ; PRG:$11FA 4C 1C D2 +Label_D1FD: + lda #$00 ; PRG:$11FD A9 00 + sta $0C ; PRG:$11FF 85 0C + lda $0434 ; PRG:$1201 AD 34 04 + jsr $D248 ; PRG:$1204 20 48 D2 + ldx #$04 ; PRG:$1207 A2 04 + ldy #$10 ; PRG:$1209 A0 10 + jmp $D21C ; PRG:$120B 4C 1C D2 +Label_D20E: + lda #$00 ; PRG:$120E A9 00 + sta $0C ; PRG:$1210 85 0C + lda $0435 ; PRG:$1212 AD 35 04 + jsr $D248 ; PRG:$1215 20 48 D2 + ldx #$04 ; PRG:$1218 A2 04 + ldy #$16 ; PRG:$121A A0 16 +Label_D21C: + stx $05 ; PRG:$121C 86 05 + sty $06 ; PRG:$121E 84 06 + jsr $C015 ; PRG:$1220 20 15 C0 + ldx #$00 ; PRG:$1223 A2 00 + ldy #$00 ; PRG:$1225 A0 00 +Label_D227: + lda $45,x ; PRG:$1227 B5 45 + bne Label_D237 ; PRG:$1229 D0 0C + cpx #$02 ; PRG:$122B E0 02 + beq Label_D237 ; PRG:$122D F0 08 + cpy #$00 ; PRG:$122F C0 00 + bne Label_D237 ; PRG:$1231 D0 04 + lda #$01 ; PRG:$1233 A9 01 + bne Label_D23A ; PRG:$1235 D0 03 +Label_D237: + iny ; PRG:$1237 C8 + ora #$30 ; PRG:$1238 09 30 +Label_D23A: + sta $0702,x ; PRG:$123A 9D 02 07 + inx ; PRG:$123D E8 + cpx #$03 ; PRG:$123E E0 03 + bcc Label_D227 ; PRG:$1240 90 E5 + ldx #$05 ; PRG:$1242 A2 05 + jsr $C00C ; PRG:$1244 20 0C C0 + rts ; PRG:$1247 60 +Label_D248: + ldx #$00 ; PRG:$1248 A2 00 +Label_D24A: + cmp #$64 ; PRG:$124A C9 64 + bcc Label_D253 ; PRG:$124C 90 05 + sbc #$64 ; PRG:$124E E9 64 + inx ; PRG:$1250 E8 + bne Label_D24A ; PRG:$1251 D0 F7 +Label_D253: + stx $45 ; PRG:$1253 86 45 + ldx #$00 ; PRG:$1255 A2 00 +Label_D257: + cmp #$0A ; PRG:$1257 C9 0A + bcc Label_D260 ; PRG:$1259 90 05 + sbc #$0A ; PRG:$125B E9 0A + inx ; PRG:$125D E8 + bne Label_D257 ; PRG:$125E D0 F7 +Label_D260: + stx $46 ; PRG:$1260 86 46 + sta $47 ; PRG:$1262 85 47 + rts ; PRG:$1264 60 +Label_D265: + lda #$18 ; PRG:$1265 A9 18 + sta $05 ; PRG:$1267 85 05 + lda #$11 ; PRG:$1269 A9 11 + sta $06 ; PRG:$126B 85 06 + jsr $C015 ; PRG:$126D 20 15 C0 + ldx #$04 ; PRG:$1270 A2 04 + inc $06 ; PRG:$1272 E6 06 + jsr $C012 ; PRG:$1274 20 12 C0 + lda $042F ; PRG:$1277 AD 2F 04 + asl a ; PRG:$127A 0A + asl a ; PRG:$127B 0A + tay ; PRG:$127C A8 + ldx #$00 ; PRG:$127D A2 00 +Label_D27F: + stx $45 ; PRG:$127F 86 45 + ldx $D330,y ; PRG:$1281 BE 30 D3 + lda $D2AB,x ; PRG:$1284 BD AB D2 + pha ; PRG:$1287 48 + ldx $45 ; PRG:$1288 A6 45 + lda $D2BB,x ; PRG:$128A BD BB D2 + tax ; PRG:$128D AA + pla ; PRG:$128E 68 + sta $0700,x ; PRG:$128F 9D 00 07 + iny ; PRG:$1292 C8 + ldx $45 ; PRG:$1293 A6 45 + inx ; PRG:$1295 E8 + cpx #$04 ; PRG:$1296 E0 04 + bcc Label_D27F ; PRG:$1298 90 E5 + ldx #$09 ; PRG:$129A A2 09 + jsr $C00C ; PRG:$129C 20 0C C0 + rts ; PRG:$129F 60 +Label_D2A0: + ldx #$F0 ; PRG:$12A0 A2 F0 + lda #$FF ; PRG:$12A2 A9 FF +Label_D2A4: + sta $0200,x ; PRG:$12A4 9D 00 02 + inx ; PRG:$12A7 E8 + bne Label_D2A4 ; PRG:$12A8 D0 FA + rts ; PRG:$12AA 60 +; ---- data $D2AB-$D2BE (20 bytes) ---- +Label_D2AB: + .byte $01,$21,$22,$3B,$3A,$01,$01,$01 ; PRG:$12AB + .byte $23,$01,$01,$01,$57,$01,$01,$5A ; PRG:$12B3 + .byte $02,$03,$07,$08 ; PRG:$12BB +Label_D2BF: + lda $0430 ; PRG:$12BF AD 30 04 + clc ; PRG:$12C2 18 + adc #$0A ; PRG:$12C3 69 0A + asl a ; PRG:$12C5 0A + asl a ; PRG:$12C6 0A + asl a ; PRG:$12C7 0A + sta $45 ; PRG:$12C8 85 45 + lda $0431 ; PRG:$12CA AD 31 04 + clc ; PRG:$12CD 18 + adc #$0A ; PRG:$12CE 69 0A + asl a ; PRG:$12D0 0A + asl a ; PRG:$12D1 0A + asl a ; PRG:$12D2 0A + sta $46 ; PRG:$12D3 85 46 + dec $46 ; PRG:$12D5 C6 46 + lda $042E ; PRG:$12D7 AD 2E 04 + lsr a ; PRG:$12DA 4A + lsr a ; PRG:$12DB 4A + tax ; PRG:$12DC AA + lda $D320,x ; PRG:$12DD BD 20 D3 + sta $47 ; PRG:$12E0 85 47 + lda $042E ; PRG:$12E2 AD 2E 04 + asl a ; PRG:$12E5 0A + asl a ; PRG:$12E6 0A + sta $48 ; PRG:$12E7 85 48 + ldx #$F0 ; PRG:$12E9 A2 F0 + ldy #$00 ; PRG:$12EB A0 00 +Label_D2ED: + lda $D32C,y ; PRG:$12ED B9 2C D3 + clc ; PRG:$12F0 18 + adc $46 ; PRG:$12F1 65 46 + sta $0200,x ; PRG:$12F3 9D 00 02 + inx ; PRG:$12F6 E8 + tya ; PRG:$12F7 98 + pha ; PRG:$12F8 48 + ldy $48 ; PRG:$12F9 A4 48 + lda $D330,y ; PRG:$12FB B9 30 D3 + tay ; PRG:$12FE A8 + lda $D390,y ; PRG:$12FF B9 90 D3 + sta $0200,x ; PRG:$1302 9D 00 02 + inx ; PRG:$1305 E8 + lda $47 ; PRG:$1306 A5 47 + sta $0200,x ; PRG:$1308 9D 00 02 + inx ; PRG:$130B E8 + pla ; PRG:$130C 68 + tay ; PRG:$130D A8 + lda $D328,y ; PRG:$130E B9 28 D3 + clc ; PRG:$1311 18 + adc $45 ; PRG:$1312 65 45 + sta $0200,x ; PRG:$1314 9D 00 02 + inx ; PRG:$1317 E8 + inc $48 ; PRG:$1318 E6 48 + iny ; PRG:$131A C8 + cpy #$04 ; PRG:$131B C0 04 + bcc Label_D2ED ; PRG:$131D 90 CE + rts ; PRG:$131F 60 +; ---- data $D320-$D3A0 (129 bytes) ---- +Label_D320: + .byte $01,$02,$01,$02,$01,$02,$01,$02 ; PRG:$1320 + .byte $00,$08,$00,$08,$00,$00,$08,$08 ; PRG:$1328 + .byte $00,$00,$02,$04,$04,$00,$01,$00 ; PRG:$1330 + .byte $00,$00,$08,$01,$02,$00,$08,$00 ; PRG:$1338 + .byte $00,$00,$02,$0C,$04,$00,$03,$00 ; PRG:$1340 + .byte $00,$00,$0C,$01,$03,$00,$08,$00 ; PRG:$1348 + .byte $04,$00,$03,$04,$0C,$01,$01,$00 ; PRG:$1350 + .byte $08,$03,$00,$08,$00,$02,$02,$0C ; PRG:$1358 + .byte $00,$00,$01,$00,$00,$00,$08,$00 ; PRG:$1360 + .byte $00,$00,$02,$00,$00,$00,$04,$00 ; PRG:$1368 + .byte $00,$00,$08,$03,$02,$00,$0C,$00 ; PRG:$1370 + .byte $00,$00,$03,$04,$0C,$00,$01,$00 ; PRG:$1378 + .byte $02,$00,$08,$01,$02,$04,$08,$00 ; PRG:$1380 + .byte $02,$04,$00,$01,$00,$04,$08,$01 ; PRG:$1388 + .byte $FF,$73,$75,$7B,$77,$FF,$FF,$FF ; PRG:$1390 + .byte $79,$FF,$FF,$FF,$7D,$FF,$FF,$FF ; PRG:$1398 + .byte $7F ; PRG:$13A0 +Label_D3A1: + ldx $04F2 ; PRG:$13A1 AE F2 04 + ldy $04F3 ; PRG:$13A4 AC F3 04 + cpy #$11 ; PRG:$13A7 C0 11 + bcs Label_D3B5 ; PRG:$13A9 B0 0A + jsr $D193 ; PRG:$13AB 20 93 D1 + lda $0436,x ; PRG:$13AE BD 36 04 + bne Label_D3B5 ; PRG:$13B1 D0 02 + clc ; PRG:$13B3 18 + rts ; PRG:$13B4 60 +Label_D3B5: + sec ; PRG:$13B5 38 + rts ; PRG:$13B6 60 +Label_D3B7: + ldy #$90 ; PRG:$13B7 A0 90 + ldx #$00 ; PRG:$13B9 A2 00 +Label_D3BB: + lda $04F3 ; PRG:$13BB AD F3 04 + clc ; PRG:$13BE 18 + adc #$0A ; PRG:$13BF 69 0A + asl a ; PRG:$13C1 0A + asl a ; PRG:$13C2 0A + asl a ; PRG:$13C3 0A + sec ; PRG:$13C4 38 + sbc #$05 ; PRG:$13C5 E9 05 + clc ; PRG:$13C7 18 + adc $D46C,x ; PRG:$13C8 7D 6C D4 + sta $0200,y ; PRG:$13CB 99 00 02 + iny ; PRG:$13CE C8 + lda #$74 ; PRG:$13CF A9 74 + sta $0200,y ; PRG:$13D1 99 00 02 + iny ; PRG:$13D4 C8 + lda $D471,x ; PRG:$13D5 BD 71 D4 + sta $0200,y ; PRG:$13D8 99 00 02 + iny ; PRG:$13DB C8 + lda $04F2 ; PRG:$13DC AD F2 04 + clc ; PRG:$13DF 18 + adc #$0A ; PRG:$13E0 69 0A + asl a ; PRG:$13E2 0A + asl a ; PRG:$13E3 0A + asl a ; PRG:$13E4 0A + clc ; PRG:$13E5 18 + adc $D467,x ; PRG:$13E6 7D 67 D4 + sta $0200,y ; PRG:$13E9 99 00 02 + iny ; PRG:$13EC C8 + txa ; PRG:$13ED 8A + pha ; PRG:$13EE 48 + tya ; PRG:$13EF 98 + pha ; PRG:$13F0 48 + lda #$01 ; PRG:$13F1 A9 01 + jsr $D7B6 ; PRG:$13F3 20 B6 D7 + lda #$04 ; PRG:$13F6 A9 04 + jsr $C01B ; PRG:$13F8 20 1B C0 + pla ; PRG:$13FB 68 + tay ; PRG:$13FC A8 + pla ; PRG:$13FD 68 + tax ; PRG:$13FE AA + inx ; PRG:$13FF E8 + cpx #$05 ; PRG:$1400 E0 05 + bcc Label_D3BB ; PRG:$1402 90 B7 + ldx $04F2 ; PRG:$1404 AE F2 04 + ldy $04F3 ; PRG:$1407 AC F3 04 + jsr $D193 ; PRG:$140A 20 93 D1 + lda #$00 ; PRG:$140D A9 00 + sta $0436,x ; PRG:$140F 9D 36 04 + sta $04F5 ; PRG:$1412 8D F5 04 + ldy $04F2 ; PRG:$1415 AC F2 04 + beq Label_D41D ; PRG:$1418 F0 03 + sta $0435,x ; PRG:$141A 9D 35 04 +Label_D41D: + cpy #$09 ; PRG:$141D C0 09 + bcs Label_D424 ; PRG:$141F B0 03 + sta $0437,x ; PRG:$1421 9D 37 04 +Label_D424: + ldy $04F3 ; PRG:$1424 AC F3 04 + cpy #$11 ; PRG:$1427 C0 11 + bcs Label_D42E ; PRG:$1429 B0 03 + sta $0440,x ; PRG:$142B 9D 40 04 +Label_D42E: + ldx #$FF ; PRG:$142E A2 FF + jsr $D1BB ; PRG:$1430 20 BB D1 + ldy $04F3 ; PRG:$1433 AC F3 04 + cpy #$11 ; PRG:$1436 C0 11 + bcs Label_D43E ; PRG:$1438 B0 04 + iny ; PRG:$143A C8 + jsr $D1BB ; PRG:$143B 20 BB D1 +Label_D43E: + jsr $C00C ; PRG:$143E 20 0C C0 + jsr $D6AC ; PRG:$1441 20 AC D6 + lda $0503 ; PRG:$1444 AD 03 05 + bne Label_D45A ; PRG:$1447 D0 11 + lda $0506 ; PRG:$1449 AD 06 05 + bne Label_D45A ; PRG:$144C D0 0C + lda $04F6 ; PRG:$144E AD F6 04 + and #$01 ; PRG:$1451 29 01 + tax ; PRG:$1453 AA + lda $D028,x ; PRG:$1454 BD 28 D0 + jsr $DECB ; PRG:$1457 20 CB DE +Label_D45A: + ldx #$90 ; PRG:$145A A2 90 + lda #$FF ; PRG:$145C A9 FF +Label_D45E: + sta $0200,x ; PRG:$145E 9D 00 02 + inx ; PRG:$1461 E8 + cpx #$A4 ; PRG:$1462 E0 A4 + bcc Label_D45E ; PRG:$1464 90 F8 + rts ; PRG:$1466 60 +; ---- data $D467-$D475 (15 bytes) ---- +Label_D467: + .byte $00,$FB,$FC,$05,$F9,$00,$FB,$04 ; PRG:$1467 + .byte $04,$02,$02,$01,$03,$00,$01 ; PRG:$146F +Label_D476: + ldx #$90 ; PRG:$1476 A2 90 + lda $04F5 ; PRG:$1478 AD F5 04 + bne Label_D488 ; PRG:$147B D0 0B + lda #$FF ; PRG:$147D A9 FF +Label_D47F: + sta $0200,x ; PRG:$147F 9D 00 02 + inx ; PRG:$1482 E8 + cpx #$94 ; PRG:$1483 E0 94 + bcc Label_D47F ; PRG:$1485 90 F8 + rts ; PRG:$1487 60 +Label_D488: + lda $04F3 ; PRG:$1488 AD F3 04 + clc ; PRG:$148B 18 + adc #$0A ; PRG:$148C 69 0A + asl a ; PRG:$148E 0A + asl a ; PRG:$148F 0A + asl a ; PRG:$1490 0A + sec ; PRG:$1491 38 + sbc #$05 ; PRG:$1492 E9 05 + sta $0200,x ; PRG:$1494 9D 00 02 + inx ; PRG:$1497 E8 + lda #$1D ; PRG:$1498 A9 1D + sta $0200,x ; PRG:$149A 9D 00 02 + inx ; PRG:$149D E8 + lda $04F4 ; PRG:$149E AD F4 04 + and #$01 ; PRG:$14A1 29 01 + clc ; PRG:$14A3 18 + adc #$01 ; PRG:$14A4 69 01 + sta $0200,x ; PRG:$14A6 9D 00 02 + inx ; PRG:$14A9 E8 + lda $04F2 ; PRG:$14AA AD F2 04 + clc ; PRG:$14AD 18 + adc #$0A ; PRG:$14AE 69 0A + asl a ; PRG:$14B0 0A + asl a ; PRG:$14B1 0A + asl a ; PRG:$14B2 0A + sta $0200,x ; PRG:$14B3 9D 00 02 + rts ; PRG:$14B6 60 +Label_D4B7: + ldx #$00 ; PRG:$14B7 A2 00 + lda #$FF ; PRG:$14B9 A9 FF +Label_D4BB: + sta $0200,x ; PRG:$14BB 9D 00 02 + inx ; PRG:$14BE E8 + cpx #$80 ; PRG:$14BF E0 80 + bcc Label_D4BB ; PRG:$14C1 90 F8 + ldx #$06 ; PRG:$14C3 A2 06 +Label_D4C5: + lda $D4EE,x ; PRG:$14C5 BD EE D4 + sta $040B,x ; PRG:$14C8 9D 0B 04 + lda $D4F5,x ; PRG:$14CB BD F5 D4 + sta $0412,x ; PRG:$14CE 9D 12 04 + lda $D4FC,x ; PRG:$14D1 BD FC D4 + sta $0419,x ; PRG:$14D4 9D 19 04 + lda #$00 ; PRG:$14D7 A9 00 + sta $0420,x ; PRG:$14D9 9D 20 04 + lda $D503,x ; PRG:$14DC BD 03 D5 + sta $0427,x ; PRG:$14DF 9D 27 04 + dex ; PRG:$14E2 CA + bpl Label_D4C5 ; PRG:$14E3 10 E0 + sta $0406 ; PRG:$14E5 8D 06 04 + lda #$01 ; PRG:$14E8 A9 01 + sta $0405 ; PRG:$14EA 8D 05 04 + rts ; PRG:$14ED 60 +; ---- data $D4EE-$D509 (28 bytes) ---- +Label_D4EE: + .byte $00,$00,$00,$00,$00,$00,$00,$80 ; PRG:$14EE + .byte $40,$E8,$10,$40,$B0,$28,$00,$08 ; PRG:$14F6 + .byte $20,$28,$28,$38,$38,$02,$02,$02 ; PRG:$14FE + .byte $01,$01,$01,$01 ; PRG:$1506 +Label_D50A: + lda $0405 ; PRG:$150A AD 05 04 + bne Label_D510 ; PRG:$150D D0 01 + rts ; PRG:$150F 60 +Label_D510: + ldx #$00 ; PRG:$1510 A2 00 +Label_D512: + stx $0406 ; PRG:$1512 8E 06 04 + lda $040B,x ; PRG:$1515 BD 0B 04 + beq Label_D520 ; PRG:$1518 F0 06 + dec $040B,x ; PRG:$151A DE 0B 04 + jmp $D54A ; PRG:$151D 4C 4A D5 +Label_D520: + jsr $D56B ; PRG:$1520 20 6B D5 + ldx $0406 ; PRG:$1523 AE 06 04 + inc $0420,x ; PRG:$1526 FE 20 04 + lda $0420,x ; PRG:$1529 BD 20 04 + and #$07 ; PRG:$152C 29 07 + bne Label_D530 ; PRG:$152E D0 00 +Label_D530: + lda $0412,x ; PRG:$1530 BD 12 04 + clc ; PRG:$1533 18 + adc $D556,x ; PRG:$1534 7D 56 D5 + sta $0412,x ; PRG:$1537 9D 12 04 + lda $0419,x ; PRG:$153A BD 19 04 + clc ; PRG:$153D 18 + adc $D55D,x ; PRG:$153E 7D 5D D5 + sta $0419,x ; PRG:$1541 9D 19 04 + lda $D564,x ; PRG:$1544 BD 64 D5 + sta $040B,x ; PRG:$1547 9D 0B 04 +Label_D54A: + ldx $0406 ; PRG:$154A AE 06 04 + inx ; PRG:$154D E8 + cpx #$07 ; PRG:$154E E0 07 + bcs Label_D555 ; PRG:$1550 B0 03 + jmp $D512 ; PRG:$1552 4C 12 D5 +Label_D555: + rts ; PRG:$1555 60 +; ---- data $D556-$D56A (21 bytes) ---- +Label_D556: + .byte $01,$01,$01,$01,$01,$01,$01,$00 ; PRG:$1556 + .byte $00,$00,$00,$00,$00,$00,$00,$01 ; PRG:$155E + .byte $02,$04,$08,$10,$20 ; PRG:$1566 +Label_D56B: + ldx $0406 ; PRG:$156B AE 06 04 + lda $0427,x ; PRG:$156E BD 27 04 + cmp #$03 ; PRG:$1571 C9 03 + bcc Label_D57A ; PRG:$1573 90 05 + lda #$02 ; PRG:$1575 A9 02 + sta $0427,x ; PRG:$1577 9D 27 04 +Label_D57A: + asl a ; PRG:$157A 0A + asl a ; PRG:$157B 0A + asl a ; PRG:$157C 0A + tay ; PRG:$157D A8 + lda $0412,x ; PRG:$157E BD 12 04 + sta $0407 ; PRG:$1581 8D 07 04 + lda $0419,x ; PRG:$1584 BD 19 04 + sta $0408 ; PRG:$1587 8D 08 04 + lda $D5DC,x ; PRG:$158A BD DC D5 + sta $0409 ; PRG:$158D 8D 09 04 + lda $D5E3,x ; PRG:$1590 BD E3 D5 + sta $040A ; PRG:$1593 8D 0A 04 + lda $D5D5,x ; PRG:$1596 BD D5 D5 + tax ; PRG:$1599 AA +Label_D59A: + lda $D5EA,y ; PRG:$159A B9 EA D5 + cmp #$FF ; PRG:$159D C9 FF + bne Label_D5AD ; PRG:$159F D0 0C + sta $0200,x ; PRG:$15A1 9D 00 02 + sta $0201,x ; PRG:$15A4 9D 01 02 + sta $0203,x ; PRG:$15A7 9D 03 02 + jmp $D5CA ; PRG:$15AA 4C CA D5 +Label_D5AD: + sta $0201,x ; PRG:$15AD 9D 01 02 + lda $D61A,y ; PRG:$15B0 B9 1A D6 + clc ; PRG:$15B3 18 + adc $0408 ; PRG:$15B4 6D 08 04 + sta $0200,x ; PRG:$15B7 9D 00 02 + lda $D602,y ; PRG:$15BA B9 02 D6 + clc ; PRG:$15BD 18 + adc $0407 ; PRG:$15BE 6D 07 04 + sta $0203,x ; PRG:$15C1 9D 03 02 + lda $040A ; PRG:$15C4 AD 0A 04 + sta $0202,x ; PRG:$15C7 9D 02 02 +Label_D5CA: + inx ; PRG:$15CA E8 + inx ; PRG:$15CB E8 + inx ; PRG:$15CC E8 + inx ; PRG:$15CD E8 + iny ; PRG:$15CE C8 + dec $0409 ; PRG:$15CF CE 09 04 + bne Label_D59A ; PRG:$15D2 D0 C6 + rts ; PRG:$15D4 60 +; ---- data $D5D5-$D631 (93 bytes) ---- +Label_D5D5: + .byte $00,$20,$40,$60,$68,$70,$78,$08 ; PRG:$15D5 + .byte $08,$08,$02,$02,$02,$02,$20,$20 ; PRG:$15DD + .byte $20,$20,$20,$20,$20,$41,$FF,$FF ; PRG:$15E5 + .byte $FF,$FF,$FF,$FF,$FF,$43,$45,$FF ; PRG:$15ED + .byte $FF,$FF,$FF,$FF,$FF,$47,$49,$4B ; PRG:$15F5 + .byte $4D,$4F,$51,$53,$55,$00,$00,$00 ; PRG:$15FD + .byte $00,$00,$00,$00,$00,$FC,$04,$00 ; PRG:$1605 + .byte $00,$00,$00,$00,$00,$F4,$FC,$04 ; PRG:$160D + .byte $0C,$F4,$FC,$04,$0C,$00,$00,$00 ; PRG:$1615 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$161D + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$1625 + .byte $00,$10,$10,$10,$10 ; PRG:$162D +Label_D632: + lda #$08 ; PRG:$1632 A9 08 + jsr $DECB ; PRG:$1634 20 CB DE + ldx #$04 ; PRG:$1637 A2 04 + ldy #$00 ; PRG:$1639 A0 00 +Label_D63B: + stx $47 ; PRG:$163B 86 47 + sty $48 ; PRG:$163D 84 48 + jsr $D66D ; PRG:$163F 20 6D D6 + lda #$01 ; PRG:$1642 A9 01 + jsr $C01B ; PRG:$1644 20 1B C0 + ldx $47 ; PRG:$1647 A6 47 + ldy $48 ; PRG:$1649 A4 48 + dey ; PRG:$164B 88 + cpy #$58 ; PRG:$164C C0 58 + bne Label_D63B ; PRG:$164E D0 EB + lda #$B4 ; PRG:$1650 A9 B4 + jsr $C01B ; PRG:$1652 20 1B C0 +Label_D655: + lda #$00 ; PRG:$1655 A9 00 + sta $0405 ; PRG:$1657 8D 05 04 + jsr $C018 ; PRG:$165A 20 18 C0 + lda #$F3 ; PRG:$165D A9 F3 + sta $02 ; PRG:$165F 85 02 + lda #$D7 ; PRG:$1661 A9 D7 + sta $03 ; PRG:$1663 85 03 + lda #$00 ; PRG:$1665 A9 00 + jsr $C051 ; PRG:$1667 20 51 C0 + jmp $C835 ; PRG:$166A 4C 35 C8 +Label_D66D: + stx $45 ; PRG:$166D 86 45 + tya ; PRG:$166F 98 + clc ; PRG:$1670 18 + adc #$F0 ; PRG:$1671 69 F0 + sta $46 ; PRG:$1673 85 46 + ldx #$80 ; PRG:$1675 A2 80 + ldy #$00 ; PRG:$1677 A0 00 +Label_D679: + lda $46 ; PRG:$1679 A5 46 + sta $0200,x ; PRG:$167B 9D 00 02 + inx ; PRG:$167E E8 + lda $D69C,y ; PRG:$167F B9 9C D6 + sta $0200,x ; PRG:$1682 9D 00 02 + inx ; PRG:$1685 E8 + lda #$03 ; PRG:$1686 A9 03 + sta $0200,x ; PRG:$1688 9D 00 02 + inx ; PRG:$168B E8 + lda $D6A4,y ; PRG:$168C B9 A4 D6 + clc ; PRG:$168F 18 + adc $45 ; PRG:$1690 65 45 + sta $0200,x ; PRG:$1692 9D 00 02 + inx ; PRG:$1695 E8 + iny ; PRG:$1696 C8 + cpy #$08 ; PRG:$1697 C0 08 + bcc Label_D679 ; PRG:$1699 90 DE + rts ; PRG:$169B 60 +; ---- data $D69C-$D6AB (16 bytes) ---- +Label_D69C: + .byte $27,$29,$2B,$2D,$3D,$3F,$2D,$41 ; PRG:$169C + .byte $50,$59,$62,$6B,$78,$81,$8A,$93 ; PRG:$16A4 +Label_D6AC: + lda #$00 ; PRG:$16AC A9 00 + sta $49 ; PRG:$16AE 85 49 + ldy #$10 ; PRG:$16B0 A0 10 +Label_D6B2: + sty $46 ; PRG:$16B2 84 46 + ldx #$00 ; PRG:$16B4 A2 00 + jsr $D193 ; PRG:$16B6 20 93 D1 + ldy #$00 ; PRG:$16B9 A0 00 +Label_D6BB: + lda $0436,x ; PRG:$16BB BD 36 04 + beq Label_D6C9 ; PRG:$16BE F0 09 + inx ; PRG:$16C0 E8 + iny ; PRG:$16C1 C8 + cpy #$09 ; PRG:$16C2 C0 09 + bcc Label_D6BB ; PRG:$16C4 90 F5 + jmp $D720 ; PRG:$16C6 4C 20 D7 +Label_D6C9: + inx ; PRG:$16C9 E8 + iny ; PRG:$16CA C8 + cpy #$0A ; PRG:$16CB C0 0A + bcs Label_D720 ; PRG:$16CD B0 51 + stx $48 ; PRG:$16CF 86 48 + lda $0436,x ; PRG:$16D1 BD 36 04 + beq Label_D6BB ; PRG:$16D4 F0 E5 +Label_D6D6: + stx $47 ; PRG:$16D6 86 47 + txa ; PRG:$16D8 8A + clc ; PRG:$16D9 18 + adc #$0A ; PRG:$16DA 69 0A + tax ; PRG:$16DC AA + lda $0436,x ; PRG:$16DD BD 36 04 + beq Label_D6E7 ; PRG:$16E0 F0 05 + ldx $47 ; PRG:$16E2 A6 47 + jmp $D6BB ; PRG:$16E4 4C BB D6 +Label_D6E7: + ldx $47 ; PRG:$16E7 A6 47 + inx ; PRG:$16E9 E8 + stx $47 ; PRG:$16EA 86 47 + iny ; PRG:$16EC C8 + cpy #$0A ; PRG:$16ED C0 0A + bcs Label_D6F6 ; PRG:$16EF B0 05 + lda $0436,x ; PRG:$16F1 BD 36 04 + bne Label_D6D6 ; PRG:$16F4 D0 E0 +Label_D6F6: + lda $48 ; PRG:$16F6 A5 48 + tax ; PRG:$16F8 AA + clc ; PRG:$16F9 18 + adc #$0A ; PRG:$16FA 69 0A + tay ; PRG:$16FC A8 +Label_D6FD: + lda $0436,x ; PRG:$16FD BD 36 04 + sta $0436,y ; PRG:$1700 99 36 04 + lda #$00 ; PRG:$1703 A9 00 + sta $0436,x ; PRG:$1705 9D 36 04 + inx ; PRG:$1708 E8 + iny ; PRG:$1709 C8 + cpx $47 ; PRG:$170A E4 47 + bcc Label_D6FD ; PRG:$170C 90 EF + ldx #$FF ; PRG:$170E A2 FF + ldy $46 ; PRG:$1710 A4 46 + jsr $D1BB ; PRG:$1712 20 BB D1 + ldy $46 ; PRG:$1715 A4 46 + iny ; PRG:$1717 C8 + jsr $D1BB ; PRG:$1718 20 BB D1 + jsr $C00C ; PRG:$171B 20 0C C0 + inc $49 ; PRG:$171E E6 49 +Label_D720: + ldy $46 ; PRG:$1720 A4 46 + dey ; PRG:$1722 88 + bne Label_D6B2 ; PRG:$1723 D0 8D + lda $49 ; PRG:$1725 A5 49 + beq Label_D72C ; PRG:$1727 F0 03 + jmp $D6AC ; PRG:$1729 4C AC D6 +Label_D72C: + rts ; PRG:$172C 60 +; ---- data $D72D-$D72D (1 bytes) ---- +Label_D72D: + .byte $3A ; PRG:$172D +Label_D72E: + pha ; PRG:$172E 48 + adc $3F ; PRG:$172F 65 3F + sta $3F ; PRG:$1731 85 3F + txa ; PRG:$1733 8A + pha ; PRG:$1734 48 + adc $40 ; PRG:$1735 65 40 + sta $40 ; PRG:$1737 85 40 + tya ; PRG:$1739 98 + pha ; PRG:$173A 48 + adc $41 ; PRG:$173B 65 41 + sta $41 ; PRG:$173D 85 41 + php ; PRG:$173F 08 + lda $0404 ; PRG:$1740 AD 04 04 + eor $0403 ; PRG:$1743 4D 03 04 + sta $0404 ; PRG:$1746 8D 04 04 + sta OAMADDR ; PRG:$1749 8D 03 20 + lda #$02 ; PRG:$174C A9 02 + sta OAMDMA ; PRG:$174E 8D 14 40 + lda PPUSTATUS ; PRG:$1751 AD 02 20 + nop ; PRG:$1754 EA + jsr $F894 ; PRG:$1755 20 94 F8 + jsr $F897 ; PRG:$1758 20 97 F8 + jsr $C027 ; PRG:$175B 20 27 C0 + lda $01 ; PRG:$175E A5 01 + sta PPUCTRL ; PRG:$1760 8D 00 20 + lda $08 ; PRG:$1763 A5 08 + sta PPUSCROLL ; PRG:$1765 8D 05 20 + lda $09 ; PRG:$1768 A5 09 + sta PPUSCROLL ; PRG:$176A 8D 05 20 + lda $07 ; PRG:$176D A5 07 + sta PPUMASK ; PRG:$176F 8D 01 20 + jsr $F891 ; PRG:$1772 20 91 F8 + jsr $C00F ; PRG:$1775 20 0F C0 + lda $0503 ; PRG:$1778 AD 03 05 + beq Label_D78A ; PRG:$177B F0 0D + lda $0303 ; PRG:$177D AD 03 03 + beq Label_D78A ; PRG:$1780 F0 08 + lda #$00 ; PRG:$1782 A9 00 + sta $0503 ; PRG:$1784 8D 03 05 + jmp $D7E3 ; PRG:$1787 4C E3 D7 +Label_D78A: + jsr $D50A ; PRG:$178A 20 0A D5 + inc $0A ; PRG:$178D E6 0A + bne Label_D793 ; PRG:$178F D0 02 + inc $0B ; PRG:$1791 E6 0B +Label_D793: + jsr $DF80 ; PRG:$1793 20 80 DF + plp ; PRG:$1796 28 + pla ; PRG:$1797 68 + tay ; PRG:$1798 A8 + pla ; PRG:$1799 68 + tax ; PRG:$179A AA + pla ; PRG:$179B 68 + rti ; PRG:$179C 40 +; ---- data $D79D-$D7B5 (25 bytes) ---- +Label_D79D: + .byte $A0,$00,$C9,$0A,$90,$05,$E9,$0A ; PRG:$179D + .byte $C8,$D0,$F7,$48,$98,$09,$30,$8D ; PRG:$17A5 + .byte $07,$20,$68,$09,$30,$8D,$07,$20 ; PRG:$17AD + .byte $60 ; PRG:$17B5 +Label_D7B6: + asl a ; PRG:$17B6 0A + asl a ; PRG:$17B7 0A + tax ; PRG:$17B8 AA + lda #$0F ; PRG:$17B9 A9 0F + sta APUSTATUS ; PRG:$17BB 8D 15 40 + lda #$C0 ; PRG:$17BE A9 C0 + sta APUFRAMECOUNTER ; PRG:$17C0 8D 17 40 + ldy #$00 ; PRG:$17C3 A0 00 +Label_D7C5: + lda $D7D7,x ; PRG:$17C5 BD D7 D7 + sta APUNOISECTRL,y ; PRG:$17C8 99 0C 40 + inx ; PRG:$17CB E8 + iny ; PRG:$17CC C8 + cpy #$04 ; PRG:$17CD C0 04 + bcc Label_D7C5 ; PRG:$17CF 90 F4 + lda #$1E ; PRG:$17D1 A9 1E + sta $04FD ; PRG:$17D3 8D FD 04 + rts ; PRG:$17D6 60 +; ---- data $D7D7-$D7E2 (12 bytes) ---- +Label_D7D7: + .byte $41,$80,$01,$01,$C5,$AC,$5D,$0A ; PRG:$17D7 + .byte $C5,$AC,$5E,$0A ; PRG:$17DF +Label_D7E3: + lda #$D7 ; PRG:$17E3 A9 D7 + pha ; PRG:$17E5 48 + lda #$EC ; PRG:$17E6 A9 EC + pha ; PRG:$17E8 48 + pha ; PRG:$17E9 48 + rti ; PRG:$17EA 40 +; ---- data $D7EB-$D7F2 (8 bytes) ---- +Label_D7EB: + .byte $EA,$EA,$A2,$FF,$9A,$4C,$55,$D6 ; PRG:$17EB +; ---- data $D7F3-$DE99 (1703 bytes) ---- +Label_D7F3: + .byte $22,$26,$17,$06,$22,$28,$18,$3F ; PRG:$17F3 + .byte $22,$2F,$12,$32,$22,$1A,$21,$20 ; PRG:$17FB + .byte $2F,$2F,$1C,$2F,$2F,$0C,$2F,$2F ; PRG:$1803 + .byte $2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F ; PRG:$180B + .byte $2F,$0C,$1C,$2F,$2F,$2F,$2F,$2F ; PRG:$1813 + .byte $2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F ; PRG:$181B + .byte $2F,$11,$30,$16,$2F,$16,$11,$10 ; PRG:$1823 + .byte $2F,$28,$00,$00,$2F,$1A,$00,$00 ; PRG:$182B + .byte $2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F ; PRG:$1833 + .byte $2F,$2F,$2F,$2F,$2F,$2F,$2F,$2F ; PRG:$183B + .byte $22,$00,$10,$30,$22,$2A,$1A,$3A ; PRG:$1843 + .byte $22,$26,$16,$36,$22,$21,$21,$20 ; PRG:$184B + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$1853 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$185B + .byte $00,$00,$80,$A0,$A0,$00,$00,$00 ; PRG:$1863 + .byte $D5,$F5,$99,$AA,$AA,$95,$A5,$55 ; PRG:$186B + .byte $5D,$5F,$99,$AA,$AA,$99,$AA,$55 ; PRG:$1873 + .byte $DD,$FF,$99,$AA,$AA,$D5,$F5,$75 ; PRG:$187B + .byte $55,$55,$99,$AA,$AA,$5D,$5F,$57 ; PRG:$1883 + .byte $05,$05,$05,$05,$05,$05,$05,$05 ; PRG:$188B + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$1893 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$189B + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$18A3 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$18AB + .byte $00,$40,$50,$50,$50,$50,$50,$00 ; PRG:$18B3 + .byte $00,$04,$A5,$A5,$25,$05,$05,$00 ; PRG:$18BB + .byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; PRG:$18C3 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$18CB + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$18D3 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$18DB + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$18E3 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$18EB + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$18F3 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$18FB + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$1903 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$190B + .byte $AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA ; PRG:$1913 + .byte $AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA ; PRG:$191B + .byte $AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA ; PRG:$1923 + .byte $AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA ; PRG:$192B + .byte $AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA ; PRG:$1933 + .byte $AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA ; PRG:$193B + .byte $AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA ; PRG:$1943 + .byte $AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA ; PRG:$194B + .byte $00,$00,$00,$FE,$6D,$9A,$9B,$9C ; PRG:$1953 + .byte $9D,$00,$FE,$1B,$9E,$9F,$A0,$A1 ; PRG:$195B + .byte $A2,$00,$FE,$1A,$A3,$A4,$A5,$A6 ; PRG:$1963 + .byte $A7,$00,$FE,$1A,$A8,$A9,$AA,$AB ; PRG:$196B + .byte $AC,$00,$FE,$1A,$AD,$AE,$AF,$B0 ; PRG:$1973 + .byte $B1,$00,$FE,$18,$B2,$B3,$B4,$B5 ; PRG:$197B + .byte $B6,$B7,$B8,$B9,$00,$FE,$17,$BA ; PRG:$1983 + .byte $BB,$BC,$BD,$BE,$BF,$C0,$77,$00 ; PRG:$198B + .byte $FE,$13,$9A,$9B,$9C,$9D,$00,$FE ; PRG:$1993 + .byte $07,$9A,$9B,$9C,$9D,$00,$FE,$0F ; PRG:$199B + .byte $9E,$9F,$A0,$A1,$A2,$00,$FE,$06 ; PRG:$19A3 + .byte $9E,$9F,$A0,$A1,$A2,$00,$FE,$0E ; PRG:$19AB + .byte $A3,$A4,$A5,$A6,$A7,$00,$FE,$06 ; PRG:$19B3 + .byte $A3,$A4,$A5,$A6,$A7,$00,$FE,$0E ; PRG:$19BB + .byte $A8,$A9,$AA,$AB,$AC,$00,$FE,$06 ; PRG:$19C3 + .byte $A8,$A9,$AA,$AB,$AC,$00,$FE,$0E ; PRG:$19CB + .byte $AD,$AE,$AF,$B0,$B1,$00,$FE,$06 ; PRG:$19D3 + .byte $AD,$AE,$AF,$B0,$B1,$00,$FE,$0C ; PRG:$19DB + .byte $B2,$B3,$B4,$B5,$B6,$B7,$B8,$B9 ; PRG:$19E3 + .byte $00,$00,$00,$00,$B2,$B3,$B4,$B5 ; PRG:$19EB + .byte $B6,$B7,$B8,$B9,$00,$FE,$0B,$BA ; PRG:$19F3 + .byte $BB,$BC,$BD,$BE,$BF,$C0,$77,$00 ; PRG:$19FB + .byte $00,$00,$00,$BA,$BB,$BC,$BD,$BE ; PRG:$1A03 + .byte $BF,$C0,$00,$FE,$2C,$E5,$E6,$E7 ; PRG:$1A0B + .byte $F6,$F7,$F8,$ED,$EE,$EF,$C1,$C2 ; PRG:$1A13 + .byte $C3,$DC,$DD,$DE,$D3,$D4,$D5,$CA ; PRG:$1A1B + .byte $CB,$CC,$00,$FE,$0A,$E8,$E9,$EA ; PRG:$1A23 + .byte $F9,$FA,$FB,$F0,$F1,$F2,$C4,$C5 ; PRG:$1A2B + .byte $C6,$DF,$E0,$E1,$D6,$D7,$D8,$CD ; PRG:$1A33 + .byte $CE,$CF,$00,$FE,$0A,$EB,$EC,$00 ; PRG:$1A3B + .byte $00,$FC,$00,$F3,$F4,$F5,$C7,$C8 ; PRG:$1A43 + .byte $C9,$E2,$E3,$E4,$D9,$DA,$DB,$D0 ; PRG:$1A4B + .byte $D1,$D2,$00,$FE,$31,$0C,$05,$16 ; PRG:$1A53 + .byte $05,$0C,$00,$30,$00,$FE,$18,$0D ; PRG:$1A5B + .byte $15,$13,$09,$03,$00,$0F,$0E,$00 ; PRG:$1A63 + .byte $FE,$4D,$3B,$31,$39,$39,$30,$00 ; PRG:$1A6B + .byte $14,$08,$09,$0E,$00,$03,$08,$05 ; PRG:$1A73 + .byte $0E,$00,$05,$0E,$14,$05,$12,$10 ; PRG:$1A7B + .byte $12,$09,$13,$05,$00,$FE,$08,$02 ; PRG:$1A83 + .byte $19,$3A,$00,$0C,$2E,$03,$2E,$00 ; PRG:$1A8B + .byte $14,$03,$08,$01,$03,$16,$0F,$13 ; PRG:$1A93 + .byte $0B,$19,$00,$FE,$46,$FE,$00,$00 ; PRG:$1A9B + .byte $00,$00,$FE,$47,$07,$08,$09,$00 ; PRG:$1AA3 + .byte $0B,$0C,$0D,$0E,$0F,$10,$00,$12 ; PRG:$1AAB + .byte $13,$14,$00,$FE,$10,$24,$25,$26 ; PRG:$1AB3 + .byte $27,$28,$29,$2A,$2B,$2C,$2D,$2E ; PRG:$1ABB + .byte $2F,$40,$44,$4F,$55,$56,$00,$FE ; PRG:$1AC3 + .byte $0D,$41,$42,$43,$44,$45,$46,$47 ; PRG:$1ACB + .byte $48,$49,$4A,$4B,$4C,$4D,$4E,$44 ; PRG:$1AD3 + .byte $50,$51,$52,$53,$54,$00,$FE,$09 ; PRG:$1ADB + .byte $5D,$5E,$5F,$60,$44,$62,$63,$64 ; PRG:$1AE3 + .byte $65,$66,$67,$68,$69,$6A,$6B,$6C ; PRG:$1AEB + .byte $6D,$44,$6F,$70,$5F,$72,$73,$00 ; PRG:$1AF3 + .byte $FE,$07,$7A,$7B,$7C,$7D,$7E,$7F ; PRG:$1AFB + .byte $80,$81,$81,$81,$84,$85,$86,$87 ; PRG:$1B03 + .byte $81,$81,$81,$8B,$44,$44,$8E,$5F ; PRG:$1B0B + .byte $5F,$91,$92,$93,$00,$FE,$04,$97 ; PRG:$1B13 + .byte $98,$5F,$9A,$9B,$44,$44,$9E,$9F ; PRG:$1B1B + .byte $A0,$A1,$A2,$A3,$A4,$A5,$A6,$A7 ; PRG:$1B23 + .byte $A8,$A9,$44,$44,$44,$AA,$5F,$5F ; PRG:$1B2B + .byte $5F,$AB,$AC,$00,$00,$00,$AD,$AE ; PRG:$1B33 + .byte $5F,$5F,$AF,$B0,$B1,$B2,$B3,$B4 ; PRG:$1B3B + .byte $B5,$B6,$B7,$B8,$B9,$BA,$BB,$BC ; PRG:$1B43 + .byte $BD,$BE,$BF,$C0,$C1,$50,$C2,$5F ; PRG:$1B4B + .byte $5F,$5F,$C3,$C4,$93,$7B,$C5,$C6 ; PRG:$1B53 + .byte $C7,$C8,$C9,$CA,$CB,$44,$F4,$F6 ; PRG:$1B5B + .byte $FE,$09,$F5,$44,$D1,$D2,$D3,$D4 ; PRG:$1B63 + .byte $D5,$D6,$D7,$5F,$5F,$AB,$5F,$D8 ; PRG:$1B6B + .byte $D9,$DA,$DB,$DC,$DD,$DE,$44,$F4 ; PRG:$1B73 + .byte $01,$FE,$09,$F5,$44,$DF,$E0,$E1 ; PRG:$1B7B + .byte $E2,$E3,$E4,$E5,$E6,$5F,$5F,$5F ; PRG:$1B83 + .byte $E7,$E8,$44,$E9,$EA,$EB,$EC,$44 ; PRG:$1B8B + .byte $F4,$01,$FE,$09,$F5,$44,$ED,$EE ; PRG:$1B93 + .byte $EF,$F0,$F1,$F2,$44,$F3,$5F,$5F ; PRG:$1B9B + .byte $3C,$3D,$3C,$3D,$3C,$3D,$3C,$3D ; PRG:$1BA3 + .byte $3C,$F4,$01,$FE,$09,$F5,$3C,$3D ; PRG:$1BAB + .byte $3C,$3D,$3C,$3D,$3C,$3D,$3C,$3D ; PRG:$1BB3 + .byte $3C,$3E,$3F,$3E,$3F,$3E,$3F,$3E ; PRG:$1BBB + .byte $3F,$3D,$F4,$01,$FE,$09,$F5,$3E ; PRG:$1BC3 + .byte $3F,$3E,$3F,$3E,$3F,$3E,$3F,$3E ; PRG:$1BCB + .byte $3F,$3E,$3C,$3D,$01,$FE,$05,$3C ; PRG:$1BD3 + .byte $F4,$01,$FE,$09,$F5,$3C,$01,$FE ; PRG:$1BDB + .byte $05,$3D,$3C,$3D,$3C,$3E,$3F,$01 ; PRG:$1BE3 + .byte $02,$03,$04,$02,$01,$3D,$F4,$01 ; PRG:$1BEB + .byte $FE,$09,$F5,$3E,$01,$0A,$11,$58 ; PRG:$1BF3 + .byte $59,$01,$3E,$3F,$3F,$3E,$3C,$3D ; PRG:$1BFB + .byte $01,$FE,$05,$3C,$F4,$01,$FE,$09 ; PRG:$1C03 + .byte $F5,$3C,$01,$FE,$05,$3D,$3C,$3D ; PRG:$1C0B + .byte $3C,$3E,$3F,$01,$FE,$05,$3D,$F4 ; PRG:$1C13 + .byte $01,$FE,$09,$F5,$3E,$01,$FE,$05 ; PRG:$1C1B + .byte $3E,$3F,$3F,$3E,$3C,$3D,$3C,$3D ; PRG:$1C23 + .byte $3C,$3D,$3C,$3D,$3C,$F4,$01,$FE ; PRG:$1C2B + .byte $09,$F5,$3C,$01,$FE,$05,$3D,$3C ; PRG:$1C33 + .byte $3D,$3C,$3E,$3F,$3E,$3F,$3E,$3F ; PRG:$1C3B + .byte $3E,$3C,$3D,$F4,$01,$FE,$09,$F5 ; PRG:$1C43 + .byte $3E,$01,$FE,$05,$3F,$3E,$3F,$3E ; PRG:$1C4B + .byte $3C,$3D,$01,$FE,$05,$3C,$F4,$01 ; PRG:$1C53 + .byte $FE,$09,$F5,$3C,$3D,$3C,$3D,$3C ; PRG:$1C5B + .byte $3D,$3C,$3D,$3C,$3D,$3C,$3E,$3F ; PRG:$1C63 + .byte $01,$05,$06,$0A,$11,$01,$3D,$F4 ; PRG:$1C6B + .byte $01,$FE,$09,$F5,$3E,$3F,$3E,$3F ; PRG:$1C73 + .byte $3E,$3F,$3E,$3F,$3E,$3F,$3E,$3C ; PRG:$1C7B + .byte $3D,$01,$FE,$05,$3C,$F4,$01,$FE ; PRG:$1C83 + .byte $09,$F5,$3C,$01,$FE,$07,$3D,$3C ; PRG:$1C8B + .byte $3E,$3F,$01,$FE,$05,$3D,$F4,$01 ; PRG:$1C93 + .byte $FE,$09,$F5,$3E,$01,$05,$11,$5C ; PRG:$1C9B + .byte $11,$05,$01,$01,$3F,$3E,$3C,$3D ; PRG:$1CA3 + .byte $3C,$3D,$3C,$3D,$3C,$3D,$3C,$F4 ; PRG:$1CAB + .byte $01,$FE,$09,$F5,$3C,$01,$FE,$07 ; PRG:$1CB3 + .byte $3D,$3C,$3E,$3F,$3E,$3F,$3E,$3F ; PRG:$1CBB + .byte $3E,$3C,$3D,$F4,$01,$FE,$09,$F5 ; PRG:$1CC3 + .byte $3E,$01,$FE,$07,$3F,$3E,$3C,$3D ; PRG:$1CCB + .byte $3C,$3D,$3C,$3D,$3C,$3D,$3C,$F4 ; PRG:$1CD3 + .byte $01,$FE,$09,$F5,$3C,$3D,$3C,$3D ; PRG:$1CDB + .byte $3C,$3D,$3C,$3D,$3C,$3D,$3C,$3E ; PRG:$1CE3 + .byte $3F,$3E,$3F,$3E,$3F,$3E,$3D,$3D ; PRG:$1CEB + .byte $F4,$01,$FE,$09,$F5,$3E,$3F,$3E ; PRG:$1CF3 + .byte $3D,$3E,$3D,$3E,$3D,$3E,$3D,$3E ; PRG:$1CFB + .byte $3C,$3D,$3C,$3D,$3C,$3D,$3C,$F4 ; PRG:$1D03 + .byte $3C,$F4,$F6,$FE,$09,$F5,$3C,$3D ; PRG:$1D0B + .byte $3C,$3D,$3C,$3D,$3C,$3D,$3C,$3D ; PRG:$1D13 + .byte $3C,$3E,$3F,$3E,$3F,$3E,$3F,$3E ; PRG:$1D1B + .byte $3F,$3E,$3F,$3E,$3F,$3E,$3F,$3E ; PRG:$1D23 + .byte $3F,$3E,$3F,$3E,$3F,$3E,$3F,$3E ; PRG:$1D2B + .byte $3F,$3E,$3F,$3E,$3F,$3E,$3F,$3E ; PRG:$1D33 + .byte $3F,$FE,$00,$00,$00,$00,$FE,$FF ; PRG:$1D3B + .byte $00,$FE,$B4,$6E,$6F,$00,$FE,$11 ; PRG:$1D43 + .byte $56,$57,$5A,$5B,$5E,$5F,$62,$63 ; PRG:$1D4B + .byte $66,$67,$6A,$6B,$70,$71,$00,$FE ; PRG:$1D53 + .byte $11,$58,$59,$5C,$5D,$60,$61,$64 ; PRG:$1D5B + .byte $65,$68,$69,$6C,$6D,$00,$FE,$FF ; PRG:$1D63 + .byte $00,$FE,$CA,$FE,$00,$00,$00,$00 ; PRG:$1D6B + .byte $FE,$FF,$00,$FE,$FF,$00,$FE,$FF ; PRG:$1D73 + .byte $00,$FE,$BF,$FE,$00,$00,$00,$01 ; PRG:$1D7B + .byte $FE,$8E,$22,$3A,$01,$FE,$1C,$22 ; PRG:$1D83 + .byte $3B,$57,$3A,$01,$FE,$0F,$76,$77 ; PRG:$1D8B + .byte $78,$5B,$04,$06,$79,$01,$01,$01 ; PRG:$1D93 + .byte $01,$22,$3B,$3B,$57,$57,$3A,$01 ; PRG:$1D9B + .byte $01,$01,$05,$11,$5C,$11,$05,$01 ; PRG:$1DA3 + .byte $30,$01,$FE,$0E,$22,$3B,$3B,$3B ; PRG:$1DAB + .byte $57,$57,$57,$3A,$01,$FE,$16,$22 ; PRG:$1DB3 + .byte $3B,$3B,$3B,$3B,$57,$57,$57,$57 ; PRG:$1DBB + .byte $3A,$01,$01,$78,$11,$5B,$79,$77 ; PRG:$1DC3 + .byte $01,$FE,$0D,$22,$3B,$FE,$04,$57 ; PRG:$1DCB + .byte $FE,$04,$3A,$01,$FE,$12,$22,$3B ; PRG:$1DD3 + .byte $FE,$05,$57,$FE,$05,$3A,$01,$FE ; PRG:$1DDB + .byte $10,$22,$3B,$FE,$06,$57,$FE,$06 ; PRG:$1DE3 + .byte $3A,$01,$FE,$0E,$22,$3B,$FE,$07 ; PRG:$1DEB + .byte $57,$FE,$07,$3A,$01,$FE,$0C,$22 ; PRG:$1DF3 + .byte $3B,$FE,$08,$57,$FE,$08,$3A,$01 ; PRG:$1DFB + .byte $FE,$0A,$22,$3B,$FE,$09,$57,$FE ; PRG:$1E03 + .byte $09,$3A,$01,$FE,$08,$22,$3B,$FE ; PRG:$1E0B + .byte $0A,$57,$FE,$0A,$3A,$01,$FE,$07 ; PRG:$1E13 + .byte $23,$3B,$FE,$0A,$57,$FE,$0A,$21 ; PRG:$1E1B + .byte $01,$FE,$08,$23,$3B,$FE,$09,$57 ; PRG:$1E23 + .byte $FE,$09,$21,$01,$FE,$0A,$23,$3B ; PRG:$1E2B + .byte $FE,$08,$57,$FE,$08,$21,$01,$FE ; PRG:$1E33 + .byte $0C,$23,$3B,$FE,$07,$57,$FE,$07 ; PRG:$1E3B + .byte $21,$01,$FE,$0E,$23,$3B,$FE,$06 ; PRG:$1E43 + .byte $57,$FE,$06,$21,$01,$FE,$10,$23 ; PRG:$1E4B + .byte $3B,$FE,$05,$57,$FE,$05,$21,$01 ; PRG:$1E53 + .byte $FE,$12,$23,$3B,$FE,$04,$57,$FE ; PRG:$1E5B + .byte $04,$21,$01,$FE,$14,$23,$3B,$3B ; PRG:$1E63 + .byte $3B,$3B,$57,$57,$57,$57,$21,$01 ; PRG:$1E6B + .byte $FE,$16,$23,$3B,$3B,$3B,$57,$57 ; PRG:$1E73 + .byte $57,$21,$01,$FE,$18,$23,$3B,$3B ; PRG:$1E7B + .byte $57,$57,$21,$01,$FE,$1A,$23,$3B ; PRG:$1E83 + .byte $57,$21,$01,$FE,$1C,$23,$21,$01 ; PRG:$1E8B + .byte $FE,$2E,$00,$FE,$1F,$FE,$00 ; PRG:$1E93 +Label_DE9A: + asl a ; PRG:$1E9A 0A + asl a ; PRG:$1E9B 0A + tax ; PRG:$1E9C AA + lda #$01 ; PRG:$1E9D A9 01 + sta APUSTATUS ; PRG:$1E9F 8D 15 40 + lda #$C0 ; PRG:$1EA2 A9 C0 + sta APUFRAMECOUNTER ; PRG:$1EA4 8D 17 40 + ldy #$00 ; PRG:$1EA7 A0 00 +Label_DEA9: + lda $DEBB,x ; PRG:$1EA9 BD BB DE + sta APUPULSE1CTRL,y ; PRG:$1EAC 99 00 40 + inx ; PRG:$1EAF E8 + iny ; PRG:$1EB0 C8 + cpy #$04 ; PRG:$1EB1 C0 04 + bcc Label_DEA9 ; PRG:$1EB3 90 F4 + lda #$14 ; PRG:$1EB5 A9 14 + sta $0501 ; PRG:$1EB7 8D 01 05 + rts ; PRG:$1EBA 60 +; ---- data $DEBB-$DECA (16 bytes) ---- +Label_DEBB: + .byte $8F,$FA,$FF,$F0,$3F,$8B,$00,$FF ; PRG:$1EBB + .byte $20,$CB,$DE,$A5,$33,$D0,$FC,$60 ; PRG:$1EC3 +Label_DECB: + cmp #$00 ; PRG:$1ECB C9 00 + beq Label_DF0E ; PRG:$1ECD F0 3F + pha ; PRG:$1ECF 48 + sec ; PRG:$1ED0 38 + sbc #$01 ; PRG:$1ED1 E9 01 + asl a ; PRG:$1ED3 0A + tax ; PRG:$1ED4 AA + lda $DF30,x ; PRG:$1ED5 BD 30 DF + sta $27 ; PRG:$1ED8 85 27 + lda $DF31,x ; PRG:$1EDA BD 31 DF + sta $28 ; PRG:$1EDD 85 28 + lda $DF44,x ; PRG:$1EDF BD 44 DF + sta $29 ; PRG:$1EE2 85 29 + lda $DF45,x ; PRG:$1EE4 BD 45 DF + sta $2A ; PRG:$1EE7 85 2A + lda $DF58,x ; PRG:$1EE9 BD 58 DF + sta $2B ; PRG:$1EEC 85 2B + lda $DF59,x ; PRG:$1EEE BD 59 DF + sta $2C ; PRG:$1EF1 85 2C + lda $DF6C,x ; PRG:$1EF3 BD 6C DF + sta $2D ; PRG:$1EF6 85 2D + lda $DF6D,x ; PRG:$1EF8 BD 6D DF + sta $2E ; PRG:$1EFB 85 2E + ldx #$03 ; PRG:$1EFD A2 03 +Label_DEFF: + lda #$00 ; PRG:$1EFF A9 00 + sta $23,x ; PRG:$1F01 95 23 + lda #$01 ; PRG:$1F03 A9 01 + sta $2F,x ; PRG:$1F05 95 2F + dex ; PRG:$1F07 CA + bpl Label_DEFF ; PRG:$1F08 10 F5 + pla ; PRG:$1F0A 68 + sta $33 ; PRG:$1F0B 85 33 + rts ; PRG:$1F0D 60 +Label_DF0E: + lda #$00 ; PRG:$1F0E A9 00 + sta $33 ; PRG:$1F10 85 33 + ldx #$03 ; PRG:$1F12 A2 03 +Label_DF14: + sta $23,x ; PRG:$1F14 95 23 + sta $2F,x ; PRG:$1F16 95 2F + dex ; PRG:$1F18 CA + bpl Label_DF14 ; PRG:$1F19 10 F9 + lda #$C0 ; PRG:$1F1B A9 C0 + sta APUFRAMECOUNTER ; PRG:$1F1D 8D 17 40 + lda #$00 ; PRG:$1F20 A9 00 + sta APUSTATUS ; PRG:$1F22 8D 15 40 + lda #$00 ; PRG:$1F25 A9 00 + ldx #$0F ; PRG:$1F27 A2 0F +Label_DF29: + sta APUPULSE1CTRL,x ; PRG:$1F29 9D 00 40 + dex ; PRG:$1F2C CA + bpl Label_DF29 ; PRG:$1F2D 10 FA + rts ; PRG:$1F2F 60 +; ---- data $DF30-$DF3D (14 bytes) ---- +Label_DF30: + .byte $19,$E3,$A2,$E5,$20,$E9,$22,$E9 ; PRG:$1F30 + .byte $8C,$EC,$8E,$EC,$90,$EC ; PRG:$1F38 +; ---- data $DF3E-$DF7F (66 bytes) ---- +Label_DF3E: + .byte $C3,$EC,$6A,$ED,$6C,$ED,$73,$E4 ; PRG:$1F3E + .byte $37,$E6,$22,$E9,$B8,$E9,$8E,$EC ; PRG:$1F46 + .byte $90,$EC,$C0,$EC,$05,$ED,$6C,$ED ; PRG:$1F4E + .byte $6E,$ED,$A0,$E4,$CC,$E6,$22,$E9 ; PRG:$1F56 + .byte $3C,$EA,$8E,$EC,$90,$EC,$C1,$EC ; PRG:$1F5E + .byte $43,$ED,$6C,$ED,$6E,$ED,$6E,$E5 ; PRG:$1F66 + .byte $0B,$E9,$22,$E9,$8E,$EB,$8E,$EC ; PRG:$1F6E + .byte $90,$EC,$C2,$EC,$69,$ED,$6C,$ED ; PRG:$1F76 + .byte $6E,$ED ; PRG:$1F7E +Label_DF80: + lda $33 ; PRG:$1F80 A5 33 + bne Label_DF8E ; PRG:$1F82 D0 0A + lda #$00 ; PRG:$1F84 A9 00 + sta $33 ; PRG:$1F86 85 33 + rts ; PRG:$1F88 60 +; ---- data $DF89-$DF8D (5 bytes) ---- +Label_DF89: + .byte $A5,$33,$4C,$CB,$DE ; PRG:$1F89 +Label_DF8E: + lda $2F ; PRG:$1F8E A5 2F + beq Label_DF9A ; PRG:$1F90 F0 08 + lda $23 ; PRG:$1F92 A5 23 + beq Label_DFA1 ; PRG:$1F94 F0 0B + dec $23 ; PRG:$1F96 C6 23 + beq Label_DFA1 ; PRG:$1F98 F0 07 +Label_DF9A: + lda #$00 ; PRG:$1F9A A9 00 + sta $1F ; PRG:$1F9C 85 1F + jmp $E04B ; PRG:$1F9E 4C 4B E0 +Label_DFA1: + ldy #$00 ; PRG:$1FA1 A0 00 + lda ($27),y ; PRG:$1FA3 B1 27 + cmp #$FF ; PRG:$1FA5 C9 FF + bne Label_DFAC ; PRG:$1FA7 D0 03 + jmp $DF0E ; PRG:$1FA9 4C 0E DF +Label_DFAC: + cmp #$FE ; PRG:$1FAC C9 FE + bne Label_DFB5 ; PRG:$1FAE D0 05 + lda $33 ; PRG:$1FB0 A5 33 + jmp $DECB ; PRG:$1FB2 4C CB DE +Label_DFB5: + cmp #$FD ; PRG:$1FB5 C9 FD + bne Label_DFBF ; PRG:$1FB7 D0 06 + lda #$00 ; PRG:$1FB9 A9 00 + sta $2F ; PRG:$1FBB 85 2F + beq Label_DF9A ; PRG:$1FBD F0 DB +Label_DFBF: + cmp #$FC ; PRG:$1FBF C9 FC + bne Label_DFF4 ; PRG:$1FC1 D0 31 + lda $45 ; PRG:$1FC3 A5 45 + pha ; PRG:$1FC5 48 + lda $46 ; PRG:$1FC6 A5 46 + pha ; PRG:$1FC8 48 + lda $47 ; PRG:$1FC9 A5 47 + pha ; PRG:$1FCB 48 + jsr $E25A ; PRG:$1FCC 20 5A E2 + lda ($27),y ; PRG:$1FCF B1 27 + sta $34 ; PRG:$1FD1 85 34 + ldy #$00 ; PRG:$1FD3 A0 00 +Label_DFD5: + lda $E2E8,y ; PRG:$1FD5 B9 E8 E2 + ldx $34 ; PRG:$1FD8 A6 34 + jsr $C048 ; PRG:$1FDA 20 48 C0 + sta $0034,y ; PRG:$1FDD 99 34 00 + iny ; PRG:$1FE0 C8 + cpy #$09 ; PRG:$1FE1 C0 09 + bcc Label_DFD5 ; PRG:$1FE3 90 F0 + jsr $E25A ; PRG:$1FE5 20 5A E2 + pla ; PRG:$1FE8 68 + sta $47 ; PRG:$1FE9 85 47 + pla ; PRG:$1FEB 68 + sta $46 ; PRG:$1FEC 85 46 + pla ; PRG:$1FEE 68 + sta $45 ; PRG:$1FEF 85 45 + jmp $DFA1 ; PRG:$1FF1 4C A1 DF +Label_DFF4: + cmp #$E0 ; PRG:$1FF4 C9 E0 + bcc Label_E00C ; PRG:$1FF6 90 14 + and #$0F ; PRG:$1FF8 29 0F + pha ; PRG:$1FFA 48 + lda $0F ; PRG:$1FFB A5 0F + and #$F0 ; PRG:$1FFD 29 F0 + sta $0F ; PRG:$1FFF 85 0F + pla ; PRG:$2001 68 + ora $0F ; PRG:$2002 05 0F + sta $0F ; PRG:$2004 85 0F + jsr $E25A ; PRG:$2006 20 5A E2 + jmp $DFA1 ; PRG:$2009 4C A1 DF +Label_E00C: + cmp #$80 ; PRG:$200C C9 80 + bcc Label_E029 ; PRG:$200E 90 19 + sbc #$80 ; PRG:$2010 E9 80 + asl a ; PRG:$2012 0A + asl a ; PRG:$2013 0A + tax ; PRG:$2014 AA + ldy #$00 ; PRG:$2015 A0 00 +Label_E017: + lda $E2F1,x ; PRG:$2017 BD F1 E2 + sta $000F,y ; PRG:$201A 99 0F 00 + inx ; PRG:$201D E8 + iny ; PRG:$201E C8 + cpy #$04 ; PRG:$201F C0 04 + bcc Label_E017 ; PRG:$2021 90 F4 + jsr $E25A ; PRG:$2023 20 5A E2 + jmp $DFA1 ; PRG:$2026 4C A1 DF +Label_E029: + tax ; PRG:$2029 AA + lda $E276,x ; PRG:$202A BD 76 E2 + sta $11 ; PRG:$202D 85 11 + lda $12 ; PRG:$202F A5 12 + and #$F8 ; PRG:$2031 29 F8 + ora $E2A7,x ; PRG:$2033 1D A7 E2 + sta $12 ; PRG:$2036 85 12 + jsr $E25A ; PRG:$2038 20 5A E2 + ldy #$00 ; PRG:$203B A0 00 + lda ($27),y ; PRG:$203D B1 27 + tax ; PRG:$203F AA + lda $34,x ; PRG:$2040 B5 34 + sta $23 ; PRG:$2042 85 23 + jsr $E25A ; PRG:$2044 20 5A E2 + lda #$01 ; PRG:$2047 A9 01 + sta $1F ; PRG:$2049 85 1F +Label_E04B: + lda $30 ; PRG:$204B A5 30 + beq Label_E057 ; PRG:$204D F0 08 + lda $24 ; PRG:$204F A5 24 + beq Label_E05E ; PRG:$2051 F0 0B + dec $24 ; PRG:$2053 C6 24 + beq Label_E05E ; PRG:$2055 F0 07 +Label_E057: + lda #$00 ; PRG:$2057 A9 00 + sta $20 ; PRG:$2059 85 20 + jmp $E0F0 ; PRG:$205B 4C F0 E0 +Label_E05E: + ldy #$00 ; PRG:$205E A0 00 + lda ($29),y ; PRG:$2060 B1 29 + cmp #$FF ; PRG:$2062 C9 FF + bne Label_E069 ; PRG:$2064 D0 03 + jmp $DF0E ; PRG:$2066 4C 0E DF +Label_E069: + cmp #$FE ; PRG:$2069 C9 FE + bne Label_E072 ; PRG:$206B D0 05 + lda $33 ; PRG:$206D A5 33 + jmp $DECB ; PRG:$206F 4C CB DE +Label_E072: + cmp #$FD ; PRG:$2072 C9 FD + bne Label_E07C ; PRG:$2074 D0 06 + lda #$00 ; PRG:$2076 A9 00 + sta $30 ; PRG:$2078 85 30 + beq Label_E057 ; PRG:$207A F0 DB +Label_E07C: + cmp #$FB ; PRG:$207C C9 FB + bne Label_E099 ; PRG:$207E D0 19 + jsr $E261 ; PRG:$2080 20 61 E2 + ldy #$00 ; PRG:$2083 A0 00 + lda ($29),y ; PRG:$2085 B1 29 + sta $13 ; PRG:$2087 85 13 + lda $29 ; PRG:$2089 A5 29 + sec ; PRG:$208B 38 + sbc $13 ; PRG:$208C E5 13 + sta $29 ; PRG:$208E 85 29 + lda $2A ; PRG:$2090 A5 2A + sbc #$00 ; PRG:$2092 E9 00 + sta $2A ; PRG:$2094 85 2A + jmp $E05E ; PRG:$2096 4C 5E E0 +Label_E099: + cmp #$E0 ; PRG:$2099 C9 E0 + bcc Label_E0B1 ; PRG:$209B 90 14 + and #$0F ; PRG:$209D 29 0F + pha ; PRG:$209F 48 + lda $13 ; PRG:$20A0 A5 13 + and #$F0 ; PRG:$20A2 29 F0 + sta $13 ; PRG:$20A4 85 13 + pla ; PRG:$20A6 68 + ora $13 ; PRG:$20A7 05 13 + sta $13 ; PRG:$20A9 85 13 + jsr $E261 ; PRG:$20AB 20 61 E2 + jmp $E05E ; PRG:$20AE 4C 5E E0 +Label_E0B1: + cmp #$80 ; PRG:$20B1 C9 80 + bcc Label_E0CE ; PRG:$20B3 90 19 + sbc #$80 ; PRG:$20B5 E9 80 + asl a ; PRG:$20B7 0A + asl a ; PRG:$20B8 0A + tax ; PRG:$20B9 AA + ldy #$00 ; PRG:$20BA A0 00 +Label_E0BC: + lda $E2F1,x ; PRG:$20BC BD F1 E2 + sta $0013,y ; PRG:$20BF 99 13 00 + inx ; PRG:$20C2 E8 + iny ; PRG:$20C3 C8 + cpy #$04 ; PRG:$20C4 C0 04 + bcc Label_E0BC ; PRG:$20C6 90 F4 + jsr $E261 ; PRG:$20C8 20 61 E2 + jmp $E05E ; PRG:$20CB 4C 5E E0 +Label_E0CE: + tax ; PRG:$20CE AA + lda $E276,x ; PRG:$20CF BD 76 E2 + sta $15 ; PRG:$20D2 85 15 + lda $16 ; PRG:$20D4 A5 16 + and #$F8 ; PRG:$20D6 29 F8 + ora $E2A7,x ; PRG:$20D8 1D A7 E2 + sta $16 ; PRG:$20DB 85 16 + jsr $E261 ; PRG:$20DD 20 61 E2 + ldy #$00 ; PRG:$20E0 A0 00 + lda ($29),y ; PRG:$20E2 B1 29 + tax ; PRG:$20E4 AA + lda $34,x ; PRG:$20E5 B5 34 + sta $24 ; PRG:$20E7 85 24 + jsr $E261 ; PRG:$20E9 20 61 E2 + lda #$01 ; PRG:$20EC A9 01 + sta $20 ; PRG:$20EE 85 20 +Label_E0F0: + lda $31 ; PRG:$20F0 A5 31 + beq Label_E0FC ; PRG:$20F2 F0 08 + lda $25 ; PRG:$20F4 A5 25 + beq Label_E103 ; PRG:$20F6 F0 0B + dec $25 ; PRG:$20F8 C6 25 + beq Label_E103 ; PRG:$20FA F0 07 +Label_E0FC: + lda #$00 ; PRG:$20FC A9 00 + sta $21 ; PRG:$20FE 85 21 + jmp $E195 ; PRG:$2100 4C 95 E1 +Label_E103: + ldy #$00 ; PRG:$2103 A0 00 + lda ($2B),y ; PRG:$2105 B1 2B + cmp #$FF ; PRG:$2107 C9 FF + bne Label_E10E ; PRG:$2109 D0 03 + jmp $DF0E ; PRG:$210B 4C 0E DF +Label_E10E: + cmp #$FE ; PRG:$210E C9 FE + bne Label_E117 ; PRG:$2110 D0 05 + lda $33 ; PRG:$2112 A5 33 + jmp $DECB ; PRG:$2114 4C CB DE +Label_E117: + cmp #$FD ; PRG:$2117 C9 FD + bne Label_E121 ; PRG:$2119 D0 06 + lda #$00 ; PRG:$211B A9 00 + sta $31 ; PRG:$211D 85 31 + beq Label_E0FC ; PRG:$211F F0 DB +Label_E121: + cmp #$FB ; PRG:$2121 C9 FB + bne Label_E13E ; PRG:$2123 D0 19 + jsr $E268 ; PRG:$2125 20 68 E2 + ldy #$00 ; PRG:$2128 A0 00 + lda ($2B),y ; PRG:$212A B1 2B + sta $17 ; PRG:$212C 85 17 + lda $2B ; PRG:$212E A5 2B + sec ; PRG:$2130 38 + sbc $17 ; PRG:$2131 E5 17 + sta $2B ; PRG:$2133 85 2B + lda $2C ; PRG:$2135 A5 2C + sbc #$00 ; PRG:$2137 E9 00 + sta $2C ; PRG:$2139 85 2C + jmp $E103 ; PRG:$213B 4C 03 E1 +Label_E13E: + cmp #$E0 ; PRG:$213E C9 E0 + bcc Label_E156 ; PRG:$2140 90 14 + and #$0F ; PRG:$2142 29 0F + pha ; PRG:$2144 48 + lda $17 ; PRG:$2145 A5 17 + and #$F0 ; PRG:$2147 29 F0 + sta $17 ; PRG:$2149 85 17 + pla ; PRG:$214B 68 + ora $17 ; PRG:$214C 05 17 + sta $17 ; PRG:$214E 85 17 + jsr $E268 ; PRG:$2150 20 68 E2 + jmp $E103 ; PRG:$2153 4C 03 E1 +Label_E156: + cmp #$80 ; PRG:$2156 C9 80 + bcc Label_E173 ; PRG:$2158 90 19 + sbc #$80 ; PRG:$215A E9 80 + asl a ; PRG:$215C 0A + asl a ; PRG:$215D 0A + tax ; PRG:$215E AA + ldy #$00 ; PRG:$215F A0 00 +Label_E161: + lda $E2F1,x ; PRG:$2161 BD F1 E2 + sta $0017,y ; PRG:$2164 99 17 00 + inx ; PRG:$2167 E8 + iny ; PRG:$2168 C8 + cpy #$04 ; PRG:$2169 C0 04 + bcc Label_E161 ; PRG:$216B 90 F4 + jsr $E268 ; PRG:$216D 20 68 E2 + jmp $E103 ; PRG:$2170 4C 03 E1 +Label_E173: + tax ; PRG:$2173 AA + lda $E276,x ; PRG:$2174 BD 76 E2 + sta $19 ; PRG:$2177 85 19 + lda $1A ; PRG:$2179 A5 1A + and #$F8 ; PRG:$217B 29 F8 + ora $E2A7,x ; PRG:$217D 1D A7 E2 + sta $1A ; PRG:$2180 85 1A + jsr $E268 ; PRG:$2182 20 68 E2 + ldy #$00 ; PRG:$2185 A0 00 + lda ($2B),y ; PRG:$2187 B1 2B + tax ; PRG:$2189 AA + lda $34,x ; PRG:$218A B5 34 + sta $25 ; PRG:$218C 85 25 + jsr $E268 ; PRG:$218E 20 68 E2 + lda #$01 ; PRG:$2191 A9 01 + sta $21 ; PRG:$2193 85 21 +Label_E195: + lda $32 ; PRG:$2195 A5 32 + beq Label_E1A1 ; PRG:$2197 F0 08 + lda $26 ; PRG:$2199 A5 26 + beq Label_E1A8 ; PRG:$219B F0 0B + dec $26 ; PRG:$219D C6 26 + beq Label_E1A8 ; PRG:$219F F0 07 +Label_E1A1: + lda #$00 ; PRG:$21A1 A9 00 + sta $22 ; PRG:$21A3 85 22 + jmp $E1FB ; PRG:$21A5 4C FB E1 +Label_E1A8: + ldy #$00 ; PRG:$21A8 A0 00 + lda ($2D),y ; PRG:$21AA B1 2D + cmp #$FD ; PRG:$21AC C9 FD + bne Label_E1B7 ; PRG:$21AE D0 07 + lda #$00 ; PRG:$21B0 A9 00 + sta $32 ; PRG:$21B2 85 32 + jmp $E1A1 ; PRG:$21B4 4C A1 E1 +Label_E1B7: + cmp #$FB ; PRG:$21B7 C9 FB + bne Label_E1D4 ; PRG:$21B9 D0 19 + jsr $E26F ; PRG:$21BB 20 6F E2 + ldy #$00 ; PRG:$21BE A0 00 + lda ($2D),y ; PRG:$21C0 B1 2D + sta $1B ; PRG:$21C2 85 1B + lda $2D ; PRG:$21C4 A5 2D + sec ; PRG:$21C6 38 + sbc $1B ; PRG:$21C7 E5 1B + sta $2D ; PRG:$21C9 85 2D + lda $2E ; PRG:$21CB A5 2E + sbc #$00 ; PRG:$21CD E9 00 + sta $2E ; PRG:$21CF 85 2E + jmp $E1A8 ; PRG:$21D1 4C A8 E1 +Label_E1D4: + asl a ; PRG:$21D4 0A + asl a ; PRG:$21D5 0A + tax ; PRG:$21D6 AA + jsr $E26F ; PRG:$21D7 20 6F E2 + ldy #$00 ; PRG:$21DA A0 00 + lda ($2D),y ; PRG:$21DC B1 2D + tay ; PRG:$21DE A8 + lda $0034,y ; PRG:$21DF B9 34 00 + sta $26 ; PRG:$21E2 85 26 + jsr $E26F ; PRG:$21E4 20 6F E2 + ldy #$00 ; PRG:$21E7 A0 00 +Label_E1E9: + lda $E2D8,x ; PRG:$21E9 BD D8 E2 + and #$FC ; PRG:$21EC 29 FC + sta $001B,y ; PRG:$21EE 99 1B 00 + inx ; PRG:$21F1 E8 + iny ; PRG:$21F2 C8 + cpy #$04 ; PRG:$21F3 C0 04 + bcc Label_E1E9 ; PRG:$21F5 90 F2 + lda #$01 ; PRG:$21F7 A9 01 + sta $22 ; PRG:$21F9 85 22 +Label_E1FB: + lda #$0F ; PRG:$21FB A9 0F + sta APUSTATUS ; PRG:$21FD 8D 15 40 + lda #$FF ; PRG:$2200 A9 FF + sta APUFRAMECOUNTER ; PRG:$2202 8D 17 40 + lda $1F ; PRG:$2205 A5 1F + beq Label_E215 ; PRG:$2207 F0 0C + ldx #$00 ; PRG:$2209 A2 00 +Label_E20B: + lda $0F,x ; PRG:$220B B5 0F + sta APUPULSE1CTRL,x ; PRG:$220D 9D 00 40 + inx ; PRG:$2210 E8 + cpx #$04 ; PRG:$2211 E0 04 + bcc Label_E20B ; PRG:$2213 90 F6 +Label_E215: + lda $0501 ; PRG:$2215 AD 01 05 + beq Label_E220 ; PRG:$2218 F0 06 + dec $0501 ; PRG:$221A CE 01 05 + jmp $E230 ; PRG:$221D 4C 30 E2 +Label_E220: + lda $20 ; PRG:$2220 A5 20 + beq Label_E230 ; PRG:$2222 F0 0C + ldx #$00 ; PRG:$2224 A2 00 +Label_E226: + lda $13,x ; PRG:$2226 B5 13 + sta APUPULSE2CTRL,x ; PRG:$2228 9D 04 40 + inx ; PRG:$222B E8 + cpx #$04 ; PRG:$222C E0 04 + bcc Label_E226 ; PRG:$222E 90 F6 +Label_E230: + lda $21 ; PRG:$2230 A5 21 + beq Label_E240 ; PRG:$2232 F0 0C + ldx #$00 ; PRG:$2234 A2 00 +Label_E236: + lda $17,x ; PRG:$2236 B5 17 + sta APUTRIANGLECTRL,x ; PRG:$2238 9D 08 40 + inx ; PRG:$223B E8 + cpx #$04 ; PRG:$223C E0 04 + bcc Label_E236 ; PRG:$223E 90 F6 +Label_E240: + lda $04FD ; PRG:$2240 AD FD 04 + beq Label_E249 ; PRG:$2243 F0 04 + dec $04FD ; PRG:$2245 CE FD 04 + rts ; PRG:$2248 60 +Label_E249: + lda $22 ; PRG:$2249 A5 22 + beq Label_E259 ; PRG:$224B F0 0C + ldx #$00 ; PRG:$224D A2 00 +Label_E24F: + lda $1B,x ; PRG:$224F B5 1B + sta APUNOISECTRL,x ; PRG:$2251 9D 0C 40 + inx ; PRG:$2254 E8 + cpx #$04 ; PRG:$2255 E0 04 + bcc Label_E24F ; PRG:$2257 90 F6 +Label_E259: + rts ; PRG:$2259 60 +Label_E25A: + inc $27 ; PRG:$225A E6 27 + bne Label_E260 ; PRG:$225C D0 02 + inc $28 ; PRG:$225E E6 28 +Label_E260: + rts ; PRG:$2260 60 +Label_E261: + inc $29 ; PRG:$2261 E6 29 + bne Label_E267 ; PRG:$2263 D0 02 + inc $2A ; PRG:$2265 E6 2A +Label_E267: + rts ; PRG:$2267 60 +Label_E268: + inc $2B ; PRG:$2268 E6 2B + bne Label_E26E ; PRG:$226A D0 02 + inc $2C ; PRG:$226C E6 2C +Label_E26E: + rts ; PRG:$226E 60 +Label_E26F: + inc $2D ; PRG:$226F E6 2D + bne Label_E275 ; PRG:$2271 D0 02 + inc $2E ; PRG:$2273 E6 2E +Label_E275: + rts ; PRG:$2275 60 +; ---- data $E276-$ED6D (2808 bytes) ---- +Label_E276: + .byte $58,$FA,$A8,$80,$3C,$FC,$C4,$AC ; PRG:$2276 + .byte $7D,$54,$40,$1E,$FE,$E2,$D6,$BE ; PRG:$227E + .byte $AA,$A0,$8F,$7F,$70,$6B,$5F,$55 ; PRG:$2286 + .byte $50,$47,$3F,$38,$28,$D0,$5C,$1C ; PRG:$228E + .byte $E0,$94,$68,$2E,$0E,$F0,$CA,$B4 ; PRG:$2296 + .byte $97,$87,$78,$65,$5A,$4B,$43,$3C ; PRG:$229E + .byte $00,$03,$02,$02,$02,$02,$01,$01 ; PRG:$22A6 + .byte $01,$01,$01,$01,$01,$00,$00,$00 ; PRG:$22AE + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$22B6 + .byte $00,$00,$00,$00,$00,$03,$02,$02 ; PRG:$22BE + .byte $02,$01,$01,$01,$01,$01,$00,$00 ; PRG:$22C6 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$22CE + .byte $00,$00,$41,$80,$01,$01,$81,$FC ; PRG:$22D6 + .byte $ED,$D6,$00,$00,$00,$00,$03,$20 ; PRG:$22DE + .byte $A9,$02,$01,$02,$04,$06,$08,$0A ; PRG:$22E6 + .byte $0C,$0E,$10,$50,$D0,$00,$D0,$80 ; PRG:$22EE + .byte $D0,$00,$D0,$50,$00,$00,$D0,$B0 ; PRG:$22F6 + .byte $D0,$00,$D0,$40,$D0,$00,$D0,$7F ; PRG:$22FE + .byte $F0,$00,$D0,$70,$D0,$00,$D0,$81 ; PRG:$2306 + .byte $D0,$00,$D0,$F0,$D0,$00,$D0,$C0 ; PRG:$230E + .byte $00,$00,$D0,$83,$E4,$FC,$06,$10 ; PRG:$2316 + .byte $01,$28,$01,$12,$02,$28,$02,$10 ; PRG:$231E + .byte $02,$10,$01,$28,$01,$12,$01,$14 ; PRG:$2326 + .byte $01,$28,$01,$12,$01,$10,$02,$12 ; PRG:$232E + .byte $01,$13,$01,$14,$02,$13,$02,$12 ; PRG:$2336 + .byte $02,$28,$02,$10,$04,$27,$04,$86 ; PRG:$233E + .byte $ED,$09,$01,$23,$01,$0B,$01,$0C ; PRG:$2346 + .byte $01,$0D,$02,$10,$02,$0E,$03,$0D ; PRG:$234E + .byte $00,$0C,$00,$0D,$04,$0C,$03,$0B ; PRG:$2356 + .byte $00,$09,$00,$0B,$02,$09,$02,$0B ; PRG:$235E + .byte $03,$23,$00,$09,$00,$23,$04,$09 ; PRG:$2366 + .byte $01,$23,$01,$0B,$01,$0C,$01,$0D ; PRG:$236E + .byte $02,$10,$02,$0E,$03,$0D,$00,$0C ; PRG:$2376 + .byte $00,$0D,$04,$0C,$03,$0D,$00,$0C ; PRG:$237E + .byte $00,$0B,$02,$23,$02,$09,$03,$22 ; PRG:$2386 + .byte $01,$09,$04,$09,$01,$23,$01,$0B ; PRG:$238E + .byte $01,$0C,$01,$0D,$02,$10,$02,$0E ; PRG:$2396 + .byte $03,$0D,$00,$0C,$00,$0D,$04,$0C ; PRG:$239E + .byte $03,$0B,$00,$09,$00,$0B,$02,$09 ; PRG:$23A6 + .byte $02,$0B,$03,$23,$00,$09,$00,$23 ; PRG:$23AE + .byte $04,$09,$01,$23,$01,$0B,$01,$0C ; PRG:$23B6 + .byte $01,$0D,$02,$10,$02,$0E,$03,$0D ; PRG:$23BE + .byte $00,$0C,$00,$0D,$04,$0C,$03,$0D ; PRG:$23C6 + .byte $00,$0C,$00,$0B,$02,$23,$02,$09 ; PRG:$23CE + .byte $03,$22,$01,$09,$04,$09,$01,$23 ; PRG:$23D6 + .byte $01,$0B,$01,$0C,$01,$0D,$02,$10 ; PRG:$23DE + .byte $02,$0E,$03,$0D,$00,$0C,$00,$0D ; PRG:$23E6 + .byte $04,$0C,$03,$0B,$00,$09,$00,$0B ; PRG:$23EE + .byte $02,$09,$02,$0B,$03,$23,$00,$09 ; PRG:$23F6 + .byte $00,$23,$04,$09,$01,$23,$01,$0B ; PRG:$23FE + .byte $01,$0C,$01,$0D,$02,$10,$02,$0E ; PRG:$2406 + .byte $03,$0D,$00,$0C,$00,$0D,$04,$0C ; PRG:$240E + .byte $03,$0D,$00,$0C,$00,$0B,$02,$23 ; PRG:$2416 + .byte $02,$09,$03,$22,$01,$09,$04,$81 ; PRG:$241E + .byte $EF,$09,$01,$23,$01,$0B,$01,$0C ; PRG:$2426 + .byte $01,$0D,$02,$10,$02,$0E,$03,$0D ; PRG:$242E + .byte $00,$0C,$00,$0D,$04,$0C,$03,$0B ; PRG:$2436 + .byte $00,$09,$00,$0B,$02,$09,$02,$0B ; PRG:$243E + .byte $03,$23,$00,$09,$00,$23,$04,$09 ; PRG:$2446 + .byte $01,$23,$01,$0B,$01,$0C,$01,$0D ; PRG:$244E + .byte $02,$10,$02,$0E,$03,$0D,$00,$0C ; PRG:$2456 + .byte $00,$0D,$04,$0C,$03,$0D,$00,$0C ; PRG:$245E + .byte $00,$0B,$02,$23,$02,$09,$03,$22 ; PRG:$2466 + .byte $01,$09,$04,$FE,$FF,$83,$E4,$10 ; PRG:$246E + .byte $01,$28,$01,$12,$02,$28,$02,$10 ; PRG:$2476 + .byte $02,$10,$01,$28,$01,$12,$01,$14 ; PRG:$247E + .byte $01,$28,$01,$12,$01,$10,$02,$12 ; PRG:$2486 + .byte $01,$13,$01,$14,$02,$13,$02,$12 ; PRG:$248E + .byte $02,$28,$02,$10,$04,$27,$02,$FB ; PRG:$2496 + .byte $2B,$FD,$81,$E8,$30,$02,$30,$08 ; PRG:$249E + .byte $30,$08,$30,$08,$30,$08,$30,$08 ; PRG:$24A6 + .byte $30,$08,$30,$08,$30,$08,$30,$08 ; PRG:$24AE + .byte $30,$08,$30,$08,$30,$08,$09,$01 ; PRG:$24B6 + .byte $14,$00,$14,$00,$09,$01,$14,$00 ; PRG:$24BE + .byte $14,$00,$09,$01,$14,$00,$14,$00 ; PRG:$24C6 + .byte $09,$01,$14,$01,$07,$01,$0E,$00 ; PRG:$24CE + .byte $0E,$00,$07,$01,$0E,$00,$0E,$00 ; PRG:$24D6 + .byte $09,$01,$14,$00,$14,$00,$09,$01 ; PRG:$24DE + .byte $14,$01,$05,$01,$0E,$00,$0E,$00 ; PRG:$24E6 + .byte $05,$01,$0E,$00,$0E,$00,$05,$01 ; PRG:$24EE + .byte $0E,$00,$0E,$00,$05,$01,$0E,$01 ; PRG:$24F6 + .byte $07,$01,$0E,$00,$0E,$00,$07,$01 ; PRG:$24FE + .byte $0E,$00,$0E,$00,$03,$01,$0E,$00 ; PRG:$2506 + .byte $0E,$00,$03,$01,$0E,$01,$09,$01 ; PRG:$250E + .byte $14,$00,$14,$00,$09,$01,$14,$00 ; PRG:$2516 + .byte $14,$00,$09,$01,$14,$00,$14,$00 ; PRG:$251E + .byte $09,$01,$14,$01,$07,$01,$0E,$00 ; PRG:$2526 + .byte $0E,$00,$07,$01,$0E,$00,$0E,$00 ; PRG:$252E + .byte $09,$01,$14,$00,$14,$00,$09,$01 ; PRG:$2536 + .byte $14,$01,$05,$01,$0E,$00,$0E,$00 ; PRG:$253E + .byte $05,$01,$0E,$00,$0E,$00,$07,$01 ; PRG:$2546 + .byte $0E,$00,$0E,$00,$07,$01,$0E,$01 ; PRG:$254E + .byte $09,$01,$14,$00,$14,$00,$09,$01 ; PRG:$2556 + .byte $14,$00,$14,$00,$09,$01,$14,$00 ; PRG:$255E + .byte $14,$00,$09,$01,$14,$01,$FB,$B1 ; PRG:$2566 + .byte $02,$02,$02,$08,$02,$08,$02,$08 ; PRG:$256E + .byte $02,$08,$02,$08,$02,$08,$02,$08 ; PRG:$2576 + .byte $02,$08,$02,$08,$02,$08,$02,$08 ; PRG:$257E + .byte $02,$08,$02,$08,$02,$08,$02,$08 ; PRG:$2586 + .byte $02,$08,$02,$08,$02,$08,$02,$08 ; PRG:$258E + .byte $02,$08,$00,$02,$01,$02,$00,$02 ; PRG:$2596 + .byte $01,$02,$FB,$09,$83,$E8,$FC,$04 ; PRG:$259E + .byte $0E,$04,$0D,$04,$0E,$04,$0D,$02 ; PRG:$25A6 + .byte $0C,$02,$0A,$04,$09,$02,$08,$02 ; PRG:$25AE + .byte $09,$08,$05,$06,$06,$02,$07,$04 ; PRG:$25B6 + .byte $06,$02,$05,$02,$0A,$04,$09,$02 ; PRG:$25BE + .byte $08,$02,$09,$08,$09,$04,$0C,$02 ; PRG:$25C6 + .byte $0D,$02,$0E,$08,$08,$04,$0B,$02 ; PRG:$25CE + .byte $0C,$02,$0D,$08,$07,$04,$0A,$02 ; PRG:$25D6 + .byte $0B,$02,$0C,$08,$06,$04,$09,$02 ; PRG:$25DE + .byte $23,$02,$24,$08,$0E,$01,$0E,$02 ; PRG:$25E6 + .byte $0E,$01,$0D,$02,$0C,$02,$0E,$01 ; PRG:$25EE + .byte $0E,$02,$0E,$01,$0D,$02,$0C,$02 ; PRG:$25F6 + .byte $0D,$01,$0D,$02,$0D,$01,$0C,$02 ; PRG:$25FE + .byte $0B,$02,$0D,$01,$0D,$02,$0D,$01 ; PRG:$2606 + .byte $0C,$02,$0B,$02,$0C,$01,$0C,$02 ; PRG:$260E + .byte $0C,$01,$0B,$02,$0A,$02,$0C,$01 ; PRG:$2616 + .byte $0C,$02,$0C,$01,$0B,$02,$0A,$02 ; PRG:$261E + .byte $09,$04,$24,$02,$0C,$02,$0D,$08 ; PRG:$2626 + .byte $30,$04,$0E,$02,$0D,$02,$0C,$08 ; PRG:$262E + .byte $FF,$81,$E6,$30,$01,$0E,$04,$0D ; PRG:$2636 + .byte $04,$0E,$04,$0D,$02,$0C,$02,$0A ; PRG:$263E + .byte $04,$09,$02,$08,$02,$09,$08,$05 ; PRG:$2646 + .byte $06,$06,$02,$07,$04,$06,$02,$05 ; PRG:$264E + .byte $02,$0A,$04,$09,$02,$08,$02,$09 ; PRG:$2656 + .byte $08,$09,$04,$0C,$02,$0D,$02,$0E ; PRG:$265E + .byte $08,$08,$04,$0B,$02,$0C,$02,$0D ; PRG:$2666 + .byte $08,$07,$04,$0A,$02,$0B,$02,$0C ; PRG:$266E + .byte $08,$06,$04,$09,$02,$23,$02,$24 ; PRG:$2676 + .byte $08,$0E,$01,$0E,$02,$0E,$01,$0D ; PRG:$267E + .byte $02,$0C,$02,$0E,$01,$0E,$02,$0E ; PRG:$2686 + .byte $01,$0D,$02,$0C,$02,$0D,$01,$0D ; PRG:$268E + .byte $02,$0D,$01,$0C,$02,$0B,$02,$0D ; PRG:$2696 + .byte $01,$0D,$02,$0D,$01,$0C,$02,$0B ; PRG:$269E + .byte $02,$0C,$01,$0C,$02,$0C,$01,$0B ; PRG:$26A6 + .byte $02,$0A,$02,$0C,$01,$0C,$02,$0C ; PRG:$26AE + .byte $01,$0B,$02,$0A,$02,$09,$04,$24 ; PRG:$26B6 + .byte $02,$0C,$02,$0D,$08,$30,$04,$0E ; PRG:$26BE + .byte $02,$0D,$02,$0C,$08,$FD,$81,$EA ; PRG:$26C6 + .byte $05,$01,$0E,$00,$0E,$00,$05,$01 ; PRG:$26CE + .byte $0E,$00,$0E,$00,$05,$01,$0E,$00 ; PRG:$26D6 + .byte $0E,$00,$05,$01,$0E,$01,$05,$01 ; PRG:$26DE + .byte $0E,$00,$0E,$00,$05,$01,$0E,$00 ; PRG:$26E6 + .byte $0E,$00,$05,$01,$0E,$00,$0E,$00 ; PRG:$26EE + .byte $05,$01,$0E,$01,$0A,$01,$11,$00 ; PRG:$26F6 + .byte $11,$00,$0A,$01,$11,$00,$11,$00 ; PRG:$26FE + .byte $0A,$01,$11,$00,$11,$00,$0A,$01 ; PRG:$2706 + .byte $11,$01,$05,$01,$0E,$00,$0E,$00 ; PRG:$270E + .byte $05,$01,$0E,$00,$0E,$00,$05,$01 ; PRG:$2716 + .byte $0E,$00,$0E,$00,$05,$01,$0E,$01 ; PRG:$271E + .byte $0A,$01,$11,$00,$11,$00,$0A,$01 ; PRG:$2726 + .byte $11,$00,$11,$00,$0A,$01,$11,$00 ; PRG:$272E + .byte $11,$00,$0A,$01,$11,$01,$0A,$01 ; PRG:$2736 + .byte $11,$00,$11,$00,$0A,$01,$11,$00 ; PRG:$273E + .byte $11,$00,$0A,$01,$11,$00,$11,$00 ; PRG:$2746 + .byte $0A,$01,$11,$01,$0A,$01,$11,$00 ; PRG:$274E + .byte $11,$00,$0A,$01,$11,$00,$11,$00 ; PRG:$2756 + .byte $0A,$01,$11,$00,$11,$00,$0A,$01 ; PRG:$275E + .byte $11,$01,$05,$01,$0E,$00,$0E,$00 ; PRG:$2766 + .byte $05,$01,$0E,$00,$0E,$00,$05,$01 ; PRG:$276E + .byte $0E,$00,$0E,$00,$05,$01,$0E,$01 ; PRG:$2776 + .byte $05,$01,$0E,$00,$0E,$00,$05,$01 ; PRG:$277E + .byte $0E,$00,$0E,$00,$05,$01,$0E,$00 ; PRG:$2786 + .byte $0E,$00,$05,$01,$0E,$01,$05,$01 ; PRG:$278E + .byte $0E,$00,$0E,$00,$05,$01,$0E,$00 ; PRG:$2796 + .byte $0E,$00,$05,$01,$0E,$00,$0E,$00 ; PRG:$279E + .byte $05,$01,$0E,$01,$04,$01,$0B,$00 ; PRG:$27A6 + .byte $0B,$00,$04,$01,$0B,$00,$0B,$00 ; PRG:$27AE + .byte $04,$01,$0B,$00,$0B,$00,$04,$01 ; PRG:$27B6 + .byte $0B,$01,$04,$01,$0B,$00,$0B,$00 ; PRG:$27BE + .byte $04,$01,$0B,$00,$0B,$00,$04,$01 ; PRG:$27C6 + .byte $0B,$00,$0B,$00,$04,$01,$0B,$01 ; PRG:$27CE + .byte $0A,$01,$11,$00,$11,$00,$0A,$01 ; PRG:$27D6 + .byte $11,$00,$11,$00,$0A,$01,$11,$00 ; PRG:$27DE + .byte $11,$00,$0A,$01,$11,$01,$0A,$01 ; PRG:$27E6 + .byte $11,$00,$11,$00,$0A,$01,$11,$00 ; PRG:$27EE + .byte $11,$00,$0A,$01,$11,$00,$11,$00 ; PRG:$27F6 + .byte $0A,$01,$11,$01,$08,$01,$0F,$00 ; PRG:$27FE + .byte $0F,$00,$08,$01,$0F,$00,$0F,$00 ; PRG:$2806 + .byte $08,$01,$0F,$00,$0F,$00,$08,$01 ; PRG:$280E + .byte $0F,$01,$08,$01,$0F,$00,$0F,$00 ; PRG:$2816 + .byte $08,$01,$0F,$00,$0F,$00,$08,$01 ; PRG:$281E + .byte $0F,$00,$0F,$00,$08,$01,$0F,$01 ; PRG:$2826 + .byte $05,$01,$0E,$00,$0E,$00,$05,$01 ; PRG:$282E + .byte $0E,$00,$0E,$00,$05,$01,$0E,$00 ; PRG:$2836 + .byte $0E,$00,$05,$01,$0E,$01,$05,$01 ; PRG:$283E + .byte $0E,$00,$0E,$00,$05,$01,$0E,$00 ; PRG:$2846 + .byte $0E,$00,$05,$01,$0E,$00,$0E,$00 ; PRG:$284E + .byte $05,$01,$0E,$01,$04,$01,$0B,$00 ; PRG:$2856 + .byte $0B,$00,$04,$01,$0B,$00,$0B,$00 ; PRG:$285E + .byte $04,$01,$0B,$00,$0B,$00,$04,$01 ; PRG:$2866 + .byte $0B,$01,$04,$01,$0B,$00,$0B,$00 ; PRG:$286E + .byte $04,$01,$0B,$00,$0B,$00,$04,$01 ; PRG:$2876 + .byte $0B,$00,$0B,$00,$04,$01,$0B,$01 ; PRG:$287E + .byte $0A,$01,$11,$00,$11,$00,$0A,$01 ; PRG:$2886 + .byte $11,$00,$11,$00,$0A,$01,$11,$00 ; PRG:$288E + .byte $11,$00,$0A,$01,$11,$01,$0A,$01 ; PRG:$2896 + .byte $11,$00,$11,$00,$0A,$01,$11,$00 ; PRG:$289E + .byte $11,$00,$0A,$01,$11,$00,$11,$00 ; PRG:$28A6 + .byte $0A,$01,$11,$01,$08,$01,$0F,$00 ; PRG:$28AE + .byte $0F,$00,$08,$01,$0F,$00,$0F,$00 ; PRG:$28B6 + .byte $08,$01,$0F,$00,$0F,$00,$08,$01 ; PRG:$28BE + .byte $0F,$01,$08,$01,$0F,$00,$0F,$00 ; PRG:$28C6 + .byte $08,$01,$0F,$00,$0F,$00,$08,$01 ; PRG:$28CE + .byte $0F,$00,$0F,$00,$08,$01,$0F,$01 ; PRG:$28D6 + .byte $08,$01,$0F,$00,$0F,$00,$08,$01 ; PRG:$28DE + .byte $0F,$00,$0F,$00,$08,$01,$0F,$00 ; PRG:$28E6 + .byte $0F,$00,$08,$01,$0F,$01,$05,$01 ; PRG:$28EE + .byte $0E,$00,$0E,$00,$05,$01,$0E,$00 ; PRG:$28F6 + .byte $0E,$00,$05,$01,$0E,$00,$0E,$00 ; PRG:$28FE + .byte $05,$01,$0E,$01,$FD,$00,$02,$01 ; PRG:$2906 + .byte $02,$00,$02,$01,$02,$00,$02,$01 ; PRG:$290E + .byte $02,$00,$02,$01,$01,$01,$01,$FB ; PRG:$2916 + .byte $13,$FD,$FF,$FF,$80,$E5,$FC,$05 ; PRG:$291E + .byte $05,$02,$0C,$02,$0B,$02,$0A,$02 ; PRG:$2926 + .byte $0B,$02,$09,$02,$0C,$04,$05,$02 ; PRG:$292E + .byte $09,$04,$08,$02,$07,$04,$0A,$02 ; PRG:$2936 + .byte $06,$04,$09,$02,$05,$02,$09,$04 ; PRG:$293E + .byte $05,$06,$05,$02,$0C,$02,$0B,$02 ; PRG:$2946 + .byte $0A,$02,$0B,$02,$0A,$02,$0C,$04 ; PRG:$294E + .byte $05,$02,$09,$04,$08,$02,$07,$04 ; PRG:$2956 + .byte $0A,$02,$06,$04,$09,$02,$05,$02 ; PRG:$295E + .byte $09,$04,$05,$06,$02,$02,$09,$02 ; PRG:$2966 + .byte $22,$02,$07,$02,$22,$02,$06,$02 ; PRG:$296E + .byte $09,$04,$02,$02,$06,$04,$05,$02 ; PRG:$2976 + .byte $04,$04,$07,$02,$03,$04,$06,$02 ; PRG:$297E + .byte $02,$02,$06,$04,$06,$02,$09,$01 ; PRG:$2986 + .byte $08,$01,$07,$01,$06,$01,$05,$02 ; PRG:$298E + .byte $0C,$02,$0B,$02,$0A,$02,$0B,$02 ; PRG:$2996 + .byte $09,$02,$0C,$04,$05,$02,$09,$04 ; PRG:$299E + .byte $08,$02,$07,$04,$0A,$02,$06,$04 ; PRG:$29A6 + .byte $09,$02,$05,$02,$09,$04,$05,$06 ; PRG:$29AE + .byte $FE,$FF,$83,$E6,$30,$06,$30,$06 ; PRG:$29B6 + .byte $30,$06,$30,$06,$30,$06,$30,$06 ; PRG:$29BE + .byte $30,$06,$30,$06,$0C,$02,$0C,$02 ; PRG:$29C6 + .byte $0C,$02,$11,$02,$11,$02,$11,$02 ; PRG:$29CE + .byte $13,$04,$13,$02,$10,$04,$10,$02 ; PRG:$29D6 + .byte $0E,$04,$0E,$02,$0D,$04,$0D,$02 ; PRG:$29DE + .byte $0C,$02,$10,$04,$0C,$04,$30,$02 ; PRG:$29E6 + .byte $02,$02,$09,$02,$22,$02,$07,$02 ; PRG:$29EE + .byte $22,$02,$06,$02,$09,$04,$02,$02 ; PRG:$29F6 + .byte $06,$04,$05,$02,$04,$04,$07,$02 ; PRG:$29FE + .byte $03,$04,$06,$02,$02,$02,$06,$04 ; PRG:$2A06 + .byte $06,$02,$09,$01,$08,$01,$07,$01 ; PRG:$2A0E + .byte $06,$01,$0C,$02,$0C,$02,$0C,$02 ; PRG:$2A16 + .byte $11,$02,$11,$02,$11,$02,$13,$04 ; PRG:$2A1E + .byte $13,$02,$10,$04,$10,$02,$0E,$04 ; PRG:$2A26 + .byte $0E,$02,$0D,$04,$0D,$02,$0C,$02 ; PRG:$2A2E + .byte $10,$04,$0C,$04,$30,$02,$80,$ED ; PRG:$2A36 + .byte $12,$01,$11,$01,$10,$01,$11,$01 ; PRG:$2A3E + .byte $0F,$01,$10,$01,$11,$01,$10,$01 ; PRG:$2A46 + .byte $0F,$01,$10,$01,$0E,$01,$0F,$01 ; PRG:$2A4E + .byte $10,$01,$12,$01,$11,$01,$10,$01 ; PRG:$2A56 + .byte $0F,$01,$0E,$01,$0F,$01,$0E,$01 ; PRG:$2A5E + .byte $0D,$01,$0C,$01,$0B,$02,$12,$01 ; PRG:$2A66 + .byte $11,$01,$10,$01,$11,$01,$0F,$01 ; PRG:$2A6E + .byte $10,$01,$11,$01,$10,$01,$0F,$01 ; PRG:$2A76 + .byte $10,$01,$0E,$01,$0F,$01,$10,$01 ; PRG:$2A7E + .byte $12,$01,$11,$01,$10,$01,$0F,$01 ; PRG:$2A86 + .byte $10,$01,$0E,$06,$12,$01,$11,$01 ; PRG:$2A8E + .byte $10,$01,$11,$01,$0F,$01,$10,$01 ; PRG:$2A96 + .byte $11,$01,$10,$01,$0F,$01,$10,$01 ; PRG:$2A9E + .byte $0E,$01,$0F,$01,$10,$01,$12,$01 ; PRG:$2AA6 + .byte $11,$01,$10,$01,$0F,$01,$0E,$01 ; PRG:$2AAE + .byte $0F,$01,$0E,$01,$0D,$01,$0C,$01 ; PRG:$2AB6 + .byte $0B,$02,$12,$01,$11,$01,$10,$01 ; PRG:$2ABE + .byte $11,$01,$0F,$01,$10,$01,$11,$01 ; PRG:$2AC6 + .byte $10,$01,$0F,$01,$10,$01,$0E,$01 ; PRG:$2ACE + .byte $0F,$01,$10,$01,$12,$01,$11,$01 ; PRG:$2AD6 + .byte $10,$01,$0F,$01,$10,$01,$0E,$06 ; PRG:$2ADE + .byte $0F,$01,$0E,$01,$0D,$01,$0E,$01 ; PRG:$2AE6 + .byte $0C,$01,$0D,$01,$0E,$01,$0D,$01 ; PRG:$2AEE + .byte $0C,$01,$0D,$01,$0B,$01,$0C,$01 ; PRG:$2AF6 + .byte $0D,$01,$0F,$01,$0E,$01,$0D,$01 ; PRG:$2AFE + .byte $0C,$01,$0B,$01,$0C,$01,$0B,$01 ; PRG:$2B06 + .byte $23,$01,$09,$01,$08,$02,$0F,$01 ; PRG:$2B0E + .byte $0E,$01,$0D,$01,$0E,$01,$0C,$01 ; PRG:$2B16 + .byte $0D,$01,$0E,$01,$0D,$01,$0C,$01 ; PRG:$2B1E + .byte $0D,$01,$0B,$01,$0C,$01,$0D,$01 ; PRG:$2B26 + .byte $0F,$01,$0E,$01,$0D,$01,$0C,$01 ; PRG:$2B2E + .byte $0B,$01,$0B,$06,$12,$01,$11,$01 ; PRG:$2B36 + .byte $10,$01,$11,$01,$0F,$01,$10,$01 ; PRG:$2B3E + .byte $11,$01,$10,$01,$0F,$01,$10,$01 ; PRG:$2B46 + .byte $0E,$01,$0F,$01,$10,$01,$12,$01 ; PRG:$2B4E + .byte $11,$01,$10,$01,$0F,$01,$0E,$01 ; PRG:$2B56 + .byte $0F,$01,$0E,$01,$0D,$01,$0C,$01 ; PRG:$2B5E + .byte $0B,$02,$12,$01,$11,$01,$10,$01 ; PRG:$2B66 + .byte $11,$01,$0F,$01,$10,$01,$11,$01 ; PRG:$2B6E + .byte $10,$01,$0F,$01,$10,$01,$0E,$01 ; PRG:$2B76 + .byte $0F,$01,$10,$01,$12,$01,$11,$01 ; PRG:$2B7E + .byte $10,$01,$0F,$01,$10,$01,$0E,$06 ; PRG:$2B86 + .byte $03,$06,$03,$06,$03,$06,$03,$06 ; PRG:$2B8E + .byte $03,$06,$03,$06,$03,$06,$03,$06 ; PRG:$2B96 + .byte $02,$01,$01,$01,$01,$01,$03,$01 ; PRG:$2B9E + .byte $03,$01,$01,$01,$02,$01,$01,$01 ; PRG:$2BA6 + .byte $01,$01,$03,$01,$03,$01,$01,$01 ; PRG:$2BAE + .byte $02,$01,$01,$01,$01,$01,$03,$01 ; PRG:$2BB6 + .byte $03,$01,$01,$01,$02,$01,$01,$01 ; PRG:$2BBE + .byte $01,$01,$03,$01,$03,$01,$01,$01 ; PRG:$2BC6 + .byte $02,$01,$01,$01,$01,$01,$03,$01 ; PRG:$2BCE + .byte $03,$01,$01,$01,$02,$01,$01,$01 ; PRG:$2BD6 + .byte $01,$01,$03,$01,$03,$01,$01,$01 ; PRG:$2BDE + .byte $02,$01,$01,$01,$01,$01,$03,$01 ; PRG:$2BE6 + .byte $03,$01,$01,$01,$02,$01,$01,$01 ; PRG:$2BEE + .byte $01,$01,$03,$01,$03,$01,$01,$01 ; PRG:$2BF6 + .byte $03,$06,$03,$06,$03,$06,$03,$06 ; PRG:$2BFE + .byte $03,$06,$03,$06,$03,$06,$03,$06 ; PRG:$2C06 + .byte $02,$01,$01,$01,$01,$01,$03,$01 ; PRG:$2C0E + .byte $03,$01,$01,$01,$02,$01,$01,$01 ; PRG:$2C16 + .byte $01,$01,$03,$01,$03,$01,$01,$01 ; PRG:$2C1E + .byte $02,$01,$01,$01,$01,$01,$03,$01 ; PRG:$2C26 + .byte $03,$01,$01,$01,$02,$01,$01,$01 ; PRG:$2C2E + .byte $01,$01,$03,$01,$03,$01,$01,$01 ; PRG:$2C36 + .byte $02,$01,$01,$01,$01,$01,$03,$01 ; PRG:$2C3E + .byte $03,$01,$01,$01,$02,$01,$01,$01 ; PRG:$2C46 + .byte $01,$01,$03,$01,$03,$01,$01,$01 ; PRG:$2C4E + .byte $02,$01,$01,$01,$01,$01,$03,$01 ; PRG:$2C56 + .byte $03,$01,$01,$01,$02,$01,$01,$01 ; PRG:$2C5E + .byte $01,$01,$03,$01,$03,$01,$01,$01 ; PRG:$2C66 + .byte $03,$06,$03,$06,$03,$06,$03,$06 ; PRG:$2C6E + .byte $03,$06,$03,$06,$03,$06,$03,$06 ; PRG:$2C76 + .byte $02,$01,$01,$01,$01,$01,$03,$01 ; PRG:$2C7E + .byte $03,$01,$01,$01,$FB,$0D,$FF,$FF ; PRG:$2C86 + .byte $FF,$FF,$83,$E8,$FC,$01,$00,$00 ; PRG:$2C8E + .byte $01,$00,$02,$00,$03,$00,$04,$00 ; PRG:$2C96 + .byte $05,$00,$06,$00,$07,$00,$08,$00 ; PRG:$2C9E + .byte $09,$00,$0A,$00,$0B,$00,$0C,$00 ; PRG:$2CA6 + .byte $0D,$00,$0E,$00,$0F,$00,$10,$00 ; PRG:$2CAE + .byte $11,$00,$12,$00,$13,$00,$14,$08 ; PRG:$2CB6 + .byte $FE,$FF,$FD,$FD,$FD,$80,$E8,$FC ; PRG:$2CBE + .byte $04,$0B,$01,$0E,$01,$0B,$01,$0F ; PRG:$2CC6 + .byte $01,$0B,$01,$10,$01,$0F,$01,$0E ; PRG:$2CCE + .byte $01,$0B,$01,$0E,$01,$0B,$01,$0C ; PRG:$2CD6 + .byte $01,$0E,$01,$0D,$01,$0E,$01,$0F ; PRG:$2CDE + .byte $01,$0B,$01,$0E,$01,$0B,$01,$0F ; PRG:$2CE6 + .byte $01,$0B,$01,$10,$01,$0F,$01,$0E ; PRG:$2CEE + .byte $01,$0B,$01,$11,$01,$10,$01,$0F ; PRG:$2CF6 + .byte $01,$10,$01,$0E,$04,$FF,$FF,$81 ; PRG:$2CFE + .byte $E8,$09,$01,$0B,$01,$09,$01,$0C ; PRG:$2D06 + .byte $01,$0B,$01,$09,$01,$0B,$01,$09 ; PRG:$2D0E + .byte $01,$09,$01,$0B,$01,$09,$01,$0E ; PRG:$2D16 + .byte $01,$0B,$01,$0C,$01,$0E,$01,$0D ; PRG:$2D1E + .byte $01,$09,$01,$0B,$01,$09,$01,$0C ; PRG:$2D26 + .byte $01,$0B,$01,$09,$01,$0B,$01,$09 ; PRG:$2D2E + .byte $01,$0B,$01,$0D,$01,$0E,$01,$0F ; PRG:$2D36 + .byte $01,$0D,$01,$0B,$04,$82,$E7,$0B ; PRG:$2D3E + .byte $01,$0E,$02,$0F,$02,$10,$02,$0E ; PRG:$2D46 + .byte $02,$0E,$02,$0E,$02,$0D,$01,$0E ; PRG:$2D4E + .byte $01,$0F,$01,$0B,$01,$0E,$02,$0F ; PRG:$2D56 + .byte $02,$10,$02,$0E,$02,$11,$02,$0F ; PRG:$2D5E + .byte $02,$0E,$04,$FD,$FF,$FF,$FF,$FF ; PRG:$2D66 +Label_ED6E: + asl a ; PRG:$2D6E 0A + tax ; PRG:$2D6F AA + lda $EDBF,x ; PRG:$2D70 BD BF ED + sta $45 ; PRG:$2D73 85 45 + lda $EDC0,x ; PRG:$2D75 BD C0 ED + sta $46 ; PRG:$2D78 85 46 + asl $45 ; PRG:$2D7A 06 45 + rol $46 ; PRG:$2D7C 26 46 + asl $45 ; PRG:$2D7E 06 45 + rol $46 ; PRG:$2D80 26 46 + lda $46 ; PRG:$2D82 A5 46 + sta APUDMCADDR ; PRG:$2D84 8D 12 40 + sec ; PRG:$2D87 38 + lda $EDC1,x ; PRG:$2D88 BD C1 ED + sbc $EDBF,x ; PRG:$2D8B FD BF ED + sta $45 ; PRG:$2D8E 85 45 + lda $EDC2,x ; PRG:$2D90 BD C2 ED + sbc $EDC0,x ; PRG:$2D93 FD C0 ED + sta $46 ; PRG:$2D96 85 46 + lsr $46 ; PRG:$2D98 46 46 + ror $45 ; PRG:$2D9A 66 45 + lsr $46 ; PRG:$2D9C 46 46 + ror $45 ; PRG:$2D9E 66 45 + lsr $46 ; PRG:$2DA0 46 46 + ror $45 ; PRG:$2DA2 66 45 + lsr $46 ; PRG:$2DA4 46 46 + ror $45 ; PRG:$2DA6 66 45 + lda $45 ; PRG:$2DA8 A5 45 + sta APUDMCLENGTH ; PRG:$2DAA 8D 13 40 + lda #$0D ; PRG:$2DAD A9 0D + sta APUDMCCTRL ; PRG:$2DAF 8D 10 40 + lda #$10 ; PRG:$2DB2 A9 10 + sta APUSTATUS ; PRG:$2DB4 8D 15 40 +Label_EDB7: + lda APUSTATUS ; PRG:$2DB7 AD 15 40 + and #$10 ; PRG:$2DBA 29 10 + bne Label_EDB7 ; PRG:$2DBC D0 F9 + rts ; PRG:$2DBE 60 +; ---- data $EDBF-$F890 (2770 bytes) ---- +Label_EDBF: + .byte $00,$F2,$90,$F8,$00,$00,$00,$00 ; PRG:$2DBF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2DC7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2DCF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2DD7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2DDF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2DE7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2DEF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2DF7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2DFF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2E07 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2E0F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2E17 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2E1F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2E27 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2E2F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2E37 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2E3F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2E47 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2E4F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2E57 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2E5F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2E67 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2E6F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2E77 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2E7F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2E87 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2E8F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2E97 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2E9F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2EA7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2EAF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2EB7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2EBF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2EC7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2ECF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2ED7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2EDF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2EE7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2EEF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2EF7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2EFF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2F07 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2F0F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2F17 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2F1F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2F27 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2F2F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2F37 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2F3F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2F47 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2F4F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2F57 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2F5F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2F67 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2F6F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2F77 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2F7F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2F87 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2F8F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2F97 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2F9F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2FA7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2FAF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2FB7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2FBF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2FC7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2FCF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2FD7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2FDF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2FE7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2FEF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2FF7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$2FFF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3007 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$300F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3017 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$301F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3027 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$302F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3037 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$303F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3047 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$304F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3057 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$305F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3067 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$306F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3077 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$307F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3087 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$308F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3097 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$309F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$30A7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$30AF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$30B7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$30BF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$30C7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$30CF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$30D7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$30DF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$30E7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$30EF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$30F7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$30FF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3107 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$310F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3117 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$311F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3127 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$312F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3137 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$313F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3147 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$314F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3157 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$315F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3167 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$316F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3177 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$317F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3187 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$318F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3197 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$319F + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$31A7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$31AF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$31B7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$31BF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$31C7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$31CF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$31D7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$31DF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$31E7 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$31EF + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$31F7 + .byte $00,$A4,$AA,$54,$2B,$AD,$52,$AD ; PRG:$31FF + .byte $A4,$94,$AA,$51,$8D,$AA,$36,$CA ; PRG:$3207 + .byte $4A,$B1,$5A,$A5,$74,$6E,$94,$DF ; PRG:$320F + .byte $01,$DB,$60,$7A,$56,$9E,$A3,$D0 ; PRG:$3217 + .byte $34,$A3,$ED,$58,$35,$A2,$66,$91 ; PRG:$321F + .byte $5D,$92,$5C,$2A,$D4,$95,$A8,$33 ; PRG:$3227 + .byte $D5,$92,$BA,$42,$6E,$45,$76,$45 ; PRG:$322F + .byte $BA,$0A,$F5,$14,$EC,$0B,$F9,$0A ; PRG:$3237 + .byte $5A,$CB,$2A,$55,$35,$A5,$2D,$91 ; PRG:$323F + .byte $BE,$82,$BD,$02,$BB,$01,$FA,$03 ; PRG:$3247 + .byte $FB,$05,$7A,$13,$D4,$55,$45,$AD ; PRG:$324F + .byte $52,$2B,$BA,$24,$D4,$1B,$69,$2B ; PRG:$3257 + .byte $69,$95,$74,$95,$5C,$25,$BD,$42 ; PRG:$325F + .byte $AD,$54,$57,$A4,$9D,$C4,$5E,$49 ; PRG:$3267 + .byte $6A,$55,$A9,$5A,$45,$B5,$5A,$49 ; PRG:$326F + .byte $B5,$2A,$D5,$4A,$55,$A5,$AA,$AA ; PRG:$3277 + .byte $4A,$D5,$D2,$AA,$94,$5A,$4B,$52 ; PRG:$327F + .byte $AB,$5A,$AA,$AD,$52,$65,$56,$2B ; PRG:$3287 + .byte $91,$6D,$95,$B2,$52,$AB,$CA,$D4 ; PRG:$328F + .byte $36,$51,$AB,$AA,$20,$DA,$96,$54 ; PRG:$3297 + .byte $95,$AE,$8A,$6A,$4B,$49,$B5,$4A ; PRG:$329F + .byte $55,$A4,$B6,$92,$AA,$AD,$94,$4A ; PRG:$32A7 + .byte $AD,$2A,$2A,$5B,$21,$B5,$2A,$D9 ; PRG:$32AF + .byte $4A,$4A,$AB,$94,$54,$55,$53,$D6 ; PRG:$32B7 + .byte $06,$59,$6B,$AA,$4A,$B5,$55,$52 ; PRG:$32BF + .byte $55,$2D,$2D,$B2,$65,$A1,$56,$95 ; PRG:$32C7 + .byte $4A,$2B,$57,$4D,$A9,$2E,$85,$58 ; PRG:$32CF + .byte $52,$59,$6A,$5A,$A9,$D2,$D6,$4A ; PRG:$32D7 + .byte $AA,$65,$89,$56,$66,$69,$92,$B1 ; PRG:$32DF + .byte $2E,$C8,$6A,$55,$55,$35,$55,$A9 ; PRG:$32E7 + .byte $D5,$94,$4A,$55,$55,$6A,$55,$2D ; PRG:$32EF + .byte $55,$D5,$34,$4E,$3D,$55,$5A,$45 ; PRG:$32F7 + .byte $2A,$54,$99,$D2,$4A,$74,$71,$94 ; PRG:$32FF + .byte $65,$EC,$5B,$EB,$B6,$AA,$54,$2A ; PRG:$3307 + .byte $B5,$9D,$11,$00,$00,$00,$00,$A0 ; PRG:$330F + .byte $C3,$F7,$3F,$55,$28,$89,$AB,$6D ; PRG:$3317 + .byte $B7,$FF,$0F,$50,$2A,$05,$00,$00 ; PRG:$331F + .byte $C0,$F3,$FF,$FF,$3F,$20,$00,$E0 ; PRG:$3327 + .byte $AF,$6D,$CF,$FF,$0F,$48,$C5,$00 ; PRG:$332F + .byte $00,$00,$E0,$F9,$FF,$FF,$FF,$03 ; PRG:$3337 + .byte $00,$80,$E7,$FB,$FF,$FF,$81,$82 ; PRG:$333F + .byte $00,$00,$00,$00,$9E,$EF,$FB,$FF ; PRG:$3347 + .byte $FF,$01,$00,$00,$FC,$FF,$FF,$FF ; PRG:$334F + .byte $03,$00,$00,$00,$08,$C7,$F9,$FC ; PRG:$3357 + .byte $FF,$FF,$0F,$00,$00,$C0,$FF,$FF ; PRG:$335F + .byte $FF,$0F,$00,$80,$60,$38,$C6,$F7 ; PRG:$3367 + .byte $FF,$FF,$FF,$00,$00,$00,$FE,$FF ; PRG:$336F + .byte $FF,$3F,$00,$C0,$E1,$70,$00,$CF ; PRG:$3377 + .byte $FF,$FF,$FF,$0F,$00,$00,$78,$FF ; PRG:$337F + .byte $FF,$FF,$01,$58,$E1,$E0,$30,$C7 ; PRG:$3387 + .byte $FF,$FF,$FF,$07,$00,$00,$7C,$FF ; PRG:$338F + .byte $FF,$FF,$03,$58,$84,$83,$83,$78 ; PRG:$3397 + .byte $FE,$FF,$FF,$3F,$00,$00,$E0,$FF ; PRG:$339F + .byte $FF,$7F,$00,$F0,$C2,$C1,$71,$CE ; PRG:$33A7 + .byte $FF,$FF,$FF,$00,$00,$00,$F8,$FF ; PRG:$33AF + .byte $FF,$3F,$00,$8D,$C2,$E1,$30,$9E ; PRG:$33B7 + .byte $9F,$FF,$FF,$00,$18,$00,$F0,$FC ; PRG:$33BF + .byte $FF,$3F,$40,$55,$70,$38,$FC,$F3 ; PRG:$33C7 + .byte $E3,$FF,$1F,$00,$07,$00,$BC,$FF ; PRG:$33CF + .byte $FF,$03,$54,$05,$C7,$C5,$3F,$1F ; PRG:$33D7 + .byte $FE,$C3,$01,$70,$00,$C3,$C3,$FF ; PRG:$33DF + .byte $7F,$80,$AA,$E0,$F0,$F0,$CF,$FF ; PRG:$33E7 + .byte $7F,$10,$2C,$56,$C1,$C1,$DF,$FF ; PRG:$33EF + .byte $7F,$80,$AA,$C0,$F1,$E1,$CF,$FF ; PRG:$33F7 + .byte $FF,$00,$AC,$AA,$02,$C0,$FF,$FF ; PRG:$33FF + .byte $3F,$40,$55,$C0,$F1,$FF,$FF,$FF ; PRG:$3407 + .byte $3F,$40,$95,$C2,$05,$F0,$FF,$FF ; PRG:$340F + .byte $1F,$A0,$4A,$05,$07,$FF,$FF,$FF ; PRG:$3417 + .byte $7F,$80,$4A,$55,$0A,$F0,$FF,$FF ; PRG:$341F + .byte $0F,$A0,$4A,$55,$E0,$F8,$FF,$FF ; PRG:$3427 + .byte $FF,$07,$A8,$54,$95,$00,$FE,$FF ; PRG:$342F + .byte $FF,$03,$A8,$52,$55,$E0,$F8,$FF ; PRG:$3437 + .byte $FF,$FF,$01,$2A,$55,$A5,$80,$FF ; PRG:$343F + .byte $FF,$FF,$01,$52,$A9,$2A,$20,$F8 ; PRG:$3447 + .byte $FF,$FF,$7F,$00,$56,$95,$AA,$80 ; PRG:$344F + .byte $FF,$FF,$FF,$07,$50,$A5,$AA,$00 ; PRG:$3457 + .byte $F0,$FF,$FF,$FF,$0F,$50,$A9,$2A ; PRG:$345F + .byte $01,$FE,$FF,$FF,$3F,$80,$2A,$55 ; PRG:$3467 + .byte $0B,$20,$FC,$FF,$FF,$FF,$03,$54 ; PRG:$346F + .byte $AA,$0A,$C0,$FF,$FF,$FF,$07,$A8 ; PRG:$3477 + .byte $52,$55,$0A,$C1,$FF,$FF,$FF,$1F ; PRG:$347F + .byte $C0,$54,$95,$0A,$C0,$FF,$FF,$FF ; PRG:$3487 + .byte $07,$A8,$52,$55,$42,$F0,$FF,$FF ; PRG:$348F + .byte $FF,$00,$00,$BD,$40,$00,$FE,$FF ; PRG:$3497 + .byte $FF,$FF,$03,$54,$A9,$2A,$01,$F0 ; PRG:$349F + .byte $FF,$FF,$FF,$0F,$0C,$00,$00,$00 ; PRG:$34A7 + .byte $FC,$FF,$FF,$FF,$07,$A8,$52,$55 ; PRG:$34AF + .byte $49,$02,$00,$FE,$FF,$FF,$FF,$01 ; PRG:$34B7 + .byte $04,$00,$E0,$FF,$FF,$FF,$7F,$80 ; PRG:$34BF + .byte $2A,$55,$95,$44,$00,$00,$FF,$FF ; PRG:$34C7 + .byte $FF,$FF,$00,$00,$00,$FC,$FF,$FF ; PRG:$34CF + .byte $FF,$07,$60,$55,$95,$AA,$12,$00 ; PRG:$34D7 + .byte $FE,$FF,$FF,$07,$00,$60,$00,$00 ; PRG:$34DF + .byte $FE,$FF,$FF,$FF,$FF,$00,$D5,$54 ; PRG:$34E7 + .byte $55,$02,$FC,$FF,$FF,$FF,$00,$00 ; PRG:$34EF + .byte $E0,$17,$00,$F8,$FF,$FF,$FF,$03 ; PRG:$34F7 + .byte $00,$7C,$95,$AA,$02,$F8,$FF,$FF ; PRG:$34FF + .byte $FF,$07,$00,$00,$00,$00,$FF,$FF ; PRG:$3507 + .byte $FF,$FF,$07,$00,$F0,$55,$55,$01 ; PRG:$350F + .byte $FF,$FF,$FF,$FF,$03,$00,$00,$00 ; PRG:$3517 + .byte $00,$FE,$FF,$FF,$FF,$01,$00,$C0 ; PRG:$351F + .byte $AF,$AA,$00,$FE,$FF,$FF,$FF,$0F ; PRG:$3527 + .byte $00,$00,$00,$00,$FF,$FF,$FF,$FF ; PRG:$352F + .byte $03,$00,$F8,$A9,$2A,$01,$F0,$FF ; PRG:$3537 + .byte $FF,$FF,$3F,$00,$00,$00,$00,$F0 ; PRG:$353F + .byte $FF,$FF,$FF,$3F,$00,$00,$BF,$4A ; PRG:$3547 + .byte $09,$00,$FE,$FF,$FF,$FF,$0F,$00 ; PRG:$354F + .byte $00,$00,$00,$FF,$FF,$FF,$FF,$01 ; PRG:$3557 + .byte $00,$7C,$55,$55,$0C,$00,$FF,$FF ; PRG:$355F + .byte $FF,$FF,$00,$00,$00,$00,$FC,$FF ; PRG:$3567 + .byte $FF,$FF,$1F,$00,$00,$BF,$AA,$12 ; PRG:$356F + .byte $00,$FE,$FF,$FF,$FF,$03,$00,$00 ; PRG:$3577 + .byte $00,$F0,$FF,$FF,$FF,$3F,$00,$C0 ; PRG:$357F + .byte $57,$55,$A5,$02,$F0,$FF,$FF,$FF ; PRG:$3587 + .byte $07,$00,$00,$03,$00,$FC,$FF,$FF ; PRG:$358F + .byte $FF,$01,$00,$F8,$29,$F0,$2A,$00 ; PRG:$3597 + .byte $FF,$FF,$FF,$FF,$00,$00,$78,$00 ; PRG:$359F + .byte $70,$FC,$FF,$FF,$FF,$0F,$00,$C0 ; PRG:$35A7 + .byte $AF,$54,$01,$F0,$E3,$FF,$FF,$0F ; PRG:$35AF + .byte $05,$00,$00,$04,$FE,$FF,$FF,$FF ; PRG:$35B7 + .byte $1F,$00,$00,$F0,$AB,$2A,$E0,$FF ; PRG:$35BF + .byte $F8,$FF,$1F,$B4,$00,$00,$00,$C0 ; PRG:$35C7 + .byte $FF,$FF,$FF,$FF,$00,$00,$00,$FC ; PRG:$35CF + .byte $55,$01,$FF,$C7,$FF,$FF,$7F,$00 ; PRG:$35D7 + .byte $00,$00,$00,$F8,$FF,$FF,$FF,$0F ; PRG:$35DF + .byte $00,$00,$00,$FC,$55,$00,$BF,$FF ; PRG:$35E7 + .byte $FF,$FF,$1F,$00,$00,$00,$F0,$FF ; PRG:$35EF + .byte $FF,$FF,$1F,$00,$00,$00,$80,$3F ; PRG:$35F7 + .byte $01,$00,$F0,$FF,$FF,$FF,$07,$0A ; PRG:$35FF + .byte $00,$F0,$DB,$FF,$FF,$FF,$03,$00 ; PRG:$3607 + .byte $00,$00,$7E,$00,$00,$FC,$FF,$FF ; PRG:$360F + .byte $7F,$C0,$01,$00,$00,$F8,$FF,$FF ; PRG:$3617 + .byte $FF,$03,$00,$00,$80,$07,$00,$80 ; PRG:$361F + .byte $FF,$FF,$FF,$FF,$1F,$00,$00,$00 ; PRG:$3627 + .byte $FF,$FF,$FF,$07,$00,$00,$00,$7F ; PRG:$362F + .byte $00,$00,$FE,$FF,$FF,$0F,$00,$00 ; PRG:$3637 + .byte $80,$C3,$FF,$FF,$FF,$03,$00,$00 ; PRG:$363F + .byte $F8,$2B,$FC,$FF,$7F,$00,$E0,$2B ; PRG:$3647 + .byte $16,$07,$FF,$FF,$FF,$00,$00,$00 ; PRG:$364F + .byte $00,$E0,$9F,$E1,$FF,$FF,$FF,$07 ; PRG:$3657 + .byte $A0,$CA,$C0,$F8,$FF,$FF,$07,$00 ; PRG:$365F + .byte $02,$00,$00,$7F,$05,$FF,$FF,$FF ; PRG:$3667 + .byte $3F,$40,$85,$03,$F0,$FF,$FF,$0F ; PRG:$366F + .byte $10,$08,$00,$00,$7F,$85,$FF,$FF ; PRG:$3677 + .byte $FF,$0F,$50,$2C,$00,$FE,$FF,$FF ; PRG:$367F + .byte $01,$02,$00,$00,$C0,$5F,$F0,$FF ; PRG:$3687 + .byte $FF,$FF,$03,$A8,$02,$80,$FF,$FF ; PRG:$368F + .byte $7F,$80,$00,$00,$00,$F8,$0B,$FC ; PRG:$3697 + .byte $FF,$FF,$FF,$00,$B1,$00,$F0,$FF ; PRG:$369F + .byte $FF,$07,$28,$04,$00,$40,$BF,$F0 ; PRG:$36A7 + .byte $FF,$FF,$FF,$07,$88,$05,$80,$FF ; PRG:$36AF + .byte $FF,$7F,$80,$00,$00,$00,$F8,$17 ; PRG:$36B7 + .byte $FE,$FF,$FF,$FF,$00,$59,$04,$F0 ; PRG:$36BF + .byte $FF,$FF,$1F,$00,$00,$00,$C0,$5F ; PRG:$36C7 + .byte $F0,$FD,$FF,$FF,$03,$C4,$32,$C0 ; PRG:$36CF + .byte $FF,$FF,$7F,$00,$00,$00,$00,$FC ; PRG:$36D7 + .byte $85,$EF,$FF,$FF,$1F,$02,$8E,$01 ; PRG:$36DF + .byte $FC,$FF,$FF,$03,$04,$00,$00,$E4 ; PRG:$36E7 + .byte $0F,$3E,$FF,$FF,$FF,$10,$70,$0C ; PRG:$36EF + .byte $E0,$FF,$FF,$1F,$20,$00,$00,$30 ; PRG:$36F7 + .byte $7E,$F1,$F9,$FF,$FF,$43,$80,$2B ; PRG:$36FF + .byte $00,$FF,$FF,$FF,$01,$00,$04,$F0 ; PRG:$3707 + .byte $AE,$E2,$F3,$F3,$FF,$1F,$81,$C2 ; PRG:$370F + .byte $00,$FC,$FF,$FF,$07,$00,$00,$C0 ; PRG:$3717 + .byte $F9,$C2,$E7,$FF,$FF,$FF,$03,$54 ; PRG:$371F + .byte $01,$E0,$FF,$FF,$1F,$00,$18,$E0 ; PRG:$3727 + .byte $57,$0A,$9F,$FF,$FF,$FF,$0F,$50 ; PRG:$372F + .byte $05,$01,$FF,$FF,$FF,$00,$F0,$C0 ; PRG:$3737 + .byte $AB,$14,$9E,$FF,$FF,$FF,$0F,$10 ; PRG:$373F + .byte $0B,$0C,$FC,$FF,$FF,$07,$80,$CB ; PRG:$3747 + .byte $54,$15,$30,$BE,$FF,$FF,$7F,$00 ; PRG:$374F + .byte $00,$00,$FE,$FF,$3F,$A0,$76,$29 ; PRG:$3757 + .byte $55,$55,$53,$D5,$52,$55,$AD,$AA ; PRG:$375F + .byte $55,$AB,$F9,$0F,$AA,$AA,$4A,$A5 ; PRG:$3767 + .byte $52,$01,$FC,$AA,$AA,$AA,$B5,$5A ; PRG:$376F + .byte $F5,$0F,$A9,$AA,$A9,$AA,$52,$A5 ; PRG:$3777 + .byte $4A,$55,$A9,$65,$A9,$AA,$D5,$56 ; PRG:$377F + .byte $AB,$B5,$52,$55,$AA,$22,$55,$29 ; PRG:$3787 + .byte $A5,$4A,$49,$A9,$2A,$51,$D5,$AE ; PRG:$378F + .byte $AD,$6B,$AB,$2A,$8D,$D5,$AA,$2A ; PRG:$3797 + .byte $49,$54,$4A,$24,$A2,$A9,$64,$DB ; PRG:$379F + .byte $AF,$D7,$6B,$55,$AA,$CA,$55,$B5 ; PRG:$37A7 + .byte $14,$91,$2A,$09,$05,$70,$00,$08 ; PRG:$37AF + .byte $44,$60,$30,$18,$E1,$E1,$FF,$CF ; PRG:$37B7 + .byte $41,$E9,$F2,$58,$00,$00,$08,$04 ; PRG:$37BF + .byte $C0,$FF,$FF,$FF,$FF,$01,$00,$F0 ; PRG:$37C7 + .byte $FF,$FF,$07,$00,$F0,$13,$07,$07 ; PRG:$37CF + .byte $F0,$FF,$FF,$FF,$01,$00,$00,$8C ; PRG:$37D7 + .byte $FF,$FF,$03,$B0,$8A,$85,$03,$FC ; PRG:$37DF + .byte $FF,$FF,$FF,$07,$00,$00,$F8,$3D ; PRG:$37E7 + .byte $00,$1E,$1E,$0E,$E2,$FB,$FF,$FF ; PRG:$37EF + .byte $FF,$00,$E0,$E1,$63,$00,$7C,$1C ; PRG:$37F7 + .byte $1C,$E6,$F9,$FF,$FF,$3F,$84,$70 ; PRG:$37FF + .byte $F0,$82,$01,$3E,$0E,$0E,$73,$FC ; PRG:$3807 + .byte $FF,$FF,$FF,$03,$18,$30,$E0,$00 ; PRG:$380F + .byte $1F,$87,$C3,$3C,$3F,$FF,$FF,$FF ; PRG:$3817 + .byte $07,$04,$18,$18,$E0,$E3,$70,$98 ; PRG:$381F + .byte $C7,$F7,$FF,$FF,$FF,$80,$00,$02 ; PRG:$3827 + .byte $03,$7E,$1C,$0E,$73,$F8,$FC,$FF ; PRG:$382F + .byte $FF,$3F,$00,$C0,$60,$C0,$87,$63 ; PRG:$3837 + .byte $C1,$1C,$CF,$FF,$FF,$FF,$07,$00 ; PRG:$383F + .byte $08,$06,$FC,$38,$16,$E6,$78,$FE ; PRG:$3847 + .byte $FF,$FF,$3F,$08,$00,$20,$E0,$C7 ; PRG:$384F + .byte $71,$38,$C7,$E7,$FF,$FF,$FF,$41 ; PRG:$3857 + .byte $00,$00,$81,$1F,$87,$C3,$3C,$9E ; PRG:$385F + .byte $FF,$FF,$FF,$87,$00,$00,$04,$FC ; PRG:$3867 + .byte $2C,$0E,$F7,$78,$FE,$FF,$FF,$1F ; PRG:$386F + .byte $02,$30,$40,$FC,$58,$1C,$E6,$F9 ; PRG:$3877 + .byte $FC,$FF,$FF,$1F,$04,$20,$30,$F0 ; PRG:$387F + .byte $63,$59,$98,$E3,$F3,$FF,$FF,$7F ; PRG:$3887 + .byte $10,$00 ; PRG:$388F +Label_F891: + jmp $F89A ; PRG:$3891 4C 9A F8 +Label_F894: + jmp $F8EF ; PRG:$3894 4C EF F8 +Label_F897: + jmp $F941 ; PRG:$3897 4C 41 F9 +Label_F89A: + lda $D5 ; PRG:$389A A5 D5 + bmi Label_F8DD ; PRG:$389C 30 3F + beq Label_F8C4 ; PRG:$389E F0 24 + ldy #$00 ; PRG:$38A0 A0 00 +Label_F8A2: + lda ($D7),y ; PRG:$38A2 B1 D7 + clc ; PRG:$38A4 18 + adc $DB ; PRG:$38A5 65 DB + sta $DB ; PRG:$38A7 85 DB + bcc Label_F8AD ; PRG:$38A9 90 02 + inc $DC ; PRG:$38AB E6 DC +Label_F8AD: + iny ; PRG:$38AD C8 + bne Label_F8B2 ; PRG:$38AE D0 02 + inc $D8 ; PRG:$38B0 E6 D8 +Label_F8B2: + lda $D8 ; PRG:$38B2 A5 D8 + cmp #$F8 ; PRG:$38B4 C9 F8 + bcc Label_F8C0 ; PRG:$38B6 90 08 + beq Label_F8BC ; PRG:$38B8 F0 02 + bcs Label_F8C5 ; PRG:$38BA B0 09 +Label_F8BC: + cpy #$91 ; PRG:$38BC C0 91 + bcs Label_F8C5 ; PRG:$38BE B0 05 +Label_F8C0: + cpy #$00 ; PRG:$38C0 C0 00 + bne Label_F8A2 ; PRG:$38C2 D0 DE +Label_F8C4: + rts ; PRG:$38C4 60 +Label_F8C5: + lda $F942 ; PRG:$38C5 AD 42 F9 + cmp $DB ; PRG:$38C8 C5 DB + bne Label_F8D8 ; PRG:$38CA D0 0C + lda $F943 ; PRG:$38CC AD 43 F9 + cmp $DC ; PRG:$38CF C5 DC + bne Label_F8D8 ; PRG:$38D1 D0 05 + lda #$00 ; PRG:$38D3 A9 00 + sta $D5 ; PRG:$38D5 85 D5 + rts ; PRG:$38D7 60 +Label_F8D8: + lda #$FF ; PRG:$38D8 A9 FF + sta $D5 ; PRG:$38DA 85 D5 + rts ; PRG:$38DC 60 +Label_F8DD: + lda PPUCTRL ; PRG:$38DD AD 00 20 + and $08 ; PRG:$38E0 25 08 + sta $01 ; PRG:$38E2 85 01 + sta PPUCTRL ; PRG:$38E4 8D 00 20 + sta $07 ; PRG:$38E7 85 07 + sta PPUMASK ; PRG:$38E9 8D 01 20 + pla ; PRG:$38EC 68 + pla ; PRG:$38ED 68 + rti ; PRG:$38EE 40 +Label_F8EF: + lda $D6 ; PRG:$38EF A5 D6 + beq Label_F8C4 ; PRG:$38F1 F0 D1 + bmi Label_F8DD ; PRG:$38F3 30 E8 + lda $04 ; PRG:$38F5 A5 04 + bne Label_F8C4 ; PRG:$38F7 D0 CB + lda $DA ; PRG:$38F9 A5 DA + sta PPUADDR ; PRG:$38FB 8D 06 20 + lda $D9 ; PRG:$38FE A5 D9 + sta PPUADDR ; PRG:$3900 8D 06 20 + lda PPUDATA ; PRG:$3903 AD 07 20 + ldy #$10 ; PRG:$3906 A0 10 +Label_F908: + lda PPUDATA ; PRG:$3908 AD 07 20 + clc ; PRG:$390B 18 + adc $DD ; PRG:$390C 65 DD + sta $DD ; PRG:$390E 85 DD + bcc Label_F914 ; PRG:$3910 90 02 + inc $DE ; PRG:$3912 E6 DE +Label_F914: + dey ; PRG:$3914 88 + bne Label_F908 ; PRG:$3915 D0 F1 + lda $D9 ; PRG:$3917 A5 D9 + clc ; PRG:$3919 18 + adc #$10 ; PRG:$391A 69 10 + sta $D9 ; PRG:$391C 85 D9 + bcc Label_F922 ; PRG:$391E 90 02 + inc $DA ; PRG:$3920 E6 DA +Label_F922: + lda $DA ; PRG:$3922 A5 DA + cmp #$20 ; PRG:$3924 C9 20 + bcs Label_F929 ; PRG:$3926 B0 01 + rts ; PRG:$3928 60 +Label_F929: + lda $F944 ; PRG:$3929 AD 44 F9 + cmp $DD ; PRG:$392C C5 DD + bne Label_F93C ; PRG:$392E D0 0C + lda $F945 ; PRG:$3930 AD 45 F9 + cmp $DE ; PRG:$3933 C5 DE + bne Label_F93C ; PRG:$3935 D0 05 + lda #$00 ; PRG:$3937 A9 00 + sta $D6 ; PRG:$3939 85 D6 + rts ; PRG:$393B 60 +Label_F93C: + lda #$FF ; PRG:$393C A9 FF + sta $D6 ; PRG:$393E 85 D6 + rts ; PRG:$3940 60 +Label_F941: + rts ; PRG:$3941 60 +; ---- data $F942-$FEFF (1470 bytes) ---- +Label_F942: + .byte $4D,$F7,$02,$9D,$48,$4A,$4A,$4A ; PRG:$3942 + .byte $4A,$20,$51,$F9,$68,$29,$0F,$09 ; PRG:$394A + .byte $30,$C9,$3A,$90,$02,$69,$C6,$8D ; PRG:$3952 + .byte $07,$20,$60,$00,$00,$00,$00,$00 ; PRG:$395A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3962 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$396A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3972 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$397A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3982 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$398A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3992 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$399A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$39A2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$39AA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$39B2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$39BA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$39C2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$39CA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$39D2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$39DA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$39E2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$39EA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$39F2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$39FA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3A02 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3A0A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3A12 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3A1A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3A22 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3A2A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3A32 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3A3A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3A42 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3A4A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3A52 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3A5A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3A62 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3A6A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3A72 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3A7A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3A82 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3A8A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3A92 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3A9A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3AA2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3AAA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3AB2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3ABA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3AC2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3ACA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3AD2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3ADA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3AE2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3AEA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3AF2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3AFA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3B02 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3B0A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3B12 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3B1A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3B22 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3B2A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3B32 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3B3A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3B42 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3B4A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3B52 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3B5A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3B62 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3B6A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3B72 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3B7A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3B82 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3B8A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3B92 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3B9A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3BA2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3BAA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3BB2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3BBA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3BC2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3BCA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3BD2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3BDA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3BE2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3BEA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3BF2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3BFA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3C02 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3C0A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3C12 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3C1A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3C22 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3C2A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3C32 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3C3A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3C42 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3C4A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3C52 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3C5A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3C62 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3C6A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3C72 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3C7A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3C82 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3C8A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3C92 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3C9A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3CA2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3CAA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3CB2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3CBA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3CC2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3CCA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3CD2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3CDA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3CE2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3CEA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3CF2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3CFA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3D02 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3D0A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3D12 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3D1A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3D22 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3D2A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3D32 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3D3A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3D42 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3D4A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3D52 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3D5A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3D62 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3D6A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3D72 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3D7A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3D82 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3D8A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3D92 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3D9A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3DA2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3DAA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3DB2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3DBA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3DC2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3DCA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3DD2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3DDA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3DE2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3DEA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3DF2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3DFA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3E02 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3E0A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3E12 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3E1A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3E22 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3E2A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3E32 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3E3A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3E42 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3E4A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3E52 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3E5A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3E62 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3E6A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3E72 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3E7A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3E82 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3E8A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3E92 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3E9A + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3EA2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3EAA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3EB2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3EBA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3EC2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3ECA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3ED2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3EDA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3EE2 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3EEA + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3EF2 + .byte $00,$00,$00,$00,$00,$00 ; PRG:$3EFA +Label_FF00: + ldx #$FF ; PRG:$3F00 A2 FF + txs ; PRG:$3F02 9A + sei ; PRG:$3F03 78 + cld ; PRG:$3F04 D8 + lda #$00 ; PRG:$3F05 A9 00 + sta PPUCTRL ; PRG:$3F07 8D 00 20 + sta PPUMASK ; PRG:$3F0A 8D 01 20 + lda #$30 ; PRG:$3F0D A9 30 + jsr $FF49 ; PRG:$3F0F 20 49 FF + jsr $FF57 ; PRG:$3F12 20 57 FF + bcc Label_FF2F ; PRG:$3F15 90 18 + lda #$10 ; PRG:$3F17 A9 10 + jsr $FF49 ; PRG:$3F19 20 49 FF + lda #$30 ; PRG:$3F1C A9 30 + jsr $FF49 ; PRG:$3F1E 20 49 FF + jsr $FF4C ; PRG:$3F21 20 4C FF + jsr $FF4C ; PRG:$3F24 20 4C FF + lda #$10 ; PRG:$3F27 A9 10 + jsr $FF49 ; PRG:$3F29 20 49 FF + jmp $FF3E ; PRG:$3F2C 4C 3E FF +Label_FF2F: + lda #$20 ; PRG:$3F2F A9 20 + jsr $FF49 ; PRG:$3F31 20 49 FF + lda #$30 ; PRG:$3F34 A9 30 + jsr $FF49 ; PRG:$3F36 20 49 FF + lda #$20 ; PRG:$3F39 A9 20 + jsr $FF49 ; PRG:$3F3B 20 49 FF +Label_FF3E: + lda #$30 ; PRG:$3F3E A9 30 + jsr $FF49 ; PRG:$3F40 20 49 FF + jsr $FF69 ; PRG:$3F43 20 69 FF + jmp $C800 ; PRG:$3F46 4C 00 C8 +Label_FF49: + sta $4100 ; PRG:$3F49 8D 00 41 +Label_FF4C: + ldy #$04 ; PRG:$3F4C A0 04 +Label_FF4E: + ldx #$CE ; PRG:$3F4E A2 CE +Label_FF50: + dex ; PRG:$3F50 CA + bne Label_FF50 ; PRG:$3F51 D0 FD + dey ; PRG:$3F53 88 + bne Label_FF4E ; PRG:$3F54 D0 F8 + rts ; PRG:$3F56 60 +Label_FF57: + lda #$41 ; PRG:$3F57 A9 41 + cmp $0120 ; PRG:$3F59 CD 20 01 + bne Label_FF67 ; PRG:$3F5C D0 09 + lda #$56 ; PRG:$3F5E A9 56 + cmp $0121 ; PRG:$3F60 CD 21 01 + bne Label_FF67 ; PRG:$3F63 D0 02 + sec ; PRG:$3F65 38 + rts ; PRG:$3F66 60 +Label_FF67: + clc ; PRG:$3F67 18 + rts ; PRG:$3F68 60 +Label_FF69: + lda #$41 ; PRG:$3F69 A9 41 + sta $0120 ; PRG:$3F6B 8D 20 01 + lda #$56 ; PRG:$3F6E A9 56 + sta $0121 ; PRG:$3F70 8D 21 01 + rts ; PRG:$3F73 60 +; ---- data $FF74-$FFF9 (134 bytes) ---- +Label_FF74: + .byte $A9,$00,$8D,$20,$01,$8D,$21,$01 ; PRG:$3F74 + .byte $60,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3F7C + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3F84 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3F8C + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3F94 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3F9C + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3FA4 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3FAC + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3FB4 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3FBC + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3FC4 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3FCC + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3FD4 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3FDC + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3FE4 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; PRG:$3FEC + .byte $00,$00,$00,$00,$00,$00 ; PRG:$3FF4 +; ---- iNES vectors (PRG $3FFA-$3FFF) ---- +Label_FFFA: + .word Label_D72E ; PRG:$3FFA 2E D7 NMI + .word Label_FF00 ; PRG:$3FFC 00 FF RESET + .word Label_FF00 ; PRG:$3FFE 00 FF IRQ diff --git a/_wip/Pyramid (U)/copilot/prg.s.skeleton b/_wip/Pyramid (U)/copilot/prg.s.skeleton new file mode 100644 index 0000000..4c7d459 --- /dev/null +++ b/_wip/Pyramid (U)/copilot/prg.s.skeleton @@ -0,0 +1,12 @@ +; Pyramid (U) NES disassembly - Pass 1 (skeleton) +; Generated from the supplied 16 KiB PRG image. +; Pass 1 classifies recursively reachable code, inline address tables, vectors, +; and untraced/data regions. All PRG data bytes are emitted explicitly with .byte directives. + +.setcpu "6502" + +.include "symbols.inc" +.include "locals.inc" + +.segment "PRG" +.incbin "prg.bin", $0000, $4000