diff --git a/.gitignore b/.gitignore index f67c9b2..c8908a3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ ROMS/* **/*.o +_tools/__pycache__/ +__pycache__/ +*.pyc diff --git a/AGENTS.md b/AGENTS.md index 37116ad..042ca60 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -2,29 +2,44 @@ ## What this repo is -Eleven AI-generated disassemblies of NES ROMs. The contract (stated in `PROMPTS.md` and verified by `make` in every `copilot/` folder) is **byte-identical rebuilds**: `reconstructed.nes` must match the original ROM exactly. Not for distribution (`README.md`). +Thirty-six AI-generated disassemblies of NES ROMs: 16 promoted to top-level folders and 20 skeletons still under `_wip/`. The contract (stated in `PROMPTS.md` and verified by `make` in every `copilot/` folder) is **byte-identical rebuilds**: `reconstructed.nes` must match the original ROM exactly. Not for distribution (`README.md`). ## Layout -- Each project owns a folder with a `copilot/` build dir (`prg.s`, `header.s`, `chr.s`, `linker.cfg`, `symbols.inc`, `locals.inc`, `Makefile`, and a copy/symlink `rom.nes`) and a per-project `OVERVIEW.md` at the folder root (power-on flow analysis). -- Root `OVERVIEW.md` is the index: vectors, build fixes, and summary for all 11 projects. **Keep it in sync** when a project changes — its DK Jr. entries drifted badly before being corrected. -- `PROMPTS.md` is the workflow contract. `default_project.tar.gz` is the empty-project skeleton (prg.s, symbols.inc, linker.cfg, Makefile, locals.inc). `_ROMS/` is the master ROM store; `_tools/` has `splitnes.py` and `chr2gif.py`. +- Each project owns a folder with a `copilot/` build dir (`prg.s`, `header.s`, `chr.s`, `linker.cfg`, `symbols.inc`, `locals.inc`, `Makefile`, and a copy/symlink `rom.nes`) and a per-project `OVERVIEW.md` at the folder root (power-on flow analysis). Some older ones use `main.s` instead of `prg.s`, and a few lack `prg.bin` (carve the PRG out of `rom.nes` instead). +- Root `OVERVIEW.md` is the index: vectors, build fixes, and summary for all 36 projects. **Keep it in sync** when a project changes — its DK Jr. entries drifted badly before being corrected, and its vector column later turned out to have five rows wrong from copy-paste duplication. +- `TODO.md` is the handoff: open work per project, plus the gotchas that cost real time. Read it before starting anything non-trivial. +- `PROMPTS.md` is the workflow contract. `default_project.tar.gz` is the empty-project skeleton (prg.s, symbols.inc, linker.cfg, Makefile, locals.inc). `_ROMS/` is the master ROM store. +- `_tools/`: `nesdis.py` (Pass 1 tracer), `pass2.py` and `bytecode_dis.py` (Pass 2/3 emitters), `trace_stage_payload.py` (py65-based runtime tracer), `verify_pass1.py` (rebuild + re-trace check across all projects), `splitnes.py`, `chr2gif.py`. ## Commands ```bash cd "/copilot" && make # builds reconstructed.nes, then cmp vs rom.nes +python3 _tools/verify_pass1.py # rebuilds and re-traces every project ``` `make`'s default target includes the byte-identity `cmp` — a build that doesn't print "Byte-identical ROM verified." is a failure. Requires `ca65`/`ld65` on PATH. +**There are two build tiers, and the difference is real.** Top-level projects compare the whole ROM against `copilot/rom.nes`. The 20 `_wip/` projects only run `cmp reconstructed_prg.bin prg.bin`, so their **header and CHR are not proven** — do not describe them as byte-identical to the ROM. + +## Promoting a project out of `_wip/` + +1. `git mv "_wip/" ""` — the relative `copilot/rom.nes -> ../.nes` symlink survives untouched. +2. Add `copilot/rom.nes` (a space-free copy or symlink of the original) and switch the Makefile from `cmp reconstructed_prg.bin prg.bin` to `cmp reconstructed.nes rom.nes`. +3. Change `../../../_tools/` to `../../_tools/` in the Makefile — the depth changed by one. +4. Verify `make`, then `make regen` if a regen pipeline exists. +5. Add it to the root inventory table and re-number the `_wip` rows. + + ## Irreversible conventions (do not "clean up" past these) -- Every instruction carries a trailing `; PRG:$xxxx AA BB` comment with PRG offset and exact emitted bytes. This is the byte-identity audit trail — preserve it even while renaming labels or restructuring files. +- Every instruction carries a trailing audit comment with its CPU address, PRG offset and exact emitted bytes. The dominant spelling is `; CPU:$C123 PRG:0123 AD 21 03`, but **five other spellings are in use across the repo** and Excitebike and Pac-Man have no byte comments at all. This is the byte-identity audit trail — preserve whatever spelling a file uses even while renaming labels or restructuring files. See the TODO in root `OVERVIEW.md` for closing the gap. - Unreached/unresolved bytes stay as data (`Label_/Data/` `.byte` or `.incbin` blocks with ROM provenance), never deleted or reformatted. - Routine headers follow the template in `prg.s`: global + local description, parameters, returns, clobbers. -- Two separate symbol files: `symbols.inc` = NES hardware constants only; `locals.inc` = zero-page and forward references. Unresolved zero-page bytes keep neutral `ZpXX` names rather than speculative names. -- Pass discipline: Pass 1 = code/data split (stop for review), Pass 2 = label replacement, Pass 3 = semantic naming of data tables/structures. Do not skip straight to guessy rewrites. +- Two separate symbol files: `symbols.inc` = NES hardware constants only; `locals.inc` = zero-page and forward references. Unresolved zero-page bytes keep neutral `ZpXX` names rather than speculative names. Proven semantic names may sit *beside* the generated `ZpXX` entries as aliases. +- Pass discipline: Pass 1 = code/data split (stop for review), Pass 2 = label replacement, Pass 3 = semantic naming of data tables/structures. Do not skip straight to guessy rewrites. When a pass is only partly achievable, record the residue and why rather than inventing names. +- `make regen` (where it exists, e.g. MUSCLE) must keep reproducing `prg.s` byte-for-byte on the standard library alone. Re-check it after any `nesdis.py` change. ## Hard-won quirks (details in root `OVERVIEW.md` per-project "Build fix") @@ -33,5 +48,22 @@ cd "/copilot" && make # builds reconstructed.nes, then cmp vs rom.nes - 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. +- ROM filenames contain spaces **and parentheses** (e.g. `M.U.S.C.L.E. (U).nes`); builds `incbin` a space-free `rom.nes` inside `copilot/`. Keep that copy/symlink working and don't rename it. Note that a name with spaces/parens is also what makes FCEUX hang headless — symlink it to a clean name and run under Xvfb. - `.gitignore` contains `ROMS/*` but the actual directory is `_ROMS` — the pattern matches nothing, so ROM binaries stay tracked. Check before committing large blobs. + +## Tracer and toolchain gotchas (2026-10-17) + +Full detail and reasoning in `TODO.md`. These are the ones that silently corrupt results rather than failing loudly. + +- **Undocumented opcodes silently truncate a trace.** A tracer that knows only the 151 official opcodes halts on the first one used as ordinary code. Joypad Test Cartridge died at `$C09E` on `DCP $3C20` (`$CF`) and filed **3,256 bytes of real code as `.byte`**. `nesdis.py --undocumented` decodes all 105 (default **off**, so existing `make regen` pipelines stay byte-stable). +- **ca65 V2.19 implements none of the undocumented opcodes**, so they cannot be written as mnemonics. `nesdis.py` emits them as explicit `.byte` with the disassembly in the comment — that keeps them in the code region, so both the split and the audit trail survive. ca65 is also happy to accept plain `nop`, which is official (`0xEA`). +- **Vectors are not in the iNES header.** They are the three little-endian words at the *end* of the 16 KB PRG (`$FFFA–$FFFF` in the `$C000` mirror). Header bytes 0–9 carry only sizes, mirroring and mapper. Parsing them from `header.bin` as if they were header fields yields garbage. +- **RESET and IRQ are usually the same address.** The semantic-name map must not overwrite on collision, or the primary entry gets renamed to `IrqHandler`. Use `setdefault` in RESET/NMI/IRQ priority order. +- **Control-flow targets must win over fall-through.** A fall-through decode whose *operand* spans an address that another path branches to is the wrong decode — no assembler branches mid-instruction. Mario Bros had a `bne` at `$C4BA` targeting `$C528` swallowed by a `NOP #$A5` at `$C527`. +- **Branch targets inside a surviving instruction must be pruned** from the target set, or the emitter's linear walk consumes those bytes as an operand, the label is referenced but never defined, and **the file does not assemble at all**. +- **A plain vector trace reaches only ~15% of a real game.** Almost everything sits behind computed dispatch. Look for `jmp ($xx)`, and for dispatchers that pop the table address with `pla` — that form cannot be followed from the dispatcher because the pointer is only knowable in the caller's frame (Mario Bros `$CD9E`). Probing a suspected data region linearly with `nesdis.py --probe` is cheap and settles whether it is code; `--auto-seed` plus a couple of `--extra-seed` addresses took Mario Bros from 14.6% to 72.2%. +- **When emulating to trace, NMI must fire once per frame, not per `$2002` read.** The main loop polls `$2002` to sync on vblank, and each read clears bit 7, re-arming NMI within the same scanline. Guarding on the vblank flag alone gave **40,900 NMIs across 3,000 frames** and flattened coverage at 26%. +- **Controller input goes on joy1 = `$4016`** with a real latch/shift register. The poll routine's `lda $4016,X` with X=1 lands on `$4017`, but only bits 0–1 are compared, so driving `$4017` consumes nothing and changes no coverage at all. +- **`ca65 -l` listings contain no source line numbers** — they emit `r `. You cannot key listing entries back to source lines, and the listing prints `rr rr` for relocatable words, so byte values must come from `prg.bin`. +- **py65 is not a build dependency.** Unpack on demand (`pip download --no-deps py65`, then `unzip` into a lib dir; `PY65LIB` env var points at it). `/tmp` is volatile — a reboot wiped it mid-session. Anything reusable belongs in `_tools/`. + diff --git a/Excitebike (JU)/copilot/prg.s b/Excitebike (JU)/copilot/prg.s index 915603d..a3ab79a 100644 --- a/Excitebike (JU)/copilot/prg.s +++ b/Excitebike (JU)/copilot/prg.s @@ -130,20 +130,20 @@ RIDER_MOTION_COMPLETE = $04 ; --------------------------------------------------------------------------- NmiStateHandlerTable: - .word NmiState00 ; state $00 - .word $C395 ; state $01 - .word UpdateGameplayRuntime ; state $02 - .word DispatchNmiSequenceStep ; state $03 - .word NmiState04_07 ; state $04 - .word UpdateGameplayRuntime ; state $05 - .word DispatchNmiSequenceStep ; state $06 - .word NmiState04_07 ; state $07 - .word $C3BD ; state $08 - .word UpdateRaceRuntime ; state $09 - .word UpdateGameplayRuntime ; state $0A - .word DispatchNmiSequenceStep ; state $0B - .word $C43D ; state $0C - .word $C41C ; state $0D + .word NmiState00 ; state $00 ; CPU:$C000 PRG:0000 46 C3 + .word $C395 ; state $01 ; CPU:$C002 PRG:0002 95 C3 + .word UpdateGameplayRuntime ; state $02 ; CPU:$C004 PRG:0004 9A C9 + .word DispatchNmiSequenceStep ; state $03 ; CPU:$C006 PRG:0006 2C CB + .word NmiState04_07 ; state $04 ; CPU:$C008 PRG:0008 65 C4 + .word UpdateGameplayRuntime ; state $05 ; CPU:$C00A PRG:000A 9A C9 + .word DispatchNmiSequenceStep ; state $06 ; CPU:$C00C PRG:000C 2C CB + .word NmiState04_07 ; state $07 ; CPU:$C00E PRG:000E 65 C4 + .word $C3BD ; state $08 ; CPU:$C010 PRG:0010 BD C3 + .word UpdateRaceRuntime ; state $09 ; CPU:$C012 PRG:0012 7C C9 + .word UpdateGameplayRuntime ; state $0A ; CPU:$C014 PRG:0014 9A C9 + .word DispatchNmiSequenceStep ; state $0B ; CPU:$C016 PRG:0016 2C CB + .word $C43D ; state $0C ; CPU:$C018 PRG:0018 3D C4 + .word $C41C ; state $0D ; CPU:$C01A PRG:001A 1C C4 ; --------------------------------------------------------------------------- ; $C01C-$C029 @@ -152,18 +152,18 @@ NmiStateHandlerTable: ; --------------------------------------------------------------------------- NmiStateToSequenceIndex: - .byte $00, $01, $02, $03 - .byte $04, $02, $03, $04 - .byte $06, $05, $02, $03 - .byte $07, $08 + .byte $00, $01, $02, $03 ; CPU:$C01C PRG:001C 00 01 02 03 + .byte $04, $02, $03, $04 ; CPU:$C020 PRG:0020 04 02 03 04 + .byte $06, $05, $02, $03 ; CPU:$C024 PRG:0024 06 05 02 03 + .byte $07, $08 ; CPU:$C028 PRG:0028 07 08 ; --------------------------------------------------------------------------- ; $C02A-$C032 ; Low bytes of nine NMI sequence pointers. ; --------------------------------------------------------------------------- NmiSequencePointerLow: - .byte $3C, $40, $46, $52, $5C - .byte $64, $70, $7A, $76 + .byte $3C, $40, $46, $52, $5C ; CPU:$C02A PRG:002A 3C 40 46 52 + .byte $64, $70, $7A, $76 ; CPU:$C02F PRG:002F 64 70 7A 76 ; --------------------------------------------------------------------------- ; $C033-$C03B @@ -173,8 +173,8 @@ NmiSequencePointerLow: ; --------------------------------------------------------------------------- NmiSequencePointerHigh: - .byte $C0, $C0, $C0, $C0, $C0 - .byte $C0, $C0, $C0, $C0 + .byte $C0, $C0, $C0, $C0, $C0 ; CPU:$C033 PRG:0033 C0 C0 C0 C0 + .byte $C0, $C0, $C0, $C0 ; CPU:$C038 PRG:0038 C0 C0 C0 C0 ; --------------------------------------------------------------------------- @@ -188,64 +188,64 @@ NmiSequencePointerHigh: ; Sequence index 0 ; $C03C-$C03F NmiSequence0C03C: - .word $C2BD - .word $C514 + .word $C2BD ; CPU:$C03C PRG:003C BD C2 + .word $C514 ; CPU:$C03E PRG:003E 14 C5 ; Sequence index 1 ; $C040-$C045 NmiSequence1C040: - .word SetSerialUpdateSelector06 - .word $C3F3 - .word $C514 + .word SetSerialUpdateSelector06 ; CPU:$C040 PRG:0040 5E C5 + .word $C3F3 ; CPU:$C042 PRG:0042 F3 C3 + .word $C514 ; CPU:$C044 PRG:0044 14 C5 ; Sequence index 2 ; $C046-$C051 NmiSequence2C046: - .word SerialUpdateSelectorCluster - .word ClearRuntimeZeroPage - .word InitializeCourseRuntime - .word SetSerialUpdateSelector17 - .word SetSerialUpdateSelector0E - .word InitializeGameRuntime + .word SerialUpdateSelectorCluster ; CPU:$C046 PRG:0046 51 C5 + .word ClearRuntimeZeroPage ; CPU:$C048 PRG:0048 69 C8 + .word InitializeCourseRuntime ; CPU:$C04A PRG:004A 20 C8 + .word SetSerialUpdateSelector17 ; CPU:$C04C PRG:004C A3 C5 + .word SetSerialUpdateSelector0E ; CPU:$C04E PRG:004E 66 C5 + .word InitializeGameRuntime ; CPU:$C050 PRG:0050 75 C8 ; Sequence index 3 ; $C052-$C05B NmiSequence3C052: - .word SetSerialUpdateSelector06 - .word SetSerialUpdateSelector04 - .word SelectNmiUpdateForState - .word CallC92CWithZero - .word CompareAndUpdateRecord + .word SetSerialUpdateSelector06 ; CPU:$C052 PRG:0052 5E C5 + .word SetSerialUpdateSelector04 ; CPU:$C054 PRG:0054 6A C5 + .word SelectNmiUpdateForState ; CPU:$C056 PRG:0056 55 C4 + .word CallC92CWithZero ; CPU:$C058 PRG:0058 A7 C5 + .word CompareAndUpdateRecord ; CPU:$C05A PRG:005A 85 C4 ; Sequence index 4 ; $C05C-$C063 NmiSequence4C05C: - .word SetSerialUpdateSelector06 - .word SetSerialUpdateSelector09 - .word Prepare0300Structure - .word $C514 + .word SetSerialUpdateSelector06 ; CPU:$C05C PRG:005C 5E C5 + .word SetSerialUpdateSelector09 ; CPU:$C05E PRG:005E 71 C5 + .word Prepare0300Structure ; CPU:$C060 PRG:0060 AC C5 + .word $C514 ; CPU:$C062 PRG:0062 14 C5 ; Sequence index 5 ; $C064-$C06F NmiSequence5C064: - .word $C551 - .word ClearRuntimeZeroPage - .word InitializeCourseRuntime - .word SetSerialUpdateSelector17 - .word $C562 - .word $C5C2 + .word $C551 ; CPU:$C064 PRG:0064 51 C5 + .word ClearRuntimeZeroPage ; CPU:$C066 PRG:0066 69 C8 + .word InitializeCourseRuntime ; CPU:$C068 PRG:0068 20 C8 + .word SetSerialUpdateSelector17 ; CPU:$C06A PRG:006A A3 C5 + .word $C562 ; CPU:$C06C PRG:006C 62 C5 + .word $C5C2 ; CPU:$C06E PRG:006E C2 C5 ; Sequence index 6 ; $C070-$C075 NmiSequence6C070: - .word SetSerialUpdateSelector06 - .word $C575 - .word $C514 + .word SetSerialUpdateSelector06 ; CPU:$C070 PRG:0070 5E C5 + .word $C575 ; CPU:$C072 PRG:0072 75 C5 + .word $C514 ; CPU:$C074 PRG:0074 14 C5 ; Sequence index 8 @@ -253,16 +253,16 @@ NmiSequence6C070: ; ; Note that sequence index 8 points here, while index 7 points to $C07A. NmiSequence8C076: - .word $C582 - .word $C518 + .word $C582 ; CPU:$C076 PRG:0076 82 C5 + .word $C518 ; CPU:$C078 PRG:0078 18 C5 ; Sequence index 7 ; $C07A-$C07F NmiSequence7C07A: - .word ClearRuntimeZeroPage - .word RestoreWorkingRecordFields - .word $C518 + .word ClearRuntimeZeroPage ; CPU:$C07A PRG:007A 69 C8 + .word RestoreWorkingRecordFields ; CPU:$C07C PRG:007C 86 C5 + .word $C518 ; CPU:$C07E PRG:007E 18 C5 ; --------------------------------------------------------------------------- @@ -272,7 +272,7 @@ NmiSequence7C07A: ; --------------------------------------------------------------------------- MenuInitialYTable: - .byte $80, $90, $A0 + .byte $80, $90, $A0 ; CPU:$C080 PRG:0080 80 90 A0 ; --------------------------------------------------------------------------- ; $C083-$C087 @@ -281,7 +281,7 @@ MenuInitialYTable: ; --------------------------------------------------------------------------- MenuHorizontalXTableC083: - .byte $48, $60, $78, $90, $A8 + .byte $48, $60, $78, $90, $A8 ; CPU:$C083 PRG:0083 48 60 78 90 ; --------------------------------------------------------------------------- @@ -291,7 +291,7 @@ MenuHorizontalXTableC083: ; --------------------------------------------------------------------------- Sprite0InitialXTableC088: - .byte $50, $48, $4C + .byte $50, $48, $4C ; CPU:$C088 PRG:0088 50 48 4C ; --------------------------------------------------------------------------- ; $C08B-$C08F @@ -300,7 +300,7 @@ Sprite0InitialXTableC088: ; --------------------------------------------------------------------------- MenuVerticalYTableC08B: - .byte $30, $48, $78, $90, $A8 + .byte $30, $48, $78, $90, $A8 ; CPU:$C08B PRG:008B 30 48 78 90 ; --------------------------------------------------------------------------- ; $C090 @@ -309,7 +309,7 @@ MenuVerticalYTableC08B: ; --------------------------------------------------------------------------- DataC090: - .byte $C0 + .byte $C0 ; CPU:$C090 PRG:0090 C0 ; --------------------------------------------------------------------------- @@ -321,16 +321,16 @@ DataC090: ; --------------------------------------------------------------------------- PersistentRecordInitialDataC091: - .byte $01, $10, $00 - .byte $01, $10, $00 - .byte $01, $10, $00 - .byte $01, $0C, $00 - .byte $01, $06, $00 - .byte $00, $01, $18, $00 - .byte $01, $16, $00 - .byte $01, $0A, $00 - .byte $01, $14, $00 - .byte $01, $06, $00 + .byte $01, $10, $00 ; CPU:$C091 PRG:0091 01 10 00 + .byte $01, $10, $00 ; CPU:$C094 PRG:0094 01 10 00 + .byte $01, $10, $00 ; CPU:$C097 PRG:0097 01 10 00 + .byte $01, $0C, $00 ; CPU:$C09A PRG:009A 01 0C 00 + .byte $01, $06, $00 ; CPU:$C09D PRG:009D 01 06 00 + .byte $00, $01, $18, $00 ; CPU:$C0A0 PRG:00A0 00 01 18 00 + .byte $01, $16, $00 ; CPU:$C0A4 PRG:00A4 01 16 00 + .byte $01, $0A, $00 ; CPU:$C0A7 PRG:00A7 01 0A 00 + .byte $01, $14, $00 ; CPU:$C0AA PRG:00AA 01 14 00 + .byte $01, $06, $00 ; CPU:$C0AD PRG:00AD 01 06 00 ; --------------------------------------------------------------------------- ; $C0B0-$C0D7 @@ -338,58 +338,58 @@ PersistentRecordInitialDataC091: ; --------------------------------------------------------------------------- DataC0B0: - .byte $09, $0B, $0D, $0F + .byte $09, $0B, $0D, $0F ; CPU:$C0B0 PRG:00B0 09 0B 0D 0F DataC0B4: - .byte $0E, $1A, $26, $32 + .byte $0E, $1A, $26, $32 ; CPU:$C0B4 PRG:00B4 0E 1A 26 32 DataC0B8: - .byte $38, $48, $58, $68 + .byte $38, $48, $58, $68 ; CPU:$C0B8 PRG:00B8 38 48 58 68 ; $C0BC ; Added to $90,X by the CE29 position helper. SlotPositionAddTableC0BC: - .byte $18, $3F, $28, $20 + .byte $18, $3F, $28, $20 ; CPU:$C0BC PRG:00BC 18 3F 28 20 ; $C0C0 DataC0C0: - .byte $28, $38, $0C, $00 + .byte $28, $38, $0C, $00 ; CPU:$C0C0 PRG:00C0 28 38 0C 00 ; $C0C4 DataC0C4: - .byte $3C, $1C, $C0, $7F + .byte $3C, $1C, $C0, $7F ; CPU:$C0C4 PRG:00C4 3C 1C C0 7F ; $C0C8 ; Indexed by ($B0,X >> 1), compared against $AC,X. SlotACTargetTableC0C8: - .byte $06, $02 + .byte $06, $02 ; CPU:$C0C8 PRG:00C8 06 02 ; $C0CA ; Alternate $AC,X target view. SlotACAlternateTargetTable: - .byte $0A, $0B + .byte $0A, $0B ; CPU:$C0CA PRG:00CA 0A 0B ; $C0CC ; Indexed by ($B0,X >> 1), compared against $90,X. SlotPositionThresholdTable: - .byte $01, $B0 + .byte $01, $B0 ; CPU:$C0CC PRG:00CC 01 B0 ; $C0CE ; Paired with $C0D1 by the CE29 boundary helper. ; Also used as the $20 BIT mask by UpdateMenuSelection. Slot90BoundaryTable: - .byte $20, $40, $7F + .byte $20, $40, $7F ; CPU:$C0CE PRG:00CE 20 40 7F ; $C0D1 ; Paired with $Slot90BoundaryTable and loaded into $94,X. Slot94BoundaryTable: - .byte $03, $03, $01 + .byte $03, $03, $01 ; CPU:$C0D1 PRG:00D1 03 03 01 ; $C0D4 ; Indexed by ($B0,X >> 1) and stored into $26,X. SlotTimerReloadTable: - .byte $06, $04, $40, $58 + .byte $06, $04, $40, $58 ; CPU:$C0D4 PRG:00D4 06 04 40 58 ; --------------------------------------------------------------------------- ; $C0D8-$C0D9 @@ -397,7 +397,7 @@ SlotTimerReloadTable: ; --------------------------------------------------------------------------- DataC0D8: - .byte $48, $48 + .byte $48, $48 ; CPU:$C0D8 PRG:00D8 48 48 ; --------------------------------------------------------------------------- ; $C0DA-$C0DD @@ -405,19 +405,19 @@ DataC0D8: ; Used by StateSequenceStep2Process and SequenceSetupLoadIndexedParameters. ; --------------------------------------------------------------------------- SequencePositionTable: - .byte $78, $70, $80, $B0 + .byte $78, $70, $80, $B0 ; CPU:$C0DA PRG:00DA 78 70 80 B0 ; --------------------------------------------------------------------------- ; $C0DE-$C0E1 ; Four-entry sequence limit/parameter table. ; --------------------------------------------------------------------------- SequenceLimitTable: - .byte $37, $3F, $3F, $47 + .byte $37, $3F, $3F, $47 ; CPU:$C0DE PRG:00DE 37 3F 3F 47 ; --------------------------------------------------------------------------- ; $C0E2-$C0E4 ; Three-entry parameter table loaded into $02. ; --------------------------------------------------------------------------- SequenceParameter02Table: - .byte $B7, $B9, $B9 + .byte $B7, $B9, $B9 ; CPU:$C0E2 PRG:00E2 B7 B9 B9 ; --------------------------------------------------------------------------- @@ -426,7 +426,7 @@ SequenceParameter02Table: ; --------------------------------------------------------------------------- SequenceFlagsTable: - .byte $01, $01, $41 + .byte $01, $01, $41 ; CPU:$C0E5 PRG:00E5 01 01 41 ; --------------------------------------------------------------------------- @@ -435,7 +435,7 @@ SequenceFlagsTable: ; --------------------------------------------------------------------------- SequencePointerOffsetTable: - .byte $04, $0C, $14, $1C + .byte $04, $0C, $14, $1C ; CPU:$C0E8 PRG:00E8 04 0C 14 1C ; --------------------------------------------------------------------------- ; $C0EC-$C0F5 @@ -447,11 +447,11 @@ SequencePointerOffsetTable: ; --------------------------------------------------------------------------- IndexedParameterTableC0EC: - .byte $21 + .byte $21 ; CPU:$C0EC PRG:00EC 21 ; Secondary overlapping indexed view at $C0ED. IndexedParameterTableC0ED: - .byte $F2, $23, $43, $22, $32, $22, $8C, $24, $CF + .byte $F2, $23, $43, $22, $32, $22, $8C, $24, $CF ; CPU:$C0ED PRG:00ED F2 23 43 22 ; --------------------------------------------------------------------------- @@ -460,10 +460,10 @@ IndexedParameterTableC0ED: ; --------------------------------------------------------------------------- PpuUpdatePointerLow: - .byte $01, $70, $4B, $D4, $17, $4A, $3A, $9E - .byte $B4, $96, $C8, $DE, $EF, $05, $24, $FA - .byte $23, $14, $D6, $E9, $FC, $0F, $22, $35 - .byte $50, $31, $A1 + .byte $01, $70, $4B, $D4, $17, $4A, $3A, $9E ; CPU:$C0F6 PRG:00F6 01 70 4B D4 + .byte $B4, $96, $C8, $DE, $EF, $05, $24, $FA ; CPU:$C0FE PRG:00FE B4 96 C8 DE + .byte $23, $14, $D6, $E9, $FC, $0F, $22, $35 ; CPU:$C106 PRG:0106 23 14 D6 E9 + .byte $50, $31, $A1 ; CPU:$C10E PRG:010E 50 31 A1 ; --------------------------------------------------------------------------- @@ -472,10 +472,10 @@ PpuUpdatePointerLow: ; --------------------------------------------------------------------------- PpuUpdatePointerHigh: - .byte $03, $D4, $D6, $D6, $D7, $D8, $D6, $D5 - .byte $D5, $D7, $D5, $D5, $D5, $D6, $D5, $D7 - .byte $D6, $D6, $D3, $D3, $D3, $D4, $D4, $D4 - .byte $D4, $D6, $00 + .byte $03, $D4, $D6, $D6, $D7, $D8, $D6, $D5 ; CPU:$C111 PRG:0111 03 D4 D6 D6 + .byte $D5, $D7, $D5, $D5, $D5, $D6, $D5, $D7 ; CPU:$C119 PRG:0119 D5 D7 D5 D5 + .byte $D6, $D6, $D3, $D3, $D3, $D4, $D4, $D4 ; CPU:$C121 PRG:0121 D6 D6 D3 D3 + .byte $D4, $D6, $00 ; CPU:$C129 PRG:0129 D4 D6 00 ; --------------------------------------------------------------------------- ; $C12C-$C12F @@ -483,7 +483,7 @@ PpuUpdatePointerHigh: ; --------------------------------------------------------------------------- NmiSequenceStepPointerLow: - .byte $3B, $77, $A4, $6B + .byte $3B, $77, $A4, $6B ; CPU:$C12C PRG:012C 3B 77 A4 6B ; --------------------------------------------------------------------------- @@ -492,7 +492,7 @@ NmiSequenceStepPointerLow: ; --------------------------------------------------------------------------- NmiSequenceStepPointerHigh: - .byte $CB, $CB, $CB, $CC + .byte $CB, $CB, $CB, $CC ; CPU:$C130 PRG:0130 CB CB CB CC ; --------------------------------------------------------------------------- ; $C134-$C13B @@ -501,8 +501,8 @@ NmiSequenceStepPointerHigh: ; --------------------------------------------------------------------------- StateSequenceStep2Template: - .byte $00, $FC, $FC, $FC - .byte $79, $04, $72, $22 + .byte $00, $FC, $FC, $FC ; CPU:$C134 PRG:0134 00 FC FC FC + .byte $79, $04, $72, $22 ; CPU:$C138 PRG:0138 79 04 72 22 ; --------------------------------------------------------------------------- @@ -511,7 +511,7 @@ StateSequenceStep2Template: ; --------------------------------------------------------------------------- Prepare0300StructureTemplateC13C: - .byte $04, $21, $6F, $01, $00, $00 + .byte $04, $21, $6F, $01, $00, $00 ; CPU:$C13C PRG:013C 04 21 6F 01 ; --------------------------------------------------------------------------- @@ -521,7 +521,7 @@ Prepare0300StructureTemplateC13C: ; --------------------------------------------------------------------------- DataC142: - .byte $60, $9F, $00, $17, $04 + .byte $60, $9F, $00, $17, $04 ; CPU:$C142 PRG:0142 60 9F 00 17 ; --------------------------------------------------------------------------- @@ -531,9 +531,9 @@ DataC142: ; --------------------------------------------------------------------------- Initialize02C0EntryTableC147: - .byte $DE, $DC, $E1 - .byte $F8, $FC, $EF - .byte $E1, $EE, $C9 + .byte $DE, $DC, $E1 ; CPU:$C147 PRG:0147 DE DC E1 + .byte $F8, $FC, $EF ; CPU:$C14A PRG:014A F8 FC EF + .byte $E1, $EE, $C9 ; CPU:$C14D PRG:014D E1 EE C9 ; --------------------------------------------------------------------------- @@ -543,8 +543,8 @@ Initialize02C0EntryTableC147: ; --------------------------------------------------------------------------- Copy02C0TemplateC150: - .byte $44, $C9, $00, $84 - .byte $44, $F9, $00, $74 + .byte $44, $C9, $00, $84 ; CPU:$C150 PRG:0150 44 C9 00 84 + .byte $44, $F9, $00, $74 ; CPU:$C154 PRG:0154 44 F9 00 74 ; --------------------------------------------------------------------------- @@ -553,8 +553,8 @@ Copy02C0TemplateC150: ; --------------------------------------------------------------------------- DataC158: - .byte $07, $23, $78, $04 - .byte $1D, $F8, $FE, $FE + .byte $07, $23, $78, $04 ; CPU:$C158 PRG:0158 07 23 78 04 + .byte $1D, $F8, $FE, $FE ; CPU:$C15C PRG:015C 1D F8 FE FE ; --------------------------------------------------------------------------- @@ -564,7 +564,7 @@ DataC158: ; --------------------------------------------------------------------------- State0315TableC160: - .byte $29, $01, $02, $00, $02, $29 + .byte $29, $01, $02, $00, $02, $29 ; CPU:$C160 PRG:0160 29 01 02 00 ; --------------------------------------------------------------------------- @@ -574,7 +574,7 @@ State0315TableC160: ; --------------------------------------------------------------------------- State0316TableC166: - .byte $30, $35, $25, $35 + .byte $30, $35, $25, $35 ; CPU:$C166 PRG:0166 30 35 25 35 ; --------------------------------------------------------------------------- @@ -584,7 +584,7 @@ State0316TableC166: ; --------------------------------------------------------------------------- State0317TableC16A: - .byte $22, $26, $1C, $22, $22, $22 + .byte $22, $26, $1C, $22, $22, $22 ; CPU:$C16A PRG:016A 22 26 1C 22 ; --------------------------------------------------------------------------- ; $C170-$C173 @@ -593,7 +593,7 @@ State0317TableC16A: ; --------------------------------------------------------------------------- State0318TableC170: - .byte $26, $06, $36, $26 + .byte $26, $06, $36, $26 ; CPU:$C170 PRG:0170 26 06 36 26 ; --------------------------------------------------------------------------- @@ -602,7 +602,7 @@ State0318TableC170: ; --------------------------------------------------------------------------- DataC174: - .byte $01, $40, $7F, $09 + .byte $01, $40, $7F, $09 ; CPU:$C174 PRG:0174 01 40 7F 09 ; --------------------------------------------------------------------------- @@ -615,459 +615,459 @@ DataC174: ; $C7, $DD, $00, $E8 ; --------------------------------------------------------------------------- RuntimeOamTemplateC178: - .byte $C7, $DB, $00, $E0 - .byte $C7, $DD, $00 + .byte $C7, $DB, $00, $E0 ; CPU:$C178 PRG:0178 C7 DB 00 E0 + .byte $C7, $DD, $00 ; CPU:$C17C PRG:017C C7 DD 00 ; $C17F ; The final byte belongs to the OAM template, but $C17F is also used as ; the base for the receive-header comparison with Y = 1..4. ReceiveHeaderTableBaseC17F: - .byte $E8 + .byte $E8 ; CPU:$C17F PRG:017F E8 ; --------------------------------------------------------------------------- ; $C180-$C183 ; Expected four-byte header used by ReceiveRuntimeDataCode. ; --------------------------------------------------------------------------- ExpectedReceiveHeaderC180: - .byte $17, $01, $00, $01 + .byte $17, $01, $00, $01 ; CPU:$C180 PRG:0180 17 01 00 01 Reset: - sei - cld - lda #$00 - sta PPUCTRL - ldx #$FF - txs + sei ; CPU:$C184 PRG:0184 78 + cld ; CPU:$C185 PRG:0185 D8 + lda #$00 ; CPU:$C186 PRG:0186 A9 00 + sta PPUCTRL ; CPU:$C188 PRG:0188 8D 00 20 + ldx #$FF ; CPU:$C18B PRG:018B A2 FF + txs ; CPU:$C18D PRG:018D 9A @vblank1: lda PPUSTATUS - and #$80 - beq @vblank1 + and #$80 ; CPU:$C191 PRG:0191 29 80 + beq @vblank1 ; CPU:$C193 PRG:0193 F0 F9 @vblank2: lda PPUSTATUS - and #$80 - beq @vblank2 - ldy #$07 - lda ResetMagic1 - cmp #RESET_MAGIC_1 - bne @clear_select - lda ResetMagic2 - cmp #RESET_MAGIC_2 - bne @clear_select - ldy #$04 + and #$80 ; CPU:$C198 PRG:0198 29 80 + beq @vblank2 ; CPU:$C19A PRG:019A F0 F9 + ldy #$07 ; CPU:$C19C PRG:019C A0 07 + lda ResetMagic1 ; CPU:$C19E PRG:019E AD CE 05 + cmp #RESET_MAGIC_1 ; CPU:$C1A1 PRG:01A1 C9 A5 + bne @clear_select ; CPU:$C1A3 PRG:01A3 D0 09 + lda ResetMagic2 ; CPU:$C1A5 PRG:01A5 AD CF 05 + cmp #RESET_MAGIC_2 ; CPU:$C1A8 PRG:01A8 C9 5A + bne @clear_select ; CPU:$C1AA PRG:01AA D0 02 + ldy #$04 ; CPU:$C1AC PRG:01AC A0 04 @clear_select: - sty $01 - ldy #$00 - sty $00 - tya + sty $01 ; CPU:$C1AE PRG:01AE 84 01 + ldy #$00 ; CPU:$C1B0 PRG:01B0 A0 00 + sty $00 ; CPU:$C1B2 PRG:01B2 84 00 + tya ; CPU:$C1B4 PRG:01B4 98 @clear_ram: - sta ($00),y - dey - bne @clear_ram - dec $01 - bpl @clear_ram - lda ResetMagic1 - bne :+ - jsr InitializePersistentRam + sta ($00),y ; CPU:$C1B5 PRG:01B5 91 00 + dey ; CPU:$C1B7 PRG:01B7 88 + bne @clear_ram ; CPU:$C1B8 PRG:01B8 D0 FB + dec $01 ; CPU:$C1BA PRG:01BA C6 01 + bpl @clear_ram ; CPU:$C1BC PRG:01BC 10 F7 + lda ResetMagic1 ; CPU:$C1BE PRG:01BE AD CE 05 + bne :+ ; CPU:$C1C1 PRG:01C1 D0 03 + jsr InitializePersistentRam ; CPU:$C1C3 PRG:01C3 20 FD C1 : sta APUDMALOAD - lda #$06 - sta PPUMASK - sta $18 - jsr InitializeRuntimePpuState - lda #$90 - jsr SetPpuControl + lda #$06 ; CPU:$C1C9 PRG:01C9 A9 06 + sta PPUMASK ; CPU:$C1CB PRG:01CB 8D 01 20 + sta $18 ; CPU:$C1CE PRG:01CE 85 18 + jsr InitializeRuntimePpuState ; CPU:$C1D0 PRG:01D0 20 18 C3 + lda #$90 ; CPU:$C1D3 PRG:01D3 A9 90 + jsr SetPpuControl ; CPU:$C1D5 PRG:01D5 20 33 C3 @main: - jsr ShiftRuntimeState - lda NmiSyncState - bmi @main - beq @main - jsr DisableNmi - lda NmiSyncState - cmp #NMI_SYNC_COMPLETE - bne @alternate - jsr TransmitRuntimeDataCode + jsr ShiftRuntimeState ; CPU:$C1D8 PRG:01D8 20 26 D3 + lda NmiSyncState ; CPU:$C1DB PRG:01DB A5 48 + bmi @main ; CPU:$C1DD PRG:01DD 30 F9 + beq @main ; CPU:$C1DF PRG:01DF F0 F7 + jsr DisableNmi ; CPU:$C1E1 PRG:01E1 20 2F C3 + lda NmiSyncState ; CPU:$C1E4 PRG:01E4 A5 48 + cmp #NMI_SYNC_COMPLETE ; CPU:$C1E6 PRG:01E6 C9 01 + bne @alternate ; CPU:$C1E8 PRG:01E8 D0 0D + jsr TransmitRuntimeDataCode ; CPU:$C1EA PRG:01EA 20 C8 C6 @finish: - lda #NMI_SYNC_PENDING - sta NmiSyncState - jsr WaitForVblankEndAndEnableNmi - jmp @main + lda #NMI_SYNC_PENDING ; CPU:$C1ED PRG:01ED A9 FF + sta NmiSyncState ; CPU:$C1EF PRG:01EF 85 48 + jsr WaitForVblankEndAndEnableNmi ; CPU:$C1F1 PRG:01F1 20 39 C3 + jmp @main ; CPU:$C1F4 PRG:01F4 4C D8 C1 @alternate: - jsr ReceiveRuntimeDataCode - jmp @finish + jsr ReceiveRuntimeDataCode ; CPU:$C1F7 PRG:01F7 20 39 C7 + jmp @finish ; CPU:$C1FA PRG:01FA 4C ED C1 InitializePersistentRam: - ldx #$1E + ldx #$1E ; CPU:$C1FD PRG:01FD A2 1E @copy: - lda PersistentRecordInitialDataC091,x - sta PersistentRecord0,x - sta PersistentRecord1,x - dex - bpl @copy - ldx #$01 - stx PersistentBuffer + lda PersistentRecordInitialDataC091,x ; CPU:$C1FF PRG:01FF BD 91 C0 + sta PersistentRecord0,x ; CPU:$C202 PRG:0202 9D 80 05 + sta PersistentRecord1,x ; CPU:$C205 PRG:0205 9D A3 05 + dex ; CPU:$C208 PRG:0208 CA + bpl @copy ; CPU:$C209 PRG:0209 10 F4 + ldx #$01 ; CPU:$C20B PRG:020B A2 01 + stx PersistentBuffer ; CPU:$C20D PRG:020D 8E E0 06 @buf: - lda #$40 - sta PersistentBuffer,x - inx - cpx #$CF - bcc @buf - lda #$09 - sta PersistentBuffer,x - lda #RESET_MAGIC_1 - sta ResetMagic1 - lda #RESET_MAGIC_2 - sta ResetMagic2 - ldx #$00 - lda #$0A + lda #$40 ; CPU:$C210 PRG:0210 A9 40 + sta PersistentBuffer,x ; CPU:$C212 PRG:0212 9D E0 06 + inx ; CPU:$C215 PRG:0215 E8 + cpx #$CF ; CPU:$C216 PRG:0216 E0 CF + bcc @buf ; CPU:$C218 PRG:0218 90 F6 + lda #$09 ; CPU:$C21A PRG:021A A9 09 + sta PersistentBuffer,x ; CPU:$C21C PRG:021C 9D E0 06 + lda #RESET_MAGIC_1 ; CPU:$C21F PRG:021F A9 A5 + sta ResetMagic1 ; CPU:$C221 PRG:0221 8D CE 05 + lda #RESET_MAGIC_2 ; CPU:$C224 PRG:0224 A9 5A + sta ResetMagic2 ; CPU:$C226 PRG:0226 8D CF 05 + ldx #$00 ; CPU:$C229 PRG:0229 A2 00 + lda #$0A ; CPU:$C22B PRG:022B A9 0A @tails: - sta PersistentRecord0+$20,x - sta PersistentRecord1+$20,x - lda #$00 - inx - cpx #$03 - bcc @tails - rts + sta PersistentRecord0+$20,x ; CPU:$C22D PRG:022D 9D A0 05 + sta PersistentRecord1+$20,x ; CPU:$C230 PRG:0230 9D C3 05 + lda #$00 ; CPU:$C233 PRG:0233 A9 00 + inx ; CPU:$C235 PRG:0235 E8 + cpx #$03 ; CPU:$C236 PRG:0236 E0 03 + bcc @tails ; CPU:$C238 PRG:0238 90 F3 + rts ; CPU:$C23A PRG:023A 60 ; NMI handler $C23B-$C27E. NMI: - jsr DisableNmi - lda $45 - bne @skip_mask - lda PpuMaskShadow - ora #$1A - sta PPUMASK - sta PpuMaskShadow + jsr DisableNmi ; CPU:$C23B PRG:023B 20 2F C3 + lda $45 ; CPU:$C23E PRG:023E A5 45 + bne @skip_mask ; CPU:$C240 PRG:0240 D0 09 + lda PpuMaskShadow ; CPU:$C242 PRG:0242 A5 11 + ora #$1A ; CPU:$C244 PRG:0244 09 1A + sta PPUMASK ; CPU:$C246 PRG:0246 8D 01 20 + sta PpuMaskShadow ; CPU:$C249 PRG:0249 85 11 @skip_mask: - lda #$00 - sta OAMADDR - lda #$02 - sta OAMDMA - jsr NmiPpuUpdate - lda $47 - beq @skip_optional - jsr UpdateRiderLanePositionStates - jsr NmiRuntimeUpdate + lda #$00 ; CPU:$C24B PRG:024B A9 00 + sta OAMADDR ; CPU:$C24D PRG:024D 8D 03 20 + lda #$02 ; CPU:$C250 PRG:0250 A9 02 + sta OAMDMA ; CPU:$C252 PRG:0252 8D 14 40 + jsr NmiPpuUpdate ; CPU:$C255 PRG:0255 20 7F C2 + lda $47 ; CPU:$C258 PRG:0258 A5 47 + beq @skip_optional ; CPU:$C25A PRG:025A F0 06 + jsr UpdateRiderLanePositionStates ; CPU:$C25C PRG:025C 20 AB D0 + jsr NmiRuntimeUpdate ; CPU:$C25F PRG:025F 20 4E D1 @skip_optional: - lda $03B1 - ora $03B2 - bne @skip_timed - inc $3F - jsr UpdateRuntimeCounters + lda $03B1 ; CPU:$C262 PRG:0262 AD B1 03 + ora $03B2 ; CPU:$C265 PRG:0265 0D B2 03 + bne @skip_timed ; CPU:$C268 PRG:0268 D0 05 + inc $3F ; CPU:$C26A PRG:026A E6 3F + jsr UpdateRuntimeCounters ; CPU:$C26C PRG:026C 20 10 D3 @skip_timed: - jsr ReadControllers - jsr UpdateAudio - jsr DispatchNmiState - lda PPUSTATUS - jsr WaitForVblankEndAndEnableNmi - rti + jsr ReadControllers ; CPU:$C26F PRG:026F 20 47 D3 + jsr UpdateAudio ; CPU:$C272 PRG:0272 20 44 F8 + jsr DispatchNmiState ; CPU:$C275 PRG:0275 20 A9 C2 + lda PPUSTATUS ; CPU:$C278 PRG:0278 AD 02 20 + jsr WaitForVblankEndAndEnableNmi ; CPU:$C27B PRG:027B 20 39 C3 + rti ; CPU:$C27E PRG:027E 40 NmiPpuUpdate: - ldx $45 + ldx $45 ; CPU:$C27F PRG:027F A6 45 ; $C289? ProcessPpuUpdateByIndex: - lda PpuUpdatePointerLow,x - sta $00 - lda PpuUpdatePointerHigh,x - sta $01 - jsr ProcessPpuUpdateStream - lda #$00 - sta $0300 - sta $0301 - sta $45 - lda #$3F - sta PPUADDR - lda #$00 - sta PPUADDR - sta PPUADDR - sta PPUADDR - rts + lda PpuUpdatePointerLow,x ; CPU:$C281 PRG:0281 BD F6 C0 + sta $00 ; CPU:$C284 PRG:0284 85 00 + lda PpuUpdatePointerHigh,x ; CPU:$C286 PRG:0286 BD 11 C1 + sta $01 ; CPU:$C289 PRG:0289 85 01 + jsr ProcessPpuUpdateStream ; CPU:$C28B PRG:028B 20 C1 D3 + lda #$00 ; CPU:$C28E PRG:028E A9 00 + sta $0300 ; CPU:$C290 PRG:0290 8D 00 03 + sta $0301 ; CPU:$C293 PRG:0293 8D 01 03 + sta $45 ; CPU:$C296 PRG:0296 85 45 + lda #$3F ; CPU:$C298 PRG:0298 A9 3F + sta PPUADDR ; CPU:$C29A PRG:029A 8D 06 20 + lda #$00 ; CPU:$C29D PRG:029D A9 00 + sta PPUADDR ; CPU:$C29F PRG:029F 8D 06 20 + sta PPUADDR ; CPU:$C2A2 PRG:02A2 8D 06 20 + sta PPUADDR ; CPU:$C2A5 PRG:02A5 8D 06 20 + rts ; CPU:$C2A8 PRG:02A8 60 ; NMI dispatcher $C2A9-$C317. DispatchNmiState: - ldx NmiDispatchMode - beq @sequence_mode - lda NmiState - asl a - tay - lda NmiStateHandlerTable,y - sta $00 - iny - lda NmiStateHandlerTable,y + ldx NmiDispatchMode ; CPU:$C2A9 PRG:02A9 A6 40 + beq @sequence_mode ; CPU:$C2AB PRG:02AB F0 40 + lda NmiState ; CPU:$C2AD PRG:02AD A5 41 + asl a ; CPU:$C2AF PRG:02AF 0A + tay ; CPU:$C2B0 PRG:02B0 A8 + lda NmiStateHandlerTable,y ; CPU:$C2B1 PRG:02B1 B9 00 C0 + sta $00 ; CPU:$C2B4 PRG:02B4 85 00 + iny ; CPU:$C2B6 PRG:02B6 C8 + lda NmiStateHandlerTable,y ; CPU:$C2B7 PRG:02B7 B9 00 C0 ; High byte intentionally remains in A; $CB36 stores it to $01. - jmp $CB36 + jmp $CB36 ; CPU:$C2BA PRG:02BA 4C 36 CB ; Alternate initialization path $C2BD-$C2EC. @alternate_init: - lda #$04 - sta $03F8 - lsr a - sta $45 - ldy #$00 - jsr $C409 - ldx $03F0 - bne @have_fb - lda #$01 - sta $FB + lda #$04 ; CPU:$C2BD PRG:02BD A9 04 + sta $03F8 ; CPU:$C2BF PRG:02BF 8D F8 03 + lsr a ; CPU:$C2C2 PRG:02C2 4A + sta $45 ; CPU:$C2C3 PRG:02C3 85 45 + ldy #$00 ; CPU:$C2C5 PRG:02C5 A0 00 + jsr $C409 ; CPU:$C2C7 PRG:02C7 20 09 C4 + ldx $03F0 ; CPU:$C2CA PRG:02CA AE F0 03 + bne @have_fb ; CPU:$C2CD PRG:02CD D0 04 + lda #$01 ; CPU:$C2CF PRG:02CF A9 01 + sta $FB ; CPU:$C2D1 PRG:02D1 85 FB @have_fb: - cpx #$02 - bmi @advance_index - ldx #$FF + cpx #$02 ; CPU:$C2D3 PRG:02D3 E0 02 + bmi @advance_index ; CPU:$C2D5 PRG:02D5 30 02 + ldx #$FF ; CPU:$C2D7 PRG:02D7 A2 FF @advance_index: - inx - stx $03F0 - lda #$38 - sta $31 - lda #$0F - sta APUCTRL - lda MenuInitialYTable - sta OamBuffer + inx ; CPU:$C2D9 PRG:02D9 E8 + stx $03F0 ; CPU:$C2DA PRG:02DA 8E F0 03 + lda #$38 ; CPU:$C2DD PRG:02DD A9 38 + sta $31 ; CPU:$C2DF PRG:02DF 85 31 + lda #$0F ; CPU:$C2E1 PRG:02E1 A9 0F + sta APUCTRL ; CPU:$C2E3 PRG:02E3 8D 15 40 + lda MenuInitialYTable ; CPU:$C2E6 PRG:02E6 AD 80 C0 + sta OamBuffer ; CPU:$C2E9 PRG:02E9 8D 00 02 @sequence_abort: - rts + rts ; CPU:$C2EC PRG:02EC 60 @sequence_mode: - jsr DisablePpuRendering + jsr DisablePpuRendering ; CPU:$C2ED PRG:02ED 20 4F D2 @wait: - lda $30 + lda $30 ; CPU:$C2F0 PRG:02F0 A5 30 ; Busy state returns through the preceding alternate-path RTS at $C2EC. - bne @sequence_abort - ldx NmiState - lda NmiStateToSequenceIndex,x - tax - lda NmiSequencePointerLow,x - sta $02 - lda NmiSequencePointerHigh,x - sta $03 - ldy NmiSequenceStep - inc NmiSequenceStep - dey - bmi InitializeRuntimePpuState - tya - asl a - tay - lda ($02),y - sta $00 - iny - lda ($02),y - jmp $CB36 + bne @sequence_abort ; CPU:$C2F2 PRG:02F2 D0 F8 + ldx NmiState ; CPU:$C2F4 PRG:02F4 A6 41 + lda NmiStateToSequenceIndex,x ; CPU:$C2F6 PRG:02F6 BD 1C C0 + tax ; CPU:$C2F9 PRG:02F9 AA + lda NmiSequencePointerLow,x ; CPU:$C2FA PRG:02FA BD 2A C0 + sta $02 ; CPU:$C2FD PRG:02FD 85 02 + lda NmiSequencePointerHigh,x ; CPU:$C2FF PRG:02FF BD 33 C0 + sta $03 ; CPU:$C302 PRG:0302 85 03 + ldy NmiSequenceStep ; CPU:$C304 PRG:0304 A4 44 + inc NmiSequenceStep ; CPU:$C306 PRG:0306 E6 44 + dey ; CPU:$C308 PRG:0308 88 + bmi InitializeRuntimePpuState ; CPU:$C309 PRG:0309 30 0D + tya ; CPU:$C30B PRG:030B 98 + asl a ; CPU:$C30C PRG:030C 0A + tay ; CPU:$C30D PRG:030D A8 + lda ($02),y ; CPU:$C30E PRG:030E B1 02 + sta $00 ; CPU:$C310 PRG:0310 85 00 + iny ; CPU:$C312 PRG:0312 C8 + lda ($02),y ; CPU:$C313 PRG:0313 B1 02 + jmp $CB36 ; CPU:$C315 PRG:0315 4C 36 CB InitializeRuntimePpuState: - jsr FillOamShadowWithF8 - jsr ProcessTwoIndexedEntries - jsr $D1A9 - sta $12 - sta $50 - sta $13 - sta $51 - sta $FC + jsr FillOamShadowWithF8 ; CPU:$C318 PRG:0318 20 55 D2 + jsr ProcessTwoIndexedEntries ; CPU:$C31B PRG:031B 20 3B D2 + jsr $D1A9 ; CPU:$C31E PRG:031E 20 A9 D1 + sta $12 ; CPU:$C321 PRG:0321 85 12 + sta $50 ; CPU:$C323 PRG:0323 85 50 + sta $13 ; CPU:$C325 PRG:0325 85 13 + sta $51 ; CPU:$C327 PRG:0327 85 51 + sta $FC ; CPU:$C329 PRG:0329 85 FC ResetRuntimePpuFieldsC32F: - lda #$10 - bne SetPpuControl + lda #$10 ; CPU:$C32B PRG:032B A9 10 + bne SetPpuControl ; CPU:$C32D PRG:032D D0 04 DisableNmi: - lda PpuControlShadow - and #$7F + lda PpuControlShadow ; CPU:$C32F PRG:032F A5 10 + and #$7F ; CPU:$C331 PRG:0331 29 7F SetPpuControl: - sta PPUCTRL - sta PpuControlShadow - rts + sta PPUCTRL ; CPU:$C333 PRG:0333 8D 00 20 + sta PpuControlShadow ; CPU:$C336 PRG:0336 85 10 + rts ; CPU:$C338 PRG:0338 60 WaitForVblankEndAndEnableNmi: @wait: lda PPUSTATUS - and #PPUCTRL_NMI_ENABLE - bne @wait - lda PpuControlShadow - ora #PPUCTRL_NMI_ENABLE - bne SetPpuControl + and #PPUCTRL_NMI_ENABLE ; CPU:$C33C PRG:033C 29 80 + bne @wait ; CPU:$C33E PRG:033E D0 F9 + lda PpuControlShadow ; CPU:$C340 PRG:0340 A5 10 + ora #PPUCTRL_NMI_ENABLE ; CPU:$C342 PRG:0342 09 80 + bne SetPpuControl ; CPU:$C344 PRG:0344 D0 ED ; State-handler block $C346-$C454. NmiState00: - lda $31 - bne @select - sta $43 - sta $4A - lda #$0F - sta $03F7 - lda #$02 - sta NmiState - bne @finish_select + lda $31 ; CPU:$C346 PRG:0346 A5 31 + bne @select ; CPU:$C348 PRG:0348 D0 0F + sta $43 ; CPU:$C34A PRG:034A 85 43 + sta $4A ; CPU:$C34C PRG:034C 85 4A + lda #$0F ; CPU:$C34E PRG:034E A9 0F + sta $03F7 ; CPU:$C350 PRG:0350 8D F7 03 + lda #$02 ; CPU:$C353 PRG:0353 A9 02 + sta NmiState ; CPU:$C355 PRG:0355 85 41 + bne @finish_select ; CPU:$C357 PRG:0357 D0 30 @select: - lda #$03 - jsr UpdateMenuSelection - txa - bne @selection_done - sta $03F2 - lda MenuInitialYTable,y - jmp SetSprite0Y + lda #$03 ; CPU:$C359 PRG:0359 A9 03 + jsr UpdateMenuSelection ; CPU:$C35B PRG:035B 20 DE C7 + txa ; CPU:$C35E PRG:035E 8A + bne @selection_done ; CPU:$C35F PRG:035F D0 09 + sta $03F2 ; CPU:$C361 PRG:0361 8D F2 03 + lda MenuInitialYTable,y ; CPU:$C364 PRG:0364 B9 80 C0 + jmp SetSprite0Y ; CPU:$C367 PRG:0367 4C EF C3 @selection_done: - ldy MenuSelectionIndex - ldx #$00 - stx $03F7 - stx $43 - stx MenuSelectionIndex - inx - stx $03F3 - stx $4A - stx $03F0 - cpy #$02 - bne :+ - ldx #$08 + ldy MenuSelectionIndex ; CPU:$C36A PRG:036A A4 42 + ldx #$00 ; CPU:$C36C PRG:036C A2 00 + stx $03F7 ; CPU:$C36E PRG:036E 8E F7 03 + stx $43 ; CPU:$C371 PRG:0371 86 43 + stx MenuSelectionIndex ; CPU:$C373 PRG:0373 86 42 + inx ; CPU:$C375 PRG:0375 E8 + stx $03F3 ; CPU:$C376 PRG:0376 8E F3 03 + stx $4A ; CPU:$C379 PRG:0379 86 4A + stx $03F0 ; CPU:$C37B PRG:037B 8E F0 03 + cpy #$02 ; CPU:$C37E PRG:037E C0 02 + bne :+ ; CPU:$C380 PRG:0380 D0 02 + ldx #$08 ; CPU:$C382 PRG:0382 A2 08 : stx NmiState - sty $03F2 + sty $03F2 ; CPU:$C386 PRG:0386 8C F2 03 @finish_select: - jsr EnterNmiSequenceMode - lda $03F7 - eor #$0F - sta APUCTRL - rts + jsr EnterNmiSequenceMode ; CPU:$C389 PRG:0389 20 B1 C3 + lda $03F7 ; CPU:$C38C PRG:038C AD F7 03 + eor #$0F ; CPU:$C38F PRG:038F 49 0F + sta APUCTRL ; CPU:$C391 PRG:0391 8D 15 40 + rts ; CPU:$C394 PRG:0394 60 NmiState01: - lda Controller1Pressed - and #$F3 - sta Controller1Pressed - and #PAD_HORIZONTAL - asl a - asl a - ora Controller1Pressed - sta Controller1Pressed - lda #MENU_HORIZONTAL_COUNT - jsr UpdateMenuSelection - txa - beq MoveHorizontalMarker - lda MenuSelectionIndex - sta $43 + lda Controller1Pressed ; CPU:$C395 PRG:0395 A5 15 + and #$F3 ; CPU:$C397 PRG:0397 29 F3 + sta Controller1Pressed ; CPU:$C399 PRG:0399 85 15 + and #PAD_HORIZONTAL ; CPU:$C39B PRG:039B 29 03 + asl a ; CPU:$C39D PRG:039D 0A + asl a ; CPU:$C39E PRG:039E 0A + ora Controller1Pressed ; CPU:$C39F PRG:039F 05 15 + sta Controller1Pressed ; CPU:$C3A1 PRG:03A1 85 15 + lda #MENU_HORIZONTAL_COUNT ; CPU:$C3A3 PRG:03A3 A9 05 + jsr UpdateMenuSelection ; CPU:$C3A5 PRG:03A5 20 DE C7 + txa ; CPU:$C3A8 PRG:03A8 8A + beq MoveHorizontalMarker ; CPU:$C3A9 PRG:03A9 F0 0D + lda MenuSelectionIndex ; CPU:$C3AB PRG:03AB A5 42 + sta $43 ; CPU:$C3AD PRG:03AD 85 43 AdvanceNmiStateAndEnterNmiSequence: - inc NmiState + inc NmiState ; CPU:$C3AF PRG:03AF E6 41 EnterNmiSequenceMode: - lda #$00 - sta NmiDispatchMode - sta NmiSequenceStep - rts + lda #$00 ; CPU:$C3B1 PRG:03B1 A9 00 + sta NmiDispatchMode ; CPU:$C3B3 PRG:03B3 85 40 + sta NmiSequenceStep ; CPU:$C3B5 PRG:03B5 85 44 + rts ; CPU:$C3B7 PRG:03B7 60 MoveHorizontalMarker: - lda MenuHorizontalXTableC083,y - bne SetSprite0X + lda MenuHorizontalXTableC083,y ; CPU:$C3B8 PRG:03B8 B9 83 C0 + bne SetSprite0X ; CPU:$C3BB PRG:03BB D0 54 NmiState08: - lda #MENU_VERTICAL_COUNT - jsr UpdateMenuSelection - txa - beq @move_vertical_marker - lda MenuSelectionIndex - cmp #$02 - beq @enter_sequence - bcs @higher_choice - sta $03F2 - inc NmiState + lda #MENU_VERTICAL_COUNT ; CPU:$C3BD PRG:03BD A9 06 + jsr UpdateMenuSelection ; CPU:$C3BF PRG:03BF 20 DE C7 + txa ; CPU:$C3C2 PRG:03C2 8A + beq @move_vertical_marker ; CPU:$C3C3 PRG:03C3 F0 25 + lda MenuSelectionIndex ; CPU:$C3C5 PRG:03C5 A5 42 + cmp #$02 ; CPU:$C3C7 PRG:03C7 C9 02 + beq @enter_sequence ; CPU:$C3C9 PRG:03C9 F0 07 + bcs @higher_choice ; CPU:$C3CB PRG:03CB B0 08 + sta $03F2 ; CPU:$C3CD PRG:03CD 8D F2 03 + inc NmiState ; CPU:$C3D0 PRG:03D0 E6 41 @enter_sequence: ; Original bytes at $C3D2 are JMP $C3AF. Keep that exact target. - jmp AdvanceNmiStateAndEnterNmiSequence + jmp AdvanceNmiStateAndEnterNmiSequence ; CPU:$C3D2 PRG:03D2 4C AF C3 @higher_choice: - cmp #MENU_HORIZONTAL_COUNT - beq @choice5 - clc - adc #$09 - sta NmiState - lda #$00 - sta MenuSelectionIndex - beq EnterNmiSequenceMode + cmp #MENU_HORIZONTAL_COUNT ; CPU:$C3D5 PRG:03D5 C9 05 + beq @choice5 ; CPU:$C3D7 PRG:03D7 F0 0B + clc ; CPU:$C3D9 PRG:03D9 18 + adc #$09 ; CPU:$C3DA PRG:03DA 69 09 + sta NmiState ; CPU:$C3DC PRG:03DC 85 41 + lda #$00 ; CPU:$C3DE PRG:03DE A9 00 + sta MenuSelectionIndex ; CPU:$C3E0 PRG:03E0 85 42 + beq EnterNmiSequenceMode ; CPU:$C3E2 PRG:03E2 F0 CD @choice5: - lsr a - sta MenuSelectionIndex - jmp ResetRuntimeZeroPagePreserveSelection + lsr a ; CPU:$C3E4 PRG:03E4 4A + sta MenuSelectionIndex ; CPU:$C3E5 PRG:03E5 85 42 + jmp ResetRuntimeZeroPagePreserveSelection ; CPU:$C3E7 PRG:03E7 4C 85 CA @move_vertical_marker: - ldy MenuSelectionIndex - lda MenuVerticalYTableC08B,y + ldy MenuSelectionIndex ; CPU:$C3EA PRG:03EA A4 42 + lda MenuVerticalYTableC08B,y ; CPU:$C3EC PRG:03EC B9 8B C0 SetSprite0Y: - sta OamBuffer - rts + sta OamBuffer ; CPU:$C3EF PRG:03EF 8D 00 02 + rts ; CPU:$C3F2 PRG:03F2 60 InitializeSelectionMarker: - ldx #$04 - stx $FB - dex - stx $45 - ldy #$01 - jsr InitializeSprite0 - sta MenuSelectionIndex - lda #$2D - sta $34 - lda #$B0 - bne SetSprite0Y + ldx #$04 ; CPU:$C3F3 PRG:03F3 A2 04 + stx $FB ; CPU:$C3F5 PRG:03F5 86 FB + dex ; CPU:$C3F7 PRG:03F7 CA + stx $45 ; CPU:$C3F8 PRG:03F8 86 45 + ldy #$01 ; CPU:$C3FA PRG:03FA A0 01 + jsr InitializeSprite0 ; CPU:$C3FC PRG:03FC 20 09 C4 + sta MenuSelectionIndex ; CPU:$C3FF PRG:03FF 85 42 + lda #$2D ; CPU:$C401 PRG:0401 A9 2D + sta $34 ; CPU:$C403 PRG:0403 85 34 + lda #$B0 ; CPU:$C405 PRG:0405 A9 B0 + bne SetSprite0Y ; CPU:$C407 PRG:0407 D0 E6 InitializeSprite0: - lda #$FA - sta OamBuffer+1 - lda Sprite0InitialXTableC088,y + lda #$FA ; CPU:$C409 PRG:0409 A9 FA + sta OamBuffer+1 ; CPU:$C40B PRG:040B 8D 01 02 + lda Sprite0InitialXTableC088,y ; CPU:$C40E PRG:040E B9 88 C0 SetSprite0X: - sta OamBuffer+3 - lda #$00 - sta OamBuffer+2 - sta $46 - rts + sta OamBuffer+3 ; CPU:$C411 PRG:0411 8D 03 02 + lda #$00 ; CPU:$C414 PRG:0414 A9 00 + sta OamBuffer+2 ; CPU:$C416 PRG:0416 8D 02 02 + sta $46 ; CPU:$C419 PRG:0419 85 46 + rts ; CPU:$C41B PRG:041B 60 NmiState0D: - lda #$02 - ldx NmiSequenceStep - beq StateHandshakeComplete - lda NmiSyncState - cmp #NMI_SYNC_PENDING - bne StateHandshakeReturn - ldx #$02 + lda #$02 ; CPU:$C41C PRG:041C A9 02 + ldx NmiSequenceStep ; CPU:$C41E PRG:041E A6 44 + beq StateHandshakeComplete ; CPU:$C420 PRG:0420 F0 2E + lda NmiSyncState ; CPU:$C422 PRG:0422 A5 48 + cmp #NMI_SYNC_PENDING ; CPU:$C424 PRG:0424 C9 FF + bne StateHandshakeReturn ; CPU:$C426 PRG:0426 D0 2C + ldx #$02 ; CPU:$C428 PRG:0428 A2 02 @copy_record_tails: - lda $65,x - sta PersistentRecord0+$20,x - lda $68,x - sta PersistentRecord1+$20,x - dex - bpl @copy_record_tails - jsr CopyWorkingBufferToPersistentEC3B - jmp ContinueAsyncHandshake + lda $65,x ; CPU:$C42A PRG:042A B5 65 + sta PersistentRecord0+$20,x ; CPU:$C42C PRG:042C 9D A0 05 + lda $68,x ; CPU:$C42F PRG:042F B5 68 + sta PersistentRecord1+$20,x ; CPU:$C431 PRG:0431 9D C3 05 + dex ; CPU:$C434 PRG:0434 CA + bpl @copy_record_tails ; CPU:$C435 PRG:0435 10 F3 + jsr CopyWorkingBufferToPersistentEC3B ; CPU:$C437 PRG:0437 20 3B EC + jmp ContinueAsyncHandshake ; CPU:$C43A PRG:043A 4C 47 C4 NmiState0C: - lda NmiSequenceStep - beq State0CSetComplete - lda NmiSyncState - cmp #NMI_SYNC_PENDING - bne StateHandshakeReturn + lda NmiSequenceStep ; CPU:$C43D PRG:043D A5 44 + beq State0CSetComplete ; CPU:$C43F PRG:043F F0 0D + lda NmiSyncState ; CPU:$C441 PRG:0441 A5 48 + cmp #NMI_SYNC_PENDING ; CPU:$C443 PRG:0443 C9 FF + bne StateHandshakeReturn ; CPU:$C445 PRG:0445 D0 0D ContinueAsyncHandshake: - lda #$40 - sta $FB - jmp StateSequenceStep3 + lda #$40 ; CPU:$C447 PRG:0447 A9 40 + sta $FB ; CPU:$C449 PRG:0449 85 FB + jmp StateSequenceStep3 ; CPU:$C44B PRG:044B 4C 6B CC State0CSetComplete: - lda #NMI_SYNC_COMPLETE + lda #NMI_SYNC_COMPLETE ; CPU:$C44E PRG:044E A9 01 StateHandshakeComplete: - sta NmiSyncState - sta NmiSequenceStep + sta NmiSyncState ; CPU:$C450 PRG:0450 85 48 + sta NmiSequenceStep ; CPU:$C452 PRG:0452 85 44 StateHandshakeReturn: - rts + rts ; CPU:$C454 PRG:0454 60 ; $C455-$C464: choose an NMI update selector from state/$46. SelectNmiUpdateForState: - ldy #$08 - lda NmiState - cmp #$08 - bcs @store - lda $46 - beq SharedReturnC464 - dey + ldy #$08 ; CPU:$C455 PRG:0455 A0 08 + lda NmiState ; CPU:$C457 PRG:0457 A5 41 + cmp #$08 ; CPU:$C459 PRG:0459 C9 08 + bcs @store ; CPU:$C45B PRG:045B B0 05 + lda $46 ; CPU:$C45D PRG:045D A5 46 + beq SharedReturnC464 ; CPU:$C45F PRG:045F F0 03 + dey ; CPU:$C461 PRG:0461 88 @store: - sty $45 + sty $45 ; CPU:$C462 PRG:0462 84 45 SharedReturnC464: - rts + rts ; CPU:$C464 PRG:0464 60 ; $C465-$C484: shared handler used by states $04/$07. NmiState04_07: - lda $34 - beq @advance - lda #$06 - jsr $C92C - lda $3F - and #$10 - bne SharedReturnC464 - jmp StateHelperCAFA + lda $34 ; CPU:$C465 PRG:0465 A5 34 + beq @advance ; CPU:$C467 PRG:0467 F0 0E + lda #$06 ; CPU:$C469 PRG:0469 A9 06 + jsr $C92C ; CPU:$C46B PRG:046B 20 2C C9 + lda $3F ; CPU:$C46E PRG:046E A5 3F + and #$10 ; CPU:$C470 PRG:0470 29 10 + bne SharedReturnC464 ; CPU:$C472 PRG:0472 D0 F0 + jmp StateHelperCAFA ; CPU:$C474 PRG:0474 4C FA CA @advance: - jsr AdvanceNmiStateAndEnterNmiSequence - lda NmiState - cmp #$08 - bcc @store_state - lda #$02 + jsr AdvanceNmiStateAndEnterNmiSequence ; CPU:$C477 PRG:0477 20 AF C3 + lda NmiState ; CPU:$C47A PRG:047A A5 41 + cmp #$08 ; CPU:$C47C PRG:047C C9 08 + bcc @store_state ; CPU:$C47E PRG:047E 90 02 + lda #$02 ; CPU:$C480 PRG:0480 A9 02 @store_state: - sta NmiState - rts + sta NmiState ; CPU:$C482 PRG:0482 85 41 + rts ; CPU:$C484 PRG:0484 60 ; --------------------------------------------------------------------------- ; $C485-$C521 @@ -1076,150 +1076,150 @@ NmiState04_07: ; --------------------------------------------------------------------------- CompareAndUpdateRecord: - jsr LoadPersistentTriplet + jsr LoadPersistentTriplet ; CPU:$C485 PRG:0485 20 3A C5 - lda $05 - cmp $68 - bne C49A_FirstDifference + lda $05 ; CPU:$C488 PRG:0488 A5 05 + cmp $68 ; CPU:$C48A PRG:048A C5 68 + bne C49A_FirstDifference ; CPU:$C48C PRG:048C D0 0C - lda $06 - cmp $69 - bne C49A_FirstDifference + lda $06 ; CPU:$C48E PRG:048E A5 06 + cmp $69 ; CPU:$C490 PRG:0490 C5 69 + bne C49A_FirstDifference ; CPU:$C492 PRG:0492 D0 06 - lda $07 - cmp $6A - beq C4A9_ValueAccepted + lda $07 ; CPU:$C494 PRG:0494 A5 07 + cmp $6A ; CPU:$C496 PRG:0496 C5 6A + beq C4A9_ValueAccepted ; CPU:$C498 PRG:0498 F0 0F C49A_FirstDifference: - bcc C4AD_CheckReference + bcc C4AD_CheckReference ; CPU:$C49A PRG:049A 90 11 - ldx #$00 + ldx #$00 ; CPU:$C49C PRG:049C A2 00 C49E_CopyTriplet: - lda $68,x - sta PersistentRecord0,y - inx - iny - cpx #$03 - bmi C49E_CopyTriplet + lda $68,x ; CPU:$C49E PRG:049E B5 68 + sta PersistentRecord0,y ; CPU:$C4A0 PRG:04A0 99 80 05 + inx ; CPU:$C4A3 PRG:04A3 E8 + iny ; CPU:$C4A4 PRG:04A4 C8 + cpx #$03 ; CPU:$C4A5 PRG:04A5 E0 03 + bmi C49E_CopyTriplet ; CPU:$C4A7 PRG:04A7 30 F5 C4A9_ValueAccepted: - lda #$01 - bne C512_FinalizeValue + lda #$01 ; CPU:$C4A9 PRG:04A9 A9 01 + bne C512_FinalizeValue ; CPU:$C4AB PRG:04AB D0 65 C4AD_CheckReference: - lda NmiState - cmp #$08 - bcs C4CC_CalculateValue + lda NmiState ; CPU:$C4AD PRG:04AD A5 41 + cmp #$08 ; CPU:$C4AF PRG:04AF C9 08 + bcs C4CC_CalculateValue ; CPU:$C4B1 PRG:04B1 B0 19 - jsr LoadReferenceTriplet + jsr LoadReferenceTriplet ; CPU:$C4B3 PRG:04B3 20 22 C5 - lda $05 - cmp $68 - bne C4C6_ReferenceDifference + lda $05 ; CPU:$C4B6 PRG:04B6 A5 05 + cmp $68 ; CPU:$C4B8 PRG:04B8 C5 68 + bne C4C6_ReferenceDifference ; CPU:$C4BA PRG:04BA D0 0A - lda $06 - cmp $69 - bne C4C6_ReferenceDifference + lda $06 ; CPU:$C4BC PRG:04BC A5 06 + cmp $69 ; CPU:$C4BE PRG:04BE C5 69 + bne C4C6_ReferenceDifference ; CPU:$C4C0 PRG:04C0 D0 04 - lda $07 - cmp $6A + lda $07 ; CPU:$C4C2 PRG:04C2 A5 07 + cmp $6A ; CPU:$C4C4 PRG:04C4 C5 6A C4C6_ReferenceDifference: - bcc C4CC_CalculateValue + bcc C4CC_CalculateValue ; CPU:$C4C6 PRG:04C6 90 04 - lda #$02 - bne C512_FinalizeValue + lda #$02 ; CPU:$C4C8 PRG:04C8 A9 02 + bne C512_FinalizeValue ; CPU:$C4CA PRG:04CA D0 46 C4CC_CalculateValue: - lda $03F8 - sta $0A - asl a - sta $09 + lda $03F8 ; CPU:$C4CC PRG:04CC AD F8 03 + sta $0A ; CPU:$C4CF PRG:04CF 85 0A + asl a ; CPU:$C4D1 PRG:04D1 0A + sta $09 ; CPU:$C4D2 PRG:04D2 85 09 - lda $68 - sec - sbc $05 - tay + lda $68 ; CPU:$C4D4 PRG:04D4 A5 68 + sec ; CPU:$C4D6 PRG:04D6 38 + sbc $05 ; CPU:$C4D7 PRG:04D7 E5 05 + tay ; CPU:$C4D9 PRG:04D9 A8 - lda #$00 + lda #$00 ; CPU:$C4DA PRG:04DA A9 00 C4DC_Accumulate: - dey - bmi C4E8_DifferenceReady + dey ; CPU:$C4DC PRG:04DC 88 + bmi C4E8_DifferenceReady ; CPU:$C4DD PRG:04DD 30 09 - clc - adc #$3C - bcc C4DC_Accumulate + clc ; CPU:$C4DF PRG:04DF 18 + adc #$3C ; CPU:$C4E0 PRG:04E0 69 3C + bcc C4DC_Accumulate ; CPU:$C4E2 PRG:04E2 90 F8 C4E4_Overflow: - lda #$FF - bne C50B_SubtractLimit + lda #$FF ; CPU:$C4E4 PRG:04E4 A9 FF + bne C50B_SubtractLimit ; CPU:$C4E6 PRG:04E6 D0 23 C4E8_DifferenceReady: - sta $08 + sta $08 ; CPU:$C4E8 PRG:04E8 85 08 - lda $69 - sec - sbc $06 - bcs C4F7_AddSaved + lda $69 ; CPU:$C4EA PRG:04EA A5 69 + sec ; CPU:$C4EC PRG:04EC 38 + sbc $06 ; CPU:$C4ED PRG:04ED E5 06 + bcs C4F7_AddSaved ; CPU:$C4EF PRG:04EF B0 06 - clc - adc $08 - jmp C4FC_CompareLimit + clc ; CPU:$C4F1 PRG:04F1 18 + adc $08 ; CPU:$C4F2 PRG:04F2 65 08 + jmp C4FC_CompareLimit ; CPU:$C4F4 PRG:04F4 4C FC C4 C4F7_AddSaved: - clc - adc $08 - bcs C4E4_Overflow + clc ; CPU:$C4F7 PRG:04F7 18 + adc $08 ; CPU:$C4F8 PRG:04F8 65 08 + bcs C4E4_Overflow ; CPU:$C4FA PRG:04FA B0 E8 C4FC_CompareLimit: - cmp $09 - bcs C50B_SubtractLimit + cmp $09 ; CPU:$C4FC PRG:04FC C5 09 + bcs C50B_SubtractLimit ; CPU:$C4FE PRG:04FE B0 0B - clc - adc $09 + clc ; CPU:$C500 PRG:0500 18 + adc $09 ; CPU:$C501 PRG:0501 65 09 C503_ShiftLoop: - lsr $0A - beq C512_FinalizeValue + lsr $0A ; CPU:$C503 PRG:0503 46 0A + beq C512_FinalizeValue ; CPU:$C505 PRG:0505 F0 0B - lsr a - jmp C503_ShiftLoop + lsr a ; CPU:$C507 PRG:0507 4A + jmp C503_ShiftLoop ; CPU:$C508 PRG:0508 4C 03 C5 C50B_SubtractLimit: - sec - sbc $09 - lsr a - clc - adc #$04 + sec ; CPU:$C50B PRG:050B 38 + sbc $09 ; CPU:$C50C PRG:050C E5 09 + lsr a ; CPU:$C50E PRG:050E 4A + clc ; CPU:$C50F PRG:050F 18 + adc #$04 ; CPU:$C510 PRG:0510 69 04 C512_FinalizeValue: - sta $53 + sta $53 ; CPU:$C512 PRG:0512 85 53 - lda #$18 - sta $45 + lda #$18 ; CPU:$C514 PRG:0514 A9 18 + sta $45 ; CPU:$C516 PRG:0516 85 45 - lda #$01 - sta InputActionLatch - sta $40 + lda #$01 ; CPU:$C518 PRG:0518 A9 01 + sta InputActionLatch ; CPU:$C51A PRG:051A 85 49 + sta $40 ; CPU:$C51C PRG:051C 85 40 - lsr a - sta NmiSequenceStep + lsr a ; CPU:$C51E PRG:051E 4A + sta NmiSequenceStep ; CPU:$C51F PRG:051F 85 44 - rts + rts ; CPU:$C521 PRG:0521 60 ; --------------------------------------------------------------------------- @@ -1228,22 +1228,22 @@ C512_FinalizeValue: ; --------------------------------------------------------------------------- LoadReferenceTriplet: - lda $43 - sta $02 + lda $43 ; CPU:$C522 PRG:0522 A5 43 + sta $02 ; CPU:$C524 PRG:0524 85 02 - jsr CalculateReferenceRecordOffset - tay + jsr CalculateReferenceRecordOffset ; CPU:$C526 PRG:0526 20 13 CB + tay ; CPU:$C529 PRG:0529 A8 - lda PersistentRecordInitialDataC091,y - sta $05 + lda PersistentRecordInitialDataC091,y ; CPU:$C52A PRG:052A B9 91 C0 + sta $05 ; CPU:$C52D PRG:052D 85 05 - lda $C092,y - sta $06 + lda $C092,y ; CPU:$C52F PRG:052F B9 92 C0 + sta $06 ; CPU:$C532 PRG:0532 85 06 - lda $C093,y - sta $07 + lda $C093,y ; CPU:$C534 PRG:0534 B9 93 C0 + sta $07 ; CPU:$C537 PRG:0537 85 07 - rts + rts ; CPU:$C539 PRG:0539 60 ; --------------------------------------------------------------------------- ; $C53A-$C550 @@ -1251,303 +1251,303 @@ LoadReferenceTriplet: ; --------------------------------------------------------------------------- LoadPersistentTriplet: - lda $43 - sta $02 + lda $43 ; CPU:$C53A PRG:053A A5 43 + sta $02 ; CPU:$C53C PRG:053C 85 02 - jsr CalculatePersistentRecordOffset + jsr CalculatePersistentRecordOffset ; CPU:$C53E PRG:053E 20 06 CB - lda PersistentRecord0,y - sta $05 + lda PersistentRecord0,y ; CPU:$C541 PRG:0541 B9 80 05 + sta $05 ; CPU:$C544 PRG:0544 85 05 - lda PersistentRecord0+1,y - sta $06 + lda PersistentRecord0+1,y ; CPU:$C546 PRG:0546 B9 81 05 + sta $06 ; CPU:$C549 PRG:0549 85 06 - lda PersistentRecord0+2,y - sta $07 + lda PersistentRecord0+2,y ; CPU:$C54B PRG:054B B9 82 05 + sta $07 ; CPU:$C54E PRG:054E 85 07 - rts + rts ; CPU:$C550 PRG:0550 60 ; $C551-$C585: update-selector/setup entry cluster. SerialUpdateSelectorCluster: - lda #$12 - ldx NmiState - cpx #$08 - bcs SetSerialUpdateSelector + lda #$12 ; CPU:$C551 PRG:0551 A9 12 + ldx NmiState ; CPU:$C553 PRG:0553 A6 41 + cpx #$08 ; CPU:$C555 PRG:0555 E0 08 + bcs SetSerialUpdateSelector ; CPU:$C557 PRG:0557 B0 15 - clc - adc $43 - bne SetSerialUpdateSelector + clc ; CPU:$C559 PRG:0559 18 + adc $43 ; CPU:$C55A PRG:055A 65 43 + bne SetSerialUpdateSelector ; CPU:$C55C PRG:055C D0 10 ; $C55E SetSerialUpdateSelector06: - lda #$06 - bne SetSerialUpdateSelector + lda #$06 ; CPU:$C55E PRG:055E A9 06 + bne SetSerialUpdateSelector ; CPU:$C560 PRG:0560 D0 0C ; $C562 SetSerialUpdateSelector05: - lda #$05 - bne SetSerialUpdateSelector + lda #$05 ; CPU:$C562 PRG:0562 A9 05 + bne SetSerialUpdateSelector ; CPU:$C564 PRG:0564 D0 08 ; $C566 SetSerialUpdateSelector0E: - lda #$0E - bne SetSerialUpdateSelector + lda #$0E ; CPU:$C566 PRG:0566 A9 0E + bne SetSerialUpdateSelector ; CPU:$C568 PRG:0568 D0 04 ; $C56A SetSerialUpdateSelector04: - lda #$04 - sta $33 + lda #$04 ; CPU:$C56A PRG:056A A9 04 + sta $33 ; CPU:$C56C PRG:056C 85 33 ; $C56E SetSerialUpdateSelector: - sta $45 - rts + sta $45 ; CPU:$C56E PRG:056E 85 45 + rts ; CPU:$C570 PRG:0570 60 ; $C571 SetSerialUpdateSelector09: - lda #$09 - bne SetSerialUpdateSelector + lda #$09 ; CPU:$C571 PRG:0571 A9 09 + bne SetSerialUpdateSelector ; CPU:$C573 PRG:0573 D0 F9 ; $C575 InitializeSerialSelectionMarker: - lda #$05 - sta $43 + lda #$05 ; CPU:$C575 PRG:0575 A9 05 + sta $43 ; CPU:$C577 PRG:0577 85 43 - ldy #$02 - jsr InitializeSprite0 + ldy #$02 ; CPU:$C579 PRG:0579 A0 02 + jsr InitializeSprite0 ; CPU:$C57B PRG:057B 20 09 C4 - lda #$0F - bne SetSerialUpdateSelector + lda #$0F ; CPU:$C57E PRG:057E A9 0F + bne SetSerialUpdateSelector ; CPU:$C580 PRG:0580 D0 EC ; $C582 SetSerialUpdateSelector11: - lda #$11 - bne SetSerialUpdateSelector + lda #$11 ; CPU:$C582 PRG:0582 A9 11 + bne SetSerialUpdateSelector ; CPU:$C584 PRG:0584 D0 E8 ; $C586-$C5AB: restore working record fields and shared selector entries. RestoreWorkingRecordFields: - ldx #$03 - bne @copy_rom_field + ldx #$03 ; CPU:$C586 PRG:0586 A2 03 + bne @copy_rom_field ; CPU:$C588 PRG:0588 D0 0A @copy_fields: - lda $05A0,x - sta $65,x + lda $05A0,x ; CPU:$C58A PRG:058A BD A0 05 + sta $65,x ; CPU:$C58D PRG:058D 95 65 - lda $05C3,x - sta $68,x + lda $05C3,x ; CPU:$C58F PRG:058F BD C3 05 + sta $68,x ; CPU:$C592 PRG:0592 95 68 @copy_rom_field: - lda $C180,x - sta $61,x + lda $C180,x ; CPU:$C594 PRG:0594 BD 80 C1 + sta $61,x ; CPU:$C597 PRG:0597 95 61 - dex - bpl @copy_fields + dex ; CPU:$C599 PRG:0599 CA + bpl @copy_fields ; CPU:$C59A PRG:059A 10 EE - jsr CopyPersistentBufferToWorkingRam + jsr CopyPersistentBufferToWorkingRam ; CPU:$C59C PRG:059C 20 21 C6 - lda #$10 - bne SetSerialUpdateSelector + lda #$10 ; CPU:$C59F PRG:059F A9 10 + bne SetSerialUpdateSelector ; CPU:$C5A1 PRG:05A1 D0 CB ; $C5A3 SetSerialUpdateSelector17: - lda #$17 - bne SetSerialUpdateSelector + lda #$17 ; CPU:$C5A3 PRG:05A3 A9 17 + bne SetSerialUpdateSelector ; CPU:$C5A5 PRG:05A5 D0 C7 ; $C5A7 CallC92CWithZero: - lda #$00 - jmp $C92C + lda #$00 ; CPU:$C5A7 PRG:05A7 A9 00 + jmp $C92C ; CPU:$C5A9 PRG:05A9 4C 2C C9 ; $C5AC-$C5C1: initialize the six-byte $0300 structure. Prepare0300Structure: - lda #$12 - sta $34 + lda #$12 ; CPU:$C5AC PRG:05AC A9 12 + sta $34 ; CPU:$C5AE PRG:05AE 85 34 - ldx #$05 + ldx #$05 ; CPU:$C5B0 PRG:05B0 A2 05 @copy: - lda Prepare0300StructureTemplateC13C,x - sta $0300,x - dex - bpl @copy + lda Prepare0300StructureTemplateC13C,x ; CPU:$C5B2 PRG:05B2 BD 3C C1 + sta $0300,x ; CPU:$C5B5 PRG:05B5 9D 00 03 + dex ; CPU:$C5B8 PRG:05B8 CA + bpl @copy ; CPU:$C5B9 PRG:05B9 10 F7 - ldx $43 - inx - stx $0304 - rts + ldx $43 ; CPU:$C5BB PRG:05BB A6 43 + inx ; CPU:$C5BD PRG:05BD E8 + stx $0304 ; CPU:$C5BE PRG:05BE 8E 04 03 + rts ; CPU:$C5C1 PRG:05C1 60 ; $C5C2-$C620: runtime initialization. InitializeRuntimeState: - ldx #$01 - stx $B7 + ldx #$01 ; CPU:$C5C2 PRG:05C2 A2 01 + stx $B7 ; CPU:$C5C4 PRG:05C4 86 B7 - jsr CopyPersistentBufferToWorkingRam + jsr CopyPersistentBufferToWorkingRam ; CPU:$C5C6 PRG:05C6 20 21 C6 - stx $BD - stx $BE - stx $C4 - stx $C0 - stx InputActionLatch - stx $C2 + stx $BD ; CPU:$C5C9 PRG:05C9 86 BD + stx $BE ; CPU:$C5CB PRG:05CB 86 BE + stx $C4 ; CPU:$C5CD PRG:05CD 86 C4 + stx $C0 ; CPU:$C5CF PRG:05CF 86 C0 + stx InputActionLatch ; CPU:$C5D1 PRG:05D1 86 49 + stx $C2 ; CPU:$C5D3 PRG:05D3 86 C2 - inx - stx WorkingBuffer + inx ; CPU:$C5D5 PRG:05D5 E8 + stx WorkingBuffer ; CPU:$C5D6 PRG:05D6 8E E0 05 - lda #$06 - sta $AC + lda #$06 ; CPU:$C5D9 PRG:05D9 A9 06 + sta $AC ; CPU:$C5DB PRG:05DB 85 AC - lda #$A0 - sta $8C + lda #$A0 ; CPU:$C5DD PRG:05DD A9 A0 + sta $8C ; CPU:$C5DF PRG:05DF 85 8C - lda #$10 - sta $80 + lda #$10 ; CPU:$C5E1 PRG:05E1 A9 10 + sta $80 ; CPU:$C5E3 PRG:05E3 85 80 - lda #$04 - sta $04 + lda #$04 ; CPU:$C5E5 PRG:05E5 A9 04 + sta $04 ; CPU:$C5E7 PRG:05E7 85 04 - ldx #$00 - stx $0B + ldx #$00 ; CPU:$C5E9 PRG:05E9 A2 00 + stx $0B ; CPU:$C5EB PRG:05EB 86 0B - jsr BuildRuntimeEntry + jsr BuildRuntimeEntry ; CPU:$C5ED PRG:05ED 20 A3 E1 - ldx #$07 + ldx #$07 ; CPU:$C5F0 PRG:05F0 A2 07 @copy_template: - lda RuntimeOamTemplateC178,x - sta $0228,x - dex - bpl @copy_template + lda RuntimeOamTemplateC178,x ; CPU:$C5F2 PRG:05F2 BD 78 C1 + sta $0228,x ; CPU:$C5F5 PRG:05F5 9D 28 02 + dex ; CPU:$C5F8 PRG:05F8 CA + bpl @copy_template ; CPU:$C5F9 PRG:05F9 10 F7 - lda #$05 - sta $B1 - sta $B2 + lda #$05 ; CPU:$C5FB PRG:05FB A9 05 + sta $B1 ; CPU:$C5FD PRG:05FD 85 B1 + sta $B2 ; CPU:$C5FF PRG:05FF 85 B2 - lda #$21 - sta $B0 + lda #$21 ; CPU:$C601 PRG:0601 A9 21 + sta $B0 ; CPU:$C603 PRG:0603 85 B0 - lda #$03 - sta $B3 + lda #$03 ; CPU:$C605 PRG:0605 A9 03 + sta $B3 ; CPU:$C607 PRG:0607 85 B3 - lda #$08 - sta $64 - sta $E0 - inc $E0 + lda #$08 ; CPU:$C609 PRG:0609 A9 08 + sta $64 ; CPU:$C60B PRG:060B 85 64 + sta $E0 ; CPU:$C60D PRG:060D 85 E0 + inc $E0 ; CPU:$C60F PRG:060F E6 E0 - lda #$7A - sta $B4 + lda #$7A ; CPU:$C611 PRG:0611 A9 7A + sta $B4 ; CPU:$C613 PRG:0613 85 B4 - inc $40 - inc $47 + inc $40 ; CPU:$C615 PRG:0615 E6 40 + inc $47 ; CPU:$C617 PRG:0617 E6 47 - lda #$D0 - jsr $EC25 - jmp BuildOamEntryEC47 + lda #$D0 ; CPU:$C619 PRG:0619 A9 D0 + jsr $EC25 ; CPU:$C61B PRG:061B 20 25 EC + jmp BuildOamEntryEC47 ; CPU:$C61E PRG:061E 4C 47 EC ; $C621-$C62C: copy the complete 256-byte persistent buffer ; into the working buffer. X wraps from $00 -> $FF and ; eventually back to $00, producing exactly 256 iterations. CopyPersistentBufferToWorkingRam: - ldx #$00 + ldx #$00 ; CPU:$C621 PRG:0621 A2 00 @copy: - lda PersistentBuffer,x - sta WorkingBuffer,x - dex - bne @copy + lda PersistentBuffer,x ; CPU:$C623 PRG:0623 BD E0 06 + sta WorkingBuffer,x ; CPU:$C626 PRG:0626 9D E0 05 + dex ; CPU:$C629 PRG:0629 CA + bne @copy ; CPU:$C62A PRG:062A D0 F7 - rts + rts ; CPU:$C62C PRG:062C 60 ; These entry points also have absolute aliases in symbols.inc. SerialWriteTimingCode: - lda #$05 - sta JOY1 - pha - pla - pha - pla - pha - pla - rts + lda #$05 ; CPU:$C62D PRG:062D A9 05 + sta JOY1 ; CPU:$C62F PRG:062F 8D 16 40 + pha ; CPU:$C632 PRG:0632 48 + pla ; CPU:$C633 PRG:0633 68 + pha ; CPU:$C634 PRG:0634 48 + pla ; CPU:$C635 PRG:0635 68 + pha ; CPU:$C636 PRG:0636 48 + pla ; CPU:$C637 PRG:0637 68 + rts ; CPU:$C638 PRG:0638 60 ; $C639-$C64D: wait for $4016 bit 1 to assert and then deassert. SerialWaitPulseCode: @wait_high: - jsr SerialWriteTimingCode - lda JOY1 - and #$02 - beq @wait_high + jsr SerialWriteTimingCode ; CPU:$C639 PRG:0639 20 2D C6 + lda JOY1 ; CPU:$C63C PRG:063C AD 16 40 + and #$02 ; CPU:$C63F PRG:063F 29 02 + beq @wait_high ; CPU:$C641 PRG:0641 F0 F6 @wait_low: - jsr SerialWriteTimingCode - lda $4016 - and #$02 - bne @wait_low + jsr SerialWriteTimingCode ; CPU:$C643 PRG:0643 20 2D C6 + lda $4016 ; CPU:$C646 PRG:0646 AD 16 40 + and #$02 ; CPU:$C649 PRG:0649 29 02 + bne @wait_low ; CPU:$C64B PRG:064B D0 F6 - rts + rts ; CPU:$C64D PRG:064D 60 ; $C64E: short-duration pulse entry. SerialPulseShortCode: - pha - lda #$34 - bne SerialPulseCommon + pha ; CPU:$C64E PRG:064E 48 + lda #$34 ; CPU:$C64F PRG:064F A9 34 + bne SerialPulseCommon ; CPU:$C651 PRG:0651 D0 03 ; $C653: long-duration pulse entry. SerialPulseLongCode: - pha - lda #$6A + pha ; CPU:$C653 PRG:0653 48 + lda #$6A ; CPU:$C654 PRG:0654 A9 6A ; $C656: common pulse generator. SerialPulseCommon: - sta $07 - sta $0C + sta $07 ; CPU:$C656 PRG:0656 85 07 + sta $0C ; CPU:$C658 PRG:0658 85 0C - lda #$04 - sta JOY1 + lda #$04 ; CPU:$C65A PRG:065A A9 04 + sta JOY1 ; CPU:$C65C PRG:065C 8D 16 40 @high_delay: - dec $07 - bne @high_delay + dec $07 ; CPU:$C65F PRG:065F C6 07 + bne @high_delay ; CPU:$C661 PRG:0661 D0 FC - lda #$FF - sta JOY1 + lda #$FF ; CPU:$C663 PRG:0663 A9 FF + sta JOY1 ; CPU:$C665 PRG:0665 8D 16 40 @low_delay: - dec $0C - bne @low_delay + dec $0C ; CPU:$C668 PRG:0668 C6 0C + bne @low_delay ; CPU:$C66A PRG:066A D0 FC - pla - rts + pla ; CPU:$C66C PRG:066C 68 + rts ; CPU:$C66D PRG:066D 60 ; --------------------------------------------------------------------------- ; $C66E-$C689: transmit one byte, MSB first. ; --------------------------------------------------------------------------- SerialTransmitByteCode: - jsr SerialPulseLongCode - ldx #$08 + jsr SerialPulseLongCode ; CPU:$C66E PRG:066E 20 53 C6 + ldx #$08 ; CPU:$C671 PRG:0671 A2 08 @next_bit: - sta $00 - clc - adc $00 - bcs @bit_set + sta $00 ; CPU:$C673 PRG:0673 85 00 + clc ; CPU:$C675 PRG:0675 18 + adc $00 ; CPU:$C676 PRG:0676 65 00 + bcs @bit_set ; CPU:$C678 PRG:0678 B0 07 - jsr SerialPulseShortCode + jsr SerialPulseShortCode ; CPU:$C67A PRG:067A 20 4E C6 @finish_bit: - dex - bne @next_bit - rts + dex ; CPU:$C67D PRG:067D CA + bne @next_bit ; CPU:$C67E PRG:067E D0 F3 + rts ; CPU:$C680 PRG:0680 60 @bit_set: - jsr SerialPulseLongCode - jsr SerialIncrementCountCode - jmp @finish_bit + jsr SerialPulseLongCode ; CPU:$C681 PRG:0681 20 53 C6 + jsr SerialIncrementCountCode ; CPU:$C684 PRG:0684 20 8A C6 + jmp @finish_bit ; CPU:$C687 PRG:0687 4C 7D C6 ; --------------------------------------------------------------------------- @@ -1555,13 +1555,13 @@ SerialTransmitByteCode: ; --------------------------------------------------------------------------- SerialIncrementCountCode: - inc $08 - bne @return + inc $08 ; CPU:$C68A PRG:068A E6 08 + bne @return ; CPU:$C68C PRG:068C D0 02 - inc $09 + inc $09 ; CPU:$C68E PRG:068E E6 09 @return: - rts + rts ; CPU:$C690 PRG:0690 60 ; --------------------------------------------------------------------------- @@ -1569,20 +1569,20 @@ SerialIncrementCountCode: ; --------------------------------------------------------------------------- SerialReceiveBitCode: - jsr SerialWaitPulseCode + jsr SerialWaitPulseCode ; CPU:$C691 PRG:0691 20 39 C6 - lda #$4E - sta $01 + lda #$4E ; CPU:$C694 PRG:0694 A9 4E + sta $01 ; CPU:$C696 PRG:0696 85 01 @delay: - dec $01 - bne @delay + dec $01 ; CPU:$C698 PRG:0698 C6 01 + bne @delay ; CPU:$C69A PRG:069A D0 FC - jsr SerialWriteTimingCode + jsr SerialWriteTimingCode ; CPU:$C69C PRG:069C 20 2D C6 - lda JOY1 - and #$02 - rts + lda JOY1 ; CPU:$C69F PRG:069F AD 16 40 + and #$02 ; CPU:$C6A2 PRG:06A2 29 02 + rts ; CPU:$C6A4 PRG:06A4 60 ; --------------------------------------------------------------------------- @@ -1590,202 +1590,202 @@ SerialReceiveBitCode: ; --------------------------------------------------------------------------- SerialReceiveByteCode: - lda #$08 - sta $03 + lda #$08 ; CPU:$C6A5 PRG:06A5 A9 08 + sta $03 ; CPU:$C6A7 PRG:06A7 85 03 - lda #$00 - sta $04 + lda #$00 ; CPU:$C6A9 PRG:06A9 A9 00 + sta $04 ; CPU:$C6AB PRG:06AB 85 04 @next_bit: - lda $04 - clc - adc $04 - sta $04 + lda $04 ; CPU:$C6AD PRG:06AD A5 04 + clc ; CPU:$C6AF PRG:06AF 18 + adc $04 ; CPU:$C6B0 PRG:06B0 65 04 + sta $04 ; CPU:$C6B2 PRG:06B2 85 04 - jsr SerialReceiveBitCode - bne @finish_bit + jsr SerialReceiveBitCode ; CPU:$C6B4 PRG:06B4 20 91 C6 + bne @finish_bit ; CPU:$C6B7 PRG:06B7 D0 05 - jsr SerialIncrementCountCode - inc $04 + jsr SerialIncrementCountCode ; CPU:$C6B9 PRG:06B9 20 8A C6 + inc $04 ; CPU:$C6BC PRG:06BC E6 04 @finish_bit: - dec $03 - bne @next_bit + dec $03 ; CPU:$C6BE PRG:06BE C6 03 + bne @next_bit ; CPU:$C6C0 PRG:06C0 D0 EB - jsr SerialWaitPulseCode + jsr SerialWaitPulseCode ; CPU:$C6C2 PRG:06C2 20 39 C6 - lda $04 - rts + lda $04 ; CPU:$C6C5 PRG:06C5 A5 04 + rts ; CPU:$C6C7 PRG:06C7 60 ; $C6C8-$C6D0: transmit the two runtime-data blocks. ; Deliberately falls through into TransmitDataBlockCode after ; configuring the second block. TransmitRuntimeDataCode: - jsr SetupTransmitRamBlockCode - jsr TransmitDataBlockCode - jsr SetupTransmitWorkingBufferCode + jsr SetupTransmitRamBlockCode ; CPU:$C6C8 PRG:06C8 20 16 C7 + jsr TransmitDataBlockCode ; CPU:$C6CB PRG:06CB 20 D1 C6 + jsr SetupTransmitWorkingBufferCode ; CPU:$C6CE PRG:06CE 20 26 C7 ; Fall through intentionally into TransmitDataBlockCode. ; $C6D1-$C715: transmit one serial data block. TransmitDataBlockCode: - lda #$20 - sta $0A + lda #$20 ; CPU:$C6D1 PRG:06D1 A9 20 + sta $0A ; CPU:$C6D3 PRG:06D3 85 0A - lda #$4E - sta $0B + lda #$4E ; CPU:$C6D5 PRG:06D5 A9 4E + sta $0B ; CPU:$C6D7 PRG:06D7 85 0B @initial_delay: - jsr SerialPulseShortCode - dec $0A - bne @initial_delay + jsr SerialPulseShortCode ; CPU:$C6D9 PRG:06D9 20 4E C6 + dec $0A ; CPU:$C6DC PRG:06DC C6 0A + bne @initial_delay ; CPU:$C6DE PRG:06DE D0 F9 - dec $0B - bne @initial_delay + dec $0B ; CPU:$C6E0 PRG:06E0 C6 0B + bne @initial_delay ; CPU:$C6E2 PRG:06E2 D0 F5 @long_preamble: - jsr SerialPulseLongCode - dec $05 - bne @long_preamble + jsr SerialPulseLongCode ; CPU:$C6E4 PRG:06E4 20 53 C6 + dec $05 ; CPU:$C6E7 PRG:06E7 C6 05 + bne @long_preamble ; CPU:$C6E9 PRG:06E9 D0 F9 @short_preamble: - jsr SerialPulseShortCode - dec $06 - bne @short_preamble + jsr SerialPulseShortCode ; CPU:$C6EB PRG:06EB 20 4E C6 + dec $06 ; CPU:$C6EE PRG:06EE C6 06 + bne @short_preamble ; CPU:$C6F0 PRG:06F0 D0 F9 - jsr SerialPulseLongCode + jsr SerialPulseLongCode ; CPU:$C6F2 PRG:06F2 20 53 C6 - lda #$00 - sta $08 - sta $09 + lda #$00 ; CPU:$C6F5 PRG:06F5 A9 00 + sta $08 ; CPU:$C6F7 PRG:06F7 85 08 + sta $09 ; CPU:$C6F9 PRG:06F9 85 09 - ldy #$00 + ldy #$00 ; CPU:$C6FB PRG:06FB A0 00 @send_payload: - lda ($0E),y - jsr SerialTransmitByteCode - iny - cpy $0D - bne @send_payload + lda ($0E),y ; CPU:$C6FD PRG:06FD B1 0E + jsr SerialTransmitByteCode ; CPU:$C6FF PRG:06FF 20 6E C6 + iny ; CPU:$C702 PRG:0702 C8 + cpy $0D ; CPU:$C703 PRG:0703 C4 0D + bne @send_payload ; CPU:$C705 PRG:0705 D0 F6 - lda $09 - pha + lda $09 ; CPU:$C707 PRG:0707 A5 09 + pha ; CPU:$C709 PRG:0709 48 - lda $08 - jsr SerialTransmitByteCode + lda $08 ; CPU:$C70A PRG:070A A5 08 + jsr SerialTransmitByteCode ; CPU:$C70C PRG:070C 20 6E C6 - pla - jsr SerialTransmitByteCode + pla ; CPU:$C70F PRG:070F 68 + jsr SerialTransmitByteCode ; CPU:$C710 PRG:0710 20 6E C6 - jmp SerialPulseLongCode + jmp SerialPulseLongCode ; CPU:$C713 PRG:0713 4C 53 C6 ; $C716-$C725 ; Configure a $40-byte block beginning at $0060. SetupTransmitRamBlockCode: - lda #$40 - sta $0D + lda #$40 ; CPU:$C716 PRG:0716 A9 40 + sta $0D ; CPU:$C718 PRG:0718 85 0D - lda #$60 - sta $0E + lda #$60 ; CPU:$C71A PRG:071A A9 60 + sta $0E ; CPU:$C71C PRG:071C 85 0E - lda #$00 - sta $0F + lda #$00 ; CPU:$C71E PRG:071E A9 00 + sta $0F ; CPU:$C720 PRG:0720 85 0F - lda #$28 - bne SetTransmitPreambleCountsCode + lda #$28 ; CPU:$C722 PRG:0722 A9 28 + bne SetTransmitPreambleCountsCode ; CPU:$C724 PRG:0724 D0 0E ; $C726-$C733 ; Configure the working-buffer block beginning at $05E0. ; A zero byte count represents 256 iterations when Y wraps. SetupTransmitWorkingBufferCode: - lda #$00 - sta $0D + lda #$00 ; CPU:$C726 PRG:0726 A9 00 + sta $0D ; CPU:$C728 PRG:0728 85 0D - lda #$E0 - sta $0E + lda #$E0 ; CPU:$C72A PRG:072A A9 E0 + sta $0E ; CPU:$C72C PRG:072C 85 0E - lda #$05 - sta $0F + lda #$05 ; CPU:$C72E PRG:072E A9 05 + sta $0F ; CPU:$C730 PRG:0730 85 0F - lda #$14 + lda #$14 ; CPU:$C732 PRG:0732 A9 14 ; $C734-$C738 ; A contains the requested preamble timing/count value. SetTransmitPreambleCountsCode: - sta $05 - sta $06 - rts + sta $05 ; CPU:$C734 PRG:0734 85 05 + sta $06 ; CPU:$C736 PRG:0736 85 06 + rts ; CPU:$C738 PRG:0738 60 ; --------------------------------------------------------------------------- ; $C739-$C791: receive the two runtime-data blocks. ; --------------------------------------------------------------------------- ReceiveRuntimeDataCode: - jsr DisableNmi - jsr SetupTransmitRamBlockCode - jsr ReceiveDataBlockCode - bcc ReceiveFirstBlockOk + jsr DisableNmi ; CPU:$C739 PRG:0739 20 2F C3 + jsr SetupTransmitRamBlockCode ; CPU:$C73C PRG:073C 20 16 C7 + jsr ReceiveDataBlockCode ; CPU:$C73F PRG:073F 20 92 C7 + bcc ReceiveFirstBlockOk ; CPU:$C742 PRG:0742 90 0D ReceiveError: - lda #$19 - sta $45 + lda #$19 ; CPU:$C744 PRG:0744 A9 19 + sta $45 ; CPU:$C746 PRG:0746 85 45 ReceiveRunUpdate: - jsr WaitForVblankEndAndEnableNmi + jsr WaitForVblankEndAndEnableNmi ; CPU:$C748 PRG:0748 20 39 C3 ReceiveWaitUpdate: - lda $45 - bne ReceiveWaitUpdate + lda $45 ; CPU:$C74B PRG:074B A5 45 + bne ReceiveWaitUpdate ; CPU:$C74D PRG:074D D0 FC - beq ReceiveRuntimeDataCode + beq ReceiveRuntimeDataCode ; CPU:$C74F PRG:074F F0 E8 ReceiveFirstBlockOk: - ldx #$00 - stx $A8 + ldx #$00 ; CPU:$C751 PRG:0751 A2 00 + stx $A8 ; CPU:$C753 PRG:0753 86 A8 - ldy #$01 + ldy #$01 ; CPU:$C755 PRG:0755 A0 01 ReceiveValidateHeader: - lda ($0E),y - sta $A3,y - cmp ReceiveHeaderTableBaseC17F,y - beq ReceiveHeaderByteOk + lda ($0E),y ; CPU:$C757 PRG:0757 B1 0E + sta $A3,y ; CPU:$C759 PRG:0759 99 A3 00 + cmp ReceiveHeaderTableBaseC17F,y ; CPU:$C75C PRG:075C D9 7F C1 + beq ReceiveHeaderByteOk ; CPU:$C75F PRG:075F F0 01 - inx + inx ; CPU:$C761 PRG:0761 E8 ReceiveHeaderByteOk: - iny - cpy #$05 - bne ReceiveValidateHeader + iny ; CPU:$C762 PRG:0762 C8 + cpy #$05 ; CPU:$C763 PRG:0763 C0 05 + bne ReceiveValidateHeader ; CPU:$C765 PRG:0765 D0 F0 - lda #$07 - sta $A0 + lda #$07 ; CPU:$C767 PRG:0767 A9 07 + sta $A0 ; CPU:$C769 PRG:0769 85 A0 - lda #$22 - sta $A1 + lda #$22 ; CPU:$C76B PRG:076B A9 22 + sta $A1 ; CPU:$C76D PRG:076D 85 A1 - lda #$4F - sta $A2 + lda #$4F ; CPU:$C76F PRG:076F A9 4F + sta $A2 ; CPU:$C771 PRG:0771 85 A2 - lda #$04 - sta $A3 + lda #$04 ; CPU:$C773 PRG:0773 A9 04 + sta $A3 ; CPU:$C775 PRG:0775 85 A3 - lda #$1A - sta $45 + lda #$1A ; CPU:$C777 PRG:0777 A9 1A + sta $45 ; CPU:$C779 PRG:0779 85 45 - cpx #$00 - bne ReceiveRunUpdate + cpx #$00 ; CPU:$C77B PRG:077B E0 00 + bne ReceiveRunUpdate ; CPU:$C77D PRG:077D D0 C9 - jsr WaitForVblankEndAndEnableNmi + jsr WaitForVblankEndAndEnableNmi ; CPU:$C77F PRG:077F 20 39 C3 ReceiveWaitSecondUpdate: - lda $45 - bne ReceiveWaitSecondUpdate + lda $45 ; CPU:$C782 PRG:0782 A5 45 + bne ReceiveWaitSecondUpdate ; CPU:$C784 PRG:0784 D0 FC - jsr DisableNmi - jsr SetupTransmitWorkingBufferCode - jsr ReceiveDataBlockCode - bcs ReceiveError + jsr DisableNmi ; CPU:$C786 PRG:0786 20 2F C3 + jsr SetupTransmitWorkingBufferCode ; CPU:$C789 PRG:0789 20 26 C7 + jsr ReceiveDataBlockCode ; CPU:$C78C PRG:078C 20 92 C7 + bcs ReceiveError ; CPU:$C78F PRG:078F B0 B3 - rts + rts ; CPU:$C791 PRG:0791 60 ; --------------------------------------------------------------------------- ; $C792-$C7DD: receive one serial data block. @@ -1797,104 +1797,104 @@ ReceiveWaitSecondUpdate: ReceiveDataBlockCode: @restart: - lda $05 - sta $00 + lda $05 ; CPU:$C792 PRG:0792 A5 05 + sta $00 ; CPU:$C794 PRG:0794 85 00 @wait_first_preamble: - jsr SerialReceiveBitCode - bne @restart + jsr SerialReceiveBitCode ; CPU:$C796 PRG:0796 20 91 C6 + bne @restart ; CPU:$C799 PRG:0799 D0 F7 - dec $00 - bne @wait_first_preamble + dec $00 ; CPU:$C79B PRG:079B C6 00 + bne @wait_first_preamble ; CPU:$C79D PRG:079D D0 F7 - lda $06 - sta $00 + lda $06 ; CPU:$C79F PRG:079F A5 06 + sta $00 ; CPU:$C7A1 PRG:07A1 85 00 @wait_second_preamble: - jsr SerialReceiveBitCode - beq @restart + jsr SerialReceiveBitCode ; CPU:$C7A3 PRG:07A3 20 91 C6 + beq @restart ; CPU:$C7A6 PRG:07A6 F0 EA - dec $00 - bne @wait_second_preamble + dec $00 ; CPU:$C7A8 PRG:07A8 C6 00 + bne @wait_second_preamble ; CPU:$C7AA PRG:07AA D0 F7 - lda #$00 - sta $08 - sta $09 + lda #$00 ; CPU:$C7AC PRG:07AC A9 00 + sta $08 ; CPU:$C7AE PRG:07AE 85 08 + sta $09 ; CPU:$C7B0 PRG:07B0 85 09 - jsr SerialWaitPulseCode - jsr SerialWaitPulseCode + jsr SerialWaitPulseCode ; CPU:$C7B2 PRG:07B2 20 39 C6 + jsr SerialWaitPulseCode ; CPU:$C7B5 PRG:07B5 20 39 C6 - ldy #$00 + ldy #$00 ; CPU:$C7B8 PRG:07B8 A0 00 @receive_payload: - jsr SerialReceiveByteCode - sta ($0E),y + jsr SerialReceiveByteCode ; CPU:$C7BA PRG:07BA 20 A5 C6 + sta ($0E),y ; CPU:$C7BD PRG:07BD 91 0E - iny - cpy $0D - bne @receive_payload + iny ; CPU:$C7BF PRG:07BF C8 + cpy $0D ; CPU:$C7C0 PRG:07C0 C4 0D + bne @receive_payload ; CPU:$C7C2 PRG:07C2 D0 F6 - lda $08 - sta $0A + lda $08 ; CPU:$C7C4 PRG:07C4 A5 08 + sta $0A ; CPU:$C7C6 PRG:07C6 85 0A - lda $09 - sta $0B + lda $09 ; CPU:$C7C8 PRG:07C8 A5 09 + sta $0B ; CPU:$C7CA PRG:07CA 85 0B - jsr SerialReceiveByteCode - cmp $0A - bne @failure + jsr SerialReceiveByteCode ; CPU:$C7CC PRG:07CC 20 A5 C6 + cmp $0A ; CPU:$C7CF PRG:07CF C5 0A + bne @failure ; CPU:$C7D1 PRG:07D1 D0 07 - jsr SerialReceiveByteCode - cmp $0B - beq @success + jsr SerialReceiveByteCode ; CPU:$C7D3 PRG:07D3 20 A5 C6 + cmp $0B ; CPU:$C7D6 PRG:07D6 C5 0B + beq @success ; CPU:$C7D8 PRG:07D8 F0 02 @failure: - sec - rts + sec ; CPU:$C7DA PRG:07DA 38 + rts ; CPU:$C7DB PRG:07DB 60 @success: - clc - rts + clc ; CPU:$C7DC PRG:07DC 18 + rts ; CPU:$C7DD PRG:07DD 60 UpdateMenuSelection: - sta $00 - ldy MenuSelectionIndex - ldx #MENU_ACTION_NONE - lda Controller1Pressed - and #PAD_MENU_INPUT - bne @input - sta InputActionLatch + sta $00 ; CPU:$C7DE PRG:07DE 85 00 + ldy MenuSelectionIndex ; CPU:$C7E0 PRG:07E0 A4 42 + ldx #MENU_ACTION_NONE ; CPU:$C7E2 PRG:07E2 A2 00 + lda Controller1Pressed ; CPU:$C7E4 PRG:07E4 A5 15 + and #PAD_MENU_INPUT ; CPU:$C7E6 PRG:07E6 29 3C + bne @input ; CPU:$C7E8 PRG:07E8 D0 03 + sta InputActionLatch ; CPU:$C7EA PRG:07EA 85 49 @early_return: - rts + rts ; CPU:$C7EC PRG:07EC 60 @input: lda #$5D - sta $31 - lda InputActionLatch - bne @early_return - lda Controller1Pressed - bit Slot90BoundaryTable - bne @next - lsr a - lsr a - lsr a - bcs @next - lsr a - bcs @prev - ldx #MENU_ACTION_ACCEPTED - stx $30 - bne @store + sta $31 ; CPU:$C7EF PRG:07EF 85 31 + lda InputActionLatch ; CPU:$C7F1 PRG:07F1 A5 49 + bne @early_return ; CPU:$C7F3 PRG:07F3 D0 F7 + lda Controller1Pressed ; CPU:$C7F5 PRG:07F5 A5 15 + bit Slot90BoundaryTable ; CPU:$C7F7 PRG:07F7 2C CE C0 + bne @next ; CPU:$C7FA PRG:07FA D0 0E + lsr a ; CPU:$C7FC PRG:07FC 4A + lsr a ; CPU:$C7FD PRG:07FD 4A + lsr a ; CPU:$C7FE PRG:07FE 4A + bcs @next ; CPU:$C7FF PRG:07FF B0 09 + lsr a ; CPU:$C801 PRG:0801 4A + bcs @prev ; CPU:$C802 PRG:0802 B0 0D + ldx #MENU_ACTION_ACCEPTED ; CPU:$C804 PRG:0804 A2 04 + stx $30 ; CPU:$C806 PRG:0806 86 30 + bne @store ; CPU:$C808 PRG:0808 D0 11 @next: iny - cpy $00 - bcc @changed - ldy #$01 + cpy $00 ; CPU:$C80B PRG:080B C4 00 + bcc @changed ; CPU:$C80D PRG:080D 90 08 + ldy #$01 ; CPU:$C80F PRG:080F A0 01 @prev: dey - bpl @changed - ldy $00 - dey + bpl @changed ; CPU:$C812 PRG:0812 10 03 + ldy $00 ; CPU:$C814 PRG:0814 A4 00 + dey ; CPU:$C816 PRG:0816 88 @changed: - lda #$01 - sta $FF + lda #$01 ; CPU:$C817 PRG:0817 A9 01 + sta $FF ; CPU:$C819 PRG:0819 85 FF @store: sty MenuSelectionIndex - inc InputActionLatch + inc InputActionLatch ; CPU:$C81D PRG:081D E6 49 @return:rts ; --------------------------------------------------------------------------- @@ -1966,16 +1966,16 @@ InitializeCourseRuntime: ; --------------------------------------------------------------------------- ClearRuntimeZeroPage: - lda #$00 - ldx #$EF + lda #$00 ; CPU:$C869 PRG:0869 A9 00 + ldx #$EF ; CPU:$C86B PRG:086B A2 EF @clear: - sta $00,x - dex - cpx #$4C - bne @clear + sta $00,x ; CPU:$C86D PRG:086D 95 00 + dex ; CPU:$C86F PRG:086F CA + cpx #$4C ; CPU:$C870 PRG:0870 E0 4C + bne @clear ; CPU:$C872 PRG:0872 D0 F9 - rts + rts ; CPU:$C874 PRG:0874 60 @@ -1985,83 +1985,83 @@ ClearRuntimeZeroPage: ; --------------------------------------------------------------------------- InitializeGameRuntime: - inc $47 - inc $40 + inc $47 ; CPU:$C875 PRG:0875 E6 47 + inc $40 ; CPU:$C877 PRG:0877 E6 40 - lda $34 - bne @store_34 + lda $34 ; CPU:$C879 PRG:0879 A5 34 + bne @store_34 ; CPU:$C87B PRG:087B D0 02 - lda #$05 + lda #$05 ; CPU:$C87D PRG:087D A9 05 @store_34: - sta $34 + sta $34 ; CPU:$C87F PRG:087F 85 34 - lda #$34 - sta $E8 + lda #$34 ; CPU:$C881 PRG:0881 A9 34 + sta $E8 ; CPU:$C883 PRG:0883 85 E8 - lda #$14 - sta $E9 + lda #$14 ; CPU:$C885 PRG:0885 A9 14 + sta $E9 ; CPU:$C887 PRG:0887 85 E9 - lda #$A0 - sta $03F1 + lda #$A0 ; CPU:$C889 PRG:0889 A9 A0 + sta $03F1 ; CPU:$C88B PRG:088B 8D F1 03 - lda #$80 - sta $03B4 - sta $03B0 + lda #$80 ; CPU:$C88E PRG:088E A9 80 + sta $03B4 ; CPU:$C890 PRG:0890 8D B4 03 + sta $03B0 ; CPU:$C893 PRG:0893 8D B0 03 - lda #$FF - sta $03BD + lda #$FF ; CPU:$C896 PRG:0896 A9 FF + sta $03BD ; CPU:$C898 PRG:0898 8D BD 03 - ldx #$01 - stx $0370 + ldx #$01 ; CPU:$C89B PRG:089B A2 01 + stx $0370 ; CPU:$C89D PRG:089D 8E 70 03 - inx - stx $03BE + inx ; CPU:$C8A0 PRG:08A0 E8 + stx $03BE ; CPU:$C8A1 PRG:08A1 8E BE 03 - inx + inx ; CPU:$C8A4 PRG:08A4 E8 - lda $03F2 - bne @initialize_riders + lda $03F2 ; CPU:$C8A5 PRG:08A5 AD F2 03 + bne @initialize_riders ; CPU:$C8A8 PRG:08A8 D0 02 - ldx #$00 + ldx #$00 ; CPU:$C8AA PRG:08AA A2 00 @initialize_riders: - lda $C0B4,x - sta $B8,x + lda $C0B4,x ; CPU:$C8AC PRG:08AC BD B4 C0 + sta $B8,x ; CPU:$C8AF PRG:08AF 95 B8 - lda #$08 - sta $64,x + lda #$08 ; CPU:$C8B1 PRG:08B1 A9 08 + sta $64,x ; CPU:$C8B3 PRG:08B3 95 64 - lda $C0B0,x - sta $E0,x + lda $C0B0,x ; CPU:$C8B5 PRG:08B5 BD B0 C0 + sta $E0,x ; CPU:$C8B8 PRG:08B8 95 E0 - lda $C0B8,x - sta $80,x + lda $C0B8,x ; CPU:$C8BA PRG:08BA BD B8 C0 + sta $80,x ; CPU:$C8BD PRG:08BD 95 80 - lda #$06 - sta $AC,x - sta $78,x + lda #$06 ; CPU:$C8BF PRG:08BF A9 06 + sta $AC,x ; CPU:$C8C1 PRG:08C1 95 AC + sta $78,x ; CPU:$C8C3 PRG:08C3 95 78 - lda #$01 - sta $84,x - sta $A8,x + lda #$01 ; CPU:$C8C5 PRG:08C5 A9 01 + sta $84,x ; CPU:$C8C7 PRG:08C7 95 84 + sta $A8,x ; CPU:$C8C9 PRG:08C9 95 A8 - lda $19,x - lsr a - sta $74,x + lda $19,x ; CPU:$C8CB PRG:08CB B5 19 + lsr a ; CPU:$C8CD PRG:08CD 4A + sta $74,x ; CPU:$C8CE PRG:08CE 95 74 - dex - bpl @initialize_riders + dex ; CPU:$C8D0 PRG:08D0 CA + bpl @initialize_riders ; CPU:$C8D1 PRG:08D1 10 D9 - lda $19,x - and #$03 - bne @select_rider + lda $19,x ; CPU:$C8D3 PRG:08D3 B5 19 + and #$03 ; CPU:$C8D5 PRG:08D5 29 03 + bne @select_rider ; CPU:$C8D7 PRG:08D7 D0 02 - lda #$02 + lda #$02 ; CPU:$C8D9 PRG:08D9 A9 02 @select_rider: - tax - lsr $78,x + tax ; CPU:$C8DB PRG:08DB AA + lsr $78,x ; CPU:$C8DC PRG:08DC 56 78 ; --------------------------------------------------------------------------- ; $C8DE-$C92B @@ -2069,64 +2069,64 @@ InitializeGameRuntime: ; --------------------------------------------------------------------------- ContinueGameRuntimeC8DE: - lda $46 - beq @load_reference + lda $46 ; CPU:$C8DE PRG:08DE A5 46 + beq @load_reference ; CPU:$C8E0 PRG:08E0 F0 20 - lda $43 - cmp #$04 - bne @load_reference + lda $43 ; CPU:$C8E2 PRG:08E2 A5 43 + cmp #$04 ; CPU:$C8E4 PRG:08E4 C9 04 + bne @load_reference ; CPU:$C8E6 PRG:08E6 D0 1A - ldx #$07 + ldx #$07 ; CPU:$C8E8 PRG:08E8 A2 07 @copy_0300_template: - lda $C158,x - sta $0300,x + lda $C158,x ; CPU:$C8EA PRG:08EA BD 58 C1 + sta $0300,x ; CPU:$C8ED PRG:08ED 9D 00 03 - dex - bpl @copy_0300_template + dex ; CPU:$C8F0 PRG:08F0 CA + bpl @copy_0300_template ; CPU:$C8F1 PRG:08F1 10 F7 - lda $03F3 - jsr $DFA2 - sta $0307 + lda $03F3 ; CPU:$C8F3 PRG:08F3 AD F3 03 + jsr $DFA2 ; CPU:$C8F6 PRG:08F6 20 A2 DF + sta $0307 ; CPU:$C8F9 PRG:08F9 8D 07 03 - txa - beq @load_reference + txa ; CPU:$C8FC PRG:08FC 8A + beq @load_reference ; CPU:$C8FD PRG:08FD F0 03 - sta $0306 + sta $0306 ; CPU:$C8FF PRG:08FF 8D 06 03 @load_reference: - jsr LoadReferenceTriplet + jsr LoadReferenceTriplet ; CPU:$C902 PRG:0902 20 22 C5 - lda $41 - cmp #$08 - bcc @update_record + lda $41 ; CPU:$C905 PRG:0905 A5 41 + cmp #$08 ; CPU:$C907 PRG:0907 C9 08 + bcc @update_record ; CPU:$C909 PRG:0909 90 03 - jsr LoadPersistentTriplet + jsr LoadPersistentTriplet ; CPU:$C90B PRG:090B 20 3A C5 @update_record: - lda $03F8 - asl a - clc - adc $06 + lda $03F8 ; CPU:$C90E PRG:090E AD F8 03 + asl a ; CPU:$C911 PRG:0911 0A + clc ; CPU:$C912 PRG:0912 18 + adc $06 ; CPU:$C913 PRG:0913 65 06 - cmp #$3C - bcc @store_06 + cmp #$3C ; CPU:$C915 PRG:0915 C9 3C + bcc @store_06 ; CPU:$C917 PRG:0917 90 04 - sbc #$3C - inc $05 + sbc #$3C ; CPU:$C919 PRG:0919 E9 3C + inc $05 ; CPU:$C91B PRG:091B E6 05 @store_06: - sta $06 + sta $06 ; CPU:$C91D PRG:091D 85 06 - lda #$00 - sta $07 + lda #$00 ; CPU:$C91F PRG:091F A9 00 + sta $07 ; CPU:$C921 PRG:0921 85 07 - lda #$02 - sta $03 + lda #$02 ; CPU:$C923 PRG:0923 A9 02 + sta $03 ; CPU:$C925 PRG:0925 85 03 - jsr $C935 + jsr $C935 ; CPU:$C927 PRG:0927 20 35 C9 - lda #$08 + lda #$08 ; CPU:$C92A PRG:092A A9 08 ; --------------------------------------------------------------------------- @@ -2139,11 +2139,11 @@ ContinueGameRuntimeC8DE: ; --------------------------------------------------------------------------- Setup0300EntryC92C: - ldy $43 - sty $02 - sta $03 + ldy $43 ; CPU:$C92C PRG:092C A4 43 + sty $02 ; CPU:$C92E PRG:092E 84 02 + sta $03 ; CPU:$C930 PRG:0930 85 03 - jsr $C53E + jsr $C53E ; CPU:$C932 PRG:0932 20 3E C5 ; --------------------------------------------------------------------------- @@ -2153,20 +2153,20 @@ Setup0300EntryC92C: ; --------------------------------------------------------------------------- Setup0300EntryC935: - ldx #$05 - jsr $DF7F + ldx #$05 ; CPU:$C935 PRG:0935 A2 05 + jsr $DF7F ; CPU:$C937 PRG:0937 20 7F DF - ldx $0300 - ldy #$00 + ldx $0300 ; CPU:$C93A PRG:093A AE 00 03 + ldy #$00 ; CPU:$C93D PRG:093D A0 00 @copy_03d1: - lda $03D1,y - sta $0304,x + lda $03D1,y ; CPU:$C93F PRG:093F B9 D1 03 + sta $0304,x ; CPU:$C942 PRG:0942 9D 04 03 - inx - iny - cpy #$07 - bcc @copy_03d1 + inx ; CPU:$C945 PRG:0945 E8 + iny ; CPU:$C946 PRG:0946 C8 + cpy #$07 ; CPU:$C947 PRG:0947 C0 07 + bcc @copy_03d1 ; CPU:$C949 PRG:0949 90 F4 ; --------------------------------------------------------------------------- @@ -2175,28 +2175,28 @@ Setup0300EntryC935: ; --------------------------------------------------------------------------- Append0300EntryC94B: - lda #$0A - jsr Advance0300IndexC971 + lda #$0A ; CPU:$C94B PRG:094B A9 0A + jsr Advance0300IndexC971 ; CPU:$C94D PRG:094D 20 71 C9 - ldy $03 + ldy $03 ; CPU:$C950 PRG:0950 A4 03 - lda IndexedParameterTableC0EC,y - sta $0301,x + lda IndexedParameterTableC0EC,y ; CPU:$C952 PRG:0952 B9 EC C0 + sta $0301,x ; CPU:$C955 PRG:0955 9D 01 03 - lda IndexedParameterTableC0ED,y - sta $0302,x + lda IndexedParameterTableC0ED,y ; CPU:$C958 PRG:0958 B9 ED C0 + sta $0302,x ; CPU:$C95B PRG:095B 9D 02 03 - lda #$FB - sta $0305,x - sta $0308,x + lda #$FB ; CPU:$C95E PRG:095E A9 FB + sta $0305,x ; CPU:$C960 PRG:0960 9D 05 03 + sta $0308,x ; CPU:$C963 PRG:0963 9D 08 03 - lda #$07 - sta $0303,x + lda #$07 ; CPU:$C966 PRG:0966 A9 07 + sta $0303,x ; CPU:$C968 PRG:0968 9D 03 03 - lda #$00 - sta $030B,x + lda #$00 ; CPU:$C96B PRG:096B A9 00 + sta $030B,x ; CPU:$C96D PRG:096D 9D 0B 03 - rts + rts ; CPU:$C970 PRG:0970 60 ; --------------------------------------------------------------------------- @@ -2228,18 +2228,18 @@ Advance0300IndexC971: ; --------------------------------------------------------------------------- UpdateRaceRuntime: - jsr $CA1B - jsr UpdateGlobalRuntimeEB17 - jsr UpdateAccumulator - jsr UpdateGlobalPosition - jsr UpdateRiderCourseStateE70B - jsr ProcessCourseDefinition - jsr $F68D - jsr $F755 - jsr $C229 + jsr $CA1B ; CPU:$C97C PRG:097C 20 1B CA + jsr UpdateGlobalRuntimeEB17 ; CPU:$C97F PRG:097F 20 17 EB + jsr UpdateAccumulator ; CPU:$C982 PRG:0982 20 6A DA + jsr UpdateGlobalPosition ; CPU:$C985 PRG:0985 20 FE DB + jsr UpdateRiderCourseStateE70B ; CPU:$C988 PRG:0988 20 0B E7 + jsr ProcessCourseDefinition ; CPU:$C98B PRG:098B 20 FF F4 + jsr $F68D ; CPU:$C98E PRG:098E 20 8D F6 + jsr $F755 ; CPU:$C991 PRG:0991 20 55 F7 + jsr $C229 ; CPU:$C994 PRG:0994 20 29 C2 RuntimeUpdatePpuTailC997: - jmp UpdatePpuState + jmp UpdatePpuState ; CPU:$C997 PRG:0997 4C 9B D1 ; --------------------------------------------------------------------------- ; $C99A-$CA07 @@ -2247,56 +2247,56 @@ RuntimeUpdatePpuTailC997: ; --------------------------------------------------------------------------- UpdateGameplayRuntime: - jsr $CA08 + jsr $CA08 ; CPU:$C99A PRG:099A 20 08 CA - lda $03B1 - ora $03B2 - bne RuntimeUpdatePpuTailC997 + lda $03B1 ; CPU:$C99D PRG:099D AD B1 03 + ora $03B2 ; CPU:$C9A0 PRG:09A0 0D B2 03 + bne RuntimeUpdatePpuTailC997 ; CPU:$C9A3 PRG:09A3 D0 F2 - jsr $D918 - jsr $DD8D - jsr UpdateAllRiderScriptStateE733 - jsr $E927 + jsr $D918 ; CPU:$C9A5 PRG:09A5 20 18 D9 + jsr $DD8D ; CPU:$C9A8 PRG:09A8 20 8D DD + jsr UpdateAllRiderScriptStateE733 ; CPU:$C9AB PRG:09AB 20 33 E7 + jsr $E927 ; CPU:$C9AE PRG:09AE 20 27 E9 - lda $52 - beq @normal_runtime + lda $52 ; CPU:$C9B1 PRG:09B1 A5 52 + beq @normal_runtime ; CPU:$C9B3 PRG:09B3 F0 06 - jsr StateHelperCA9B - jmp @continue_runtime + jsr StateHelperCA9B ; CPU:$C9B5 PRG:09B5 20 9B CA + jmp @continue_runtime ; CPU:$C9B8 PRG:09B8 4C D5 C9 @normal_runtime: - lda $03F2 - beq @after_optional_updates + lda $03F2 ; CPU:$C9BB PRG:09BB AD F2 03 + beq @after_optional_updates ; CPU:$C9BE PRG:09BE F0 09 - jsr $DA9F - jsr $DBC4 - jsr $DEBB + jsr $DA9F ; CPU:$C9C0 PRG:09C0 20 9F DA + jsr $DBC4 ; CPU:$C9C3 PRG:09C3 20 C4 DB + jsr $DEBB ; CPU:$C9C6 PRG:09C6 20 BB DE @after_optional_updates: - jsr UpdateGlobalCounters - jsr BuildGlobalDisplayEAC5 - jsr CompareRuntimeSlots - jsr CheckSlotState + jsr UpdateGlobalCounters ; CPU:$C9C9 PRG:09C9 20 30 DF + jsr BuildGlobalDisplayEAC5 ; CPU:$C9CC PRG:09CC 20 C5 EA + jsr CompareRuntimeSlots ; CPU:$C9CF PRG:09CF 20 D5 DF + jsr CheckSlotState ; CPU:$C9D2 PRG:09D2 20 9F E0 @continue_runtime: - jsr UpdateTriggeredSlots - jsr UpdateFourSlots - jsr UpdateFourSlotPositionsE96C - jsr UpdateDisplayState - jsr UpdateFourSlot8CE836 - jsr BuildFourSlotSpritesEA44 - jsr ProcessCourseDefinition - jsr UpdateSlotPairState - jsr UpdateGlobalFC - jsr UpdateGlobalDisplay - jsr ProcessRuntimeEntries - jsr PrepareSortedSlots - jsr UpdateRuntimeSlots - jsr UpdateRiderCourseStateE70B - jsr UpdatePpuState - jsr ProcessRiderSlots + jsr UpdateTriggeredSlots ; CPU:$C9D5 PRG:09D5 20 D1 DD + jsr UpdateFourSlots ; CPU:$C9D8 PRG:09D8 20 1F CD + jsr UpdateFourSlotPositionsE96C ; CPU:$C9DB PRG:09DB 20 6C E9 + jsr UpdateDisplayState ; CPU:$C9DE PRG:09DE 20 31 DE + jsr UpdateFourSlot8CE836 ; CPU:$C9E1 PRG:09E1 20 36 E8 + jsr BuildFourSlotSpritesEA44 ; CPU:$C9E4 PRG:09E4 20 44 EA + jsr ProcessCourseDefinition ; CPU:$C9E7 PRG:09E7 20 FF F4 + jsr UpdateSlotPairState ; CPU:$C9EA PRG:09EA 20 C8 E4 + jsr UpdateGlobalFC ; CPU:$C9ED PRG:09ED 20 E2 DE + jsr UpdateGlobalDisplay ; CPU:$C9F0 PRG:09F0 20 59 E3 + jsr ProcessRuntimeEntries ; CPU:$C9F3 PRG:09F3 20 7F E1 + jsr PrepareSortedSlots ; CPU:$C9F6 PRG:09F6 20 56 E4 + jsr UpdateRuntimeSlots ; CPU:$C9F9 PRG:09F9 20 26 DA + jsr UpdateRiderCourseStateE70B ; CPU:$C9FC PRG:09FC 20 0B E7 + jsr UpdatePpuState ; CPU:$C9FF PRG:09FF 20 9B D1 + jsr ProcessRiderSlots ; CPU:$CA02 PRG:0A02 20 D0 CE - jmp ProcessSortedSlots + jmp ProcessSortedSlots ; CPU:$CA05 PRG:0A05 4C 2B E4 ; --------------------------------------------------------------------------- ; Preserve original ROM $CA08-$CA84. @@ -2307,26 +2307,26 @@ UpdateGameplayRuntime: ; --------------------------------------------------------------------------- UpdateFourRiderRuntime: - ldx #$03 + ldx #$03 ; CPU:$CA08 PRG:0A08 A2 03 @next_rider: - jsr $DCA0 - jsr $DFB2 + jsr $DCA0 ; CPU:$CA0A PRG:0A0A 20 A0 DC + jsr $DFB2 ; CPU:$CA0D PRG:0A0D 20 B2 DF - dex - bpl @next_rider + dex ; CPU:$CA10 PRG:0A10 CA + bpl @next_rider ; CPU:$CA11 PRG:0A11 10 F7 - lda $03F7 + lda $03F7 ; CPU:$CA13 PRG:0A13 AD F7 03 ; CA16: D0 08 = BNE $CA20 - .byte $D0, $08 + .byte $D0, $08 ; CPU:$CA16 PRG:0A16 D0 08 - jsr RuntimeInputStateCA38 + jsr RuntimeInputStateCA38 ; CPU:$CA18 PRG:0A18 20 38 CA - lda $14 - sta $5C + lda $14 ; CPU:$CA1B PRG:0A1B A5 14 + sta $5C ; CPU:$CA1D PRG:0A1D 85 5C - rts + rts ; CPU:$CA1F PRG:0A1F 60 ; --------------------------------------------------------------------------- @@ -2338,30 +2338,30 @@ UpdateFourRiderRuntime: ; --------------------------------------------------------------------------- RuntimeTransitionCA20: - lda $03F7 + lda $03F7 ; CPU:$CA20 PRG:0A20 AD F7 03 ; CA23: F0 5F = BEQ $CA84 - .byte $F0, $5F + .byte $F0, $5F ; CPU:$CA23 PRG:0A23 F0 5F - lda $15 + lda $15 ; CPU:$CA25 PRG:0A25 A5 15 - asl a - asl a - asl a + asl a ; CPU:$CA27 PRG:0A27 0A + asl a ; CPU:$CA28 PRG:0A28 0A + asl a ; CPU:$CA29 PRG:0A29 0A ; CA2A: B0 59 = BCS $CA85 - .byte $B0, $59 + .byte $B0, $59 ; CPU:$CA2A PRG:0A2A B0 59 - asl a + asl a ; CPU:$CA2C PRG:0A2C 0A ; CA2D: 90 55 = BCC $CA84 - .byte $90, $55 + .byte $90, $55 ; CPU:$CA2D PRG:0A2D 90 55 - lda #$00 - sta $42 - sta $47 + lda #$00 ; CPU:$CA2F PRG:0A2F A9 00 + sta $42 ; CPU:$CA31 PRG:0A31 85 42 + sta $47 ; CPU:$CA33 PRG:0A33 85 47 - jmp $C36A + jmp $C36A ; CPU:$CA35 PRG:0A35 4C 6A C3 ; --------------------------------------------------------------------------- @@ -2370,31 +2370,31 @@ RuntimeTransitionCA20: ; --------------------------------------------------------------------------- RuntimeInputStateCA38: - lda $03B2 - bne RuntimeInputDecrementCA63 + lda $03B2 ; CPU:$CA38 PRG:0A38 AD B2 03 + bne RuntimeInputDecrementCA63 ; CPU:$CA3B PRG:0A3B D0 26 - lda $15 - and #$10 - beq RuntimeInputStoreB0CA67 + lda $15 ; CPU:$CA3D PRG:0A3D A5 15 + and #$10 ; CPU:$CA3F PRG:0A3F 29 10 + beq RuntimeInputStoreB0CA67 ; CPU:$CA41 PRG:0A41 F0 24 - lda $03B0 - bne RuntimeInputStoreB0CA67 + lda $03B0 ; CPU:$CA43 PRG:0A43 AD B0 03 + bne RuntimeInputStoreB0CA67 ; CPU:$CA46 PRG:0A46 D0 1F - lda #$80 - sta $FB - sta $03B0 + lda #$80 ; CPU:$CA48 PRG:0A48 A9 80 + sta $FB ; CPU:$CA4A PRG:0A4A 85 FB + sta $03B0 ; CPU:$CA4C PRG:0A4C 8D B0 03 - asl a - sta $FC + asl a ; CPU:$CA4F PRG:0A4F 0A + sta $FC ; CPU:$CA50 PRG:0A50 85 FC - lda $03B1 - eor #$01 - sta $03B1 - bne RuntimeInputSetDelayCA7F + lda $03B1 ; CPU:$CA52 PRG:0A52 AD B1 03 + eor #$01 ; CPU:$CA55 PRG:0A55 49 01 + sta $03B1 ; CPU:$CA57 PRG:0A57 8D B1 03 + bne RuntimeInputSetDelayCA7F ; CPU:$CA5A PRG:0A5A D0 23 - lda #$0F - sta APUCTRL - bne RuntimeInputSetDelayCA7F + lda #$0F ; CPU:$CA5C PRG:0A5C A9 0F + sta APUCTRL ; CPU:$CA5E PRG:0A5E 8D 15 40 + bne RuntimeInputSetDelayCA7F ; CPU:$CA61 PRG:0A61 D0 1C ; --------------------------------------------------------------------------- @@ -2402,8 +2402,8 @@ RuntimeInputStateCA38: ; --------------------------------------------------------------------------- RuntimeInputDecrementCA63: - dec $03B2 - rts + dec $03B2 ; CPU:$CA63 PRG:0A63 CE B2 03 + rts ; CPU:$CA66 PRG:0A66 60 ; --------------------------------------------------------------------------- @@ -2415,20 +2415,20 @@ RuntimeInputDecrementCA63: ; --------------------------------------------------------------------------- RuntimeInputStoreB0CA67: - sta $03B0 + sta $03B0 ; CPU:$CA67 PRG:0A67 8D B0 03 - lda $03B1 - beq RuntimeInputReturnCA84 + lda $03B1 ; CPU:$CA6A PRG:0A6A AD B1 03 + beq RuntimeInputReturnCA84 ; CPU:$CA6D PRG:0A6D F0 15 - lda #$00 - sta APUCTRL + lda #$00 ; CPU:$CA6F PRG:0A6F A9 00 + sta APUCTRL ; CPU:$CA71 PRG:0A71 8D 15 40 - lda $15 - and #$0F - beq RuntimeInputReturnCA84 + lda $15 ; CPU:$CA74 PRG:0A74 A5 15 + and #$0F ; CPU:$CA76 PRG:0A76 29 0F + beq RuntimeInputReturnCA84 ; CPU:$CA78 PRG:0A78 F0 0A - lda $03B2 - bne RuntimeInputReturnCA84 + lda $03B2 ; CPU:$CA7A PRG:0A7A AD B2 03 + bne RuntimeInputReturnCA84 ; CPU:$CA7D PRG:0A7D D0 05 ; --------------------------------------------------------------------------- @@ -2436,8 +2436,8 @@ RuntimeInputStoreB0CA67: ; --------------------------------------------------------------------------- RuntimeInputSetDelayCA7F: - lda #$28 - sta $03B2 + lda #$28 ; CPU:$CA7F PRG:0A7F A9 28 + sta $03B2 ; CPU:$CA81 PRG:0A81 8D B2 03 ; --------------------------------------------------------------------------- @@ -2446,23 +2446,23 @@ RuntimeInputSetDelayCA7F: ; --------------------------------------------------------------------------- RuntimeInputReturnCA84: - rts + rts ; CPU:$CA84 PRG:0A84 60 ResetRuntimeZeroPagePreserveSelection: - lda MenuSelectionIndex - pha - ldx #$FF - lda #$00 + lda MenuSelectionIndex ; CPU:$CA85 PRG:0A85 A5 42 + pha ; CPU:$CA87 PRG:0A87 48 + ldx #$FF ; CPU:$CA88 PRG:0A88 A2 FF + lda #$00 ; CPU:$CA8A PRG:0A8A A9 00 @clear: sta $00,x - dex - cpx #$20 - bne @clear - sta $FC - inc InputActionLatch - pla - sta MenuSelectionIndex - rts + dex ; CPU:$CA8E PRG:0A8E CA + cpx #$20 ; CPU:$CA8F PRG:0A8F E0 20 + bne @clear ; CPU:$CA91 PRG:0A91 D0 F9 + sta $FC ; CPU:$CA93 PRG:0A93 85 FC + inc InputActionLatch ; CPU:$CA95 PRG:0A95 E6 49 + pla ; CPU:$CA97 PRG:0A97 68 + sta MenuSelectionIndex ; CPU:$CA98 PRG:0A98 85 42 + rts ; CPU:$CA9A PRG:0A9A 60 ; --------------------------------------------------------------------------- ; $CA9B-$CB2B @@ -2470,90 +2470,90 @@ ResetRuntimeZeroPagePreserveSelection: ; --------------------------------------------------------------------------- StateHelperCA9B: - lda $32 - bne StateHelperCAAA + lda $32 ; CPU:$CA9B PRG:0A9B A5 32 + bne StateHelperCAAA ; CPU:$CA9D PRG:0A9D D0 0B - jsr AdvanceNmiStateAndEnterNmiSequence + jsr AdvanceNmiStateAndEnterNmiSequence ; CPU:$CA9F PRG:0A9F 20 AF C3 - lda $03F7 - .byte $D0, $DE - sta $47 + lda $03F7 ; CPU:$CAA2 PRG:0AA2 AD F7 03 + .byte $D0, $DE ; CPU:$CAA5 PRG:0AA5 D0 DE + sta $47 ; CPU:$CAA7 PRG:0AA7 85 47 SharedReturnCAA9: - rts + rts ; CPU:$CAA9 PRG:0AA9 60 ; $CAAA StateHelperCAAA: - lda #$00 - sta $FC - sta $03A9 - sta $03E0 - sta $3C + lda #$00 ; CPU:$CAAA PRG:0AAA A9 00 + sta $FC ; CPU:$CAAC PRG:0AAC 85 FC + sta $03A9 ; CPU:$CAAE PRG:0AAE 8D A9 03 + sta $03E0 ; CPU:$CAB1 PRG:0AB1 8D E0 03 + sta $3C ; CPU:$CAB4 PRG:0AB4 85 3C - ldx $52 - dex - bne SharedReturnCAA9 + ldx $52 ; CPU:$CAB6 PRG:0AB6 A6 52 + dex ; CPU:$CAB8 PRG:0AB8 CA + bne SharedReturnCAA9 ; CPU:$CAB9 PRG:0AB9 D0 EE - lda $3F - lsr a - bcs StateHelperCAF3 + lda $3F ; CPU:$CABB PRG:0ABB A5 3F + lsr a ; CPU:$CABD PRG:0ABD 4A + bcs StateHelperCAF3 ; CPU:$CABE PRG:0ABE B0 33 - lsr a - bcs StateHelperCAF3 + lsr a ; CPU:$CAC0 PRG:0AC0 4A + bcs StateHelperCAF3 ; CPU:$CAC1 PRG:0AC1 B0 30 - and #$03 - tay + and #$03 ; CPU:$CAC3 PRG:0AC3 29 03 + tay ; CPU:$CAC5 PRG:0AC5 A8 - lda #$3F - sta $0312 + lda #$3F ; CPU:$CAC6 PRG:0AC6 A9 3F + sta $0312 ; CPU:$CAC8 PRG:0AC8 8D 12 03 - lda #$00 - sta $0313 - sta $0319 + lda #$00 ; CPU:$CACB PRG:0ACB A9 00 + sta $0313 ; CPU:$CACD PRG:0ACD 8D 13 03 + sta $0319 ; CPU:$CAD0 PRG:0AD0 8D 19 03 - lda #$04 - sta $0314 + lda #$04 ; CPU:$CAD3 PRG:0AD3 A9 04 + sta $0314 ; CPU:$CAD5 PRG:0AD5 8D 14 03 - lda $C166,y - sta $0316 + lda $C166,y ; CPU:$CAD8 PRG:0AD8 B9 66 C1 + sta $0316 ; CPU:$CADB PRG:0ADB 8D 16 03 - lda $C170,y - sta $0318 + lda $C170,y ; CPU:$CADE PRG:0ADE B9 70 C1 + sta $0318 ; CPU:$CAE1 PRG:0AE1 8D 18 03 - ldy $43 + ldy $43 ; CPU:$CAE4 PRG:0AE4 A4 43 - lda $C160,y - sta $0315 + lda $C160,y ; CPU:$CAE6 PRG:0AE6 B9 60 C1 + sta $0315 ; CPU:$CAE9 PRG:0AE9 8D 15 03 - lda $C16A,y - sta $0317 + lda $C16A,y ; CPU:$CAEC PRG:0AEC B9 6A C1 + sta $0317 ; CPU:$CAEF PRG:0AEF 8D 17 03 - rts + rts ; CPU:$CAF2 PRG:0AF2 60 ; $CAF3 StateHelperCAF3: - ldx #$11 + ldx #$11 ; CPU:$CAF3 PRG:0AF3 A2 11 - lda $32 - lsr a - bcs SharedReturnCB05 + lda $32 ; CPU:$CAF5 PRG:0AF5 A5 32 + lsr a ; CPU:$CAF7 PRG:0AF7 4A + bcs SharedReturnCB05 ; CPU:$CAF8 PRG:0AF8 B0 0B ; $CAFA StateHelperCAFA: - ldy #$06 - lda #$FE + ldy #$06 ; CPU:$CAFA PRG:0AFA A0 06 + lda #$FE ; CPU:$CAFC PRG:0AFC A9 FE @fill: - sta $0304,x - inx - dey - bpl @fill + sta $0304,x ; CPU:$CAFE PRG:0AFE 9D 04 03 + inx ; CPU:$CB01 PRG:0B01 E8 + dey ; CPU:$CB02 PRG:0B02 88 + bpl @fill ; CPU:$CB03 PRG:0B03 10 F9 SharedReturnCB05: - rts + rts ; CPU:$CB05 PRG:0B05 60 ; --------------------------------------------------------------------------- @@ -2562,17 +2562,17 @@ SharedReturnCB05: ; --------------------------------------------------------------------------- CalculatePersistentRecordOffset: - jsr CalculateReferenceRecordOffset + jsr CalculateReferenceRecordOffset ; CPU:$CB06 PRG:0B06 20 13 CB - ldy $03F2 - beq @store + ldy $03F2 ; CPU:$CB09 PRG:0B09 AC F2 03 + beq @store ; CPU:$CB0C PRG:0B0C F0 03 - clc - adc #$23 + clc ; CPU:$CB0E PRG:0B0E 18 + adc #$23 ; CPU:$CB0F PRG:0B0F 69 23 @store: - tay - rts + tay ; CPU:$CB11 PRG:0B11 A8 + rts ; CPU:$CB12 PRG:0B12 60 ; --------------------------------------------------------------------------- @@ -2581,95 +2581,95 @@ CalculatePersistentRecordOffset: ; --------------------------------------------------------------------------- CalculateReferenceRecordOffset: - lda #$20 + lda #$20 ; CPU:$CB13 PRG:0B13 A9 20 - ldy $02 - cpy #$05 - beq @return + ldy $02 ; CPU:$CB15 PRG:0B15 A4 02 + cpy #$05 ; CPU:$CB17 PRG:0B17 C0 05 + beq @return ; CPU:$CB19 PRG:0B19 F0 10 - lda #$00 + lda #$00 ; CPU:$CB1B PRG:0B1B A9 00 @next_record: - dey - bmi @check_flag + dey ; CPU:$CB1D PRG:0B1D 88 + bmi @check_flag ; CPU:$CB1E PRG:0B1E 30 05 - clc - adc #$03 - bne @next_record + clc ; CPU:$CB20 PRG:0B20 18 + adc #$03 ; CPU:$CB21 PRG:0B21 69 03 + bne @next_record ; CPU:$CB23 PRG:0B23 D0 F8 @check_flag: - ldy $46 - beq @return + ldy $46 ; CPU:$CB25 PRG:0B25 A4 46 + beq @return ; CPU:$CB27 PRG:0B27 F0 02 - ora #$10 + ora #$10 ; CPU:$CB29 PRG:0B29 09 10 @return: - rts + rts ; CPU:$CB2B PRG:0B2B 60 ; $CB2C-$CB3A: indirect NMI sequence dispatcher. DispatchNmiSequenceStep: - ldy NmiSequenceStep - lda $C12C,y - sta $00 - lda $C130,y + ldy NmiSequenceStep ; CPU:$CB2C PRG:0B2C A4 44 + lda $C12C,y ; CPU:$CB2E PRG:0B2E B9 2C C1 + sta $00 ; CPU:$CB31 PRG:0B31 85 00 + lda $C130,y ; CPU:$CB33 PRG:0B33 B9 30 C1 ; Intentional secondary entry used by DispatchNmiState. DispatchIndirectHighByte: - sta $01 - jmp ($0000) + sta $01 ; CPU:$CB36 PRG:0B36 85 01 + jmp ($0000) ; CPU:$CB38 PRG:0B38 6C 00 00 ; --------------------------------------------------------------------------- ; $CB3B-$CB76: NMI sequence step 0. ; --------------------------------------------------------------------------- StateSequenceStep0: - lda NmiState - cmp #$08 - bcs StateSequenceStep0Finish + lda NmiState ; CPU:$CB3B PRG:0B3B A5 41 + cmp #$08 ; CPU:$CB3D PRG:0B3D C9 08 + bcs StateSequenceStep0Finish ; CPU:$CB3F PRG:0B3F B0 32 - lda $03F2 - sta MenuSelectionIndex + lda $03F2 ; CPU:$CB41 PRG:0B41 AD F2 03 + sta MenuSelectionIndex ; CPU:$CB44 PRG:0B44 85 42 - lda $53 - cmp #$04 - bcs StateSequenceStep0Finish + lda $53 ; CPU:$CB46 PRG:0B46 A5 53 + cmp #$04 ; CPU:$CB48 PRG:0B48 C9 04 + bcs StateSequenceStep0Finish ; CPU:$CB4A PRG:0B4A B0 27 - lda $46 - beq StateSequenceStep0SetFlags + lda $46 ; CPU:$CB4C PRG:0B4C A5 46 + beq StateSequenceStep0SetFlags ; CPU:$CB4E PRG:0B4E F0 1D - lda $43 - cmp #$04 - bne StateSequenceStep0MaybeAdvance + lda $43 ; CPU:$CB50 PRG:0B50 A5 43 + cmp #$04 ; CPU:$CB52 PRG:0B52 C9 04 + bne StateSequenceStep0MaybeAdvance ; CPU:$CB54 PRG:0B54 D0 13 - inc $03F3 + inc $03F3 ; CPU:$CB56 PRG:0B56 EE F3 03 - lda $03F3 - lsr a - bcs StateSequenceStep0SetFlags + lda $03F3 ; CPU:$CB59 PRG:0B59 AD F3 03 + lsr a ; CPU:$CB5C PRG:0B5C 4A + bcs StateSequenceStep0SetFlags ; CPU:$CB5D PRG:0B5D B0 0E - lda $03F8 - lsr a - beq StateSequenceStep0SetFlags + lda $03F8 ; CPU:$CB5F PRG:0B5F AD F8 03 + lsr a ; CPU:$CB62 PRG:0B62 4A + beq StateSequenceStep0SetFlags ; CPU:$CB63 PRG:0B63 F0 08 - sta $03F8 - sec + sta $03F8 ; CPU:$CB65 PRG:0B65 8D F8 03 + sec ; CPU:$CB68 PRG:0B68 38 StateSequenceStep0MaybeAdvance: - bcs StateSequenceStep0SetFlags + bcs StateSequenceStep0SetFlags ; CPU:$CB69 PRG:0B69 B0 02 - inc $43 + inc $43 ; CPU:$CB6B PRG:0B6B E6 43 StateSequenceStep0SetFlags: - lda #$01 - sta $46 - sta $4B + lda #$01 ; CPU:$CB6D PRG:0B6D A9 01 + sta $46 ; CPU:$CB6F PRG:0B6F 85 46 + sta $4B ; CPU:$CB71 PRG:0B71 85 4B StateSequenceStep0Finish: - lda #$04 + lda #$04 ; CPU:$CB73 PRG:0B73 A9 04 ; Original CB75: D0 28 = BNE $CB9F. ; Target is still inside the binary-backed next block. - .byte $D0, $28 + .byte $D0, $28 ; CPU:$CB75 PRG:0B75 D0 28 ; --------------------------------------------------------------------------- @@ -2677,50 +2677,50 @@ StateSequenceStep0Finish: ; --------------------------------------------------------------------------- StateSequenceStep1: - ldy $33 - bne StateSequenceReturn + ldy $33 ; CPU:$CB77 PRG:0B77 A4 33 + bne StateSequenceReturn ; CPU:$CB79 PRG:0B79 D0 28 - lda #$04 - sta $03 + lda #$04 ; CPU:$CB7B PRG:0B7B A9 04 + sta $03 ; CPU:$CB7D PRG:0B7D 85 03 - ldx $0300 + ldx $0300 ; CPU:$CB7F PRG:0B7F AE 00 03 StateSequenceStep1Copy: - lda $03D9,y - sta $0304,x + lda $03D9,y ; CPU:$CB82 PRG:0B82 B9 D9 03 + sta $0304,x ; CPU:$CB85 PRG:0B85 9D 04 03 - inx - iny + inx ; CPU:$CB88 PRG:0B88 E8 + iny ; CPU:$CB89 PRG:0B89 C8 - cpy #$07 - bne StateSequenceStep1Copy + cpy #$07 ; CPU:$CB8A PRG:0B8A C0 07 + bne StateSequenceStep1Copy ; CPU:$CB8C PRG:0B8C D0 F4 - jsr Append0300EntryC94B + jsr Append0300EntryC94B ; CPU:$CB8E PRG:0B8E 20 4B C9 - lda #$20 + lda #$20 ; CPU:$CB91 PRG:0B91 A9 20 - ldx $4B - bne StateSequenceSet03AD + ldx $4B ; CPU:$CB93 PRG:0B93 A6 4B + bne StateSequenceSet03AD ; CPU:$CB95 PRG:0B95 D0 02 - lda #$31 + lda #$31 ; CPU:$CB97 PRG:0B97 A9 31 StateSequenceSet03AD: - sta $03AD + sta $03AD ; CPU:$CB99 PRG:0B99 8D AD 03 - clc - adc #$03 + clc ; CPU:$CB9C PRG:0B9C 18 + adc #$03 ; CPU:$CB9D PRG:0B9D 69 03 ; $CB9F ; Shared continuation used by sequence steps 0 and 1. StateSequenceCommonCB9F: - sta $33 - inc NmiSequenceStep + sta $33 ; CPU:$CB9F PRG:0B9F 85 33 + inc NmiSequenceStep ; CPU:$CBA1 PRG:0BA1 E6 44 ; $CBA3 StateSequenceReturn: - rts + rts ; CPU:$CBA3 PRG:0BA3 60 ; --------------------------------------------------------------------------- ; $CBA4-$CC6A @@ -2728,33 +2728,33 @@ StateSequenceReturn: ; --------------------------------------------------------------------------- StateSequenceStep2: - lda $33 - beq StateSequenceCommonCB9F + lda $33 ; CPU:$CBA4 PRG:0BA4 A5 33 + beq StateSequenceCommonCB9F ; CPU:$CBA6 PRG:0BA6 F0 F7 - cmp $03AD - beq StateSequenceStep2Process + cmp $03AD ; CPU:$CBA8 PRG:0BA8 CD AD 03 + beq StateSequenceStep2Process ; CPU:$CBAB PRG:0BAB F0 1C - bcs StateSequenceReturn + bcs StateSequenceReturn ; CPU:$CBAD PRG:0BAD B0 F4 - lda $4B - bne StateSequenceStep2CallThreshold + lda $4B ; CPU:$CBAF PRG:0BAF A5 4B + bne StateSequenceStep2CallThreshold ; CPU:$CBB1 PRG:0BB1 D0 06 - lda $14 - and #$F0 - bne StateSequenceStep2RunStep3 + lda $14 ; CPU:$CBB3 PRG:0BB3 A5 14 + and #$F0 ; CPU:$CBB5 PRG:0BB5 29 F0 + bne StateSequenceStep2RunStep3 ; CPU:$CBB7 PRG:0BB7 D0 06 StateSequenceStep2CallThreshold: - jsr StateSequenceStep2CheckThreshold - jmp SequenceSetup + jsr StateSequenceStep2CheckThreshold ; CPU:$CBB9 PRG:0BB9 20 15 CC + jmp SequenceSetup ; CPU:$CBBC PRG:0BBC 4C 7D CC StateSequenceStep2RunStep3: - jsr StateSequenceStep3 + jsr StateSequenceStep3 ; CPU:$CBBF PRG:0BBF 20 6B CC - lda NmiState - bne StateSequenceReturn + lda NmiState ; CPU:$CBC2 PRG:0BC2 A5 41 + bne StateSequenceReturn ; CPU:$CBC4 PRG:0BC4 D0 DD - jmp AdvanceNmiStateAndEnterNmiSequence + jmp AdvanceNmiStateAndEnterNmiSequence ; CPU:$CBC6 PRG:0BC6 4C AF C3 ; --------------------------------------------------------------------------- @@ -2763,64 +2763,64 @@ StateSequenceStep2RunStep3: ; --------------------------------------------------------------------------- StateSequenceStep2Process: - lda $20 - bne StateSequenceReturn + lda $20 ; CPU:$CBC9 PRG:0BC9 A5 20 + bne StateSequenceReturn ; CPU:$CBCB PRG:0BCB D0 D6 - ldx #$03 - stx $2F - stx $0D - dex + ldx #$03 ; CPU:$CBCD PRG:0BCD A2 03 + stx $2F ; CPU:$CBCF PRG:0BCF 86 2F + stx $0D ; CPU:$CBD1 PRG:0BD1 86 0D + dex ; CPU:$CBD3 PRG:0BD3 CA StateSequenceStep2LoadTables: - lda SequenceLimitTable,x - sta $01 + lda SequenceLimitTable,x ; CPU:$CBD4 PRG:0BD4 BD DE C0 + sta $01 ; CPU:$CBD7 PRG:0BD7 85 01 - lda SequenceParameter02Table,x - sta $02 + lda SequenceParameter02Table,x ; CPU:$CBD9 PRG:0BD9 BD E2 C0 + sta $02 ; CPU:$CBDC PRG:0BDC 85 02 - lda SequenceFlagsTable,x - sta $0B + lda SequenceFlagsTable,x ; CPU:$CBDE PRG:0BDE BD E5 C0 + sta $0B ; CPU:$CBE1 PRG:0BE1 85 0B - jsr SequenceSetupLoadIndexedParameters + jsr SequenceSetupLoadIndexedParameters ; CPU:$CBE3 PRG:0BE3 20 CA CC - dex - bpl StateSequenceStep2LoadTables + dex ; CPU:$CBE6 PRG:0BE6 CA + bpl StateSequenceStep2LoadTables ; CPU:$CBE7 PRG:0BE7 10 EB - lda #$01 + lda #$01 ; CPU:$CBE9 PRG:0BE9 A9 01 - ldx $53 - dex - stx $00 + ldx $53 ; CPU:$CBEB PRG:0BEB A6 53 + dex ; CPU:$CBED PRG:0BED CA + stx $00 ; CPU:$CBEE PRG:0BEE 86 00 - cpx #$03 - bcs StateSequenceStep2StoreFB + cpx #$03 ; CPU:$CBF0 PRG:0BF0 E0 03 + bcs StateSequenceStep2StoreFB ; CPU:$CBF2 PRG:0BF2 B0 04 - stx $0D - lda #$02 + stx $0D ; CPU:$CBF4 PRG:0BF4 86 0D + lda #$02 ; CPU:$CBF6 PRG:0BF6 A9 02 StateSequenceStep2StoreFB: - sta $FB + sta $FB ; CPU:$CBF8 PRG:0BF8 85 FB - eor #$02 - sta $56 + eor #$02 ; CPU:$CBFA PRG:0BFA 49 02 + sta $56 ; CPU:$CBFC PRG:0BFC 85 56 - ldx $0D + ldx $0D ; CPU:$CBFE PRG:0BFE A6 0D - lda SequencePositionTable,x - sta $54 + lda SequencePositionTable,x ; CPU:$CC00 PRG:0C00 BD DA C0 + sta $54 ; CPU:$CC03 PRG:0C03 85 54 - lda SequenceLimitTable,x - sta $55 - sta $03F1 + lda SequenceLimitTable,x ; CPU:$CC05 PRG:0C05 BD DE C0 + sta $55 ; CPU:$CC08 PRG:0C08 85 55 + sta $03F1 ; CPU:$CC0A PRG:0C0A 8D F1 03 - lda $00 - bne StateSequenceStep2Return + lda $00 ; CPU:$CC0D PRG:0C0D A5 00 + bne StateSequenceStep2Return ; CPU:$CC0F PRG:0C0F D0 59 - lda #$0A - bne StateSequenceStep2Set45 + lda #$0A ; CPU:$CC11 PRG:0C11 A9 0A + bne StateSequenceStep2Set45 ; CPU:$CC13 PRG:0C13 D0 1A ; --------------------------------------------------------------------------- @@ -2830,29 +2830,29 @@ StateSequenceStep2StoreFB: ; --------------------------------------------------------------------------- StateSequenceStep2CheckThreshold: - lda $03AD - sec - sbc #$10 - cmp $33 - bne StateSequenceStep2BuildStructure + lda $03AD ; CPU:$CC15 PRG:0C15 AD AD 03 + sec ; CPU:$CC18 PRG:0C18 38 + sbc #$10 ; CPU:$CC19 PRG:0C19 E9 10 + cmp $33 ; CPU:$CC1B PRG:0C1B C5 33 + bne StateSequenceStep2BuildStructure ; CPU:$CC1D PRG:0C1D D0 13 - lda $20 - bne StateSequenceStep2BuildStructure + lda $20 ; CPU:$CC1F PRG:0C1F A5 20 + bne StateSequenceStep2BuildStructure ; CPU:$CC21 PRG:0C21 D0 0F - lda #$0D + lda #$0D ; CPU:$CC23 PRG:0C23 A9 0D - ldy $52 - dey - bne StateSequenceStep2Set45 + ldy $52 ; CPU:$CC25 PRG:0C25 A4 52 + dey ; CPU:$CC27 PRG:0C27 88 + bne StateSequenceStep2Set45 ; CPU:$CC28 PRG:0C28 D0 05 - lda $4B - clc - adc #$0B + lda $4B ; CPU:$CC2A PRG:0C2A A5 4B + clc ; CPU:$CC2C PRG:0C2C 18 + adc #$0B ; CPU:$CC2D PRG:0C2D 69 0B StateSequenceStep2Set45: - sta $45 - rts + sta $45 ; CPU:$CC2F PRG:0C2F 85 45 + rts ; CPU:$CC31 PRG:0C31 60 ; --------------------------------------------------------------------------- @@ -2861,211 +2861,211 @@ StateSequenceStep2Set45: ; --------------------------------------------------------------------------- StateSequenceStep2BuildStructure: - lda #$07 - tay + lda #$07 ; CPU:$CC32 PRG:0C32 A9 07 + tay ; CPU:$CC34 PRG:0C34 A8 - jsr Advance0300IndexC971 + jsr Advance0300IndexC971 ; CPU:$CC35 PRG:0C35 20 71 C9 - stx $05 + stx $05 ; CPU:$CC38 PRG:0C38 86 05 StateSequenceStep2CopyTable: - lda StateSequenceStep2Template,y - sta $0301,x + lda StateSequenceStep2Template,y ; CPU:$CC3A PRG:0C3A B9 34 C1 + sta $0301,x ; CPU:$CC3D PRG:0C3D 9D 01 03 - inx - dey - bpl StateSequenceStep2CopyTable + inx ; CPU:$CC40 PRG:0C40 E8 + dey ; CPU:$CC41 PRG:0C41 88 + bpl StateSequenceStep2CopyTable ; CPU:$CC42 PRG:0C42 10 F6 - lda $3F - and #$10 - bne StateSequenceStep2Return + lda $3F ; CPU:$CC44 PRG:0C44 A5 3F + and #$10 ; CPU:$CC46 PRG:0C46 29 10 + bne StateSequenceStep2Return ; CPU:$CC48 PRG:0C48 D0 20 - ldy $05 + ldy $05 ; CPU:$CC4A PRG:0C4A A4 05 - lda $53 - jsr DivideBy10 - sta $0307,y + lda $53 ; CPU:$CC4C PRG:0C4C A5 53 + jsr DivideBy10 ; CPU:$CC4E PRG:0C4E 20 A2 DF + sta $0307,y ; CPU:$CC51 PRG:0C51 99 07 03 - txa - jsr DivideBy10 - sta $00 + txa ; CPU:$CC54 PRG:0C54 8A + jsr DivideBy10 ; CPU:$CC55 PRG:0C55 20 A2 DF + sta $00 ; CPU:$CC58 PRG:0C58 85 00 - txa - bne StateSequenceStep2StorePrimary + txa ; CPU:$CC5A PRG:0C5A 8A + bne StateSequenceStep2StorePrimary ; CPU:$CC5B PRG:0C5B D0 05 - lda $00 - bne StateSequenceStep2StoreSecondary + lda $00 ; CPU:$CC5D PRG:0C5D A5 00 + bne StateSequenceStep2StoreSecondary ; CPU:$CC5F PRG:0C5F D0 04 - rts + rts ; CPU:$CC61 PRG:0C61 60 StateSequenceStep2StorePrimary: - sta $0305,y + sta $0305,y ; CPU:$CC62 PRG:0C62 99 05 03 StateSequenceStep2StoreSecondary: - lda $00 - sta $0306,y + lda $00 ; CPU:$CC65 PRG:0C65 A5 00 + sta $0306,y ; CPU:$CC67 PRG:0C67 99 06 03 StateSequenceStep2Return: - rts + rts ; CPU:$CC6A PRG:0C6A 60 ; --------------------------------------------------------------------------- ; $CC6B-$CC7C: NMI sequence step 3. ; --------------------------------------------------------------------------- StateSequenceStep3: - jsr AdvanceNmiStateAndEnterNmiSequence + jsr AdvanceNmiStateAndEnterNmiSequence ; CPU:$CC6B PRG:0C6B 20 AF C3 - lda $4B - bne @return + lda $4B ; CPU:$CC6E PRG:0C6E A5 4B + bne @return ; CPU:$CC70 PRG:0C70 D0 0A - ldy NmiState - cpy #$09 - bcc @store_state + ldy NmiState ; CPU:$CC72 PRG:0C72 A4 41 + cpy #$09 ; CPU:$CC74 PRG:0C74 C0 09 + bcc @store_state ; CPU:$CC76 PRG:0C76 90 02 - lda #$08 + lda #$08 ; CPU:$CC78 PRG:0C78 A9 08 @store_state: - sta NmiState + sta NmiState ; CPU:$CC7A PRG:0C7A 85 41 @return: - rts + rts ; CPU:$CC7C PRG:0C7C 60 ; --------------------------------------------------------------------------- ; $CC7D-$CCDC: configure parameters and tail-call BuildIndirectStructure. ; --------------------------------------------------------------------------- SequenceSetup: - lda $55 - sta $01 + lda $55 ; CPU:$CC7D PRG:0C7D A5 55 + sta $01 ; CPU:$CC7F PRG:0C7F 85 01 - lda $56 - bne SequenceSetupSelectPointer + lda $56 ; CPU:$CC81 PRG:0C81 A5 56 + bne SequenceSetupSelectPointer ; CPU:$CC83 PRG:0C83 D0 34 - lda $2F - beq SequenceSetupCalculate55 + lda $2F ; CPU:$CC85 PRG:0C85 A5 2F + beq SequenceSetupCalculate55 ; CPU:$CC87 PRG:0C87 F0 1A - lda #$1F - sta $0380 - sta $038C + lda #$1F ; CPU:$CC89 PRG:0C89 A9 1F + sta $0380 ; CPU:$CC8B PRG:0C8B 8D 80 03 + sta $038C ; CPU:$CC8E PRG:0C8E 8D 8C 03 - lda #$AF - sta $0378 + lda #$AF ; CPU:$CC91 PRG:0C91 A9 AF + sta $0378 ; CPU:$CC93 PRG:0C93 8D 78 03 - lda #$01 - sta $037C - lsr a - sta $0384 + lda #$01 ; CPU:$CC96 PRG:0C96 A9 01 + sta $037C ; CPU:$CC98 PRG:0C98 8D 7C 03 + lsr a ; CPU:$CC9B PRG:0C9B 4A + sta $0384 ; CPU:$CC9C PRG:0C9C 8D 84 03 - ldy #$BD - bne SequenceSetupStorePointer + ldy #$BD ; CPU:$CC9F PRG:0C9F A0 BD + bne SequenceSetupStorePointer ; CPU:$CCA1 PRG:0CA1 D0 18 SequenceSetupCalculate55: - ldx #$00 - jsr UpdateSlotAccumulator - sta $55 - sta $01 + ldx #$00 ; CPU:$CCA3 PRG:0CA3 A2 00 + jsr UpdateSlotAccumulator ; CPU:$CCA5 PRG:0CA5 20 6F DD + sta $55 ; CPU:$CCA8 PRG:0CA8 85 55 + sta $01 ; CPU:$CCAA PRG:0CAA 85 01 - lda $03F1 - cmp $55 - bcs SequenceSetupSelectPointer + lda $03F1 ; CPU:$CCAC PRG:0CAC AD F1 03 + cmp $55 ; CPU:$CCAF PRG:0CAF C5 55 + bcs SequenceSetupSelectPointer ; CPU:$CCB1 PRG:0CB1 B0 06 - sta $55 - lda #$0A - sta $2F + sta $55 ; CPU:$CCB3 PRG:0CB3 85 55 + lda #$0A ; CPU:$CCB5 PRG:0CB5 A9 0A + sta $2F ; CPU:$CCB7 PRG:0CB7 85 2F SequenceSetupSelectPointer: - ldy #$BB + ldy #$BB ; CPU:$CCB9 PRG:0CB9 A0 BB SequenceSetupStorePointer: - sty $02 + sty $02 ; CPU:$CCBB PRG:0CBB 84 02 - ldx $53 - dex - cpx #$03 - bcc SequenceSetupIndexReady - ldx #$03 + ldx $53 ; CPU:$CCBD PRG:0CBD A6 53 + dex ; CPU:$CCBF PRG:0CBF CA + cpx #$03 ; CPU:$CCC0 PRG:0CC0 E0 03 + bcc SequenceSetupIndexReady ; CPU:$CCC2 PRG:0CC2 90 02 + ldx #$03 ; CPU:$CCC4 PRG:0CC4 A2 03 SequenceSetupIndexReady: - lda #$02 - sta $0B + lda #$02 ; CPU:$CCC6 PRG:0CC6 A9 02 + sta $0B ; CPU:$CCC8 PRG:0CC8 85 0B ; $CCCA: shared parameter-loading entry. SequenceSetupLoadIndexedParameters: - lda SequencePositionTable,x - sta $00 + lda SequencePositionTable,x ; CPU:$CCCA PRG:0CCA BD DA C0 + sta $00 ; CPU:$CCCD PRG:0CCD 85 00 - lda #$21 - sta $03 + lda #$21 ; CPU:$CCCF PRG:0CCF A9 21 + sta $03 ; CPU:$CCD1 PRG:0CD1 85 03 - lda SequencePointerOffsetTable,x - sta $04 + lda SequencePointerOffsetTable,x ; CPU:$CCD3 PRG:0CD3 BD E8 C0 + sta $04 ; CPU:$CCD6 PRG:0CD6 85 04 - lda #$00 - jmp BuildIndirectStructure + lda #$00 ; CPU:$CCD8 PRG:0CD8 A9 00 + jmp BuildIndirectStructure ; CPU:$CCDA PRG:0CDA 4C C7 D1 ; --------------------------------------------------------------------------- ; $CCDD-$CD12: initialize nine 4-byte entries in the $02C0 area. ; --------------------------------------------------------------------------- Initialize02C0Entries: - lda $3C - lsr a - bcc @return + lda $3C ; CPU:$CCDD PRG:0CDD A5 3C + lsr a ; CPU:$CCDF PRG:0CDF 4A + bcc @return ; CPU:$CCE0 PRG:0CE0 90 30 - lda #$40 - sta $FB + lda #$40 ; CPU:$CCE2 PRG:0CE2 A9 40 + sta $FB ; CPU:$CCE4 PRG:0CE4 85 FB - lda #$58 - sta $00 + lda #$58 ; CPU:$CCE6 PRG:0CE6 A9 58 + sta $00 ; CPU:$CCE8 PRG:0CE8 85 00 - ldx #$08 + ldx #$08 ; CPU:$CCEA PRG:0CEA A2 08 @entry_loop: - txa - asl a - asl a - tay + txa ; CPU:$CCEC PRG:0CEC 8A + asl a ; CPU:$CCED PRG:0CED 0A + asl a ; CPU:$CCEE PRG:0CEE 0A + tay ; CPU:$CCEF PRG:0CEF A8 - lda #$44 - sta $02C0,y + lda #$44 ; CPU:$CCF0 PRG:0CF0 A9 44 + sta $02C0,y ; CPU:$CCF2 PRG:0CF2 99 C0 02 - lda $C147,x - sta $02C1,y + lda $C147,x ; CPU:$CCF5 PRG:0CF5 BD 47 C1 + sta $02C1,y ; CPU:$CCF8 PRG:0CF8 99 C1 02 - lda #$00 - sta $02C2,y + lda #$00 ; CPU:$CCFB PRG:0CFB A9 00 + sta $02C2,y ; CPU:$CCFD PRG:0CFD 99 C2 02 - lda $00 - sta $02C3,y + lda $00 ; CPU:$CD00 PRG:0D00 A5 00 + sta $02C3,y ; CPU:$CD02 PRG:0D02 99 C3 02 - clc - adc #$0A - sta $00 + clc ; CPU:$CD05 PRG:0D05 18 + adc #$0A ; CPU:$CD06 PRG:0D06 69 0A + sta $00 ; CPU:$CD08 PRG:0D08 85 00 - dex - bpl @entry_loop + dex ; CPU:$CD0A PRG:0D0A CA + bpl @entry_loop ; CPU:$CD0B PRG:0D0B 10 DF - lda #$F8 - sta $02D0 + lda #$F8 ; CPU:$CD0D PRG:0D0D A9 F8 + sta $02D0 ; CPU:$CD0F PRG:0D0F 8D D0 02 @return: - rts + rts ; CPU:$CD12 PRG:0D12 60 ; --------------------------------------------------------------------------- ; $CD13-$CD1E: copy eight ROM bytes from $C150-$C157 to $02C0-$02C7. ; --------------------------------------------------------------------------- Copy02C0Template: - ldx #$07 + ldx #$07 ; CPU:$CD13 PRG:0D13 A2 07 @copy: - lda $C150,x - sta $02C0,x - dex - bpl @copy + lda $C150,x ; CPU:$CD15 PRG:0D15 BD 50 C1 + sta $02C0,x ; CPU:$CD18 PRG:0D18 9D C0 02 + dex ; CPU:$CD1B PRG:0D1B CA + bpl @copy ; CPU:$CD1C PRG:0D1C 10 F7 - rts + rts ; CPU:$CD1E PRG:0D1E 60 ; --------------------------------------------------------------------------- @@ -3073,51 +3073,51 @@ Copy02C0Template: ; --------------------------------------------------------------------------- UpdateFourSlots: - lda $4F - beq @post_update + lda $4F ; CPU:$CD1F PRG:0D1F A5 4F + beq @post_update ; CPU:$CD21 PRG:0D21 F0 1D - ldx #$03 + ldx #$03 ; CPU:$CD23 PRG:0D23 A2 03 @slot_loop: - lda $A8,x - beq @next_slot + lda $A8,x ; CPU:$CD25 PRG:0D25 B5 A8 + beq @next_slot ; CPU:$CD27 PRG:0D27 F0 14 - lda $9C,x - cmp #$05 - beq @update_slot + lda $9C,x ; CPU:$CD29 PRG:0D29 B5 9C + cmp #$05 ; CPU:$CD2B PRG:0D2B C9 05 + beq @update_slot ; CPU:$CD2D PRG:0D2D F0 0B - ora $98,x - ora $03E0,x - beq @update_slot + ora $98,x ; CPU:$CD2F PRG:0D2F 15 98 + ora $03E0,x ; CPU:$CD31 PRG:0D31 1D E0 03 + beq @update_slot ; CPU:$CD34 PRG:0D34 F0 04 - lda #$00 - sta $5C,x + lda #$00 ; CPU:$CD36 PRG:0D36 A9 00 + sta $5C,x ; CPU:$CD38 PRG:0D38 95 5C @update_slot: - jsr CodeCD59 + jsr CodeCD59 ; CPU:$CD3A PRG:0D3A 20 59 CD @next_slot: - dex - bpl @slot_loop + dex ; CPU:$CD3D PRG:0D3D CA + bpl @slot_loop ; CPU:$CD3E PRG:0D3E 10 E5 @post_update: - lda $34 - bne @return + lda $34 ; CPU:$CD40 PRG:0D40 A5 34 + bne @return ; CPU:$CD42 PRG:0D42 D0 14 - lda $5C - and #$C0 - beq @return + lda $5C ; CPU:$CD44 PRG:0D44 A5 5C + and #$C0 ; CPU:$CD46 PRG:0D46 29 C0 + beq @return ; CPU:$CD48 PRG:0D48 F0 0E - lda $03A9 - ora $52 - bne @return + lda $03A9 ; CPU:$CD4A PRG:0D4A AD A9 03 + ora $52 ; CPU:$CD4D PRG:0D4D 05 52 + bne @return ; CPU:$CD4F PRG:0D4F D0 07 - lda #$01 - sta $03A9 - sta $FE + lda #$01 ; CPU:$CD51 PRG:0D51 A9 01 + sta $03A9 ; CPU:$CD53 PRG:0D53 8D A9 03 + sta $FE ; CPU:$CD56 PRG:0D56 85 FE @return: - rts + rts ; CPU:$CD58 PRG:0D58 60 ; --------------------------------------------------------------------------- ; $CD59-$CD78 @@ -3134,29 +3134,29 @@ CodeCD59: ora $98,x ; CD64: 15 98 ; CD66: D0 52 = BNE $CDBA - .byte $D0, $52 + .byte $D0, $52 ; CPU:$CD66 PRG:0D66 D0 52 lda $9C,x ; CD68: B5 9C ; CD6A: F0 04 = BEQ $CD70 - beq CodeCD70 + beq CodeCD70 ; CPU:$CD6A PRG:0D6A F0 04 cmp #$05 ; CD6C: C9 05 ; CD6E: D0 4A = BNE $CDBA - .byte $D0, $4A + .byte $D0, $4A ; CPU:$CD6E PRG:0D6E D0 4A CodeCD70: txa ; CD70: 8A ; CD71: D0 08 = BNE $CD7B - .byte $D0, $08 + .byte $D0, $08 ; CPU:$CD71 PRG:0D71 D0 08 ldy #$02 ; CD73: A0 02 lda $52 ; CD75: A5 52 ; CD77: D0 21 = BNE $CD9A - .byte $D0, $21 + .byte $D0, $21 ; CPU:$CD77 PRG:0D77 D0 21 ; --------------------------------------------------------------------------- @@ -3169,19 +3169,19 @@ CodeCD79: lda $B0,x ; CD7B: B5 B0 ; CD7D: D0 33 = BNE $CDB2 - .byte $D0, $33 + .byte $D0, $33 ; CPU:$CD7D PRG:0D7D D0 33 lda $5C,x ; CD7F: B5 5C and #$C0 ; CD81: 29 C0 ; CD83: F0 35 = BEQ $CDBA - .byte $F0, $35 + .byte $F0, $35 ; CPU:$CD83 PRG:0D83 F0 35 stx $00 ; CD85: 86 00 asl a ; CD87: 0A ; CD88: B0 02 = BCS $CD8C - bcs CodeCD8C + bcs CodeCD8C ; CPU:$CD88 PRG:0D88 B0 02 inc $00 ; CD8A: E6 00 @@ -3189,44 +3189,44 @@ CodeCD8C: jsr CodeCDEE ; CD8C: 20 EE CD ; CD8F: F0 04 = BEQ $CD95 - beq CodeCD95 + beq CodeCD95 ; CPU:$CD8F PRG:0D8F F0 04 lda $94,x ; CD91: B5 94 ; CD93: D0 25 = BNE $CDBA - .byte $D0, $25 + .byte $D0, $25 ; CPU:$CD93 PRG:0D93 D0 25 CodeCD95: ldy $00 ; CD95: A4 00 txa ; CD97: 8A ; CD98: D0 12 = BNE $CDAC - bne CodeCDAC + bne CodeCDAC ; CPU:$CD98 PRG:0D98 D0 12 lda $94,x ; CD9A: B5 94 cmp Slot94BoundaryTable,y ; CD9C: D9 D1 C0 ; CD9F: 90 0B = BCC $CDAC - bcc CodeCDAC + bcc CodeCDAC ; CPU:$CD9F PRG:0D9F 90 0B ; CDA1: D0 16 = BNE $CDB9 - .byte $D0, $16 + .byte $D0, $16 ; CPU:$CDA1 PRG:0DA1 D0 16 lda $90,x ; CDA3: B5 90 - cmp Slot90BoundaryTable,y + cmp Slot90BoundaryTable,y ; CPU:$CDA5 PRG:0DA5 D9 CE C0 ; CDA5: D9 CE C0 ; CDA8: F0 13 = BEQ $CDBD - .byte $F0, $13 + .byte $F0, $13 ; CPU:$CDA8 PRG:0DA8 F0 13 ; CDAA: B0 0D = BCS $CDB9 - .byte $B0, $0D + .byte $B0, $0D ; CPU:$CDAA PRG:0DAA B0 0D CodeCDAC: jsr $CE29 ; CDAC: 20 29 CE ; CDAF: 4C BD CD = JMP $CDBD - .byte $4C, $BD, $CD + .byte $4C, $BD, $CD ; CPU:$CDAF PRG:0DAF 4C BD CD ; --------------------------------------------------------------------------- ; $CDB2-$CDBC @@ -3239,7 +3239,7 @@ CodeCDB2: lda $0A ; CDB4: A5 0A ; CDB6: F0 02 = BEQ $CDBA - beq CodeCDBA + beq CodeCDBA ; CPU:$CDB6 PRG:0DB6 F0 02 tay ; CDB8: A8 iny ; CDB9: C8 @@ -3257,7 +3257,7 @@ CodeCDBD: lda $98,x ; CDBD: B5 98 ; CDBF: D0 5B = BNE $CE1C - .byte $D0, $5B + .byte $D0, $5B ; CPU:$CDBF PRG:0DBF D0 5B lda $B0,x ; CDC1: B5 B0 bne CodeCDD5 ; CDC3: D0 10 @@ -3283,13 +3283,13 @@ CodeCDDE: lda $B0,x ; CDDE: B5 B0 ; CDE0: D0 3A = BNE $CE1C - .byte $D0, $3A + .byte $D0, $3A ; CPU:$CDE0 PRG:0DE0 D0 3A lda $0368,x ; CDE2: BD 68 03 cmp $AC,x ; CDE5: D5 AC ; CDE7: F0 33 = BEQ $CE1C - .byte $F0, $33 + .byte $F0, $33 ; CPU:$CDE7 PRG:0DE7 F0 33 ldy #$05 ; CDE9: A0 05 jmp $DCC7 ; CDEB: 4C C7 DC @@ -3331,7 +3331,7 @@ CodeCE15: txa ; CE15: 8A ; CE16: D0 10 = BNE $CE28 - bne CodeCE28 + bne CodeCE28 ; CPU:$CE16 PRG:0E16 D0 10 lda #$04 ; CE18: A9 04 sta $FD ; CE1A: 85 FD @@ -3375,7 +3375,7 @@ CodeCE39: bne CodeCE45 ; CE3A: D0 09 lda $94,x ; CE3C: B5 94 - cmp Slot94BoundaryTable,y + cmp Slot94BoundaryTable,y ; CPU:$CE3E PRG:0E3E D9 D1 C0 ; CE3E: D9 D1 C0 beq CodeCE46 ; CE41: F0 03 bcs CodeCE4D ; CE43: B0 08 @@ -3385,16 +3385,16 @@ CodeCE45: CodeCE46: lda $90,x ; CE46: B5 90 - cmp Slot90BoundaryTable,y + cmp Slot90BoundaryTable,y ; CPU:$CE48 PRG:0E48 D9 CE C0 ; CE48: D9 CE C0 bcc CodeCE45 ; CE4B: 90 F8 CodeCE4D: - lda Slot90BoundaryTable,y + lda Slot90BoundaryTable,y ; CPU:$CE4D PRG:0E4D B9 CE C0 ; CE4D: B9 CE C0 sta $90,x ; CE50: 95 90 - lda Slot94BoundaryTable,y + lda Slot94BoundaryTable,y ; CPU:$CE52 PRG:0E52 B9 D1 C0 ; CE52: B9 D1 C0 sta $94,x ; CE55: 95 94 rts ; CE57: 60 @@ -3419,7 +3419,7 @@ CodeCE58: tay ; CE65: A8 lda $90,x ; CE66: B5 90 - cmp SlotPositionThresholdTable,y + cmp SlotPositionThresholdTable,y ; CPU:$CE68 PRG:0E68 D9 CC C0 ; CE68: D9 CC C0 bcc CodeCE82 ; CE6B: 90 15 @@ -3449,62 +3449,62 @@ CodeCE82: ; --------------------------------------------------------------------------- UpdateSlotTimer: - lda $26,x - bne @return + lda $26,x ; CPU:$CE83 PRG:0E83 B5 26 + bne @return ; CPU:$CE85 PRG:0E85 D0 18 - lda $B0,x - lsr a - tay + lda $B0,x ; CPU:$CE87 PRG:0E87 B5 B0 + lsr a ; CPU:$CE89 PRG:0E89 4A + tay ; CPU:$CE8A PRG:0E8A A8 - lda SlotTimerReloadTable,y - sta $26,x + lda SlotTimerReloadTable,y ; CPU:$CE8B PRG:0E8B B9 D4 C0 + sta $26,x ; CPU:$CE8E PRG:0E8E 95 26 - lsr $00 - bcc @alternate + lsr $00 ; CPU:$CE90 PRG:0E90 46 00 + bcc @alternate ; CPU:$CE92 PRG:0E92 90 0C - lda $AC,x - cmp SlotACTargetTableC0C8,y - beq @return - bcc @increment + lda $AC,x ; CPU:$CE94 PRG:0E94 B5 AC + cmp SlotACTargetTableC0C8,y ; CPU:$CE96 PRG:0E96 D9 C8 C0 + beq @return ; CPU:$CE99 PRG:0E99 F0 04 + bcc @increment ; CPU:$CE9B PRG:0E9B 90 12 - dec $AC,x + dec $AC,x ; CPU:$CE9D PRG:0E9D D6 AC @return: - rts + rts ; CPU:$CE9F PRG:0E9F 60 @alternate: - lda $0388,x - and #$02 - sta $0388,x + lda $0388,x ; CPU:$CEA0 PRG:0EA0 BD 88 03 + and #$02 ; CPU:$CEA3 PRG:0EA3 29 02 + sta $0388,x ; CPU:$CEA5 PRG:0EA5 9D 88 03 - lda $AC,x - cmp SlotACAlternateTargetTable,y + lda $AC,x ; CPU:$CEA8 PRG:0EA8 B5 AC + cmp SlotACAlternateTargetTable,y ; CPU:$CEAA PRG:0EAA D9 CA C0 ; Original CEAD: B0 03 = BCS $CEB2 - .byte $B0, $03 + .byte $B0, $03 ; CPU:$CEAD PRG:0EAD B0 03 @increment: - inc $AC,x - rts + inc $AC,x ; CPU:$CEAF PRG:0EAF F6 AC + rts ; CPU:$CEB1 PRG:0EB1 60 RiderStateUpdateCEB2: - lda $5C,x - and #$C0 - beq @return - lda $B0,x - bne @return - inc $AC,x - lda #$0D - sta $26,x - lda $AC,x - cmp #$0D - bcc @return - lda #$01 - sta $98,x - asl a - sta $26,x + lda $5C,x ; CPU:$CEB2 PRG:0EB2 B5 5C + and #$C0 ; CPU:$CEB4 PRG:0EB4 29 C0 + beq @return ; CPU:$CEB6 PRG:0EB6 F0 17 + lda $B0,x ; CPU:$CEB8 PRG:0EB8 B5 B0 + bne @return ; CPU:$CEBA PRG:0EBA D0 13 + inc $AC,x ; CPU:$CEBC PRG:0EBC F6 AC + lda #$0D ; CPU:$CEBE PRG:0EBE A9 0D + sta $26,x ; CPU:$CEC0 PRG:0EC0 95 26 + lda $AC,x ; CPU:$CEC2 PRG:0EC2 B5 AC + cmp #$0D ; CPU:$CEC4 PRG:0EC4 C9 0D + bcc @return ; CPU:$CEC6 PRG:0EC6 90 07 + lda #$01 ; CPU:$CEC8 PRG:0EC8 A9 01 + sta $98,x ; CPU:$CECA PRG:0ECA 95 98 + asl a ; CPU:$CECC PRG:0ECC 0A + sta $26,x ; CPU:$CECD PRG:0ECD 95 26 @return: - rts + rts ; CPU:$CECF PRG:0ECF 60 ; --------------------------------------------------------------------------- @@ -3515,48 +3515,48 @@ RiderStateUpdateCEB2: ; --------------------------------------------------------------------------- ProcessRiderSlots: - ldx $4A + ldx $4A ; CPU:$CED0 PRG:0ED0 A6 4A @next_slot: - stx $0F + stx $0F ; CPU:$CED2 PRG:0ED2 86 0F - lda $A8,x - beq @advance_slot + lda $A8,x ; CPU:$CED4 PRG:0ED4 B5 A8 + beq @advance_slot ; CPU:$CED6 PRG:0ED6 F0 2C - lda $98,x - ora $9C,x - bne @advance_slot + lda $98,x ; CPU:$CED8 PRG:0ED8 B5 98 + ora $9C,x ; CPU:$CEDA PRG:0EDA 15 9C + bne @advance_slot ; CPU:$CEDC PRG:0EDC D0 26 - jsr $CFEA + jsr $CFEA ; CPU:$CEDE PRG:0EDE 20 EA CF - lda $B0,x - bne @copy_runtime + lda $B0,x ; CPU:$CEE1 PRG:0EE1 B5 B0 + bne @copy_runtime ; CPU:$CEE3 PRG:0EE3 D0 1A - jsr $CFCB - jsr $D018 - bne @advance_slot + jsr $CFCB ; CPU:$CEE5 PRG:0EE5 20 CB CF + jsr $D018 ; CPU:$CEE8 PRG:0EE8 20 18 D0 + bne @advance_slot ; CPU:$CEEB PRG:0EEB D0 17 - lda $03A6 - beq @advance_slot + lda $03A6 ; CPU:$CEED PRG:0EED AD A6 03 + beq @advance_slot ; CPU:$CEF0 PRG:0EF0 F0 12 - jsr SelectRiderConfiguration + jsr SelectRiderConfiguration ; CPU:$CEF2 PRG:0EF2 20 00 D0 - lda $52 - bne @advance_slot + lda $52 ; CPU:$CEF5 PRG:0EF5 A5 52 + bne @advance_slot ; CPU:$CEF7 PRG:0EF7 D0 0B - jsr CheckRiderCourseState - jmp @advance_slot + jsr CheckRiderCourseState ; CPU:$CEF9 PRG:0EF9 20 0C CF + jmp @advance_slot ; CPU:$CEFC PRG:0EFC 4C 04 CF @copy_runtime: - lda $0368,x - sta $7C,x + lda $0368,x ; CPU:$CEFF PRG:0EFF BD 68 03 + sta $7C,x ; CPU:$CF02 PRG:0F02 95 7C @advance_slot: - ldx $0F - inx - cpx #$04 - bcc @next_slot + ldx $0F ; CPU:$CF04 PRG:0F04 A6 0F + inx ; CPU:$CF06 PRG:0F06 E8 + cpx #$04 ; CPU:$CF07 PRG:0F07 E0 04 + bcc @next_slot ; CPU:$CF09 PRG:0F09 90 C7 - rts + rts ; CPU:$CF0B PRG:0F0B 60 ; --------------------------------------------------------------------------- @@ -3574,7 +3574,7 @@ CheckRiderCourseState: ; CF0F: 90 FA = BCC $CF0B ; $CF0B is the RTS immediately preceding this routine. - .byte $90, $FA + .byte $90, $FA ; CPU:$CF0F PRG:0F0F 90 FA lda $70,x ; CF11: B5 70 sta $02 ; CF13: 85 02 @@ -3590,7 +3590,7 @@ CheckRiderCourseState: asl a ; CF21: 0A ; CF22: 90 E7 = BCC $CF0B - .byte $90, $E7 + .byte $90, $E7 ; CPU:$CF22 PRG:0F22 90 E7 lda $18,x ; CF24: B5 18 lsr a ; CF26: 4A @@ -3743,47 +3743,47 @@ RiderCourseValueInvalidCF94: ; --------------------------------------------------------------------------- CheckAdjacentRiderConflict: - lda $80,x - clc - adc $C0D6,y - sta $00 + lda $80,x ; CPU:$CF96 PRG:0F96 B5 80 + clc ; CPU:$CF98 PRG:0F98 18 + adc $C0D6,y ; CPU:$CF99 PRG:0F99 79 D6 C0 + sta $00 ; CPU:$CF9C PRG:0F9C 85 00 - sec - sbc $C0D7,y - sta $01 + sec ; CPU:$CF9E PRG:0F9E 38 + sbc $C0D7,y ; CPU:$CF9F PRG:0F9F F9 D7 C0 + sta $01 ; CPU:$CFA2 PRG:0FA2 85 01 - ldy $4A + ldy $4A ; CPU:$CFA4 PRG:0FA4 A4 4A @check_rider: - cpy $0F - beq @next_rider + cpy $0F ; CPU:$CFA6 PRG:0FA6 C4 0F + beq @next_rider ; CPU:$CFA8 PRG:0FA8 F0 1A - lda $0084,y - lsr a - bcc @next_rider + lda $0084,y ; CPU:$CFAA PRG:0FAA B9 84 00 + lsr a ; CPU:$CFAD PRG:0FAD 4A + bcc @next_rider ; CPU:$CFAE PRG:0FAE 90 14 - lda $0070,y - beq @next_rider + lda $0070,y ; CPU:$CFB0 PRG:0FB0 B9 70 00 + beq @next_rider ; CPU:$CFB3 PRG:0FB3 F0 0F - cmp $02 - bne @next_rider + cmp $02 ; CPU:$CFB5 PRG:0FB5 C5 02 + bne @next_rider ; CPU:$CFB7 PRG:0FB7 D0 0B - lda $0080,y - cmp $00 - bcs @next_rider + lda $0080,y ; CPU:$CFB9 PRG:0FB9 B9 80 00 + cmp $00 ; CPU:$CFBC PRG:0FBC C5 00 + bcs @next_rider ; CPU:$CFBE PRG:0FBE B0 04 - cmp $01 - bcs @return + cmp $01 ; CPU:$CFC0 PRG:0FC0 C5 01 + bcs @return ; CPU:$CFC2 PRG:0FC2 B0 06 @next_rider: - iny - cpy #$04 - bcc @check_rider + iny ; CPU:$CFC4 PRG:0FC4 C8 + cpy #$04 ; CPU:$CFC5 PRG:0FC5 C0 04 + bcc @check_rider ; CPU:$CFC7 PRG:0FC7 90 DD - clc + clc ; CPU:$CFC9 PRG:0FC9 18 @return: - rts + rts ; CPU:$CFCA PRG:0FCA 60 ; --------------------------------------------------------------------------- ; $CFCB-$CFE9 @@ -3801,7 +3801,7 @@ UpdateRiderPositionFlags: cmp $78,x ; CFCF: D5 78 ; CFD1: 90 27 = BCC $CFFA - .byte $90, $27 + .byte $90, $27 ; CPU:$CFD1 PRG:0FD1 90 27 bne UpdateRiderPositionFlagsCFDB ; CFD3: D0 06 @@ -3809,7 +3809,7 @@ UpdateRiderPositionFlags: cmp $74,x ; CFD7: D5 74 ; CFD9: 90 1F = BCC $CFFA - .byte $90, $1F + .byte $90, $1F ; CPU:$CFD9 PRG:0FD9 90 1F ; --------------------------------------------------------------------------- ; $CFDB @@ -3819,7 +3819,7 @@ UpdateRiderPositionFlagsCFDB: lda $94,x ; CFDB: B5 94 ; CFDD: F0 0A = BEQ $CFE9 - beq RiderPositionFlagsReturnCFE9 + beq RiderPositionFlagsReturnCFE9 ; CPU:$CFDD PRG:0FDD F0 0A lda #$0F ; CFDF: A9 0F bne MergeRiderPositionFlagsCFE5 ; CFE1: D0 02 @@ -3884,13 +3884,13 @@ SelectRiderConfiguration: ; D00A: F0 F3 = BEQ $CFFF ; Shared RTS immediately before this routine. - .byte $F0, $F3 + .byte $F0, $F3 ; CPU:$D00A PRG:100A F0 F3 lda $1A,x ; D00C: B5 1A cmp #$C0 ; D00E: C9 C0 ; D010: 90 ED = BCC $CFFF - .byte $90, $ED + .byte $90, $ED ; CPU:$D010 PRG:1010 90 ED bne @configure ; D012: D0 01 @@ -3912,67 +3912,67 @@ SelectRiderConfiguration: ; --------------------------------------------------------------------------- ScanRiderStructure: - lda #$00 - sta $09 - sta $0D + lda #$00 ; CPU:$D018 PRG:1018 A9 00 + sta $09 ; CPU:$D01A PRG:101A 85 09 + sta $0D ; CPU:$D01C PRG:101C 85 0D - txa - asl a - asl a - sta $0A + txa ; CPU:$D01E PRG:101E 8A + asl a ; CPU:$D01F PRG:101F 0A + asl a ; CPU:$D020 PRG:1020 0A + sta $0A ; CPU:$D021 PRG:1021 85 0A - ldy #$03 + ldy #$03 ; CPU:$D023 PRG:1023 A0 03 @scan_entry: - sty $0B + sty $0B ; CPU:$D025 PRG:1025 84 0B - ldy $0A - lda $03C0,y + ldy $0A ; CPU:$D027 PRG:1027 A4 0A + lda $03C0,y ; CPU:$D029 PRG:1029 B9 C0 03 - cmp #$C0 + cmp #$C0 ; CPU:$D02C PRG:102C C9 C0 ; D02E: F0 28 = BEQ $D058 - .byte $F0, $28 + .byte $F0, $28 ; CPU:$D02E PRG:102E F0 28 - cmp #$C1 + cmp #$C1 ; CPU:$D030 PRG:1030 C9 C1 ; D032: F0 24 = BEQ $D058 - .byte $F0, $24 + .byte $F0, $24 ; CPU:$D032 PRG:1032 F0 24 - cmp #$70 - bcc @check_48 + cmp #$70 ; CPU:$D034 PRG:1034 C9 70 + bcc @check_48 ; CPU:$D036 PRG:1036 90 04 - cmp #$74 + cmp #$74 ; CPU:$D038 PRG:1038 C9 74 ; D03A: 90 1C = BCC $D058 - .byte $90, $1C + .byte $90, $1C ; CPU:$D03A PRG:103A 90 1C @check_48: - cmp #$48 - bcc @next_entry + cmp #$48 ; CPU:$D03C PRG:103C C9 48 + bcc @next_entry ; CPU:$D03E PRG:103E 90 04 - cmp #$4B + cmp #$4B ; CPU:$D040 PRG:1040 C9 4B ; D042: 90 60 = BCC $D0A4 - .byte $90, $60 + .byte $90, $60 ; CPU:$D042 PRG:1042 90 60 @next_entry: - inc $0A + inc $0A ; CPU:$D044 PRG:1044 E6 0A - ldy $0B - dey - bpl @scan_entry + ldy $0B ; CPU:$D046 PRG:1046 A4 0B + dey ; CPU:$D048 PRG:1048 88 + bpl @scan_entry ; CPU:$D049 PRG:1049 10 DA - ldy #$00 - lda $58,x - bne @use_y + ldy #$00 ; CPU:$D04B PRG:104B A0 00 + lda $58,x ; CPU:$D04D PRG:104D B5 58 + bne @use_y ; CPU:$D04F PRG:104F D0 03 - ldy $0368,x + ldy $0368,x ; CPU:$D051 PRG:1051 BC 68 03 @use_y: - tya + tya ; CPU:$D054 PRG:1054 98 ; D055: 4C A6 D0 = JMP $D0A6 - .byte $4C, $A6, $D0 + .byte $4C, $A6, $D0 ; CPU:$D055 PRG:1055 4C A6 D0 @@ -4016,20 +4016,20 @@ CheckRiderCourseAhead: cmp #$FA ; D079: C9 FA ; D07B: F0 0B = BEQ $D088 - beq CheckRiderCourseOtherSideD088 + beq CheckRiderCourseOtherSideD088 ; CPU:$D07B PRG:107B F0 0B jsr RiderCourseValueCheckCF8B ; D07D: 20 8B CF ; D080: B0 ED = BCS $D06F ; ; Return to DEY so another candidate position/state can be checked. - .byte $B0, $ED + .byte $B0, $ED ; CPU:$D080 PRG:1080 B0 ED jsr RiderCourseEntryCF47 ; D082: 20 47 CF ; D085: 4C 4B D0 = JMP $D04B ; Return to the earlier scan routine's fallback path. - .byte $4C, $4B, $D0 + .byte $4C, $4B, $D0 ; CPU:$D085 PRG:1085 4C 4B D0 ; --------------------------------------------------------------------------- @@ -4044,7 +4044,7 @@ CheckRiderCourseOtherSideD088: cpy #$06 ; D08C: C0 06 ; D08E: 10 BB = BPL $D04B - .byte $10, $BB + .byte $10, $BB ; CPU:$D08E PRG:108E 10 BB jsr $E803 ; D090: 20 03 E8 @@ -4052,19 +4052,19 @@ CheckRiderCourseOtherSideD088: cmp #$E4 ; D095: C9 E4 ; D097: F0 B2 = BEQ $D04B - .byte $F0, $B2 + .byte $F0, $B2 ; CPU:$D097 PRG:1097 F0 B2 jsr RiderCourseValueCheckCF8B ; D099: 20 8B CF ; D09C: B0 ED = BCS $D08B ; ; Return to INY and try the next candidate. - .byte $B0, $ED + .byte $B0, $ED ; CPU:$D09C PRG:109C B0 ED jsr RiderCourseEntryCF6A ; D09E: 20 6A CF ; D0A1: 4C 4B D0 = JMP $D04B - .byte $4C, $4B, $D0 + .byte $4C, $4B, $D0 ; CPU:$D0A1 PRG:10A1 4C 4B D0 ; --------------------------------------------------------------------------- @@ -4091,10 +4091,10 @@ CourseScanResultD0A4: ; --------------------------------------------------------------------------- CourseScanStoreResultD0A6: - sta $7C,x + sta $7C,x ; CPU:$D0A6 PRG:10A6 95 7C - lda $0D - rts + lda $0D ; CPU:$D0A8 PRG:10A8 A5 0D + rts ; CPU:$D0AA PRG:10AA 60 ; --------------------------------------------------------------------------- @@ -4107,32 +4107,32 @@ CourseScanStoreResultD0A6: ; --------------------------------------------------------------------------- UpdateRiderLanePositionStates: - ldx #$03 + ldx #$03 ; CPU:$D0AB PRG:10AB A2 03 @next_rider: - ldy #$05 + ldy #$05 ; CPU:$D0AD PRG:10AD A0 05 - lda $B8,x - sec - sbc #$10 - bmi @store + lda $B8,x ; CPU:$D0AF PRG:10AF B5 B8 + sec ; CPU:$D0B1 PRG:10B1 38 + sbc #$10 ; CPU:$D0B2 PRG:10B2 E9 10 + bmi @store ; CPU:$D0B4 PRG:10B4 30 08 @reduce: - dey - beq @store + dey ; CPU:$D0B6 PRG:10B6 88 + beq @store ; CPU:$D0B7 PRG:10B7 F0 05 - sec - sbc #$08 - bpl @reduce + sec ; CPU:$D0B9 PRG:10B9 38 + sbc #$08 ; CPU:$D0BA PRG:10BA E9 08 + bpl @reduce ; CPU:$D0BC PRG:10BC 10 F8 @store: - tya - sta $0360,x + tya ; CPU:$D0BE PRG:10BE 98 + sta $0360,x ; CPU:$D0BF PRG:10BF 9D 60 03 - dex - bpl @next_rider + dex ; CPU:$D0C2 PRG:10C2 CA + bpl @next_rider ; CPU:$D0C3 PRG:10C3 10 E8 - rts + rts ; CPU:$D0C5 PRG:10C5 60 ; --------------------------------------------------------------------------- ; $D0C6-$D0F3 @@ -4150,50 +4150,50 @@ UpdateRiderLanePositionStates: ; --------------------------------------------------------------------------- BuildRiderCourseObjectTable: - ldx #$03 + ldx #$03 ; CPU:$D0C6 PRG:10C6 A2 03 @next_rider: - txa - asl a - asl a - sta $0C + txa ; CPU:$D0C8 PRG:10C8 8A + asl a ; CPU:$D0C9 PRG:10C9 0A + asl a ; CPU:$D0CA PRG:10CA 0A + sta $0C ; CPU:$D0CB PRG:10CB 85 0C - lda #$04 - sta $0B + lda #$04 ; CPU:$D0CD PRG:10CD A9 04 + sta $0B ; CPU:$D0CF PRG:10CF 85 0B - jsr $E7FC - sta $C0,x + jsr $E7FC ; CPU:$D0D1 PRG:10D1 20 FC E7 + sta $C0,x ; CPU:$D0D4 PRG:10D4 95 C0 ; D0D6: 4C DD D0 = JMP $D0DD ; First iteration uses the value already returned in A by $E7FC, ; skipping the indexed load used by subsequent iterations. - .byte $4C, $DD, $D0 + .byte $4C, $DD, $D0 ; CPU:$D0D6 PRG:10D6 4C DD D0 @read_next: - ldy $08 - lda ($03),y + ldy $08 ; CPU:$D0D9 PRG:10D9 A4 08 + lda ($03),y ; CPU:$D0DB PRG:10DB B1 03 ; $D0DD @store_value: - pha + pha ; CPU:$D0DD PRG:10DD 48 - iny - tya - and #$3F - sta $08 + iny ; CPU:$D0DE PRG:10DE C8 + tya ; CPU:$D0DF PRG:10DF 98 + and #$3F ; CPU:$D0E0 PRG:10E0 29 3F + sta $08 ; CPU:$D0E2 PRG:10E2 85 08 - ldy $0C - pla - sta $03C0,y + ldy $0C ; CPU:$D0E4 PRG:10E4 A4 0C + pla ; CPU:$D0E6 PRG:10E6 68 + sta $03C0,y ; CPU:$D0E7 PRG:10E7 99 C0 03 - inc $0C - dec $0B - bne @read_next + inc $0C ; CPU:$D0EA PRG:10EA E6 0C + dec $0B ; CPU:$D0EC PRG:10EC C6 0B + bne @read_next ; CPU:$D0EE PRG:10EE D0 E9 - dex - bpl @next_rider + dex ; CPU:$D0F0 PRG:10F0 CA + bpl @next_rider ; CPU:$D0F1 PRG:10F1 10 D5 - rts + rts ; CPU:$D0F3 PRG:10F3 60 ; --------------------------------------------------------------------------- ; $D0F4-$D11E @@ -4202,35 +4202,35 @@ BuildRiderCourseObjectTable: ; --------------------------------------------------------------------------- Initialize03D0Structure: - ldx #$06 + ldx #$06 ; CPU:$D0F4 PRG:10F4 A2 06 @copy: - lda $03D9,x - sta $03D1,x + lda $03D9,x ; CPU:$D0F6 PRG:10F6 BD D9 03 + sta $03D1,x ; CPU:$D0F9 PRG:10F9 9D D1 03 - dex - bpl @copy + dex ; CPU:$D0FC PRG:10FC CA + bpl @copy ; CPU:$D0FD PRG:10FD 10 F7 - lda #$56 - sta $00 + lda #$56 ; CPU:$D0FF PRG:10FF A9 56 + sta $00 ; CPU:$D101 PRG:1101 85 00 - lda #$23 - sta $01 + lda #$23 ; CPU:$D103 PRG:1103 A9 23 + sta $01 ; CPU:$D105 PRG:1105 85 01 - lda #$17 - sta $03D0 + lda #$17 ; CPU:$D107 PRG:1107 A9 17 + sta $03D0 ; CPU:$D109 PRG:1109 8D D0 03 - lda #$D0 - sta $02 + lda #$D0 ; CPU:$D10C PRG:110C A9 D0 + sta $02 ; CPU:$D10E PRG:110E 85 02 - lda #$03 - sta $03 + lda #$03 ; CPU:$D110 PRG:1110 A9 03 + sta $03 ; CPU:$D112 PRG:1112 85 03 - lda #$FB - sta $03D2 - sta $03D5 + lda #$FB ; CPU:$D114 PRG:1114 A9 FB + sta $03D2 ; CPU:$D116 PRG:1116 8D D2 03 + sta $03D5 ; CPU:$D119 PRG:1119 8D D5 03 - jmp $D2A3 + jmp $D2A3 ; CPU:$D11C PRG:111C 4C A3 D2 ; --------------------------------------------------------------------------- @@ -4248,28 +4248,28 @@ Initialize03D0Structure: ; --------------------------------------------------------------------------- Initialize0300Structure: - lda #$11 - sta $0300 + lda #$11 ; CPU:$D11F PRG:111F A9 11 + sta $0300 ; CPU:$D121 PRG:1121 8D 00 03 - lda #$23 - sta $0301 + lda #$23 ; CPU:$D124 PRG:1124 A9 23 + sta $0301 ; CPU:$D126 PRG:1126 8D 01 03 - lda #$A0 - sta $0302 + lda #$A0 ; CPU:$D129 PRG:1129 A9 A0 + sta $0302 ; CPU:$D12B PRG:112B 8D 02 03 - ldx #$0E - stx $0303 + ldx #$0E ; CPU:$D12E PRG:112E A2 0E + stx $0303 ; CPU:$D130 PRG:1130 8E 03 03 - lda #$FE + lda #$FE ; CPU:$D133 PRG:1133 A9 FE @fill: - sta $0303,x + sta $0303,x ; CPU:$D135 PRG:1135 9D 03 03 - dex - bne @fill + dex ; CPU:$D138 PRG:1138 CA + bne @fill ; CPU:$D139 PRG:1139 D0 FA - stx $0312 - rts + stx $0312 ; CPU:$D13B PRG:113B 8E 12 03 + rts ; CPU:$D13E PRG:113E 60 ; --------------------------------------------------------------------------- @@ -4283,14 +4283,14 @@ Initialize0300Structure: ; --------------------------------------------------------------------------- InitializePairedPpuRows: - ldx #$00 - jsr BuildPairedPpuRows + ldx #$00 ; CPU:$D13F PRG:113F A2 00 + jsr BuildPairedPpuRows ; CPU:$D141 PRG:1141 20 E4 EC - ldx #$04 - jsr BuildPairedPpuRows + ldx #$04 ; CPU:$D144 PRG:1144 A2 04 + jsr BuildPairedPpuRows ; CPU:$D146 PRG:1146 20 E4 EC - ldx #$08 - jmp BuildPairedPpuRows + ldx #$08 ; CPU:$D149 PRG:1149 A2 08 + jmp BuildPairedPpuRows ; CPU:$D14B PRG:114B 4C E4 EC ; --------------------------------------------------------------------------- @@ -4307,7 +4307,7 @@ NmiRuntimeUpdate: and #$40 ; D151: 29 40 bne @wait_ppu ; D153: D0 F9 - jsr ApplyPpuScrollState + jsr ApplyPpuScrollState ; CPU:$D155 PRG:1155 20 B3 D1 ; D155: 20 B3 D1 lda $3F ; D158: A5 3F @@ -4335,7 +4335,7 @@ NmiRuntimeUpdate: ; D167: F0 15 = BEQ $D17E ; Target is beyond this incremental block. - .byte $F0, $15 + .byte $F0, $15 ; CPU:$D167 PRG:1167 F0 15 lda #$F8 ; D169: A9 F8 ldy #$EC ; D16B: A0 EC @@ -4411,7 +4411,7 @@ UpdatePpuState: ; D1B1: F0 E4 = BEQ $D197 ; A is known to be zero, so this is an unconditional branch. - .byte $F0, $E4 + .byte $F0, $E4 ; CPU:$D1B1 PRG:11B1 F0 E4 ; --------------------------------------------------------------------------- @@ -4424,21 +4424,21 @@ UpdatePpuState: ; --------------------------------------------------------------------------- ApplyPpuScrollState: - lda $10 - ora $4E - sta PPUCTRL + lda $10 ; CPU:$D1B3 PRG:11B3 A5 10 + ora $4E ; CPU:$D1B5 PRG:11B5 05 4E + sta PPUCTRL ; CPU:$D1B7 PRG:11B7 8D 00 20 ; Reset the PPUADDR/PPUSCROLL write latch. - lda PPUSTATUS + lda PPUSTATUS ; CPU:$D1BA PRG:11BA AD 02 20 - lda $50 - sta PPUSCROLL + lda $50 ; CPU:$D1BD PRG:11BD A5 50 + sta PPUSCROLL ; CPU:$D1BF PRG:11BF 8D 05 20 - lda $51 + lda $51 ; CPU:$D1C2 PRG:11C2 A5 51 ; Tail-call the existing second-scroll-write path. ; D1C4: 4C 97 D1 = JMP $D197 - .byte $4C, $97, $D1 + .byte $4C, $97, $D1 ; CPU:$D1C4 PRG:11C4 4C 97 D1 ; --------------------------------------------------------------------------- @@ -4452,55 +4452,55 @@ ApplyPpuScrollState: ; --------------------------------------------------------------------------- BuildIndirectStructure: - sta $0A + sta $0A ; CPU:$D1C7 PRG:11C7 85 0A - txa - pha + txa ; CPU:$D1C9 PRG:11C9 8A + pha ; CPU:$D1CA PRG:11CA 48 - tya - pha + tya ; CPU:$D1CB PRG:11CB 98 + pha ; CPU:$D1CC PRG:11CC 48 - lda #$02 - sta $05 + lda #$02 ; CPU:$D1CD PRG:11CD A9 02 + sta $05 ; CPU:$D1CF PRG:11CF 85 05 - lda #$0F - and $03 - sta $07 + lda #$0F ; CPU:$D1D1 PRG:11D1 A9 0F + and $03 ; CPU:$D1D3 PRG:11D3 25 03 + sta $07 ; CPU:$D1D5 PRG:11D5 85 07 - lda $03 - lsr a - lsr a - lsr a - lsr a - sta $06 - tax + lda $03 ; CPU:$D1D7 PRG:11D7 A5 03 + lsr a ; CPU:$D1D9 PRG:11D9 4A + lsr a ; CPU:$D1DA PRG:11DA 4A + lsr a ; CPU:$D1DB PRG:11DB 4A + lsr a ; CPU:$D1DC PRG:11DC 4A + sta $06 ; CPU:$D1DD PRG:11DD 85 06 + tax ; CPU:$D1DF PRG:11DF AA - lda #$00 - clc + lda #$00 ; CPU:$D1E0 PRG:11E0 A9 00 + clc ; CPU:$D1E2 PRG:11E2 18 @calculate_count: - adc $07 - dex - bne @calculate_count + adc $07 ; CPU:$D1E3 PRG:11E3 65 07 + dex ; CPU:$D1E5 PRG:11E5 CA + bne @calculate_count ; CPU:$D1E6 PRG:11E6 D0 FB - sta $08 + sta $08 ; CPU:$D1E8 PRG:11E8 85 08 - lda $02 - ldy #$01 + lda $02 ; CPU:$D1EA PRG:11EA A5 02 + ldy #$01 ; CPU:$D1EC PRG:11EC A0 01 @build_entry: - txa - lsr a + txa ; CPU:$D1EE PRG:11EE 8A + lsr a ; CPU:$D1EF PRG:11EF 4A bcs @store_value ; D1F0: B0 0A - lsr $0A + lsr $0A ; CPU:$D1F2 PRG:11F2 46 0A bcc @store_value ; D1F4: 90 06 lda #$FC ; D1F6: A9 FC sta ($04),y ; D1F8: 91 04 ; D1FA: D0 06 = BNE $D202 - bne @store_common + bne @store_common ; CPU:$D1FA PRG:11FA D0 06 @store_value: lda $02 ; D1FC: A5 02 @@ -4509,61 +4509,61 @@ BuildIndirectStructure: @store_common: iny ; D202: C8 - lda $0B + lda $0B ; CPU:$D203 PRG:1203 A5 0B - sta ($04),y + sta ($04),y ; CPU:$D205 PRG:1205 91 04 - iny - iny - iny + iny ; CPU:$D207 PRG:1207 C8 + iny ; CPU:$D208 PRG:1208 C8 + iny ; CPU:$D209 PRG:1209 C8 - inx - cpx $08 - bne @build_entry + inx ; CPU:$D20A PRG:120A E8 + cpx $08 ; CPU:$D20B PRG:120B E4 08 + bne @build_entry ; CPU:$D20D PRG:120D D0 DF - ldy #$00 + ldy #$00 ; CPU:$D20F PRG:120F A0 00 @next_row: - ldx $06 + ldx $06 ; CPU:$D211 PRG:1211 A6 06 - lda $01 - sta $09 + lda $01 ; CPU:$D213 PRG:1213 A5 01 + sta $09 ; CPU:$D215 PRG:1215 85 09 @write_row: - lda $09 - sta ($04),y + lda $09 ; CPU:$D217 PRG:1217 A5 09 + sta ($04),y ; CPU:$D219 PRG:1219 91 04 - clc - adc #$08 - sta $09 + clc ; CPU:$D21B PRG:121B 18 + adc #$08 ; CPU:$D21C PRG:121C 69 08 + sta $09 ; CPU:$D21E PRG:121E 85 09 - iny - iny - iny + iny ; CPU:$D220 PRG:1220 C8 + iny ; CPU:$D221 PRG:1221 C8 + iny ; CPU:$D222 PRG:1222 C8 - lda $00 - sta ($04),y + lda $00 ; CPU:$D223 PRG:1223 A5 00 + sta ($04),y ; CPU:$D225 PRG:1225 91 04 - iny + iny ; CPU:$D227 PRG:1227 C8 - dex - bne @write_row + dex ; CPU:$D228 PRG:1228 CA + bne @write_row ; CPU:$D229 PRG:1229 D0 EC - lda $00 - clc - adc #$08 - sta $00 + lda $00 ; CPU:$D22B PRG:122B A5 00 + clc ; CPU:$D22D PRG:122D 18 + adc #$08 ; CPU:$D22E PRG:122E 69 08 + sta $00 ; CPU:$D230 PRG:1230 85 00 - dec $07 - bne @next_row + dec $07 ; CPU:$D232 PRG:1232 C6 07 + bne @next_row ; CPU:$D234 PRG:1234 D0 DB - pla - tay + pla ; CPU:$D236 PRG:1236 68 + tay ; CPU:$D237 PRG:1237 A8 - pla - tax + pla ; CPU:$D238 PRG:1238 68 + tax ; CPU:$D239 PRG:1239 AA - rts + rts ; CPU:$D23A PRG:123A 60 ; --------------------------------------------------------------------------- ; $D23B-$D24E @@ -4575,25 +4575,25 @@ BuildIndirectStructure: ; --------------------------------------------------------------------------- ProcessTwoIndexedEntries: - ldx #$01 + ldx #$01 ; CPU:$D23B PRG:123B A2 01 @next_entry: - txa - pha + txa ; CPU:$D23D PRG:123D 8A + pha ; CPU:$D23E PRG:123E 48 - sta $01 + sta $01 ; CPU:$D23F PRG:123F 85 01 - jsr DisablePpuRendering - jsr InitializePpuMemory + jsr DisablePpuRendering ; CPU:$D241 PRG:1241 20 4F D2 + jsr InitializePpuMemory ; CPU:$D244 PRG:1244 20 60 D2 - pla - tax + pla ; CPU:$D247 PRG:1247 68 + tax ; CPU:$D248 PRG:1248 AA - inx - cpx #$03 - bcc @next_entry + inx ; CPU:$D249 PRG:1249 E8 + cpx #$03 ; CPU:$D24A PRG:124A E0 03 + bcc @next_entry ; CPU:$D24C PRG:124C 90 EF - rts + rts ; CPU:$D24E PRG:124E 60 ; --------------------------------------------------------------------------- ; $D24F-$D254 @@ -4612,15 +4612,15 @@ DisablePpuRendering: ; --------------------------------------------------------------------------- FillOamShadowWithF8: - lda #$F8 - ldy #$00 + lda #$F8 ; CPU:$D255 PRG:1255 A9 F8 + ldy #$00 ; CPU:$D257 PRG:1257 A0 00 @loop: - sta OamBuffer,y - dey - bne @loop + sta OamBuffer,y ; CPU:$D259 PRG:1259 99 00 02 + dey ; CPU:$D25C PRG:125C 88 + bne @loop ; CPU:$D25D PRG:125D D0 FA - rts + rts ; CPU:$D25F PRG:125F 60 ; --------------------------------------------------------------------------- ; $D260-$D2A2 @@ -4688,76 +4688,76 @@ InitializePpuMemory: ; --------------------------------------------------------------------------- Build0300Descriptor: - txa - pha + txa ; CPU:$D2A3 PRG:12A3 8A + pha ; CPU:$D2A4 PRG:12A4 48 - tya - pha + tya ; CPU:$D2A5 PRG:12A5 98 + pha ; CPU:$D2A6 PRG:12A6 48 - ldy #$00 + ldy #$00 ; CPU:$D2A7 PRG:12A7 A0 00 - lda ($02),y - and #$0F - sta $05 + lda ($02),y ; CPU:$D2A9 PRG:12A9 B1 02 + and #$0F ; CPU:$D2AB PRG:12AB 29 0F + sta $05 ; CPU:$D2AD PRG:12AD 85 05 - lda ($02),y - lsr a - lsr a - lsr a - lsr a - sta $04 + lda ($02),y ; CPU:$D2AF PRG:12AF B1 02 + lsr a ; CPU:$D2B1 PRG:12B1 4A + lsr a ; CPU:$D2B2 PRG:12B2 4A + lsr a ; CPU:$D2B3 PRG:12B3 4A + lsr a ; CPU:$D2B4 PRG:12B4 4A + sta $04 ; CPU:$D2B5 PRG:12B5 85 04 - ldx $0300 + ldx $0300 ; CPU:$D2B7 PRG:12B7 AE 00 03 @next_group: - lda $01 - sta $0301,x - jsr Advance0300WriteIndex + lda $01 ; CPU:$D2BA PRG:12BA A5 01 + sta $0301,x ; CPU:$D2BC PRG:12BC 9D 01 03 + jsr Advance0300WriteIndex ; CPU:$D2BF PRG:12BF 20 FF D2 - lda $00 - sta $0301,x - jsr Advance0300WriteIndex + lda $00 ; CPU:$D2C2 PRG:12C2 A5 00 + sta $0301,x ; CPU:$D2C4 PRG:12C4 9D 01 03 + jsr Advance0300WriteIndex ; CPU:$D2C7 PRG:12C7 20 FF D2 - lda $05 - sta $06 - sta $0301,x + lda $05 ; CPU:$D2CA PRG:12CA A5 05 + sta $06 ; CPU:$D2CC PRG:12CC 85 06 + sta $0301,x ; CPU:$D2CE PRG:12CE 9D 01 03 @next_value: - jsr Advance0300WriteIndex + jsr Advance0300WriteIndex ; CPU:$D2D1 PRG:12D1 20 FF D2 - iny - lda ($02),y - sta $0301,x + iny ; CPU:$D2D4 PRG:12D4 C8 + lda ($02),y ; CPU:$D2D5 PRG:12D5 B1 02 + sta $0301,x ; CPU:$D2D7 PRG:12D7 9D 01 03 - dec $06 - bne @next_value + dec $06 ; CPU:$D2DA PRG:12DA C6 06 + bne @next_value ; CPU:$D2DC PRG:12DC D0 F3 - jsr Advance0300WriteIndex + jsr Advance0300WriteIndex ; CPU:$D2DE PRG:12DE 20 FF D2 - stx $0300 + stx $0300 ; CPU:$D2E1 PRG:12E1 8E 00 03 - clc - lda #$20 - adc TMP00 - sta TMP00 + clc ; CPU:$D2E4 PRG:12E4 18 + lda #$20 ; CPU:$D2E5 PRG:12E5 A9 20 + adc TMP00 ; CPU:$D2E7 PRG:12E7 65 00 + sta TMP00 ; CPU:$D2E9 PRG:12E9 85 00 - lda #$00 - adc TMP01 - sta TMP01 + lda #$00 ; CPU:$D2EB PRG:12EB A9 00 + adc TMP01 ; CPU:$D2ED PRG:12ED 65 01 + sta TMP01 ; CPU:$D2EF PRG:12EF 85 01 - dec $04 - bne @next_group + dec $04 ; CPU:$D2F1 PRG:12F1 C6 04 + bne @next_group ; CPU:$D2F3 PRG:12F3 D0 C5 - lda #$00 - sta $0301,x + lda #$00 ; CPU:$D2F5 PRG:12F5 A9 00 + sta $0301,x ; CPU:$D2F7 PRG:12F7 9D 01 03 - pla - tay + pla ; CPU:$D2FA PRG:12FA 68 + tay ; CPU:$D2FB PRG:12FB A8 - pla - tax + pla ; CPU:$D2FC PRG:12FC 68 + tax ; CPU:$D2FD PRG:12FD AA - rts + rts ; CPU:$D2FE PRG:12FE 60 ; --------------------------------------------------------------------------- @@ -4769,23 +4769,23 @@ Build0300Descriptor: ; --------------------------------------------------------------------------- Advance0300WriteIndex: - inx + inx ; CPU:$D2FF PRG:12FF E8 - txa - cmp #$3F - bcc @return + txa ; CPU:$D300 PRG:1300 8A + cmp #$3F ; CPU:$D301 PRG:1301 C9 3F + bcc @return ; CPU:$D303 PRG:1303 90 0A - ldx $0300 + ldx $0300 ; CPU:$D305 PRG:1305 AE 00 03 - lda #$00 - sta $0301,x + lda #$00 ; CPU:$D308 PRG:1308 A9 00 + sta $0301,x ; CPU:$D30A PRG:130A 9D 01 03 ; Discard caller return address. - pla - pla + pla ; CPU:$D30D PRG:130D 68 + pla ; CPU:$D30E PRG:130E 68 @return: - rts + rts ; CPU:$D30F PRG:130F 60 ; --------------------------------------------------------------------------- ; $D310-$D325 @@ -4826,69 +4826,69 @@ UpdateRuntimeCounters: ; --------------------------------------------------------------------------- ShiftRuntimeState: - lda $18 - and #$02 - sta $00 + lda $18 ; CPU:$D326 PRG:1326 A5 18 + and #$02 ; CPU:$D328 PRG:1328 29 02 + sta $00 ; CPU:$D32A PRG:132A 85 00 - lda $19 - and #$02 - eor $00 + lda $19 ; CPU:$D32C PRG:132C A5 19 + and #$02 ; CPU:$D32E PRG:132E 29 02 + eor $00 ; CPU:$D330 PRG:1330 45 00 - clc - beq @shift + clc ; CPU:$D332 PRG:1332 18 + beq @shift ; CPU:$D333 PRG:1333 F0 01 - sec + sec ; CPU:$D335 PRG:1335 38 @shift: - ror $18 - ror $19 - ror $1A - ror $1B - ror $1C - ror $1D - ror $1E - ror $1F + ror $18 ; CPU:$D336 PRG:1336 66 18 + ror $19 ; CPU:$D338 PRG:1338 66 19 + ror $1A ; CPU:$D33A PRG:133A 66 1A + ror $1B ; CPU:$D33C PRG:133C 66 1B + ror $1C ; CPU:$D33E PRG:133E 66 1C + ror $1D ; CPU:$D340 PRG:1340 66 1D + ror $1E ; CPU:$D342 PRG:1342 66 1E + ror $1F ; CPU:$D344 PRG:1344 66 1F - rts + rts ; CPU:$D346 PRG:1346 60 ReadControllers: - lda #$01 - sta JOY1 - ldx #$00 - lda #$00 - sta JOY1 - jsr ReadOneController - inx - jsr ReadOneController - rts + lda #$01 ; CPU:$D347 PRG:1347 A9 01 + sta JOY1 ; CPU:$D349 PRG:1349 8D 16 40 + ldx #$00 ; CPU:$D34C PRG:134C A2 00 + lda #$00 ; CPU:$D34E PRG:134E A9 00 + sta JOY1 ; CPU:$D350 PRG:1350 8D 16 40 + jsr ReadOneController ; CPU:$D353 PRG:1353 20 5B D3 + inx ; CPU:$D356 PRG:1356 E8 + jsr ReadOneController ; CPU:$D357 PRG:1357 20 5B D3 + rts ; CPU:$D35A PRG:135A 60 ReadOneController: - ldy #$08 + ldy #$08 ; CPU:$D35B PRG:135B A0 08 @read: pha - lda JOY1,x - sta $00 - lsr a - ora $00 - lsr a - pla - rol a - dey - bne @read - stx TMP00 - asl TMP00 - ldx TMP00 - ldy ControllerState,x - sty TMP00 - sta ControllerState,x - sta ControllerState+1,x - and #$FF - bpl @done - bit TMP00 - bpl @done - and #$7F - sta ControllerState+1,x + lda JOY1,x ; CPU:$D35E PRG:135E BD 16 40 + sta $00 ; CPU:$D361 PRG:1361 85 00 + lsr a ; CPU:$D363 PRG:1363 4A + ora $00 ; CPU:$D364 PRG:1364 05 00 + lsr a ; CPU:$D366 PRG:1366 4A + pla ; CPU:$D367 PRG:1367 68 + rol a ; CPU:$D368 PRG:1368 2A + dey ; CPU:$D369 PRG:1369 88 + bne @read ; CPU:$D36A PRG:136A D0 F1 + stx TMP00 ; CPU:$D36C PRG:136C 86 00 + asl TMP00 ; CPU:$D36E PRG:136E 06 00 + ldx TMP00 ; CPU:$D370 PRG:1370 A6 00 + ldy ControllerState,x ; CPU:$D372 PRG:1372 B4 14 + sty TMP00 ; CPU:$D374 PRG:1374 84 00 + sta ControllerState,x ; CPU:$D376 PRG:1376 95 14 + sta ControllerState+1,x ; CPU:$D378 PRG:1378 95 15 + and #$FF ; CPU:$D37A PRG:137A 29 FF + bpl @done ; CPU:$D37C PRG:137C 10 08 + bit TMP00 ; CPU:$D37E PRG:137E 24 00 + bpl @done ; CPU:$D380 PRG:1380 10 04 + and #$7F ; CPU:$D382 PRG:1382 29 7F + sta ControllerState+1,x ; CPU:$D384 PRG:1384 95 15 @done: - rts + rts ; CPU:$D386 PRG:1386 60 ; --------------------------------------------------------------------------- ; $D387-$D3D5: process PPU update command stream. @@ -4896,58 +4896,58 @@ ReadOneController: ; --------------------------------------------------------------------------- ProcessPpuUpdateCommand: - sta PPUADDR + sta PPUADDR ; CPU:$D387 PRG:1387 8D 06 20 - iny - lda ($00),y - sta PPUADDR + iny ; CPU:$D38A PRG:138A C8 + lda ($00),y ; CPU:$D38B PRG:138B B1 00 + sta PPUADDR ; CPU:$D38D PRG:138D 8D 06 20 - iny - lda ($00),y - asl a - pha + iny ; CPU:$D390 PRG:1390 C8 + lda ($00),y ; CPU:$D391 PRG:1391 B1 00 + asl a ; CPU:$D393 PRG:1393 0A + pha ; CPU:$D394 PRG:1394 48 - lda PpuControlShadow - ora #$04 - bcs @set_ppuctrl + lda PpuControlShadow ; CPU:$D395 PRG:1395 A5 10 + ora #$04 ; CPU:$D397 PRG:1397 09 04 + bcs @set_ppuctrl ; CPU:$D399 PRG:1399 B0 02 - and #$FB + and #$FB ; CPU:$D39B PRG:139B 29 FB @set_ppuctrl: - jsr SetPpuControl + jsr SetPpuControl ; CPU:$D39D PRG:139D 20 33 C3 - pla - asl a - bcc @decode_count + pla ; CPU:$D3A0 PRG:13A0 68 + asl a ; CPU:$D3A1 PRG:13A1 0A + bcc @decode_count ; CPU:$D3A2 PRG:13A2 90 03 - ora #$02 - iny + ora #$02 ; CPU:$D3A4 PRG:13A4 09 02 + iny ; CPU:$D3A6 PRG:13A6 C8 @decode_count: - lsr a - lsr a - tax + lsr a ; CPU:$D3A7 PRG:13A7 4A + lsr a ; CPU:$D3A8 PRG:13A8 4A + tax ; CPU:$D3A9 PRG:13A9 AA @next_write: - bcs @write_byte + bcs @write_byte ; CPU:$D3AA PRG:13AA B0 01 - iny + iny ; CPU:$D3AC PRG:13AC C8 @write_byte: - lda ($00),y - sta PPUDATA + lda ($00),y ; CPU:$D3AD PRG:13AD B1 00 + sta PPUDATA ; CPU:$D3AF PRG:13AF 8D 07 20 - dex - bne @next_write + dex ; CPU:$D3B2 PRG:13B2 CA + bne @next_write ; CPU:$D3B3 PRG:13B3 D0 F5 - sec - tya - adc $00 - sta $00 + sec ; CPU:$D3B5 PRG:13B5 38 + tya ; CPU:$D3B6 PRG:13B6 98 + adc $00 ; CPU:$D3B7 PRG:13B7 65 00 + sta $00 ; CPU:$D3B9 PRG:13B9 85 00 - lda #$00 - adc $01 - sta $01 + lda #$00 ; CPU:$D3BB PRG:13BB A9 00 + adc $01 ; CPU:$D3BD PRG:13BD 65 01 + sta $01 ; CPU:$D3BF PRG:13BF 85 01 ; --------------------------------------------------------------------------- @@ -4956,19 +4956,19 @@ ProcessPpuUpdateCommand: ; --------------------------------------------------------------------------- ProcessPpuUpdateStream: - ldx PPUSTATUS + ldx PPUSTATUS ; CPU:$D3C1 PRG:13C1 AE 02 20 - ldy #$00 - lda ($00),y - bne ProcessPpuUpdateCommand + ldy #$00 ; CPU:$D3C4 PRG:13C4 A0 00 + lda ($00),y ; CPU:$D3C6 PRG:13C6 B1 00 + bne ProcessPpuUpdateCommand ; CPU:$D3C8 PRG:13C8 D0 BD - lda PPUSTATUS + lda PPUSTATUS ; CPU:$D3CA PRG:13CA AD 02 20 - lda #$00 - sta PPUSCROLL - sta PPUSCROLL + lda #$00 ; CPU:$D3CD PRG:13CD A9 00 + sta PPUSCROLL ; CPU:$D3CF PRG:13CF 8D 05 20 + sta PPUSCROLL ; CPU:$D3D2 PRG:13D2 8D 05 20 - rts + rts ; CPU:$D3D5 PRG:13D5 60 ; --------------------------------------------------------------------------- @@ -4979,43 +4979,43 @@ ProcessPpuUpdateStream: PpuGraphicsDataD3D6: ; $D3D6 - .byte $3F, $00, $08, $29, $27, $22, $30, $29 - .byte $27, $18, $36, $3F, $10, $04, $29, $20 + .byte $3F, $00, $08, $29, $27, $22, $30, $29 ; CPU:$D3D6 PRG:13D6 3F 00 08 29 + .byte $27, $18, $36, $3F, $10, $04, $29, $20 ; CPU:$D3DE PRG:13DE 27 18 36 3F ; $D3E6 - .byte $16, $0F, $00, $3F, $00, $08, $01, $1A - .byte $26, $33, $01, $11, $0C, $2C, $3F, $10 + .byte $16, $0F, $00, $3F, $00, $08, $01, $1A ; CPU:$D3E6 PRG:13E6 16 0F 00 3F + .byte $26, $33, $01, $11, $0C, $2C, $3F, $10 ; CPU:$D3EE PRG:13EE 26 33 01 11 ; $D3F6 - .byte $04, $01, $20, $16, $0F, $00, $3F, $00 - .byte $08, $02, $26, $1C, $30, $02, $29, $19 + .byte $04, $01, $20, $16, $0F, $00, $3F, $00 ; CPU:$D3F6 PRG:13F6 04 01 20 16 + .byte $08, $02, $26, $1C, $30, $02, $29, $19 ; CPU:$D3FE PRG:13FE 08 02 26 1C ; $D406 - .byte $39, $3F, $10, $04, $02, $20, $16, $0F - .byte $00, $3F, $00, $08, $00, $26, $22, $30 + .byte $39, $3F, $10, $04, $02, $20, $16, $0F ; CPU:$D406 PRG:1406 39 3F 10 04 + .byte $00, $3F, $00, $08, $00, $26, $22, $30 ; CPU:$D40E PRG:140E 00 3F 00 08 ; $D416 - .byte $00, $27, $18, $37, $3F, $10, $04, $00 - .byte $20, $16, $0F, $00, $3F, $00, $08, $02 + .byte $00, $27, $18, $37, $3F, $10, $04, $00 ; CPU:$D416 PRG:1416 00 27 18 37 + .byte $20, $16, $0F, $00, $3F, $00, $08, $02 ; CPU:$D41E PRG:141E 20 16 0F 00 ; $D426 - .byte $19, $22, $30, $02, $00, $2D, $10, $3F - .byte $10, $04, $02, $20, $16, $0F, $00, $3F + .byte $19, $22, $30, $02, $00, $2D, $10, $3F ; CPU:$D426 PRG:1426 19 22 30 02 + .byte $10, $04, $02, $20, $16, $0F, $00, $3F ; CPU:$D42E PRG:142E 10 04 02 20 ; $D436 - .byte $08, $08, $29, $22, $0F, $20, $29, $22 - .byte $0F, $16, $3F, $14, $0C, $29, $13, $20 + .byte $08, $08, $29, $22, $0F, $20, $29, $22 ; CPU:$D436 PRG:1436 08 08 29 22 + .byte $0F, $16, $3F, $14, $0C, $29, $13, $20 ; CPU:$D43E PRG:143E 0F 16 3F 14 ; $D446 - .byte $0F, $29, $31, $1C, $0F, $29, $20, $19 - .byte $0F, $00, $3F, $00, $1C, $02, $0F, $30 + .byte $0F, $29, $31, $1C, $0F, $29, $20, $19 ; CPU:$D446 PRG:1446 0F 29 31 1C + .byte $0F, $00, $3F, $00, $1C, $02, $0F, $30 ; CPU:$D44E PRG:144E 0F 00 3F 00 ; $D456 - .byte $21, $02, $15, $02, $2A, $02, $3C, $02 - .byte $30, $02, $30, $02, $27, $02, $20, $16 + .byte $21, $02, $15, $02, $2A, $02, $3C, $02 ; CPU:$D456 PRG:1456 21 02 15 02 + .byte $30, $02, $30, $02, $27, $02, $20, $16 ; CPU:$D45E PRG:145E 30 02 30 02 ; $D466-$D46D - .byte $0F, $02, $27, $13, $3C, $02, $27, $16 + .byte $0F, $02, $27, $13, $3C, $02, $27, $16 ; CPU:$D466 PRG:1466 0F 02 27 13 ; --------------------------------------------------------------------------- @@ -5024,11 +5024,11 @@ PpuGraphicsDataD3D6: ; --------------------------------------------------------------------------- PpuRecordDataD46E: - .byte $30, $00 - .byte $23, $D0, $60, $55 - .byte $23, $F0, $50, $AA - .byte $27, $D0, $60, $55 - .byte $27, $F0, $50, $AA + .byte $30, $00 ; CPU:$D46E PRG:146E 30 00 + .byte $23, $D0, $60, $55 ; CPU:$D470 PRG:1470 23 D0 60 55 + .byte $23, $F0, $50, $AA ; CPU:$D474 PRG:1474 23 F0 50 AA + .byte $27, $D0, $60, $55 ; CPU:$D478 PRG:1478 27 D0 60 55 + .byte $27, $F0, $50, $AA ; CPU:$D47C PRG:147C 27 F0 50 AA ; --------------------------------------------------------------------------- ; $D480-$D48F @@ -5036,17 +5036,17 @@ PpuRecordDataD46E: ; --------------------------------------------------------------------------- PpuRecordDataD480: - .byte $20, $00, $60, $3F - .byte $20, $20, $60, $3E - .byte $20, $40, $60, $3F - .byte $20, $60, $60, $3E + .byte $20, $00, $60, $3F ; CPU:$D480 PRG:1480 20 00 60 3F + .byte $20, $20, $60, $3E ; CPU:$D484 PRG:1484 20 20 60 3E + .byte $20, $40, $60, $3F ; CPU:$D488 PRG:1488 20 40 60 3F + .byte $20, $60, $60, $3E ; CPU:$D48C PRG:148C 20 60 60 3E PpuRecordDataD490: - .byte $20, $80, $60, $3F - .byte $24, $00, $60, $3F - .byte $24, $20, $60, $3E - .byte $24, $40, $60, $3F + .byte $20, $80, $60, $3F ; CPU:$D490 PRG:1490 20 80 60 3F + .byte $24, $00, $60, $3F ; CPU:$D494 PRG:1494 24 00 60 3F + .byte $24, $20, $60, $3E ; CPU:$D498 PRG:1498 24 20 60 3E + .byte $24, $40, $60, $3F ; CPU:$D49C PRG:149C 24 40 60 3F ; --------------------------------------------------------------------------- ; $D4A0-$D4AF @@ -5054,10 +5054,10 @@ PpuRecordDataD490: ; --------------------------------------------------------------------------- PpuRecordDataD4A0: - .byte $24, $60, $60, $3E - .byte $24, $80, $60, $3F - .byte $20, $A0, $60, $30 - .byte $20, $C0, $60, $FE + .byte $24, $60, $60, $3E ; CPU:$D4A0 PRG:14A0 24 60 60 3E + .byte $24, $80, $60, $3F ; CPU:$D4A4 PRG:14A4 24 80 60 3F + .byte $20, $A0, $60, $30 ; CPU:$D4A8 PRG:14A8 20 A0 60 30 + .byte $20, $C0, $60, $FE ; CPU:$D4AC PRG:14AC 20 C0 60 FE ; --------------------------------------------------------------------------- ; $D4B0-$D4BF @@ -5065,10 +5065,10 @@ PpuRecordDataD4A0: ; --------------------------------------------------------------------------- PpuRecordDataD4B0: - .byte $20, $E0, $60, $FE - .byte $24, $A0, $60, $30 - .byte $24, $C0, $60, $FE - .byte $24, $E0, $60, $FE + .byte $20, $E0, $60, $FE ; CPU:$D4B0 PRG:14B0 20 E0 60 FE + .byte $24, $A0, $60, $30 ; CPU:$D4B4 PRG:14B4 24 A0 60 30 + .byte $24, $C0, $60, $FE ; CPU:$D4B8 PRG:14B8 24 C0 60 FE + .byte $24, $E0, $60, $FE ; CPU:$D4BC PRG:14BC 24 E0 60 FE ; --------------------------------------------------------------------------- ; $D4C0-$D4E0 @@ -5076,13 +5076,13 @@ PpuRecordDataD4B0: ; --------------------------------------------------------------------------- PpuCommandDataD4C0: - .byte $20, $AB, $83, $31, $34, $37 - .byte $20, $B4, $83, $33, $36, $39 - .byte $20, $AC, $48, $32 - .byte $20, $EC, $48, $38 - .byte $20, $CC, $08 - .byte $17, $12, $17, $1D, $0E, $17, $0D, $18, $22 - .byte $00 + .byte $20, $AB, $83, $31, $34, $37 ; CPU:$D4C0 PRG:14C0 20 AB 83 31 + .byte $20, $B4, $83, $33, $36, $39 ; CPU:$D4C6 PRG:14C6 20 B4 83 33 + .byte $20, $AC, $48, $32 ; CPU:$D4CC PRG:14CC 20 AC 48 32 + .byte $20, $EC, $48, $38 ; CPU:$D4D0 PRG:14D0 20 EC 48 38 + .byte $20, $CC, $08 ; CPU:$D4D4 PRG:14D4 20 CC 08 + .byte $17, $12, $17, $1D, $0E, $17, $0D, $18, $22 ; CPU:$D4D7 PRG:14D7 17 12 17 1D + .byte $00 ; CPU:$D4E0 PRG:14E0 00 ; --------------------------------------------------------------------------- @@ -5091,11 +5091,10 @@ PpuCommandDataD4C0: ; --------------------------------------------------------------------------- PpuRecordDataD4E1: - .byte $60, $3B, $22, $20 - .byte $60, $3C, $22, $40 - .byte $60, $3D, $22, $60 - .byte $60, $3B, $22, $80 - + .byte $60, $3B, $22, $20 ; CPU:$D4E1 PRG:14E1 60 3B 22 20 + .byte $60, $3C, $22, $40 ; CPU:$D4E5 PRG:14E5 60 3C 22 40 + .byte $60, $3D, $22, $60 ; CPU:$D4E9 PRG:14E9 60 3D 22 60 + .byte $60, $3B, $22, $80 ; CPU:$D4ED PRG:14ED 60 3B 22 80 ; --------------------------------------------------------------------------- ; $D4F1-$D500 @@ -5103,10 +5102,10 @@ PpuRecordDataD4E1: ; --------------------------------------------------------------------------- PpuRecordDataD4F1: - .byte $60, $3C, $22, $A0 - .byte $60, $3D, $26, $00 - .byte $60, $3B, $26, $20 - .byte $60, $3C, $26, $40 + .byte $60, $3C, $22, $A0 ; CPU:$D4F1 PRG:14F1 60 3C 22 A0 + .byte $60, $3D, $26, $00 ; CPU:$D4F5 PRG:14F5 60 3D 26 00 + .byte $60, $3B, $26, $20 ; CPU:$D4F9 PRG:14F9 60 3B 26 20 + .byte $60, $3C, $26, $40 ; CPU:$D4FD PRG:14FD 60 3C 26 40 ; --------------------------------------------------------------------------- ; $D501-$D510 @@ -5114,10 +5113,10 @@ PpuRecordDataD4F1: ; --------------------------------------------------------------------------- PpuRecordDataD501: - .byte $60, $3D, $26, $60 - .byte $60, $3B, $26, $80 - .byte $60, $3C, $26, $A0 - .byte $60, $3D, $23, $00 + .byte $60, $3D, $26, $60 ; CPU:$D501 PRG:1501 60 3D 26 60 + .byte $60, $3B, $26, $80 ; CPU:$D505 PRG:1505 60 3B 26 80 + .byte $60, $3C, $26, $A0 ; CPU:$D509 PRG:1509 60 3C 26 A0 + .byte $60, $3D, $23, $00 ; CPU:$D50D PRG:150D 60 3D 23 00 ; --------------------------------------------------------------------------- @@ -5126,10 +5125,10 @@ PpuRecordDataD501: ; --------------------------------------------------------------------------- PpuRecordDataD511: - .byte $7F, $FE, $23, $3F - .byte $7F, $FE, $23, $7E - .byte $7F, $FE, $23, $9D - .byte $63, $FE, $27, $00 + .byte $7F, $FE, $23, $3F ; CPU:$D511 PRG:1511 7F FE 23 3F + .byte $7F, $FE, $23, $7E ; CPU:$D515 PRG:1515 7F FE 23 7E + .byte $7F, $FE, $23, $9D ; CPU:$D519 PRG:1519 7F FE 23 9D + .byte $63, $FE, $27, $00 ; CPU:$D51D PRG:151D 63 FE 27 00 ; --------------------------------------------------------------------------- @@ -5138,10 +5137,10 @@ PpuRecordDataD511: ; --------------------------------------------------------------------------- PpuRecordDataD521: - .byte $7F, $FE, $00, $24 - .byte $AB, $4A, $F2, $24 - .byte $AA, $01, $96, $24 - .byte $B5, $01, $97, $24 + .byte $7F, $FE, $00, $24 ; CPU:$D521 PRG:1521 7F FE 00 24 + .byte $AB, $4A, $F2, $24 ; CPU:$D525 PRG:1525 AB 4A F2 24 + .byte $AA, $01, $96, $24 ; CPU:$D529 PRG:1529 AA 01 96 24 + .byte $B5, $01, $97, $24 ; CPU:$D52D PRG:152D B5 01 97 24 ; --------------------------------------------------------------------------- @@ -5150,10 +5149,10 @@ PpuRecordDataD521: ; --------------------------------------------------------------------------- PpuRecordDataD531: - .byte $CB, $03, $93, $94 - .byte $95, $23, $F1, $06 - .byte $AF, $AA, $AE, $AB - .byte $AA, $AF, $23, $23 + .byte $CB, $03, $93, $94 ; CPU:$D531 PRG:1531 CB 03 93 94 + .byte $95, $23, $F1, $06 ; CPU:$D535 PRG:1535 95 23 F1 06 + .byte $AF, $AA, $AE, $AB ; CPU:$D539 PRG:1539 AF AA AE AB + .byte $AA, $AF, $23, $23 ; CPU:$D53D PRG:153D AA AF 23 23 ; --------------------------------------------------------------------------- ; $D541-$D550 @@ -5161,10 +5160,10 @@ PpuRecordDataD531: ; --------------------------------------------------------------------------- PpuRecordDataD541: - .byte $07, $B7, $B7, $03 - .byte $1B, $0D, $B7, $B7 - .byte $23, $22, $83, $B5 - .byte $B0, $B2, $23, $2A + .byte $07, $B7, $B7, $03 ; CPU:$D541 PRG:1541 07 B7 B7 03 + .byte $1B, $0D, $B7, $B7 ; CPU:$D545 PRG:1545 1B 0D B7 B7 + .byte $23, $22, $83, $B5 ; CPU:$D549 PRG:1549 23 22 83 B5 + .byte $B0, $B2, $23, $2A ; CPU:$D54D PRG:154D B0 B2 23 2A ; --------------------------------------------------------------------------- @@ -5173,10 +5172,10 @@ PpuRecordDataD541: ; --------------------------------------------------------------------------- PpuRecordDataD551: - .byte $83, $B6, $B1, $B4 - .byte $23, $63, $47, $B3 - .byte $23, $36, $07, $B7 - .byte $B7, $1D, $12, $16 + .byte $83, $B6, $B1, $B4 ; CPU:$D551 PRG:1551 83 B6 B1 B4 + .byte $23, $63, $47, $B3 ; CPU:$D555 PRG:1555 23 63 47 B3 + .byte $23, $36, $07, $B7 ; CPU:$D559 PRG:1559 23 36 07 B7 + .byte $B7, $1D, $12, $16 ; CPU:$D55D PRG:155D B7 1D 12 16 ; --------------------------------------------------------------------------- @@ -5189,255 +5188,255 @@ PpuRecordDataD551: GraphicsAndUiDataD561: ; $D561 - .byte $0E, $B7, $23, $35, $83, $B5, $B0, $B2 - .byte $23, $3D, $83, $B6, $B1, $B4, $23, $76 + .byte $0E, $B7, $23, $35, $83, $B5, $B0, $B2 ; CPU:$D561 PRG:1561 0E B7 23 35 + .byte $23, $3D, $83, $B6, $B1, $B4, $23, $76 ; CPU:$D569 PRG:1569 23 3D 83 B6 ; $D571 - .byte $47, $B3, $23, $2C, $08, $4C, $5A, $1D - .byte $0E, $16, $19, $7A, $8B, $23, $4B, $0A + .byte $47, $B3, $23, $2C, $08, $4C, $5A, $1D ; CPU:$D571 PRG:1571 47 B3 23 2C + .byte $0E, $16, $19, $7A, $8B, $23, $4B, $0A ; CPU:$D579 PRG:1579 0E 16 19 7A ; $D581 - .byte $4B, $4D, $5B, $FC, $FC, $FC, $FC, $7B - .byte $4D, $8C, $23, $6D, $06, $5C, $6A, $6A + .byte $4B, $4D, $5B, $FC, $FC, $FC, $FC, $7B ; CPU:$D581 PRG:1581 4B 4D 5B FC + .byte $4D, $8C, $23, $6D, $06, $5C, $6A, $6A ; CPU:$D589 PRG:1589 4D 8C 23 6D ; $D591 - .byte $6A, $6A, $7C, $23, $8D, $06, $5D, $6B - .byte $6C, $6B, $6C, $8A, $00, $20, $89, $4E + .byte $6A, $6A, $7C, $23, $8D, $06, $5D, $6B ; CPU:$D591 PRG:1591 6A 6A 7C 23 + .byte $6C, $6B, $6C, $8A, $00, $20, $89, $4E ; CPU:$D599 PRG:1599 6C 6B 6C 8A ; $D5A1 - .byte $FC, $20, $A9, $0E, $FC, $FC, $0E, $21 - .byte $0C, $12, $1D, $0E, $0B, $12, $14, $0E + .byte $FC, $20, $A9, $0E, $FC, $FC, $0E, $21 ; CPU:$D5A1 PRG:15A1 FC 20 A9 0E + .byte $0C, $12, $1D, $0E, $0B, $12, $14, $0E ; CPU:$D5A9 PRG:15A9 0C 12 1D 0E ; $D5B1 - .byte $FC, $FC, $00, $20, $89, $4E, $FC, $20 - .byte $AA, $0C, $0D, $0E, $1C, $12, $10, $17 + .byte $FC, $FC, $00, $20, $89, $4E, $FC, $20 ; CPU:$D5B1 PRG:15B1 FC FC 00 20 + .byte $AA, $0C, $0D, $0E, $1C, $12, $10, $17 ; CPU:$D5B9 PRG:15B9 AA 0C 0D 0E ; $D5C1 - .byte $FC, $1D, $1B, $0A, $0C, $14, $00, $22 - .byte $E7, $12, $12, $1D, $F9, $1C, $FC, $0A + .byte $FC, $1D, $1B, $0A, $0C, $14, $00, $22 ; CPU:$D5C1 PRG:15C1 FC 1D 1B 0A + .byte $E7, $12, $12, $1D, $F9, $1C, $FC, $0A ; CPU:$D5C9 PRG:15C9 E7 12 12 1D ; $D5D1 - .byte $FC, $17, $0E, $20, $FC, $1B, $0E, $0C - .byte $18, $1B, $0D, $FA, $00, $22, $E5, $56 + .byte $FC, $17, $0E, $20, $FC, $1B, $0E, $0C ; CPU:$D5D1 PRG:15D1 FC 17 0E 20 + .byte $18, $1B, $0D, $FA, $00, $22, $E5, $56 ; CPU:$D5D9 PRG:15D9 18 1B 0D FA ; $D5E1 - .byte $FC, $22, $EB, $09, $10, $0A, $16, $0E - .byte $FC, $18, $1F, $0E, $1B, $00, $22, $E7 + .byte $FC, $22, $EB, $09, $10, $0A, $16, $0E ; CPU:$D5E1 PRG:15E1 FC 22 EB 09 + .byte $FC, $18, $1F, $0E, $1B, $00, $22, $E7 ; CPU:$D5E9 PRG:15E9 FC 18 1F 0E ; $D5F1 - .byte $12, $1D, $1B, $22, $FC, $1D, $11, $0E - .byte $FC, $17, $0E, $21, $1D, $FC, $1D, $1B + .byte $12, $1D, $1B, $22, $FC, $1D, $11, $0E ; CPU:$D5F1 PRG:15F1 12 1D 1B 22 + .byte $FC, $17, $0E, $21, $1D, $FC, $1D, $1B ; CPU:$D5F9 PRG:15F9 FC 17 0E 21 ; $D601 - .byte $0A, $0C, $14, $00, $22, $E5, $56, $FC - .byte $22, $EC, $07, $1D, $12, $16, $0E, $FC + .byte $0A, $0C, $14, $00, $22, $E5, $56, $FC ; CPU:$D601 PRG:1601 0A 0C 14 00 + .byte $22, $EC, $07, $1D, $12, $16, $0E, $FC ; CPU:$D609 PRG:1609 22 EC 07 1D ; $D611 - .byte $1E, $19, $00, $23, $E0, $50, $FF, $22 - .byte $0D, $07, $15, $18, $0A, $0D, $12, $17 + .byte $1E, $19, $00, $23, $E0, $50, $FF, $22 ; CPU:$D611 PRG:1611 1E 19 00 23 + .byte $0D, $07, $15, $18, $0A, $0D, $12, $17 ; CPU:$D619 PRG:1619 0D 07 15 18 ; $D621 - .byte $10, $00, $23, $E0, $50, $FF, $22, $0D - .byte $06, $1C, $0A, $1F, $12, $17, $10, $00 + .byte $10, $00, $23, $E0, $50, $FF, $22, $0D ; CPU:$D621 PRG:1621 10 00 23 E0 + .byte $06, $1C, $0A, $1F, $12, $17, $10, $00 ; CPU:$D629 PRG:1629 06 1C 0A 1F ; $D631 - .byte $22, $8E, $05, $0E, $1B, $1B, $18, $1B - .byte $00, $21, $84, $58, $27, $23, $44, $58 + .byte $22, $8E, $05, $0E, $1B, $1B, $18, $1B ; CPU:$D631 PRG:1631 22 8E 05 0E + .byte $00, $21, $84, $58, $27, $23, $44, $58 ; CPU:$D639 PRG:1639 00 21 84 58 ; $D641 - .byte $27, $21, $A4, $CD, $27, $21, $BB, $CD - .byte $27, $00, $23, $E3, $4B, $AA, $23, $F2 + .byte $27, $21, $A4, $CD, $27, $21, $BB, $CD ; CPU:$D641 PRG:1641 27 21 A4 CD + .byte $27, $00, $23, $E3, $4B, $AA, $23, $F2 ; CPU:$D649 PRG:1649 27 00 23 E3 ; $D651 - .byte $44, $FF, $20, $83, $5A, $27, $20, $A3 - .byte $5A, $27, $21, $83, $5A, $27, $21, $A3 + .byte $44, $FF, $20, $83, $5A, $27, $20, $A3 ; CPU:$D651 PRG:1651 44 FF 20 83 + .byte $5A, $27, $21, $83, $5A, $27, $21, $A3 ; CPU:$D659 PRG:1659 5A 27 21 83 ; $D661 - .byte $5A, $27, $20, $C3, $C6, $27, $20, $C4 - .byte $C6, $27, $20, $DB, $C6, $27, $20, $DC + .byte $5A, $27, $20, $C3, $C6, $27, $20, $C4 ; CPU:$D661 PRG:1661 5A 27 20 C3 + .byte $C6, $27, $20, $DB, $C6, $27, $20, $DC ; CPU:$D669 PRG:1669 C6 27 20 DB ; $D671 - .byte $C6, $27, $21, $07, $12, $98, $9A, $9C - .byte $9E, $A0, $A2, $A4, $A6, $A8, $98, $9A + .byte $C6, $27, $21, $07, $12, $98, $9A, $9C ; CPU:$D671 PRG:1671 C6 27 21 07 + .byte $9E, $A0, $A2, $A4, $A6, $A8, $98, $9A ; CPU:$D679 PRG:1679 9E A0 A2 A4 ; $D681 - .byte $98, $AA, $A4, $AC, $AE, $98, $9A, $21 - .byte $27, $12, $99, $9B, $9D, $9F, $A1, $A3 + .byte $98, $AA, $A4, $AC, $AE, $98, $9A, $21 ; CPU:$D681 PRG:1681 98 AA A4 AC + .byte $27, $12, $99, $9B, $9D, $9F, $A1, $A3 ; CPU:$D689 PRG:1689 27 12 99 9B ; $D691 - .byte $A5, $A7, $A9, $99, $9B, $99, $AB, $A5 - .byte $AD, $AF, $99, $9B, $22, $0C, $0B, $1C + .byte $A5, $A7, $A9, $99, $9B, $99, $AB, $A5 ; CPU:$D691 PRG:1691 A5 A7 A9 99 + .byte $AD, $AF, $99, $9B, $22, $0C, $0B, $1C ; CPU:$D699 PRG:1699 AD AF 99 9B ; $D6A1 - .byte $0E, $15, $0E, $0C, $1D, $12, $18, $17 - .byte $FC, $0A, $22, $4C, $0B, $1C, $0E, $15 + .byte $0E, $15, $0E, $0C, $1D, $12, $18, $17 ; CPU:$D6A1 PRG:16A1 0E 15 0E 0C + .byte $FC, $0A, $22, $4C, $0B, $1C, $0E, $15 ; CPU:$D6A9 PRG:16A9 FC 0A 22 4C ; $D6B1 - .byte $0E, $0C, $1D, $12, $18, $17, $FC, $0B - .byte $22, $8C, $06, $0D, $0E, $1C, $12, $10 + .byte $0E, $0C, $1D, $12, $18, $17, $FC, $0B ; CPU:$D6B1 PRG:16B1 0E 0C 1D 12 + .byte $22, $8C, $06, $0D, $0E, $1C, $12, $10 ; CPU:$D6B9 PRG:16B9 22 8C 06 0D ; $D6C1 - .byte $17, $23, $09, $0E, $3A, $01, $09, $08 - .byte $04, $FC, $17, $12, $17, $1D, $0E, $17 + .byte $17, $23, $09, $0E, $3A, $01, $09, $08 ; CPU:$D6C1 PRG:16C1 17 23 09 0E + .byte $04, $FC, $17, $12, $17, $1D, $0E, $17 ; CPU:$D6C9 PRG:16C9 04 FC 17 12 ; $D6D1 - .byte $0D, $18, $00, $23, $CA, $03, $40, $50 - .byte $50, $23, $D3, $42, $55, $23, $E2, $44 + .byte $0D, $18, $00, $23, $CA, $03, $40, $50 ; CPU:$D6D1 PRG:16D1 0D 18 00 23 + .byte $50, $23, $D3, $42, $55, $23, $E2, $44 ; CPU:$D6D9 PRG:16D9 50 23 D3 42 ; $D6E1 - .byte $AA, $20, $E6, $43, $26, $20, $F7, $43 - .byte $26, $20, $EB, $09, $0C, $11, $0A, $15 + .byte $AA, $20, $E6, $43, $26, $20, $F7, $43 ; CPU:$D6E1 PRG:16E1 AA 20 E6 43 + .byte $26, $20, $EB, $09, $0C, $11, $0A, $15 ; CPU:$D6E9 PRG:16E9 26 20 EB 09 ; $D6F1 - .byte $15, $0E, $17, $10, $0E, $21, $0D, $04 - .byte $1B, $0A, $0C, $0E, $22, $0D, $06, $1D + .byte $15, $0E, $17, $10, $0E, $21, $0D, $04 ; CPU:$D6F1 PRG:16F1 15 0E 17 10 + .byte $1B, $0A, $0C, $0E, $22, $0D, $06, $1D ; CPU:$D6F9 PRG:16F9 1B 0A 0C 0E ; $D701 - .byte $1B, $0A, $0C, $14, $79, $22, $69, $0D - .byte $01, $FC, $FC, $02, $FC, $FC, $03, $FC + .byte $1B, $0A, $0C, $14, $79, $22, $69, $0D ; CPU:$D701 PRG:1701 1B 0A 0C 14 + .byte $01, $FC, $FC, $02, $FC, $FC, $03, $FC ; CPU:$D709 PRG:1709 01 FC FC 02 ; $D711 - .byte $FC, $04, $FC, $FC, $05, $00, $23, $C9 - .byte $06, $0C, $07, $55, $55, $0D, $03, $23 + .byte $FC, $04, $FC, $FC, $05, $00, $23, $C9 ; CPU:$D711 PRG:1711 FC 04 FC FC + .byte $06, $0C, $07, $55, $55, $0D, $03, $23 ; CPU:$D719 PRG:1719 06 0C 07 55 ; $D721 - .byte $DA, $44, $50, $23, $DE, $01, $10, $23 - .byte $E2, $05, $55, $55, $99, $AA, $22, $23 + .byte $DA, $44, $50, $23, $DE, $01, $10, $23 ; CPU:$D721 PRG:1721 DA 44 50 23 + .byte $E2, $05, $55, $55, $99, $AA, $22, $23 ; CPU:$D729 PRG:1729 E2 05 55 55 ; $D731 - .byte $E9, $01, $C0, $23, $EA, $44, $F0, $23 - .byte $EE, $01, $30, $20, $87, $02, $52, $54 + .byte $E9, $01, $C0, $23, $EA, $44, $F0, $23 ; CPU:$D731 PRG:1731 E9 01 C0 23 + .byte $EE, $01, $30, $20, $87, $02, $52, $54 ; CPU:$D739 PRG:1739 EE 01 30 20 ; $D741 - .byte $20, $97, $02, $52, $54, $20, $A4, $05 - .byte $26, $26, $FC, $53, $55, $20, $B7, $05 + .byte $20, $97, $02, $52, $54, $20, $A4, $05 ; CPU:$D741 PRG:1741 20 97 02 52 + .byte $26, $26, $FC, $53, $55, $20, $B7, $05 ; CPU:$D749 PRG:1749 26 26 FC 53 ; $D751 - .byte $53, $55, $FC, $26, $26, $20, $8B, $09 - .byte $0C, $11, $0A, $15, $15, $0E, $17, $10 + .byte $53, $55, $FC, $26, $26, $20, $8B, $09 ; CPU:$D751 PRG:1751 53 55 FC 26 + .byte $0C, $11, $0A, $15, $15, $0E, $17, $10 ; CPU:$D759 PRG:1759 0C 11 0A 15 ; $D761 - .byte $0E, $20, $AE, $04, $1B, $0A, $0C, $0E - .byte $21, $E8, $09, $0B, $0E, $1C, $1D, $FC + .byte $0E, $20, $AE, $04, $1B, $0A, $0C, $0E ; CPU:$D761 PRG:1761 0E 20 AE 04 + .byte $21, $E8, $09, $0B, $0E, $1C, $1D, $FC ; CPU:$D769 PRG:1769 21 E8 09 0B ; $D771 - .byte $1D, $12, $16, $0E, $22, $28, $09, $22 - .byte $18, $1E, $1B, $FC, $1D, $12, $16, $0E + .byte $1D, $12, $16, $0E, $22, $28, $09, $22 ; CPU:$D771 PRG:1771 1D 12 16 0E + .byte $18, $1E, $1B, $FC, $1D, $12, $16, $0E ; CPU:$D779 PRG:1779 18 1E 1B FC ; $D781 - .byte $22, $68, $07, $1B, $0A, $17, $14, $12 - .byte $17, $10, $21, $2F, $01, $42, $21, $4E + .byte $22, $68, $07, $1B, $0A, $17, $14, $12 ; CPU:$D781 PRG:1781 22 68 07 1B + .byte $17, $10, $21, $2F, $01, $42, $21, $4E ; CPU:$D789 PRG:1789 17 10 21 2F ; $D791 - .byte $03, $43, $44, $45, $00, $23, $CA, $04 - .byte $40, $50, $50, $10, $23, $D3, $42, $AA + .byte $03, $43, $44, $45, $00, $23, $CA, $04 ; CPU:$D791 PRG:1791 03 43 44 45 + .byte $40, $50, $50, $10, $23, $D3, $42, $AA ; CPU:$D799 PRG:1799 40 50 50 10 ; $D7A1 - .byte $23, $DB, $02, $AA, $22, $23, $E2, $43 - .byte $55, $23, $EA, $43, $55, $20, $E6, $43 + .byte $23, $DB, $02, $AA, $22, $23, $E2, $43 ; CPU:$D7A1 PRG:17A1 23 DB 02 AA + .byte $55, $23, $EA, $43, $55, $20, $E6, $43 ; CPU:$D7A9 PRG:17A9 55 23 EA 43 ; $D7B1 - .byte $26, $20, $F7, $43, $26, $20, $EB, $0A - .byte $0E, $21, $0C, $12, $1D, $0E, $0B, $12 + .byte $26, $20, $F7, $43, $26, $20, $EB, $0A ; CPU:$D7B1 PRG:17B1 26 20 F7 43 + .byte $0E, $21, $0C, $12, $1D, $0E, $0B, $12 ; CPU:$D7B9 PRG:17B9 0E 21 0C 12 ; $D7C1 - .byte $14, $0E, $21, $8C, $07, $FC, $1D, $1B - .byte $0A, $0C, $14, $FC, $21, $6E, $03, $ED + .byte $14, $0E, $21, $8C, $07, $FC, $1D, $1B ; CPU:$D7C1 PRG:17C1 14 0E 21 8C + .byte $0A, $0C, $14, $FC, $21, $6E, $03, $ED ; CPU:$D7C9 PRG:17C9 0A 0C 14 FC ; $D7D1 - .byte $FC, $F0, $21, $AE, $03, $EE, $EF, $F1 - .byte $22, $2B, $09, $0B, $0E, $1C, $1D, $FC + .byte $FC, $F0, $21, $AE, $03, $EE, $EF, $F1 ; CPU:$D7D1 PRG:17D1 FC F0 21 AE + .byte $22, $2B, $09, $0B, $0E, $1C, $1D, $FC ; CPU:$D7D9 PRG:17D9 22 2B 09 0B ; $D7E1 - .byte $1D, $12, $16, $0E, $22, $6B, $83, $B5 - .byte $B0, $B2, $22, $73, $83, $B6, $B1, $B4 + .byte $1D, $12, $16, $0E, $22, $6B, $83, $B5 ; CPU:$D7E1 PRG:17E1 1D 12 16 0E + .byte $B0, $B2, $22, $73, $83, $B6, $B1, $B4 ; CPU:$D7E9 PRG:17E9 B0 B2 22 73 ; $D7F1 - .byte $22, $6C, $47, $B7, $22, $AC, $47, $B3 - .byte $00, $23, $CB, $4B, $55, $23, $DB, $42 + .byte $22, $6C, $47, $B7, $22, $AC, $47, $B3 ; CPU:$D7F1 PRG:17F1 22 6C 47 B7 + .byte $00, $23, $CB, $4B, $55, $23, $DB, $42 ; CPU:$D7F9 PRG:17F9 00 23 CB 4B ; $D801 - .byte $F0, $23, $E3, $01, $FF, $23, $EB, $01 - .byte $FF, $23, $F3, $42, $0F, $20, $CC, $0B + .byte $F0, $23, $E3, $01, $FF, $23, $EB, $01 ; CPU:$D801 PRG:1801 F0 23 E3 01 + .byte $FF, $23, $F3, $42, $0F, $20, $CC, $0B ; CPU:$D809 PRG:1809 FF 23 F3 42 ; $D811 - .byte $19, $15, $0A, $22, $FC, $16, $18, $0D - .byte $0E, $FC, $0A, $21, $2C, $0B, $19, $15 + .byte $19, $15, $0A, $22, $FC, $16, $18, $0D ; CPU:$D811 PRG:1811 19 15 0A 22 + .byte $0E, $FC, $0A, $21, $2C, $0B, $19, $15 ; CPU:$D819 PRG:1819 0E FC 0A 21 ; $D821 - .byte $0A, $22, $FC, $16, $18, $0D, $0E, $FC - .byte $0B, $21, $EC, $06, $0D, $0E, $1C, $12 + .byte $0A, $22, $FC, $16, $18, $0D, $0E, $FC ; CPU:$D821 PRG:1821 0A 22 FC 16 + .byte $0B, $21, $EC, $06, $0D, $0E, $1C, $12 ; CPU:$D829 PRG:1829 0B 21 EC 06 ; $D831 - .byte $10, $17, $22, $4C, $04, $1C, $0A, $1F - .byte $0E, $22, $AC, $04, $15, $18, $0A, $0D + .byte $10, $17, $22, $4C, $04, $1C, $0A, $1F ; CPU:$D831 PRG:1831 10 17 22 4C + .byte $0E, $22, $AC, $04, $15, $18, $0A, $0D ; CPU:$D839 PRG:1839 0E 22 AC 04 ; $D841 - .byte $23, $0C, $05, $1B, $0E, $1C, $0E, $1D - .byte $00, $23, $23, $18, $0A, $0B, $0C, $0D + .byte $23, $0C, $05, $1B, $0E, $1C, $0E, $1D ; CPU:$D841 PRG:1841 23 0C 05 1B + .byte $00, $23, $23, $18, $0A, $0B, $0C, $0D ; CPU:$D849 PRG:1849 00 23 23 18 ; $D851 - .byte $0E, $0F, $10, $11, $12, $13, $14, $15 - .byte $16, $17, $18, $19, $1A, $1B, $1C, $FE + .byte $0E, $0F, $10, $11, $12, $13, $14, $15 ; CPU:$D851 PRG:1851 0E 0F 10 11 + .byte $16, $17, $18, $19, $1A, $1B, $1C, $FE ; CPU:$D859 PRG:1859 16 17 18 19 ; $D861 - .byte $B8, $FE, $24, $25, $00, $FF, $FF, $34 - .byte $34, $18, $34, $03, $02, $03, $02, $09 + .byte $B8, $FE, $24, $25, $00, $FF, $FF, $34 ; CPU:$D861 PRG:1861 B8 FE 24 25 + .byte $34, $18, $34, $03, $02, $03, $02, $09 ; CPU:$D869 PRG:1869 34 18 34 03 ; $D871 - .byte $06, $08, $0F, $03, $02, $02, $02, $08 - .byte $05, $07, $0F, $0C, $09, $0A, $07, $0C + .byte $06, $08, $0F, $03, $02, $02, $02, $08 ; CPU:$D871 PRG:1871 06 08 0F 03 + .byte $05, $07, $0F, $0C, $09, $0A, $07, $0C ; CPU:$D879 PRG:1879 05 07 0F 0C ; $D881 - .byte $0C, $0C, $00, $0C, $0A, $0B, $08, $0C - .byte $0C, $0C, $06, $03, $04, $02, $0B, $08 + .byte $0C, $0C, $00, $0C, $0A, $0B, $08, $0C ; CPU:$D881 PRG:1881 0C 0C 00 0C + .byte $0C, $0C, $06, $03, $04, $02, $0B, $08 ; CPU:$D889 PRG:1889 0C 0C 06 03 ; $D891 - .byte $09, $58, $60, $69, $71, $79, $80, $0A - .byte $18, $20, $28, $30, $38, $40, $48, $50 + .byte $09, $58, $60, $69, $71, $79, $80, $0A ; CPU:$D891 PRG:1891 09 58 60 69 + .byte $18, $20, $28, $30, $38, $40, $48, $50 ; CPU:$D899 PRG:1899 18 20 28 30 ; $D8A1 - .byte $50, $97, $90, $89, $11, $A6, $9F, $B3 - .byte $01, $00, $02, $02, $03, $00, $09, $08 + .byte $50, $97, $90, $89, $11, $A6, $9F, $B3 ; CPU:$D8A1 PRG:18A1 50 97 90 89 + .byte $01, $00, $02, $02, $03, $00, $09, $08 ; CPU:$D8A9 PRG:18A9 01 00 02 02 ; $D8B1 - .byte $08, $10, $10, $10, $02, $10, $10, $10 - .byte $01, $09, $09, $09, $01, $09, $03, $04 + .byte $08, $10, $10, $10, $02, $10, $10, $10 ; CPU:$D8B1 PRG:18B1 08 10 10 10 + .byte $01, $09, $09, $09, $01, $09, $03, $04 ; CPU:$D8B9 PRG:18B9 01 09 09 09 ; $D8C1 - .byte $28, $4C, $70, $39, $01, $01, $01, $07 - .byte $00, $01, $01, $02, $00, $11, $22, $33 + .byte $28, $4C, $70, $39, $01, $01, $01, $07 ; CPU:$D8C1 PRG:18C1 28 4C 70 39 + .byte $00, $01, $01, $02, $00, $11, $22, $33 ; CPU:$D8C9 PRG:18C9 00 01 01 02 ; $D8D1 - .byte $44, $66, $88, $AA, $02, $01, $01, $0E - .byte $1A, $26, $32, $00, $0C, $18, $A0, $40 + .byte $44, $66, $88, $AA, $02, $01, $01, $0E ; CPU:$D8D1 PRG:18D1 44 66 88 AA + .byte $1A, $26, $32, $00, $0C, $18, $A0, $40 ; CPU:$D8D9 PRG:18D9 1A 26 32 00 ; $D8E1 - .byte $40, $ED, $21, $21, $E2, $E8, $9E, $A6 - .byte $92, $9A, $86, $8E, $7A, $82, $E6, $AF + .byte $40, $ED, $21, $21, $E2, $E8, $9E, $A6 ; CPU:$D8E1 PRG:18E1 40 ED 21 21 + .byte $92, $9A, $86, $8E, $7A, $82, $E6, $AF ; CPU:$D8E9 PRG:18E9 92 9A 86 8E ; $D8F1 - .byte $E0, $E2, $CF, $D3, $D7, $CF, $3F, $0F - .byte $07, $07, $08, $20, $11, $11, $23, $33 + .byte $E0, $E2, $CF, $D3, $D7, $CF, $3F, $0F ; CPU:$D8F1 PRG:18F1 E0 E2 CF D3 + .byte $07, $07, $08, $20, $11, $11, $23, $33 ; CPU:$D8F9 PRG:18F9 07 07 08 20 ; $D901 - .byte $53, $83, $D3, $F6, $D9, $D9, $D9, $D9 - .byte $D9, $D9, $BF, $C3, $C6, $08, $0A, $0F + .byte $53, $83, $D3, $F6, $D9, $D9, $D9, $D9 ; CPU:$D901 PRG:1901 53 83 D3 F6 + .byte $D9, $D9, $BF, $C3, $C6, $08, $0A, $0F ; CPU:$D909 PRG:1909 D9 D9 BF C3 ; $D911-$D917 - .byte $14, $18, $08, $14, $20, $2C, $38 + .byte $14, $18, $08, $14, $20, $2C, $38 ; CPU:$D911 PRG:1911 14 18 08 14 ; $D918-$D923 UpdateFourObjects: - ldx #$03 + ldx #$03 ; CPU:$D918 PRG:1918 A2 03 @loop: - jsr DispatchSlotState - jsr UpdateSlotDerivedPosition - dex - bpl @loop + jsr DispatchSlotState ; CPU:$D91A PRG:191A 20 24 D9 + jsr UpdateSlotDerivedPosition ; CPU:$D91D PRG:191D 20 15 DA + dex ; CPU:$D920 PRG:1920 CA + bpl @loop ; CPU:$D921 PRG:1921 10 F7 - rts + rts ; CPU:$D923 PRG:1923 60 ; --------------------------------------------------------------------------- @@ -5446,15 +5445,15 @@ UpdateFourObjects: ; --------------------------------------------------------------------------- DispatchSlotState: - ldy $9C,x + ldy $9C,x ; CPU:$D924 PRG:1924 B4 9C - lda $D8FF,y - sta $00 + lda $D8FF,y ; CPU:$D926 PRG:1926 B9 FF D8 + sta $00 ; CPU:$D929 PRG:1929 85 00 - lda $D905,y - sta $01 + lda $D905,y ; CPU:$D92B PRG:192B B9 05 D9 + sta $01 ; CPU:$D92E PRG:192E 85 01 - jmp ($0000) + jmp ($0000) ; CPU:$D930 PRG:1930 6C 00 00 @@ -5464,31 +5463,31 @@ DispatchSlotState: ; --------------------------------------------------------------------------- SlotStateHandlerD933: - lda $0370,x - beq @advance_state + lda $0370,x ; CPU:$D933 PRG:1933 BD 70 03 + beq @advance_state ; CPU:$D936 PRG:1936 F0 16 - lda $3F - lsr a - bcs @return + lda $3F ; CPU:$D938 PRG:1938 A5 3F + lsr a ; CPU:$D93A PRG:193A 4A + bcs @return ; CPU:$D93B PRG:193B B0 15 - inc $0390,x + inc $0390,x ; CPU:$D93D PRG:193D FE 90 03 - ldy $03E4,x + ldy $03E4,x ; CPU:$D940 PRG:1940 BC E4 03 - lda $80,x - clc - adc $D90E,y - cmp $0390,x - bcs @return + lda $80,x ; CPU:$D943 PRG:1943 B5 80 + clc ; CPU:$D945 PRG:1945 18 + adc $D90E,y ; CPU:$D946 PRG:1946 79 0E D9 + cmp $0390,x ; CPU:$D949 PRG:1949 DD 90 03 + bcs @return ; CPU:$D94C PRG:194C B0 04 @advance_state: - inc $9C,x + inc $9C,x ; CPU:$D94E PRG:194E F6 9C ; Original D950: D0 2C = BNE $D97E. - bne SlotStateTailD97E + bne SlotStateTailD97E ; CPU:$D950 PRG:1950 D0 2C @return: - rts + rts ; CPU:$D952 PRG:1952 60 ; --------------------------------------------------------------------------- @@ -5496,29 +5495,29 @@ SlotStateHandlerD933: ; --------------------------------------------------------------------------- SlotStateHandlerD953: - txa - tay - beq @compare + txa ; CPU:$D953 PRG:1953 8A + tay ; CPU:$D954 PRG:1954 A8 + beq @compare ; CPU:$D955 PRG:1955 F0 06 - lda $BC,x - beq @compare + lda $BC,x ; CPU:$D957 PRG:1957 B5 BC + beq @compare ; CPU:$D959 PRG:1959 F0 02 - ldy #$04 + ldy #$04 ; CPU:$D95B PRG:195B A0 04 @compare: - lda $B8,x - cmp $D8C4,y - beq SlotStateResetD96E + lda $B8,x ; CPU:$D95D PRG:195D B5 B8 + cmp $D8C4,y ; CPU:$D95F PRG:195F D9 C4 D8 + beq SlotStateResetD96E ; CPU:$D962 PRG:1962 F0 0A - ldy #$01 - bcc @store_direction + ldy #$01 ; CPU:$D964 PRG:1964 A0 01 + bcc @store_direction ; CPU:$D966 PRG:1966 90 02 - ldy #$FF + ldy #$FF ; CPU:$D968 PRG:1968 A0 FF @store_direction: - tya - sta $DC,x - rts + tya ; CPU:$D96A PRG:196A 98 + sta $DC,x ; CPU:$D96B PRG:196B 95 DC + rts ; CPU:$D96D PRG:196D 60 ; --------------------------------------------------------------------------- @@ -5526,19 +5525,19 @@ SlotStateHandlerD953: ; --------------------------------------------------------------------------- SlotStateResetD96E: - lda #$00 + lda #$00 ; CPU:$D96E PRG:196E A9 00 SlotStateAdvanceD970: - sta $0398,x - sta $DC,x + sta $0398,x ; CPU:$D970 PRG:1970 9D 98 03 + sta $DC,x ; CPU:$D973 PRG:1973 95 DC - inc $9C,x + inc $9C,x ; CPU:$D975 PRG:1975 F6 9C - txa - bne SlotStateTailD97E + txa ; CPU:$D977 PRG:1977 8A + bne SlotStateTailD97E ; CPU:$D978 PRG:1978 D0 04 - lda #$02 - sta $FD + lda #$02 ; CPU:$D97A PRG:197A A9 02 + sta $FD ; CPU:$D97C PRG:197C 85 FD ; --------------------------------------------------------------------------- ; $D97E-$D982: shared tail. @@ -5546,9 +5545,9 @@ SlotStateAdvanceD970: ; --------------------------------------------------------------------------- SlotStateTailD97E: - lda #$08 - sta $2A,x - rts + lda #$08 ; CPU:$D97E PRG:197E A9 08 + sta $2A,x ; CPU:$D980 PRG:1980 95 2A + rts ; CPU:$D982 PRG:1982 60 ; --------------------------------------------------------------------------- ; $D983-$D9D2: per-slot state handler. @@ -5556,106 +5555,106 @@ SlotStateTailD97E: ; --------------------------------------------------------------------------- SlotStateHandlerD983: - lda $0370,x - beq @advance_state + lda $0370,x ; CPU:$D983 PRG:1983 BD 70 03 + beq @advance_state ; CPU:$D986 PRG:1986 F0 38 - lda $2A,x - bne @return + lda $2A,x ; CPU:$D988 PRG:1988 B5 2A + bne @return ; CPU:$D98A PRG:198A D0 46 - txa - ora $03F7 - bne @update_timing + txa ; CPU:$D98C PRG:198C 8A + ora $03F7 ; CPU:$D98D PRG:198D 0D F7 03 + bne @update_timing ; CPU:$D990 PRG:1990 D0 0F - ldy $49 + ldy $49 ; CPU:$D992 PRG:1992 A4 49 - lda $14 - and #$C0 - beq @store_49 + lda $14 ; CPU:$D994 PRG:1994 A5 14 + and #$C0 ; CPU:$D996 PRG:1996 29 C0 + beq @store_49 ; CPU:$D998 PRG:1998 F0 05 - sta $49 - tya - beq @decrement_position + sta $49 ; CPU:$D99A PRG:199A 85 49 + tya ; CPU:$D99C PRG:199C 98 + beq @decrement_position ; CPU:$D99D PRG:199D F0 08 @store_49: - sta $49 + sta $49 ; CPU:$D99F PRG:199F 85 49 @update_timing: - lda $3F - and #$0F - bne @skip_decrement + lda $3F ; CPU:$D9A1 PRG:19A1 A5 3F + and #$0F ; CPU:$D9A3 PRG:19A3 29 0F + bne @skip_decrement ; CPU:$D9A5 PRG:19A5 D0 03 @decrement_position: - dec $0390,x + dec $0390,x ; CPU:$D9A7 PRG:19A7 DE 90 03 @skip_decrement: - and #$07 - bne @check_position + and #$07 ; CPU:$D9AA PRG:19AA 29 07 + bne @check_position ; CPU:$D9AC PRG:19AC D0 08 - lda $0398,x - eor #$01 - sta $0398,x + lda $0398,x ; CPU:$D9AE PRG:19AE BD 98 03 + eor #$01 ; CPU:$D9B1 PRG:19B1 49 01 + sta $0398,x ; CPU:$D9B3 PRG:19B3 9D 98 03 @check_position: - lda $0390,x - sec - sbc #$08 - cmp $80,x - bcs @return + lda $0390,x ; CPU:$D9B6 PRG:19B6 BD 90 03 + sec ; CPU:$D9B9 PRG:19B9 38 + sbc #$08 ; CPU:$D9BA PRG:19BA E9 08 + cmp $80,x ; CPU:$D9BC PRG:19BC D5 80 + bcs @return ; CPU:$D9BE PRG:19BE B0 12 @advance_state: - lda #$03 - sta $36,x + lda #$03 ; CPU:$D9C0 PRG:19C0 A9 03 + sta $36,x ; CPU:$D9C2 PRG:19C2 95 36 - inc $9C,x + inc $9C,x ; CPU:$D9C4 PRG:19C4 F6 9C - lda #$00 - cpx #$03 - bne @return + lda #$00 ; CPU:$D9C6 PRG:19C6 A9 00 + cpx #$03 ; CPU:$D9C8 PRG:19C8 E0 03 + bne @return ; CPU:$D9CA PRG:19CA D0 06 - sta $03A8 - sta $0373 + sta $03A8 ; CPU:$D9CC PRG:19CC 8D A8 03 + sta $0373 ; CPU:$D9CF PRG:19CF 8D 73 03 @return: - rts + rts ; CPU:$D9D2 PRG:19D2 60 ; --------------------------------------------------------------------------- ; $D9D3-$D9F5: per-slot state handler. ; --------------------------------------------------------------------------- SlotStateHandlerD9D3: - lda $36,x - bne @return + lda $36,x ; CPU:$D9D3 PRG:19D3 B5 36 + bne @return ; CPU:$D9D5 PRG:19D5 D0 1E - txa - bne @nonzero_slot + txa ; CPU:$D9D7 PRG:19D7 8A + bne @nonzero_slot ; CPU:$D9D8 PRG:19D8 D0 0D - lda $03E0 + lda $03E0 ; CPU:$D9DA PRG:19DA AD E0 03 ; Original D9DD: D0 31 = BNE $DA10 ; .byte $D0, $31 - bne SlotResetStateDA10 + bne SlotResetStateDA10 ; CPU:$D9DD PRG:19DD D0 31 - lda $03F7 - beq @advance_state + lda $03F7 ; CPU:$D9DF PRG:19DF AD F7 03 + beq @advance_state ; CPU:$D9E2 PRG:19E2 F0 0F - jmp $CA85 + jmp $CA85 ; CPU:$D9E4 PRG:19E4 4C 85 CA @nonzero_slot: - lda $22 - bne @return + lda $22 ; CPU:$D9E7 PRG:19E7 A5 22 + bne @return ; CPU:$D9E9 PRG:19E9 D0 0A - lda #$01 - sta $DC,x + lda #$01 ; CPU:$D9EB PRG:19EB A9 01 + sta $DC,x ; CPU:$D9ED PRG:19ED 95 DC - lda #$18 - sta $22 + lda #$18 ; CPU:$D9EF PRG:19EF A9 18 + sta $22 ; CPU:$D9F1 PRG:19F1 85 22 @advance_state: - inc $9C,x + inc $9C,x ; CPU:$D9F3 PRG:19F3 F6 9C @return: - rts + rts ; CPU:$D9F5 PRG:19F5 60 ; --------------------------------------------------------------------------- ; $D9F6-$DA14: per-slot state/direction handler. @@ -5666,38 +5665,38 @@ SlotStateHandlerD9D3: ; --------------------------------------------------------------------------- SlotStateHandlerD9F6: - lda $94,x - ora $DC,x - bne SlotSetDirectionDA03 + lda $94,x ; CPU:$D9F6 PRG:19F6 B5 94 + ora $DC,x ; CPU:$D9F8 PRG:19F8 15 DC + bne SlotSetDirectionDA03 ; CPU:$D9FA PRG:19FA D0 07 - lda $B8,x - cmp $D8C4,x - beq SlotStateReturnDA14 + lda $B8,x ; CPU:$D9FC PRG:19FC B5 B8 + cmp $D8C4,x ; CPU:$D9FE PRG:19FE DD C4 D8 + beq SlotStateReturnDA14 ; CPU:$DA01 PRG:1A01 F0 11 ; $DA03 SlotSetDirectionDA03: - lda #$01 - sta $DC,x + lda #$01 ; CPU:$DA03 PRG:1A03 A9 01 + sta $DC,x ; CPU:$DA05 PRG:1A05 95 DC - txa - beq SlotResetStateDA10 + txa ; CPU:$DA07 PRG:1A07 8A + beq SlotResetStateDA10 ; CPU:$DA08 PRG:1A08 F0 06 - lda $B8,x - cmp #$08 - bcc SlotStateReturnDA14 + lda $B8,x ; CPU:$DA0A PRG:1A0A B5 B8 + cmp #$08 ; CPU:$DA0C PRG:1A0C C9 08 + bcc SlotStateReturnDA14 ; CPU:$DA0E PRG:1A0E 90 04 ; $DA10 ; Shared entry from the preceding $D9D3 handler. SlotResetStateDA10: - lda #$00 - sta $9C,x + lda #$00 ; CPU:$DA10 PRG:1A10 A9 00 + sta $9C,x ; CPU:$DA12 PRG:1A12 95 9C ; $DA14 SlotStateReturnDA14: - rts + rts ; CPU:$DA14 PRG:1A14 60 ; --------------------------------------------------------------------------- ; $DA15-$DA25: calculate per-slot derived position. @@ -5705,54 +5704,54 @@ SlotStateReturnDA14: ; --------------------------------------------------------------------------- UpdateSlotDerivedPosition: - lda $0390,x - sec - sbc $80,x - sbc #$08 - asl a + lda $0390,x ; CPU:$DA15 PRG:1A15 BD 90 03 + sec ; CPU:$DA18 PRG:1A18 38 + sbc $80,x ; CPU:$DA19 PRG:1A19 F5 80 + sbc #$08 ; CPU:$DA1B PRG:1A1B E9 08 + asl a ; CPU:$DA1D PRG:1A1D 0A - clc - adc $B8,x - adc #$04 + clc ; CPU:$DA1E PRG:1A1E 18 + adc $B8,x ; CPU:$DA1F PRG:1A1F 75 B8 + adc #$04 ; CPU:$DA21 PRG:1A21 69 04 - sta $6C,x - rts + sta $6C,x ; CPU:$DA23 PRG:1A23 95 6C + rts ; CPU:$DA25 PRG:1A25 60 ; --------------------------------------------------------------------------- ; $DA26-$DA69: update four runtime slots and dispatch optional follow-up. ; --------------------------------------------------------------------------- UpdateRuntimeSlots: - lda $4F - beq RuntimeSlotsReturnDA69 + lda $4F ; CPU:$DA26 PRG:1A26 A5 4F + beq RuntimeSlotsReturnDA69 ; CPU:$DA28 PRG:1A28 F0 3F - ldx #$03 + ldx #$03 ; CPU:$DA2A PRG:1A2A A2 03 @slot_loop: - jsr UpdateSlotPosition - jsr UpdateSlotDC1A - jsr UpdateSlotState - jsr UpdateSlot0374 + jsr UpdateSlotPosition ; CPU:$DA2C PRG:1A2C 20 58 DA + jsr UpdateSlotDC1A ; CPU:$DA2F PRG:1A2F 20 1A DC + jsr UpdateSlotState ; CPU:$DA32 PRG:1A32 20 F2 DC + jsr UpdateSlot0374 ; CPU:$DA35 PRG:1A35 20 DE DC - dex - bpl @slot_loop + dex ; CPU:$DA38 PRG:1A38 CA + bpl @slot_loop ; CPU:$DA39 PRG:1A39 10 F1 - jsr UpdateAccumulator - jsr UpdateSlotPositions - jsr UpdateGlobalPosition + jsr UpdateAccumulator ; CPU:$DA3B PRG:1A3B 20 6A DA + jsr UpdateSlotPositions ; CPU:$DA3E PRG:1A3E 20 7A DA + jsr UpdateGlobalPosition ; CPU:$DA41 PRG:1A41 20 FE DB - lda $3C - bne RuntimeSlotsReturnDA69 + lda $3C ; CPU:$DA44 PRG:1A44 A5 3C + bne RuntimeSlotsReturnDA69 ; CPU:$DA46 PRG:1A46 D0 21 - ldy $03BC + ldy $03BC ; CPU:$DA48 PRG:1A48 AC BC 03 - lda $D8EF,y - sta $00 + lda $D8EF,y ; CPU:$DA4B PRG:1A4B B9 EF D8 + sta $00 ; CPU:$DA4E PRG:1A4E 85 00 - lda $D8F1,y - sta $01 + lda $D8F1,y ; CPU:$DA50 PRG:1A50 B9 F1 D8 + sta $01 ; CPU:$DA53 PRG:1A53 85 01 - jmp ($0000) + jmp ($0000) ; CPU:$DA55 PRG:1A55 6C 00 00 ; --------------------------------------------------------------------------- @@ -5761,77 +5760,77 @@ UpdateRuntimeSlots: ; --------------------------------------------------------------------------- UpdateSlotPosition: - lda $94,x - sta $60,x + lda $94,x ; CPU:$DA58 PRG:1A58 B5 94 + sta $60,x ; CPU:$DA5A PRG:1A5A 95 60 - lda $90,x - clc - adc $0394,x - sta $0394,x - bcc RuntimeSlotsReturnDA69 + lda $90,x ; CPU:$DA5C PRG:1A5C B5 90 + clc ; CPU:$DA5E PRG:1A5E 18 + adc $0394,x ; CPU:$DA5F PRG:1A5F 7D 94 03 + sta $0394,x ; CPU:$DA62 PRG:1A62 9D 94 03 + bcc RuntimeSlotsReturnDA69 ; CPU:$DA65 PRG:1A65 90 02 - inc $60,x + inc $60,x ; CPU:$DA67 PRG:1A67 F6 60 ; $DA69 RuntimeSlotsReturnDA69: - rts + rts ; CPU:$DA69 PRG:1A69 60 ; --------------------------------------------------------------------------- ; $DA6A-$DA79: accumulate $60 into $12 and toggle $4D on carry. ; --------------------------------------------------------------------------- UpdateAccumulator: - lda $12 - clc - adc $60 - sta $12 - bcc @return + lda $12 ; CPU:$DA6A PRG:1A6A A5 12 + clc ; CPU:$DA6C PRG:1A6C 18 + adc $60 ; CPU:$DA6D PRG:1A6D 65 60 + sta $12 ; CPU:$DA6F PRG:1A6F 85 12 + bcc @return ; CPU:$DA71 PRG:1A71 90 06 - lda $4D - eor #$01 - sta $4D + lda $4D ; CPU:$DA73 PRG:1A73 A5 4D + eor #$01 ; CPU:$DA75 PRG:1A75 49 01 + sta $4D ; CPU:$DA77 PRG:1A77 85 4D @return: - rts + rts ; CPU:$DA79 PRG:1A79 60 ; --------------------------------------------------------------------------- ; $DA7A-$DA9E: update active slot positions using slot-0 delta in $60. ; --------------------------------------------------------------------------- UpdateSlotPositions: - ldx #$03 + ldx #$03 ; CPU:$DA7A PRG:1A7A A2 03 @slot_loop: - lda $A8,x - beq @next_slot + lda $A8,x ; CPU:$DA7C PRG:1A7C B5 A8 + beq @next_slot ; CPU:$DA7E PRG:1A7E F0 1B - lda $60,x - clc - adc $80,x - bcc @no_high_increment + lda $60,x ; CPU:$DA80 PRG:1A80 B5 60 + clc ; CPU:$DA82 PRG:1A82 18 + adc $80,x ; CPU:$DA83 PRG:1A83 75 80 + bcc @no_high_increment ; CPU:$DA85 PRG:1A85 90 02 - inc $84,x + inc $84,x ; CPU:$DA87 PRG:1A87 F6 84 @no_high_increment: - sec - sbc $60 - sta $80,x - bcs @no_high_decrement + sec ; CPU:$DA89 PRG:1A89 38 + sbc $60 ; CPU:$DA8A PRG:1A8A E5 60 + sta $80,x ; CPU:$DA8C PRG:1A8C 95 80 + bcs @no_high_decrement ; CPU:$DA8E PRG:1A8E B0 02 - dec $84,x + dec $84,x ; CPU:$DA90 PRG:1A90 D6 84 @no_high_decrement: - lda $0390,x - sec - sbc $60 - sta $0390,x + lda $0390,x ; CPU:$DA92 PRG:1A92 BD 90 03 + sec ; CPU:$DA95 PRG:1A95 38 + sbc $60 ; CPU:$DA96 PRG:1A96 E5 60 + sta $0390,x ; CPU:$DA98 PRG:1A98 9D 90 03 @next_slot: - dex - bne @slot_loop + dex ; CPU:$DA9B PRG:1A9B CA + bne @slot_loop ; CPU:$DA9C PRG:1A9C D0 DE - rts + rts ; CPU:$DA9E PRG:1A9E 60 ; --------------------------------------------------------------------------- ; $DA9F-$DAE2 @@ -5839,66 +5838,66 @@ UpdateSlotPositions: ; --------------------------------------------------------------------------- SlotSearchDA9F: - ldx #$03 + ldx #$03 ; CPU:$DA9F PRG:1A9F A2 03 - lda $3B - bne @next_outer + lda $3B ; CPU:$DAA1 PRG:1AA1 A5 3B + bne @next_outer ; CPU:$DAA3 PRG:1AA3 D0 3A @check_entry: - txa - eor $4C - ora $A8,x - ora $23 - ora $0373 - ora $03A8 - bne @next_outer + txa ; CPU:$DAA5 PRG:1AA5 8A + eor $4C ; CPU:$DAA6 PRG:1AA6 45 4C + ora $A8,x ; CPU:$DAA8 PRG:1AA8 15 A8 + ora $23 ; CPU:$DAAA PRG:1AAA 05 23 + ora $0373 ; CPU:$DAAC PRG:1AAC 0D 73 03 + ora $03A8 ; CPU:$DAAF PRG:1AAF 0D A8 03 + bne @next_outer ; CPU:$DAB2 PRG:1AB2 D0 2B - lda $18,x - cmp #$A0 - bcc @next_outer + lda $18,x ; CPU:$DAB4 PRG:1AB4 B5 18 + cmp #$A0 ; CPU:$DAB6 PRG:1AB6 C9 A0 + bcc @next_outer ; CPU:$DAB8 PRG:1AB8 90 25 - stx $00 + stx $00 ; CPU:$DABA PRG:1ABA 86 00 - and #$03 - tay - iny + and #$03 ; CPU:$DABC PRG:1ABC 29 03 + tay ; CPU:$DABE PRG:1ABE A8 + iny ; CPU:$DABF PRG:1ABF C8 - lda $94 - and #$02 - sta $84,x + lda $94 ; CPU:$DAC0 PRG:1AC0 A5 94 + and #$02 ; CPU:$DAC2 PRG:1AC2 29 02 + sta $84,x ; CPU:$DAC4 PRG:1AC4 95 84 - ldx #$03 + ldx #$03 ; CPU:$DAC6 PRG:1AC6 A2 03 @search_slots: - sty $01 + sty $01 ; CPU:$DAC8 PRG:1AC8 84 01 - lda $70,x - cmp $01 - bne @next_slot + lda $70,x ; CPU:$DACA PRG:1ACA B5 70 + cmp $01 ; CPU:$DACC PRG:1ACC C5 01 + bne @next_slot ; CPU:$DACE PRG:1ACE D0 07 - iny - cpy #$05 - bcc @next_slot + iny ; CPU:$DAD0 PRG:1AD0 C8 + cpy #$05 ; CPU:$DAD1 PRG:1AD1 C0 05 + bcc @next_slot ; CPU:$DAD3 PRG:1AD3 90 02 - ldy #$01 + ldy #$01 ; CPU:$DAD5 PRG:1AD5 A0 01 @next_slot: - dex - bne @search_slots + dex ; CPU:$DAD7 PRG:1AD7 CA + bne @search_slots ; CPU:$DAD8 PRG:1AD8 D0 EE - ldx $00 - jsr InitializeSlot + ldx $00 ; CPU:$DADA PRG:1ADA A6 00 + jsr InitializeSlot ; CPU:$DADC PRG:1ADC 20 E3 DA ; $DADF @next_outer: - dex - bne @check_entry + dex ; CPU:$DADF PRG:1ADF CA + bne @check_entry ; CPU:$DAE0 PRG:1AE0 D0 C3 - rts + rts ; CPU:$DAE2 PRG:1AE2 60 ; --------------------------------------------------------------------------- ; $DAE3-$DB4A: initialize/update the current slot. @@ -5906,86 +5905,86 @@ SlotSearchDA9F: ; --------------------------------------------------------------------------- InitializeSlot: - jsr ResetSlotState + jsr ResetSlotState ; CPU:$DAE3 PRG:1AE3 20 95 DB - dey - lda $D8D8,y - sta $B8,x + dey ; CPU:$DAE6 PRG:1AE6 88 + lda $D8D8,y ; CPU:$DAE7 PRG:1AE7 B9 D8 D8 + sta $B8,x ; CPU:$DAEA PRG:1AEA 95 B8 - ldy $84,x - lda $D8DF,y - sta $80,x + ldy $84,x ; CPU:$DAEC PRG:1AEC B4 84 + lda $D8DF,y ; CPU:$DAEE PRG:1AEE B9 DF D8 + sta $80,x ; CPU:$DAF1 PRG:1AF1 95 80 - lda #$06 - sta $AC,x + lda #$06 ; CPU:$DAF3 PRG:1AF3 A9 06 + sta $AC,x ; CPU:$DAF5 PRG:1AF5 95 AC - lda $E0 - clc - adc $D8E2,y - and #$3F - sta $E0,x + lda $E0 ; CPU:$DAF7 PRG:1AF7 A5 E0 + clc ; CPU:$DAF9 PRG:1AF9 18 + adc $D8E2,y ; CPU:$DAFA PRG:1AFA 79 E2 D8 + and #$3F ; CPU:$DAFD PRG:1AFD 29 3F + sta $E0,x ; CPU:$DAFF PRG:1AFF 95 E0 - lda $64 - sta $64,x + lda $64 ; CPU:$DB01 PRG:1B01 A5 64 + sta $64,x ; CPU:$DB03 PRG:1B03 95 64 - tya - beq @configure_slot + tya ; CPU:$DB05 PRG:1B05 98 + beq @configure_slot ; CPU:$DB06 PRG:1B06 F0 2C - ldy #$05 - jsr LoadIndexedValueE7FF - cmp #$E4 - beq @configure_slot + ldy #$05 ; CPU:$DB08 PRG:1B08 A0 05 + jsr LoadIndexedValueE7FF ; CPU:$DB0A PRG:1B0A 20 FF E7 + cmp #$E4 ; CPU:$DB0D PRG:1B0D C9 E4 + beq @configure_slot ; CPU:$DB0F PRG:1B0F F0 23 - cmp #$3B - bcc @return_zero + cmp #$3B ; CPU:$DB11 PRG:1B11 C9 3B + bcc @return_zero ; CPU:$DB13 PRG:1B13 90 38 - cmp #$93 - bcs @return_zero + cmp #$93 ; CPU:$DB15 PRG:1B15 C9 93 + bcs @return_zero ; CPU:$DB17 PRG:1B17 B0 34 - ldy #$02 - jsr LoadIndexedValueE7FF - cmp #$E6 - bne @configure_slot + ldy #$02 ; CPU:$DB19 PRG:1B19 A0 02 + jsr LoadIndexedValueE7FF ; CPU:$DB1B PRG:1B1B 20 FF E7 + cmp #$E6 ; CPU:$DB1E PRG:1B1E C9 E6 + bne @configure_slot ; CPU:$DB20 PRG:1B20 D0 12 - lda $B8,x - cmp #$20 - bcc @small_value + lda $B8,x ; CPU:$DB22 PRG:1B22 B5 B8 + cmp #$20 ; CPU:$DB24 PRG:1B24 C9 20 + bcc @small_value ; CPU:$DB26 PRG:1B26 90 08 - lda #$30 - sta $BC,x + lda #$30 ; CPU:$DB28 PRG:1B28 A9 30 + sta $BC,x ; CPU:$DB2A PRG:1B2A 95 BC - lda #$01 - bne @store_a4 + lda #$01 ; CPU:$DB2C PRG:1B2C A9 01 + bne @store_a4 ; CPU:$DB2E PRG:1B2E D0 02 @small_value: - lda #$03 + lda #$03 ; CPU:$DB30 PRG:1B30 A9 03 @store_a4: - sta RiderMotionState,x + sta RiderMotionState,x ; CPU:$DB32 PRG:1B32 95 A4 @configure_slot: - ldy $84,x - jsr ConfigureSlot + ldy $84,x ; CPU:$DB34 PRG:1B34 B4 84 + jsr ConfigureSlot ; CPU:$DB36 PRG:1B36 20 50 DB - lda $84,x - eor #$02 - asl a - sta $94,x + lda $84,x ; CPU:$DB39 PRG:1B39 B5 84 + eor #$02 ; CPU:$DB3B PRG:1B3B 49 02 + asl a ; CPU:$DB3D PRG:1B3D 0A + sta $94,x ; CPU:$DB3E PRG:1B3E 95 94 - lda #$20 - sta $039B,x + lda #$20 ; CPU:$DB40 PRG:1B40 A9 20 + sta $039B,x ; CPU:$DB42 PRG:1B42 9D 9B 03 - lsr a - sta $23 + lsr a ; CPU:$DB45 PRG:1B45 4A + sta $23 ; CPU:$DB46 PRG:1B46 85 23 - lda #$01 - sta $A8,x + lda #$01 ; CPU:$DB48 PRG:1B48 A9 01 + sta $A8,x ; CPU:$DB4A PRG:1B4A 95 A8 - rts + rts ; CPU:$DB4C PRG:1B4C 60 @return_zero: - lda #$00 - rts + lda #$00 ; CPU:$DB4D PRG:1B4D A9 00 + rts ; CPU:$DB4F PRG:1B4F 60 ; --------------------------------------------------------------------------- ; $DB50-$DB94: configure per-slot $74/$78 state. @@ -5994,76 +5993,76 @@ InitializeSlot: ; --------------------------------------------------------------------------- ConfigureSlot: - lda $52 - beq SlotConfigCheckIndexDB58 + lda $52 ; CPU:$DB50 PRG:1B50 A5 52 + beq SlotConfigCheckIndexDB58 ; CPU:$DB52 PRG:1B52 F0 04 - lda #$03 - bne SlotConfigStore78DB5F + lda #$03 ; CPU:$DB54 PRG:1B54 A9 03 + bne SlotConfigStore78DB5F ; CPU:$DB56 PRG:1B56 D0 07 SlotConfigCheckIndexDB58: - cpx #$03 - beq SlotConfigSpecialDB6C + cpx #$03 ; CPU:$DB58 PRG:1B58 E0 03 + beq SlotConfigSpecialDB6C ; CPU:$DB5A PRG:1B5A F0 10 ; $DB5C ; Shared internal entry used by several fallback paths. SlotConfigFromTableDB5C: - lda $D8D5,y + lda $D8D5,y ; CPU:$DB5C PRG:1B5C B9 D5 D8 ; $DB5F SlotConfigStore78DB5F: - sta $78,x + sta $78,x ; CPU:$DB5F PRG:1B5F 95 78 - lda $1B,x - and #$0F - tay + lda $1B,x ; CPU:$DB61 PRG:1B61 B5 1B + and #$0F ; CPU:$DB63 PRG:1B63 29 0F + tay ; CPU:$DB65 PRG:1B65 A8 - lda $D8CD,y - sta $74,x - rts + lda $D8CD,y ; CPU:$DB66 PRG:1B66 B9 CD D8 + sta $74,x ; CPU:$DB69 PRG:1B69 95 74 + rts ; CPU:$DB6B PRG:1B6B 60 ; $DB6C SlotConfigSpecialDB6C: - lda $84,x - lsr a - lsr a - bcs SlotConfigFromTableDB5C + lda $84,x ; CPU:$DB6C PRG:1B6C B5 84 + lsr a ; CPU:$DB6E PRG:1B6E 4A + lsr a ; CPU:$DB6F PRG:1B6F 4A + bcs SlotConfigFromTableDB5C ; CPU:$DB70 PRG:1B70 B0 EA - lda $94 - beq SlotConfigFromTableDB5C + lda $94 ; CPU:$DB72 PRG:1B72 A5 94 + beq SlotConfigFromTableDB5C ; CPU:$DB74 PRG:1B74 F0 E6 - sta $78,x + sta $78,x ; CPU:$DB76 PRG:1B76 95 78 - lda $90 - sta $74,x + lda $90 ; CPU:$DB78 PRG:1B78 A5 90 + sta $74,x ; CPU:$DB7A PRG:1B7A 95 74 - lda $84,x - beq SlotConfigIncrementCheckDB8C + lda $84,x ; CPU:$DB7C PRG:1B7C B5 84 + beq SlotConfigIncrementCheckDB8C ; CPU:$DB7E PRG:1B7E F0 0C - lda $80,x - cmp #$40 - bcs SlotConfigFromTableDB5C + lda $80,x ; CPU:$DB80 PRG:1B80 B5 80 + cmp #$40 ; CPU:$DB82 PRG:1B82 C9 40 + bcs SlotConfigFromTableDB5C ; CPU:$DB84 PRG:1B84 B0 D6 - lda $70 - cmp $73 - beq SlotConfigReturnDB94 + lda $70 ; CPU:$DB86 PRG:1B86 A5 70 + cmp $73 ; CPU:$DB88 PRG:1B88 C5 73 + beq SlotConfigReturnDB94 ; CPU:$DB8A PRG:1B8A F0 08 ; $DB8C SlotConfigIncrementCheckDB8C: - lda $78,x - cmp #$04 - bcs SlotConfigReturnDB94 + lda $78,x ; CPU:$DB8C PRG:1B8C B5 78 + cmp #$04 ; CPU:$DB8E PRG:1B8E C9 04 + bcs SlotConfigReturnDB94 ; CPU:$DB90 PRG:1B90 B0 02 - inc $78,x + inc $78,x ; CPU:$DB92 PRG:1B92 F6 78 ; $DB94 SlotConfigReturnDB94: - rts + rts ; CPU:$DB94 PRG:1B94 60 ; --------------------------------------------------------------------------- ; $DB95-$DBC3: clear/reset per-slot runtime state. @@ -6071,231 +6070,231 @@ SlotConfigReturnDB94: ; --------------------------------------------------------------------------- ResetSlotState: - lda #$00 + lda #$00 ; CPU:$DB95 PRG:1B95 A9 00 - sta $A8,x - sta $B8,x - sta $BC,x - sta $A0,x - sta RiderMotionState,x - sta $58,x - sta $CC,x + sta $A8,x ; CPU:$DB97 PRG:1B97 95 A8 + sta $B8,x ; CPU:$DB99 PRG:1B99 95 B8 + sta $BC,x ; CPU:$DB9B PRG:1B9B 95 BC + sta $A0,x ; CPU:$DB9D PRG:1B9D 95 A0 + sta RiderMotionState,x ; CPU:$DB9F PRG:1B9F 95 A4 + sta $58,x ; CPU:$DBA1 PRG:1BA1 95 58 + sta $CC,x ; CPU:$DBA3 PRG:1BA3 95 CC - sta $036C,x + sta $036C,x ; CPU:$DBA5 PRG:1BA5 9D 6C 03 - sta $90,x - sta $94,x - sta $98,x - sta $9C,x - sta $B0,x - sta $D4,x + sta $90,x ; CPU:$DBA8 PRG:1BA8 95 90 + sta $94,x ; CPU:$DBAA PRG:1BAA 95 94 + sta $98,x ; CPU:$DBAC PRG:1BAC 95 98 + sta $9C,x ; CPU:$DBAE PRG:1BAE 95 9C + sta $B0,x ; CPU:$DBB0 PRG:1BB0 95 B0 + sta $D4,x ; CPU:$DBB2 PRG:1BB2 95 D4 - sta $0388,x + sta $0388,x ; CPU:$DBB4 PRG:1BB4 9D 88 03 - sta $C0,x + sta $C0,x ; CPU:$DBB7 PRG:1BB7 95 C0 - sta $039C,x + sta $039C,x ; CPU:$DBB9 PRG:1BB9 9D 9C 03 - sta $DC,x - sta $70,x + sta $DC,x ; CPU:$DBBC PRG:1BBC 95 DC + sta $70,x ; CPU:$DBBE PRG:1BBE 95 70 - sta $0370,x + sta $0370,x ; CPU:$DBC0 PRG:1BC0 9D 70 03 - rts + rts ; CPU:$DBC3 PRG:1BC3 60 ; --------------------------------------------------------------------------- ; $DBC4-$DBFD: conditional slot reset/setup. ; --------------------------------------------------------------------------- SlotSetupDBC4: - lda $03A8 + lda $03A8 ; CPU:$DBC4 PRG:1BC4 AD A8 03 ; DBC7: F0 FA = BEQ $DBC3 - .byte $F0, $FA + .byte $F0, $FA ; CPU:$DBC7 PRG:1BC7 F0 FA - lda $AB - beq @initialize + lda $AB ; CPU:$DBC9 PRG:1BC9 A5 AB + beq @initialize ; CPU:$DBCB PRG:1BCB F0 13 - ldx #$03 + ldx #$03 ; CPU:$DBCD PRG:1BCD A2 03 - lda $84,x - lsr a + lda $84,x ; CPU:$DBCF PRG:1BCF B5 84 + lsr a ; CPU:$DBD1 PRG:1BD1 4A ; DBD2: B0 EF = BCS $DBC3 - .byte $B0, $EF + .byte $B0, $EF ; CPU:$DBD2 PRG:1BD2 B0 EF - lsr a - bcs @reset_slot + lsr a ; CPU:$DBD4 PRG:1BD4 4A + bcs @reset_slot ; CPU:$DBD5 PRG:1BD5 B0 06 - lda $80,x - cmp #$EA + lda $80,x ; CPU:$DBD7 PRG:1BD7 B5 80 + cmp #$EA ; CPU:$DBD9 PRG:1BD9 C9 EA ; DBDB: B0 E6 = BCS $DBC3 - .byte $B0, $E6 + .byte $B0, $E6 ; CPU:$DBDB PRG:1BDB B0 E6 @reset_slot: - jmp ResetSlotState + jmp ResetSlotState ; CPU:$DBDD PRG:1BDD 4C 95 DB @initialize: - ldy #$00 - sty $03A8 + ldy #$00 ; CPU:$DBE0 PRG:1BE0 A0 00 + sty $03A8 ; CPU:$DBE2 PRG:1BE2 8C A8 03 - iny + iny ; CPU:$DBE5 PRG:1BE5 C8 - ldx #$02 - stx $87 - inx + ldx #$02 ; CPU:$DBE6 PRG:1BE6 A2 02 + stx $87 ; CPU:$DBE8 PRG:1BE8 86 87 + inx ; CPU:$DBEA PRG:1BEA E8 - jsr InitializeSlot + jsr InitializeSlot ; CPU:$DBEB PRG:1BEB 20 E3 DA ; DBEE: F0 D3 = BEQ $DBC3 - .byte $F0, $D3 + .byte $F0, $D3 ; CPU:$DBEE PRG:1BEE F0 D3 - lda #$00 - sta $97 + lda #$00 ; CPU:$DBF0 PRG:1BF0 A9 00 + sta $97 ; CPU:$DBF2 PRG:1BF2 85 97 - lda #$92 - sta $8F - sta $0373 + lda #$92 ; CPU:$DBF4 PRG:1BF4 A9 92 + sta $8F ; CPU:$DBF6 PRG:1BF6 85 8F + sta $0373 ; CPU:$DBF8 PRG:1BF8 8D 73 03 - jmp $DC69 + jmp $DC69 ; CPU:$DBFB PRG:1BFB 4C 69 DC ; --------------------------------------------------------------------------- ; $DBFE-$DC19: accumulate slot-0 delta into global position/state. ; --------------------------------------------------------------------------- UpdateGlobalPosition: - lda $60 - lsr a - ror a - ror a - ror a + lda $60 ; CPU:$DBFE PRG:1BFE A5 60 + lsr a ; CPU:$DC00 PRG:1C00 4A + ror a ; CPU:$DC01 PRG:1C01 6A + ror a ; CPU:$DC02 PRG:1C02 6A + ror a ; CPU:$DC03 PRG:1C03 6A - clc - adc $03BF - sta $03BF + clc ; CPU:$DC04 PRG:1C04 18 + adc $03BF ; CPU:$DC05 PRG:1C05 6D BF 03 + sta $03BF ; CPU:$DC08 PRG:1C08 8D BF 03 - lda $60 - adc $50 - sta $50 - bcc @return + lda $60 ; CPU:$DC0B PRG:1C0B A5 60 + adc $50 ; CPU:$DC0D PRG:1C0D 65 50 + sta $50 ; CPU:$DC0F PRG:1C0F 85 50 + bcc @return ; CPU:$DC11 PRG:1C11 90 06 - lda $4E - eor #$01 - sta $4E + lda $4E ; CPU:$DC13 PRG:1C13 A5 4E + eor #$01 ; CPU:$DC15 PRG:1C15 49 01 + sta $4E ; CPU:$DC17 PRG:1C17 85 4E @return: - rts + rts ; CPU:$DC19 PRG:1C19 60 ; --------------------------------------------------------------------------- ; $DC1A-$DC96: per-slot update/check routine. ; --------------------------------------------------------------------------- UpdateSlotDC1A: - lda $B0,x + lda $B0,x ; CPU:$DC1A PRG:1C1A B5 B0 ; DC1C: BEQ $DC19 - .byte $F0, $FB + .byte $F0, $FB ; CPU:$DC1C PRG:1C1C F0 FB - jsr CalculateSlotRemaining - sta $01 + jsr CalculateSlotRemaining ; CPU:$DC1E PRG:1C1E 20 97 DC + sta $01 ; CPU:$DC21 PRG:1C21 85 01 - cmp $8C,x + cmp $8C,x ; CPU:$DC23 PRG:1C23 D5 8C ; DC25: BCS $DC19 - .byte $B0, $F2 + .byte $B0, $F2 ; CPU:$DC25 PRG:1C25 B0 F2 - lda $8C,x - cmp #$A8 + lda $8C,x ; CPU:$DC27 PRG:1C27 B5 8C + cmp #$A8 ; CPU:$DC29 PRG:1C29 C9 A8 ; DC2B: BCS $DC19 - .byte $B0, $EC + .byte $B0, $EC ; CPU:$DC2B PRG:1C2B B0 EC - lda $0364,x + lda $0364,x ; CPU:$DC2D PRG:1C2D BD 64 03 ; DC30: BEQ $DC19 - .byte $F0, $E7 + .byte $F0, $E7 ; CPU:$DC30 PRG:1C30 F0 E7 - txa - bne @clear_fields + txa ; CPU:$DC32 PRG:1C32 8A + bne @clear_fields ; CPU:$DC33 PRG:1C33 D0 04 - lda #$02 - sta $FF + lda #$02 ; CPU:$DC35 PRG:1C35 A9 02 + sta $FF ; CPU:$DC37 PRG:1C37 85 FF @clear_fields: - lda #$00 - sta $B0,x - sta $0364,x + lda #$00 ; CPU:$DC39 PRG:1C39 A9 00 + sta $B0,x ; CPU:$DC3B PRG:1C3B 95 B0 + sta $0364,x ; CPU:$DC3D PRG:1C3D 9D 64 03 - lda $98,x - bne SlotUpdateCommonDC87 + lda $98,x ; CPU:$DC40 PRG:1C40 B5 98 + bne SlotUpdateCommonDC87 ; CPU:$DC42 PRG:1C42 D0 43 - lda $52 - bne SlotUpdateAlternateDC8E + lda $52 ; CPU:$DC44 PRG:1C44 A5 52 + bne SlotUpdateAlternateDC8E ; CPU:$DC46 PRG:1C46 D0 46 - ldy $0388,x - sta $0388,x + ldy $0388,x ; CPU:$DC48 PRG:1C48 BC 88 03 + sta $0388,x ; CPU:$DC4B PRG:1C4B 9D 88 03 - tya - bne SlotUpdateCommonDC87 + tya ; CPU:$DC4E PRG:1C4E 98 + bne SlotUpdateCommonDC87 ; CPU:$DC4F PRG:1C4F D0 36 - lda $D4,x - ldy $94,x - cpy #$02 - bpl @table_index_ready + lda $D4,x ; CPU:$DC51 PRG:1C51 B5 D4 + ldy $94,x ; CPU:$DC53 PRG:1C53 B4 94 + cpy #$02 ; CPU:$DC55 PRG:1C55 C0 02 + bpl @table_index_ready ; CPU:$DC57 PRG:1C57 10 03 - clc - adc #$08 + clc ; CPU:$DC59 PRG:1C59 18 + adc #$08 ; CPU:$DC5A PRG:1C5A 69 08 @table_index_ready: - tay + tay ; CPU:$DC5C PRG:1C5C A8 - lda $AC,x - cmp $D86C,y - bcc @set_flag + lda $AC,x ; CPU:$DC5D PRG:1C5D B5 AC + cmp $D86C,y ; CPU:$DC5F PRG:1C5F D9 6C D8 + bcc @set_flag ; CPU:$DC62 PRG:1C62 90 05 - cmp $D87C,y - bcc @check_position + cmp $D87C,y ; CPU:$DC64 PRG:1C64 D9 7C D8 + bcc @check_position ; CPU:$DC67 PRG:1C67 90 05 @set_flag: - lda #$FF - sta $98,x - rts + lda #$FF ; CPU:$DC69 PRG:1C69 A9 FF + sta $98,x ; CPU:$DC6B PRG:1C6B 95 98 + rts ; CPU:$DC6D PRG:1C6D 60 @check_position: - lda $0368,x - cmp $AC,x - beq SlotUpdateCommonDC87 + lda $0368,x ; CPU:$DC6E PRG:1C6E BD 68 03 + cmp $AC,x ; CPU:$DC71 PRG:1C71 D5 AC + beq SlotUpdateCommonDC87 ; CPU:$DC73 PRG:1C73 F0 12 - lda $D4,x - ora $CC,x - bne SlotUpdateCommonDC87 + lda $D4,x ; CPU:$DC75 PRG:1C75 B5 D4 + ora $CC,x ; CPU:$DC77 PRG:1C77 15 CC + bne SlotUpdateCommonDC87 ; CPU:$DC79 PRG:1C79 D0 0C - lda #$04 - sta $0374,x + lda #$04 ; CPU:$DC7B PRG:1C7B A9 04 + sta $0374,x ; CPU:$DC7D PRG:1C7D 9D 74 03 - lsr a - sta $0388,x + lsr a ; CPU:$DC80 PRG:1C80 4A + sta $0388,x ; CPU:$DC81 PRG:1C81 9D 88 03 - lsr a - sta $B0,x + lsr a ; CPU:$DC84 PRG:1C84 4A + sta $B0,x ; CPU:$DC85 PRG:1C85 95 B0 SlotUpdateCommonDC87: - dec $01 - lda $01 - sta $8C,x + dec $01 ; CPU:$DC87 PRG:1C87 C6 01 + lda $01 ; CPU:$DC89 PRG:1C89 A5 01 + sta $8C,x ; CPU:$DC8B PRG:1C8B 95 8C SlotUpdateReturnDC8D: - rts + rts ; CPU:$DC8D PRG:1C8D 60 SlotUpdateAlternateDC8E: - lda $D4,x - bne SlotUpdateReturnDC8D + lda $D4,x ; CPU:$DC8E PRG:1C8E B5 D4 + bne SlotUpdateReturnDC8D ; CPU:$DC90 PRG:1C90 D0 FB - lda #$06 - sta $AC,x - rts + lda #$06 ; CPU:$DC92 PRG:1C92 A9 06 + sta $AC,x ; CPU:$DC94 PRG:1C94 95 AC + rts ; CPU:$DC96 PRG:1C96 60 ; --------------------------------------------------------------------------- @@ -6303,7 +6302,7 @@ SlotUpdateAlternateDC8E: ; --------------------------------------------------------------------------- CalculateSlotRemaining: - lda $03F1 + lda $03F1 ; CPU:$DC97 PRG:1C97 AD F1 03 ; --------------------------------------------------------------------------- @@ -6312,10 +6311,10 @@ CalculateSlotRemaining: ; --------------------------------------------------------------------------- CalculateSlotRemainingFromADC9A: - sec - sbc $BC,x - sbc $B8,x - rts + sec ; CPU:$DC9A PRG:1C9A 38 + sbc $BC,x ; CPU:$DC9B PRG:1C9B F5 BC + sbc $B8,x ; CPU:$DC9D PRG:1C9D F5 B8 + rts ; CPU:$DC9F PRG:1C9F 60 ; --------------------------------------------------------------------------- @@ -6323,36 +6322,36 @@ CalculateSlotRemainingFromADC9A: ; --------------------------------------------------------------------------- UpdateSlot0368DCA0: - ldy $D4,x + ldy $D4,x ; CPU:$DCA0 PRG:1CA0 B4 D4 - lda $52 - cmp #$01 - bne @from_table + lda $52 ; CPU:$DCA2 PRG:1CA2 A5 52 + cmp #$01 ; CPU:$DCA4 PRG:1CA4 C9 01 + bne @from_table ; CPU:$DCA6 PRG:1CA6 D0 0D - txa - ora $98 - ora $9C - ora $58 - bne @from_table + txa ; CPU:$DCA8 PRG:1CA8 8A + ora $98 ; CPU:$DCA9 PRG:1CA9 05 98 + ora $9C ; CPU:$DCAB PRG:1CAB 05 9C + ora $58 ; CPU:$DCAD PRG:1CAD 05 58 + bne @from_table ; CPU:$DCAF PRG:1CAF D0 04 - lda #$0A - bne @store + lda #$0A ; CPU:$DCB1 PRG:1CB1 A9 0A + bne @store ; CPU:$DCB3 PRG:1CB3 D0 03 @from_table: - lda $D88B,y + lda $D88B,y ; CPU:$DCB5 PRG:1CB5 B9 8B D8 @store: - sta $0368,x + sta $0368,x ; CPU:$DCB8 PRG:1CB8 9D 68 03 - lda RiderMotionState,x - cmp #$01 - bne @return + lda RiderMotionState,x ; CPU:$DCBB PRG:1CBB B5 A4 + cmp #$01 ; CPU:$DCBD PRG:1CBD C9 01 + bne @return ; CPU:$DCBF PRG:1CBF D0 05 - lda #$06 - sta $0368,x + lda #$06 ; CPU:$DCC1 PRG:1CC1 A9 06 + sta $0368,x ; CPU:$DCC3 PRG:1CC3 9D 68 03 @return: - rts + rts ; CPU:$DCC6 PRG:1CC6 60 ; --------------------------------------------------------------------------- ; $DCC7-$DCDD: adjust $AC,X toward the value supplied in A. @@ -6364,27 +6363,27 @@ UpdateSlot0368DCA0: ; --------------------------------------------------------------------------- AdjustSlotAC: - sta $00 + sta $00 ; CPU:$DCC7 PRG:1CC7 85 00 - lda $2A,x - bne @return + lda $2A,x ; CPU:$DCC9 PRG:1CC9 B5 2A + bne @return ; CPU:$DCCB PRG:1CCB D0 10 - sty $2A,x + sty $2A,x ; CPU:$DCCD PRG:1CCD 94 2A - lda $AC,x - cmp $00 - beq @return + lda $AC,x ; CPU:$DCCF PRG:1CCF B5 AC + cmp $00 ; CPU:$DCD1 PRG:1CD1 C5 00 + beq @return ; CPU:$DCD3 PRG:1CD3 F0 08 - bcc @increment + bcc @increment ; CPU:$DCD5 PRG:1CD5 90 04 - dec $AC,x - dec $AC,x + dec $AC,x ; CPU:$DCD7 PRG:1CD7 D6 AC + dec $AC,x ; CPU:$DCD9 PRG:1CD9 D6 AC @increment: - inc $AC,x + inc $AC,x ; CPU:$DCDB PRG:1CDB F6 AC @return: - rts + rts ; CPU:$DCDD PRG:1CDD 60 ; --------------------------------------------------------------------------- ; $DCDE-$DCF1: update per-slot $0374 countdown/state. @@ -6392,44 +6391,44 @@ AdjustSlotAC: ; --------------------------------------------------------------------------- UpdateSlot0374: - lda $0374,x - beq @return + lda $0374,x ; CPU:$DCDE PRG:1CDE BD 74 03 + beq @return ; CPU:$DCE1 PRG:1CE1 F0 0E - dec $0374,x + dec $0374,x ; CPU:$DCE3 PRG:1CE3 DE 74 03 - lda $5C,x - and #$C0 - beq @return + lda $5C,x ; CPU:$DCE6 PRG:1CE6 B5 5C + and #$C0 ; CPU:$DCE8 PRG:1CE8 29 C0 + beq @return ; CPU:$DCEA PRG:1CEA F0 05 - lda #$00 - sta $0374,x + lda #$00 ; CPU:$DCEC PRG:1CEC A9 00 + sta $0374,x ; CPU:$DCEE PRG:1CEE 9D 74 03 @return: - rts + rts ; CPU:$DCF1 PRG:1CF1 60 ; --------------------------------------------------------------------------- ; $DCF2-$DD37: update per-slot state/timing fields. ; --------------------------------------------------------------------------- UpdateSlotState: - lda $B0,x - beq StateDCF2ReturnDD37 + lda $B0,x ; CPU:$DCF2 PRG:1CF2 B5 B0 + beq StateDCF2ReturnDD37 ; CPU:$DCF4 PRG:1CF4 F0 41 - cmp #$02 - beq StateDCF2Mode2DD11 + cmp #$02 ; CPU:$DCF6 PRG:1CF6 C9 02 + beq StateDCF2Mode2DD11 ; CPU:$DCF8 PRG:1CF8 F0 17 ; $DCFA StateDCF2ZeroDCFA: - lda #$00 - beq StateDCF2Store0384DD08 + lda #$00 ; CPU:$DCFA PRG:1CFA A9 00 + beq StateDCF2Store0384DD08 ; CPU:$DCFC PRG:1CFC F0 0A StateDCF2Increment94DCFE: - lda $98,x - bne StateDCF2ZeroDCFA + lda $98,x ; CPU:$DCFE PRG:1CFE B5 98 + bne StateDCF2ZeroDCFA ; CPU:$DD00 PRG:1D00 D0 F8 - inc $94,x - bne StateDCF2ZeroDCFA + inc $94,x ; CPU:$DD02 PRG:1D02 F6 94 + bne StateDCF2ZeroDCFA ; CPU:$DD04 PRG:1D04 D0 F4 ; --------------------------------------------------------------------------- @@ -6439,50 +6438,50 @@ StateDCF2Increment94DCFE: ; --------------------------------------------------------------------------- UpdateSlotFrom94DD06: - lda $94,x + lda $94,x ; CPU:$DD06 PRG:1D06 B5 94 ; $DD08 StateDCF2Store0384DD08: - sta $0384,x + sta $0384,x ; CPU:$DD08 PRG:1D08 9D 84 03 - jsr InitializeSlotState - jmp StateDCF2CommonDD1A + jsr InitializeSlotState ; CPU:$DD0B PRG:1D0B 20 38 DD + jmp StateDCF2CommonDD1A ; CPU:$DD0E PRG:1D0E 4C 1A DD ; $DD11 StateDCF2Mode2DD11: - lda $5C,x - lsr a - bcc StateDCF2CommonDD1A + lda $5C,x ; CPU:$DD11 PRG:1D11 B5 5C + lsr a ; CPU:$DD13 PRG:1D13 4A + bcc StateDCF2CommonDD1A ; CPU:$DD14 PRG:1D14 90 04 - lda $4C - beq StateDCF2ReturnDD37 + lda $4C ; CPU:$DD16 PRG:1D16 A5 4C + beq StateDCF2ReturnDD37 ; CPU:$DD18 PRG:1D18 F0 1D ; $DD1A StateDCF2CommonDD1A: - lda $5C,x - and #$03 - tay + lda $5C,x ; CPU:$DD1A PRG:1D1A B5 5C + and #$03 ; CPU:$DD1C PRG:1D1C 29 03 + tay ; CPU:$DD1E PRG:1D1E A8 - lda $D868,y - sta $038C,x + lda $D868,y ; CPU:$DD1F PRG:1D1F B9 68 D8 + sta $038C,x ; CPU:$DD22 PRG:1D22 9D 8C 03 - lda $8C,x - sta $01 + lda $8C,x ; CPU:$DD25 PRG:1D25 B5 8C + sta $01 ; CPU:$DD27 PRG:1D27 85 01 - jsr UpdateSlotAccumulator - sta $8C,x + jsr UpdateSlotAccumulator ; CPU:$DD29 PRG:1D29 20 6F DD + sta $8C,x ; CPU:$DD2C PRG:1D2C 95 8C - lda $CC,x - bne StateDCF2ReturnDD37 + lda $CC,x ; CPU:$DD2E PRG:1D2E B5 CC + bne StateDCF2ReturnDD37 ; CPU:$DD30 PRG:1D30 D0 05 - lda #$01 - sta $0364,x + lda #$01 ; CPU:$DD32 PRG:1D32 A9 01 + sta $0364,x ; CPU:$DD34 PRG:1D34 9D 64 03 ; $DD37 StateDCF2ReturnDD37: - rts + rts ; CPU:$DD37 PRG:1D37 60 ; --------------------------------------------------------------------------- @@ -6491,47 +6490,47 @@ StateDCF2ReturnDD37: ; --------------------------------------------------------------------------- InitializeSlotState: - lda #$02 - sta $B0,x + lda #$02 ; CPU:$DD38 PRG:1D38 A9 02 + sta $B0,x ; CPU:$DD3A PRG:1D3A 95 B0 - lda #$0F - sta $0380,x + lda #$0F ; CPU:$DD3C PRG:1D3C A9 0F + sta $0380,x ; CPU:$DD3E PRG:1D3E 9D 80 03 - lda $90,x - clc - adc #$AF - sta $0378,x + lda $90,x ; CPU:$DD41 PRG:1D41 B5 90 + clc ; CPU:$DD43 PRG:1D43 18 + adc #$AF ; CPU:$DD44 PRG:1D44 69 AF + sta $0378,x ; CPU:$DD46 PRG:1D46 9D 78 03 - lda $94,x - adc #$00 - sta $037C,x + lda $94,x ; CPU:$DD49 PRG:1D49 B5 94 + adc #$00 ; CPU:$DD4B PRG:1D4B 69 00 + sta $037C,x ; CPU:$DD4D PRG:1D4D 9D 7C 03 - lda $0388,x - cmp #$02 - bne @check_slot + lda $0388,x ; CPU:$DD50 PRG:1D50 BD 88 03 + cmp #$02 ; CPU:$DD53 PRG:1D53 C9 02 + bne @check_slot ; CPU:$DD55 PRG:1D55 D0 06 - lsr $037C,x - ror $0378,x + lsr $037C,x ; CPU:$DD57 PRG:1D57 5E 7C 03 + ror $0378,x ; CPU:$DD5A PRG:1D5A 7E 78 03 @check_slot: - txa - bne @return + txa ; CPU:$DD5D PRG:1D5D 8A + bne @return ; CPU:$DD5E PRG:1D5E D0 0E - lda $94,x - asl a - asl a - asl a - asl a - eor #$30 - bne @store_ff + lda $94,x ; CPU:$DD60 PRG:1D60 B5 94 + asl a ; CPU:$DD62 PRG:1D62 0A + asl a ; CPU:$DD63 PRG:1D63 0A + asl a ; CPU:$DD64 PRG:1D64 0A + asl a ; CPU:$DD65 PRG:1D65 0A + eor #$30 ; CPU:$DD66 PRG:1D66 49 30 + bne @store_ff ; CPU:$DD68 PRG:1D68 D0 02 - lda #$08 + lda #$08 ; CPU:$DD6A PRG:1D6A A9 08 @store_ff: - sta $FF + sta $FF ; CPU:$DD6C PRG:1D6C 85 FF @return: - rts + rts ; CPU:$DD6E PRG:1D6E 60 ; --------------------------------------------------------------------------- ; $DD6F-$DD8C: update per-slot accumulated value and calculate result. @@ -6540,305 +6539,305 @@ InitializeSlotState: ; --------------------------------------------------------------------------- UpdateSlotAccumulator: - lda $0380,x - adc $038C,x - sta $0380,x + lda $0380,x ; CPU:$DD6F PRG:1D6F BD 80 03 + adc $038C,x ; CPU:$DD72 PRG:1D72 7D 8C 03 + sta $0380,x ; CPU:$DD75 PRG:1D75 9D 80 03 - lda $0384,x - adc #$00 - sta $0384,x + lda $0384,x ; CPU:$DD78 PRG:1D78 BD 84 03 + adc #$00 ; CPU:$DD7B PRG:1D7B 69 00 + sta $0384,x ; CPU:$DD7D PRG:1D7D 9D 84 03 - lda $01 - sbc $037C,x - sta $01 + lda $01 ; CPU:$DD80 PRG:1D80 A5 01 + sbc $037C,x ; CPU:$DD82 PRG:1D82 FD 7C 03 + sta $01 ; CPU:$DD85 PRG:1D85 85 01 - lda $01 - adc $0384,x + lda $01 ; CPU:$DD87 PRG:1D87 A5 01 + adc $0384,x ; CPU:$DD89 PRG:1D89 7D 84 03 - rts + rts ; CPU:$DD8C PRG:1D8C 60 ; --------------------------------------------------------------------------- ; $DD8D-$DDD0: global state/setup dispatcher. ; --------------------------------------------------------------------------- GlobalStateUpdateDD8D: - lda $3C - ora $03E0 + lda $3C ; CPU:$DD8D PRG:1D8D A5 3C + ora $03E0 ; CPU:$DD8F PRG:1D8F 0D E0 03 ; DD92: F0 F8 = BEQ $DD8C - .byte $F0, $F8 + .byte $F0, $F8 ; CPU:$DD92 PRG:1D92 F0 F8 - lda $3C - cmp #$08 - beq StateUpdateMode8DDBF + lda $3C ; CPU:$DD94 PRG:1D94 A5 3C + cmp #$08 ; CPU:$DD96 PRG:1D96 C9 08 + beq StateUpdateMode8DDBF ; CPU:$DD98 PRG:1D98 F0 25 - bcc StateUpdateCopyTemplateDDCE + bcc StateUpdateCopyTemplateDDCE ; CPU:$DD9A PRG:1D9A 90 32 - lda $94 - ora $98 - ora $9C - bne StateUpdateInitialize02C0DDBC + lda $94 ; CPU:$DD9C PRG:1D9C A5 94 + ora $98 ; CPU:$DD9E PRG:1D9E 05 98 + ora $9C ; CPU:$DDA0 PRG:1DA0 05 9C + bne StateUpdateInitialize02C0DDBC ; CPU:$DDA2 PRG:1DA2 D0 18 - lda $58 - beq StateUpdateSet90DDAE + lda $58 ; CPU:$DDA4 PRG:1DA4 A5 58 + beq StateUpdateSet90DDAE ; CPU:$DDA6 PRG:1DA6 F0 06 - lda #$C0 - sta $90 - bne StateUpdateInitialize02C0DDBC + lda #$C0 ; CPU:$DDA8 PRG:1DA8 A9 C0 + sta $90 ; CPU:$DDAA PRG:1DAA 85 90 + bne StateUpdateInitialize02C0DDBC ; CPU:$DDAC PRG:1DAC D0 0E StateUpdateSet90DDAE: - sta $90 + sta $90 ; CPU:$DDAE PRG:1DAE 85 90 - ldx #$01 + ldx #$01 ; CPU:$DDB0 PRG:1DB0 A2 01 - lda $B8 - cmp $D8C4 - bne StateUpdateStoreDCDDBA + lda $B8 ; CPU:$DDB2 PRG:1DB2 A5 B8 + cmp $D8C4 ; CPU:$DDB4 PRG:1DB4 CD C4 D8 + bne StateUpdateStoreDCDDBA ; CPU:$DDB7 PRG:1DB7 D0 01 - dex + dex ; CPU:$DDB9 PRG:1DB9 CA StateUpdateStoreDCDDBA: - stx $DC + stx $DC ; CPU:$DDBA PRG:1DBA 86 DC ; $DDBC StateUpdateInitialize02C0DDBC: - jmp Initialize02C0Entries + jmp Initialize02C0Entries ; CPU:$DDBC PRG:1DBC 4C DD CC ; $DDBF StateUpdateMode8DDBF: - lda #$00 - sta $03E0 + lda #$00 ; CPU:$DDBF PRG:1DBF A9 00 + sta $03E0 ; CPU:$DDC1 PRG:1DC1 8D E0 03 - lda #$05 - sta $03B6 - sta $9C - sta $0374 + lda #$05 ; CPU:$DDC4 PRG:1DC4 A9 05 + sta $03B6 ; CPU:$DDC6 PRG:1DC6 8D B6 03 + sta $9C ; CPU:$DDC9 PRG:1DC9 85 9C + sta $0374 ; CPU:$DDCB PRG:1DCB 8D 74 03 ; $DDCE StateUpdateCopyTemplateDDCE: - jmp Copy02C0Template + jmp Copy02C0Template ; CPU:$DDCE PRG:1DCE 4C 13 CD ; --------------------------------------------------------------------------- ; $DDD1-$DE30: update four runtime slots. ; --------------------------------------------------------------------------- UpdateTriggeredSlots: - ldx #$03 + ldx #$03 ; CPU:$DDD1 PRG:1DD1 A2 03 @slot_loop: - lda $98,x - beq @next_slot + lda $98,x ; CPU:$DDD3 PRG:1DD3 B5 98 + beq @next_slot ; CPU:$DDD5 PRG:1DD5 F0 56 - ldy #$04 + ldy #$04 ; CPU:$DDD7 PRG:1DD7 A0 04 - txa - bne @store_index + txa ; CPU:$DDD9 PRG:1DD9 8A + bne @store_index ; CPU:$DDDA PRG:1DDA D0 12 - sta $03A9 - sta $FC + sta $03A9 ; CPU:$DDDC PRG:1DDC 8D A9 03 + sta $FC ; CPU:$DDDF PRG:1DDF 85 FC - lda $4C - bne @select_index + lda $4C ; CPU:$DDE1 PRG:1DE1 A5 4C + bne @select_index ; CPU:$DDE3 PRG:1DE3 D0 04 - lda #$01 - sta $FD + lda #$01 ; CPU:$DDE5 PRG:1DE5 A9 01 + sta $FD ; CPU:$DDE7 PRG:1DE7 85 FD @select_index: - lda $1B - and #$03 - tay + lda $1B ; CPU:$DDE9 PRG:1DE9 A5 1B + and #$03 ; CPU:$DDEB PRG:1DEB 29 03 + tay ; CPU:$DDED PRG:1DED A8 @store_index: - tya - sta $03E4,x + tya ; CPU:$DDEE PRG:1DEE 98 + sta $03E4,x ; CPU:$DDEF PRG:1DEF 9D E4 03 - lda $4C - lsr a - bcs @next_slot + lda $4C ; CPU:$DDF2 PRG:1DF2 A5 4C + lsr a ; CPU:$DDF4 PRG:1DF4 4A + bcs @next_slot ; CPU:$DDF5 PRG:1DF5 B0 36 - lda $94,x - bne @update_ac + lda $94,x ; CPU:$DDF7 PRG:1DF7 B5 94 + bne @update_ac ; CPU:$DDF9 PRG:1DF9 D0 29 - lda $B0,x - ora $58,x - bne @set_90 + lda $B0,x ; CPU:$DDFB PRG:1DFB B5 B0 + ora $58,x ; CPU:$DDFD PRG:1DFD 15 58 + bne @set_90 ; CPU:$DDFF PRG:1DFF D0 1F - sta $90,x - sta $60,x - sta $98,x + sta $90,x ; CPU:$DE01 PRG:1E01 95 90 + sta $60,x ; CPU:$DE03 PRG:1E03 95 60 + sta $98,x ; CPU:$DE05 PRG:1E05 95 98 - lda #$06 - sta $AC,x + lda #$06 ; CPU:$DE07 PRG:1E07 A9 06 + sta $AC,x ; CPU:$DE09 PRG:1E09 95 AC - lda $80,x - clc - adc #$08 - sta $0390,x + lda $80,x ; CPU:$DE0B PRG:1E0B B5 80 + clc ; CPU:$DE0D PRG:1E0D 18 + adc #$08 ; CPU:$DE0E PRG:1E0E 69 08 + sta $0390,x ; CPU:$DE10 PRG:1E10 9D 90 03 - jsr UpdateSlotDerivedPosition + jsr UpdateSlotDerivedPosition ; CPU:$DE13 PRG:1E13 20 15 DA - lda #$02 - sta $0398,x + lda #$02 ; CPU:$DE16 PRG:1E16 A9 02 + sta $0398,x ; CPU:$DE18 PRG:1E18 9D 98 03 - lsr a - sta $9C,x + lsr a ; CPU:$DE1B PRG:1E1B 4A + sta $9C,x ; CPU:$DE1C PRG:1E1C 95 9C - bne @next_slot + bne @next_slot ; CPU:$DE1E PRG:1E1E D0 0D @set_90: - lda #$88 - sta $90,x + lda #$88 ; CPU:$DE20 PRG:1E20 A9 88 + sta $90,x ; CPU:$DE22 PRG:1E22 95 90 @update_ac: - lda $AC,x - clc - adc $98,x - and #$0F - sta $AC,x + lda $AC,x ; CPU:$DE24 PRG:1E24 B5 AC + clc ; CPU:$DE26 PRG:1E26 18 + adc $98,x ; CPU:$DE27 PRG:1E27 75 98 + and #$0F ; CPU:$DE29 PRG:1E29 29 0F + sta $AC,x ; CPU:$DE2B PRG:1E2B 95 AC @next_slot: - dex - bpl @slot_loop + dex ; CPU:$DE2D PRG:1E2D CA + bpl @slot_loop ; CPU:$DE2E PRG:1E2E 10 A3 - rts + rts ; CPU:$DE30 PRG:1E30 60 ; --------------------------------------------------------------------------- ; $DE31-$DEBA: update global state and build $02C0 display entries. ; --------------------------------------------------------------------------- UpdateDisplayState: - lda $24 - cmp #$01 - beq StateDE31Mode1DEA6 + lda $24 ; CPU:$DE31 PRG:1E31 A5 24 + cmp #$01 ; CPU:$DE33 PRG:1E33 C9 01 + beq StateDE31Mode1DEA6 ; CPU:$DE35 PRG:1E35 F0 6F - ldy $4F - bne StateDE31ReturnDEA5 + ldy $4F ; CPU:$DE37 PRG:1E37 A4 4F + bne StateDE31ReturnDEA5 ; CPU:$DE39 PRG:1E39 D0 6A - cmp #$60 - bcs StateDE31SelectValueDE4E + cmp #$60 ; CPU:$DE3B PRG:1E3B C9 60 + bcs StateDE31SelectValueDE4E ; CPU:$DE3D PRG:1E3D B0 0F - lda $03A9 - beq StateDE31SelectValueDE4E + lda $03A9 ; CPU:$DE3F PRG:1E3F AD A9 03 + beq StateDE31SelectValueDE4E ; CPU:$DE42 PRG:1E42 F0 0A - lda $5C - and #$C0 - beq StateDE31SelectValueDE4E + lda $5C ; CPU:$DE44 PRG:1E44 A5 5C + and #$C0 ; CPU:$DE46 PRG:1E46 29 C0 + beq StateDE31SelectValueDE4E ; CPU:$DE48 PRG:1E48 F0 04 - lda #$01 - sta $FE + lda #$01 ; CPU:$DE4A PRG:1E4A A9 01 + sta $FE ; CPU:$DE4C PRG:1E4C 85 FE ; $DE4E StateDE31SelectValueDE4E: - ldy #$F0 + ldy #$F0 ; CPU:$DE4E PRG:1E4E A0 F0 - lda $24 - cmp #$10 - bcs StateDE31ValueReadyDE5E + lda $24 ; CPU:$DE50 PRG:1E50 A5 24 + cmp #$10 ; CPU:$DE52 PRG:1E52 C9 10 + bcs StateDE31ValueReadyDE5E ; CPU:$DE54 PRG:1E54 B0 08 - ldy #$F2 + ldy #$F2 ; CPU:$DE56 PRG:1E56 A0 F2 - cmp #$08 - bcs StateDE31ValueReadyDE5E + cmp #$08 ; CPU:$DE58 PRG:1E58 C9 08 + bcs StateDE31ValueReadyDE5E ; CPU:$DE5A PRG:1E5A B0 02 - ldy #$F4 + ldy #$F4 ; CPU:$DE5C PRG:1E5C A0 F4 ; $DE5E StateDE31ValueReadyDE5E: - cmp #$72 - bne StateDE31SetupLoopDE66 + cmp #$72 ; CPU:$DE5E PRG:1E5E C9 72 + bne StateDE31SetupLoopDE66 ; CPU:$DE60 PRG:1E60 D0 04 - lda #$20 - sta $FB + lda #$20 ; CPU:$DE62 PRG:1E62 A9 20 + sta $FB ; CPU:$DE64 PRG:1E64 85 FB ; $DE66 StateDE31SetupLoopDE66: - sty $00 + sty $00 ; CPU:$DE66 PRG:1E66 84 00 - lda $03B4 - sta $01 + lda $03B4 ; CPU:$DE68 PRG:1E68 AD B4 03 + sta $01 ; CPU:$DE6B PRG:1E6B 85 01 - ldy #$07 + ldy #$07 ; CPU:$DE6D PRG:1E6D A0 07 ; $DE6F StateDE31LoopDE6F: - tya - asl a - asl a - tax + tya ; CPU:$DE6F PRG:1E6F 98 + asl a ; CPU:$DE70 PRG:1E70 0A + asl a ; CPU:$DE71 PRG:1E71 0A + tax ; CPU:$DE72 PRG:1E72 AA - lda $D8E7,y - sta $02C0,x + lda $D8E7,y ; CPU:$DE73 PRG:1E73 B9 E7 D8 + sta $02C0,x ; CPU:$DE76 PRG:1E76 9D C0 02 - lda $00 - sta $02C1,x + lda $00 ; CPU:$DE79 PRG:1E79 A5 00 + sta $02C1,x ; CPU:$DE7B PRG:1E7B 9D C1 02 - lda #$00 - sta $02C2,x + lda #$00 ; CPU:$DE7E PRG:1E7E A9 00 + sta $02C2,x ; CPU:$DE80 PRG:1E80 9D C2 02 - lda $01 - sta $02C3,x + lda $01 ; CPU:$DE83 PRG:1E83 A5 01 + sta $02C3,x ; CPU:$DE85 PRG:1E85 9D C3 02 - tya - lsr a - bcc StateDE31SubtractDE91 + tya ; CPU:$DE88 PRG:1E88 98 + lsr a ; CPU:$DE89 PRG:1E89 4A + bcc StateDE31SubtractDE91 ; CPU:$DE8A PRG:1E8A 90 05 - inc $02C1,x - bne StateDE31NextDE9A + inc $02C1,x ; CPU:$DE8C PRG:1E8C FE C1 02 + bne StateDE31NextDE9A ; CPU:$DE8F PRG:1E8F D0 09 ; $DE91 StateDE31SubtractDE91: - lda $01 - sec - sbc #$10 - sta $01 - bcc StateDE31AfterLoopDE9D + lda $01 ; CPU:$DE91 PRG:1E91 A5 01 + sec ; CPU:$DE93 PRG:1E93 38 + sbc #$10 ; CPU:$DE94 PRG:1E94 E9 10 + sta $01 ; CPU:$DE96 PRG:1E96 85 01 + bcc StateDE31AfterLoopDE9D ; CPU:$DE98 PRG:1E98 90 03 ; $DE9A StateDE31NextDE9A: - dey - bpl StateDE31LoopDE6F + dey ; CPU:$DE9A PRG:1E9A 88 + bpl StateDE31LoopDE6F ; CPU:$DE9B PRG:1E9B 10 D2 ; $DE9D StateDE31AfterLoopDE9D: - lda $34 - beq StateDE31ReturnDEA5 + lda $34 ; CPU:$DE9D PRG:1E9D A5 34 + beq StateDE31ReturnDEA5 ; CPU:$DE9F PRG:1E9F F0 04 - lda #$88 - sta $24 + lda #$88 ; CPU:$DEA1 PRG:1EA1 A9 88 + sta $24 ; CPU:$DEA3 PRG:1EA3 85 24 ; $DEA5 StateDE31ReturnDEA5: - rts + rts ; CPU:$DEA5 PRG:1EA5 60 ; $DEA6 StateDE31Mode1DEA6: - lda #$01 - sta $4F + lda #$01 ; CPU:$DEA6 PRG:1EA6 A9 01 + sta $4F ; CPU:$DEA8 PRG:1EA8 85 4F - lda $03B4 - sec - sbc $60 - sta $03B4 + lda $03B4 ; CPU:$DEAA PRG:1EAA AD B4 03 + sec ; CPU:$DEAD PRG:1EAD 38 + sbc $60 ; CPU:$DEAE PRG:1EAE E5 60 + sta $03B4 ; CPU:$DEB0 PRG:1EB0 8D B4 03 - bcc StateDE31ReturnDEA5 + bcc StateDE31ReturnDEA5 ; CPU:$DEB3 PRG:1EB3 90 F0 - lda #$02 - sta $24 + lda #$02 ; CPU:$DEB5 PRG:1EB5 A9 02 + sta $24 ; CPU:$DEB7 PRG:1EB7 85 24 - bne StateDE31SelectValueDE4E + bne StateDE31SelectValueDE4E ; CPU:$DEB9 PRG:1EB9 D0 93 ; --------------------------------------------------------------------------- ; $DEBB-$DEE1: update per-slot $03A9 flags. @@ -6846,203 +6845,203 @@ StateDE31Mode1DEA6: ; --------------------------------------------------------------------------- UpdateSlotFlags: - ldx #$03 + ldx #$03 ; CPU:$DEBB PRG:1EBB A2 03 @slot_loop: - lda $84,x - lsr a - bcc @next_slot + lda $84,x ; CPU:$DEBD PRG:1EBD B5 84 + lsr a ; CPU:$DEBF PRG:1EBF 4A + bcc @next_slot ; CPU:$DEC0 PRG:1EC0 90 1C - lda $80,x - cmp #$30 - bcc @check_existing + lda $80,x ; CPU:$DEC2 PRG:1EC2 B5 80 + cmp #$30 ; CPU:$DEC4 PRG:1EC4 C9 30 + bcc @check_existing ; CPU:$DEC6 PRG:1EC6 90 04 - cmp #$40 - bcc @set_flag + cmp #$40 ; CPU:$DEC8 PRG:1EC8 C9 40 + bcc @set_flag ; CPU:$DECA PRG:1ECA 90 0D @check_existing: - lda $03A9,x - beq @next_slot + lda $03A9,x ; CPU:$DECC PRG:1ECC BD A9 03 + beq @next_slot ; CPU:$DECF PRG:1ECF F0 0D - lda #$40 - sta $FF + lda #$40 ; CPU:$DED1 PRG:1ED1 A9 40 + sta $FF ; CPU:$DED3 PRG:1ED3 85 FF - lda #$00 - beq @store_flag + lda #$00 ; CPU:$DED5 PRG:1ED5 A9 00 + beq @store_flag ; CPU:$DED7 PRG:1ED7 F0 02 @set_flag: - lda #$01 + lda #$01 ; CPU:$DED9 PRG:1ED9 A9 01 @store_flag: - sta $03A9,x + sta $03A9,x ; CPU:$DEDB PRG:1EDB 9D A9 03 @next_slot: - dex - bne @slot_loop + dex ; CPU:$DEDE PRG:1EDE CA + bne @slot_loop ; CPU:$DEDF PRG:1EDF D0 DC - rts + rts ; CPU:$DEE1 PRG:1EE1 60 ; --------------------------------------------------------------------------- ; $DEE2-$DF2F: calculate/update global $FC value. ; --------------------------------------------------------------------------- UpdateGlobalFC: - ldx #$00 + ldx #$00 ; CPU:$DEE2 PRG:1EE2 A2 00 - lda $03A9 - beq @store_result + lda $03A9 ; CPU:$DEE4 PRG:1EE4 AD A9 03 + beq @store_result ; CPU:$DEE7 PRG:1EE7 F0 44 - lda $4C - lsr a + lda $4C ; CPU:$DEE9 PRG:1EE9 A5 4C + lsr a ; CPU:$DEEB PRG:1EEB 4A ; DEEC: B0 B7 = BCS $DEA5 - .byte $B0, $B7 + .byte $B0, $B7 ; CPU:$DEEC PRG:1EEC B0 B7 - ldx #$02 + ldx #$02 ; CPU:$DEEE PRG:1EEE A2 02 - lda $94 - sta $00 + lda $94 ; CPU:$DEF0 PRG:1EF0 A5 94 + sta $00 ; CPU:$DEF2 PRG:1EF2 85 00 - lda $90 - sta $01 + lda $90 ; CPU:$DEF4 PRG:1EF4 A5 90 + sta $01 ; CPU:$DEF6 PRG:1EF6 85 01 @shift_loop: - lsr $00 - ror $01 + lsr $00 ; CPU:$DEF8 PRG:1EF8 46 00 + ror $01 ; CPU:$DEFA PRG:1EFA 66 01 - dex - bpl @shift_loop + dex ; CPU:$DEFC PRG:1EFC CA + bpl @shift_loop ; CPU:$DEFD PRG:1EFD 10 F9 - lda #$02 + lda #$02 ; CPU:$DEFF PRG:1EFF A9 02 - ldy $B0 - beq @set_x + ldy $B0 ; CPU:$DF01 PRG:1F01 A4 B0 + beq @set_x ; CPU:$DF03 PRG:1F03 F0 02 - lda #$04 + lda #$04 ; CPU:$DF05 PRG:1F05 A9 04 @set_x: - tax + tax ; CPU:$DF07 PRG:1F07 AA - lda $01 - sec - sbc #$02 - bmi @minimum + lda $01 ; CPU:$DF08 PRG:1F08 A5 01 + sec ; CPU:$DF0A PRG:1F0A 38 + sbc #$02 ; CPU:$DF0B PRG:1F0B E9 02 + bmi @minimum ; CPU:$DF0D PRG:1F0D 30 06 - jsr DivideByX_DFA4 + jsr DivideByX_DFA4 ; CPU:$DF0F PRG:1F0F 20 A4 DF - txa - bne @clamp + txa ; CPU:$DF12 PRG:1F12 8A + bne @clamp ; CPU:$DF13 PRG:1F13 D0 02 @minimum: - ldx #$01 + ldx #$01 ; CPU:$DF15 PRG:1F15 A2 01 @clamp: - cpx #$2F - bcc @check_flag + cpx #$2F ; CPU:$DF17 PRG:1F17 E0 2F + bcc @check_flag ; CPU:$DF19 PRG:1F19 90 09 - ldx #$2F + ldx #$2F ; CPU:$DF1B PRG:1F1B A2 2F - lda $3F - and #$08 - bne @check_flag + lda $3F ; CPU:$DF1D PRG:1F1D A5 3F + and #$08 ; CPU:$DF1F PRG:1F1F 29 08 + bne @check_flag ; CPU:$DF21 PRG:1F21 D0 01 - dex + dex ; CPU:$DF23 PRG:1F23 CA @check_flag: - lda $5C - asl a - bcs @store_result + lda $5C ; CPU:$DF24 PRG:1F24 A5 5C + asl a ; CPU:$DF26 PRG:1F26 0A + bcs @store_result ; CPU:$DF27 PRG:1F27 B0 04 - txa - ora #$80 - tax + txa ; CPU:$DF29 PRG:1F29 8A + ora #$80 ; CPU:$DF2A PRG:1F2A 09 80 + tax ; CPU:$DF2C PRG:1F2C AA @store_result: - stx $FC - rts + stx $FC ; CPU:$DF2D PRG:1F2D 86 FC + rts ; CPU:$DF2F PRG:1F2F 60 ; --------------------------------------------------------------------------- ; $DF30-$DF7E: advance global time/counter fields and refresh display data. ; --------------------------------------------------------------------------- UpdateGlobalCounters: - lda $4F - beq @return + lda $4F ; CPU:$DF30 PRG:1F30 A5 4F + beq @return ; CPU:$DF32 PRG:1F32 F0 1D - lda $6B - clc - adc #$10 - sta $6B + lda $6B ; CPU:$DF34 PRG:1F34 A5 6B + clc ; CPU:$DF36 PRG:1F36 18 + adc #$10 ; CPU:$DF37 PRG:1F37 69 10 + sta $6B ; CPU:$DF39 PRG:1F39 85 6B @check_subunit: - lda $6B - cmp #$0A - bcs @carry_subunit + lda $6B ; CPU:$DF3B PRG:1F3B A5 6B + cmp #$0A ; CPU:$DF3D PRG:1F3D C9 0A + bcs @carry_subunit ; CPU:$DF3F PRG:1F3F B0 11 @refresh_display: - ldx #$68 - jsr BuildDisplayValues + ldx #$68 ; CPU:$DF41 PRG:1F41 A2 68 + jsr BuildDisplayValues ; CPU:$DF43 PRG:1F43 20 7F DF - ldx #$06 + ldx #$06 ; CPU:$DF46 PRG:1F46 A2 06 @copy_display: - lda $03D1,x - sta $03D9,x + lda $03D1,x ; CPU:$DF48 PRG:1F48 BD D1 03 + sta $03D9,x ; CPU:$DF4B PRG:1F4B 9D D9 03 - dex - bpl @copy_display + dex ; CPU:$DF4E PRG:1F4E CA + bpl @copy_display ; CPU:$DF4F PRG:1F4F 10 F7 @return: - rts + rts ; CPU:$DF51 PRG:1F51 60 @carry_subunit: - lda $6B - sec - sbc #$0A - sta $6B + lda $6B ; CPU:$DF52 PRG:1F52 A5 6B + sec ; CPU:$DF54 PRG:1F54 38 + sbc #$0A ; CPU:$DF55 PRG:1F55 E9 0A + sta $6B ; CPU:$DF57 PRG:1F57 85 6B - inc $6A + inc $6A ; CPU:$DF59 PRG:1F59 E6 6A - lda $6A - cmp #$64 - bcc @check_subunit + lda $6A ; CPU:$DF5B PRG:1F5B A5 6A + cmp #$64 ; CPU:$DF5D PRG:1F5D C9 64 + bcc @check_subunit ; CPU:$DF5F PRG:1F5F 90 DA - lda #$00 - sta $6A + lda #$00 ; CPU:$DF61 PRG:1F61 A9 00 + sta $6A ; CPU:$DF63 PRG:1F63 85 6A - inc $69 + inc $69 ; CPU:$DF65 PRG:1F65 E6 69 - lda $69 - cmp #$3C - bcc @check_subunit + lda $69 ; CPU:$DF67 PRG:1F67 A5 69 + cmp #$3C ; CPU:$DF69 PRG:1F69 C9 3C + bcc @check_subunit ; CPU:$DF6B PRG:1F6B 90 CE - lda #$00 - sta $69 + lda #$00 ; CPU:$DF6D PRG:1F6D A9 00 + sta $69 ; CPU:$DF6F PRG:1F6F 85 69 - inc $68 + inc $68 ; CPU:$DF71 PRG:1F71 E6 68 - lda $68 - cmp #$09 - bcc @check_subunit + lda $68 ; CPU:$DF73 PRG:1F73 A5 68 + cmp #$09 ; CPU:$DF75 PRG:1F75 C9 09 + bcc @check_subunit ; CPU:$DF77 PRG:1F77 90 C2 - lda #$02 - sta $52 - bne @refresh_display + lda #$02 ; CPU:$DF79 PRG:1F79 A9 02 + sta $52 ; CPU:$DF7B PRG:1F7B 85 52 + bne @refresh_display ; CPU:$DF7D PRG:1F7D D0 C2 ; --------------------------------------------------------------------------- ; $DF7F-$DFA1: convert three consecutive values selected by X and store @@ -7050,34 +7049,34 @@ UpdateGlobalCounters: ; --------------------------------------------------------------------------- BuildDisplayValues: - lda $00,x - pha + lda $00,x ; CPU:$DF7F PRG:1F7F B5 00 + pha ; CPU:$DF81 PRG:1F81 48 - lda $01,x - pha + lda $01,x ; CPU:$DF82 PRG:1F82 B5 01 + pha ; CPU:$DF84 PRG:1F84 48 - lda $02,x - jsr DivideBy10 - stx $03D6 - sta $03D7 + lda $02,x ; CPU:$DF85 PRG:1F85 B5 02 + jsr DivideBy10 ; CPU:$DF87 PRG:1F87 20 A2 DF + stx $03D6 ; CPU:$DF8A PRG:1F8A 8E D6 03 + sta $03D7 ; CPU:$DF8D PRG:1F8D 8D D7 03 - pla - jsr DivideBy10 - stx $03D3 - sta $03D4 + pla ; CPU:$DF90 PRG:1F90 68 + jsr DivideBy10 ; CPU:$DF91 PRG:1F91 20 A2 DF + stx $03D3 ; CPU:$DF94 PRG:1F94 8E D3 03 + sta $03D4 ; CPU:$DF97 PRG:1F97 8D D4 03 - pla - jsr DivideBy10 - sta $03D1 + pla ; CPU:$DF9A PRG:1F9A 68 + jsr DivideBy10 ; CPU:$DF9B PRG:1F9B 20 A2 DF + sta $03D1 ; CPU:$DF9E PRG:1F9E 8D D1 03 - rts + rts ; CPU:$DFA1 PRG:1FA1 60 ; --------------------------------------------------------------------------- ; $DFA2: divide A by 10. ; --------------------------------------------------------------------------- DivideBy10: - ldx #$0A + ldx #$0A ; CPU:$DFA2 PRG:1FA2 A2 0A ; --------------------------------------------------------------------------- @@ -7089,19 +7088,19 @@ DivideBy10: ; --------------------------------------------------------------------------- DivideByX_DFA4: - stx $0F + stx $0F ; CPU:$DFA4 PRG:1FA4 86 0F - ldx #$00 + ldx #$00 ; CPU:$DFA6 PRG:1FA6 A2 00 @subtract: - inx - sec - sbc $0F - bpl @subtract + inx ; CPU:$DFA8 PRG:1FA8 E8 + sec ; CPU:$DFA9 PRG:1FA9 38 + sbc $0F ; CPU:$DFAA PRG:1FAA E5 0F + bpl @subtract ; CPU:$DFAC PRG:1FAC 10 FA - dex - adc $0F - rts + dex ; CPU:$DFAE PRG:1FAE CA + adc $0F ; CPU:$DFAF PRG:1FAF 65 0F + rts ; CPU:$DFB1 PRG:1FB1 60 ; --------------------------------------------------------------------------- ; $DFB2-$DFD4: derive per-slot $70 state from $B8 and table $D913. @@ -7109,198 +7108,198 @@ DivideByX_DFA4: ; --------------------------------------------------------------------------- UpdateSlot70: - ldy #$00 + ldy #$00 ; CPU:$DFB2 PRG:1FB2 A0 00 - lda $9C,x - bne @store + lda $9C,x ; CPU:$DFB4 PRG:1FB4 B5 9C + bne @store ; CPU:$DFB6 PRG:1FB6 D0 19 - lda $B8,x + lda $B8,x ; CPU:$DFB8 PRG:1FB8 B5 B8 @search_table: - cmp $D913,y - bmi @found + cmp $D913,y ; CPU:$DFBA PRG:1FBA D9 13 D9 + bmi @found ; CPU:$DFBD PRG:1FBD 30 07 - iny - cpy #$05 - bmi @search_table + iny ; CPU:$DFBF PRG:1FBF C8 + cpy #$05 ; CPU:$DFC0 PRG:1FC0 C0 05 + bmi @search_table ; CPU:$DFC2 PRG:1FC2 30 F6 - ldy #$00 + ldy #$00 ; CPU:$DFC4 PRG:1FC4 A0 00 @found: - tya - beq @store + tya ; CPU:$DFC6 PRG:1FC6 98 + beq @store ; CPU:$DFC7 PRG:1FC7 F0 08 - lda #$01 - cmp RiderMotionState,x - bne @store + lda #$01 ; CPU:$DFC9 PRG:1FC9 A9 01 + cmp RiderMotionState,x ; CPU:$DFCB PRG:1FCB D5 A4 + bne @store ; CPU:$DFCD PRG:1FCD D0 02 - iny - iny + iny ; CPU:$DFCF PRG:1FCF C8 + iny ; CPU:$DFD0 PRG:1FD0 C8 @store: - tya - sta $70,x + tya ; CPU:$DFD1 PRG:1FD1 98 + sta $70,x ; CPU:$DFD2 PRG:1FD2 95 70 - rts + rts ; CPU:$DFD4 PRG:1FD4 60 ; --------------------------------------------------------------------------- ; $DFD5-$E090: pairwise slot comparison/update. ; --------------------------------------------------------------------------- CompareRuntimeSlots: - ldx #$00 - ldy #$01 + ldx #$00 ; CPU:$DFD5 PRG:1FD5 A2 00 + ldy #$01 ; CPU:$DFD7 PRG:1FD7 A0 01 ; $DFD9 PairCheckX: - lda $A8,x - bne PairCheckY + lda $A8,x ; CPU:$DFD9 PRG:1FD9 B5 A8 + bne PairCheckY ; CPU:$DFDB PRG:1FDB D0 03 ; $DFDD PairNextXTrampoline: - jmp PairNextX + jmp PairNextX ; CPU:$DFDD PRG:1FDD 4C 86 E0 ; $DFE0 PairCheckY: - lda $A8,y - beq PairNextYTrampoline + lda $A8,y ; CPU:$DFE0 PRG:1FE0 B9 A8 00 + beq PairNextYTrampoline ; CPU:$DFE3 PRG:1FE3 F0 38 - lda $84,x - lsr a - bcc PairNextXTrampoline + lda $84,x ; CPU:$DFE5 PRG:1FE5 B5 84 + lsr a ; CPU:$DFE7 PRG:1FE7 4A + bcc PairNextXTrampoline ; CPU:$DFE8 PRG:1FE8 90 F3 - lda $84,y - lsr a - bcc PairNextYTrampoline + lda $84,y ; CPU:$DFEA PRG:1FEA B9 84 00 + lsr a ; CPU:$DFED PRG:1FED 4A + bcc PairNextYTrampoline ; CPU:$DFEE PRG:1FEE 90 2D - lda $70,x - beq PairNextXTrampoline + lda $70,x ; CPU:$DFF0 PRG:1FF0 B5 70 + beq PairNextXTrampoline ; CPU:$DFF2 PRG:1FF2 F0 E9 - cmp $70,y - bne PairNextYTrampoline + cmp $70,y ; CPU:$DFF4 PRG:1FF4 D9 70 00 + bne PairNextYTrampoline ; CPU:$DFF7 PRG:1FF7 D0 24 - lda $98,x - ora $03E0,x - bne PairNextXTrampoline + lda $98,x ; CPU:$DFF9 PRG:1FF9 B5 98 + ora $03E0,x ; CPU:$DFFB PRG:1FFB 1D E0 03 + bne PairNextXTrampoline ; CPU:$DFFE PRG:1FFE D0 DD - lda $98,y - bne PairNextY + lda $98,y ; CPU:$E000 PRG:2000 B9 98 00 + bne PairNextY ; CPU:$E003 PRG:2003 D0 79 - lda $B0,x - bne PairCompare8C + lda $B0,x ; CPU:$E005 PRG:2005 B5 B0 + bne PairCompare8C ; CPU:$E007 PRG:2007 D0 05 - lda $B0,y - beq PairCompare80 + lda $B0,y ; CPU:$E009 PRG:2009 B9 B0 00 + beq PairCompare80 ; CPU:$E00C PRG:200C F0 1C PairCompare8C: - lda $8C,x - cmp $8C,y - bcs PairCompare8CReverse + lda $8C,x ; CPU:$E00E PRG:200E B5 8C + cmp $8C,y ; CPU:$E010 PRG:2010 D9 8C 00 + bcs PairCompare8CReverse ; CPU:$E013 PRG:2013 B0 0B - jsr Add12UnlessHighE091 - cmp $8C,y - bcs PairCompare80 + jsr Add12UnlessHighE091 ; CPU:$E015 PRG:2015 20 91 E0 + cmp $8C,y ; CPU:$E018 PRG:2018 D9 8C 00 + bcs PairCompare80 ; CPU:$E01B PRG:201B B0 0D PairNextYTrampoline: - jmp PairNextY + jmp PairNextY ; CPU:$E01D PRG:201D 4C 7E E0 PairCompare8CReverse: - lda $8C,y - jsr Add12UnlessHighE091 - cmp $8C,x - bcc PairNextY + lda $8C,y ; CPU:$E020 PRG:2020 B9 8C 00 + jsr Add12UnlessHighE091 ; CPU:$E023 PRG:2023 20 91 E0 + cmp $8C,x ; CPU:$E026 PRG:2026 D5 8C + bcc PairNextY ; CPU:$E028 PRG:2028 90 54 PairCompare80: - lda $80,x - cmp $80,y - bcs PairCompare80Reverse + lda $80,x ; CPU:$E02A PRG:202A B5 80 + cmp $80,y ; CPU:$E02C PRG:202C D9 80 00 + bcs PairCompare80Reverse ; CPU:$E02F PRG:202F B0 14 - jsr Add2UnlessHighE098 - cmp $80,y - bcs PairMarkX + jsr Add2UnlessHighE098 ; CPU:$E031 PRG:2031 20 98 E0 + cmp $80,y ; CPU:$E034 PRG:2034 D9 80 00 + bcs PairMarkX ; CPU:$E037 PRG:2037 B0 28 - lda $80,x - jsr Add12UnlessHighE091 - cmp $80,y - bcs PairMarkXOnly + lda $80,x ; CPU:$E039 PRG:2039 B5 80 + jsr Add12UnlessHighE091 ; CPU:$E03B PRG:203B 20 91 E0 + cmp $80,y ; CPU:$E03E PRG:203E D9 80 00 + bcs PairMarkXOnly ; CPU:$E041 PRG:2041 B0 18 - bcc PairNextY + bcc PairNextY ; CPU:$E043 PRG:2043 90 39 PairCompare80Reverse: - lda $80,y - jsr Add2UnlessHighE098 - cmp $80,x - bcs PairMarkX + lda $80,y ; CPU:$E045 PRG:2045 B9 80 00 + jsr Add2UnlessHighE098 ; CPU:$E048 PRG:2048 20 98 E0 + cmp $80,x ; CPU:$E04B PRG:204B D5 80 + bcs PairMarkX ; CPU:$E04D PRG:204D B0 12 - lda $80,y - jsr Add12UnlessHighE091 - cmp $80,x - bcs PairMarkBoth + lda $80,y ; CPU:$E04F PRG:204F B9 80 00 + jsr Add12UnlessHighE091 ; CPU:$E052 PRG:2052 20 91 E0 + cmp $80,x ; CPU:$E055 PRG:2055 D5 80 + bcs PairMarkBoth ; CPU:$E057 PRG:2057 B0 0C - bcc PairNextY + bcc PairNextY ; CPU:$E059 PRG:2059 90 23 PairMarkXOnly: - lda #$FF - sta $98,x - bne PairAfterMark + lda #$FF ; CPU:$E05B PRG:205B A9 FF + sta $98,x ; CPU:$E05D PRG:205D 95 98 + bne PairAfterMark ; CPU:$E05F PRG:205F D0 15 PairMarkX: - lda #$FF - sta $98,x + lda #$FF ; CPU:$E061 PRG:2061 A9 FF + sta $98,x ; CPU:$E063 PRG:2063 95 98 PairMarkBoth: - cpx #$00 - bne PairSetY + cpx #$00 ; CPU:$E065 PRG:2065 E0 00 + bne PairSetY ; CPU:$E067 PRG:2067 D0 08 - cpy #$03 - bne PairSetY + cpy #$03 ; CPU:$E069 PRG:2069 C0 03 + bne PairSetY ; CPU:$E06B PRG:206B D0 04 - lda #$10 - sta $3B + lda #$10 ; CPU:$E06D PRG:206D A9 10 + sta $3B ; CPU:$E06F PRG:206F 85 3B PairSetY: - lda #$FF - sta $98,y + lda #$FF ; CPU:$E071 PRG:2071 A9 FF + sta $98,y ; CPU:$E073 PRG:2073 99 98 00 PairAfterMark: - cpx #$00 - bne PairNextY + cpx #$00 ; CPU:$E076 PRG:2076 E0 00 + bne PairNextY ; CPU:$E078 PRG:2078 D0 04 - lda #$01 - sta $FD + lda #$01 ; CPU:$E07A PRG:207A A9 01 + sta $FD ; CPU:$E07C PRG:207C 85 FD ; $E07E PairNextY: - iny - cpy #$04 - beq PairNextX + iny ; CPU:$E07E PRG:207E C8 + cpy #$04 ; CPU:$E07F PRG:207F C0 04 + beq PairNextX ; CPU:$E081 PRG:2081 F0 03 - jmp PairCheckY + jmp PairCheckY ; CPU:$E083 PRG:2083 4C E0 DF ; $E086 PairNextX: - inx - txa - tay - iny + inx ; CPU:$E086 PRG:2086 E8 + txa ; CPU:$E087 PRG:2087 8A + tay ; CPU:$E088 PRG:2088 A8 + iny ; CPU:$E089 PRG:2089 C8 - cpx #$03 - beq SharedReturnE097 + cpx #$03 ; CPU:$E08A PRG:208A E0 03 + beq SharedReturnE097 ; CPU:$E08C PRG:208C F0 09 - jmp PairCheckX + jmp PairCheckX ; CPU:$E08E PRG:208E 4C D9 DF @@ -7309,13 +7308,13 @@ PairNextX: ; --------------------------------------------------------------------------- Add12UnlessHighE091: - cmp #$E7 - bcs SharedReturnE097 + cmp #$E7 ; CPU:$E091 PRG:2091 C9 E7 + bcs SharedReturnE097 ; CPU:$E093 PRG:2093 B0 02 - adc #$0C + adc #$0C ; CPU:$E095 PRG:2095 69 0C SharedReturnE097: - rts + rts ; CPU:$E097 PRG:2097 60 ; --------------------------------------------------------------------------- @@ -7323,71 +7322,71 @@ SharedReturnE097: ; --------------------------------------------------------------------------- Add2UnlessHighE098: - cmp #$E7 - bcs @return + cmp #$E7 ; CPU:$E098 PRG:2098 C9 E7 + bcs @return ; CPU:$E09A PRG:209A B0 02 - adc #$02 + adc #$02 ; CPU:$E09C PRG:209C 69 02 @return: - rts + rts ; CPU:$E09E PRG:209E 60 ; --------------------------------------------------------------------------- ; $E09F-$E0E5: test slot-0 state/position conditions and update flags. ; --------------------------------------------------------------------------- CheckSlotState: - lda $9C - bne @return + lda $9C ; CPU:$E09F PRG:209F A5 9C + bne @return ; CPU:$E0A1 PRG:20A1 D0 42 - tax + tax ; CPU:$E0A3 PRG:20A3 AA - lda $87 - lsr a - bcc @return + lda $87 ; CPU:$E0A4 PRG:20A4 A5 87 + lsr a ; CPU:$E0A6 PRG:20A6 4A + bcc @return ; CPU:$E0A7 PRG:20A7 90 3C - lda $0373 - beq @return + lda $0373 ; CPU:$E0A9 PRG:20A9 AD 73 03 + beq @return ; CPU:$E0AC PRG:20AC F0 37 - lda $B8 - sec - sbc #$03 - cmp $6F - bcs @return + lda $B8 ; CPU:$E0AE PRG:20AE A5 B8 + sec ; CPU:$E0B0 PRG:20B0 38 + sbc #$03 ; CPU:$E0B1 PRG:20B1 E9 03 + cmp $6F ; CPU:$E0B3 PRG:20B3 C5 6F + bcs @return ; CPU:$E0B5 PRG:20B5 B0 2E - adc #$07 - cmp $6F - bcc @return + adc #$07 ; CPU:$E0B7 PRG:20B7 69 07 + cmp $6F ; CPU:$E0B9 PRG:20B9 C5 6F + bcc @return ; CPU:$E0BB PRG:20BB 90 28 - lda $80 - cmp $0393 - bcs @return + lda $80 ; CPU:$E0BD PRG:20BD A5 80 + cmp $0393 ; CPU:$E0BF PRG:20BF CD 93 03 + bcs @return ; CPU:$E0C2 PRG:20C2 B0 21 - adc #$12 - cmp $0393 - bcc @return + adc #$12 ; CPU:$E0C4 PRG:20C4 69 12 + cmp $0393 ; CPU:$E0C6 PRG:20C6 CD 93 03 + bcc @return ; CPU:$E0C9 PRG:20C9 90 1A - jsr CalculateSlotRemaining + jsr CalculateSlotRemaining ; CPU:$E0CB PRG:20CB 20 97 DC - sec - sbc #$08 - cmp $8C - bcs @return + sec ; CPU:$E0CE PRG:20CE 38 + sbc #$08 ; CPU:$E0CF PRG:20CF E9 08 + cmp $8C ; CPU:$E0D1 PRG:20D1 C5 8C + bcs @return ; CPU:$E0D3 PRG:20D3 B0 10 - ldy #$FF - sty $98 + ldy #$FF ; CPU:$E0D5 PRG:20D5 A0 FF + sty $98 ; CPU:$E0D7 PRG:20D7 84 98 - iny - sty $DF + iny ; CPU:$E0D9 PRG:20D9 C8 + sty $DF ; CPU:$E0DA PRG:20DA 84 DF - iny - sty $9F - sty $FD + iny ; CPU:$E0DC PRG:20DC C8 + sty $9F ; CPU:$E0DD PRG:20DD 84 9F + sty $FD ; CPU:$E0DF PRG:20DF 84 FD - iny - sty $039B + iny ; CPU:$E0E1 PRG:20E1 C8 + sty $039B ; CPU:$E0E2 PRG:20E2 8C 9B 03 @return: - rts + rts ; CPU:$E0E5 PRG:20E5 60 ; --------------------------------------------------------------------------- @@ -7398,71 +7397,71 @@ CheckSlotState: ; --------------------------------------------------------------------------- UpdateStructureGenerator: - lda $3A - ora $52 - ora $24 + lda $3A ; CPU:$E0E6 PRG:20E6 A5 3A + ora $52 ; CPU:$E0E8 PRG:20E8 05 52 + ora $24 ; CPU:$E0EA PRG:20EA 05 24 ; E0EC: D0 B0 = BNE $E09E ; Reuses the RTS at the end of the preceding helper. - .byte $D0, $B0 + .byte $D0, $B0 ; CPU:$E0EC PRG:20EC D0 B0 - lda $03A0 - bne StateE0E6UpdateE10A + lda $03A0 ; CPU:$E0EE PRG:20EE AD A0 03 + bne StateE0E6UpdateE10A ; CPU:$E0F1 PRG:20F1 D0 17 - lda $2E + lda $2E ; CPU:$E0F3 PRG:20F3 A5 2E ; E0F5: D0 A7 = BNE $E09E ; Reuses the same preceding RTS. - .byte $D0, $A7 + .byte $D0, $A7 ; CPU:$E0F5 PRG:20F5 D0 A7 - lda $18 - and #$03 - tax + lda $18 ; CPU:$E0F7 PRG:20F7 A5 18 + and #$03 ; CPU:$E0F9 PRG:20F9 29 03 + tax ; CPU:$E0FB PRG:20FB AA - lda $D8F3,x - sta $03A1 + lda $D8F3,x ; CPU:$E0FC PRG:20FC BD F3 D8 + sta $03A1 ; CPU:$E0FF PRG:20FF 8D A1 03 - lda #$F8 - sta $03B9 - sta $03A0 + lda #$F8 ; CPU:$E102 PRG:2102 A9 F8 + sta $03B9 ; CPU:$E104 PRG:2104 8D B9 03 + sta $03A0 ; CPU:$E107 PRG:2107 8D A0 03 ; $E10A StateE0E6UpdateE10A: - lda #$50 - sta $01 + lda #$50 ; CPU:$E10A PRG:210A A9 50 + sta $01 ; CPU:$E10C PRG:210C 85 01 - lda $03B9 - sec - sbc $60 - sta $03B9 + lda $03B9 ; CPU:$E10E PRG:210E AD B9 03 + sec ; CPU:$E111 PRG:2111 38 + sbc $60 ; CPU:$E112 PRG:2112 E5 60 + sta $03B9 ; CPU:$E114 PRG:2114 8D B9 03 - lda $60 - beq StateE0E6CheckPositionE124 + lda $60 ; CPU:$E117 PRG:2117 A5 60 + beq StateE0E6CheckPositionE124 ; CPU:$E119 PRG:2119 F0 09 - lda $3F - and #$0F - bne StateE0E6CheckPositionE124 + lda $3F ; CPU:$E11B PRG:211B A5 3F + and #$0F ; CPU:$E11D PRG:211D 29 0F + bne StateE0E6CheckPositionE124 ; CPU:$E11F PRG:211F D0 03 - dec $03B9 + dec $03B9 ; CPU:$E121 PRG:2121 CE B9 03 ; $E124 StateE0E6CheckPositionE124: - lda $03B9 - sta $00 + lda $03B9 ; CPU:$E124 PRG:2124 AD B9 03 + sta $00 ; CPU:$E127 PRG:2127 85 00 - cmp #$FC - bcc StateE0E6BuildStructureE139 + cmp #$FC ; CPU:$E129 PRG:2129 C9 FC + bcc StateE0E6BuildStructureE139 ; CPU:$E12B PRG:212B 90 0C - lda $18 - and #$A0 - sta $2E + lda $18 ; CPU:$E12D PRG:212D A5 18 + and #$A0 ; CPU:$E12F PRG:212F 29 A0 + sta $2E ; CPU:$E131 PRG:2131 85 2E - lda #$00 - sta $03A0 + lda #$00 ; CPU:$E133 PRG:2133 A9 00 + sta $03A0 ; CPU:$E135 PRG:2135 8D A0 03 - rts + rts ; CPU:$E138 PRG:2138 60 ; --------------------------------------------------------------------------- @@ -7471,40 +7470,40 @@ StateE0E6CheckPositionE124: ; --------------------------------------------------------------------------- StateE0E6BuildStructureE139: - lda $03A1 - sta $02 + lda $03A1 ; CPU:$E139 PRG:2139 AD A1 03 + sta $02 ; CPU:$E13C PRG:213C 85 02 - lda #$22 - sta $03 + lda #$22 ; CPU:$E13E PRG:213E A9 22 + sta $03 ; CPU:$E140 PRG:2140 85 03 - lda #$C0 - sta $04 + lda #$C0 ; CPU:$E142 PRG:2142 A9 C0 + sta $04 ; CPU:$E144 PRG:2144 85 04 - lda #$20 - sta $0B + lda #$20 ; CPU:$E146 PRG:2146 A9 20 + sta $0B ; CPU:$E148 PRG:2148 85 0B - jsr BuildIndirectStructure + jsr BuildIndirectStructure ; CPU:$E14A PRG:214A 20 C7 D1 - lda $03B9 - cmp #$60 - bcs StateE0E6ReturnE17E + lda $03B9 ; CPU:$E14D PRG:214D AD B9 03 + cmp #$60 ; CPU:$E150 PRG:2150 C9 60 + bcs StateE0E6ReturnE17E ; CPU:$E152 PRG:2152 B0 2A - ldx $03A1 - inx - inx - inx - stx $00 + ldx $03A1 ; CPU:$E154 PRG:2154 AE A1 03 + inx ; CPU:$E157 PRG:2157 E8 + inx ; CPU:$E158 PRG:2158 E8 + inx ; CPU:$E159 PRG:2159 E8 + stx $00 ; CPU:$E15A PRG:215A 86 00 - jsr WriteStructureE16C + jsr WriteStructureE16C ; CPU:$E15C PRG:215C 20 6C E1 - ldx $03A1 - inx - stx $00 + ldx $03A1 ; CPU:$E15F PRG:215F AE A1 03 + inx ; CPU:$E162 PRG:2162 E8 + stx $00 ; CPU:$E163 PRG:2163 86 00 - lda $04 - clc - adc #$08 - sta $04 + lda $04 ; CPU:$E165 PRG:2165 A5 04 + clc ; CPU:$E167 PRG:2167 18 + adc #$08 ; CPU:$E168 PRG:2168 69 08 + sta $04 ; CPU:$E16A PRG:216A 85 04 ; --------------------------------------------------------------------------- @@ -7515,64 +7514,64 @@ StateE0E6BuildStructureE139: ; --------------------------------------------------------------------------- WriteStructureE16C: - ldy #$06 + ldy #$06 ; CPU:$E16C PRG:216C A0 06 @write_loop: - lda #$60 - sta ($04),y + lda #$60 ; CPU:$E16E PRG:216E A9 60 + sta ($04),y ; CPU:$E170 PRG:2170 91 04 - dey + dey ; CPU:$E172 PRG:2172 88 - lda $00 - sta ($04),y + lda $00 ; CPU:$E173 PRG:2173 A5 00 + sta ($04),y ; CPU:$E175 PRG:2175 91 04 - dec $00 + dec $00 ; CPU:$E177 PRG:2177 C6 00 - dey - dey - dey - bpl @write_loop + dey ; CPU:$E179 PRG:2179 88 + dey ; CPU:$E17A PRG:217A 88 + dey ; CPU:$E17B PRG:217B 88 + bpl @write_loop ; CPU:$E17C PRG:217C 10 F0 ; $E17E StateE0E6ReturnE17E: - rts + rts ; CPU:$E17E PRG:217E 60 ; --------------------------------------------------------------------------- ; $E17F-$E1A2: process four indexed runtime entries. ; --------------------------------------------------------------------------- ProcessRuntimeEntries: - jsr SortRuntimeSlots + jsr SortRuntimeSlots ; CPU:$E17F PRG:217F 20 F4 E3 - ldx #$03 + ldx #$03 ; CPU:$E182 PRG:2182 A2 03 @entry_loop: - stx $0D + stx $0D ; CPU:$E184 PRG:2184 86 0D - lda $D8C0,x - sta $04 + lda $D8C0,x ; CPU:$E186 PRG:2186 BD C0 D8 + sta $04 ; CPU:$E189 PRG:2189 85 04 - lda $88,x - tax + lda $88,x ; CPU:$E18B PRG:218B B5 88 + tax ; CPU:$E18D PRG:218D AA - lda $A8,x - beq @next_entry + lda $A8,x ; CPU:$E18E PRG:218E B5 A8 + beq @next_entry ; CPU:$E190 PRG:2190 F0 0B - lda $D8C9,x - sta $0B + lda $D8C9,x ; CPU:$E192 PRG:2192 BD C9 D8 + sta $0B ; CPU:$E195 PRG:2195 85 0B - jsr BuildRuntimeEntry - jsr BuildSlotStructure + jsr BuildRuntimeEntry ; CPU:$E197 PRG:2197 20 A3 E1 + jsr BuildSlotStructure ; CPU:$E19A PRG:219A 20 6A E2 @next_entry: - ldx $0D - dex - bpl @entry_loop + ldx $0D ; CPU:$E19D PRG:219D A6 0D + dex ; CPU:$E19F PRG:219F CA + bpl @entry_loop ; CPU:$E1A0 PRG:21A0 10 E2 - rts + rts ; CPU:$E1A2 PRG:21A2 60 ; --------------------------------------------------------------------------- @@ -7584,87 +7583,87 @@ ProcessRuntimeEntries: ; --------------------------------------------------------------------------- BuildRuntimeEntry: - lda $80,x - sta $00 + lda $80,x ; CPU:$E1A3 PRG:21A3 B5 80 + sta $00 ; CPU:$E1A5 PRG:21A5 85 00 - lda $8C,x - sta $01 + lda $8C,x ; CPU:$E1A7 PRG:21A7 B5 8C + sta $01 ; CPU:$E1A9 PRG:21A9 85 01 - jsr GetRuntimeEntryType - tay + jsr GetRuntimeEntryType ; CPU:$E1AB PRG:21AB 20 F9 E1 + tay ; CPU:$E1AE PRG:21AE A8 - lda $D892,y - sta $02 + lda $D892,y ; CPU:$E1AF PRG:21AF B9 92 D8 + sta $02 ; CPU:$E1B2 PRG:21B2 85 02 - lda #$33 - sta $03 + lda #$33 ; CPU:$E1B4 PRG:21B4 A9 33 + sta $03 ; CPU:$E1B6 PRG:21B6 85 03 - cpy #$16 - bne EntryBuildDispatchE1D1 + cpy #$16 ; CPU:$E1B8 PRG:21B8 C0 16 + bne EntryBuildDispatchE1D1 ; CPU:$E1BA PRG:21BA D0 15 - lda $04 - sta $039F + lda $04 ; CPU:$E1BC PRG:21BC A5 04 + sta $039F ; CPU:$E1BE PRG:21BE 8D 9F 03 - clc - adc #$0C - sta $04 + clc ; CPU:$E1C1 PRG:21C1 18 + adc #$0C ; CPU:$E1C2 PRG:21C2 69 0C + sta $04 ; CPU:$E1C4 PRG:21C4 85 04 - lda $01 - clc - adc #$08 - sta $01 + lda $01 ; CPU:$E1C6 PRG:21C6 A5 01 + clc ; CPU:$E1C8 PRG:21C8 18 + adc #$08 ; CPU:$E1C9 PRG:21C9 69 08 + sta $01 ; CPU:$E1CB PRG:21CB 85 01 - lda #$23 - sta $03 + lda #$23 ; CPU:$E1CD PRG:21CD A9 23 + sta $03 ; CPU:$E1CF PRG:21CF 85 03 ; $E1D1 EntryBuildDispatchE1D1: - lda $D8A9,y - jsr BuildIndirectStructure + lda $D8A9,y ; CPU:$E1D1 PRG:21D1 B9 A9 D8 + jsr BuildIndirectStructure ; CPU:$E1D4 PRG:21D4 20 C7 D1 - lda $0E - beq EntryBuildReturnE1F8 + lda $0E ; CPU:$E1D7 PRG:21D7 A5 0E + beq EntryBuildReturnE1F8 ; CPU:$E1D9 PRG:21D9 F0 1D - lsr a - bcs EntryBuildAlternateE1F2 + lsr a ; CPU:$E1DB PRG:21DB 4A + bcs EntryBuildAlternateE1F2 ; CPU:$E1DC PRG:21DC B0 14 - ldy #$11 - lda #$B2 + ldy #$11 ; CPU:$E1DE PRG:21DE A0 11 + lda #$B2 ; CPU:$E1E0 PRG:21E0 A9 B2 ; $E1E2 EntryBuildWriteLoopE1E2: - cpy #$09 - beq EntryBuildDecrementYE1EB + cpy #$09 ; CPU:$E1E2 PRG:21E2 C0 09 + beq EntryBuildDecrementYE1EB ; CPU:$E1E4 PRG:21E4 F0 05 - sta ($04),y + sta ($04),y ; CPU:$E1E6 PRG:21E6 91 04 - sec - sbc #$01 + sec ; CPU:$E1E8 PRG:21E8 38 + sbc #$01 ; CPU:$E1E9 PRG:21E9 E9 01 ; $E1EB EntryBuildDecrementYE1EB: - dey - dey - dey - dey + dey ; CPU:$E1EB PRG:21EB 88 + dey ; CPU:$E1EC PRG:21EC 88 + dey ; CPU:$E1ED PRG:21ED 88 + dey ; CPU:$E1EE PRG:21EE 88 - bpl EntryBuildWriteLoopE1E2 + bpl EntryBuildWriteLoopE1E2 ; CPU:$E1EF PRG:21EF 10 F1 - rts + rts ; CPU:$E1F1 PRG:21F1 60 ; $E1F2 EntryBuildAlternateE1F2: - ldy #$15 + ldy #$15 ; CPU:$E1F2 PRG:21F2 A0 15 - lda #$AE - sta ($04),y + lda #$AE ; CPU:$E1F4 PRG:21F4 A9 AE + sta ($04),y ; CPU:$E1F6 PRG:21F6 91 04 ; $E1F8 EntryBuildReturnE1F8: - rts + rts ; CPU:$E1F8 PRG:21F8 60 ; --------------------------------------------------------------------------- @@ -7677,45 +7676,45 @@ EntryBuildReturnE1F8: ; --------------------------------------------------------------------------- GetRuntimeEntryType: - lda #$00 - sta $0E - sta $039F + lda #$00 ; CPU:$E1F9 PRG:21F9 A9 00 + sta $0E ; CPU:$E1FB PRG:21FB 85 0E + sta $039F ; CPU:$E1FD PRG:21FD 8D 9F 03 - lda $9C,x - beq EntryTypeAlternateE21F + lda $9C,x ; CPU:$E200 PRG:2200 B5 9C + beq EntryTypeAlternateE21F ; CPU:$E202 PRG:2202 F0 1B - cmp #$05 - beq EntryTypeAlternateE21F + cmp #$05 ; CPU:$E204 PRG:2204 C9 05 + beq EntryTypeAlternateE21F ; CPU:$E206 PRG:2206 F0 17 - ldy #$06 + ldy #$06 ; CPU:$E208 PRG:2208 A0 06 - lda $BC,x - bne EntryTypeUseTwoE213 + lda $BC,x ; CPU:$E20A PRG:220A B5 BC + bne EntryTypeUseTwoE213 ; CPU:$E20C PRG:220C D0 05 - lda $0370,x - bne EntryTypeHaveBaseE215 + lda $0370,x ; CPU:$E20E PRG:220E BD 70 03 + bne EntryTypeHaveBaseE215 ; CPU:$E211 PRG:2211 D0 02 ; $E213 EntryTypeUseTwoE213: - ldy #$02 + ldy #$02 ; CPU:$E213 PRG:2213 A0 02 ; $E215 EntryTypeHaveBaseE215: - tya + tya ; CPU:$E215 PRG:2215 98 - ldy $36,x - beq EntryTypeAddFlagE21C + ldy $36,x ; CPU:$E216 PRG:2216 B4 36 + beq EntryTypeAddFlagE21C ; CPU:$E218 PRG:2218 F0 02 - dey - tya + dey ; CPU:$E21A PRG:221A 88 + tya ; CPU:$E21B PRG:221B 98 ; $E21C EntryTypeAddFlagE21C: - ora #$10 - rts + ora #$10 ; CPU:$E21C PRG:221C 09 10 + rts ; CPU:$E21E PRG:221E 60 ; --------------------------------------------------------------------------- @@ -7724,88 +7723,88 @@ EntryTypeAddFlagE21C: ; --------------------------------------------------------------------------- EntryTypeAlternateE21F: - ldy $52 - dey + ldy $52 ; CPU:$E21F PRG:221F A4 52 + dey ; CPU:$E221 PRG:2221 88 ; E222: D0 0B = BNE $E22F - .byte $D0, $0B + .byte $D0, $0B ; CPU:$E222 PRG:2222 D0 0B - lda $AC,x - cmp #$0A + lda $AC,x ; CPU:$E224 PRG:2224 B5 AC + cmp #$0A ; CPU:$E226 PRG:2226 C9 0A ; E228: D0 05 = BNE $E22F - .byte $D0, $05 + .byte $D0, $05 ; CPU:$E228 PRG:2228 D0 05 - ldy #$02 - sty $0E + ldy #$02 ; CPU:$E22A PRG:222A A0 02 + sty $0E ; CPU:$E22C PRG:222C 84 0E - rts + rts ; CPU:$E22E PRG:222E 60 ; --------------------------------------------------------------------------- ; $E22F-$E269: derive a value from current slot state. ; --------------------------------------------------------------------------- GetSlotValue: - lda $98,x - ora $B0,x - bne SlotValueReturnACE267 + lda $98,x ; CPU:$E22F PRG:222F B5 98 + ora $B0,x ; CPU:$E231 PRG:2231 15 B0 + bne SlotValueReturnACE267 ; CPU:$E233 PRG:2233 D0 32 - lda $58,x - beq SlotValueCheckPositionE243 + lda $58,x ; CPU:$E235 PRG:2235 B5 58 + beq SlotValueCheckPositionE243 ; CPU:$E237 PRG:2237 F0 0A - cmp #$0D - bne SlotValueReturnACE267 + cmp #$0D ; CPU:$E239 PRG:2239 C9 0D + bne SlotValueReturnACE267 ; CPU:$E23B PRG:223B D0 2A - lda $B8,x - cmp #$20 - bcc SlotValueReturnACE267 + lda $B8,x ; CPU:$E23D PRG:223D B5 B8 + cmp #$20 ; CPU:$E23F PRG:223F C9 20 + bcc SlotValueReturnACE267 ; CPU:$E241 PRG:2241 90 24 ; $E243 SlotValueCheckPositionE243: - lda $90,x - ora $94,x - bne SlotValueCheckACE24D + lda $90,x ; CPU:$E243 PRG:2243 B5 90 + ora $94,x ; CPU:$E245 PRG:2245 15 94 + bne SlotValueCheckACE24D ; CPU:$E247 PRG:2247 D0 04 - inc $0E - bne SlotValueReturnACE267 + inc $0E ; CPU:$E249 PRG:2249 E6 0E + bne SlotValueReturnACE267 ; CPU:$E24B PRG:224B D0 1A ; $E24D SlotValueCheckACE24D: - lda $AC,x - cmp #$06 - bne SlotValueReturnACE267 + lda $AC,x ; CPU:$E24D PRG:224D B5 AC + cmp #$06 ; CPU:$E24F PRG:224F C9 06 + bne SlotValueReturnACE267 ; CPU:$E251 PRG:2251 D0 14 - ldy #$14 + ldy #$14 ; CPU:$E253 PRG:2253 A0 14 - lda $DC,x - beq SlotValueCheckGlobalE25E + lda $DC,x ; CPU:$E255 PRG:2255 B5 DC + beq SlotValueCheckGlobalE25E ; CPU:$E257 PRG:2257 F0 05 - bpl SlotValueReturnYE25C + bpl SlotValueReturnYE25C ; CPU:$E259 PRG:2259 10 01 - iny + iny ; CPU:$E25B PRG:225B C8 ; $E25C SlotValueReturnYE25C: - tya - rts + tya ; CPU:$E25C PRG:225C 98 + rts ; CPU:$E25D PRG:225D 60 ; $E25E SlotValueCheckGlobalE25E: - lda $3F - and #$02 - beq SlotValueReturnACE267 + lda $3F ; CPU:$E25E PRG:225E A5 3F + and #$02 ; CPU:$E260 PRG:2260 29 02 + beq SlotValueReturnACE267 ; CPU:$E262 PRG:2262 F0 03 - lda #$13 - rts + lda #$13 ; CPU:$E264 PRG:2264 A9 13 + rts ; CPU:$E266 PRG:2266 60 ; $E267 SlotValueReturnACE267: - lda $AC,x - rts + lda $AC,x ; CPU:$E267 PRG:2267 B5 AC + rts ; CPU:$E269 PRG:2269 60 ; --------------------------------------------------------------------------- @@ -7814,63 +7813,63 @@ SlotValueReturnACE267: ; --------------------------------------------------------------------------- BuildSlotStructure: - lda $039F + lda $039F ; CPU:$E26A PRG:226A AD 9F 03 ; E26D: F0 FA = BEQ $E269 - .byte $F0, $FA + .byte $F0, $FA ; CPU:$E26D PRG:226D F0 FA - lda $84,x - cmp #$02 + lda $84,x ; CPU:$E26F PRG:226F B5 84 + cmp #$02 ; CPU:$E271 PRG:2271 C9 02 ; E273: F0 F4 = BEQ $E269 - .byte $F0, $F4 + .byte $F0, $F4 ; CPU:$E273 PRG:2273 F0 F4 - lda $0390,x - cmp #$F8 + lda $0390,x ; CPU:$E275 PRG:2275 BD 90 03 + cmp #$F8 ; CPU:$E278 PRG:2278 C9 F8 ; E27A: B0 ED = BCS $E269 - .byte $B0, $ED + .byte $B0, $ED ; CPU:$E27A PRG:227A B0 ED - cmp $80,x + cmp $80,x ; CPU:$E27C PRG:227C D5 80 ; E27E: 90 E9 = BCC $E269 - .byte $90, $E9 + .byte $90, $E9 ; CPU:$E27E PRG:227E 90 E9 - lda $0390,x - sta $00 + lda $0390,x ; CPU:$E280 PRG:2280 BD 90 03 + sta $00 ; CPU:$E283 PRG:2283 85 00 - lda #$A8 - sec - sbc $6C,x - sta $01 + lda #$A8 ; CPU:$E285 PRG:2285 A9 A8 + sec ; CPU:$E287 PRG:2287 38 + sbc $6C,x ; CPU:$E288 PRG:2288 F5 6C + sta $01 ; CPU:$E28A PRG:228A 85 01 - lda #$22 - sta $03 + lda #$22 ; CPU:$E28C PRG:228C A9 22 + sta $03 ; CPU:$E28E PRG:228E 85 03 - lda $039F - sta $04 + lda $039F ; CPU:$E290 PRG:2290 AD 9F 03 + sta $04 ; CPU:$E293 PRG:2293 85 04 - lda RiderMotionState,x - beq @combine_flags + lda RiderMotionState,x ; CPU:$E295 PRG:2295 B5 A4 + beq @combine_flags ; CPU:$E297 PRG:2297 F0 02 - lda #$20 + lda #$20 ; CPU:$E299 PRG:2299 A9 20 @combine_flags: - ora $0B - sta $0B + ora $0B ; CPU:$E29B PRG:229B 05 0B + sta $0B ; CPU:$E29D PRG:229D 85 0B - ldy $0398,x + ldy $0398,x ; CPU:$E29F PRG:229F BC 98 03 - lda $D90B,y - sta $02 + lda $D90B,y ; CPU:$E2A2 PRG:22A2 B9 0B D9 + sta $02 ; CPU:$E2A5 PRG:22A5 85 02 - tya - beq @dispatch + tya ; CPU:$E2A7 PRG:22A7 98 + beq @dispatch ; CPU:$E2A8 PRG:22A8 F0 02 - eor #$03 + eor #$03 ; CPU:$E2AA PRG:22AA 49 03 @dispatch: - jmp BuildIndirectStructure + jmp BuildIndirectStructure ; CPU:$E2AC PRG:22AC 4C C7 D1 ; --------------------------------------------------------------------------- @@ -7879,55 +7878,55 @@ BuildSlotStructure: ; --------------------------------------------------------------------------- UpdateStructureState: - lda $03BD - sec - sbc $60 - sta $03BD - bcs @no_borrow + lda $03BD ; CPU:$E2AF PRG:22AF AD BD 03 + sec ; CPU:$E2B2 PRG:22B2 38 + sbc $60 ; CPU:$E2B3 PRG:22B3 E5 60 + sta $03BD ; CPU:$E2B5 PRG:22B5 8D BD 03 + bcs @no_borrow ; CPU:$E2B8 PRG:22B8 B0 03 - dec $03BE + dec $03BE ; CPU:$E2BA PRG:22BA CE BE 03 @no_borrow: - ldy $52 - beq @continue + ldy $52 ; CPU:$E2BD PRG:22BD A4 52 + beq @continue ; CPU:$E2BF PRG:22BF F0 0F - dey + dey ; CPU:$E2C1 PRG:22C1 88 ; E2C2: D0 A5 = BNE $E269 - .byte $D0, $A5 + .byte $D0, $A5 ; CPU:$E2C2 PRG:22C2 D0 A5 - lda $20 - bne @continue + lda $20 ; CPU:$E2C4 PRG:22C4 A5 20 + bne @continue ; CPU:$E2C6 PRG:22C6 D0 08 - lda $03BB - eor #$01 - sta $03BB + lda $03BB ; CPU:$E2C8 PRG:22C8 AD BB 03 + eor #$01 ; CPU:$E2CB PRG:22CB 49 01 + sta $03BB ; CPU:$E2CD PRG:22CD 8D BB 03 @continue: - ldy $03BE - dey - bne SlotSpritesCheckBCE303 + ldy $03BE ; CPU:$E2D0 PRG:22D0 AC BE 03 + dey ; CPU:$E2D3 PRG:22D3 88 + bne SlotSpritesCheckBCE303 ; CPU:$E2D4 PRG:22D4 D0 2D - lda $03BD - sta $00 + lda $03BD ; CPU:$E2D6 PRG:22D6 AD BD 03 + sta $00 ; CPU:$E2D9 PRG:22D9 85 00 - lda #$50 - sta $01 + lda #$50 ; CPU:$E2DB PRG:22DB A9 50 + sta $01 ; CPU:$E2DD PRG:22DD 85 01 - ldy $03BB - lda $D8E5,y - sta $02 + ldy $03BB ; CPU:$E2DF PRG:22DF AC BB 03 + lda $D8E5,y ; CPU:$E2E2 PRG:22E2 B9 E5 D8 + sta $02 ; CPU:$E2E5 PRG:22E5 85 02 - lda #$32 - sta $03 + lda #$32 ; CPU:$E2E7 PRG:22E7 A9 32 + sta $03 ; CPU:$E2E9 PRG:22E9 85 03 - lda #$C0 - sta $04 + lda #$C0 ; CPU:$E2EB PRG:22EB A9 C0 + sta $04 ; CPU:$E2ED PRG:22ED 85 04 - lda #$00 - sta $0B + lda #$00 ; CPU:$E2EF PRG:22EF A9 00 + sta $0B ; CPU:$E2F1 PRG:22F1 85 0B - jmp BuildIndirectStructure + jmp BuildIndirectStructure ; CPU:$E2F3 PRG:22F3 4C C7 D1 ; --------------------------------------------------------------------------- @@ -7941,78 +7940,78 @@ UpdateStructureState: ; --------------------------------------------------------------------------- BuildSlotSprites: - lda $036C,x - beq SlotSpritesReturnE358 + lda $036C,x ; CPU:$E2F6 PRG:22F6 BD 6C 03 + beq SlotSpritesReturnE358 ; CPU:$E2F9 PRG:22F9 F0 5D - lda $94,x - ora $90,x - beq SlotSpritesReturnE358 + lda $94,x ; CPU:$E2FB PRG:22FB B5 94 + ora $90,x ; CPU:$E2FD PRG:22FD 15 90 + beq SlotSpritesReturnE358 ; CPU:$E2FF PRG:22FF F0 57 - lda $BC,x + lda $BC,x ; CPU:$E301 PRG:2301 B5 BC ; $E303 SlotSpritesCheckBCE303: - bne SlotSpritesReturnE358 + bne SlotSpritesReturnE358 ; CPU:$E303 PRG:2303 D0 53 - lda $84,x - lsr a - bcc SlotSpritesReturnE358 + lda $84,x ; CPU:$E305 PRG:2305 B5 84 + lsr a ; CPU:$E307 PRG:2307 4A + bcc SlotSpritesReturnE358 ; CPU:$E308 PRG:2308 90 4E - lda $80,x - cmp #$10 - bcc SlotSpritesReturnE358 + lda $80,x ; CPU:$E30A PRG:230A B5 80 + cmp #$10 ; CPU:$E30C PRG:230C C9 10 + bcc SlotSpritesReturnE358 ; CPU:$E30E PRG:230E 90 48 - clc - adc #$F9 - sta $0297,y + clc ; CPU:$E310 PRG:2310 18 + adc #$F9 ; CPU:$E311 PRG:2311 69 F9 + sta $0297,y ; CPU:$E313 PRG:2313 99 97 02 - clc - adc #$F8 - sta $029B,y + clc ; CPU:$E316 PRG:2316 18 + adc #$F8 ; CPU:$E317 PRG:2317 69 F8 + sta $029B,y ; CPU:$E319 PRG:2319 99 9B 02 - lda $8C,x - clc - adc #$08 - sta $0298,y + lda $8C,x ; CPU:$E31C PRG:231C B5 8C + clc ; CPU:$E31E PRG:231E 18 + adc #$08 ; CPU:$E31F PRG:231F 69 08 + sta $0298,y ; CPU:$E321 PRG:2321 99 98 02 - clc - adc #$08 - sta $0294,y + clc ; CPU:$E324 PRG:2324 18 + adc #$08 ; CPU:$E325 PRG:2325 69 08 + sta $0294,y ; CPU:$E327 PRG:2327 99 94 02 - lda #$F6 - sta $0295,y + lda #$F6 ; CPU:$E32A PRG:232A A9 F6 + sta $0295,y ; CPU:$E32C PRG:232C 99 95 02 - lda #$F7 - sta $0299,y + lda #$F7 ; CPU:$E32F PRG:232F A9 F7 + sta $0299,y ; CPU:$E331 PRG:2331 99 99 02 - lda $3F - and #$04 - beq @tiles_ready + lda $3F ; CPU:$E334 PRG:2334 A5 3F + and #$04 ; CPU:$E336 PRG:2336 29 04 + beq @tiles_ready ; CPU:$E338 PRG:2338 F0 0A - lda #$F7 - sta $0295,y + lda #$F7 ; CPU:$E33A PRG:233A A9 F7 + sta $0295,y ; CPU:$E33C PRG:233C 99 95 02 - lda #$F6 - sta $0299,y + lda #$F6 ; CPU:$E33F PRG:233F A9 F6 + sta $0299,y ; CPU:$E341 PRG:2341 99 99 02 @tiles_ready: - lda $036C,x - and #$02 - sta $0296,y - sta $029A,y + lda $036C,x ; CPU:$E344 PRG:2344 BD 6C 03 + and #$02 ; CPU:$E347 PRG:2347 29 02 + sta $0296,y ; CPU:$E349 PRG:2349 99 96 02 + sta $029A,y ; CPU:$E34C PRG:234C 99 9A 02 - lda $94,x - bne SlotSpritesReturnE358 + lda $94,x ; CPU:$E34F PRG:234F B5 94 + bne SlotSpritesReturnE358 ; CPU:$E351 PRG:2351 D0 05 - lda #$F8 - sta $0298,y + lda #$F8 ; CPU:$E353 PRG:2353 A9 F8 + sta $0298,y ; CPU:$E355 PRG:2355 99 98 02 ; $E358 SlotSpritesReturnE358: - rts + rts ; CPU:$E358 PRG:2358 60 ; --------------------------------------------------------------------------- ; $E359-$E3F3 @@ -8020,144 +8019,144 @@ SlotSpritesReturnE358: ; --------------------------------------------------------------------------- UpdateGlobalDisplay: - lda $52 - bne GlobalDisplayBuildE3C6 + lda $52 ; CPU:$E359 PRG:2359 A5 52 + bne GlobalDisplayBuildE3C6 ; CPU:$E35B PRG:235B D0 69 - lda $03E0 - beq GlobalDisplaySelectIndexE36B + lda $03E0 ; CPU:$E35D PRG:235D AD E0 03 + beq GlobalDisplaySelectIndexE36B ; CPU:$E360 PRG:2360 F0 09 - lda $3C - lsr a - bcs GlobalDisplayBuildE3C6 + lda $3C ; CPU:$E362 PRG:2362 A5 3C + lsr a ; CPU:$E364 PRG:2364 4A + bcs GlobalDisplayBuildE3C6 ; CPU:$E365 PRG:2365 B0 5F - lda #$FC - bne GlobalDisplayStore01E3C8 + lda #$FC ; CPU:$E367 PRG:2367 A9 FC + bne GlobalDisplayStore01E3C8 ; CPU:$E369 PRG:2369 D0 5D ; $E36B GlobalDisplaySelectIndexE36B: - lda $5C - and #$C0 - beq GlobalDisplayIndexReadyE37A + lda $5C ; CPU:$E36B PRG:236B A5 5C + and #$C0 ; CPU:$E36D PRG:236D 29 C0 + beq GlobalDisplayIndexReadyE37A ; CPU:$E36F PRG:236F F0 09 - ldy $4F - bne GlobalDisplayRotateE377 + ldy $4F ; CPU:$E371 PRG:2371 A4 4F + bne GlobalDisplayRotateE377 ; CPU:$E373 PRG:2373 D0 02 - lda #$80 + lda #$80 ; CPU:$E375 PRG:2375 A9 80 ; $E377 GlobalDisplayRotateE377: - asl a - rol a - rol a + asl a ; CPU:$E377 PRG:2377 0A + rol a ; CPU:$E378 PRG:2378 2A + rol a ; CPU:$E379 PRG:2379 2A ; $E37A GlobalDisplayIndexReadyE37A: - tay + tay ; CPU:$E37A PRG:237A A8 - lda $03B6 - cmp $D8FB,y - bcc GlobalDisplayIncreaseE39B - beq GlobalDisplayFinalizeE3AA + lda $03B6 ; CPU:$E37B PRG:237B AD B6 03 + cmp $D8FB,y ; CPU:$E37E PRG:237E D9 FB D8 + bcc GlobalDisplayIncreaseE39B ; CPU:$E381 PRG:2381 90 18 + beq GlobalDisplayFinalizeE3AA ; CPU:$E383 PRG:2383 F0 25 - lda $03B5 - sec - sbc #$0B - sta $03B5 - bcs GlobalDisplayFinalizeE3AA + lda $03B5 ; CPU:$E385 PRG:2385 AD B5 03 + sec ; CPU:$E388 PRG:2388 38 + sbc #$0B ; CPU:$E389 PRG:2389 E9 0B + sta $03B5 ; CPU:$E38B PRG:238B 8D B5 03 + bcs GlobalDisplayFinalizeE3AA ; CPU:$E38E PRG:238E B0 1A - lda $03B6 - beq GlobalDisplayFinalizeE3AA + lda $03B6 ; CPU:$E390 PRG:2390 AD B6 03 + beq GlobalDisplayFinalizeE3AA ; CPU:$E393 PRG:2393 F0 15 - dec $03B6 - jmp GlobalDisplayFinalizeE3AA + dec $03B6 ; CPU:$E395 PRG:2395 CE B6 03 + jmp GlobalDisplayFinalizeE3AA ; CPU:$E398 PRG:2398 4C AA E3 ; $E39B GlobalDisplayIncreaseE39B: - lda $03B5 - clc - adc $D8F7,y - sta $03B5 - bcc GlobalDisplayFinalizeE3AA + lda $03B5 ; CPU:$E39B PRG:239B AD B5 03 + clc ; CPU:$E39E PRG:239E 18 + adc $D8F7,y ; CPU:$E39F PRG:239F 79 F7 D8 + sta $03B5 ; CPU:$E3A2 PRG:23A2 8D B5 03 + bcc GlobalDisplayFinalizeE3AA ; CPU:$E3A5 PRG:23A5 90 03 - inc $03B6 + inc $03B6 ; CPU:$E3A7 PRG:23A7 EE B6 03 ; $E3AA GlobalDisplayFinalizeE3AA: - ldx #$00 + ldx #$00 ; CPU:$E3AA PRG:23AA A2 00 - lda $03B6 - cmp #$20 - bcc GlobalDisplayCheck1AE3B8 + lda $03B6 ; CPU:$E3AC PRG:23AC AD B6 03 + cmp #$20 ; CPU:$E3AF PRG:23AF C9 20 + bcc GlobalDisplayCheck1AE3B8 ; CPU:$E3B1 PRG:23B1 90 05 - sta $3C - sta $03E0 + sta $3C ; CPU:$E3B3 PRG:23B3 85 3C + sta $03E0 ; CPU:$E3B5 PRG:23B5 8D E0 03 ; $E3B8 GlobalDisplayCheck1AE3B8: - cmp #$1A - bcc GlobalDisplayCombineFCE3C1 + cmp #$1A ; CPU:$E3B8 PRG:23B8 C9 1A + bcc GlobalDisplayCombineFCE3C1 ; CPU:$E3BA PRG:23BA 90 05 - dey - bne GlobalDisplayCombineFCE3C1 + dey ; CPU:$E3BC PRG:23BC 88 + bne GlobalDisplayCombineFCE3C1 ; CPU:$E3BD PRG:23BD D0 02 - ldx #$B0 + ldx #$B0 ; CPU:$E3BF PRG:23BF A2 B0 ; $E3C1 GlobalDisplayCombineFCE3C1: - txa - ora $FC - sta $FC + txa ; CPU:$E3C1 PRG:23C1 8A + ora $FC ; CPU:$E3C2 PRG:23C2 05 FC + sta $FC ; CPU:$E3C4 PRG:23C4 85 FC ; $E3C6 GlobalDisplayBuildE3C6: - lda #$FE + lda #$FE ; CPU:$E3C6 PRG:23C6 A9 FE ; $E3C8 GlobalDisplayStore01E3C8: - sta $01 + sta $01 ; CPU:$E3C8 PRG:23C8 85 01 - lda $03B6 - clc - adc #$50 - sta $00 + lda $03B6 ; CPU:$E3CA PRG:23CA AD B6 03 + clc ; CPU:$E3CD PRG:23CD 18 + adc #$50 ; CPU:$E3CE PRG:23CE 69 50 + sta $00 ; CPU:$E3D0 PRG:23D0 85 00 - ldx #$0C + ldx #$0C ; CPU:$E3D2 PRG:23D2 A2 0C ; $E3D4 GlobalDisplayOamLoopE3D4: - lda #$CF - sta $02F0,x + lda #$CF ; CPU:$E3D4 PRG:23D4 A9 CF + sta $02F0,x ; CPU:$E3D6 PRG:23D6 9D F0 02 - lda $01 - sta $02F1,x + lda $01 ; CPU:$E3D9 PRG:23D9 A5 01 + sta $02F1,x ; CPU:$E3DB PRG:23DB 9D F1 02 - lda #$20 - sta $02F2,x + lda #$20 ; CPU:$E3DE PRG:23DE A9 20 + sta $02F2,x ; CPU:$E3E0 PRG:23E0 9D F2 02 - lda $00 - sta $02F3,x + lda $00 ; CPU:$E3E3 PRG:23E3 A5 00 + sta $02F3,x ; CPU:$E3E5 PRG:23E5 9D F3 02 - clc - adc #$08 - sta $00 + clc ; CPU:$E3E8 PRG:23E8 18 + adc #$08 ; CPU:$E3E9 PRG:23E9 69 08 + sta $00 ; CPU:$E3EB PRG:23EB 85 00 - dex - dex - dex - dex - bpl GlobalDisplayOamLoopE3D4 + dex ; CPU:$E3ED PRG:23ED CA + dex ; CPU:$E3EE PRG:23EE CA + dex ; CPU:$E3EF PRG:23EF CA + dex ; CPU:$E3F0 PRG:23F0 CA + bpl GlobalDisplayOamLoopE3D4 ; CPU:$E3F1 PRG:23F1 10 E1 - rts + rts ; CPU:$E3F3 PRG:23F3 60 ; --------------------------------------------------------------------------- ; $E3F4-$E42A @@ -8166,210 +8165,210 @@ GlobalDisplayOamLoopE3D4: ; --------------------------------------------------------------------------- SortRuntimeSlots: - ldx #$03 + ldx #$03 ; CPU:$E3F4 PRG:23F4 A2 03 @initialize: - txa - sta $88,x + txa ; CPU:$E3F6 PRG:23F6 8A + sta $88,x ; CPU:$E3F7 PRG:23F7 95 88 - lda $B8,x - sta $00,x + lda $B8,x ; CPU:$E3F9 PRG:23F9 B5 B8 + sta $00,x ; CPU:$E3FB PRG:23FB 95 00 - dex - bpl @initialize + dex ; CPU:$E3FD PRG:23FD CA + bpl @initialize ; CPU:$E3FE PRG:23FE 10 F6 - lda $0373 - beq @start_sort + lda $0373 ; CPU:$E400 PRG:2400 AD 73 03 + beq @start_sort ; CPU:$E403 PRG:2403 F0 04 - lda $6F - sta $03 + lda $6F ; CPU:$E405 PRG:2405 A5 6F + sta $03 ; CPU:$E407 PRG:2407 85 03 @start_sort: - ldx #$03 - stx $0D + ldx #$03 ; CPU:$E409 PRG:2409 A2 03 + stx $0D ; CPU:$E40B PRG:240B 86 0D @outer_loop: - ldy #$00 + ldy #$00 ; CPU:$E40D PRG:240D A0 00 @inner_loop: - ldx $88,y - lda $00,x + ldx $88,y ; CPU:$E40F PRG:240F B6 88 + lda $00,x ; CPU:$E411 PRG:2411 B5 00 - ldx $89,y - cmp $00,x - bcc @no_swap + ldx $89,y ; CPU:$E413 PRG:2413 B6 89 + cmp $00,x ; CPU:$E415 PRG:2415 D5 00 + bcc @no_swap ; CPU:$E417 PRG:2417 90 08 - lda $0088,y - sta $0089,y - stx $88,y + lda $0088,y ; CPU:$E419 PRG:2419 B9 88 00 + sta $0089,y ; CPU:$E41C PRG:241C 99 89 00 + stx $88,y ; CPU:$E41F PRG:241F 96 88 @no_swap: - iny - cpy $0D - bne @inner_loop + iny ; CPU:$E421 PRG:2421 C8 + cpy $0D ; CPU:$E422 PRG:2422 C4 0D + bne @inner_loop ; CPU:$E424 PRG:2424 D0 E9 - dec $0D - bne @outer_loop + dec $0D ; CPU:$E426 PRG:2426 C6 0D + bne @outer_loop ; CPU:$E428 PRG:2428 D0 E3 - rts + rts ; CPU:$E42A PRG:242A 60 ; --------------------------------------------------------------------------- ; $E42B-$E455: process four sorted runtime slots. ; --------------------------------------------------------------------------- ProcessSortedSlots: - lda $03A3 - beq @return + lda $03A3 ; CPU:$E42B PRG:242B AD A3 03 + beq @return ; CPU:$E42E PRG:242E F0 25 - ldx #$03 + ldx #$03 ; CPU:$E430 PRG:2430 A2 03 @slot_loop: - lda $88,x - beq @next_slot + lda $88,x ; CPU:$E432 PRG:2432 B5 88 + beq @next_slot ; CPU:$E434 PRG:2434 F0 14 - cmp #$03 - bne @process_slot + cmp #$03 ; CPU:$E436 PRG:2436 C9 03 + bne @process_slot ; CPU:$E438 PRG:2438 D0 05 - lda $0373 - bne @next_slot + lda $0373 ; CPU:$E43A PRG:243A AD 73 03 + bne @next_slot ; CPU:$E43D PRG:243D D0 0B @process_slot: - lda $D8C0,x - sta $07 + lda $D8C0,x ; CPU:$E43F PRG:243F BD C0 D8 + sta $07 ; CPU:$E442 PRG:2442 85 07 - ldy $03B3 - jsr WriteSlotPattern + ldy $03B3 ; CPU:$E444 PRG:2444 AC B3 03 + jsr WriteSlotPattern ; CPU:$E447 PRG:2447 20 AD E4 @next_slot: - dex - bpl @slot_loop + dex ; CPU:$E44A PRG:244A CA + bpl @slot_loop ; CPU:$E44B PRG:244B 10 E5 - lda $03B3 - eor #$02 - sta $03B3 + lda $03B3 ; CPU:$E44D PRG:244D AD B3 03 + eor #$02 ; CPU:$E450 PRG:2450 49 02 + sta $03B3 ; CPU:$E452 PRG:2452 8D B3 03 @return: - rts + rts ; CPU:$E455 PRG:2455 60 ; --------------------------------------------------------------------------- ; $E456-$E49A: prepare/process four sorted slot entries. ; --------------------------------------------------------------------------- PrepareSortedSlots: - ldy #$03 + ldy #$03 ; CPU:$E456 PRG:2456 A0 03 @slot_loop: - sty $05 + sty $05 ; CPU:$E458 PRG:2458 84 05 - lda $D8C0,y - sta $07 + lda $D8C0,y ; CPU:$E45A PRG:245A B9 C0 D8 + sta $07 ; CPU:$E45D PRG:245D 85 07 - lda $0088,y - beq @next_slot + lda $0088,y ; CPU:$E45F PRG:245F B9 88 00 + beq @next_slot ; CPU:$E462 PRG:2462 F0 31 - tax + tax ; CPU:$E464 PRG:2464 AA - lda $84,x - sta $02 - sta $03 - sta $04 + lda $84,x ; CPU:$E465 PRG:2465 B5 84 + sta $02 ; CPU:$E467 PRG:2467 85 02 + sta $03 ; CPU:$E469 PRG:2469 85 03 + sta $04 ; CPU:$E46B PRG:246B 85 04 - lsr a - bcs @adjust + lsr a ; CPU:$E46D PRG:246D 4A + bcs @adjust ; CPU:$E46E PRG:246E B0 14 - lda $80,x - cmp #$70 - bcc @adjust + lda $80,x ; CPU:$E470 PRG:2470 B5 80 + cmp #$70 ; CPU:$E472 PRG:2472 C9 70 + bcc @adjust ; CPU:$E474 PRG:2474 90 0E - cmp #$90 - bcs @adjust + cmp #$90 ; CPU:$E476 PRG:2476 C9 90 + bcs @adjust ; CPU:$E478 PRG:2478 B0 0A - jsr ResetSlotState + jsr ResetSlotState ; CPU:$E47A PRG:247A 20 95 DB - lda #$01 - sta $03A6 - bne @process + lda #$01 ; CPU:$E47D PRG:247D A9 01 + sta $03A6 ; CPU:$E47F PRG:247F 8D A6 03 + bne @process ; CPU:$E482 PRG:2482 D0 0E @adjust: - lda $80,x - cmp #$F8 - bcc @check_second + lda $80,x ; CPU:$E484 PRG:2484 B5 80 + cmp #$F8 ; CPU:$E486 PRG:2486 C9 F8 + bcc @check_second ; CPU:$E488 PRG:2488 90 02 - inc $03 + inc $03 ; CPU:$E48A PRG:248A E6 03 @check_second: - cmp #$F0 - bcc @process + cmp #$F0 ; CPU:$E48C PRG:248C C9 F0 + bcc @process ; CPU:$E48E PRG:248E 90 02 - inc $04 + inc $04 ; CPU:$E490 PRG:2490 E6 04 @process: - jsr ProcessSlotBits + jsr ProcessSlotBits ; CPU:$E492 PRG:2492 20 9B E4 @next_slot: - ldy $05 - dey - bpl @slot_loop + ldy $05 ; CPU:$E495 PRG:2495 A4 05 + dey ; CPU:$E497 PRG:2497 88 + bpl @slot_loop ; CPU:$E498 PRG:2498 10 BE - rts + rts ; CPU:$E49A PRG:249A 60 ; --------------------------------------------------------------------------- ; $E49B-$E4AC: process each clear low-bit field in $02-$04. ; --------------------------------------------------------------------------- ProcessSlotBits: - ldx #$00 + ldx #$00 ; CPU:$E49B PRG:249B A2 00 @loop: - lda $02,x - lsr a - bcs @next + lda $02,x ; CPU:$E49D PRG:249D B5 02 + lsr a ; CPU:$E49F PRG:249F 4A + bcs @next ; CPU:$E4A0 PRG:24A0 B0 05 - txa - tay - jsr WriteSlotPattern + txa ; CPU:$E4A2 PRG:24A2 8A + tay ; CPU:$E4A3 PRG:24A3 A8 + jsr WriteSlotPattern ; CPU:$E4A4 PRG:24A4 20 AD E4 @next: - inx - cpx #$03 - bcc @loop + inx ; CPU:$E4A7 PRG:24A7 E8 + cpx #$03 ; CPU:$E4A8 PRG:24A8 E0 03 + bcc @loop ; CPU:$E4AA PRG:24AA 90 F1 - rts + rts ; CPU:$E4AC PRG:24AC 60 ; --------------------------------------------------------------------------- ; $E4AD-$E4C7: write $F8 into three four-byte-spaced entries. ; --------------------------------------------------------------------------- WriteSlotPattern: - lda #$02 - sta $01 + lda #$02 ; CPU:$E4AD PRG:24AD A9 02 + sta $01 ; CPU:$E4AF PRG:24AF 85 01 - lda $07 - clc - adc $D8DC,y - sta $00 + lda $07 ; CPU:$E4B1 PRG:24B1 A5 07 + clc ; CPU:$E4B3 PRG:24B3 18 + adc $D8DC,y ; CPU:$E4B4 PRG:24B4 79 DC D8 + sta $00 ; CPU:$E4B7 PRG:24B7 85 00 - ldy #$00 - lda #$F8 + ldy #$00 ; CPU:$E4B9 PRG:24B9 A0 00 + lda #$F8 ; CPU:$E4BB PRG:24BB A9 F8 @write_loop: - sta ($00),y + sta ($00),y ; CPU:$E4BD PRG:24BD 91 00 - iny - iny - iny - iny + iny ; CPU:$E4BF PRG:24BF C8 + iny ; CPU:$E4C0 PRG:24C0 C8 + iny ; CPU:$E4C1 PRG:24C1 C8 + iny ; CPU:$E4C2 PRG:24C2 C8 - cpy #$0C - bcc @write_loop + cpy #$0C ; CPU:$E4C3 PRG:24C3 C0 0C + bcc @write_loop ; CPU:$E4C5 PRG:24C5 90 F6 - rts + rts ; CPU:$E4C7 PRG:24C7 60 ; --------------------------------------------------------------------------- ; $E4C8-$E52B @@ -8379,111 +8378,111 @@ WriteSlotPattern: ; --------------------------------------------------------------------------- UpdateSlotPairState: - ldx #$01 + ldx #$01 ; CPU:$E4C8 PRG:24C8 A2 01 ; $E4CA SlotPairOuterE4CA: - stx $0C + stx $0C ; CPU:$E4CA PRG:24CA 86 0C - lda $84,x - lsr a - bcs SlotPairStartInnerE4D9 + lda $84,x ; CPU:$E4CC PRG:24CC B5 84 + lsr a ; CPU:$E4CE PRG:24CE 4A + bcs SlotPairStartInnerE4D9 ; CPU:$E4CF PRG:24CF B0 08 - bne SlotPairNextOuterE50A + bne SlotPairNextOuterE50A ; CPU:$E4D1 PRG:24D1 D0 37 - lda $80,x - cmp #$F8 - bcc SlotPairNextOuterE50A + lda $80,x ; CPU:$E4D3 PRG:24D3 B5 80 + cmp #$F8 ; CPU:$E4D5 PRG:24D5 C9 F8 + bcc SlotPairNextOuterE50A ; CPU:$E4D7 PRG:24D7 90 31 ; $E4D9 SlotPairStartInnerE4D9: - lda #$00 - sta $0A + lda #$00 ; CPU:$E4D9 PRG:24D9 A9 00 + sta $0A ; CPU:$E4DB PRG:24DB 85 0A - txa - tay - iny + txa ; CPU:$E4DD PRG:24DD 8A + tay ; CPU:$E4DE PRG:24DE A8 + iny ; CPU:$E4DF PRG:24DF C8 SlotPairInnerE4E2: - sty $05 + sty $05 ; CPU:$E4E0 PRG:24E0 84 05 - lda $84,y - lsr a - bcs SlotPairCompareE4F0 + lda $84,y ; CPU:$E4E2 PRG:24E2 B9 84 00 + lsr a ; CPU:$E4E5 PRG:24E5 4A + bcs SlotPairCompareE4F0 ; CPU:$E4E6 PRG:24E6 B0 08 - bne SlotPairNextInnerE4FF + bne SlotPairNextInnerE4FF ; CPU:$E4E8 PRG:24E8 D0 15 - lda $80,x - cmp #$F8 - bcc SlotPairNextInnerE4FF + lda $80,x ; CPU:$E4EA PRG:24EA B5 80 + cmp #$F8 ; CPU:$E4EC PRG:24EC C9 F8 + bcc SlotPairNextInnerE4FF ; CPU:$E4EE PRG:24EE 90 0F ; $E4F0 SlotPairCompareE4F0: - jsr CompareSlotDistance - beq SlotPairNextInnerE4FF + jsr CompareSlotDistance ; CPU:$E4F0 PRG:24F0 20 2C E5 + beq SlotPairNextInnerE4FF ; CPU:$E4F3 PRG:24F3 F0 0A - inc $0A + inc $0A ; CPU:$E4F5 PRG:24F5 E6 0A - lda $0B - asl a - asl a - ora $05 - sta $0B + lda $0B ; CPU:$E4F7 PRG:24F7 A5 0B + asl a ; CPU:$E4F9 PRG:24F9 0A + asl a ; CPU:$E4FA PRG:24FA 0A + ora $05 ; CPU:$E4FB PRG:24FB 05 05 + sta $0B ; CPU:$E4FD PRG:24FD 85 0B ; $E4FF SlotPairNextInnerE4FF: - iny - cpy #$04 - bcc SlotPairInnerE4E2 + iny ; CPU:$E4FF PRG:24FF C8 + cpy #$04 ; CPU:$E500 PRG:2500 C0 04 + bcc SlotPairInnerE4E2 ; CPU:$E502 PRG:2502 90 DC - lda $0A - cmp #$02 - bcs SlotPairMultipleE513 + lda $0A ; CPU:$E504 PRG:2504 A5 0A + cmp #$02 ; CPU:$E506 PRG:2506 C9 02 + bcs SlotPairMultipleE513 ; CPU:$E508 PRG:2508 B0 09 ; $E50A SlotPairNextOuterE50A: - ldx $0C - dex - bpl SlotPairOuterE4CA + ldx $0C ; CPU:$E50A PRG:250A A6 0C + dex ; CPU:$E50C PRG:250C CA + bpl SlotPairOuterE4CA ; CPU:$E50D PRG:250D 10 BB - lda #$00 - beq SlotPairStoreStateE528 + lda #$00 ; CPU:$E50F PRG:250F A9 00 + beq SlotPairStoreStateE528 ; CPU:$E511 PRG:2511 F0 15 ; $E513 SlotPairMultipleE513: - bne SlotPairSetStateE526 + bne SlotPairSetStateE526 ; CPU:$E513 PRG:2513 D0 11 - lda $0B - pha + lda $0B ; CPU:$E515 PRG:2515 A5 0B + pha ; CPU:$E517 PRG:2517 48 - and #$03 - tay + and #$03 ; CPU:$E518 PRG:2518 29 03 + tay ; CPU:$E51A PRG:251A A8 - pla - lsr a - lsr a - and #$03 - tax + pla ; CPU:$E51B PRG:251B 68 + lsr a ; CPU:$E51C PRG:251C 4A + lsr a ; CPU:$E51D PRG:251D 4A + and #$03 ; CPU:$E51E PRG:251E 29 03 + tax ; CPU:$E520 PRG:2520 AA - jsr CompareSlotDistance - beq SlotPairNextOuterE50A + jsr CompareSlotDistance ; CPU:$E521 PRG:2521 20 2C E5 + beq SlotPairNextOuterE50A ; CPU:$E524 PRG:2524 F0 E4 ; $E526 SlotPairSetStateE526: - lda #$01 + lda #$01 ; CPU:$E526 PRG:2526 A9 01 ; $E528 SlotPairStoreStateE528: - sta $03A3 - rts + sta $03A3 ; CPU:$E528 PRG:2528 8D A3 03 + rts ; CPU:$E52B PRG:252B 60 ; --------------------------------------------------------------------------- ; $E52C-$E53C @@ -8492,20 +8491,20 @@ SlotPairStoreStateE528: ; --------------------------------------------------------------------------- CompareSlotDistance: - lda $8C,x - sec - sbc $008C,y + lda $8C,x ; CPU:$E52C PRG:252C B5 8C + sec ; CPU:$E52E PRG:252E 38 + sbc $008C,y ; CPU:$E52F PRG:252F F9 8C 00 - cmp #$EC - bcs @return + cmp #$EC ; CPU:$E532 PRG:2532 C9 EC + bcs @return ; CPU:$E534 PRG:2534 B0 06 - cmp #$12 - bcc @return + cmp #$12 ; CPU:$E536 PRG:2536 C9 12 + bcc @return ; CPU:$E538 PRG:2538 90 02 - lda #$00 + lda #$00 ; CPU:$E53A PRG:253A A9 00 @return: - rts + rts ; CPU:$E53C PRG:253C 60 ; --------------------------------------------------------------------------- @@ -8516,7 +8515,7 @@ CompareSlotDistance: ; --------------------------------------------------------------------------- SlotPositionThresholdTableE53D: - .byte $0E, $1A, $26, $32 + .byte $0E, $1A, $26, $32 ; CPU:$E53D PRG:253D 0E 1A 26 32 ; --------------------------------------------------------------------------- @@ -8525,8 +8524,8 @@ SlotPositionThresholdTableE53D: ; --------------------------------------------------------------------------- DataTableE541: - .byte $DD, $DC, $DB, $7C, $74, $6C, $90 - .byte $88, $80, $78, $70, $68, $60 + .byte $DD, $DC, $DB, $7C, $74, $6C, $90 ; CPU:$E541 PRG:2541 DD DC DB 7C + .byte $88, $80, $78, $70, $68, $60 ; CPU:$E548 PRG:2548 88 80 78 70 ; --------------------------------------------------------------------------- @@ -8543,7 +8542,7 @@ DataTableE541: ; --------------------------------------------------------------------------- PointerLowTableE54E: - .byte $00, $40, $80, $C0, $00, $40 + .byte $00, $40, $80, $C0, $00, $40 ; CPU:$E54E PRG:254E 00 40 80 C0 ; --------------------------------------------------------------------------- @@ -8552,7 +8551,7 @@ PointerLowTableE54E: ; --------------------------------------------------------------------------- PointerHighTableE554: - .byte $04, $04, $04, $04, $05, $05 + .byte $04, $04, $04, $04, $05, $05 ; CPU:$E554 PRG:2554 04 04 04 04 ; --------------------------------------------------------------------------- @@ -8564,11 +8563,11 @@ PointerHighTableE554: ; --------------------------------------------------------------------------- ScriptPointerLowContinuationE55A: - .byte $84, $99, $99, $A6 - .byte $BB, $D0, $E5, $F8 - .byte $0B, $1E, $31, $3E - .byte $49, $52, $67, $84 - .byte $86, $89, $89, $8C + .byte $84, $99, $99, $A6 ; CPU:$E55A PRG:255A 84 99 99 A6 + .byte $BB, $D0, $E5, $F8 ; CPU:$E55E PRG:255E BB D0 E5 F8 + .byte $0B, $1E, $31, $3E ; CPU:$E562 PRG:2562 0B 1E 31 3E + .byte $49, $52, $67, $84 ; CPU:$E566 PRG:2566 49 52 67 84 + .byte $86, $89, $89, $8C ; CPU:$E56A PRG:256A 86 89 89 8C ; --------------------------------------------------------------------------- @@ -8579,12 +8578,12 @@ ScriptPointerLowContinuationE55A: ; --------------------------------------------------------------------------- ScriptPointerHighTableE56E: - .byte $97 - .byte $E5, $E5, $E5, $E5 - .byte $E5, $E5, $E5, $E5 - .byte $E6, $E6, $E6, $E6 - .byte $E6, $E6, $E6, $E6 - .byte $E6, $E6, $E6, $E6 + .byte $97 ; CPU:$E56E PRG:256E 97 + .byte $E5, $E5, $E5, $E5 ; CPU:$E56F PRG:256F E5 E5 E5 E5 + .byte $E5, $E5, $E5, $E5 ; CPU:$E573 PRG:2573 E5 E5 E5 E5 + .byte $E6, $E6, $E6, $E6 ; CPU:$E577 PRG:2577 E6 E6 E6 E6 + .byte $E6, $E6, $E6, $E6 ; CPU:$E57B PRG:257B E6 E6 E6 E6 + .byte $E6, $E6, $E6, $E6 ; CPU:$E57F PRG:257F E6 E6 E6 E6 ; --------------------------------------------------------------------------- @@ -8593,7 +8592,7 @@ ScriptPointerHighTableE56E: ; Keep binary-backed for now. ; This byte must be magical ; --------------------------------------------------------------------------- - .byte $E6 + .byte $E6 ; CPU:$E583 PRG:2583 E6 ; --------------------------------------------------------------------------- ; $E584-$E598 @@ -8603,17 +8602,17 @@ ScriptPointerHighTableE56E: ; --------------------------------------------------------------------------- ScriptE584: - .byte $04, $87 - .byte $08, $88 - .byte $08, $44 - .byte $29, $06 - .byte $29, $00 - .byte $31, $85 - .byte $35, $84 - .byte $35, $45 - .byte $51, $00 - .byte $52, $86 - .byte $FF + .byte $04, $87 ; CPU:$E584 PRG:2584 04 87 + .byte $08, $88 ; CPU:$E586 PRG:2586 08 88 + .byte $08, $44 ; CPU:$E588 PRG:2588 08 44 + .byte $29, $06 ; CPU:$E58A PRG:258A 29 06 + .byte $29, $00 ; CPU:$E58C PRG:258C 29 00 + .byte $31, $85 ; CPU:$E58E PRG:258E 31 85 + .byte $35, $84 ; CPU:$E590 PRG:2590 35 84 + .byte $35, $45 ; CPU:$E592 PRG:2592 35 45 + .byte $51, $00 ; CPU:$E594 PRG:2594 51 00 + .byte $52, $86 ; CPU:$E596 PRG:2596 52 86 + .byte $FF ; CPU:$E598 PRG:2598 FF ; --------------------------------------------------------------------------- @@ -8625,13 +8624,13 @@ ScriptE584: ; --------------------------------------------------------------------------- ScriptE599: - .byte $04, $07 - .byte $04, $88 - .byte $0C, $86 - .byte $10, $83 - .byte $14, $85 - .byte $16, $86 - .byte $FF + .byte $04, $07 ; CPU:$E599 PRG:2599 04 07 + .byte $04, $88 ; CPU:$E59B PRG:259B 04 88 + .byte $0C, $86 ; CPU:$E59D PRG:259D 0C 86 + .byte $10, $83 ; CPU:$E59F PRG:259F 10 83 + .byte $14, $85 ; CPU:$E5A1 PRG:25A1 14 85 + .byte $16, $86 ; CPU:$E5A3 PRG:25A3 16 86 + .byte $FF ; CPU:$E5A5 PRG:25A5 FF ; --------------------------------------------------------------------------- @@ -8642,17 +8641,17 @@ ScriptE599: ; --------------------------------------------------------------------------- ScriptE5A6: - .byte $04, $88 - .byte $0A, $89 - .byte $0A, $42 - .byte $20, $06 - .byte $22, $00 - .byte $30, $08 - .byte $50, $84 - .byte $52, $83 - .byte $54, $43 - .byte $6C, $00 - .byte $FF + .byte $04, $88 ; CPU:$E5A6 PRG:25A6 04 88 + .byte $0A, $89 ; CPU:$E5A8 PRG:25A8 0A 89 + .byte $0A, $42 ; CPU:$E5AA PRG:25AA 0A 42 + .byte $20, $06 ; CPU:$E5AC PRG:25AC 20 06 + .byte $22, $00 ; CPU:$E5AE PRG:25AE 22 00 + .byte $30, $08 ; CPU:$E5B0 PRG:25B0 30 08 + .byte $50, $84 ; CPU:$E5B2 PRG:25B2 50 84 + .byte $52, $83 ; CPU:$E5B4 PRG:25B4 52 83 + .byte $54, $43 ; CPU:$E5B6 PRG:25B6 54 43 + .byte $6C, $00 ; CPU:$E5B8 PRG:25B8 6C 00 + .byte $FF ; CPU:$E5BA PRG:25BA FF ; --------------------------------------------------------------------------- @@ -8663,17 +8662,17 @@ ScriptE5A6: ; --------------------------------------------------------------------------- ScriptE5BB: - .byte $04, $88 - .byte $0A, $89 - .byte $0A, $42 - .byte $23, $06 - .byte $2A, $00 - .byte $2F, $84 - .byte $33, $83 - .byte $34, $43 - .byte $53, $00 - .byte $55, $86 - .byte $FF + .byte $04, $88 ; CPU:$E5BB PRG:25BB 04 88 + .byte $0A, $89 ; CPU:$E5BD PRG:25BD 0A 89 + .byte $0A, $42 ; CPU:$E5BF PRG:25BF 0A 42 + .byte $23, $06 ; CPU:$E5C1 PRG:25C1 23 06 + .byte $2A, $00 ; CPU:$E5C3 PRG:25C3 2A 00 + .byte $2F, $84 ; CPU:$E5C5 PRG:25C5 2F 84 + .byte $33, $83 ; CPU:$E5C7 PRG:25C7 33 83 + .byte $34, $43 ; CPU:$E5C9 PRG:25C9 34 43 + .byte $53, $00 ; CPU:$E5CB PRG:25CB 53 00 + .byte $55, $86 ; CPU:$E5CD PRG:25CD 55 86 + .byte $FF ; CPU:$E5CF PRG:25CF FF ; --------------------------------------------------------------------------- @@ -8684,17 +8683,17 @@ ScriptE5BB: ; --------------------------------------------------------------------------- ScriptE5D0: - .byte $04, $88 - .byte $0A, $89 - .byte $0A, $42 - .byte $17, $06 - .byte $1A, $00 - .byte $1F, $84 - .byte $23, $83 - .byte $23, $43 - .byte $35, $00 - .byte $37, $86 - .byte $FF + .byte $04, $88 ; CPU:$E5D0 PRG:25D0 04 88 + .byte $0A, $89 ; CPU:$E5D2 PRG:25D2 0A 89 + .byte $0A, $42 ; CPU:$E5D4 PRG:25D4 0A 42 + .byte $17, $06 ; CPU:$E5D6 PRG:25D6 17 06 + .byte $1A, $00 ; CPU:$E5D8 PRG:25D8 1A 00 + .byte $1F, $84 ; CPU:$E5DA PRG:25DA 1F 84 + .byte $23, $83 ; CPU:$E5DC PRG:25DC 23 83 + .byte $23, $43 ; CPU:$E5DE PRG:25DE 23 43 + .byte $35, $00 ; CPU:$E5E0 PRG:25E0 35 00 + .byte $37, $86 ; CPU:$E5E2 PRG:25E2 37 86 + .byte $FF ; CPU:$E5E4 PRG:25E4 FF ; --------------------------------------------------------------------------- @@ -8705,16 +8704,16 @@ ScriptE5D0: ; --------------------------------------------------------------------------- ScriptE5E5: - .byte $04, $88 - .byte $0A, $89 - .byte $0A, $42 - .byte $12, $06 - .byte $12, $00 - .byte $1A, $83 - .byte $1B, $43 - .byte $24, $00 - .byte $26, $86 - .byte $FF + .byte $04, $88 ; CPU:$E5E5 PRG:25E5 04 88 + .byte $0A, $89 ; CPU:$E5E7 PRG:25E7 0A 89 + .byte $0A, $42 ; CPU:$E5E9 PRG:25E9 0A 42 + .byte $12, $06 ; CPU:$E5EB PRG:25EB 12 06 + .byte $12, $00 ; CPU:$E5ED PRG:25ED 12 00 + .byte $1A, $83 ; CPU:$E5EF PRG:25EF 1A 83 + .byte $1B, $43 ; CPU:$E5F1 PRG:25F1 1B 43 + .byte $24, $00 ; CPU:$E5F3 PRG:25F3 24 00 + .byte $26, $86 ; CPU:$E5F5 PRG:25F5 26 86 + .byte $FF ; CPU:$E5F7 PRG:25F7 FF ; --------------------------------------------------------------------------- @@ -8725,16 +8724,16 @@ ScriptE5E5: ; --------------------------------------------------------------------------- ScriptE5F8: - .byte $04, $88 - .byte $0A, $89 - .byte $0A, $42 - .byte $22, $06 - .byte $22, $00 - .byte $2A, $82 - .byte $2B, $4A - .byte $38, $00 - .byte $3A, $86 - .byte $FF + .byte $04, $88 ; CPU:$E5F8 PRG:25F8 04 88 + .byte $0A, $89 ; CPU:$E5FA PRG:25FA 0A 89 + .byte $0A, $42 ; CPU:$E5FC PRG:25FC 0A 42 + .byte $22, $06 ; CPU:$E5FE PRG:25FE 22 06 + .byte $22, $00 ; CPU:$E600 PRG:2600 22 00 + .byte $2A, $82 ; CPU:$E602 PRG:2602 2A 82 + .byte $2B, $4A ; CPU:$E604 PRG:2604 2B 4A + .byte $38, $00 ; CPU:$E606 PRG:2606 38 00 + .byte $3A, $86 ; CPU:$E608 PRG:2608 3A 86 + .byte $FF ; CPU:$E60A PRG:260A FF ; --------------------------------------------------------------------------- @@ -8745,16 +8744,16 @@ ScriptE5F8: ; --------------------------------------------------------------------------- ScriptE60B: - .byte $04, $88 - .byte $0A, $8B - .byte $0B, $49 - .byte $17, $06 - .byte $17, $00 - .byte $25, $83 - .byte $26, $43 - .byte $3B, $00 - .byte $3D, $86 - .byte $FF + .byte $04, $88 ; CPU:$E60B PRG:260B 04 88 + .byte $0A, $8B ; CPU:$E60D PRG:260D 0A 8B + .byte $0B, $49 ; CPU:$E60F PRG:260F 0B 49 + .byte $17, $06 ; CPU:$E611 PRG:2611 17 06 + .byte $17, $00 ; CPU:$E613 PRG:2613 17 00 + .byte $25, $83 ; CPU:$E615 PRG:2615 25 83 + .byte $26, $43 ; CPU:$E617 PRG:2617 26 43 + .byte $3B, $00 ; CPU:$E619 PRG:2619 3B 00 + .byte $3D, $86 ; CPU:$E61B PRG:261B 3D 86 + .byte $FF ; CPU:$E61D PRG:261D FF ; --------------------------------------------------------------------------- @@ -8765,16 +8764,16 @@ ScriptE60B: ; --------------------------------------------------------------------------- ScriptE61E: - .byte $04, $8B - .byte $08, $49 - .byte $18, $06 - .byte $18, $00 - .byte $1F, $84 - .byte $20, $82 - .byte $25, $4A - .byte $35, $00 - .byte $37, $86 - .byte $FF + .byte $04, $8B ; CPU:$E61E PRG:261E 04 8B + .byte $08, $49 ; CPU:$E620 PRG:2620 08 49 + .byte $18, $06 ; CPU:$E622 PRG:2622 18 06 + .byte $18, $00 ; CPU:$E624 PRG:2624 18 00 + .byte $1F, $84 ; CPU:$E626 PRG:2626 1F 84 + .byte $20, $82 ; CPU:$E628 PRG:2628 20 82 + .byte $25, $4A ; CPU:$E62A PRG:262A 25 4A + .byte $35, $00 ; CPU:$E62C PRG:262C 35 00 + .byte $37, $86 ; CPU:$E62E PRG:262E 37 86 + .byte $FF ; CPU:$E630 PRG:2630 FF ; --------------------------------------------------------------------------- @@ -8785,13 +8784,13 @@ ScriptE61E: ; --------------------------------------------------------------------------- ScriptE631: - .byte $02, $01 - .byte $04, $88 - .byte $0A, $89 - .byte $0A, $42 - .byte $1A, $06 - .byte $1A, $00 - .byte $FF + .byte $02, $01 ; CPU:$E631 PRG:2631 02 01 + .byte $04, $88 ; CPU:$E633 PRG:2633 04 88 + .byte $0A, $89 ; CPU:$E635 PRG:2635 0A 89 + .byte $0A, $42 ; CPU:$E637 PRG:2637 0A 42 + .byte $1A, $06 ; CPU:$E639 PRG:2639 1A 06 + .byte $1A, $00 ; CPU:$E63B PRG:263B 1A 00 + .byte $FF ; CPU:$E63D PRG:263D FF ; --------------------------------------------------------------------------- @@ -8802,12 +8801,12 @@ ScriptE631: ; --------------------------------------------------------------------------- ScriptE63E: - .byte $04, $8B - .byte $08, $49 - .byte $18, $06 - .byte $1A, $00 - .byte $1F, $0B - .byte $FF + .byte $04, $8B ; CPU:$E63E PRG:263E 04 8B + .byte $08, $49 ; CPU:$E640 PRG:2640 08 49 + .byte $18, $06 ; CPU:$E642 PRG:2642 18 06 + .byte $1A, $00 ; CPU:$E644 PRG:2644 1A 00 + .byte $1F, $0B ; CPU:$E646 PRG:2646 1F 0B + .byte $FF ; CPU:$E648 PRG:2648 FF ; --------------------------------------------------------------------------- @@ -8818,11 +8817,11 @@ ScriptE63E: ; --------------------------------------------------------------------------- ScriptE649: - .byte $0D, $0C - .byte $17, $0C - .byte $28, $0C - .byte $2B, $0C - .byte $FF + .byte $0D, $0C ; CPU:$E649 PRG:2649 0D 0C + .byte $17, $0C ; CPU:$E64B PRG:264B 17 0C + .byte $28, $0C ; CPU:$E64D PRG:264D 28 0C + .byte $2B, $0C ; CPU:$E64F PRG:264F 2B 0C + .byte $FF ; CPU:$E651 PRG:2651 FF ; --------------------------------------------------------------------------- @@ -8833,17 +8832,17 @@ ScriptE649: ; --------------------------------------------------------------------------- ScriptE652: - .byte $04, $8B - .byte $08, $49 - .byte $22, $06 - .byte $22, $00 - .byte $22, $14 - .byte $30, $0F - .byte $31, $83 - .byte $32, $82 - .byte $33, $4A - .byte $4B, $00 - .byte $FF + .byte $04, $8B ; CPU:$E652 PRG:2652 04 8B + .byte $08, $49 ; CPU:$E654 PRG:2654 08 49 + .byte $22, $06 ; CPU:$E656 PRG:2656 22 06 + .byte $22, $00 ; CPU:$E658 PRG:2658 22 00 + .byte $22, $14 ; CPU:$E65A PRG:265A 22 14 + .byte $30, $0F ; CPU:$E65C PRG:265C 30 0F + .byte $31, $83 ; CPU:$E65E PRG:265E 31 83 + .byte $32, $82 ; CPU:$E660 PRG:2660 32 82 + .byte $33, $4A ; CPU:$E662 PRG:2662 33 4A + .byte $4B, $00 ; CPU:$E664 PRG:2664 4B 00 + .byte $FF ; CPU:$E666 PRG:2666 FF ; --------------------------------------------------------------------------- @@ -8854,21 +8853,21 @@ ScriptE652: ; --------------------------------------------------------------------------- ScriptE667: - .byte $00, $0B - .byte $18, $06 - .byte $18, $84 - .byte $1A, $83 - .byte $1A, $43 - .byte $3B, $00 - .byte $42, $10 - .byte $43, $85 - .byte $48, $84 - .byte $4A, $83 - .byte $4A, $43 - .byte $5A, $00 - .byte $5A, $0E - .byte $5C, $86 - .byte $FF + .byte $00, $0B ; CPU:$E667 PRG:2667 00 0B + .byte $18, $06 ; CPU:$E669 PRG:2669 18 06 + .byte $18, $84 ; CPU:$E66B PRG:266B 18 84 + .byte $1A, $83 ; CPU:$E66D PRG:266D 1A 83 + .byte $1A, $43 ; CPU:$E66F PRG:266F 1A 43 + .byte $3B, $00 ; CPU:$E671 PRG:2671 3B 00 + .byte $42, $10 ; CPU:$E673 PRG:2673 42 10 + .byte $43, $85 ; CPU:$E675 PRG:2675 43 85 + .byte $48, $84 ; CPU:$E677 PRG:2677 48 84 + .byte $4A, $83 ; CPU:$E679 PRG:2679 4A 83 + .byte $4A, $43 ; CPU:$E67B PRG:267B 4A 43 + .byte $5A, $00 ; CPU:$E67D PRG:267D 5A 00 + .byte $5A, $0E ; CPU:$E67F PRG:267F 5A 0E + .byte $5C, $86 ; CPU:$E681 PRG:2681 5C 86 + .byte $FF ; CPU:$E683 PRG:2683 FF ; --------------------------------------------------------------------------- @@ -8880,11 +8879,11 @@ ScriptE667: ; --------------------------------------------------------------------------- ScriptE684: - .byte $0E, $0D + .byte $0E, $0D ; CPU:$E684 PRG:2684 0E 0D ScriptE686: - .byte $0F, $0E - .byte $FF + .byte $0F, $0E ; CPU:$E686 PRG:2686 0F 0E + .byte $FF ; CPU:$E688 PRG:2688 FF ; --------------------------------------------------------------------------- @@ -8893,8 +8892,8 @@ ScriptE686: ; --------------------------------------------------------------------------- ScriptE689: - .byte $00, $12 - .byte $FF + .byte $00, $12 ; CPU:$E689 PRG:2689 00 12 + .byte $FF ; CPU:$E68B PRG:268B FF ; --------------------------------------------------------------------------- @@ -8903,12 +8902,12 @@ ScriptE689: ; --------------------------------------------------------------------------- ScriptE68C: - .byte $04, $88 - .byte $0A, $89 - .byte $0A, $42 - .byte $1A, $13 - .byte $1A, $00 - .byte $FF + .byte $04, $88 ; CPU:$E68C PRG:268C 04 88 + .byte $0A, $89 ; CPU:$E68E PRG:268E 0A 89 + .byte $0A, $42 ; CPU:$E690 PRG:2690 0A 42 + .byte $1A, $13 ; CPU:$E692 PRG:2692 1A 13 + .byte $1A, $00 ; CPU:$E694 PRG:2694 1A 00 + .byte $FF ; CPU:$E696 PRG:2696 FF ; --------------------------------------------------------------------------- @@ -8920,8 +8919,8 @@ ScriptE68C: ; --------------------------------------------------------------------------- DataE697: - .byte $1E, $86 - .byte $FF + .byte $1E, $86 ; CPU:$E697 PRG:2697 1E 86 + .byte $FF ; CPU:$E699 PRG:2699 FF ; --------------------------------------------------------------------------- @@ -8930,8 +8929,8 @@ DataE697: ; --------------------------------------------------------------------------- RiderSpriteTileTableE69A: - .byte $CB, $CD, $CC, $CE - .byte $CB, $CB, $CB + .byte $CB, $CD, $CC, $CE ; CPU:$E69A PRG:269A CB CD CC CE + .byte $CB, $CB, $CB ; CPU:$E69E PRG:269E CB CB CB ; --------------------------------------------------------------------------- @@ -8956,13 +8955,13 @@ RiderSpriteTileTableE69A: PpuRowDescriptorsE6A1: PpuRowDescriptor0E6A1: - .byte $22, $64, $62, $C0 + .byte $22, $64, $62, $C0 ; CPU:$E6A1 PRG:26A1 22 64 62 C0 PpuRowDescriptor1E6A5: - .byte $22, $74, $63, $E0 + .byte $22, $74, $63, $E0 ; CPU:$E6A5 PRG:26A5 22 74 63 E0 PpuRowDescriptor2E6A9: - .byte $21, $83, $FC, $C0 + .byte $21, $83, $FC, $C0 ; CPU:$E6A9 PRG:26A9 21 83 FC C0 ; --------------------------------------------------------------------------- @@ -8970,9 +8969,9 @@ PpuRowDescriptor2E6A9: ; --------------------------------------------------------------------------- DataE6AD: - .byte $03, $01, $02, $02 - .byte $00, $05, $05, $06 - .byte $04, $04 + .byte $03, $01, $02, $02 ; CPU:$E6AD PRG:26AD 03 01 02 02 + .byte $00, $05, $05, $06 ; CPU:$E6B1 PRG:26B1 00 05 05 06 + .byte $04, $04 ; CPU:$E6B5 PRG:26B5 04 04 ; --------------------------------------------------------------------------- ; $E6B7-$E6E0 @@ -8980,27 +8979,27 @@ DataE6AD: ; --------------------------------------------------------------------------- CommandHandlerVectorsE6B7: - .word ClearSlotStateE963 - .word SetSlotA4OneE8E3 - .word InitializeSlotMode6E85D - .word AdjustSlotBCE86A - .word InitializeSlotFieldsE845 - .word InitializeSlotMode2E854 - .word UpdateSlot0388E934 - .word UpdateSlotFlagE818 - .word UpdateGlobalStateEA8F - .word InitializeSlotMode4E879 - .word UpdateRiderMotionState - .word InitializeSlotModeE8EE - .word UpdateSlotBoundaryE8FF - .word Slot0388CheckA4E956 - .word ClearRiderMotionState - .word InitializeRiderMotionState - .word SetSlotBCE4To10E8FA - .word CommandHandlerVectorsE6B7 - .word InitializeGlobalB6E8D3 - .word UpdateSlotStateIfReadyE8E7 - .word $E8F5 + .word ClearSlotStateE963 ; CPU:$E6B7 PRG:26B7 63 E9 + .word SetSlotA4OneE8E3 ; CPU:$E6B9 PRG:26B9 E3 E8 + .word InitializeSlotMode6E85D ; CPU:$E6BB PRG:26BB 5D E8 + .word AdjustSlotBCE86A ; CPU:$E6BD PRG:26BD 6A E8 + .word InitializeSlotFieldsE845 ; CPU:$E6BF PRG:26BF 45 E8 + .word InitializeSlotMode2E854 ; CPU:$E6C1 PRG:26C1 54 E8 + .word UpdateSlot0388E934 ; CPU:$E6C3 PRG:26C3 34 E9 + .word UpdateSlotFlagE818 ; CPU:$E6C5 PRG:26C5 18 E8 + .word UpdateGlobalStateEA8F ; CPU:$E6C7 PRG:26C7 8F EA + .word InitializeSlotMode4E879 ; CPU:$E6C9 PRG:26C9 79 E8 + .word UpdateRiderMotionState ; CPU:$E6CB PRG:26CB 9D E8 + .word InitializeSlotModeE8EE ; CPU:$E6CD PRG:26CD EE E8 + .word UpdateSlotBoundaryE8FF ; CPU:$E6CF PRG:26CF FF E8 + .word Slot0388CheckA4E956 ; CPU:$E6D1 PRG:26D1 56 E9 + .word ClearRiderMotionState ; CPU:$E6D3 PRG:26D3 BF E8 + .word InitializeRiderMotionState ; CPU:$E6D5 PRG:26D5 C6 E8 + .word SetSlotBCE4To10E8FA ; CPU:$E6D7 PRG:26D7 FA E8 + .word CommandHandlerVectorsE6B7 ; CPU:$E6D9 PRG:26D9 B7 E6 + .word InitializeGlobalB6E8D3 ; CPU:$E6DB PRG:26DB D3 E8 + .word UpdateSlotStateIfReadyE8E7 ; CPU:$E6DD PRG:26DD E7 E8 + .word $E8F5 ; CPU:$E6DF PRG:26DF F5 E8 ; --------------------------------------------------------------------------- @@ -9009,11 +9008,11 @@ CommandHandlerVectorsE6B7: ; --------------------------------------------------------------------------- DataTableE6E1: - .byte $08, $07, $05, $01 - .byte $0B, $06, $0A, $0E - .byte $03, $04, $0C, $0D - .byte $0F, $10, $12, $13 - .byte $11, $15, $14, $00 + .byte $08, $07, $05, $01 ; CPU:$E6E1 PRG:26E1 08 07 05 01 + .byte $0B, $06, $0A, $0E ; CPU:$E6E5 PRG:26E5 0B 06 0A 0E + .byte $03, $04, $0C, $0D ; CPU:$E6E9 PRG:26E9 03 04 0C 0D + .byte $0F, $10, $12, $13 ; CPU:$E6ED PRG:26ED 0F 10 12 13 + .byte $11, $15, $14, $00 ; CPU:$E6F1 PRG:26F1 11 15 14 00 ; --------------------------------------------------------------------------- @@ -9022,12 +9021,12 @@ DataTableE6E1: ; --------------------------------------------------------------------------- DataTableE6F5: - .byte $09, $18, $20, $28 - .byte $30, $38, $40, $48 - .byte $50, $58, $60, $68 - .byte $70, $78, $80, $88 - .byte $90, $98, $A0, $A8 - .byte $B8, $CC + .byte $09, $18, $20, $28 ; CPU:$E6F5 PRG:26F5 09 18 20 28 + .byte $30, $38, $40, $48 ; CPU:$E6F9 PRG:26F9 30 38 40 48 + .byte $50, $58, $60, $68 ; CPU:$E6FD PRG:26FD 50 58 60 68 + .byte $70, $78, $80, $88 ; CPU:$E701 PRG:2701 70 78 80 88 + .byte $90, $98, $A0, $A8 ; CPU:$E705 PRG:2705 90 98 A0 A8 + .byte $B8, $CC ; CPU:$E709 PRG:2709 B8 CC ; --------------------------------------------------------------------------- @@ -9085,12 +9084,12 @@ UpdateRiderCourseStateE70B: ; --------------------------------------------------------------------------- UpdateAllRiderScriptStateE733: - ldx #$03 + ldx #$03 ; CPU:$E733 PRG:2733 A2 03 @next_rider: - jsr UpdateSingleRiderScriptStateE73B - dex - bne @next_rider + jsr UpdateSingleRiderScriptStateE73B ; CPU:$E735 PRG:2735 20 3B E7 + dex ; CPU:$E738 PRG:2738 CA + bne @next_rider ; CPU:$E739 PRG:2739 D0 FA ; --------------------------------------------------------------------------- @@ -9099,40 +9098,40 @@ UpdateAllRiderScriptStateE733: ; --------------------------------------------------------------------------- UpdateSingleRiderScriptStateE73B: - lda $60,x - clc - adc $C8,x - sta $C8,x + lda $60,x ; CPU:$E73B PRG:273B B5 60 + clc ; CPU:$E73D PRG:273D 18 + adc $C8,x ; CPU:$E73E PRG:273E 75 C8 + sta $C8,x ; CPU:$E740 PRG:2740 95 C8 - lda $58,x + lda $58,x ; CPU:$E742 PRG:2742 B5 58 ; E744: D0 1C = BNE $E762 - .byte $D0, $1C + .byte $D0, $1C ; CPU:$E744 PRG:2744 D0 1C - lda $C0,x - sec - sbc #$40 + lda $C0,x ; CPU:$E746 PRG:2746 B5 C0 + sec ; CPU:$E748 PRG:2748 38 + sbc #$40 ; CPU:$E749 PRG:2749 E9 40 ; E74B: 30 06 = BMI $E753 - bmi @return + bmi @return ; CPU:$E74B PRG:274B 30 06 - lsr a - lsr a - cmp #$16 - bcc @store_script_index + lsr a ; CPU:$E74D PRG:274D 4A + lsr a ; CPU:$E74E PRG:274E 4A + cmp #$16 ; CPU:$E74F PRG:274F C9 16 + bcc @store_script_index ; CPU:$E751 PRG:2751 90 01 @return: - rts + rts ; CPU:$E753 PRG:2753 60 @store_script_index: - sta $58,x - inc $58,x + sta $58,x ; CPU:$E754 PRG:2754 95 58 + inc $58,x ; CPU:$E756 PRG:2756 F6 58 - lda #$00 - sta $C4,x + lda #$00 ; CPU:$E758 PRG:2758 A9 00 + sta $C4,x ; CPU:$E75A PRG:275A 95 C4 - lda $64,x - sta $C8,x + lda $64,x ; CPU:$E75C PRG:275C B5 64 + sta $C8,x ; CPU:$E75E PRG:275E 95 C8 ; --------------------------------------------------------------------------- @@ -9165,7 +9164,7 @@ ProcessRiderScriptEntryE762: cmp #$FF ; E772: C9 FF ; E774: F0 5A = BEQ $E7D0 - .byte $F0, $5A + .byte $F0, $5A ; CPU:$E774 PRG:2774 F0 5A sta $0F ; E776: 85 0F @@ -9174,7 +9173,7 @@ ProcessRiderScriptEntryE762: ; E77C: B0 D5 = BCS $E753 ; $E753 is the RTS in UpdateSingleRiderScriptStateE73B. - .byte $B0, $D5 + .byte $B0, $D5 ; CPU:$E77C PRG:277C B0 D5 @load_command: iny ; E77E: C8 @@ -9183,12 +9182,12 @@ ProcessRiderScriptEntryE762: bit $E703 ; E781: 2C 03 E7 ; E784: D0 1D = BNE $E7A3 - .byte $D0, $1D + .byte $D0, $1D ; CPU:$E784 PRG:2784 D0 1D bit $E6FB ; E786: 2C FB E6 ; E789: D0 67 = BNE $E7F2 - .byte $D0, $67 + .byte $D0, $67 ; CPU:$E789 PRG:2789 D0 67 jsr $E794 ; E78B: 20 94 E7 @@ -9204,7 +9203,7 @@ ProcessRiderScriptEntryE762: inc $C4,x ; E790: F6 C4 ; E792: D0 CE = BNE $E762 - .byte $D0, $CE + .byte $D0, $CE ; CPU:$E792 PRG:2792 D0 CE ; --------------------------------------------------------------------------- @@ -9218,11 +9217,11 @@ DispatchRiderCommandE794: asl a ; E794: 0A tay ; E795: A8 - lda CommandHandlerVectorsE6B7,y + lda CommandHandlerVectorsE6B7,y ; CPU:$E796 PRG:2796 B9 B7 E6 ; E796: B9 B7 E6 sta $00 ; E799: 85 00 - lda CommandHandlerVectorsE6B7+1,y + lda CommandHandlerVectorsE6B7+1,y ; CPU:$E79B PRG:279B B9 B8 E6 ; E79B: B9 B8 E6 sta $01 ; E79E: 85 01 @@ -9268,7 +9267,7 @@ UpdateRiderCommandStateE7A3: inc $C4,x ; E7CC: F6 C4 ; E7CE: D0 92 = BNE $E762 - .byte $D0, $92 + .byte $D0, $92 ; CPU:$E7CE PRG:27CE D0 92 ; --------------------------------------------------------------------------- @@ -9317,7 +9316,7 @@ StoreRiderCommandStateE7F2: sta $D0,x ; E7F8: 95 D0 ; E7FA: 10 CE = BPL $E7CA - .byte $10, $CE + .byte $10, $CE ; CPU:$E7FA PRG:27FA 10 CE ; --------------------------------------------------------------------------- ; $E7FC-$E7FE @@ -9338,17 +9337,17 @@ LoadRiderLanePositionE7FC: ; --------------------------------------------------------------------------- LoadIndexedValueE7FF: - lda $E0,x - sta $08 + lda $E0,x ; CPU:$E7FF PRG:27FF B5 E0 + sta $08 ; CPU:$E801 PRG:2801 85 08 - jsr LoadTablePointerE80D + jsr LoadTablePointerE80D ; CPU:$E803 PRG:2803 20 0D E8 - sty $07 + sty $07 ; CPU:$E806 PRG:2806 84 07 - ldy $08 - lda ($03),y + ldy $08 ; CPU:$E808 PRG:2808 A4 08 + lda ($03),y ; CPU:$E80A PRG:280A B1 03 - rts + rts ; CPU:$E80C PRG:280C 60 ; --------------------------------------------------------------------------- @@ -9357,13 +9356,13 @@ LoadIndexedValueE7FF: ; --------------------------------------------------------------------------- LoadTablePointerE80D: - lda PointerLowTableE54E,y - sta $03 + lda PointerLowTableE54E,y ; CPU:$E80D PRG:280D B9 4E E5 + sta $03 ; CPU:$E810 PRG:2810 85 03 - lda PointerHighTableE554,y - sta $04 + lda PointerHighTableE554,y ; CPU:$E812 PRG:2812 B9 54 E5 + sta $04 ; CPU:$E815 PRG:2815 85 04 - rts + rts ; CPU:$E817 PRG:2817 60 ; --------------------------------------------------------------------------- ; $E818-$E835 @@ -9372,52 +9371,52 @@ LoadTablePointerE80D: ; --------------------------------------------------------------------------- UpdateSlotFlagE818: - lda $B0,x - bne @return + lda $B0,x ; CPU:$E818 PRG:2818 B5 B0 + bne @return ; CPU:$E81A PRG:281A D0 19 - lda $AC,x - cmp #$07 - bpl @return + lda $AC,x ; CPU:$E81C PRG:281C B5 AC + cmp #$07 ; CPU:$E81E PRG:281E C9 07 + bpl @return ; CPU:$E820 PRG:2820 10 13 - lda $94,x - cmp #$03 - bcs @set_flag + lda $94,x ; CPU:$E822 PRG:2822 B5 94 + cmp #$03 ; CPU:$E824 PRG:2824 C9 03 + bcs @set_flag ; CPU:$E826 PRG:2826 B0 09 - cmp #$02 - bne @return + cmp #$02 ; CPU:$E828 PRG:2828 C9 02 + bne @return ; CPU:$E82A PRG:282A D0 09 - lda $90,x - asl a - bcc @return + lda $90,x ; CPU:$E82C PRG:282C B5 90 + asl a ; CPU:$E82E PRG:282E 0A + bcc @return ; CPU:$E82F PRG:282F 90 04 @set_flag: - lda #$FF - sta $98,x + lda #$FF ; CPU:$E831 PRG:2831 A9 FF + sta $98,x ; CPU:$E833 PRG:2833 95 98 @return: - rts + rts ; CPU:$E835 PRG:2835 60 ; --------------------------------------------------------------------------- ; $E836-$E844: update $8C for four runtime slots. ; --------------------------------------------------------------------------- UpdateFourSlot8CE836: - ldx #$03 + ldx #$03 ; CPU:$E836 PRG:2836 A2 03 @slot_loop: - lda $B0,x - bne @next_slot + lda $B0,x ; CPU:$E838 PRG:2838 B5 B0 + bne @next_slot ; CPU:$E83A PRG:283A D0 05 - jsr CalculateSlotRemaining - sta $8C,x + jsr CalculateSlotRemaining ; CPU:$E83C PRG:283C 20 97 DC + sta $8C,x ; CPU:$E83F PRG:283F 95 8C @next_slot: - dex - bpl @slot_loop + dex ; CPU:$E841 PRG:2841 CA + bpl @slot_loop ; CPU:$E842 PRG:2842 10 F4 - rts + rts ; CPU:$E844 PRG:2844 60 ; --------------------------------------------------------------------------- ; $E845-$E853: initialize per-slot $D8/$BC/$E4 fields. @@ -9425,18 +9424,18 @@ UpdateFourSlot8CE836: ; --------------------------------------------------------------------------- InitializeSlotFieldsE845: - lda #$80 - sta $D8,x + lda #$80 ; CPU:$E845 PRG:2845 A9 80 + sta $D8,x ; CPU:$E847 PRG:2847 95 D8 - lda #$05 - jsr InitializeAndCalculateSlotE893 + lda #$05 ; CPU:$E849 PRG:2849 A9 05 + jsr InitializeAndCalculateSlotE893 ; CPU:$E84B PRG:284B 20 93 E8 - lsr a + lsr a ; CPU:$E84E PRG:284E 4A StoreSlotBCE4E84F: - sta $BC,x - sta $E4,x + sta $BC,x ; CPU:$E84F PRG:284F 95 BC + sta $E4,x ; CPU:$E851 PRG:2851 95 E4 - rts + rts ; CPU:$E853 PRG:2853 60 ; --------------------------------------------------------------------------- ; $E854-$E85C @@ -9444,11 +9443,11 @@ StoreSlotBCE4E84F: ; --------------------------------------------------------------------------- InitializeSlotMode2E854: - lda #$02 - jsr InitializeAndCalculateSlotE893 + lda #$02 ; CPU:$E854 PRG:2854 A9 02 + jsr InitializeAndCalculateSlotE893 ; CPU:$E856 PRG:2856 20 93 E8 - lsr a - jmp AdjustSlotBCFromAE86F + lsr a ; CPU:$E859 PRG:2859 4A + jmp AdjustSlotBCFromAE86F ; CPU:$E85A PRG:285A 4C 6F E8 ; --------------------------------------------------------------------------- @@ -9458,15 +9457,15 @@ InitializeSlotMode2E854: ; --------------------------------------------------------------------------- InitializeSlotMode6E85D: - lda #$06 - jsr InitializeAndCalculateSlotE893 + lda #$06 ; CPU:$E85D PRG:285D A9 06 + jsr InitializeAndCalculateSlotE893 ; CPU:$E85F PRG:285F 20 93 E8 - jsr StoreSlotBCE4E84F + jsr StoreSlotBCE4E84F ; CPU:$E862 PRG:2862 20 4F E8 - lda #$60 - sta $D8,x + lda #$60 ; CPU:$E865 PRG:2865 A9 60 + sta $D8,x ; CPU:$E867 PRG:2867 95 D8 - rts + rts ; CPU:$E869 PRG:2869 60 ; --------------------------------------------------------------------------- ; $E86A-$E878 @@ -9476,20 +9475,20 @@ InitializeSlotMode6E85D: ; --------------------------------------------------------------------------- AdjustSlotBCE86A: - lda #$01 - jsr InitializeAndCalculateSlotE893 + lda #$01 ; CPU:$E86A PRG:286A A9 01 + jsr InitializeAndCalculateSlotE893 ; CPU:$E86C PRG:286C 20 93 E8 ; $E86F AdjustSlotBCFromAE86F: - sta $00 + sta $00 ; CPU:$E86F PRG:286F 85 00 - lda $E4,x - sec - sbc $00 - sta $BC,x + lda $E4,x ; CPU:$E871 PRG:2871 B5 E4 + sec ; CPU:$E873 PRG:2873 38 + sbc $00 ; CPU:$E874 PRG:2874 E5 00 + sta $BC,x ; CPU:$E876 PRG:2876 95 BC - rts + rts ; CPU:$E878 PRG:2878 60 ; --------------------------------------------------------------------------- ; $E879-$E892 @@ -9497,25 +9496,25 @@ AdjustSlotBCFromAE86F: ; X = current slot. ; --------------------------------------------------------------------------- InitializeSlotMode4E879: - lda #$04 - jsr InitializeAndCalculateSlotE893 + lda #$04 ; CPU:$E879 PRG:2879 A9 04 + jsr InitializeAndCalculateSlotE893 ; CPU:$E87B PRG:287B 20 93 E8 - asl a - jsr StoreSlotBCE4E84F + asl a ; CPU:$E87E PRG:287E 0A + jsr StoreSlotBCE4E84F ; CPU:$E87F PRG:287F 20 4F E8 - lda $A0,x - beq @set_d8 + lda $A0,x ; CPU:$E882 PRG:2882 B5 A0 + beq @set_d8 ; CPU:$E884 PRG:2884 F0 08 - lda $BC,x - clc - adc #$10 - jsr StoreSlotBCE4E84F + lda $BC,x ; CPU:$E886 PRG:2886 B5 BC + clc ; CPU:$E888 PRG:2888 18 + adc #$10 ; CPU:$E889 PRG:2889 69 10 + jsr StoreSlotBCE4E84F ; CPU:$E88B PRG:288B 20 4F E8 @set_d8: - lda #$40 - sta $D8,x + lda #$40 ; CPU:$E88E PRG:288E A9 40 + sta $D8,x ; CPU:$E890 PRG:2890 95 D8 - rts + rts ; CPU:$E892 PRG:2892 60 ; --------------------------------------------------------------------------- ; $E893-$E89C @@ -9530,14 +9529,14 @@ InitializeSlotMode4E879: ; --------------------------------------------------------------------------- InitializeAndCalculateSlotE893: - sta $D4,x - sta $B4,x + sta $D4,x ; CPU:$E893 PRG:2893 95 D4 + sta $B4,x ; CPU:$E895 PRG:2895 95 B4 - lda $C8,x - sec - sbc $D0,x + lda $C8,x ; CPU:$E897 PRG:2897 B5 C8 + sec ; CPU:$E899 PRG:2899 38 + sbc $D0,x ; CPU:$E89A PRG:289A F5 D0 - rts + rts ; CPU:$E89C PRG:289C 60 ; --------------------------------------------------------------------------- ; $E89D-$E8D2 @@ -9545,34 +9544,34 @@ InitializeAndCalculateSlotE893: ; --------------------------------------------------------------------------- UpdateRiderMotionState: - lda RiderMotionState,x - beq @update + lda RiderMotionState,x ; CPU:$E89D PRG:289D B5 A4 + beq @update ; CPU:$E89F PRG:289F F0 04 - cmp #$01 - beq SlotA4ReturnE8BE + cmp #$01 ; CPU:$E8A1 PRG:28A1 C9 01 + beq SlotA4ReturnE8BE ; CPU:$E8A3 PRG:28A3 F0 19 @update: - lda #$03 - jsr InitializeAndCalculateSlotE893 + lda #$03 ; CPU:$E8A5 PRG:28A5 A9 03 + jsr InitializeAndCalculateSlotE893 ; CPU:$E8A7 PRG:28A7 20 93 E8 - asl a - jsr AdjustSlotBCFromAE86F + asl a ; CPU:$E8AA PRG:28AA 0A + jsr AdjustSlotBCFromAE86F ; CPU:$E8AB PRG:28AB 20 6F E8 - lda RiderMotionState,x - cmp #$04 - bne SlotA4ReturnE8BE + lda RiderMotionState,x ; CPU:$E8AE PRG:28AE B5 A4 + cmp #$04 ; CPU:$E8B0 PRG:28B0 C9 04 + bne SlotA4ReturnE8BE ; CPU:$E8B2 PRG:28B2 D0 0A - jsr UpdateSlotFrom94DD06 + jsr UpdateSlotFrom94DD06 ; CPU:$E8B4 PRG:28B4 20 06 DD - lda #$02 - sta RiderMotionState,x - sta $0364,x + lda #$02 ; CPU:$E8B7 PRG:28B7 A9 02 + sta RiderMotionState,x ; CPU:$E8B9 PRG:28B9 95 A4 + sta $0364,x ; CPU:$E8BB PRG:28BB 9D 64 03 ; $E8BE SlotA4ReturnE8BE: - rts + rts ; CPU:$E8BE PRG:28BE 60 ; --------------------------------------------------------------------------- @@ -9581,10 +9580,10 @@ SlotA4ReturnE8BE: ; --------------------------------------------------------------------------- ClearRiderMotionState: - lda #$00 - sta RiderMotionState,x - sta $A0,x - rts + lda #$00 ; CPU:$E8BF PRG:28BF A9 00 + sta RiderMotionState,x ; CPU:$E8C1 PRG:28C1 95 A4 + sta $A0,x ; CPU:$E8C3 PRG:28C3 95 A0 + rts ; CPU:$E8C5 PRG:28C5 60 ; --------------------------------------------------------------------------- ; $E8C6 @@ -9592,17 +9591,17 @@ ClearRiderMotionState: ; --------------------------------------------------------------------------- InitializeRiderMotionState: - lda #$01 - sta RiderMotionState,x + lda #$01 ; CPU:$E8C6 PRG:28C6 A9 01 + sta RiderMotionState,x ; CPU:$E8C8 PRG:28C8 95 A4 - lda $B8,x - cmp #$20 - bcs @return + lda $B8,x ; CPU:$E8CA PRG:28CA B5 B8 + cmp #$20 ; CPU:$E8CC PRG:28CC C9 20 + bcs @return ; CPU:$E8CE PRG:28CE B0 02 - inc RiderMotionState,x + inc RiderMotionState,x ; CPU:$E8D0 PRG:28D0 F6 A4 @return: - rts + rts ; CPU:$E8D2 PRG:28D2 60 ; --------------------------------------------------------------------------- ; $E8D3-$E8E2 @@ -9612,17 +9611,17 @@ InitializeRiderMotionState: ; --------------------------------------------------------------------------- InitializeGlobalB6E8D3: - txa - ora $B0,x - ora $03E0 - ora $3C - bne @return + txa ; CPU:$E8D3 PRG:28D3 8A + ora $B0,x ; CPU:$E8D4 PRG:28D4 15 B0 + ora $03E0 ; CPU:$E8D6 PRG:28D6 0D E0 03 + ora $3C ; CPU:$E8D9 PRG:28D9 05 3C + bne @return ; CPU:$E8DB PRG:28DB D0 05 - lda #$08 - sta $03B6 + lda #$08 ; CPU:$E8DD PRG:28DD A9 08 + sta $03B6 ; CPU:$E8DF PRG:28DF 8D B6 03 @return: - rts + rts ; CPU:$E8E2 PRG:28E2 60 ; --------------------------------------------------------------------------- ; $E8E3-$E8FE @@ -9631,11 +9630,11 @@ InitializeGlobalB6E8D3: ; $E8E3 SetSlotA4OneE8E3: - lda #$01 + lda #$01 ; CPU:$E8E3 PRG:28E3 A9 01 ; E8E5: D0 DC = BNE $E8C3 ; $E8C3 is inside the preceding ClearRiderMotionState helper. - .byte $D0, $DC + .byte $D0, $DC ; CPU:$E8E5 PRG:28E5 D0 DC ; --------------------------------------------------------------------------- @@ -9644,13 +9643,13 @@ SetSlotA4OneE8E3: ; --------------------------------------------------------------------------- UpdateSlotStateIfReadyE8E7: - lda $B0,x + lda $B0,x ; CPU:$E8E7 PRG:28E7 B5 B0 ; E8E9: D0 F7 = BNE $E8E2 ; Reuses the RTS immediately before this cluster. - .byte $D0, $F7 + .byte $D0, $F7 ; CPU:$E8E9 PRG:28E9 D0 F7 - jmp StateDCF2Increment94DCFE + jmp StateDCF2Increment94DCFE ; CPU:$E8EB PRG:28EB 4C FE DC ; --------------------------------------------------------------------------- @@ -9659,14 +9658,14 @@ UpdateSlotStateIfReadyE8E7: ; --------------------------------------------------------------------------- InitializeSlotModeE8EE: - lda #$02 - sta $A0,x + lda #$02 ; CPU:$E8EE PRG:28EE A9 02 + sta $A0,x ; CPU:$E8F0 PRG:28F0 95 A0 - lsr a - sta $D8,x + lsr a ; CPU:$E8F2 PRG:28F2 4A + sta $D8,x ; CPU:$E8F3 PRG:28F3 95 D8 - lda #$30 - jmp StoreSlotBCE4E84F + lda #$30 ; CPU:$E8F5 PRG:28F5 A9 30 + jmp StoreSlotBCE4E84F ; CPU:$E8F7 PRG:28F7 4C 4F E8 ; --------------------------------------------------------------------------- @@ -9675,8 +9674,8 @@ InitializeSlotModeE8EE: ; --------------------------------------------------------------------------- SetSlotBCE4To10E8FA: - lda #$10 - jmp StoreSlotBCE4E84F + lda #$10 ; CPU:$E8FA PRG:28FA A9 10 + jmp StoreSlotBCE4E84F ; CPU:$E8FC PRG:28FC 4C 4F E8 ; --------------------------------------------------------------------------- ; $E8FF-$E926 @@ -9685,49 +9684,49 @@ SetSlotBCE4To10E8FA: ; --------------------------------------------------------------------------- UpdateSlotBoundaryE8FF: - lda $B0,x - bne @return + lda $B0,x ; CPU:$E8FF PRG:28FF B5 B0 + bne @return ; CPU:$E901 PRG:2901 D0 23 - lda RiderMotionState,x - beq @save_y + lda RiderMotionState,x ; CPU:$E903 PRG:2903 B5 A4 + beq @save_y ; CPU:$E905 PRG:2905 F0 04 - lsr a - lsr a - bcc @return + lsr a ; CPU:$E907 PRG:2907 4A + lsr a ; CPU:$E908 PRG:2908 4A + bcc @return ; CPU:$E909 PRG:2909 90 1B @save_y: - sty $01 + sty $01 ; CPU:$E90B PRG:290B 84 01 - lda $94,x - beq @restore_y + lda $94,x ; CPU:$E90D PRG:290D B5 94 + beq @restore_y ; CPU:$E90F PRG:290F F0 13 - ldy #$04 + ldy #$04 ; CPU:$E911 PRG:2911 A0 04 - lda $5C,x - asl a - asl a - bcc @store_boundary + lda $5C,x ; CPU:$E913 PRG:2913 B5 5C + asl a ; CPU:$E915 PRG:2915 0A + asl a ; CPU:$E916 PRG:2916 0A + bcc @store_boundary ; CPU:$E917 PRG:2917 90 01 - dey + dey ; CPU:$E919 PRG:2919 88 @store_boundary: - lda #$01 - sta $036C,x + lda #$01 ; CPU:$E91A PRG:291A A9 01 + sta $036C,x ; CPU:$E91C PRG:291C 9D 6C 03 - iny - iny + iny ; CPU:$E91F PRG:291F C8 + iny ; CPU:$E920 PRG:2920 C8 - jsr $CE5C + jsr $CE5C ; CPU:$E921 PRG:2921 20 5C CE @restore_y: - ldy $01 + ldy $01 ; CPU:$E924 PRG:2924 A4 01 @return: - rts + rts ; CPU:$E926 PRG:2926 60 ; --------------------------------------------------------------------------- ; $E927-$E933 @@ -9735,19 +9734,19 @@ UpdateSlotBoundaryE8FF: ; --------------------------------------------------------------------------- UpdateFourSlotCCE927: - ldx #$03 + ldx #$03 ; CPU:$E927 PRG:2927 A2 03 @slot_loop: - lda $CC,x - beq @next_slot + lda $CC,x ; CPU:$E929 PRG:2929 B5 CC + beq @next_slot ; CPU:$E92B PRG:292B F0 03 - jsr $E794 + jsr $E794 ; CPU:$E92D PRG:292D 20 94 E7 @next_slot: - dex - bpl @slot_loop + dex ; CPU:$E930 PRG:2930 CA + bpl @slot_loop ; CPU:$E931 PRG:2931 10 F6 - rts + rts ; CPU:$E933 PRG:2933 60 ; --------------------------------------------------------------------------- ; $E934-$E962 @@ -9756,54 +9755,54 @@ UpdateFourSlotCCE927: ; --------------------------------------------------------------------------- UpdateSlot0388E934: - lda $B0,x + lda $B0,x ; CPU:$E934 PRG:2934 B5 B0 ; E936: D0 FB = BNE $E933 - .byte $D0, $FB + .byte $D0, $FB ; CPU:$E936 PRG:2936 D0 FB - ldy #$00 + ldy #$00 ; CPU:$E938 PRG:2938 A0 00 - lda $94,x + lda $94,x ; CPU:$E93A PRG:293A B5 94 ; E93C: F0 F5 = BEQ $E933 - .byte $F0, $F5 + .byte $F0, $F5 ; CPU:$E93C PRG:293C F0 F5 - cmp #$02 - bcs @store_state + cmp #$02 ; CPU:$E93E PRG:293E C9 02 + bcs @store_state ; CPU:$E940 PRG:2940 B0 07 - lda $90,x - cmp $D8,x - bcs @store_state + lda $90,x ; CPU:$E942 PRG:2942 B5 90 + cmp $D8,x ; CPU:$E944 PRG:2944 D5 D8 + bcs @store_state ; CPU:$E946 PRG:2946 B0 01 - iny + iny ; CPU:$E948 PRG:2948 C8 @store_state: - tya - sta $0388,x + tya ; CPU:$E949 PRG:2949 98 + sta $0388,x ; CPU:$E94A PRG:294A 9D 88 03 - lda $A0,x - cmp #$02 - beq Slot0388UpdateFrom94E960 - jmp StateDCF2ZeroDCFA + lda $A0,x ; CPU:$E94D PRG:294D B5 A0 + cmp #$02 ; CPU:$E94F PRG:294F C9 02 + beq Slot0388UpdateFrom94E960 ; CPU:$E951 PRG:2951 F0 0D + jmp StateDCF2ZeroDCFA ; CPU:$E953 PRG:2953 4C FA DC ; $E956 ; Secondary entry/path. Slot0388CheckA4E956: - lda RiderMotionState,x - cmp #$01 + lda RiderMotionState,x ; CPU:$E956 PRG:2956 B5 A4 + cmp #$01 ; CPU:$E958 PRG:2958 C9 01 ; E95A: D0 D7 = BNE $E933 - .byte $D0, $D7 + .byte $D0, $D7 ; CPU:$E95A PRG:295A D0 D7 - lda #$00 - sta $BC,x + lda #$00 ; CPU:$E95C PRG:295C A9 00 + sta $BC,x ; CPU:$E95E PRG:295E 95 BC ; $E960 Slot0388UpdateFrom94E960: - jmp UpdateSlotFrom94DD06 + jmp UpdateSlotFrom94DD06 ; CPU:$E960 PRG:2960 4C 06 DD ; --------------------------------------------------------------------------- ; $E963-$E96B @@ -9812,180 +9811,180 @@ Slot0388UpdateFrom94E960: ; --------------------------------------------------------------------------- ClearSlotStateE963: - lda #$00 - sta $CC,x - sta $D4,x - sta $B4,x - rts + lda #$00 ; CPU:$E963 PRG:2963 A9 00 + sta $CC,x ; CPU:$E965 PRG:2965 95 CC + sta $D4,x ; CPU:$E967 PRG:2967 95 D4 + sta $B4,x ; CPU:$E969 PRG:2969 95 B4 + rts ; CPU:$E96B PRG:296B 60 ; --------------------------------------------------------------------------- ; $E96C-$EA06 ; Update four slots' $B8 position/state values. ; --------------------------------------------------------------------------- UpdateFourSlotPositionsE96C: - ldx #$03 + ldx #$03 ; CPU:$E96C PRG:296C A2 03 ; $E96E SlotPositionLoopE96E: - lda $58,x - cmp #$15 - beq SlotPositionCheckTableE97F + lda $58,x ; CPU:$E96E PRG:296E B5 58 + cmp #$15 ; CPU:$E970 PRG:2970 C9 15 + beq SlotPositionCheckTableE97F ; CPU:$E972 PRG:2972 F0 0B - cmp #$14 - beq SlotPositionCheckTableE97F + cmp #$14 ; CPU:$E974 PRG:2974 C9 14 + beq SlotPositionCheckTableE97F ; CPU:$E976 PRG:2976 F0 07 - lda $B8,x - clc - adc $DC,x - sta $B8,x + lda $B8,x ; CPU:$E978 PRG:2978 B5 B8 + clc ; CPU:$E97A PRG:297A 18 + adc $DC,x ; CPU:$E97B PRG:297B 75 DC + sta $B8,x ; CPU:$E97D PRG:297D 95 B8 ; $E97F SlotPositionCheckTableE97F: - ldy #$03 + ldy #$03 ; CPU:$E97F PRG:297F A0 03 ; $E981 SlotPositionTableLoopE981: - lda $B8,x - cmp SlotPositionThresholdTableE53D,y + lda $B8,x ; CPU:$E981 PRG:2981 B5 B8 + cmp SlotPositionThresholdTableE53D,y ; CPU:$E983 PRG:2983 D9 3D E5 ; E986: F0 79 = BEQ $EA01 ; Keep literal because the symbolic target is outside ; ca65's relative branch range during reconstruction. - .byte $F0, $79 + .byte $F0, $79 ; CPU:$E986 PRG:2986 F0 79 - dey - bpl SlotPositionTableLoopE981 + dey ; CPU:$E988 PRG:2988 88 + bpl SlotPositionTableLoopE981 ; CPU:$E989 PRG:2989 10 F6 - lda RiderMotionState,x - beq SlotPositionCheckBoundsE9C4 + lda RiderMotionState,x ; CPU:$E98B PRG:298B B5 A4 + beq SlotPositionCheckBoundsE9C4 ; CPU:$E98D PRG:298D F0 35 - cmp #$01 - bne SlotPositionCheckState3E9B8 + cmp #$01 ; CPU:$E98F PRG:298F C9 01 + bne SlotPositionCheckState3E9B8 ; CPU:$E991 PRG:2991 D0 25 - lda $B8,x - cmp #$20 - bcs SlotPositionCheckBoundsE9C4 + lda $B8,x ; CPU:$E993 PRG:2993 B5 B8 + cmp #$20 ; CPU:$E995 PRG:2995 C9 20 + bcs SlotPositionCheckBoundsE9C4 ; CPU:$E997 PRG:2997 B0 2B - lda #$04 - sta RiderMotionState,x + lda #$04 ; CPU:$E999 PRG:2999 A9 04 + sta RiderMotionState,x ; CPU:$E99B PRG:299B 95 A4 - lda $58,x - beq SlotPositionResetBCE9AD + lda $58,x ; CPU:$E99D PRG:299D B5 58 + beq SlotPositionResetBCE9AD ; CPU:$E99F PRG:299F F0 0C - cmp #$12 - beq SlotPositionResetBCE9AD + cmp #$12 ; CPU:$E9A1 PRG:29A1 C9 12 + beq SlotPositionResetBCE9AD ; CPU:$E9A3 PRG:29A3 F0 08 - cmp #$10 - beq SlotPositionResetBCE9AD + cmp #$10 ; CPU:$E9A5 PRG:29A5 C9 10 + beq SlotPositionResetBCE9AD ; CPU:$E9A7 PRG:29A7 F0 04 - cmp #$0D - bne SlotPositionNextE9E3 + cmp #$0D ; CPU:$E9A9 PRG:29A9 C9 0D + bne SlotPositionNextE9E3 ; CPU:$E9AB PRG:29AB D0 36 ; $E9AD SlotPositionResetBCE9AD: - lda #$00 - sta $BC,x + lda #$00 ; CPU:$E9AD PRG:29AD A9 00 + sta $BC,x ; CPU:$E9AF PRG:29AF 95 BC - jsr UpdateSlotFrom94DD06 + jsr UpdateSlotFrom94DD06 ; CPU:$E9B1 PRG:29B1 20 06 DD - dec RiderMotionState,x - bne SlotPositionNextE9E3 + dec RiderMotionState,x ; CPU:$E9B4 PRG:29B4 D6 A4 + bne SlotPositionNextE9E3 ; CPU:$E9B6 PRG:29B6 D0 2B ; $E9B8 SlotPositionCheckState3E9B8: - cmp #$03 - beq SlotPositionCheckBoundsE9C4 + cmp #$03 ; CPU:$E9B8 PRG:29B8 C9 03 + beq SlotPositionCheckBoundsE9C4 ; CPU:$E9BA PRG:29BA F0 08 - lda $B8,x - cmp #$20 - bcc SlotPositionCheckBoundsE9C4 + lda $B8,x ; CPU:$E9BC PRG:29BC B5 B8 + cmp #$20 ; CPU:$E9BE PRG:29BE C9 20 + bcc SlotPositionCheckBoundsE9C4 ; CPU:$E9C0 PRG:29C0 90 02 - dec $B8,x + dec $B8,x ; CPU:$E9C2 PRG:29C2 D6 B8 ; $E9C4 SlotPositionCheckBoundsE9C4: - lda $B8,x - cmp #$08 - bcc SlotPositionLowE9E9 + lda $B8,x ; CPU:$E9C4 PRG:29C4 B5 B8 + cmp #$08 ; CPU:$E9C6 PRG:29C6 C9 08 + bcc SlotPositionLowE9E9 ; CPU:$E9C8 PRG:29C8 90 1F - cmp #$3A - bcc SlotPositionNextE9E3 + cmp #$3A ; CPU:$E9CA PRG:29CA C9 3A + bcc SlotPositionNextE9E3 ; CPU:$E9CC PRG:29CC 90 15 - lda #$39 - sta $B8,x + lda #$39 ; CPU:$E9CE PRG:29CE A9 39 + sta $B8,x ; CPU:$E9D0 PRG:29D0 95 B8 ; $E9D2 ; Shared entry from the $E9F9 path below. SlotPositionCheckFlagsE9D2: - lda $9C,x - ora $03E0,x - bne SlotPositionNextE9E3 + lda $9C,x ; CPU:$E9D2 PRG:29D2 B5 9C + ora $03E0,x ; CPU:$E9D4 PRG:29D4 1D E0 03 + bne SlotPositionNextE9E3 ; CPU:$E9D7 PRG:29D7 D0 0A ; $E9D9 SlotPositionFlipDirectionE9D9: - lda $DC,x - bne @invert + lda $DC,x ; CPU:$E9D9 PRG:29D9 B5 DC + bne @invert ; CPU:$E9DB PRG:29DB D0 02 - lda #$FF + lda #$FF ; CPU:$E9DD PRG:29DD A9 FF @invert: - eor #$FE - sta $DC,x + eor #$FE ; CPU:$E9DF PRG:29DF 49 FE + sta $DC,x ; CPU:$E9E1 PRG:29E1 95 DC ; $E9E3 SlotPositionNextE9E3: - dex + dex ; CPU:$E9E3 PRG:29E3 CA ; E9E4: 30 21 = BMI $EA07 ; $EA07 remains in the binary-backed next block. - .byte $30, $21 + .byte $30, $21 ; CPU:$E9E4 PRG:29E4 30 21 - jmp SlotPositionLoopE96E + jmp SlotPositionLoopE96E ; CPU:$E9E6 PRG:29E6 4C 6E E9 ; $E9E9 SlotPositionLowE9E9: - lda $9C,x - bne SlotPositionUseCurrentE9F1 + lda $9C,x ; CPU:$E9E9 PRG:29E9 B5 9C + bne SlotPositionUseCurrentE9F1 ; CPU:$E9EB PRG:29EB D0 04 - lda #$07 - bne SlotPositionStoreE9F9 + lda #$07 ; CPU:$E9ED PRG:29ED A9 07 + bne SlotPositionStoreE9F9 ; CPU:$E9EF PRG:29EF D0 08 ; $E9F1 SlotPositionUseCurrentE9F1: - lda $B8,x - cmp #$02 - bcs SlotPositionStoreE9F9 + lda $B8,x ; CPU:$E9F1 PRG:29F1 B5 B8 + cmp #$02 ; CPU:$E9F3 PRG:29F3 C9 02 + bcs SlotPositionStoreE9F9 ; CPU:$E9F5 PRG:29F5 B0 02 - lda #$01 + lda #$01 ; CPU:$E9F7 PRG:29F7 A9 01 ; $E9F9 SlotPositionStoreE9F9: - sta $B8,x + sta $B8,x ; CPU:$E9F9 PRG:29F9 95 B8 - cpx #$00 - beq SlotPositionFlipDirectionE9D9 + cpx #$00 ; CPU:$E9FB PRG:29FB E0 00 + beq SlotPositionFlipDirectionE9D9 ; CPU:$E9FD PRG:29FD F0 DA - bne SlotPositionCheckFlagsE9D2 + bne SlotPositionCheckFlagsE9D2 ; CPU:$E9FF PRG:29FF D0 D1 ; $EA01 SlotPositionTableMatchEA01: - lda #$00 - sta $DC,x + lda #$00 ; CPU:$EA01 PRG:2A01 A9 00 + sta $DC,x ; CPU:$EA03 PRG:2A03 95 DC - beq SlotPositionNextE9E3 + beq SlotPositionNextE9E3 ; CPU:$EA05 PRG:2A05 F0 DC ; --------------------------------------------------------------------------- @@ -9994,59 +9993,59 @@ SlotPositionTableMatchEA01: ; --------------------------------------------------------------------------- UpdateSlot0DirectionEA07: - lda $4F - beq Slot0DirectionReturnEA43 + lda $4F ; CPU:$EA07 PRG:2A07 A5 4F + beq Slot0DirectionReturnEA43 ; CPU:$EA09 PRG:2A09 F0 38 - lda $98 - ora $03E0 - ora $03F7 - bne Slot0DirectionReturnEA43 + lda $98 ; CPU:$EA0B PRG:2A0B A5 98 + ora $03E0 ; CPU:$EA0D PRG:2A0D 0D E0 03 + ora $03F7 ; CPU:$EA10 PRG:2A10 0D F7 03 + bne Slot0DirectionReturnEA43 ; CPU:$EA13 PRG:2A13 D0 2E - lda $B0 - beq @check_state + lda $B0 ; CPU:$EA15 PRG:2A15 A5 B0 + beq @check_state ; CPU:$EA17 PRG:2A17 F0 0A - lda $0388 - cmp #$02 - bne Slot0DirectionReturnEA43 + lda $0388 ; CPU:$EA19 PRG:2A19 AD 88 03 + cmp #$02 ; CPU:$EA1C PRG:2A1C C9 02 + bne Slot0DirectionReturnEA43 ; CPU:$EA1E PRG:2A1E D0 23 - inc $0388 + inc $0388 ; CPU:$EA20 PRG:2A20 EE 88 03 @check_state: - lda $9C - beq @check_input + lda $9C ; CPU:$EA23 PRG:2A23 A5 9C + beq @check_input ; CPU:$EA25 PRG:2A25 F0 04 - cmp #$05 - bne Slot0DirectionReturnEA43 + cmp #$05 ; CPU:$EA27 PRG:2A27 C9 05 + bne Slot0DirectionReturnEA43 ; CPU:$EA29 PRG:2A29 D0 18 @check_input: - lda $14 - and #$0C - beq Slot0DirectionReturnEA43 + lda $14 ; CPU:$EA2B PRG:2A2B A5 14 + and #$0C ; CPU:$EA2D PRG:2A2D 29 0C + beq Slot0DirectionReturnEA43 ; CPU:$EA2F PRG:2A2F F0 12 - and #$04 - bne @negative_direction + and #$04 ; CPU:$EA31 PRG:2A31 29 04 + bne @negative_direction ; CPU:$EA33 PRG:2A33 D0 04 - lda #$01 - bne @store_direction + lda #$01 ; CPU:$EA35 PRG:2A35 A9 01 + bne @store_direction ; CPU:$EA37 PRG:2A37 D0 02 @negative_direction: - lda #$FF + lda #$FF ; CPU:$EA39 PRG:2A39 A9 FF @store_direction: - sta $DC + sta $DC ; CPU:$EA3B PRG:2A3B 85 DC - lda #$04 - ora $FD - sta $FD + lda #$04 ; CPU:$EA3D PRG:2A3D A9 04 + ora $FD ; CPU:$EA3F PRG:2A3F 05 FD + sta $FD ; CPU:$EA41 PRG:2A41 85 FD ; $EA43 Slot0DirectionReturnEA43: - rts + rts ; CPU:$EA43 PRG:2A43 60 ; --------------------------------------------------------------------------- ; $EA44-$EA8E @@ -10057,79 +10056,79 @@ Slot0DirectionReturnEA43: ; --------------------------------------------------------------------------- BuildFourSlotSpritesEA44: - ldx #$03 + ldx #$03 ; CPU:$EA44 PRG:2A44 A2 03 ; $EA46 @slot_loop: - txa - asl a - asl a - asl a - tay + txa ; CPU:$EA46 PRG:2A46 8A + asl a ; CPU:$EA47 PRG:2A47 0A + asl a ; CPU:$EA48 PRG:2A48 0A + asl a ; CPU:$EA49 PRG:2A49 0A + tay ; CPU:$EA4A PRG:2A4A A8 - lda $84,x - lsr a - bcc @alternate_state + lda $84,x ; CPU:$EA4B PRG:2A4B B5 84 + lsr a ; CPU:$EA4D PRG:2A4D 4A + bcc @alternate_state ; CPU:$EA4E PRG:2A4E 90 08 - lda $80,x - cmp #$F4 - bcc @build_primary + lda $80,x ; CPU:$EA50 PRG:2A50 B5 80 + cmp #$F4 ; CPU:$EA52 PRG:2A52 C9 F4 + bcc @build_primary ; CPU:$EA54 PRG:2A54 90 0B - bcs @build_secondary + bcs @build_secondary ; CPU:$EA56 PRG:2A56 B0 30 ; $EA58 @alternate_state: - lsr a - bcs @build_secondary + lsr a ; CPU:$EA58 PRG:2A58 4A + bcs @build_secondary ; CPU:$EA59 PRG:2A59 B0 2D - lda $80,x - cmp #$F6 - bcc @build_secondary + lda $80,x ; CPU:$EA5B PRG:2A5B B5 80 + cmp #$F6 ; CPU:$EA5D PRG:2A5D C9 F6 + bcc @build_secondary ; CPU:$EA5F PRG:2A5F 90 27 ; $EA61 @build_primary: - lda $B0,x - beq @build_secondary + lda $B0,x ; CPU:$EA61 PRG:2A61 B5 B0 + beq @build_secondary ; CPU:$EA63 PRG:2A63 F0 23 - lda #$B6 - jsr CalculateSlotRemainingFromADC9A - sta $0294,y + lda #$B6 ; CPU:$EA65 PRG:2A65 A9 B6 + jsr CalculateSlotRemainingFromADC9A ; CPU:$EA67 PRG:2A67 20 9A DC + sta $0294,y ; CPU:$EA6A PRG:2A6A 99 94 02 - lda $80,x - clc - adc #$0A - sta $0297,y + lda $80,x ; CPU:$EA6D PRG:2A6D B5 80 + clc ; CPU:$EA6F PRG:2A6F 18 + adc #$0A ; CPU:$EA70 PRG:2A70 69 0A + sta $0297,y ; CPU:$EA72 PRG:2A72 99 97 02 - sty $01 + sty $01 ; CPU:$EA75 PRG:2A75 84 01 - ldy $B4,x - lda $E69A,y + ldy $B4,x ; CPU:$EA77 PRG:2A77 B4 B4 + lda $E69A,y ; CPU:$EA79 PRG:2A79 B9 9A E6 - ldy $01 - sta $0295,y + ldy $01 ; CPU:$EA7C PRG:2A7C A4 01 + sta $0295,y ; CPU:$EA7E PRG:2A7E 99 95 02 - lda #$00 - sta $0296,y + lda #$00 ; CPU:$EA81 PRG:2A81 A9 00 + sta $0296,y ; CPU:$EA83 PRG:2A83 99 96 02 ; Original EA86: F0 03 = BEQ $EA8B. ; A was just loaded with zero, so this is always taken. - beq @next_slot + beq @next_slot ; CPU:$EA86 PRG:2A86 F0 03 ; $EA88 @build_secondary: - jsr BuildSlotSprites + jsr BuildSlotSprites ; CPU:$EA88 PRG:2A88 20 F6 E2 ; $EA8B @next_slot: - dex - bpl @slot_loop + dex ; CPU:$EA8B PRG:2A8B CA + bpl @slot_loop ; CPU:$EA8C PRG:2A8C 10 B8 - rts + rts ; CPU:$EA8E PRG:2A8E 60 ; --------------------------------------------------------------------------- ; $EA8F-$EAC4 @@ -10139,62 +10138,62 @@ BuildFourSlotSpritesEA44: ; --------------------------------------------------------------------------- UpdateGlobalStateEA8F: - cpx #$00 - bne GlobalStateReturnEAC4 + cpx #$00 ; CPU:$EA8F PRG:2A8F E0 00 + bne GlobalStateReturnEAC4 ; CPU:$EA91 PRG:2A91 D0 31 - lda #$1D - sta $3A + lda #$1D ; CPU:$EA93 PRG:2A93 A9 1D + sta $3A ; CPU:$EA95 PRG:2A95 85 3A - lda $57 - beq GlobalStateInitializeEAB5 + lda $57 ; CPU:$EA97 PRG:2A97 A5 57 + beq GlobalStateInitializeEAB5 ; CPU:$EA99 PRG:2A99 F0 1A - lda $3C - bne GlobalStateClear3AEAC0 + lda $3C ; CPU:$EA9B PRG:2A9B A5 3C + bne GlobalStateClear3AEAC0 ; CPU:$EA9D PRG:2A9D D0 21 - stx $0D + stx $0D ; CPU:$EA9F PRG:2A9F 86 0D - ldx #$06 - ldy #$19 + ldx #$06 ; CPU:$EAA1 PRG:2AA1 A2 06 + ldy #$19 ; CPU:$EAA3 PRG:2AA3 A0 19 ; $EAA5 GlobalStateCopyLoopEAA5: - lda $03D9,x - sta $02C0,y + lda $03D9,x ; CPU:$EAA5 PRG:2AA5 BD D9 03 + sta $02C0,y ; CPU:$EAA8 PRG:2AA8 99 C0 02 - dey - dey - dey - dey + dey ; CPU:$EAAB PRG:2AAB 88 + dey ; CPU:$EAAC PRG:2AAC 88 + dey ; CPU:$EAAD PRG:2AAD 88 + dey ; CPU:$EAAE PRG:2AAE 88 - dex - bpl GlobalStateCopyLoopEAA5 + dex ; CPU:$EAAF PRG:2AAF CA + bpl GlobalStateCopyLoopEAA5 ; CPU:$EAB0 PRG:2AB0 10 F3 - ldx $0D - rts + ldx $0D ; CPU:$EAB2 PRG:2AB2 A6 0D + rts ; CPU:$EAB4 PRG:2AB4 60 ; $EAB5 GlobalStateInitializeEAB5: - lda #$10 - sta $32 + lda #$10 ; CPU:$EAB5 PRG:2AB5 A9 10 + sta $32 ; CPU:$EAB7 PRG:2AB7 85 32 - lda #$02 - sta $FD + lda #$02 ; CPU:$EAB9 PRG:2AB9 A9 02 + sta $FD ; CPU:$EABB PRG:2ABB 85 FD - lsr a - sta $52 + lsr a ; CPU:$EABD PRG:2ABD 4A + sta $52 ; CPU:$EABE PRG:2ABE 85 52 ; $EAC0 GlobalStateClear3AEAC0: - lda #$00 - sta $3A + lda #$00 ; CPU:$EAC0 PRG:2AC0 A9 00 + sta $3A ; CPU:$EAC2 PRG:2AC2 85 3A ; $EAC4 GlobalStateReturnEAC4: - rts + rts ; CPU:$EAC4 PRG:2AC4 60 ; --------------------------------------------------------------------------- ; $EAC5-$EB16 @@ -10202,87 +10201,87 @@ GlobalStateReturnEAC4: ; --------------------------------------------------------------------------- BuildGlobalDisplayEAC5: - lda $52 - ora $3C + lda $52 ; CPU:$EAC5 PRG:2AC5 A5 52 + ora $3C ; CPU:$EAC7 PRG:2AC7 05 3C ; EAC9: D0 F5 = BNE $EAC0 ; Reuses the preceding routine's clear-$3A path. - .byte $D0, $F5 + .byte $D0, $F5 ; CPU:$EAC9 PRG:2AC9 D0 F5 - lda $3A + lda $3A ; CPU:$EACB PRG:2ACB A5 3A ; EACD: F0 F5 = BEQ $EAC4 ; Reuses the preceding routine's RTS. - .byte $F0, $F5 + .byte $F0, $F5 ; CPU:$EACD PRG:2ACD F0 F5 - ldx #$00 - ldy #$03 + ldx #$00 ; CPU:$EACF PRG:2ACF A2 00 + ldy #$03 ; CPU:$EAD1 PRG:2AD1 A0 03 - lda $3A - cmp #$0D - bcc @build_first + lda $3A ; CPU:$EAD3 PRG:2AD3 A5 3A + cmp #$0D ; CPU:$EAD5 PRG:2AD5 C9 0D + bcc @build_first ; CPU:$EAD7 PRG:2AD7 90 07 - lsr a - bcc @return + lsr a ; CPU:$EAD9 PRG:2AD9 4A + bcc @return ; CPU:$EADA PRG:2ADA 90 3A - lda #$40 - sta $FB + lda #$40 ; CPU:$EADC PRG:2ADC A9 40 + sta $FB ; CPU:$EADE PRG:2ADE 85 FB ; $EAE0 @build_first: - lda #$42 + lda #$42 ; CPU:$EAE0 PRG:2AE0 A9 42 ; $EAE2 @first_loop: - sta $02B4,x - inx + sta $02B4,x ; CPU:$EAE2 PRG:2AE2 9D B4 02 + inx ; CPU:$EAE5 PRG:2AE5 E8 - lda $E540,y - sta $02B4,x - inx + lda $E540,y ; CPU:$EAE6 PRG:2AE6 B9 40 E5 + sta $02B4,x ; CPU:$EAE9 PRG:2AE9 9D B4 02 + inx ; CPU:$EAEC PRG:2AEC E8 - lda #$00 - sta $02B4,x - inx + lda #$00 ; CPU:$EAED PRG:2AED A9 00 + sta $02B4,x ; CPU:$EAEF PRG:2AEF 9D B4 02 + inx ; CPU:$EAF2 PRG:2AF2 E8 - lda $E543,y - sta $02B4,x - inx + lda $E543,y ; CPU:$EAF3 PRG:2AF3 B9 43 E5 + sta $02B4,x ; CPU:$EAF6 PRG:2AF6 9D B4 02 + inx ; CPU:$EAF9 PRG:2AF9 E8 - dey - bne @build_first + dey ; CPU:$EAFA PRG:2AFA 88 + bne @build_first ; CPU:$EAFB PRG:2AFB D0 E3 - ldx #$06 + ldx #$06 ; CPU:$EAFD PRG:2AFD A2 06 ; $EAFF @second_loop: - lda #$4A - sta $02C0,y + lda #$4A ; CPU:$EAFF PRG:2AFF A9 4A + sta $02C0,y ; CPU:$EB01 PRG:2B01 99 C0 02 - iny - iny + iny ; CPU:$EB04 PRG:2B04 C8 + iny ; CPU:$EB05 PRG:2B05 C8 - lda #$00 - sta $02C0,y + lda #$00 ; CPU:$EB06 PRG:2B06 A9 00 + sta $02C0,y ; CPU:$EB08 PRG:2B08 99 C0 02 - iny + iny ; CPU:$EB0B PRG:2B0B C8 - lda $E547,x - sta $02C0,y + lda $E547,x ; CPU:$EB0C PRG:2B0C BD 47 E5 + sta $02C0,y ; CPU:$EB0F PRG:2B0F 99 C0 02 - iny + iny ; CPU:$EB12 PRG:2B12 C8 - dex - bpl @second_loop + dex ; CPU:$EB13 PRG:2B13 CA + bpl @second_loop ; CPU:$EB14 PRG:2B14 10 E9 ; $EB16 @return: - rts + rts ; CPU:$EB16 PRG:2B16 60 ; --------------------------------------------------------------------------- ; $EB17-$EC3A @@ -10291,109 +10290,109 @@ BuildGlobalDisplayEAC5: ; --------------------------------------------------------------------------- UpdateGlobalRuntimeEB17: - lda $BE - bne GlobalRuntimeReturnEB7E + lda $BE ; CPU:$EB17 PRG:2B17 A5 BE + bne GlobalRuntimeReturnEB7E ; CPU:$EB19 PRG:2B19 D0 63 - lda $B4 - beq GlobalRuntimeCheckBDEB23 + lda $B4 ; CPU:$EB1B PRG:2B1B A5 B4 + beq GlobalRuntimeCheckBDEB23 ; CPU:$EB1D PRG:2B1D F0 04 - dec $B4 - bne GlobalRuntimeUpdateEB5E + dec $B4 ; CPU:$EB1F PRG:2B1F C6 B4 + bne GlobalRuntimeUpdateEB5E ; CPU:$EB21 PRG:2B21 D0 3B ; $EB23 GlobalRuntimeCheckBDEB23: - lda $BD - ora $B9 - bne GlobalRuntimeUpdateEB5E + lda $BD ; CPU:$EB23 PRG:2B23 A5 BD + ora $B9 ; CPU:$EB25 PRG:2B25 05 B9 + bne GlobalRuntimeUpdateEB5E ; CPU:$EB27 PRG:2B27 D0 35 - sta $60 - sta $C0 + sta $60 ; CPU:$EB29 PRG:2B29 85 60 + sta $C0 ; CPU:$EB2B PRG:2B2B 85 C0 - lda $BF - beq GlobalRuntimeCheckC1EB35 + lda $BF ; CPU:$EB2D PRG:2B2D A5 BF + beq GlobalRuntimeCheckC1EB35 ; CPU:$EB2F PRG:2B2F F0 04 - cmp #$01 - bne GlobalRuntimeSecondaryEB9E + cmp #$01 ; CPU:$EB31 PRG:2B31 C9 01 + bne GlobalRuntimeSecondaryEB9E ; CPU:$EB33 PRG:2B33 D0 69 ; $EB35 GlobalRuntimeCheckC1EB35: - lda $C1 - cmp #$02 - beq GlobalRuntimeUpdateEB5E + lda $C1 ; CPU:$EB35 PRG:2B35 A5 C1 + cmp #$02 ; CPU:$EB37 PRG:2B37 C9 02 + beq GlobalRuntimeUpdateEB5E ; CPU:$EB39 PRG:2B39 F0 23 - lda $C1 - beq GlobalRuntimeCheckBFEB49 + lda $C1 ; CPU:$EB3B PRG:2B3B A5 C1 + beq GlobalRuntimeCheckBFEB49 ; CPU:$EB3D PRG:2B3D F0 0A - lda #$09 - sta $B8 + lda #$09 ; CPU:$EB3F PRG:2B3F A9 09 + sta $B8 ; CPU:$EB41 PRG:2B41 85 B8 ; $EB43 ; Also targeted by the BEQ at $EB91. GlobalRuntimeSetC1EB43: - lda #$02 - sta $C1 + lda #$02 ; CPU:$EB43 PRG:2B43 A9 02 + sta $C1 ; CPU:$EB45 PRG:2B45 85 C1 - bne GlobalRuntimeSetFlagsEB93 + bne GlobalRuntimeSetFlagsEB93 ; CPU:$EB47 PRG:2B47 D0 4A ; $EB49 GlobalRuntimeCheckBFEB49: - lda $BF - bne GlobalRuntimeUpdateEB5E + lda $BF ; CPU:$EB49 PRG:2B49 A5 BF + bne GlobalRuntimeUpdateEB5E ; CPU:$EB4B PRG:2B4B D0 11 - lda $5C - asl a - bcc GlobalRuntimeShiftAgainEB7F + lda $5C ; CPU:$EB4D PRG:2B4D A5 5C + asl a ; CPU:$EB4F PRG:2B4F 0A + bcc GlobalRuntimeShiftAgainEB7F ; CPU:$EB50 PRG:2B50 90 2D - lda #$00 - sta $49 + lda #$00 ; CPU:$EB52 PRG:2B52 A9 00 + sta $49 ; CPU:$EB54 PRG:2B54 85 49 - lda $2B - bne GlobalRuntimeReturnEB9D + lda $2B ; CPU:$EB56 PRG:2B56 A5 2B + bne GlobalRuntimeReturnEB9D ; CPU:$EB58 PRG:2B58 D0 43 - lda #$05 - sta $2B + lda #$05 ; CPU:$EB5A PRG:2B5A A9 05 + sta $2B ; CPU:$EB5C PRG:2B5C 85 2B ; $EB5E GlobalRuntimeUpdateEB5E: - lda #$04 - sta $60 + lda #$04 ; CPU:$EB5E PRG:2B5E A9 04 + sta $60 ; CPU:$EB60 PRG:2B60 85 60 - jsr $EC99 + jsr $EC99 ; CPU:$EB62 PRG:2B62 20 99 EC - ldy $B3 + ldy $B3 ; CPU:$EB65 PRG:2B65 A4 B3 - lda #$00 - sta $BD + lda #$00 ; CPU:$EB67 PRG:2B67 A9 00 + sta $BD ; CPU:$EB69 PRG:2B69 85 BD - jsr CheckRuntimeTableValuesECC9 - bne GlobalRuntimeIncrementBDEB7C + jsr CheckRuntimeTableValuesECC9 ; CPU:$EB6B PRG:2B6B 20 C9 EC + bne GlobalRuntimeIncrementBDEB7C ; CPU:$EB6E PRG:2B6E D0 0C - iny - cpy #$40 - bne GlobalRuntimeCheckNextEB77 + iny ; CPU:$EB70 PRG:2B70 C8 + cpy #$40 ; CPU:$EB71 PRG:2B71 C0 40 + bne GlobalRuntimeCheckNextEB77 ; CPU:$EB73 PRG:2B73 D0 02 - ldy #$00 + ldy #$00 ; CPU:$EB75 PRG:2B75 A0 00 ; $EB77 GlobalRuntimeCheckNextEB77: - jsr CheckRuntimeTableValuesECC9 - beq GlobalRuntimeReturnEB9D + jsr CheckRuntimeTableValuesECC9 ; CPU:$EB77 PRG:2B77 20 C9 EC + beq GlobalRuntimeReturnEB9D ; CPU:$EB7A PRG:2B7A F0 21 ; $EB7C GlobalRuntimeIncrementBDEB7C: - inc $BD + inc $BD ; CPU:$EB7C PRG:2B7C E6 BD ; $EB7E GlobalRuntimeReturnEB7E: - rts + rts ; CPU:$EB7E PRG:2B7E 60 ; --------------------------------------------------------------------------- @@ -10402,37 +10401,37 @@ GlobalRuntimeReturnEB7E: ; --------------------------------------------------------------------------- GlobalRuntimeShiftAgainEB7F: - asl a + asl a ; CPU:$EB7F PRG:2B7F 0A ; EB80: 90 74 = BCC $EBF6 - .byte $90, $74 + .byte $90, $74 ; CPU:$EB80 PRG:2B80 90 74 - lda $49 - bne GlobalRuntimeReturnEB9D + lda $49 ; CPU:$EB82 PRG:2B82 A5 49 + bne GlobalRuntimeReturnEB9D ; CPU:$EB84 PRG:2B84 D0 17 - jsr InitializeRuntimeFieldsEC75 + jsr InitializeRuntimeFieldsEC75 ; CPU:$EB86 PRG:2B86 20 75 EC - lda $B8 - cmp #$FF - beq GlobalRuntimeReturnEB9D + lda $B8 ; CPU:$EB89 PRG:2B89 A5 B8 + cmp #$FF ; CPU:$EB8B PRG:2B8B C9 FF + beq GlobalRuntimeReturnEB9D ; CPU:$EB8D PRG:2B8D F0 0E - cmp #$09 - beq GlobalRuntimeSetC1EB43 + cmp #$09 ; CPU:$EB8F PRG:2B8F C9 09 + beq GlobalRuntimeSetC1EB43 ; CPU:$EB91 PRG:2B91 F0 B0 ; $EB93 GlobalRuntimeSetFlagsEB93: - lda #$01 - sta $BE - sta $49 + lda #$01 ; CPU:$EB93 PRG:2B93 A9 01 + sta $BE ; CPU:$EB95 PRG:2B95 85 BE + sta $49 ; CPU:$EB97 PRG:2B97 85 49 - lda #$40 - sta $FB + lda #$40 ; CPU:$EB99 PRG:2B99 A9 40 + sta $FB ; CPU:$EB9B PRG:2B9B 85 FB ; $EB9D GlobalRuntimeReturnEB9D: - rts + rts ; CPU:$EB9D PRG:2B9D 60 ; --------------------------------------------------------------------------- @@ -10441,35 +10440,35 @@ GlobalRuntimeReturnEB9D: ; --------------------------------------------------------------------------- GlobalRuntimeSecondaryEB9E: - lda $49 - bne GlobalRuntimeCheck5CEBB6 + lda $49 ; CPU:$EB9E PRG:2B9E A5 49 + bne GlobalRuntimeCheck5CEBB6 ; CPU:$EBA0 PRG:2BA0 D0 14 - lda $5C - asl a - asl a - bcc GlobalRuntimeUpdateTrackEBBD + lda $5C ; CPU:$EBA2 PRG:2BA2 A5 5C + asl a ; CPU:$EBA4 PRG:2BA4 0A + asl a ; CPU:$EBA5 PRG:2BA5 0A + bcc GlobalRuntimeUpdateTrackEBBD ; CPU:$EBA6 PRG:2BA6 90 15 - jsr EnterNmiSequenceMode - jsr CopyWorkingBufferToPersistentEC3B + jsr EnterNmiSequenceMode ; CPU:$EBA8 PRG:2BA8 20 B1 C3 + jsr CopyWorkingBufferToPersistentEC3B ; CPU:$EBAB PRG:2BAB 20 3B EC - stx $47 - stx $42 + stx $47 ; CPU:$EBAE PRG:2BAE 86 47 + stx $42 ; CPU:$EBB0 PRG:2BB0 86 42 - lda #$08 - sta $41 + lda #$08 ; CPU:$EBB2 PRG:2BB2 A9 08 + sta $41 ; CPU:$EBB4 PRG:2BB4 85 41 ; $EBB6 GlobalRuntimeCheck5CEBB6: - lda $5C - bne GlobalRuntimeReturnEBBC + lda $5C ; CPU:$EBB6 PRG:2BB6 A5 5C + bne GlobalRuntimeReturnEBBC ; CPU:$EBB8 PRG:2BB8 D0 02 - sta $49 + sta $49 ; CPU:$EBBA PRG:2BBA 85 49 ; $EBBC GlobalRuntimeReturnEBBC: - rts + rts ; CPU:$EBBC PRG:2BBC 60 ; --------------------------------------------------------------------------- @@ -10478,60 +10477,60 @@ GlobalRuntimeReturnEBBC: ; --------------------------------------------------------------------------- GlobalRuntimeUpdateTrackEBBD: - jsr UpdateOamEntriesEC5D + jsr UpdateOamEntriesEC5D ; CPU:$EBBD PRG:2BBD 20 5D EC - lda $3A + lda $3A ; CPU:$EBC0 PRG:2BC0 A5 3A ; EBC2: D0 F8 = BNE $EBBC - .byte $D0, $F8 + .byte $D0, $F8 ; CPU:$EBC2 PRG:2BC2 D0 F8 - inc $3A + inc $3A ; CPU:$EBC4 PRG:2BC4 E6 3A - lda $5C - cmp #$80 - beq GlobalRuntimeIncrement05E0EBCD + lda $5C ; CPU:$EBC6 PRG:2BC6 A5 5C + cmp #$80 ; CPU:$EBC8 PRG:2BC8 C9 80 + beq GlobalRuntimeIncrement05E0EBCD ; CPU:$EBCA PRG:2BCA F0 04 - cmp #$08 - bne GlobalRuntimeCheckMode4EBE9 + cmp #$08 ; CPU:$EBCC PRG:2BCC C9 08 + bne GlobalRuntimeCheckMode4EBE9 ; CPU:$EBCE PRG:2BCE D0 19 ; $EBCD GlobalRuntimeIncrement05E0EBCD: - inc $05E0 + inc $05E0 ; CPU:$EBD0 PRG:2BD0 EE E0 05 - lda $05E0 - cmp #$0A - bmi GlobalRuntimeSetTriggerEBDC + lda $05E0 ; CPU:$EBD3 PRG:2BD3 AD E0 05 + cmp #$0A ; CPU:$EBD6 PRG:2BD6 C9 0A + bmi GlobalRuntimeSetTriggerEBDC ; CPU:$EBD8 PRG:2BD8 30 05 - lda #$01 - sta $05E0 + lda #$01 ; CPU:$EBDA PRG:2BDA A9 01 + sta $05E0 ; CPU:$EBDC PRG:2BDC 8D E0 05 ; $EBDC GlobalRuntimeSetTriggerEBDC: - lda #$01 - sta $FF + lda #$01 ; CPU:$EBDF PRG:2BDF A9 01 + sta $FF ; CPU:$EBE1 PRG:2BE1 85 FF - lsr a - sta $49 + lsr a ; CPU:$EBE3 PRG:2BE3 4A + sta $49 ; CPU:$EBE4 PRG:2BE4 85 49 - jmp BuildOamEntryEC47 + jmp BuildOamEntryEC47 ; CPU:$EBE6 PRG:2BE6 4C 47 EC ; $EBE9 GlobalRuntimeCheckMode4EBE9: - cmp #$04 + cmp #$04 ; CPU:$EBE9 PRG:2BE9 C9 04 ; EBEB: D0 C9 = BNE $EBB6 - .byte $D0, $C9 + .byte $D0, $C9 ; CPU:$EBEB PRG:2BEB D0 C9 - dec $05E0 - bne GlobalRuntimeSetTriggerEBDC + dec $05E0 ; CPU:$EBED PRG:2BED CE E0 05 + bne GlobalRuntimeSetTriggerEBDC ; CPU:$EBF0 PRG:2BF0 D0 ED - lda #$09 + lda #$09 ; CPU:$EBF2 PRG:2BF2 A9 09 ; EBF4: D0 E6 = BNE $EBDC - .byte $D0, $E6 + .byte $D0, $E6 ; CPU:$EBF4 PRG:2BF4 D0 E6 ; --------------------------------------------------------------------------- @@ -10540,73 +10539,73 @@ GlobalRuntimeCheckMode4EBE9: ; --------------------------------------------------------------------------- GlobalRuntimeUpdateC2EBF6: - lda $2C + lda $2C ; CPU:$EBF6 PRG:2BF6 A5 2C ; EBF8: D0 40 = BNE $EC3A - .byte $D0, $40 + .byte $D0, $40 ; CPU:$EBF8 PRG:2BF8 D0 40 - lda #$08 - sta $2C + lda #$08 ; CPU:$EBFA PRG:2BFA A9 08 + sta $2C ; CPU:$EBFC PRG:2BFC 85 2C - lda $5C - lsr a - bcs GlobalRuntimeIncrementC2EC10 + lda $5C ; CPU:$EBFE PRG:2BFE A5 5C + lsr a ; CPU:$EC00 PRG:2C00 4A + bcs GlobalRuntimeIncrementC2EC10 ; CPU:$EC01 PRG:2C01 B0 0D - lsr a + lsr a ; CPU:$EC03 PRG:2C03 4A ; EC02: 90 34 = BCC $EC38 - .byte $90, $34 + .byte $90, $34 ; CPU:$EC04 PRG:2C04 90 34 - dec $C2 + dec $C2 ; CPU:$EC06 PRG:2C06 C6 C2 - lda $C2 - bpl GlobalRuntimeSetFlagEC18 + lda $C2 ; CPU:$EC08 PRG:2C08 A5 C2 + bpl GlobalRuntimeSetFlagEC18 ; CPU:$EC0A PRG:2C0A 10 10 - lda #$14 - bne GlobalRuntimeStoreC2EC16 + lda #$14 ; CPU:$EC0C PRG:2C0C A9 14 + bne GlobalRuntimeStoreC2EC16 ; CPU:$EC0E PRG:2C0E D0 0A ; $EC10 GlobalRuntimeIncrementC2EC10: - inc $C2 + inc $C2 ; CPU:$EC10 PRG:2C10 E6 C2 - lda $C2 - cmp #$15 - bcc GlobalRuntimeSetFlagEC18 + lda $C2 ; CPU:$EC12 PRG:2C12 A5 C2 + cmp #$15 ; CPU:$EC14 PRG:2C14 C9 15 + bcc GlobalRuntimeSetFlagEC18 ; CPU:$EC16 PRG:2C16 90 04 - lda #$00 + lda #$00 ; CPU:$EC18 PRG:2C18 A9 00 ; $EC16 GlobalRuntimeStoreC2EC16: - sta $C2 + sta $C2 ; CPU:$EC1A PRG:2C1A 85 C2 ; $EC18 GlobalRuntimeSetFlagEC18: - lda #$01 - sta $FF + lda #$01 ; CPU:$EC1C PRG:2C1C A9 01 + sta $FF ; CPU:$EC1E PRG:2C1E 85 FF - lsr a - sta $49 + lsr a ; CPU:$EC20 PRG:2C20 4A + sta $49 ; CPU:$EC21 PRG:2C21 85 49 - lda #$D0 - sta $0230 + lda #$D0 ; CPU:$EC23 PRG:2C23 A9 D0 + sta $0230 ; CPU:$EC25 PRG:2C25 8D 30 02 - lda #$CA - sta $0231 + lda #$CA ; CPU:$EC28 PRG:2C28 A9 CA + sta $0231 ; CPU:$EC2A PRG:2C2A 8D 31 02 - lda #$00 - sta $0232 + lda #$00 ; CPU:$EC2D PRG:2C2D A9 00 + sta $0232 ; CPU:$EC2F PRG:2C2F 8D 32 02 - ldx $C2 - lda $E6F6,x - sta $0233 + ldx $C2 ; CPU:$EC32 PRG:2C32 A6 C2 + lda $E6F6,x ; CPU:$EC34 PRG:2C34 BD F6 E6 + sta $0233 ; CPU:$EC37 PRG:2C37 8D 33 02 ; $EC3A GlobalRuntimeReturnEC3A: - rts + rts ; CPU:$EC3A PRG:2C3A 60 ; --------------------------------------------------------------------------- @@ -10616,16 +10615,16 @@ GlobalRuntimeReturnEC3A: ; --------------------------------------------------------------------------- CopyWorkingBufferToPersistentEC3B: - ldx #$00 + ldx #$00 ; CPU:$EC3B PRG:2C3B A2 00 @copy: - lda $05E0,x - sta $06E0,x + lda $05E0,x ; CPU:$EC3D PRG:2C3D BD E0 05 + sta $06E0,x ; CPU:$EC40 PRG:2C40 9D E0 06 - dex - bne @copy + dex ; CPU:$EC43 PRG:2C43 CA + bne @copy ; CPU:$EC44 PRG:2C44 D0 F7 - rts + rts ; CPU:$EC46 PRG:2C46 60 ; --------------------------------------------------------------------------- ; $EC47-$EC5C @@ -10633,19 +10632,19 @@ CopyWorkingBufferToPersistentEC3B: ; --------------------------------------------------------------------------- BuildOamEntryEC47: - lda #$CF - sta $0234 + lda #$CF ; CPU:$EC47 PRG:2C47 A9 CF + sta $0234 ; CPU:$EC49 PRG:2C49 8D 34 02 - lda $05E0 - sta $0235 + lda $05E0 ; CPU:$EC4C PRG:2C4C AD E0 05 + sta $0235 ; CPU:$EC4F PRG:2C4F 8D 35 02 - lda #$00 - sta $0236 + lda #$00 ; CPU:$EC52 PRG:2C52 A9 00 + sta $0236 ; CPU:$EC54 PRG:2C54 8D 36 02 - lda #$E4 - sta $0237 + lda #$E4 ; CPU:$EC57 PRG:2C57 A9 E4 + sta $0237 ; CPU:$EC59 PRG:2C59 8D 37 02 - rts + rts ; CPU:$EC5C PRG:2C5C 60 ; --------------------------------------------------------------------------- ; $EC5D-$EC74 @@ -10653,26 +10652,26 @@ BuildOamEntryEC47: ; --------------------------------------------------------------------------- UpdateOamEntriesEC5D: - lda #$F8 - jsr $EC25 + lda #$F8 ; CPU:$EC5D PRG:2C5D A9 F8 + jsr $EC25 ; CPU:$EC5F PRG:2C5F 20 25 EC - lda $3F - and #$10 - beq @use_c7 + lda $3F ; CPU:$EC62 PRG:2C62 A5 3F + and #$10 ; CPU:$EC64 PRG:2C64 29 10 + beq @use_c7 ; CPU:$EC66 PRG:2C66 F0 04 - lda #$F8 - bne @store + lda #$F8 ; CPU:$EC68 PRG:2C68 A9 F8 + bne @store ; CPU:$EC6A PRG:2C6A D0 02 @use_c7: - lda #$C7 + lda #$C7 ; CPU:$EC6C PRG:2C6C A9 C7 @store: - sta $0228 - sta $022C + sta $0228 ; CPU:$EC6E PRG:2C6E 8D 28 02 + sta $022C ; CPU:$EC71 PRG:2C71 8D 2C 02 - rts + rts ; CPU:$EC74 PRG:2C74 60 ; --------------------------------------------------------------------------- ; $EC75-$EC98 @@ -10681,32 +10680,32 @@ UpdateOamEntriesEC5D: ; --------------------------------------------------------------------------- InitializeRuntimeFieldsEC75: - lda #$00 - sta $CA - sta $C8 - sta $C9 + lda #$00 ; CPU:$EC75 PRG:2C75 A9 00 + sta $CA ; CPU:$EC77 PRG:2C77 85 CA + sta $C8 ; CPU:$EC79 PRG:2C79 85 C8 + sta $C9 ; CPU:$EC7B PRG:2C7B 85 C9 - lda $B2 - sta $BA + lda $B2 ; CPU:$EC7D PRG:2C7D A5 B2 + sta $BA ; CPU:$EC7F PRG:2C7F 85 BA - lda $B0 - sta $BB + lda $B0 ; CPU:$EC81 PRG:2C81 A5 B0 + sta $BB ; CPU:$EC83 PRG:2C83 85 BB - lda $B1 - sta $BC + lda $B1 ; CPU:$EC85 PRG:2C85 A5 B1 + sta $BC ; CPU:$EC87 PRG:2C87 85 BC - ldy $C2 - lda DataTableE6E1,y - sta $B8 + ldy $C2 ; CPU:$EC89 PRG:2C89 A4 C2 + lda DataTableE6E1,y ; CPU:$EC8B PRG:2C8B B9 E1 E6 + sta $B8 ; CPU:$EC8E PRG:2C8E 85 B8 - cmp #$11 - bcc @return + cmp #$11 ; CPU:$EC90 PRG:2C90 C9 11 + bcc @return ; CPU:$EC92 PRG:2C92 90 04 - and #$0F - sta $C8 + and #$0F ; CPU:$EC94 PRG:2C94 29 0F + sta $C8 ; CPU:$EC96 PRG:2C96 85 C8 @return: - rts + rts ; CPU:$EC98 PRG:2C98 60 ; --------------------------------------------------------------------------- ; $EC99-$ECBE @@ -10715,39 +10714,39 @@ InitializeRuntimeFieldsEC75: ; --------------------------------------------------------------------------- UpdateRuntimeAccumulatorEC99: - lda $60 + lda $60 ; CPU:$EC99 PRG:2C99 A5 60 ; EC9B: F0 FB = BEQ $EC98 ; Reuses the RTS from InitializeRuntimeFieldsEC75. - .byte $F0, $FB + .byte $F0, $FB ; CPU:$EC9B PRG:2C9B F0 FB - clc - adc $B9 - sta $B9 + clc ; CPU:$EC9D PRG:2C9D 18 + adc $B9 ; CPU:$EC9E PRG:2C9E 65 B9 + sta $B9 ; CPU:$ECA0 PRG:2CA0 85 B9 - cmp #$08 + cmp #$08 ; CPU:$ECA2 PRG:2CA2 C9 08 ; ECA4: D0 F2 = BNE $EC98 ; Reuses the same preceding RTS. - .byte $D0, $F2 + .byte $D0, $F2 ; CPU:$ECA4 PRG:2CA4 D0 F2 - lda #$01 - sta $C0 + lda #$01 ; CPU:$ECA6 PRG:2CA6 A9 01 + sta $C0 ; CPU:$ECA8 PRG:2CA8 85 C0 - lsr a - sta $B9 + lsr a ; CPU:$ECAA PRG:2CAA 4A + sta $B9 ; CPU:$ECAB PRG:2CAB 85 B9 - jsr $F6FB + jsr $F6FB ; CPU:$ECAD PRG:2CAD 20 FB F6 - lda $B2 - jsr IncrementWrap40ECBF - sta $B2 + lda $B2 ; CPU:$ECB0 PRG:2CB0 A5 B2 + jsr IncrementWrap40ECBF ; CPU:$ECB2 PRG:2CB2 20 BF EC + sta $B2 ; CPU:$ECB5 PRG:2CB5 85 B2 - lda $B3 - jsr IncrementWrap40ECBF - sta $B3 + lda $B3 ; CPU:$ECB7 PRG:2CB7 A5 B3 + jsr IncrementWrap40ECBF ; CPU:$ECB9 PRG:2CB9 20 BF EC + sta $B3 ; CPU:$ECBC PRG:2CBC 85 B3 - rts + rts ; CPU:$ECBE PRG:2CBE 60 ; --------------------------------------------------------------------------- ; $ECBF-$ECC8 @@ -10761,16 +10760,16 @@ UpdateRuntimeAccumulatorEC99: ; --------------------------------------------------------------------------- IncrementWrap40ECBF: - clc - adc #$01 + clc ; CPU:$ECBF PRG:2CBF 18 + adc #$01 ; CPU:$ECC0 PRG:2CC0 69 01 - cmp #$40 - bne @return + cmp #$40 ; CPU:$ECC2 PRG:2CC2 C9 40 + bne @return ; CPU:$ECC4 PRG:2CC4 D0 02 - lda #$00 + lda #$00 ; CPU:$ECC6 PRG:2CC6 A9 00 @return: - rts + rts ; CPU:$ECC8 PRG:2CC8 60 ; --------------------------------------------------------------------------- ; $ECC9-$ECE3 @@ -10787,29 +10786,29 @@ IncrementWrap40ECBF: ; --------------------------------------------------------------------------- CheckRuntimeTableValuesECC9: - lda #$3D + lda #$3D ; CPU:$ECC9 PRG:2CC9 A9 3D - cmp $0540,y - bne @no_match + cmp $0540,y ; CPU:$ECCB PRG:2CCB D9 40 05 + bne @no_match ; CPU:$ECCE PRG:2CCE D0 11 - cmp $0480,y - bne @no_match + cmp $0480,y ; CPU:$ECD0 PRG:2CD0 D9 80 04 + bne @no_match ; CPU:$ECD3 PRG:2CD3 D0 0C - lda #$3B + lda #$3B ; CPU:$ECD5 PRG:2CD5 A9 3B - cmp $0400,y - bne @no_match + cmp $0400,y ; CPU:$ECD7 PRG:2CD7 D9 00 04 + bne @no_match ; CPU:$ECDA PRG:2CDA D0 05 - cmp $04C0,y + cmp $04C0,y ; CPU:$ECDC PRG:2CDC D9 C0 04 ; ECDF: F0 E5 = BEQ $ECC6 ; Reuses LDA #$00 / RTS from IncrementWrap40ECBF. - .byte $F0, $E5 + .byte $F0, $E5 ; CPU:$ECDF PRG:2CDF F0 E5 @no_match: - lda #$01 - rts + lda #$01 ; CPU:$ECE1 PRG:2CE1 A9 01 + rts ; CPU:$ECE3 PRG:2CE3 60 ; --------------------------------------------------------------------------- ; $ECE4-$ED39 @@ -10821,74 +10820,74 @@ CheckRuntimeTableValuesECC9: ; --------------------------------------------------------------------------- BuildPairedPpuRows: - ldy #$03 + ldy #$03 ; CPU:$ECE4 PRG:2CE4 A0 03 ; $ECE6 @load_parameters: - lda PpuRowDescriptorsE6A1,x - inx - sta $0002,y + lda PpuRowDescriptorsE6A1,x ; CPU:$ECE6 PRG:2CE6 BD A1 E6 + inx ; CPU:$ECE9 PRG:2CE9 E8 + sta $0002,y ; CPU:$ECEA PRG:2CEA 99 02 00 - dey - bpl @load_parameters + dey ; CPU:$ECED PRG:2CED 88 + bpl @load_parameters ; CPU:$ECEE PRG:2CEE 10 F6 - lda $05 - sta $0400 + lda $05 ; CPU:$ECF0 PRG:2CF0 A5 05 + sta $0400 ; CPU:$ECF2 PRG:2CF2 8D 00 04 - lda $02 - sta $0401 + lda $02 ; CPU:$ECF5 PRG:2CF5 A5 02 + sta $0401 ; CPU:$ECF7 PRG:2CF7 8D 01 04 - ldx #$20 - stx $0402 + ldx #$20 ; CPU:$ECFA PRG:2CFA A2 20 + stx $0402 ; CPU:$ECFC PRG:2CFC 8E 02 04 ; $ECFF @fill_first: - lda $03 - sta $0403,x - dex + lda $03 ; CPU:$ECFF PRG:2CFF A5 03 + sta $0403,x ; CPU:$ED01 PRG:2D01 9D 03 04 + dex ; CPU:$ED04 PRG:2D04 CA - lda $04 - sta $0403,x - dex + lda $04 ; CPU:$ED05 PRG:2D05 A5 04 + sta $0403,x ; CPU:$ED07 PRG:2D07 9D 03 04 + dex ; CPU:$ED0A PRG:2D0A CA - bpl @fill_first + bpl @fill_first ; CPU:$ED0B PRG:2D0B 10 F2 - lda $05 - eor #$04 - sta $0423 + lda $05 ; CPU:$ED0D PRG:2D0D A5 05 + eor #$04 ; CPU:$ED0F PRG:2D0F 49 04 + sta $0423 ; CPU:$ED11 PRG:2D11 8D 23 04 - lda $02 - sta $0424 + lda $02 ; CPU:$ED14 PRG:2D14 A5 02 + sta $0424 ; CPU:$ED16 PRG:2D16 8D 24 04 - ldx #$20 - stx $0425 + ldx #$20 ; CPU:$ED19 PRG:2D19 A2 20 + stx $0425 ; CPU:$ED1B PRG:2D1B 8E 25 04 ; $ED1E @fill_second: - lda $03 - sta $0426,x - dex + lda $03 ; CPU:$ED1E PRG:2D1E A5 03 + sta $0426,x ; CPU:$ED20 PRG:2D20 9D 26 04 + dex ; CPU:$ED23 PRG:2D23 CA - lda $04 - sta $0426,x - dex + lda $04 ; CPU:$ED24 PRG:2D24 A5 04 + sta $0426,x ; CPU:$ED26 PRG:2D26 9D 26 04 + dex ; CPU:$ED29 PRG:2D29 CA - bpl @fill_second + bpl @fill_second ; CPU:$ED2A PRG:2D2A 10 F2 - lda #$00 - sta $0446 + lda #$00 ; CPU:$ED2C PRG:2D2C A9 00 + sta $0446 ; CPU:$ED2E PRG:2D2E 8D 46 04 - lda #$00 - sta $00 + lda #$00 ; CPU:$ED31 PRG:2D31 A9 00 + sta $00 ; CPU:$ED33 PRG:2D33 85 00 - lda #$04 - jmp $C289 + lda #$04 ; CPU:$ED35 PRG:2D35 A9 04 + jmp $C289 ; CPU:$ED37 PRG:2D37 4C 89 C2 ; --------------------------------------------------------------------------- ; $ED3A-$ED49 @@ -10896,10 +10895,10 @@ BuildPairedPpuRows: ; --------------------------------------------------------------------------- RuntimeDataED3A: - .byte $46, $59, $C8, $D2 - .byte $A7, $E0, $ED, $EE - .byte $ED, $EE, $EF, $06 - .byte $02, $40, $10, $30 + .byte $46, $59, $C8, $D2 ; CPU:$ED3A PRG:2D3A 46 59 C8 D2 + .byte $A7, $E0, $ED, $EE ; CPU:$ED3E PRG:2D3E A7 E0 ED EE + .byte $ED, $EE, $EF, $06 ; CPU:$ED42 PRG:2D42 ED EE EF 06 + .byte $02, $40, $10, $30 ; CPU:$ED46 PRG:2D46 02 40 10 30 ; --------------------------------------------------------------------------- @@ -10909,52 +10908,52 @@ RuntimeDataED3A: RuntimeCommandDataED4A: ; $ED4A - .byte $40, $36, $0D, $31, $40, $07, $05, $40 - .byte $02, $88, $40, $02, $88, $40, $1C, $07 + .byte $40, $36, $0D, $31, $40, $07, $05, $40 ; CPU:$ED4A PRG:2D4A 40 36 0D 31 + .byte $02, $88, $40, $02, $88, $40, $1C, $07 ; CPU:$ED52 PRG:2D52 02 88 40 02 ; $ED5A - .byte $40, $25, $10, $40, $0A, $07, $40, $02 - .byte $07, $40, $02, $8D, $40, $39, $07, $40 + .byte $40, $25, $10, $40, $0A, $07, $40, $02 ; CPU:$ED5A PRG:2D5A 40 25 10 40 + .byte $07, $40, $02, $8D, $40, $39, $07, $40 ; CPU:$ED62 PRG:2D62 07 40 02 8D ; $ED6A - .byte $02, $07, $40, $02, $07, $40, $0E, $0F - .byte $40, $10, $0C, $40, $10, $06, $40, $05 + .byte $02, $07, $40, $02, $07, $40, $0E, $0F ; CPU:$ED6A PRG:2D6A 02 07 40 02 + .byte $40, $10, $0C, $40, $10, $06, $40, $05 ; CPU:$ED72 PRG:2D72 40 10 0C 40 ; $ED7A - .byte $0A, $40, $2B, $0E, $40, $1E, $0F, $40 - .byte $02, $0E, $40, $26, $0E, $40, $02, $08 + .byte $0A, $40, $2B, $0E, $40, $1E, $0F, $40 ; CPU:$ED7A PRG:2D7A 0A 40 2B 0E + .byte $02, $0E, $40, $26, $0E, $40, $02, $08 ; CPU:$ED82 PRG:2D82 02 0E 40 26 ; $ED8A - .byte $40, $02, $08, $40, $02, $08, $40, $02 - .byte $08, $40, $02, $88, $40, $12, $06, $40 + .byte $40, $02, $08, $40, $02, $08, $40, $02 ; CPU:$ED8A PRG:2D8A 40 02 08 40 + .byte $08, $40, $02, $88, $40, $12, $06, $40 ; CPU:$ED92 PRG:2D92 08 40 02 88 ; $ED9A - .byte $02, $11, $46, $0A, $17, $40, $14, $01 - .byte $40, $02, $01, $40, $02, $81, $40, $02 + .byte $02, $11, $46, $0A, $17, $40, $14, $01 ; CPU:$ED9A PRG:2D9A 02 11 46 0A + .byte $40, $02, $01, $40, $02, $81, $40, $02 ; CPU:$EDA2 PRG:2DA2 40 02 01 40 ; $EDAA - .byte $81, $40, $02, $01, $40, $02, $01, $40 - .byte $11, $30, $8D, $40, $0A, $0C, $40, $0B + .byte $81, $40, $02, $01, $40, $02, $01, $40 ; CPU:$EDAA PRG:2DAA 81 40 02 01 + .byte $11, $30, $8D, $40, $0A, $0C, $40, $0B ; CPU:$EDB2 PRG:2DB2 11 30 8D 40 ; $EDBA - .byte $0D, $40, $03, $8D, $40, $09, $8C, $40 - .byte $02, $0C, $40, $0E, $31, $09, $02, $40 + .byte $0D, $40, $03, $8D, $40, $09, $8C, $40 ; CPU:$EDBA PRG:2DBA 0D 40 03 8D + .byte $02, $0C, $40, $0E, $31, $09, $02, $40 ; CPU:$EDC2 PRG:2DC2 02 0C 40 0E ; $EDCA - .byte $0F, $30, $40, $34, $03, $40, $07, $04 - .byte $40, $0C, $03, $40, $0A, $04, $40, $0E + .byte $0F, $30, $40, $34, $03, $40, $07, $04 ; CPU:$EDCA PRG:2DCA 0F 30 40 34 + .byte $40, $0C, $03, $40, $0A, $04, $40, $0E ; CPU:$EDD2 PRG:2DD2 40 0C 03 40 ; $EDDA - .byte $03, $40, $06, $83, $40, $09, $04, $40 - .byte $06, $84, $40, $0A, $31, $07, $40, $04 + .byte $03, $40, $06, $83, $40, $09, $04, $40 ; CPU:$EDDA PRG:2DDA 03 40 06 83 + .byte $06, $84, $40, $0A, $31, $07, $40, $04 ; CPU:$EDE2 PRG:2DE2 06 84 40 0A ; $EDEA - .byte $07, $40, $05, $8B, $40, $0E, $06, $40 - .byte $09, $0A, $40, $07, $0F, $40, $02, $10 + .byte $07, $40, $05, $8B, $40, $0E, $06, $40 ; CPU:$EDEA PRG:2DEA 07 40 05 8B + .byte $09, $0A, $40, $07, $0F, $40, $02, $10 ; CPU:$EDF2 PRG:2DF2 09 0A 40 07 ; $EDFA - .byte $40, $07, $06, $40, $02, $0B, $40, $02 - .byte $0A, $40, $0B, $84, $40, $0B, $13, $43 + .byte $40, $07, $06, $40, $02, $0B, $40, $02 ; CPU:$EDFA PRG:2DFA 40 07 06 40 + .byte $0A, $40, $0B, $84, $40, $0B, $13, $43 ; CPU:$EE02 PRG:2E02 0A 40 0B 84 ; --------------------------------------------------------------------------- @@ -10965,131 +10964,131 @@ RuntimeCommandDataED4A: CourseDefinitionDataEE0A: ; $EE0A - .byte $37, $1B, $40, $18, $83, $40, $0A, $0E - .byte $40, $09, $07, $40, $02, $11, $46, $16 + .byte $37, $1B, $40, $18, $83, $40, $0A, $0E ; CPU:$EE0A PRG:2E0A 37 1B 40 18 + .byte $40, $09, $07, $40, $02, $11, $46, $16 ; CPU:$EE12 PRG:2E12 40 09 07 40 ; $EE1A - .byte $17, $40, $0F, $0E, $40, $0B, $05, $40 - .byte $05, $87, $40, $09, $03, $40, $0E, $05 + .byte $17, $40, $0F, $0E, $40, $0B, $05, $40 ; CPU:$EE1A PRG:2E1A 17 40 0F 0E + .byte $05, $87, $40, $09, $03, $40, $0E, $05 ; CPU:$EE22 PRG:2E22 05 87 40 09 ; $EE2A - .byte $40, $06, $0A, $40, $06, $06, $40, $05 - .byte $05, $40, $0F, $0F, $40, $0B, $30, $13 + .byte $40, $06, $0A, $40, $06, $06, $40, $05 ; CPU:$EE2A PRG:2E2A 40 06 0A 40 + .byte $05, $40, $0F, $0F, $40, $0B, $30, $13 ; CPU:$EE32 PRG:2E32 05 40 0F 0F ; $EE3A - .byte $43, $37, $1B, $40, $0D, $12, $42, $2A - .byte $19, $40, $11, $04, $40, $02, $8C, $40 + .byte $43, $37, $1B, $40, $0D, $12, $42, $2A ; CPU:$EE3A PRG:2E3A 43 37 1B 40 + .byte $19, $40, $11, $04, $40, $02, $8C, $40 ; CPU:$EE42 PRG:2E42 19 40 11 04 ; $EE4A - .byte $06, $0D, $40, $05, $0C, $40, $05, $03 - .byte $40, $02, $8D, $40, $15, $31, $09, $02 + .byte $06, $0D, $40, $05, $0C, $40, $05, $03 ; CPU:$EE4A PRG:2E4A 06 0D 40 05 + .byte $40, $02, $8D, $40, $15, $31, $09, $02 ; CPU:$EE52 PRG:2E52 40 02 8D 40 ; $EE5A - .byte $40, $0F, $30, $40, $33, $31, $15, $41 - .byte $06, $21, $45, $06, $23, $40, $0A, $07 + .byte $40, $0F, $30, $40, $33, $31, $15, $41 ; CPU:$EE5A PRG:2E5A 40 0F 30 40 + .byte $06, $21, $45, $06, $23, $40, $0A, $07 ; CPU:$EE62 PRG:2E62 06 21 45 06 ; $EE6A - .byte $40, $06, $87, $40, $08, $0C, $40, $0B - .byte $15, $41, $06, $21, $45, $06, $23, $40 + .byte $40, $06, $87, $40, $08, $0C, $40, $0B ; CPU:$EE6A PRG:2E6A 40 06 87 40 + .byte $15, $41, $06, $21, $45, $06, $23, $40 ; CPU:$EE72 PRG:2E72 15 41 06 21 ; $EE7A - .byte $03, $87, $40, $0C, $0F, $40, $02, $10 - .byte $40, $0F, $07, $40, $0B, $07, $40, $26 + .byte $03, $87, $40, $0C, $0F, $40, $02, $10 ; CPU:$EE7A PRG:2E7A 03 87 40 0C + .byte $40, $0F, $07, $40, $0B, $07, $40, $26 ; CPU:$EE82 PRG:2E82 40 0F 07 40 ; $EE8A - .byte $08, $40, $02, $0B, $40, $02, $88, $40 - .byte $24, $0E, $40, $02, $08, $40, $02, $11 + .byte $08, $40, $02, $0B, $40, $02, $88, $40 ; CPU:$EE8A PRG:2E8A 08 40 02 0B + .byte $24, $0E, $40, $02, $08, $40, $02, $11 ; CPU:$EE92 PRG:2E92 24 0E 40 02 ; $EE9A - .byte $46, $0A, $17, $40, $02, $0E, $40, $02 - .byte $11, $46, $0E, $17, $40, $15, $10, $40 + .byte $46, $0A, $17, $40, $02, $0E, $40, $02 ; CPU:$EE9A PRG:2E9A 46 0A 17 40 + .byte $11, $46, $0E, $17, $40, $15, $10, $40 ; CPU:$EEA2 PRG:2EA2 11 46 0E 17 ; $EEAA - .byte $06, $81, $40, $02, $81, $40, $02, $01 - .byte $40, $02, $01, $40, $02, $01, $40, $02 + .byte $06, $81, $40, $02, $81, $40, $02, $01 ; CPU:$EEAA PRG:2EAA 06 81 40 02 + .byte $40, $02, $01, $40, $02, $01, $40, $02 ; CPU:$EEB2 PRG:2EB2 40 02 01 40 ; $EEBA - .byte $01, $40, $17, $30, $13, $43, $37, $1B - .byte $40, $1F, $0C, $40, $0E, $0D, $40, $04 + .byte $01, $40, $17, $30, $13, $43, $37, $1B ; CPU:$EEBA PRG:2EBA 01 40 17 30 + .byte $40, $1F, $0C, $40, $0E, $0D, $40, $04 ; CPU:$EEC2 PRG:2EC2 40 1F 0C 40 ; $EECA - .byte $8D, $40, $05, $0C, $40, $1B, $31, $09 - .byte $02, $40, $10, $30, $40, $50, $31, $14 + .byte $8D, $40, $05, $0C, $40, $1B, $31, $09 ; CPU:$EECA PRG:2ECA 8D 40 05 0C + .byte $02, $40, $10, $30, $40, $50, $31, $14 ; CPU:$EED2 PRG:2ED2 02 40 10 30 ; $EEDA - .byte $44, $03, $1E, $44, $04, $1E, $44, $04 - .byte $1F, $1B, $40, $0F, $0D, $40, $05, $83 + .byte $44, $03, $1E, $44, $04, $1E, $44, $04 ; CPU:$EEDA PRG:2EDA 44 03 1E 44 + .byte $1F, $1B, $40, $0F, $0D, $40, $05, $83 ; CPU:$EEE2 PRG:2EE2 1F 1B 40 0F ; $EEEA - .byte $40, $03, $0C, $40, $09, $14, $44, $03 - .byte $1E, $44, $04, $1E, $44, $04, $1F, $1B + .byte $40, $03, $0C, $40, $09, $14, $44, $03 ; CPU:$EEEA PRG:2EEA 40 03 0C 40 + .byte $1E, $44, $04, $1E, $44, $04, $1F, $1B ; CPU:$EEF2 PRG:2EF2 1E 44 04 1E ; $EEFA - .byte $40, $04, $07, $40, $02, $87, $40, $02 - .byte $87, $40, $09, $03, $40, $04, $84, $40 + .byte $40, $04, $07, $40, $02, $87, $40, $02 ; CPU:$EEFA PRG:2EFA 40 04 07 40 + .byte $87, $40, $09, $03, $40, $04, $84, $40 ; CPU:$EF02 PRG:2F02 87 40 09 03 ; $EF0A - .byte $05, $04, $40, $07, $83, $40, $05, $10 - .byte $40, $0C, $8A, $40, $0C, $07, $40, $02 + .byte $05, $04, $40, $07, $83, $40, $05, $10 ; CPU:$EF0A PRG:2F0A 05 04 40 07 + .byte $40, $0C, $8A, $40, $0C, $07, $40, $02 ; CPU:$EF12 PRG:2F12 40 0C 8A 40 ; $EF1A - .byte $11, $46, $0A, $17, $40, $19, $0E, $40 - .byte $0D, $0E, $40, $04, $0B, $40, $04, $08 + .byte $11, $46, $0A, $17, $40, $19, $0E, $40 ; CPU:$EF1A PRG:2F1A 11 46 0A 17 + .byte $0D, $0E, $40, $04, $0B, $40, $04, $08 ; CPU:$EF22 PRG:2F22 0D 0E 40 04 ; $EF2A - .byte $40, $02, $08, $40, $02, $88, $40, $1A - .byte $03, $40, $06, $83, $40, $03, $04, $40 + .byte $40, $02, $08, $40, $02, $88, $40, $1A ; CPU:$EF2A PRG:2F2A 40 02 08 40 + .byte $03, $40, $06, $83, $40, $03, $04, $40 ; CPU:$EF32 PRG:2F32 03 40 06 83 ; $EF3A - .byte $08, $0E, $40, $04, $0B, $40, $02, $0B - .byte $40, $02, $0B, $40, $02, $8B, $40, $02 + .byte $08, $0E, $40, $04, $0B, $40, $02, $0B ; CPU:$EF3A PRG:2F3A 08 0E 40 04 + .byte $40, $02, $0B, $40, $02, $8B, $40, $02 ; CPU:$EF42 PRG:2F42 40 02 0B 40 ; $EF4A - .byte $8B, $40, $21, $0F, $40, $0C, $0D, $40 - .byte $02, $88, $40, $02, $13, $43, $17, $1B + .byte $8B, $40, $21, $0F, $40, $0C, $0D, $40 ; CPU:$EF4A PRG:2F4A 8B 40 21 0F + .byte $02, $88, $40, $02, $13, $43, $17, $1B ; CPU:$EF52 PRG:2F52 02 88 40 02 ; $EF5A - .byte $40, $06, $12, $42, $17, $19, $40, $03 - .byte $03, $40, $08, $05, $40, $02, $05, $40 + .byte $40, $06, $12, $42, $17, $19, $40, $03 ; CPU:$EF5A PRG:2F5A 40 06 12 42 + .byte $03, $40, $08, $05, $40, $02, $05, $40 ; CPU:$EF62 PRG:2F62 03 40 08 05 ; $EF6A - .byte $02, $05, $40, $02, $05, $40, $02, $05 - .byte $40, $02, $11, $46, $0A, $30, $17, $40 + .byte $02, $05, $40, $02, $05, $40, $02, $05 ; CPU:$EF6A PRG:2F6A 02 05 40 02 + .byte $40, $02, $11, $46, $0A, $30, $17, $40 ; CPU:$EF72 PRG:2F72 40 02 11 46 ; $EF7A - .byte $11, $10, $40, $0E, $0C, $40, $06, $8C - .byte $40, $09, $0D, $40, $02, $8D, $40, $0C + .byte $11, $10, $40, $0E, $0C, $40, $06, $8C ; CPU:$EF7A PRG:2F7A 11 10 40 0E + .byte $40, $09, $0D, $40, $02, $8D, $40, $0C ; CPU:$EF82 PRG:2F82 40 09 0D 40 ; $EF8A - .byte $0C, $40, $05, $0D, $40, $06, $8C, $40 - .byte $02, $0C, $40, $07, $8D, $40, $05, $0C + .byte $0C, $40, $05, $0D, $40, $06, $8C, $40 ; CPU:$EF8A PRG:2F8A 0C 40 05 0D + .byte $02, $0C, $40, $07, $8D, $40, $05, $0C ; CPU:$EF92 PRG:2F92 02 0C 40 07 ; $EF9A - .byte $40, $04, $0D, $40, $07, $8C, $40, $02 - .byte $31, $0E, $40, $05, $09, $02, $40, $10 + .byte $40, $04, $0D, $40, $07, $8C, $40, $02 ; CPU:$EF9A PRG:2F9A 40 04 0D 40 + .byte $31, $0E, $40, $05, $09, $02, $40, $10 ; CPU:$EFA2 PRG:2FA2 31 0E 40 05 ; $EFAA - .byte $30, $40, $32, $0F, $40, $0F, $0C, $40 - .byte $08, $31, $0E, $40, $02, $11, $46, $0E + .byte $30, $40, $32, $0F, $40, $0F, $0C, $40 ; CPU:$EFAA PRG:2FAA 30 40 32 0F + .byte $08, $31, $0E, $40, $02, $11, $46, $0E ; CPU:$EFB2 PRG:2FB2 08 31 0E 40 ; $EFBA - .byte $17, $40, $02, $0A, $40, $06, $15, $41 - .byte $06, $21, $45, $06, $23, $40, $02, $08 + .byte $17, $40, $02, $0A, $40, $06, $15, $41 ; CPU:$EFBA PRG:2FBA 17 40 02 0A + .byte $06, $21, $45, $06, $23, $40, $02, $08 ; CPU:$EFC2 PRG:2FC2 06 21 45 06 ; $EFCA - .byte $40, $03, $08, $40, $03, $08, $40, $03 - .byte $88, $40, $03, $88, $40, $09, $83, $40 + .byte $40, $03, $08, $40, $03, $08, $40, $03 ; CPU:$EFCA PRG:2FCA 40 03 08 40 + .byte $88, $40, $03, $88, $40, $09, $83, $40 ; CPU:$EFD2 PRG:2FD2 88 40 03 88 ; $EFDA - .byte $05, $04, $40, $08, $10, $40, $11, $0D - .byte $40, $13, $0C, $40, $14, $0E, $40, $13 + .byte $05, $04, $40, $08, $10, $40, $11, $0D ; CPU:$EFDA PRG:2FDA 05 04 40 08 + .byte $40, $13, $0C, $40, $14, $0E, $40, $13 ; CPU:$EFE2 PRG:2FE2 40 13 0C 40 ; $EFEA - .byte $05, $40, $04, $05, $40, $05, $05, $40 - .byte $04, $06, $40, $02, $11, $46, $0A, $17 + .byte $05, $40, $04, $05, $40, $05, $05, $40 ; CPU:$EFEA PRG:2FEA 05 40 04 05 + .byte $04, $06, $40, $02, $11, $46, $0A, $17 ; CPU:$EFF2 PRG:2FF2 04 06 40 02 ; $EFFA-$EFFF - .byte $40, $05, $0C, $40, $03, $14 + .byte $40, $05, $0C, $40, $03, $14 ; CPU:$EFFA PRG:2FFA 40 05 0C 40 @@ -11101,31 +11100,31 @@ CourseDefinitionDataEE0A: CourseDefinitionDataF000: ; $F000 - .byte $44, $03, $1E, $44, $04, $1E, $44, $04 - .byte $1F, $1B, $40, $06, $07, $40, $03, $83 + .byte $44, $03, $1E, $44, $04, $1E, $44, $04 ; CPU:$F000 PRG:3000 44 03 1E 44 + .byte $1F, $1B, $40, $06, $07, $40, $03, $83 ; CPU:$F008 PRG:3008 1F 1B 40 06 ; $F010 - .byte $40, $04, $0E, $40, $17, $8A, $40, $03 - .byte $0E, $40, $02, $11, $46, $05, $17, $40 + .byte $40, $04, $0E, $40, $17, $8A, $40, $03 ; CPU:$F010 PRG:3010 40 04 0E 40 + .byte $0E, $40, $02, $11, $46, $05, $17, $40 ; CPU:$F018 PRG:3018 0E 40 02 11 ; $F020 - .byte $02, $0B, $40, $06, $01, $40, $02, $01 - .byte $40, $02, $08, $40, $02, $01, $40, $02 + .byte $02, $0B, $40, $06, $01, $40, $02, $01 ; CPU:$F020 PRG:3020 02 0B 40 06 + .byte $40, $02, $08, $40, $02, $01, $40, $02 ; CPU:$F028 PRG:3028 40 02 08 40 ; $F030 - .byte $01, $40, $02, $01, $40, $02, $01, $40 - .byte $02, $05, $40, $21, $30, $0C, $40, $04 + .byte $01, $40, $02, $01, $40, $02, $01, $40 ; CPU:$F030 PRG:3030 01 40 02 01 + .byte $02, $05, $40, $21, $30, $0C, $40, $04 ; CPU:$F038 PRG:3038 02 05 40 21 ; $F040 - .byte $83, $40, $04, $0D, $40, $04, $04, $40 - .byte $08, $8C, $40, $02, $03, $40, $05, $8D + .byte $83, $40, $04, $0D, $40, $04, $04, $40 ; CPU:$F040 PRG:3040 83 40 04 0D + .byte $08, $8C, $40, $02, $03, $40, $05, $8D ; CPU:$F048 PRG:3048 08 8C 40 02 ; $F050 - .byte $40, $02, $0D, $40, $06, $0C, $40, $03 - .byte $8C, $40, $05, $0D, $40, $06, $04, $40 + .byte $40, $02, $0D, $40, $06, $0C, $40, $03 ; CPU:$F050 PRG:3050 40 02 0D 40 + .byte $8C, $40, $05, $0D, $40, $06, $04, $40 ; CPU:$F058 PRG:3058 8C 40 05 0D ; $F060-$F062 - .byte $05, $31, $09 + .byte $05, $31, $09 ; CPU:$F060 PRG:3060 05 31 09 ; --------------------------------------------------------------------------- @@ -11141,12 +11140,12 @@ CourseDefinitionDataF000: ; --------------------------------------------------------------------------- CourseStructurePointerLowF063: - .byte $AB, $B3, $01, $01, $0A, $12 - .byte $6B, $A4, $D1, $EB, $5E, $97 - .byte $E2, $CC, $B4, $96, $A5, $56 - .byte $2D, $35, $5D, $F8, $5E, $66 - .byte $4D, $3D, $55, $45, $C0, $6E - .byte $6E, $CE, $0A, $14, $DC, $EA + .byte $AB, $B3, $01, $01, $0A, $12 ; CPU:$F063 PRG:3063 AB B3 01 01 + .byte $6B, $A4, $D1, $EB, $5E, $97 ; CPU:$F069 PRG:3069 6B A4 D1 EB + .byte $E2, $CC, $B4, $96, $A5, $56 ; CPU:$F06F PRG:306F E2 CC B4 96 + .byte $2D, $35, $5D, $F8, $5E, $66 ; CPU:$F075 PRG:3075 2D 35 5D F8 + .byte $4D, $3D, $55, $45, $C0, $6E ; CPU:$F07B PRG:307B 4D 3D 55 45 + .byte $6E, $CE, $0A, $14, $DC, $EA ; CPU:$F081 PRG:3081 6E CE 0A 14 ; --------------------------------------------------------------------------- @@ -11155,294 +11154,294 @@ CourseStructurePointerLowF063: ; --------------------------------------------------------------------------- CourseStructurePointerHighF087: - .byte $F0, $F0, $F1, $F1, $F1, $F1 - .byte $F1, $F1, $F1, $F1, $F2, $F2 - .byte $F2, $F2, $F4, $F4, $F4, $F4 - .byte $F3, $F3, $F3, $F2, $F4, $F4 - .byte $F3, $F3, $F3, $F3, $F3, $F4 - .byte $F4, $F3, $F3, $F3, $F3, $F3 + .byte $F0, $F0, $F1, $F1, $F1, $F1 ; CPU:$F087 PRG:3087 F0 F0 F1 F1 + .byte $F1, $F1, $F1, $F1, $F2, $F2 ; CPU:$F08D PRG:308D F1 F1 F1 F1 + .byte $F2, $F2, $F4, $F4, $F4, $F4 ; CPU:$F093 PRG:3093 F2 F2 F4 F4 + .byte $F3, $F3, $F3, $F2, $F4, $F4 ; CPU:$F099 PRG:3099 F3 F3 F3 F2 + .byte $F3, $F3, $F3, $F3, $F3, $F4 ; CPU:$F09F PRG:309F F3 F3 F3 F3 + .byte $F4, $F3, $F3, $F3, $F3, $F3 ; CPU:$F0A5 PRG:30A5 F4 F3 F3 F3 CoursePatternF0AB: - .byte $09, $3B, $3C, $3D - .byte $3B, $3C, $3D, $00 + .byte $09, $3B, $3C, $3D ; CPU:$F0AB PRG:30AB 09 3B 3C 3D + .byte $3B, $3C, $3D, $00 ; CPU:$F0AF PRG:30AF 3B 3C 3D 00 CourseStructureTemplateF0B3: ; Variant 0 - .byte $08 - .byte $D7, $40, $40, $40, $40, $40, $41 + .byte $08 ; CPU:$F0B3 PRG:30B3 08 + .byte $D7, $40, $40, $40, $40, $40, $41 ; CPU:$F0B4 PRG:30B4 D7 40 40 40 ; Variant 1 - .byte $08 - .byte $D6, $FE, $FE, $FE, $FE, $FE, $D8 + .byte $08 ; CPU:$F0BB PRG:30BB 08 + .byte $D6, $FE, $FE, $FE, $FE, $FE, $D8 ; CPU:$F0BC PRG:30BC D6 FE FE FE ; Variant 2 - .byte $07 - .byte $D7, $FE, $FE, $FE, $FE, $FE, $D9, $FE + .byte $07 ; CPU:$F0C3 PRG:30C3 07 + .byte $D7, $FE, $FE, $FE, $FE, $FE, $D9, $FE ; CPU:$F0C4 PRG:30C4 D7 FE FE FE ; Variant 3 - .byte $07 - .byte $D6, $FE, $FE, $FE, $FE, $FE, $D8, $FE + .byte $07 ; CPU:$F0CC PRG:30CC 07 + .byte $D6, $FE, $FE, $FE, $FE, $FE, $D8, $FE ; CPU:$F0CD PRG:30CD D6 FE FE FE ; Variant 4 - .byte $07 - .byte $3B, $3C, $3D, $3B, $3C, $3D, $FE, $FE + .byte $07 ; CPU:$F0D5 PRG:30D5 07 + .byte $3B, $3C, $3D, $3B, $3C, $3D, $FE, $FE ; CPU:$F0D6 PRG:30D6 3B 3C 3D 3B ; Variant 5 - .byte $07 - .byte $DA, $FF, $FF, $FF, $FF, $FF, $DC, $FE + .byte $07 ; CPU:$F0DE PRG:30DE 07 + .byte $DA, $FF, $FF, $FF, $FF, $FF, $DC, $FE ; CPU:$F0DF PRG:30DF DA FF FF FF ; Variant 6 - .byte $07 - .byte $DB, $FF, $FF, $FF, $FF, $FF, $DD, $FE + .byte $07 ; CPU:$F0E7 PRG:30E7 07 + .byte $DB, $FF, $FF, $FF, $FF, $FF, $DD, $FE ; CPU:$F0E8 PRG:30E8 DB FF FF FF ; Variant 7 - .byte $08 - .byte $DA, $FF, $FF, $FF, $FF, $FF, $DC + .byte $08 ; CPU:$F0F0 PRG:30F0 08 + .byte $DA, $FF, $FF, $FF, $FF, $FF, $DC ; CPU:$F0F1 PRG:30F1 DA FF FF FF ; Variant 8 - .byte $08 - .byte $DB, $FF, $FF, $FF, $FF, $FF, $DD + .byte $08 ; CPU:$F0F8 PRG:30F8 08 + .byte $DB, $FF, $FF, $FF, $FF, $FF, $DD ; CPU:$F0F9 PRG:30F9 DB FF FF FF - .byte $00 + .byte $00 ; CPU:$F100 PRG:3100 00 ; --------------------------------------------------------------------------- ; $F101-$F109 (09 bytes) ; --------------------------------------------------------------------------- CourseStructureTemplateF101: - .byte $08, $E0, $48, $49, $4A, $3B, $3C, $3D, $00 + .byte $08, $E0, $48, $49, $4A, $3B, $3C, $3D, $00 ; CPU:$F101 PRG:3101 08 E0 48 49 ; --------------------------------------------------------------------------- ; $F10A-$F111 (08 bytes) ; --------------------------------------------------------------------------- CoursePatternF10A: - .byte $09, $3B, $3C, $E1, $48, $49, $4A, $00 + .byte $09, $3B, $3C, $E1, $48, $49, $4A, $00 ; CPU:$F10A PRG:310A 09 3B 3C E1 ; --------------------------------------------------------------------------- ; $F112-$F16A (59 bytes) ; --------------------------------------------------------------------------- CoursePatternF112: - .byte $08, $C5, $50, $50, $50, $50, $50, $51, $07, $C5, $FE, $FE, $FE, $FE, $FE, $C6 - .byte $FE, $06, $C5, $FE, $FE, $FE, $FE, $FE, $C6, $FE, $FE, $05, $C5, $FE, $FE, $FE - .byte $FE, $FE, $C6, $FE, $FE, $FE, $04, $2F, $2E, $2B, $2D, $2C, $2B, $2A, $FE, $FE - .byte $FE, $FE, $05, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $FE, $FE, $FE, $06, $C7, $C8 - .byte $C9, $CA, $C8, $C9, $CB, $FE, $FE, $07, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $FE - .byte $08, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $00 + .byte $08, $C5, $50, $50, $50, $50, $50, $51, $07, $C5, $FE, $FE, $FE, $FE, $FE, $C6 ; CPU:$F112 PRG:3112 08 C5 50 50 + .byte $FE, $06, $C5, $FE, $FE, $FE, $FE, $FE, $C6, $FE, $FE, $05, $C5, $FE, $FE, $FE ; CPU:$F122 PRG:3122 FE 06 C5 FE + .byte $FE, $FE, $C6, $FE, $FE, $FE, $04, $2F, $2E, $2B, $2D, $2C, $2B, $2A, $FE, $FE ; CPU:$F132 PRG:3132 FE FE C6 FE + .byte $FE, $FE, $05, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $FE, $FE, $FE, $06, $C7, $C8 ; CPU:$F142 PRG:3142 FE FE 05 C7 + .byte $C9, $CA, $C8, $C9, $CB, $FE, $FE, $07, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $FE ; CPU:$F152 PRG:3152 C9 CA C8 C9 + .byte $08, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $00 ; CPU:$F162 PRG:3162 08 C7 C8 C9 ; --------------------------------------------------------------------------- ; $F16B-$F1A3 (39 bytes) ; --------------------------------------------------------------------------- CoursePatternF16B: - .byte $08, $C5, $5E, $5E, $5E, $5E, $5E, $5F, $07, $C5, $FE, $FE, $FE, $FE, $FE, $C6 - .byte $FE, $06, $C5, $FE, $FE, $FE, $FE, $FE, $C6, $FE, $FE, $05, $2F, $2E, $2B, $2D - .byte $2C, $2B, $2A, $FE, $FE, $FE, $06, $D1, $D2, $FF, $FF, $FF, $FF, $D3, $D4, $FE - .byte $08, $D1, $D0, $D0, $D0, $D0, $D0, $D5, $00 + .byte $08, $C5, $5E, $5E, $5E, $5E, $5E, $5F, $07, $C5, $FE, $FE, $FE, $FE, $FE, $C6 ; CPU:$F16B PRG:316B 08 C5 5E 5E + .byte $FE, $06, $C5, $FE, $FE, $FE, $FE, $FE, $C6, $FE, $FE, $05, $2F, $2E, $2B, $2D ; CPU:$F17B PRG:317B FE 06 C5 FE + .byte $2C, $2B, $2A, $FE, $FE, $FE, $06, $D1, $D2, $FF, $FF, $FF, $FF, $D3, $D4, $FE ; CPU:$F18B PRG:318B 2C 2B 2A FE + .byte $08, $D1, $D0, $D0, $D0, $D0, $D0, $D5, $00 ; CPU:$F19B PRG:319B 08 D1 D0 D0 ; --------------------------------------------------------------------------- ; $F1A4-$F1D0 (2D bytes) ; --------------------------------------------------------------------------- CoursePatternF1A4: - .byte $08, $C5, $56, $56, $56, $56, $56, $57, $07, $C5, $FE, $FE, $FE, $FE, $FE, $C6 - .byte $FE, $06, $2F, $2E, $2B, $2D, $2E, $2B, $2A, $FE, $FE, $07, $C7, $C8, $C9, $CA - .byte $C8, $C9, $CB, $FE, $08, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $00 + .byte $08, $C5, $56, $56, $56, $56, $56, $57, $07, $C5, $FE, $FE, $FE, $FE, $FE, $C6 ; CPU:$F1A4 PRG:31A4 08 C5 56 56 + .byte $FE, $06, $2F, $2E, $2B, $2D, $2E, $2B, $2A, $FE, $FE, $07, $C7, $C8, $C9, $CA ; CPU:$F1B4 PRG:31B4 FE 06 2F 2E + .byte $C8, $C9, $CB, $FE, $08, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $00 ; CPU:$F1C4 PRG:31C4 C8 C9 CB FE ; --------------------------------------------------------------------------- ; $F1D1-$F1EA (1A bytes) ; --------------------------------------------------------------------------- CoursePatternF1D1: - .byte $08, $C5, $58, $58, $58, $58, $58, $59, $07, $2F, $2E, $2B, $2D, $2C, $2B, $2A - .byte $FE, $08, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $00 + .byte $08, $C5, $58, $58, $58, $58, $58, $59, $07, $2F, $2E, $2B, $2D, $2C, $2B, $2A ; CPU:$F1D1 PRG:31D1 08 C5 58 58 + .byte $FE, $08, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $00 ; CPU:$F1E1 PRG:31E1 FE 08 C7 C8 ; --------------------------------------------------------------------------- ; $F1EB-$F25D (73 bytes) ; --------------------------------------------------------------------------- CoursePatternF1EB: - .byte $08, $C5, $4E, $4E, $4E, $4E, $4E, $4F, $07, $C5, $FE, $FE, $FE, $FE, $FE, $C6 - .byte $FE, $06, $C5, $FE, $FE, $FE, $FE, $FE, $C6, $FE, $FE, $06, $3B, $3C, $3D, $3B - .byte $3C, $3D, $FE, $0F, $FE, $06, $3B, $3C, $3D, $3B, $3C, $3D, $FE, $12, $FE, $06 - .byte $3B, $3C, $3D, $3B, $3C, $3D, $FE, $17, $FE, $06, $3B, $3C, $3D, $3B, $3C, $3D - .byte $FE, $12, $FE, $06, $3B, $3C, $3D, $3B, $3C, $3D, $FE, $1C, $FE, $06, $3B, $3C - .byte $3D, $3B, $3C, $3D, $FE, $11, $FE, $06, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $FE - .byte $FE, $07, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $FE, $08, $C7, $C8, $C9, $CA, $C8 - .byte $C9, $CB, $00 + .byte $08, $C5, $4E, $4E, $4E, $4E, $4E, $4F, $07, $C5, $FE, $FE, $FE, $FE, $FE, $C6 ; CPU:$F1EB PRG:31EB 08 C5 4E 4E + .byte $FE, $06, $C5, $FE, $FE, $FE, $FE, $FE, $C6, $FE, $FE, $06, $3B, $3C, $3D, $3B ; CPU:$F1FB PRG:31FB FE 06 C5 FE + .byte $3C, $3D, $FE, $0F, $FE, $06, $3B, $3C, $3D, $3B, $3C, $3D, $FE, $12, $FE, $06 ; CPU:$F20B PRG:320B 3C 3D FE 0F + .byte $3B, $3C, $3D, $3B, $3C, $3D, $FE, $17, $FE, $06, $3B, $3C, $3D, $3B, $3C, $3D ; CPU:$F21B PRG:321B 3B 3C 3D 3B + .byte $FE, $12, $FE, $06, $3B, $3C, $3D, $3B, $3C, $3D, $FE, $1C, $FE, $06, $3B, $3C ; CPU:$F22B PRG:322B FE 12 FE 06 + .byte $3D, $3B, $3C, $3D, $FE, $11, $FE, $06, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $FE ; CPU:$F23B PRG:323B 3D 3B 3C 3D + .byte $FE, $07, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $FE, $08, $C7, $C8, $C9, $CA, $C8 ; CPU:$F24B PRG:324B FE 07 C7 C8 + .byte $C9, $CB, $00 ; CPU:$F25B PRG:325B C9 CB 00 ; --------------------------------------------------------------------------- ; $F25E-$F296 (39 bytes) ; --------------------------------------------------------------------------- CoursePatternF25E: - .byte $08, $CC, $60, $60, $60, $60, $60, $61, $06, $CC, $CD, $FE, $FE, $FE, $FE, $CE - .byte $CF, $FE, $05, $2F, $2E, $2B, $2D, $2C, $2B, $2A, $FE, $FE, $FE, $06, $C7, $C8 - .byte $C9, $CA, $C8, $C9, $CB, $FE, $FE, $07, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $FE - .byte $08, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $00 + .byte $08, $CC, $60, $60, $60, $60, $60, $61, $06, $CC, $CD, $FE, $FE, $FE, $FE, $CE ; CPU:$F25E PRG:325E 08 CC 60 60 + .byte $CF, $FE, $05, $2F, $2E, $2B, $2D, $2C, $2B, $2A, $FE, $FE, $FE, $06, $C7, $C8 ; CPU:$F26E PRG:326E CF FE 05 2F + .byte $C9, $CA, $C8, $C9, $CB, $FE, $FE, $07, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $FE ; CPU:$F27E PRG:327E C9 CA C8 C9 + .byte $08, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $00 ; CPU:$F28E PRG:328E 08 C7 C8 C9 ; --------------------------------------------------------------------------- ; $F297-$F2CB (35 bytes) ; --------------------------------------------------------------------------- CoursePatternF297: - .byte $07, $CC, $CD, $65, $65, $65, $65, $66, $67, $05, $CC, $CD, $FE, $FE, $FE, $FE - .byte $CE, $CF, $FE, $FE, $04, $2F, $2E, $2B, $2D, $2C, $2B, $2A, $FE, $FE, $FE, $FE - .byte $05, $D1, $D2, $FF, $FF, $FF, $FF, $D3, $D4, $FE, $FE, $07, $D1, $D2, $FF, $FF - .byte $FF, $FF, $D3, $D4, $00 + .byte $07, $CC, $CD, $65, $65, $65, $65, $66, $67, $05, $CC, $CD, $FE, $FE, $FE, $FE ; CPU:$F297 PRG:3297 07 CC CD 65 + .byte $CE, $CF, $FE, $FE, $04, $2F, $2E, $2B, $2D, $2C, $2B, $2A, $FE, $FE, $FE, $FE ; CPU:$F2A7 PRG:32A7 CE CF FE FE + .byte $05, $D1, $D2, $FF, $FF, $FF, $FF, $D3, $D4, $FE, $FE, $07, $D1, $D2, $FF, $FF ; CPU:$F2B7 PRG:32B7 05 D1 D2 FF + .byte $FF, $FF, $D3, $D4, $00 ; CPU:$F2C7 PRG:32C7 FF FF D3 D4 ; --------------------------------------------------------------------------- ; $F2CC-$F2E1 (16 bytes) ; --------------------------------------------------------------------------- CoursePatternF2CC: - .byte $09, $3B, $E7, $72, $3B, $E7, $72, $09, $3B, $E8, $BB, $3B, $E8, $BB, $09, $3B - .byte $E9, $BE, $3B, $E9, $BB, $00 + .byte $09, $3B, $E7, $72, $3B, $E7, $72, $09, $3B, $E8, $BB, $3B, $E8, $BB, $09, $3B ; CPU:$F2CC PRG:32CC 09 3B E7 72 + .byte $E9, $BE, $3B, $E9, $BB, $00 ; CPU:$F2DC PRG:32DC E9 BE 3B E9 ; --------------------------------------------------------------------------- ; $F2E2-$F2F7 (16 bytes) ; --------------------------------------------------------------------------- CoursePatternF2E2: - .byte $09, $70, $EA, $3D, $70, $EA, $3D, $09, $B9, $EB, $3D, $B9, $EB, $3D, $09, $BC - .byte $EC, $3D, $BC, $EC, $3D, $00 + .byte $09, $70, $EA, $3D, $70, $EA, $3D, $09, $B9, $EB, $3D, $B9, $EB, $3D, $09, $BC ; CPU:$F2E2 PRG:32E2 09 70 EA 3D + .byte $EC, $3D, $BC, $EC, $3D, $00 ; CPU:$F2F2 PRG:32F2 EC 3D BC EC ; --------------------------------------------------------------------------- ; $F2F8-$F309 (12 bytes) ; --------------------------------------------------------------------------- CoursePatternF2F8: - .byte $08, $C5, $68, $68, $68, $68, $68, $69, $07, $C5, $FE, $FE, $FE, $FE, $FE, $C6 - .byte $FE, $00 + .byte $08, $C5, $68, $68, $68, $68, $68, $69, $07, $C5, $FE, $FE, $FE, $FE, $FE, $C6 ; CPU:$F2F8 PRG:32F8 08 C5 68 68 + .byte $FE, $00 ; CPU:$F308 PRG:3308 FE 00 ; --------------------------------------------------------------------------- ; $F30A-$F313 (0A bytes) ; --------------------------------------------------------------------------- CoursePatternF30A: - .byte $07, $3B, $3C, $3D, $3B, $3C, $3D, $FE, $FE, $00 + .byte $07, $3B, $3C, $3D, $3B, $3C, $3D, $FE, $FE, $00 ; CPU:$F30A PRG:330A 07 3B 3C 3D ; --------------------------------------------------------------------------- ; $F314-$F32C (19 bytes) ; --------------------------------------------------------------------------- CoursePatternF314: - .byte $05, $CC, $CD, $FE, $FE, $6D, $6D, $6E, $6F, $6D, $6D, $03, $CC, $CD, $FE, $FE - .byte $FE, $FE, $CE, $CF, $FE, $FE, $FE, $FE, $00 + .byte $05, $CC, $CD, $FE, $FE, $6D, $6D, $6E, $6F, $6D, $6D, $03, $CC, $CD, $FE, $FE ; CPU:$F314 PRG:3314 05 CC CD FE + .byte $FE, $FE, $CE, $CF, $FE, $FE, $FE, $FE, $00 ; CPU:$F324 PRG:3324 FE FE CE CF ; --------------------------------------------------------------------------- ; $F32D-$F334 (08 bytes) ; --------------------------------------------------------------------------- CoursePatternF32D: - .byte $09, $3B, $3C, $3D, $C0, $C0, $C0, $00 + .byte $09, $3B, $3C, $3D, $C0, $C0, $C0, $00 ; CPU:$F32D PRG:332D 09 3B 3C 3D ; --------------------------------------------------------------------------- ; $F335-$F33C (08 bytes) ; --------------------------------------------------------------------------- CoursePatternF335: - .byte $09, $C0, $C0, $C0, $3B, $3C, $3D, $00 + .byte $09, $C0, $C0, $C0, $3B, $3C, $3D, $00 ; CPU:$F335 PRG:3335 09 C0 C0 C0 ; --------------------------------------------------------------------------- ; $F33D-$F344 (08 bytes) ; --------------------------------------------------------------------------- CoursePatternF33D: - .byte $09, $3B, $3C, $3D, $C3, $C3, $C3, $00 + .byte $09, $3B, $3C, $3D, $C3, $C3, $C3, $00 ; CPU:$F33D PRG:333D 09 3B 3C 3D ; --------------------------------------------------------------------------- ; $F345-$F34C (08 bytes) ; --------------------------------------------------------------------------- CoursePatternF345: - .byte $09, $C3, $C3, $C3, $3B, $3C, $3D, $00 + .byte $09, $C3, $C3, $C3, $3B, $3C, $3D, $00 ; CPU:$F345 PRG:3345 09 C3 C3 C3 ; --------------------------------------------------------------------------- ; $F34D-$F354 (08 bytes) ; --------------------------------------------------------------------------- CoursePatternF34D: - .byte $09, $3B, $3C, $3D, $E4, $E4, $E4, $00 + .byte $09, $3B, $3C, $3D, $E4, $E4, $E4, $00 ; CPU:$F34D PRG:334D 09 3B 3C 3D ; --------------------------------------------------------------------------- ; $F355-$F35C (08 bytes) ; --------------------------------------------------------------------------- CoursePatternF355: - .byte $09, $E4, $E4, $E4, $3B, $3C, $3D, $00 + .byte $09, $E4, $E4, $E4, $3B, $3C, $3D, $00 ; CPU:$F355 PRG:3355 09 E4 E4 E4 ; --------------------------------------------------------------------------- ; $F35D-$F3BF (63 bytes) ; --------------------------------------------------------------------------- CoursePatternF35D: - .byte $07, $CC, $CD, $75, $75, $75, $75, $76, $77, $05, $CC, $CD, $FE, $FE, $FE, $FE - .byte $CE, $CF, $FE, $FE, $03, $CC, $CD, $FE, $FE, $FE, $FE, $CE, $CF, $FE, $FE, $FE - .byte $FE, $03, $3B, $3C, $3D, $3B, $3C, $3D, $FE, $FE, $FE, $FE, $FE, $FE, $03, $3B - .byte $3C, $3D, $3B, $3C, $3D, $FE, $FE, $FE, $FE, $FE, $FE, $03, $3B, $3C, $3D, $E5 - .byte $D2, $FF, $D3, $D4, $FE, $FE, $FE, $FE, $03, $3B, $3C, $3D, $E6, $FC, $D1, $D2 - .byte $FF, $D3, $D4, $FE, $FE, $03, $3B, $3C, $3D, $E6, $FC, $FC, $FC, $D1, $D2, $FF - .byte $D3, $D4, $00 + .byte $07, $CC, $CD, $75, $75, $75, $75, $76, $77, $05, $CC, $CD, $FE, $FE, $FE, $FE ; CPU:$F35D PRG:335D 07 CC CD 75 + .byte $CE, $CF, $FE, $FE, $03, $CC, $CD, $FE, $FE, $FE, $FE, $CE, $CF, $FE, $FE, $FE ; CPU:$F36D PRG:336D CE CF FE FE + .byte $FE, $03, $3B, $3C, $3D, $3B, $3C, $3D, $FE, $FE, $FE, $FE, $FE, $FE, $03, $3B ; CPU:$F37D PRG:337D FE 03 3B 3C + .byte $3C, $3D, $3B, $3C, $3D, $FE, $FE, $FE, $FE, $FE, $FE, $03, $3B, $3C, $3D, $E5 ; CPU:$F38D PRG:338D 3C 3D 3B 3C + .byte $D2, $FF, $D3, $D4, $FE, $FE, $FE, $FE, $03, $3B, $3C, $3D, $E6, $FC, $D1, $D2 ; CPU:$F39D PRG:339D D2 FF D3 D4 + .byte $FF, $D3, $D4, $FE, $FE, $03, $3B, $3C, $3D, $E6, $FC, $FC, $FC, $D1, $D2, $FF ; CPU:$F3AD PRG:33AD FF D3 D4 FE + .byte $D3, $D4, $00 ; CPU:$F3BD PRG:33BD D3 D4 00 ; --------------------------------------------------------------------------- ; $F3C0-$F3CD (0E bytes) ; --------------------------------------------------------------------------- CoursePatternF3C0: - .byte $03, $3B, $3C, $3D, $E6, $FC, $FC, $FC, $FC, $FC, $3B, $3C, $3D, $00 + .byte $03, $3B, $3C, $3D, $E6, $FC, $FC, $FC, $FC, $FC, $3B, $3C, $3D, $00 ; CPU:$F3C0 PRG:33C0 03 3B 3C 3D ; --------------------------------------------------------------------------- ; $F3CE-$F3DB (0E bytes) ; --------------------------------------------------------------------------- CoursePatternF3CE: - .byte $03, $BF, $7D, $7E, $7F, $FC, $FC, $FC, $FC, $FC, $80, $81, $82, $00 + .byte $03, $BF, $7D, $7E, $7F, $FC, $FC, $FC, $FC, $FC, $80, $81, $82, $00 ; CPU:$F3CE PRG:33CE 03 BF 7D 7E ; --------------------------------------------------------------------------- ; $F3DC-$F3E9 (0E bytes) ; --------------------------------------------------------------------------- CoursePatternF3DC: - .byte $03, $3B, $3C, $3D, $3B, $3C, $3D, $FE, $FE, $FE, $FE, $FE, $FE, $00 + .byte $03, $3B, $3C, $3D, $3B, $3C, $3D, $FE, $FE, $FE, $FE, $FE, $FE, $00 ; CPU:$F3DC PRG:33DC 03 3B 3C 3D ; --------------------------------------------------------------------------- ; $F3EA-$F455 (6C bytes) ; --------------------------------------------------------------------------- CoursePatternF3EA: - .byte $03, $3B, $3C, $3D, $3B, $3C, $3D, $78, $78, $78, $78, $78, $78, $03, $3B, $3C - .byte $3D, $3B, $3C, $3D, $FE, $FE, $FE, $FE, $FE, $FE, $03, $C7, $C8, $C9, $CA, $C8 - .byte $C9, $CB, $FE, $FE, $FE, $FE, $FE, $04, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $FE - .byte $FE, $FE, $FE, $05, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $FE, $FE, $FE, $06, $C7 - .byte $C8, $C9, $CA, $C8, $C9, $CB, $FE, $FE, $07, $3B, $3C, $3D, $3B, $3C, $3D, $FE - .byte $FE, $07, $3B, $3C, $3D, $3B, $3C, $3D, $FE, $FE, $07, $C7, $C8, $C9, $CA, $C8 - .byte $C9, $CB, $FE, $08, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $00 + .byte $03, $3B, $3C, $3D, $3B, $3C, $3D, $78, $78, $78, $78, $78, $78, $03, $3B, $3C ; CPU:$F3EA PRG:33EA 03 3B 3C 3D + .byte $3D, $3B, $3C, $3D, $FE, $FE, $FE, $FE, $FE, $FE, $03, $C7, $C8, $C9, $CA, $C8 ; CPU:$F3FA PRG:33FA 3D 3B 3C 3D + .byte $C9, $CB, $FE, $FE, $FE, $FE, $FE, $04, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $FE ; CPU:$F40A PRG:340A C9 CB FE FE + .byte $FE, $FE, $FE, $05, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $FE, $FE, $FE, $06, $C7 ; CPU:$F41A PRG:341A FE FE FE 05 + .byte $C8, $C9, $CA, $C8, $C9, $CB, $FE, $FE, $07, $3B, $3C, $3D, $3B, $3C, $3D, $FE ; CPU:$F42A PRG:342A C8 C9 CA C8 + .byte $FE, $07, $3B, $3C, $3D, $3B, $3C, $3D, $FE, $FE, $07, $C7, $C8, $C9, $CA, $C8 ; CPU:$F43A PRG:343A FE 07 3B 3C + .byte $C9, $CB, $FE, $08, $C7, $C8, $C9, $CA, $C8, $C9, $CB, $00 ; CPU:$F44A PRG:344A C9 CB FE 08 ; --------------------------------------------------------------------------- ; $F456-$F45D (08 bytes) ; --------------------------------------------------------------------------- CoursePatternF456: - .byte $09, $C0, $C0, $C0, $C0, $C0, $C0, $00 + .byte $09, $C0, $C0, $C0, $C0, $C0, $C0, $00 ; CPU:$F456 PRG:3456 09 C0 C0 C0 ; --------------------------------------------------------------------------- ; $F45E-$F465 (08 bytes) ; --------------------------------------------------------------------------- CoursePatternF45E: - .byte $09, $E4, $E4, $E4, $E4, $E4, $E4, $00 + .byte $09, $E4, $E4, $E4, $E4, $E4, $E4, $00 ; CPU:$F45E PRG:345E 09 E4 E4 E4 ; --------------------------------------------------------------------------- ; $F466-$F46D (08 bytes) ; --------------------------------------------------------------------------- CoursePatternF466: - .byte $09, $C3, $C3, $C3, $C3, $C3, $C3, $00 + .byte $09, $C3, $C3, $C3, $C3, $C3, $C3, $00 ; CPU:$F466 PRG:3466 09 C3 C3 C3 ; --------------------------------------------------------------------------- ; $F46E-$F495 (28 bytes) ; --------------------------------------------------------------------------- CoursePatternF46E: - .byte $03, $3B, $3C, $3D, $E6, $28, $29, $73, $73, $73, $70, $71, $72, $03, $3B, $3C - .byte $3D, $E6, $FC, $FC, $FC, $FC, $FC, $B9, $BA, $BB, $03, $3B, $3C, $3D, $E6, $FC - .byte $FC, $FC, $FC, $FC, $BC, $BD, $BE, $00 + .byte $03, $3B, $3C, $3D, $E6, $28, $29, $73, $73, $73, $70, $71, $72, $03, $3B, $3C ; CPU:$F46E PRG:346E 03 3B 3C 3D + .byte $3D, $E6, $FC, $FC, $FC, $FC, $FC, $B9, $BA, $BB, $03, $3B, $3C, $3D, $E6, $FC ; CPU:$F47E PRG:347E 3D E6 FC FC + .byte $FC, $FC, $FC, $FC, $BC, $BD, $BE, $00 ; CPU:$F48E PRG:348E FC FC FC FC ; --------------------------------------------------------------------------- ; $F496-$F4A4 (0F bytes) ; --------------------------------------------------------------------------- CoursePatternF496: - .byte $09, $88, $3C, $3D, $3B, $3C, $3D, $09, $89, $3C, $3D, $3B, $3C, $3D, $00 + .byte $09, $88, $3C, $3D, $3B, $3C, $3D, $09, $89, $3C, $3D, $3B, $3C, $3D, $00 ; CPU:$F496 PRG:3496 09 88 3C 3D ; --------------------------------------------------------------------------- ; $F4A5-$F4B3 (0F bytes) ; --------------------------------------------------------------------------- CoursePatternF4A5: - .byte $09, $3B, $3C, $3D, $3B, $3C, $88, $09, $3B, $3C, $3D, $3B, $3C, $89, $00 + .byte $09, $3B, $3C, $3D, $3B, $3C, $88, $09, $3B, $3C, $3D, $3B, $3C, $89, $00 ; CPU:$F4A5 PRG:34A5 09 3B 3C 3D ; --------------------------------------------------------------------------- ; $F4B4-$F4FE (4B bytes) ; --------------------------------------------------------------------------- CoursePatternF4B4: - .byte $08, $E2, $8D, $8E, $8F, $90, $91, $92, $07, $E2, $DE, $DF, $E3, $FE, $3B, $3C - .byte $3D, $00, $00, $20, $18, $1A, $1C, $22, $16, $15, $0A, $19, $FE, $FE, $12, $42 - .byte $17, $19, $00, $13, $43, $17, $1B, $00, $11, $46, $0A, $17, $00, $14, $44, $03 - .byte $1E, $44, $04, $1E, $44, $04, $1F, $1B, $00, $15, $41, $06, $21, $45, $06, $23 - .byte $00, $DC, $D2, $D7, $E1, $ED, $F4, $F4, $F4, $F4, $F4 + .byte $08, $E2, $8D, $8E, $8F, $90, $91, $92, $07, $E2, $DE, $DF, $E3, $FE, $3B, $3C ; CPU:$F4B4 PRG:34B4 08 E2 8D 8E + .byte $3D, $00, $00, $20, $18, $1A, $1C, $22, $16, $15, $0A, $19, $FE, $FE, $12, $42 ; CPU:$F4C4 PRG:34C4 3D 00 00 20 + .byte $17, $19, $00, $13, $43, $17, $1B, $00, $11, $46, $0A, $17, $00, $14, $44, $03 ; CPU:$F4D4 PRG:34D4 17 19 00 13 + .byte $1E, $44, $04, $1E, $44, $04, $1F, $1B, $00, $15, $41, $06, $21, $45, $06, $23 ; CPU:$F4E4 PRG:34E4 1E 44 04 1E + .byte $00, $DC, $D2, $D7, $E1, $ED, $F4, $F4, $F4, $F4, $F4 ; CPU:$F4F4 PRG:34F4 00 DC D2 D7 ; --------------------------------------------------------------------------- ; $F4FF-$F62C @@ -11450,284 +11449,284 @@ CoursePatternF4B4: ; --------------------------------------------------------------------------- ProcessCourseDefinition: - ldx $43 + ldx $43 ; CPU:$F4FF PRG:34FF A6 43 - lda RuntimeDataED3A,x - sta $07 + lda RuntimeDataED3A,x ; CPU:$F501 PRG:3501 BD 3A ED + sta $07 ; CPU:$F504 PRG:3504 85 07 - lda $ED40,x - sta $08 + lda $ED40,x ; CPU:$F506 PRG:3506 BD 40 ED + sta $08 ; CPU:$F509 PRG:3509 85 08 - lda $EB - cmp $E0 - beq @position_matches + lda $EB ; CPU:$F50B PRG:350B A5 EB + cmp $E0 ; CPU:$F50D PRG:350D C5 E0 + beq @position_matches ; CPU:$F50F PRG:350F F0 01 - rts + rts ; CPU:$F511 PRG:3511 60 @position_matches: - lda $EC + lda $EC ; CPU:$F512 PRG:3512 A5 EC ; F514: D0 7B - .byte $D0, $7B + .byte $D0, $7B ; CPU:$F514 PRG:3514 D0 7B - lda $EF + lda $EF ; CPU:$F516 PRG:3516 A5 EF ; F518: D0 7D - .byte $D0, $7D + .byte $D0, $7D ; CPU:$F518 PRG:3518 D0 7D - ldy $ED - bne @advance_stream + ldy $ED ; CPU:$F51A PRG:351A A4 ED + bne @advance_stream ; CPU:$F51C PRG:351C D0 07 - lda ($07),y - sta $57 + lda ($07),y ; CPU:$F51E PRG:351E B1 07 + sta $57 ; CPU:$F520 PRG:3520 85 57 - inc $03A4 + inc $03A4 ; CPU:$F522 PRG:3522 EE A4 03 @advance_stream: - lda $41 - cmp #$09 - bne @increment_stream + lda $41 ; CPU:$F525 PRG:3525 A5 41 + cmp #$09 ; CPU:$F527 PRG:3527 C9 09 + bne @increment_stream ; CPU:$F529 PRG:3529 D0 0F - lda $03BC - beq @increment_stream + lda $03BC ; CPU:$F52B PRG:352B AD BC 03 + beq @increment_stream ; CPU:$F52E PRG:352E F0 0A - lda #$00 - sta $EE - sta $ED + lda #$00 ; CPU:$F530 PRG:3530 A9 00 + sta $EE ; CPU:$F532 PRG:3532 85 EE + sta $ED ; CPU:$F534 PRG:3534 85 ED - lda #$7F + lda #$7F ; CPU:$F536 PRG:3536 A9 7F ; F537: D0 53 - .byte $D0, $53 + .byte $D0, $53 ; CPU:$F538 PRG:3538 D0 53 @increment_stream: - inc $ED + inc $ED ; CPU:$F53A PRG:353A E6 ED - ldy $ED - lda ($07),y + ldy $ED ; CPU:$F53C PRG:353C A4 ED + lda ($07),y ; CPU:$F53E PRG:353E B1 07 ; F53F: F0 CF = BEQ $F510 - .byte $F0, $CF + .byte $F0, $CF ; CPU:$F540 PRG:3540 F0 CF - bit $F3D8 + bit $F3D8 ; CPU:$F542 PRG:3542 2C D8 F3 ; F544: F0 04 = BEQ $F54A - .byte $F0, $04 + .byte $F0, $04 ; CPU:$F545 PRG:3545 F0 04 - lda $46 + lda $46 ; CPU:$F547 PRG:3547 A5 46 ; F548: F0 CF = BEQ $F519 - .byte $F0, $CF + .byte $F0, $CF ; CPU:$F549 PRG:3549 F0 CF ; $F54A ProcessCourseDefinitionCommandF54A: - lda ($07),y - bit $F0B5 + lda ($07),y ; CPU:$F54B PRG:354B B1 07 + bit $F0B5 ; CPU:$F54D PRG:354D 2C B5 F0 ; F54F: F0 24 = BEQ $F575 - .byte $F0, $24 + .byte $F0, $24 ; CPU:$F550 PRG:3550 F0 24 - and #$0F - tax + and #$0F ; CPU:$F552 PRG:3552 29 0F + tax ; CPU:$F554 PRG:3554 AA - lda $F4C6,x - sta $EE + lda $F4C6,x ; CPU:$F555 PRG:3555 BD C6 F4 + sta $EE ; CPU:$F558 PRG:3558 85 EE - inc $ED - iny + inc $ED ; CPU:$F55A PRG:355A E6 ED + iny ; CPU:$F55C PRG:355C C8 - lda $41 - cmp #$09 + lda $41 ; CPU:$F55D PRG:355D A5 41 + cmp #$09 ; CPU:$F55F PRG:355F C9 09 ; F55E: D0 0F - .byte $D0, $0F + .byte $D0, $0F ; CPU:$F561 PRG:3561 D0 0F - cpy #$02 + cpy #$02 ; CPU:$F563 PRG:3563 C0 02 ; F562: D0 0B - .byte $D0, $0B + .byte $D0, $0B ; CPU:$F565 PRG:3565 D0 0B - lda #$01 - sta $57 + lda #$01 ; CPU:$F567 PRG:3567 A9 01 + sta $57 ; CPU:$F569 PRG:3569 85 57 - lda ($07),y - sec - sbc #$3D + lda ($07),y ; CPU:$F56B PRG:356B B1 07 + sec ; CPU:$F56D PRG:356D 38 + sbc #$3D ; CPU:$F56E PRG:356E E9 3D ; F56F: D0 1B = BNE $F58C - .byte $D0, $1B + .byte $D0, $1B ; CPU:$F570 PRG:3570 D0 1B ; $F571 - lda ($07),y + lda ($07),y ; CPU:$F572 PRG:3572 B1 07 ; F573: D0 17 = BNE $F58C - .byte $D0, $17 + .byte $D0, $17 ; CPU:$F574 PRG:3574 D0 17 ; $F575 - ldx #$01 + ldx #$01 ; CPU:$F576 PRG:3576 A2 01 - and #$3F - sta $EE + and #$3F ; CPU:$F578 PRG:3578 29 3F + sta $EE ; CPU:$F57A PRG:357A 85 EE - cmp #$30 + cmp #$30 ; CPU:$F57C PRG:357C C9 30 ; F57D: 90 17 = BCC $F596 - .byte $90, $17 + .byte $90, $17 ; CPU:$F57E PRG:357E 90 17 ; F57F: D0 05 = BNE $F586 - .byte $D0, $05 + .byte $D0, $05 ; CPU:$F580 PRG:3580 D0 05 - lda $03BC + lda $03BC ; CPU:$F582 PRG:3582 AD BC 03 ; F584: F0 01 = BEQ $F587 - .byte $F0, $01 + .byte $F0, $01 ; CPU:$F585 PRG:3585 F0 01 - dex + dex ; CPU:$F587 PRG:3587 CA ; $F587 - stx $03A8 + stx $03A8 ; CPU:$F588 PRG:3588 8E A8 03 ; F58A: 10 8D = BPL $F519 - .byte $10, $8D + .byte $10, $8D ; CPU:$F58B PRG:358B 10 8D ; $F58C - and #$7F - sta $EC + and #$7F ; CPU:$F58D PRG:358D 29 7F + sta $EC ; CPU:$F58F PRG:358F 85 EC - lda #$00 - sta $EF + lda #$00 ; CPU:$F591 PRG:3591 A9 00 + sta $EF ; CPU:$F593 PRG:3593 85 EF - dec $EC + dec $EC ; CPU:$F595 PRG:3595 C6 EC - ldx $EE - jsr LoadCourseStructurePointer + ldx $EE ; CPU:$F597 PRG:3597 A6 EE + jsr LoadCourseStructurePointer ; CPU:$F599 PRG:3599 20 2E F8 - ldy $EF - lda ($05),y + ldy $EF ; CPU:$F59C PRG:359C A4 EF + lda ($05),y ; CPU:$F59E PRG:359E B1 05 ; F5A0: D0 03 = BNE $F5A5 - .byte $D0, $03 + .byte $D0, $03 ; CPU:$F5A0 PRG:35A0 D0 03 - jmp ContinueCourseDefinition + jmp ContinueCourseDefinition ; CPU:$F5A2 PRG:35A2 4C 2D F6 ; $F5A5 - jsr InitializeCourseStructure + jsr InitializeCourseStructure ; CPU:$F5A5 PRG:35A5 20 76 F6 - lda ($05),y - tax + lda ($05),y ; CPU:$F5A8 PRG:35A8 B1 05 + tax ; CPU:$F5AA PRG:35AA AA - jsr CopyCourseStructure + jsr CopyCourseStructure ; CPU:$F5AB PRG:35AB 20 81 F6 - lda $EE + lda $EE ; CPU:$F5AE PRG:35AE A5 EE ; F5B0: F0 08 = BEQ $F5BA - .byte $F0, $08 + .byte $F0, $08 ; CPU:$F5B0 PRG:35B0 F0 08 - cmp #$18 + cmp #$18 ; CPU:$F5B2 PRG:35B2 C9 18 ; F5B4: F0 04 = BEQ $F5BA - .byte $F0, $04 + .byte $F0, $04 ; CPU:$F5B4 PRG:35B4 F0 04 - cmp #$1A + cmp #$1A ; CPU:$F5B6 PRG:35B6 C9 1A ; F5B8: D0 0F = BNE $F5C9 - .byte $D0, $0F + .byte $D0, $0F ; CPU:$F5B8 PRG:35B8 D0 0F ; $F5BA ProcessCourseToggleF5BA: - lda $03A2 - eor #$01 - sta $03A2 + lda $03A2 ; CPU:$F5BA PRG:35BA AD A2 03 + eor #$01 ; CPU:$F5BD PRG:35BD 49 01 + sta $03A2 ; CPU:$F5BF PRG:35BF 8D A2 03 ; F5C2: D0 05 = BNE $F5C9 - .byte $D0, $05 + .byte $D0, $05 ; CPU:$F5C2 PRG:35C2 D0 05 - lda #$83 - sta $030A + lda #$83 ; CPU:$F5C4 PRG:35C4 A9 83 + sta $030A ; CPU:$F5C6 PRG:35C6 8D 0A 03 ; $F5C9 ProcessCourseAfterToggleF5C9: - iny - sty $EF + iny ; CPU:$F5C9 PRG:35C9 C8 + sty $EF ; CPU:$F5CA PRG:35CA 84 EF - lda $EE - cmp #$09 - bne @build_structure + lda $EE ; CPU:$F5CC PRG:35CC A5 EE + cmp #$09 ; CPU:$F5CE PRG:35CE C9 09 + bne @build_structure ; CPU:$F5D0 PRG:35D0 D0 24 - lda $57 - cmp #$01 - beq @build_structure + lda $57 ; CPU:$F5D2 PRG:35D2 A5 57 + cmp #$01 ; CPU:$F5D4 PRG:35D4 C9 01 + beq @build_structure ; CPU:$F5D6 PRG:35D6 F0 1E - cpy #$25 - bcc @build_structure + cpy #$25 ; CPU:$F5D8 PRG:35D8 C0 25 + bcc @build_structure ; CPU:$F5DA PRG:35DA 90 1A - cpy #$58 - bcs @build_structure + cpy #$58 ; CPU:$F5DC PRG:35DC C0 58 + bcs @build_structure ; CPU:$F5DE PRG:35DE B0 16 - ldx $03A5 + ldx $03A5 ; CPU:$F5E0 PRG:35E0 AE A5 03 - lda $F4CD,x - sta $0310 + lda $F4CD,x ; CPU:$F5E3 PRG:35E3 BD CD F4 + sta $0310 ; CPU:$F5E6 PRG:35E6 8D 10 03 - inc $03A5 + inc $03A5 ; CPU:$F5E9 PRG:35E9 EE A5 03 - cpx #$05 - bne @build_structure + cpx #$05 ; CPU:$F5EC PRG:35EC E0 05 + bne @build_structure ; CPU:$F5EE PRG:35EE D0 06 - lda $03A4 - sta $0310 + lda $03A4 ; CPU:$F5F0 PRG:35F0 AD A4 03 + sta $0310 ; CPU:$F5F3 PRG:35F3 8D 10 03 @build_structure: - lda #$8E - sta $0303 + lda #$8E ; CPU:$F5F6 PRG:35F6 A9 8E + sta $0303 ; CPU:$F5F8 PRG:35F8 8D 03 03 - lda $EA - sta $0301 + lda $EA ; CPU:$F5FB PRG:35FB A5 EA + sta $0301 ; CPU:$F5FD PRG:35FD 8D 01 03 - lda $E9 - sta $0302 + lda $E9 ; CPU:$F600 PRG:3600 A5 E9 + sta $0302 ; CPU:$F602 PRG:3602 8D 02 03 - lda $E8 - sta $0F + lda $E8 ; CPU:$F605 PRG:3605 A5 E8 + sta $0F ; CPU:$F607 PRG:3607 85 0F - jsr BuildCourseStructure + jsr BuildCourseStructure ; CPU:$F609 PRG:3609 20 4E F6 - lda $E8 - jsr IncrementWrap40ECBF - sta $E8 + lda $E8 ; CPU:$F60C PRG:360C A5 E8 + jsr IncrementWrap40ECBF ; CPU:$F60E PRG:360E 20 BF EC + sta $E8 ; CPU:$F611 PRG:3611 85 E8 - inc $E9 + inc $E9 ; CPU:$F613 PRG:3613 E6 E9 - lda $E9 - cmp #$20 - bne @advance_eb + lda $E9 ; CPU:$F615 PRG:3615 A5 E9 + cmp #$20 ; CPU:$F617 PRG:3617 C9 20 + bne @advance_eb ; CPU:$F619 PRG:3619 D0 0A - lda #$00 - sta $E9 + lda #$00 ; CPU:$F61B PRG:361B A9 00 + sta $E9 ; CPU:$F61D PRG:361D 85 E9 - lda $EA - eor #$04 - sta $EA + lda $EA ; CPU:$F61F PRG:361F A5 EA + eor #$04 ; CPU:$F621 PRG:3621 49 04 + sta $EA ; CPU:$F623 PRG:3623 85 EA @advance_eb: - lda $E0 - jsr IncrementWrap40ECBF - sta $EB + lda $E0 ; CPU:$F625 PRG:3625 A5 E0 + jsr IncrementWrap40ECBF ; CPU:$F627 PRG:3627 20 BF EC + sta $EB ; CPU:$F62A PRG:362A 85 EB - rts + rts ; CPU:$F62C PRG:362C 60 ; --------------------------------------------------------------------------- @@ -11855,101 +11854,101 @@ UpdateCourseObjectRuntime: ; F68F: F0 FB = BEQ $F68C ; Reuses the RTS at the end of CopyCourseStructure. - .byte $F0, $FB + .byte $F0, $FB ; CPU:$F68F PRG:368F F0 FB lda $CA ; F691: A5 CA ; F693: D0 32 = BNE $F6C7 - .byte $D0, $32 + .byte $D0, $32 ; CPU:$F693 PRG:3693 D0 32 lda $C3 ; F695: A5 C3 ; F697: D0 2E = BNE $F6C7 - .byte $D0, $2E + .byte $D0, $2E ; CPU:$F697 PRG:3697 D0 2E ldx $C8 ; F699: A6 C8 txa ; F69B: 8A ; F69C: F0 29 = BEQ $F6C7 - .byte $F0, $29 + .byte $F0, $29 ; CPU:$F69C PRG:369C F0 29 dex ; F69E: CA - jsr LoadCourseListPointer + jsr LoadCourseListPointer ; CPU:$F69F PRG:369F 20 39 F8 - ldy $C9 - lda ($07),y + ldy $C9 ; CPU:$F6A2 PRG:36A2 A4 C9 + lda ($07),y ; CPU:$F6A4 PRG:36A4 B1 07 ; F6A6: D0 03 = BNE $F6AB - .byte $D0, $03 + .byte $D0, $03 ; CPU:$F6A6 PRG:36A6 D0 03 - jmp $F71E + jmp $F71E ; CPU:$F6A8 PRG:36A8 4C 1E F7 ; $F6AB - bit $F0B5 + bit $F0B5 ; CPU:$F6AB PRG:36AB 2C B5 F0 ; F6AE: F0 12 = BEQ $F6C2 - .byte $F0, $12 + .byte $F0, $12 ; CPU:$F6AE PRG:36AE F0 12 - and #$0F - tax + and #$0F ; CPU:$F6B0 PRG:36B0 29 0F + tax ; CPU:$F6B2 PRG:36B2 AA - lda $F4C6,x - sta $B8 + lda $F4C6,x ; CPU:$F6B3 PRG:36B3 BD C6 F4 + sta $B8 ; CPU:$F6B6 PRG:36B6 85 B8 - iny - lda ($07),y - sta $CA + iny ; CPU:$F6B8 PRG:36B8 C8 + lda ($07),y ; CPU:$F6B9 PRG:36B9 B1 07 + sta $CA ; CPU:$F6BB PRG:36BB 85 CA - iny - sty $C9 + iny ; CPU:$F6BD PRG:36BD C8 + sty $C9 ; CPU:$F6BE PRG:36BE 84 C9 ; F6C0: D0 05 = BNE $F6C7 - .byte $D0, $05 + .byte $D0, $05 ; CPU:$F6C0 PRG:36C0 D0 05 ; $F6C2 - sta $B8 + sta $B8 ; CPU:$F6C2 PRG:36C2 85 B8 - iny - sty $C9 + iny ; CPU:$F6C4 PRG:36C4 C8 + sty $C9 ; CPU:$F6C5 PRG:36C5 84 C9 ; $F6C7 UpdateCourseObjectLoadStructureF6C7: - ldx $B8 - jsr LoadCourseStructurePointer + ldx $B8 ; CPU:$F6C7 PRG:36C7 A6 B8 + jsr LoadCourseStructurePointer ; CPU:$F6C9 PRG:36C9 20 2E F8 - ldy $C3 - lda ($05),y + ldy $C3 ; CPU:$F6CC PRG:36CC A4 C3 + lda ($05),y ; CPU:$F6CE PRG:36CE B1 05 ; F6D0: F0 3C = BEQ $F70E - .byte $F0, $3C + .byte $F0, $3C ; CPU:$F6D0 PRG:36D0 F0 3C - jsr InitializeCourseStructure + jsr InitializeCourseStructure ; CPU:$F6D2 PRG:36D2 20 76 F6 - lda ($05),y - tax + lda ($05),y ; CPU:$F6D5 PRG:36D5 B1 05 + tax ; CPU:$F6D7 PRG:36D7 AA - jsr CopyCourseStructure + jsr CopyCourseStructure ; CPU:$F6D8 PRG:36D8 20 81 F6 - iny - sty $C3 + iny ; CPU:$F6DB PRG:36DB C8 + sty $C3 ; CPU:$F6DC PRG:36DC 84 C3 - lda #$8E - sta $0303 + lda #$8E ; CPU:$F6DE PRG:36DE A9 8E + sta $0303 ; CPU:$F6E0 PRG:36E0 8D 03 03 - lda $B0 - sta $0301 + lda $B0 ; CPU:$F6E3 PRG:36E3 A5 B0 + sta $0301 ; CPU:$F6E5 PRG:36E5 8D 01 03 - lda $B1 - sta $0302 + lda $B1 ; CPU:$F6E8 PRG:36E8 A5 B1 + sta $0302 ; CPU:$F6EA PRG:36EA 8D 02 03 - lda $B2 - sta $0F + lda $B2 ; CPU:$F6ED PRG:36ED A5 B2 + sta $0F ; CPU:$F6EF PRG:36EF 85 0F - jsr BuildCourseStructure + jsr BuildCourseStructure ; CPU:$F6F1 PRG:36F1 20 4E F6 - lda $B2 - jsr IncrementWrap40ECBF - sta $B2 + lda $B2 ; CPU:$F6F4 PRG:36F4 A5 B2 + jsr IncrementWrap40ECBF ; CPU:$F6F6 PRG:36F6 20 BF EC + sta $B2 ; CPU:$F6F9 PRG:36F9 85 B2 ; Falls through to $F6FB. @@ -11962,21 +11961,21 @@ UpdateCourseObjectLoadStructureF6C7: ; --------------------------------------------------------------------------- AdvanceRuntimePosition: - inc $B1 + inc $B1 ; CPU:$F6FB PRG:36FB E6 B1 - lda $B1 - cmp #$20 - bne @return + lda $B1 ; CPU:$F6FD PRG:36FD A5 B1 + cmp #$20 ; CPU:$F6FF PRG:36FF C9 20 + bne @return ; CPU:$F701 PRG:3701 D0 0A - lda #$00 - sta $B1 + lda #$00 ; CPU:$F703 PRG:3703 A9 00 + sta $B1 ; CPU:$F705 PRG:3705 85 B1 - lda $B0 - eor #$04 - sta $B0 + lda $B0 ; CPU:$F707 PRG:3707 A5 B0 + eor #$04 ; CPU:$F709 PRG:3709 49 04 + sta $B0 ; CPU:$F70B PRG:370B 85 B0 @return: - rts + rts ; CPU:$F70D PRG:370D 60 ; --------------------------------------------------------------------------- ; $F70E-$F73D @@ -11993,7 +11992,7 @@ UpdateRuntimeCourseState: lda $CA ; F716: A5 CA ; F718: F0 1F = BEQ $F739 - beq @set_be + beq @set_be ; CPU:$F718 PRG:3718 F0 1F dec $CA ; F71A: C6 CA bpl @set_be ; F71C: 10 1B @@ -12016,7 +12015,7 @@ UpdateRuntimeCourseState: jsr $ECC9 ; F72C: 20 C9 EC ; F72F: F0 0D = BEQ $F73E - beq ResetRuntimeCourseState + beq ResetRuntimeCourseState ; CPU:$F72F PRG:372F F0 0D @clear_runtime: @@ -12065,13 +12064,13 @@ ResetRuntimeCourseState: ; --------------------------------------------------------------------------- FindCourseObjectPattern: - lda $B4 - bne FindCourseObjectReturnF798 + lda $B4 ; CPU:$F755 PRG:3755 A5 B4 + bne FindCourseObjectReturnF798 ; CPU:$F757 PRG:3757 D0 3F - lda $C0 - beq FindCourseObjectReturnF798 + lda $C0 ; CPU:$F759 PRG:3759 A5 C0 + beq FindCourseObjectReturnF798 ; CPU:$F75B PRG:375B F0 3B - ldx #$15 + ldx #$15 ; CPU:$F75D PRG:375D A2 15 ; --------------------------------------------------------------------------- @@ -12080,58 +12079,58 @@ FindCourseObjectPattern: ; --------------------------------------------------------------------------- FindCourseObjectSearchF75F: - jsr LoadCourseStructurePointer + jsr LoadCourseStructurePointer ; CPU:$F75F PRG:375F 20 2E F8 - ldy #$00 - lda ($05),y - sta $03 + ldy #$00 ; CPU:$F762 PRG:3762 A0 00 + lda ($05),y ; CPU:$F764 PRG:3764 B1 05 + sta $03 ; CPU:$F766 PRG:3766 85 03 - lda #$0F - sec - sbc $03 - tay + lda #$0F ; CPU:$F768 PRG:3768 A9 0F + sec ; CPU:$F76A PRG:376A 38 + sbc $03 ; CPU:$F76B PRG:376B E5 03 + tay ; CPU:$F76D PRG:376D A8 - stx $04 + stx $04 ; CPU:$F76E PRG:376E 86 04 @next_pattern: - ldx $B3 + ldx $B3 ; CPU:$F770 PRG:3770 A6 B3 - lda ($05),y - cmp $0540,x - bne @next_candidate + lda ($05),y ; CPU:$F772 PRG:3772 B1 05 + cmp $0540,x ; CPU:$F774 PRG:3774 DD 40 05 + bne @next_candidate ; CPU:$F777 PRG:3777 D0 19 - dey - dey - dey + dey ; CPU:$F779 PRG:3779 88 + dey ; CPU:$F77A PRG:377A 88 + dey ; CPU:$F77B PRG:377B 88 - lda ($05),y - cmp $0480,x - bne @next_candidate + lda ($05),y ; CPU:$F77C PRG:377C B1 05 + cmp $0480,x ; CPU:$F77E PRG:377E DD 80 04 + bne @next_candidate ; CPU:$F781 PRG:3781 D0 0F - dey - dey + dey ; CPU:$F783 PRG:3783 88 + dey ; CPU:$F784 PRG:3784 88 - lda ($05),y - cmp $0400,x - bne @next_candidate + lda ($05),y ; CPU:$F785 PRG:3785 B1 05 + cmp $0400,x ; CPU:$F787 PRG:3787 DD 00 04 + bne @next_candidate ; CPU:$F78A PRG:378A D0 06 - lda $04 - sta $C7 + lda $04 ; CPU:$F78C PRG:378C A5 04 + sta $C7 ; CPU:$F78E PRG:378E 85 C7 ; F790: 10 07 = BPL $F799 - bpl BuildCourseObjectList + bpl BuildCourseObjectList ; CPU:$F790 PRG:3790 10 07 @next_candidate: - dec $04 + dec $04 ; CPU:$F792 PRG:3792 C6 04 - ldx $04 + ldx $04 ; CPU:$F794 PRG:3794 A6 04 ; F796: 10 C7 = BPL $F75F - bpl FindCourseObjectSearchF75F + bpl FindCourseObjectSearchF75F ; CPU:$F796 PRG:3796 10 C7 FindCourseObjectReturnF798: - rts + rts ; CPU:$F798 PRG:3798 60 ; --------------------------------------------------------------------------- @@ -12140,127 +12139,127 @@ FindCourseObjectReturnF798: ; --------------------------------------------------------------------------- BuildCourseObjectList: - lda $C4 + lda $C4 ; CPU:$F799 PRG:3799 A5 C4 ; F79B: D0 0F = BNE $F7AC - bne CourseObjectContinueF7AC + bne CourseObjectContinueF7AC ; CPU:$F79B PRG:379B D0 0F - lda $C7 - sta $C6 + lda $C7 ; CPU:$F79D PRG:379D A5 C7 + sta $C6 ; CPU:$F79F PRG:379F 85 C6 - ldx $B7 - jsr ReserveCourseListEntry + ldx $B7 ; CPU:$F7A1 PRG:37A1 A6 B7 + jsr ReserveCourseListEntry ; CPU:$F7A3 PRG:37A3 20 21 F8 - lda #$3D - sta $C5 + lda #$3D ; CPU:$F7A6 PRG:37A6 A9 3D + sta $C5 ; CPU:$F7A8 PRG:37A8 85 C5 - inc $C4 + inc $C4 ; CPU:$F7AA PRG:37AA E6 C4 CourseObjectContinueF7AC: - lda $C7 - cmp $C6 + lda $C7 ; CPU:$F7AC PRG:37AC A5 C7 + cmp $C6 ; CPU:$F7AE PRG:37AE C5 C6 ; F7B0: D0 17 = BNE $F7C9 - .byte $D0, $17 + .byte $D0, $17 ; CPU:$F7B0 PRG:37B0 D0 17 - lda $C6 + lda $C6 ; CPU:$F7B2 PRG:37B2 A5 C6 ; F7B4: D0 E2 = BNE $F798 - .byte $D0, $E2 + .byte $D0, $E2 ; CPU:$F7B4 PRG:37B4 D0 E2 - inc $C5 + inc $C5 ; CPU:$F7B6 PRG:37B6 E6 C5 - lda $C5 - cmp #$7F + lda $C5 ; CPU:$F7B8 PRG:37B8 A5 C5 + cmp #$7F ; CPU:$F7BA PRG:37BA C9 7F ; F7BC: 90 3C = BCC $F7FA - bcc CourseObjectCheckLimitF7FA + bcc CourseObjectCheckLimitF7FA ; CPU:$F7BC PRG:37BC 90 3C - ldx $B7 - sta $05E0,x + ldx $B7 ; CPU:$F7BE PRG:37BE A6 B7 + sta $05E0,x ; CPU:$F7C0 PRG:37C0 9D E0 05 - inx - jsr ReserveCourseListEntry + inx ; CPU:$F7C3 PRG:37C3 E8 + jsr ReserveCourseListEntry ; CPU:$F7C4 PRG:37C4 20 21 F8 ; F7C7: F0 31 = BEQ $F7FA - beq CourseObjectCheckLimitF7FA + beq CourseObjectCheckLimitF7FA ; CPU:$F7C7 PRG:37C7 F0 31 ; $F7C9 CourseObjectCheckSavedF7C9: - lda $C6 + lda $C6 ; CPU:$F7C9 PRG:37C9 A5 C6 ; F7CB: D0 1A = BNE $F7E7 - .byte $D0, $1A + .byte $D0, $1A ; CPU:$F7CB PRG:37CB D0 1A ; $F7CD CourseObjectAppendCurrentF7CD: - ldx $B7 + ldx $B7 ; CPU:$F7CD PRG:37CD A6 B7 - lda $C5 - sta $05E0,x + lda $C5 ; CPU:$F7CF PRG:37CF A5 C5 + sta $05E0,x ; CPU:$F7D1 PRG:37D1 9D E0 05 - inx - stx $B7 + inx ; CPU:$F7D4 PRG:37D4 E8 + stx $B7 ; CPU:$F7D5 PRG:37D5 86 B7 - lda $C7 - cmp #$11 + lda $C7 ; CPU:$F7D7 PRG:37D7 A5 C7 + cmp #$11 ; CPU:$F7D9 PRG:37D9 C9 11 ; F7DB: B0 2C = BCS $F809 - .byte $B0, $2C + .byte $B0, $2C ; CPU:$F7DB PRG:37DB B0 2C - lda $C7 - sta $05E0,x + lda $C7 ; CPU:$F7DD PRG:37DD A5 C7 + sta $05E0,x ; CPU:$F7DF PRG:37DF 9D E0 05 - jsr AdvanceCourseList + jsr AdvanceCourseList ; CPU:$F7E2 PRG:37E2 20 26 F8 ; F7E5: F0 05 = BEQ $F7EC - beq CourseObjectAppendSavedF7EC + beq CourseObjectAppendSavedF7EC ; CPU:$F7E5 PRG:37E5 F0 05 ; $F7E7 CourseObjectReserveNextF7E7: - ldx $B7 - jsr ReserveCourseListEntry + ldx $B7 ; CPU:$F7E7 PRG:37E7 A6 B7 + jsr ReserveCourseListEntry ; CPU:$F7E9 PRG:37E9 20 21 F8 ; $F7EC CourseObjectAppendSavedF7EC: - lda $C7 - sta $C6 + lda $C7 ; CPU:$F7EC PRG:37EC A5 C7 + sta $C6 ; CPU:$F7EE PRG:37EE 85 C6 - cmp #$09 + cmp #$09 ; CPU:$F7F0 PRG:37F0 C9 09 ; F7F2: D0 06 = BNE $F7FA - bne CourseObjectCheckLimitF7FA + bne CourseObjectCheckLimitF7FA ; CPU:$F7F2 PRG:37F2 D0 06 - lda #$02 - sta $BF - sta $49 + lda #$02 ; CPU:$F7F4 PRG:37F4 A9 02 + sta $BF ; CPU:$F7F6 PRG:37F6 85 BF + sta $49 ; CPU:$F7F8 PRG:37F8 85 49 ; $F7FA CourseObjectCheckLimitF7FA: - lda $B7 - cmp #$ED + lda $B7 ; CPU:$F7FA PRG:37FA A5 B7 + cmp #$ED ; CPU:$F7FC PRG:37FC C9 ED ; F7FE: 90 08 = BCC $F808 - bcc CourseObjectReturnF808 + bcc CourseObjectReturnF808 ; CPU:$F7FE PRG:37FE 90 08 - lda $C1 + lda $C1 ; CPU:$F800 PRG:3800 A5 C1 ; F802: D0 04 = BNE $F808 - bne CourseObjectReturnF808 + bne CourseObjectReturnF808 ; CPU:$F802 PRG:3802 D0 04 - lda #$01 - sta $C1 + lda #$01 ; CPU:$F804 PRG:3804 A9 01 + sta $C1 ; CPU:$F806 PRG:3806 85 C1 ; $F808 CourseObjectReturnF808: - rts + rts ; CPU:$F808 PRG:3808 60 ; --------------------------------------------------------------------------- @@ -12273,7 +12272,7 @@ CopyCourseObjectList: tax ; F80B: AA dex ; F80C: CA - jsr LoadCourseListPointer + jsr LoadCourseListPointer ; CPU:$F80D PRG:380D 20 39 F8 ; F80D: 20 39 F8 ldy #$00 ; F810: A0 00 @@ -12284,7 +12283,7 @@ CopyCourseObjectList: lda ($07),y ; F814: B1 07 ; F816: F0 D4 = BEQ $F7EC - .byte $F0, $D4 + .byte $F0, $D4 ; CPU:$F816 PRG:3816 F0 D4 sta $05E0,x ; F818: 9D E0 05 @@ -12302,8 +12301,8 @@ CopyCourseObjectList: ; --------------------------------------------------------------------------- ReserveCourseListEntry: - lda #$40 - sta $05E0,x + lda #$40 ; CPU:$F821 PRG:3821 A9 40 + sta $05E0,x ; CPU:$F823 PRG:3823 9D E0 05 ; --------------------------------------------------------------------------- @@ -12312,13 +12311,13 @@ ReserveCourseListEntry: ; --------------------------------------------------------------------------- AdvanceCourseList: - inx - stx $B7 + inx ; CPU:$F826 PRG:3826 E8 + stx $B7 ; CPU:$F827 PRG:3827 86 B7 - lda #$00 - sta $C5 + lda #$00 ; CPU:$F829 PRG:3829 A9 00 + sta $C5 ; CPU:$F82B PRG:382B 85 C5 - rts + rts ; CPU:$F82D PRG:382D 60 ; --------------------------------------------------------------------------- @@ -12327,13 +12326,13 @@ AdvanceCourseList: ; --------------------------------------------------------------------------- LoadCourseStructurePointer: - lda $F063,x - sta $05 + lda $F063,x ; CPU:$F82E PRG:382E BD 63 F0 + sta $05 ; CPU:$F831 PRG:3831 85 05 - lda $F087,x - sta $06 + lda $F087,x ; CPU:$F833 PRG:3833 BD 87 F0 + sta $06 ; CPU:$F836 PRG:3836 85 06 - rts + rts ; CPU:$F838 PRG:3838 60 ; --------------------------------------------------------------------------- @@ -12342,13 +12341,13 @@ LoadCourseStructurePointer: ; --------------------------------------------------------------------------- LoadCourseListPointer: - lda $F4F5,x - sta $07 + lda $F4F5,x ; CPU:$F839 PRG:3839 BD F5 F4 + sta $07 ; CPU:$F83C PRG:383C 85 07 - lda $F4FA,x - sta $08 + lda $F4FA,x ; CPU:$F83E PRG:383E BD FA F4 + sta $08 ; CPU:$F841 PRG:3841 85 08 - rts + rts ; CPU:$F843 PRG:3843 60 ; --------------------------------------------------------------------------- ; $F844-$F86A @@ -12356,28 +12355,28 @@ LoadCourseListPointer: ; --------------------------------------------------------------------------- UpdateAudio: - lda #$C0 - sta APUFRAMECNT + lda #$C0 ; CPU:$F844 PRG:3844 A9 C0 + sta APUFRAMECNT ; CPU:$F846 PRG:3846 8D 17 40 - jsr UpdatePulse1Channel - jsr UpdatePulse2Channel - jsr UpdateNoiseChannel - jsr UpdateSoundEffect + jsr UpdatePulse1Channel ; CPU:$F849 PRG:3849 20 D4 F8 + jsr UpdatePulse2Channel ; CPU:$F84C PRG:384C 20 74 FA + jsr UpdateNoiseChannel ; CPU:$F84F PRG:384F 20 3D FC + jsr UpdateSoundEffect ; CPU:$F852 PRG:3852 20 8D FC - lda #$00 - sta $FF - sta $FE - sta $FD - sta $FB + lda #$00 ; CPU:$F855 PRG:3855 A9 00 + sta $FF ; CPU:$F857 PRG:3857 85 FF + sta $FE ; CPU:$F859 PRG:3859 85 FE + sta $FD ; CPU:$F85B PRG:385B 85 FD + sta $FB ; CPU:$F85D PRG:385D 85 FB - lda $07FF - beq @return + lda $07FF ; CPU:$F85F PRG:385F AD FF 07 + beq @return ; CPU:$F862 PRG:3862 F0 06 - sta APUDMALOAD - dec $07FF + sta APUDMALOAD ; CPU:$F864 PRG:3864 8D 11 40 + dec $07FF ; CPU:$F867 PRG:3867 CE FF 07 @return: - rts + rts ; CPU:$F86A PRG:386A 60 ; --------------------------------------------------------------------------- ; $F86B-$F88C @@ -12423,7 +12422,7 @@ ConfigureApuChannel1F885: ldx #$04 ; F885: A2 04 ; F887: D0 EA = BNE $F873 - .byte $D0, $EA + .byte $D0, $EA ; CPU:$F887 PRG:3887 D0 EA ; --------------------------------------------------------------------------- @@ -12435,7 +12434,7 @@ ConfigureApuChannel2F889: ldx #$08 ; F889: A2 08 ; F88B: D0 E6 = BNE $F873 - .byte $D0, $E6 + .byte $D0, $E6 ; CPU:$F88B PRG:388B D0 E6 ; --------------------------------------------------------------------------- @@ -12521,7 +12520,7 @@ Pulse1EffectF8AE: sta APUPC1BASE ; F8CF: 8D 00 40 ; F8D2: D0 66 = BNE $F93A - .byte $D0, $66 + .byte $D0, $66 ; CPU:$F8D2 PRG:38D2 D0 66 ; --------------------------------------------------------------------------- @@ -12540,7 +12539,7 @@ UpdatePulse1Channel: ldy $F4 ; F8D4: A4 F4 ; F8D6: D0 35 = BNE $F90D - .byte $D0, $35 + .byte $D0, $35 ; CPU:$F8D6 PRG:38D6 D0 35 ldy $FF ; F8D8: A4 FF lda $F0 ; F8DA: A5 F0 @@ -12548,72 +12547,72 @@ UpdatePulse1Channel: lsr $FF ; F8DC: 46 FF ; F8DE: B0 AD = BCS $F88D - .byte $B0, $AD + .byte $B0, $AD ; CPU:$F8DE PRG:38DE B0 AD lsr a ; F8E0: 4A ; F8E1: B0 57 = BCS $F93A - .byte $B0, $57 + .byte $B0, $57 ; CPU:$F8E1 PRG:38E1 B0 57 lsr $FF ; F8E3: 46 FF ; F8E5: B0 B5 = BCS $F89C - .byte $B0, $B5 + .byte $B0, $B5 ; CPU:$F8E5 PRG:38E5 B0 B5 lsr a ; F8E7: 4A ; F8E8: B0 C1 = BCS $F8AB - .byte $B0, $C1 + .byte $B0, $C1 ; CPU:$F8E8 PRG:38E8 B0 C1 lsr a ; F8EA: 4A ; F8EB: B0 CC = BCS $F8B9 - .byte $B0, $CC + .byte $B0, $CC ; CPU:$F8EB PRG:38EB B0 CC lsr $FF ; F8ED: 46 FF ; F8EF: B0 BD = BCS $F8AE - .byte $B0, $BD + .byte $B0, $BD ; CPU:$F8EF PRG:38EF B0 BD lsr $FF ; F8F1: 46 FF ; F8F3: B0 19 = BCS $F90E - .byte $B0, $19 + .byte $B0, $19 ; CPU:$F8F3 PRG:38F3 B0 19 lsr a ; F8F5: 4A ; F8F6: B0 29 = BCS $F921 - .byte $B0, $29 + .byte $B0, $29 ; CPU:$F8F6 PRG:38F6 B0 29 lsr $FF ; F8F8: 46 FF ; F8FA: B0 4C = BCS $F948 - .byte $B0, $4C + .byte $B0, $4C ; CPU:$F8FA PRG:38FA B0 4C lsr a ; F8FC: 4A ; F8FD: B0 5C = BCS $F95B - .byte $B0, $5C + .byte $B0, $5C ; CPU:$F8FD PRG:38FD B0 5C lsr $FF ; F8FF: 46 FF ; F901: B0 6A = BCS $F96D - .byte $B0, $6A + .byte $B0, $6A ; CPU:$F901 PRG:3901 B0 6A lsr a ; F903: 4A ; F904: B0 6F = BCS $F975 - .byte $B0, $6F + .byte $B0, $6F ; CPU:$F904 PRG:3904 B0 6F lsr $FF ; F906: 46 FF ; F908: B0 73 = BCS $F97D - .byte $B0, $73 + .byte $B0, $73 ; CPU:$F908 PRG:3908 B0 73 lsr a ; F90A: 4A ; F90B: B0 7D = BCS $F98A - .byte $B0, $7D + .byte $B0, $7D ; CPU:$F90B PRG:390B B0 7D rts ; F90D: 60 @@ -12641,7 +12640,7 @@ Pulse1EffectF90E: sta $F6 ; F91D: 85 F6 ; F91F: D0 0A = BNE $F92B - .byte $D0, $0A + .byte $D0, $0A ; CPU:$F91F PRG:391F D0 0A ; --------------------------------------------------------------------------- @@ -12658,7 +12657,7 @@ Pulse1EffectF921: ; F929: D0 E2 = BNE $F90D ; $F90D is the dispatcher RTS. - .byte $D0, $E2 + .byte $D0, $E2 ; CPU:$F929 PRG:3929 D0 E2 ; --------------------------------------------------------------------------- @@ -12736,7 +12735,7 @@ Pulse1EffectF948: sta $F6 ; F957: 85 F6 ; F959: D0 0A = BNE $F965 - .byte $D0, $0A + .byte $D0, $0A ; CPU:$F959 PRG:3959 D0 0A ; --------------------------------------------------------------------------- @@ -12746,13 +12745,13 @@ Pulse1EffectF948: Pulse1EffectF95B: dec $F6 ; F95B: C6 F6 - beq Pulse1EffectF969 + beq Pulse1EffectF969 ; CPU:$F95D PRG:395D F0 0A lda $F6 ; F95F: A5 F6 cmp #$04 ; F961: C9 04 ; F963: D0 A8 = BNE $F90D - .byte $D0, $A8 + .byte $D0, $A8 ; CPU:$F963 PRG:3963 D0 A8 ; $F965 @@ -12760,7 +12759,7 @@ Pulse1EffectSweep9AF965: lda #$9A ; F965: A9 9A ; F967: D0 C4 = BNE $F92D - .byte $D0, $C4 + .byte $D0, $C4 ; CPU:$F967 PRG:3967 D0 C4 ; $F969 @@ -12768,7 +12767,7 @@ Pulse1EffectF969: lda #$93 ; F969: A9 93 ; F96B: D0 C6 = BNE $F933 - .byte $D0, $C6 + .byte $D0, $C6 ; CPU:$F96B PRG:396B D0 C6 ; --------------------------------------------------------------------------- @@ -12783,7 +12782,7 @@ Pulse1EffectF96D: sta $F5 ; F971: 85 F5 ; F973: D0 D9 = BNE $F94E - .byte $D0, $D9 + .byte $D0, $D9 ; CPU:$F973 PRG:3973 D0 D9 ; --------------------------------------------------------------------------- @@ -12795,12 +12794,12 @@ Pulse1EffectF975: dec $F6 ; F975: C6 F6 ; F977: D0 E6 = BNE $F95F - .byte $D0, $E6 + .byte $D0, $E6 ; CPU:$F977 PRG:3977 D0 E6 lda #$94 ; F979: A9 94 ; F97B: D0 B6 = BNE $F933 - .byte $D0, $B6 + .byte $D0, $B6 ; CPU:$F97B PRG:397B D0 B6 ; --------------------------------------------------------------------------- @@ -12838,7 +12837,7 @@ Pulse1EffectF98A: lsr a ; F995: 4A tay ; F996: A8 - lda $F9A2,y + lda $F9A2,y ; CPU:$F997 PRG:3997 B9 A2 F9 ; F997: B9 A2 F9 bcs @store_volume ; F99A: B0 02 @@ -12849,7 +12848,7 @@ Pulse1EffectF98A: sta APUPC1BASE ; F99E: 8D 00 40 ; F9A1: D0 97 = BNE $F93A - .byte $D0, $97 + .byte $D0, $97 ; CPU:$F9A1 PRG:39A1 D0 97 ; --------------------------------------------------------------------------- @@ -12865,10 +12864,10 @@ Pulse1EffectF98A: ; --------------------------------------------------------------------------- Pulse1EffectTableF9A3: - .byte $91, $92, $93, $94 - .byte $95, $96, $97, $98 - .byte $9A, $9C, $9F, $9C - .byte $9A, $98, $96, $94 + .byte $91, $92, $93, $94 ; CPU:$F9A3 PRG:39A3 91 92 93 94 + .byte $95, $96, $97, $98 ; CPU:$F9A7 PRG:39A7 95 96 97 98 + .byte $9A, $9C, $9F, $9C ; CPU:$F9AB PRG:39AB 9A 9C 9F 9C + .byte $9A, $98, $96, $94 ; CPU:$F9AF PRG:39AF 9A 98 96 94 ; --------------------------------------------------------------------------- ; $F9B3-$FA4F @@ -12878,44 +12877,44 @@ Pulse1EffectTableF9A3: AudioEffectDataF9B3: ; $F9B3 - .byte $00, $02, $04, $02, $00, $FE, $94, $96 - .byte $94, $93, $92, $91, $1C, $54, $16, $52 + .byte $00, $02, $04, $02, $00, $FE, $94, $96 ; CPU:$F9B3 PRG:39B3 00 02 04 02 + .byte $94, $93, $92, $91, $1C, $54, $16, $52 ; CPU:$F9BB PRG:39BB 94 93 92 91 ; $F9C3 - .byte $12, $18, $18, $20, $28, $30, $32, $34 - .byte $36, $38, $39, $3A, $3B, $3C, $3D, $3E + .byte $12, $18, $18, $20, $28, $30, $32, $34 ; CPU:$F9C3 PRG:39C3 12 18 18 20 + .byte $36, $38, $39, $3A, $3B, $3C, $3D, $3E ; CPU:$F9CB PRG:39CB 36 38 39 3A ; $F9D3 - .byte $3F, $40, $41, $42, $43, $44, $45, $46 - .byte $47, $48, $49, $4A, $4B, $4C, $4D, $4E + .byte $3F, $40, $41, $42, $43, $44, $45, $46 ; CPU:$F9D3 PRG:39D3 3F 40 41 42 + .byte $47, $48, $49, $4A, $4B, $4C, $4D, $4E ; CPU:$F9DB PRG:39DB 47 48 49 4A ; $F9E3 - .byte $4F, $50, $51, $52, $53, $54, $55, $56 - .byte $57, $58, $59, $5A, $5B, $5C, $5D, $5E + .byte $4F, $50, $51, $52, $53, $54, $55, $56 ; CPU:$F9E3 PRG:39E3 4F 50 51 52 + .byte $57, $58, $59, $5A, $5B, $5C, $5D, $5E ; CPU:$F9EB PRG:39EB 57 58 59 5A ; $F9F3 - .byte $5F, $70, $05, $04, $03, $02, $02, $02 - .byte $02, $02, $02, $02, $02, $02, $02, $02 + .byte $5F, $70, $05, $04, $03, $02, $02, $02 ; CPU:$F9F3 PRG:39F3 5F 70 05 04 + .byte $02, $02, $02, $02, $02, $02, $02, $02 ; CPU:$F9FB PRG:39FB 02 02 02 02 ; $FA03 - .byte $02, $02, $02, $02, $02, $02, $02, $02 - .byte $02, $02, $02, $02, $02, $02, $02, $02 + .byte $02, $02, $02, $02, $02, $02, $02, $02 ; CPU:$FA03 PRG:3A03 02 02 02 02 + .byte $02, $02, $02, $02, $02, $02, $02, $02 ; CPU:$FA0B PRG:3A0B 02 02 02 02 ; $FA13 - .byte $02, $01, $01, $01, $01, $01, $01, $01 - .byte $01, $01, $01, $01, $01, $01, $01, $01 + .byte $02, $01, $01, $01, $01, $01, $01, $01 ; CPU:$FA13 PRG:3A13 02 01 01 01 + .byte $01, $01, $01, $01, $01, $01, $01, $01 ; CPU:$FA1B PRG:3A1B 01 01 01 01 ; $FA23 - .byte $01, $00, $94, $96, $98, $9C, $80, $80 - .byte $80, $80, $80, $9E, $9D, $9C, $9B, $9A + .byte $01, $00, $94, $96, $98, $9C, $80, $80 ; CPU:$FA23 PRG:3A23 01 00 94 96 + .byte $80, $80, $80, $9E, $9D, $9C, $9B, $9A ; CPU:$FA2B PRG:3A2B 80 80 80 9E ; $FA33 - .byte $99, $98, $97, $96, $95, $95, $94, $30 - .byte $38, $40, $48, $50, $54, $58, $50, $4C + .byte $99, $98, $97, $96, $95, $95, $94, $30 ; CPU:$FA33 PRG:3A33 99 98 97 96 + .byte $38, $40, $48, $50, $54, $58, $50, $4C ; CPU:$FA3B PRG:3A3B 38 40 48 50 ; $FA43 - .byte $48, $44, $40, $3C, $38, $34, $30, $2C - .byte $2A, $28, $26, $24 + .byte $48, $44, $40, $3C, $38, $34, $30, $2C ; CPU:$FA43 PRG:3A43 48 44 40 3C + .byte $2A, $28, $26, $24 ; CPU:$FA4B PRG:3A4B 2A 28 26 24 ; --------------------------------------------------------------------------- ; $FA4F-$FA73 @@ -12923,37 +12922,37 @@ AudioEffectDataF9B3: ; --------------------------------------------------------------------------- Pulse2EffectFA4F: - ldy #$15 - sty $F1 + ldy #$15 ; CPU:$FA4F PRG:3A4F A0 15 + sty $F1 ; CPU:$FA51 PRG:3A51 84 F1 - bne @active + bne @active ; CPU:$FA53 PRG:3A53 D0 09 - dec $07F3 + dec $07F3 ; CPU:$FA55 PRG:3A55 CE F3 07 ; FA58: D0 35 = BNE $FA8F - .byte $D0, $35 + .byte $D0, $35 ; CPU:$FA58 PRG:3A58 D0 35 - dec $F1 + dec $F1 ; CPU:$FA5A PRG:3A5A C6 F1 ; FA5C: F0 31 = BEQ $FA8F - .byte $F0, $31 + .byte $F0, $31 ; CPU:$FA5C PRG:3A5C F0 31 @active: - ldx $FA24,y + ldx $FA24,y ; CPU:$FA5E PRG:3A5E BE 24 FA - lda #$01 - cpx #$80 - bne @store_mode + lda #$01 ; CPU:$FA61 PRG:3A61 A9 01 + cpx #$80 ; CPU:$FA63 PRG:3A63 E0 80 + bne @store_mode ; CPU:$FA65 PRG:3A65 D0 02 - lda #$02 + lda #$02 ; CPU:$FA67 PRG:3A67 A9 02 @store_mode: - sta $07F3 + sta $07F3 ; CPU:$FA69 PRG:3A69 8D F3 07 - lda $FA39,y - ldy #$7F + lda $FA39,y ; CPU:$FA6C PRG:3A6C B9 39 FA + ldy #$7F ; CPU:$FA6F PRG:3A6F A0 7F - jmp WritePulse2State + jmp WritePulse2State ; CPU:$FA71 PRG:3A71 4C F7 FA ; --------------------------------------------------------------------------- @@ -12969,18 +12968,18 @@ UpdatePulse2Channel: ldy $FE ; FA74: A4 FE ; FA76: D0 D7 = BNE $FA4F - .byte $D0, $D7 + .byte $D0, $D7 ; CPU:$FA76 PRG:3A76 D0 D7 ldy $F1 ; FA78: A4 F1 ; FA7A: D0 D9 = BNE $FA55 - .byte $D0, $D9 + .byte $D0, $D9 ; CPU:$FA7A PRG:3A7A D0 D9 lda $FC ; FA7C: A5 FC and #$7F ; FA7E: 29 7F ; FA80: D0 13 = BNE $FA95 - .byte $D0, $13 + .byte $D0, $13 ; CPU:$FA80 PRG:3A80 D0 13 lda $F3 ; FA82: A5 F3 beq @return ; FA84: F0 0E @@ -13011,33 +13010,33 @@ UpdateActivePulse2: cpy $07F8 ; FA99: CC F8 07 ; FA9C: D0 31 = BNE $FACF - .byte $D0, $31 + .byte $D0, $31 ; CPU:$FA9C PRG:3A9C D0 31 cmp #$30 ; FA9E: C9 30 ; FAA0: B0 1D = BCS $FABF - .byte $B0, $1D + .byte $B0, $1D ; CPU:$FAA0 PRG:3AA0 B0 1D sec ; FAA2: 38 sbc $F3 ; FAA3: E5 F3 ; FAA5: F0 1C = BEQ $FAC3 - .byte $F0, $1C + .byte $F0, $1C ; CPU:$FAA5 PRG:3AA5 F0 1C ; FAA7: B0 0A = BCS $FAB3 - .byte $B0, $0A + .byte $B0, $0A ; CPU:$FAA7 PRG:3AA7 B0 0A dec $F3 ; FAA9: C6 F3 cmp #$F8 ; FAAB: C9 F8 ; FAAD: B0 0C = BCS $FABB - .byte $B0, $0C + .byte $B0, $0C ; CPU:$FAAD PRG:3AAD B0 0C dec $F3 ; FAAF: C6 F3 ; FAB1: D0 08 = BNE $FABB - .byte $D0, $08 + .byte $D0, $08 ; CPU:$FAB1 PRG:3AB1 D0 08 ; $FAB3 @@ -13047,7 +13046,7 @@ Pulse2IncrementStateFAB3: cmp #$08 ; FAB5: C9 08 ; FAB7: 90 02 = BCC $FABB - .byte $90, $02 + .byte $90, $02 ; CPU:$FAB7 PRG:3AB7 90 02 inc $F3 ; FAB9: E6 F3 @@ -13057,7 +13056,7 @@ Pulse2StoreDelayFABB: lda #$01 ; FABB: A9 01 ; FABD: D0 09 = BNE $FAC8 - .byte $D0, $09 + .byte $D0, $09 ; CPU:$FABD PRG:3ABD D0 09 ; $FABF @@ -13105,7 +13104,7 @@ Pulse2UpdatePitchFACF: ldy #$89 ; FAEE: A0 89 ; FAF0: D0 05 = BNE $FAF7 - .byte $D0, $05 + .byte $D0, $05 ; CPU:$FAF0 PRG:3AF0 D0 05 @positive_fc: ldx $F9B9,y ; FAF2: BE B9 F9 @@ -13208,7 +13207,7 @@ UpdatePulsePitch: lda $F7 ; FB54: A5 F7 ora $FA ; FB56: 05 FA - bne UpdatePulsePitchReturnFB76 + bne UpdatePulsePitchReturnFB76 ; CPU:$FB58 PRG:3B58 D0 1C ; FB58: D0 1C @@ -13251,40 +13250,40 @@ UpdatePulsePitchReturnFB76: NoiseAudioDataFB77: ; $FB77 - .byte $10, $11, $12, $12, $12, $13, $13, $14 - .byte $15, $16, $17, $18, $19, $1A, $1B, $1C + .byte $10, $11, $12, $12, $12, $13, $13, $14 ; CPU:$FB77 PRG:3B77 10 11 12 12 + .byte $15, $16, $17, $18, $19, $1A, $1B, $1C ; CPU:$FB7F PRG:3B7F 15 16 17 18 ; $FB87 - .byte $1D, $1E, $1F, $1C, $1F, $1F, $1F, $1F - .byte $1F, $18, $1F, $1F, $1F, $1F, $18, $1C + .byte $1D, $1E, $1F, $1C, $1F, $1F, $1F, $1F ; CPU:$FB87 PRG:3B87 1D 1E 1F 1C + .byte $1F, $18, $1F, $1F, $1F, $1F, $18, $1C ; CPU:$FB8F PRG:3B8F 1F 18 1F 1F ; $FB97 - .byte $1F, $1F, $18, $1F, $1F, $1F, $14, $1F - .byte $1C, $1F, $1F, $1C, $18, $16, $0E, $0C + .byte $1F, $1F, $18, $1F, $1F, $1F, $14, $1F ; CPU:$FB97 PRG:3B97 1F 1F 18 1F + .byte $1C, $1F, $1F, $1C, $18, $16, $0E, $0C ; CPU:$FB9F PRG:3B9F 1C 1F 1F 1C ; $FBA7 - .byte $0E, $0E, $0A, $0C, $0E, $0E, $0C, $0A - .byte $0E, $0D, $0E, $0E, $0E, $0E, $0C, $0E + .byte $0E, $0E, $0A, $0C, $0E, $0E, $0C, $0A ; CPU:$FBA7 PRG:3BA7 0E 0E 0A 0C + .byte $0E, $0D, $0E, $0E, $0E, $0E, $0C, $0E ; CPU:$FBAF PRG:3BAF 0E 0D 0E 0E ; $FBB7 - .byte $0A, $0E, $0C, $0C, $0E, $0D, $0C, $0D - .byte $0D, $0E, $0E, $0D, $0D, $0E, $0B, $0E + .byte $0A, $0E, $0C, $0C, $0E, $0D, $0C, $0D ; CPU:$FBB7 PRG:3BB7 0A 0E 0C 0C + .byte $0D, $0E, $0E, $0D, $0D, $0E, $0B, $0E ; CPU:$FBBF PRG:3BBF 0D 0E 0E 0D ; $FBC7 - .byte $0E, $0D, $0E, $0E, $0C, $0D, $0E, $0B - .byte $0D, $0E, $0E, $0D, $30, $31, $32, $32 + .byte $0E, $0D, $0E, $0E, $0C, $0D, $0E, $0B ; CPU:$FBC7 PRG:3BC7 0E 0D 0E 0E + .byte $0D, $0E, $0E, $0D, $30, $31, $32, $32 ; CPU:$FBCF PRG:3BCF 0D 0E 0E 0D ; $FBD7 - .byte $33, $33, $34, $35, $36, $37, $38, $37 - .byte $38, $37, $36, $35, $34, $34, $34, $35 + .byte $33, $33, $34, $35, $36, $37, $38, $37 ; CPU:$FBD7 PRG:3BD7 33 33 34 35 + .byte $38, $37, $36, $35, $34, $34, $34, $35 ; CPU:$FBDF PRG:3BDF 38 37 36 35 ; $FBE7 - .byte $36, $37, $38, $39, $3A, $3B, $3C, $3A - .byte $38, $36, $35, $34, $10, $11, $12, $14 + .byte $36, $37, $38, $39, $3A, $3B, $3C, $3A ; CPU:$FBE7 PRG:3BE7 36 37 38 39 + .byte $38, $36, $35, $34, $10, $11, $12, $14 ; CPU:$FBEF PRG:3BEF 38 36 35 34 ; $FBF7-$FBFE - .byte $16, $18, $1C, $1F, $1C - .byte $18, $16, $14 + .byte $16, $18, $1C, $1F, $1C ; CPU:$FBF7 PRG:3BF7 16 18 1C 1F + .byte $18, $16, $14 ; CPU:$FBFC PRG:3BFC 18 16 14 ; --------------------------------------------------------------------------- ; $FBFF-$FC20 @@ -13319,7 +13318,7 @@ SetupNoiseEffectLong: sta APUNOISELOOP ; FC1A: 8D 0E 40 ; FC1D: D0 56 = BNE $FC75 - .byte $D0, $56 + .byte $D0, $56 ; CPU:$FC1D PRG:3C1D D0 56 ; --------------------------------------------------------------------------- ; $FC1F-$FC3C @@ -13348,7 +13347,7 @@ SetupNoiseEffectShort: sta APUNOISEBASE ; FC38: 8D 0C 40 ; FC3B: D0 38 = BNE $FC75 - .byte $D0, $38 + .byte $D0, $38 ; CPU:$FC3B PRG:3C3B D0 38 ; --------------------------------------------------------------------------- ; $FC3D-$FC88 @@ -13365,32 +13364,32 @@ UpdateNoiseChannel: lsr $FD ; FC41: 46 FD ; FC43: B0 BA = BCS $FBFF - .byte $B0, $BA + .byte $B0, $BA ; CPU:$FC43 PRG:3C43 B0 BA lsr a ; FC45: 4A ; FC46: B0 BE = BCS $FC06 - .byte $B0, $BE + .byte $B0, $BE ; CPU:$FC46 PRG:3C46 B0 BE lsr $FD ; FC48: 46 FD ; FC4A: B0 D3 = BCS $FC1F - .byte $B0, $D3 + .byte $B0, $D3 ; CPU:$FC4A PRG:3C4A B0 D3 lsr a ; FC4C: 4A ; FC4D: B0 DF = BCS $FC2E - .byte $B0, $DF + .byte $B0, $DF ; CPU:$FC4D PRG:3C4D B0 DF lsr a ; FC4F: 4A ; FC50: B0 11 = BCS $FC63 - .byte $B0, $11 + .byte $B0, $11 ; CPU:$FC50 PRG:3C50 B0 11 lsr $FD ; FC52: 46 FD ; FC54: B0 01 = BCS $FC57 - .byte $B0, $01 + .byte $B0, $01 ; CPU:$FC54 PRG:3C54 B0 01 rts ; FC56: 60 @@ -13435,12 +13434,12 @@ NoiseEffectUpdateFC63: dec $07F6 ; FC7A: CE F6 07 ; FC7D: D0 D7 = BNE $FC56 - .byte $D0, $D7 + .byte $D0, $D7 ; CPU:$FC7D PRG:3C7D D0 D7 ldy $07F7 ; FC7F: AC F7 07 ; FC82: D0 9B = BNE $FC1F - .byte $D0, $9B + .byte $D0, $9B ; CPU:$FC82 PRG:3C82 D0 9B lda #$00 ; FC84: A9 00 sta $F2 ; FC86: 85 F2 @@ -13454,7 +13453,7 @@ NoiseEffectUpdateFC63: ; --------------------------------------------------------------------------- AudioControlTableFC89: - .byte $7F, $8E, $86, $8F + .byte $7F, $8E, $86, $8F ; CPU:$FC89 PRG:3C89 7F 8E 86 8F ; --------------------------------------------------------------------------- @@ -13473,7 +13472,7 @@ UpdateSoundEffect: lda $F4 ; FC91: A5 F4 ; FC93: D0 44 = BNE $FCD9 - .byte $D0, $44 + .byte $D0, $44 ; CPU:$FC93 PRG:3C93 D0 44 rts ; FC95: 60 @@ -13490,27 +13489,27 @@ UpdateSoundEffect: lda $FDD2,y ; FC9E: B9 D2 FD tay ; FCA1: A8 - lda SoundEffectDescriptorDataFDD3,y + lda SoundEffectDescriptorDataFDD3,y ; CPU:$FCA2 PRG:3CA2 B9 D3 FD ; FCA2: B9 D3 FD sta $07F0 ; FCA5: 8D F0 07 - lda SoundEffectDescriptorDataFDD3+1,y + lda SoundEffectDescriptorDataFDD3+1,y ; CPU:$FCA8 PRG:3CA8 B9 D4 FD ; FCA8: B9 D4 FD sta $F8 ; FCAB: 85 F8 - lda SoundEffectDescriptorDataFDD3+2,y + lda SoundEffectDescriptorDataFDD3+2,y ; CPU:$FCAD PRG:3CAD B9 D5 FD ; FCAD: B9 D5 FD sta $F9 ; FCB0: 85 F9 - lda SoundEffectDescriptorDataFDD3+3,y + lda SoundEffectDescriptorDataFDD3+3,y ; CPU:$FCB2 PRG:3CB2 B9 D6 FD ; FCB2: B9 D6 FD sta $07E0 ; FCB5: 8D E0 07 - lda SoundEffectDescriptorDataFDD3+4,y + lda SoundEffectDescriptorDataFDD3+4,y ; CPU:$FCB8 PRG:3CB8 B9 D7 FD ; FCB8: B9 D7 FD sta $FA ; FCBB: 85 FA - lda SoundEffectDescriptorDataFDD3+5,y + lda SoundEffectDescriptorDataFDD3+5,y ; CPU:$FCBD PRG:3CBD B9 D8 FD ; FCBD: B9 D8 FD sta $07EC ; FCC0: 8D EC 07 @@ -13538,12 +13537,12 @@ UpdateSoundEffectVoice0FCD9: ldy $07E0 ; FCD9: AC E0 07 ; FCDC: F0 3C = BEQ $FD1A - .byte $F0, $3C + .byte $F0, $3C ; CPU:$FCDC PRG:3CDC F0 3C dec $07E1 ; FCDE: CE E1 07 ; FCE1: D0 37 = BNE $FD1A - .byte $D0, $37 + .byte $D0, $37 ; CPU:$FCE1 PRG:3CE1 D0 37 inc $07E0 ; FCE3: EE E0 07 @@ -13560,7 +13559,7 @@ UpdateSoundEffectVoice0FCD9: ldx #$10 ; FCF6: A2 10 ; FCF8: D0 0A = BNE $FD04 - .byte $D0, $0A + .byte $D0, $0A ; CPU:$FCF8 PRG:3CF8 D0 0A @select_control: ldx #$4F ; FCFA: A2 4F @@ -13598,7 +13597,7 @@ UpdateSoundEffectVoice0FCD9: UpdateSoundEffectVoice1FD1D: ; FD1D: D0 44 = BNE $FD63 - .byte $D0, $44 + .byte $D0, $44 ; CPU:$FD1D PRG:3D1D D0 44 ldy $07E4 ; FD1F: AC E4 07 inc $07E4 ; FD22: EE E4 07 @@ -13621,12 +13620,12 @@ UpdateSoundEffectVoice1FD1D: and #$60 ; FD3A: 29 60 ; FD3C: D0 25 = BNE $FD63 - .byte $D0, $25 + .byte $D0, $25 ; CPU:$FD3C PRG:3D3C D0 25 txa ; FD3E: 8A and #$3E ; FD3F: 29 3E - jsr ConfigureApuChannel1F885 + jsr ConfigureApuChannel1F885 ; CPU:$FD41 PRG:3D41 20 85 F8 ; FD41: 20 85 F8 bne @use_87 ; FD44: D0 04 @@ -13634,7 +13633,7 @@ UpdateSoundEffectVoice1FD1D: ldx #$10 ; FD46: A2 10 ; FD48: D0 11 = BNE $FD5B - .byte $D0, $11 + .byte $D0, $11 ; CPU:$FD48 PRG:3D48 D0 11 @use_87: @@ -13668,12 +13667,12 @@ UpdateSoundEffectTriangleFD63: ldy $FA ; FD63: A4 FA ; FD65: F0 32 = BEQ $FD99 - .byte $F0, $32 + .byte $F0, $32 ; CPU:$FD65 PRG:3D65 F0 32 dec $07E9 ; FD67: CE E9 07 ; FD6A: D0 2D = BNE $FD99 - .byte $D0, $2D + .byte $D0, $2D ; CPU:$FD6A PRG:3D6A D0 2D inc $FA ; FD6C: E6 FA @@ -13707,11 +13706,11 @@ UpdateSoundEffectTriangleFD63: txa ; FD8C: 8A and #$3E ; FD8D: 29 3E - jsr ConfigureApuChannel2F889 + jsr ConfigureApuChannel2F889 ; CPU:$FD8F PRG:3D8F 20 89 F8 ; FD8F: 20 89 F8 ; FD92: D0 05 = BNE $FD99 - .byte $D0, $05 + .byte $D0, $05 ; CPU:$FD92 PRG:3D92 D0 05 lda #$00 ; FD94: A9 00 sta APUTRIBASE ; FD96: 8D 08 40 @@ -13727,12 +13726,12 @@ UpdateSoundEffectNoiseFD99: and #$1B ; FD9B: 29 1B ; FD9D: F0 33 = BEQ $FDD2 - beq SoundEffectReturnFDD2 + beq SoundEffectReturnFDD2 ; CPU:$FD9D PRG:3D9D F0 33 dec $07ED ; FD9F: CE ED 07 ; FDA2: D0 2E = BNE $FDD2 - bne SoundEffectReturnFDD2 + bne SoundEffectReturnFDD2 ; CPU:$FDA2 PRG:3DA2 D0 2E ldy $07EC ; FDA4: AC EC 07 inc $07EC ; FDA7: EE EC 07 @@ -13745,7 +13744,7 @@ UpdateSoundEffectNoiseFD99: and #$3E ; FDB3: 29 3E ; FDB5: F0 1B = BEQ $FDD2 - beq SoundEffectReturnFDD2 + beq SoundEffectReturnFDD2 ; CPU:$FDB5 PRG:3DB5 F0 1B cmp #$20 ; FDB7: C9 20 beq @noise_alt ; FDB9: F0 08 @@ -13755,7 +13754,7 @@ UpdateSoundEffectNoiseFD99: ldy #$08 ; FDBF: A0 08 ; FDC1: D0 06 = BNE $FDC9 - bne @write_noise + bne @write_noise ; CPU:$FDC1 PRG:3DC1 D0 06 @noise_alt: @@ -13793,21 +13792,21 @@ SoundEffectReturnFDD2: SoundEffectDescriptorDataFDD3: ; $FDD3 - .byte $08, $0E, $14, $0E - .byte $0E, $19, $1E, $23 - .byte $00, $64, $FF, $2D - .byte $59, $74, $0F, $FB + .byte $08, $0E, $14, $0E ; CPU:$FDD3 PRG:3DD3 08 0E 14 0E + .byte $0E, $19, $1E, $23 ; CPU:$FDD7 PRG:3DD7 0E 19 1E 23 + .byte $00, $64, $FF, $2D ; CPU:$FDDB PRG:3DDB 00 64 FF 2D + .byte $59, $74, $0F, $FB ; CPU:$FDDF PRG:3DDF 59 74 0F FB ; $FDE3 - .byte $FD, $31, $56, $7B - .byte $08, $87, $FE, $27 - .byte $41, $0F, $F3, $FE - .byte $03, $00, $08, $FD + .byte $FD, $31, $56, $7B ; CPU:$FDE3 PRG:3DE3 FD 31 56 7B + .byte $08, $87, $FE, $27 ; CPU:$FDE7 PRG:3DE7 08 87 FE 27 + .byte $41, $0F, $F3, $FE ; CPU:$FDEB PRG:3DEB 41 0F F3 FE + .byte $03, $00, $08, $FD ; CPU:$FDEF PRG:3DEF 03 00 08 FD ; $FDF3-$FDFB - .byte $FE, $02, $00, $08 - .byte $F0, $FF, $02, $00 - .byte $02 + .byte $FE, $02, $00, $08 ; CPU:$FDF3 PRG:3DF3 FE 02 00 08 + .byte $F0, $FF, $02, $00 ; CPU:$FDF7 PRG:3DF7 F0 FF 02 00 + .byte $02 ; CPU:$FDFB PRG:3DFB 02 ; --------------------------------------------------------------------------- @@ -13819,37 +13818,37 @@ SoundEffectDescriptorDataFDD3: ; --------------------------------------------------------------------------- AudioSequenceFDFC: - .byte $20, $26 - .byte $02, $4A - .byte $02, $06 + .byte $20, $26 ; CPU:$FDFC PRG:3DFC 20 26 + .byte $02, $4A ; CPU:$FDFE PRG:3DFE 02 4A + .byte $02, $06 ; CPU:$FE00 PRG:3E00 02 06 - .byte $02, $20 - .byte $26, $02 - .byte $4A, $02 - .byte $06, $02 + .byte $02, $20 ; CPU:$FE02 PRG:3E02 02 20 + .byte $26, $02 ; CPU:$FE04 PRG:3E04 26 02 + .byte $4A, $02 ; CPU:$FE06 PRG:3E06 4A 02 + .byte $06, $02 ; CPU:$FE08 PRG:3E08 06 02 - .byte $20, $26 - .byte $02, $2E - .byte $02, $2E - .byte $02, $2E + .byte $20, $26 ; CPU:$FE0A PRG:3E0A 20 26 + .byte $02, $2E ; CPU:$FE0C PRG:3E0C 02 2E + .byte $02, $2E ; CPU:$FE0E PRG:3E0E 02 2E + .byte $02, $2E ; CPU:$FE10 PRG:3E10 02 2E - .byte $46, $AE - .byte $02, $42 - .byte $6E, $6A + .byte $46, $AE ; CPU:$FE12 PRG:3E12 46 AE + .byte $02, $42 ; CPU:$FE14 PRG:3E14 02 42 + .byte $6E, $6A ; CPU:$FE16 PRG:3E16 6E 6A - .byte $22, $1C - .byte $2A, $22 - .byte $1C, $2A - .byte $6E, $22 - .byte $1C, $2E - .byte $22, $1C - .byte $2E, $1C + .byte $22, $1C ; CPU:$FE18 PRG:3E18 22 1C + .byte $2A, $22 ; CPU:$FE1A PRG:3E1A 2A 22 + .byte $1C, $2A ; CPU:$FE1C PRG:3E1C 1C 2A + .byte $6E, $22 ; CPU:$FE1E PRG:3E1E 6E 22 + .byte $1C, $2E ; CPU:$FE20 PRG:3E20 1C 2E + .byte $22, $1C ; CPU:$FE22 PRG:3E22 22 1C + .byte $2E, $1C ; CPU:$FE24 PRG:3E24 2E 1C - .byte $60, $62 - .byte $64, $26 - .byte $86 + .byte $60, $62 ; CPU:$FE26 PRG:3E26 60 62 + .byte $64, $26 ; CPU:$FE28 PRG:3E28 64 26 + .byte $86 ; CPU:$FE2A PRG:3E2A 86 - .byte $00 + .byte $00 ; CPU:$FE2B PRG:3E2B 00 ; --------------------------------------------------------------------------- @@ -13860,39 +13859,39 @@ AudioSequenceFDFC: AudioSequenceFE2C: ; $FE2C - .byte $82, $60, $58, $42, $58, $60, $58, $42 - .byte $58, $60, $5C, $60, $5C, $60, $5C, $60 + .byte $82, $60, $58, $42, $58, $60, $58, $42 ; CPU:$FE2C PRG:3E2C 82 60 58 42 + .byte $58, $60, $5C, $60, $5C, $60, $5C, $60 ; CPU:$FE34 PRG:3E34 58 60 5C 60 ; $FE3C - .byte $5C, $62, $18, $36, $22, $18, $36, $22 - .byte $66, $3A, $3A, $26, $3A, $3A, $26, $36 + .byte $5C, $62, $18, $36, $22, $18, $36, $22 ; CPU:$FE3C PRG:3E3C 5C 62 18 36 + .byte $66, $3A, $3A, $26, $3A, $3A, $26, $36 ; CPU:$FE44 PRG:3E44 66 3A 3A 26 ; $FE4C - .byte $7A, $58, $5C, $22, $A6, $82, $58, $66 - .byte $58, $66, $58, $66, $58, $66, $60, $68 + .byte $7A, $58, $5C, $22, $A6, $82, $58, $66 ; CPU:$FE4C PRG:3E4C 7A 58 5C 22 + .byte $58, $66, $58, $66, $58, $66, $60, $68 ; CPU:$FE54 PRG:3E54 58 66 58 66 ; $FE5C - .byte $60, $68, $60, $68, $60, $68, $46, $2A - .byte $22, $06, $2A, $22, $06, $50, $26, $26 + .byte $60, $68, $60, $68, $60, $68, $46, $2A ; CPU:$FE5C PRG:3E5C 60 68 60 68 + .byte $22, $06, $2A, $22, $06, $50, $26, $26 ; CPU:$FE64 PRG:3E64 22 06 2A 22 ; $FE6C - .byte $10, $10, $26, $26, $22, $66, $6A, $6A - .byte $0A, $8E, $41, $A0, $A0, $A0, $A0, $A0 + .byte $10, $10, $26, $26, $22, $66, $6A, $6A ; CPU:$FE6C PRG:3E6C 10 10 26 26 + .byte $0A, $8E, $41, $A0, $A0, $A0, $A0, $A0 ; CPU:$FE74 PRG:3E74 0A 8E 41 A0 ; $FE7C - .byte $A0, $A0, $60, $E0, $E0, $20, $60, $60 - .byte $60, $20, $A0, $22, $26, $22, $26, $22 + .byte $A0, $A0, $60, $E0, $E0, $20, $60, $60 ; CPU:$FE7C PRG:3E7C A0 A0 60 E0 + .byte $60, $20, $A0, $22, $26, $22, $26, $22 ; CPU:$FE84 PRG:3E84 60 20 A0 22 ; $FE8C - .byte $26, $26, $2A, $26, $2A, $26, $2A, $2A - .byte $2C, $2A, $2C, $2A, $2C, $46, $6E, $66 + .byte $26, $26, $2A, $26, $2A, $26, $2A, $2A ; CPU:$FE8C PRG:3E8C 26 26 2A 26 + .byte $2C, $2A, $2C, $2A, $2C, $46, $6E, $66 ; CPU:$FE94 PRG:3E94 2C 2A 2C 2A ; $FE9C - .byte $6B, $6F, $46, $4A, $4E, $47, $6E, $46 - .byte $4A, $6D, $67, $62, $62, $62, $67, $67 + .byte $6B, $6F, $46, $4A, $4E, $47, $6E, $46 ; CPU:$FE9C PRG:3E9C 6B 6F 46 4A + .byte $4A, $6D, $67, $62, $62, $62, $67, $67 ; CPU:$FEA4 PRG:3EA4 4A 6D 67 62 ; $FEAC-$FEAD - .byte $6B, $00 + .byte $6B, $00 ; CPU:$FEAC PRG:3EAC 6B 00 ; --------------------------------------------------------------------------- @@ -13903,23 +13902,23 @@ AudioSequenceFE2C: AudioSequenceFEAE: ; $FEAE - .byte $6D, $47, $4B, $50, $4E, $46, $4B, $55 - .byte $50, $54, $56, $51, $4E, $50, $54, $4B + .byte $6D, $47, $4B, $50, $4E, $46, $4B, $55 ; CPU:$FEAE PRG:3EAE 6D 47 4B 50 + .byte $50, $54, $56, $51, $4E, $50, $54, $4B ; CPU:$FEB6 PRG:3EB6 50 54 56 51 ; $FEBE - .byte $4F, $34, $18, $34, $18, $34, $18, $59 - .byte $59, $5D, $66, $6A, $6C, $66, $6A, $6C + .byte $4F, $34, $18, $34, $18, $34, $18, $59 ; CPU:$FEBE PRG:3EBE 4F 34 18 34 + .byte $59, $5D, $66, $6A, $6C, $66, $6A, $6C ; CPU:$FEC6 PRG:3EC6 59 5D 66 6A ; $FECE - .byte $66, $6A, $6C, $66, $6A, $6C, $66, $6A - .byte $6C, $66, $6A, $6C, $66, $6A, $6C, $66 + .byte $66, $6A, $6C, $66, $6A, $6C, $66, $6A ; CPU:$FECE PRG:3ECE 66 6A 6C 66 + .byte $6C, $66, $6A, $6C, $66, $6A, $6C, $66 ; CPU:$FED6 PRG:3ED6 6C 66 6A 6C ; $FEDE - .byte $6A, $6C, $66, $6A, $6C, $66, $6A, $6C - .byte $67, $6C, $6C, $6C, $66, $66, $66, $66 + .byte $6A, $6C, $66, $6A, $6C, $66, $6A, $6C ; CPU:$FEDE PRG:3EDE 6A 6C 66 6A + .byte $67, $6C, $6C, $6C, $66, $66, $66, $66 ; CPU:$FEE6 PRG:3EE6 67 6C 6C 6C ; $FEEE-$FEF5 - .byte $66, $66, $6A, $6A, $6A, $03, $03, $00 + .byte $66, $66, $6A, $6A, $6A, $03, $03, $00 ; CPU:$FEEE PRG:3EEE 66 66 6A 6A ; --------------------------------------------------------------------------- @@ -13928,11 +13927,11 @@ AudioSequenceFEAE: ; --------------------------------------------------------------------------- AudioSequenceFEF6: - .byte $76, $82 - .byte $76, $82 - .byte $76, $82 - .byte $2B, $42 - .byte $00 + .byte $76, $82 ; CPU:$FEF6 PRG:3EF6 76 82 + .byte $76, $82 ; CPU:$FEF8 PRG:3EF8 76 82 + .byte $76, $82 ; CPU:$FEFA PRG:3EFA 76 82 + .byte $2B, $42 ; CPU:$FEFC PRG:3EFC 2B 42 + .byte $00 ; CPU:$FEFE PRG:3EFE 00 ; --------------------------------------------------------------------------- @@ -13940,7 +13939,7 @@ AudioSequenceFEF6: ; Preceding byte, not part of the aligned period table. ; --------------------------------------------------------------------------- - .byte $44 + .byte $44 ; CPU:$FEFF PRG:3EFF 44 ; --------------------------------------------------------------------------- @@ -13958,40 +13957,40 @@ AudioSequenceFEF6: ; --------------------------------------------------------------------------- ApuPeriodTableFF00: - .byte $06, $AE ; index $00 - .byte $00, $00 ; index $02 - .byte $00, $69 ; index $04 - .byte $00, $D4 ; index $06 - .byte $00, $C8 ; index $08 - .byte $00, $BD ; index $0A - .byte $00, $B2 ; index $0C - .byte $00, $A8 ; index $0E + .byte $06, $AE ; index $00 ; CPU:$FF00 PRG:3F00 06 AE + .byte $00, $00 ; index $02 ; CPU:$FF02 PRG:3F02 00 00 + .byte $00, $69 ; index $04 ; CPU:$FF04 PRG:3F04 00 69 + .byte $00, $D4 ; index $06 ; CPU:$FF06 PRG:3F06 00 D4 + .byte $00, $C8 ; index $08 ; CPU:$FF08 PRG:3F08 00 C8 + .byte $00, $BD ; index $0A ; CPU:$FF0A PRG:3F0A 00 BD + .byte $00, $B2 ; index $0C ; CPU:$FF0C PRG:3F0C 00 B2 + .byte $00, $A8 ; index $0E ; CPU:$FF0E PRG:3F0E 00 A8 - .byte $00, $9F ; index $10 - .byte $00, $96 ; index $12 - .byte $00, $8D ; index $14 - .byte $00, $7E ; index $16 - .byte $01, $AB ; index $18 - .byte $01, $93 ; index $1A - .byte $01, $7C ; index $1C - .byte $01, $67 ; index $1E + .byte $00, $9F ; index $10 ; CPU:$FF10 PRG:3F10 00 9F + .byte $00, $96 ; index $12 ; CPU:$FF12 PRG:3F12 00 96 + .byte $00, $8D ; index $14 ; CPU:$FF14 PRG:3F14 00 8D + .byte $00, $7E ; index $16 ; CPU:$FF16 PRG:3F16 00 7E + .byte $01, $AB ; index $18 ; CPU:$FF18 PRG:3F18 01 AB + .byte $01, $93 ; index $1A ; CPU:$FF1A PRG:3F1A 01 93 + .byte $01, $7C ; index $1C ; CPU:$FF1C PRG:3F1C 01 7C + .byte $01, $67 ; index $1E ; CPU:$FF1E PRG:3F1E 01 67 - .byte $01, $52 ; index $20 - .byte $01, $3F ; index $22 - .byte $01, $2D ; index $24 - .byte $01, $1C ; index $26 - .byte $01, $0C ; index $28 - .byte $00, $FD ; index $2A - .byte $00, $EE ; index $2C - .byte $00, $E1 ; index $2E + .byte $01, $52 ; index $20 ; CPU:$FF20 PRG:3F20 01 52 + .byte $01, $3F ; index $22 ; CPU:$FF22 PRG:3F22 01 3F + .byte $01, $2D ; index $24 ; CPU:$FF24 PRG:3F24 01 2D + .byte $01, $1C ; index $26 ; CPU:$FF26 PRG:3F26 01 1C + .byte $01, $0C ; index $28 ; CPU:$FF28 PRG:3F28 01 0C + .byte $00, $FD ; index $2A ; CPU:$FF2A PRG:3F2A 00 FD + .byte $00, $EE ; index $2C ; CPU:$FF2C PRG:3F2C 00 EE + .byte $00, $E1 ; index $2E ; CPU:$FF2E PRG:3F2E 00 E1 - .byte $03, $57 ; index $30 - .byte $02, $3A ; index $32 - .byte $02, $1A ; index $34 - .byte $01, $FC ; index $36 - .byte $01, $DF ; index $38 - .byte $01, $C4 ; index $3A - .byte $07, $FA ; index $3C + .byte $03, $57 ; index $30 ; CPU:$FF30 PRG:3F30 03 57 + .byte $02, $3A ; index $32 ; CPU:$FF32 PRG:3F32 02 3A + .byte $02, $1A ; index $34 ; CPU:$FF34 PRG:3F34 02 1A + .byte $01, $FC ; index $36 ; CPU:$FF36 PRG:3F36 01 FC + .byte $01, $DF ; index $38 ; CPU:$FF38 PRG:3F38 01 DF + .byte $01, $C4 ; index $3A ; CPU:$FF3A PRG:3F3A 01 C4 + .byte $07, $FA ; index $3C ; CPU:$FF3C PRG:3F3C 07 FA ; --------------------------------------------------------------------------- @@ -14000,10 +13999,10 @@ ApuPeriodTableFF00: ; --------------------------------------------------------------------------- AudioMaskTable: - .byte $04, $08, $10, $20 - .byte $05, $18, $0A, $06 - .byte $05, $0A, $14, $28 - .byte $50, $1E, $3C, $07 + .byte $04, $08, $10, $20 ; CPU:$FF3E PRG:3F3E 04 08 10 20 + .byte $05, $18, $0A, $06 ; CPU:$FF42 PRG:3F42 05 18 0A 06 + .byte $05, $0A, $14, $28 ; CPU:$FF46 PRG:3F46 05 0A 14 28 + .byte $50, $1E, $3C, $07 ; CPU:$FF4A PRG:3F4A 50 1E 3C 07 ; --------------------------------------------------------------------------- ; $FF4E-$FF52 @@ -14012,7 +14011,7 @@ AudioMaskTable: ; --------------------------------------------------------------------------- AudioLookupTableFF4E: - .byte $0E, $1C, $38, $70, $2A + .byte $0E, $1C, $38, $70, $2A ; CPU:$FF4E PRG:3F4E 0E 1C 38 70 ; --------------------------------------------------------------------------- @@ -14057,39 +14056,39 @@ DecodeAudioEvent: AudioDataFF64: ; $FF64 - .byte $82, $60, $42, $66, $42, $46, $42, $60 - .byte $66, $42, $47, $C2, $68, $42, $6E, $42 + .byte $82, $60, $42, $66, $42, $46, $42, $60 ; CPU:$FF64 PRG:3F64 82 60 42 66 + .byte $66, $42, $47, $C2, $68, $42, $6E, $42 ; CPU:$FF6C PRG:3F6C 66 42 47 C2 ; $FF74 - .byte $4E, $42, $68, $6E, $42, $4F, $C2, $0B - .byte $03, $C7, $0B, $03, $C7, $2B, $03, $E7 + .byte $4E, $42, $68, $6E, $42, $4F, $C2, $0B ; CPU:$FF74 PRG:3F74 4E 42 68 6E + .byte $03, $C7, $0B, $03, $C7, $2B, $03, $E7 ; CPU:$FF7C PRG:3F7C 03 C7 0B 03 ; $FF84 - .byte $A2, $23, $03, $E1, $5E, $5D, $58, $A0 - .byte $A2, $A4, $66, $C6, $00, $82, $58, $42 + .byte $A2, $23, $03, $E1, $5E, $5D, $58, $A0 ; CPU:$FF84 PRG:3F84 A2 23 03 E1 + .byte $A2, $A4, $66, $C6, $00, $82, $58, $42 ; CPU:$FF8C PRG:3F8C A2 A4 66 C6 ; $FF94 - .byte $60, $42, $66, $42, $58, $60, $42, $67 - .byte $C2, $60, $42, $68, $42, $6E, $42, $60 + .byte $60, $42, $66, $42, $58, $60, $42, $67 ; CPU:$FF94 PRG:3F94 60 42 66 42 + .byte $C2, $60, $42, $68, $42, $6E, $42, $60 ; CPU:$FF9C PRG:3F9C C2 60 42 68 ; $FFA4 - .byte $68, $42, $6F, $C2, $2B, $03, $EB, $2B - .byte $03, $EB, $23, $03, $E3, $9C, $1D, $03 + .byte $68, $42, $6F, $C2, $2B, $03, $EB, $2B ; CPU:$FFA4 PRG:3FA4 68 42 6F C2 + .byte $03, $EB, $23, $03, $E3, $9C, $1D, $03 ; CPU:$FFAC PRG:3FAC 03 EB 23 03 ; $FFB4 - .byte $D9, $78, $7B, $72, $98, $98, $9C, $62 - .byte $E0, $98, $A6, $98, $A6, $98, $A6, $98 + .byte $D9, $78, $7B, $72, $98, $98, $9C, $62 ; CPU:$FFB4 PRG:3FB4 D9 78 7B 72 + .byte $E0, $98, $A6, $98, $A6, $98, $A6, $98 ; CPU:$FFBC PRG:3FBC E0 98 A6 98 ; $FFC4 - .byte $A6, $A0, $AE, $A0, $AE, $A0, $AE, $A0 - .byte $AE, $9C, $EA, $9C, $E6, $E2, $60, $A6 + .byte $A6, $A0, $AE, $A0, $AE, $A0, $AE, $A0 ; CPU:$FFC4 PRG:3FC4 A6 A0 AE A0 + .byte $AE, $9C, $EA, $9C, $E6, $E2, $60, $A6 ; CPU:$FFCC PRG:3FCC AE 9C EA 9C ; $FFD4 - .byte $AA, $AA, $4A, $E6, $80, $E0, $E0, $E0 - .byte $E0, $E0, $E0, $E0, $A0, $A0, $C0, $A0 + .byte $AA, $AA, $4A, $E6, $80, $E0, $E0, $E0 ; CPU:$FFD4 PRG:3FD4 AA AA 4A E6 + .byte $E0, $E0, $E0, $E0, $A0, $A0, $C0, $A0 ; CPU:$FFDC PRG:3FDC E0 E0 E0 E0 ; $FFE4 - .byte $E0, $50, $E0, $A0, $A0, $A0 + .byte $E0, $50, $E0, $A0, $A0, $A0 ; CPU:$FFE4 PRG:3FE4 E0 50 E0 A0 ; --------------------------------------------------------------------------- @@ -14098,8 +14097,8 @@ AudioDataFF64: ; --------------------------------------------------------------------------- AudioDataFFEA: - .byte $60, $10, $10, $10, $10, $A0, $83, $00 - .byte $04, $14, $04, $14, $04, $14, $04, $D4 + .byte $60, $10, $10, $10, $10, $A0, $83, $00 ; CPU:$FFEA PRG:3FEA 60 10 10 10 + .byte $04, $14, $04, $14, $04, $14, $04, $D4 ; CPU:$FFF2 PRG:3FF2 04 14 04 14 ; --------------------------------------------------------------------------- ; $FFFA-$FFFF @@ -14107,6 +14106,6 @@ AudioDataFFEA: ; --------------------------------------------------------------------------- InterruptVectorsFFFA: - .word NMI ; FFFA-FFFB: NMI - .word $C184 ; FFFC-FFFD: RESET - .word $FFF0 ; FFFE-FFFF: IRQ/BRK \ No newline at end of file + .word NMI ; FFFA-FFFB: NMI ; CPU:$FFFA PRG:3FFA 3B C2 + .word $C184 ; FFFC-FFFD: RESET ; CPU:$FFFC PRG:3FFC 84 C1 + .word $FFF0 ; FFFE-FFFF: IRQ/BRK ; CPU:$FFFE PRG:3FFE F0 FF diff --git a/Joypad Test Cartridge (U)/OVERVIEW.md b/Joypad Test Cartridge (U)/OVERVIEW.md index 7e359ab..3a5150f 100644 --- a/Joypad Test Cartridge (U)/OVERVIEW.md +++ b/Joypad Test Cartridge (U)/OVERVIEW.md @@ -13,7 +13,7 @@ This document describes the execution flow of the disassembled Joypad Test Cartr | CHR | 1 × 8 KB | | Mirroring | Horizontal | | PRG bank start | CPU $C000 | -| Source file | `copilot/prg.s` (~1,360 lines with headers) | +| Source file | `copilot/prg.s` (4,516 lines with headers) | | Output | `reconstructed.nes` (24,592 bytes) | ### Interrupt vectors (CPU $FFFA–$FFFF) @@ -30,7 +30,7 @@ This document describes the execution flow of the disassembled Joypad Test Cartr `make` in `copilot/` assembles `prg.s` with `ca65`, links with `ld65`, and verifies against `prg.bin`. -**Verification result: BYTE-IDENTICAL** — `reconstructed_prg.bin` matches `prg.bin` exactly (all 16,384 bytes), and `prg.bin` matches the PRG bank of `Joypad Test Cartridge (U).nes`. +**Verification result: BYTE-IDENTICAL** — `make` compares the whole reconstructed ROM against `copilot/rom.nes` and prints `Byte-identical ROM verified.` Byte accounting is exact: 3,836 code + 12,548 data = 16,384 of 16,384 bytes. --- @@ -38,9 +38,26 @@ This document describes the execution flow of the disassembled Joypad Test Cartr | Pass | Status | Description | |------|--------|-------------| -| Pass 1 | Complete | Code/data split — ~580 bytes traced code (~3.5%) or explicit `.byte` data (~96.5%) with `; CPU:$xxxx PRG:$xxxx` annotations | -| Pass 2 | Complete | Routine headers added for all labeled positions; key routines semantically named (`Reset`, `NmiHandler`, `VramWrite`, `PpuScrollLatch`, etc.); zero-page aliases in `locals.inc` | -| Pass 3 | Complete | Data regions identified and documented (VRAM burst write table at $0302, pointer table at $0000, test pattern/button mapping data in $CE98–$FFFF); remaining `Label_Cxxxx` references are internal branch targets within routines | +| Pass 1 | **Redone** | Was badly truncated: 282 instructions / 580 bytes (3.5%). Now **1,773 instructions / 3,836 bytes (23.4%)** — a 6.6x increase. Root cause: the tracer only knew the 151 official opcodes and halted at `$C09E` on `DCP $3C20` (`$CF`), filing 3,256 bytes of real code as `.byte`. Verified against a fresh trace: 1,769 emitted instructions + 4 undocumented opcodes written as explicit bytes = 1,773, an exact match | +| Pass 2 | **Complete** | 202 labels, **zero `Label_Cxxxx` remaining**; 202 routine headers, all describing real behaviour (no "undetermined in Pass 1" boilerplate); `locals.inc` carries 99 aliases, half of them proven semantic names sitting beside the generated `ZpXX` entries | +| Pass 3 | **Complete** | The single data region `$CF06–$FFFF` has been broken into 20 named sub-blocks: VRAM command streams read by `VramWriteLoop`/`RetAddrUpdate`, seven 32-byte OAM table groups read by `CopyOamFromTable`/`CopyOamFromTable70`, the 32-byte sprite template read by `CopySpriteTemplateTable`, the 32-byte button OAM template read by `PrepareButtonOam`, and 10,517 bytes of `$FF` ROM padding. The `RetAddrUpdate` VRAM command stream opcode set has been decoded (`$4C` = jump, `$60` = deferred PPUCTRL, bit-7-clear bytes = VRAM write with PPU addr + data, bit 6 of data = long/short command selector). | + +### Why Pass 1 was truncated + +The tracer descended from the three vectors, following direct `jsr`/`jmp`/branch +targets. It stopped at `$C09E`, where the byte is `$CF` = `DCP $3C20` — an +undocumented read-modify-write op used here as ordinary code. Everything after +that point was written out as data until a later run promoted it. + +This cartridge is an unusually clear demonstration: nothing exotic is involved, +just one undocumented opcode in the middle of the main loop. `nesdis.py` now +takes `--undocumented` (default **off**, so other projects' `make regen` stays +byte-stable) to decode all 105 undocumented NMOS opcodes. + +ca65 V2.19 implements none of them, so the 4 affected instructions +(`DCP $3C20`, `LAX $20D4`, `NOP $C1,X`, `RRA ($D0),X`) are emitted as explicit +`.byte` with the disassembly in the comment. They stay in the code region, so +the split and the audit trail are both preserved. --- @@ -144,17 +161,64 @@ Full list in `copilot/locals.inc`. ## 8. Data Regions -The PRG is approximately 3.5% code / 96.5% data. The data regions include: +The PRG is **23.4% code / 76.6% data** (3,836 / 12,548 bytes). The data region `$CF06–$FFFF` has been broken into 20 named sub-blocks: -- **$C09E–$C173** (214 bytes): Main loop inline code/data (pointer table references, VRAM write parameters) -- **$C17F–$CCF6** (2,936 bytes): Test patterns, button mapping tables, screen data -- **$CD39–$CD3E** (6 bytes): PPU mask toggle code fragment -- **$CE98–$FFFF** (12,648 bytes): Test pattern data, button mapping tables, screen layout data +| Address | Size | Name | Contents | +|---------|------|------|----------| +| `$CF06–$CF28` | 35 B | `VramCommandStream1` | VRAM command stream start — PPU addr/data pairs read by `VramWriteLoop` | +| `$CF29` | 1 B | `VramStream1Terminator` | `$FF` terminator ending first command stream | +| `$CF2A–$CF3F` | 22 B | `VramCommandInlineCode` | Inline code after `jsr $CE98` — `lax $20D4`, `nop $C1,X`, `$61` padding | +| `$CF40–$D061` | 290 B | `VramCommandBlock2` | VRAM command/data block — PPU writes and OAM attribute patterns | +| `$D062` | 1 B | `VramStream2Terminator` | `$FF` terminator ending second command stream | +| `$D063–$D1F3` | 401 B | `VramCommandBlock3` | VRAM command/data block — continues command stream patterns | +| `$D1F4` | 1 B | `VramStream3Terminator` | `$FF` terminator ending third command stream | +| `$D1F5–$D4AD` | 697 B | `VramCommandBlock4` | Largest VRAM command/data block — 697 bytes of command stream | +| `$D4AE` | 1 B | `OamTableStreamTerminator` | `$FF` terminator before OAM gap data | +| `$D4AF–$D4E1` | 51 B | `OamTableGap` | Gap data before OAM table at `$D4E3` | +| `$D4E2` | 1 B | `OamTable1Terminator` | `$FF` terminator before OAM table group 1 | +| `$D4E3–$D5C2` | 224 B | `OamTableGroups1` | OAM table groups 1-7 (`CopyOamFromTable` reads `$D4E3`) — 7×32 byte tables, each with 8 entries of Y/tile/attr/X | +| `$D5C3` | 1 B | `OamTableStream2Terminator` | `$FF` terminator before second OAM table group | +| `$D5C4–$D603` | 64 B | `OamTableGroups2` | OAM table groups 1-2 (`CopyOamFromTable70` reads `$D5C4`) — 2×32 byte tables | +| `$D604–$D643` | 64 B | `OamSpritePadding` | 64 bytes of `$F4` sprite off-screen padding | +| `$D644–$D6A3` | 96 B | `OamTableGroups3` | OAM table groups 3-5 — 3×32 byte tables before sprite template | +| `$D6A4` | 1 B | `SpriteTableTerminator` | `$FF` terminator before sprite template table | +| `$D6A5–$D6C4` | 32 B | `SpriteTemplateTable` | Sprite template — 8×4 Y/tile/attr/X entries (`CopySpriteTemplateTable` reads `$D6A5`) | +| `$D6C5–$D6E4` | 32 B | `ButtonOamTemplateTable` | Button OAM template — 8×4 Y/tile/attr/X entries (`PrepareButtonOam` reads `$D6C5`) | +| `$D6E5–$FFF9` | 10,517 B | `RomPadding` | `$FF` ROM padding | +| `$FFFA–$FFFF` | 6 B | `ResetVectors` | Reset/NMI/IRQ vectors | -Notable data structures: -- Pointer table at $0000–$0001 (read by `VramPtrTableRead` at $CD99) -- VRAM burst write table at $0302 (read by `VramBurstWrite` at $CE4F) -- Button mapping / test pattern tables in the $C000–$FFFF range +The previous Pass 3 claimed four data regions totalling ~15.8 KB, including `$C09E–$C173` and `$C17F–$CCF6`. Both are code. Those claims were an artefact of the truncated Pass 1 and have been removed. + +### VRAM Command Stream Format + +The VRAM command stream is read by `VramWriteLoop` (`$CD45`), dispatched through `VramPtrTableRead` (`$CD99`) and `RetAddrUpdate` (`$CDC8`). The stream uses the `RetAddrUpdate` return-address modification trick: `jsr $CE98` (`DispatchVramOp`) pushes a return address, `RetAddrUpdate` advances it by 2 to skip the command byte, and execution resumes inline after the dispatch returns. + +Command byte format (read by `DispatchVramOp` at `$CE98`): +- **Low 4 bits**: data length (number of bytes following) +- **High 4 bits**: command type + +Opcodes: +- `$4C` (`HandleJmpOpcode`): jump — reads 2-byte address from stream, rewrites dispatch pointer +- `$60` (`HandlePpuCtrlOpcode`): deferred PPUCTRL write — pops return address from stack as new stream pointer +- Bit 7 clear, not `$4C`/`$60` (`VramWriteLoop`): VRAM write — opcode byte = PPU addr high, next byte = PPU addr low, then data bytes. Bit 6 of each data byte selects short (1 byte) vs long (multiple bytes) command. +- Bit 7 set: end of stream + +### OAM Table Structure + +OAM tables consist of 8 entries of 4 bytes each (Y, tile, attr, X), matching the NES OAM layout: +- `SpriteTemplateTable` (`$D6A5`): Y=$79 for all entries, player sprite tiles +- `ButtonOamTemplateTable` (`$D6C5`): Y=$79 for all entries, button indicator tiles +- `OamTableGroups1` (`$D4E3`): 7 groups with varying Y values ($37, $67, $57, $97, $87, $C7, $B7, $5F, $6F) +- `OamTableGroups2` (`$D5C4`): 2 groups with Y values $37 and $67 +- `OamTableGroups3` (`$D644`): 3 groups with Y values $27, $37, $57, $67 + +Notable data structures (addresses from the code that reads them): + +- VRAM pointer at `$00/$01`, read indirectly by `VramPtrTableRead` ($CD99), `WriteVramStreamByte` ($CD74) and `DispatchVramOp` ($CE98) +- VRAM burst command table at `$0302`, read by `VramBurstWrite` ($CE4F) and written by `StoreVramOpResult` ($CEB2); `SetBurstWriteIndex` primes it with `$22` +- VRAM op length limit at `$0300`, tested by `VramOpLengthCheck` ($CEF3) +- Sprite template tables at `$D6A5` (`CopySpriteTemplateTable`) and `$D6C5` (`PrepareButtonOam`), copied into the OAM shadow at `$02E0` +- Further OAM tables at `$D4E3` (`CopyOamFromTable`) and `$D5C4` (`CopyOamFromTable70`) --- @@ -173,10 +237,19 @@ make # → ca65 + ld65 + cmp reconstructed.nes rom.nes → "Byte-identica - `RetAddrUpdate` ($CDC8) implements a return-address modification trick: it reads the return address from the stack, advances it by 2, and stores it back. This is used with `VramPtrWrite` ($CD3F) to implement runtime-computed control flow (effectively a coroutine/threaded dispatch). - The IRQ vector points to $C000 (Reset) and is effectively unused. - Large portions of the PRG are test pattern and button mapping data, not executable code. +- `PollExpansionPortLoop` reads `$4017` and compares bits 0-1, but nothing consumes + the result — the branch is always taken the same way. The read is present but inert. +- `MarkerVar01`–`MarkerVar12` (zero page `$5A`, `$5B`, `$56`–$5F`, `$60`, `$61`, `$63`, + `$64`) drive the twelve `MarkerUpdateN` indicator groups. Which player and button each + belongs to is **not** established, so they are named by position rather than by button. +- A draft Pass 2 `locals.inc` called `$55` a "P1 Down timer". The instructions do not + support that: `ApplyMarkerValueEnableAudio` stores `$70`/`$88`/`$A0` there and + `DispatchOnMarkerValue` compares it against `$70` and `$88`. It is `MarkerValue`. --- ## 11. Next Steps -- **Promotion complete** — moved to top-level `Joypad Test Cartridge (U)/` folder with full ROM build (`header.s`, `chr.s`, `linker.cfg`, `Makefile`). -- **Optional deeper Pass 3 work** — extract button mapping and test pattern tables from untraced regions into labeled `.byte` blocks; refine remaining zero-page aliases. +- **Pass 3 is complete.** All 20 data sub-blocks are named (section 8), the VRAM command stream opcode set is decoded, and the OAM table structure is documented. +- Establish which player/button each `MarkerVar` belongs to. This needs the OAM layout for the indicator sprites and the button bit order confirmed against the shift-register read path, not just assumed from the NES convention. +- `HandleButtonPress1`–`HandleButtonPress8` write OAM tiles in the order `$0202, $0206, $020E, $020A, $0212, $0216, $021A, $021E` — sprites 1, 2, 4, 3, 5, 6, 7, 8. The out-of-order third and fourth entries are unexplained; resolving them would confirm which bit maps to which button. diff --git a/Joypad Test Cartridge (U)/copilot/locals.inc b/Joypad Test Cartridge (U)/copilot/locals.inc index 4b19347..060f272 100644 --- a/Joypad Test Cartridge (U)/copilot/locals.inc +++ b/Joypad Test Cartridge (U)/copilot/locals.inc @@ -1,46 +1,149 @@ -; Joypad Test Cartridge (U) zero-page aliases - Pass 2 -; Semantic names for addresses with observed usage patterns; ZpXX names for -; addresses whose role is not yet uniquely determined. +; Joypad Test Cartridge (U) application-specific RAM aliases - Pass 1 +; Generated from every direct zero-page operand in reachable code: +; ref counts are reads/writes, `where` lists the referencing addresses. +; ZpXX names indicate storage with a role not yet unique enough for a behavioral name; +; Pass 2 replaces them with names derived from observed usage. -VramPtrLo = $00 ; VRAM write pointer low byte (indirect, used by VramWriteLoop/VramWrite) -VramPtrHi = $01 ; VRAM write pointer high byte (indirect) -VramLen = $02 ; VRAM write data length counter -PpuScrollX = $03 ; PPU horizontal scroll value (latched to $2005) -Zp04 = $04 ; Temporary zero-page storage -RetAddrTempLo = $05 ; Return address temp low byte (used by RetAddrUpdate) -RetAddrTempHi = $06 ; Return address temp high byte (used by RetAddrUpdate) -Zp0D = $0D ; Temporary zero-page storage -PpuMaskShadow = $0E ; PPUMASK shadow register (bits cleared for sprite/bg) -PpuScrollY = $0EC ; PPU vertical scroll value (latched to $2005) -PpuScrollX_Init = $0ED ; PPU horizontal scroll value written during init -PpuMaskValue = $0EE ; PPUMASK value written during init (also shadow) -PpuCtrlShadow = $EF ; PPUCTRL shadow register (NMI bit cleared via and #$7F) -VramToggleFlag = $CF ; Flag toggled each frame (asl/rol at $C095-$C09D) -NmiFlagByte = $E0 ; Flag cleared during NMI ($CD0F) +Zp00 = $00 ; 22 refs; reads=13 writes=9; used at $C013, C05D, C252, CB16, +18 more +Zp01 = $01 ; 9 refs; reads=4 writes=5; used at $CD95, CD97, CDA8, CDB8, +5 more +Zp02 = $02 ; 7 refs; reads=4 writes=3; used at $CDF2, CE10, CE1F, CE9A, +3 more +Zp03 = $03 ; 4 refs; reads=2 writes=2; used at $CE98, CEB2, CEE5, CEE7 +Zp04 = $04 ; 2 refs; reads=1 writes=1; used at $CEA5, CEC2 +Zp05 = $05 ; 7 refs; reads=4 writes=3; used at $CDCC, CDD5, CDDA, CDE1, +2 more +Zp06 = $06 ; 5 refs; reads=2 writes=3; used at $CDD1, CDE8, CEC4, CED2 +Zp40 = $40 ; 57 refs; reads=32 writes=25; used at $C0E7, C0E9, C0EB, C0EF, +30 more +Zp41 = $41 ; 3 refs; reads=3 writes=0; used at $C1BB, C304, CBB7 +Zp42 = $42 ; 2 refs; reads=0 writes=2; used at $CCCE, CCDC +Zp43 = $43 ; 2 refs; reads=2 writes=0; used at $C1BF, C308 +Zp44 = $44 ; 3 refs; reads=3 writes=0; used at $C1C3, C30C, CCCC +Zp45 = $45 ; 2 refs; reads=1 writes=1; used at $CC75 +Zp46 = $46 ; 1 refs; reads=1 writes=0; used at $CCDA +Zp47 = $47 ; 2 refs; reads=1 writes=1; used at $CC72 +Zp49 = $49 ; 3 refs; reads=2 writes=1; used at $CC88, CC94 +Zp4A = $4A ; 1 refs; reads=1 writes=0; used at $CCA0 +Zp4B = $4B ; 3 refs; reads=2 writes=1; used at $CC85, CCAC +Zp4C = $4C ; 1 refs; reads=1 writes=0; used at $CCB8 +Zp4D = $4D ; 10 refs; reads=5 writes=5; used at $CC92, CC9C, CC9E, CCA8, +6 more +Zp4E = $4E ; 40 refs; reads=19 writes=21; used at $C212, C2BC, C331, C3A3, +27 more +Zp4F = $4F ; 4 refs; reads=2 writes=2; used at $C2BE, C335, CB74, CBD9 +Zp51 = $51 ; 3 refs; reads=1 writes=2; used at $C2C0, C339, CB76 +Zp52 = $52 ; 3 refs; reads=1 writes=2; used at $C2C2, C33D, CB78 +Zp53 = $53 ; 13 refs; reads=6 writes=7; used at $C0DB, C0FD, C107, C2C6, +6 more +Zp54 = $54 ; 13 refs; reads=6 writes=7; used at $C0DD, C0F9, C101, C2C4, +6 more +Zp55 = $55 ; 8 refs; reads=6 writes=2; used at $C0D7, C113, C119, C11F, +4 more +Zp56 = $56 ; 21 refs; reads=12 writes=9; used at $C2CC, C371, C37D, C60A, +15 more +Zp57 = $57 ; 16 refs; reads=10 writes=6; used at $C2D2, C763, C769, C76E, +12 more +Zp59 = $59 ; 14 refs; reads=10 writes=4; used at $C8BD, C8C3, C8C8, C8CF, +10 more +Zp5A = $5A ; 14 refs; reads=10 writes=4; used at $CA16, CA1C, CA21, CA28, +10 more +Zp5B = $5B ; 21 refs; reads=12 writes=9; used at $C2CA, C3B6, C3C4, C597, +15 more +Zp5C = $5C ; 16 refs; reads=10 writes=6; used at $C2D0, C6F0, C6F6, C6FB, +12 more +Zp5E = $5E ; 14 refs; reads=10 writes=4; used at $C84A, C850, C855, C85C, +10 more +Zp5F = $5F ; 14 refs; reads=10 writes=4; used at $C9A3, C9A9, C9AE, C9B5, +10 more +Zp60 = $60 ; 21 refs; reads=12 writes=9; used at $C2C8, C429, C439, C524, +15 more +Zp61 = $61 ; 16 refs; reads=10 writes=6; used at $C2CE, C67D, C683, C688, +12 more +Zp63 = $63 ; 14 refs; reads=10 writes=4; used at $C7D7, C7DD, C7E2, C7E9, +10 more +Zp64 = $64 ; 14 refs; reads=10 writes=4; used at $C930, C936, C93B, C942, +10 more +Zp65 = $65 ; 40 refs; reads=18 writes=22; used at $C2D4, C36D, C379, C380, +18 more +Zp66 = $66 ; 3 refs; reads=0 writes=3; used at $C2D6, CAAA, CB8C +Zp68 = $68 ; 3 refs; reads=0 writes=3; used at $C2D8, CAAC, CB8E +Zp69 = $69 ; 3 refs; reads=0 writes=3; used at $C2DA, CAAE, CB90 +Zp6A = $6A ; 9 refs; reads=4 writes=5; used at $C2B8, C2EA, C2EE, CA8C, +3 more +ZpC1 = $C1 ; 2 refs; reads=1 writes=1; used at $C2A3 +ZpCF = $CF ; 6 refs; reads=3 writes=3; used at $C095, C287, CB4B +ZpD0 = $D0 ; 2 refs; reads=1 writes=1; used at $CB53 +ZpD1 = $D1 ; 1 refs; reads=1 writes=0; used at $C28F +ZpE0 = $E0 ; 3 refs; reads=1 writes=2; used at $CCEF, CCF2, CD0F +ZpEC = $EC ; 2 refs; reads=1 writes=1; used at $C04D, CE44 +ZpED = $ED ; 2 refs; reads=1 writes=1; used at $C04B, CE3F +ZpEE = $EE ; 7 refs; reads=2 writes=5; used at $C03D, C084, C279, CB3D, +3 more +ZpEF = $EF ; 15 refs; reads=6 writes=9; used at $C036, C07D, C272, CB36, +11 more -; Controller / button state (indexed by button number via $4E,X) -JoyBtnStateBase = $4E ; Base address for indexed button states ($4E,X) -JoyBtnState_P1_A = $4E ; Player 1 button A state/timer -JoyBtnState_P1_B = $4F ; Player 1 button B state/timer -JoyBtnState_P1_Select = $50 ; Player 1 select state/timer (if used) -JoyBtnState_P1_Start = $51 ; Player 1 start state/timer -JoyBtnState_P1_Up = $52 ; Player 1 up state/timer -FrameCounterLo = $53 ; Frame counter low byte (incremented each frame) -FrameCounterHi = $54 ; Frame counter high byte -JoyBtnTimer_P1_Down = $55 ; Player 1 down button timer -JoyBtnTimer_P1_Left = $56 ; Player 1 left button timer -JoyBtnTimer_P1_Right = $57 ; Player 1 right button timer -JoyBtnTimer_P1_Start2 = $5C ; Player 1 start timer (second instance) -JoyBtnTimer_P1_A2 = $61 ; Player 1 button A timer (second instance) -JoyBtnTimer_P2_Down = $5E ; Player 2 down button timer -JoyBtnTimer_P2_Left = $59 ; Player 2 left button timer -JoyBtnTimer_P2_Right = $64 ; Player 2 right button timer -JoyBtnTimer_P2_A = $5F ; Player 2 button A timer -JoyBtnTimer_P2_B = $5A ; Player 2 button B timer +; --------------------------------------------------------------------------- +; Pass 2 semantic aliases +; +; Aliases sit beside the generated ZpXX names rather than replacing them, since +; several addresses are reused for more than one role. Each name below is +; justified by the referencing routines named in its comment. +; --------------------------------------------------------------------------- -; Generic zero-page aliases (role not yet uniquely determined) -Zp60 = $60 ; Temporary zero-page storage -Zp65 = $65 ; Temporary zero-page storage -Zp66 = $66 ; Temporary zero-page storage -Zp68 = $68 ; Temporary zero-page storage -Zp69 = $69 ; Temporary zero-page storage +; VRAM writer state. $00/$01 form the indirect pointer used by +; `lda (Zp00),y` in WriteVramStreamByte, VramPtrTableRead and DispatchVramOp. +VramPtrLo = $00 +VramPtrHi = $01 +VramOpLength = $02 ; byte count for the current VRAM op +VramOpResult = $03 ; DispatchVramOp / StoreVramOpResult +VramOpTemp = $04 +RetAddrTempLo = $05 ; RetAddrUpdate pulls the caller's PC off the stack +RetAddrTempHi = $06 + +; Player 1 controller bits. Read by ReadControllerBitsLoop as +; `lda $4016,x / lsr a / rol Zp40,x` for x = 0..7, so $40 holds all eight +; buttons and is subsequently rotated one bit at a time by +; PollControllerShiftRegister and DispatchButtonBits. +P1Buttons = $40 ; bit0 A, 1 B, 2 Select, 3 Start, 4 Up, 5 Down, 6 Left, 7 Right +P1ButtonA = $40 ; aliases for the individual bit tests +P1ButtonB = $41 +P1ButtonSelect = $42 +P1ButtonStart = $43 +P1ButtonUp = $44 +P1ButtonDown = $45 +P1ButtonLeft = $46 +P1ButtonRight = $47 + +; Previous-direction latch written by LatchPreviousStickState (`sta Zp42,x`), +; read by CheckStickUp/Down/Left/Right against $10/$20/$C0 thresholds. +PrevStickState = $42 +StickDiagonalState = $46 + +; Second and third shift registers from the alternate read paths +; (`rol Zp47,x` at ReadControllerBitsAltLoop, `rol Zp4B,x` at +; ReadControllerBitsAlt2Loop). +P1ButtonsAlt = $47 +P2Buttons = $4B +ButtonShiftAlt = $65 ; second shift register in DispatchButtonBits + +; Direction accumulators compared in CheckStickUp..Right +StickAccumUp = $4A +StickAccumDown = $4B +StickAccumLeft = $4C +StickAccumRight = $4D + +; 16-bit frame counter: IncrementFrameCounter does +; `inc Zp54 / bne / inc Zp53`, so $53 is the high byte and $54 the low byte. +FrameCounterHi = $53 ; incremented on carry out of the low byte +FrameCounterLo = $54 ; incremented every frame + +; Holds one of $70 / $88 / $A0. DispatchOnMarkerValue compares it against $70 +; and $88 to choose a test mode; ApplyMarkerValueEnableAudio stores it to +; $0200 and to the shadow at $EE. NOTE: an earlier Pass 2 draft called this a +; "P1 Down timer", which the instructions do not support. +MarkerValue = $55 + +; Per-button-state marker variables. Each drives one group of +; MarkerUpdateN routines, which OR $F0 or $D0 into the variable and write the +; result to an OAM Y-coordinate slot. Which player and button each belongs to +; is NOT yet established, so they are named by position, not by button. +MarkerVar01 = $60 ; MarkerUpdate1 +MarkerVar02 = $5B ; MarkerUpdate2 +MarkerVar03 = $56 ; MarkerUpdate3 +MarkerVar04 = $61 ; MarkerUpdate4 +MarkerVar05 = $5C ; MarkerUpdate5 +MarkerVar06 = $57 ; MarkerUpdate6 +MarkerVar07 = $63 ; MarkerUpdate7 +MarkerVar08 = $5E ; MarkerUpdate8 +MarkerVar09 = $59 ; MarkerUpdate9 +MarkerVar10 = $64 ; MarkerUpdate10 +MarkerVar11 = $5F ; MarkerUpdate11 +MarkerVar12 = $5A ; MarkerUpdate12 + +ButtonHoldCounter = $6A ; PollControllerCountFrames: inc / cmp #$0F +VramBurstIndex = $0302 ; SetBurstWriteIndex stores #$22 here + +; PPU register shadows. $EF is read by WaitForVblank and masked with #$7F +; before reaching $2000; $EE is masked with #$E7 by PpuMaskSetup. +PpuScrollXInit = $ED ; latched to $2005 by PpuScrollLatch +PpuMaskShadow = $EE ; PPUMASK shadow +PpuCtrlShadow = $EF ; PPUCTRL shadow + +; Set at $E0 and polled by `bit ZpE0 / bmi` in WaitForNmiComplete; NMI clears it. +NmiInProgressFlag = $E0 diff --git a/Joypad Test Cartridge (U)/copilot/prg.s b/Joypad Test Cartridge (U)/copilot/prg.s index b826cac..efab373 100644 --- a/Joypad Test Cartridge (U)/copilot/prg.s +++ b/Joypad Test Cartridge (U)/copilot/prg.s @@ -1,9 +1,15 @@ ; Joypad Test Cartridge (U) NES disassembly - Pass 1 -; Byte-oriented ca65 source generated from the supplied 16 KiB PRG image. +; Byte-oriented ca65 source generated from the supplied 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. - +; Unreached bytes remain explicit .byte blocks; no ROM byte is deleted or reformatted. +; Pass 2 replaces address-derived labels, RAM aliases, and table names while +; preserving byte identity. +; +; Vectors: NMI=$CCF7 RESET=$C000 IRQ=$C000 +; PRG mapped at $C000-$FFFF (NROM, mirrored to the upper half) +; +; Pass 1 trace provenance (the audit trail behind every classification below): +; .setcpu "6502" .include "symbols.inc" @@ -13,1627 +19,4498 @@ ; ----------------------------------------------------------------------------- ; 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. +; Global: Power-on entry. Waits for three PPU warm-up vblanks, clears zero page and $0100-$05FF to their power-on patterns, sets up PPU masks, then falls into MainGameLoop. +; Local: Never returns; the last action is a jump into the frame loop. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y, P; $00-$05FF cleared to $00/$F4; PPUCTRL/PPUMASK shadows loaded. ; ----------------------------------------------------------------------------- Reset: - lda $2002 ; CPU:$C000 PRG:0000 AD 02 20 - bpl Reset ; CPU:$C003 PRG:0003 10 FB + lda $2002 ; CPU:$C000 PRG:0000 AD 02 20 + bpl Reset ; CPU:$C003 PRG:0003 10 FB ; ----------------------------------------------------------------------------- ; Routine: WaitVblank2 -; Global: Wait for second PPU warm-up vblank. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Global: Blocks until the PPU status register reports vblank. Second of three warm-up waits; the first is folded into Reset itself. +; Local: Falls through to the next warm-up wait once bit 7 of $2002 is set. +; Parameters: None. +; Returns: A holds the last $2002 read; N and V flags reflect it. +; Clobbers: A. ; ----------------------------------------------------------------------------- WaitVblank2: - lda $2002 ; CPU:$C005 PRG:0005 AD 02 20 - bpl WaitVblank2 ; CPU:$C008 PRG:0008 10 FB + lda $2002 ; CPU:$C005 PRG:0005 AD 02 20 + bpl WaitVblank2 ; CPU:$C008 PRG:0008 10 FB ; ----------------------------------------------------------------------------- ; Routine: WaitVblank3 -; Global: Wait for third PPU warm-up vblank. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Global: Third and final PPU warm-up vblank wait. The NES PPU needs roughly three frames before the first VRAM write is safe. +; Local: Falls through to the RAM-clearing loops. +; Parameters: None. +; Returns: A holds the last $2002 read. +; Clobbers: A. ; ----------------------------------------------------------------------------- WaitVblank3: - lda $2002 ; CPU:$C00A PRG:000A AD 02 20 - bpl WaitVblank3 ; CPU:$C00D PRG:000D 10 FB - lda #$00 ; CPU:$C00F PRG:000F A9 00 - ldx #$00 ; CPU:$C011 PRG:0011 A2 00 + lda $2002 ; CPU:$C00A PRG:000A AD 02 20 + bpl WaitVblank3 ; CPU:$C00D PRG:000D 10 FB + lda #$00 ; CPU:$C00F PRG:000F A9 00 + ldx #$00 ; CPU:$C011 PRG:0011 A2 00 ; ----------------------------------------------------------------------------- -; Routine: ClearRAM1_Loop -; Global: Clear RAM loop 1 via indirect indexed store. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Routine: ClearRamPass1Loop +; Global: Clears zero page and $0100-$05FF using X as the index: $00/$01 and $0300+ take $00, $0200+ takes $F4, which parks OAM sprites off screen. +; Local: Runs until X wraps at $100, then returns to its caller. +; Parameters: X = page offset; A = value to store. +; Returns: X = $00 on exit (wrapped). +; Clobbers: A, X; $0000-$05FF. ; ----------------------------------------------------------------------------- -ClearRAM1_Loop: - sta VramPtrLo,X ; CPU:$C013 PRG:0013 95 00 - sta $0100,X ; CPU:$C015 PRG:0015 9D 00 01 - lda #$F4 ; CPU:$C018 PRG:0018 A9 F4 - sta $0200,X ; CPU:$C01A PRG:001A 9D 00 02 - lda #$00 ; CPU:$C01D PRG:001D A9 00 - sta $0300,X ; CPU:$C01F PRG:001F 9D 00 03 - sta $0400,X ; CPU:$C022 PRG:0022 9D 00 04 - sta $0500,X ; CPU:$C025 PRG:0025 9D 00 05 - sta $0600,X ; CPU:$C028 PRG:0028 9D 00 06 - sta $0700,X ; CPU:$C02B PRG:002B 9D 00 07 - inx ; CPU:$C02E PRG:002E E8 - bne ClearRAM1_Loop ; CPU:$C02F PRG:002F D0 E2 - lda #$10 ; CPU:$C031 PRG:0031 A9 10 - sta $2000 ; CPU:$C033 PRG:0033 8D 00 20 - sta PpuCtrlShadow ; CPU:$C036 PRG:0036 85 EF - lda #$00 ; CPU:$C038 PRG:0038 A9 00 - sta $2001 ; CPU:$C03A PRG:003A 8D 01 20 - sta PpuMaskValue ; CPU:$C03D PRG:003D 85 EE - lda #$02 ; CPU:$C03F PRG:003F A9 02 - sta $4014 ; CPU:$C041 PRG:0041 8D 14 40 - lda #$00 ; CPU:$C044 PRG:0044 A9 00 - sta $2003 ; CPU:$C046 PRG:0046 8D 03 20 - lda #$00 ; CPU:$C049 PRG:0049 A9 00 - sta PpuScrollX_Init ; CPU:$C04B PRG:004B 85 ED - sta PpuScrollY ; CPU:$C04D PRG:004D 85 EC - jsr $CE3C ; CPU:$C04F PRG:004F 20 3C CE - ldx #$FF ; CPU:$C052 PRG:0052 A2 FF - txs ; CPU:$C054 PRG:0054 9A - jsr $CD2F ; CPU:$C055 PRG:0055 20 2F CD - nop ; CPU:$C058 PRG:0058 EA - lda #$00 ; CPU:$C059 PRG:0059 A9 00 - ldx #$00 ; CPU:$C05B PRG:005B A2 00 +ClearRamPass1Loop: + sta Zp00,x ; CPU:$C013 PRG:0013 95 00 + sta $0100,x ; CPU:$C015 PRG:0015 9D 00 01 + lda #$F4 ; CPU:$C018 PRG:0018 A9 F4 + sta $0200,x ; CPU:$C01A PRG:001A 9D 00 02 + lda #$00 ; CPU:$C01D PRG:001D A9 00 + sta $0300,x ; CPU:$C01F PRG:001F 9D 00 03 + sta $0400,x ; CPU:$C022 PRG:0022 9D 00 04 + sta $0500,x ; CPU:$C025 PRG:0025 9D 00 05 + sta $0600,x ; CPU:$C028 PRG:0028 9D 00 06 + sta $0700,x ; CPU:$C02B PRG:002B 9D 00 07 + inx ; CPU:$C02E PRG:002E E8 + bne ClearRamPass1Loop ; CPU:$C02F PRG:002F D0 E2 + lda #$10 ; CPU:$C031 PRG:0031 A9 10 + sta $2000 ; CPU:$C033 PRG:0033 8D 00 20 + sta ZpEF ; CPU:$C036 PRG:0036 85 EF + lda #$00 ; CPU:$C038 PRG:0038 A9 00 + sta $2001 ; CPU:$C03A PRG:003A 8D 01 20 + sta ZpEE ; CPU:$C03D PRG:003D 85 EE + lda #$02 ; CPU:$C03F PRG:003F A9 02 + sta $4014 ; CPU:$C041 PRG:0041 8D 14 40 + lda #$00 ; CPU:$C044 PRG:0044 A9 00 + sta $2003 ; CPU:$C046 PRG:0046 8D 03 20 + lda #$00 ; CPU:$C049 PRG:0049 A9 00 + sta ZpED ; CPU:$C04B PRG:004B 85 ED + sta ZpEC ; CPU:$C04D PRG:004D 85 EC + jsr $CE3C ; CPU:$C04F PRG:004F 20 3C CE + ldx #$FF ; CPU:$C052 PRG:0052 A2 FF + txs ; CPU:$C054 PRG:0054 9A ; ----------------------------------------------------------------------------- -; Routine: ClearRAM2_Loop -; Global: Clear RAM loop 2 via indirect indexed store. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Routine: InitTestScreen +; Global: Prepares the default test screen: enables the PPU mask, clears RAM a second time for the screen-specific pattern, then enters the frame loop. +; Local: Falls into MainGameLoop. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y; PPU mask shadow. ; ----------------------------------------------------------------------------- -ClearRAM2_Loop: - sta VramPtrLo,X ; CPU:$C05D PRG:005D 95 00 - sta $0100,X ; CPU:$C05F PRG:005F 9D 00 01 - lda #$F4 ; CPU:$C062 PRG:0062 A9 F4 - sta $0200,X ; CPU:$C064 PRG:0064 9D 00 02 - lda #$00 ; CPU:$C067 PRG:0067 A9 00 - sta $0300,X ; CPU:$C069 PRG:0069 9D 00 03 - sta $0400,X ; CPU:$C06C PRG:006C 9D 00 04 - sta $0500,X ; CPU:$C06F PRG:006F 9D 00 05 - sta $0600,X ; CPU:$C072 PRG:0072 9D 00 06 - inx ; CPU:$C075 PRG:0075 E8 - bne ClearRAM2_Loop ; CPU:$C076 PRG:0076 D0 E5 - lda #$10 ; CPU:$C078 PRG:0078 A9 10 - sta $2000 ; CPU:$C07A PRG:007A 8D 00 20 - sta PpuCtrlShadow ; CPU:$C07D PRG:007D 85 EF - lda #$00 ; CPU:$C07F PRG:007F A9 00 - sta $2001 ; CPU:$C081 PRG:0081 8D 01 20 - sta PpuMaskValue ; CPU:$C084 PRG:0084 85 EE - lda #$20 ; CPU:$C086 PRG:0086 A9 20 - ldx #$24 ; CPU:$C088 PRG:0088 A2 24 - ldy #$00 ; CPU:$C08A PRG:008A A0 00 - jsr $CDEE ; CPU:$C08C PRG:008C 20 EE CD - jsr $C174 ; CPU:$C08F PRG:008F 20 74 C1 - jsr $CD3F ; CPU:$C092 PRG:0092 20 3F CD - asl VramToggleFlag ; CPU:$C095 PRG:0095 06 CF - jsr $CE3C ; CPU:$C097 PRG:0097 20 3C CE - jsr $CD3F ; CPU:$C09A PRG:009A 20 3F CD - rol ; CPU:$C09D PRG:009D 2A -; ---- data $C09E-$C173 (214 bytes) ---- - .byte $CF, $20, $3C, $CE, $A9, $70, $8D, $00, $02, $A9, $35, $8D, $01, $02, $A9, $00 ; CPU:$C09E PRG:009E CF 20 3C CE A9 70 8D 00 02 A9 35 8D 01 02 A9 00 - .byte $8D, $02, $02, $A9, $18, $8D, $03, $02, $A9, $9F, $8D, $00, $40, $A9, $00, $8D ; CPU:$C0AE PRG:00AE 8D 02 02 A9 18 8D 03 02 A9 9F 8D 00 40 A9 00 8D - .byte $01, $40, $A9, $FD, $8D, $02, $40, $A9, $29, $8D, $03, $40, $A9, $00, $8D, $15 ; CPU:$C0BE PRG:00BE 01 40 A9 FD 8D 02 40 A9 29 8D 03 40 A9 00 8D 15 - .byte $40, $20, $39, $CD, $20, $7F, $C1, $A9, $70, $85, $55, $A9, $00, $85, $53, $85 ; CPU:$C0CE PRG:00CE 40 20 39 CD 20 7F C1 A9 70 85 55 A9 00 85 53 85 - .byte $54, $20, $E2, $CC, $20, $4F, $CC, $A2, $01, $36, $40, $36, $40, $36, $40, $B0 ; CPU:$C0DE PRG:00DE 54 20 E2 CC 20 4F CC A2 01 36 40 36 40 36 40 B0 - .byte $46, $36, $40, $B0, $1E, $CA, $30, $03, $4C, $E7, $C0, $E6, $54, $D0, $02, $E6 ; CPU:$C0EE PRG:00EE 46 36 40 B0 1E CA 30 03 4C E7 C0 E6 54 D0 02 E6 - .byte $53, $A9, $00, $C5, $54, $D0, $06, $A9, $38, $C5, $53, $F0, $03, $4C, $DF, $C0 ; CPU:$C0FE PRG:00FE 53 A9 00 C5 54 D0 06 A9 38 C5 53 F0 03 4C DF C0 - .byte $4C, $55, $C0, $A9, $70, $C5, $55, $F0, $12, $A9, $88, $C5, $55, $F0, $12, $A9 ; CPU:$C10E PRG:010E 4C 55 C0 A9 70 C5 55 F0 12 A9 88 C5 55 F0 12 A9 - .byte $A0, $C5, $55, $F0, $03, $4C, $DF, $C0, $4C, $55, $C0, $20, $7F, $C1, $4C, $03 ; CPU:$C11E PRG:011E A0 C5 55 F0 03 4C DF C0 4C 55 C0 20 7F C1 4C 03 - .byte $CB, $20, $7F, $C1, $4C, $3F, $C2, $20, $B1, $CA, $A9, $70, $C5, $55, $F0, $0F ; CPU:$C12E PRG:012E CB 20 7F C1 4C 3F C2 20 B1 CA A9 70 C5 55 F0 0F - .byte $A9, $88, $C5, $55, $F0, $0E, $A9, $A0, $C5, $55, $F0, $0D, $4C, $DF, $C0, $A9 ; CPU:$C13E PRG:013E A9 88 C5 55 F0 0E A9 A0 C5 55 F0 0D 4C DF C0 A9 - .byte $88, $4C, $5C, $C1, $A9, $A0, $4C, $5C, $C1, $A9, $70, $4C, $5C, $C1, $8D, $00 ; CPU:$C14E PRG:014E 88 4C 5C C1 A9 A0 4C 5C C1 A9 70 4C 5C C1 8D 00 - .byte $02, $85, $55, $A9, $01, $0D, $15, $40, $8D, $15, $40, $A9, $29, $8D, $03, $40 ; CPU:$C15E PRG:015E 02 85 55 A9 01 0D 15 40 8D 15 40 A9 29 8D 03 40 - .byte $20, $7F, $C1, $4C, $DF, $C0 ; CPU:$C16E PRG:016E 20 7F C1 4C DF C0 +InitTestScreen: + jsr $CD2F ; CPU:$C055 PRG:0055 20 2F CD + nop ; CPU:$C058 PRG:0058 EA + lda #$00 ; CPU:$C059 PRG:0059 A9 00 + ldx #$00 ; CPU:$C05B PRG:005B A2 00 ; ----------------------------------------------------------------------------- -; Routine: ClearOAM_Routine -; Global: Clear OAM ($0200-$02FF) with sprite flush value $F4. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Routine: ClearRamPass2Loop +; Global: Second RAM-clearing pass with the screen's own fill patterns. +; Local: Returns to its caller when X wraps. +; Parameters: X = page offset; A = fill value. +; Returns: X wrapped to $00. +; Clobbers: A, X; $0000-$05FF. ; ----------------------------------------------------------------------------- -ClearOAM_Routine: - lda #$F4 ; CPU:$C174 PRG:0174 A9 F4 - ldx #$00 ; CPU:$C176 PRG:0176 A2 00 +ClearRamPass2Loop: + sta Zp00,x ; CPU:$C05D PRG:005D 95 00 + sta $0100,x ; CPU:$C05F PRG:005F 9D 00 01 + lda #$F4 ; CPU:$C062 PRG:0062 A9 F4 + sta $0200,x ; CPU:$C064 PRG:0064 9D 00 02 + lda #$00 ; CPU:$C067 PRG:0067 A9 00 + sta $0300,x ; CPU:$C069 PRG:0069 9D 00 03 + sta $0400,x ; CPU:$C06C PRG:006C 9D 00 04 + sta $0500,x ; CPU:$C06F PRG:006F 9D 00 05 + sta $0600,x ; CPU:$C072 PRG:0072 9D 00 06 + inx ; CPU:$C075 PRG:0075 E8 + bne ClearRamPass2Loop ; CPU:$C076 PRG:0076 D0 E5 + lda #$10 ; CPU:$C078 PRG:0078 A9 10 + sta $2000 ; CPU:$C07A PRG:007A 8D 00 20 + sta ZpEF ; CPU:$C07D PRG:007D 85 EF + lda #$00 ; CPU:$C07F PRG:007F A9 00 + sta $2001 ; CPU:$C081 PRG:0081 8D 01 20 + sta ZpEE ; CPU:$C084 PRG:0084 85 EE + lda #$20 ; CPU:$C086 PRG:0086 A9 20 + ldx #$24 ; CPU:$C088 PRG:0088 A2 24 + ldy #$00 ; CPU:$C08A PRG:008A A0 00 + jsr $CDEE ; CPU:$C08C PRG:008C 20 EE CD + jsr $C174 ; CPU:$C08F PRG:008F 20 74 C1 + jsr $CD3F ; CPU:$C092 PRG:0092 20 3F CD + asl ZpCF ; CPU:$C095 PRG:0095 06 CF + jsr $CE3C ; CPU:$C097 PRG:0097 20 3C CE + jsr $CD3F ; CPU:$C09A PRG:009A 20 3F CD + rol a ; CPU:$C09D PRG:009D 2A + .byte $CF, $20, $3C ; CPU:$C09E PRG:009E CF 20 3C -- dcp $3C20 (undocumented; ca65 cannot encode) + dec $70A9 ; CPU:$C0A1 PRG:00A1 CE A9 70 + sta $0200 ; CPU:$C0A4 PRG:00A4 8D 00 02 + lda #$35 ; CPU:$C0A7 PRG:00A7 A9 35 + sta $0201 ; CPU:$C0A9 PRG:00A9 8D 01 02 + lda #$00 ; CPU:$C0AC PRG:00AC A9 00 + sta $0202 ; CPU:$C0AE PRG:00AE 8D 02 02 + lda #$18 ; CPU:$C0B1 PRG:00B1 A9 18 + sta $0203 ; CPU:$C0B3 PRG:00B3 8D 03 02 + lda #$9F ; CPU:$C0B6 PRG:00B6 A9 9F + sta $4000 ; CPU:$C0B8 PRG:00B8 8D 00 40 + lda #$00 ; CPU:$C0BB PRG:00BB A9 00 + sta $4001 ; CPU:$C0BD PRG:00BD 8D 01 40 + lda #$FD ; CPU:$C0C0 PRG:00C0 A9 FD + sta $4002 ; CPU:$C0C2 PRG:00C2 8D 02 40 + lda #$29 ; CPU:$C0C5 PRG:00C5 A9 29 + sta $4003 ; CPU:$C0C7 PRG:00C7 8D 03 40 + lda #$00 ; CPU:$C0CA PRG:00CA A9 00 + sta $4015 ; CPU:$C0CC PRG:00CC 8D 15 40 + jsr $CD39 ; CPU:$C0CF PRG:00CF 20 39 CD + jsr $C17F ; CPU:$C0D2 PRG:00D2 20 7F C1 + lda #$70 ; CPU:$C0D5 PRG:00D5 A9 70 + sta Zp55 ; CPU:$C0D7 PRG:00D7 85 55 + lda #$00 ; CPU:$C0D9 PRG:00D9 A9 00 + sta Zp53 ; CPU:$C0DB PRG:00DB 85 53 + sta Zp54 ; CPU:$C0DD PRG:00DD 85 54 ; ----------------------------------------------------------------------------- -; Routine: Label_C178 -; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Routine: MainGameLoop +; Global: One iteration of the frame: waits for vblank, samples the controller, advances the 16-bit frame counter, and dispatches on the marker value. +; Local: Loops forever; each pass handles one frame. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y; frame counter; marker state. ; ----------------------------------------------------------------------------- -Label_C178: - sta $0200,X ; CPU:$C178 PRG:0178 9D 00 02 - inx ; CPU:$C17B PRG:017B E8 - bne Label_C178 ; CPU:$C17C PRG:017C D0 FA - rts ; CPU:$C17E PRG:017E 60 -; ---- data $C17F-$CCF6 (2936 bytes) ---- - .byte $8A, $48, $20, $E2, $CC, $20, $4F, $CC, $68, $AA, $A9, $FF, $35, $40, $D0, $F0 ; CPU:$C17F PRG:017F 8A 48 20 E2 CC 20 4F CC 68 AA A9 FF 35 40 D0 F0 - .byte $8A, $48, $20, $E2, $CC, $20, $4F, $CC, $68, $AA, $A9, $FF, $35, $40, $D0, $F0 ; CPU:$C18F PRG:018F 8A 48 20 E2 CC 20 4F CC 68 AA A9 FF 35 40 D0 F0 - .byte $60, $A2, $1F, $BD, $A5, $D6, $9D, $E0, $02, $CA, $10, $F7, $A2, $F0, $20, $E2 ; CPU:$C19F PRG:019F 60 A2 1F BD A5 D6 9D E0 02 CA 10 F7 A2 F0 20 E2 - .byte $CC, $8A, $48, $20, $4F, $CC, $A9, $00, $C5, $40, $D0, $11, $C5, $41, $D0, $0D ; CPU:$C1AF PRG:01AF CC 8A 48 20 4F CC A9 00 C5 40 D0 11 C5 41 D0 0D - .byte $C5, $43, $D0, $09, $C5, $44, $D0, $05, $A9, $C0, $8D, $15, $40, $A0, $00, $A2 ; CPU:$C1BF PRG:01BF C5 43 D0 09 C5 44 D0 05 A9 C0 8D 15 40 A0 00 A2 - .byte $00, $20, $61, $C3, $A0, $20, $E8, $20, $61, $C3, $A0, $40, $E8, $E8, $20, $61 ; CPU:$C1CF PRG:01CF 00 20 61 C3 A0 20 E8 20 61 C3 A0 40 E8 E8 20 61 - .byte $C3, $A0, $60, $E8, $20, $61, $C3, $68, $AA, $CA, $D0, $C2, $4C, $55, $C0, $98 ; CPU:$C1DF PRG:01DF C3 A0 60 E8 20 61 C3 68 AA CA D0 C2 4C 55 C0 98 - .byte $48, $8A, $48, $A2, $1F, $BD, $C5, $D6, $9D, $E0, $02, $CA, $10, $F7, $20, $E2 ; CPU:$C1EF PRG:01EF 48 8A 48 A2 1F BD C5 D6 9D E0 02 CA 10 F7 20 E2 - .byte $CC, $20, $4F, $CC, $68, $AA, $A9, $00, $D5, $40, $F0, $05, $8A, $48, $4C, $FD ; CPU:$C1FF PRG:01FF CC 20 4F CC 68 AA A9 00 D5 40 F0 05 8A 48 4C FD - .byte $C1, $A9, $00, $95, $4E, $8A, $48, $A2, $1F, $A9, $F4, $9D, $E0, $02, $CA, $10 ; CPU:$C20F PRG:020F C1 A9 00 95 4E 8A 48 A2 1F A9 F4 9D E0 02 CA 10 - .byte $FA, $68, $AA, $68, $A8, $A9, $03, $99, $02, $02, $99, $06, $02, $99, $0A, $02 ; CPU:$C21F PRG:021F FA 68 AA 68 A8 A9 03 99 02 02 99 06 02 99 0A 02 - .byte $99, $0E, $02, $99, $12, $02, $99, $16, $02, $99, $1A, $02, $99, $1E, $02, $60 ; CPU:$C22F PRG:022F 99 0E 02 99 12 02 99 16 02 99 1A 02 99 1E 02 60 - .byte $20, $2F, $CD, $A2, $00, $A9, $FF, $9D, $00, $60, $E8, $E0, $06, $D0, $F8, $A9 ; CPU:$C23F PRG:023F 20 2F CD A2 00 A9 FF 9D 00 60 E8 E0 06 D0 F8 A9 - .byte $00, $A2, $00, $95, $00, $9D, $00, $01, $A9, $F4, $9D, $00, $02, $A9, $00, $9D ; CPU:$C24F PRG:024F 00 A2 00 95 00 9D 00 01 A9 F4 9D 00 02 A9 00 9D - .byte $00, $03, $9D, $00, $04, $9D, $00, $05, $9D, $00, $06, $E8, $D0, $E5, $A9, $10 ; CPU:$C25F PRG:025F 00 03 9D 00 04 9D 00 05 9D 00 06 E8 D0 E5 A9 10 - .byte $8D, $00, $20, $85, $EF, $A9, $00, $8D, $01, $20, $85, $EE, $A9, $20, $A2, $24 ; CPU:$C26F PRG:026F 8D 00 20 85 EF A9 00 8D 01 20 85 EE A9 20 A2 24 - .byte $A0, $00, $20, $EE, $CD, $20, $3F, $CD, $06, $CF, $20, $3C, $CE, $20, $3F, $CD ; CPU:$C27F PRG:027F A0 00 20 EE CD 20 3F CD 06 CF 20 3C CE 20 3F CD - .byte $F5, $D1, $20, $3C, $CE, $A9, $51, $8D, $00, $03, $A9, $22, $A2, $28, $20, $98 ; CPU:$C28F PRG:028F F5 D1 20 3C CE A9 51 8D 00 03 A9 22 A2 28 20 98 - .byte $CE, $AF, $D4, $20, $74, $C1, $A2, $DF, $BD, $E3, $D4, $9D, $00, $02, $CA, $D0 ; CPU:$C29F PRG:029F CE AF D4 20 74 C1 A2 DF BD E3 D4 9D 00 02 CA D0 - .byte $F7, $BD, $E3, $D4, $9D, $00, $02, $A9, $FF, $85, $6A, $A9, $00, $85, $4E, $85 ; CPU:$C2AF PRG:02AF F7 BD E3 D4 9D 00 02 A9 FF 85 6A A9 00 85 4E 85 - .byte $4F, $85, $51, $85, $52, $85, $54, $85, $53, $85, $60, $85, $5B, $85, $56, $85 ; CPU:$C2BF PRG:02BF 4F 85 51 85 52 85 54 85 53 85 60 85 5B 85 56 85 - .byte $61, $85, $5C, $85, $57, $85, $65, $85, $66, $85, $68, $85, $69, $A9, $BF, $8D ; CPU:$C2CF PRG:02CF 61 85 5C 85 57 85 65 85 66 85 68 85 69 A9 BF 8D - .byte $00, $40, $20, $39, $CD, $20, $E2, $CC, $20, $4F, $CC, $E6, $6A, $A9, $0F, $C5 ; CPU:$C2DF PRG:02DF 00 40 20 39 CD 20 E2 CC 20 4F CC E6 6A A9 0F C5 - .byte $6A, $F0, $03, $4C, $FE, $C2, $20, $24, $C5, $20, $D7, $C7, $20, $8A, $CA, $A9 ; CPU:$C2EF PRG:02EF 6A F0 03 4C FE C2 20 24 C5 20 D7 C7 20 8A CA A9 - .byte $00, $C5, $40, $D0, $11, $C5, $41, $D0, $0D, $C5, $43, $D0, $09, $C5, $44, $D0 ; CPU:$C2FF PRG:02FF 00 C5 40 D0 11 C5 41 D0 0D C5 43 D0 09 C5 44 D0 - .byte $05, $A9, $C0, $8D, $15, $40, $A0, $00, $A2, $00, $20, $61, $C3, $A0, $20, $E8 ; CPU:$C30F PRG:030F 05 A9 C0 8D 15 40 A0 00 A2 00 20 61 C3 A0 20 E8 - .byte $20, $61, $C3, $A0, $40, $E8, $E8, $20, $61, $C3, $A0, $60, $E8, $20, $61, $C3 ; CPU:$C31F PRG:031F 20 61 C3 A0 40 E8 E8 20 61 C3 A0 60 E8 20 61 C3 - .byte $A9, $FF, $C5, $4E, $D0, $0F, $C5, $4F, $D0, $0B, $C5, $51, $D0, $07, $C5, $52 ; CPU:$C32F PRG:032F A9 FF C5 4E D0 0F C5 4F D0 0B C5 51 D0 07 C5 52 - .byte $D0, $03, $4C, $A0, $C1, $E6, $54, $D0, $02, $E6, $53, $A9, $00, $C5, $54, $D0 ; CPU:$C33F PRG:033F D0 03 4C A0 C1 E6 54 D0 02 E6 53 A9 00 C5 54 D0 - .byte $06, $A9, $38, $C5, $53, $F0, $08, $A9, $22, $8D, $02, $03, $4C, $E4, $C2, $4C ; CPU:$C34F PRG:034F 06 A9 38 C5 53 F0 08 A9 22 8D 02 03 4C E4 C2 4C - .byte $55, $C0, $B5, $40, $48, $20, $B8, $CA, $36, $40, $90, $0C, $76, $40, $36, $65 ; CPU:$C35F PRG:035F 55 C0 B5 40 48 20 B8 CA 36 40 90 0C 76 40 36 65 - .byte $B0, $0F, $F6, $56, $38, $4C, $80, $C3, $76, $40, $36, $65, $90, $03, $F6, $56 ; CPU:$C36F PRG:036F B0 0F F6 56 38 4C 80 C3 76 40 36 65 90 03 F6 56 - .byte $18, $76, $65, $36, $40, $90, $24, $A9, $01, $2D, $15, $40, $D0, $0F, $A9, $01 ; CPU:$C37F PRG:037F 18 76 65 36 40 90 24 A9 01 2D 15 40 D0 0F A9 01 - .byte $8D, $15, $40, $A9, $FD, $8D, $02, $40, $A9, $29, $8D, $03, $40, $A9, $02, $99 ; CPU:$C38F PRG:038F 8D 15 40 A9 FD 8D 02 40 A9 29 8D 03 40 A9 02 99 - .byte $02, $02, $A9, $80, $15, $4E, $95, $4E, $20, $B1, $CA, $36, $40, $90, $0E, $76 ; CPU:$C39F PRG:039F 02 02 A9 80 15 4E 95 4E 20 B1 CA 36 40 90 0E 76 - .byte $40, $36, $65, $36, $65, $B0, $11, $F6, $5B, $38, $4C, $C7, $C3, $76, $40, $36 ; CPU:$C3AF PRG:03AF 40 36 65 36 65 B0 11 F6 5B 38 4C C7 C3 76 40 36 - .byte $65, $36, $65, $90, $03, $F6, $5B, $18, $76, $65, $76, $65, $36, $40, $90, $24 ; CPU:$C3BF PRG:03BF 65 36 65 90 03 F6 5B 18 76 65 76 65 36 40 90 24 - .byte $A9, $01, $2D, $15, $40, $D0, $0F, $A9, $01, $8D, $15, $40, $A9, $C5, $8D, $02 ; CPU:$C3CF PRG:03CF A9 01 2D 15 40 D0 0F A9 01 8D 15 40 A9 C5 8D 02 - .byte $40, $A9, $29, $8D, $03, $40, $A9, $02, $99, $06, $02, $A9, $40, $15, $4E, $95 ; CPU:$C3DF PRG:03DF 40 A9 29 8D 03 40 A9 02 99 06 02 A9 40 15 4E 95 - .byte $4E, $20, $B1, $CA, $36, $40, $90, $24, $A9, $01, $2D, $15, $40, $D0, $0F, $A9 ; CPU:$C3EF PRG:03EF 4E 20 B1 CA 36 40 90 24 A9 01 2D 15 40 D0 0F A9 - .byte $01, $8D, $15, $40, $A9, $7D, $8D, $02, $40, $A9, $29, $8D, $03, $40, $A9, $02 ; CPU:$C3FF PRG:03FF 01 8D 15 40 A9 7D 8D 02 40 A9 29 8D 03 40 A9 02 - .byte $99, $0E, $02, $A9, $20, $15, $4E, $95, $4E, $20, $B1, $CA, $36, $40, $90, $10 ; CPU:$C40F PRG:040F 99 0E 02 A9 20 15 4E 95 4E 20 B1 CA 36 40 90 10 - .byte $76, $40, $36, $65, $36, $65, $36, $65, $B0, $13, $F6, $60, $38, $4C, $3C, $C4 ; CPU:$C41F PRG:041F 76 40 36 65 36 65 36 65 B0 13 F6 60 38 4C 3C C4 - .byte $76, $40, $36, $65, $36, $65, $36, $65, $90, $03, $F6, $60, $18, $76, $65, $76 ; CPU:$C42F PRG:042F 76 40 36 65 36 65 36 65 90 03 F6 60 18 76 65 76 - .byte $65, $76, $65, $36, $40, $90, $24, $A9, $01, $2D, $15, $40, $D0, $0F, $A9, $01 ; CPU:$C43F PRG:043F 65 76 65 36 40 90 24 A9 01 2D 15 40 D0 0F A9 01 - .byte $8D, $15, $40, $A9, $94, $8D, $02, $40, $A9, $29, $8D, $03, $40, $A9, $02, $99 ; CPU:$C44F PRG:044F 8D 15 40 A9 94 8D 02 40 A9 29 8D 03 40 A9 02 99 - .byte $0A, $02, $A9, $10, $15, $4E, $95, $4E, $20, $B1, $CA, $36, $40, $90, $24, $A9 ; CPU:$C45F PRG:045F 0A 02 A9 10 15 4E 95 4E 20 B1 CA 36 40 90 24 A9 - .byte $01, $2D, $15, $40, $D0, $0F, $A9, $01, $8D, $15, $40, $A9, $53, $8D, $02, $40 ; CPU:$C46F PRG:046F 01 2D 15 40 D0 0F A9 01 8D 15 40 A9 53 8D 02 40 - .byte $A9, $29, $8D, $03, $40, $A9, $02, $99, $12, $02, $A9, $08, $15, $4E, $95, $4E ; CPU:$C47F PRG:047F A9 29 8D 03 40 A9 02 99 12 02 A9 08 15 4E 95 4E - .byte $20, $B1, $CA, $36, $40, $90, $24, $A9, $01, $2D, $15, $40, $D0, $0F, $A9, $01 ; CPU:$C48F PRG:048F 20 B1 CA 36 40 90 24 A9 01 2D 15 40 D0 0F A9 01 - .byte $8D, $15, $40, $A9, $2E, $8D, $02, $40, $A9, $29, $8D, $03, $40, $A9, $02, $99 ; CPU:$C49F PRG:049F 8D 15 40 A9 2E 8D 02 40 A9 29 8D 03 40 A9 02 99 - .byte $16, $02, $A9, $04, $15, $4E, $95, $4E, $20, $B1, $CA, $36, $40, $90, $24, $A9 ; CPU:$C4AF PRG:04AF 16 02 A9 04 15 4E 95 4E 20 B1 CA 36 40 90 24 A9 - .byte $01, $2D, $15, $40, $D0, $0F, $A9, $01, $8D, $15, $40, $A9, $0D, $8D, $02, $40 ; CPU:$C4BF PRG:04BF 01 2D 15 40 D0 0F A9 01 8D 15 40 A9 0D 8D 02 40 - .byte $A9, $29, $8D, $03, $40, $A9, $02, $99, $1A, $02, $A9, $02, $15, $4E, $95, $4E ; CPU:$C4CF PRG:04CF A9 29 8D 03 40 A9 02 99 1A 02 A9 02 15 4E 95 4E - .byte $20, $B1, $CA, $36, $40, $90, $24, $A9, $01, $2D, $15, $40, $D0, $0F, $A9, $01 ; CPU:$C4DF PRG:04DF 20 B1 CA 36 40 90 24 A9 01 2D 15 40 D0 0F A9 01 - .byte $8D, $15, $40, $A9, $FE, $8D, $02, $40, $A9, $28, $8D, $03, $40, $A9, $02, $99 ; CPU:$C4EF PRG:04EF 8D 15 40 A9 FE 8D 02 40 A9 28 8D 03 40 A9 02 99 - .byte $1E, $02, $A9, $01, $15, $4E, $95, $4E, $20, $B1, $CA, $68, $95, $40, $A9, $0C ; CPU:$C4FF PRG:04FF 1E 02 A9 01 15 4E 95 4E 20 B1 CA 68 95 40 A9 0C - .byte $35, $40, $C9, $0C, $F0, $0B, $A9, $03, $35, $40, $C9, $03, $F0, $03, $4C, $23 ; CPU:$C50F PRG:050F 35 40 C9 0C F0 0B A9 03 35 40 C9 03 F0 03 4C 23 - .byte $C5, $20, $EE, $C1, $60, $A5, $60, $C9, $04, $30, $3A, $A5, $60, $18, $E9, $04 ; CPU:$C51F PRG:051F C5 20 EE C1 60 A5 60 C9 04 30 3A A5 60 18 E9 04 - .byte $85, $60, $A9, $F4, $8D, $8D, $02, $A5, $60, $C9, $04, $30, $3D, $A5, $60, $18 ; CPU:$C52F PRG:052F 85 60 A9 F4 8D 8D 02 A5 60 C9 04 30 3D A5 60 18 - .byte $E9, $04, $85, $60, $A9, $D4, $8D, $89, $02, $A5, $60, $C9, $04, $30, $3D, $A5 ; CPU:$C53F PRG:053F E9 04 85 60 A9 D4 8D 89 02 A5 60 C9 04 30 3D A5 - .byte $60, $18, $E9, $04, $85, $60, $A9, $D4, $8D, $85, $02, $A9, $E0, $05, $60, $8D ; CPU:$C54F PRG:054F 60 18 E9 04 85 60 A9 D4 8D 85 02 A9 E0 05 60 8D - .byte $81, $02, $4C, $97, $C5, $A9, $F0, $05, $60, $8D, $8D, $02, $A9, $30, $8D, $89 ; CPU:$C55F PRG:055F 81 02 4C 97 C5 A9 F0 05 60 8D 8D 02 A9 30 8D 89 - .byte $02, $8D, $85, $02, $8D, $81, $02, $4C, $97, $C5, $A9, $D0, $05, $60, $8D, $89 ; CPU:$C56F PRG:056F 02 8D 85 02 8D 81 02 4C 97 C5 A9 D0 05 60 8D 89 - .byte $02, $A9, $30, $8D, $85, $02, $8D, $81, $02, $4C, $97, $C5, $A9, $D0, $05, $60 ; CPU:$C57F PRG:057F 02 A9 30 8D 85 02 8D 81 02 4C 97 C5 A9 D0 05 60 - .byte $8D, $85, $02, $A9, $30, $8D, $81, $02, $A5, $5B, $C9, $04, $30, $3A, $A5, $5B ; CPU:$C58F PRG:058F 8D 85 02 A9 30 8D 81 02 A5 5B C9 04 30 3A A5 5B - .byte $18, $E9, $04, $85, $5B, $A9, $F4, $8D, $9D, $02, $A5, $5B, $C9, $04, $30, $3D ; CPU:$C59F PRG:059F 18 E9 04 85 5B A9 F4 8D 9D 02 A5 5B C9 04 30 3D - .byte $A5, $5B, $18, $E9, $04, $85, $5B, $A9, $D4, $8D, $99, $02, $A5, $5B, $C9, $04 ; CPU:$C5AF PRG:05AF A5 5B 18 E9 04 85 5B A9 D4 8D 99 02 A5 5B C9 04 - .byte $30, $3D, $A5, $5B, $18, $E9, $04, $85, $5B, $A9, $D4, $8D, $95, $02, $A9, $E0 ; CPU:$C5BF PRG:05BF 30 3D A5 5B 18 E9 04 85 5B A9 D4 8D 95 02 A9 E0 - .byte $05, $5B, $8D, $91, $02, $4C, $0A, $C6, $A9, $F0, $05, $5B, $8D, $9D, $02, $A9 ; CPU:$C5CF PRG:05CF 05 5B 8D 91 02 4C 0A C6 A9 F0 05 5B 8D 9D 02 A9 - .byte $30, $8D, $99, $02, $8D, $95, $02, $8D, $91, $02, $4C, $0A, $C6, $A9, $D0, $05 ; CPU:$C5DF PRG:05DF 30 8D 99 02 8D 95 02 8D 91 02 4C 0A C6 A9 D0 05 - .byte $5B, $8D, $99, $02, $A9, $30, $8D, $95, $02, $8D, $91, $02, $4C, $0A, $C6, $A9 ; CPU:$C5EF PRG:05EF 5B 8D 99 02 A9 30 8D 95 02 8D 91 02 4C 0A C6 A9 - .byte $D0, $05, $5B, $8D, $95, $02, $A9, $30, $8D, $91, $02, $A5, $56, $C9, $04, $30 ; CPU:$C5FF PRG:05FF D0 05 5B 8D 95 02 A9 30 8D 91 02 A5 56 C9 04 30 - .byte $3A, $A5, $56, $18, $E9, $04, $85, $56, $A9, $F4, $8D, $AD, $02, $A5, $56, $C9 ; CPU:$C60F PRG:060F 3A A5 56 18 E9 04 85 56 A9 F4 8D AD 02 A5 56 C9 - .byte $04, $30, $3D, $A5, $56, $18, $E9, $04, $85, $56, $A9, $D4, $8D, $A9, $02, $A5 ; CPU:$C61F PRG:061F 04 30 3D A5 56 18 E9 04 85 56 A9 D4 8D A9 02 A5 - .byte $56, $C9, $04, $30, $3D, $A5, $56, $18, $E9, $04, $85, $56, $A9, $D4, $8D, $A5 ; CPU:$C62F PRG:062F 56 C9 04 30 3D A5 56 18 E9 04 85 56 A9 D4 8D A5 - .byte $02, $A9, $E0, $05, $56, $8D, $A1, $02, $4C, $7D, $C6, $A9, $F0, $05, $56, $8D ; CPU:$C63F PRG:063F 02 A9 E0 05 56 8D A1 02 4C 7D C6 A9 F0 05 56 8D - .byte $AD, $02, $A9, $30, $8D, $A9, $02, $8D, $A5, $02, $8D, $A1, $02, $4C, $7D, $C6 ; CPU:$C64F PRG:064F AD 02 A9 30 8D A9 02 8D A5 02 8D A1 02 4C 7D C6 - .byte $A9, $D0, $05, $56, $8D, $A9, $02, $A9, $30, $8D, $A5, $02, $8D, $A1, $02, $4C ; CPU:$C65F PRG:065F A9 D0 05 56 8D A9 02 A9 30 8D A5 02 8D A1 02 4C - .byte $7D, $C6, $A9, $D0, $05, $56, $8D, $A5, $02, $A9, $30, $8D, $A1, $02, $A5, $61 ; CPU:$C66F PRG:066F 7D C6 A9 D0 05 56 8D A5 02 A9 30 8D A1 02 A5 61 - .byte $C9, $04, $30, $3A, $A5, $61, $18, $E9, $04, $85, $61, $A9, $F4, $8D, $BD, $02 ; CPU:$C67F PRG:067F C9 04 30 3A A5 61 18 E9 04 85 61 A9 F4 8D BD 02 - .byte $A5, $61, $C9, $04, $30, $3D, $A5, $61, $18, $E9, $04, $85, $61, $A9, $D4, $8D ; CPU:$C68F PRG:068F A5 61 C9 04 30 3D A5 61 18 E9 04 85 61 A9 D4 8D - .byte $B9, $02, $A5, $61, $C9, $04, $30, $3D, $A5, $61, $18, $E9, $04, $85, $61, $A9 ; CPU:$C69F PRG:069F B9 02 A5 61 C9 04 30 3D A5 61 18 E9 04 85 61 A9 - .byte $D4, $8D, $B5, $02, $A9, $E0, $05, $61, $8D, $B1, $02, $4C, $F0, $C6, $A9, $F0 ; CPU:$C6AF PRG:06AF D4 8D B5 02 A9 E0 05 61 8D B1 02 4C F0 C6 A9 F0 - .byte $05, $61, $8D, $BD, $02, $A9, $30, $8D, $B9, $02, $8D, $B5, $02, $8D, $B1, $02 ; CPU:$C6BF PRG:06BF 05 61 8D BD 02 A9 30 8D B9 02 8D B5 02 8D B1 02 - .byte $4C, $F0, $C6, $A9, $D0, $05, $61, $8D, $B9, $02, $A9, $30, $8D, $B5, $02, $8D ; CPU:$C6CF PRG:06CF 4C F0 C6 A9 D0 05 61 8D B9 02 A9 30 8D B5 02 8D - .byte $B1, $02, $4C, $F0, $C6, $A9, $D0, $05, $61, $8D, $B5, $02, $A9, $30, $8D, $B1 ; CPU:$C6DF PRG:06DF B1 02 4C F0 C6 A9 D0 05 61 8D B5 02 A9 30 8D B1 - .byte $02, $A5, $5C, $C9, $04, $30, $3A, $A5, $5C, $18, $E9, $04, $85, $5C, $A9, $F4 ; CPU:$C6EF PRG:06EF 02 A5 5C C9 04 30 3A A5 5C 18 E9 04 85 5C A9 F4 - .byte $8D, $CD, $02, $A5, $5C, $C9, $04, $30, $3D, $A5, $5C, $18, $E9, $04, $85, $5C ; CPU:$C6FF PRG:06FF 8D CD 02 A5 5C C9 04 30 3D A5 5C 18 E9 04 85 5C - .byte $A9, $D4, $8D, $C9, $02, $A5, $5C, $C9, $04, $30, $3D, $A5, $5C, $18, $E9, $04 ; CPU:$C70F PRG:070F A9 D4 8D C9 02 A5 5C C9 04 30 3D A5 5C 18 E9 04 - .byte $85, $5C, $A9, $D4, $8D, $C5, $02, $A9, $E0, $05, $5C, $8D, $C1, $02, $4C, $63 ; CPU:$C71F PRG:071F 85 5C A9 D4 8D C5 02 A9 E0 05 5C 8D C1 02 4C 63 - .byte $C7, $A9, $F0, $05, $5C, $8D, $CD, $02, $A9, $30, $8D, $C9, $02, $8D, $C5, $02 ; CPU:$C72F PRG:072F C7 A9 F0 05 5C 8D CD 02 A9 30 8D C9 02 8D C5 02 - .byte $8D, $C1, $02, $4C, $63, $C7, $A9, $D0, $05, $5C, $8D, $C9, $02, $A9, $30, $8D ; CPU:$C73F PRG:073F 8D C1 02 4C 63 C7 A9 D0 05 5C 8D C9 02 A9 30 8D - .byte $C5, $02, $8D, $C1, $02, $4C, $63, $C7, $A9, $D0, $05, $5C, $8D, $C5, $02, $A9 ; CPU:$C74F PRG:074F C5 02 8D C1 02 4C 63 C7 A9 D0 05 5C 8D C5 02 A9 - .byte $30, $8D, $C1, $02, $A5, $57, $C9, $04, $30, $3A, $A5, $57, $18, $E9, $04, $85 ; CPU:$C75F PRG:075F 30 8D C1 02 A5 57 C9 04 30 3A A5 57 18 E9 04 85 - .byte $57, $A9, $F4, $8D, $DD, $02, $A5, $57, $C9, $04, $30, $3D, $A5, $57, $18, $E9 ; CPU:$C76F PRG:076F 57 A9 F4 8D DD 02 A5 57 C9 04 30 3D A5 57 18 E9 - .byte $04, $85, $57, $A9, $D4, $8D, $D9, $02, $A5, $57, $C9, $04, $30, $3D, $A5, $57 ; CPU:$C77F PRG:077F 04 85 57 A9 D4 8D D9 02 A5 57 C9 04 30 3D A5 57 - .byte $18, $E9, $04, $85, $57, $A9, $D4, $8D, $D5, $02, $A9, $E0, $05, $57, $8D, $D1 ; CPU:$C78F PRG:078F 18 E9 04 85 57 A9 D4 8D D5 02 A9 E0 05 57 8D D1 - .byte $02, $4C, $D6, $C7, $A9, $F0, $05, $57, $8D, $DD, $02, $A9, $30, $8D, $D9, $02 ; CPU:$C79F PRG:079F 02 4C D6 C7 A9 F0 05 57 8D DD 02 A9 30 8D D9 02 - .byte $8D, $D5, $02, $8D, $D1, $02, $4C, $D6, $C7, $A9, $D0, $05, $57, $8D, $D9, $02 ; CPU:$C7AF PRG:07AF 8D D5 02 8D D1 02 4C D6 C7 A9 D0 05 57 8D D9 02 - .byte $A9, $30, $8D, $D5, $02, $8D, $D1, $02, $4C, $D6, $C7, $A9, $D0, $05, $57, $8D ; CPU:$C7BF PRG:07BF A9 30 8D D5 02 8D D1 02 4C D6 C7 A9 D0 05 57 8D - .byte $D5, $02, $A9, $30, $8D, $D1, $02, $60, $A5, $63, $C9, $04, $30, $3A, $A5, $63 ; CPU:$C7CF PRG:07CF D5 02 A9 30 8D D1 02 60 A5 63 C9 04 30 3A A5 63 - .byte $18, $E9, $04, $85, $63, $A9, $F4, $8D, $1D, $03, $A5, $63, $C9, $04, $30, $3D ; CPU:$C7DF PRG:07DF 18 E9 04 85 63 A9 F4 8D 1D 03 A5 63 C9 04 30 3D - .byte $A5, $63, $18, $E9, $04, $85, $63, $A9, $D4, $8D, $15, $03, $A5, $63, $C9, $04 ; CPU:$C7EF PRG:07EF A5 63 18 E9 04 85 63 A9 D4 8D 15 03 A5 63 C9 04 - .byte $30, $3D, $A5, $63, $18, $E9, $04, $85, $63, $A9, $D4, $8D, $0D, $03, $A9, $E0 ; CPU:$C7FF PRG:07FF 30 3D A5 63 18 E9 04 85 63 A9 D4 8D 0D 03 A9 E0 - .byte $05, $63, $8D, $05, $03, $4C, $4A, $C8, $A9, $F0, $05, $63, $8D, $1D, $03, $A9 ; CPU:$C80F PRG:080F 05 63 8D 05 03 4C 4A C8 A9 F0 05 63 8D 1D 03 A9 - .byte $30, $8D, $15, $03, $8D, $0D, $03, $8D, $05, $03, $4C, $4A, $C8, $A9, $D0, $05 ; CPU:$C81F PRG:081F 30 8D 15 03 8D 0D 03 8D 05 03 4C 4A C8 A9 D0 05 - .byte $63, $8D, $15, $03, $A9, $30, $8D, $0D, $03, $8D, $05, $03, $4C, $4A, $C8, $A9 ; CPU:$C82F PRG:082F 63 8D 15 03 A9 30 8D 0D 03 8D 05 03 4C 4A C8 A9 - .byte $D0, $05, $63, $8D, $0D, $03, $A9, $30, $8D, $05, $03, $A5, $5E, $C9, $04, $30 ; CPU:$C83F PRG:083F D0 05 63 8D 0D 03 A9 30 8D 05 03 A5 5E C9 04 30 - .byte $3A, $A5, $5E, $18, $E9, $04, $85, $5E, $A9, $F4, $8D, $1F, $03, $A5, $5E, $C9 ; CPU:$C84F PRG:084F 3A A5 5E 18 E9 04 85 5E A9 F4 8D 1F 03 A5 5E C9 - .byte $04, $30, $3D, $A5, $5E, $18, $E9, $04, $85, $5E, $A9, $D4, $8D, $17, $03, $A5 ; CPU:$C85F PRG:085F 04 30 3D A5 5E 18 E9 04 85 5E A9 D4 8D 17 03 A5 - .byte $5E, $C9, $04, $30, $3D, $A5, $5E, $18, $E9, $04, $85, $5E, $A9, $D4, $8D, $0F ; CPU:$C86F PRG:086F 5E C9 04 30 3D A5 5E 18 E9 04 85 5E A9 D4 8D 0F - .byte $03, $A9, $E0, $05, $5E, $8D, $07, $03, $4C, $BD, $C8, $A9, $F0, $05, $5E, $8D ; CPU:$C87F PRG:087F 03 A9 E0 05 5E 8D 07 03 4C BD C8 A9 F0 05 5E 8D - .byte $1F, $03, $A9, $30, $8D, $17, $03, $8D, $0F, $03, $8D, $07, $03, $4C, $BD, $C8 ; CPU:$C88F PRG:088F 1F 03 A9 30 8D 17 03 8D 0F 03 8D 07 03 4C BD C8 - .byte $A9, $D0, $05, $5E, $8D, $17, $03, $A9, $30, $8D, $0F, $03, $8D, $07, $03, $4C ; CPU:$C89F PRG:089F A9 D0 05 5E 8D 17 03 A9 30 8D 0F 03 8D 07 03 4C - .byte $BD, $C8, $A9, $D0, $05, $5E, $8D, $0F, $03, $A9, $30, $8D, $07, $03, $A5, $59 ; CPU:$C8AF PRG:08AF BD C8 A9 D0 05 5E 8D 0F 03 A9 30 8D 07 03 A5 59 - .byte $C9, $04, $30, $3A, $A5, $59, $18, $E9, $04, $85, $59, $A9, $F4, $8D, $21, $03 ; CPU:$C8BF PRG:08BF C9 04 30 3A A5 59 18 E9 04 85 59 A9 F4 8D 21 03 - .byte $A5, $59, $C9, $04, $30, $3D, $A5, $59, $18, $E9, $04, $85, $59, $A9, $D4, $8D ; CPU:$C8CF PRG:08CF A5 59 C9 04 30 3D A5 59 18 E9 04 85 59 A9 D4 8D - .byte $19, $03, $A5, $59, $C9, $04, $30, $3D, $A5, $59, $18, $E9, $04, $85, $59, $A9 ; CPU:$C8DF PRG:08DF 19 03 A5 59 C9 04 30 3D A5 59 18 E9 04 85 59 A9 - .byte $D4, $8D, $11, $03, $A9, $E0, $05, $59, $8D, $09, $03, $4C, $30, $C9, $A9, $F0 ; CPU:$C8EF PRG:08EF D4 8D 11 03 A9 E0 05 59 8D 09 03 4C 30 C9 A9 F0 - .byte $05, $59, $8D, $21, $03, $A9, $30, $8D, $19, $03, $8D, $11, $03, $8D, $09, $03 ; CPU:$C8FF PRG:08FF 05 59 8D 21 03 A9 30 8D 19 03 8D 11 03 8D 09 03 - .byte $4C, $30, $C9, $A9, $D0, $05, $59, $8D, $19, $03, $A9, $30, $8D, $11, $03, $8D ; CPU:$C90F PRG:090F 4C 30 C9 A9 D0 05 59 8D 19 03 A9 30 8D 11 03 8D - .byte $09, $03, $4C, $30, $C9, $A9, $D0, $05, $59, $8D, $11, $03, $A9, $30, $8D, $09 ; CPU:$C91F PRG:091F 09 03 4C 30 C9 A9 D0 05 59 8D 11 03 A9 30 8D 09 - .byte $03, $A5, $64, $C9, $04, $30, $3A, $A5, $64, $18, $E9, $04, $85, $64, $A9, $F4 ; CPU:$C92F PRG:092F 03 A5 64 C9 04 30 3A A5 64 18 E9 04 85 64 A9 F4 - .byte $8D, $4D, $03, $A5, $64, $C9, $04, $30, $3D, $A5, $64, $18, $E9, $04, $85, $64 ; CPU:$C93F PRG:093F 8D 4D 03 A5 64 C9 04 30 3D A5 64 18 E9 04 85 64 - .byte $A9, $D4, $8D, $45, $03, $A5, $64, $C9, $04, $30, $3D, $A5, $64, $18, $E9, $04 ; CPU:$C94F PRG:094F A9 D4 8D 45 03 A5 64 C9 04 30 3D A5 64 18 E9 04 - .byte $85, $64, $A9, $D4, $8D, $3D, $03, $A9, $E0, $05, $64, $8D, $35, $03, $4C, $A3 ; CPU:$C95F PRG:095F 85 64 A9 D4 8D 3D 03 A9 E0 05 64 8D 35 03 4C A3 - .byte $C9, $A9, $F0, $05, $64, $8D, $4D, $03, $A9, $30, $8D, $45, $03, $8D, $3D, $03 ; CPU:$C96F PRG:096F C9 A9 F0 05 64 8D 4D 03 A9 30 8D 45 03 8D 3D 03 - .byte $8D, $35, $03, $4C, $A3, $C9, $A9, $D0, $05, $64, $8D, $45, $03, $A9, $30, $8D ; CPU:$C97F PRG:097F 8D 35 03 4C A3 C9 A9 D0 05 64 8D 45 03 A9 30 8D - .byte $3D, $03, $8D, $35, $03, $4C, $A3, $C9, $A9, $D0, $05, $64, $8D, $3D, $03, $A9 ; CPU:$C98F PRG:098F 3D 03 8D 35 03 4C A3 C9 A9 D0 05 64 8D 3D 03 A9 - .byte $30, $8D, $35, $03, $A5, $5F, $C9, $04, $30, $3A, $A5, $5F, $18, $E9, $04, $85 ; CPU:$C99F PRG:099F 30 8D 35 03 A5 5F C9 04 30 3A A5 5F 18 E9 04 85 - .byte $5F, $A9, $F4, $8D, $4F, $03, $A5, $5F, $C9, $04, $30, $3D, $A5, $5F, $18, $E9 ; CPU:$C9AF PRG:09AF 5F A9 F4 8D 4F 03 A5 5F C9 04 30 3D A5 5F 18 E9 - .byte $04, $85, $5F, $A9, $D4, $8D, $47, $03, $A5, $5F, $C9, $04, $30, $3D, $A5, $5F ; CPU:$C9BF PRG:09BF 04 85 5F A9 D4 8D 47 03 A5 5F C9 04 30 3D A5 5F - .byte $18, $E9, $04, $85, $5F, $A9, $D4, $8D, $3F, $03, $A9, $E0, $05, $5F, $8D, $37 ; CPU:$C9CF PRG:09CF 18 E9 04 85 5F A9 D4 8D 3F 03 A9 E0 05 5F 8D 37 - .byte $03, $4C, $16, $CA, $A9, $F0, $05, $5F, $8D, $4F, $03, $A9, $30, $8D, $47, $03 ; CPU:$C9DF PRG:09DF 03 4C 16 CA A9 F0 05 5F 8D 4F 03 A9 30 8D 47 03 - .byte $8D, $3F, $03, $8D, $37, $03, $4C, $16, $CA, $A9, $D0, $05, $5F, $8D, $47, $03 ; CPU:$C9EF PRG:09EF 8D 3F 03 8D 37 03 4C 16 CA A9 D0 05 5F 8D 47 03 - .byte $A9, $30, $8D, $3F, $03, $8D, $37, $03, $4C, $16, $CA, $A9, $D0, $05, $5F, $8D ; CPU:$C9FF PRG:09FF A9 30 8D 3F 03 8D 37 03 4C 16 CA A9 D0 05 5F 8D - .byte $3F, $03, $A9, $30, $8D, $37, $03, $A5, $5A, $C9, $04, $30, $3A, $A5, $5A, $18 ; CPU:$CA0F PRG:0A0F 3F 03 A9 30 8D 37 03 A5 5A C9 04 30 3A A5 5A 18 - .byte $E9, $04, $85, $5A, $A9, $F4, $8D, $51, $03, $A5, $5A, $C9, $04, $30, $3D, $A5 ; CPU:$CA1F PRG:0A1F E9 04 85 5A A9 F4 8D 51 03 A5 5A C9 04 30 3D A5 - .byte $5A, $18, $E9, $04, $85, $5A, $A9, $D4, $8D, $49, $03, $A5, $5A, $C9, $04, $30 ; CPU:$CA2F PRG:0A2F 5A 18 E9 04 85 5A A9 D4 8D 49 03 A5 5A C9 04 30 - .byte $3D, $A5, $5A, $18, $E9, $04, $85, $5A, $A9, $D4, $8D, $41, $03, $A9, $E0, $05 ; CPU:$CA3F PRG:0A3F 3D A5 5A 18 E9 04 85 5A A9 D4 8D 41 03 A9 E0 05 - .byte $5A, $8D, $39, $03, $4C, $89, $CA, $A9, $F0, $05, $5A, $8D, $51, $03, $A9, $30 ; CPU:$CA4F PRG:0A4F 5A 8D 39 03 4C 89 CA A9 F0 05 5A 8D 51 03 A9 30 - .byte $8D, $49, $03, $8D, $41, $03, $8D, $39, $03, $4C, $89, $CA, $A9, $D0, $05, $5A ; CPU:$CA5F PRG:0A5F 8D 49 03 8D 41 03 8D 39 03 4C 89 CA A9 D0 05 5A - .byte $8D, $49, $03, $A9, $30, $8D, $41, $03, $8D, $39, $03, $4C, $89, $CA, $A9, $D0 ; CPU:$CA6F PRG:0A6F 8D 49 03 A9 30 8D 41 03 8D 39 03 4C 89 CA A9 D0 - .byte $05, $5A, $8D, $41, $03, $A9, $30, $8D, $39, $03, $60, $A9, $FF, $85, $6A, $A9 ; CPU:$CA7F PRG:0A7F 05 5A 8D 41 03 A9 30 8D 39 03 60 A9 FF 85 6A A9 - .byte $00, $85, $60, $85, $5B, $85, $56, $85, $61, $85, $5C, $85, $57, $85, $63, $85 ; CPU:$CA8F PRG:0A8F 00 85 60 85 5B 85 56 85 61 85 5C 85 57 85 63 85 - .byte $5E, $85, $59, $85, $64, $85, $5F, $85, $5A, $85, $65, $85, $66, $85, $68, $85 ; CPU:$CA9F PRG:0A9F 5E 85 59 85 64 85 5F 85 5A 85 65 85 66 85 68 85 - .byte $69, $60, $A9, $00, $85, $53, $85, $54, $60, $36, $4E, $90, $05, $A9, $00, $99 ; CPU:$CAAF PRG:0AAF 69 60 A9 00 85 53 85 54 60 36 4E 90 05 A9 00 99 - .byte $02, $02, $36, $4E, $90, $05, $A9, $00, $99, $06, $02, $36, $4E, $90, $05, $A9 ; CPU:$CABF PRG:0ABF 02 02 36 4E 90 05 A9 00 99 06 02 36 4E 90 05 A9 - .byte $00, $99, $0E, $02, $36, $4E, $90, $05, $A9, $00, $99, $0A, $02, $36, $4E, $90 ; CPU:$CACF PRG:0ACF 00 99 0E 02 36 4E 90 05 A9 00 99 0A 02 36 4E 90 - .byte $05, $A9, $00, $99, $12, $02, $36, $4E, $90, $05, $A9, $00, $99, $16, $02, $36 ; CPU:$CADF PRG:0ADF 05 A9 00 99 12 02 36 4E 90 05 A9 00 99 16 02 36 - .byte $4E, $90, $05, $A9, $00, $99, $1A, $02, $36, $4E, $90, $05, $A9, $00, $99, $1E ; CPU:$CAEF PRG:0AEF 4E 90 05 A9 00 99 1A 02 36 4E 90 05 A9 00 99 1E - .byte $02, $36, $4E, $60, $20, $2F, $CD, $A2, $00, $A9, $EE, $9D, $00, $60, $E8, $E0 ; CPU:$CAFF PRG:0AFF 02 36 4E 60 20 2F CD A2 00 A9 EE 9D 00 60 E8 E0 - .byte $06, $D0, $F8, $A9, $00, $A2, $00, $95, $00, $9D, $00, $01, $A9, $F4, $9D, $00 ; CPU:$CB0F PRG:0B0F 06 D0 F8 A9 00 A2 00 95 00 9D 00 01 A9 F4 9D 00 - .byte $02, $A9, $00, $9D, $00, $03, $9D, $00, $04, $9D, $00, $05, $9D, $00, $06, $E8 ; CPU:$CB1F PRG:0B1F 02 A9 00 9D 00 03 9D 00 04 9D 00 05 9D 00 06 E8 - .byte $D0, $E5, $A9, $10, $8D, $00, $20, $85, $EF, $A9, $00, $8D, $01, $20, $85, $EE ; CPU:$CB2F PRG:0B2F D0 E5 A9 10 8D 00 20 85 EF A9 00 8D 01 20 85 EE - .byte $A9, $20, $A2, $24, $A0, $00, $20, $EE, $CD, $20, $3F, $CD, $06, $CF, $20, $3C ; CPU:$CB3F PRG:0B3F A9 20 A2 24 A0 00 20 EE CD 20 3F CD 06 CF 20 3C - .byte $CE, $20, $3F, $CD, $63, $D0, $20, $3C, $CE, $20, $74, $C1, $A2, $DF, $BD, $C4 ; CPU:$CB4F PRG:0B4F CE 20 3F CD 63 D0 20 3C CE 20 74 C1 A2 DF BD C4 - .byte $D5, $9D, $00, $02, $CA, $D0, $F7, $BD, $C4, $D5, $9D, $00, $02, $A9, $FF, $85 ; CPU:$CB5F PRG:0B5F D5 9D 00 02 CA D0 F7 BD C4 D5 9D 00 02 A9 FF 85 - .byte $6A, $A9, $00, $85, $4E, $85, $4F, $85, $51, $85, $52, $85, $54, $85, $53, $85 ; CPU:$CB6F PRG:0B6F 6A A9 00 85 4E 85 4F 85 51 85 52 85 54 85 53 85 - .byte $60, $85, $5B, $85, $56, $85, $61, $85, $5C, $85, $57, $85, $65, $85, $66, $85 ; CPU:$CB7F PRG:0B7F 60 85 5B 85 56 85 61 85 5C 85 57 85 65 85 66 85 - .byte $68, $85, $69, $A9, $BF, $8D, $00, $40, $20, $39, $CD, $20, $E2, $CC, $20, $F8 ; CPU:$CB8F PRG:0B8F 68 85 69 A9 BF 8D 00 40 20 39 CD 20 E2 CC 20 F8 - .byte $CB, $E6, $6A, $A9, $0F, $C5, $6A, $F0, $03, $4C, $B1, $CB, $20, $24, $C5, $20 ; CPU:$CB9F PRG:0B9F CB E6 6A A9 0F C5 6A F0 03 4C B1 CB 20 24 C5 20 - .byte $8A, $CA, $A9, $00, $C5, $40, $D0, $09, $C5, $41, $D0, $05, $A9, $00, $8D, $15 ; CPU:$CBAF PRG:0BAF 8A CA A9 00 C5 40 D0 09 C5 41 D0 05 A9 00 8D 15 - .byte $40, $A0, $00, $A2, $00, $20, $11, $CC, $20, $61, $C3, $A0, $20, $E8, $20, $11 ; CPU:$CBBF PRG:0BBF 40 A0 00 A2 00 20 11 CC 20 61 C3 A0 20 E8 20 11 - .byte $CC, $20, $61, $C3, $A9, $FF, $C5, $4E, $D0, $07, $C5, $4F, $D0, $03, $4C, $A0 ; CPU:$CBCF PRG:0BCF CC 20 61 C3 A9 FF C5 4E D0 07 C5 4F D0 03 4C A0 - .byte $C1, $E6, $54, $D0, $02, $E6, $53, $A9, $00, $C5, $54, $D0, $06, $A9, $38, $C5 ; CPU:$CBDF PRG:0BDF C1 E6 54 D0 02 E6 53 A9 00 C5 54 D0 06 A9 38 C5 - .byte $53, $F0, $03, $4C, $9A, $CB, $4C, $55, $C0, $A2, $01, $8E, $16, $40, $CA, $8E ; CPU:$CBEF PRG:0BEF 53 F0 03 4C 9A CB 4C 55 C0 A2 01 8E 16 40 CA 8E - .byte $16, $40, $E8, $A0, $08, $BD, $16, $40, $4A, $36, $40, $88, $D0, $F7, $CA, $F0 ; CPU:$CBFF PRG:0BFF 16 40 E8 A0 08 BD 16 40 4A 36 40 88 D0 F7 CA F0 - .byte $F2, $60, $BD, $16, $40, $4A, $90, $01, $60, $A9, $03, $99, $02, $02, $99, $06 ; CPU:$CC0F PRG:0C0F F2 60 BD 16 40 4A 90 01 60 A9 03 99 02 02 99 06 - .byte $02, $99, $0A, $02, $99, $0E, $02, $99, $12, $02, $99, $16, $02, $99, $1A, $02 ; CPU:$CC1F PRG:0C1F 02 99 0A 02 99 0E 02 99 12 02 99 16 02 99 1A 02 - .byte $99, $1E, $02, $A9, $00, $95, $40, $95, $56, $95, $5B, $95, $60, $95, $65, $95 ; CPU:$CC2F PRG:0C2F 99 1E 02 A9 00 95 40 95 56 95 5B 95 60 95 65 95 - .byte $4E, $8A, $48, $A2, $1F, $A9, $F4, $9D, $E0, $02, $CA, $10, $FA, $68, $AA, $60 ; CPU:$CC3F PRG:0C3F 4E 8A 48 A2 1F A9 F4 9D E0 02 CA 10 FA 68 AA 60 - .byte $A2, $01, $8E, $16, $40, $CA, $8E, $16, $40, $E8, $A0, $08, $BD, $16, $40, $29 ; CPU:$CC4F PRG:0C4F A2 01 8E 16 40 CA 8E 16 40 E8 A0 08 BD 16 40 29 - .byte $03, $C9, $01, $36, $40, $88, $D0, $F4, $CA, $F0, $EF, $A2, $01, $A0, $08, $BD ; CPU:$CC5F PRG:0C5F 03 C9 01 36 40 88 D0 F4 CA F0 EF A2 01 A0 08 BD - .byte $16, $40, $4A, $36, $47, $4A, $36, $45, $88, $D0, $F4, $CA, $F0, $EF, $A2, $01 ; CPU:$CC6F PRG:0C6F 16 40 4A 36 47 4A 36 45 88 D0 F4 CA F0 EF A2 01 - .byte $A0, $08, $BD, $16, $40, $4A, $36, $4B, $4A, $36, $49, $88, $D0, $F4, $CA, $F0 ; CPU:$CC7F PRG:0C7F A0 08 BD 16 40 4A 36 4B 4A 36 49 88 D0 F4 CA F0 - .byte $EF, $A9, $00, $85, $4D, $A5, $49, $C9, $20, $D0, $06, $A9, $80, $05, $4D, $85 ; CPU:$CC8F PRG:0C8F EF A9 00 85 4D A5 49 C9 20 D0 06 A9 80 05 4D 85 - .byte $4D, $A5, $4A, $C9, $10, $D0, $06, $A9, $40, $05, $4D, $85, $4D, $A5, $4B, $C9 ; CPU:$CC9F PRG:0C9F 4D A5 4A C9 10 D0 06 A9 40 05 4D 85 4D A5 4B C9 - .byte $10, $D0, $06, $A9, $20, $05, $4D, $85, $4D, $A5, $4C, $C9, $20, $D0, $06, $A9 ; CPU:$CCAF PRG:0CAF 10 D0 06 A9 20 05 4D 85 4D A5 4C C9 20 D0 06 A9 - .byte $10, $05, $4D, $85, $4D, $A5, $4D, $C9, $C0, $D0, $0A, $A2, $02, $B5, $44, $95 ; CPU:$CCBF PRG:0CBF 10 05 4D 85 4D A5 4D C9 C0 D0 0A A2 02 B5 44 95 - .byte $42, $CA, $D0, $F9, $60, $C9, $30, $D0, $09, $A2, $02, $B5, $46, $95, $42, $CA ; CPU:$CCCF PRG:0CCF 42 CA D0 F9 60 C9 30 D0 09 A2 02 B5 46 95 42 CA - .byte $D0, $F9, $60, $48, $AD, $02, $20, $A5, $EF, $09, $80, $85, $EF, $8D, $00, $20 ; CPU:$CCDF PRG:0CDF D0 F9 60 48 AD 02 20 A5 EF 09 80 85 EF 8D 00 20 - .byte $85, $E0, $68, $24, $E0, $30, $FC, $60 ; CPU:$CCEF PRG:0CEF 85 E0 68 24 E0 30 FC 60 +MainGameLoop: + jsr $CCE2 ; CPU:$C0DF PRG:00DF 20 E2 CC + jsr $CC4F ; CPU:$C0E2 PRG:00E2 20 4F CC + ldx #$01 ; CPU:$C0E5 PRG:00E5 A2 01 +; ----------------------------------------------------------------------------- +; Routine: PollControllerShiftRegister +; Global: Rotates the freshly latched controller byte through carry, three bits per iteration, branching out on each one. This is the bit-by-bit decode of the standard A/B/Select/Start/Up/Down/Left/Right order. +; Local: Continues through eight bits, then returns with the carry state consumed. +; Parameters: X selects the byte in the button array. +; Returns: Carry holds the last shifted-out bit. +; Clobbers: A, X, carry; P1Buttons and its aliases. +; ----------------------------------------------------------------------------- +PollControllerShiftRegister: + rol Zp40,x ; CPU:$C0E7 PRG:00E7 36 40 + rol Zp40,x ; CPU:$C0E9 PRG:00E9 36 40 + rol Zp40,x ; CPU:$C0EB PRG:00EB 36 40 + bcs UpdateButtonMarker ; CPU:$C0ED PRG:00ED B0 46 + rol Zp40,x ; CPU:$C0EF PRG:00EF 36 40 + bcs DispatchOnMarkerValue ; CPU:$C0F1 PRG:00F1 B0 1E + dex ; CPU:$C0F3 PRG:00F3 CA + bmi IncrementFrameCounter ; CPU:$C0F4 PRG:00F4 30 03 + jmp $C0E7 ; CPU:$C0F6 PRG:00F6 4C E7 C0 +; ----------------------------------------------------------------------------- +; Routine: IncrementFrameCounter +; Global: Advances the 16-bit frame counter: increments the low byte and carries into the high byte on wrap. +; Local: Falls through to CheckFrameCounterLimit. +; Parameters: None. +; Returns: Counter advanced by one frame. +; Clobbers: FrameCounterLo/Hi; Z and N flags. +; ----------------------------------------------------------------------------- +IncrementFrameCounter: + inc Zp54 ; CPU:$C0F9 PRG:00F9 E6 54 + bne CheckFrameCounterLimit ; CPU:$C0FB PRG:00FB D0 02 + inc Zp53 ; CPU:$C0FD PRG:00FD E6 53 +; ----------------------------------------------------------------------------- +; Routine: CheckFrameCounterLimit +; Global: Compares the low byte against $00 and the high byte against $38, i.e. a $3800-frame timeout, and restarts the test when it expires. +; Local: Branches to ContinueFrame normally, or RestartInit on timeout. +; Parameters: None. +; Returns: Z flag reflects the comparison. +; Clobbers: A. +; ----------------------------------------------------------------------------- +CheckFrameCounterLimit: + lda #$00 ; CPU:$C0FF PRG:00FF A9 00 + cmp Zp54 ; CPU:$C101 PRG:0101 C5 54 + bne ContinueFrame ; CPU:$C103 PRG:0103 D0 06 + lda #$38 ; CPU:$C105 PRG:0105 A9 38 + cmp Zp53 ; CPU:$C107 PRG:0107 C5 53 + beq RestartInit ; CPU:$C109 PRG:0109 F0 03 +; ----------------------------------------------------------------------------- +; Routine: ContinueFrame +; Global: Tail of the frame: jumps back to the top of MainGameLoop. +; Local: Jumps; does not return. +; Parameters: None. +; Returns: Nothing. +; Clobbers: None. +; ----------------------------------------------------------------------------- +ContinueFrame: + jmp $C0DF ; CPU:$C10B PRG:010B 4C DF C0 +; ----------------------------------------------------------------------------- +; Routine: RestartInit +; Global: Jumps back to InitTestScreen after the frame-counter timeout expires. +; Local: Jumps; does not return. +; Parameters: None. +; Returns: Nothing. +; Clobbers: None. +; ----------------------------------------------------------------------------- +RestartInit: + jmp $C055 ; CPU:$C10E PRG:010E 4C 55 C0 +; ----------------------------------------------------------------------------- +; Routine: DispatchOnMarkerValue +; Global: Compares MarkerValue against $70 and $88 and selects one of three test modes, running the marker update path when neither matches. +; Local: Branches into the chosen mode; each mode ends in its own frame loop. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A. +; ----------------------------------------------------------------------------- +DispatchOnMarkerValue: + lda #$70 ; CPU:$C111 PRG:0111 A9 70 + cmp Zp55 ; CPU:$C113 PRG:0113 C5 55 + beq EnterTestMode70 ; CPU:$C115 PRG:0115 F0 12 + lda #$88 ; CPU:$C117 PRG:0117 A9 88 + cmp Zp55 ; CPU:$C119 PRG:0119 C5 55 + beq EnterTestMode88 ; CPU:$C11B PRG:011B F0 12 + lda #$A0 ; CPU:$C11D PRG:011D A9 A0 + cmp Zp55 ; CPU:$C11F PRG:011F C5 55 + beq ExitToInit ; CPU:$C121 PRG:0121 F0 03 + jmp $C0DF ; CPU:$C123 PRG:0123 4C DF C0 +; ----------------------------------------------------------------------------- +; Routine: ExitToInit +; Global: Returns to InitTestScreen to restart the default test screen. +; Local: Jumps; does not return. +; Parameters: None. +; Returns: Nothing. +; Clobbers: None. +; ----------------------------------------------------------------------------- +ExitToInit: + jmp $C055 ; CPU:$C126 PRG:0126 4C 55 C0 +; ----------------------------------------------------------------------------- +; Routine: EnterTestMode70 +; Global: Enters the test mode selected when MarkerValue equals $70: clears OAM, samples the controller, then jumps into the mode's own frame loop. +; Local: Jumps into the mode-70 loop. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +EnterTestMode70: + jsr $C17F ; CPU:$C129 PRG:0129 20 7F C1 + jmp $CB03 ; CPU:$C12C PRG:012C 4C 03 CB +; ----------------------------------------------------------------------------- +; Routine: EnterTestMode88 +; Global: Enters the test mode selected when MarkerValue equals $88. +; Local: Jumps into the mode-88 loop. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +EnterTestMode88: + jsr $C17F ; CPU:$C12F PRG:012F 20 7F C1 + jmp $C23F ; CPU:$C132 PRG:0132 4C 3F C2 +; ----------------------------------------------------------------------------- +; Routine: UpdateButtonMarker +; Global: Loads the marker value appropriate to the current mode and hands it to ApplyMarkerValueEnableAudio. +; Local: Falls through to ApplyMarkerValueEnableAudio. +; Parameters: None. +; Returns: A = marker value to apply. +; Clobbers: A. +; ----------------------------------------------------------------------------- +UpdateButtonMarker: + jsr $CAB1 ; CPU:$C135 PRG:0135 20 B1 CA + lda #$70 ; CPU:$C138 PRG:0138 A9 70 + cmp Zp55 ; CPU:$C13A PRG:013A C5 55 + beq LoadMarkerValue88 ; CPU:$C13C PRG:013C F0 0F + lda #$88 ; CPU:$C13E PRG:013E A9 88 + cmp Zp55 ; CPU:$C140 PRG:0140 C5 55 + beq LoadMarkerValueA0 ; CPU:$C142 PRG:0142 F0 0E + lda #$A0 ; CPU:$C144 PRG:0144 A9 A0 + cmp Zp55 ; CPU:$C146 PRG:0146 C5 55 + beq LoadMarkerValue70 ; CPU:$C148 PRG:0148 F0 0D + jmp $C0DF ; CPU:$C14A PRG:014A 4C DF C0 +; ----------------------------------------------------------------------------- +; Routine: LoadMarkerValue88 +; Global: Loads marker value $88 and tail-jumps to ApplyMarkerValueEnableAudio. One of three tiny thunks that share a single tail. +; Local: Jumps; does not return. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A. +; ----------------------------------------------------------------------------- +LoadMarkerValue88: + lda #$88 ; CPU:$C14D PRG:014D A9 88 + jmp $C15C ; CPU:$C14F PRG:014F 4C 5C C1 +; ----------------------------------------------------------------------------- +; Routine: LoadMarkerValueA0 +; Global: Loads marker value $A0 and tail-jumps to ApplyMarkerValueEnableAudio. +; Local: Jumps; does not return. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A. +; ----------------------------------------------------------------------------- +LoadMarkerValueA0: + lda #$A0 ; CPU:$C152 PRG:0152 A9 A0 + jmp $C15C ; CPU:$C154 PRG:0154 4C 5C C1 +; ----------------------------------------------------------------------------- +; Routine: LoadMarkerValue70 +; Global: Loads marker value $70 and tail-jumps to ApplyMarkerValueEnableAudio. +; Local: Jumps; does not return. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A. +; ----------------------------------------------------------------------------- +LoadMarkerValue70: + lda #$70 ; CPU:$C157 PRG:0157 A9 70 + jmp $C15C ; CPU:$C159 PRG:0159 4C 5C C1 +; ----------------------------------------------------------------------------- +; Routine: ApplyMarkerValueEnableAudio +; Global: Writes the marker value to the first OAM entry and to the PPUCTRL shadow, then enables the APU and writes the sound-enable byte. +; Local: Returns to the caller once audio is enabled. +; Parameters: A = marker value ($70, $88 or $A0). +; Returns: Nothing. +; Clobbers: A; $0200, $4015, PpuCtrlShadow, MarkerValue. +; ----------------------------------------------------------------------------- +ApplyMarkerValueEnableAudio: + sta $0200 ; CPU:$C15C PRG:015C 8D 00 02 + sta Zp55 ; CPU:$C15F PRG:015F 85 55 + lda #$01 ; CPU:$C161 PRG:0161 A9 01 + ora $4015 ; CPU:$C163 PRG:0163 0D 15 40 + sta $4015 ; CPU:$C166 PRG:0166 8D 15 40 + lda #$29 ; CPU:$C169 PRG:0169 A9 29 + sta $4003 ; CPU:$C16B PRG:016B 8D 03 40 + jsr $C17F ; CPU:$C16E PRG:016E 20 7F C1 + jmp $C0DF ; CPU:$C171 PRG:0171 4C DF C0 +; ----------------------------------------------------------------------------- +; Routine: ClearOam +; Global: Fills all 256 bytes of OAM with $F4, parking every sprite below the visible screen. +; Local: Returns to its caller when X wraps. +; Parameters: A = $F4, X = 0 on entry. +; Returns: X wrapped to $00. +; Clobbers: A, X; $0200-$02FF. +; ----------------------------------------------------------------------------- +ClearOam: + lda #$F4 ; CPU:$C174 PRG:0174 A9 F4 + ldx #$00 ; CPU:$C176 PRG:0176 A2 00 +; ----------------------------------------------------------------------------- +; Routine: ClearOamLoop +; Global: Inner loop of ClearOam: one store per X value. +; Local: Loops until X wraps, then returns. +; Parameters: X = OAM index. +; Returns: X wrapped to $00. +; Clobbers: X; $0200-$02FF. +; ----------------------------------------------------------------------------- +ClearOamLoop: + sta $0200,x ; CPU:$C178 PRG:0178 9D 00 02 + inx ; CPU:$C17B PRG:017B E8 + bne ClearOamLoop ; CPU:$C17C PRG:017C D0 FA + rts ; CPU:$C17E PRG:017E 60 +; ----------------------------------------------------------------------------- +; Routine: SampleControllerKeepX +; Global: Waits for vblank, samples the controller, and restores X afterwards so the caller's index survives. +; Local: Returns to the caller with X preserved. +; Parameters: None. +; Returns: Button bits stored; X restored. +; Clobbers: A; stack via pha/pla. +; ----------------------------------------------------------------------------- +SampleControllerKeepX: + txa ; CPU:$C17F PRG:017F 8A + pha ; CPU:$C180 PRG:0180 48 + jsr $CCE2 ; CPU:$C181 PRG:0181 20 E2 CC + jsr $CC4F ; CPU:$C184 PRG:0184 20 4F CC + pla ; CPU:$C187 PRG:0187 68 + tax ; CPU:$C188 PRG:0188 AA + lda #$FF ; CPU:$C189 PRG:0189 A9 FF + and Zp40,x ; CPU:$C18B PRG:018B 35 40 + bne SampleControllerKeepX ; CPU:$C18D PRG:018D D0 F0 +; ----------------------------------------------------------------------------- +; Routine: SampleControllerKeepXAlt +; Global: Alternate controller sample that also preserves X, used by the mode-70 scan which walks all eight buttons. +; Local: Returns with X preserved. +; Parameters: None. +; Returns: Button bits stored. +; Clobbers: A; stack via pha/pla. +; ----------------------------------------------------------------------------- +SampleControllerKeepXAlt: + txa ; CPU:$C18F PRG:018F 8A + pha ; CPU:$C190 PRG:0190 48 + jsr $CCE2 ; CPU:$C191 PRG:0191 20 E2 CC + jsr $CC4F ; CPU:$C194 PRG:0194 20 4F CC + pla ; CPU:$C197 PRG:0197 68 + tax ; CPU:$C198 PRG:0198 AA + lda #$FF ; CPU:$C199 PRG:0199 A9 FF + and Zp40,x ; CPU:$C19B PRG:019B 35 40 + bne SampleControllerKeepXAlt ; CPU:$C19D PRG:019D D0 F0 + rts ; CPU:$C19F PRG:019F 60 +; ----------------------------------------------------------------------------- +; Routine: CopySpriteTemplateTable +; Global: Copies a 32-byte sprite template from ROM at $D6A5 into the OAM shadow at $02E0. +; Local: Falls into CopySpriteTemplateLoop. +; Parameters: None. +; Returns: Nothing. +; Clobbers: X. +; ----------------------------------------------------------------------------- +CopySpriteTemplateTable: + ldx #$1F ; CPU:$C1A0 PRG:01A0 A2 1F +; ----------------------------------------------------------------------------- +; Routine: CopySpriteTemplateLoop +; Global: Byte copy loop for CopySpriteTemplateTable, descending X from $1F. +; Local: Falls through when X goes negative. +; Parameters: X = descending index. +; Returns: X = $FF on exit. +; Clobbers: X; $02E0-$02FF. +; ----------------------------------------------------------------------------- +CopySpriteTemplateLoop: + lda $D6A5,x ; CPU:$C1A2 PRG:01A2 BD A5 D6 + sta $02E0,x ; CPU:$C1A5 PRG:01A5 9D E0 02 + dex ; CPU:$C1A8 PRG:01A8 CA + bpl CopySpriteTemplateLoop ; CPU:$C1A9 PRG:01A9 10 F7 + ldx #$F0 ; CPU:$C1AB PRG:01AB A2 F0 +; ----------------------------------------------------------------------------- +; Routine: ScanAllControllerBits +; Global: Walks every button bit, sampling the controller once per bit to build a latched picture of all eight inputs. +; Local: Returns once all bits have been visited. +; Parameters: None. +; Returns: All button states latched. +; Clobbers: A, X; button state array. +; ----------------------------------------------------------------------------- +ScanAllControllerBits: + jsr $CCE2 ; CPU:$C1AD PRG:01AD 20 E2 CC + txa ; CPU:$C1B0 PRG:01B0 8A + pha ; CPU:$C1B1 PRG:01B1 48 + jsr $CC4F ; CPU:$C1B2 PRG:01B2 20 4F CC + lda #$00 ; CPU:$C1B5 PRG:01B5 A9 00 + cmp Zp40 ; CPU:$C1B7 PRG:01B7 C5 40 + bne UpdateAllOamEntries ; CPU:$C1B9 PRG:01B9 D0 11 + cmp Zp41 ; CPU:$C1BB PRG:01BB C5 41 + bne UpdateAllOamEntries ; CPU:$C1BD PRG:01BD D0 0D + cmp Zp43 ; CPU:$C1BF PRG:01BF C5 43 + bne UpdateAllOamEntries ; CPU:$C1C1 PRG:01C1 D0 09 + cmp Zp44 ; CPU:$C1C3 PRG:01C3 C5 44 + bne UpdateAllOamEntries ; CPU:$C1C5 PRG:01C5 D0 05 + lda #$C0 ; CPU:$C1C7 PRG:01C7 A9 C0 + sta $4015 ; CPU:$C1C9 PRG:01C9 8D 15 40 +; ----------------------------------------------------------------------------- +; Routine: UpdateAllOamEntries +; Global: Calls the per-button OAM updater eight times, once per sprite slot, with the Y offset advancing by $20 each round. +; Local: Returns after all eight slots are written. +; Parameters: None. +; Returns: Nothing. +; Clobbers: X, Y; $0200-$02FF. +; ----------------------------------------------------------------------------- +UpdateAllOamEntries: + ldy #$00 ; CPU:$C1CC PRG:01CC A0 00 + ldx #$00 ; CPU:$C1CE PRG:01CE A2 00 + jsr $C361 ; CPU:$C1D0 PRG:01D0 20 61 C3 + ldy #$20 ; CPU:$C1D3 PRG:01D3 A0 20 + inx ; CPU:$C1D5 PRG:01D5 E8 + jsr $C361 ; CPU:$C1D6 PRG:01D6 20 61 C3 + ldy #$40 ; CPU:$C1D9 PRG:01D9 A0 40 + inx ; CPU:$C1DB PRG:01DB E8 + inx ; CPU:$C1DC PRG:01DC E8 + jsr $C361 ; CPU:$C1DD PRG:01DD 20 61 C3 + ldy #$60 ; CPU:$C1E0 PRG:01E0 A0 60 + inx ; CPU:$C1E2 PRG:01E2 E8 + jsr $C361 ; CPU:$C1E3 PRG:01E3 20 61 C3 + pla ; CPU:$C1E6 PRG:01E6 68 + tax ; CPU:$C1E7 PRG:01E7 AA + dex ; CPU:$C1E8 PRG:01E8 CA + bne ScanAllControllerBits ; CPU:$C1E9 PRG:01E9 D0 C2 + jmp $C055 ; CPU:$C1EB PRG:01EB 4C 55 C0 +; ----------------------------------------------------------------------------- +; Routine: PrepareButtonOam +; Global: Copies the button OAM template from ROM at $D6C5 into $02E0, preserving the caller's X and Y across the controller sample. +; Local: Returns to the caller with X and Y restored. +; Parameters: None. +; Returns: OAM shadow primed. +; Clobbers: A, X, Y; stack via pha/pla. +; ----------------------------------------------------------------------------- +PrepareButtonOam: + tya ; CPU:$C1EE PRG:01EE 98 + pha ; CPU:$C1EF PRG:01EF 48 + txa ; CPU:$C1F0 PRG:01F0 8A + pha ; CPU:$C1F1 PRG:01F1 48 + ldx #$1F ; CPU:$C1F2 PRG:01F2 A2 1F +; ----------------------------------------------------------------------------- +; Routine: CopyButtonOamLoop +; Global: Descending byte copy for PrepareButtonOam. +; Local: Falls through when X goes negative. +; Parameters: X = descending index. +; Returns: X = $FF on exit. +; Clobbers: X; $02E0-$02FF. +; ----------------------------------------------------------------------------- +CopyButtonOamLoop: + lda $D6C5,x ; CPU:$C1F4 PRG:01F4 BD C5 D6 + sta $02E0,x ; CPU:$C1F7 PRG:01F7 9D E0 02 + dex ; CPU:$C1FA PRG:01FA CA + bpl CopyButtonOamLoop ; CPU:$C1FB PRG:01FB 10 F7 +; ----------------------------------------------------------------------------- +; Routine: ReadButtonBitUpdateOam +; Global: Tests one controller bit and updates the matching OAM entry accordingly. +; Local: Returns to its caller. +; Parameters: X = button index. +; Returns: Nothing. +; Clobbers: A, X; $0200-$02FF. +; ----------------------------------------------------------------------------- +ReadButtonBitUpdateOam: + jsr $CCE2 ; CPU:$C1FD PRG:01FD 20 E2 CC + jsr $CC4F ; CPU:$C200 PRG:0200 20 4F CC + pla ; CPU:$C203 PRG:0203 68 + tax ; CPU:$C204 PRG:0204 AA + lda #$00 ; CPU:$C205 PRG:0205 A9 00 + cmp Zp40,x ; CPU:$C207 PRG:0207 D5 40 + beq ResetButtonStateAndOam ; CPU:$C209 PRG:0209 F0 05 + txa ; CPU:$C20B PRG:020B 8A + pha ; CPU:$C20C PRG:020C 48 + jmp $C1FD ; CPU:$C20D PRG:020D 4C FD C1 +; ----------------------------------------------------------------------------- +; Routine: ResetButtonStateAndOam +; Global: Clears the button state array, samples the controller, and refills the OAM shadow with $F4 so the display starts from a known state. +; Local: Returns to its caller. +; Parameters: None. +; Returns: Button state cleared; OAM shadow blanked. +; Clobbers: A, X; $0200-$02FF, button state array. +; ----------------------------------------------------------------------------- +ResetButtonStateAndOam: + lda #$00 ; CPU:$C210 PRG:0210 A9 00 + sta Zp4E,x ; CPU:$C212 PRG:0212 95 4E + txa ; CPU:$C214 PRG:0214 8A + pha ; CPU:$C215 PRG:0215 48 + ldx #$1F ; CPU:$C216 PRG:0216 A2 1F + lda #$F4 ; CPU:$C218 PRG:0218 A9 F4 +; ----------------------------------------------------------------------------- +; Routine: FillOamShadowLoop +; Global: Descending fill of the OAM shadow with a constant. +; Local: Falls through when X goes negative. +; Parameters: X = descending index; A = fill value. +; Returns: X = $FF on exit. +; Clobbers: X; $02E0-$02FF. +; ----------------------------------------------------------------------------- +FillOamShadowLoop: + sta $02E0,x ; CPU:$C21A PRG:021A 9D E0 02 + dex ; CPU:$C21D PRG:021D CA + bpl FillOamShadowLoop ; CPU:$C21E PRG:021E 10 FA + pla ; CPU:$C220 PRG:0220 68 + tax ; CPU:$C221 PRG:0221 AA + pla ; CPU:$C222 PRG:0222 68 + tay ; CPU:$C223 PRG:0223 A8 + lda #$03 ; CPU:$C224 PRG:0224 A9 03 + sta $0202,y ; CPU:$C226 PRG:0226 99 02 02 + sta $0206,y ; CPU:$C229 PRG:0229 99 06 02 + sta $020A,y ; CPU:$C22C PRG:022C 99 0A 02 + sta $020E,y ; CPU:$C22F PRG:022F 99 0E 02 + sta $0212,y ; CPU:$C232 PRG:0232 99 12 02 + sta $0216,y ; CPU:$C235 PRG:0235 99 16 02 + sta $021A,y ; CPU:$C238 PRG:0238 99 1A 02 + sta $021E,y ; CPU:$C23B PRG:023B 99 1E 02 + rts ; CPU:$C23E PRG:023E 60 +; ----------------------------------------------------------------------------- +; Routine: InitTestScreen88 +; Global: Sets up the mode-88 screen: writes a $FF pattern into $6000, clears RAM with the screen pattern, and primes the OAM from a ROM table. +; Local: Falls into the mode-88 frame loop. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y; $6000, $0000-$05FF, $0200-$02FF. +; ----------------------------------------------------------------------------- +InitTestScreen88: + jsr $CD2F ; CPU:$C23F PRG:023F 20 2F CD + ldx #$00 ; CPU:$C242 PRG:0242 A2 00 + lda #$FF ; CPU:$C244 PRG:0244 A9 FF +; ----------------------------------------------------------------------------- +; Routine: WriteRamPatternLoop +; Global: Writes a constant pattern into $6000 for six bytes. +; Local: Returns to its caller once X reaches six. +; Parameters: X = index; A = pattern byte. +; Returns: X = six. +; Clobbers: A, X; $6000-$6005. +; ----------------------------------------------------------------------------- +WriteRamPatternLoop: + sta $6000,x ; CPU:$C246 PRG:0246 9D 00 60 + inx ; CPU:$C249 PRG:0249 E8 + cpx #$06 ; CPU:$C24A PRG:024A E0 06 + bne WriteRamPatternLoop ; CPU:$C24C PRG:024C D0 F8 + lda #$00 ; CPU:$C24E PRG:024E A9 00 + ldx #$00 ; CPU:$C250 PRG:0250 A2 00 +; ----------------------------------------------------------------------------- +; Routine: ClearRamPass3Loop +; Global: Third RAM-clearing pass, used by mode 88. +; Local: Returns to its caller when X wraps. +; Parameters: X = page offset; A = fill value. +; Returns: X wrapped to $00. +; Clobbers: A, X; $0000-$05FF. +; ----------------------------------------------------------------------------- +ClearRamPass3Loop: + sta Zp00,x ; CPU:$C252 PRG:0252 95 00 + sta $0100,x ; CPU:$C254 PRG:0254 9D 00 01 + lda #$F4 ; CPU:$C257 PRG:0257 A9 F4 + sta $0200,x ; CPU:$C259 PRG:0259 9D 00 02 + lda #$00 ; CPU:$C25C PRG:025C A9 00 + sta $0300,x ; CPU:$C25E PRG:025E 9D 00 03 + sta $0400,x ; CPU:$C261 PRG:0261 9D 00 04 + sta $0500,x ; CPU:$C264 PRG:0264 9D 00 05 + sta $0600,x ; CPU:$C267 PRG:0267 9D 00 06 + inx ; CPU:$C26A PRG:026A E8 + bne ClearRamPass3Loop ; CPU:$C26B PRG:026B D0 E5 + lda #$10 ; CPU:$C26D PRG:026D A9 10 + sta $2000 ; CPU:$C26F PRG:026F 8D 00 20 + sta ZpEF ; CPU:$C272 PRG:0272 85 EF + lda #$00 ; CPU:$C274 PRG:0274 A9 00 + sta $2001 ; CPU:$C276 PRG:0276 8D 01 20 + sta ZpEE ; CPU:$C279 PRG:0279 85 EE + lda #$20 ; CPU:$C27B PRG:027B A9 20 + ldx #$24 ; CPU:$C27D PRG:027D A2 24 + ldy #$00 ; CPU:$C27F PRG:027F A0 00 + jsr $CDEE ; CPU:$C281 PRG:0281 20 EE CD + jsr $CD3F ; CPU:$C284 PRG:0284 20 3F CD + asl ZpCF ; CPU:$C287 PRG:0287 06 CF + jsr $CE3C ; CPU:$C289 PRG:0289 20 3C CE + jsr $CD3F ; CPU:$C28C PRG:028C 20 3F CD + sbc ZpD1,x ; CPU:$C28F PRG:028F F5 D1 + jsr $CE3C ; CPU:$C291 PRG:0291 20 3C CE + lda #$51 ; CPU:$C294 PRG:0294 A9 51 + sta $0300 ; CPU:$C296 PRG:0296 8D 00 03 + lda #$22 ; CPU:$C299 PRG:0299 A9 22 + ldx #$28 ; CPU:$C29B PRG:029B A2 28 + jsr $CE98 ; CPU:$C29D PRG:029D 20 98 CE + .byte $AF, $D4, $20 ; CPU:$C2A0 PRG:02A0 AF D4 20 -- lax $20D4 (undocumented; ca65 cannot encode) + .byte $74, $C1 ; CPU:$C2A3 PRG:02A3 74 C1 -- nop ZpC1,x (undocumented; ca65 cannot encode) + ldx #$DF ; CPU:$C2A5 PRG:02A5 A2 DF +; ----------------------------------------------------------------------------- +; Routine: CopyOamFromTable +; Global: Copies a ROM sprite table into the live OAM. +; Local: Falls through when X reaches zero. +; Parameters: X = index; A = table base. +; Returns: X wrapped to $00. +; Clobbers: A, X; $0200-$02FF. +; ----------------------------------------------------------------------------- +CopyOamFromTable: + lda $D4E3,x ; CPU:$C2A7 PRG:02A7 BD E3 D4 + sta $0200,x ; CPU:$C2AA PRG:02AA 9D 00 02 + dex ; CPU:$C2AD PRG:02AD CA + bne CopyOamFromTable ; CPU:$C2AE PRG:02AE D0 F7 + lda $D4E3,x ; CPU:$C2B0 PRG:02B0 BD E3 D4 + sta $0200,x ; CPU:$C2B3 PRG:02B3 9D 00 02 + lda #$FF ; CPU:$C2B6 PRG:02B6 A9 FF + sta Zp6A ; CPU:$C2B8 PRG:02B8 85 6A + lda #$00 ; CPU:$C2BA PRG:02BA A9 00 + sta Zp4E ; CPU:$C2BC PRG:02BC 85 4E + sta Zp4F ; CPU:$C2BE PRG:02BE 85 4F + sta Zp51 ; CPU:$C2C0 PRG:02C0 85 51 + sta Zp52 ; CPU:$C2C2 PRG:02C2 85 52 + sta Zp54 ; CPU:$C2C4 PRG:02C4 85 54 + sta Zp53 ; CPU:$C2C6 PRG:02C6 85 53 + sta Zp60 ; CPU:$C2C8 PRG:02C8 85 60 + sta Zp5B ; CPU:$C2CA PRG:02CA 85 5B + sta Zp56 ; CPU:$C2CC PRG:02CC 85 56 + sta Zp61 ; CPU:$C2CE PRG:02CE 85 61 + sta Zp5C ; CPU:$C2D0 PRG:02D0 85 5C + sta Zp57 ; CPU:$C2D2 PRG:02D2 85 57 + sta Zp65 ; CPU:$C2D4 PRG:02D4 85 65 + sta Zp66 ; CPU:$C2D6 PRG:02D6 85 66 + sta Zp68 ; CPU:$C2D8 PRG:02D8 85 68 + sta Zp69 ; CPU:$C2DA PRG:02DA 85 69 + lda #$BF ; CPU:$C2DC PRG:02DC A9 BF + sta $4000 ; CPU:$C2DE PRG:02DE 8D 00 40 + jsr $CD39 ; CPU:$C2E1 PRG:02E1 20 39 CD +; ----------------------------------------------------------------------------- +; Routine: PollControllerCountFrames +; Global: Samples the controller and counts consecutive frames, branching once ButtonHoldCounter reaches $0F. +; Local: Falls through to UpdateAllButtonMarkers. +; Parameters: None. +; Returns: Hold counter advanced. +; Clobbers: A, X; ButtonHoldCounter. +; ----------------------------------------------------------------------------- +PollControllerCountFrames: + jsr $CCE2 ; CPU:$C2E4 PRG:02E4 20 E2 CC + jsr $CC4F ; CPU:$C2E7 PRG:02E7 20 4F CC + inc Zp6A ; CPU:$C2EA PRG:02EA E6 6A + lda #$0F ; CPU:$C2EC PRG:02EC A9 0F + cmp Zp6A ; CPU:$C2EE PRG:02EE C5 6A + beq UpdateAllButtonMarkers ; CPU:$C2F0 PRG:02F0 F0 03 + jmp $C2FE ; CPU:$C2F2 PRG:02F2 4C FE C2 +; ----------------------------------------------------------------------------- +; Routine: UpdateAllButtonMarkers +; Global: Calls each MarkerUpdateN group in turn so every button indicator is refreshed. +; Local: Returns to the caller after all twelve groups. +; Parameters: None. +; Returns: All indicators updated. +; Clobbers: A; OAM $0285-$0351. +; ----------------------------------------------------------------------------- +UpdateAllButtonMarkers: + jsr $C524 ; CPU:$C2F5 PRG:02F5 20 24 C5 + jsr $C7D7 ; CPU:$C2F8 PRG:02F8 20 D7 C7 + jsr $CA8A ; CPU:$C2FB PRG:02FB 20 8A CA +; ----------------------------------------------------------------------------- +; Routine: CheckAnyButtonHeld +; Global: Tests the controller byte against each button mask and branches if any are held. +; Local: Branches to UpdateOamFromButtons when a button is active. +; Parameters: None. +; Returns: Z flag reflects the test. +; Clobbers: A. +; ----------------------------------------------------------------------------- +CheckAnyButtonHeld: + lda #$00 ; CPU:$C2FE PRG:02FE A9 00 + cmp Zp40 ; CPU:$C300 PRG:0300 C5 40 + bne UpdateOamFromButtons ; CPU:$C302 PRG:0302 D0 11 + cmp Zp41 ; CPU:$C304 PRG:0304 C5 41 + bne UpdateOamFromButtons ; CPU:$C306 PRG:0306 D0 0D + cmp Zp43 ; CPU:$C308 PRG:0308 C5 43 + bne UpdateOamFromButtons ; CPU:$C30A PRG:030A D0 09 + cmp Zp44 ; CPU:$C30C PRG:030C C5 44 + bne UpdateOamFromButtons ; CPU:$C30E PRG:030E D0 05 + lda #$C0 ; CPU:$C310 PRG:0310 A9 C0 + sta $4015 ; CPU:$C312 PRG:0312 8D 15 40 +; ----------------------------------------------------------------------------- +; Routine: UpdateOamFromButtons +; Global: Writes OAM entries for whichever buttons mode 88 sees as held. +; Local: Returns to the mode-88 frame loop. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y; $0200-$02FF. +; ----------------------------------------------------------------------------- +UpdateOamFromButtons: + ldy #$00 ; CPU:$C315 PRG:0315 A0 00 + ldx #$00 ; CPU:$C317 PRG:0317 A2 00 + jsr $C361 ; CPU:$C319 PRG:0319 20 61 C3 + ldy #$20 ; CPU:$C31C PRG:031C A0 20 + inx ; CPU:$C31E PRG:031E E8 + jsr $C361 ; CPU:$C31F PRG:031F 20 61 C3 + ldy #$40 ; CPU:$C322 PRG:0322 A0 40 + inx ; CPU:$C324 PRG:0324 E8 + inx ; CPU:$C325 PRG:0325 E8 + jsr $C361 ; CPU:$C326 PRG:0326 20 61 C3 + ldy #$60 ; CPU:$C329 PRG:0329 A0 60 + inx ; CPU:$C32B PRG:032B E8 + jsr $C361 ; CPU:$C32C PRG:032C 20 61 C3 + lda #$FF ; CPU:$C32F PRG:032F A9 FF + cmp Zp4E ; CPU:$C331 PRG:0331 C5 4E + bne IncrementFrameCounterAlt ; CPU:$C333 PRG:0333 D0 0F + cmp Zp4F ; CPU:$C335 PRG:0335 C5 4F + bne IncrementFrameCounterAlt ; CPU:$C337 PRG:0337 D0 0B + cmp Zp51 ; CPU:$C339 PRG:0339 C5 51 + bne IncrementFrameCounterAlt ; CPU:$C33B PRG:033B D0 07 + cmp Zp52 ; CPU:$C33D PRG:033D C5 52 + bne IncrementFrameCounterAlt ; CPU:$C33F PRG:033F D0 03 + jmp $C1A0 ; CPU:$C341 PRG:0341 4C A0 C1 +; ----------------------------------------------------------------------------- +; Routine: IncrementFrameCounterAlt +; Global: Mode-88 copy of the 16-bit frame counter increment. +; Local: Falls through to CheckFrameCounterLimitAlt. +; Parameters: None. +; Returns: Counter advanced. +; Clobbers: FrameCounterLo/Hi. +; ----------------------------------------------------------------------------- +IncrementFrameCounterAlt: + inc Zp54 ; CPU:$C344 PRG:0344 E6 54 + bne CheckFrameCounterLimitAlt ; CPU:$C346 PRG:0346 D0 02 + inc Zp53 ; CPU:$C348 PRG:0348 E6 53 +; ----------------------------------------------------------------------------- +; Routine: CheckFrameCounterLimitAlt +; Global: Mode-88 copy of the frame-counter timeout test. +; Local: Branches onward or exits to InitTestScreen. +; Parameters: None. +; Returns: Z flag reflects the comparison. +; Clobbers: A. +; ----------------------------------------------------------------------------- +CheckFrameCounterLimitAlt: + lda #$00 ; CPU:$C34A PRG:034A A9 00 + cmp Zp54 ; CPU:$C34C PRG:034C C5 54 + bne SetBurstWriteIndex ; CPU:$C34E PRG:034E D0 06 + lda #$38 ; CPU:$C350 PRG:0350 A9 38 + cmp Zp53 ; CPU:$C352 PRG:0352 C5 53 + beq ExitToInitAlt ; CPU:$C354 PRG:0354 F0 08 +; ----------------------------------------------------------------------------- +; Routine: SetBurstWriteIndex +; Global: Stores the burst command index $22 so the next VRAM burst starts from the right entry. +; Local: Jumps back into the mode-88 frame loop. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A; $0302. +; ----------------------------------------------------------------------------- +SetBurstWriteIndex: + lda #$22 ; CPU:$C356 PRG:0356 A9 22 + sta $0302 ; CPU:$C358 PRG:0358 8D 02 03 + jmp $C2E4 ; CPU:$C35B PRG:035B 4C E4 C2 +; ----------------------------------------------------------------------------- +; Routine: ExitToInitAlt +; Global: Jumps back to InitTestScreen from the mode-88 loop. +; Local: Jumps; does not return. +; Parameters: None. +; Returns: Nothing. +; Clobbers: None. +; ----------------------------------------------------------------------------- +ExitToInitAlt: + jmp $C055 ; CPU:$C35E PRG:035E 4C 55 C0 +; ----------------------------------------------------------------------------- +; Routine: DispatchButtonBits +; Global: Walks the eight bits of the controller byte and calls the matching handler for each one that is set, writing an OAM entry and triggering an APU write per pressed button. +; Local: Returns to FinishButtonDispatch once all eight bits are visited. +; Parameters: X = button index; Y = OAM offset. +; Returns: Nothing. +; Clobbers: A, X, Y; $0200-$02FF, $4015. +; ----------------------------------------------------------------------------- +DispatchButtonBits: + lda Zp40,x ; CPU:$C361 PRG:0361 B5 40 + pha ; CPU:$C363 PRG:0363 48 + jsr $CAB8 ; CPU:$C364 PRG:0364 20 B8 CA + rol Zp40,x ; CPU:$C367 PRG:0367 36 40 + bcc ButtonBit0_Test ; CPU:$C369 PRG:0369 90 0C + ror Zp40,x ; CPU:$C36B PRG:036B 76 40 + rol Zp65,x ; CPU:$C36D PRG:036D 36 65 + bcs ButtonBit1_Test ; CPU:$C36F PRG:036F B0 0F + inc Zp56,x ; CPU:$C371 PRG:0371 F6 56 + sec ; CPU:$C373 PRG:0373 38 + jmp $C380 ; CPU:$C374 PRG:0374 4C 80 C3 +; ----------------------------------------------------------------------------- +; Routine: ButtonBit0_Test +; Global: Tests controller bit 0 of the button byte by rotating it through carry, and branches to the next bit when clear. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ButtonBit0_Test: + ror Zp40,x ; CPU:$C377 PRG:0377 76 40 + rol Zp65,x ; CPU:$C379 PRG:0379 36 65 + bcc ButtonBit1_Test ; CPU:$C37B PRG:037B 90 03 + inc Zp56,x ; CPU:$C37D PRG:037D F6 56 + clc ; CPU:$C37F PRG:037F 18 +; ----------------------------------------------------------------------------- +; Routine: ButtonBit1_Test +; Global: Tests controller bit 1 of the button byte by rotating it through carry, and branches to the next bit when clear. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ButtonBit1_Test: + ror Zp65,x ; CPU:$C380 PRG:0380 76 65 + rol Zp40,x ; CPU:$C382 PRG:0382 36 40 + bcc ButtonBit2_Test ; CPU:$C384 PRG:0384 90 24 + lda #$01 ; CPU:$C386 PRG:0386 A9 01 + and $4015 ; CPU:$C388 PRG:0388 2D 15 40 + bne HandleButtonPress1 ; CPU:$C38B PRG:038B D0 0F + lda #$01 ; CPU:$C38D PRG:038D A9 01 + sta $4015 ; CPU:$C38F PRG:038F 8D 15 40 + lda #$FD ; CPU:$C392 PRG:0392 A9 FD + sta $4002 ; CPU:$C394 PRG:0394 8D 02 40 + lda #$29 ; CPU:$C397 PRG:0397 A9 29 + sta $4003 ; CPU:$C399 PRG:0399 8D 03 40 +; ----------------------------------------------------------------------------- +; Routine: HandleButtonPress1 +; Global: Handler for controller bit 1: writes an OAM tile and attribute entry for the pressed button and issues the matching APU write. +; Local: RTS once the OAM entry and APU write are done. +; Parameters: X = button index; Y = OAM offset. +; Returns: Nothing. +; Clobbers: A, X, Y; $0200-$02FF, $4015. +; ----------------------------------------------------------------------------- +HandleButtonPress1: + lda #$02 ; CPU:$C39C PRG:039C A9 02 + sta $0202,y ; CPU:$C39E PRG:039E 99 02 02 + lda #$80 ; CPU:$C3A1 PRG:03A1 A9 80 + ora Zp4E,x ; CPU:$C3A3 PRG:03A3 15 4E + sta Zp4E,x ; CPU:$C3A5 PRG:03A5 95 4E + jsr $CAB1 ; CPU:$C3A7 PRG:03A7 20 B1 CA +; ----------------------------------------------------------------------------- +; Routine: ButtonBit2_Test +; Global: Tests controller bit 2 of the button byte by rotating it through carry, and branches to the next bit when clear. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ButtonBit2_Test: + rol Zp40,x ; CPU:$C3AA PRG:03AA 36 40 + bcc ButtonBit3_Test ; CPU:$C3AC PRG:03AC 90 0E + ror Zp40,x ; CPU:$C3AE PRG:03AE 76 40 + rol Zp65,x ; CPU:$C3B0 PRG:03B0 36 65 + rol Zp65,x ; CPU:$C3B2 PRG:03B2 36 65 + bcs ButtonBit4_Test ; CPU:$C3B4 PRG:03B4 B0 11 + inc Zp5B,x ; CPU:$C3B6 PRG:03B6 F6 5B + sec ; CPU:$C3B8 PRG:03B8 38 + jmp $C3C7 ; CPU:$C3B9 PRG:03B9 4C C7 C3 +; ----------------------------------------------------------------------------- +; Routine: ButtonBit3_Test +; Global: Tests controller bit 3 of the button byte by rotating it through carry, and branches to the next bit when clear. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ButtonBit3_Test: + ror Zp40,x ; CPU:$C3BC PRG:03BC 76 40 + rol Zp65,x ; CPU:$C3BE PRG:03BE 36 65 + rol Zp65,x ; CPU:$C3C0 PRG:03C0 36 65 + bcc ButtonBit4_Test ; CPU:$C3C2 PRG:03C2 90 03 + inc Zp5B,x ; CPU:$C3C4 PRG:03C4 F6 5B + clc ; CPU:$C3C6 PRG:03C6 18 +; ----------------------------------------------------------------------------- +; Routine: ButtonBit4_Test +; Global: Tests controller bit 4 of the button byte by rotating it through carry, and branches to the next bit when clear. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ButtonBit4_Test: + ror Zp65,x ; CPU:$C3C7 PRG:03C7 76 65 + ror Zp65,x ; CPU:$C3C9 PRG:03C9 76 65 + rol Zp40,x ; CPU:$C3CB PRG:03CB 36 40 + bcc ButtonBit5_Test ; CPU:$C3CD PRG:03CD 90 24 + lda #$01 ; CPU:$C3CF PRG:03CF A9 01 + and $4015 ; CPU:$C3D1 PRG:03D1 2D 15 40 + bne HandleButtonPress2 ; CPU:$C3D4 PRG:03D4 D0 0F + lda #$01 ; CPU:$C3D6 PRG:03D6 A9 01 + sta $4015 ; CPU:$C3D8 PRG:03D8 8D 15 40 + lda #$C5 ; CPU:$C3DB PRG:03DB A9 C5 + sta $4002 ; CPU:$C3DD PRG:03DD 8D 02 40 + lda #$29 ; CPU:$C3E0 PRG:03E0 A9 29 + sta $4003 ; CPU:$C3E2 PRG:03E2 8D 03 40 +; ----------------------------------------------------------------------------- +; Routine: HandleButtonPress2 +; Global: Handler for controller bit 2: writes an OAM tile and attribute entry for the pressed button and issues the matching APU write. +; Local: RTS once the OAM entry and APU write are done. +; Parameters: X = button index; Y = OAM offset. +; Returns: Nothing. +; Clobbers: A, X, Y; $0200-$02FF, $4015. +; ----------------------------------------------------------------------------- +HandleButtonPress2: + lda #$02 ; CPU:$C3E5 PRG:03E5 A9 02 + sta $0206,y ; CPU:$C3E7 PRG:03E7 99 06 02 + lda #$40 ; CPU:$C3EA PRG:03EA A9 40 + ora Zp4E,x ; CPU:$C3EC PRG:03EC 15 4E + sta Zp4E,x ; CPU:$C3EE PRG:03EE 95 4E + jsr $CAB1 ; CPU:$C3F0 PRG:03F0 20 B1 CA +; ----------------------------------------------------------------------------- +; Routine: ButtonBit5_Test +; Global: Tests controller bit 5 of the button byte by rotating it through carry, and branches to the next bit when clear. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ButtonBit5_Test: + rol Zp40,x ; CPU:$C3F3 PRG:03F3 36 40 + bcc ButtonBit6_Test ; CPU:$C3F5 PRG:03F5 90 24 + lda #$01 ; CPU:$C3F7 PRG:03F7 A9 01 + and $4015 ; CPU:$C3F9 PRG:03F9 2D 15 40 + bne HandleButtonPress3 ; CPU:$C3FC PRG:03FC D0 0F + lda #$01 ; CPU:$C3FE PRG:03FE A9 01 + sta $4015 ; CPU:$C400 PRG:0400 8D 15 40 + lda #$7D ; CPU:$C403 PRG:0403 A9 7D + sta $4002 ; CPU:$C405 PRG:0405 8D 02 40 + lda #$29 ; CPU:$C408 PRG:0408 A9 29 + sta $4003 ; CPU:$C40A PRG:040A 8D 03 40 +; ----------------------------------------------------------------------------- +; Routine: HandleButtonPress3 +; Global: Handler for controller bit 3: writes an OAM tile and attribute entry for the pressed button and issues the matching APU write. +; Local: RTS once the OAM entry and APU write are done. +; Parameters: X = button index; Y = OAM offset. +; Returns: Nothing. +; Clobbers: A, X, Y; $0200-$02FF, $4015. +; ----------------------------------------------------------------------------- +HandleButtonPress3: + lda #$02 ; CPU:$C40D PRG:040D A9 02 + sta $020E,y ; CPU:$C40F PRG:040F 99 0E 02 + lda #$20 ; CPU:$C412 PRG:0412 A9 20 + ora Zp4E,x ; CPU:$C414 PRG:0414 15 4E + sta Zp4E,x ; CPU:$C416 PRG:0416 95 4E + jsr $CAB1 ; CPU:$C418 PRG:0418 20 B1 CA +; ----------------------------------------------------------------------------- +; Routine: ButtonBit6_Test +; Global: Tests controller bit 6 of the button byte by rotating it through carry, and branches to the next bit when clear. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ButtonBit6_Test: + rol Zp40,x ; CPU:$C41B PRG:041B 36 40 + bcc ButtonBit7_Test ; CPU:$C41D PRG:041D 90 10 + ror Zp40,x ; CPU:$C41F PRG:041F 76 40 + rol Zp65,x ; CPU:$C421 PRG:0421 36 65 + rol Zp65,x ; CPU:$C423 PRG:0423 36 65 + rol Zp65,x ; CPU:$C425 PRG:0425 36 65 + bcs ButtonBit8_Test ; CPU:$C427 PRG:0427 B0 13 + inc Zp60,x ; CPU:$C429 PRG:0429 F6 60 + sec ; CPU:$C42B PRG:042B 38 + jmp $C43C ; CPU:$C42C PRG:042C 4C 3C C4 +; ----------------------------------------------------------------------------- +; Routine: ButtonBit7_Test +; Global: Tests controller bit 7 of the button byte by rotating it through carry, and branches to the next bit when clear. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ButtonBit7_Test: + ror Zp40,x ; CPU:$C42F PRG:042F 76 40 + rol Zp65,x ; CPU:$C431 PRG:0431 36 65 + rol Zp65,x ; CPU:$C433 PRG:0433 36 65 + rol Zp65,x ; CPU:$C435 PRG:0435 36 65 + bcc ButtonBit8_Test ; CPU:$C437 PRG:0437 90 03 + inc Zp60,x ; CPU:$C439 PRG:0439 F6 60 + clc ; CPU:$C43B PRG:043B 18 +; ----------------------------------------------------------------------------- +; Routine: ButtonBit8_Test +; Global: Tests controller bit 8 of the button byte by rotating it through carry, and branches to the next bit when clear. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ButtonBit8_Test: + ror Zp65,x ; CPU:$C43C PRG:043C 76 65 + ror Zp65,x ; CPU:$C43E PRG:043E 76 65 + ror Zp65,x ; CPU:$C440 PRG:0440 76 65 + rol Zp40,x ; CPU:$C442 PRG:0442 36 40 + bcc ButtonBit9_Test ; CPU:$C444 PRG:0444 90 24 + lda #$01 ; CPU:$C446 PRG:0446 A9 01 + and $4015 ; CPU:$C448 PRG:0448 2D 15 40 + bne HandleButtonPress4 ; CPU:$C44B PRG:044B D0 0F + lda #$01 ; CPU:$C44D PRG:044D A9 01 + sta $4015 ; CPU:$C44F PRG:044F 8D 15 40 + lda #$94 ; CPU:$C452 PRG:0452 A9 94 + sta $4002 ; CPU:$C454 PRG:0454 8D 02 40 + lda #$29 ; CPU:$C457 PRG:0457 A9 29 + sta $4003 ; CPU:$C459 PRG:0459 8D 03 40 +; ----------------------------------------------------------------------------- +; Routine: HandleButtonPress4 +; Global: Handler for controller bit 4: writes an OAM tile and attribute entry for the pressed button and issues the matching APU write. +; Local: RTS once the OAM entry and APU write are done. +; Parameters: X = button index; Y = OAM offset. +; Returns: Nothing. +; Clobbers: A, X, Y; $0200-$02FF, $4015. +; ----------------------------------------------------------------------------- +HandleButtonPress4: + lda #$02 ; CPU:$C45C PRG:045C A9 02 + sta $020A,y ; CPU:$C45E PRG:045E 99 0A 02 + lda #$10 ; CPU:$C461 PRG:0461 A9 10 + ora Zp4E,x ; CPU:$C463 PRG:0463 15 4E + sta Zp4E,x ; CPU:$C465 PRG:0465 95 4E + jsr $CAB1 ; CPU:$C467 PRG:0467 20 B1 CA +; ----------------------------------------------------------------------------- +; Routine: ButtonBit9_Test +; Global: Tests controller bit 9 of the button byte by rotating it through carry, and branches to the next bit when clear. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ButtonBit9_Test: + rol Zp40,x ; CPU:$C46A PRG:046A 36 40 + bcc ButtonBit10_Test ; CPU:$C46C PRG:046C 90 24 + lda #$01 ; CPU:$C46E PRG:046E A9 01 + and $4015 ; CPU:$C470 PRG:0470 2D 15 40 + bne HandleButtonPress5 ; CPU:$C473 PRG:0473 D0 0F + lda #$01 ; CPU:$C475 PRG:0475 A9 01 + sta $4015 ; CPU:$C477 PRG:0477 8D 15 40 + lda #$53 ; CPU:$C47A PRG:047A A9 53 + sta $4002 ; CPU:$C47C PRG:047C 8D 02 40 + lda #$29 ; CPU:$C47F PRG:047F A9 29 + sta $4003 ; CPU:$C481 PRG:0481 8D 03 40 +; ----------------------------------------------------------------------------- +; Routine: HandleButtonPress5 +; Global: Handler for controller bit 5: writes an OAM tile and attribute entry for the pressed button and issues the matching APU write. +; Local: RTS once the OAM entry and APU write are done. +; Parameters: X = button index; Y = OAM offset. +; Returns: Nothing. +; Clobbers: A, X, Y; $0200-$02FF, $4015. +; ----------------------------------------------------------------------------- +HandleButtonPress5: + lda #$02 ; CPU:$C484 PRG:0484 A9 02 + sta $0212,y ; CPU:$C486 PRG:0486 99 12 02 + lda #$08 ; CPU:$C489 PRG:0489 A9 08 + ora Zp4E,x ; CPU:$C48B PRG:048B 15 4E + sta Zp4E,x ; CPU:$C48D PRG:048D 95 4E + jsr $CAB1 ; CPU:$C48F PRG:048F 20 B1 CA +; ----------------------------------------------------------------------------- +; Routine: ButtonBit10_Test +; Global: Tests controller bit 10 of the button byte by rotating it through carry, and branches to the next bit when clear. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ButtonBit10_Test: + rol Zp40,x ; CPU:$C492 PRG:0492 36 40 + bcc ButtonBit11_Test ; CPU:$C494 PRG:0494 90 24 + lda #$01 ; CPU:$C496 PRG:0496 A9 01 + and $4015 ; CPU:$C498 PRG:0498 2D 15 40 + bne HandleButtonPress6 ; CPU:$C49B PRG:049B D0 0F + lda #$01 ; CPU:$C49D PRG:049D A9 01 + sta $4015 ; CPU:$C49F PRG:049F 8D 15 40 + lda #$2E ; CPU:$C4A2 PRG:04A2 A9 2E + sta $4002 ; CPU:$C4A4 PRG:04A4 8D 02 40 + lda #$29 ; CPU:$C4A7 PRG:04A7 A9 29 + sta $4003 ; CPU:$C4A9 PRG:04A9 8D 03 40 +; ----------------------------------------------------------------------------- +; Routine: HandleButtonPress6 +; Global: Handler for controller bit 6: writes an OAM tile and attribute entry for the pressed button and issues the matching APU write. +; Local: RTS once the OAM entry and APU write are done. +; Parameters: X = button index; Y = OAM offset. +; Returns: Nothing. +; Clobbers: A, X, Y; $0200-$02FF, $4015. +; ----------------------------------------------------------------------------- +HandleButtonPress6: + lda #$02 ; CPU:$C4AC PRG:04AC A9 02 + sta $0216,y ; CPU:$C4AE PRG:04AE 99 16 02 + lda #$04 ; CPU:$C4B1 PRG:04B1 A9 04 + ora Zp4E,x ; CPU:$C4B3 PRG:04B3 15 4E + sta Zp4E,x ; CPU:$C4B5 PRG:04B5 95 4E + jsr $CAB1 ; CPU:$C4B7 PRG:04B7 20 B1 CA +; ----------------------------------------------------------------------------- +; Routine: ButtonBit11_Test +; Global: Tests controller bit 11 of the button byte by rotating it through carry, and branches to the next bit when clear. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ButtonBit11_Test: + rol Zp40,x ; CPU:$C4BA PRG:04BA 36 40 + bcc ButtonBit12_Test ; CPU:$C4BC PRG:04BC 90 24 + lda #$01 ; CPU:$C4BE PRG:04BE A9 01 + and $4015 ; CPU:$C4C0 PRG:04C0 2D 15 40 + bne HandleButtonPress7 ; CPU:$C4C3 PRG:04C3 D0 0F + lda #$01 ; CPU:$C4C5 PRG:04C5 A9 01 + sta $4015 ; CPU:$C4C7 PRG:04C7 8D 15 40 + lda #$0D ; CPU:$C4CA PRG:04CA A9 0D + sta $4002 ; CPU:$C4CC PRG:04CC 8D 02 40 + lda #$29 ; CPU:$C4CF PRG:04CF A9 29 + sta $4003 ; CPU:$C4D1 PRG:04D1 8D 03 40 +; ----------------------------------------------------------------------------- +; Routine: HandleButtonPress7 +; Global: Handler for controller bit 7: writes an OAM tile and attribute entry for the pressed button and issues the matching APU write. +; Local: RTS once the OAM entry and APU write are done. +; Parameters: X = button index; Y = OAM offset. +; Returns: Nothing. +; Clobbers: A, X, Y; $0200-$02FF, $4015. +; ----------------------------------------------------------------------------- +HandleButtonPress7: + lda #$02 ; CPU:$C4D4 PRG:04D4 A9 02 + sta $021A,y ; CPU:$C4D6 PRG:04D6 99 1A 02 + lda #$02 ; CPU:$C4D9 PRG:04D9 A9 02 + ora Zp4E,x ; CPU:$C4DB PRG:04DB 15 4E + sta Zp4E,x ; CPU:$C4DD PRG:04DD 95 4E + jsr $CAB1 ; CPU:$C4DF PRG:04DF 20 B1 CA +; ----------------------------------------------------------------------------- +; Routine: ButtonBit12_Test +; Global: Tests controller bit 12 of the button byte by rotating it through carry, and branches to the next bit when clear. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ButtonBit12_Test: + rol Zp40,x ; CPU:$C4E2 PRG:04E2 36 40 + bcc FinishButtonDispatch ; CPU:$C4E4 PRG:04E4 90 24 + lda #$01 ; CPU:$C4E6 PRG:04E6 A9 01 + and $4015 ; CPU:$C4E8 PRG:04E8 2D 15 40 + bne HandleButtonPress8 ; CPU:$C4EB PRG:04EB D0 0F + lda #$01 ; CPU:$C4ED PRG:04ED A9 01 + sta $4015 ; CPU:$C4EF PRG:04EF 8D 15 40 + lda #$FE ; CPU:$C4F2 PRG:04F2 A9 FE + sta $4002 ; CPU:$C4F4 PRG:04F4 8D 02 40 + lda #$28 ; CPU:$C4F7 PRG:04F7 A9 28 + sta $4003 ; CPU:$C4F9 PRG:04F9 8D 03 40 +; ----------------------------------------------------------------------------- +; Routine: HandleButtonPress8 +; Global: Handler for controller bit 8: writes an OAM tile and attribute entry for the pressed button and issues the matching APU write. +; Local: RTS once the OAM entry and APU write are done. +; Parameters: X = button index; Y = OAM offset. +; Returns: Nothing. +; Clobbers: A, X, Y; $0200-$02FF, $4015. +; ----------------------------------------------------------------------------- +HandleButtonPress8: + lda #$02 ; CPU:$C4FC PRG:04FC A9 02 + sta $021E,y ; CPU:$C4FE PRG:04FE 99 1E 02 + lda #$01 ; CPU:$C501 PRG:0501 A9 01 + ora Zp4E,x ; CPU:$C503 PRG:0503 15 4E + sta Zp4E,x ; CPU:$C505 PRG:0505 95 4E + jsr $CAB1 ; CPU:$C507 PRG:0507 20 B1 CA +; ----------------------------------------------------------------------------- +; Routine: FinishButtonDispatch +; Global: Stores the surviving button state back and masks the bits that have been consumed before returning. +; Local: RTS. +; Parameters: None. +; Returns: Button state updated. +; Clobbers: A, X; button state array. +; ----------------------------------------------------------------------------- +FinishButtonDispatch: + pla ; CPU:$C50A PRG:050A 68 + sta Zp40,x ; CPU:$C50B PRG:050B 95 40 + lda #$0C ; CPU:$C50D PRG:050D A9 0C + and Zp40,x ; CPU:$C50F PRG:050F 35 40 + cmp #$0C ; CPU:$C511 PRG:0511 C9 0C + beq CallPrepareButtonOam ; CPU:$C513 PRG:0513 F0 0B + lda #$03 ; CPU:$C515 PRG:0515 A9 03 + and Zp40,x ; CPU:$C517 PRG:0517 35 40 + cmp #$03 ; CPU:$C519 PRG:0519 C9 03 + beq CallPrepareButtonOam ; CPU:$C51B PRG:051B F0 03 + jmp $C523 ; CPU:$C51D PRG:051D 4C 23 C5 +; ----------------------------------------------------------------------------- +; Routine: CallPrepareButtonOam +; Global: Calls PrepareButtonOam and returns. +; Local: RTS. +; Parameters: None. +; Returns: OAM shadow primed. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +CallPrepareButtonOam: + jsr $C1EE ; CPU:$C520 PRG:0520 20 EE C1 +; ----------------------------------------------------------------------------- +; Routine: ReturnFromPrepareButtonOam +; Global: RTS. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: None. +; ----------------------------------------------------------------------------- +ReturnFromPrepareButtonOam: + rts ; CPU:$C523 PRG:0523 60 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate1 +; Global: Marker update group 1 for MarkerVar01. Tests the variable against $04 and, when it is a button state, drives the matching OAM indicator slot. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate1: + lda Zp60 ; CPU:$C524 PRG:0524 A5 60 + cmp #$04 ; CPU:$C526 PRG:0526 C9 04 + bmi MarkerUpdate1_High ; CPU:$C528 PRG:0528 30 3A + lda Zp60 ; CPU:$C52A PRG:052A A5 60 + clc ; CPU:$C52C PRG:052C 18 + sbc #$04 ; CPU:$C52D PRG:052D E9 04 + sta Zp60 ; CPU:$C52F PRG:052F 85 60 + lda #$F4 ; CPU:$C531 PRG:0531 A9 F4 + sta $028D ; CPU:$C533 PRG:0533 8D 8D 02 + lda Zp60 ; CPU:$C536 PRG:0536 A5 60 + cmp #$04 ; CPU:$C538 PRG:0538 C9 04 + bmi MarkerUpdate1_Mid ; CPU:$C53A PRG:053A 30 3D + lda Zp60 ; CPU:$C53C PRG:053C A5 60 + clc ; CPU:$C53E PRG:053E 18 + sbc #$04 ; CPU:$C53F PRG:053F E9 04 + sta Zp60 ; CPU:$C541 PRG:0541 85 60 + lda #$D4 ; CPU:$C543 PRG:0543 A9 D4 + sta $0289 ; CPU:$C545 PRG:0545 8D 89 02 + lda Zp60 ; CPU:$C548 PRG:0548 A5 60 + cmp #$04 ; CPU:$C54A PRG:054A C9 04 + bmi MarkerUpdate1_Low ; CPU:$C54C PRG:054C 30 3D + lda Zp60 ; CPU:$C54E PRG:054E A5 60 + clc ; CPU:$C550 PRG:0550 18 + sbc #$04 ; CPU:$C551 PRG:0551 E9 04 + sta Zp60 ; CPU:$C553 PRG:0553 85 60 + lda #$D4 ; CPU:$C555 PRG:0555 A9 D4 + sta $0285 ; CPU:$C557 PRG:0557 8D 85 02 + lda #$E0 ; CPU:$C55A PRG:055A A9 E0 + ora Zp60 ; CPU:$C55C PRG:055C 05 60 + sta $0281 ; CPU:$C55E PRG:055E 8D 81 02 + jmp $C597 ; CPU:$C561 PRG:0561 4C 97 C5 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate1_High +; Global: Marker update group 1 entry for the high variant: ORs $F0 into MarkerVar01 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate1_High: + lda #$F0 ; CPU:$C564 PRG:0564 A9 F0 + ora Zp60 ; CPU:$C566 PRG:0566 05 60 + sta $028D ; CPU:$C568 PRG:0568 8D 8D 02 + lda #$30 ; CPU:$C56B PRG:056B A9 30 + sta $0289 ; CPU:$C56D PRG:056D 8D 89 02 + sta $0285 ; CPU:$C570 PRG:0570 8D 85 02 + sta $0281 ; CPU:$C573 PRG:0573 8D 81 02 + jmp $C597 ; CPU:$C576 PRG:0576 4C 97 C5 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate1_Mid +; Global: Marker update group 1 entry for the mid variant: ORs $D0 into MarkerVar01 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate1_Mid: + lda #$D0 ; CPU:$C579 PRG:0579 A9 D0 + ora Zp60 ; CPU:$C57B PRG:057B 05 60 + sta $0289 ; CPU:$C57D PRG:057D 8D 89 02 + lda #$30 ; CPU:$C580 PRG:0580 A9 30 + sta $0285 ; CPU:$C582 PRG:0582 8D 85 02 + sta $0281 ; CPU:$C585 PRG:0585 8D 81 02 + jmp $C597 ; CPU:$C588 PRG:0588 4C 97 C5 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate1_Low +; Global: Marker update group 1 entry for the low variant: ORs $D0 into MarkerVar01 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate1_Low: + lda #$D0 ; CPU:$C58B PRG:058B A9 D0 + ora Zp60 ; CPU:$C58D PRG:058D 05 60 + sta $0285 ; CPU:$C58F PRG:058F 8D 85 02 + lda #$30 ; CPU:$C592 PRG:0592 A9 30 + sta $0281 ; CPU:$C594 PRG:0594 8D 81 02 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate2 +; Global: Marker update group 2 for MarkerVar02. Tests the variable against $04 and, when it is a button state, drives the matching OAM indicator slot. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate2: + lda Zp5B ; CPU:$C597 PRG:0597 A5 5B + cmp #$04 ; CPU:$C599 PRG:0599 C9 04 + bmi MarkerUpdate2_High ; CPU:$C59B PRG:059B 30 3A + lda Zp5B ; CPU:$C59D PRG:059D A5 5B + clc ; CPU:$C59F PRG:059F 18 + sbc #$04 ; CPU:$C5A0 PRG:05A0 E9 04 + sta Zp5B ; CPU:$C5A2 PRG:05A2 85 5B + lda #$F4 ; CPU:$C5A4 PRG:05A4 A9 F4 + sta $029D ; CPU:$C5A6 PRG:05A6 8D 9D 02 + lda Zp5B ; CPU:$C5A9 PRG:05A9 A5 5B + cmp #$04 ; CPU:$C5AB PRG:05AB C9 04 + bmi MarkerUpdate2_Mid ; CPU:$C5AD PRG:05AD 30 3D + lda Zp5B ; CPU:$C5AF PRG:05AF A5 5B + clc ; CPU:$C5B1 PRG:05B1 18 + sbc #$04 ; CPU:$C5B2 PRG:05B2 E9 04 + sta Zp5B ; CPU:$C5B4 PRG:05B4 85 5B + lda #$D4 ; CPU:$C5B6 PRG:05B6 A9 D4 + sta $0299 ; CPU:$C5B8 PRG:05B8 8D 99 02 + lda Zp5B ; CPU:$C5BB PRG:05BB A5 5B + cmp #$04 ; CPU:$C5BD PRG:05BD C9 04 + bmi MarkerUpdate2_Low ; CPU:$C5BF PRG:05BF 30 3D + lda Zp5B ; CPU:$C5C1 PRG:05C1 A5 5B + clc ; CPU:$C5C3 PRG:05C3 18 + sbc #$04 ; CPU:$C5C4 PRG:05C4 E9 04 + sta Zp5B ; CPU:$C5C6 PRG:05C6 85 5B + lda #$D4 ; CPU:$C5C8 PRG:05C8 A9 D4 + sta $0295 ; CPU:$C5CA PRG:05CA 8D 95 02 + lda #$E0 ; CPU:$C5CD PRG:05CD A9 E0 + ora Zp5B ; CPU:$C5CF PRG:05CF 05 5B + sta $0291 ; CPU:$C5D1 PRG:05D1 8D 91 02 + jmp $C60A ; CPU:$C5D4 PRG:05D4 4C 0A C6 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate2_High +; Global: Marker update group 2 entry for the high variant: ORs $F0 into MarkerVar02 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate2_High: + lda #$F0 ; CPU:$C5D7 PRG:05D7 A9 F0 + ora Zp5B ; CPU:$C5D9 PRG:05D9 05 5B + sta $029D ; CPU:$C5DB PRG:05DB 8D 9D 02 + lda #$30 ; CPU:$C5DE PRG:05DE A9 30 + sta $0299 ; CPU:$C5E0 PRG:05E0 8D 99 02 + sta $0295 ; CPU:$C5E3 PRG:05E3 8D 95 02 + sta $0291 ; CPU:$C5E6 PRG:05E6 8D 91 02 + jmp $C60A ; CPU:$C5E9 PRG:05E9 4C 0A C6 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate2_Mid +; Global: Marker update group 2 entry for the mid variant: ORs $D0 into MarkerVar02 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate2_Mid: + lda #$D0 ; CPU:$C5EC PRG:05EC A9 D0 + ora Zp5B ; CPU:$C5EE PRG:05EE 05 5B + sta $0299 ; CPU:$C5F0 PRG:05F0 8D 99 02 + lda #$30 ; CPU:$C5F3 PRG:05F3 A9 30 + sta $0295 ; CPU:$C5F5 PRG:05F5 8D 95 02 + sta $0291 ; CPU:$C5F8 PRG:05F8 8D 91 02 + jmp $C60A ; CPU:$C5FB PRG:05FB 4C 0A C6 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate2_Low +; Global: Marker update group 2 entry for the low variant: ORs $D0 into MarkerVar02 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate2_Low: + lda #$D0 ; CPU:$C5FE PRG:05FE A9 D0 + ora Zp5B ; CPU:$C600 PRG:0600 05 5B + sta $0295 ; CPU:$C602 PRG:0602 8D 95 02 + lda #$30 ; CPU:$C605 PRG:0605 A9 30 + sta $0291 ; CPU:$C607 PRG:0607 8D 91 02 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate3 +; Global: Marker update group 3 for MarkerVar03. Tests the variable against $04 and, when it is a button state, drives the matching OAM indicator slot. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate3: + lda Zp56 ; CPU:$C60A PRG:060A A5 56 + cmp #$04 ; CPU:$C60C PRG:060C C9 04 + bmi MarkerUpdate3_High ; CPU:$C60E PRG:060E 30 3A + lda Zp56 ; CPU:$C610 PRG:0610 A5 56 + clc ; CPU:$C612 PRG:0612 18 + sbc #$04 ; CPU:$C613 PRG:0613 E9 04 + sta Zp56 ; CPU:$C615 PRG:0615 85 56 + lda #$F4 ; CPU:$C617 PRG:0617 A9 F4 + sta $02AD ; CPU:$C619 PRG:0619 8D AD 02 + lda Zp56 ; CPU:$C61C PRG:061C A5 56 + cmp #$04 ; CPU:$C61E PRG:061E C9 04 + bmi MarkerUpdate3_Mid ; CPU:$C620 PRG:0620 30 3D + lda Zp56 ; CPU:$C622 PRG:0622 A5 56 + clc ; CPU:$C624 PRG:0624 18 + sbc #$04 ; CPU:$C625 PRG:0625 E9 04 + sta Zp56 ; CPU:$C627 PRG:0627 85 56 + lda #$D4 ; CPU:$C629 PRG:0629 A9 D4 + sta $02A9 ; CPU:$C62B PRG:062B 8D A9 02 + lda Zp56 ; CPU:$C62E PRG:062E A5 56 + cmp #$04 ; CPU:$C630 PRG:0630 C9 04 + bmi MarkerUpdate3_Low ; CPU:$C632 PRG:0632 30 3D + lda Zp56 ; CPU:$C634 PRG:0634 A5 56 + clc ; CPU:$C636 PRG:0636 18 + sbc #$04 ; CPU:$C637 PRG:0637 E9 04 + sta Zp56 ; CPU:$C639 PRG:0639 85 56 + lda #$D4 ; CPU:$C63B PRG:063B A9 D4 + sta $02A5 ; CPU:$C63D PRG:063D 8D A5 02 + lda #$E0 ; CPU:$C640 PRG:0640 A9 E0 + ora Zp56 ; CPU:$C642 PRG:0642 05 56 + sta $02A1 ; CPU:$C644 PRG:0644 8D A1 02 + jmp $C67D ; CPU:$C647 PRG:0647 4C 7D C6 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate3_High +; Global: Marker update group 3 entry for the high variant: ORs $F0 into MarkerVar03 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate3_High: + lda #$F0 ; CPU:$C64A PRG:064A A9 F0 + ora Zp56 ; CPU:$C64C PRG:064C 05 56 + sta $02AD ; CPU:$C64E PRG:064E 8D AD 02 + lda #$30 ; CPU:$C651 PRG:0651 A9 30 + sta $02A9 ; CPU:$C653 PRG:0653 8D A9 02 + sta $02A5 ; CPU:$C656 PRG:0656 8D A5 02 + sta $02A1 ; CPU:$C659 PRG:0659 8D A1 02 + jmp $C67D ; CPU:$C65C PRG:065C 4C 7D C6 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate3_Mid +; Global: Marker update group 3 entry for the mid variant: ORs $D0 into MarkerVar03 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate3_Mid: + lda #$D0 ; CPU:$C65F PRG:065F A9 D0 + ora Zp56 ; CPU:$C661 PRG:0661 05 56 + sta $02A9 ; CPU:$C663 PRG:0663 8D A9 02 + lda #$30 ; CPU:$C666 PRG:0666 A9 30 + sta $02A5 ; CPU:$C668 PRG:0668 8D A5 02 + sta $02A1 ; CPU:$C66B PRG:066B 8D A1 02 + jmp $C67D ; CPU:$C66E PRG:066E 4C 7D C6 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate3_Low +; Global: Marker update group 3 entry for the low variant: ORs $D0 into MarkerVar03 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate3_Low: + lda #$D0 ; CPU:$C671 PRG:0671 A9 D0 + ora Zp56 ; CPU:$C673 PRG:0673 05 56 + sta $02A5 ; CPU:$C675 PRG:0675 8D A5 02 + lda #$30 ; CPU:$C678 PRG:0678 A9 30 + sta $02A1 ; CPU:$C67A PRG:067A 8D A1 02 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate4 +; Global: Marker update group 4 for MarkerVar04. Tests the variable against $04 and, when it is a button state, drives the matching OAM indicator slot. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate4: + lda Zp61 ; CPU:$C67D PRG:067D A5 61 + cmp #$04 ; CPU:$C67F PRG:067F C9 04 + bmi MarkerUpdate4_High ; CPU:$C681 PRG:0681 30 3A + lda Zp61 ; CPU:$C683 PRG:0683 A5 61 + clc ; CPU:$C685 PRG:0685 18 + sbc #$04 ; CPU:$C686 PRG:0686 E9 04 + sta Zp61 ; CPU:$C688 PRG:0688 85 61 + lda #$F4 ; CPU:$C68A PRG:068A A9 F4 + sta $02BD ; CPU:$C68C PRG:068C 8D BD 02 + lda Zp61 ; CPU:$C68F PRG:068F A5 61 + cmp #$04 ; CPU:$C691 PRG:0691 C9 04 + bmi MarkerUpdate4_Mid ; CPU:$C693 PRG:0693 30 3D + lda Zp61 ; CPU:$C695 PRG:0695 A5 61 + clc ; CPU:$C697 PRG:0697 18 + sbc #$04 ; CPU:$C698 PRG:0698 E9 04 + sta Zp61 ; CPU:$C69A PRG:069A 85 61 + lda #$D4 ; CPU:$C69C PRG:069C A9 D4 + sta $02B9 ; CPU:$C69E PRG:069E 8D B9 02 + lda Zp61 ; CPU:$C6A1 PRG:06A1 A5 61 + cmp #$04 ; CPU:$C6A3 PRG:06A3 C9 04 + bmi MarkerUpdate4_Low ; CPU:$C6A5 PRG:06A5 30 3D + lda Zp61 ; CPU:$C6A7 PRG:06A7 A5 61 + clc ; CPU:$C6A9 PRG:06A9 18 + sbc #$04 ; CPU:$C6AA PRG:06AA E9 04 + sta Zp61 ; CPU:$C6AC PRG:06AC 85 61 + lda #$D4 ; CPU:$C6AE PRG:06AE A9 D4 + sta $02B5 ; CPU:$C6B0 PRG:06B0 8D B5 02 + lda #$E0 ; CPU:$C6B3 PRG:06B3 A9 E0 + ora Zp61 ; CPU:$C6B5 PRG:06B5 05 61 + sta $02B1 ; CPU:$C6B7 PRG:06B7 8D B1 02 + jmp $C6F0 ; CPU:$C6BA PRG:06BA 4C F0 C6 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate4_High +; Global: Marker update group 4 entry for the high variant: ORs $F0 into MarkerVar04 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate4_High: + lda #$F0 ; CPU:$C6BD PRG:06BD A9 F0 + ora Zp61 ; CPU:$C6BF PRG:06BF 05 61 + sta $02BD ; CPU:$C6C1 PRG:06C1 8D BD 02 + lda #$30 ; CPU:$C6C4 PRG:06C4 A9 30 + sta $02B9 ; CPU:$C6C6 PRG:06C6 8D B9 02 + sta $02B5 ; CPU:$C6C9 PRG:06C9 8D B5 02 + sta $02B1 ; CPU:$C6CC PRG:06CC 8D B1 02 + jmp $C6F0 ; CPU:$C6CF PRG:06CF 4C F0 C6 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate4_Mid +; Global: Marker update group 4 entry for the mid variant: ORs $D0 into MarkerVar04 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate4_Mid: + lda #$D0 ; CPU:$C6D2 PRG:06D2 A9 D0 + ora Zp61 ; CPU:$C6D4 PRG:06D4 05 61 + sta $02B9 ; CPU:$C6D6 PRG:06D6 8D B9 02 + lda #$30 ; CPU:$C6D9 PRG:06D9 A9 30 + sta $02B5 ; CPU:$C6DB PRG:06DB 8D B5 02 + sta $02B1 ; CPU:$C6DE PRG:06DE 8D B1 02 + jmp $C6F0 ; CPU:$C6E1 PRG:06E1 4C F0 C6 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate4_Low +; Global: Marker update group 4 entry for the low variant: ORs $D0 into MarkerVar04 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate4_Low: + lda #$D0 ; CPU:$C6E4 PRG:06E4 A9 D0 + ora Zp61 ; CPU:$C6E6 PRG:06E6 05 61 + sta $02B5 ; CPU:$C6E8 PRG:06E8 8D B5 02 + lda #$30 ; CPU:$C6EB PRG:06EB A9 30 + sta $02B1 ; CPU:$C6ED PRG:06ED 8D B1 02 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate5 +; Global: Marker update group 5 for MarkerVar05. Tests the variable against $04 and, when it is a button state, drives the matching OAM indicator slot. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate5: + lda Zp5C ; CPU:$C6F0 PRG:06F0 A5 5C + cmp #$04 ; CPU:$C6F2 PRG:06F2 C9 04 + bmi MarkerUpdate5_High ; CPU:$C6F4 PRG:06F4 30 3A + lda Zp5C ; CPU:$C6F6 PRG:06F6 A5 5C + clc ; CPU:$C6F8 PRG:06F8 18 + sbc #$04 ; CPU:$C6F9 PRG:06F9 E9 04 + sta Zp5C ; CPU:$C6FB PRG:06FB 85 5C + lda #$F4 ; CPU:$C6FD PRG:06FD A9 F4 + sta $02CD ; CPU:$C6FF PRG:06FF 8D CD 02 + lda Zp5C ; CPU:$C702 PRG:0702 A5 5C + cmp #$04 ; CPU:$C704 PRG:0704 C9 04 + bmi MarkerUpdate5_Mid ; CPU:$C706 PRG:0706 30 3D + lda Zp5C ; CPU:$C708 PRG:0708 A5 5C + clc ; CPU:$C70A PRG:070A 18 + sbc #$04 ; CPU:$C70B PRG:070B E9 04 + sta Zp5C ; CPU:$C70D PRG:070D 85 5C + lda #$D4 ; CPU:$C70F PRG:070F A9 D4 + sta $02C9 ; CPU:$C711 PRG:0711 8D C9 02 + lda Zp5C ; CPU:$C714 PRG:0714 A5 5C + cmp #$04 ; CPU:$C716 PRG:0716 C9 04 + bmi MarkerUpdate5_Low ; CPU:$C718 PRG:0718 30 3D + lda Zp5C ; CPU:$C71A PRG:071A A5 5C + clc ; CPU:$C71C PRG:071C 18 + sbc #$04 ; CPU:$C71D PRG:071D E9 04 + sta Zp5C ; CPU:$C71F PRG:071F 85 5C + lda #$D4 ; CPU:$C721 PRG:0721 A9 D4 + sta $02C5 ; CPU:$C723 PRG:0723 8D C5 02 + lda #$E0 ; CPU:$C726 PRG:0726 A9 E0 + ora Zp5C ; CPU:$C728 PRG:0728 05 5C + sta $02C1 ; CPU:$C72A PRG:072A 8D C1 02 + jmp $C763 ; CPU:$C72D PRG:072D 4C 63 C7 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate5_High +; Global: Marker update group 5 entry for the high variant: ORs $F0 into MarkerVar05 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate5_High: + lda #$F0 ; CPU:$C730 PRG:0730 A9 F0 + ora Zp5C ; CPU:$C732 PRG:0732 05 5C + sta $02CD ; CPU:$C734 PRG:0734 8D CD 02 + lda #$30 ; CPU:$C737 PRG:0737 A9 30 + sta $02C9 ; CPU:$C739 PRG:0739 8D C9 02 + sta $02C5 ; CPU:$C73C PRG:073C 8D C5 02 + sta $02C1 ; CPU:$C73F PRG:073F 8D C1 02 + jmp $C763 ; CPU:$C742 PRG:0742 4C 63 C7 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate5_Mid +; Global: Marker update group 5 entry for the mid variant: ORs $D0 into MarkerVar05 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate5_Mid: + lda #$D0 ; CPU:$C745 PRG:0745 A9 D0 + ora Zp5C ; CPU:$C747 PRG:0747 05 5C + sta $02C9 ; CPU:$C749 PRG:0749 8D C9 02 + lda #$30 ; CPU:$C74C PRG:074C A9 30 + sta $02C5 ; CPU:$C74E PRG:074E 8D C5 02 + sta $02C1 ; CPU:$C751 PRG:0751 8D C1 02 + jmp $C763 ; CPU:$C754 PRG:0754 4C 63 C7 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate5_Low +; Global: Marker update group 5 entry for the low variant: ORs $D0 into MarkerVar05 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate5_Low: + lda #$D0 ; CPU:$C757 PRG:0757 A9 D0 + ora Zp5C ; CPU:$C759 PRG:0759 05 5C + sta $02C5 ; CPU:$C75B PRG:075B 8D C5 02 + lda #$30 ; CPU:$C75E PRG:075E A9 30 + sta $02C1 ; CPU:$C760 PRG:0760 8D C1 02 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate6 +; Global: Marker update group 6 for MarkerVar06. Tests the variable against $04 and, when it is a button state, drives the matching OAM indicator slot. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate6: + lda Zp57 ; CPU:$C763 PRG:0763 A5 57 + cmp #$04 ; CPU:$C765 PRG:0765 C9 04 + bmi MarkerUpdate6_High ; CPU:$C767 PRG:0767 30 3A + lda Zp57 ; CPU:$C769 PRG:0769 A5 57 + clc ; CPU:$C76B PRG:076B 18 + sbc #$04 ; CPU:$C76C PRG:076C E9 04 + sta Zp57 ; CPU:$C76E PRG:076E 85 57 + lda #$F4 ; CPU:$C770 PRG:0770 A9 F4 + sta $02DD ; CPU:$C772 PRG:0772 8D DD 02 + lda Zp57 ; CPU:$C775 PRG:0775 A5 57 + cmp #$04 ; CPU:$C777 PRG:0777 C9 04 + bmi MarkerUpdate6_Mid ; CPU:$C779 PRG:0779 30 3D + lda Zp57 ; CPU:$C77B PRG:077B A5 57 + clc ; CPU:$C77D PRG:077D 18 + sbc #$04 ; CPU:$C77E PRG:077E E9 04 + sta Zp57 ; CPU:$C780 PRG:0780 85 57 + lda #$D4 ; CPU:$C782 PRG:0782 A9 D4 + sta $02D9 ; CPU:$C784 PRG:0784 8D D9 02 + lda Zp57 ; CPU:$C787 PRG:0787 A5 57 + cmp #$04 ; CPU:$C789 PRG:0789 C9 04 + bmi MarkerUpdate6_Low ; CPU:$C78B PRG:078B 30 3D + lda Zp57 ; CPU:$C78D PRG:078D A5 57 + clc ; CPU:$C78F PRG:078F 18 + sbc #$04 ; CPU:$C790 PRG:0790 E9 04 + sta Zp57 ; CPU:$C792 PRG:0792 85 57 + lda #$D4 ; CPU:$C794 PRG:0794 A9 D4 + sta $02D5 ; CPU:$C796 PRG:0796 8D D5 02 + lda #$E0 ; CPU:$C799 PRG:0799 A9 E0 + ora Zp57 ; CPU:$C79B PRG:079B 05 57 + sta $02D1 ; CPU:$C79D PRG:079D 8D D1 02 + jmp $C7D6 ; CPU:$C7A0 PRG:07A0 4C D6 C7 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate6_High +; Global: Marker update group 6 entry for the high variant: ORs $F0 into MarkerVar06 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate6_High: + lda #$F0 ; CPU:$C7A3 PRG:07A3 A9 F0 + ora Zp57 ; CPU:$C7A5 PRG:07A5 05 57 + sta $02DD ; CPU:$C7A7 PRG:07A7 8D DD 02 + lda #$30 ; CPU:$C7AA PRG:07AA A9 30 + sta $02D9 ; CPU:$C7AC PRG:07AC 8D D9 02 + sta $02D5 ; CPU:$C7AF PRG:07AF 8D D5 02 + sta $02D1 ; CPU:$C7B2 PRG:07B2 8D D1 02 + jmp $C7D6 ; CPU:$C7B5 PRG:07B5 4C D6 C7 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate6_Mid +; Global: Marker update group 6 entry for the mid variant: ORs $D0 into MarkerVar06 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate6_Mid: + lda #$D0 ; CPU:$C7B8 PRG:07B8 A9 D0 + ora Zp57 ; CPU:$C7BA PRG:07BA 05 57 + sta $02D9 ; CPU:$C7BC PRG:07BC 8D D9 02 + lda #$30 ; CPU:$C7BF PRG:07BF A9 30 + sta $02D5 ; CPU:$C7C1 PRG:07C1 8D D5 02 + sta $02D1 ; CPU:$C7C4 PRG:07C4 8D D1 02 + jmp $C7D6 ; CPU:$C7C7 PRG:07C7 4C D6 C7 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate6_Low +; Global: Marker update group 6 entry for the low variant: ORs $D0 into MarkerVar06 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate6_Low: + lda #$D0 ; CPU:$C7CA PRG:07CA A9 D0 + ora Zp57 ; CPU:$C7CC PRG:07CC 05 57 + sta $02D5 ; CPU:$C7CE PRG:07CE 8D D5 02 + lda #$30 ; CPU:$C7D1 PRG:07D1 A9 30 + sta $02D1 ; CPU:$C7D3 PRG:07D3 8D D1 02 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate6_Return +; Global: End of marker update group 6. RTS. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate6_Return: + rts ; CPU:$C7D6 PRG:07D6 60 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate7 +; Global: Marker update group 7 for MarkerVar07. Tests the variable against $04 and, when it is a button state, drives the matching OAM indicator slot. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate7: + lda Zp63 ; CPU:$C7D7 PRG:07D7 A5 63 + cmp #$04 ; CPU:$C7D9 PRG:07D9 C9 04 + bmi MarkerUpdate7_High ; CPU:$C7DB PRG:07DB 30 3A + lda Zp63 ; CPU:$C7DD PRG:07DD A5 63 + clc ; CPU:$C7DF PRG:07DF 18 + sbc #$04 ; CPU:$C7E0 PRG:07E0 E9 04 + sta Zp63 ; CPU:$C7E2 PRG:07E2 85 63 + lda #$F4 ; CPU:$C7E4 PRG:07E4 A9 F4 + sta $031D ; CPU:$C7E6 PRG:07E6 8D 1D 03 + lda Zp63 ; CPU:$C7E9 PRG:07E9 A5 63 + cmp #$04 ; CPU:$C7EB PRG:07EB C9 04 + bmi MarkerUpdate7_Mid ; CPU:$C7ED PRG:07ED 30 3D + lda Zp63 ; CPU:$C7EF PRG:07EF A5 63 + clc ; CPU:$C7F1 PRG:07F1 18 + sbc #$04 ; CPU:$C7F2 PRG:07F2 E9 04 + sta Zp63 ; CPU:$C7F4 PRG:07F4 85 63 + lda #$D4 ; CPU:$C7F6 PRG:07F6 A9 D4 + sta $0315 ; CPU:$C7F8 PRG:07F8 8D 15 03 + lda Zp63 ; CPU:$C7FB PRG:07FB A5 63 + cmp #$04 ; CPU:$C7FD PRG:07FD C9 04 + bmi MarkerUpdate7_Low ; CPU:$C7FF PRG:07FF 30 3D + lda Zp63 ; CPU:$C801 PRG:0801 A5 63 + clc ; CPU:$C803 PRG:0803 18 + sbc #$04 ; CPU:$C804 PRG:0804 E9 04 + sta Zp63 ; CPU:$C806 PRG:0806 85 63 + lda #$D4 ; CPU:$C808 PRG:0808 A9 D4 + sta $030D ; CPU:$C80A PRG:080A 8D 0D 03 + lda #$E0 ; CPU:$C80D PRG:080D A9 E0 + ora Zp63 ; CPU:$C80F PRG:080F 05 63 + sta $0305 ; CPU:$C811 PRG:0811 8D 05 03 + jmp $C84A ; CPU:$C814 PRG:0814 4C 4A C8 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate7_High +; Global: Marker update group 7 entry for the high variant: ORs $F0 into MarkerVar07 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate7_High: + lda #$F0 ; CPU:$C817 PRG:0817 A9 F0 + ora Zp63 ; CPU:$C819 PRG:0819 05 63 + sta $031D ; CPU:$C81B PRG:081B 8D 1D 03 + lda #$30 ; CPU:$C81E PRG:081E A9 30 + sta $0315 ; CPU:$C820 PRG:0820 8D 15 03 + sta $030D ; CPU:$C823 PRG:0823 8D 0D 03 + sta $0305 ; CPU:$C826 PRG:0826 8D 05 03 + jmp $C84A ; CPU:$C829 PRG:0829 4C 4A C8 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate7_Mid +; Global: Marker update group 7 entry for the mid variant: ORs $D0 into MarkerVar07 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate7_Mid: + lda #$D0 ; CPU:$C82C PRG:082C A9 D0 + ora Zp63 ; CPU:$C82E PRG:082E 05 63 + sta $0315 ; CPU:$C830 PRG:0830 8D 15 03 + lda #$30 ; CPU:$C833 PRG:0833 A9 30 + sta $030D ; CPU:$C835 PRG:0835 8D 0D 03 + sta $0305 ; CPU:$C838 PRG:0838 8D 05 03 + jmp $C84A ; CPU:$C83B PRG:083B 4C 4A C8 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate7_Low +; Global: Marker update group 7 entry for the low variant: ORs $D0 into MarkerVar07 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate7_Low: + lda #$D0 ; CPU:$C83E PRG:083E A9 D0 + ora Zp63 ; CPU:$C840 PRG:0840 05 63 + sta $030D ; CPU:$C842 PRG:0842 8D 0D 03 + lda #$30 ; CPU:$C845 PRG:0845 A9 30 + sta $0305 ; CPU:$C847 PRG:0847 8D 05 03 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate8 +; Global: Marker update group 8 for MarkerVar08. Tests the variable against $04 and, when it is a button state, drives the matching OAM indicator slot. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate8: + lda Zp5E ; CPU:$C84A PRG:084A A5 5E + cmp #$04 ; CPU:$C84C PRG:084C C9 04 + bmi MarkerUpdate8_High ; CPU:$C84E PRG:084E 30 3A + lda Zp5E ; CPU:$C850 PRG:0850 A5 5E + clc ; CPU:$C852 PRG:0852 18 + sbc #$04 ; CPU:$C853 PRG:0853 E9 04 + sta Zp5E ; CPU:$C855 PRG:0855 85 5E + lda #$F4 ; CPU:$C857 PRG:0857 A9 F4 + sta $031F ; CPU:$C859 PRG:0859 8D 1F 03 + lda Zp5E ; CPU:$C85C PRG:085C A5 5E + cmp #$04 ; CPU:$C85E PRG:085E C9 04 + bmi MarkerUpdate8_Mid ; CPU:$C860 PRG:0860 30 3D + lda Zp5E ; CPU:$C862 PRG:0862 A5 5E + clc ; CPU:$C864 PRG:0864 18 + sbc #$04 ; CPU:$C865 PRG:0865 E9 04 + sta Zp5E ; CPU:$C867 PRG:0867 85 5E + lda #$D4 ; CPU:$C869 PRG:0869 A9 D4 + sta $0317 ; CPU:$C86B PRG:086B 8D 17 03 + lda Zp5E ; CPU:$C86E PRG:086E A5 5E + cmp #$04 ; CPU:$C870 PRG:0870 C9 04 + bmi MarkerUpdate8_Low ; CPU:$C872 PRG:0872 30 3D + lda Zp5E ; CPU:$C874 PRG:0874 A5 5E + clc ; CPU:$C876 PRG:0876 18 + sbc #$04 ; CPU:$C877 PRG:0877 E9 04 + sta Zp5E ; CPU:$C879 PRG:0879 85 5E + lda #$D4 ; CPU:$C87B PRG:087B A9 D4 + sta $030F ; CPU:$C87D PRG:087D 8D 0F 03 + lda #$E0 ; CPU:$C880 PRG:0880 A9 E0 + ora Zp5E ; CPU:$C882 PRG:0882 05 5E + sta $0307 ; CPU:$C884 PRG:0884 8D 07 03 + jmp $C8BD ; CPU:$C887 PRG:0887 4C BD C8 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate8_High +; Global: Marker update group 8 entry for the high variant: ORs $F0 into MarkerVar08 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate8_High: + lda #$F0 ; CPU:$C88A PRG:088A A9 F0 + ora Zp5E ; CPU:$C88C PRG:088C 05 5E + sta $031F ; CPU:$C88E PRG:088E 8D 1F 03 + lda #$30 ; CPU:$C891 PRG:0891 A9 30 + sta $0317 ; CPU:$C893 PRG:0893 8D 17 03 + sta $030F ; CPU:$C896 PRG:0896 8D 0F 03 + sta $0307 ; CPU:$C899 PRG:0899 8D 07 03 + jmp $C8BD ; CPU:$C89C PRG:089C 4C BD C8 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate8_Mid +; Global: Marker update group 8 entry for the mid variant: ORs $D0 into MarkerVar08 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate8_Mid: + lda #$D0 ; CPU:$C89F PRG:089F A9 D0 + ora Zp5E ; CPU:$C8A1 PRG:08A1 05 5E + sta $0317 ; CPU:$C8A3 PRG:08A3 8D 17 03 + lda #$30 ; CPU:$C8A6 PRG:08A6 A9 30 + sta $030F ; CPU:$C8A8 PRG:08A8 8D 0F 03 + sta $0307 ; CPU:$C8AB PRG:08AB 8D 07 03 + jmp $C8BD ; CPU:$C8AE PRG:08AE 4C BD C8 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate8_Low +; Global: Marker update group 8 entry for the low variant: ORs $D0 into MarkerVar08 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate8_Low: + lda #$D0 ; CPU:$C8B1 PRG:08B1 A9 D0 + ora Zp5E ; CPU:$C8B3 PRG:08B3 05 5E + sta $030F ; CPU:$C8B5 PRG:08B5 8D 0F 03 + lda #$30 ; CPU:$C8B8 PRG:08B8 A9 30 + sta $0307 ; CPU:$C8BA PRG:08BA 8D 07 03 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate9 +; Global: Marker update group 9 for MarkerVar09. Tests the variable against $04 and, when it is a button state, drives the matching OAM indicator slot. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate9: + lda Zp59 ; CPU:$C8BD PRG:08BD A5 59 + cmp #$04 ; CPU:$C8BF PRG:08BF C9 04 + bmi MarkerUpdate9_High ; CPU:$C8C1 PRG:08C1 30 3A + lda Zp59 ; CPU:$C8C3 PRG:08C3 A5 59 + clc ; CPU:$C8C5 PRG:08C5 18 + sbc #$04 ; CPU:$C8C6 PRG:08C6 E9 04 + sta Zp59 ; CPU:$C8C8 PRG:08C8 85 59 + lda #$F4 ; CPU:$C8CA PRG:08CA A9 F4 + sta $0321 ; CPU:$C8CC PRG:08CC 8D 21 03 + lda Zp59 ; CPU:$C8CF PRG:08CF A5 59 + cmp #$04 ; CPU:$C8D1 PRG:08D1 C9 04 + bmi MarkerUpdate9_Mid ; CPU:$C8D3 PRG:08D3 30 3D + lda Zp59 ; CPU:$C8D5 PRG:08D5 A5 59 + clc ; CPU:$C8D7 PRG:08D7 18 + sbc #$04 ; CPU:$C8D8 PRG:08D8 E9 04 + sta Zp59 ; CPU:$C8DA PRG:08DA 85 59 + lda #$D4 ; CPU:$C8DC PRG:08DC A9 D4 + sta $0319 ; CPU:$C8DE PRG:08DE 8D 19 03 + lda Zp59 ; CPU:$C8E1 PRG:08E1 A5 59 + cmp #$04 ; CPU:$C8E3 PRG:08E3 C9 04 + bmi MarkerUpdate9_Low ; CPU:$C8E5 PRG:08E5 30 3D + lda Zp59 ; CPU:$C8E7 PRG:08E7 A5 59 + clc ; CPU:$C8E9 PRG:08E9 18 + sbc #$04 ; CPU:$C8EA PRG:08EA E9 04 + sta Zp59 ; CPU:$C8EC PRG:08EC 85 59 + lda #$D4 ; CPU:$C8EE PRG:08EE A9 D4 + sta $0311 ; CPU:$C8F0 PRG:08F0 8D 11 03 + lda #$E0 ; CPU:$C8F3 PRG:08F3 A9 E0 + ora Zp59 ; CPU:$C8F5 PRG:08F5 05 59 + sta $0309 ; CPU:$C8F7 PRG:08F7 8D 09 03 + jmp $C930 ; CPU:$C8FA PRG:08FA 4C 30 C9 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate9_High +; Global: Marker update group 9 entry for the high variant: ORs $F0 into MarkerVar09 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate9_High: + lda #$F0 ; CPU:$C8FD PRG:08FD A9 F0 + ora Zp59 ; CPU:$C8FF PRG:08FF 05 59 + sta $0321 ; CPU:$C901 PRG:0901 8D 21 03 + lda #$30 ; CPU:$C904 PRG:0904 A9 30 + sta $0319 ; CPU:$C906 PRG:0906 8D 19 03 + sta $0311 ; CPU:$C909 PRG:0909 8D 11 03 + sta $0309 ; CPU:$C90C PRG:090C 8D 09 03 + jmp $C930 ; CPU:$C90F PRG:090F 4C 30 C9 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate9_Mid +; Global: Marker update group 9 entry for the mid variant: ORs $D0 into MarkerVar09 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate9_Mid: + lda #$D0 ; CPU:$C912 PRG:0912 A9 D0 + ora Zp59 ; CPU:$C914 PRG:0914 05 59 + sta $0319 ; CPU:$C916 PRG:0916 8D 19 03 + lda #$30 ; CPU:$C919 PRG:0919 A9 30 + sta $0311 ; CPU:$C91B PRG:091B 8D 11 03 + sta $0309 ; CPU:$C91E PRG:091E 8D 09 03 + jmp $C930 ; CPU:$C921 PRG:0921 4C 30 C9 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate9_Low +; Global: Marker update group 9 entry for the low variant: ORs $D0 into MarkerVar09 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate9_Low: + lda #$D0 ; CPU:$C924 PRG:0924 A9 D0 + ora Zp59 ; CPU:$C926 PRG:0926 05 59 + sta $0311 ; CPU:$C928 PRG:0928 8D 11 03 + lda #$30 ; CPU:$C92B PRG:092B A9 30 + sta $0309 ; CPU:$C92D PRG:092D 8D 09 03 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate10 +; Global: Marker update group 10 for MarkerVar10. Tests the variable against $04 and, when it is a button state, drives the matching OAM indicator slot. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate10: + lda Zp64 ; CPU:$C930 PRG:0930 A5 64 + cmp #$04 ; CPU:$C932 PRG:0932 C9 04 + bmi MarkerUpdate10_High ; CPU:$C934 PRG:0934 30 3A + lda Zp64 ; CPU:$C936 PRG:0936 A5 64 + clc ; CPU:$C938 PRG:0938 18 + sbc #$04 ; CPU:$C939 PRG:0939 E9 04 + sta Zp64 ; CPU:$C93B PRG:093B 85 64 + lda #$F4 ; CPU:$C93D PRG:093D A9 F4 + sta $034D ; CPU:$C93F PRG:093F 8D 4D 03 + lda Zp64 ; CPU:$C942 PRG:0942 A5 64 + cmp #$04 ; CPU:$C944 PRG:0944 C9 04 + bmi MarkerUpdate10_Mid ; CPU:$C946 PRG:0946 30 3D + lda Zp64 ; CPU:$C948 PRG:0948 A5 64 + clc ; CPU:$C94A PRG:094A 18 + sbc #$04 ; CPU:$C94B PRG:094B E9 04 + sta Zp64 ; CPU:$C94D PRG:094D 85 64 + lda #$D4 ; CPU:$C94F PRG:094F A9 D4 + sta $0345 ; CPU:$C951 PRG:0951 8D 45 03 + lda Zp64 ; CPU:$C954 PRG:0954 A5 64 + cmp #$04 ; CPU:$C956 PRG:0956 C9 04 + bmi MarkerUpdate10_Low ; CPU:$C958 PRG:0958 30 3D + lda Zp64 ; CPU:$C95A PRG:095A A5 64 + clc ; CPU:$C95C PRG:095C 18 + sbc #$04 ; CPU:$C95D PRG:095D E9 04 + sta Zp64 ; CPU:$C95F PRG:095F 85 64 + lda #$D4 ; CPU:$C961 PRG:0961 A9 D4 + sta $033D ; CPU:$C963 PRG:0963 8D 3D 03 + lda #$E0 ; CPU:$C966 PRG:0966 A9 E0 + ora Zp64 ; CPU:$C968 PRG:0968 05 64 + sta $0335 ; CPU:$C96A PRG:096A 8D 35 03 + jmp $C9A3 ; CPU:$C96D PRG:096D 4C A3 C9 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate10_High +; Global: Marker update group 10 entry for the high variant: ORs $F0 into MarkerVar10 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate10_High: + lda #$F0 ; CPU:$C970 PRG:0970 A9 F0 + ora Zp64 ; CPU:$C972 PRG:0972 05 64 + sta $034D ; CPU:$C974 PRG:0974 8D 4D 03 + lda #$30 ; CPU:$C977 PRG:0977 A9 30 + sta $0345 ; CPU:$C979 PRG:0979 8D 45 03 + sta $033D ; CPU:$C97C PRG:097C 8D 3D 03 + sta $0335 ; CPU:$C97F PRG:097F 8D 35 03 + jmp $C9A3 ; CPU:$C982 PRG:0982 4C A3 C9 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate10_Mid +; Global: Marker update group 10 entry for the mid variant: ORs $D0 into MarkerVar10 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate10_Mid: + lda #$D0 ; CPU:$C985 PRG:0985 A9 D0 + ora Zp64 ; CPU:$C987 PRG:0987 05 64 + sta $0345 ; CPU:$C989 PRG:0989 8D 45 03 + lda #$30 ; CPU:$C98C PRG:098C A9 30 + sta $033D ; CPU:$C98E PRG:098E 8D 3D 03 + sta $0335 ; CPU:$C991 PRG:0991 8D 35 03 + jmp $C9A3 ; CPU:$C994 PRG:0994 4C A3 C9 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate10_Low +; Global: Marker update group 10 entry for the low variant: ORs $D0 into MarkerVar10 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate10_Low: + lda #$D0 ; CPU:$C997 PRG:0997 A9 D0 + ora Zp64 ; CPU:$C999 PRG:0999 05 64 + sta $033D ; CPU:$C99B PRG:099B 8D 3D 03 + lda #$30 ; CPU:$C99E PRG:099E A9 30 + sta $0335 ; CPU:$C9A0 PRG:09A0 8D 35 03 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate11 +; Global: Marker update group 11 for MarkerVar11. Tests the variable against $04 and, when it is a button state, drives the matching OAM indicator slot. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate11: + lda Zp5F ; CPU:$C9A3 PRG:09A3 A5 5F + cmp #$04 ; CPU:$C9A5 PRG:09A5 C9 04 + bmi MarkerUpdate11_High ; CPU:$C9A7 PRG:09A7 30 3A + lda Zp5F ; CPU:$C9A9 PRG:09A9 A5 5F + clc ; CPU:$C9AB PRG:09AB 18 + sbc #$04 ; CPU:$C9AC PRG:09AC E9 04 + sta Zp5F ; CPU:$C9AE PRG:09AE 85 5F + lda #$F4 ; CPU:$C9B0 PRG:09B0 A9 F4 + sta $034F ; CPU:$C9B2 PRG:09B2 8D 4F 03 + lda Zp5F ; CPU:$C9B5 PRG:09B5 A5 5F + cmp #$04 ; CPU:$C9B7 PRG:09B7 C9 04 + bmi MarkerUpdate11_Mid ; CPU:$C9B9 PRG:09B9 30 3D + lda Zp5F ; CPU:$C9BB PRG:09BB A5 5F + clc ; CPU:$C9BD PRG:09BD 18 + sbc #$04 ; CPU:$C9BE PRG:09BE E9 04 + sta Zp5F ; CPU:$C9C0 PRG:09C0 85 5F + lda #$D4 ; CPU:$C9C2 PRG:09C2 A9 D4 + sta $0347 ; CPU:$C9C4 PRG:09C4 8D 47 03 + lda Zp5F ; CPU:$C9C7 PRG:09C7 A5 5F + cmp #$04 ; CPU:$C9C9 PRG:09C9 C9 04 + bmi MarkerUpdate11_Low ; CPU:$C9CB PRG:09CB 30 3D + lda Zp5F ; CPU:$C9CD PRG:09CD A5 5F + clc ; CPU:$C9CF PRG:09CF 18 + sbc #$04 ; CPU:$C9D0 PRG:09D0 E9 04 + sta Zp5F ; CPU:$C9D2 PRG:09D2 85 5F + lda #$D4 ; CPU:$C9D4 PRG:09D4 A9 D4 + sta $033F ; CPU:$C9D6 PRG:09D6 8D 3F 03 + lda #$E0 ; CPU:$C9D9 PRG:09D9 A9 E0 + ora Zp5F ; CPU:$C9DB PRG:09DB 05 5F + sta $0337 ; CPU:$C9DD PRG:09DD 8D 37 03 + jmp $CA16 ; CPU:$C9E0 PRG:09E0 4C 16 CA +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate11_High +; Global: Marker update group 11 entry for the high variant: ORs $F0 into MarkerVar11 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate11_High: + lda #$F0 ; CPU:$C9E3 PRG:09E3 A9 F0 + ora Zp5F ; CPU:$C9E5 PRG:09E5 05 5F + sta $034F ; CPU:$C9E7 PRG:09E7 8D 4F 03 + lda #$30 ; CPU:$C9EA PRG:09EA A9 30 + sta $0347 ; CPU:$C9EC PRG:09EC 8D 47 03 + sta $033F ; CPU:$C9EF PRG:09EF 8D 3F 03 + sta $0337 ; CPU:$C9F2 PRG:09F2 8D 37 03 + jmp $CA16 ; CPU:$C9F5 PRG:09F5 4C 16 CA +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate11_Mid +; Global: Marker update group 11 entry for the mid variant: ORs $D0 into MarkerVar11 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate11_Mid: + lda #$D0 ; CPU:$C9F8 PRG:09F8 A9 D0 + ora Zp5F ; CPU:$C9FA PRG:09FA 05 5F + sta $0347 ; CPU:$C9FC PRG:09FC 8D 47 03 + lda #$30 ; CPU:$C9FF PRG:09FF A9 30 + sta $033F ; CPU:$CA01 PRG:0A01 8D 3F 03 + sta $0337 ; CPU:$CA04 PRG:0A04 8D 37 03 + jmp $CA16 ; CPU:$CA07 PRG:0A07 4C 16 CA +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate11_Low +; Global: Marker update group 11 entry for the low variant: ORs $D0 into MarkerVar11 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate11_Low: + lda #$D0 ; CPU:$CA0A PRG:0A0A A9 D0 + ora Zp5F ; CPU:$CA0C PRG:0A0C 05 5F + sta $033F ; CPU:$CA0E PRG:0A0E 8D 3F 03 + lda #$30 ; CPU:$CA11 PRG:0A11 A9 30 + sta $0337 ; CPU:$CA13 PRG:0A13 8D 37 03 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate12 +; Global: Marker update group 12 for MarkerVar12. Tests the variable against $04 and, when it is a button state, drives the matching OAM indicator slot. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate12: + lda Zp5A ; CPU:$CA16 PRG:0A16 A5 5A + cmp #$04 ; CPU:$CA18 PRG:0A18 C9 04 + bmi MarkerUpdate12_High ; CPU:$CA1A PRG:0A1A 30 3A + lda Zp5A ; CPU:$CA1C PRG:0A1C A5 5A + clc ; CPU:$CA1E PRG:0A1E 18 + sbc #$04 ; CPU:$CA1F PRG:0A1F E9 04 + sta Zp5A ; CPU:$CA21 PRG:0A21 85 5A + lda #$F4 ; CPU:$CA23 PRG:0A23 A9 F4 + sta $0351 ; CPU:$CA25 PRG:0A25 8D 51 03 + lda Zp5A ; CPU:$CA28 PRG:0A28 A5 5A + cmp #$04 ; CPU:$CA2A PRG:0A2A C9 04 + bmi MarkerUpdate12_Mid ; CPU:$CA2C PRG:0A2C 30 3D + lda Zp5A ; CPU:$CA2E PRG:0A2E A5 5A + clc ; CPU:$CA30 PRG:0A30 18 + sbc #$04 ; CPU:$CA31 PRG:0A31 E9 04 + sta Zp5A ; CPU:$CA33 PRG:0A33 85 5A + lda #$D4 ; CPU:$CA35 PRG:0A35 A9 D4 + sta $0349 ; CPU:$CA37 PRG:0A37 8D 49 03 + lda Zp5A ; CPU:$CA3A PRG:0A3A A5 5A + cmp #$04 ; CPU:$CA3C PRG:0A3C C9 04 + bmi MarkerUpdate12_Low ; CPU:$CA3E PRG:0A3E 30 3D + lda Zp5A ; CPU:$CA40 PRG:0A40 A5 5A + clc ; CPU:$CA42 PRG:0A42 18 + sbc #$04 ; CPU:$CA43 PRG:0A43 E9 04 + sta Zp5A ; CPU:$CA45 PRG:0A45 85 5A + lda #$D4 ; CPU:$CA47 PRG:0A47 A9 D4 + sta $0341 ; CPU:$CA49 PRG:0A49 8D 41 03 + lda #$E0 ; CPU:$CA4C PRG:0A4C A9 E0 + ora Zp5A ; CPU:$CA4E PRG:0A4E 05 5A + sta $0339 ; CPU:$CA50 PRG:0A50 8D 39 03 + jmp $CA89 ; CPU:$CA53 PRG:0A53 4C 89 CA +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate12_High +; Global: Marker update group 12 entry for the high variant: ORs $F0 into MarkerVar12 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate12_High: + lda #$F0 ; CPU:$CA56 PRG:0A56 A9 F0 + ora Zp5A ; CPU:$CA58 PRG:0A58 05 5A + sta $0351 ; CPU:$CA5A PRG:0A5A 8D 51 03 + lda #$30 ; CPU:$CA5D PRG:0A5D A9 30 + sta $0349 ; CPU:$CA5F PRG:0A5F 8D 49 03 + sta $0341 ; CPU:$CA62 PRG:0A62 8D 41 03 + sta $0339 ; CPU:$CA65 PRG:0A65 8D 39 03 + jmp $CA89 ; CPU:$CA68 PRG:0A68 4C 89 CA +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate12_Mid +; Global: Marker update group 12 entry for the mid variant: ORs $D0 into MarkerVar12 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate12_Mid: + lda #$D0 ; CPU:$CA6B PRG:0A6B A9 D0 + ora Zp5A ; CPU:$CA6D PRG:0A6D 05 5A + sta $0349 ; CPU:$CA6F PRG:0A6F 8D 49 03 + lda #$30 ; CPU:$CA72 PRG:0A72 A9 30 + sta $0341 ; CPU:$CA74 PRG:0A74 8D 41 03 + sta $0339 ; CPU:$CA77 PRG:0A77 8D 39 03 + jmp $CA89 ; CPU:$CA7A PRG:0A7A 4C 89 CA +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate12_Low +; Global: Marker update group 12 entry for the low variant: ORs $D0 into MarkerVar12 and writes the result to an OAM Y-coordinate slot, so a different indicator sprite lights. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate12_Low: + lda #$D0 ; CPU:$CA7D PRG:0A7D A9 D0 + ora Zp5A ; CPU:$CA7F PRG:0A7F 05 5A + sta $0341 ; CPU:$CA81 PRG:0A81 8D 41 03 + lda #$30 ; CPU:$CA84 PRG:0A84 A9 30 + sta $0339 ; CPU:$CA86 PRG:0A86 8D 39 03 +; ----------------------------------------------------------------------------- +; Routine: MarkerUpdate12_Return +; Global: End of marker update group 12. RTS. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +MarkerUpdate12_Return: + rts ; CPU:$CA89 PRG:0A89 60 +; ----------------------------------------------------------------------------- +; Routine: ResetButtonMarkerState +; Global: Clears every per-button marker variable and primes ButtonHoldCounter with $FF. This is the reset for a whole marker update pass, not a single marker. +; Local: Falls through to its caller. +; Parameters: None. +; Returns: All marker state cleared. +; Clobbers: A; MarkerVar01-MarkerVar12, ButtonHoldCounter. +; ----------------------------------------------------------------------------- +ResetButtonMarkerState: + lda #$FF ; CPU:$CA8A PRG:0A8A A9 FF + sta Zp6A ; CPU:$CA8C PRG:0A8C 85 6A + lda #$00 ; CPU:$CA8E PRG:0A8E A9 00 + sta Zp60 ; CPU:$CA90 PRG:0A90 85 60 + sta Zp5B ; CPU:$CA92 PRG:0A92 85 5B + sta Zp56 ; CPU:$CA94 PRG:0A94 85 56 + sta Zp61 ; CPU:$CA96 PRG:0A96 85 61 + sta Zp5C ; CPU:$CA98 PRG:0A98 85 5C + sta Zp57 ; CPU:$CA9A PRG:0A9A 85 57 + sta Zp63 ; CPU:$CA9C PRG:0A9C 85 63 + sta Zp5E ; CPU:$CA9E PRG:0A9E 85 5E + sta Zp59 ; CPU:$CAA0 PRG:0AA0 85 59 + sta Zp64 ; CPU:$CAA2 PRG:0AA2 85 64 + sta Zp5F ; CPU:$CAA4 PRG:0AA4 85 5F + sta Zp5A ; CPU:$CAA6 PRG:0AA6 85 5A + sta Zp65 ; CPU:$CAA8 PRG:0AA8 85 65 + sta Zp66 ; CPU:$CAAA PRG:0AAA 85 66 + sta Zp68 ; CPU:$CAAC PRG:0AAC 85 68 + sta Zp69 ; CPU:$CAAE PRG:0AAE 85 69 + rts ; CPU:$CAB0 PRG:0AB0 60 +; ----------------------------------------------------------------------------- +; Routine: ResetButtonTimers +; Global: Clears both bytes of the frame counter at the start of a marker update pass. +; Local: Falls through to the caller. +; Parameters: None. +; Returns: Counter cleared. +; Clobbers: A; FrameCounterLo/Hi. +; ----------------------------------------------------------------------------- +ResetButtonTimers: + lda #$00 ; CPU:$CAB1 PRG:0AB1 A9 00 + sta Zp53 ; CPU:$CAB3 PRG:0AB3 85 53 + sta Zp54 ; CPU:$CAB5 PRG:0AB5 85 54 + rts ; CPU:$CAB7 PRG:0AB7 60 +; ----------------------------------------------------------------------------- +; Routine: ShiftButtonBit0 +; Global: Button-scan entry for bit 0: rotates one bit out of the button state array and records whether it was set. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ShiftButtonBit0: + rol Zp4E,x ; CPU:$CAB8 PRG:0AB8 36 4E + bcc ShiftButtonBit1 ; CPU:$CABA PRG:0ABA 90 05 + lda #$00 ; CPU:$CABC PRG:0ABC A9 00 + sta $0202,y ; CPU:$CABE PRG:0ABE 99 02 02 +; ----------------------------------------------------------------------------- +; Routine: ShiftButtonBit1 +; Global: Button-scan entry for bit 1: rotates one bit out of the button state array and records whether it was set. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ShiftButtonBit1: + rol Zp4E,x ; CPU:$CAC1 PRG:0AC1 36 4E + bcc ShiftButtonBit2 ; CPU:$CAC3 PRG:0AC3 90 05 + lda #$00 ; CPU:$CAC5 PRG:0AC5 A9 00 + sta $0206,y ; CPU:$CAC7 PRG:0AC7 99 06 02 +; ----------------------------------------------------------------------------- +; Routine: ShiftButtonBit2 +; Global: Button-scan entry for bit 2: rotates one bit out of the button state array and records whether it was set. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ShiftButtonBit2: + rol Zp4E,x ; CPU:$CACA PRG:0ACA 36 4E + bcc ShiftButtonBit3 ; CPU:$CACC PRG:0ACC 90 05 + lda #$00 ; CPU:$CACE PRG:0ACE A9 00 + sta $020E,y ; CPU:$CAD0 PRG:0AD0 99 0E 02 +; ----------------------------------------------------------------------------- +; Routine: ShiftButtonBit3 +; Global: Button-scan entry for bit 3: rotates one bit out of the button state array and records whether it was set. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ShiftButtonBit3: + rol Zp4E,x ; CPU:$CAD3 PRG:0AD3 36 4E + bcc ShiftButtonBit4 ; CPU:$CAD5 PRG:0AD5 90 05 + lda #$00 ; CPU:$CAD7 PRG:0AD7 A9 00 + sta $020A,y ; CPU:$CAD9 PRG:0AD9 99 0A 02 +; ----------------------------------------------------------------------------- +; Routine: ShiftButtonBit4 +; Global: Button-scan entry for bit 4: rotates one bit out of the button state array and records whether it was set. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ShiftButtonBit4: + rol Zp4E,x ; CPU:$CADC PRG:0ADC 36 4E + bcc ShiftButtonBit5 ; CPU:$CADE PRG:0ADE 90 05 + lda #$00 ; CPU:$CAE0 PRG:0AE0 A9 00 + sta $0212,y ; CPU:$CAE2 PRG:0AE2 99 12 02 +; ----------------------------------------------------------------------------- +; Routine: ShiftButtonBit5 +; Global: Button-scan entry for bit 5: rotates one bit out of the button state array and records whether it was set. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ShiftButtonBit5: + rol Zp4E,x ; CPU:$CAE5 PRG:0AE5 36 4E + bcc ShiftButtonBit6 ; CPU:$CAE7 PRG:0AE7 90 05 + lda #$00 ; CPU:$CAE9 PRG:0AE9 A9 00 + sta $0216,y ; CPU:$CAEB PRG:0AEB 99 16 02 +; ----------------------------------------------------------------------------- +; Routine: ShiftButtonBit6 +; Global: Button-scan entry for bit 6: rotates one bit out of the button state array and records whether it was set. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ShiftButtonBit6: + rol Zp4E,x ; CPU:$CAEE PRG:0AEE 36 4E + bcc ShiftButtonBit7 ; CPU:$CAF0 PRG:0AF0 90 05 + lda #$00 ; CPU:$CAF2 PRG:0AF2 A9 00 + sta $021A,y ; CPU:$CAF4 PRG:0AF4 99 1A 02 +; ----------------------------------------------------------------------------- +; Routine: ShiftButtonBit7 +; Global: Button-scan entry for bit 7: rotates one bit out of the button state array and records whether it was set. +; Local: Branches onward, or RTS where the family ends. +; Parameters: X = index where the family is indexed. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ShiftButtonBit7: + rol Zp4E,x ; CPU:$CAF7 PRG:0AF7 36 4E + bcc ShiftButtonBit8Done ; CPU:$CAF9 PRG:0AF9 90 05 + lda #$00 ; CPU:$CAFB PRG:0AFB A9 00 + sta $021E,y ; CPU:$CAFD PRG:0AFD 99 1E 02 +; ----------------------------------------------------------------------------- +; Routine: ShiftButtonBit8Done +; Global: Final entry of the eight-step button scan. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +ShiftButtonBit8Done: + rol Zp4E,x ; CPU:$CB00 PRG:0B00 36 4E + rts ; CPU:$CB02 PRG:0B02 60 +; ----------------------------------------------------------------------------- +; Routine: InitTestScreen70 +; Global: Sets up the mode-70 screen: writes an $EE pattern into $6000, clears RAM and primes the OAM from its own ROM table. +; Local: Falls into the mode-70 frame loop. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y; $6000, $0000-$05FF, $0200-$02FF. +; ----------------------------------------------------------------------------- +InitTestScreen70: + jsr $CD2F ; CPU:$CB03 PRG:0B03 20 2F CD + ldx #$00 ; CPU:$CB06 PRG:0B06 A2 00 + lda #$EE ; CPU:$CB08 PRG:0B08 A9 EE +; ----------------------------------------------------------------------------- +; Routine: WriteRamPattern70Loop +; Global: Mode-70 copy of the $6000 pattern writer. +; Local: Returns to its caller once X reaches six. +; Parameters: X = index; A = pattern byte. +; Returns: X = six. +; Clobbers: A, X; $6000-$6005. +; ----------------------------------------------------------------------------- +WriteRamPattern70Loop: + sta $6000,x ; CPU:$CB0A PRG:0B0A 9D 00 60 + inx ; CPU:$CB0D PRG:0B0D E8 + cpx #$06 ; CPU:$CB0E PRG:0B0E E0 06 + bne WriteRamPattern70Loop ; CPU:$CB10 PRG:0B10 D0 F8 + lda #$00 ; CPU:$CB12 PRG:0B12 A9 00 + ldx #$00 ; CPU:$CB14 PRG:0B14 A2 00 +; ----------------------------------------------------------------------------- +; Routine: ClearRamPass4Loop +; Global: Fourth RAM-clearing pass, used by mode 70. +; Local: Returns to its caller when X wraps. +; Parameters: X = page offset; A = fill value. +; Returns: X wrapped to $00. +; Clobbers: A, X; $0000-$05FF. +; ----------------------------------------------------------------------------- +ClearRamPass4Loop: + sta Zp00,x ; CPU:$CB16 PRG:0B16 95 00 + sta $0100,x ; CPU:$CB18 PRG:0B18 9D 00 01 + lda #$F4 ; CPU:$CB1B PRG:0B1B A9 F4 + sta $0200,x ; CPU:$CB1D PRG:0B1D 9D 00 02 + lda #$00 ; CPU:$CB20 PRG:0B20 A9 00 + sta $0300,x ; CPU:$CB22 PRG:0B22 9D 00 03 + sta $0400,x ; CPU:$CB25 PRG:0B25 9D 00 04 + sta $0500,x ; CPU:$CB28 PRG:0B28 9D 00 05 + sta $0600,x ; CPU:$CB2B PRG:0B2B 9D 00 06 + inx ; CPU:$CB2E PRG:0B2E E8 + bne ClearRamPass4Loop ; CPU:$CB2F PRG:0B2F D0 E5 + lda #$10 ; CPU:$CB31 PRG:0B31 A9 10 + sta $2000 ; CPU:$CB33 PRG:0B33 8D 00 20 + sta ZpEF ; CPU:$CB36 PRG:0B36 85 EF + lda #$00 ; CPU:$CB38 PRG:0B38 A9 00 + sta $2001 ; CPU:$CB3A PRG:0B3A 8D 01 20 + sta ZpEE ; CPU:$CB3D PRG:0B3D 85 EE + lda #$20 ; CPU:$CB3F PRG:0B3F A9 20 + ldx #$24 ; CPU:$CB41 PRG:0B41 A2 24 + ldy #$00 ; CPU:$CB43 PRG:0B43 A0 00 + jsr $CDEE ; CPU:$CB45 PRG:0B45 20 EE CD + jsr $CD3F ; CPU:$CB48 PRG:0B48 20 3F CD + asl ZpCF ; CPU:$CB4B PRG:0B4B 06 CF + jsr $CE3C ; CPU:$CB4D PRG:0B4D 20 3C CE + jsr $CD3F ; CPU:$CB50 PRG:0B50 20 3F CD + .byte $63, $D0 ; CPU:$CB53 PRG:0B53 63 D0 -- rra (ZpD0,x) (undocumented; ca65 cannot encode) + jsr $CE3C ; CPU:$CB55 PRG:0B55 20 3C CE + jsr $C174 ; CPU:$CB58 PRG:0B58 20 74 C1 + ldx #$DF ; CPU:$CB5B PRG:0B5B A2 DF +; ----------------------------------------------------------------------------- +; Routine: CopyOamFromTable70 +; Global: Mode-70 copy of the ROM sprite table upload. +; Local: Falls through when X reaches zero. +; Parameters: X = index. +; Returns: X wrapped to $00. +; Clobbers: A, X; $0200-$02FF. +; ----------------------------------------------------------------------------- +CopyOamFromTable70: + lda $D5C4,x ; CPU:$CB5D PRG:0B5D BD C4 D5 + sta $0200,x ; CPU:$CB60 PRG:0B60 9D 00 02 + dex ; CPU:$CB63 PRG:0B63 CA + bne CopyOamFromTable70 ; CPU:$CB64 PRG:0B64 D0 F7 + lda $D5C4,x ; CPU:$CB66 PRG:0B66 BD C4 D5 + sta $0200,x ; CPU:$CB69 PRG:0B69 9D 00 02 + lda #$FF ; CPU:$CB6C PRG:0B6C A9 FF + sta Zp6A ; CPU:$CB6E PRG:0B6E 85 6A + lda #$00 ; CPU:$CB70 PRG:0B70 A9 00 + sta Zp4E ; CPU:$CB72 PRG:0B72 85 4E + sta Zp4F ; CPU:$CB74 PRG:0B74 85 4F + sta Zp51 ; CPU:$CB76 PRG:0B76 85 51 + sta Zp52 ; CPU:$CB78 PRG:0B78 85 52 + sta Zp54 ; CPU:$CB7A PRG:0B7A 85 54 + sta Zp53 ; CPU:$CB7C PRG:0B7C 85 53 + sta Zp60 ; CPU:$CB7E PRG:0B7E 85 60 + sta Zp5B ; CPU:$CB80 PRG:0B80 85 5B + sta Zp56 ; CPU:$CB82 PRG:0B82 85 56 + sta Zp61 ; CPU:$CB84 PRG:0B84 85 61 + sta Zp5C ; CPU:$CB86 PRG:0B86 85 5C + sta Zp57 ; CPU:$CB88 PRG:0B88 85 57 + sta Zp65 ; CPU:$CB8A PRG:0B8A 85 65 + sta Zp66 ; CPU:$CB8C PRG:0B8C 85 66 + sta Zp68 ; CPU:$CB8E PRG:0B8E 85 68 + sta Zp69 ; CPU:$CB90 PRG:0B90 85 69 + lda #$BF ; CPU:$CB92 PRG:0B92 A9 BF + sta $4000 ; CPU:$CB94 PRG:0B94 8D 00 40 + jsr $CD39 ; CPU:$CB97 PRG:0B97 20 39 CD +; ----------------------------------------------------------------------------- +; Routine: MainLoopTestMode70 +; Global: Frame loop for mode 70: waits for vblank, samples the controller through the alternate path, and advances the hold counter. +; Local: Loops forever, one iteration per frame. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y; ButtonHoldCounter. +; ----------------------------------------------------------------------------- +MainLoopTestMode70: + jsr $CCE2 ; CPU:$CB9A PRG:0B9A 20 E2 CC + jsr $CBF8 ; CPU:$CB9D PRG:0B9D 20 F8 CB + inc Zp6A ; CPU:$CBA0 PRG:0BA0 E6 6A + lda #$0F ; CPU:$CBA2 PRG:0BA2 A9 0F + cmp Zp6A ; CPU:$CBA4 PRG:0BA4 C5 6A + beq UpdateMarkersAndTimers70 ; CPU:$CBA6 PRG:0BA6 F0 03 + jmp $CBB1 ; CPU:$CBA8 PRG:0BA8 4C B1 CB +; ----------------------------------------------------------------------------- +; Routine: UpdateMarkersAndTimers70 +; Global: Refreshes the button markers and the hold timers for mode 70. +; Local: Returns to the mode-70 frame loop. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. +; ----------------------------------------------------------------------------- +UpdateMarkersAndTimers70: + jsr $C524 ; CPU:$CBAB PRG:0BAB 20 24 C5 + jsr $CA8A ; CPU:$CBAE PRG:0BAE 20 8A CA +; ----------------------------------------------------------------------------- +; Routine: CheckButtonsTestMode70 +; Global: Tests the controller byte for any button held in mode 70. +; Local: Branches to UpdateOamTestMode70 when one is. +; Parameters: None. +; Returns: Z flag reflects the test. +; Clobbers: A. +; ----------------------------------------------------------------------------- +CheckButtonsTestMode70: + lda #$00 ; CPU:$CBB1 PRG:0BB1 A9 00 + cmp Zp40 ; CPU:$CBB3 PRG:0BB3 C5 40 + bne UpdateOamTestMode70 ; CPU:$CBB5 PRG:0BB5 D0 09 + cmp Zp41 ; CPU:$CBB7 PRG:0BB7 C5 41 + bne UpdateOamTestMode70 ; CPU:$CBB9 PRG:0BB9 D0 05 + lda #$00 ; CPU:$CBBB PRG:0BBB A9 00 + sta $4015 ; CPU:$CBBD PRG:0BBD 8D 15 40 +; ----------------------------------------------------------------------------- +; Routine: UpdateOamTestMode70 +; Global: Updates the OAM entries for mode 70 from the current button state. +; Local: Returns to the mode-70 frame loop. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y; $0200-$02FF. +; ----------------------------------------------------------------------------- +UpdateOamTestMode70: + ldy #$00 ; CPU:$CBC0 PRG:0BC0 A0 00 + ldx #$00 ; CPU:$CBC2 PRG:0BC2 A2 00 + jsr $CC11 ; CPU:$CBC4 PRG:0BC4 20 11 CC + jsr $C361 ; CPU:$CBC7 PRG:0BC7 20 61 C3 + ldy #$20 ; CPU:$CBCA PRG:0BCA A0 20 + inx ; CPU:$CBCC PRG:0BCC E8 + jsr $CC11 ; CPU:$CBCD PRG:0BCD 20 11 CC + jsr $C361 ; CPU:$CBD0 PRG:0BD0 20 61 C3 + lda #$FF ; CPU:$CBD3 PRG:0BD3 A9 FF + cmp Zp4E ; CPU:$CBD5 PRG:0BD5 C5 4E + bne IncrementFrameCounter70 ; CPU:$CBD7 PRG:0BD7 D0 07 + cmp Zp4F ; CPU:$CBD9 PRG:0BD9 C5 4F + bne IncrementFrameCounter70 ; CPU:$CBDB PRG:0BDB D0 03 + jmp $C1A0 ; CPU:$CBDD PRG:0BDD 4C A0 C1 +; ----------------------------------------------------------------------------- +; Routine: IncrementFrameCounter70 +; Global: Mode-70 copy of the 16-bit frame counter increment. +; Local: Falls through to CheckFrameCounterLimit70. +; Parameters: None. +; Returns: Counter advanced. +; Clobbers: FrameCounterLo/Hi. +; ----------------------------------------------------------------------------- +IncrementFrameCounter70: + inc Zp54 ; CPU:$CBE0 PRG:0BE0 E6 54 + bne CheckFrameCounterLimit70 ; CPU:$CBE2 PRG:0BE2 D0 02 + inc Zp53 ; CPU:$CBE4 PRG:0BE4 E6 53 +; ----------------------------------------------------------------------------- +; Routine: CheckFrameCounterLimit70 +; Global: Mode-70 copy of the frame-counter timeout test. +; Local: Branches to ContinueTestMode70 or ExitToInit70. +; Parameters: None. +; Returns: Z flag reflects the comparison. +; Clobbers: A. +; ----------------------------------------------------------------------------- +CheckFrameCounterLimit70: + lda #$00 ; CPU:$CBE6 PRG:0BE6 A9 00 + cmp Zp54 ; CPU:$CBE8 PRG:0BE8 C5 54 + bne ContinueTestMode70 ; CPU:$CBEA PRG:0BEA D0 06 + lda #$38 ; CPU:$CBEC PRG:0BEC A9 38 + cmp Zp53 ; CPU:$CBEE PRG:0BEE C5 53 + beq ExitToInit70 ; CPU:$CBF0 PRG:0BF0 F0 03 +; ----------------------------------------------------------------------------- +; Routine: ContinueTestMode70 +; Global: Jumps back to the top of the mode-70 frame loop. +; Local: Jumps; does not return. +; Parameters: None. +; Returns: Nothing. +; Clobbers: None. +; ----------------------------------------------------------------------------- +ContinueTestMode70: + jmp $CB9A ; CPU:$CBF2 PRG:0BF2 4C 9A CB +; ----------------------------------------------------------------------------- +; Routine: ExitToInit70 +; Global: Jumps back to InitTestScreen from mode 70. +; Local: Jumps; does not return. +; Parameters: None. +; Returns: Nothing. +; Clobbers: None. +; ----------------------------------------------------------------------------- +ExitToInit70: + jmp $C055 ; CPU:$CBF5 PRG:0BF5 4C 55 C0 +; ----------------------------------------------------------------------------- +; Routine: LatchControllerStrobe +; Global: Strobes the controller port: writes $01 to $4016 to latch, then $00 to release, which is the standard NES pad handshake. +; Local: Falls into the eight-bit read loop. +; Parameters: None. +; Returns: Controller shift register latched. +; Clobbers: A, X; $4016. +; ----------------------------------------------------------------------------- +LatchControllerStrobe: + ldx #$01 ; CPU:$CBF8 PRG:0BF8 A2 01 + stx $4016 ; CPU:$CBFA PRG:0BFA 8E 16 40 + dex ; CPU:$CBFD PRG:0BFD CA + stx $4016 ; CPU:$CBFE PRG:0BFE 8E 16 40 + inx ; CPU:$CC01 PRG:0C01 E8 +; ----------------------------------------------------------------------------- +; Routine: ReadControllerBitsInit +; Global: Sets the loop counter to eight reads before collecting the controller byte. +; Local: Falls into ReadControllerBitsLoop. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, Y. +; ----------------------------------------------------------------------------- +ReadControllerBitsInit: + ldy #$08 ; CPU:$CC02 PRG:0C02 A0 08 +; ----------------------------------------------------------------------------- +; Routine: ReadControllerBitsLoop +; Global: Reads $4016 eight times, shifting each bit into the button array with `lsr a / rol Zp40,x` so A arrives in bit 0. +; Local: Loops Y down from eight, then returns. +; Parameters: Y = remaining reads; X = button index. +; Returns: Eight bits collected. +; Clobbers: A, X, Y; P1Buttons. +; ----------------------------------------------------------------------------- +ReadControllerBitsLoop: + lda $4016,x ; CPU:$CC04 PRG:0C04 BD 16 40 + lsr a ; CPU:$CC07 PRG:0C07 4A + rol Zp40,x ; CPU:$CC08 PRG:0C08 36 40 + dey ; CPU:$CC0A PRG:0C0A 88 + bne ReadControllerBitsLoop ; CPU:$CC0B PRG:0C0B D0 F7 + dex ; CPU:$CC0D PRG:0C0D CA + beq ReadControllerBitsInit ; CPU:$CC0E PRG:0C0E F0 F2 + rts ; CPU:$CC10 PRG:0C10 60 +; ----------------------------------------------------------------------------- +; Routine: ReadControllerBitSingle +; Global: Reads a single controller bit and branches on it, used where only one input matters. +; Local: Branches on the bit; both paths return to the caller. +; Parameters: None. +; Returns: Carry holds the bit. +; Clobbers: A, carry; $4016. +; ----------------------------------------------------------------------------- +ReadControllerBitSingle: + lda $4016,x ; CPU:$CC11 PRG:0C11 BD 16 40 + lsr a ; CPU:$CC14 PRG:0C14 4A + bcc WriteOamFromButtonState ; CPU:$CC15 PRG:0C15 90 01 + rts ; CPU:$CC17 PRG:0C17 60 +; ----------------------------------------------------------------------------- +; Routine: WriteOamFromButtonState +; Global: Writes tile index $03 to the tile byte of the four button-state sprite entries at $0202/$0206/$020A/$020E, so the on-screen buttons light up. +; Local: Falls through to the attribute writes that follow. +; Parameters: Y = OAM offset stride. +; Returns: Nothing. +; Clobbers: A; $0202, $0206, $020A, $020E. +; ----------------------------------------------------------------------------- +WriteOamFromButtonState: + lda #$03 ; CPU:$CC18 PRG:0C18 A9 03 + sta $0202,y ; CPU:$CC1A PRG:0C1A 99 02 02 + sta $0206,y ; CPU:$CC1D PRG:0C1D 99 06 02 + sta $020A,y ; CPU:$CC20 PRG:0C20 99 0A 02 + sta $020E,y ; CPU:$CC23 PRG:0C23 99 0E 02 + sta $0212,y ; CPU:$CC26 PRG:0C26 99 12 02 + sta $0216,y ; CPU:$CC29 PRG:0C29 99 16 02 + sta $021A,y ; CPU:$CC2C PRG:0C2C 99 1A 02 + sta $021E,y ; CPU:$CC2F PRG:0C2F 99 1E 02 + lda #$00 ; CPU:$CC32 PRG:0C32 A9 00 + sta Zp40,x ; CPU:$CC34 PRG:0C34 95 40 + sta Zp56,x ; CPU:$CC36 PRG:0C36 95 56 + sta Zp5B,x ; CPU:$CC38 PRG:0C38 95 5B + sta Zp60,x ; CPU:$CC3A PRG:0C3A 95 60 + sta Zp65,x ; CPU:$CC3C PRG:0C3C 95 65 + sta Zp4E,x ; CPU:$CC3E PRG:0C3E 95 4E + txa ; CPU:$CC40 PRG:0C40 8A + pha ; CPU:$CC41 PRG:0C41 48 + ldx #$1F ; CPU:$CC42 PRG:0C42 A2 1F + lda #$F4 ; CPU:$CC44 PRG:0C44 A9 F4 +; ----------------------------------------------------------------------------- +; Routine: CopyOamShadowLoop +; Global: Descending store into the OAM shadow at $02E0, one byte per X value, then restores the caller's X from the stack. +; Local: Falls through when X goes negative; RTS to the caller. +; Parameters: X = descending index; A = byte to store. +; Returns: X restored from the stack. +; Clobbers: A, X; $02E0-$02FF; stack via pha/pla. +; ----------------------------------------------------------------------------- +CopyOamShadowLoop: + sta $02E0,x ; CPU:$CC46 PRG:0C46 9D E0 02 + dex ; CPU:$CC49 PRG:0C49 CA + bpl CopyOamShadowLoop ; CPU:$CC4A PRG:0C4A 10 FA + pla ; CPU:$CC4C PRG:0C4C 68 + tax ; CPU:$CC4D PRG:0C4D AA + rts ; CPU:$CC4E PRG:0C4E 60 +; ----------------------------------------------------------------------------- +; Routine: LatchControllerStrobeAlt +; Global: Second strobe sequence, used by the alternate read paths. Identical protocol to LatchControllerStrobe. +; Local: Falls into its read loop. +; Parameters: None. +; Returns: Controller shift register latched. +; Clobbers: A, X; $4016. +; ----------------------------------------------------------------------------- +LatchControllerStrobeAlt: + ldx #$01 ; CPU:$CC4F PRG:0C4F A2 01 + stx $4016 ; CPU:$CC51 PRG:0C51 8E 16 40 + dex ; CPU:$CC54 PRG:0C54 CA + stx $4016 ; CPU:$CC55 PRG:0C55 8E 16 40 + inx ; CPU:$CC58 PRG:0C58 E8 +; ----------------------------------------------------------------------------- +; Routine: PollExpansionPortInit +; Global: Prepares the expansion-port probe. +; Local: Falls into PollExpansionPortLoop. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, Y. +; ----------------------------------------------------------------------------- +PollExpansionPortInit: + ldy #$08 ; CPU:$CC59 PRG:0C59 A0 08 +; ----------------------------------------------------------------------------- +; Routine: PollExpansionPortLoop +; Global: Reads the expansion port and tests bits 0-1 against $01. On this cartridge nothing consumes the result, so the branch is always the same way; the read is present but inert. +; Local: Loops eight times, then returns. +; Parameters: Y = remaining reads. +; Returns: Nothing consumed. +; Clobbers: A, Y; $4017. +; ----------------------------------------------------------------------------- +PollExpansionPortLoop: + lda $4016,x ; CPU:$CC5B PRG:0C5B BD 16 40 + and #$03 ; CPU:$CC5E PRG:0C5E 29 03 + cmp #$01 ; CPU:$CC60 PRG:0C60 C9 01 + rol Zp40,x ; CPU:$CC62 PRG:0C62 36 40 + dey ; CPU:$CC64 PRG:0C64 88 + bne PollExpansionPortLoop ; CPU:$CC65 PRG:0C65 D0 F4 + dex ; CPU:$CC67 PRG:0C67 CA + beq PollExpansionPortInit ; CPU:$CC68 PRG:0C68 F0 EF + ldx #$01 ; CPU:$CC6A PRG:0C6A A2 01 +; ----------------------------------------------------------------------------- +; Routine: ReadControllerBitsAltInit +; Global: Sets the loop counter for the alternate controller read path. +; Local: Falls into ReadControllerBitsAltLoop. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, Y. +; ----------------------------------------------------------------------------- +ReadControllerBitsAltInit: + ldy #$08 ; CPU:$CC6C PRG:0C6C A0 08 +; ----------------------------------------------------------------------------- +; Routine: ReadControllerBitsAltLoop +; Global: Alternate eight-bit read, shifting into the second button array at $47. +; Local: Loops Y down from eight, then returns. +; Parameters: Y = remaining reads. +; Returns: Eight bits collected. +; Clobbers: A, X, Y; P1ButtonsAlt. +; ----------------------------------------------------------------------------- +ReadControllerBitsAltLoop: + lda $4016,x ; CPU:$CC6E PRG:0C6E BD 16 40 + lsr a ; CPU:$CC71 PRG:0C71 4A + rol Zp47,x ; CPU:$CC72 PRG:0C72 36 47 + lsr a ; CPU:$CC74 PRG:0C74 4A + rol Zp45,x ; CPU:$CC75 PRG:0C75 36 45 + dey ; CPU:$CC77 PRG:0C77 88 + bne ReadControllerBitsAltLoop ; CPU:$CC78 PRG:0C78 D0 F4 + dex ; CPU:$CC7A PRG:0C7A CA + beq ReadControllerBitsAltInit ; CPU:$CC7B PRG:0C7B F0 EF + ldx #$01 ; CPU:$CC7D PRG:0C7D A2 01 +; ----------------------------------------------------------------------------- +; Routine: ReadControllerBitsAlt2Init +; Global: Sets the loop counter for the third controller read path. +; Local: Falls into ReadControllerBitsAlt2Loop. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, Y. +; ----------------------------------------------------------------------------- +ReadControllerBitsAlt2Init: + ldy #$08 ; CPU:$CC7F PRG:0C7F A0 08 +; ----------------------------------------------------------------------------- +; Routine: ReadControllerBitsAlt2Loop +; Global: Third eight-bit read, shifting into the array at $4B that the direction checks later examine. +; Local: Loops Y down from eight, then returns. +; Parameters: Y = remaining reads. +; Returns: Eight bits collected. +; Clobbers: A, X, Y; P2Buttons. +; ----------------------------------------------------------------------------- +ReadControllerBitsAlt2Loop: + lda $4016,x ; CPU:$CC81 PRG:0C81 BD 16 40 + lsr a ; CPU:$CC84 PRG:0C84 4A + rol Zp4B,x ; CPU:$CC85 PRG:0C85 36 4B + lsr a ; CPU:$CC87 PRG:0C87 4A + rol Zp49,x ; CPU:$CC88 PRG:0C88 36 49 + dey ; CPU:$CC8A PRG:0C8A 88 + bne ReadControllerBitsAlt2Loop ; CPU:$CC8B PRG:0C8B D0 F4 + dex ; CPU:$CC8D PRG:0C8D CA + beq ReadControllerBitsAlt2Init ; CPU:$CC8E PRG:0C8E F0 EF + lda #$00 ; CPU:$CC90 PRG:0C90 A9 00 + sta Zp4D ; CPU:$CC92 PRG:0C92 85 4D + lda Zp49 ; CPU:$CC94 PRG:0C94 A5 49 + cmp #$20 ; CPU:$CC96 PRG:0C96 C9 20 + bne CheckStickUp ; CPU:$CC98 PRG:0C98 D0 06 + lda #$80 ; CPU:$CC9A PRG:0C9A A9 80 + ora Zp4D ; CPU:$CC9C PRG:0C9C 05 4D + sta Zp4D ; CPU:$CC9E PRG:0C9E 85 4D +; ----------------------------------------------------------------------------- +; Routine: CheckStickUp +; Global: Compares the accumulated direction byte against $10 and records the result when the d-pad is being held up. +; Local: Falls through to CheckStickDown. +; Parameters: None. +; Returns: Direction state updated. +; Clobbers: A; PrevStickState. +; ----------------------------------------------------------------------------- +CheckStickUp: + lda Zp4A ; CPU:$CCA0 PRG:0CA0 A5 4A + cmp #$10 ; CPU:$CCA2 PRG:0CA2 C9 10 + bne CheckStickDown ; CPU:$CCA4 PRG:0CA4 D0 06 + lda #$40 ; CPU:$CCA6 PRG:0CA6 A9 40 + ora Zp4D ; CPU:$CCA8 PRG:0CA8 05 4D + sta Zp4D ; CPU:$CCAA PRG:0CAA 85 4D +; ----------------------------------------------------------------------------- +; Routine: CheckStickDown +; Global: Compares against $20 for the down direction. +; Local: Falls through to CheckStickLeft. +; Parameters: None. +; Returns: Direction state updated. +; Clobbers: A. +; ----------------------------------------------------------------------------- +CheckStickDown: + lda Zp4B ; CPU:$CCAC PRG:0CAC A5 4B + cmp #$10 ; CPU:$CCAE PRG:0CAE C9 10 + bne CheckStickLeft ; CPU:$CCB0 PRG:0CB0 D0 06 + lda #$20 ; CPU:$CCB2 PRG:0CB2 A9 20 + ora Zp4D ; CPU:$CCB4 PRG:0CB4 05 4D + sta Zp4D ; CPU:$CCB6 PRG:0CB6 85 4D +; ----------------------------------------------------------------------------- +; Routine: CheckStickLeft +; Global: Compares against $C0 for the left direction. +; Local: Falls through to CheckStickRight. +; Parameters: None. +; Returns: Direction state updated. +; Clobbers: A. +; ----------------------------------------------------------------------------- +CheckStickLeft: + lda Zp4C ; CPU:$CCB8 PRG:0CB8 A5 4C + cmp #$20 ; CPU:$CCBA PRG:0CBA C9 20 + bne CheckStickRight ; CPU:$CCBC PRG:0CBC D0 06 + lda #$10 ; CPU:$CCBE PRG:0CBE A9 10 + ora Zp4D ; CPU:$CCC0 PRG:0CC0 05 4D + sta Zp4D ; CPU:$CCC2 PRG:0CC2 85 4D +; ----------------------------------------------------------------------------- +; Routine: CheckStickRight +; Global: Compares against $C0 for the right direction. +; Local: Falls through to LatchPreviousStickState. +; Parameters: None. +; Returns: Direction state updated. +; Clobbers: A. +; ----------------------------------------------------------------------------- +CheckStickRight: + lda Zp4D ; CPU:$CCC4 PRG:0CC4 A5 4D + cmp #$C0 ; CPU:$CCC6 PRG:0CC6 C9 C0 + bne CheckStickDiagonal ; CPU:$CCC8 PRG:0CC8 D0 0A + ldx #$02 ; CPU:$CCCA PRG:0CCA A2 02 +; ----------------------------------------------------------------------------- +; Routine: LatchPreviousStickState +; Global: Copies the current direction accumulators into the previous-state array so the next frame can detect edges. +; Local: Falls through when X reaches its limit. +; Parameters: X = direction index. +; Returns: Previous state updated. +; Clobbers: X; PrevStickState. +; ----------------------------------------------------------------------------- +LatchPreviousStickState: + lda Zp44,x ; CPU:$CCCC PRG:0CCC B5 44 + sta Zp42,x ; CPU:$CCCE PRG:0CCE 95 42 + dex ; CPU:$CCD0 PRG:0CD0 CA + bne LatchPreviousStickState ; CPU:$CCD1 PRG:0CD1 D0 F9 + rts ; CPU:$CCD3 PRG:0CD3 60 +; ----------------------------------------------------------------------------- +; Routine: CheckStickDiagonal +; Global: Tests for a combined diagonal before the previous state is latched. +; Local: Falls through to LatchPreviousDiagonalState. +; Parameters: None. +; Returns: Diagonal state updated. +; Clobbers: A, X. +; ----------------------------------------------------------------------------- +CheckStickDiagonal: + cmp #$30 ; CPU:$CCD4 PRG:0CD4 C9 30 + bne ReturnFromStickDecode ; CPU:$CCD6 PRG:0CD6 D0 09 + ldx #$02 ; CPU:$CCD8 PRG:0CD8 A2 02 +; ----------------------------------------------------------------------------- +; Routine: LatchPreviousDiagonalState +; Global: Latches the diagonal accumulators into the previous-state array. +; Local: Returns to the caller via ReturnFromStickDecode. +; Parameters: X = direction index. +; Returns: Previous diagonal state updated. +; Clobbers: X; PrevStickState. +; ----------------------------------------------------------------------------- +LatchPreviousDiagonalState: + lda Zp46,x ; CPU:$CCDA PRG:0CDA B5 46 + sta Zp42,x ; CPU:$CCDC PRG:0CDC 95 42 + dex ; CPU:$CCDE PRG:0CDE CA + bne LatchPreviousDiagonalState ; CPU:$CCDF PRG:0CDF D0 F9 +; ----------------------------------------------------------------------------- +; Routine: ReturnFromStickDecode +; Global: Returns from the direction decode with A holding the decoded value. +; Local: RTS. +; Parameters: None. +; Returns: A = decoded direction. +; Clobbers: A. +; ----------------------------------------------------------------------------- +ReturnFromStickDecode: + rts ; CPU:$CCE1 PRG:0CE1 60 +; ----------------------------------------------------------------------------- +; Routine: WaitForVblank +; Global: Waits for vblank, preserves A, and reads the PPUCTRL shadow in preparation for VRAM access. +; Local: Returns once vblank has been seen. +; Parameters: None. +; Returns: A preserved; vblank flag consumed. +; Clobbers: stack via pha/pla; $2002. +; ----------------------------------------------------------------------------- +WaitForVblank: + pha ; CPU:$CCE2 PRG:0CE2 48 + lda $2002 ; CPU:$CCE3 PRG:0CE3 AD 02 20 + lda ZpEF ; CPU:$CCE6 PRG:0CE6 A5 EF + ora #$80 ; CPU:$CCE8 PRG:0CE8 09 80 + sta ZpEF ; CPU:$CCEA PRG:0CEA 85 EF + sta $2000 ; CPU:$CCEC PRG:0CEC 8D 00 20 + sta ZpE0 ; CPU:$CCEF PRG:0CEF 85 E0 + pla ; CPU:$CCF1 PRG:0CF1 68 +; ----------------------------------------------------------------------------- +; Routine: WaitForNmiComplete +; Global: Spins until the NMI handler clears NmiInProgressFlag, so VRAM writes never race the handler. +; Local: RTS once the flag clears. +; Parameters: None. +; Returns: Nothing. +; Clobbers: $E0. +; ----------------------------------------------------------------------------- +WaitForNmiComplete: + bit ZpE0 ; CPU:$CCF2 PRG:0CF2 24 E0 + bmi WaitForNmiComplete ; CPU:$CCF4 PRG:0CF4 30 FC + rts ; CPU:$CCF6 PRG:0CF6 60 ; ----------------------------------------------------------------------------- ; Routine: NmiHandler -; Global: Per-frame NMI handler: PPU updates, OAM DMA, VRAM burst write. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Global: Non-maskable interrupt entry. Saves registers, runs the per-frame PPU work (scroll latch, PPUCTRL and mask setup, OAM DMA) and the VRAM writer, then restores registers and returns. +; Local: Never returns normally; exits through RTI. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y, P; PPU and OAM; VRAM shadow. ; ----------------------------------------------------------------------------- NmiHandler: - pha ; CPU:$CCF7 PRG:0CF7 48 - txa ; CPU:$CCF8 PRG:0CF8 8A - pha ; CPU:$CCF9 PRG:0CF9 48 - tya ; CPU:$CCFA PRG:0CFA 98 - pha ; CPU:$CCFB PRG:0CFB 48 - jsr $CD17 ; CPU:$CCFC PRG:0CFC 20 17 CD - jsr $CD24 ; CPU:$CCFF PRG:0CFF 20 24 CD - lda $0300 ; CPU:$CD02 PRG:0D02 AD 00 03 - beq NmiContinue ; CPU:$CD05 PRG:0D05 F0 03 - jsr $CE4F ; CPU:$CD07 PRG:0D07 20 4F CE + pha ; CPU:$CCF7 PRG:0CF7 48 + txa ; CPU:$CCF8 PRG:0CF8 8A + pha ; CPU:$CCF9 PRG:0CF9 48 + tya ; CPU:$CCFA PRG:0CFA 98 + pha ; CPU:$CCFB PRG:0CFB 48 + jsr $CD17 ; CPU:$CCFC PRG:0CFC 20 17 CD + jsr $CD24 ; CPU:$CCFF PRG:0CFF 20 24 CD + lda $0300 ; CPU:$CD02 PRG:0D02 AD 00 03 + beq NmiContinue ; CPU:$CD05 PRG:0D05 F0 03 + jsr $CE4F ; CPU:$CD07 PRG:0D07 20 4F CE ; ----------------------------------------------------------------------------- ; Routine: NmiContinue -; Global: Continue NMI: latch PPU scroll, clear flag byte. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Global: Second half of the NMI body, reached after the register save. +; Local: Falls through into the PPU setup calls. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y. ; ----------------------------------------------------------------------------- NmiContinue: - jsr $CE3C ; CPU:$CD0A PRG:0D0A 20 3C CE - lda #$00 ; CPU:$CD0D PRG:0D0D A9 00 - sta NmiFlagByte ; CPU:$CD0F PRG:0D0F 85 E0 - pla ; CPU:$CD11 PRG:0D11 68 - tay ; CPU:$CD12 PRG:0D12 A8 - pla ; CPU:$CD13 PRG:0D13 68 - tax ; CPU:$CD14 PRG:0D14 AA - pla ; CPU:$CD15 PRG:0D15 68 - rti ; CPU:$CD16 PRG:0D16 40 + jsr $CE3C ; CPU:$CD0A PRG:0D0A 20 3C CE + lda #$00 ; CPU:$CD0D PRG:0D0D A9 00 + sta ZpE0 ; CPU:$CD0F PRG:0D0F 85 E0 + pla ; CPU:$CD11 PRG:0D11 68 + tay ; CPU:$CD12 PRG:0D12 A8 + pla ; CPU:$CD13 PRG:0D13 68 + tax ; CPU:$CD14 PRG:0D14 AA + pla ; CPU:$CD15 PRG:0D15 68 + rti ; CPU:$CD16 PRG:0D16 40 ; ----------------------------------------------------------------------------- ; Routine: PpuCtrlSetup -; Global: Latch PPUSTATUS, clear NMI bit in shadow, write to PPUCTRL. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Global: Reads $2002 to clear the vblank latch and masks bit 7 out of the PPUCTRL shadow before it is written back. +; Local: Returns to the NMI body. +; Parameters: None. +; Returns: PpuCtrlShadow updated with bit 7 clear. +; Clobbers: A; $2002, PpuCtrlShadow. ; ----------------------------------------------------------------------------- PpuCtrlSetup: - lda $2002 ; CPU:$CD17 PRG:0D17 AD 02 20 - lda PpuCtrlShadow ; CPU:$CD1A PRG:0D1A A5 EF - and #$7F ; CPU:$CD1C PRG:0D1C 29 7F - sta PpuCtrlShadow ; CPU:$CD1E PRG:0D1E 85 EF - sta $2000 ; CPU:$CD20 PRG:0D20 8D 00 20 - rts ; CPU:$CD23 PRG:0D23 60 + lda $2002 ; CPU:$CD17 PRG:0D17 AD 02 20 + lda ZpEF ; CPU:$CD1A PRG:0D1A A5 EF + and #$7F ; CPU:$CD1C PRG:0D1C 29 7F + sta ZpEF ; CPU:$CD1E PRG:0D1E 85 EF + sta $2000 ; CPU:$CD20 PRG:0D20 8D 00 20 + rts ; CPU:$CD23 PRG:0D23 60 ; ----------------------------------------------------------------------------- ; Routine: OamDmaSetup -; Global: Set OAMADDR=0 and trigger OAM DMA ($4014=$02). -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Global: Points the PPU OAM address at $0200 and starts the 256-byte sprite DMA. +; Local: Returns to the NMI body once the transfer is issued. +; Parameters: None. +; Returns: OAM DMA issued. +; Clobbers: A; $2003, $4014. ; ----------------------------------------------------------------------------- OamDmaSetup: - lda #$00 ; CPU:$CD24 PRG:0D24 A9 00 - sta $2003 ; CPU:$CD26 PRG:0D26 8D 03 20 - lda #$02 ; CPU:$CD29 PRG:0D29 A9 02 - sta $4014 ; CPU:$CD2B PRG:0D2B 8D 14 40 - rts ; CPU:$CD2E PRG:0D2E 60 + lda #$00 ; CPU:$CD24 PRG:0D24 A9 00 + sta $2003 ; CPU:$CD26 PRG:0D26 8D 03 20 + lda #$02 ; CPU:$CD29 PRG:0D29 A9 02 + sta $4014 ; CPU:$CD2B PRG:0D2B 8D 14 40 + rts ; CPU:$CD2E PRG:0D2E 60 ; ----------------------------------------------------------------------------- ; Routine: PpuMaskSetup -; Global: Clear sprite/background bits in PPUMASK shadow. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Global: Masks bits 5 and 3 out of the PPUMASK shadow and writes the result to both the shadow and $2001. +; Local: Falls through to WritePpuMask. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A; $2001, PpuMaskShadow. ; ----------------------------------------------------------------------------- PpuMaskSetup: - lda PpuMaskValue ; CPU:$CD2F PRG:0D2F A5 EE - and #$E7 ; CPU:$CD31 PRG:0D31 29 E7 - sta PpuMaskValue ; CPU:$CD33 PRG:0D33 85 EE - sta $2001 ; CPU:$CD35 PRG:0D35 8D 01 20 - rts ; CPU:$CD38 PRG:0D38 60 -; ---- data $CD39-$CD3E (6 bytes) ---- - .byte $A5, $EE, $09, $18, $D0, $F4 ; CPU:$CD39 PRG:0D39 A5 EE 09 18 D0 F4 + lda ZpEE ; CPU:$CD2F PRG:0D2F A5 EE + and #$E7 ; CPU:$CD31 PRG:0D31 29 E7 +; ----------------------------------------------------------------------------- +; Routine: WritePpuMask +; Global: Writes the prepared PPUMASK value to both the shadow and the hardware register, then returns. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A; $2001, PpuMaskShadow. +; ----------------------------------------------------------------------------- +WritePpuMask: + sta ZpEE ; CPU:$CD33 PRG:0D33 85 EE + sta $2001 ; CPU:$CD35 PRG:0D35 8D 01 20 + rts ; CPU:$CD38 PRG:0D38 60 +; ----------------------------------------------------------------------------- +; Routine: EnableSpritesAndBackground +; Global: Sets bits 4 and 3 in the PPUMASK shadow to turn sprites and background back on, then shares WritePpuMask's store-and-return tail. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A; $2001, PpuMaskShadow. +; ----------------------------------------------------------------------------- +EnableSpritesAndBackground: + lda ZpEE ; CPU:$CD39 PRG:0D39 A5 EE + ora #$18 ; CPU:$CD3B PRG:0D3B 09 18 + bne WritePpuMask ; CPU:$CD3D PRG:0D3D D0 F4 ; ----------------------------------------------------------------------------- ; Routine: VramPtrWrite -; Global: Write VRAM data via pointer table at $0000 (jsr CDC8 + jmp CD99). -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Global: Top of the indirect VRAM writer. First runs RetAddrUpdate so the caller's return address drives the dispatch, then reads the next byte from the operation stream. +; Local: Falls into VramPtrTableRead; the two are called as a pair. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y; VRAM pointer. ; ----------------------------------------------------------------------------- VramPtrWrite: - jsr $CDC8 ; CPU:$CD3F PRG:0D3F 20 C8 CD - jmp $CD99 ; CPU:$CD42 PRG:0D42 4C 99 CD + jsr $CDC8 ; CPU:$CD3F PRG:0D3F 20 C8 CD + jmp $CD99 ; CPU:$CD42 PRG:0D42 4C 99 CD ; ----------------------------------------------------------------------------- ; Routine: VramWriteLoop -; Global: Loop writing bytes from indirect pointer to PPUDATA. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Global: Sets the PPU address for the current VRAM command by writing the high byte and low byte to $2006 in two steps, pulling each from the stream. +; Local: Loops over the stream bytes, then falls through. +; Parameters: Y = stream index. +; Returns: PPU address latched. +; Clobbers: A, Y; $2006; stack via pha/pla. ; ----------------------------------------------------------------------------- VramWriteLoop: - pha ; CPU:$CD45 PRG:0D45 48 - sta $2006 ; CPU:$CD46 PRG:0D46 8D 06 20 - iny ; CPU:$CD49 PRG:0D49 C8 - lda (VramPtrLo),Y ; CPU:$CD4A PRG:0D4A B1 00 - sta $2006 ; CPU:$CD4C PRG:0D4C 8D 06 20 - iny ; CPU:$CD4F PRG:0D4F C8 - lda (VramPtrLo),Y ; CPU:$CD50 PRG:0D50 B1 00 - asl ; CPU:$CD52 PRG:0D52 0A - pha ; CPU:$CD53 PRG:0D53 48 - lda PpuCtrlShadow ; CPU:$CD54 PRG:0D54 A5 EF - ora #$04 ; CPU:$CD56 PRG:0D56 09 04 - bcs Label_CD5C ; CPU:$CD58 PRG:0D58 B0 02 - and #$FB ; CPU:$CD5A PRG:0D5A 29 FB + pha ; CPU:$CD45 PRG:0D45 48 + sta $2006 ; CPU:$CD46 PRG:0D46 8D 06 20 + iny ; CPU:$CD49 PRG:0D49 C8 + lda (Zp00),y ; CPU:$CD4A PRG:0D4A B1 00 + sta $2006 ; CPU:$CD4C PRG:0D4C 8D 06 20 + iny ; CPU:$CD4F PRG:0D4F C8 + lda (Zp00),y ; CPU:$CD50 PRG:0D50 B1 00 + asl a ; CPU:$CD52 PRG:0D52 0A + pha ; CPU:$CD53 PRG:0D53 48 + lda ZpEF ; CPU:$CD54 PRG:0D54 A5 EF + ora #$04 ; CPU:$CD56 PRG:0D56 09 04 + bcs WritePpuCtrlFromShadow ; CPU:$CD58 PRG:0D58 B0 02 + and #$FB ; CPU:$CD5A PRG:0D5A 29 FB ; ----------------------------------------------------------------------------- -; Routine: Label_CD5C -; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Routine: WritePpuCtrlFromShadow +; Global: Writes A to PPUCTRL and stores the same value back into the shadow, so the shadow and the hardware register never disagree. +; Local: Falls through to the flag save that the dispatch stream needs. +; Parameters: A = PPUCTRL value. +; Returns: Nothing. +; Clobbers: A; $2000, PpuCtrlShadow; stack via asl/php. ; ----------------------------------------------------------------------------- -Label_CD5C: - sta $2000 ; CPU:$CD5C PRG:0D5C 8D 00 20 - sta PpuCtrlShadow ; CPU:$CD5F PRG:0D5F 85 EF - pla ; CPU:$CD61 PRG:0D61 68 - asl ; CPU:$CD62 PRG:0D62 0A - php ; CPU:$CD63 PRG:0D63 08 - bcc Label_CD69 ; CPU:$CD64 PRG:0D64 90 03 - ora #$02 ; CPU:$CD66 PRG:0D66 09 02 - iny ; CPU:$CD68 PRG:0D68 C8 +WritePpuCtrlFromShadow: + sta $2000 ; CPU:$CD5C PRG:0D5C 8D 00 20 + sta ZpEF ; CPU:$CD5F PRG:0D5F 85 EF + pla ; CPU:$CD61 PRG:0D61 68 + asl a ; CPU:$CD62 PRG:0D62 0A + php ; CPU:$CD63 PRG:0D63 08 + bcc ReturnFromVramPtrWrite ; CPU:$CD64 PRG:0D64 90 03 + ora #$02 ; CPU:$CD66 PRG:0D66 09 02 + iny ; CPU:$CD68 PRG:0D68 C8 ; ----------------------------------------------------------------------------- -; Routine: Label_CD69 -; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Routine: ReturnFromVramPtrWrite +; Global: Restores the flags the dispatch stream saved, then normalises carry: it clears carry and branches when the restored result was non-zero, and sets carry otherwise. Carry is the stream's 'long command' selector. +; Local: Branches to ComputeVramByteCount or falls through with carry set. +; Parameters: None. +; Returns: Carry set per the restored flags. +; Clobbers: P; stack via plp. ; ----------------------------------------------------------------------------- -Label_CD69: - plp ; CPU:$CD69 PRG:0D69 28 - clc ; CPU:$CD6A PRG:0D6A 18 - bne Label_CD6E ; CPU:$CD6B PRG:0D6B D0 01 - sec ; CPU:$CD6D PRG:0D6D 38 +ReturnFromVramPtrWrite: + plp ; CPU:$CD69 PRG:0D69 28 + clc ; CPU:$CD6A PRG:0D6A 18 + bne ComputeVramByteCount ; CPU:$CD6B PRG:0D6B D0 01 + sec ; CPU:$CD6D PRG:0D6D 38 ; ----------------------------------------------------------------------------- -; Routine: Label_CD6E -; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Routine: ComputeVramByteCount +; Global: Derives the write length from the command byte using two rotations, giving the count of following data bytes. +; Local: Falls through to AdvanceVramReadIndex. +; Parameters: A = command byte. +; Returns: X = byte count. +; Clobbers: A, X. ; ----------------------------------------------------------------------------- -Label_CD6E: - ror ; CPU:$CD6E PRG:0D6E 6A - lsr ; CPU:$CD6F PRG:0D6F 4A - tax ; CPU:$CD70 PRG:0D70 AA +ComputeVramByteCount: + ror a ; CPU:$CD6E PRG:0D6E 6A + lsr a ; CPU:$CD6F PRG:0D6F 4A + tax ; CPU:$CD70 PRG:0D70 AA ; ----------------------------------------------------------------------------- -; Routine: Label_CD71 -; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Routine: AdvanceVramReadIndex +; Global: Steps the stream read index, honouring a carry-flag adjustment for the long-command form. +; Local: Falls through to WriteVramStreamByte. +; Parameters: Carry selects the index step. +; Returns: Stream index advanced. +; Clobbers: Y, carry. ; ----------------------------------------------------------------------------- -Label_CD71: - bcs Label_CD74 ; CPU:$CD71 PRG:0D71 B0 01 - iny ; CPU:$CD73 PRG:0D73 C8 +AdvanceVramReadIndex: + bcs WriteVramStreamByte ; CPU:$CD71 PRG:0D71 B0 01 + iny ; CPU:$CD73 PRG:0D73 C8 ; ----------------------------------------------------------------------------- -; Routine: Label_CD74 -; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Routine: WriteVramStreamByte +; Global: Copies one byte per iteration from the stream, indexed indirectly through the VRAM pointer, straight into $2007. +; Local: Loops until X reaches zero, then falls through. +; Parameters: X = remaining bytes. +; Returns: Nothing. +; Clobbers: A, X, Y; $2007. ; ----------------------------------------------------------------------------- -Label_CD74: - lda (VramPtrLo),Y ; CPU:$CD74 PRG:0D74 B1 00 - sta $2007 ; CPU:$CD76 PRG:0D76 8D 07 20 - dex ; CPU:$CD79 PRG:0D79 CA - bne Label_CD71 ; CPU:$CD7A PRG:0D7A D0 F5 - pla ; CPU:$CD7C PRG:0D7C 68 - cmp #$3F ; CPU:$CD7D PRG:0D7D C9 3F - bne Label_CD8D ; CPU:$CD7F PRG:0D7F D0 0C - sta $2006 ; CPU:$CD81 PRG:0D81 8D 06 20 - stx $2006 ; CPU:$CD84 PRG:0D84 8E 06 20 - stx $2006 ; CPU:$CD87 PRG:0D87 8E 06 20 - stx $2006 ; CPU:$CD8A PRG:0D8A 8E 06 20 +WriteVramStreamByte: + lda (Zp00),y ; CPU:$CD74 PRG:0D74 B1 00 + sta $2007 ; CPU:$CD76 PRG:0D76 8D 07 20 + dex ; CPU:$CD79 PRG:0D79 CA + bne AdvanceVramReadIndex ; CPU:$CD7A PRG:0D7A D0 F5 + pla ; CPU:$CD7C PRG:0D7C 68 + cmp #$3F ; CPU:$CD7D PRG:0D7D C9 3F + bne AdvanceVramPointerByY ; CPU:$CD7F PRG:0D7F D0 0C + sta $2006 ; CPU:$CD81 PRG:0D81 8D 06 20 + stx $2006 ; CPU:$CD84 PRG:0D84 8E 06 20 + stx $2006 ; CPU:$CD87 PRG:0D87 8E 06 20 + stx $2006 ; CPU:$CD8A PRG:0D8A 8E 06 20 ; ----------------------------------------------------------------------------- -; Routine: Label_CD8D -; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Routine: AdvanceVramPointerByY +; Global: Adds the stream offset to the VRAM pointer before the next command. +; Local: Falls through to the next command dispatch. +; Parameters: Y = offset. +; Returns: Pointer advanced. +; Clobbers: A, Y; VramPtrLo/Hi. ; ----------------------------------------------------------------------------- -Label_CD8D: - sec ; CPU:$CD8D PRG:0D8D 38 - tya ; CPU:$CD8E PRG:0D8E 98 - adc VramPtrLo ; CPU:$CD8F PRG:0D8F 65 00 - sta VramPtrLo ; CPU:$CD91 PRG:0D91 85 00 - lda #$00 ; CPU:$CD93 PRG:0D93 A9 00 - adc VramPtrHi ; CPU:$CD95 PRG:0D95 65 01 - sta VramPtrHi ; CPU:$CD97 PRG:0D97 85 01 +AdvanceVramPointerByY: + sec ; CPU:$CD8D PRG:0D8D 38 + tya ; CPU:$CD8E PRG:0D8E 98 + adc Zp00 ; CPU:$CD8F PRG:0D8F 65 00 + sta Zp00 ; CPU:$CD91 PRG:0D91 85 00 + lda #$00 ; CPU:$CD93 PRG:0D93 A9 00 + adc Zp01 ; CPU:$CD95 PRG:0D95 65 01 + sta Zp01 ; CPU:$CD97 PRG:0D97 85 01 ; ----------------------------------------------------------------------------- ; Routine: VramPtrTableRead -; Global: Read from pointer table at $0000; handle pointer table opcodes. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Global: Reads the next opcode byte from the operation stream indexed by the VRAM pointer. +; Local: Branches to HandleJmpOpcode or HandlePpuCtrlOpcode by opcode value. +; Parameters: None. +; Returns: A = opcode byte. +; Clobbers: A, X, Y; VramPtrLo/Hi. ; ----------------------------------------------------------------------------- VramPtrTableRead: - ldx $2002 ; CPU:$CD99 PRG:0D99 AE 02 20 - ldy #$00 ; CPU:$CD9C PRG:0D9C A0 00 - lda (VramPtrLo),Y ; CPU:$CD9E PRG:0D9E B1 00 - bpl Label_CDA3 ; CPU:$CDA0 PRG:0DA0 10 01 - rts ; CPU:$CDA2 PRG:0DA2 60 + ldx $2002 ; CPU:$CD99 PRG:0D99 AE 02 20 + ldy #$00 ; CPU:$CD9C PRG:0D9C A0 00 + lda (Zp00),y ; CPU:$CD9E PRG:0D9E B1 00 + bpl HandlePpuCtrlOpcode ; CPU:$CDA0 PRG:0DA0 10 01 + rts ; CPU:$CDA2 PRG:0DA2 60 ; ----------------------------------------------------------------------------- -; Routine: Label_CDA3 -; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Routine: HandlePpuCtrlOpcode +; Global: Recognises the stream opcode $60 and performs the deferred PPUCTRL write it introduces. +; Local: Falls through to the shared VRAM write path. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A; PpuCtrlShadow, $2000. ; ----------------------------------------------------------------------------- -Label_CDA3: - cmp #$60 ; CPU:$CDA3 PRG:0DA3 C9 60 - bne Label_CDB1 ; CPU:$CDA5 PRG:0DA5 D0 0A - pla ; CPU:$CDA7 PRG:0DA7 68 - sta VramPtrHi ; CPU:$CDA8 PRG:0DA8 85 01 - pla ; CPU:$CDAA PRG:0DAA 68 - sta VramPtrLo ; CPU:$CDAB PRG:0DAB 85 00 - ldy #$02 ; CPU:$CDAD PRG:0DAD A0 02 - bne Label_CD8D ; CPU:$CDAF PRG:0DAF D0 DC +HandlePpuCtrlOpcode: + cmp #$60 ; CPU:$CDA3 PRG:0DA3 C9 60 + bne HandleJmpOpcode ; CPU:$CDA5 PRG:0DA5 D0 0A + pla ; CPU:$CDA7 PRG:0DA7 68 + sta Zp01 ; CPU:$CDA8 PRG:0DA8 85 01 + pla ; CPU:$CDAA PRG:0DAA 68 + sta Zp00 ; CPU:$CDAB PRG:0DAB 85 00 + ldy #$02 ; CPU:$CDAD PRG:0DAD A0 02 + bne AdvanceVramPointerByY ; CPU:$CDAF PRG:0DAF D0 DC ; ----------------------------------------------------------------------------- -; Routine: Label_CDB1 -; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Routine: HandleJmpOpcode +; Global: Recognises the stream opcode $4C and rewrites the dispatch pointer so the stream can jump within itself. +; Local: Falls through to the shared VRAM write path. +; Parameters: None. +; Returns: Dispatch pointer updated. +; Clobbers: A, X, Y; VramPtrLo/Hi. ; ----------------------------------------------------------------------------- -Label_CDB1: - cmp #$4C ; CPU:$CDB1 PRG:0DB1 C9 4C - bne VramWriteLoop ; CPU:$CDB3 PRG:0DB3 D0 90 - lda VramPtrLo ; CPU:$CDB5 PRG:0DB5 A5 00 - pha ; CPU:$CDB7 PRG:0DB7 48 - lda VramPtrHi ; CPU:$CDB8 PRG:0DB8 A5 01 - pha ; CPU:$CDBA PRG:0DBA 48 - iny ; CPU:$CDBB PRG:0DBB C8 - lda (VramPtrLo),Y ; CPU:$CDBC PRG:0DBC B1 00 - tax ; CPU:$CDBE PRG:0DBE AA - iny ; CPU:$CDBF PRG:0DBF C8 - lda (VramPtrLo),Y ; CPU:$CDC0 PRG:0DC0 B1 00 - sta VramPtrHi ; CPU:$CDC2 PRG:0DC2 85 01 - stx VramPtrLo ; CPU:$CDC4 PRG:0DC4 86 00 - bcs VramPtrTableRead ; CPU:$CDC6 PRG:0DC6 B0 D1 +HandleJmpOpcode: + cmp #$4C ; CPU:$CDB1 PRG:0DB1 C9 4C + bne VramWriteLoop ; CPU:$CDB3 PRG:0DB3 D0 90 + lda Zp00 ; CPU:$CDB5 PRG:0DB5 A5 00 + pha ; CPU:$CDB7 PRG:0DB7 48 + lda Zp01 ; CPU:$CDB8 PRG:0DB8 A5 01 + pha ; CPU:$CDBA PRG:0DBA 48 + iny ; CPU:$CDBB PRG:0DBB C8 + lda (Zp00),y ; CPU:$CDBC PRG:0DBC B1 00 + tax ; CPU:$CDBE PRG:0DBE AA + iny ; CPU:$CDBF PRG:0DBF C8 + lda (Zp00),y ; CPU:$CDC0 PRG:0DC0 B1 00 + sta Zp01 ; CPU:$CDC2 PRG:0DC2 85 01 + stx Zp00 ; CPU:$CDC4 PRG:0DC4 86 00 + bcs VramPtrTableRead ; CPU:$CDC6 PRG:0DC6 B0 D1 ; ----------------------------------------------------------------------------- ; Routine: RetAddrUpdate -; Global: Get return address from stack, advance by 2, store back. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Global: Pulls the caller's return address off the CPU stack and uses it as a program counter for the VRAM command stream. This is the runtime dispatch that a purely static tracer cannot follow, and the reason the operation handlers look unreachable. +; Local: Jumps into the stream; each handler eventually returns here. +; Parameters: None. +; Returns: Return address rewritten from the stream. +; Clobbers: A, X, Y, stack; RetAddrTempLo/Hi. ; ----------------------------------------------------------------------------- RetAddrUpdate: - tsx ; CPU:$CDC8 PRG:0DC8 BA - lda $0103,X ; CPU:$CDC9 PRG:0DC9 BD 03 01 - sta RetAddrTempLo ; CPU:$CDCC PRG:0DCC 85 05 - lda $0104,X ; CPU:$CDCE PRG:0DCE BD 04 01 - sta RetAddrTempHi ; CPU:$CDD1 PRG:0DD1 85 06 - ldy #$01 ; CPU:$CDD3 PRG:0DD3 A0 01 - lda (RetAddrTempLo),Y ; CPU:$CDD5 PRG:0DD5 B1 05 - sta VramPtrLo ; CPU:$CDD7 PRG:0DD7 85 00 - iny ; CPU:$CDD9 PRG:0DD9 C8 - lda (RetAddrTempLo),Y ; CPU:$CDDA PRG:0DDA B1 05 - sta VramPtrHi ; CPU:$CDDC PRG:0DDC 85 01 - clc ; CPU:$CDDE PRG:0DDE 18 - lda #$02 ; CPU:$CDDF PRG:0DDF A9 02 - adc RetAddrTempLo ; CPU:$CDE1 PRG:0DE1 65 05 - sta $0103,X ; CPU:$CDE3 PRG:0DE3 9D 03 01 - lda #$00 ; CPU:$CDE6 PRG:0DE6 A9 00 - adc RetAddrTempHi ; CPU:$CDE8 PRG:0DE8 65 06 - sta $0104,X ; CPU:$CDEA PRG:0DEA 9D 04 01 - rts ; CPU:$CDED PRG:0DED 60 + tsx ; CPU:$CDC8 PRG:0DC8 BA + lda $0103,x ; CPU:$CDC9 PRG:0DC9 BD 03 01 + sta Zp05 ; CPU:$CDCC PRG:0DCC 85 05 + lda $0104,x ; CPU:$CDCE PRG:0DCE BD 04 01 + sta Zp06 ; CPU:$CDD1 PRG:0DD1 85 06 + ldy #$01 ; CPU:$CDD3 PRG:0DD3 A0 01 + lda (Zp05),y ; CPU:$CDD5 PRG:0DD5 B1 05 + sta Zp00 ; CPU:$CDD7 PRG:0DD7 85 00 + iny ; CPU:$CDD9 PRG:0DD9 C8 + lda (Zp05),y ; CPU:$CDDA PRG:0DDA B1 05 + sta Zp01 ; CPU:$CDDC PRG:0DDC 85 01 + clc ; CPU:$CDDE PRG:0DDE 18 + lda #$02 ; CPU:$CDDF PRG:0DDF A9 02 + adc Zp05 ; CPU:$CDE1 PRG:0DE1 65 05 + sta $0103,x ; CPU:$CDE3 PRG:0DE3 9D 03 01 + lda #$00 ; CPU:$CDE6 PRG:0DE6 A9 00 + adc Zp06 ; CPU:$CDE8 PRG:0DE8 65 06 + sta $0104,x ; CPU:$CDEA PRG:0DEA 9D 04 01 + rts ; CPU:$CDED PRG:0DED 60 ; ----------------------------------------------------------------------------- ; Routine: VramWrite -; Global: Set PPU address and write data bytes to PPUDATA. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Global: Direct VRAM writer used by the burst path: sets the pointer, length and destination registers from its arguments. +; Local: Falls into VramWriteSetup. +; Parameters: A, X, Y = pointer, length, destination. +; Returns: Nothing. +; Clobbers: A, X, Y; VramPtrLo/Hi. ; ----------------------------------------------------------------------------- VramWrite: - sta VramPtrLo ; CPU:$CDEE PRG:0DEE 85 00 - stx VramPtrHi ; CPU:$CDF0 PRG:0DF0 86 01 - sty VramLen ; CPU:$CDF2 PRG:0DF2 84 02 - lda $2002 ; CPU:$CDF4 PRG:0DF4 AD 02 20 - lda PpuCtrlShadow ; CPU:$CDF7 PRG:0DF7 A5 EF - and #$FB ; CPU:$CDF9 PRG:0DF9 29 FB - sta $2000 ; CPU:$CDFB PRG:0DFB 8D 00 20 - sta PpuCtrlShadow ; CPU:$CDFE PRG:0DFE 85 EF - lda VramPtrLo ; CPU:$CE00 PRG:0E00 A5 00 - sta $2006 ; CPU:$CE02 PRG:0E02 8D 06 20 - ldy #$00 ; CPU:$CE05 PRG:0E05 A0 00 - sty $2006 ; CPU:$CE07 PRG:0E07 8C 06 20 - ldx #$04 ; CPU:$CE0A PRG:0E0A A2 04 - cmp #$20 ; CPU:$CE0C PRG:0E0C C9 20 - bcs Label_CE12 ; CPU:$CE0E PRG:0E0E B0 02 - ldx VramLen ; CPU:$CE10 PRG:0E10 A6 02 + sta Zp00 ; CPU:$CDEE PRG:0DEE 85 00 + stx Zp01 ; CPU:$CDF0 PRG:0DF0 86 01 + sty Zp02 ; CPU:$CDF2 PRG:0DF2 84 02 + lda $2002 ; CPU:$CDF4 PRG:0DF4 AD 02 20 + lda ZpEF ; CPU:$CDF7 PRG:0DF7 A5 EF + and #$FB ; CPU:$CDF9 PRG:0DF9 29 FB + sta $2000 ; CPU:$CDFB PRG:0DFB 8D 00 20 + sta ZpEF ; CPU:$CDFE PRG:0DFE 85 EF + lda Zp00 ; CPU:$CE00 PRG:0E00 A5 00 + sta $2006 ; CPU:$CE02 PRG:0E02 8D 06 20 + ldy #$00 ; CPU:$CE05 PRG:0E05 A0 00 + sty $2006 ; CPU:$CE07 PRG:0E07 8C 06 20 + ldx #$04 ; CPU:$CE0A PRG:0E0A A2 04 + cmp #$20 ; CPU:$CE0C PRG:0E0C C9 20 + bcs VramWriteSetup ; CPU:$CE0E PRG:0E0E B0 02 + ldx Zp02 ; CPU:$CE10 PRG:0E10 A6 02 ; ----------------------------------------------------------------------------- -; Routine: Label_CE12 -; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Routine: VramWriteSetup +; Global: Prepares the length counter for a direct VRAM write. +; Local: Falls into WriteVramZeroFill or WriteVramByteStream by length. +; Parameters: None. +; Returns: Length loaded. +; Clobbers: A, Y; VramOpLength. ; ----------------------------------------------------------------------------- -Label_CE12: - ldy #$00 ; CPU:$CE12 PRG:0E12 A0 00 - lda VramPtrHi ; CPU:$CE14 PRG:0E14 A5 01 +VramWriteSetup: + ldy #$00 ; CPU:$CE12 PRG:0E12 A0 00 + lda Zp01 ; CPU:$CE14 PRG:0E14 A5 01 ; ----------------------------------------------------------------------------- -; Routine: Label_CE16 -; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Routine: WriteVramZeroFill +; Global: Writes a run of $00 bytes to $2007 until the length counter expires. +; Local: Falls through when Y reaches zero. +; Parameters: Y = remaining bytes. +; Returns: Nothing. +; Clobbers: Y; $2007. ; ----------------------------------------------------------------------------- -Label_CE16: - sta $2007 ; CPU:$CE16 PRG:0E16 8D 07 20 - dey ; CPU:$CE19 PRG:0E19 88 - bne Label_CE16 ; CPU:$CE1A PRG:0E1A D0 FA - dex ; CPU:$CE1C PRG:0E1C CA - bne Label_CE16 ; CPU:$CE1D PRG:0E1D D0 F7 - ldy VramLen ; CPU:$CE1F PRG:0E1F A4 02 - lda VramPtrLo ; CPU:$CE21 PRG:0E21 A5 00 - cmp #$20 ; CPU:$CE23 PRG:0E23 C9 20 - bcc Label_CE39 ; CPU:$CE25 PRG:0E25 90 12 - adc #$02 ; CPU:$CE27 PRG:0E27 69 02 - sta $2006 ; CPU:$CE29 PRG:0E29 8D 06 20 - lda #$C0 ; CPU:$CE2C PRG:0E2C A9 C0 - sta $2006 ; CPU:$CE2E PRG:0E2E 8D 06 20 - ldx #$40 ; CPU:$CE31 PRG:0E31 A2 40 +WriteVramZeroFill: + sta $2007 ; CPU:$CE16 PRG:0E16 8D 07 20 + dey ; CPU:$CE19 PRG:0E19 88 + bne WriteVramZeroFill ; CPU:$CE1A PRG:0E1A D0 FA + dex ; CPU:$CE1C PRG:0E1C CA + bne WriteVramZeroFill ; CPU:$CE1D PRG:0E1D D0 F7 + ldy Zp02 ; CPU:$CE1F PRG:0E1F A4 02 + lda Zp00 ; CPU:$CE21 PRG:0E21 A5 00 + cmp #$20 ; CPU:$CE23 PRG:0E23 C9 20 + bcc VramWriteDone ; CPU:$CE25 PRG:0E25 90 12 + adc #$02 ; CPU:$CE27 PRG:0E27 69 02 + sta $2006 ; CPU:$CE29 PRG:0E29 8D 06 20 + lda #$C0 ; CPU:$CE2C PRG:0E2C A9 C0 + sta $2006 ; CPU:$CE2E PRG:0E2E 8D 06 20 + ldx #$40 ; CPU:$CE31 PRG:0E31 A2 40 ; ----------------------------------------------------------------------------- -; Routine: Label_CE33 -; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Routine: WriteVramByteStream +; Global: Writes a run of bytes to $2007, one per X iteration. +; Local: Falls through when X reaches zero. +; Parameters: X = remaining bytes. +; Returns: Nothing. +; Clobbers: A, X; $2007. ; ----------------------------------------------------------------------------- -Label_CE33: - sty $2007 ; CPU:$CE33 PRG:0E33 8C 07 20 - dex ; CPU:$CE36 PRG:0E36 CA - bne Label_CE33 ; CPU:$CE37 PRG:0E37 D0 FA +WriteVramByteStream: + sty $2007 ; CPU:$CE33 PRG:0E33 8C 07 20 + dex ; CPU:$CE36 PRG:0E36 CA + bne WriteVramByteStream ; CPU:$CE37 PRG:0E37 D0 FA ; ----------------------------------------------------------------------------- -; Routine: Label_CE39 -; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Routine: VramWriteDone +; Global: Restores the VRAM pointer high byte and returns from a direct write. +; Local: RTS. +; Parameters: None. +; Returns: A = final pointer value. +; Clobbers: A, X. ; ----------------------------------------------------------------------------- -Label_CE39: - ldx VramPtrHi ; CPU:$CE39 PRG:0E39 A6 01 - rts ; CPU:$CE3B PRG:0E3B 60 +VramWriteDone: + ldx Zp01 ; CPU:$CE39 PRG:0E39 A6 01 + rts ; CPU:$CE3B PRG:0E3B 60 ; ----------------------------------------------------------------------------- ; Routine: PpuScrollLatch -; Global: Latch PPU scroll (X/Y) and control register. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Global: Writes the latched scroll X and Y values to $2005 in the correct order. +; Local: Returns to the NMI body. +; Parameters: None. +; Returns: Scroll latched. +; Clobbers: A; $2002, $2005. ; ----------------------------------------------------------------------------- PpuScrollLatch: - lda $2002 ; CPU:$CE3C PRG:0E3C AD 02 20 - lda PpuScrollX_Init ; CPU:$CE3F PRG:0E3F A5 ED - sta $2005 ; CPU:$CE41 PRG:0E41 8D 05 20 - lda PpuScrollY ; CPU:$CE44 PRG:0E44 A5 EC - sta $2005 ; CPU:$CE46 PRG:0E46 8D 05 20 - lda PpuCtrlShadow ; CPU:$CE49 PRG:0E49 A5 EF - sta $2000 ; CPU:$CE4B PRG:0E4B 8D 00 20 - rts ; CPU:$CE4E PRG:0E4E 60 + lda $2002 ; CPU:$CE3C PRG:0E3C AD 02 20 + lda ZpED ; CPU:$CE3F PRG:0E3F A5 ED + sta $2005 ; CPU:$CE41 PRG:0E41 8D 05 20 + lda ZpEC ; CPU:$CE44 PRG:0E44 A5 EC + sta $2005 ; CPU:$CE46 PRG:0E46 8D 05 20 + lda ZpEF ; CPU:$CE49 PRG:0E49 A5 EF + sta $2000 ; CPU:$CE4B PRG:0E4B 8D 00 20 + rts ; CPU:$CE4E PRG:0E4E 60 ; ----------------------------------------------------------------------------- ; Routine: VramBurstWrite -; Global: Burst-write VRAM data from table at $0302. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Global: Burst writer: clears bit 2 of the PPUCTRL shadow so VRAM stays accessible, then walks the command list at $0302. +; Local: Falls into VramBurstWriteChunk. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A; $2000, PpuCtrlShadow. ; ----------------------------------------------------------------------------- VramBurstWrite: - lda PpuCtrlShadow ; CPU:$CE4F PRG:0E4F A5 EF - and #$FB ; CPU:$CE51 PRG:0E51 29 FB - sta $2000 ; CPU:$CE53 PRG:0E53 8D 00 20 - sta PpuCtrlShadow ; CPU:$CE56 PRG:0E56 85 EF - ldx $2002 ; CPU:$CE58 PRG:0E58 AE 02 20 - ldy #$00 ; CPU:$CE5B PRG:0E5B A0 00 - beq Label_CE8A ; CPU:$CE5D PRG:0E5D F0 2B + lda ZpEF ; CPU:$CE4F PRG:0E4F A5 EF + and #$FB ; CPU:$CE51 PRG:0E51 29 FB + sta $2000 ; CPU:$CE53 PRG:0E53 8D 00 20 + sta ZpEF ; CPU:$CE56 PRG:0E56 85 EF + ldx $2002 ; CPU:$CE58 PRG:0E58 AE 02 20 + ldy #$00 ; CPU:$CE5B PRG:0E5B A0 00 + beq VramBurstNextCommand ; CPU:$CE5D PRG:0E5D F0 2B ; ----------------------------------------------------------------------------- -; Routine: Label_CE5F -; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Routine: VramBurstWriteChunk +; Global: Writes one chunk of the burst stream to $2007. +; Local: Falls through to VramBurstWriteNext. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, Y; $2006, $2007. ; ----------------------------------------------------------------------------- -Label_CE5F: - pha ; CPU:$CE5F PRG:0E5F 48 - sta $2006 ; CPU:$CE60 PRG:0E60 8D 06 20 - iny ; CPU:$CE63 PRG:0E63 C8 - lda $0302,Y ; CPU:$CE64 PRG:0E64 B9 02 03 - sta $2006 ; CPU:$CE67 PRG:0E67 8D 06 20 - iny ; CPU:$CE6A PRG:0E6A C8 - ldx $0302,Y ; CPU:$CE6B PRG:0E6B BE 02 03 +VramBurstWriteChunk: + pha ; CPU:$CE5F PRG:0E5F 48 + sta $2006 ; CPU:$CE60 PRG:0E60 8D 06 20 + iny ; CPU:$CE63 PRG:0E63 C8 + lda $0302,y ; CPU:$CE64 PRG:0E64 B9 02 03 + sta $2006 ; CPU:$CE67 PRG:0E67 8D 06 20 + iny ; CPU:$CE6A PRG:0E6A C8 + ldx $0302,y ; CPU:$CE6B PRG:0E6B BE 02 03 ; ----------------------------------------------------------------------------- -; Routine: Label_CE6E -; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Routine: VramBurstWriteNext +; Global: Advances to the next burst entry and tests its sign bit to decide between another chunk and the end of the list. +; Local: Branches to VramBurstSkipRun or VramBurstNextCommand. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, Y; $0302. ; ----------------------------------------------------------------------------- -Label_CE6E: - iny ; CPU:$CE6E PRG:0E6E C8 - lda $0302,Y ; CPU:$CE6F PRG:0E6F B9 02 03 - sta $2007 ; CPU:$CE72 PRG:0E72 8D 07 20 - dex ; CPU:$CE75 PRG:0E75 CA - bne Label_CE6E ; CPU:$CE76 PRG:0E76 D0 F6 - pla ; CPU:$CE78 PRG:0E78 68 - cmp #$3F ; CPU:$CE79 PRG:0E79 C9 3F - bne Label_CE89 ; CPU:$CE7B PRG:0E7B D0 0C - sta $2006 ; CPU:$CE7D PRG:0E7D 8D 06 20 - stx $2006 ; CPU:$CE80 PRG:0E80 8E 06 20 - stx $2006 ; CPU:$CE83 PRG:0E83 8E 06 20 - stx $2006 ; CPU:$CE86 PRG:0E86 8E 06 20 +VramBurstWriteNext: + iny ; CPU:$CE6E PRG:0E6E C8 + lda $0302,y ; CPU:$CE6F PRG:0E6F B9 02 03 + sta $2007 ; CPU:$CE72 PRG:0E72 8D 07 20 + dex ; CPU:$CE75 PRG:0E75 CA + bne VramBurstWriteNext ; CPU:$CE76 PRG:0E76 D0 F6 + pla ; CPU:$CE78 PRG:0E78 68 + cmp #$3F ; CPU:$CE79 PRG:0E79 C9 3F + bne VramBurstSkipRun ; CPU:$CE7B PRG:0E7B D0 0C + sta $2006 ; CPU:$CE7D PRG:0E7D 8D 06 20 + stx $2006 ; CPU:$CE80 PRG:0E80 8E 06 20 + stx $2006 ; CPU:$CE83 PRG:0E83 8E 06 20 + stx $2006 ; CPU:$CE86 PRG:0E86 8E 06 20 ; ----------------------------------------------------------------------------- -; Routine: Label_CE89 -; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Routine: VramBurstSkipRun +; Global: Skips a run of burst entries without writing them. +; Local: Falls into VramBurstWriteChunk once the skip is done. +; Parameters: None. +; Returns: Nothing. +; Clobbers: Y; $0302. ; ----------------------------------------------------------------------------- -Label_CE89: - iny ; CPU:$CE89 PRG:0E89 C8 +VramBurstSkipRun: + iny ; CPU:$CE89 PRG:0E89 C8 ; ----------------------------------------------------------------------------- -; Routine: Label_CE8A -; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. -; Local: Continues its parent routine along the condition or operation encoded in this label, -; then returns, branches again, or rejoins shared code as documented by the instructions. -; Parameters: Undetermined in Pass 1 unless implied by the caller. -; Returns: Undetermined in Pass 1; status flags and registers may carry results. -; Clobbers: Undetermined in Pass 1. +; Routine: VramBurstNextCommand +; Global: Fetches the next burst command byte and tests its sign to branch between a write and a skip. +; Local: Branches to VramBurstSkipRun or VramBurstWriteChunk. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, Y; $0302. ; ----------------------------------------------------------------------------- -Label_CE8A: - lda $0302,Y ; CPU:$CE8A PRG:0E8A B9 02 03 - bpl Label_CE5F ; CPU:$CE8D PRG:0E8D 10 D0 - sta $0302 ; CPU:$CE8F PRG:0E8F 8D 02 03 - lda #$00 ; CPU:$CE92 PRG:0E92 A9 00 - sta $0301 ; CPU:$CE94 PRG:0E94 8D 01 03 - rts ; CPU:$CE97 PRG:0E97 60 -; ---- data $CE98-$FFFF (12648 bytes) ---- - .byte $85, $03, $86, $02, $20, $C8, $CD, $A0, $00, $B1, $00, $29, $0F, $85, $04, $B1 ; CPU:$CE98 PRG:0E98 85 03 86 02 20 C8 CD A0 00 B1 00 29 0F 85 04 B1 - .byte $00, $4A, $4A, $4A, $4A, $85, $05, $AE, $01, $03, $A5, $03, $9D, $02, $03, $20 ; CPU:$CEA8 PRG:0EA8 00 4A 4A 4A 4A 85 05 AE 01 03 A5 03 9D 02 03 20 - .byte $F3, $CE, $A5, $02, $9D, $02, $03, $20, $F3, $CE, $A5, $04, $85, $06, $9D, $02 ; CPU:$CEB8 PRG:0EB8 F3 CE A5 02 9D 02 03 20 F3 CE A5 04 85 06 9D 02 - .byte $03, $20, $F3, $CE, $C8, $B1, $00, $9D, $02, $03, $C6, $06, $D0, $F3, $20, $F3 ; CPU:$CEC8 PRG:0EC8 03 20 F3 CE C8 B1 00 9D 02 03 C6 06 D0 F3 20 F3 - .byte $CE, $8E, $01, $03, $18, $A9, $20, $65, $02, $85, $02, $A9, $00, $65, $03, $85 ; CPU:$CED8 PRG:0ED8 CE 8E 01 03 18 A9 20 65 02 85 02 A9 00 65 03 85 - .byte $03, $C6, $05, $D0, $C5, $A9, $FF, $9D, $02, $03, $60, $E8, $EC, $00, $03, $90 ; CPU:$CEE8 PRG:0EE8 03 C6 05 D0 C5 A9 FF 9D 02 03 60 E8 EC 00 03 90 - .byte $0C, $AE, $01, $03, $A9, $FF, $9D, $02, $03, $68, $68, $A9, $01, $60, $3F, $00 ; CPU:$CEF8 PRG:0EF8 0C AE 01 03 A9 FF 9D 02 03 68 68 A9 01 60 3F 00 - .byte $20, $0F, $16, $00, $30, $0F, $1A, $2A, $30, $0F, $1A, $00, $30, $0F, $30, $00 ; CPU:$CF08 PRG:0F08 20 0F 16 00 30 0F 1A 2A 30 0F 1A 00 30 0F 30 00 - .byte $30, $0F, $16, $00, $30, $0F, $1A, $2A, $30, $0F, $1A, $00, $30, $0F, $30, $00 ; CPU:$CF18 PRG:0F18 30 0F 16 00 30 0F 1A 2A 30 0F 1A 00 30 0F 30 00 - .byte $30, $FF, $20, $A2, $1C, $60, $61, $61, $61, $61, $61, $61, $61, $61, $61, $61 ; CPU:$CF28 PRG:0F28 30 FF 20 A2 1C 60 61 61 61 61 61 61 61 61 61 61 - .byte $61, $61, $61, $61, $61, $61, $61, $61, $61, $61, $61, $61, $61, $61, $61, $61 ; CPU:$CF38 PRG:0F38 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 - .byte $66, $20, $C2, $1C, $64, $70, $71, $72, $73, $74, $75, $76, $77, $78, $79, $7A ; CPU:$CF48 PRG:0F48 66 20 C2 1C 64 70 71 72 73 74 75 76 77 78 79 7A - .byte $7B, $24, $7D, $7E, $7F, $A0, $A1, $A2, $A3, $A4, $A5, $A6, $A7, $A8, $A9, $67 ; CPU:$CF58 PRG:0F58 7B 24 7D 7E 7F A0 A1 A2 A3 A4 A5 A6 A7 A8 A9 67 - .byte $20, $E2, $1C, $64, $80, $81, $82, $83, $84, $85, $86, $87, $88, $89, $8A, $8B ; CPU:$CF68 PRG:0F68 20 E2 1C 64 80 81 82 83 84 85 86 87 88 89 8A 8B - .byte $24, $8D, $8E, $8F, $B0, $B1, $24, $B3, $B4, $B5, $B6, $B7, $B8, $B9, $67, $21 ; CPU:$CF78 PRG:0F78 24 8D 8E 8F B0 B1 24 B3 B4 B5 B6 B7 B8 B9 67 21 - .byte $02, $1C, $64, $90, $91, $92, $93, $94, $95, $96, $97, $98, $99, $9A, $9B, $9C ; CPU:$CF88 PRG:0F88 02 1C 64 90 91 92 93 94 95 96 97 98 99 9A 9B 9C - .byte $9D, $9E, $9F, $C0, $C1, $24, $C3, $C4, $C5, $C6, $C7, $C8, $C9, $67, $21, $22 ; CPU:$CF98 PRG:0F98 9D 9E 9F C0 C1 24 C3 C4 C5 C6 C7 C8 C9 67 21 22 - .byte $1C, $62, $63, $63, $63, $63, $63, $63, $63, $63, $63, $63, $63, $63, $63, $63 ; CPU:$CFA8 PRG:0FA8 1C 62 63 63 63 63 63 63 63 63 63 63 63 63 63 63 - .byte $63, $63, $63, $63, $63, $63, $63, $63, $63, $63, $63, $63, $65, $21, $C5, $18 ; CPU:$CFB8 PRG:0FB8 63 63 63 63 63 63 63 63 63 63 63 63 65 21 C5 18 - .byte $01, $24, $17, $18, $1B, $16, $0A, $15, $24, $0C, $18, $17, $1D, $1B, $18, $15 ; CPU:$CFC8 PRG:0FC8 01 24 17 18 1B 16 0A 15 24 0C 18 17 1D 1B 18 15 - .byte $15, $0E, $1B, $24, $1D, $0E, $1C, $1D, $22, $25, $18, $02, $24, $04, $24, $19 ; CPU:$CFD8 PRG:0FD8 15 0E 1B 24 1D 0E 1C 1D 22 25 18 02 24 04 24 19 - .byte $15, $0A, $22, $24, $0C, $18, $17, $1D, $1B, $18, $15, $15, $0E, $1B, $24, $1D ; CPU:$CFE8 PRG:0FE8 15 0A 22 24 0C 18 17 1D 1B 18 15 15 0E 1B 24 1D - .byte $0E, $1C, $1D, $22, $85, $18, $03, $24, $1B, $0E, $1D, $1E, $1B, $17, $24, $1D ; CPU:$CFF8 PRG:0FF8 0E 1C 1D 22 85 18 03 24 1B 0E 1D 1E 1B 17 24 1D - .byte $18, $24, $16, $0A, $12, $17, $24, $16, $0E, $17, $1E, $24, $24, $24, $23, $C0 ; CPU:$D008 PRG:1008 18 24 16 0A 12 17 24 16 0E 17 1E 24 24 24 23 C0 - .byte $10, $00, $00, $00, $00, $00, $00, $00, $00, $44, $55, $55, $55, $55, $55, $55 ; CPU:$D018 PRG:1018 10 00 00 00 00 00 00 00 00 44 55 55 55 55 55 55 - .byte $11, $23, $D0, $10, $04, $05, $05, $05, $05, $05, $05, $01, $00, $00, $00, $00 ; CPU:$D028 PRG:1028 11 23 D0 10 04 05 05 05 05 05 05 01 00 00 00 00 - .byte $00, $00, $00, $00, $23, $E0, $10, $00, $00, $00, $00, $00, $00, $00, $00, $00 ; CPU:$D038 PRG:1038 00 00 00 00 23 E0 10 00 00 00 00 00 00 00 00 00 - .byte $00, $00, $00, $00, $00, $00, $00, $23, $F0, $10, $00, $00, $00, $00, $00, $00 ; CPU:$D048 PRG:1048 00 00 00 00 00 00 00 23 F0 10 00 00 00 00 00 00 - .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $20, $62, $1A, $1D, $1E ; CPU:$D058 PRG:1058 00 00 00 00 00 00 00 00 00 00 FF 20 62 1A 1D 1E - .byte $1B, $0B, $18, $24, $1C, $24, $0B, $24, $0A, $24, $24, $02, $24, $19, $15, $0A ; CPU:$D068 PRG:1068 1B 0B 18 24 1C 24 0B 24 0A 24 24 02 24 19 15 0A - .byte $22, $0E, $1B, $24, $1D, $0E, $1C, $1D, $20, $8F, $0D, $40, $42, $42, $42, $42 ; CPU:$D078 PRG:1078 22 0E 1B 24 1D 0E 1C 1D 20 8F 0D 40 42 42 42 42 - .byte $42, $42, $42, $42, $42, $42, $42, $41, $20, $AF, $0D, $47, $24, $24, $24, $24 ; CPU:$D088 PRG:1088 42 42 42 42 42 42 42 41 20 AF 0D 47 24 24 24 24 - .byte $24, $01, $24, $28, $29, $2A, $2B, $46, $20, $CF, $0D, $47, $24, $4A, $24, $24 ; CPU:$D098 PRG:1098 24 01 24 28 29 2A 2B 46 20 CF 0D 47 24 4A 24 24 - .byte $24, $24, $24, $24, $24, $24, $24, $46, $20, $EF, $0D, $47, $24, $24, $24, $24 ; CPU:$D0A8 PRG:10A8 24 24 24 24 24 24 24 46 20 EF 0D 47 24 24 24 24 - .byte $24, $26, $24, $24, $24, $26, $24, $46, $21, $0F, $0D, $44, $43, $43, $43, $43 ; CPU:$D0B8 PRG:10B8 24 26 24 24 24 26 24 46 21 0F 0D 44 43 43 43 43 - .byte $43, $43, $43, $43, $43, $43, $43, $45, $21, $4F, $0D, $40, $42, $42, $42, $42 ; CPU:$D0C8 PRG:10C8 43 43 43 43 43 43 43 45 21 4F 0D 40 42 42 42 42 - .byte $42, $42, $42, $42, $42, $42, $42, $41, $21, $6F, $0D, $47, $24, $24, $24, $24 ; CPU:$D0D8 PRG:10D8 42 42 42 42 42 42 42 41 21 6F 0D 47 24 24 24 24 - .byte $24, $02, $24, $28, $29, $2A, $2B, $46, $21, $8F, $0D, $47, $24, $4A, $24, $24 ; CPU:$D0E8 PRG:10E8 24 02 24 28 29 2A 2B 46 21 8F 0D 47 24 4A 24 24 - .byte $24, $24, $24, $24, $24, $24, $24, $46, $21, $AF, $0D, $47, $24, $24, $24, $24 ; CPU:$D0F8 PRG:10F8 24 24 24 24 24 24 24 46 21 AF 0D 47 24 24 24 24 - .byte $24, $26, $24, $24, $24, $26, $24, $46, $21, $CF, $0D, $44, $43, $43, $43, $43 ; CPU:$D108 PRG:1108 24 26 24 24 24 26 24 46 21 CF 0D 44 43 43 43 43 - .byte $43, $43, $43, $43, $43, $43, $43, $45, $20, $A6, $01, $D1, $21, $06, $01, $2C ; CPU:$D118 PRG:1118 43 43 43 43 43 43 43 45 20 A6 01 D1 21 06 01 2C - .byte $21, $66, $01, $D1, $21, $C6, $01, $2C, $20, $87, $07, $58, $53, $5A, $53, $5A ; CPU:$D128 PRG:1128 21 66 01 D1 21 C6 01 2C 20 87 07 58 53 5A 53 5A - .byte $53, $57, $20, $A7, $07, $50, $24, $54, $24, $54, $24, $51, $20, $C7, $07, $50 ; CPU:$D138 PRG:1138 53 57 20 A7 07 50 24 54 24 54 24 51 20 C7 07 50 - .byte $24, $54, $24, $54, $24, $51, $20, $E7, $07, $50, $24, $54, $24, $54, $24, $51 ; CPU:$D148 PRG:1148 24 54 24 54 24 51 20 E7 07 50 24 54 24 54 24 51 - .byte $21, $07, $07, $50, $24, $54, $24, $54, $24, $51, $21, $27, $07, $56, $52, $59 ; CPU:$D158 PRG:1158 21 07 07 50 24 54 24 54 24 51 21 27 07 56 52 59 - .byte $52, $59, $52, $55, $21, $47, $07, $58, $53, $5A, $53, $5A, $53, $57, $21, $67 ; CPU:$D168 PRG:1168 52 59 52 55 21 47 07 58 53 5A 53 5A 53 57 21 67 - .byte $07, $50, $24, $54, $24, $54, $24, $51, $21, $87, $07, $50, $24, $54, $24, $54 ; CPU:$D178 PRG:1178 07 50 24 54 24 54 24 51 21 87 07 50 24 54 24 54 - .byte $24, $51, $21, $A7, $07, $50, $24, $54, $24, $54, $24, $51, $21, $C7, $07, $50 ; CPU:$D188 PRG:1188 24 51 21 A7 07 50 24 54 24 54 24 51 21 C7 07 50 - .byte $24, $54, $24, $54, $24, $51, $21, $E7, $07, $56, $52, $59, $52, $59, $52, $55 ; CPU:$D198 PRG:1198 24 54 24 54 24 51 21 E7 07 56 52 59 52 59 52 55 - .byte $23, $C0, $10, $40, $50, $50, $50, $50, $50, $50, $00, $00, $00, $00, $00, $00 ; CPU:$D1A8 PRG:11A8 23 C0 10 40 50 50 50 50 50 50 00 00 00 00 00 00 - .byte $03, $00, $00, $23, $D0, $10, $00, $00, $00, $00, $00, $30, $00, $00, $00, $00 ; CPU:$D1B8 PRG:11B8 03 00 00 23 D0 10 00 00 00 00 00 30 00 00 00 00 - .byte $00, $00, $00, $00, $00, $00, $23, $E0, $10, $00, $00, $00, $00, $00, $03, $00 ; CPU:$D1C8 PRG:11C8 00 00 00 00 00 00 23 E0 10 00 00 00 00 00 03 00 - .byte $00, $00, $00, $00, $00, $00, $30, $00, $00, $23, $F0, $10, $00, $00, $00, $00 ; CPU:$D1D8 PRG:11D8 00 00 00 00 00 00 30 00 00 23 F0 10 00 00 00 00 - .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $FF, $20, $62, $1A ; CPU:$D1E8 PRG:11E8 00 00 00 00 00 00 00 00 00 00 00 00 FF 20 62 1A - .byte $1D, $1E, $1B, $0B, $18, $24, $1C, $24, $0B, $24, $0A, $24, $24, $04, $24, $19 ; CPU:$D1F8 PRG:11F8 1D 1E 1B 0B 18 24 1C 24 0B 24 0A 24 24 04 24 19 - .byte $15, $0A, $22, $0E, $1B, $24, $1D, $0E, $1C, $1D, $20, $8F, $0D, $40, $42, $42 ; CPU:$D208 PRG:1208 15 0A 22 0E 1B 24 1D 0E 1C 1D 20 8F 0D 40 42 42 - .byte $42, $42, $42, $42, $42, $42, $42, $42, $42, $41, $20, $AF, $0D, $47, $24, $24 ; CPU:$D218 PRG:1218 42 42 42 42 42 42 42 42 42 41 20 AF 0D 47 24 24 - .byte $24, $24, $24, $01, $24, $28, $29, $2A, $2B, $46, $20, $CF, $0D, $47, $24, $4A ; CPU:$D228 PRG:1228 24 24 24 01 24 28 29 2A 2B 46 20 CF 0D 47 24 4A - .byte $24, $24, $24, $24, $24, $24, $24, $24, $24, $46, $20, $EF, $0D, $47, $24, $24 ; CPU:$D238 PRG:1238 24 24 24 24 24 24 24 24 24 46 20 EF 0D 47 24 24 - .byte $24, $24, $24, $26, $24, $24, $24, $26, $24, $46, $21, $0F, $0D, $44, $43, $43 ; CPU:$D248 PRG:1248 24 24 24 26 24 24 24 26 24 46 21 0F 0D 44 43 43 - .byte $43, $43, $43, $43, $43, $43, $43, $43, $43, $45, $21, $4F, $0D, $40, $42, $42 ; CPU:$D258 PRG:1258 43 43 43 43 43 43 43 43 43 45 21 4F 0D 40 42 42 - .byte $42, $42, $42, $42, $42, $42, $42, $42, $42, $41, $21, $6F, $0D, $47, $24, $24 ; CPU:$D268 PRG:1268 42 42 42 42 42 42 42 42 42 41 21 6F 0D 47 24 24 - .byte $24, $24, $24, $02, $24, $28, $29, $2A, $2B, $46, $21, $8F, $0D, $47, $24, $4A ; CPU:$D278 PRG:1278 24 24 24 02 24 28 29 2A 2B 46 21 8F 0D 47 24 4A - .byte $24, $24, $24, $24, $24, $24, $24, $24, $24, $46, $21, $AF, $0D, $47, $24, $24 ; CPU:$D288 PRG:1288 24 24 24 24 24 24 24 24 24 46 21 AF 0D 47 24 24 - .byte $24, $24, $24, $26, $24, $24, $24, $26, $24, $46, $21, $CF, $0D, $44, $43, $43 ; CPU:$D298 PRG:1298 24 24 24 26 24 24 24 26 24 46 21 CF 0D 44 43 43 - .byte $43, $43, $43, $43, $43, $43, $43, $43, $43, $45, $22, $0F, $0D, $40, $42, $42 ; CPU:$D2A8 PRG:12A8 43 43 43 43 43 43 43 43 43 45 22 0F 0D 40 42 42 - .byte $42, $42, $42, $42, $42, $42, $42, $42, $42, $41, $22, $2F, $0D, $47, $24, $24 ; CPU:$D2B8 PRG:12B8 42 42 42 42 42 42 42 42 42 41 22 2F 0D 47 24 24 - .byte $24, $24, $24, $03, $24, $28, $29, $2A, $2B, $46, $22, $4F, $0D, $47, $24, $4A ; CPU:$D2C8 PRG:12C8 24 24 24 03 24 28 29 2A 2B 46 22 4F 0D 47 24 4A - .byte $24, $24, $24, $24, $24, $24, $24, $24, $24, $46, $22, $6F, $0D, $47, $24, $24 ; CPU:$D2D8 PRG:12D8 24 24 24 24 24 24 24 24 24 46 22 6F 0D 47 24 24 - .byte $24, $24, $24, $26, $24, $24, $24, $26, $24, $46, $22, $8F, $0D, $44, $43, $43 ; CPU:$D2E8 PRG:12E8 24 24 24 26 24 24 24 26 24 46 22 8F 0D 44 43 43 - .byte $43, $43, $43, $43, $43, $43, $43, $43, $43, $45, $22, $CF, $0D, $40, $42, $42 ; CPU:$D2F8 PRG:12F8 43 43 43 43 43 43 43 43 43 45 22 CF 0D 40 42 42 - .byte $42, $42, $42, $42, $42, $42, $42, $42, $42, $41, $22, $EF, $0D, $47, $24, $24 ; CPU:$D308 PRG:1308 42 42 42 42 42 42 42 42 42 41 22 EF 0D 47 24 24 - .byte $24, $24, $24, $04, $24, $28, $29, $2A, $2B, $46, $23, $0F, $0D, $47, $24, $4A ; CPU:$D318 PRG:1318 24 24 24 04 24 28 29 2A 2B 46 23 0F 0D 47 24 4A - .byte $24, $24, $24, $24, $24, $24, $24, $24, $24, $46, $23, $2F, $0D, $47, $24, $24 ; CPU:$D328 PRG:1328 24 24 24 24 24 24 24 24 24 46 23 2F 0D 47 24 24 - .byte $24, $24, $24, $26, $24, $24, $24, $26, $24, $46, $23, $4F, $0D, $44, $43, $43 ; CPU:$D338 PRG:1338 24 24 24 26 24 24 24 26 24 46 23 4F 0D 44 43 43 - .byte $43, $43, $43, $43, $43, $43, $43, $43, $43, $45, $20, $A6, $01, $D1, $21, $06 ; CPU:$D348 PRG:1348 43 43 43 43 43 43 43 43 43 45 20 A6 01 D1 21 06 - .byte $01, $2C, $21, $66, $01, $D1, $21, $C6, $01, $2C, $22, $26, $01, $D1, $22, $86 ; CPU:$D358 PRG:1358 01 2C 21 66 01 D1 21 C6 01 2C 22 26 01 D1 22 86 - .byte $01, $2C, $22, $E6, $01, $D1, $23, $46, $01, $2C, $20, $87, $07, $58, $53, $5A ; CPU:$D368 PRG:1368 01 2C 22 E6 01 D1 23 46 01 2C 20 87 07 58 53 5A - .byte $53, $5A, $53, $57, $20, $A7, $07, $50, $24, $54, $24, $54, $24, $51, $20, $C7 ; CPU:$D378 PRG:1378 53 5A 53 57 20 A7 07 50 24 54 24 54 24 51 20 C7 - .byte $07, $50, $24, $54, $24, $54, $24, $51, $20, $E7, $07, $50, $24, $54, $24, $54 ; CPU:$D388 PRG:1388 07 50 24 54 24 54 24 51 20 E7 07 50 24 54 24 54 - .byte $24, $51, $21, $07, $07, $50, $24, $54, $24, $54, $24, $51, $21, $27, $07, $56 ; CPU:$D398 PRG:1398 24 51 21 07 07 50 24 54 24 54 24 51 21 27 07 56 - .byte $52, $59, $52, $59, $52, $55, $21, $47, $07, $58, $53, $5A, $53, $5A, $53, $57 ; CPU:$D3A8 PRG:13A8 52 59 52 59 52 55 21 47 07 58 53 5A 53 5A 53 57 - .byte $21, $67, $07, $50, $24, $54, $24, $54, $24, $51, $21, $87, $07, $50, $24, $54 ; CPU:$D3B8 PRG:13B8 21 67 07 50 24 54 24 54 24 51 21 87 07 50 24 54 - .byte $24, $54, $24, $51, $21, $A7, $07, $50, $24, $54, $24, $54, $24, $51, $21, $C7 ; CPU:$D3C8 PRG:13C8 24 54 24 51 21 A7 07 50 24 54 24 54 24 51 21 C7 - .byte $07, $50, $24, $54, $24, $54, $24, $51, $21, $E7, $07, $56, $52, $59, $52, $59 ; CPU:$D3D8 PRG:13D8 07 50 24 54 24 54 24 51 21 E7 07 56 52 59 52 59 - .byte $52, $55, $22, $07, $07, $58, $53, $5A, $53, $5A, $53, $57, $22, $27, $07, $50 ; CPU:$D3E8 PRG:13E8 52 55 22 07 07 58 53 5A 53 5A 53 57 22 27 07 50 - .byte $24, $54, $24, $54, $24, $51, $22, $47, $07, $50, $24, $54, $24, $54, $24, $51 ; CPU:$D3F8 PRG:13F8 24 54 24 54 24 51 22 47 07 50 24 54 24 54 24 51 - .byte $22, $67, $07, $50, $24, $54, $24, $54, $24, $51, $22, $87, $07, $50, $24, $54 ; CPU:$D408 PRG:1408 22 67 07 50 24 54 24 54 24 51 22 87 07 50 24 54 - .byte $24, $54, $24, $51, $22, $A7, $07, $56, $52, $59, $52, $59, $52, $55, $22, $C7 ; CPU:$D418 PRG:1418 24 54 24 51 22 A7 07 56 52 59 52 59 52 55 22 C7 - .byte $07, $58, $53, $5A, $53, $5A, $53, $57, $22, $E7, $07, $50, $24, $54, $24, $54 ; CPU:$D428 PRG:1428 07 58 53 5A 53 5A 53 57 22 E7 07 50 24 54 24 54 - .byte $24, $51, $23, $07, $07, $50, $24, $54, $24, $54, $24, $51, $23, $27, $07, $50 ; CPU:$D438 PRG:1438 24 51 23 07 07 50 24 54 24 54 24 51 23 27 07 50 - .byte $24, $54, $24, $54, $24, $51, $23, $47, $07, $50, $24, $54, $24, $54, $24, $51 ; CPU:$D448 PRG:1448 24 54 24 54 24 51 23 47 07 50 24 54 24 54 24 51 - .byte $23, $67, $07, $56, $52, $59, $52, $59, $52, $55, $23, $C0, $10, $40, $50, $50 ; CPU:$D458 PRG:1458 23 67 07 56 52 59 52 59 52 55 23 C0 10 40 50 50 - .byte $50, $50, $50, $50, $00, $00, $00, $00, $00, $00, $03, $00, $00, $23, $D0, $10 ; CPU:$D468 PRG:1468 50 50 50 50 00 00 00 00 00 00 03 00 00 23 D0 10 - .byte $00, $00, $00, $00, $00, $30, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ; CPU:$D478 PRG:1478 00 00 00 00 00 30 00 00 00 00 00 00 00 00 00 00 - .byte $23, $E0, $10, $00, $00, $00, $00, $00, $03, $00, $00, $00, $00, $00, $00, $00 ; CPU:$D488 PRG:1488 23 E0 10 00 00 00 00 00 03 00 00 00 00 00 00 00 - .byte $30, $00, $00, $23, $F0, $10, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ; CPU:$D498 PRG:1498 30 00 00 23 F0 10 00 00 00 00 00 00 00 00 00 00 - .byte $00, $00, $00, $00, $00, $00, $FF, $A5, $24, $54, $24, $54, $24, $24, $54, $24 ; CPU:$D4A8 PRG:14A8 00 00 00 00 00 00 FF A5 24 54 24 54 24 24 54 24 - .byte $54, $24, $24, $54, $24, $54, $24, $24, $54, $24, $54, $24, $52, $59, $52, $59 ; CPU:$D4B8 PRG:14B8 54 24 24 54 24 54 24 24 54 24 54 24 52 59 52 59 - .byte $52, $53, $5A, $53, $5A, $53, $24, $54, $24, $54, $24, $24, $54, $24, $54, $24 ; CPU:$D4C8 PRG:14C8 52 53 5A 53 5A 53 24 54 24 54 24 24 54 24 54 24 - .byte $24, $54, $24, $54, $24, $24, $54, $24, $54, $24, $FF, $37, $4D, $03, $D0, $37 ; CPU:$D4D8 PRG:14D8 24 54 24 54 24 24 54 24 54 24 FF 37 4D 03 D0 37 - .byte $4D, $03, $C0, $37, $4E, $03, $B0, $37, $4E, $03, $A0, $27, $48, $03, $88, $37 ; CPU:$D4E8 PRG:14E8 4D 03 C0 37 4E 03 B0 37 4E 03 A0 27 48 03 88 37 - .byte $4C, $03, $88, $2F, $49, $03, $80, $2F, $4B, $03, $90, $67, $4D, $03, $D0, $67 ; CPU:$D4F8 PRG:14F8 4C 03 88 2F 49 03 80 2F 4B 03 90 67 4D 03 D0 67 - .byte $4D, $03, $C0, $67, $4E, $03, $B0, $67, $4E, $03, $A0, $57, $48, $03, $88, $67 ; CPU:$D508 PRG:1508 4D 03 C0 67 4E 03 B0 67 4E 03 A0 57 48 03 88 67 - .byte $4C, $03, $88, $5F, $49, $03, $80, $5F, $4B, $03, $90, $97, $4D, $03, $D0, $97 ; CPU:$D518 PRG:1518 4C 03 88 5F 49 03 80 5F 4B 03 90 97 4D 03 D0 97 - .byte $4D, $03, $C0, $97, $4E, $03, $B0, $97, $4E, $03, $A0, $87, $48, $03, $88, $97 ; CPU:$D528 PRG:1528 4D 03 C0 97 4E 03 B0 97 4E 03 A0 87 48 03 88 97 - .byte $4C, $03, $88, $8F, $49, $03, $80, $8F, $4B, $03, $90, $C7, $4D, $03, $D0, $C7 ; CPU:$D538 PRG:1538 4C 03 88 8F 49 03 80 8F 4B 03 90 C7 4D 03 D0 C7 - .byte $4D, $03, $C0, $C7, $4E, $03, $B0, $C7, $4E, $03, $A0, $B7, $48, $03, $88, $C7 ; CPU:$D548 PRG:1548 4D 03 C0 C7 4E 03 B0 C7 4E 03 A0 B7 48 03 88 C7 - .byte $4C, $03, $88, $BF, $49, $03, $80, $BF, $4B, $03, $90, $27, $30, $00, $40, $2F ; CPU:$D558 PRG:1558 4C 03 88 BF 49 03 80 BF 4B 03 90 27 30 00 40 2F - .byte $30, $00, $40, $37, $30, $00, $40, $3F, $30, $00, $40, $27, $30, $00, $50, $2F ; CPU:$D568 PRG:1568 30 00 40 37 30 00 40 3F 30 00 40 27 30 00 50 2F - .byte $30, $00, $50, $37, $30, $00, $50, $3F, $30, $00, $50, $27, $30, $00, $60, $2F ; CPU:$D578 PRG:1578 30 00 50 37 30 00 50 3F 30 00 50 27 30 00 60 2F - .byte $30, $00, $60, $37, $30, $00, $60, $3F, $30, $00, $60, $57, $30, $00, $40, $5F ; CPU:$D588 PRG:1588 30 00 60 37 30 00 60 3F 30 00 60 57 30 00 40 5F - .byte $30, $00, $40, $67, $30, $00, $40, $6F, $30, $00, $40, $57, $30, $00, $50, $5F ; CPU:$D598 PRG:1598 30 00 40 67 30 00 40 6F 30 00 40 57 30 00 50 5F - .byte $30, $00, $50, $67, $30, $00, $50, $6F, $30, $00, $50, $57, $30, $00, $60, $5F ; CPU:$D5A8 PRG:15A8 30 00 50 67 30 00 50 6F 30 00 50 57 30 00 60 5F - .byte $30, $00, $60, $67, $30, $00, $60, $6F, $30, $00, $60, $FF, $37, $4D, $03, $D0 ; CPU:$D5B8 PRG:15B8 30 00 60 67 30 00 60 6F 30 00 60 FF 37 4D 03 D0 - .byte $37, $4D, $03, $C0, $37, $4E, $03, $B0, $37, $4E, $03, $A0, $27, $48, $03, $88 ; CPU:$D5C8 PRG:15C8 37 4D 03 C0 37 4E 03 B0 37 4E 03 A0 27 48 03 88 - .byte $37, $4C, $03, $88, $2F, $49, $03, $80, $2F, $4B, $03, $90, $67, $4D, $03, $D0 ; CPU:$D5D8 PRG:15D8 37 4C 03 88 2F 49 03 80 2F 4B 03 90 67 4D 03 D0 - .byte $67, $4D, $03, $C0, $67, $4E, $03, $B0, $67, $4E, $03, $A0, $57, $48, $03, $88 ; CPU:$D5E8 PRG:15E8 67 4D 03 C0 67 4E 03 B0 67 4E 03 A0 57 48 03 88 - .byte $67, $4C, $03, $88, $5F, $49, $03, $80, $5F, $4B, $03, $90, $F4, $F4, $F4, $F4 ; CPU:$D5F8 PRG:15F8 67 4C 03 88 5F 49 03 80 5F 4B 03 90 F4 F4 F4 F4 - .byte $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4 ; CPU:$D608 PRG:1608 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 - .byte $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4 ; CPU:$D618 PRG:1618 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 - .byte $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4 ; CPU:$D628 PRG:1628 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 - .byte $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $27, $30, $00, $40 ; CPU:$D638 PRG:1638 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 27 30 00 40 - .byte $2F, $30, $00, $40, $37, $30, $00, $40, $3F, $30, $00, $40, $27, $30, $00, $50 ; CPU:$D648 PRG:1648 2F 30 00 40 37 30 00 40 3F 30 00 40 27 30 00 50 - .byte $2F, $30, $00, $50, $37, $30, $00, $50, $3F, $30, $00, $50, $27, $30, $00, $60 ; CPU:$D658 PRG:1658 2F 30 00 50 37 30 00 50 3F 30 00 50 27 30 00 60 - .byte $2F, $30, $00, $60, $37, $30, $00, $60, $3F, $30, $00, $60, $57, $30, $00, $40 ; CPU:$D668 PRG:1668 2F 30 00 60 37 30 00 60 3F 30 00 60 57 30 00 40 - .byte $5F, $30, $00, $40, $67, $30, $00, $40, $6F, $30, $00, $40, $57, $30, $00, $50 ; CPU:$D678 PRG:1678 5F 30 00 40 67 30 00 40 6F 30 00 40 57 30 00 50 - .byte $5F, $30, $00, $50, $67, $30, $00, $50, $6F, $30, $00, $50, $57, $30, $00, $60 ; CPU:$D688 PRG:1688 5F 30 00 50 67 30 00 50 6F 30 00 50 57 30 00 60 - .byte $5F, $30, $00, $60, $67, $30, $00, $60, $6F, $30, $00, $60, $FF, $79, $1D, $00 ; CPU:$D698 PRG:1698 5F 30 00 60 67 30 00 60 6F 30 00 60 FF 79 1D 00 - .byte $18, $79, $0E, $00, $20, $79, $1C, $00, $28, $79, $1D, $00, $30, $79, $18, $00 ; CPU:$D6A8 PRG:16A8 18 79 0E 00 20 79 1C 00 28 79 1D 00 30 79 18 00 - .byte $40, $79, $1F, $00, $48, $79, $0E, $00, $50, $79, $1B, $00, $58, $79, $0C, $00 ; CPU:$D6B8 PRG:16B8 40 79 1F 00 48 79 0E 00 50 79 1B 00 58 79 0C 00 - .byte $18, $79, $18, $00, $20, $79, $17, $00, $28, $79, $1D, $00, $30, $79, $0B, $00 ; CPU:$D6C8 PRG:16C8 18 79 18 00 20 79 17 00 28 79 1D 00 30 79 0B 00 - .byte $40, $79, $0A, $00, $48, $79, $0D, $00, $50, $79, $24, $00, $58, $FF, $FF, $FF ; CPU:$D6D8 PRG:16D8 40 79 0A 00 48 79 0D 00 50 79 24 00 58 FF FF FF - .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$D6E8 PRG:16E8 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:$D6F8 PRG:16F8 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:$D708 PRG:1708 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:$D718 PRG:1718 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:$D728 PRG:1728 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:$D738 PRG:1738 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:$D748 PRG:1748 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:$D758 PRG:1758 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:$D768 PRG:1768 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:$D778 PRG:1778 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:$D788 PRG:1788 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:$D798 PRG:1798 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:$D7A8 PRG:17A8 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:$D7B8 PRG:17B8 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:$D7C8 PRG:17C8 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:$D7D8 PRG:17D8 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:$D7E8 PRG:17E8 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:$D7F8 PRG:17F8 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:$D808 PRG:1808 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:$D818 PRG:1818 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:$D828 PRG:1828 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:$D838 PRG:1838 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:$D848 PRG:1848 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:$D858 PRG:1858 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:$D868 PRG:1868 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:$D878 PRG:1878 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:$D888 PRG:1888 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:$D898 PRG:1898 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:$D8A8 PRG:18A8 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:$D8B8 PRG:18B8 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:$D8C8 PRG:18C8 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:$D8D8 PRG:18D8 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:$D8E8 PRG:18E8 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:$D8F8 PRG:18F8 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:$D908 PRG:1908 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:$D918 PRG:1918 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:$D928 PRG:1928 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:$D938 PRG:1938 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:$D948 PRG:1948 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:$D958 PRG:1958 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:$D968 PRG:1968 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:$D978 PRG:1978 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:$D988 PRG:1988 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:$D998 PRG:1998 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:$D9A8 PRG:19A8 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:$D9B8 PRG:19B8 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:$D9C8 PRG:19C8 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:$D9D8 PRG:19D8 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:$D9E8 PRG:19E8 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:$D9F8 PRG:19F8 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:$DA08 PRG:1A08 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:$DA18 PRG:1A18 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:$DA28 PRG:1A28 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:$DA38 PRG:1A38 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:$DA48 PRG:1A48 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:$DA58 PRG:1A58 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:$DA68 PRG:1A68 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:$DA78 PRG:1A78 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:$DA88 PRG:1A88 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:$DA98 PRG:1A98 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:$DAA8 PRG:1AA8 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:$DAB8 PRG:1AB8 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:$DAC8 PRG:1AC8 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:$DAD8 PRG:1AD8 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:$DAE8 PRG:1AE8 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:$DAF8 PRG:1AF8 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:$DB08 PRG:1B08 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:$DB18 PRG:1B18 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:$DB28 PRG:1B28 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:$DB38 PRG:1B38 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:$DB48 PRG:1B48 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:$DB58 PRG:1B58 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:$DB68 PRG:1B68 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:$DB78 PRG:1B78 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:$DB88 PRG:1B88 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:$DB98 PRG:1B98 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:$DBA8 PRG:1BA8 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:$DBB8 PRG:1BB8 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:$DBC8 PRG:1BC8 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:$DBD8 PRG:1BD8 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:$DBE8 PRG:1BE8 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:$DBF8 PRG:1BF8 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:$DC08 PRG:1C08 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:$DC18 PRG:1C18 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:$DC28 PRG:1C28 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:$DC38 PRG:1C38 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:$DC48 PRG:1C48 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:$DC58 PRG:1C58 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:$DC68 PRG:1C68 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:$DC78 PRG:1C78 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:$DC88 PRG:1C88 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:$DC98 PRG:1C98 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:$DCA8 PRG:1CA8 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:$DCB8 PRG:1CB8 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:$DCC8 PRG:1CC8 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:$DCD8 PRG:1CD8 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:$DCE8 PRG:1CE8 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:$DCF8 PRG:1CF8 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:$DD08 PRG:1D08 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:$DD18 PRG:1D18 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:$DD28 PRG:1D28 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:$DD38 PRG:1D38 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:$DD48 PRG:1D48 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:$DD58 PRG:1D58 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:$DD68 PRG:1D68 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:$DD78 PRG:1D78 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:$DD88 PRG:1D88 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:$DD98 PRG:1D98 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:$DDA8 PRG:1DA8 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:$DDB8 PRG:1DB8 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:$DDC8 PRG:1DC8 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:$DDD8 PRG:1DD8 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:$DDE8 PRG:1DE8 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:$DDF8 PRG:1DF8 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:$DE08 PRG:1E08 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:$DE18 PRG:1E18 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:$DE28 PRG:1E28 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:$DE38 PRG:1E38 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:$DE48 PRG:1E48 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:$DE58 PRG:1E58 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:$DE68 PRG:1E68 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:$DE78 PRG:1E78 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:$DE88 PRG:1E88 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:$DE98 PRG:1E98 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:$DEA8 PRG:1EA8 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:$DEB8 PRG:1EB8 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:$DEC8 PRG:1EC8 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:$DED8 PRG:1ED8 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:$DEE8 PRG:1EE8 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:$DEF8 PRG:1EF8 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:$DF08 PRG:1F08 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:$DF18 PRG:1F18 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:$DF28 PRG:1F28 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:$DF38 PRG:1F38 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:$DF48 PRG:1F48 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:$DF58 PRG:1F58 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:$DF68 PRG:1F68 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:$DF78 PRG:1F78 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:$DF88 PRG:1F88 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:$DF98 PRG:1F98 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:$DFA8 PRG:1FA8 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:$DFB8 PRG:1FB8 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:$DFC8 PRG:1FC8 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:$DFD8 PRG:1FD8 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:$DFE8 PRG:1FE8 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:$DFF8 PRG:1FF8 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:$E008 PRG:2008 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:$E018 PRG:2018 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:$E028 PRG:2028 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:$E038 PRG:2038 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:$E048 PRG:2048 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:$E058 PRG:2058 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:$E068 PRG:2068 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:$E078 PRG:2078 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:$E088 PRG:2088 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:$E098 PRG:2098 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:$E0A8 PRG:20A8 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:$E0B8 PRG:20B8 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:$E0C8 PRG:20C8 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:$E0D8 PRG:20D8 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:$E0E8 PRG:20E8 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:$E0F8 PRG:20F8 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:$E108 PRG:2108 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:$E118 PRG:2118 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:$E128 PRG:2128 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:$E138 PRG:2138 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:$E148 PRG:2148 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:$E158 PRG:2158 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:$E168 PRG:2168 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:$E178 PRG:2178 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:$E188 PRG:2188 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:$E198 PRG:2198 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:$E1A8 PRG:21A8 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:$E1B8 PRG:21B8 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:$E1C8 PRG:21C8 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:$E1D8 PRG:21D8 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:$E1E8 PRG:21E8 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:$E1F8 PRG:21F8 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:$E208 PRG:2208 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:$E218 PRG:2218 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:$E228 PRG:2228 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:$E238 PRG:2238 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:$E248 PRG:2248 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:$E258 PRG:2258 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:$E268 PRG:2268 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:$E278 PRG:2278 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:$E288 PRG:2288 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:$E298 PRG:2298 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:$E2A8 PRG:22A8 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:$E2B8 PRG:22B8 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:$E2C8 PRG:22C8 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:$E2D8 PRG:22D8 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:$E2E8 PRG:22E8 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:$E2F8 PRG:22F8 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:$E308 PRG:2308 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:$E318 PRG:2318 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:$E328 PRG:2328 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:$E338 PRG:2338 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:$E348 PRG:2348 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:$E358 PRG:2358 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:$E368 PRG:2368 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:$E378 PRG:2378 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:$E388 PRG:2388 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:$E398 PRG:2398 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:$E3A8 PRG:23A8 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:$E3B8 PRG:23B8 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:$E3C8 PRG:23C8 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:$E3D8 PRG:23D8 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:$E3E8 PRG:23E8 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:$E3F8 PRG:23F8 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:$E408 PRG:2408 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:$E418 PRG:2418 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:$E428 PRG:2428 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:$E438 PRG:2438 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:$E448 PRG:2448 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:$E458 PRG:2458 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:$E468 PRG:2468 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:$E478 PRG:2478 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:$E488 PRG:2488 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:$E498 PRG:2498 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:$E4A8 PRG:24A8 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:$E4B8 PRG:24B8 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:$E4C8 PRG:24C8 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:$E4D8 PRG:24D8 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:$E4E8 PRG:24E8 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:$E4F8 PRG:24F8 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:$E508 PRG:2508 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:$E518 PRG:2518 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:$E528 PRG:2528 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:$E538 PRG:2538 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:$E548 PRG:2548 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:$E558 PRG:2558 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:$E568 PRG:2568 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:$E578 PRG:2578 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:$E588 PRG:2588 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:$E598 PRG:2598 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:$E5A8 PRG:25A8 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:$E5B8 PRG:25B8 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:$E5C8 PRG:25C8 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:$E5D8 PRG:25D8 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:$E5E8 PRG:25E8 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:$E5F8 PRG:25F8 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:$E608 PRG:2608 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:$E618 PRG:2618 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:$E628 PRG:2628 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:$E638 PRG:2638 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:$E648 PRG:2648 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:$E658 PRG:2658 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:$E668 PRG:2668 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:$E678 PRG:2678 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:$E688 PRG:2688 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:$E698 PRG:2698 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:$E6A8 PRG:26A8 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:$E6B8 PRG:26B8 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:$E6C8 PRG:26C8 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:$E6D8 PRG:26D8 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:$E6E8 PRG:26E8 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:$E6F8 PRG:26F8 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:$E708 PRG:2708 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:$E718 PRG:2718 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:$E728 PRG:2728 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:$E738 PRG:2738 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:$E748 PRG:2748 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:$E758 PRG:2758 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:$E768 PRG:2768 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:$E778 PRG:2778 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:$E788 PRG:2788 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:$E798 PRG:2798 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:$E7A8 PRG:27A8 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:$E7B8 PRG:27B8 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:$E7C8 PRG:27C8 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:$E7D8 PRG:27D8 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:$E7E8 PRG:27E8 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:$E7F8 PRG:27F8 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:$E808 PRG:2808 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:$E818 PRG:2818 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:$E828 PRG:2828 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:$E838 PRG:2838 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:$E848 PRG:2848 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:$E858 PRG:2858 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:$E868 PRG:2868 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:$E878 PRG:2878 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:$E888 PRG:2888 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:$E898 PRG:2898 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:$E8A8 PRG:28A8 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:$E8B8 PRG:28B8 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:$E8C8 PRG:28C8 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:$E8D8 PRG:28D8 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:$E8E8 PRG:28E8 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:$E8F8 PRG:28F8 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:$E908 PRG:2908 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:$E918 PRG:2918 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:$E928 PRG:2928 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:$E938 PRG:2938 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:$E948 PRG:2948 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:$E958 PRG:2958 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:$E968 PRG:2968 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:$E978 PRG:2978 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:$E988 PRG:2988 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:$E998 PRG:2998 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:$E9A8 PRG:29A8 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:$E9B8 PRG:29B8 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:$E9C8 PRG:29C8 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:$E9D8 PRG:29D8 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:$E9E8 PRG:29E8 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:$E9F8 PRG:29F8 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:$EA08 PRG:2A08 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:$EA18 PRG:2A18 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:$EA28 PRG:2A28 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:$EA38 PRG:2A38 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:$EA48 PRG:2A48 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:$EA58 PRG:2A58 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:$EA68 PRG:2A68 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:$EA78 PRG:2A78 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:$EA88 PRG:2A88 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:$EA98 PRG:2A98 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:$EAA8 PRG:2AA8 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:$EAB8 PRG:2AB8 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:$EAC8 PRG:2AC8 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:$EAD8 PRG:2AD8 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:$EAE8 PRG:2AE8 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:$EAF8 PRG:2AF8 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:$EB08 PRG:2B08 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:$EB18 PRG:2B18 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:$EB28 PRG:2B28 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:$EB38 PRG:2B38 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:$EB48 PRG:2B48 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:$EB58 PRG:2B58 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:$EB68 PRG:2B68 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:$EB78 PRG:2B78 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:$EB88 PRG:2B88 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:$EB98 PRG:2B98 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:$EBA8 PRG:2BA8 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:$EBB8 PRG:2BB8 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:$EBC8 PRG:2BC8 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:$EBD8 PRG:2BD8 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:$EBE8 PRG:2BE8 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:$EBF8 PRG:2BF8 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:$EC08 PRG:2C08 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:$EC18 PRG:2C18 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:$EC28 PRG:2C28 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:$EC38 PRG:2C38 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:$EC48 PRG:2C48 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:$EC58 PRG:2C58 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:$EC68 PRG:2C68 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:$EC78 PRG:2C78 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:$EC88 PRG:2C88 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:$EC98 PRG:2C98 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:$ECA8 PRG:2CA8 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:$ECB8 PRG:2CB8 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:$ECC8 PRG:2CC8 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:$ECD8 PRG:2CD8 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:$ECE8 PRG:2CE8 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:$ECF8 PRG:2CF8 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:$ED08 PRG:2D08 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:$ED18 PRG:2D18 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:$ED28 PRG:2D28 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:$ED38 PRG:2D38 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:$ED48 PRG:2D48 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:$ED58 PRG:2D58 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:$ED68 PRG:2D68 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:$ED78 PRG:2D78 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:$ED88 PRG:2D88 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:$ED98 PRG:2D98 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:$EDA8 PRG:2DA8 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:$EDB8 PRG:2DB8 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:$EDC8 PRG:2DC8 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:$EDD8 PRG:2DD8 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:$EDE8 PRG:2DE8 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:$EDF8 PRG:2DF8 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:$EE08 PRG:2E08 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:$EE18 PRG:2E18 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:$EE28 PRG:2E28 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:$EE38 PRG:2E38 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:$EE48 PRG:2E48 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:$EE58 PRG:2E58 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:$EE68 PRG:2E68 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:$EE78 PRG:2E78 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:$EE88 PRG:2E88 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:$EE98 PRG:2E98 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:$EEA8 PRG:2EA8 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:$EEB8 PRG:2EB8 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:$EEC8 PRG:2EC8 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:$EED8 PRG:2ED8 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:$EEE8 PRG:2EE8 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:$EEF8 PRG:2EF8 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:$EF08 PRG:2F08 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:$EF18 PRG:2F18 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:$EF28 PRG:2F28 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:$EF38 PRG:2F38 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:$EF48 PRG:2F48 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:$EF58 PRG:2F58 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:$EF68 PRG:2F68 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:$EF78 PRG:2F78 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:$EF88 PRG:2F88 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:$EF98 PRG:2F98 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:$EFA8 PRG:2FA8 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:$EFB8 PRG:2FB8 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:$EFC8 PRG:2FC8 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:$EFD8 PRG:2FD8 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:$EFE8 PRG:2FE8 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:$EFF8 PRG:2FF8 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:$F008 PRG:3008 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:$F018 PRG:3018 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:$F028 PRG:3028 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:$F038 PRG:3038 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:$F048 PRG:3048 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:$F058 PRG:3058 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:$F068 PRG:3068 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:$F078 PRG:3078 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:$F088 PRG:3088 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:$F098 PRG:3098 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:$F0A8 PRG:30A8 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:$F0B8 PRG:30B8 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:$F0C8 PRG:30C8 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:$F0D8 PRG:30D8 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:$F0E8 PRG:30E8 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:$F0F8 PRG:30F8 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:$F108 PRG:3108 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:$F118 PRG:3118 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:$F128 PRG:3128 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:$F138 PRG:3138 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:$F148 PRG:3148 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:$F158 PRG:3158 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:$F168 PRG:3168 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:$F178 PRG:3178 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:$F188 PRG:3188 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:$F198 PRG:3198 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:$F1A8 PRG:31A8 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:$F1B8 PRG:31B8 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:$F1C8 PRG:31C8 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:$F1D8 PRG:31D8 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:$F1E8 PRG:31E8 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:$F1F8 PRG:31F8 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:$F208 PRG:3208 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:$F218 PRG:3218 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:$F228 PRG:3228 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:$F238 PRG:3238 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:$F248 PRG:3248 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:$F258 PRG:3258 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:$F268 PRG:3268 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:$F278 PRG:3278 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:$F288 PRG:3288 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:$F298 PRG:3298 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:$F2A8 PRG:32A8 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:$F2B8 PRG:32B8 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:$F2C8 PRG:32C8 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:$F2D8 PRG:32D8 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:$F2E8 PRG:32E8 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:$F2F8 PRG:32F8 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:$F308 PRG:3308 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:$F318 PRG:3318 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:$F328 PRG:3328 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:$F338 PRG:3338 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:$F348 PRG:3348 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:$F358 PRG:3358 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:$F368 PRG:3368 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:$F378 PRG:3378 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:$F388 PRG:3388 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:$F398 PRG:3398 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:$F3A8 PRG:33A8 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:$F3B8 PRG:33B8 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:$F3C8 PRG:33C8 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:$F3D8 PRG:33D8 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:$F3E8 PRG:33E8 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:$F3F8 PRG:33F8 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:$F408 PRG:3408 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:$F418 PRG:3418 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:$F428 PRG:3428 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:$F438 PRG:3438 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:$F448 PRG:3448 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:$F458 PRG:3458 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:$F468 PRG:3468 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:$F478 PRG:3478 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:$F488 PRG:3488 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:$F498 PRG:3498 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:$F4A8 PRG:34A8 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:$F4B8 PRG:34B8 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:$F4C8 PRG:34C8 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:$F4D8 PRG:34D8 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:$F4E8 PRG:34E8 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:$F4F8 PRG:34F8 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:$F508 PRG:3508 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:$F518 PRG:3518 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:$F528 PRG:3528 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:$F538 PRG:3538 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:$F548 PRG:3548 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:$F558 PRG:3558 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:$F568 PRG:3568 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:$F578 PRG:3578 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:$F588 PRG:3588 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:$F598 PRG:3598 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:$F5A8 PRG:35A8 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:$F5B8 PRG:35B8 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:$F5C8 PRG:35C8 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:$F5D8 PRG:35D8 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:$F5E8 PRG:35E8 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:$F5F8 PRG:35F8 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:$F608 PRG:3608 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:$F618 PRG:3618 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:$F628 PRG:3628 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:$F638 PRG:3638 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:$F648 PRG:3648 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:$F658 PRG:3658 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:$F668 PRG:3668 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:$F678 PRG:3678 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:$F688 PRG:3688 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:$F698 PRG:3698 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:$F6A8 PRG:36A8 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:$F6B8 PRG:36B8 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:$F6C8 PRG:36C8 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:$F6D8 PRG:36D8 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:$F6E8 PRG:36E8 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:$F6F8 PRG:36F8 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:$F708 PRG:3708 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:$F718 PRG:3718 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:$F728 PRG:3728 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:$F738 PRG:3738 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:$F748 PRG:3748 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:$F758 PRG:3758 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:$F768 PRG:3768 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:$F778 PRG:3778 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:$F788 PRG:3788 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:$F798 PRG:3798 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:$F7A8 PRG:37A8 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:$F7B8 PRG:37B8 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:$F7C8 PRG:37C8 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:$F7D8 PRG:37D8 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:$F7E8 PRG:37E8 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:$F7F8 PRG:37F8 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:$F808 PRG:3808 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:$F818 PRG:3818 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:$F828 PRG:3828 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:$F838 PRG:3838 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:$F848 PRG:3848 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:$F858 PRG:3858 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:$F868 PRG:3868 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:$F878 PRG:3878 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:$F888 PRG:3888 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:$F898 PRG:3898 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:$F8A8 PRG:38A8 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:$F8B8 PRG:38B8 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:$F8C8 PRG:38C8 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:$F8D8 PRG:38D8 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:$F8E8 PRG:38E8 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:$F8F8 PRG:38F8 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:$F908 PRG:3908 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:$F918 PRG:3918 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:$F928 PRG:3928 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:$F938 PRG:3938 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:$F948 PRG:3948 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:$F958 PRG:3958 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:$F968 PRG:3968 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:$F978 PRG:3978 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:$F988 PRG:3988 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:$F998 PRG:3998 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:$F9A8 PRG:39A8 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:$F9B8 PRG:39B8 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:$F9C8 PRG:39C8 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:$F9D8 PRG:39D8 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:$F9E8 PRG:39E8 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:$F9F8 PRG:39F8 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:$FA08 PRG:3A08 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:$FA18 PRG:3A18 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:$FA28 PRG:3A28 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:$FA38 PRG:3A38 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:$FA48 PRG:3A48 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:$FA58 PRG:3A58 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:$FA68 PRG:3A68 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:$FA78 PRG:3A78 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:$FA88 PRG:3A88 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:$FA98 PRG:3A98 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:$FAA8 PRG:3AA8 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:$FAB8 PRG:3AB8 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:$FAC8 PRG:3AC8 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:$FAD8 PRG:3AD8 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:$FAE8 PRG:3AE8 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:$FAF8 PRG:3AF8 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:$FB08 PRG:3B08 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:$FB18 PRG:3B18 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:$FB28 PRG:3B28 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:$FB38 PRG:3B38 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:$FB48 PRG:3B48 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:$FB58 PRG:3B58 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:$FB68 PRG:3B68 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:$FB78 PRG:3B78 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:$FB88 PRG:3B88 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:$FB98 PRG:3B98 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:$FBA8 PRG:3BA8 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:$FBB8 PRG:3BB8 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:$FBC8 PRG:3BC8 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:$FBD8 PRG:3BD8 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:$FBE8 PRG:3BE8 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:$FBF8 PRG:3BF8 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:$FC08 PRG:3C08 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:$FC18 PRG:3C18 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:$FC28 PRG:3C28 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:$FC38 PRG:3C38 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:$FC48 PRG:3C48 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:$FC58 PRG:3C58 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:$FC68 PRG:3C68 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:$FC78 PRG:3C78 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:$FC88 PRG:3C88 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:$FC98 PRG:3C98 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:$FCA8 PRG:3CA8 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:$FCB8 PRG:3CB8 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:$FCC8 PRG:3CC8 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:$FCD8 PRG:3CD8 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:$FCE8 PRG:3CE8 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:$FCF8 PRG:3CF8 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:$FD08 PRG:3D08 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:$FD18 PRG:3D18 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:$FD28 PRG:3D28 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:$FD38 PRG:3D38 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:$FD48 PRG:3D48 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:$FD58 PRG:3D58 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:$FD68 PRG:3D68 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:$FD78 PRG:3D78 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:$FD88 PRG:3D88 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:$FD98 PRG:3D98 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:$FDA8 PRG:3DA8 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:$FDB8 PRG:3DB8 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:$FDC8 PRG:3DC8 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:$FDD8 PRG:3DD8 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:$FDE8 PRG:3DE8 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:$FDF8 PRG:3DF8 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:$FE08 PRG:3E08 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:$FE18 PRG:3E18 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:$FE28 PRG:3E28 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:$FE38 PRG:3E38 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:$FE48 PRG:3E48 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:$FE58 PRG:3E58 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:$FE68 PRG:3E68 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:$FE78 PRG:3E78 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:$FE88 PRG:3E88 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:$FE98 PRG:3E98 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:$FEA8 PRG:3EA8 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:$FEB8 PRG:3EB8 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:$FEC8 PRG:3EC8 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:$FED8 PRG:3ED8 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:$FEE8 PRG:3EE8 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:$FEF8 PRG:3EF8 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:$FF08 PRG:3F08 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:$FF18 PRG:3F18 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:$FF28 PRG:3F28 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:$FF38 PRG:3F38 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:$FF48 PRG:3F48 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:$FF58 PRG:3F58 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:$FF68 PRG:3F68 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:$FF78 PRG:3F78 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:$FF88 PRG:3F88 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:$FF98 PRG:3F98 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:$FFA8 PRG:3FA8 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:$FFB8 PRG:3FB8 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:$FFC8 PRG:3FC8 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:$FFD8 PRG:3FD8 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:$FFE8 PRG:3FE8 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF - .byte $FF, $FF, $F7, $CC, $00, $C0, $00, $C0 ; CPU:$FFF8 PRG:3FF8 FF FF F7 CC 00 C0 00 C0 +VramBurstNextCommand: + lda $0302,y ; CPU:$CE8A PRG:0E8A B9 02 03 + bpl VramBurstWriteChunk ; CPU:$CE8D PRG:0E8D 10 D0 + sta $0302 ; CPU:$CE8F PRG:0E8F 8D 02 03 + lda #$00 ; CPU:$CE92 PRG:0E92 A9 00 + sta $0301 ; CPU:$CE94 PRG:0E94 8D 01 03 + rts ; CPU:$CE97 PRG:0E97 60 +; ----------------------------------------------------------------------------- +; Routine: DispatchVramOp +; Global: Entry point for a VRAM command: saves the arguments, runs RetAddrUpdate to bind the stream, and begins executing the command. +; Local: Jumps into the command stream; returns via VramOpReturn. +; Parameters: A, X = command arguments. +; Returns: Nothing. +; Clobbers: A, X, Y; RetAddrTempLo/Hi, VramOpResult. +; ----------------------------------------------------------------------------- +DispatchVramOp: + sta Zp03 ; CPU:$CE98 PRG:0E98 85 03 + stx Zp02 ; CPU:$CE9A PRG:0E9A 86 02 + jsr $CDC8 ; CPU:$CE9C PRG:0E9C 20 C8 CD + ldy #$00 ; CPU:$CE9F PRG:0E9F A0 00 + lda (Zp00),y ; CPU:$CEA1 PRG:0EA1 B1 00 + and #$0F ; CPU:$CEA3 PRG:0EA3 29 0F + sta Zp04 ; CPU:$CEA5 PRG:0EA5 85 04 + lda (Zp00),y ; CPU:$CEA7 PRG:0EA7 B1 00 + lsr a ; CPU:$CEA9 PRG:0EA9 4A + lsr a ; CPU:$CEAA PRG:0EAA 4A + lsr a ; CPU:$CEAB PRG:0EAB 4A + lsr a ; CPU:$CEAC PRG:0EAC 4A + sta Zp05 ; CPU:$CEAD PRG:0EAD 85 05 + ldx $0301 ; CPU:$CEAF PRG:0EAF AE 01 03 +; ----------------------------------------------------------------------------- +; Routine: StoreVramOpResult +; Global: Stores the VRAM operation's result and its length into the burst command table at $0302, indexed by X, running the length check between the two stores. +; Local: Returns to the caller via VramOpReturn. +; Parameters: X = table index. +; Returns: Burst table updated. +; Clobbers: A, X; $0302, VramOpResult, VramOpLength. +; ----------------------------------------------------------------------------- +StoreVramOpResult: + lda Zp03 ; CPU:$CEB2 PRG:0EB2 A5 03 + sta $0302,x ; CPU:$CEB4 PRG:0EB4 9D 02 03 + jsr $CEF3 ; CPU:$CEB7 PRG:0EB7 20 F3 CE + lda Zp02 ; CPU:$CEBA PRG:0EBA A5 02 + sta $0302,x ; CPU:$CEBC PRG:0EBC 9D 02 03 + jsr $CEF3 ; CPU:$CEBF PRG:0EBF 20 F3 CE + lda Zp04 ; CPU:$CEC2 PRG:0EC2 A5 04 + sta Zp06 ; CPU:$CEC4 PRG:0EC4 85 06 + sta $0302,x ; CPU:$CEC6 PRG:0EC6 9D 02 03 +; ----------------------------------------------------------------------------- +; Routine: VramOpDataStream +; Global: Walks the VRAM operation data stream one byte at a time. +; Local: Falls through when the stream is exhausted. +; Parameters: Y = stream index. +; Returns: Nothing. +; Clobbers: A, Y. +; ----------------------------------------------------------------------------- +VramOpDataStream: + jsr $CEF3 ; CPU:$CEC9 PRG:0EC9 20 F3 CE + iny ; CPU:$CECC PRG:0ECC C8 + lda (Zp00),y ; CPU:$CECD PRG:0ECD B1 00 + sta $0302,x ; CPU:$CECF PRG:0ECF 9D 02 03 + dec Zp06 ; CPU:$CED2 PRG:0ED2 C6 06 + bne VramOpDataStream ; CPU:$CED4 PRG:0ED4 D0 F3 + jsr $CEF3 ; CPU:$CED6 PRG:0ED6 20 F3 CE + stx $0301 ; CPU:$CED9 PRG:0ED9 8E 01 03 + clc ; CPU:$CEDC PRG:0EDC 18 + lda #$20 ; CPU:$CEDD PRG:0EDD A9 20 + adc Zp02 ; CPU:$CEDF PRG:0EDF 65 02 + sta Zp02 ; CPU:$CEE1 PRG:0EE1 85 02 + lda #$00 ; CPU:$CEE3 PRG:0EE3 A9 00 + adc Zp03 ; CPU:$CEE5 PRG:0EE5 65 03 + sta Zp03 ; CPU:$CEE7 PRG:0EE7 85 03 + dec Zp05 ; CPU:$CEE9 PRG:0EE9 C6 05 + bne StoreVramOpResult ; CPU:$CEEB PRG:0EEB D0 C5 + lda #$FF ; CPU:$CEED PRG:0EED A9 FF + sta $0302,x ; CPU:$CEEF PRG:0EEF 9D 02 03 + rts ; CPU:$CEF2 PRG:0EF2 60 +; ----------------------------------------------------------------------------- +; Routine: VramOpLengthCheck +; Global: Checks the accumulated operation length against the limit at $0300 before continuing. +; Local: Branches to VramOpReturn when the limit is reached. +; Parameters: None. +; Returns: Carry reflects the comparison. +; Clobbers: X, carry; $0300. +; ----------------------------------------------------------------------------- +VramOpLengthCheck: + inx ; CPU:$CEF3 PRG:0EF3 E8 + cpx $0300 ; CPU:$CEF4 PRG:0EF4 EC 00 03 + bcc VramOpReturn ; CPU:$CEF7 PRG:0EF7 90 0C + ldx $0301 ; CPU:$CEF9 PRG:0EF9 AE 01 03 + lda #$FF ; CPU:$CEFC PRG:0EFC A9 FF + sta $0302,x ; CPU:$CEFE PRG:0EFE 9D 02 03 + pla ; CPU:$CF01 PRG:0F01 68 + pla ; CPU:$CF02 PRG:0F02 68 + lda #$01 ; CPU:$CF03 PRG:0F03 A9 01 +; ----------------------------------------------------------------------------- +; Routine: VramOpReturn +; Global: Restores the saved dispatch state and returns from a VRAM operation. +; Local: RTS. +; Parameters: None. +; Returns: Nothing. +; Clobbers: A, X, Y; stack. +; ----------------------------------------------------------------------------- +VramOpReturn: + rts ; CPU:$CF05 PRG:0F05 60 +; ---- data region $CF06-$FFFF (12538 bytes) ---- +; Split into named sub-blocks based on structural boundaries. +; +; Sub-block map: +; $CF06-$CF28 VramCommandStream1 VRAM command stream start - PPU addr/data pairs read by VramWriteLoop +; $CF29-$CF29 VramStream1Terminator FF terminator byte ending first command stream +; $CF2A-$CF3F VramCommandInlineCode Inline code after jsr $CE98 - lax $20D4, nop $C1,X, $61 padding +; $CF40-$D061 VramCommandBlock2 VRAM command/data block - PPU writes and OAM attribute patterns +; $D062-$D062 VramStream2Terminator FF terminator byte ending second command stream +; $D063-$D1F3 VramCommandBlock3 VRAM command/data block - continues command stream patterns +; $D1F4-$D1F4 VramStream3Terminator FF terminator byte ending third command stream +; $D1F5-$D4AD VramCommandBlock4 Largest VRAM command/data block - 697 bytes of command stream +; $D4AE-$D4AE OamTableStreamTerminator FF terminator byte before OAM gap data +; $D4AF-$D4E1 OamTableGap Gap data before OAM table at $D4E3 +; $D4E2-$D4E2 OamTable1Terminator FF terminator byte before OAM table group 1 +; $D4E3-$D5C2 OamTableGroups1 OAM table groups 1-7 (CopyOamFromTable reads $D4E3) - 7x32 byte tables +; $D5C3-$D5C3 OamTableStream2Terminator FF terminator byte before second OAM table group +; $D5C4-$D603 OamTableGroups2 OAM table groups 1-2 (CopyOamFromTable70 reads $D5C4) - 2x32 byte tables +; $D604-$D643 OamSpritePadding 64 bytes of $F4 sprite off-screen padding +; $D644-$D6A3 OamTableGroups3 OAM table groups 3-5 - 3x32 byte tables before sprite template +; $D6A4-$D6A4 SpriteTableTerminator FF terminator byte before sprite template table +; $D6A5-$D6C4 SpriteTemplateTable 32-byte sprite template (CopySpriteTemplateTable reads $D6A5) - 8x4 Y/tile/attr/X +; $D6C5-$D6E4 ButtonOamTemplateTable 32-byte button OAM template (PrepareButtonOam reads $D6C5) - 8x4 Y/tile/attr/X +; $D6E5-$FFF9 RomPadding 10517 bytes of $FF ROM padding +; $FFFA-$FFFF ResetVectors Reset/NMI/IRQ vectors - 6 bytes +; +VramCommandStream1: +; VRAM command stream start - PPU addr/data pairs read by VramWriteLoop +; ---- $CF06-$CF28 (35 bytes) ---- + .byte $3F, $00, $20, $0F, $16, $00, $30, $0F, $1A, $2A, $30, $0F, $1A, $00, $30, $0F ; CPU:$CF06 PRG:0F06 3F 00 20 0F 16 00 30 0F 1A 2A 30 0F 1A 00 30 0F + .byte $30, $00, $30, $0F, $16, $00, $30, $0F, $1A, $2A, $30, $0F, $1A, $00, $30, $0F ; CPU:$CF16 PRG:0F16 30 00 30 0F 16 00 30 0F 1A 2A 30 0F 1A 00 30 0F + .byte $30, $00, $30 ; CPU:$CF26 PRG:0F26 30 00 30 + +VramStream1Terminator: +; FF terminator byte ending first command stream +; ---- $CF29-$CF29 (1 bytes) ---- + .byte $FF ; CPU:$CF29 PRG:0F29 FF + +VramCommandInlineCode: +; Inline code after jsr $CE98 - lax $20D4, nop $C1,X, $61 padding +; ---- $CF2A-$CF3F (22 bytes) ---- + .byte $20, $A2, $1C, $60, $61, $61, $61, $61, $61, $61, $61, $61, $61, $61, $61, $61 ; CPU:$CF2A PRG:0F2A 20 A2 1C 60 61 61 61 61 61 61 61 61 61 61 61 61 + .byte $61, $61, $61, $61, $61, $61 ; CPU:$CF3A PRG:0F3A 61 61 61 61 61 61 + +VramCommandBlock2: +; VRAM command/data block - PPU writes and OAM attribute patterns +; ---- $CF40-$D061 (290 bytes) ---- + .byte $61, $61, $61, $61, $61, $61, $61, $61, $66, $20, $C2, $1C, $64, $70, $71, $72 ; CPU:$CF40 PRG:0F40 61 61 61 61 61 61 61 61 66 20 C2 1C 64 70 71 72 + .byte $73, $74, $75, $76, $77, $78, $79, $7A, $7B, $24, $7D, $7E, $7F, $A0, $A1, $A2 ; CPU:$CF50 PRG:0F50 73 74 75 76 77 78 79 7A 7B 24 7D 7E 7F A0 A1 A2 + .byte $A3, $A4, $A5, $A6, $A7, $A8, $A9, $67, $20, $E2, $1C, $64, $80, $81, $82, $83 ; CPU:$CF60 PRG:0F60 A3 A4 A5 A6 A7 A8 A9 67 20 E2 1C 64 80 81 82 83 + .byte $84, $85, $86, $87, $88, $89, $8A, $8B, $24, $8D, $8E, $8F, $B0, $B1, $24, $B3 ; CPU:$CF70 PRG:0F70 84 85 86 87 88 89 8A 8B 24 8D 8E 8F B0 B1 24 B3 + .byte $B4, $B5, $B6, $B7, $B8, $B9, $67, $21, $02, $1C, $64, $90, $91, $92, $93, $94 ; CPU:$CF80 PRG:0F80 B4 B5 B6 B7 B8 B9 67 21 02 1C 64 90 91 92 93 94 + .byte $95, $96, $97, $98, $99, $9A, $9B, $9C, $9D, $9E, $9F, $C0, $C1, $24, $C3, $C4 ; CPU:$CF90 PRG:0F90 95 96 97 98 99 9A 9B 9C 9D 9E 9F C0 C1 24 C3 C4 + .byte $C5, $C6, $C7, $C8, $C9, $67, $21, $22, $1C, $62, $63, $63, $63, $63, $63, $63 ; CPU:$CFA0 PRG:0FA0 C5 C6 C7 C8 C9 67 21 22 1C 62 63 63 63 63 63 63 + .byte $63, $63, $63, $63, $63, $63, $63, $63, $63, $63, $63, $63, $63, $63, $63, $63 ; CPU:$CFB0 PRG:0FB0 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 63 + .byte $63, $63, $63, $63, $65, $21, $C5, $18, $01, $24, $17, $18, $1B, $16, $0A, $15 ; CPU:$CFC0 PRG:0FC0 63 63 63 63 65 21 C5 18 01 24 17 18 1B 16 0A 15 + .byte $24, $0C, $18, $17, $1D, $1B, $18, $15, $15, $0E, $1B, $24, $1D, $0E, $1C, $1D ; CPU:$CFD0 PRG:0FD0 24 0C 18 17 1D 1B 18 15 15 0E 1B 24 1D 0E 1C 1D + .byte $22, $25, $18, $02, $24, $04, $24, $19, $15, $0A, $22, $24, $0C, $18, $17, $1D ; CPU:$CFE0 PRG:0FE0 22 25 18 02 24 04 24 19 15 0A 22 24 0C 18 17 1D + .byte $1B, $18, $15, $15, $0E, $1B, $24, $1D, $0E, $1C, $1D, $22, $85, $18, $03, $24 ; CPU:$CFF0 PRG:0FF0 1B 18 15 15 0E 1B 24 1D 0E 1C 1D 22 85 18 03 24 + .byte $1B, $0E, $1D, $1E, $1B, $17, $24, $1D, $18, $24, $16, $0A, $12, $17, $24, $16 ; CPU:$D000 PRG:1000 1B 0E 1D 1E 1B 17 24 1D 18 24 16 0A 12 17 24 16 + .byte $0E, $17, $1E, $24, $24, $24, $23, $C0, $10, $00, $00, $00, $00, $00, $00, $00 ; CPU:$D010 PRG:1010 0E 17 1E 24 24 24 23 C0 10 00 00 00 00 00 00 00 + .byte $00, $44, $55, $55, $55, $55, $55, $55, $11, $23, $D0, $10, $04, $05, $05, $05 ; CPU:$D020 PRG:1020 00 44 55 55 55 55 55 55 11 23 D0 10 04 05 05 05 + .byte $05, $05, $05, $01, $00, $00, $00, $00, $00, $00, $00, $00, $23, $E0, $10, $00 ; CPU:$D030 PRG:1030 05 05 05 01 00 00 00 00 00 00 00 00 23 E0 10 00 + .byte $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $23 ; CPU:$D040 PRG:1040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 23 + .byte $F0, $10, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ; CPU:$D050 PRG:1050 F0 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + .byte $00, $00 ; CPU:$D060 PRG:1060 00 00 + +VramStream2Terminator: +; FF terminator byte ending second command stream +; ---- $D062-$D062 (1 bytes) ---- + .byte $FF ; CPU:$D062 PRG:1062 FF + +VramCommandBlock3: +; VRAM command/data block - continues command stream patterns +; ---- $D063-$D1F3 (401 bytes) ---- + .byte $20, $62, $1A, $1D, $1E, $1B, $0B, $18, $24, $1C, $24, $0B, $24, $0A, $24, $24 ; CPU:$D063 PRG:1063 20 62 1A 1D 1E 1B 0B 18 24 1C 24 0B 24 0A 24 24 + .byte $02, $24, $19, $15, $0A, $22, $0E, $1B, $24, $1D, $0E, $1C, $1D, $20, $8F, $0D ; CPU:$D073 PRG:1073 02 24 19 15 0A 22 0E 1B 24 1D 0E 1C 1D 20 8F 0D + .byte $40, $42, $42, $42, $42, $42, $42, $42, $42, $42, $42, $42, $41, $20, $AF, $0D ; CPU:$D083 PRG:1083 40 42 42 42 42 42 42 42 42 42 42 42 41 20 AF 0D + .byte $47, $24, $24, $24, $24, $24, $01, $24, $28, $29, $2A, $2B, $46, $20, $CF, $0D ; CPU:$D093 PRG:1093 47 24 24 24 24 24 01 24 28 29 2A 2B 46 20 CF 0D + .byte $47, $24, $4A, $24, $24, $24, $24, $24, $24, $24, $24, $24, $46, $20, $EF, $0D ; CPU:$D0A3 PRG:10A3 47 24 4A 24 24 24 24 24 24 24 24 24 46 20 EF 0D + .byte $47, $24, $24, $24, $24, $24, $26, $24, $24, $24, $26, $24, $46, $21, $0F, $0D ; CPU:$D0B3 PRG:10B3 47 24 24 24 24 24 26 24 24 24 26 24 46 21 0F 0D + .byte $44, $43, $43, $43, $43, $43, $43, $43, $43, $43, $43, $43, $45, $21, $4F, $0D ; CPU:$D0C3 PRG:10C3 44 43 43 43 43 43 43 43 43 43 43 43 45 21 4F 0D + .byte $40, $42, $42, $42, $42, $42, $42, $42, $42, $42, $42, $42, $41, $21, $6F, $0D ; CPU:$D0D3 PRG:10D3 40 42 42 42 42 42 42 42 42 42 42 42 41 21 6F 0D + .byte $47, $24, $24, $24, $24, $24, $02, $24, $28, $29, $2A, $2B, $46, $21, $8F, $0D ; CPU:$D0E3 PRG:10E3 47 24 24 24 24 24 02 24 28 29 2A 2B 46 21 8F 0D + .byte $47, $24, $4A, $24, $24, $24, $24, $24, $24, $24, $24, $24, $46, $21, $AF, $0D ; CPU:$D0F3 PRG:10F3 47 24 4A 24 24 24 24 24 24 24 24 24 46 21 AF 0D + .byte $47, $24, $24, $24, $24, $24, $26, $24, $24, $24, $26, $24, $46, $21, $CF, $0D ; CPU:$D103 PRG:1103 47 24 24 24 24 24 26 24 24 24 26 24 46 21 CF 0D + .byte $44, $43, $43, $43, $43, $43, $43, $43, $43, $43, $43, $43, $45, $20, $A6, $01 ; CPU:$D113 PRG:1113 44 43 43 43 43 43 43 43 43 43 43 43 45 20 A6 01 + .byte $D1, $21, $06, $01, $2C, $21, $66, $01, $D1, $21, $C6, $01, $2C, $20, $87, $07 ; CPU:$D123 PRG:1123 D1 21 06 01 2C 21 66 01 D1 21 C6 01 2C 20 87 07 + .byte $58, $53, $5A, $53, $5A, $53, $57, $20, $A7, $07, $50, $24, $54, $24, $54, $24 ; CPU:$D133 PRG:1133 58 53 5A 53 5A 53 57 20 A7 07 50 24 54 24 54 24 + .byte $51, $20, $C7, $07, $50, $24, $54, $24, $54, $24, $51, $20, $E7, $07, $50, $24 ; CPU:$D143 PRG:1143 51 20 C7 07 50 24 54 24 54 24 51 20 E7 07 50 24 + .byte $54, $24, $54, $24, $51, $21, $07, $07, $50, $24, $54, $24, $54, $24, $51, $21 ; CPU:$D153 PRG:1153 54 24 54 24 51 21 07 07 50 24 54 24 54 24 51 21 + .byte $27, $07, $56, $52, $59, $52, $59, $52, $55, $21, $47, $07, $58, $53, $5A, $53 ; CPU:$D163 PRG:1163 27 07 56 52 59 52 59 52 55 21 47 07 58 53 5A 53 + .byte $5A, $53, $57, $21, $67, $07, $50, $24, $54, $24, $54, $24, $51, $21, $87, $07 ; CPU:$D173 PRG:1173 5A 53 57 21 67 07 50 24 54 24 54 24 51 21 87 07 + .byte $50, $24, $54, $24, $54, $24, $51, $21, $A7, $07, $50, $24, $54, $24, $54, $24 ; CPU:$D183 PRG:1183 50 24 54 24 54 24 51 21 A7 07 50 24 54 24 54 24 + .byte $51, $21, $C7, $07, $50, $24, $54, $24, $54, $24, $51, $21, $E7, $07, $56, $52 ; CPU:$D193 PRG:1193 51 21 C7 07 50 24 54 24 54 24 51 21 E7 07 56 52 + .byte $59, $52, $59, $52, $55, $23, $C0, $10, $40, $50, $50, $50, $50, $50, $50, $00 ; CPU:$D1A3 PRG:11A3 59 52 59 52 55 23 C0 10 40 50 50 50 50 50 50 00 + .byte $00, $00, $00, $00, $00, $03, $00, $00, $23, $D0, $10, $00, $00, $00, $00, $00 ; CPU:$D1B3 PRG:11B3 00 00 00 00 00 03 00 00 23 D0 10 00 00 00 00 00 + .byte $30, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $23, $E0, $10, $00, $00 ; CPU:$D1C3 PRG:11C3 30 00 00 00 00 00 00 00 00 00 00 23 E0 10 00 00 + .byte $00, $00, $00, $03, $00, $00, $00, $00, $00, $00, $00, $30, $00, $00, $23, $F0 ; CPU:$D1D3 PRG:11D3 00 00 00 03 00 00 00 00 00 00 00 30 00 00 23 F0 + .byte $10, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ; CPU:$D1E3 PRG:11E3 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + .byte $00 ; CPU:$D1F3 PRG:11F3 00 + +VramStream3Terminator: +; FF terminator byte ending third command stream +; ---- $D1F4-$D1F4 (1 bytes) ---- + .byte $FF ; CPU:$D1F4 PRG:11F4 FF + +VramCommandBlock4: +; Largest VRAM command/data block - 697 bytes of command stream +; ---- $D1F5-$D4AD (697 bytes) ---- + .byte $20, $62, $1A, $1D, $1E, $1B, $0B, $18, $24, $1C, $24, $0B, $24, $0A, $24, $24 ; CPU:$D1F5 PRG:11F5 20 62 1A 1D 1E 1B 0B 18 24 1C 24 0B 24 0A 24 24 + .byte $04, $24, $19, $15, $0A, $22, $0E, $1B, $24, $1D, $0E, $1C, $1D, $20, $8F, $0D ; CPU:$D205 PRG:1205 04 24 19 15 0A 22 0E 1B 24 1D 0E 1C 1D 20 8F 0D + .byte $40, $42, $42, $42, $42, $42, $42, $42, $42, $42, $42, $42, $41, $20, $AF, $0D ; CPU:$D215 PRG:1215 40 42 42 42 42 42 42 42 42 42 42 42 41 20 AF 0D + .byte $47, $24, $24, $24, $24, $24, $01, $24, $28, $29, $2A, $2B, $46, $20, $CF, $0D ; CPU:$D225 PRG:1225 47 24 24 24 24 24 01 24 28 29 2A 2B 46 20 CF 0D + .byte $47, $24, $4A, $24, $24, $24, $24, $24, $24, $24, $24, $24, $46, $20, $EF, $0D ; CPU:$D235 PRG:1235 47 24 4A 24 24 24 24 24 24 24 24 24 46 20 EF 0D + .byte $47, $24, $24, $24, $24, $24, $26, $24, $24, $24, $26, $24, $46, $21, $0F, $0D ; CPU:$D245 PRG:1245 47 24 24 24 24 24 26 24 24 24 26 24 46 21 0F 0D + .byte $44, $43, $43, $43, $43, $43, $43, $43, $43, $43, $43, $43, $45, $21, $4F, $0D ; CPU:$D255 PRG:1255 44 43 43 43 43 43 43 43 43 43 43 43 45 21 4F 0D + .byte $40, $42, $42, $42, $42, $42, $42, $42, $42, $42, $42, $42, $41, $21, $6F, $0D ; CPU:$D265 PRG:1265 40 42 42 42 42 42 42 42 42 42 42 42 41 21 6F 0D + .byte $47, $24, $24, $24, $24, $24, $02, $24, $28, $29, $2A, $2B, $46, $21, $8F, $0D ; CPU:$D275 PRG:1275 47 24 24 24 24 24 02 24 28 29 2A 2B 46 21 8F 0D + .byte $47, $24, $4A, $24, $24, $24, $24, $24, $24, $24, $24, $24, $46, $21, $AF, $0D ; CPU:$D285 PRG:1285 47 24 4A 24 24 24 24 24 24 24 24 24 46 21 AF 0D + .byte $47, $24, $24, $24, $24, $24, $26, $24, $24, $24, $26, $24, $46, $21, $CF, $0D ; CPU:$D295 PRG:1295 47 24 24 24 24 24 26 24 24 24 26 24 46 21 CF 0D + .byte $44, $43, $43, $43, $43, $43, $43, $43, $43, $43, $43, $43, $45, $22, $0F, $0D ; CPU:$D2A5 PRG:12A5 44 43 43 43 43 43 43 43 43 43 43 43 45 22 0F 0D + .byte $40, $42, $42, $42, $42, $42, $42, $42, $42, $42, $42, $42, $41, $22, $2F, $0D ; CPU:$D2B5 PRG:12B5 40 42 42 42 42 42 42 42 42 42 42 42 41 22 2F 0D + .byte $47, $24, $24, $24, $24, $24, $03, $24, $28, $29, $2A, $2B, $46, $22, $4F, $0D ; CPU:$D2C5 PRG:12C5 47 24 24 24 24 24 03 24 28 29 2A 2B 46 22 4F 0D + .byte $47, $24, $4A, $24, $24, $24, $24, $24, $24, $24, $24, $24, $46, $22, $6F, $0D ; CPU:$D2D5 PRG:12D5 47 24 4A 24 24 24 24 24 24 24 24 24 46 22 6F 0D + .byte $47, $24, $24, $24, $24, $24, $26, $24, $24, $24, $26, $24, $46, $22, $8F, $0D ; CPU:$D2E5 PRG:12E5 47 24 24 24 24 24 26 24 24 24 26 24 46 22 8F 0D + .byte $44, $43, $43, $43, $43, $43, $43, $43, $43, $43, $43, $43, $45, $22, $CF, $0D ; CPU:$D2F5 PRG:12F5 44 43 43 43 43 43 43 43 43 43 43 43 45 22 CF 0D + .byte $40, $42, $42, $42, $42, $42, $42, $42, $42, $42, $42, $42, $41, $22, $EF, $0D ; CPU:$D305 PRG:1305 40 42 42 42 42 42 42 42 42 42 42 42 41 22 EF 0D + .byte $47, $24, $24, $24, $24, $24, $04, $24, $28, $29, $2A, $2B, $46, $23, $0F, $0D ; CPU:$D315 PRG:1315 47 24 24 24 24 24 04 24 28 29 2A 2B 46 23 0F 0D + .byte $47, $24, $4A, $24, $24, $24, $24, $24, $24, $24, $24, $24, $46, $23, $2F, $0D ; CPU:$D325 PRG:1325 47 24 4A 24 24 24 24 24 24 24 24 24 46 23 2F 0D + .byte $47, $24, $24, $24, $24, $24, $26, $24, $24, $24, $26, $24, $46, $23, $4F, $0D ; CPU:$D335 PRG:1335 47 24 24 24 24 24 26 24 24 24 26 24 46 23 4F 0D + .byte $44, $43, $43, $43, $43, $43, $43, $43, $43, $43, $43, $43, $45, $20, $A6, $01 ; CPU:$D345 PRG:1345 44 43 43 43 43 43 43 43 43 43 43 43 45 20 A6 01 + .byte $D1, $21, $06, $01, $2C, $21, $66, $01, $D1, $21, $C6, $01, $2C, $22, $26, $01 ; CPU:$D355 PRG:1355 D1 21 06 01 2C 21 66 01 D1 21 C6 01 2C 22 26 01 + .byte $D1, $22, $86, $01, $2C, $22, $E6, $01, $D1, $23, $46, $01, $2C, $20, $87, $07 ; CPU:$D365 PRG:1365 D1 22 86 01 2C 22 E6 01 D1 23 46 01 2C 20 87 07 + .byte $58, $53, $5A, $53, $5A, $53, $57, $20, $A7, $07, $50, $24, $54, $24, $54, $24 ; CPU:$D375 PRG:1375 58 53 5A 53 5A 53 57 20 A7 07 50 24 54 24 54 24 + .byte $51, $20, $C7, $07, $50, $24, $54, $24, $54, $24, $51, $20, $E7, $07, $50, $24 ; CPU:$D385 PRG:1385 51 20 C7 07 50 24 54 24 54 24 51 20 E7 07 50 24 + .byte $54, $24, $54, $24, $51, $21, $07, $07, $50, $24, $54, $24, $54, $24, $51, $21 ; CPU:$D395 PRG:1395 54 24 54 24 51 21 07 07 50 24 54 24 54 24 51 21 + .byte $27, $07, $56, $52, $59, $52, $59, $52, $55, $21, $47, $07, $58, $53, $5A, $53 ; CPU:$D3A5 PRG:13A5 27 07 56 52 59 52 59 52 55 21 47 07 58 53 5A 53 + .byte $5A, $53, $57, $21, $67, $07, $50, $24, $54, $24, $54, $24, $51, $21, $87, $07 ; CPU:$D3B5 PRG:13B5 5A 53 57 21 67 07 50 24 54 24 54 24 51 21 87 07 + .byte $50, $24, $54, $24, $54, $24, $51, $21, $A7, $07, $50, $24, $54, $24, $54, $24 ; CPU:$D3C5 PRG:13C5 50 24 54 24 54 24 51 21 A7 07 50 24 54 24 54 24 + .byte $51, $21, $C7, $07, $50, $24, $54, $24, $54, $24, $51, $21, $E7, $07, $56, $52 ; CPU:$D3D5 PRG:13D5 51 21 C7 07 50 24 54 24 54 24 51 21 E7 07 56 52 + .byte $59, $52, $59, $52, $55, $22, $07, $07, $58, $53, $5A, $53, $5A, $53, $57, $22 ; CPU:$D3E5 PRG:13E5 59 52 59 52 55 22 07 07 58 53 5A 53 5A 53 57 22 + .byte $27, $07, $50, $24, $54, $24, $54, $24, $51, $22, $47, $07, $50, $24, $54, $24 ; CPU:$D3F5 PRG:13F5 27 07 50 24 54 24 54 24 51 22 47 07 50 24 54 24 + .byte $54, $24, $51, $22, $67, $07, $50, $24, $54, $24, $54, $24, $51, $22, $87, $07 ; CPU:$D405 PRG:1405 54 24 51 22 67 07 50 24 54 24 54 24 51 22 87 07 + .byte $50, $24, $54, $24, $54, $24, $51, $22, $A7, $07, $56, $52, $59, $52, $59, $52 ; CPU:$D415 PRG:1415 50 24 54 24 54 24 51 22 A7 07 56 52 59 52 59 52 + .byte $55, $22, $C7, $07, $58, $53, $5A, $53, $5A, $53, $57, $22, $E7, $07, $50, $24 ; CPU:$D425 PRG:1425 55 22 C7 07 58 53 5A 53 5A 53 57 22 E7 07 50 24 + .byte $54, $24, $54, $24, $51, $23, $07, $07, $50, $24, $54, $24, $54, $24, $51, $23 ; CPU:$D435 PRG:1435 54 24 54 24 51 23 07 07 50 24 54 24 54 24 51 23 + .byte $27, $07, $50, $24, $54, $24, $54, $24, $51, $23, $47, $07, $50, $24, $54, $24 ; CPU:$D445 PRG:1445 27 07 50 24 54 24 54 24 51 23 47 07 50 24 54 24 + .byte $54, $24, $51, $23, $67, $07, $56, $52, $59, $52, $59, $52, $55, $23, $C0, $10 ; CPU:$D455 PRG:1455 54 24 51 23 67 07 56 52 59 52 59 52 55 23 C0 10 + .byte $40, $50, $50, $50, $50, $50, $50, $00, $00, $00, $00, $00, $00, $03, $00, $00 ; CPU:$D465 PRG:1465 40 50 50 50 50 50 50 00 00 00 00 00 00 03 00 00 + .byte $23, $D0, $10, $00, $00, $00, $00, $00, $30, $00, $00, $00, $00, $00, $00, $00 ; CPU:$D475 PRG:1475 23 D0 10 00 00 00 00 00 30 00 00 00 00 00 00 00 + .byte $00, $00, $00, $23, $E0, $10, $00, $00, $00, $00, $00, $03, $00, $00, $00, $00 ; CPU:$D485 PRG:1485 00 00 00 23 E0 10 00 00 00 00 00 03 00 00 00 00 + .byte $00, $00, $00, $30, $00, $00, $23, $F0, $10, $00, $00, $00, $00, $00, $00, $00 ; CPU:$D495 PRG:1495 00 00 00 30 00 00 23 F0 10 00 00 00 00 00 00 00 + .byte $00, $00, $00, $00, $00, $00, $00, $00, $00 ; CPU:$D4A5 PRG:14A5 00 00 00 00 00 00 00 00 00 + +OamTableStreamTerminator: +; FF terminator byte before OAM gap data +; ---- $D4AE-$D4AE (1 bytes) ---- + .byte $FF ; CPU:$D4AE PRG:14AE FF + +OamTableGap: +; Gap data before OAM table at $D4E3 +; ---- $D4AF-$D4E1 (51 bytes) ---- + .byte $A5, $24, $54, $24, $54, $24, $24, $54, $24, $54, $24, $24, $54, $24, $54, $24 ; CPU:$D4AF PRG:14AF A5 24 54 24 54 24 24 54 24 54 24 24 54 24 54 24 + .byte $24, $54, $24, $54, $24, $52, $59, $52, $59, $52, $53, $5A, $53, $5A, $53, $24 ; CPU:$D4BF PRG:14BF 24 54 24 54 24 52 59 52 59 52 53 5A 53 5A 53 24 + .byte $54, $24, $54, $24, $24, $54, $24, $54, $24, $24, $54, $24, $54, $24, $24, $54 ; CPU:$D4CF PRG:14CF 54 24 54 24 24 54 24 54 24 24 54 24 54 24 24 54 + .byte $24, $54, $24 ; CPU:$D4DF PRG:14DF 24 54 24 + +OamTable1Terminator: +; FF terminator byte before OAM table group 1 +; ---- $D4E2-$D4E2 (1 bytes) ---- + .byte $FF ; CPU:$D4E2 PRG:14E2 FF + +OamTableGroups1: +; OAM table groups 1-7 (CopyOamFromTable reads $D4E3) - 7x32 byte tables +; ---- $D4E3-$D5C2 (224 bytes) ---- + .byte $37, $4D, $03, $D0, $37, $4D, $03, $C0, $37, $4E, $03, $B0, $37, $4E, $03, $A0 ; CPU:$D4E3 PRG:14E3 37 4D 03 D0 37 4D 03 C0 37 4E 03 B0 37 4E 03 A0 + .byte $27, $48, $03, $88, $37, $4C, $03, $88, $2F, $49, $03, $80, $2F, $4B, $03, $90 ; CPU:$D4F3 PRG:14F3 27 48 03 88 37 4C 03 88 2F 49 03 80 2F 4B 03 90 + .byte $67, $4D, $03, $D0, $67, $4D, $03, $C0, $67, $4E, $03, $B0, $67, $4E, $03, $A0 ; CPU:$D503 PRG:1503 67 4D 03 D0 67 4D 03 C0 67 4E 03 B0 67 4E 03 A0 + .byte $57, $48, $03, $88, $67, $4C, $03, $88, $5F, $49, $03, $80, $5F, $4B, $03, $90 ; CPU:$D513 PRG:1513 57 48 03 88 67 4C 03 88 5F 49 03 80 5F 4B 03 90 + .byte $97, $4D, $03, $D0, $97, $4D, $03, $C0, $97, $4E, $03, $B0, $97, $4E, $03, $A0 ; CPU:$D523 PRG:1523 97 4D 03 D0 97 4D 03 C0 97 4E 03 B0 97 4E 03 A0 + .byte $87, $48, $03, $88, $97, $4C, $03, $88, $8F, $49, $03, $80, $8F, $4B, $03, $90 ; CPU:$D533 PRG:1533 87 48 03 88 97 4C 03 88 8F 49 03 80 8F 4B 03 90 + .byte $C7, $4D, $03, $D0, $C7, $4D, $03, $C0, $C7, $4E, $03, $B0, $C7, $4E, $03, $A0 ; CPU:$D543 PRG:1543 C7 4D 03 D0 C7 4D 03 C0 C7 4E 03 B0 C7 4E 03 A0 + .byte $B7, $48, $03, $88, $C7, $4C, $03, $88, $BF, $49, $03, $80, $BF, $4B, $03, $90 ; CPU:$D553 PRG:1553 B7 48 03 88 C7 4C 03 88 BF 49 03 80 BF 4B 03 90 + .byte $27, $30, $00, $40, $2F, $30, $00, $40, $37, $30, $00, $40, $3F, $30, $00, $40 ; CPU:$D563 PRG:1563 27 30 00 40 2F 30 00 40 37 30 00 40 3F 30 00 40 + .byte $27, $30, $00, $50, $2F, $30, $00, $50, $37, $30, $00, $50, $3F, $30, $00, $50 ; CPU:$D573 PRG:1573 27 30 00 50 2F 30 00 50 37 30 00 50 3F 30 00 50 + .byte $27, $30, $00, $60, $2F, $30, $00, $60, $37, $30, $00, $60, $3F, $30, $00, $60 ; CPU:$D583 PRG:1583 27 30 00 60 2F 30 00 60 37 30 00 60 3F 30 00 60 + .byte $57, $30, $00, $40, $5F, $30, $00, $40, $67, $30, $00, $40, $6F, $30, $00, $40 ; CPU:$D593 PRG:1593 57 30 00 40 5F 30 00 40 67 30 00 40 6F 30 00 40 + .byte $57, $30, $00, $50, $5F, $30, $00, $50, $67, $30, $00, $50, $6F, $30, $00, $50 ; CPU:$D5A3 PRG:15A3 57 30 00 50 5F 30 00 50 67 30 00 50 6F 30 00 50 + .byte $57, $30, $00, $60, $5F, $30, $00, $60, $67, $30, $00, $60, $6F, $30, $00, $60 ; CPU:$D5B3 PRG:15B3 57 30 00 60 5F 30 00 60 67 30 00 60 6F 30 00 60 + +OamTableStream2Terminator: +; FF terminator byte before second OAM table group +; ---- $D5C3-$D5C3 (1 bytes) ---- + .byte $FF ; CPU:$D5C3 PRG:15C3 FF + +OamTableGroups2: +; OAM table groups 1-2 (CopyOamFromTable70 reads $D5C4) - 2x32 byte tables +; ---- $D5C4-$D603 (64 bytes) ---- + .byte $37, $4D, $03, $D0, $37, $4D, $03, $C0, $37, $4E, $03, $B0, $37, $4E, $03, $A0 ; CPU:$D5C4 PRG:15C4 37 4D 03 D0 37 4D 03 C0 37 4E 03 B0 37 4E 03 A0 + .byte $27, $48, $03, $88, $37, $4C, $03, $88, $2F, $49, $03, $80, $2F, $4B, $03, $90 ; CPU:$D5D4 PRG:15D4 27 48 03 88 37 4C 03 88 2F 49 03 80 2F 4B 03 90 + .byte $67, $4D, $03, $D0, $67, $4D, $03, $C0, $67, $4E, $03, $B0, $67, $4E, $03, $A0 ; CPU:$D5E4 PRG:15E4 67 4D 03 D0 67 4D 03 C0 67 4E 03 B0 67 4E 03 A0 + .byte $57, $48, $03, $88, $67, $4C, $03, $88, $5F, $49, $03, $80, $5F, $4B, $03, $90 ; CPU:$D5F4 PRG:15F4 57 48 03 88 67 4C 03 88 5F 49 03 80 5F 4B 03 90 + +OamSpritePadding: +; 64 bytes of $F4 sprite off-screen padding +; ---- $D604-$D643 (64 bytes) ---- + .byte $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4 ; CPU:$D604 PRG:1604 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 + .byte $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4 ; CPU:$D614 PRG:1614 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 + .byte $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4 ; CPU:$D624 PRG:1624 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 + .byte $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4, $F4 ; CPU:$D634 PRG:1634 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 F4 + +OamTableGroups3: +; OAM table groups 3-5 - 3x32 byte tables before sprite template +; ---- $D644-$D6A3 (96 bytes) ---- + .byte $27, $30, $00, $40, $2F, $30, $00, $40, $37, $30, $00, $40, $3F, $30, $00, $40 ; CPU:$D644 PRG:1644 27 30 00 40 2F 30 00 40 37 30 00 40 3F 30 00 40 + .byte $27, $30, $00, $50, $2F, $30, $00, $50, $37, $30, $00, $50, $3F, $30, $00, $50 ; CPU:$D654 PRG:1654 27 30 00 50 2F 30 00 50 37 30 00 50 3F 30 00 50 + .byte $27, $30, $00, $60, $2F, $30, $00, $60, $37, $30, $00, $60, $3F, $30, $00, $60 ; CPU:$D664 PRG:1664 27 30 00 60 2F 30 00 60 37 30 00 60 3F 30 00 60 + .byte $57, $30, $00, $40, $5F, $30, $00, $40, $67, $30, $00, $40, $6F, $30, $00, $40 ; CPU:$D674 PRG:1674 57 30 00 40 5F 30 00 40 67 30 00 40 6F 30 00 40 + .byte $57, $30, $00, $50, $5F, $30, $00, $50, $67, $30, $00, $50, $6F, $30, $00, $50 ; CPU:$D684 PRG:1684 57 30 00 50 5F 30 00 50 67 30 00 50 6F 30 00 50 + .byte $57, $30, $00, $60, $5F, $30, $00, $60, $67, $30, $00, $60, $6F, $30, $00, $60 ; CPU:$D694 PRG:1694 57 30 00 60 5F 30 00 60 67 30 00 60 6F 30 00 60 + +SpriteTableTerminator: +; FF terminator byte before sprite template table +; ---- $D6A4-$D6A4 (1 bytes) ---- + .byte $FF ; CPU:$D6A4 PRG:16A4 FF + +SpriteTemplateTable: +; 32-byte sprite template (CopySpriteTemplateTable reads $D6A5) - 8x4 Y/tile/attr/X +; ---- $D6A5-$D6C4 (32 bytes) ---- + .byte $79, $1D, $00, $18, $79, $0E, $00, $20, $79, $1C, $00, $28, $79, $1D, $00, $30 ; CPU:$D6A5 PRG:16A5 79 1D 00 18 79 0E 00 20 79 1C 00 28 79 1D 00 30 + .byte $79, $18, $00, $40, $79, $1F, $00, $48, $79, $0E, $00, $50, $79, $1B, $00, $58 ; CPU:$D6B5 PRG:16B5 79 18 00 40 79 1F 00 48 79 0E 00 50 79 1B 00 58 + +ButtonOamTemplateTable: +; 32-byte button OAM template (PrepareButtonOam reads $D6C5) - 8x4 Y/tile/attr/X +; ---- $D6C5-$D6E4 (32 bytes) ---- + .byte $79, $0C, $00, $18, $79, $18, $00, $20, $79, $17, $00, $28, $79, $1D, $00, $30 ; CPU:$D6C5 PRG:16C5 79 0C 00 18 79 18 00 20 79 17 00 28 79 1D 00 30 + .byte $79, $0B, $00, $40, $79, $0A, $00, $48, $79, $0D, $00, $50, $79, $24, $00, $58 ; CPU:$D6D5 PRG:16D5 79 0B 00 40 79 0A 00 48 79 0D 00 50 79 24 00 58 + +RomPadding: +; 10517 bytes of $FF ROM padding +; ---- $D6E5-$FFF9 (10517 bytes) ---- + .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$D6E5 PRG:16E5 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:$D6F5 PRG:16F5 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:$D705 PRG:1705 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:$D715 PRG:1715 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:$D725 PRG:1725 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:$D735 PRG:1735 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:$D745 PRG:1745 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:$D755 PRG:1755 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:$D765 PRG:1765 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:$D775 PRG:1775 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:$D785 PRG:1785 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:$D795 PRG:1795 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:$D7A5 PRG:17A5 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:$D7B5 PRG:17B5 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:$D7C5 PRG:17C5 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:$D7D5 PRG:17D5 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:$D7E5 PRG:17E5 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:$D7F5 PRG:17F5 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:$D805 PRG:1805 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:$D815 PRG:1815 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:$D825 PRG:1825 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:$D835 PRG:1835 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:$D845 PRG:1845 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:$D855 PRG:1855 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:$D865 PRG:1865 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:$D875 PRG:1875 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:$D885 PRG:1885 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:$D895 PRG:1895 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:$D8A5 PRG:18A5 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:$D8B5 PRG:18B5 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:$D8C5 PRG:18C5 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:$D8D5 PRG:18D5 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:$D8E5 PRG:18E5 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:$D8F5 PRG:18F5 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:$D905 PRG:1905 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:$D915 PRG:1915 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:$D925 PRG:1925 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:$D935 PRG:1935 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:$D945 PRG:1945 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:$D955 PRG:1955 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:$D965 PRG:1965 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:$D975 PRG:1975 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:$D985 PRG:1985 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:$D995 PRG:1995 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:$D9A5 PRG:19A5 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:$D9B5 PRG:19B5 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:$D9C5 PRG:19C5 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:$D9D5 PRG:19D5 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:$D9E5 PRG:19E5 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:$D9F5 PRG:19F5 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:$DA05 PRG:1A05 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:$DA15 PRG:1A15 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:$DA25 PRG:1A25 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:$DA35 PRG:1A35 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:$DA45 PRG:1A45 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:$DA55 PRG:1A55 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:$DA65 PRG:1A65 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:$DA75 PRG:1A75 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:$DA85 PRG:1A85 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:$DA95 PRG:1A95 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:$DAA5 PRG:1AA5 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:$DAB5 PRG:1AB5 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:$DAC5 PRG:1AC5 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:$DAD5 PRG:1AD5 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:$DAE5 PRG:1AE5 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:$DAF5 PRG:1AF5 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:$DB05 PRG:1B05 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:$DB15 PRG:1B15 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:$DB25 PRG:1B25 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:$DB35 PRG:1B35 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:$DB45 PRG:1B45 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:$DB55 PRG:1B55 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:$DB65 PRG:1B65 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:$DB75 PRG:1B75 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:$DB85 PRG:1B85 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:$DB95 PRG:1B95 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:$DBA5 PRG:1BA5 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:$DBB5 PRG:1BB5 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:$DBC5 PRG:1BC5 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:$DBD5 PRG:1BD5 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:$DBE5 PRG:1BE5 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:$DBF5 PRG:1BF5 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:$DC05 PRG:1C05 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:$DC15 PRG:1C15 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:$DC25 PRG:1C25 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:$DC35 PRG:1C35 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:$DC45 PRG:1C45 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:$DC55 PRG:1C55 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:$DC65 PRG:1C65 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:$DC75 PRG:1C75 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:$DC85 PRG:1C85 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:$DC95 PRG:1C95 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:$DCA5 PRG:1CA5 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:$DCB5 PRG:1CB5 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:$DCC5 PRG:1CC5 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:$DCD5 PRG:1CD5 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:$DCE5 PRG:1CE5 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:$DCF5 PRG:1CF5 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:$DD05 PRG:1D05 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:$DD15 PRG:1D15 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:$DD25 PRG:1D25 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:$DD35 PRG:1D35 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:$DD45 PRG:1D45 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:$DD55 PRG:1D55 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:$DD65 PRG:1D65 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:$DD75 PRG:1D75 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:$DD85 PRG:1D85 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:$DD95 PRG:1D95 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:$DDA5 PRG:1DA5 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:$DDB5 PRG:1DB5 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:$DDC5 PRG:1DC5 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:$DDD5 PRG:1DD5 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:$DDE5 PRG:1DE5 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:$DDF5 PRG:1DF5 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:$DE05 PRG:1E05 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:$DE15 PRG:1E15 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:$DE25 PRG:1E25 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:$DE35 PRG:1E35 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:$DE45 PRG:1E45 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:$DE55 PRG:1E55 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:$DE65 PRG:1E65 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:$DE75 PRG:1E75 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:$DE85 PRG:1E85 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:$DE95 PRG:1E95 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:$DEA5 PRG:1EA5 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:$DEB5 PRG:1EB5 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:$DEC5 PRG:1EC5 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:$DED5 PRG:1ED5 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:$DEE5 PRG:1EE5 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:$DEF5 PRG:1EF5 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:$DF05 PRG:1F05 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:$DF15 PRG:1F15 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:$DF25 PRG:1F25 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:$DF35 PRG:1F35 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:$DF45 PRG:1F45 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:$DF55 PRG:1F55 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:$DF65 PRG:1F65 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:$DF75 PRG:1F75 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:$DF85 PRG:1F85 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:$DF95 PRG:1F95 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:$DFA5 PRG:1FA5 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:$DFB5 PRG:1FB5 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:$DFC5 PRG:1FC5 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:$DFD5 PRG:1FD5 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:$DFE5 PRG:1FE5 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:$DFF5 PRG:1FF5 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:$E005 PRG:2005 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:$E015 PRG:2015 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:$E025 PRG:2025 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:$E035 PRG:2035 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:$E045 PRG:2045 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:$E055 PRG:2055 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:$E065 PRG:2065 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:$E075 PRG:2075 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:$E085 PRG:2085 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:$E095 PRG:2095 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:$E0A5 PRG:20A5 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:$E0B5 PRG:20B5 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:$E0C5 PRG:20C5 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:$E0D5 PRG:20D5 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:$E0E5 PRG:20E5 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:$E0F5 PRG:20F5 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:$E105 PRG:2105 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:$E115 PRG:2115 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:$E125 PRG:2125 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:$E135 PRG:2135 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:$E145 PRG:2145 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:$E155 PRG:2155 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:$E165 PRG:2165 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:$E175 PRG:2175 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:$E185 PRG:2185 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:$E195 PRG:2195 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:$E1A5 PRG:21A5 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:$E1B5 PRG:21B5 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:$E1C5 PRG:21C5 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:$E1D5 PRG:21D5 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:$E1E5 PRG:21E5 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:$E1F5 PRG:21F5 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:$E205 PRG:2205 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:$E215 PRG:2215 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:$E225 PRG:2225 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:$E235 PRG:2235 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:$E245 PRG:2245 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:$E255 PRG:2255 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:$E265 PRG:2265 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:$E275 PRG:2275 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:$E285 PRG:2285 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:$E295 PRG:2295 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:$E2A5 PRG:22A5 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:$E2B5 PRG:22B5 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:$E2C5 PRG:22C5 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:$E2D5 PRG:22D5 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:$E2E5 PRG:22E5 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:$E2F5 PRG:22F5 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:$E305 PRG:2305 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:$E315 PRG:2315 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:$E325 PRG:2325 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:$E335 PRG:2335 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:$E345 PRG:2345 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:$E355 PRG:2355 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:$E365 PRG:2365 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:$E375 PRG:2375 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:$E385 PRG:2385 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:$E395 PRG:2395 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:$E3A5 PRG:23A5 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:$E3B5 PRG:23B5 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:$E3C5 PRG:23C5 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:$E3D5 PRG:23D5 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:$E3E5 PRG:23E5 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:$E3F5 PRG:23F5 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:$E405 PRG:2405 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:$E415 PRG:2415 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:$E425 PRG:2425 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:$E435 PRG:2435 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:$E445 PRG:2445 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:$E455 PRG:2455 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:$E465 PRG:2465 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:$E475 PRG:2475 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:$E485 PRG:2485 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:$E495 PRG:2495 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:$E4A5 PRG:24A5 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:$E4B5 PRG:24B5 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:$E4C5 PRG:24C5 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:$E4D5 PRG:24D5 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:$E4E5 PRG:24E5 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:$E4F5 PRG:24F5 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:$E505 PRG:2505 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:$E515 PRG:2515 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:$E525 PRG:2525 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:$E535 PRG:2535 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:$E545 PRG:2545 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:$E555 PRG:2555 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:$E565 PRG:2565 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:$E575 PRG:2575 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:$E585 PRG:2585 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:$E595 PRG:2595 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:$E5A5 PRG:25A5 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:$E5B5 PRG:25B5 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:$E5C5 PRG:25C5 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:$E5D5 PRG:25D5 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:$E5E5 PRG:25E5 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:$E5F5 PRG:25F5 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:$E605 PRG:2605 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:$E615 PRG:2615 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:$E625 PRG:2625 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:$E635 PRG:2635 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:$E645 PRG:2645 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:$E655 PRG:2655 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:$E665 PRG:2665 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:$E675 PRG:2675 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:$E685 PRG:2685 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:$E695 PRG:2695 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:$E6A5 PRG:26A5 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:$E6B5 PRG:26B5 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:$E6C5 PRG:26C5 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:$E6D5 PRG:26D5 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:$E6E5 PRG:26E5 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:$E6F5 PRG:26F5 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:$E705 PRG:2705 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:$E715 PRG:2715 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:$E725 PRG:2725 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:$E735 PRG:2735 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:$E745 PRG:2745 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:$E755 PRG:2755 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:$E765 PRG:2765 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:$E775 PRG:2775 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:$E785 PRG:2785 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:$E795 PRG:2795 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:$E7A5 PRG:27A5 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:$E7B5 PRG:27B5 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:$E7C5 PRG:27C5 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:$E7D5 PRG:27D5 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:$E7E5 PRG:27E5 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:$E7F5 PRG:27F5 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:$E805 PRG:2805 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:$E815 PRG:2815 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:$E825 PRG:2825 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:$E835 PRG:2835 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:$E845 PRG:2845 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:$E855 PRG:2855 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:$E865 PRG:2865 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:$E875 PRG:2875 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:$E885 PRG:2885 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:$E895 PRG:2895 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:$E8A5 PRG:28A5 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:$E8B5 PRG:28B5 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:$E8C5 PRG:28C5 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:$E8D5 PRG:28D5 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:$E8E5 PRG:28E5 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:$E8F5 PRG:28F5 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:$E905 PRG:2905 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:$E915 PRG:2915 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:$E925 PRG:2925 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:$E935 PRG:2935 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:$E945 PRG:2945 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:$E955 PRG:2955 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:$E965 PRG:2965 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:$E975 PRG:2975 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:$E985 PRG:2985 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:$E995 PRG:2995 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:$E9A5 PRG:29A5 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:$E9B5 PRG:29B5 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:$E9C5 PRG:29C5 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:$E9D5 PRG:29D5 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:$E9E5 PRG:29E5 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:$E9F5 PRG:29F5 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:$EA05 PRG:2A05 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:$EA15 PRG:2A15 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:$EA25 PRG:2A25 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:$EA35 PRG:2A35 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:$EA45 PRG:2A45 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:$EA55 PRG:2A55 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:$EA65 PRG:2A65 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:$EA75 PRG:2A75 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:$EA85 PRG:2A85 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:$EA95 PRG:2A95 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:$EAA5 PRG:2AA5 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:$EAB5 PRG:2AB5 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:$EAC5 PRG:2AC5 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:$EAD5 PRG:2AD5 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:$EAE5 PRG:2AE5 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:$EAF5 PRG:2AF5 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:$EB05 PRG:2B05 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:$EB15 PRG:2B15 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:$EB25 PRG:2B25 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:$EB35 PRG:2B35 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:$EB45 PRG:2B45 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:$EB55 PRG:2B55 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:$EB65 PRG:2B65 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:$EB75 PRG:2B75 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:$EB85 PRG:2B85 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:$EB95 PRG:2B95 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:$EBA5 PRG:2BA5 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:$EBB5 PRG:2BB5 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:$EBC5 PRG:2BC5 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:$EBD5 PRG:2BD5 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:$EBE5 PRG:2BE5 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:$EBF5 PRG:2BF5 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:$EC05 PRG:2C05 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:$EC15 PRG:2C15 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:$EC25 PRG:2C25 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:$EC35 PRG:2C35 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:$EC45 PRG:2C45 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:$EC55 PRG:2C55 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:$EC65 PRG:2C65 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:$EC75 PRG:2C75 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:$EC85 PRG:2C85 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:$EC95 PRG:2C95 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:$ECA5 PRG:2CA5 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:$ECB5 PRG:2CB5 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:$ECC5 PRG:2CC5 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:$ECD5 PRG:2CD5 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:$ECE5 PRG:2CE5 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:$ECF5 PRG:2CF5 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:$ED05 PRG:2D05 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:$ED15 PRG:2D15 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:$ED25 PRG:2D25 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:$ED35 PRG:2D35 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:$ED45 PRG:2D45 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:$ED55 PRG:2D55 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:$ED65 PRG:2D65 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:$ED75 PRG:2D75 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:$ED85 PRG:2D85 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:$ED95 PRG:2D95 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:$EDA5 PRG:2DA5 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:$EDB5 PRG:2DB5 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:$EDC5 PRG:2DC5 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:$EDD5 PRG:2DD5 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:$EDE5 PRG:2DE5 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:$EDF5 PRG:2DF5 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:$EE05 PRG:2E05 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:$EE15 PRG:2E15 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:$EE25 PRG:2E25 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:$EE35 PRG:2E35 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:$EE45 PRG:2E45 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:$EE55 PRG:2E55 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:$EE65 PRG:2E65 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:$EE75 PRG:2E75 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:$EE85 PRG:2E85 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:$EE95 PRG:2E95 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:$EEA5 PRG:2EA5 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:$EEB5 PRG:2EB5 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:$EEC5 PRG:2EC5 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:$EED5 PRG:2ED5 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:$EEE5 PRG:2EE5 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:$EEF5 PRG:2EF5 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:$EF05 PRG:2F05 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:$EF15 PRG:2F15 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:$EF25 PRG:2F25 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:$EF35 PRG:2F35 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:$EF45 PRG:2F45 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:$EF55 PRG:2F55 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:$EF65 PRG:2F65 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:$EF75 PRG:2F75 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:$EF85 PRG:2F85 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:$EF95 PRG:2F95 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:$EFA5 PRG:2FA5 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:$EFB5 PRG:2FB5 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:$EFC5 PRG:2FC5 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:$EFD5 PRG:2FD5 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:$EFE5 PRG:2FE5 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:$EFF5 PRG:2FF5 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:$F005 PRG:3005 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:$F015 PRG:3015 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:$F025 PRG:3025 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:$F035 PRG:3035 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:$F045 PRG:3045 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:$F055 PRG:3055 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:$F065 PRG:3065 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:$F075 PRG:3075 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:$F085 PRG:3085 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:$F095 PRG:3095 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:$F0A5 PRG:30A5 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:$F0B5 PRG:30B5 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:$F0C5 PRG:30C5 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:$F0D5 PRG:30D5 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:$F0E5 PRG:30E5 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:$F0F5 PRG:30F5 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:$F105 PRG:3105 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:$F115 PRG:3115 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:$F125 PRG:3125 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:$F135 PRG:3135 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:$F145 PRG:3145 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:$F155 PRG:3155 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:$F165 PRG:3165 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:$F175 PRG:3175 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:$F185 PRG:3185 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:$F195 PRG:3195 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:$F1A5 PRG:31A5 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:$F1B5 PRG:31B5 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:$F1C5 PRG:31C5 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:$F1D5 PRG:31D5 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:$F1E5 PRG:31E5 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:$F1F5 PRG:31F5 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:$F205 PRG:3205 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:$F215 PRG:3215 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:$F225 PRG:3225 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:$F235 PRG:3235 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:$F245 PRG:3245 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:$F255 PRG:3255 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:$F265 PRG:3265 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:$F275 PRG:3275 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:$F285 PRG:3285 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:$F295 PRG:3295 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:$F2A5 PRG:32A5 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:$F2B5 PRG:32B5 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:$F2C5 PRG:32C5 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:$F2D5 PRG:32D5 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:$F2E5 PRG:32E5 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:$F2F5 PRG:32F5 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:$F305 PRG:3305 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:$F315 PRG:3315 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:$F325 PRG:3325 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:$F335 PRG:3335 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:$F345 PRG:3345 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:$F355 PRG:3355 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:$F365 PRG:3365 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:$F375 PRG:3375 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:$F385 PRG:3385 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:$F395 PRG:3395 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:$F3A5 PRG:33A5 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:$F3B5 PRG:33B5 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:$F3C5 PRG:33C5 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:$F3D5 PRG:33D5 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:$F3E5 PRG:33E5 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:$F3F5 PRG:33F5 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:$F405 PRG:3405 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:$F415 PRG:3415 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:$F425 PRG:3425 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:$F435 PRG:3435 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:$F445 PRG:3445 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:$F455 PRG:3455 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:$F465 PRG:3465 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:$F475 PRG:3475 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:$F485 PRG:3485 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:$F495 PRG:3495 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:$F4A5 PRG:34A5 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:$F4B5 PRG:34B5 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:$F4C5 PRG:34C5 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:$F4D5 PRG:34D5 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:$F4E5 PRG:34E5 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:$F4F5 PRG:34F5 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:$F505 PRG:3505 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:$F515 PRG:3515 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:$F525 PRG:3525 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:$F535 PRG:3535 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:$F545 PRG:3545 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:$F555 PRG:3555 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:$F565 PRG:3565 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:$F575 PRG:3575 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:$F585 PRG:3585 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:$F595 PRG:3595 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:$F5A5 PRG:35A5 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:$F5B5 PRG:35B5 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:$F5C5 PRG:35C5 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:$F5D5 PRG:35D5 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:$F5E5 PRG:35E5 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:$F5F5 PRG:35F5 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:$F605 PRG:3605 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:$F615 PRG:3615 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:$F625 PRG:3625 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:$F635 PRG:3635 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:$F645 PRG:3645 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:$F655 PRG:3655 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:$F665 PRG:3665 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:$F675 PRG:3675 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:$F685 PRG:3685 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:$F695 PRG:3695 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:$F6A5 PRG:36A5 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:$F6B5 PRG:36B5 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:$F6C5 PRG:36C5 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:$F6D5 PRG:36D5 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:$F6E5 PRG:36E5 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:$F6F5 PRG:36F5 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:$F705 PRG:3705 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:$F715 PRG:3715 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:$F725 PRG:3725 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:$F735 PRG:3735 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:$F745 PRG:3745 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:$F755 PRG:3755 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:$F765 PRG:3765 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:$F775 PRG:3775 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:$F785 PRG:3785 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:$F795 PRG:3795 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:$F7A5 PRG:37A5 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:$F7B5 PRG:37B5 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:$F7C5 PRG:37C5 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:$F7D5 PRG:37D5 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:$F7E5 PRG:37E5 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:$F7F5 PRG:37F5 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:$F805 PRG:3805 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:$F815 PRG:3815 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:$F825 PRG:3825 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:$F835 PRG:3835 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:$F845 PRG:3845 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:$F855 PRG:3855 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:$F865 PRG:3865 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:$F875 PRG:3875 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:$F885 PRG:3885 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:$F895 PRG:3895 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:$F8A5 PRG:38A5 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:$F8B5 PRG:38B5 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:$F8C5 PRG:38C5 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:$F8D5 PRG:38D5 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:$F8E5 PRG:38E5 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:$F8F5 PRG:38F5 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:$F905 PRG:3905 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:$F915 PRG:3915 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:$F925 PRG:3925 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:$F935 PRG:3935 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:$F945 PRG:3945 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:$F955 PRG:3955 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:$F965 PRG:3965 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:$F975 PRG:3975 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:$F985 PRG:3985 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:$F995 PRG:3995 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:$F9A5 PRG:39A5 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:$F9B5 PRG:39B5 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:$F9C5 PRG:39C5 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:$F9D5 PRG:39D5 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:$F9E5 PRG:39E5 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:$F9F5 PRG:39F5 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:$FA05 PRG:3A05 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:$FA15 PRG:3A15 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:$FA25 PRG:3A25 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:$FA35 PRG:3A35 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:$FA45 PRG:3A45 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:$FA55 PRG:3A55 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:$FA65 PRG:3A65 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:$FA75 PRG:3A75 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:$FA85 PRG:3A85 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:$FA95 PRG:3A95 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:$FAA5 PRG:3AA5 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:$FAB5 PRG:3AB5 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:$FAC5 PRG:3AC5 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:$FAD5 PRG:3AD5 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:$FAE5 PRG:3AE5 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:$FAF5 PRG:3AF5 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:$FB05 PRG:3B05 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:$FB15 PRG:3B15 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:$FB25 PRG:3B25 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:$FB35 PRG:3B35 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:$FB45 PRG:3B45 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:$FB55 PRG:3B55 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:$FB65 PRG:3B65 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:$FB75 PRG:3B75 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:$FB85 PRG:3B85 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:$FB95 PRG:3B95 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:$FBA5 PRG:3BA5 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:$FBB5 PRG:3BB5 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:$FBC5 PRG:3BC5 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:$FBD5 PRG:3BD5 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:$FBE5 PRG:3BE5 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:$FBF5 PRG:3BF5 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:$FC05 PRG:3C05 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:$FC15 PRG:3C15 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:$FC25 PRG:3C25 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:$FC35 PRG:3C35 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:$FC45 PRG:3C45 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:$FC55 PRG:3C55 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:$FC65 PRG:3C65 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:$FC75 PRG:3C75 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:$FC85 PRG:3C85 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:$FC95 PRG:3C95 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:$FCA5 PRG:3CA5 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:$FCB5 PRG:3CB5 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:$FCC5 PRG:3CC5 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:$FCD5 PRG:3CD5 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:$FCE5 PRG:3CE5 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:$FCF5 PRG:3CF5 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:$FD05 PRG:3D05 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:$FD15 PRG:3D15 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:$FD25 PRG:3D25 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:$FD35 PRG:3D35 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:$FD45 PRG:3D45 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:$FD55 PRG:3D55 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:$FD65 PRG:3D65 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:$FD75 PRG:3D75 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:$FD85 PRG:3D85 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:$FD95 PRG:3D95 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:$FDA5 PRG:3DA5 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:$FDB5 PRG:3DB5 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:$FDC5 PRG:3DC5 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:$FDD5 PRG:3DD5 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:$FDE5 PRG:3DE5 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:$FDF5 PRG:3DF5 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:$FE05 PRG:3E05 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:$FE15 PRG:3E15 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:$FE25 PRG:3E25 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:$FE35 PRG:3E35 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:$FE45 PRG:3E45 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:$FE55 PRG:3E55 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:$FE65 PRG:3E65 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:$FE75 PRG:3E75 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:$FE85 PRG:3E85 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:$FE95 PRG:3E95 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:$FEA5 PRG:3EA5 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:$FEB5 PRG:3EB5 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:$FEC5 PRG:3EC5 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:$FED5 PRG:3ED5 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:$FEE5 PRG:3EE5 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:$FEF5 PRG:3EF5 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:$FF05 PRG:3F05 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:$FF15 PRG:3F15 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:$FF25 PRG:3F25 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:$FF35 PRG:3F35 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:$FF45 PRG:3F45 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:$FF55 PRG:3F55 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:$FF65 PRG:3F65 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:$FF75 PRG:3F75 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:$FF85 PRG:3F85 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:$FF95 PRG:3F95 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:$FFA5 PRG:3FA5 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:$FFB5 PRG:3FB5 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:$FFC5 PRG:3FC5 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:$FFD5 PRG:3FD5 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:$FFE5 PRG:3FE5 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF + .byte $FF, $FF, $FF, $FF, $FF ; CPU:$FFF5 PRG:3FF5 FF FF FF FF FF + +ResetVectors: +; Reset/NMI/IRQ vectors - 6 bytes +; ---- $FFFA-$FFFF (6 bytes) ---- + .byte $F7, $CC, $00, $C0, $00, $C0 ; CPU:$FFFA PRG:3FFA F7 CC 00 C0 00 C0 + diff --git a/Joypad Test Cartridge (U)/copilot/reconstructed.lbl b/Joypad Test Cartridge (U)/copilot/reconstructed.lbl index 9bb01a9..5baa474 100644 --- a/Joypad Test Cartridge (U)/copilot/reconstructed.lbl +++ b/Joypad Test Cartridge (U)/copilot/reconstructed.lbl @@ -1,35 +1,202 @@ -al 00CE89 .Label_CE89 -al 00CE6E .Label_CE6E -al 00CE5F .Label_CE5F -al 00CE8A .Label_CE8A +al 00CF05 .VramOpReturn +al 00CEF3 .VramOpLengthCheck +al 00CEC9 .VramOpDataStream +al 00CEB2 .StoreVramOpResult +al 00CE98 .DispatchVramOp +al 00CE89 .VramBurstSkipRun +al 00CE6E .VramBurstWriteNext +al 00CE5F .VramBurstWriteChunk +al 00CE8A .VramBurstNextCommand al 00CE4F .VramBurstWrite al 00CE3C .PpuScrollLatch -al 00CE33 .Label_CE33 -al 00CE39 .Label_CE39 -al 00CE16 .Label_CE16 -al 00CE12 .Label_CE12 +al 00CE33 .WriteVramByteStream +al 00CE39 .VramWriteDone +al 00CE16 .WriteVramZeroFill +al 00CE12 .VramWriteSetup al 00CDEE .VramWrite al 00CDC8 .RetAddrUpdate -al 00CDB1 .Label_CDB1 -al 00CDA3 .Label_CDA3 +al 00CDB1 .HandleJmpOpcode +al 00CDA3 .HandlePpuCtrlOpcode al 00CD99 .VramPtrTableRead -al 00CD8D .Label_CD8D -al 00CD74 .Label_CD74 -al 00CD71 .Label_CD71 -al 00CD6E .Label_CD6E -al 00CD69 .Label_CD69 -al 00CD5C .Label_CD5C +al 00CD8D .AdvanceVramPointerByY +al 00CD74 .WriteVramStreamByte +al 00CD71 .AdvanceVramReadIndex +al 00CD6E .ComputeVramByteCount +al 00CD69 .ReturnFromVramPtrWrite +al 00CD5C .WritePpuCtrlFromShadow al 00CD45 .VramWriteLoop al 00CD3F .VramPtrWrite +al 00CD39 .EnableSpritesAndBackground +al 00CD33 .WritePpuMask al 00CD2F .PpuMaskSetup al 00CD24 .OamDmaSetup al 00CD17 .PpuCtrlSetup al 00CD0A .NmiContinue al 00CCF7 .NmiHandler -al 00C178 .Label_C178 -al 00C174 .ClearOAM_Routine -al 00C05D .ClearRAM2_Loop -al 00C013 .ClearRAM1_Loop +al 00CCF2 .WaitForNmiComplete +al 00CCE2 .WaitForVblank +al 00CCDA .LatchPreviousDiagonalState +al 00CCE1 .ReturnFromStickDecode +al 00CCCC .LatchPreviousStickState +al 00CCD4 .CheckStickDiagonal +al 00CCC4 .CheckStickRight +al 00CCB8 .CheckStickLeft +al 00CCAC .CheckStickDown +al 00CCA0 .CheckStickUp +al 00CC81 .ReadControllerBitsAlt2Loop +al 00CC7F .ReadControllerBitsAlt2Init +al 00CC6E .ReadControllerBitsAltLoop +al 00CC6C .ReadControllerBitsAltInit +al 00CC5B .PollExpansionPortLoop +al 00CC59 .PollExpansionPortInit +al 00CC4F .LatchControllerStrobeAlt +al 00CC46 .CopyOamShadowLoop +al 00CC18 .WriteOamFromButtonState +al 00CC11 .ReadControllerBitSingle +al 00CC04 .ReadControllerBitsLoop +al 00CC02 .ReadControllerBitsInit +al 00CBF8 .LatchControllerStrobe +al 00CBF5 .ExitToInit70 +al 00CBF2 .ContinueTestMode70 +al 00CBE6 .CheckFrameCounterLimit70 +al 00CBE0 .IncrementFrameCounter70 +al 00CBC0 .UpdateOamTestMode70 +al 00CBB1 .CheckButtonsTestMode70 +al 00CBAB .UpdateMarkersAndTimers70 +al 00CB9A .MainLoopTestMode70 +al 00CB5D .CopyOamFromTable70 +al 00CB16 .ClearRamPass4Loop +al 00CB0A .WriteRamPattern70Loop +al 00CB03 .InitTestScreen70 +al 00CB00 .ShiftButtonBit8Done +al 00CAF7 .ShiftButtonBit7 +al 00CAEE .ShiftButtonBit6 +al 00CAE5 .ShiftButtonBit5 +al 00CADC .ShiftButtonBit4 +al 00CAD3 .ShiftButtonBit3 +al 00CACA .ShiftButtonBit2 +al 00CAC1 .ShiftButtonBit1 +al 00CAB8 .ShiftButtonBit0 +al 00CAB1 .ResetButtonTimers +al 00CA8A .ResetButtonMarkerState +al 00CA89 .MarkerUpdate12_Return +al 00CA7D .MarkerUpdate12_Low +al 00CA6B .MarkerUpdate12_Mid +al 00CA56 .MarkerUpdate12_High +al 00CA16 .MarkerUpdate12 +al 00CA0A .MarkerUpdate11_Low +al 00C9F8 .MarkerUpdate11_Mid +al 00C9E3 .MarkerUpdate11_High +al 00C9A3 .MarkerUpdate11 +al 00C997 .MarkerUpdate10_Low +al 00C985 .MarkerUpdate10_Mid +al 00C970 .MarkerUpdate10_High +al 00C930 .MarkerUpdate10 +al 00C924 .MarkerUpdate9_Low +al 00C912 .MarkerUpdate9_Mid +al 00C8FD .MarkerUpdate9_High +al 00C8BD .MarkerUpdate9 +al 00C8B1 .MarkerUpdate8_Low +al 00C89F .MarkerUpdate8_Mid +al 00C88A .MarkerUpdate8_High +al 00C84A .MarkerUpdate8 +al 00C83E .MarkerUpdate7_Low +al 00C82C .MarkerUpdate7_Mid +al 00C817 .MarkerUpdate7_High +al 00C7D7 .MarkerUpdate7 +al 00C7D6 .MarkerUpdate6_Return +al 00C7CA .MarkerUpdate6_Low +al 00C7B8 .MarkerUpdate6_Mid +al 00C7A3 .MarkerUpdate6_High +al 00C763 .MarkerUpdate6 +al 00C757 .MarkerUpdate5_Low +al 00C745 .MarkerUpdate5_Mid +al 00C730 .MarkerUpdate5_High +al 00C6F0 .MarkerUpdate5 +al 00C6E4 .MarkerUpdate4_Low +al 00C6D2 .MarkerUpdate4_Mid +al 00C6BD .MarkerUpdate4_High +al 00C67D .MarkerUpdate4 +al 00C671 .MarkerUpdate3_Low +al 00C65F .MarkerUpdate3_Mid +al 00C64A .MarkerUpdate3_High +al 00C60A .MarkerUpdate3 +al 00C5FE .MarkerUpdate2_Low +al 00C5EC .MarkerUpdate2_Mid +al 00C5D7 .MarkerUpdate2_High +al 00C597 .MarkerUpdate2 +al 00C58B .MarkerUpdate1_Low +al 00C579 .MarkerUpdate1_Mid +al 00C564 .MarkerUpdate1_High +al 00C524 .MarkerUpdate1 +al 00C523 .ReturnFromPrepareButtonOam +al 00C520 .CallPrepareButtonOam +al 00C4FC .HandleButtonPress8 +al 00C50A .FinishButtonDispatch +al 00C4D4 .HandleButtonPress7 +al 00C4E2 .ButtonBit12_Test +al 00C4AC .HandleButtonPress6 +al 00C4BA .ButtonBit11_Test +al 00C484 .HandleButtonPress5 +al 00C492 .ButtonBit10_Test +al 00C45C .HandleButtonPress4 +al 00C46A .ButtonBit9_Test +al 00C43C .ButtonBit8_Test +al 00C42F .ButtonBit7_Test +al 00C40D .HandleButtonPress3 +al 00C41B .ButtonBit6_Test +al 00C3E5 .HandleButtonPress2 +al 00C3F3 .ButtonBit5_Test +al 00C3C7 .ButtonBit4_Test +al 00C3BC .ButtonBit3_Test +al 00C39C .HandleButtonPress1 +al 00C3AA .ButtonBit2_Test +al 00C380 .ButtonBit1_Test +al 00C377 .ButtonBit0_Test +al 00C361 .DispatchButtonBits +al 00C35E .ExitToInitAlt +al 00C356 .SetBurstWriteIndex +al 00C34A .CheckFrameCounterLimitAlt +al 00C344 .IncrementFrameCounterAlt +al 00C315 .UpdateOamFromButtons +al 00C2FE .CheckAnyButtonHeld +al 00C2F5 .UpdateAllButtonMarkers +al 00C2E4 .PollControllerCountFrames +al 00C2A7 .CopyOamFromTable +al 00C252 .ClearRamPass3Loop +al 00C246 .WriteRamPatternLoop +al 00C23F .InitTestScreen88 +al 00C21A .FillOamShadowLoop +al 00C210 .ResetButtonStateAndOam +al 00C1FD .ReadButtonBitUpdateOam +al 00C1F4 .CopyButtonOamLoop +al 00C1EE .PrepareButtonOam +al 00C1CC .UpdateAllOamEntries +al 00C1AD .ScanAllControllerBits +al 00C1A2 .CopySpriteTemplateLoop +al 00C1A0 .CopySpriteTemplateTable +al 00C18F .SampleControllerKeepXAlt +al 00C17F .SampleControllerKeepX +al 00C178 .ClearOamLoop +al 00C174 .ClearOam +al 00C15C .ApplyMarkerValueEnableAudio +al 00C157 .LoadMarkerValue70 +al 00C152 .LoadMarkerValueA0 +al 00C14D .LoadMarkerValue88 +al 00C126 .ExitToInit +al 00C12F .EnterTestMode88 +al 00C129 .EnterTestMode70 +al 00C10E .RestartInit +al 00C10B .ContinueFrame +al 00C0FF .CheckFrameCounterLimit +al 00C0F9 .IncrementFrameCounter +al 00C111 .DispatchOnMarkerValue +al 00C135 .UpdateButtonMarker +al 00C0E7 .PollControllerShiftRegister +al 00C0DF .MainGameLoop +al 00C05D .ClearRamPass2Loop +al 00C055 .InitTestScreen +al 00C013 .ClearRamPass1Loop al 00C00A .WaitVblank3 al 00C005 .WaitVblank2 al 00C000 .Reset diff --git a/_wip/MUSCLE (U)/M.U.S.C.L.E. (U).nes b/MUSCLE (U)/M.U.S.C.L.E. (U).nes similarity index 100% rename from _wip/MUSCLE (U)/M.U.S.C.L.E. (U).nes rename to MUSCLE (U)/M.U.S.C.L.E. (U).nes diff --git a/MUSCLE (U)/OVERVIEW.md b/MUSCLE (U)/OVERVIEW.md new file mode 100644 index 0000000..9e5367c --- /dev/null +++ b/MUSCLE (U)/OVERVIEW.md @@ -0,0 +1,499 @@ +# MUSCLE (U) — Pass 3 (data names and structures) + +ROM: `MUSCLE (U)/M.U.S.C.L.E. (U).nes` (24,592 bytes, iNES). Status: **PASS 3 COMPLETE — +byte-identical, including the bytecode VM layer.** All three passes are done: Pass 1 split code from data, Pass 2 replaced every +`Label_XXXX` and 87 zero-page aliases, Pass 3 named and structured every data region, finished the +routine descriptions, and resolved the reused zero page and the unreachable stubs. + +`make regen` in `copilot/` replays Pass 1 → Pass 3 from `prg.bin` and is byte-for-byte +reproducible. Every instruction still carries its `; CPU:$xxxx PRG:xxxx AA BB` audit comment, so +none of this touched a byte. + +| | Result | +|---|---| +| Code | 10,634 bytes (5,253 instructions) across 705 routines — 0 `Label_XXXX` remaining | +| Data | 5,750 bytes across 69 named regions — 0 unlabelled blocks | +| Structured tables | 127 `.word` entries emitted one per line with their resolved target | +| Routine descriptions | 0 boilerplate `; Global:` lines remaining (94 hand-written, 606 generated from call sites) | +| Zero page | 163 aliases: 89 named, 1 reused byte carrying two names, 73 `ZpXX` | +| Build | **Byte-identical ROM verified.** | + +## ROM Facts + +| Property | Value | +|----------|-------| +| Mapper | 0 (NROM) | +| PRG | 16 KB, mapped **low** at $8000–$BFFF (mirrored to $C000–$FFFF) | +| CHR | 8 KB | +| Mirroring | Horizontal (header byte 6 = $01) | +| Battery / trainer | none | +| ROM SHA-256 | `d3da17f2b67d517e4d519659407d6f0e3cd7a2a4d89d31da6bb2727afce798dd` | +| PRG SHA-256 | `c9061b6d3d06f56e3c2f89337d8e59c159f494ff9efad50852fcd19621f0b03e` | + +**The skeleton's `$C000` assumption was wrong.** A 16 KB NROM PRG is normally mirrored from +`$C000`, but the RESET vector is `$8000`, so this image is wired to `$8000` and every address in +the source (and in `linker.cfg`) is `$8000`-based. The CPU still fetches the vectors from the +mirror at `$FFFA`, which is why `InterruptVectors` is the last six bytes of the PRG. + +## Interrupt Vectors (PRG $3FFA–$3FFF) + +| Vector | Target | Note | +|--------|--------|------| +| NMI | `$86CB` (`NmiHandler`) | the entire per-frame update; see flow below | +| RESET | `$8000` (`Reset`) | confirms the low mapping | +| IRQ | `$8764` (`IrqHandler`) | a single `RTI`, shared with the NMI epilogue; see below | + +## Power-On Flow + +`Reset` ($8000): + +1. `sei`, `ldx #$FF`, `stx $0320`, `txs` — X points the stack at the top of page 1 and `$0320` + is set to $FF as the "an NMI already fired during init" latch. +2. Two `lda $2002 / bpl` spin loops blank the PPU and confirm vblank. Each write is followed by a + `nop` before its poll ($800D, $8018) — the align-before-read habit of the original assembler. +3. `$4017 = $40` (APU frame counter IRQ inhibit), `$4010 = 0`, and zero the DMC address/length pair + at zero page `$FA`/`$FB` (the same two bytes the controller reader later reuses). +4. Clear `$0326`, `$032B`, `$032C`, zero page `$FF`, then fill `$0300-$032C` with zero. +5. Set `SourcePointerLo/Hi = $9E/$B8` and `DestinationPointerLo/Hi = $00/$04`, then run + `UpdateNametableFromStream`, which decodes the compressed nametable into $0400. +6. If the stream actually changed VRAM, latch the tighter scroll bound into `$0328-$032A`, reset the + frame counters to 0/1/2/3, and fall into `StartStageSequence`. + +`NmiHandler` ($86CB): + +1. Push A, X, Y in that order. +2. `lda $0320 / beq $86D8 / jmp $8759`. Reset leaves `$0320 = $FF`, so the **first** NMI skips the + frame update entirely; from then on `$0320` is cleared each frame (see 6) and this is a + fall-through. +3. Set `$0320 = $FF` and bump the 16-bit `FrameCounterLo/Hi` in zero page `$24`/`$25`. +4. `$2001 = 0` (blank rendering), `$2003 = 0`, `$4014 = $02` — OAM DMA from `$0200`. +5. Dispatch on the game state at `$0322`: zero goes to the `SubModeFlag` test, negative jumps to + the object-list housekeeping at `$86AD`, positive falls into `UpdateRoundLogic`. The branches + call `PollControllerAndAdvance`, `UpdateStageActors`, `UpdateObjectCollisions`, + `RunGameStateDispatcher`, `BuildOamList` and `PlayDeathSequence` in turn. +6. `FinishNmiUpdates` ($8751): `lda $0321 / bne $8759` — the `$0320` latch is cleared **only** when + `$0321` is zero, so a frame that requested continued work stays latched. Then `lda $2002` to + release the PPU address latch, `jsr UpdateSoundFrame`, and `pla/tay/pla/tax/pla`. + +**The IRQ vector word is the NMI epilogue's `RTI`.** After the three `pla`s the next byte is +`$8764`, which is both `IrqHandler` and the `rti` that ends every NMI — one `RTI` serving two +vectors. The game never re-enables interrupts, so the IRQ is unreachable in practice. + +## Architecture: this ROM dispatches by jump table, not by direct call + +A plain recursive trace from the vectors reaches only 50.6% of the PRG. The gap is **not** dead +code — it is reached through four dispatch tables and two zero-page indirect jumps that a static +descender cannot follow. Resolving them took code coverage to **64.9%**. + +| Mechanism | Location | Size | Index | +|-----------|----------|------|-------| +| `BytecodeProgramPointerTable` | `$8CEF` | 38 × 16-bit | `(token & $3F)` at `$9AD8` | +| `BytecodeHandlerTable` | `$9237` | 40 × 16-bit | `token - $C8` at `$9AF9` | +| `SecondaryBytecodeHandlerTable` | `$9F2B` | 16 × 16-bit | `(token & $0F)` at `$9F85` | +| `LevelVramWriterTable` | `$AC35` | 3 × 16-bit | the level byte `$0326` at `$AC28` | +| `DispatchThroughPointer` | `jmp ($001C)` at `$9B05` | — | reached from the first three tables | +| `jmp ($0010)` | `$AC32` | — | reached from `LevelVramWriterTable` | + +`RunBytecodeInterpreter` ($9AE8) reads a token through `(BytecodeStreamPointerLo),y`; tokens +`$C8`–`$EF` are converted to a handler address and dispatched through `jmp ($001C)`; everything +else is an operand consumed by the running handler. + +**The handler tables have holes.** The interpreter masks the program index with `$3F`, so +`BytecodeProgramPointerTable` is indexed 0–63 — but entry 38 already reads the first byte of +`BytecodeProgram_00`, so the table is exactly **38** entries and the caller must guarantee a +smaller index. `BytecodeHandlerTable` entries 0 and 2 hold `$928D` and `$9287`, which are the +addresses of the code immediately after the table: slots the assembler never filled. + +## Pass 3 — Data Structure + +All 69 data regions are labelled. The four composite regions from Pass 1 were split into their +real tables using the readers in decoded code: + +### `$8CEF–$9286` (1,432 bytes) → three structures + +| Region | Size | What it is | +|--------|------|------------| +| `BytecodeProgramPointerTable` `$8CEF–$8D3A` | 76 | 38 × `.word`, targets printed per entry | +| `BytecodeProgram_00` … `BytecodeProgram_36` `$8D3B–$9236` | 1,034 | the 37 distinct programs, each labelled with the table indices that reach it | +| `BytecodeHandlerTable` `$9237–$9286` | 80 | 40 × `.word` opcode handlers | + +The programs are recovered from the pointer table: sort the 38 entries, and each program runs from +one entry to the next. The two duplicate entries account for 37 distinct programs. + +### `$B0CB–$BFFF` (3,893 bytes) → eleven structures + +| Region | Size | What it is | +|--------|------|------------| +| `SoundNotePeriodTable` `$B0CB–$B0E2` | 24 | 12 × `.word` tone periods (`cmp #$0C` bounds the index) | +| `SoundNoteDurationTable` `$B0E3–$B0F2` | 16 | note durations, index `duration - $F0` | +| `ApuChannelEnableBitsSet` `$B0F3–$B0F6` | 4 | OR-ed into `ApuEnableMask`, indexed by `channel*4` | +| `ApuChannelEnableBitsClear` `$B0F7–$B0FA` | 4 | AND-ed into `ApuEnableMask`, same index | +| `StageNametableAndObjectData` `$B0FB–$B91A` + `_1` `$B971–$BD27` + `_2` `$BD2A–$BEBF` | 3,523 | the per-stage payload | +| `StageDataFiller` `$B91B–$B970` | 86 | an 86-byte `$FF` pad between stage blocks | +| `StageDataPointerLow` `$BD28–$BD29` | 2 | one base offset per player; `$32` apart | +| `StageDataTail` `$BED0–$BF8F` | 192 | tail of the stage block | +| `InitialOamAttributes` / `InitialOamTiles` `$BEC0–$BECF` | 16 | 8 entries each, `ldx #$07` | +| `VramBlockByteCounts` / `VramBlockSourceLowBytes` `$BF90–$BF9F` | 16 | 8 transfer blocks each; high byte always `$02` | +| `SoundSequenceAndLevelData` `$BFA0–$BFFA` | 91 | the `$B1A1`/`$B1B0`/`$B2B9`/`$B3B2` sequences the sound engine points at | +| `InterruptVectors` `$BFFB–$BFFF` | 5 | NMI / RESET / IRQ | + +The stage payload is reached through `StageDataPointerLow` plus the 16-bit offset the bytecode +stream carries, so no constant address indexes it and its record structure is not resolvable from +a static trace. That is recorded in the source rather than guessed at. + +### `$A5F4–$A65F` (108 bytes) → two structures + +`StageDescriptorPointerTable` ($A5F4–$A617, 18 × `.word`) and `StageDescriptorData` ($A618–$A65F). +Two readers share the table: one reads `(A & $1E)` from entry 0, the other starts at entry 9, and +entry 18 already reads descriptor text — so it is exactly 18 entries. The targets sit twelve bytes +apart ($A618, $A624, $A630, $A63C, $A648) with a final ten-byte record at $A654; each is a short +header followed by a descending run of tile indices. + +### Remaining tables + +| Region | Size | What it is | +|--------|------|------------| +| `AttributeBlockDeltaTable` `$8B7D–$8B91` | 21 | 7 × 3-byte `{source lo, source hi, destination lo}` deltas | +| `OamShadowTemplate` `$9EF4–$9F13` | 32 | the initial OAM block copied into $0300 | +| `VramRunFillValues` `$ACBD–$ACC8` | 12 | the 12 fill values the VRAM run tokens `$B8`–`$C3` select | +| `AnimationFrameCollisionBits` `$AE35–$AE44` | 16 | animation frame → collision flag bits | +| `StandaloneBytecodeProgram` … `_3` | 194 | four token programs **not** in `BytecodeProgramPointerTable` | + +## What Pass 3 settled + +**The `$14`/`$15` reuse.** These are both the 16-bit block counter for the compressed-VRAM +transfer *and* the accumulator for the collision bit flags. `locals.inc` carries both names, and +`zero_page_ranges.tsv` applies `StreamBlockCountHi` only inside `AdvanceCountWord`, so the same +byte is not mislabelled at all 53 of its other uses. This is the alias pattern `AGENTS.md` asks +for — `RandomStateAlt = $E4 beside RandomState0 = $54` — done with a range instead of a blind +rename. + +**The four hand-seeded entries are provably dead.** `$8644`, `$8653`, `$9CAD` and `$ABF7` have no +16-bit reference anywhere in the image except `jsr $8644` at `$8654`, and none of them appears in +either bytecode handler table. They are kept as code — `rts`-terminated and register-plausible — +but their headers now say so explicitly rather than leaving a reader to wonder. + +**`$AF37–$AF3A` stays data.** `lda $E9 / bne $AF34` sits right after the `rts` that ends +`InitializeSoundEngine` and branches back into the middle of it. Unreachable, incoherent as a +routine, and referenced by nothing. It is labelled `UnreachableSoundInitIsland` so the decision is +visible. + +**Every routine header now says something.** The 94 subsystem routines keep hand-written +descriptions; the other 606 get a generated line naming the routine and its visible call sites, +which is factual. Nothing still reads "Contextual control-flow entry identified from its parent +routine". + +## `copilot/` Contents + +| File | Purpose | +|------|---------| +| `rom.nes` | symlink to `../M.U.S.C.L.E. (U).nes` | +| `prg.bin` / `header.bin` / `chr.bin` | split image (`_tools/splitnes.py`) | +| `prg.s` | fully classified and named PRG source (12,922 lines) | +| `header.s` / `chr.s` | `incbin` of the untouched header and CHR | +| `symbols.inc` | shared NES hardware constants | +| `locals.inc` | 163 zero-page aliases with read/write counts and referencing addresses | +| `routine_names.tsv` | Pass 2 routine names (address → name) | +| `label_names.tsv` | generated: the full `Label_XXXX` → final name map | +| `zero_page_names.tsv` | Pass 2 zero-page names with usage notes | +| `zero_page_ranges.tsv` | Pass 3 range-scoped names for reused bytes | +| `data_regions.tsv` | Pass 3 data-region labels, record formats and notes | +| `routine_purposes.tsv` | the 94 hand-written `; Global:` descriptions | +| `linker.cfg` | HEADER at $0000, PRG at **$8000**, CHR at $0000 | +| `Makefile` | `all` builds and byte-compares; `pass1` / `pass2` / `pass3` / `regen` regenerate | + +## Build + +```bash +cd "MUSCLE (U)/copilot" +make # header.o + prg.o + chr.o -> reconstructed.nes, cmp vs rom.nes +# "Byte-identical ROM verified." +make pass1 # re-run _tools/nesdis.py with the recorded classification flags +make pass2 # pass1 + naming + descriptions + data structuring + locals.inc +make pass3 # pass2 + _tools/bytecode_dis.py token listings over the 42 VM programs +make regen # same as pass3; the whole pipeline is byte-for-byte reproducible +``` + +## Pass 3b — the bytecode VM, decoded + +The 42 token programs (`BytecodeProgram_00`–`_25` plus `StandaloneBytecodeProgram`–`_3`) are the +game's scripting layer. Each now carries a byte-for-byte token listing above its unchanged `.byte` +data, produced by `_tools/bytecode_dis.py` (wired in as `make pass3`). + +### The encoding + +`RunBytecodeInterpreter` (`$9AE8`) is the whole dispatch: + +``` +$9AEA lda ($1A),y ; fetch one byte +$9AEC iny +$9AED cmp #$F0 / bcs $9B08 ; >= $F0 -> literal +$9AF1 cmp #$C8 / bcc $9B08 ; < $C8 -> literal +$9AF5 sbc #$C8 / asl a / tax +$9AF9 lda $9237,x / sta $1C ; BytecodeHandlerTable +$9AFE lda $9238,x / sta $1D +$9B05 jmp ($001C) ; run the handler +``` + +and the literal path (`$9B08`) pushes the byte onto the operand list: + +``` +$9B08 pha +$9B09 lda ($1A),y / iny ; the operand byte itself +$9B0C jsr $94C8 ; save stream position, restore the operand index +... +$9B22 sta $0033,Y ; operand list +$9B25 jsr $9CBB ; block/stream bookkeeping +``` + +So **the encoding is one byte per element**: a byte in `$C8`–`$EF` selects one of the 40 +`BytecodeHandlerTable` entries, and every other byte is a literal operand appended to `$0033[Y]` +(and accumulated into `$003C[Y]`). There are no variable-length opcodes *except* four. + +**Four opcodes take one inline operand byte.** Their handler's first instructions are +`lda ($1A),Y / iny`, so the byte after the token is consumed by the opcode itself: + +| Opcode | Handler | Inline byte stored in | Meaning | +|--------|---------|------------------------|---------| +| `$CB` | `$946D` | `$7C,X` (count) and `$7E,X` (body address) | `LOOP_BEGIN` | +| `$D1` | `$950B` | `$43,X` | `SET_RATE` | +| `$D7` | `$937C` | used as a count for the `$A660` blit | `DRAW_SPRITE` | +| `$E1` | `$9465` | `$7A,X` | `SET_WAIT` | + +`$CB`/`$C9` are the loop pair: `LOOP_BEGIN` marks the stream position and loads the counter, and +`LOOP_END` (`$9477`) decrements `$7C,X` and, if still non-zero, reloads `Y` from `$7E,X` — which +rewinds the interpreter to the top of the loop body. + +### What was decoded + +| | | +|---|---| +| Programs listed | **42** (37 in `BytecodeProgramPointerTable` + 4 standalone, one shared) | +| Opcodes decoded | **377** | +| Literal operands | **937** | +| Opcodes defined / used | 40 / 40 — the opcode set is complete, nothing unused | + +Two of the four standalone programs (`_1`, 24 bytes; `_3`, 84 bytes) contain **no byte in +`$C8`–`$EF`**, so the interpreter takes the literal path for every byte and the whole block is +operand data rather than an instruction stream. The listing says so explicitly rather than implying +they are code. + +### Confidence + +Each mnemonic was read off its handler's own straight-line path, stopping at the handler's first +`jmp $9AE8` / `jmp $9B25`. Mnemonics that describe register-level behaviour (`ACC_ADD_1_STEP`, +`STEP_ACCUM`, `ROT_STEP_SUB`, …) are read directly off the instructions. Those that merely tail-call +a game routine are named for that routine (`VM_CALL_82E1`, `PLAY_SEQ_BD20`) rather than guessed at, +because the semantic content lives in the callee, not the handler. + +--- + +## Pass 3c — tracing the stage payload + +Static analysis cannot reach this region, and the trace confirms why. Across all 16 KB of code +there is exactly **one** operand in `$B0FB–$BEBF`: + +``` +operands in $B0FB-$BEBF : 1 + -> $BD28 StageDataPointerLow, the literal pointer table itself +``` + +The real address is formed at runtime, `$A062`: + +``` +$A062 clc +$A063 adc $BD28,X ; A (a value carried in the bytecode stream) + table byte +$A066 sta $12 +``` + +so the readers are indexed by a *runtime value* and cannot be enumerated by searching the code. + +### Method + +FCEUX's Lua API has no memory-read hook — only `registerexec`, `registerexecute`, `registerrun` +and `registerwrite` — so it cannot observe these reads either, and with no static list of readers +there is nothing to hook. `_tools/trace_stage_payload.py` therefore uses **py65**, whose +`ObservableMemory.subscribe_to_read` fires on every read of a range and can report the CPU's PC +from inside the hook. + +py65 is only a 6502 core, so the tracer adds the minimum hardware to get the game running: a +scanline counter driven off `processorCycles`, `$2002` vblank asserted at scanline 241 and cleared +on read, NMI fired at the same scanline (MUSCLE does its per-frame work in `NmiHandler` `$86CB`), +`$4014` OAM DMA, and the `$2005`/`$2006`/`$2007` latches. + +Without NMI the game never leaves `$80E0: lda $0321 / beq $80E0`, because `$0321` is the flag the +bytecode VM raises — so the stage data is only reachable once interrupts work. + +### Results (300 frames, 26.8M cycles, 4,071 NMIs) + +| | | +|---|---| +| Payload reads captured | **2,548** | +| Distinct reader PCs | **44** | +| Unique payload addresses touched | **914** of 3,421 bytes in range | + +Reader PCs are 1-2 bytes above the real instruction, because py65 advances PC past the opcode +before fetching the effective address. + +### What the access pattern shows + +**1. The payload is read through indirect pointers, confirming the static finding.** The hottest +reader resolves to `$AC82`: + +``` +$AC82 lda ($10),Y +$AC84 cmp #$C0 +$AC86 bne $AC96 +$AC88 lda $10 / clc / adc #$01 / sta $10 ; advance the stream pointer +``` + +This is the compressed-VRAM RLE decoder - it walks the payload **sequentially** (1,046 of its +1,128 reads advance by exactly +1), comparing each byte against `$C0`. That matches the `$AC82` +RLE decoder already named in the data section. + +**2. There is a second, backward-copy reader.** `$9B51` resolves to + +``` +$9B50 lda ($12),Y +$9B52 ldy $14 +$9B54 sta ($10),Y +$9B56 dey +``` + +and its reads step by **-1**, sixty times - a reverse copy between two buffers. + +**3. The payload contains 8-byte-aligned record arrays.** 107 distinct 8-byte blocks had all eight +bytes read, and the spacing between consecutive blocks is dominated by **$08**: + +``` +$B1F0 $B1F8 $B200 $B208 $B210 $B218 ... (stride $08) +$B3B8 $B3C0 $B3C8 $B3D0 ... $B5A0 (a long $08-strided run - the object lists) +$B600 $B608 $B610 ... $B638 +$B8A0 $B8A8 $B8B0 ... $B910 +``` + +with a second, sparser group on a **$D0 stride**: + +``` +$BBE0 $BCB0 $BD80 $BE50 +``` + +so at least two record tables exist: a dense 8-byte-stride array and a $D0-stride array. + +**4. Readers use three access disciplines** - sequential forward (+1), sequential backward (-1), +and variable stride (+$15/+$14/+$11 at `$ACB2`, +2/+$4D at `$AF5B`/`$B03D`), the last consistent +with a field-at-fixed-offset walk across records. + +### Still open + +* Which reader corresponds to which semantic field is not yet pinned down; the trace gives the + geometry (8-byte records, $08 and $D0 strides) but not the field names. +* Only 914 of 3,421 bytes were touched, because the run never entered every stage. A longer run + that cycles through all stages would cover more and may reveal further strides. +* The compressed-VRAM payload and the object-list records are interleaved in one block; the + boundary between them is not yet resolved. + +FCEUX remains useful as an independent oracle for any of these conclusions - it is a complete, +correct emulator where this tracer is a deliberately partial one. + +--- + +## Pass 3d — the payload is a shared pool, not stage data + +Pass 3c assumed `$B0FB–$BEBF` was per-stage level data and that "cycle all stages" would cover +it. A longer, properly-clocked run **disproves that**. Coverage plateaus near 40% no matter how +many stages are entered, and forcing every actor index to run adds **zero** new bytes. + +### Two tracer bugs, both of which were suppressing everything + +**1. NMI re-armed by `$2002` reads.** The vblank flag must be cleared once per *frame*, not on +every read of `$2002`. The main loop polls `$2002` and spins on the bytecode VM flag at +`MainGameLoop_OnZero_8226` (`lda $0321 / beq $8235`); each poll clears bit 7, re-arming NMI +inside the same scanline. Guarding only on `not vblank` produced **40,900 NMIs across 3,000 +frames** and silently corrupted all game state. A separate per-frame `nmi_fired` flag restores +exactly one NMI per frame — verified: 600 frames → 600 NMIs. + +**2. Input went to the wrong port.** The poll routine at `$AA69` is + +``` +$AA69 ldx #$01 / stx $4016 / dex / stx $4016 / ldy #$08 / lda $4016,X / and #$03 / cmp #$01 +``` + +so the *observed* reads are of `$4017` (X=1) and only bits 0-1 are ever compared. Driving +`$4017` therefore consumes nothing: all three masks tested gave byte-identical traces. The game +reads **joy1 on `$4016`**, and needs a real latch/shift register — a write with bit0 set latches, +reads shift `A,B,Select,Start,Up,Down,Left,Right` out LSB-first. With that, START visibly +matters: **47.7% coverage vs 39.0%** for other masks. + +Reaching a match takes **two discrete START presses** — title → character select → match. Rapid +re-tapping does not work, and each press must be held ~3 frames. + +### What `$BD28` actually indexes + +`$BD28` is not a stage table. The one operand in the window feeds: + +``` +$A04A lda $0324 / beq $A062 +$A04F lda ActorIndex ($1E) / beq $A062 +$A063 adc $BD28,X ; X = ActorIndex +$A06A lda PlayerActiveFlag,X ($78,X) +$A071 adc #$32 ; +$32 when that actor is active +``` + +`$BD28 = 6B 6B 6E 75 75 80 5A 78` is an **8-entry per-actor entry-offset table**, and +`$B0FB + $BD28,n` is where actor *n*'s bytecode starts. Observed `ActorIndex` values over a +2,400-frame match are `$00–$04`, so the live actor set is 0–4. + +### The sound engine reads the same window + +With input working, the reader list gained PCs *inside* `$B0FB–$BEBF`. These are not new code — +they are the sound engine's own stream reader: + +``` +$B03C lda (SoundReadPointerLo),Y +$B03E cmp #$F0 +$B040 bcc StoreShortNoteDuration +$B043 sbc #$F0 / tay / lda $B0E3,y ; NoteDurationTable at $B0E3 +``` + +`SoundReadPointerLo` ($EE/$EF) points into the payload while music plays, and the `$F0` compare +plus the `$B0E3` duration lookup is note decoding. This is why the windows' bytes carry so many +`$FF` terminators — `$FF`/`$F0` are the high-nibble codes of the note stream. + +So `$B0FB–$BEBF` is a **shared data pool**, mixing at least three things: per-actor bytecode +scripts, the compressed-VRAM RLE stream (`$AC82`), and music note streams. It is not +stage-specific, which is why stage cycling cannot raise coverage past ~40%. + +### Coverage summary + +| Run | Frames | NMIs | Payload reads | Readers | Coverage | +|---|---|---|---|---|---| +| Pass 3c (NMI broken) | 300 | 4,071 | 2,548 | 44 | 26.3% | +| NMI fixed, no input | 600 | 600 | 29,808 | 14 | 39.0% | +| Two START presses | 2,000 | 2,000 | 79,192 | 21 | 40.9% | +| Actor sweep 0–7 | 2,400 | 2,400 | 98,392 | 14 | 38.7% | + +Largest unreached spans after the two-START run (2,161 B in 15 runs) are `$BC00–$BEBF` (704 B), +`$B980–$BB0F` (400 B), `$BB20–$BBEF` (208 B), `$B0FB–$B1A0` (166 B) and `$B81E–$B89D` (128 B). + +### What would actually close the gap + +Not stage cycling. The remaining bytes need **other music tracks playing** and **actors 2–4 in +their non-default states**. Both need a scripted match (moves, grapples, ring-outs), not a +button-tap sequence — i.e. gameplay simulation, which is well beyond a coverage tracer. + +`$0326` is *not* a level byte: it never changes from `$00` in any run, including a confirmed +match. `$0320` toggles `$00`/`$FF` and behaves as a boolean, not a screen-state machine. + +--- + +## Still Open + +* ~~**Promote to the numbered inventory.**~~ **Done** — promoted to top-level `MUSCLE (U)/` and + added as #16 in the root inventory. `copilot/Makefile` tool paths moved from `../../../_tools/` + to `../../_tools/` for `NESDIS`/`PASS2`/`BYTECODE`; `make` and `make regen` both verified after + the move. +* **The payload record structure is partially decoded** (`$B0FB–$BEBF`, 3,525 bytes) — see + "Pass 3d" above for what the emulator run established. It is a *shared pool* (per-actor + bytecode + compressed VRAM + music note streams), not per-stage data; the per-record field names + and the boundaries between the three uses are still unresolved. diff --git a/_wip/MUSCLE (U)/copilot/Makefile b/MUSCLE (U)/copilot/Makefile similarity index 78% rename from _wip/MUSCLE (U)/copilot/Makefile rename to MUSCLE (U)/copilot/Makefile index cf4c408..b4ec01c 100644 --- a/_wip/MUSCLE (U)/copilot/Makefile +++ b/MUSCLE (U)/copilot/Makefile @@ -1,8 +1,9 @@ CA65 ?= ca65 LD65 ?= ld65 PYTHON ?= python3 -NESDIS ?= ../../../_tools/nesdis.py -PASS2 ?= ../../../_tools/pass2.py +NESDIS ?= ../../_tools/nesdis.py +PASS2 ?= ../../_tools/pass2.py +BYTECODE ?= ../../_tools/bytecode_dis.py all: reconstructed.nes verify @@ -44,9 +45,15 @@ pass2: pass1 $(PYTHON) $(PASS2) structure prg.s data_regions.tsv $(PYTHON) $(PASS2) locals prg.s zero_page_names.tsv locals.inc zero_page_ranges.tsv -regen: pass2 +# Pass 3: decode the bytecode VM programs into a readable token listing above each +# program's unchanged .byte data. Bytecode_dis.py only inserts comment lines; the +# .byte data it reads is copied through verbatim. +pass3: pass2 + $(PYTHON) $(BYTECODE) prg.bin prg.s + +regen: pass3 clean: rm -f *.o reconstructed.nes reconstructed_prg.bin reconstructed.map reconstructed.lbl -.PHONY: all verify clean regen pass1 pass2 \ No newline at end of file +.PHONY: all verify clean regen pass1 pass2 pass3 \ No newline at end of file diff --git a/_wip/MUSCLE (U)/copilot/chr.bin b/MUSCLE (U)/copilot/chr.bin similarity index 100% rename from _wip/MUSCLE (U)/copilot/chr.bin rename to MUSCLE (U)/copilot/chr.bin diff --git a/_wip/MUSCLE (U)/copilot/chr.s b/MUSCLE (U)/copilot/chr.s similarity index 100% rename from _wip/MUSCLE (U)/copilot/chr.s rename to MUSCLE (U)/copilot/chr.s diff --git a/_wip/MUSCLE (U)/copilot/data_regions.tsv b/MUSCLE (U)/copilot/data_regions.tsv similarity index 100% rename from _wip/MUSCLE (U)/copilot/data_regions.tsv rename to MUSCLE (U)/copilot/data_regions.tsv diff --git a/_wip/MUSCLE (U)/copilot/header.bin b/MUSCLE (U)/copilot/header.bin similarity index 100% rename from _wip/MUSCLE (U)/copilot/header.bin rename to MUSCLE (U)/copilot/header.bin diff --git a/_wip/MUSCLE (U)/copilot/header.s b/MUSCLE (U)/copilot/header.s similarity index 100% rename from _wip/MUSCLE (U)/copilot/header.s rename to MUSCLE (U)/copilot/header.s diff --git a/_wip/MUSCLE (U)/copilot/label_names.tsv b/MUSCLE (U)/copilot/label_names.tsv similarity index 100% rename from _wip/MUSCLE (U)/copilot/label_names.tsv rename to MUSCLE (U)/copilot/label_names.tsv diff --git a/_wip/MUSCLE (U)/copilot/linker.cfg b/MUSCLE (U)/copilot/linker.cfg similarity index 100% rename from _wip/MUSCLE (U)/copilot/linker.cfg rename to MUSCLE (U)/copilot/linker.cfg diff --git a/_wip/MUSCLE (U)/copilot/locals.inc b/MUSCLE (U)/copilot/locals.inc similarity index 100% rename from _wip/MUSCLE (U)/copilot/locals.inc rename to MUSCLE (U)/copilot/locals.inc diff --git a/_wip/MUSCLE (U)/copilot/prg.bin b/MUSCLE (U)/copilot/prg.bin similarity index 100% rename from _wip/MUSCLE (U)/copilot/prg.bin rename to MUSCLE (U)/copilot/prg.bin diff --git a/_wip/MUSCLE (U)/copilot/prg.s b/MUSCLE (U)/copilot/prg.s similarity index 92% rename from _wip/MUSCLE (U)/copilot/prg.s rename to MUSCLE (U)/copilot/prg.s index d11b2a7..99320e9 100644 --- a/_wip/MUSCLE (U)/copilot/prg.s +++ b/MUSCLE (U)/copilot/prg.s @@ -1578,6 +1578,84 @@ UpdateScrollTargetAlt_JoinBranchPaths_85EC: ; Pass 3: bytecode program not listed in BytecodeProgramPointerTable. ; ---- data $85ED-$8638 (76 bytes) ---- StandaloneBytecodeProgram: +; --- bytecode listing: 76 bytes, 4 opcodes, 72 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $85ED .byte $03 + ; $85EE .byte $20 + ; $85EF .byte $AF + ; $85F0 .byte $1B + ; $85F1 .byte $18 + ; $85F2 .byte $1E + ; $85F3 .byte $17 + ; $85F4 .byte $0D + ; $85F5 .byte $C0 + ; $85F6 .byte $22 + ; $85F7 .byte $48 + ; $85F8 .byte $11 + ; $85F9 .byte $12 + ; $85FA .byte $26 + ; $85FB .byte $1C + ; $85FC .byte $0C + ; $85FD .byte $18 + ; $85FE .byte $1B + ; $85FF .byte $0E + ; $8600 .byte $C0 + ; $8601 .byte $22 + ; $8602 .byte $A8 + ; $8603 .byte $01 + ; $8604 .byte $19 + ; $8605 .byte $26 + ; $8606 .byte $1C + ; $8607 .byte $0C + ; $8608 .byte $18 + ; $8609 .byte $1B + ; $860A .byte $0E + ; $860B .byte $C0 + ; $860C .byte $01 + ; $860D .byte $22 + ; $860E STEP_DOWN -- SaveStreamPos, $9732, step $4B:=2 and accumulate + ; $860F .byte $02 + ; $8610 .byte $19 + ; $8611 .byte $26 + ; $8612 .byte $1C + ; $8613 .byte $0C + ; $8614 .byte $18 + ; $8615 .byte $1B + ; $8616 .byte $0E + ; $8617 .byte $C0 + ; $8618 .byte $03 + ; $8619 .byte $21 + ; $861A ROT_STEP_ADD -- rotates the step byte, adds it into $0033[Y], steps $3A[Y] up by 2 and accumulates + ; $861B .byte $BC + ; $861C .byte $05 + ; $861D .byte $C0 + ; $861E .byte $20 + ; $861F ADD_STEP_ACCUM -- adds the step byte into $0033[Y], steps $3A[Y] down and accumulates + ; $8620 .byte $BC + ; $8621 .byte $08 + ; $8622 .byte $C0 + ; $8623 .byte $21 + ; $8624 .byte $0B + ; $8625 .byte $10 + ; $8626 .byte $0A + ; $8627 .byte $16 + ; $8628 .byte $0E + ; $8629 .byte $30 + ; $862A .byte $30 + ; $862B .byte $18 + ; $862C .byte $1F + ; $862D .byte $0E + ; $862E .byte $1B + ; $862F .byte $C0 + ; $8630 .byte $01 + ; $8631 .byte $21 + ; $8632 ROT_STEP_ADD -- rotates the step byte, adds it into $0033[Y], steps $3A[Y] up by 2 and accumulates + ; $8633 .byte $0B + ; $8634 .byte $18 + ; $8635 .byte $17 + ; $8636 .byte $1E + ; $8637 .byte $1C + ; $8638 .byte $C0 .byte $03, $20, $AF, $1B, $18, $1E, $17, $0D, $C0, $22, $48, $11, $12, $26, $1C, $0C ; CPU:$85ED PRG:05ED 03 20 AF 1B 18 1E 17 0D C0 22 48 11 12 26 1C 0C .byte $18, $1B, $0E, $C0, $22, $A8, $01, $19, $26, $1C, $0C, $18, $1B, $0E, $C0, $01 ; CPU:$85FD PRG:05FD 18 1B 0E C0 22 A8 01 19 26 1C 0C 18 1B 0E C0 01 .byte $22, $E8, $02, $19, $26, $1C, $0C, $18, $1B, $0E, $C0, $03, $21, $EE, $BC, $05 ; CPU:$860D PRG:060D 22 E8 02 19 26 1C 0C 18 1B 0E C0 03 21 EE BC 05 @@ -2096,6 +2174,35 @@ UpdateFlashCounter_OnCarryClear_8819: ; Pass 3: bytecode program not listed in BytecodeProgramPointerTable. ; ---- data $881F-$8836 (24 bytes) ---- StandaloneBytecodeProgram_1: +; --- bytecode listing: 24 bytes, 0 opcodes, 24 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 +; NOTE: this program contains no byte in $C8-$EF, so the +; interpreter takes the literal path for every byte and the +; whole block is operand data, not an instruction stream. + ; $881F .byte $02 + ; $8820 .byte $20 + ; $8821 .byte $9C + ; $8822 .byte $BF + ; $8823 .byte $03 + ; $8824 .byte $19 + ; $8825 .byte $C0 + ; $8826 .byte $24 + ; $8827 .byte $80 + ; $8828 .byte $0A + ; $8829 .byte $1E + ; $882A .byte $1C + ; $882B .byte $0E + ; $882C .byte $32 + ; $882D .byte $C0 + ; $882E .byte $01 + ; $882F .byte $24 + ; $8830 .byte $80 + ; $8831 .byte $1B + ; $8832 .byte $18 + ; $8833 .byte $1E + ; $8834 .byte $17 + ; $8835 .byte $0D + ; $8836 .byte $C0 .byte $02, $20, $9C, $BF, $03, $19, $C0, $24, $80, $0A, $1E, $1C, $0E, $32, $C0, $01 ; CPU:$881F PRG:081F 02 20 9C BF 03 19 C0 24 80 0A 1E 1C 0E 32 C0 01 .byte $24, $80, $1B, $18, $1E, $17, $0D, $C0 ; CPU:$882F PRG:082F 24 80 1B 18 1E 17 0D C0 PlayDeathSequence: @@ -2761,6 +2868,18 @@ ReadControllerAndInit_OnNonzero_89F7: ; Pass 3: tail of a bytecode program; the $1D byte rules out an instruction decode. ; ---- data $8A1E-$8A27 (10 bytes) ---- StandaloneBytecodeProgram_2: +; --- bytecode listing: 10 bytes, 1 opcodes, 9 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $8A1E .byte $01 + ; $8A1F .byte $21 + ; $8A20 ACC_ADD_1_STEP -- SaveStreamPos; adds 1 to the accumulator via $9653, then folds the step byte into $0033[Y] + ; $8A21 .byte $1C + ; $8A22 .byte $0E + ; $8A23 .byte $15 + ; $8A24 .byte $0E + ; $8A25 .byte $0C + ; $8A26 .byte $1D + ; $8A27 .byte $C0 .byte $01, $21, $CD, $1C, $0E, $15, $0E, $0C, $1D, $C0 ; CPU:$8A1E PRG:0A1E 01 21 CD 1C 0E 15 0E 0C 1D C0 UpdateStageActors: lda Zp8E ; CPU:$8A28 PRG:0A28 A5 8E @@ -3472,15 +3591,88 @@ BytecodeProgramPointerTable: ; Pass 3: bytecode program, table index/indices [13], 5 bytes. ; ---- data $8D3B-$8D3F (5 bytes) ---- BytecodeProgram_00: +; --- bytecode listing: 5 bytes, 4 opcodes, 0 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $8D3B SET_WAIT $3C -- stores the inline byte into $7A as this actor's wait/step count + ; $8D3D TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $8D3E CLEAR_ACTIVE -- clears $F0 when it currently holds $80 + ; $8D3F RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor .byte $E1, $3C, $E5, $EB, $D0 ; CPU:$8D3B PRG:0D3B E1 3C E5 EB D0 ; Pass 3: bytecode program, table index/indices [36], 28 bytes. ; ---- data $8D40-$8D5B (28 bytes) ---- BytecodeProgram_01: +; --- bytecode listing: 28 bytes, 16 opcodes, 4 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $8D40 SET_RATE $06 -- stores the inline byte into $43 as this actor's rate + ; $8D42 .byte $FD + ; $8D43 .byte $00 + ; $8D44 SET_WAIT $1E -- stores the inline byte into $7A as this actor's wait/step count + ; $8D46 TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $8D47 SET_RATE $0C -- stores the inline byte into $43 as this actor's rate + ; $8D49 .byte $F8 + ; $8D4A .byte $00 + ; $8D4B LOOP_BEGIN $03 -- reads the inline iteration count, stores it in $7C and the body address in $7E + ; $8D4D SET_WAIT $14 -- stores the inline byte into $7A as this actor's wait/step count + ; $8D4F SET_DIRECTION -- sets the $5C direction flag from bit 0 of $24 + ; $8D50 VM_CALL_8765 -- tail-calls the game routine at $8765 + ; $8D51 LOOP_END -- decrements the $7C loop counter; if still non-zero rewinds the stream pointer from $7E, re-running the loop body + ; $8D52 SET_WAIT $1E -- stores the inline byte into $7A as this actor's wait/step count + ; $8D54 SET_DIRECTION -- sets the $5C direction flag from bit 0 of $24 + ; $8D55 VM_CALL_82E1 -- tail-calls the game routine at $82E1 + ; $8D56 SET_WAIT $5A -- stores the inline byte into $7A as this actor's wait/step count + ; $8D58 SET_DIRECTION -- sets the $5C direction flag from bit 0 of $24 + ; $8D59 SET_WAIT $F0 -- stores the inline byte into $7A as this actor's wait/step count + ; $8D5B TICK_STEP -- step countdown: on reaching zero sets $0321=$FF .byte $D1, $06, $FD, $00, $E1, $1E, $E5, $D1, $0C, $F8, $00, $CB, $03, $E1, $14, $DA ; CPU:$8D40 PRG:0D40 D1 06 FD 00 E1 1E E5 D1 0C F8 00 CB 03 E1 14 DA .byte $CA, $C9, $E1, $1E, $DA, $C8, $E1, $5A, $DA, $E1, $F0, $D6 ; CPU:$8D50 PRG:0D50 CA C9 E1 1E DA C8 E1 5A DA E1 F0 D6 ; Pass 3: bytecode program, table index/indices [37], 49 bytes. ; ---- data $8D5C-$8D8C (49 bytes) ---- BytecodeProgram_02: +; --- bytecode listing: 49 bytes, 9 opcodes, 34 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $8D5C LOOP_BEGIN $05 -- reads the inline iteration count, stores it in $7C and the body address in $7E + ; $8D5E SET_RATE $00 -- stores the inline byte into $43 as this actor's rate + ; $8D60 SET_WAIT $0F -- stores the inline byte into $7A as this actor's wait/step count + ; $8D62 TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $8D63 SET_RATE $02 -- stores the inline byte into $43 as this actor's rate + ; $8D65 .byte $08 + ; $8D66 .byte $00 + ; $8D67 .byte $0F + ; $8D68 .byte $00 + ; $8D69 .byte $15 + ; $8D6A .byte $00 + ; $8D6B .byte $1A + ; $8D6C .byte $00 + ; $8D6D .byte $1E + ; $8D6E .byte $00 + ; $8D6F .byte $21 + ; $8D70 .byte $00 + ; $8D71 .byte $23 + ; $8D72 .byte $00 + ; $8D73 .byte $24 + ; $8D74 .byte $00 + ; $8D75 .byte $24 + ; $8D76 .byte $00 + ; $8D77 .byte $23 + ; $8D78 .byte $00 + ; $8D79 .byte $21 + ; $8D7A .byte $00 + ; $8D7B .byte $1E + ; $8D7C .byte $00 + ; $8D7D .byte $1A + ; $8D7E .byte $00 + ; $8D7F .byte $15 + ; $8D80 .byte $00 + ; $8D81 .byte $0F + ; $8D82 .byte $00 + ; $8D83 .byte $08 + ; $8D84 .byte $00 + ; $8D85 .byte $00 + ; $8D86 .byte $00 + ; $8D87 LOOP_END -- decrements the $7C loop counter; if still non-zero rewinds the stream pointer from $7E, re-running the loop body + ; $8D88 SET_RATE $00 -- stores the inline byte into $43 as this actor's rate + ; $8D8A SET_WAIT $F0 -- stores the inline byte into $7A as this actor's wait/step count + ; $8D8C TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero .byte $CB, $05, $D1, $00, $E1, $0F, $E5, $D1, $02, $08, $00, $0F, $00, $15, $00, $1A ; CPU:$8D5C PRG:0D5C CB 05 D1 00 E1 0F E5 D1 02 08 00 0F 00 15 00 1A .byte $00, $1E, $00, $21, $00, $23, $00, $24, $00, $24, $00, $23, $00, $21, $00, $1E ; CPU:$8D6C PRG:0D6C 00 1E 00 21 00 23 00 24 00 24 00 23 00 21 00 1E .byte $00, $1A, $00, $15, $00, $0F, $00, $08, $00, $00, $00, $C9, $D1, $00, $E1, $F0 ; CPU:$8D7C PRG:0D7C 00 1A 00 15 00 0F 00 08 00 00 00 C9 D1 00 E1 F0 @@ -3488,25 +3680,176 @@ BytecodeProgram_02: ; Pass 3: bytecode program, table index/indices [22], 9 bytes. ; ---- data $8D8D-$8D95 (9 bytes) ---- BytecodeProgram_03: +; --- bytecode listing: 9 bytes, 6 opcodes, 0 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $8D8D SET_RATE $0B -- stores the inline byte into $43 as this actor's rate + ; $8D8F SET_WAIT $15 -- stores the inline byte into $7A as this actor's wait/step count + ; $8D91 ADD_STEP_ACCUM -- adds the step byte into $0033[Y], steps $3A[Y] down and accumulates + ; $8D92 SET_WAIT $15 -- stores the inline byte into $7A as this actor's wait/step count + ; $8D94 SUB_STEP_ACCUM -- adds 1 to $3A[Y] and subtracts the step from $0033[Y] + ; $8D95 RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor .byte $D1, $0B, $E1, $15, $EC, $E1, $15, $ED, $D0 ; CPU:$8D8D PRG:0D8D D1 0B E1 15 EC E1 15 ED D0 ; Pass 3: bytecode program, table index/indices [23], 9 bytes. ; ---- data $8D96-$8D9E (9 bytes) ---- BytecodeProgram_04: +; --- bytecode listing: 9 bytes, 6 opcodes, 0 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $8D96 SET_RATE $0B -- stores the inline byte into $43 as this actor's rate + ; $8D98 SET_WAIT $18 -- stores the inline byte into $7A as this actor's wait/step count + ; $8D9A ROT_STEP_ADD -- rotates the step byte, adds it into $0033[Y], steps $3A[Y] up by 2 and accumulates + ; $8D9B SET_WAIT $18 -- stores the inline byte into $7A as this actor's wait/step count + ; $8D9D ROT_STEP_SUB -- rotates the step byte, complements it, subtracts from $0033[Y], and calls $82ED + ; $8D9E RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor .byte $D1, $0B, $E1, $18, $EE, $E1, $18, $EF, $D0 ; CPU:$8D96 PRG:0D96 D1 0B E1 18 EE E1 18 EF D0 ; Pass 3: bytecode program, table index/indices [33], 23 bytes. ; ---- data $8D9F-$8DB5 (23 bytes) ---- BytecodeProgram_05: +; --- bytecode listing: 23 bytes, 5 opcodes, 16 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $8D9F SET_RATE $06 -- stores the inline byte into $43 as this actor's rate + ; $8DA1 .byte $00 + ; $8DA2 .byte $FF + ; $8DA3 .byte $00 + ; $8DA4 .byte $FF + ; $8DA5 .byte $00 + ; $8DA6 .byte $FF + ; $8DA7 .byte $FF + ; $8DA8 .byte $FF + ; $8DA9 .byte $FF + ; $8DAA .byte $FF + ; $8DAB .byte $FF + ; $8DAC .byte $FF + ; $8DAD .byte $FE + ; $8DAE .byte $FF + ; $8DAF .byte $FD + ; $8DB0 .byte $FF + ; $8DB1 SET_WAIT $1E -- stores the inline byte into $7A as this actor's wait/step count + ; $8DB3 SET_DIRECTION -- sets the $5C direction flag from bit 0 of $24 + ; $8DB4 CLEAR_ACTIVE -- clears $F0 when it currently holds $80 + ; $8DB5 RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor .byte $D1, $06, $00, $FF, $00, $FF, $00, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF ; CPU:$8D9F PRG:0D9F D1 06 00 FF 00 FF 00 FF FF FF FF FF FF FF FE FF .byte $FD, $FF, $E1, $1E, $DA, $EB, $D0 ; CPU:$8DAF PRG:0DAF FD FF E1 1E DA EB D0 ; Pass 3: bytecode program, table index/indices [34], 44 bytes. ; ---- data $8DB6-$8DE1 (44 bytes) ---- BytecodeProgram_06: +; --- bytecode listing: 44 bytes, 9 opcodes, 30 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $8DB6 SET_RATE $06 -- stores the inline byte into $43 as this actor's rate + ; $8DB8 .byte $00 + ; $8DB9 .byte $FF + ; $8DBA .byte $00 + ; $8DBB .byte $FF + ; $8DBC .byte $00 + ; $8DBD .byte $FF + ; $8DBE .byte $FF + ; $8DBF .byte $FF + ; $8DC0 .byte $FF + ; $8DC1 .byte $FF + ; $8DC2 .byte $FF + ; $8DC3 .byte $FF + ; $8DC4 .byte $FE + ; $8DC5 .byte $FF + ; $8DC6 .byte $FD + ; $8DC7 .byte $FF + ; $8DC8 SET_RATE $0C -- stores the inline byte into $43 as this actor's rate + ; $8DCA .byte $F8 + ; $8DCB .byte $FF + ; $8DCC .byte $F8 + ; $8DCD .byte $FF + ; $8DCE .byte $F8 + ; $8DCF .byte $FF + ; $8DD0 .byte $F8 + ; $8DD1 .byte $FF + ; $8DD2 .byte $F8 + ; $8DD3 .byte $FF + ; $8DD4 .byte $F8 + ; $8DD5 .byte $FF + ; $8DD6 SET_WAIT $1E -- stores the inline byte into $7A as this actor's wait/step count + ; $8DD8 SET_DIRECTION -- sets the $5C direction flag from bit 0 of $24 + ; $8DD9 SET_RATE $06 -- stores the inline byte into $43 as this actor's rate + ; $8DDB .byte $FD + ; $8DDC .byte $00 + ; $8DDD SET_WAIT $08 -- stores the inline byte into $7A as this actor's wait/step count + ; $8DDF TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $8DE0 CLEAR_ACTIVE -- clears $F0 when it currently holds $80 + ; $8DE1 RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor .byte $D1, $06, $00, $FF, $00, $FF, $00, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF ; CPU:$8DB6 PRG:0DB6 D1 06 00 FF 00 FF 00 FF FF FF FF FF FF FF FE FF .byte $FD, $FF, $D1, $0C, $F8, $FF, $F8, $FF, $F8, $FF, $F8, $FF, $F8, $FF, $F8, $FF ; CPU:$8DC6 PRG:0DC6 FD FF D1 0C F8 FF F8 FF F8 FF F8 FF F8 FF F8 FF .byte $E1, $1E, $DA, $D1, $06, $FD, $00, $E1, $08, $E5, $EB, $D0 ; CPU:$8DD6 PRG:0DD6 E1 1E DA D1 06 FD 00 E1 08 E5 EB D0 ; Pass 3: bytecode program, table index/indices [35], 75 bytes. ; ---- data $8DE2-$8E2C (75 bytes) ---- BytecodeProgram_07: +; --- bytecode listing: 75 bytes, 9 opcodes, 60 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $8DE2 SET_RATE $06 -- stores the inline byte into $43 as this actor's rate + ; $8DE4 .byte $00 + ; $8DE5 .byte $FF + ; $8DE6 .byte $00 + ; $8DE7 .byte $FF + ; $8DE8 .byte $00 + ; $8DE9 .byte $FF + ; $8DEA .byte $FF + ; $8DEB .byte $FF + ; $8DEC .byte $FF + ; $8DED .byte $FF + ; $8DEE .byte $FF + ; $8DEF .byte $FF + ; $8DF0 .byte $FE + ; $8DF1 .byte $FF + ; $8DF2 .byte $FD + ; $8DF3 .byte $FF + ; $8DF4 SET_RATE $0C -- stores the inline byte into $43 as this actor's rate + ; $8DF6 .byte $F8 + ; $8DF7 .byte $FF + ; $8DF8 .byte $F8 + ; $8DF9 .byte $FF + ; $8DFA .byte $F8 + ; $8DFB .byte $FF + ; $8DFC .byte $F8 + ; $8DFD .byte $FF + ; $8DFE .byte $F8 + ; $8DFF .byte $FF + ; $8E00 .byte $F8 + ; $8E01 .byte $FF + ; $8E02 .byte $F8 + ; $8E03 .byte $FF + ; $8E04 SET_RATE $C6 -- stores the inline byte into $43 as this actor's rate + ; $8E06 .byte $FD + ; $8E07 .byte $FF + ; $8E08 .byte $FD + ; $8E09 .byte $FF + ; $8E0A .byte $FD + ; $8E0B .byte $FF + ; $8E0C .byte $FD + ; $8E0D .byte $FF + ; $8E0E .byte $FD + ; $8E0F .byte $FF + ; $8E10 .byte $FD + ; $8E11 .byte $FF + ; $8E12 .byte $FD + ; $8E13 .byte $FF + ; $8E14 SET_RATE $CC -- stores the inline byte into $43 as this actor's rate + ; $8E16 .byte $F8 + ; $8E17 .byte $FF + ; $8E18 .byte $F8 + ; $8E19 .byte $FF + ; $8E1A .byte $F8 + ; $8E1B .byte $FF + ; $8E1C .byte $F8 + ; $8E1D .byte $FF + ; $8E1E .byte $F8 + ; $8E1F .byte $FF + ; $8E20 .byte $F8 + ; $8E21 .byte $FF + ; $8E22 .byte $F8 + ; $8E23 .byte $FF + ; $8E24 SET_RATE $06 -- stores the inline byte into $43 as this actor's rate + ; $8E26 .byte $FD + ; $8E27 .byte $FF + ; $8E28 SET_WAIT $1E -- stores the inline byte into $7A as this actor's wait/step count + ; $8E2A SET_DIRECTION -- sets the $5C direction flag from bit 0 of $24 + ; $8E2B CLEAR_ACTIVE -- clears $F0 when it currently holds $80 + ; $8E2C RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor .byte $D1, $06, $00, $FF, $00, $FF, $00, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF ; CPU:$8DE2 PRG:0DE2 D1 06 00 FF 00 FF 00 FF FF FF FF FF FF FF FE FF .byte $FD, $FF, $D1, $0C, $F8, $FF, $F8, $FF, $F8, $FF, $F8, $FF, $F8, $FF, $F8, $FF ; CPU:$8DF2 PRG:0DF2 FD FF D1 0C F8 FF F8 FF F8 FF F8 FF F8 FF F8 FF .byte $F8, $FF, $D1, $C6, $FD, $FF, $FD, $FF, $FD, $FF, $FD, $FF, $FD, $FF, $FD, $FF ; CPU:$8E02 PRG:0E02 F8 FF D1 C6 FD FF FD FF FD FF FD FF FD FF FD FF @@ -3515,6 +3858,78 @@ BytecodeProgram_07: ; Pass 3: bytecode program, table index/indices [14], 76 bytes. ; ---- data $8E2D-$8E78 (76 bytes) ---- BytecodeProgram_08: +; --- bytecode listing: 76 bytes, 10 opcodes, 60 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $8E2D SET_RATE $06 -- stores the inline byte into $43 as this actor's rate + ; $8E2F .byte $00 + ; $8E30 .byte $FF + ; $8E31 .byte $00 + ; $8E32 .byte $FF + ; $8E33 .byte $00 + ; $8E34 .byte $FF + ; $8E35 .byte $FF + ; $8E36 .byte $FF + ; $8E37 .byte $FF + ; $8E38 .byte $FF + ; $8E39 .byte $FF + ; $8E3A .byte $FF + ; $8E3B .byte $FE + ; $8E3C .byte $FF + ; $8E3D .byte $FD + ; $8E3E .byte $FF + ; $8E3F SET_RATE $0C -- stores the inline byte into $43 as this actor's rate + ; $8E41 .byte $F8 + ; $8E42 .byte $FF + ; $8E43 .byte $F8 + ; $8E44 .byte $FF + ; $8E45 .byte $F8 + ; $8E46 .byte $FF + ; $8E47 .byte $F8 + ; $8E48 .byte $FF + ; $8E49 .byte $F8 + ; $8E4A .byte $FF + ; $8E4B .byte $F8 + ; $8E4C .byte $FF + ; $8E4D .byte $F8 + ; $8E4E .byte $FF + ; $8E4F SET_RATE $C6 -- stores the inline byte into $43 as this actor's rate + ; $8E51 .byte $FD + ; $8E52 .byte $FF + ; $8E53 .byte $FD + ; $8E54 .byte $FF + ; $8E55 .byte $FD + ; $8E56 .byte $FF + ; $8E57 .byte $FD + ; $8E58 .byte $FF + ; $8E59 .byte $FD + ; $8E5A .byte $FF + ; $8E5B .byte $FD + ; $8E5C .byte $FF + ; $8E5D .byte $FD + ; $8E5E .byte $FF + ; $8E5F SET_RATE $CC -- stores the inline byte into $43 as this actor's rate + ; $8E61 .byte $F8 + ; $8E62 .byte $FF + ; $8E63 .byte $F8 + ; $8E64 .byte $FF + ; $8E65 .byte $F8 + ; $8E66 .byte $FF + ; $8E67 .byte $F8 + ; $8E68 .byte $FF + ; $8E69 .byte $F8 + ; $8E6A .byte $FF + ; $8E6B .byte $F8 + ; $8E6C .byte $FF + ; $8E6D .byte $F8 + ; $8E6E .byte $FF + ; $8E6F SET_RATE $06 -- stores the inline byte into $43 as this actor's rate + ; $8E71 .byte $FD + ; $8E72 .byte $FF + ; $8E73 PLAY_SEQ_BD20 -- runs sound sequence $BD20 through the $99E4 dispatcher + ; $8E74 VM_CALL_82E1 -- tail-calls the game routine at $82E1 + ; $8E75 SET_WAIT $78 -- stores the inline byte into $7A as this actor's wait/step count + ; $8E77 SET_DIRECTION -- sets the $5C direction flag from bit 0 of $24 + ; $8E78 RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor .byte $D1, $06, $00, $FF, $00, $FF, $00, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FE, $FF ; CPU:$8E2D PRG:0E2D D1 06 00 FF 00 FF 00 FF FF FF FF FF FF FF FE FF .byte $FD, $FF, $D1, $0C, $F8, $FF, $F8, $FF, $F8, $FF, $F8, $FF, $F8, $FF, $F8, $FF ; CPU:$8E3D PRG:0E3D FD FF D1 0C F8 FF F8 FF F8 FF F8 FF F8 FF F8 FF .byte $F8, $FF, $D1, $C6, $FD, $FF, $FD, $FF, $FD, $FF, $FD, $FF, $FD, $FF, $FD, $FF ; CPU:$8E4D PRG:0E4D F8 FF D1 C6 FD FF FD FF FD FF FD FF FD FF FD FF @@ -3523,12 +3938,116 @@ BytecodeProgram_08: ; Pass 3: bytecode program, table index/indices [11], 48 bytes. ; ---- data $8E79-$8EA8 (48 bytes) ---- BytecodeProgram_09: +; --- bytecode listing: 48 bytes, 12 opcodes, 30 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $8E79 PLAY_SEQ_BD20 -- runs sound sequence $BD20 through the $99E4 dispatcher + ; $8E7A SET_WAIT $50 -- stores the inline byte into $7A as this actor's wait/step count + ; $8E7C SET_DIRECTION -- sets the $5C direction flag from bit 0 of $24 + ; $8E7D SET_RATE $06 -- stores the inline byte into $43 as this actor's rate + ; $8E7F .byte $00 + ; $8E80 .byte $FF + ; $8E81 .byte $00 + ; $8E82 .byte $FF + ; $8E83 .byte $00 + ; $8E84 .byte $FF + ; $8E85 .byte $FF + ; $8E86 .byte $FF + ; $8E87 .byte $FF + ; $8E88 .byte $FF + ; $8E89 .byte $FF + ; $8E8A .byte $FF + ; $8E8B .byte $FE + ; $8E8C .byte $FF + ; $8E8D .byte $FD + ; $8E8E .byte $FF + ; $8E8F SET_RATE $0C -- stores the inline byte into $43 as this actor's rate + ; $8E91 .byte $F8 + ; $8E92 .byte $FF + ; $8E93 .byte $F8 + ; $8E94 .byte $FF + ; $8E95 .byte $F8 + ; $8E96 .byte $FF + ; $8E97 .byte $F8 + ; $8E98 .byte $FF + ; $8E99 .byte $F8 + ; $8E9A .byte $FF + ; $8E9B .byte $F8 + ; $8E9C .byte $FF + ; $8E9D VM_CALL_82E1 -- tail-calls the game routine at $82E1 + ; $8E9E SET_WAIT $28 -- stores the inline byte into $7A as this actor's wait/step count + ; $8EA0 SET_DIRECTION -- sets the $5C direction flag from bit 0 of $24 + ; $8EA1 SET_RATE $06 -- stores the inline byte into $43 as this actor's rate + ; $8EA3 .byte $FD + ; $8EA4 .byte $00 + ; $8EA5 SET_WAIT $08 -- stores the inline byte into $7A as this actor's wait/step count + ; $8EA7 TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $8EA8 RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor .byte $DB, $E1, $50, $DA, $D1, $06, $00, $FF, $00, $FF, $00, $FF, $FF, $FF, $FF, $FF ; CPU:$8E79 PRG:0E79 DB E1 50 DA D1 06 00 FF 00 FF 00 FF FF FF FF FF .byte $FF, $FF, $FE, $FF, $FD, $FF, $D1, $0C, $F8, $FF, $F8, $FF, $F8, $FF, $F8, $FF ; CPU:$8E89 PRG:0E89 FF FF FE FF FD FF D1 0C F8 FF F8 FF F8 FF F8 FF .byte $F8, $FF, $F8, $FF, $C8, $E1, $28, $DA, $D1, $06, $FD, $00, $E1, $08, $E5, $D0 ; CPU:$8E99 PRG:0E99 F8 FF F8 FF C8 E1 28 DA D1 06 FD 00 E1 08 E5 D0 ; Pass 3: bytecode program, table index/indices [24], 75 bytes. ; ---- data $8EA9-$8EF3 (75 bytes) ---- BytecodeProgram_0A: +; --- bytecode listing: 75 bytes, 26 opcodes, 32 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $8EA9 SET_RATE $08 -- stores the inline byte into $43 as this actor's rate + ; $8EAB .byte $04 + ; $8EAC .byte $03 + ; $8EAD .byte $08 + ; $8EAE .byte $03 + ; $8EAF .byte $0B + ; $8EB0 .byte $03 + ; $8EB1 .byte $0E + ; $8EB2 .byte $03 + ; $8EB3 .byte $10 + ; $8EB4 .byte $03 + ; $8EB5 .byte $12 + ; $8EB6 .byte $03 + ; $8EB7 .byte $13 + ; $8EB8 .byte $03 + ; $8EB9 .byte $14 + ; $8EBA .byte $03 + ; $8EBB SET_RATE $0A -- stores the inline byte into $43 as this actor's rate + ; $8EBD SET_WAIT $02 -- stores the inline byte into $7A as this actor's wait/step count + ; $8EBF MOVE_OTHER -- position update variant: two $9A24/$9A2E pushes and an $A660 helper call + ; $8EC0 SET_RATE $8A -- stores the inline byte into $43 as this actor's rate + ; $8EC2 SET_WAIT $02 -- stores the inline byte into $7A as this actor's wait/step count + ; $8EC4 MOVE_OTHER -- position update variant: two $9A24/$9A2E pushes and an $A660 helper call + ; $8EC5 SET_RATE $0A -- stores the inline byte into $43 as this actor's rate + ; $8EC7 SET_WAIT $02 -- stores the inline byte into $7A as this actor's wait/step count + ; $8EC9 MOVE_OTHER -- position update variant: two $9A24/$9A2E pushes and an $A660 helper call + ; $8ECA SET_RATE $8A -- stores the inline byte into $43 as this actor's rate + ; $8ECC SET_WAIT $02 -- stores the inline byte into $7A as this actor's wait/step count + ; $8ECE MOVE_OTHER -- position update variant: two $9A24/$9A2E pushes and an $A660 helper call + ; $8ECF SET_RATE $0A -- stores the inline byte into $43 as this actor's rate + ; $8ED1 SET_WAIT $02 -- stores the inline byte into $7A as this actor's wait/step count + ; $8ED3 MOVE_OTHER -- position update variant: two $9A24/$9A2E pushes and an $A660 helper call + ; $8ED4 SET_RATE $8A -- stores the inline byte into $43 as this actor's rate + ; $8ED6 SET_WAIT $02 -- stores the inline byte into $7A as this actor's wait/step count + ; $8ED8 MOVE_OTHER -- position update variant: two $9A24/$9A2E pushes and an $A660 helper call + ; $8ED9 SET_RATE $0A -- stores the inline byte into $43 as this actor's rate + ; $8EDB SET_WAIT $02 -- stores the inline byte into $7A as this actor's wait/step count + ; $8EDD MOVE_OTHER -- position update variant: two $9A24/$9A2E pushes and an $A660 helper call + ; $8EDE SET_RATE $8A -- stores the inline byte into $43 as this actor's rate + ; $8EE0 SET_WAIT $02 -- stores the inline byte into $7A as this actor's wait/step count + ; $8EE2 MOVE_OTHER -- position update variant: two $9A24/$9A2E pushes and an $A660 helper call + ; $8EE3 .byte $13 + ; $8EE4 .byte $03 + ; $8EE5 .byte $12 + ; $8EE6 .byte $03 + ; $8EE7 .byte $10 + ; $8EE8 .byte $03 + ; $8EE9 .byte $0E + ; $8EEA .byte $03 + ; $8EEB .byte $0B + ; $8EEC .byte $03 + ; $8EED .byte $08 + ; $8EEE .byte $03 + ; $8EEF .byte $04 + ; $8EF0 .byte $03 + ; $8EF1 .byte $00 + ; $8EF2 .byte $03 + ; $8EF3 RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor .byte $D1, $08, $04, $03, $08, $03, $0B, $03, $0E, $03, $10, $03, $12, $03, $13, $03 ; CPU:$8EA9 PRG:0EA9 D1 08 04 03 08 03 0B 03 0E 03 10 03 12 03 13 03 .byte $14, $03, $D1, $0A, $E1, $02, $D3, $D1, $8A, $E1, $02, $D3, $D1, $0A, $E1, $02 ; CPU:$8EB9 PRG:0EB9 14 03 D1 0A E1 02 D3 D1 8A E1 02 D3 D1 0A E1 02 .byte $D3, $D1, $8A, $E1, $02, $D3, $D1, $0A, $E1, $02, $D3, $D1, $8A, $E1, $02, $D3 ; CPU:$8EC9 PRG:0EC9 D3 D1 8A E1 02 D3 D1 0A E1 02 D3 D1 8A E1 02 D3 @@ -3537,34 +4056,301 @@ BytecodeProgram_0A: ; Pass 3: bytecode program, table index/indices [25], 38 bytes. ; ---- data $8EF4-$8F19 (38 bytes) ---- BytecodeProgram_0B: +; --- bytecode listing: 38 bytes, 4 opcodes, 32 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $8EF4 .byte $04 + ; $8EF5 .byte $03 + ; $8EF6 .byte $08 + ; $8EF7 .byte $03 + ; $8EF8 .byte $0B + ; $8EF9 .byte $03 + ; $8EFA .byte $0E + ; $8EFB .byte $03 + ; $8EFC .byte $10 + ; $8EFD .byte $03 + ; $8EFE .byte $12 + ; $8EFF .byte $03 + ; $8F00 .byte $13 + ; $8F01 .byte $03 + ; $8F02 .byte $14 + ; $8F03 .byte $03 + ; $8F04 SET_RATE $07 -- stores the inline byte into $43 as this actor's rate + ; $8F06 SET_WAIT $10 -- stores the inline byte into $7A as this actor's wait/step count + ; $8F08 MOVE_OTHER -- position update variant: two $9A24/$9A2E pushes and an $A660 helper call + ; $8F09 .byte $13 + ; $8F0A .byte $03 + ; $8F0B .byte $12 + ; $8F0C .byte $03 + ; $8F0D .byte $10 + ; $8F0E .byte $03 + ; $8F0F .byte $0E + ; $8F10 .byte $03 + ; $8F11 .byte $0B + ; $8F12 .byte $03 + ; $8F13 .byte $08 + ; $8F14 .byte $03 + ; $8F15 .byte $04 + ; $8F16 .byte $03 + ; $8F17 .byte $00 + ; $8F18 .byte $03 + ; $8F19 RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor .byte $04, $03, $08, $03, $0B, $03, $0E, $03, $10, $03, $12, $03, $13, $03, $14, $03 ; CPU:$8EF4 PRG:0EF4 04 03 08 03 0B 03 0E 03 10 03 12 03 13 03 14 03 .byte $D1, $07, $E1, $10, $D3, $13, $03, $12, $03, $10, $03, $0E, $03, $0B, $03, $08 ; CPU:$8F04 PRG:0F04 D1 07 E1 10 D3 13 03 12 03 10 03 0E 03 0B 03 08 .byte $03, $04, $03, $00, $03, $D0 ; CPU:$8F14 PRG:0F14 03 04 03 00 03 D0 ; Pass 3: bytecode program, table index/indices [28], 6 bytes. ; ---- data $8F1A-$8F1F (6 bytes) ---- BytecodeProgram_0C: +; --- bytecode listing: 6 bytes, 4 opcodes, 0 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $8F1A SET_RATE $05 -- stores the inline byte into $43 as this actor's rate + ; $8F1C SET_WAIT $10 -- stores the inline byte into $7A as this actor's wait/step count + ; $8F1E MOVE_ACTOR_ALT -- alternate position update: $9585 test, $9A3F and two operand pushes + ; $8F1F RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor .byte $D1, $05, $E1, $10, $E6, $D0 ; CPU:$8F1A PRG:0F1A D1 05 E1 10 E6 D0 ; Pass 3: bytecode program, table index/indices [31], 40 bytes. ; ---- data $8F20-$8F47 (40 bytes) ---- BytecodeProgram_0D: +; --- bytecode listing: 40 bytes, 3 opcodes, 36 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $8F20 SWAP_OPERANDS -- exchanges the $39[Y]/$3A[Y] operand pair around the $A4FF and $A4F2 helpers + ; $8F21 SET_RATE $06 -- stores the inline byte into $43 as this actor's rate + ; $8F23 .byte $08 + ; $8F24 .byte $01 + ; $8F25 .byte $0F + ; $8F26 .byte $01 + ; $8F27 .byte $15 + ; $8F28 .byte $01 + ; $8F29 .byte $1A + ; $8F2A .byte $01 + ; $8F2B .byte $1E + ; $8F2C .byte $01 + ; $8F2D .byte $21 + ; $8F2E .byte $01 + ; $8F2F .byte $23 + ; $8F30 .byte $01 + ; $8F31 .byte $24 + ; $8F32 .byte $01 + ; $8F33 .byte $24 + ; $8F34 .byte $01 + ; $8F35 .byte $23 + ; $8F36 .byte $01 + ; $8F37 .byte $21 + ; $8F38 .byte $01 + ; $8F39 .byte $1E + ; $8F3A .byte $01 + ; $8F3B .byte $1A + ; $8F3C .byte $01 + ; $8F3D .byte $15 + ; $8F3E .byte $01 + ; $8F3F .byte $0F + ; $8F40 .byte $01 + ; $8F41 .byte $08 + ; $8F42 .byte $01 + ; $8F43 .byte $00 + ; $8F44 .byte $01 + ; $8F45 .byte $FD + ; $8F46 .byte $01 + ; $8F47 COND_FA -- tests the $5A state register and the $4E flag before branching through $96C8 .byte $E7, $D1, $06, $08, $01, $0F, $01, $15, $01, $1A, $01, $1E, $01, $21, $01, $23 ; CPU:$8F20 PRG:0F20 E7 D1 06 08 01 0F 01 15 01 1A 01 1E 01 21 01 23 .byte $01, $24, $01, $24, $01, $23, $01, $21, $01, $1E, $01, $1A, $01, $15, $01, $0F ; CPU:$8F30 PRG:0F30 01 24 01 24 01 23 01 21 01 1E 01 1A 01 15 01 0F .byte $01, $08, $01, $00, $01, $FD, $01, $E2 ; CPU:$8F40 PRG:0F40 01 08 01 00 01 FD 01 E2 ; Pass 3: bytecode program, table index/indices [32], 41 bytes. ; ---- data $8F48-$8F70 (41 bytes) ---- BytecodeProgram_0E: +; --- bytecode listing: 41 bytes, 3 opcodes, 36 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $8F48 SET_RATE $0C -- stores the inline byte into $43 as this actor's rate + ; $8F4A .byte $08 + ; $8F4B .byte $00 + ; $8F4C .byte $0F + ; $8F4D .byte $00 + ; $8F4E .byte $15 + ; $8F4F .byte $FF + ; $8F50 .byte $1A + ; $8F51 .byte $00 + ; $8F52 .byte $1E + ; $8F53 .byte $FF + ; $8F54 .byte $21 + ; $8F55 .byte $00 + ; $8F56 .byte $23 + ; $8F57 .byte $FF + ; $8F58 .byte $24 + ; $8F59 .byte $00 + ; $8F5A .byte $24 + ; $8F5B .byte $FF + ; $8F5C .byte $23 + ; $8F5D .byte $00 + ; $8F5E .byte $21 + ; $8F5F .byte $FF + ; $8F60 .byte $1E + ; $8F61 .byte $00 + ; $8F62 .byte $1A + ; $8F63 .byte $FF + ; $8F64 .byte $15 + ; $8F65 .byte $00 + ; $8F66 .byte $0F + ; $8F67 .byte $FF + ; $8F68 .byte $08 + ; $8F69 .byte $00 + ; $8F6A .byte $00 + ; $8F6B .byte $FF + ; $8F6C .byte $F8 + ; $8F6D .byte $00 + ; $8F6E DRAW_SPRITE $18 -- uses the inline byte as a count for the $A660 sprite/blit helper + ; $8F70 COND_FB -- the $FB half of the $96C8 condition test .byte $D1, $0C, $08, $00, $0F, $00, $15, $FF, $1A, $00, $1E, $FF, $21, $00, $23, $FF ; CPU:$8F48 PRG:0F48 D1 0C 08 00 0F 00 15 FF 1A 00 1E FF 21 00 23 FF .byte $24, $00, $24, $FF, $23, $00, $21, $FF, $1E, $00, $1A, $FF, $15, $00, $0F, $FF ; CPU:$8F58 PRG:0F58 24 00 24 FF 23 00 21 FF 1E 00 1A FF 15 00 0F FF .byte $08, $00, $00, $FF, $F8, $00, $D7, $18, $E3 ; CPU:$8F68 PRG:0F68 08 00 00 FF F8 00 D7 18 E3 ; Pass 3: bytecode program, table index/indices [29], 35 bytes. ; ---- data $8F71-$8F93 (35 bytes) ---- BytecodeProgram_0F: +; --- bytecode listing: 35 bytes, 34 opcodes, 0 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $8F71 SET_RATE $06 -- stores the inline byte into $43 as this actor's rate + ; $8F73 STEP_DOWN -- SaveStreamPos, $9732, step $4B:=2 and accumulate + ; $8F74 STEP_DOWN -- SaveStreamPos, $9732, step $4B:=2 and accumulate + ; $8F75 STEP_DOWN -- SaveStreamPos, $9732, step $4B:=2 and accumulate + ; $8F76 STEP_DOWN -- SaveStreamPos, $9732, step $4B:=2 and accumulate + ; $8F77 STEP_DOWN -- SaveStreamPos, $9732, step $4B:=2 and accumulate + ; $8F78 STEP_DOWN -- SaveStreamPos, $9732, step $4B:=2 and accumulate + ; $8F79 STEP_DOWN -- SaveStreamPos, $9732, step $4B:=2 and accumulate + ; $8F7A STEP_DOWN -- SaveStreamPos, $9732, step $4B:=2 and accumulate + ; $8F7B STEP_DOWN -- SaveStreamPos, $9732, step $4B:=2 and accumulate + ; $8F7C STEP_DOWN -- SaveStreamPos, $9732, step $4B:=2 and accumulate + ; $8F7D STEP_DOWN -- SaveStreamPos, $9732, step $4B:=2 and accumulate + ; $8F7E STEP_DOWN -- SaveStreamPos, $9732, step $4B:=2 and accumulate + ; $8F7F STEP_DOWN -- SaveStreamPos, $9732, step $4B:=2 and accumulate + ; $8F80 STEP_DOWN -- SaveStreamPos, $9732, step $4B:=2 and accumulate + ; $8F81 STEP_DOWN -- SaveStreamPos, $9732, step $4B:=2 and accumulate + ; $8F82 STEP_DOWN -- SaveStreamPos, $9732, step $4B:=2 and accumulate + ; $8F83 STEP_DOWN_COND -- as $E8 but gated on the $5A state sign bit + ; $8F84 STEP_DOWN_COND -- as $E8 but gated on the $5A state sign bit + ; $8F85 STEP_DOWN_COND -- as $E8 but gated on the $5A state sign bit + ; $8F86 STEP_DOWN_COND -- as $E8 but gated on the $5A state sign bit + ; $8F87 STEP_DOWN_COND -- as $E8 but gated on the $5A state sign bit + ; $8F88 STEP_DOWN_COND -- as $E8 but gated on the $5A state sign bit + ; $8F89 STEP_DOWN_COND -- as $E8 but gated on the $5A state sign bit + ; $8F8A STEP_DOWN_COND -- as $E8 but gated on the $5A state sign bit + ; $8F8B STEP_DOWN_COND -- as $E8 but gated on the $5A state sign bit + ; $8F8C STEP_DOWN_COND -- as $E8 but gated on the $5A state sign bit + ; $8F8D STEP_DOWN_COND -- as $E8 but gated on the $5A state sign bit + ; $8F8E STEP_DOWN_COND -- as $E8 but gated on the $5A state sign bit + ; $8F8F STEP_DOWN_COND -- as $E8 but gated on the $5A state sign bit + ; $8F90 STEP_DOWN_COND -- as $E8 but gated on the $5A state sign bit + ; $8F91 STEP_DOWN_COND -- as $E8 but gated on the $5A state sign bit + ; $8F92 STEP_DOWN_COND -- as $E8 but gated on the $5A state sign bit + ; $8F93 RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor .byte $D1, $06, $E8, $E8, $E8, $E8, $E8, $E8, $E8, $E8, $E8, $E8, $E8, $E8, $E8, $E8 ; CPU:$8F71 PRG:0F71 D1 06 E8 E8 E8 E8 E8 E8 E8 E8 E8 E8 E8 E8 E8 E8 .byte $E8, $E8, $E9, $E9, $E9, $E9, $E9, $E9, $E9, $E9, $E9, $E9, $E9, $E9, $E9, $E9 ; CPU:$8F81 PRG:0F81 E8 E8 E9 E9 E9 E9 E9 E9 E9 E9 E9 E9 E9 E9 E9 E9 .byte $E9, $E9, $D0 ; CPU:$8F91 PRG:0F91 E9 E9 D0 ; Pass 3: bytecode program, table index/indices [16], 105 bytes. ; ---- data $8F94-$8FFC (105 bytes) ---- BytecodeProgram_10: +; --- bytecode listing: 105 bytes, 3 opcodes, 100 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $8F94 SWAP_OPERANDS -- exchanges the $39[Y]/$3A[Y] operand pair around the $A4FF and $A4F2 helpers + ; $8F95 SET_RATE $08 -- stores the inline byte into $43 as this actor's rate + ; $8F97 .byte $08 + ; $8F98 .byte $00 + ; $8F99 .byte $10 + ; $8F9A .byte $00 + ; $8F9B .byte $18 + ; $8F9C .byte $00 + ; $8F9D .byte $20 + ; $8F9E .byte $00 + ; $8F9F .byte $28 + ; $8FA0 .byte $00 + ; $8FA1 .byte $30 + ; $8FA2 .byte $00 + ; $8FA3 .byte $38 + ; $8FA4 .byte $00 + ; $8FA5 .byte $40 + ; $8FA6 .byte $00 + ; $8FA7 .byte $48 + ; $8FA8 .byte $00 + ; $8FA9 .byte $50 + ; $8FAA .byte $00 + ; $8FAB .byte $58 + ; $8FAC .byte $00 + ; $8FAD .byte $60 + ; $8FAE .byte $00 + ; $8FAF .byte $68 + ; $8FB0 .byte $00 + ; $8FB1 .byte $70 + ; $8FB2 .byte $00 + ; $8FB3 .byte $78 + ; $8FB4 .byte $00 + ; $8FB5 .byte $80 + ; $8FB6 .byte $00 + ; $8FB7 .byte $88 + ; $8FB8 .byte $00 + ; $8FB9 .byte $90 + ; $8FBA .byte $00 + ; $8FBB .byte $98 + ; $8FBC .byte $00 + ; $8FBD .byte $A0 + ; $8FBE .byte $00 + ; $8FBF .byte $A8 + ; $8FC0 .byte $00 + ; $8FC1 .byte $B0 + ; $8FC2 .byte $00 + ; $8FC3 .byte $B8 -- VRAM run fill selector (VramRunFillValues[0..11] span $B8-$C3) + ; $8FC4 .byte $00 + ; $8FC5 .byte $C0 + ; $8FC6 .byte $00 + ; $8FC7 SET_RATE $02 -- stores the inline byte into $43 as this actor's rate + ; $8FC9 .byte $C7 + ; $8FCA .byte $04 + ; $8FCB .byte $C0 + ; $8FCC .byte $00 + ; $8FCD .byte $B8 -- VRAM run fill selector (VramRunFillValues[0..11] span $B8-$C3) + ; $8FCE .byte $00 + ; $8FCF .byte $B0 + ; $8FD0 .byte $00 + ; $8FD1 .byte $A8 + ; $8FD2 .byte $00 + ; $8FD3 .byte $A0 + ; $8FD4 .byte $00 + ; $8FD5 .byte $98 + ; $8FD6 .byte $00 + ; $8FD7 .byte $90 + ; $8FD8 .byte $00 + ; $8FD9 .byte $88 + ; $8FDA .byte $00 + ; $8FDB .byte $80 + ; $8FDC .byte $00 + ; $8FDD .byte $78 + ; $8FDE .byte $00 + ; $8FDF .byte $70 + ; $8FE0 .byte $00 + ; $8FE1 .byte $68 + ; $8FE2 .byte $00 + ; $8FE3 .byte $60 + ; $8FE4 .byte $00 + ; $8FE5 .byte $58 + ; $8FE6 .byte $00 + ; $8FE7 .byte $50 + ; $8FE8 .byte $00 + ; $8FE9 .byte $48 + ; $8FEA .byte $00 + ; $8FEB .byte $40 + ; $8FEC .byte $00 + ; $8FED .byte $38 + ; $8FEE .byte $00 + ; $8FEF .byte $30 + ; $8FF0 .byte $00 + ; $8FF1 .byte $28 + ; $8FF2 .byte $00 + ; $8FF3 .byte $20 + ; $8FF4 .byte $00 + ; $8FF5 .byte $18 + ; $8FF6 .byte $00 + ; $8FF7 .byte $10 + ; $8FF8 .byte $00 + ; $8FF9 .byte $08 + ; $8FFA .byte $00 + ; $8FFB .byte $00 + ; $8FFC .byte $00 .byte $E7, $D1, $08, $08, $00, $10, $00, $18, $00, $20, $00, $28, $00, $30, $00, $38 ; CPU:$8F94 PRG:0F94 E7 D1 08 08 00 10 00 18 00 20 00 28 00 30 00 38 .byte $00, $40, $00, $48, $00, $50, $00, $58, $00, $60, $00, $68, $00, $70, $00, $78 ; CPU:$8FA4 PRG:0FA4 00 40 00 48 00 50 00 58 00 60 00 68 00 70 00 78 .byte $00, $80, $00, $88, $00, $90, $00, $98, $00, $A0, $00, $A8, $00, $B0, $00, $B8 ; CPU:$8FB4 PRG:0FB4 00 80 00 88 00 90 00 98 00 A0 00 A8 00 B0 00 B8 @@ -3575,10 +4361,123 @@ BytecodeProgram_10: ; Pass 3: bytecode program, table index/indices [15], 11 bytes. ; ---- data $8FFD-$9007 (11 bytes) ---- BytecodeProgram_11: +; --- bytecode listing: 11 bytes, 7 opcodes, 0 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $8FFD SET_WAIT $1E -- stores the inline byte into $7A as this actor's wait/step count + ; $8FFF TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $9000 SET_RATE $00 -- stores the inline byte into $43 as this actor's rate + ; $9002 SET_WAIT $64 -- stores the inline byte into $7A as this actor's wait/step count + ; $9004 TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $9005 SET_RATE $02 -- stores the inline byte into $43 as this actor's rate + ; $9007 RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor .byte $E1, $1E, $E5, $D1, $00, $E1, $64, $E5, $D1, $02, $D0 ; CPU:$8FFD PRG:0FFD E1 1E E5 D1 00 E1 64 E5 D1 02 D0 ; Pass 3: bytecode program, table index/indices [17], 105 bytes. ; ---- data $9008-$9070 (105 bytes) ---- BytecodeProgram_12: +; --- bytecode listing: 105 bytes, 4 opcodes, 98 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $9008 SET_RATE $01 -- stores the inline byte into $43 as this actor's rate + ; $900A .byte $08 + ; $900B .byte $00 + ; $900C .byte $10 + ; $900D .byte $00 + ; $900E .byte $18 + ; $900F .byte $00 + ; $9010 .byte $20 + ; $9011 .byte $00 + ; $9012 .byte $28 + ; $9013 .byte $00 + ; $9014 .byte $30 + ; $9015 .byte $00 + ; $9016 .byte $38 + ; $9017 .byte $00 + ; $9018 .byte $40 + ; $9019 .byte $00 + ; $901A .byte $48 + ; $901B .byte $00 + ; $901C .byte $50 + ; $901D .byte $00 + ; $901E .byte $58 + ; $901F .byte $00 + ; $9020 .byte $60 + ; $9021 .byte $00 + ; $9022 .byte $68 + ; $9023 .byte $00 + ; $9024 .byte $70 + ; $9025 .byte $00 + ; $9026 .byte $78 + ; $9027 .byte $00 + ; $9028 .byte $80 + ; $9029 .byte $00 + ; $902A .byte $88 + ; $902B .byte $00 + ; $902C .byte $90 + ; $902D .byte $00 + ; $902E .byte $98 + ; $902F .byte $00 + ; $9030 .byte $A0 + ; $9031 .byte $00 + ; $9032 .byte $A8 + ; $9033 .byte $00 + ; $9034 .byte $B0 + ; $9035 .byte $00 + ; $9036 .byte $B8 -- VRAM run fill selector (VramRunFillValues[0..11] span $B8-$C3) + ; $9037 .byte $00 + ; $9038 SET_RATE $82 -- stores the inline byte into $43 as this actor's rate + ; $903A .byte $C7 + ; $903B .byte $FC + ; $903C ACCUM_PLUS_6 -- SaveStreamPos and adds 6 to the accumulator $3A[Y] + ; $903D .byte $B6 + ; $903E .byte $00 + ; $903F .byte $AE + ; $9040 .byte $00 + ; $9041 .byte $A6 + ; $9042 .byte $00 + ; $9043 .byte $9E + ; $9044 .byte $00 + ; $9045 .byte $96 + ; $9046 .byte $00 + ; $9047 .byte $8E + ; $9048 .byte $00 + ; $9049 .byte $86 + ; $904A .byte $00 + ; $904B .byte $7E + ; $904C .byte $00 + ; $904D .byte $76 + ; $904E .byte $00 + ; $904F .byte $6E + ; $9050 .byte $00 + ; $9051 .byte $66 + ; $9052 .byte $00 + ; $9053 .byte $5E + ; $9054 .byte $00 + ; $9055 .byte $56 + ; $9056 .byte $00 + ; $9057 .byte $4E + ; $9058 .byte $00 + ; $9059 .byte $46 + ; $905A .byte $00 + ; $905B .byte $3E + ; $905C .byte $00 + ; $905D .byte $36 + ; $905E .byte $00 + ; $905F .byte $2E + ; $9060 .byte $00 + ; $9061 .byte $26 + ; $9062 .byte $00 + ; $9063 .byte $1E + ; $9064 .byte $00 + ; $9065 .byte $16 + ; $9066 .byte $00 + ; $9067 .byte $0E + ; $9068 .byte $00 + ; $9069 .byte $06 + ; $906A .byte $00 + ; $906B .byte $FE + ; $906C .byte $00 + ; $906D .byte $F6 + ; $906E .byte $00 + ; $906F DRAW_SPRITE $20 -- uses the inline byte as a count for the $A660 sprite/blit helper .byte $D1, $01, $08, $00, $10, $00, $18, $00, $20, $00, $28, $00, $30, $00, $38, $00 ; CPU:$9008 PRG:1008 D1 01 08 00 10 00 18 00 20 00 28 00 30 00 38 00 .byte $40, $00, $48, $00, $50, $00, $58, $00, $60, $00, $68, $00, $70, $00, $78, $00 ; CPU:$9018 PRG:1018 40 00 48 00 50 00 58 00 60 00 68 00 70 00 78 00 .byte $80, $00, $88, $00, $90, $00, $98, $00, $A0, $00, $A8, $00, $B0, $00, $B8, $00 ; CPU:$9028 PRG:1028 80 00 88 00 90 00 98 00 A0 00 A8 00 B0 00 B8 00 @@ -3589,38 +4488,203 @@ BytecodeProgram_12: ; Pass 3: bytecode program, table index/indices [27], 12 bytes. ; ---- data $9071-$907C (12 bytes) ---- BytecodeProgram_13: +; --- bytecode listing: 12 bytes, 7 opcodes, 2 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $9071 PLAY_SEQ_BD20 -- runs sound sequence $BD20 through the $99E4 dispatcher + ; $9072 SET_WAIT $78 -- stores the inline byte into $7A as this actor's wait/step count + ; $9074 SET_DIRECTION -- sets the $5C direction flag from bit 0 of $24 + ; $9075 SET_RATE $06 -- stores the inline byte into $43 as this actor's rate + ; $9077 .byte $FD + ; $9078 .byte $00 + ; $9079 SET_WAIT $08 -- stores the inline byte into $7A as this actor's wait/step count + ; $907B TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $907C RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor .byte $DB, $E1, $78, $DA, $D1, $06, $FD, $00, $E1, $08, $E5, $D0 ; CPU:$9071 PRG:1071 DB E1 78 DA D1 06 FD 00 E1 08 E5 D0 ; Pass 3: bytecode program, table index/indices [0], 4 bytes. ; ---- data $907D-$9080 (4 bytes) ---- BytecodeProgram_14: +; --- bytecode listing: 4 bytes, 3 opcodes, 0 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $907D SET_RATE $0B -- stores the inline byte into $43 as this actor's rate + ; $907F SET_STEP_12 -- sets the step byte $4B to $12 + ; $9080 ACC_ADD_1_STEP -- SaveStreamPos; adds 1 to the accumulator via $9653, then folds the step byte into $0033[Y] .byte $D1, $0B, $CC, $CD ; CPU:$907D PRG:107D D1 0B CC CD ; Pass 3: bytecode program, table index/indices [1], 37 bytes. ; ---- data $9081-$90A5 (37 bytes) ---- BytecodeProgram_15: +; --- bytecode listing: 37 bytes, 11 opcodes, 20 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $9081 SET_RATE $0B -- stores the inline byte into $43 as this actor's rate + ; $9083 SET_WAIT $08 -- stores the inline byte into $7A as this actor's wait/step count + ; $9085 MOVE_DIAG -- position update: $4F+=2, $9A3F, a $A660 helper call and two $9A2E operand pushes + ; $9086 SET_RATE $0A -- stores the inline byte into $43 as this actor's rate + ; $9088 SET_WAIT $1E -- stores the inline byte into $7A as this actor's wait/step count + ; $908A MOVE_DIAG -- position update: $4F+=2, $9A3F, a $A660 helper call and two $9A2E operand pushes + ; $908B .byte $13 + ; $908C .byte $01 + ; $908D .byte $12 + ; $908E .byte $01 + ; $908F .byte $10 + ; $9090 .byte $01 + ; $9091 .byte $0E + ; $9092 .byte $01 + ; $9093 .byte $0B + ; $9094 .byte $01 + ; $9095 .byte $08 + ; $9096 .byte $01 + ; $9097 .byte $04 + ; $9098 .byte $01 + ; $9099 .byte $00 + ; $909A .byte $01 + ; $909B .byte $FC + ; $909C .byte $01 + ; $909D .byte $F8 + ; $909E .byte $01 + ; $909F DRAW_SPRITE $1C -- uses the inline byte as a count for the $A660 sprite/blit helper + ; $90A1 SET_FLAG_FF -- stores $FF into $82 + ; $90A2 SET_WAIT $1E -- stores the inline byte into $7A as this actor's wait/step count + ; $90A4 SET_DIRECTION -- sets the $5C direction flag from bit 0 of $24 + ; $90A5 RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor .byte $D1, $0B, $E1, $08, $D2, $D1, $0A, $E1, $1E, $D2, $13, $01, $12, $01, $10, $01 ; CPU:$9081 PRG:1081 D1 0B E1 08 D2 D1 0A E1 1E D2 13 01 12 01 10 01 .byte $0E, $01, $0B, $01, $08, $01, $04, $01, $00, $01, $FC, $01, $F8, $01, $D7, $1C ; CPU:$9091 PRG:1091 0E 01 0B 01 08 01 04 01 00 01 FC 01 F8 01 D7 1C .byte $E0, $E1, $1E, $DA, $D0 ; CPU:$90A1 PRG:10A1 E0 E1 1E DA D0 ; Pass 3: bytecode program, table index/indices [26], 19 bytes. ; ---- data $90A6-$90B8 (19 bytes) ---- BytecodeProgram_16: +; --- bytecode listing: 19 bytes, 2 opcodes, 16 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $90A6 SET_RATE $01 -- stores the inline byte into $43 as this actor's rate + ; $90A8 .byte $13 + ; $90A9 .byte $00 + ; $90AA .byte $12 + ; $90AB .byte $00 + ; $90AC .byte $10 + ; $90AD .byte $00 + ; $90AE .byte $0E + ; $90AF .byte $00 + ; $90B0 .byte $0B + ; $90B1 .byte $00 + ; $90B2 .byte $08 + ; $90B3 .byte $00 + ; $90B4 .byte $04 + ; $90B5 .byte $00 + ; $90B6 .byte $00 + ; $90B7 .byte $00 + ; $90B8 COND_FA -- tests the $5A state register and the $4E flag before branching through $96C8 .byte $D1, $01, $13, $00, $12, $00, $10, $00, $0E, $00, $0B, $00, $08, $00, $04, $00 ; CPU:$90A6 PRG:10A6 D1 01 13 00 12 00 10 00 0E 00 0B 00 08 00 04 00 .byte $00, $00, $E2 ; CPU:$90B6 PRG:10B6 00 00 E2 ; Pass 3: bytecode program, table index/indices [5], 17 bytes. ; ---- data $90B9-$90C9 (17 bytes) ---- BytecodeProgram_17: +; --- bytecode listing: 17 bytes, 2 opcodes, 14 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $90B9 SET_RATE $01 -- stores the inline byte into $43 as this actor's rate + ; $90BB .byte $13 + ; $90BC .byte $00 + ; $90BD .byte $12 + ; $90BE .byte $00 + ; $90BF .byte $10 + ; $90C0 .byte $00 + ; $90C1 .byte $0E + ; $90C2 .byte $00 + ; $90C3 .byte $0B + ; $90C4 .byte $00 + ; $90C5 .byte $08 + ; $90C6 .byte $00 + ; $90C7 .byte $04 + ; $90C8 .byte $00 + ; $90C9 SET_ACTIVE_80 -- sets $F0 to $80 and falls into the $94CF accumulator clear .byte $D1, $01, $13, $00, $12, $00, $10, $00, $0E, $00, $0B, $00, $08, $00, $04, $00 ; CPU:$90B9 PRG:10B9 D1 01 13 00 12 00 10 00 0E 00 0B 00 08 00 04 00 .byte $EA ; CPU:$90C9 PRG:10C9 EA ; Pass 3: bytecode program, table index/indices [2], 13 bytes. ; ---- data $90CA-$90D6 (13 bytes) ---- BytecodeProgram_18: +; --- bytecode listing: 13 bytes, 9 opcodes, 0 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $90CA SET_RATE $03 -- stores the inline byte into $43 as this actor's rate + ; $90CC SET_WAIT $08 -- stores the inline byte into $7A as this actor's wait/step count + ; $90CE TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $90CF SET_RATE $08 -- stores the inline byte into $43 as this actor's rate + ; $90D1 ANIMATE_CHECK -- animation-frame test via $97FC/$A4DF, then a $99E2 call + ; $90D2 SET_FLAG_FF -- stores $FF into $82 + ; $90D3 SET_WAIT $1E -- stores the inline byte into $7A as this actor's wait/step count + ; $90D5 TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $90D6 RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor .byte $D1, $03, $E1, $08, $E5, $D1, $08, $D8, $E0, $E1, $1E, $E5, $D0 ; CPU:$90CA PRG:10CA D1 03 E1 08 E5 D1 08 D8 E0 E1 1E E5 D0 ; Pass 3: bytecode program, table index/indices [12], 7 bytes. ; ---- data $90D7-$90DD (7 bytes) ---- BytecodeProgram_19: +; --- bytecode listing: 7 bytes, 5 opcodes, 0 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $90D7 SET_FLAG_FF -- stores $FF into $82 + ; $90D8 SET_RATE $05 -- stores the inline byte into $43 as this actor's rate + ; $90DA SET_WAIT $20 -- stores the inline byte into $7A as this actor's wait/step count + ; $90DC MOVE_ACTOR_DIR -- direction-dependent position update over $F6/$F7 + ; $90DD RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor .byte $E0, $D1, $05, $E1, $20, $DF, $D0 ; CPU:$90D7 PRG:10D7 E0 D1 05 E1 20 DF D0 ; Pass 3: bytecode program, table index/indices [3], 59 bytes. ; ---- data $90DE-$9118 (59 bytes) ---- BytecodeProgram_1A: +; --- bytecode listing: 59 bytes, 58 opcodes, 0 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $90DE SET_RATE $06 -- stores the inline byte into $43 as this actor's rate + ; $90E0 ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $90E1 SET_STEP_2 -- SaveStreamPos, step byte $4B:=2 and add 1 to the accumulator + ; $90E2 ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $90E3 SET_STEP_2 -- SaveStreamPos, step byte $4B:=2 and add 1 to the accumulator + ; $90E4 ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $90E5 SET_STEP_2 -- SaveStreamPos, step byte $4B:=2 and add 1 to the accumulator + ; $90E6 ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $90E7 SET_STEP_2 -- SaveStreamPos, step byte $4B:=2 and add 1 to the accumulator + ; $90E8 ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $90E9 SET_STEP_2 -- SaveStreamPos, step byte $4B:=2 and add 1 to the accumulator + ; $90EA ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $90EB SET_STEP_2 -- SaveStreamPos, step byte $4B:=2 and add 1 to the accumulator + ; $90EC ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $90ED SET_STEP_2 -- SaveStreamPos, step byte $4B:=2 and add 1 to the accumulator + ; $90EE ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $90EF SET_STEP_2 -- SaveStreamPos, step byte $4B:=2 and add 1 to the accumulator + ; $90F0 ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $90F1 SET_STEP_2 -- SaveStreamPos, step byte $4B:=2 and add 1 to the accumulator + ; $90F2 ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $90F3 SET_STEP_2 -- SaveStreamPos, step byte $4B:=2 and add 1 to the accumulator + ; $90F4 ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $90F5 SET_STEP_2 -- SaveStreamPos, step byte $4B:=2 and add 1 to the accumulator + ; $90F6 ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $90F7 SET_STEP_2 -- SaveStreamPos, step byte $4B:=2 and add 1 to the accumulator + ; $90F8 ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $90F9 STEP_ACCUM -- subtracts $4B>>1 from the accumulator with $FD/$06 saturation clamping + ; $90FA ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $90FB STEP_ACCUM -- subtracts $4B>>1 from the accumulator with $FD/$06 saturation clamping + ; $90FC ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $90FD STEP_ACCUM -- subtracts $4B>>1 from the accumulator with $FD/$06 saturation clamping + ; $90FE ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $90FF STEP_ACCUM -- subtracts $4B>>1 from the accumulator with $FD/$06 saturation clamping + ; $9100 ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $9101 STEP_ACCUM -- subtracts $4B>>1 from the accumulator with $FD/$06 saturation clamping + ; $9102 ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $9103 STEP_ACCUM -- subtracts $4B>>1 from the accumulator with $FD/$06 saturation clamping + ; $9104 ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $9105 STEP_ACCUM -- subtracts $4B>>1 from the accumulator with $FD/$06 saturation clamping + ; $9106 ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $9107 STEP_ACCUM -- subtracts $4B>>1 from the accumulator with $FD/$06 saturation clamping + ; $9108 ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $9109 STEP_ACCUM -- subtracts $4B>>1 from the accumulator with $FD/$06 saturation clamping + ; $910A ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $910B STEP_ACCUM -- subtracts $4B>>1 from the accumulator with $FD/$06 saturation clamping + ; $910C ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $910D STEP_ACCUM -- subtracts $4B>>1 from the accumulator with $FD/$06 saturation clamping + ; $910E ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $910F STEP_ACCUM -- subtracts $4B>>1 from the accumulator with $FD/$06 saturation clamping + ; $9110 ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $9111 STEP_ACCUM -- subtracts $4B>>1 from the accumulator with $FD/$06 saturation clamping + ; $9112 ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $9113 STEP_ACCUM -- subtracts $4B>>1 from the accumulator with $FD/$06 saturation clamping + ; $9114 ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $9115 STEP_ACCUM -- subtracts $4B>>1 from the accumulator with $FD/$06 saturation clamping + ; $9116 ANIMATE_ADVANCE -- animation-frame advance: $4F+=2, $5A:=$FF, $A660 call + ; $9117 STEP_ACCUM -- subtracts $4B>>1 from the accumulator with $FD/$06 saturation clamping + ; $9118 RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor .byte $D1, $06, $D9, $D4, $D9, $D4, $D9, $D4, $D9, $D4, $D9, $D4, $D9, $D4, $D9, $D4 ; CPU:$90DE PRG:10DE D1 06 D9 D4 D9 D4 D9 D4 D9 D4 D9 D4 D9 D4 D9 D4 .byte $D9, $D4, $D9, $D4, $D9, $D4, $D9, $D4, $D9, $D4, $D9, $D5, $D9, $D5, $D9, $D5 ; CPU:$90EE PRG:10EE D9 D4 D9 D4 D9 D4 D9 D4 D9 D4 D9 D5 D9 D5 D9 D5 .byte $D9, $D5, $D9, $D5, $D9, $D5, $D9, $D5, $D9, $D5, $D9, $D5, $D9, $D5, $D9, $D5 ; CPU:$90FE PRG:10FE D9 D5 D9 D5 D9 D5 D9 D5 D9 D5 D9 D5 D9 D5 D9 D5 @@ -3628,19 +4692,96 @@ BytecodeProgram_1A: ; Pass 3: bytecode program, table index/indices [4], 24 bytes. ; ---- data $9119-$9130 (24 bytes) ---- BytecodeProgram_1B: +; --- bytecode listing: 24 bytes, 16 opcodes, 0 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $9119 DRAW_SPRITE $1C -- uses the inline byte as a count for the $A660 sprite/blit helper + ; $911B SET_FLAG_FF -- stores $FF into $82 + ; $911C SET_WAIT $1E -- stores the inline byte into $7A as this actor's wait/step count + ; $911E SET_DIRECTION -- sets the $5C direction flag from bit 0 of $24 + ; $911F RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor + ; $9120 SET_RATE $06 -- stores the inline byte into $43 as this actor's rate + ; $9122 SET_WAIT $08 -- stores the inline byte into $7A as this actor's wait/step count + ; $9124 TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $9125 SET_RATE $0C -- stores the inline byte into $43 as this actor's rate + ; $9127 SET_WAIT $1E -- stores the inline byte into $7A as this actor's wait/step count + ; $9129 SET_DIRECTION -- sets the $5C direction flag from bit 0 of $24 + ; $912A SET_RATE $06 -- stores the inline byte into $43 as this actor's rate + ; $912C SET_WAIT $08 -- stores the inline byte into $7A as this actor's wait/step count + ; $912E TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $912F CLEAR_ACTIVE -- clears $F0 when it currently holds $80 + ; $9130 RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor .byte $D7, $1C, $E0, $E1, $1E, $DA, $D0, $D1, $06, $E1, $08, $E5, $D1, $0C, $E1, $1E ; CPU:$9119 PRG:1119 D7 1C E0 E1 1E DA D0 D1 06 E1 08 E5 D1 0C E1 1E .byte $DA, $D1, $06, $E1, $08, $E5, $EB, $D0 ; CPU:$9129 PRG:1129 DA D1 06 E1 08 E5 EB D0 ; Pass 3: bytecode program, table index/indices [6], 5 bytes. ; ---- data $9131-$9135 (5 bytes) ---- BytecodeProgram_1C: +; --- bytecode listing: 5 bytes, 4 opcodes, 0 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $9131 SET_WAIT $1E -- stores the inline byte into $7A as this actor's wait/step count + ; $9133 SET_DIRECTION -- sets the $5C direction flag from bit 0 of $24 + ; $9134 CLEAR_ACTIVE -- clears $F0 when it currently holds $80 + ; $9135 RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor .byte $E1, $1E, $DA, $EB, $D0 ; CPU:$9131 PRG:1131 E1 1E DA EB D0 ; Pass 3: bytecode program, table index/indices [7], 11 bytes. ; ---- data $9136-$9140 (11 bytes) ---- BytecodeProgram_1D: +; --- bytecode listing: 11 bytes, 7 opcodes, 0 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $9136 SET_RATE $08 -- stores the inline byte into $43 as this actor's rate + ; $9138 SET_WAIT $08 -- stores the inline byte into $7A as this actor's wait/step count + ; $913A TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $913B SET_RATE $09 -- stores the inline byte into $43 as this actor's rate + ; $913D SET_WAIT $1E -- stores the inline byte into $7A as this actor's wait/step count + ; $913F TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $9140 SET_ACTIVE_80 -- sets $F0 to $80 and falls into the $94CF accumulator clear .byte $D1, $08, $E1, $08, $E5, $D1, $09, $E1, $1E, $E5, $EA ; CPU:$9136 PRG:1136 D1 08 E1 08 E5 D1 09 E1 1E E5 EA ; Pass 3: bytecode program, table index/indices [8], 52 bytes. ; ---- data $9141-$9174 (52 bytes) ---- BytecodeProgram_1E: +; --- bytecode listing: 52 bytes, 18 opcodes, 24 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $9141 SET_RATE $06 -- stores the inline byte into $43 as this actor's rate + ; $9143 SET_WAIT $08 -- stores the inline byte into $7A as this actor's wait/step count + ; $9145 TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $9146 .byte $0C + ; $9147 .byte $FE + ; $9148 SET_WAIT $08 -- stores the inline byte into $7A as this actor's wait/step count + ; $914A TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $914B SET_RATE $0C -- stores the inline byte into $43 as this actor's rate + ; $914D .byte $10 + ; $914E .byte $FA + ; $914F .byte $10 + ; $9150 .byte $FE + ; $9151 .byte $10 + ; $9152 .byte $FE + ; $9153 .byte $0F + ; $9154 .byte $FE + ; $9155 .byte $0D + ; $9156 .byte $FE + ; $9157 SET_RATE $CB -- stores the inline byte into $43 as this actor's rate + ; $9159 .byte $0A + ; $915A .byte $FF + ; $915B .byte $07 + ; $915C .byte $FF + ; $915D .byte $04 + ; $915E .byte $FF + ; $915F .byte $00 + ; $9160 .byte $FF + ; $9161 MOVE_ACTOR_B0BA -- accumulator-indexed $A660 move plus a $99E4 call with descriptor $B0BA + ; $9162 SET_WAIT $1E -- stores the inline byte into $7A as this actor's wait/step count + ; $9164 SET_DIRECTION -- sets the $5C direction flag from bit 0 of $24 + ; $9165 SET_RATE $0C -- stores the inline byte into $43 as this actor's rate + ; $9167 .byte $F8 + ; $9168 .byte $00 + ; $9169 SET_WAIT $08 -- stores the inline byte into $7A as this actor's wait/step count + ; $916B TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $916C SET_RATE $06 -- stores the inline byte into $43 as this actor's rate + ; $916E .byte $FD + ; $916F .byte $00 + ; $9170 SET_WAIT $08 -- stores the inline byte into $7A as this actor's wait/step count + ; $9172 TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $9173 CLEAR_ACTIVE -- clears $F0 when it currently holds $80 + ; $9174 RESET_ACCUM -- clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], then starts the next actor .byte $D1, $06, $E1, $08, $E5, $0C, $FE, $E1, $08, $E5, $D1, $0C, $10, $FA, $10, $FE ; CPU:$9141 PRG:1141 D1 06 E1 08 E5 0C FE E1 08 E5 D1 0C 10 FA 10 FE .byte $10, $FE, $0F, $FE, $0D, $FE, $D1, $CB, $0A, $FF, $07, $FF, $04, $FF, $00, $FF ; CPU:$9151 PRG:1151 10 FE 0F FE 0D FE D1 CB 0A FF 07 FF 04 FF 00 FF .byte $DE, $E1, $1E, $DA, $D1, $0C, $F8, $00, $E1, $08, $E5, $D1, $06, $FD, $00, $E1 ; CPU:$9161 PRG:1161 DE E1 1E DA D1 0C F8 00 E1 08 E5 D1 06 FD 00 E1 @@ -3648,11 +4789,101 @@ BytecodeProgram_1E: ; Pass 3: bytecode program, table index/indices [18], 22 bytes. ; ---- data $9175-$918A (22 bytes) ---- BytecodeProgram_1F: +; --- bytecode listing: 22 bytes, 14 opcodes, 0 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $9175 SWAP_OPERANDS -- exchanges the $39[Y]/$3A[Y] operand pair around the $A4FF and $A4F2 helpers + ; $9176 SET_RATE $08 -- stores the inline byte into $43 as this actor's rate + ; $9178 SET_WAIT $08 -- stores the inline byte into $7A as this actor's wait/step count + ; $917A TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $917B SET_RATE $07 -- stores the inline byte into $43 as this actor's rate + ; $917D SET_WAIT $1E -- stores the inline byte into $7A as this actor's wait/step count + ; $917F TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $9180 SET_RATE $02 -- stores the inline byte into $43 as this actor's rate + ; $9182 SET_WAIT $0F -- stores the inline byte into $7A as this actor's wait/step count + ; $9184 TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $9185 SET_RATE $07 -- stores the inline byte into $43 as this actor's rate + ; $9187 SET_WAIT $0F -- stores the inline byte into $7A as this actor's wait/step count + ; $9189 TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $918A COND_FA -- tests the $5A state register and the $4E flag before branching through $96C8 .byte $E7, $D1, $08, $E1, $08, $E5, $D1, $07, $E1, $1E, $E5, $D1, $02, $E1, $0F, $E5 ; CPU:$9175 PRG:1175 E7 D1 08 E1 08 E5 D1 07 E1 1E E5 D1 02 E1 0F E5 .byte $D1, $07, $E1, $0F, $E5, $E2 ; CPU:$9185 PRG:1185 D1 07 E1 0F E5 E2 ; Pass 3: bytecode program, table index/indices [19], 85 bytes. ; ---- data $918B-$91DF (85 bytes) ---- BytecodeProgram_20: +; --- bytecode listing: 85 bytes, 16 opcodes, 56 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $918B SET_RATE $06 -- stores the inline byte into $43 as this actor's rate + ; $918D SET_WAIT $08 -- stores the inline byte into $7A as this actor's wait/step count + ; $918F TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $9190 SET_RATE $0C -- stores the inline byte into $43 as this actor's rate + ; $9192 .byte $10 + ; $9193 .byte $F8 + ; $9194 SET_WAIT $1D -- stores the inline byte into $7A as this actor's wait/step count + ; $9196 TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $9197 .byte $1C + ; $9198 .byte $FF + ; $9199 .byte $27 + ; $919A .byte $FF + ; $919B SET_RATE $CB -- stores the inline byte into $43 as this actor's rate + ; $919D .byte $31 + ; $919E .byte $FF + ; $919F .byte $3A + ; $91A0 .byte $FF + ; $91A1 .byte $42 + ; $91A2 .byte $FF + ; $91A3 SET_RATE $CC -- stores the inline byte into $43 as this actor's rate + ; $91A5 .byte $49 + ; $91A6 .byte $FF + ; $91A7 .byte $4F + ; $91A8 .byte $FF + ; $91A9 .byte $54 + ; $91AA .byte $FF + ; $91AB SET_RATE $0B -- stores the inline byte into $43 as this actor's rate + ; $91AD .byte $58 + ; $91AE .byte $FF + ; $91AF .byte $5B + ; $91B0 .byte $FF + ; $91B1 .byte $5D + ; $91B2 .byte $FF + ; $91B3 SET_RATE $0C -- stores the inline byte into $43 as this actor's rate + ; $91B5 .byte $5E + ; $91B6 .byte $FF + ; $91B7 .byte $5E + ; $91B8 .byte $FF + ; $91B9 .byte $5D + ; $91BA .byte $FF + ; $91BB SET_RATE $CB -- stores the inline byte into $43 as this actor's rate + ; $91BD .byte $5B + ; $91BE .byte $FF + ; $91BF .byte $58 + ; $91C0 .byte $FF + ; $91C1 .byte $54 + ; $91C2 .byte $FF + ; $91C3 SET_RATE $CC -- stores the inline byte into $43 as this actor's rate + ; $91C5 .byte $4F + ; $91C6 .byte $FF + ; $91C7 .byte $49 + ; $91C8 .byte $FF + ; $91C9 .byte $42 + ; $91CA .byte $FF + ; $91CB SET_RATE $0B -- stores the inline byte into $43 as this actor's rate + ; $91CD .byte $3A + ; $91CE .byte $FF + ; $91CF .byte $31 + ; $91D0 .byte $FF + ; $91D1 .byte $27 + ; $91D2 .byte $FF + ; $91D3 SET_RATE $0C -- stores the inline byte into $43 as this actor's rate + ; $91D5 .byte $1C + ; $91D6 .byte $FF + ; $91D7 .byte $10 + ; $91D8 .byte $FF + ; $91D9 .byte $04 + ; $91DA .byte $FF + ; $91DB .byte $F8 + ; $91DC .byte $FF + ; $91DD DRAW_SPRITE $18 -- uses the inline byte as a count for the $A660 sprite/blit helper + ; $91DF COND_FB -- the $FB half of the $96C8 condition test .byte $D1, $06, $E1, $08, $E5, $D1, $0C, $10, $F8, $E1, $1D, $E5, $1C, $FF, $27, $FF ; CPU:$918B PRG:118B D1 06 E1 08 E5 D1 0C 10 F8 E1 1D E5 1C FF 27 FF .byte $D1, $CB, $31, $FF, $3A, $FF, $42, $FF, $D1, $CC, $49, $FF, $4F, $FF, $54, $FF ; CPU:$919B PRG:119B D1 CB 31 FF 3A FF 42 FF D1 CC 49 FF 4F FF 54 FF .byte $D1, $0B, $58, $FF, $5B, $FF, $5D, $FF, $D1, $0C, $5E, $FF, $5E, $FF, $5D, $FF ; CPU:$91AB PRG:11AB D1 0B 58 FF 5B FF 5D FF D1 0C 5E FF 5E FF 5D FF @@ -3662,10 +4893,80 @@ BytecodeProgram_20: ; Pass 3: bytecode program, table index/indices [20], 12 bytes. ; ---- data $91E0-$91EB (12 bytes) ---- BytecodeProgram_21: +; --- bytecode listing: 12 bytes, 8 opcodes, 0 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $91E0 SWAP_OPERANDS -- exchanges the $39[Y]/$3A[Y] operand pair around the $A4FF and $A4F2 helpers + ; $91E1 SET_RATE $08 -- stores the inline byte into $43 as this actor's rate + ; $91E3 SET_WAIT $08 -- stores the inline byte into $7A as this actor's wait/step count + ; $91E5 TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $91E6 SET_RATE $00 -- stores the inline byte into $43 as this actor's rate + ; $91E8 SET_WAIT $3C -- stores the inline byte into $7A as this actor's wait/step count + ; $91EA TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $91EB COND_FA -- tests the $5A state register and the $4E flag before branching through $96C8 .byte $E7, $D1, $08, $E1, $08, $E5, $D1, $00, $E1, $3C, $E5, $E2 ; CPU:$91E0 PRG:11E0 E7 D1 08 E1 08 E5 D1 00 E1 3C E5 E2 ; Pass 3: bytecode program, table index/indices [21], 64 bytes. ; ---- data $91EC-$922B (64 bytes) ---- BytecodeProgram_22: +; --- bytecode listing: 64 bytes, 10 opcodes, 48 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $91EC SET_RATE $06 -- stores the inline byte into $43 as this actor's rate + ; $91EE SET_WAIT $08 -- stores the inline byte into $7A as this actor's wait/step count + ; $91F0 TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $91F1 SET_RATE $82 -- stores the inline byte into $43 as this actor's rate + ; $91F3 .byte $10 + ; $91F4 .byte $F8 + ; $91F5 SET_WAIT $1E -- stores the inline byte into $7A as this actor's wait/step count + ; $91F7 TICK_WAIT_STEP -- decrements the $7A wait counter; runs the body while non-zero + ; $91F8 .byte $1A + ; $91F9 .byte $00 + ; $91FA .byte $23 + ; $91FB .byte $00 + ; $91FC .byte $2B + ; $91FD .byte $00 + ; $91FE .byte $32 + ; $91FF .byte $00 + ; $9200 .byte $38 + ; $9201 .byte $00 + ; $9202 .byte $3D + ; $9203 .byte $00 + ; $9204 .byte $41 + ; $9205 .byte $00 + ; $9206 .byte $44 + ; $9207 .byte $00 + ; $9208 .byte $46 + ; $9209 .byte $00 + ; $920A .byte $47 + ; $920B .byte $00 + ; $920C SET_RATE $02 -- stores the inline byte into $43 as this actor's rate + ; $920E .byte $47 + ; $920F .byte $00 + ; $9210 .byte $46 + ; $9211 .byte $00 + ; $9212 .byte $44 + ; $9213 .byte $00 + ; $9214 .byte $41 + ; $9215 .byte $00 + ; $9216 .byte $3D + ; $9217 .byte $00 + ; $9218 .byte $38 + ; $9219 .byte $00 + ; $921A .byte $32 + ; $921B .byte $00 + ; $921C .byte $2B + ; $921D .byte $00 + ; $921E .byte $23 + ; $921F .byte $00 + ; $9220 .byte $1A + ; $9221 .byte $00 + ; $9222 .byte $10 + ; $9223 .byte $00 + ; $9224 .byte $05 + ; $9225 .byte $00 + ; $9226 .byte $F8 + ; $9227 .byte $00 + ; $9228 ACCUM_PLUS_6 -- SaveStreamPos and adds 6 to the accumulator $3A[Y] + ; $9229 DRAW_SPRITE $1E -- uses the inline byte as a count for the $A660 sprite/blit helper + ; $922B COND_FB -- the $FB half of the $96C8 condition test .byte $D1, $06, $E1, $08, $E5, $D1, $82, $10, $F8, $E1, $1E, $E5, $1A, $00, $23, $00 ; CPU:$91EC PRG:11EC D1 06 E1 08 E5 D1 82 10 F8 E1 1E E5 1A 00 23 00 .byte $2B, $00, $32, $00, $38, $00, $3D, $00, $41, $00, $44, $00, $46, $00, $47, $00 ; CPU:$91FC PRG:11FC 2B 00 32 00 38 00 3D 00 41 00 44 00 46 00 47 00 .byte $D1, $02, $47, $00, $46, $00, $44, $00, $41, $00, $3D, $00, $38, $00, $32, $00 ; CPU:$920C PRG:120C D1 02 47 00 46 00 44 00 41 00 3D 00 38 00 32 00 @@ -3673,14 +4974,28 @@ BytecodeProgram_22: ; Pass 3: bytecode program, table index/indices [9], 3 bytes. ; ---- data $922C-$922E (3 bytes) ---- BytecodeProgram_23: +; --- bytecode listing: 3 bytes, 2 opcodes, 0 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $922C SET_RATE $03 -- stores the inline byte into $43 as this actor's rate + ; $922E TIMER_FF -- decrements the $60 timer; on zero jumps to $94CF, otherwise adds $FF (-1) to the accumulator .byte $D1, $03, $DC ; CPU:$922C PRG:122C D1 03 DC ; Pass 3: bytecode program, table index/indices [10], 3 bytes. ; ---- data $922F-$9231 (3 bytes) ---- BytecodeProgram_24: +; --- bytecode listing: 3 bytes, 2 opcodes, 0 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $922F SET_RATE $01 -- stores the inline byte into $43 as this actor's rate + ; $9231 TIMER_01 -- decrements the $60 timer; clears $62 and adds 1 to the accumulator .byte $D1, $01, $DD ; CPU:$922F PRG:122F D1 01 DD ; Pass 3: bytecode program, table index/indices [30], 5 bytes. ; ---- data $9232-$9236 (5 bytes) ---- BytecodeProgram_25: +; --- bytecode listing: 5 bytes, 4 opcodes, 0 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 + ; $9232 SET_WAIT $1E -- stores the inline byte into $7A as this actor's wait/step count + ; $9234 SET_DIRECTION -- sets the $5C direction flag from bit 0 of $24 + ; $9235 SUB_TEN -- $4F-=10 and $F0=$D0 + ; $9236 WAIT_FRAME_SLOT -- advance-two-frames path: $4F-=1, $A4FF, default $F0=$80, and kick a $D1=$FF sound sequence .byte $E1, $1E, $DA, $CF, $CE ; CPU:$9232 PRG:1232 E1 1E DA CF CE ; Pass 3: 40 x 16-bit opcode handlers, index = (token - $C8). Dispatched through BytecodeHandlerPointerLo/Hi into DispatchThroughPointer (jmp ($001C)). Tokens $C8-$EF map to entries 0-39; slots the assembler never filled hold the next table's bytes. ; ---- data $9237-$9286 (80 bytes) ---- @@ -10868,6 +12183,95 @@ ClearNametablePattern_OnNonzero_AB0B: ; Pass 3: bytecode program not listed in BytecodeProgramPointerTable. ; ---- data $AB14-$AB67 (84 bytes) ---- StandaloneBytecodeProgram_3: +; --- bytecode listing: 84 bytes, 0 opcodes, 84 literal operands --- +; handler for each opcode: BytecodeHandlerTable at $9237 (token - $C8); interpreter RunBytecodeInterpreter at $9AE8 +; NOTE: this program contains no byte in $C8-$EF, so the +; interpreter takes the literal path for every byte and the +; whole block is operand data, not an instruction stream. + ; $AB14 .byte $02 + ; $AB15 .byte $20 + ; $AB16 .byte $22 + ; $AB17 .byte $27 + ; $AB18 .byte $02 + ; $AB19 .byte $20 + ; $AB1A .byte $16 + ; $AB1B .byte $27 + ; $AB1C .byte $02 + ; $AB1D .byte $26 + ; $AB1E .byte $2A + ; $AB1F .byte $37 + ; $AB20 .byte $02 + ; $AB21 .byte $10 + ; $AB22 .byte $0F + ; $AB23 .byte $27 + ; $AB24 .byte $02 + ; $AB25 .byte $3C + ; $AB26 .byte $22 + ; $AB27 .byte $27 + ; $AB28 .byte $02 + ; $AB29 .byte $3C + ; $AB2A .byte $16 + ; $AB2B .byte $27 + ; $AB2C .byte $02 + ; $AB2D .byte $26 + ; $AB2E .byte $2A + ; $AB2F .byte $37 + ; $AB30 .byte $02 + ; $AB31 .byte $10 + ; $AB32 .byte $0F + ; $AB33 .byte $27 + ; $AB34 .byte $08 + ; $AB35 .byte $30 + ; $AB36 .byte $22 + ; $AB37 .byte $27 + ; $AB38 .byte $08 + ; $AB39 .byte $30 + ; $AB3A .byte $16 + ; $AB3B .byte $27 + ; $AB3C .byte $08 + ; $AB3D .byte $26 + ; $AB3E .byte $2A + ; $AB3F .byte $37 + ; $AB40 .byte $08 + ; $AB41 .byte $00 + ; $AB42 .byte $0F + ; $AB43 .byte $27 + ; $AB44 .byte $02 + ; $AB45 .byte $16 + ; $AB46 .byte $37 + ; $AB47 .byte $30 + ; $AB48 .byte $02 + ; $AB49 .byte $12 + ; $AB4A .byte $37 + ; $AB4B .byte $28 + ; $AB4C .byte $02 + ; $AB4D .byte $0F + ; $AB4E .byte $37 + ; $AB4F .byte $16 + ; $AB50 .byte $02 + ; $AB51 .byte $0F + ; $AB52 .byte $21 + ; $AB53 .byte $16 + ; $AB54 .byte $02 + ; $AB55 .byte $0F + ; $AB56 .byte $37 + ; $AB57 .byte $10 + ; $AB58 .byte $02 + ; $AB59 .byte $0F + ; $AB5A .byte $10 + ; $AB5B .byte $28 + ; $AB5C .byte $02 + ; $AB5D .byte $1A + ; $AB5E .byte $28 + ; $AB5F .byte $18 + ; $AB60 .byte $02 + ; $AB61 .byte $18 + ; $AB62 .byte $2C + ; $AB63 .byte $0F + ; $AB64 .byte $0F + ; $AB65 .byte $0F + ; $AB66 .byte $37 + ; $AB67 .byte $30 .byte $02, $20, $22, $27, $02, $20, $16, $27, $02, $26, $2A, $37, $02, $10, $0F, $27 ; CPU:$AB14 PRG:2B14 02 20 22 27 02 20 16 27 02 26 2A 37 02 10 0F 27 .byte $02, $3C, $22, $27, $02, $3C, $16, $27, $02, $26, $2A, $37, $02, $10, $0F, $27 ; CPU:$AB24 PRG:2B24 02 3C 22 27 02 3C 16 27 02 26 2A 37 02 10 0F 27 .byte $08, $30, $22, $27, $08, $30, $16, $27, $08, $26, $2A, $37, $08, $00, $0F, $27 ; CPU:$AB34 PRG:2B34 08 30 22 27 08 30 16 27 08 26 2A 37 08 00 0F 27 diff --git a/_wip/MUSCLE (U)/copilot/reconstructed.lbl b/MUSCLE (U)/copilot/reconstructed.lbl similarity index 100% rename from _wip/MUSCLE (U)/copilot/reconstructed.lbl rename to MUSCLE (U)/copilot/reconstructed.lbl diff --git a/_wip/MUSCLE (U)/copilot/reconstructed.map b/MUSCLE (U)/copilot/reconstructed.map similarity index 100% rename from _wip/MUSCLE (U)/copilot/reconstructed.map rename to MUSCLE (U)/copilot/reconstructed.map diff --git a/_wip/MUSCLE (U)/copilot/reconstructed.nes b/MUSCLE (U)/copilot/reconstructed.nes similarity index 100% rename from _wip/MUSCLE (U)/copilot/reconstructed.nes rename to MUSCLE (U)/copilot/reconstructed.nes diff --git a/_wip/MUSCLE (U)/copilot/rom.nes b/MUSCLE (U)/copilot/rom.nes similarity index 100% rename from _wip/MUSCLE (U)/copilot/rom.nes rename to MUSCLE (U)/copilot/rom.nes diff --git a/_wip/MUSCLE (U)/copilot/routine_names.tsv b/MUSCLE (U)/copilot/routine_names.tsv similarity index 100% rename from _wip/MUSCLE (U)/copilot/routine_names.tsv rename to MUSCLE (U)/copilot/routine_names.tsv diff --git a/_wip/MUSCLE (U)/copilot/routine_purposes.tsv b/MUSCLE (U)/copilot/routine_purposes.tsv similarity index 100% rename from _wip/MUSCLE (U)/copilot/routine_purposes.tsv rename to MUSCLE (U)/copilot/routine_purposes.tsv diff --git a/_wip/MUSCLE (U)/copilot/symbols.inc b/MUSCLE (U)/copilot/symbols.inc similarity index 100% rename from _wip/MUSCLE (U)/copilot/symbols.inc rename to MUSCLE (U)/copilot/symbols.inc diff --git a/_wip/MUSCLE (U)/copilot/zero_page_names.tsv b/MUSCLE (U)/copilot/zero_page_names.tsv similarity index 100% rename from _wip/MUSCLE (U)/copilot/zero_page_names.tsv rename to MUSCLE (U)/copilot/zero_page_names.tsv diff --git a/_wip/MUSCLE (U)/copilot/zero_page_ranges.tsv b/MUSCLE (U)/copilot/zero_page_ranges.tsv similarity index 100% rename from _wip/MUSCLE (U)/copilot/zero_page_ranges.tsv rename to MUSCLE (U)/copilot/zero_page_ranges.tsv diff --git a/OVERVIEW.md b/OVERVIEW.md index c3346b0..b0c17c4 100644 --- a/OVERVIEW.md +++ b/OVERVIEW.md @@ -8,17 +8,83 @@ This document provides a consolidated overview of all NES disassembly projects i | # | Project | Region/Version | PRG Size | CHR Size | Mirroring | Build Status | Vectors (NMI / RESET / IRQ) | |---|---------|----------------|----------|----------|-----------|--------------|------------------------------| -| 1 | Balloon Fight (JU) | Japan | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL | $C094 / $C000 / $C0F7 | -| 2 | Baseball (UE) | USA/Europe | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL | $C046 / $C40B / $C43E | -| 3 | Bomberman (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL | $C01A / $C000 / $FFF9 | -| 4 | Burger Time (U) | USA | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL | $C046 / $C40B / $C43E | -| 5 | Clu Clu Land (JU) | Japan | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL | $C1F1 / $C000 / $FFF9 | -| 6 | Defender 2 (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL | $CAA1 / $C983 / $CA9E | -| 7 | Excitebike (JU) | Japan | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL | $C1F1 / $FD24 / $FD24 | -| 8 | Tennis (JU) | Japan | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL | $C07D / $C000 / $C000 | -| 9 | Pac-Man (USA) (Namco) | USA | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL | $C10E / $C000 / $C17E | -| 10 | Donkey Kong 3 (JUE) | Japan | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL | $C07D / $C000 / $C000 | -| 11 | Donkey Kong Jr. (JU) | Japan | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL (Pass 2/3) | $C6E6 / $C66E / $FFF0 | +| 1 | Balloon Fight (JU) | Japan | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL (Pass complete) | $C094 / $C000 / $C0F7 | +| 2 | Baseball (UE) | USA/Europe | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL (Pass complete) | $C046 / $C40B / $C43E | +| 3 | Bomberman (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $C01A / $C000 / $FFF9 | +| 4 | Burger Time (U) | USA | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL (Pass complete) | $FF7F / $FD24 / $FD24 | +| 5 | Clu Clu Land (JU) | Japan | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL (Pass complete) | $C1F1 / $C196 / $C196 | +| 6 | Defender 2 (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $CAA1 / $C983 / $CA9E | +| 7 | Excitebike (JU) | Japan | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $C23B / $C184 / $FFF0 | +| 8 | Tennis (JU) | Japan | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $C07D / $C000 / $C000 | +| 9 | Pac-Man (USA) (Namco) | — | 16 KB | 8 KB | Horizontal | BYTE-IDENTICAL (Pass complete) | $C10E / $C033 / $C17E | +| 10 | Donkey Kong 3 (JUE) | Japan / USA / Europe | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $C08D / $C000 / $C000 | +| 11 | Donkey Kong Jr. (JU) | Japan | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $C6E6 / $C66E / $FFF0 | +| 12 | CIRCUS | — | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $C05A / $C000 / $4CB7 | +| 13 | Wild Gunman (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass Pass 1 redone) | $C086 / $C000 / $C000 | +| 14 | Joypad Test Cartridge (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass 3 complete) | $CCF7 / $C000 / $C000 | +| 15 | NES PowerPad Test Card (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $E06E / $E000 / $E000 | +| 16 | MUSCLE (U) | USA | 16 KB | 8 KB | Vertical | BYTE-IDENTICAL (Pass complete) | $86CB / $8000 / $8764 | +| 17 | `Donkey Kong (JU)` | Japan | 16 KB | 8 KB | Horizontal | PRG-IDENTICAL (Pass 0 skeleton) | $C85F / $C79E / $FFF0 | +| 18 | `Donkey Kong Jr. Math (U)` | USA | 16 KB | 8 KB | Vertical | PRG-IDENTICAL (Pass 0 skeleton) | $C4A9 / $C41E / $FFF0 | +| 19 | `Duck Hunt (JUE)` | Japan / USA / Europe | 16 KB | 8 KB | Vertical | PRG-IDENTICAL (Pass 0 skeleton) | $C086 / $C000 / $C000 | +| 20 | `Golf (JU)` | Japan | 16 KB | 8 KB | Vertical | PRG-IDENTICAL (Pass 0 skeleton) | $C0A6 / $C000 / $C0C4 | +| 21 | `Hogan's Alley (JU)` | Japan | 16 KB | 8 KB | Vertical | PRG-IDENTICAL (Pass 0 skeleton) | $C088 / $C000 / $C000 | +| 22 | `Ice Climber (JE)` | — | 16 KB | 8 KB | Horizontal | PRG-IDENTICAL (Pass 0 skeleton) | $C076 / $C014 / $FFF0 | +| 23 | `Ice Climber (U)` | USA | 16 KB | 8 KB | Horizontal | PRG-IDENTICAL (Pass 0 skeleton) | $C076 / $C014 / $FFF0 | +| 24 | `Lode Runner (U)` | USA | 16 KB | 8 KB | Vertical | PRG-IDENTICAL (Pass 0 skeleton) | $C02C / $C000 / $FFF9 | +| 25 | `Lunar Pool (U)` | USA | 16 KB | 8 KB | Vertical | PRG-IDENTICAL (Pass 1 complete) | $FF65 / $E80C / $FF64 | +| 26 | `Mario Bros (JU)` | Japan | 16 KB | 8 KB | Vertical | PRG-IDENTICAL (Pass 1 complete, Pass 2 substantial) | $C07D / $C000 / $C000 | +| 27 | `Millipede (U)` | USA | 16 KB | 8 KB | Vertical | PRG-IDENTICAL (Pass 0 skeleton) | $C7F1 / $C735 / $FFF0 | +| 28 | `Pac-Man (Tengen) (U)` | USA | 16 KB | 8 KB | Horizontal | PRG-IDENTICAL (Pass 0 skeleton) | $C0FA / $C033 / $C16A | +| 29 | `Pac-Man (U)` | USA | 16 KB | 8 KB | Horizontal | PRG-IDENTICAL (Pass 0 skeleton) | $C0FA / $FF00 / $C16A | +| 30 | `Pinball (JU)` | Japan | 16 KB | 8 KB | Horizontal | PRG-IDENTICAL (Pass 0 skeleton) | $C1ED / $C000 / $C1ED | +| 31 | `Popeye (JU) (PRG 0)` | — | 16 KB | 8 KB | Vertical | PRG-IDENTICAL (Pass 0 skeleton) | $C701 / $C649 / $FFF0 | +| 32 | `Popeye (JU) (PRG 1)` | — | 16 KB | 8 KB | Horizontal | PRG-IDENTICAL (Pass 0 skeleton) | $C701 / $C649 / $FFF0 | +| 33 | `Pyramid (U)` | USA | 16 KB | 8 KB | Vertical | PRG-IDENTICAL (Pass 1 done) | $D72E / $FF00 / $FF00 | +| 34 | `Raid on Bungeling Bay (U)` | USA | 16 KB | 8 KB | Vertical | PRG-IDENTICAL (Pass 0 skeleton) | $C04C / $C000 / $C2C0 | +| 35 | `Raid on Bungeling Bay (U) [a2]` | — | 16 KB | 8 KB | Horizontal | PRG-IDENTICAL (Pass 0 skeleton) | $C04C / $C000 / $C2C0 | +| 36 | `Urban Champion (JU)` | Japan | 16 KB | 8 KB | Vertical | PRG-IDENTICAL (Pass 0 skeleton) | $CA91 / $CA00 / $CA00 | + +All 36 are mapper 0 / 16 KB PRG / 8 KB CHR, battery-backed, no trainer. + +Rows 1-16 are **BYTE-IDENTICAL**: `make` compares the whole reconstructed ROM +against `copilot/rom.nes`. Rows 17-36 are **PRG-IDENTICAL**: their Makefiles +compare only `reconstructed_prg.bin` against `prg.bin`, so header and CHR are +not yet proven to rebuild. Treat those as unverified outside the PRG. + +**How to read this table.** The vectors are the three little-endian words at the **end of the +16 KB PRG** (`$FFFA-$FFFF` in the `$C000` mirror) — *not* fields in the iNES header, whose bytes +0-9 carry only sizes, mirroring and mapper. Regenerate the whole column with: + +```bash +python3 - <<'EOF' +import os +for p in sorted(d for d in os.listdir('.') if os.path.isdir(os.path.join(d, 'copilot'))): + rom = open(f"{p}/copilot/rom.nes", 'rb').read() + prg = rom[16:16 + rom[4]*16384]; vo = len(prg) - 6 + v = [prg[vo+i] | (prg[vo+i+1] << 8) for i in (0, 2, 4)] + print(f"{p:30s} {'Vertical' if rom[6] & 1 else 'Horizontal':10s} " + + " / ".join("$%04X" % x for x in v)) +EOF +``` + +Five rows were wrong before this pass, all from copy-paste duplication of a neighbouring row's +vectors, and are corrected above: + +| Project | Was | Actually | +|---------|-----|----------| +| Burger Time (U) | `$C046 / $C40B / $C43E` (Baseball's) | `$FF7F / $FD24 / $FD24` | +| Clu Clu Land (JU) | `$C1F1 / $C000 / $FFF9` | `$C1F1 / $C196 / $C196` | +| Excitebike (JU) | `$C1F1 / $FD24 / $FD24` | `$C23B / $C184 / $FFF0` | +| Pac-Man (USA) (Namco) | `$C10E / $C000 / $C17E` | `$C10E / $C033 / $C17E` | +| Donkey Kong 3 (JUE) | `$C07D / $C000 / $C000` | `$C08D / $C000 / $C000` | + +Donkey Kong Jr.'s mirroring was also wrong (Horizontal, actually Vertical). Odd vector *targets* +are not mistakes: Burger Time's `$FF7F` NMI and CIRCUS's `$4CB7` IRQ point into unused/data space, +which is common in this set — see "Notes" under Per-Project Details. + +Region/Version comes from the folder-name suffix (JU/U/UE/JUE); these mapper-0 headers do not +encode region, so CIRCUS — whose folder carries no suffix — is left as `—` rather than guessed. --- @@ -59,7 +125,7 @@ This document provides a consolidated overview of all NES disassembly projects i - **ROM:** `Burger Time (U) [!].nes` (24,592 bytes) - **Source:** `copilot/prg.s` (9,323 lines), `copilot/header.s`, `copilot/chr.s` - **Linker:** HEADER, PRG at $C000 (0x3FFA), VECTORS at $FFFA, CHR -- **Vectors:** NMI → $C046 (`NmiHandler`), RESET → $C40B (`ResetHandler`), IRQ → $C43E (`IrqHandler`) +- **Vectors:** NMI → $FF7F (points *into* the vector page itself — not a real handler; NMI is effectively unused), RESET → $FD24 (`ResetHandler`, `sei` prologue), IRQ → $FD24 (reuses Reset) - **Key subsystems:** Event-driven main loop via `CommonEngineExit` ($EB6A) and queued events ($EB9D), title screen / round state machine ($C5FE), object arrays ($03E6 state, $0436/$0486 position), audio engine ($F9D0–$FE2x) with music sequencer ($FD34) - **Build fix:** None needed; byte-identical. Requires symlink `burger_time.nes → "../Burger Time (U) [!].nes"` due to spaces in ROM filename - **Details:** `Burger Time (U)/OVERVIEW.md` @@ -69,7 +135,7 @@ This document provides a consolidated overview of all NES disassembly projects i - **ROM:** `rom.nes` (24,592 bytes) - **Source:** `copilot/main.s` (9,150 lines) - **Linker:** PRG at $C000, 16 KB; single segment (no separate HEADER/CHR segments in cfg, but CHR data is embedded inline at end of prg.s) -- **Vectors:** NMI → $C1F1 (`NMIHandler`), RESET → $C000 (`ResetEntry`), IRQ → $C196 (`IrqHandler`, reuses Reset) +- **Vectors:** NMI → $C1F1 (`NMIHandler`), RESET → $C196 (`ResetEntry`, shared with the IRQ handler), IRQ → $C196 (`IrqHandler`, reuses Reset) - **Key subsystems:** State-machine main loop via dispatch table at $C000–$C00D, NMI-driven PPU command queue + VRAM transfers, object pools ($03E6 state, $0436/$0486 position), sound driver ($E642–$F7C0) with dispatch table ($E6AD) - **Build fix:** One `bpl` branch to undefined label at CPU $FAB4 — replaced with `bne *-$1B` to produce original `d0 e3` bytes (disassembler mislabeled `bne` as `bpl`) - **Details:** `Clu Clu Land (JU)/OVERVIEW.md` @@ -109,7 +175,7 @@ This document provides a consolidated overview of all NES disassembly projects i - **ROM:** `rom.nes` (24,592 bytes) - **Source:** `copilot/prg.s` (9,268 lines) - **Linker:** PRG at $C000, 16 KB; single segment -- **Vectors:** NMI → $C10E (`NmiHandler`), RESET → $C000 (`Reset`), IRQ → $C17E (`IrqHandler`) +- **Vectors:** NMI → $C10E (`NmiHandler`), RESET → $C033 (`Reset`; `locals.inc` defines `ResetOffset = $C033`), IRQ → $C17E (`IrqHandler`) - **Key subsystems:** NMI-synchronized main loop (`MainLoop` at $C04F), game state machine via `MainStateHandlerTable` ($C101, 12 states), game mode state machine via `GameModeStateTable` ($CAD7, 8 states), object/sprite system with fixed-point physics, audio engine ($F8DE) with serial I/O over controller port - **Build fix:** None needed; byte-identical out of the box - **Details:** `Pac-Man (USA) (Namco)/OVERVIEW.md` @@ -119,7 +185,7 @@ This document provides a consolidated overview of all NES disassembly projects i - **ROM:** `Donkey Kong 3 (JUE).nes` (24,592 bytes) - **Source:** `copilot/prg.s` (9,952 lines) - **Linker:** HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB) -- **Vectors:** NMI → $C07D (`NmiHandler`), RESET → $C000 (`Reset`), IRQ → $C000 (`Reset` reused) +- **Vectors:** NMI → $C08D (`NmiHandler`; the `prg.s` header block records it as "Pass 2 control-flow entry at CPU $C08D"), RESET → $C000 (`Reset`), IRQ → $C000 (`Reset` reused) - **Key subsystems:** Main loop with object/game state management at $C02E–$C18D, object movement and geometry calculations ($C28E–$C683), audio engine ($F8DE+) with sound channels ($F0–$FF), PPU command buffer streaming ($C3F4+) - **Build fix:** Build split `main.s` into `header.s`, `prg.s`, `chr.s`; added `RandomStateAlt = $E4` for `dec $E4` at CPU $E71B (zero-page reuse with `RandomState0 = $54`). **2026-10-16 — one-byte branch-target bug fixed:** the project was recorded as BYTE-IDENTICAL but had never built byte-identical. The `bne` at CPU $C14C (PRG $014C) was annotated `D0 12` (target $C160) but assembled as `D0 0D`, because it was labelled `StoreSelectedPlayerAndScreenFlags` ($C15B) instead of the routine actually at $C160. Retargeted to `ClearAudioSetGameMode` — which is also the semantically correct target for a "mode != $01" test. `cmp` now passes. - **Details:** `Donkey Kong 3 (JUE)/copilot/OVERVIEW.md` @@ -157,56 +223,53 @@ This document provides a consolidated overview of all NES disassembly projects i ### 14. Joypad Test Cartridge (U) - **Folder:** `Joypad Test Cartridge (U)/` - **ROM:** `rom.nes` (24,592 bytes) -- **Source:** `copilot/prg.s` (~1,360 lines with routine headers) +- **Source:** `copilot/prg.s` (4,401 lines; 202 routines, all with described headers) - **Linker:** HEADER at $0000 (16 bytes), PRG at $C000 (16 KB), CHR at $0000 (8 KB) - **Vectors:** NMI → $CCF7 (`NmiHandler`), RESET → $C000 (`Reset`), IRQ → $C000 (reuses `Reset`) - **Key subsystems:** NMI-driven frame loop — main loop spins waiting on NMI phase; NMI handler does OAM DMA ($4014), PPU scroll/control latch, and burst VRAM writes from table at $0302; `VramPtrWrite` ($CD3F) uses a return-address modification trick at `RetAddrUpdate` ($CDC8) for runtime-computed dispatch; `VramWrite` ($CDEE) sets PPU address and writes data to PPUDATA; reset clears RAM, initializes PPU ($2000=$10, $2001=$00), triggers OAM DMA, and enters main loop -- **Build fix:** None needed; byte-identical out of the box (`make` in `copilot/`). Pass 1 complete — full code/data classification (~3.5% code / ~96.5% data); Pass 2 complete — routine headers for all labels, semantic naming for key routines, zero-page aliases in `locals.inc` (`VramPtrLo`=$00, `PpuCtrlShadow`=$EF, `FrameCounterLo`=$53, etc.) +- **Build fix:** Byte-identical out of the box, but **Pass 1 was badly truncated and has been redone**. It claimed 282 instructions / 580 bytes (3.5%); the tracer halted at `$C09E` on `DCP $3C20` (`$CF`), an undocumented opcode used as ordinary code, and filed 3,256 bytes of real code as `.byte`. Now **1,773 instructions / 3,836 bytes (23.4%)**, verified against a fresh trace. `nesdis.py --undocumented` supplies the 105 undocumented NMOS opcodes; ca65 V2.19 encodes none of them, so the 4 affected instructions are emitted as explicit `.byte` with the disassembly in the comment. Pass 2 then renamed all 202 labels (zero `Label_Cxxxx` left) and rewrote all 202 routine headersr all labels, semantic naming for key routines, zero-page aliases in `locals.inc` (`VramPtrLo`=$00, `PpuCtrlShadow`=$EF, `FrameCounterLo`=$53, etc.) - **Details:** `Joypad Test Cartridge (U)/OVERVIEW.md` +### 16. MUSCLE (U) +- **Folder:** `MUSCLE (U)/` +- **ROM:** `M.U.S.C.L.E. (U).nes` (24,592 bytes); `copilot/rom.nes` is a relative symlink `../M.U.S.C.L.E. (U).nes` +- **Source:** `copilot/prg.s` (Pass 1/2/3 output, with 42 bytecode listings above the `.byte` data) +- **Linker:** HEADER at $0000 (16 bytes), **PRG at $8000 (16 KB)**, CHR at $0000 (8 KB) — the one ROM in the set mapped *low* +- **Vectors:** NMI → $86CB (`NmiHandler`), RESET → $8000 (`Reset`), IRQ → $8764 (a bare `RTI` that doubles as the NMI epilogue). Vectors themselves sit in the $C000 mirror at $FFFA. +- **Key subsystems:** bytecode VM — 40 opcodes at `$C8-$EF` handled through a table at `$9237`, everything else a literal operand. Gameplay dispatches through three jump tables plus two zero-page `jmp (zp)` calls a static descender cannot follow: 38-entry token-program pointer table at `$8CEF`, 40-entry opcode handler table at `$9237`, 16-entry handler table at `$9F2B`, 3-entry per-level VRAM-writer table at `$AC35`. Compressed-VRAM RLE decoder at `$AC82` with a 12-byte fill table at `$ACBD`; division by 20 restored at `$82AC`; four-channel sound engine with per-channel state in zero page `$C4-$EF`. +- **Build fix:** the skeleton's `$C000` linker assumption was wrong — RESET is `$8000`, so `linker.cfg` had to move. `copilot/Makefile` tool paths were `../../../_tools/` while in `_wip/`; promotion to top-level required `../../_tools/`. `make regen` (pass1→pass2→pass3) reproduces `prg.s` byte-for-byte. +- **Details:** `MUSCLE (U)/OVERVIEW.md` + --- -## Skeleton Projects (under `_wip/`) +## `_wip/` Projects -20 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. +These 20 ROMs are listed as rows 17-36 of the Project Inventory above, so their +vectors and mirroring are in one place rather than a second table that can drift. -| Project | Vectors (NMI/RESET/IRQ) | Mir. | Status | -|---------|--------------------------|------|--------| -| `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 | -| `Lode Runner (U)` | $C02C / $C000 / $FFF9 | H | BYTE-IDENTICAL | -| `Lunar Pool (U)` | $FF65 / $E80C / $FF64 | H | BYTE-IDENTICAL | -| `MUSCLE (U)` | $86CB / $8000 / $8764 | H | **Pass 3 done** — code/data split, full semantic naming, data tables structured; see `_wip/MUSCLE (U)/OVERVIEW.md` | -| `Mario Bros (JU)` | $C07D / $C000 / $C000 | H | BYTE-IDENTICAL | -| `Millipede (U)` | $C7F1 / $C735 / $FFF0 | 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 | +Each is a Pass-0 skeleton (`default_project.tar.gz`): `copilot/` holds the split +`prg.bin`/`header.bin`/`chr.bin` and a symbolic `prg.s`. **They verify at PRG +level only** — their Makefiles run `cmp reconstructed_prg.bin prg.bin`, not a +whole-ROM compare, which is why the inventory marks them `PRG-IDENTICAL` rather +than `BYTE-IDENTICAL`. Promoting one to the top level means adding a +`copilot/rom.nes`, switching the Makefile to a full-ROM compare, and moving the +`../../../_tools/` paths to `../../_tools/`. + +`Pyramid (U)` is the only one with Pass 1 done. All 20 currently build cleanly. 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)** — resolved at Pass 1: this is the one NROM ROM in the set mapped **low**, at $8000–$BFFF, because RESET is $8000. The skeleton's `$C000` linker assumption was wrong and `linker.cfg` had to move. The vectors themselves still sit in the mirror at $FFFA. IRQ $8764 is a bare `RTI` that doubles as the NMI epilogue. - **Lunar Pool (U)** NMI `$FF65` / IRQ `$FF64` are adjacent in the vector page; RESET `$E80C`. - **NES PowerPad Test Card (U)** — *at Pass 2/3*: minimal code (~7.2%), data-heavy test cartridge. RESET at $E000 (non-$C000 entry). NMI handler reads controllers via shift register, processes pad transitions, draws score/lives. See `NES PowerPad Test Card (U)/OVERVIEW.md`. +- **Lunar Pool (U)** — *Pass 1 complete (57.8% code)*: RESET at `$E80C` (not `$C000`), NMI `$FF65`, IRQ `$FF64`. Code gated behind `jmp ($7961)` (RAM pointer, 3 sites) and stack-based dispatch at `$CBDC`. Screen text strings ("game over", "hi`score__") live in the data blocks after the `jmp ($7961)` sites. See `_wip/Lunar Pool (U)/OVERVIEW.md`. - **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`. -- **MUSCLE (U)** — *at Pass 3*: bytecode-VM game. A naive recursive trace reaches only 50.6% of the PRG because the game dispatches through three jump tables and two zero-page `jmp (zp)` calls that a static descender cannot follow: a 38-entry token-program pointer table at `$8CEF`, a 40-entry opcode handler table at `$9237`, a second 16-entry handler table at `$9F2B`, and a 3-entry per-level VRAM-writer table at `$AC35`. Resolving those took code coverage to 64.9%. Compressed-VRAM RLE decoder at `$AC82` with a 12-byte fill table at `$ACBD`; restoring division by 20 at `$82AC`; four-channel sound engine with per-channel state in zero page `$C4-$EF`. See `MUSCLE (U)/OVERVIEW.md`. - **CIRCUS** — *at Pass 2/3*: full recursive disassembly complete. NMI-driven frame state machine (main loop is a spin loop at $C057). Menu text at $C763 ("CONTINUE", "STAGE", "SELECT", "PLAY"). Object state machine at $DC3F–$FE7B. Audio sequence data at $FABB–$FFFB. See `CIRCUS/OVERVIEW.md`. -- **Joypad Test Cartridge (U)** — *at Pass 2/3*: minimal code (~3.5%), data-heavy test cartridge. NMI handler drives per-frame PPU/OAM updates. Uses return-address modification trick at `RetAddrUpdate` ($CDC8) with `VramPtrWrite` ($CD3F) for runtime-computed dispatch. See `Joypad Test Cartridge (U)/OVERVIEW.md`. +- **Joypad Test Cartridge (U)** — *Pass 3 complete*: minimal code (23.4%), data-heavy test cartridge. Data region `$CF06–$FFFF` broken into 20 named sub-blocks; VRAM command stream opcode set decoded via `RetAddrUpdate` return-address modification trick at `$CDC8`. See `Joypad Test Cartridge (U)/OVERVIEW.md`. - **Wild Gunman (U)** — *Pass 1 redone, Pass 2 partial, Pass 3 pending*: NMI-driven frame loop. Gates its code behind runtime computed-goto tables — see the `prg.s` header block and its `OVERVIEW.md`. +- **Mario Bros (JU)** — *Pass 1 complete (72.2% code), Pass 2 substantial*: 252 subroutine entry points named (90 semantic + 165 `SubCxxxx` address-based); 667 internal `Label_Cxxxx` branch targets remain. Code is gated behind stack-based indirect dispatch at `$CD9E` and a 20-entry `JSR` thunk table at `$C5A3`. Audio routines in `$F8xx-$F9xx` clearly identifiable from APU register writes. See `_wip/Mario Bros (JU)/OVERVIEW.md`. ## Common Patterns Across All Projects @@ -276,20 +339,69 @@ Effect measured per project (old tracer → complete-opcode dispatch-aware trace | Project | Old | Complete | Action taken | |---------|-----|----------|--------------| | NES PowerPad Test Card (U) | 546 instr | 559 | Pass 1 already sound | -| Joypad Test Cartridge (U) | 282 instr | **1,379** | **Pass 1 redo still outstanding** | +| Joypad Test Cartridge (U) | 282 instr | **1,773** | Pass 1 redone (23.4% code); Pass 2 complete; Pass 3 complete | | Wild Gunman (U) | 1,600 instr | **4,083** | Pass 1 redone (49.3% code) | | Balloon Fight (JU) | 5,216 instr | 5,277 | hand-done file was already better | | Donkey Kong Jr. (JU) | 6,135 instr | 6,135 | file already complete | -**Joypad Test Cartridge (U) is the one project still carrying the old, truncated -Pass 1** — its recorded "3.5% code" is really ~18%, and roughly 2.4 KB of code is -still filed as `.byte` data. It must be redone before its Pass 2/3 can be trusted. +**Joypad Test Cartridge (U) was the last project carrying the old, truncated +Pass 1, and has now been redone.** Its recorded "3.5% code" was really 23.4%: the +tracer stopped at `$C09E` on `DCP $3C20` (`$CF`), an undocumented opcode used as +ordinary code, and 3,256 bytes of real code were filed as `.byte` data. Redoing it +also invalidated its Pass 3, which had described `$C09E–$C173` and `$C17F–$CCF6` as +data — both are code. Pass 3 is now the outstanding work. + +The fix generalises: `nesdis.py --undocumented` decodes all 105 undocumented NMOS +opcodes. It is **default off** so that projects whose `prg.s` is already +regen-stable keep reproducing byte-for-byte under `make regen`. + +`_tools/verify_pass1.py` now checks all 36 projects. All are faithful; none is +truncated. It also reports that **no project follows the canonical +`; CPU:$xxxx PRG:xxxx AA BB` audit-comment convention** — five other spellings are +in use, and Excitebike and Pac-Man carry no byte comments at all. + +### TODO — audit comments for Excitebike and Pac-Man + +Both are hand-written sources with semantic labels but **no byte-identity audit +trail**, so a source line cannot be mapped back to exact ROM bytes without +re-assembling. Everything else in this repo carries such a comment. + +The approach that was going to be used, and the reason it was abandoned: + +* Addresses come from `ca65 -l`. That part works — the listing prints the segment + offset and the emitted bytes, and the offset indexes `prg.bin` directly. + Byte *values* must be read from `prg.bin` rather than the listing, because + ca65 prints `rr rr` for relocatable words. +* **The blocker: ca65's listing contains no source line numbers.** It emits + `r ` and nothing that ties an entry back to + a line number, so entries cannot be keyed to source lines directly. + +Remaining options, none of them free: + +1. **Lockstep text alignment** — walk the listing and `prg.s` together, matching + each listing entry's trailing source text against the next source line. Needs + care: the listing may truncate long lines, and blank or comment-only source + lines may not appear at all, so the two streams are not obviously 1:1. +2. **Re-derive offsets by decoding `prg.s` independently** — re-implement enough + of ca65's layout to walk directives, macros and expression evaluation. High + risk of disagreeing with ca65, and a disagreement would corrupt offsets + silently while still assembling. +3. **Emit an intermediate from a known-good tracer** — regenerate both projects + through `nesdis.py` for the comments only, then transplant the comments onto + the hand-written source. Also needs a line-to-line correspondence. + +Whichever is chosen, the check is the same and must not be skipped: after +inserting comments, `make` must still print `Byte-identical ROM verified.`, and +the comment's byte list must match `prg.bin` at the stated offset for every +line. A wrong offset that still assembles is the failure mode to watch for. --- ## Summary -All 15 projects in this repository rebuild **byte-identical** to their original ROMs: +The 16 numbered projects below are promoted out of `_wip/` and rebuild **byte-identical** +to their original ROMs. The 20 `_wip/` projects (rows 17-36) verify at PRG level only — +see "`_wip/` Projects" below. | # | Project | Build Status | Pass 3 | |---|---------|--------------|--------| @@ -306,7 +418,14 @@ All 15 projects in this repository rebuild **byte-identical** to their original | 11 | Donkey Kong Jr. (JU) | BYTE-IDENTICAL | complete (Pass 1 verified) | | 12 | CIRCUS | BYTE-IDENTICAL | complete | | 13 | Wild Gunman (U) | BYTE-IDENTICAL | pending (Pass 1 redone) | -| 14 | Joypad Test Cartridge (U) | BYTE-IDENTICAL | pending | +| 14 | Joypad Test Cartridge (U) | BYTE-IDENTICAL | Pass 3 complete | | 15 | NES PowerPad Test Card (U) | BYTE-IDENTICAL | complete | +| 16 | MUSCLE (U) | BYTE-IDENTICAL | complete | -The 20 `_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. +Rows 17-36 (`_wip/`) all rebuild cleanly at PRG level. `Pyramid (U)` is the only +one with Pass 1 done. Pass 1 work and promotion into the numbered inventory is +future work for all of them. + +Use `_tools/verify_pass1.py` to re-check any of this at any time; it rebuilds each +project and re-traces it, and reports `TRUNCATED` when a project's committed split +claims less code than the tracer can reach. diff --git a/Pac-Man (USA) (Namco)/copilot/locals.inc b/Pac-Man (USA) (Namco)/copilot/locals.inc index e2b3a64..dd32087 100644 --- a/Pac-Man (USA) (Namco)/copilot/locals.inc +++ b/Pac-Man (USA) (Namco)/copilot/locals.inc @@ -1,3 +1,147 @@ + +;---------------------------------------------------- +; Pacman Specific +;---------------------------------------------------- + +NmiHandlerOffset = $C10E +ResetOffset = $C033 +IrqHandlerOffset = $C17E + +;============================================================================== +; Zero Page +;============================================================================== + +;------------------------------------------------------------------------------ +; General work pointers / scratch +;------------------------------------------------------------------------------ + +workPtr0 = $00 +workPtr1 = $02 + +workValue0 = $04 +workValue1 = $05 +workValue2 = $06 +workValue3 = $07 +workValue4 = $08 +workValue5 = $09 + +;------------------------------------------------------------------------------ +; Maze pathfinding / direction selection workspace +;------------------------------------------------------------------------------ + +pathCompareValue = $0A +pathFallbackValue = $0B +legalDirections = $0C + +;------------------------------------------------------------------------------ +; Indirect dispatcher vector +;------------------------------------------------------------------------------ + +dispatchVector = $10 + +;------------------------------------------------------------------------------ +; 16-bit arithmetic workspace +;------------------------------------------------------------------------------ + +arithmeticValue = $12 +arithmeticOperand = $14 + + +;------------------------------------------------------------------------------ +; Actor fixed-point/motion records +; +; Each actor record occupies four bytes. +;------------------------------------------------------------------------------ + +pacmanMotion = $1A +ghost1Motion = $1E +ghost2Motion = $22 +ghost3Motion = $26 +ghost4Motion = $2A + +;------------------------------------------------------------------------------ +; Pac-Man maze targeting +;------------------------------------------------------------------------------ + +pacmanTargetRow = $2E +pacmanTargetColumn = $30 + + +;------------------------------------------------------------------------------ +; Sprite/animation selection +;------------------------------------------------------------------------------ + +pacmanSpriteFrame = $32 +ghostSpriteFrames = $33 + + +;------------------------------------------------------------------------------ +; Ghost direction/control state +;------------------------------------------------------------------------------ + +ghostDirectionFlags = $39 + +;------------------------------------------------------------------------------ +; Main gameplay state +;------------------------------------------------------------------------------ + +gameState = $3F + +;------------------------------------------------------------------------------ +; PPU / player-screen state +;------------------------------------------------------------------------------ + +ppuCtrlShadow = $43 + +cocktailModeFlag = $46 +activePlayerFlag = $47 +gameplaySuspended = $48 + +frameCounter = $4B +stateTimer = $4C + +;------------------------------------------------------------------------------ +; Input / Pac-Man movement +;------------------------------------------------------------------------------ + +currentInput = $4D +newlyPressedInput = $4E +previousInput = $4F + +pacmanRequestedDirection = $50 +pacmanDirection = $51 + + +;------------------------------------------------------------------------------ +; Score / round / maze progression +;------------------------------------------------------------------------------ + +highScoreDigits = $61 + +roundNumber = $67 +roundDisplayValue = $68 + +pelletsRemaining = $6A +extraLifeAwarded = $6B + +actorStatusDisplay = $6C + +playerScoreDigits = $70 + +;------------------------------------------------------------------------------ +; Audio Engine +;------------------------------------------------------------------------------ +audioRequestPtr = $F0 +audioChannelTablePtr = $F2 +audioSequenceTablePtr = $F4 +audioWorkPtr = $F6 +audioWorkValue = $F7 +audioChannelFlags = $F8 +audioRequestIndex = $FC +audioChannelOffset = $FD +audioIndirectPtr = $FE + + ; Pac-Man specific zero-page aliases used during Pass 1. ; These intentionally conservative names will be refined in Passes 2 and 3. diff --git a/Pac-Man (USA) (Namco)/copilot/prg.s b/Pac-Man (USA) (Namco)/copilot/prg.s index 76c3297..9e84fe9 100644 --- a/Pac-Man (USA) (Namco)/copilot/prg.s +++ b/Pac-Man (USA) (Namco)/copilot/prg.s @@ -1,359 +1,162 @@ -;---------------------------------------------------- -; NES Specific -;---------------------------------------------------- - -; PPU registers -PPUCTRL = $2000 -PPUMASK = $2001 -PPUSTATUS = $2002 -OAMADDR = $2003 -OAMDATA = $2004 -PPUSCROLL = $2005 -PPUADDR = $2006 -PPUDATA = $2007 -OAMDMA = $4014 -JOY1 = $4016 - -APUPC1BASE = $4000 -APUPC1SWEEP = $4001 -APUPC1TLOW = $4002 -APUPC1THIGH = $4003 - -APUPC2BASE = $4004 -APUPC2SWEEP = $4005 -APUPC2LOW = $4006 -APUPC2HIGH = $4007 - -APUTRIBASE = $4008 -APUTRILOW = $400A -APUTRIHIGH = $400B - -APUNOISEBASE = $400C -APUNOISELOOP = $400E -APUNOISELENGTH = $400F - -APUDMABASE = $4010 -APUDMALOAD = $4011 -APUDMAADDR = $4012 -APUDMALEN = $4013 - -APUCTRL = $4015 -APUSTATUS = $4015 -APUFRAMECNT = $4017 - - -PAD_RIGHT=$01 -PAD_LEFT=$02 -PAD_DOWN=$04 -PAD_UP=$08 -PAD_START=$10 -PAD_SELECT=$20 -PAD_B=$40 -PAD_A=$80 -PAD_HORIZONTAL=PAD_LEFT|PAD_RIGHT -PAD_VERTICAL=PAD_UP|PAD_DOWN -PAD_DPAD=PAD_HORIZONTAL|PAD_VERTICAL -PAD_MENU_INPUT=PAD_SELECT|PAD_START|PAD_VERTICAL - -;---------------------------------------------------- -; Pacman Specific -;---------------------------------------------------- - -NmiHandlerOffset = $C10E -ResetOffset = $C033 -IrqHandlerOffset = $C17E - -;============================================================================== -; Zero Page -;============================================================================== - -;------------------------------------------------------------------------------ -; General work pointers / scratch -;------------------------------------------------------------------------------ - -workPtr0 = $00 -workPtr1 = $02 - -workValue0 = $04 -workValue1 = $05 -workValue2 = $06 -workValue3 = $07 -workValue4 = $08 -workValue5 = $09 - -;------------------------------------------------------------------------------ -; Maze pathfinding / direction selection workspace -;------------------------------------------------------------------------------ - -pathCompareValue = $0A -pathFallbackValue = $0B -legalDirections = $0C - -;------------------------------------------------------------------------------ -; Indirect dispatcher vector -;------------------------------------------------------------------------------ - -dispatchVector = $10 - -;------------------------------------------------------------------------------ -; 16-bit arithmetic workspace -;------------------------------------------------------------------------------ - -arithmeticValue = $12 -arithmeticOperand = $14 - - -;------------------------------------------------------------------------------ -; Actor fixed-point/motion records -; -; Each actor record occupies four bytes. -;------------------------------------------------------------------------------ - -pacmanMotion = $1A -ghost1Motion = $1E -ghost2Motion = $22 -ghost3Motion = $26 -ghost4Motion = $2A - -;------------------------------------------------------------------------------ -; Pac-Man maze targeting -;------------------------------------------------------------------------------ - -pacmanTargetRow = $2E -pacmanTargetColumn = $30 - - -;------------------------------------------------------------------------------ -; Sprite/animation selection -;------------------------------------------------------------------------------ - -pacmanSpriteFrame = $32 -ghostSpriteFrames = $33 - - -;------------------------------------------------------------------------------ -; Ghost direction/control state -;------------------------------------------------------------------------------ - -ghostDirectionFlags = $39 - -;------------------------------------------------------------------------------ -; Main gameplay state -;------------------------------------------------------------------------------ - -gameState = $3F - -;------------------------------------------------------------------------------ -; PPU / player-screen state -;------------------------------------------------------------------------------ - -ppuCtrlShadow = $43 - -cocktailModeFlag = $46 -activePlayerFlag = $47 -gameplaySuspended = $48 - -frameCounter = $4B -stateTimer = $4C - -;------------------------------------------------------------------------------ -; Input / Pac-Man movement -;------------------------------------------------------------------------------ - -currentInput = $4D -newlyPressedInput = $4E -previousInput = $4F - -pacmanRequestedDirection = $50 -pacmanDirection = $51 - - -;------------------------------------------------------------------------------ -; Score / round / maze progression -;------------------------------------------------------------------------------ - -highScoreDigits = $61 - -roundNumber = $67 -roundDisplayValue = $68 - -pelletsRemaining = $6A -extraLifeAwarded = $6B - -actorStatusDisplay = $6C - -playerScoreDigits = $70 - -;------------------------------------------------------------------------------ -; Audio Engine -;------------------------------------------------------------------------------ -audioRequestPtr = $F0 -audioChannelTablePtr = $F2 -audioSequenceTablePtr = $F4 -audioWorkPtr = $F6 -audioWorkValue = $F7 -audioChannelFlags = $F8 -audioRequestIndex = $FC -audioChannelOffset = $FD -audioIndirectPtr = $FE - +.include "symbols.inc" +.include "locals.inc" .segment "PRG" .org $C000 CopyrightText: - .byte $43,$4F,$50,$59,$20,$52,$49,$47 - .byte $48,$54,$20,$31,$39,$38,$34,$20 - .byte $31,$39,$39,$33,$20,$4E,$41,$4D - .byte $43,$4F,$20,$4C,$54,$44,$2E,$20 - .byte $41,$4C,$4C,$20,$52,$49,$47,$48 - .byte $54,$53,$20,$52,$45,$53,$45,$52 - .byte $56,$45,$44 + .byte $43,$4F,$50,$59,$20,$52,$49,$47 ; CPU:$C000 PRG:0000 43 4F 50 59 20 52 49 47 + .byte $48,$54,$20,$31,$39,$38,$34,$20 ; CPU:$C008 PRG:0008 48 54 20 31 39 38 34 20 + .byte $31,$39,$39,$33,$20,$4E,$41,$4D ; CPU:$C010 PRG:0010 31 39 39 33 20 4E 41 4D + .byte $43,$4F,$20,$4C,$54,$44,$2E,$20 ; CPU:$C018 PRG:0018 43 4F 20 4C 54 44 2E 20 + .byte $41,$4C,$4C,$20,$52,$49,$47,$48 ; CPU:$C020 PRG:0020 41 4C 4C 20 52 49 47 48 + .byte $54,$53,$20,$52,$45,$53,$45,$52 ; CPU:$C028 PRG:0028 54 53 20 52 45 53 45 52 + .byte $56,$45,$44 ; CPU:$C030 PRG:0030 56 45 44 Reset: - ldx #$00 - stx PPUCTRL - sei - cld - dex - txs - nop - nop - nop + ldx #$00 ; CPU:$C033 PRG:0033 A2 00 + stx PPUCTRL ; CPU:$C035 PRG:0035 8E 00 20 + sei ; CPU:$C038 PRG:0038 78 + cld ; CPU:$C039 PRG:0039 D8 + dex ; CPU:$C03A PRG:003A CA + txs ; CPU:$C03B PRG:003B 9A + nop ; CPU:$C03C PRG:003C EA + nop ; CPU:$C03D PRG:003D EA + nop ; CPU:$C03E PRG:003E EA - ldx #$02 + ldx #$02 ; CPU:$C03F PRG:003F A2 02 @WaitForPpu: - lda #$06 - sta PPUMASK + lda #$06 ; CPU:$C041 PRG:0041 A9 06 + sta PPUMASK ; CPU:$C043 PRG:0043 8D 01 20 - lda PPUSTATUS + lda PPUSTATUS ; CPU:$C046 PRG:0046 AD 02 20 @WaitVBlank: - lda PPUSTATUS - bpl @WaitVBlank + lda PPUSTATUS ; CPU:$C049 PRG:0049 AD 02 20 + bpl @WaitVBlank ; CPU:$C04C PRG:004C 10 FB - lda #$00 - sta PPUSCROLL - sta PPUSCROLL - dex - bne @WaitForPpu + lda #$00 ; CPU:$C04E PRG:004E A9 00 + sta PPUSCROLL ; CPU:$C050 PRG:0050 8D 05 20 + sta PPUSCROLL ; CPU:$C053 PRG:0053 8D 05 20 + dex ; CPU:$C056 PRG:0056 CA + bne @WaitForPpu ; CPU:$C057 PRG:0057 D0 E8 - lda #$00 - tay + lda #$00 ; CPU:$C059 PRG:0059 A9 00 + tay ; CPU:$C05B PRG:005B A8 @ClearLowRam: - sta $0000,y - iny - cpy #$3E - bne @ClearLowRam + sta $0000,y ; CPU:$C05C PRG:005C 99 00 00 + iny ; CPU:$C05F PRG:005F C8 + cpy #$3E ; CPU:$C060 PRG:0060 C0 3E + bne @ClearLowRam ; CPU:$C062 PRG:0062 D0 F8 - ldx #$08 - ldy #$87 + ldx #$08 ; CPU:$C064 PRG:0064 A2 08 + ldy #$87 ; CPU:$C066 PRG:0066 A0 87 @ClearRamPages: - sta ($00),y - iny - bne @ClearRamPages - inc $01 - cpx $01 - bne @ClearRamPages + sta ($00),y ; CPU:$C068 PRG:0068 91 00 + iny ; CPU:$C06A PRG:006A C8 + bne @ClearRamPages ; CPU:$C06B PRG:006B D0 FB + inc $01 ; CPU:$C06D PRG:006D E6 01 + cpx $01 ; CPU:$C06F PRG:006F E4 01 + bne @ClearRamPages ; CPU:$C071 PRG:0071 D0 F5 - lda #$06 - sta PPUMASK + lda #$06 ; CPU:$C073 PRG:0073 A9 06 + sta PPUMASK ; CPU:$C075 PRG:0075 8D 01 20 - lda #$00 - sta PPUSCROLL - sta PPUSCROLL - sta $41 - sta $42 - sta PPUCTRL - sta PPUMASK - tay + lda #$00 ; CPU:$C078 PRG:0078 A9 00 + sta PPUSCROLL ; CPU:$C07A PRG:007A 8D 05 20 + sta PPUSCROLL ; CPU:$C07D PRG:007D 8D 05 20 + sta $41 ; CPU:$C080 PRG:0080 85 41 + sta $42 ; CPU:$C082 PRG:0082 85 42 + sta PPUCTRL ; CPU:$C084 PRG:0084 8D 00 20 + sta PPUMASK ; CPU:$C087 PRG:0087 8D 01 20 + tay ; CPU:$C08A PRG:008A A8 @CheckRamSignature: - lda RamSignature,y - cmp $0052,y - bne @InitializeRamSignature + lda RamSignature,y ; CPU:$C08B PRG:008B B9 FF C0 + cmp $0052,y ; CPU:$C08E PRG:008E D9 52 00 + bne @InitializeRamSignature ; CPU:$C091 PRG:0091 D0 07 - iny - cpy #$0F - bne @CheckRamSignature + iny ; CPU:$C093 PRG:0093 C8 + cpy #$0F ; CPU:$C094 PRG:0094 C0 0F + bne @CheckRamSignature ; CPU:$C096 PRG:0096 D0 F3 - beq @SignatureAlreadyPresent + beq @SignatureAlreadyPresent ; CPU:$C098 PRG:0098 F0 1A @InitializeRamSignature: - lda #$00 - tay + lda #$00 ; CPU:$C09A PRG:009A A9 00 + tay ; CPU:$C09C PRG:009C A8 @ClearZeroPage: - sta $0000,y - iny - bne @ClearZeroPage + sta $0000,y ; CPU:$C09D PRG:009D 99 00 00 + iny ; CPU:$C0A0 PRG:00A0 C8 + bne @ClearZeroPage ; CPU:$C0A1 PRG:00A1 D0 FA - ldy #$00 + ldy #$00 ; CPU:$C0A3 PRG:00A3 A0 00 @CopyRamSignature: - lda RamSignature,y - sta $0052,y - iny - cpy #$0F - bne @CopyRamSignature + lda RamSignature,y ; CPU:$C0A5 PRG:00A5 B9 FF C0 + sta $0052,y ; CPU:$C0A8 PRG:00A8 99 52 00 + iny ; CPU:$C0AB PRG:00AB C8 + cpy #$0F ; CPU:$C0AC PRG:00AC C0 0F + bne @CopyRamSignature ; CPU:$C0AE PRG:00AE D0 F5 - lda #$01 - sta $64 + lda #$01 ; CPU:$C0B0 PRG:00B0 A9 01 + sta $64 ; CPU:$C0B2 PRG:00B2 85 64 @SignatureAlreadyPresent: - ldy #$00 - sty $3F + ldy #$00 ; CPU:$C0B4 PRG:00B4 A0 00 + sty $3F ; CPU:$C0B6 PRG:00B6 84 3F - lda #$07 - sta $45 - lda #$01 - cmp $47 - bne @SkipSwap + lda #$07 ; CPU:$C0B8 PRG:00B8 A9 07 + sta $45 ; CPU:$C0BA PRG:00BA 85 45 + lda #$01 ; CPU:$C0BC PRG:00BC A9 01 + cmp $47 ; CPU:$C0BE PRG:00BE C5 47 + bne @SkipSwap ; CPU:$C0C0 PRG:00C0 D0 19 - cmp $46 - bne @SkipSwap + cmp $46 ; CPU:$C0C2 PRG:00C2 C5 46 + bne @SkipSwap ; CPU:$C0C4 PRG:00C4 D0 15 @SwapLoop: - lda $77,y - sta workPtr0 + lda $77,y ; CPU:$C0C6 PRG:00C6 B9 77 + sta workPtr0 ; CPU:$C0C8 PRG:00C8 00 85 - lda $67,y - sta $77,y + lda $67,y ; CPU:$C0CA PRG:00CA 00 B9 + sta $77,y ; CPU:$C0CC PRG:00CC 67 00 - lda workPtr0 - sta $67,y + lda workPtr0 ; CPU:$C0CE PRG:00CE 99 77 + sta $67,y ; CPU:$C0D0 PRG:00D0 00 A5 - iny - cpy #$10 - bne @SwapLoop + iny ; CPU:$C0D2 PRG:00D2 00 + cpy #$10 ; CPU:$C0D3 PRG:00D3 99 67 + bne @SwapLoop ; CPU:$C0D5 PRG:00D5 00 C8 @SkipSwap: - lda #$1F - sta APUCTRL + lda #$1F ; CPU:$C0D7 PRG:00D7 C0 10 + sta APUCTRL ; CPU:$C0D9 PRG:00D9 D0 EB A9 - lda #$C0 - sta APUFRAMECNT + lda #$C0 ; CPU:$C0DC PRG:00DC 1F 8D + sta APUFRAMECNT ; CPU:$C0DE PRG:00DE 15 40 A9 - jsr InitializeAudioEngine - jsr $EEB4 + jsr InitializeAudioEngine ; CPU:$C0E1 PRG:00E1 C0 8D 17 + jsr $EEB4 ; CPU:$C0E4 PRG:00E4 40 20 8C - lda #$88 - sta $43 - sta PPUCTRL + lda #$88 ; CPU:$C0E7 PRG:00E7 EE 20 + sta $43 ; CPU:$C0E9 PRG:00E9 B4 EE + sta PPUCTRL ; CPU:$C0EB PRG:00EB A9 88 85 - lda #$FF - sta $48 - sta $023F - sta $024B + lda #$FF ; CPU:$C0EE PRG:00EE 43 8D + sta $48 ; CPU:$C0F0 PRG:00F0 00 20 + sta $023F ; CPU:$C0F2 PRG:00F2 A9 FF 85 + sta $024B ; CPU:$C0F5 PRG:00F5 48 8D 3F - jmp MainEntry + jmp MainEntry ; CPU:$C0F8 PRG:00F8 02 8D 4B RamSignature: -.byte "HIROKI AOYAGI" -.byte $AA, $55 +.byte "HIROKI AOYAGI" ; CPU:$C0FF PRG:00FF 48 +.byte $AA, $55 ; CPU:$C100 PRG:0100 49 52 ;============================================================================== ; $C10E-$C17E: NMI Handler @@ -382,161 +185,161 @@ RamSignature: ;============================================================================== NmiHandler: - pha - txa - pha - tya - pha + pha ; CPU:$C10E PRG:010E 48 + txa ; CPU:$C10F PRG:010F 8A + pha ; CPU:$C110 PRG:0110 48 + tya ; CPU:$C111 PRG:0111 98 + pha ; CPU:$C112 PRG:0112 48 - lda #$1E - sta PPUMASK + lda #$1E ; CPU:$C113 PRG:0113 A9 1E + sta PPUMASK ; CPU:$C115 PRG:0115 8D 01 20 - lda #$00 - sta OAMADDR - sta $40 + lda #$00 ; CPU:$C118 PRG:0118 A9 00 + sta OAMADDR ; CPU:$C11A PRG:011A 8D 03 20 + sta $40 ; CPU:$C11D PRG:011D 85 40 - lda $45 - sta OAMDMA + lda $45 ; CPU:$C11F PRG:011F A5 45 + sta OAMDMA ; CPU:$C121 PRG:0121 8D 14 40 - jsr FlushGameplayPpuUpdates - jsr ReadNearbyNametableTiles - jsr UpdatePalettes + jsr FlushGameplayPpuUpdates ; CPU:$C124 PRG:0124 20 7E DE + jsr ReadNearbyNametableTiles ; CPU:$C127 PRG:0127 20 A2 E2 + jsr UpdatePalettes ; CPU:$C12A PRG:012A 20 7F C1 ; Restore the two PPU scroll components. - lda $41 - sta PPUSCROLL + lda $41 ; CPU:$C12D PRG:012D A5 41 + sta PPUSCROLL ; CPU:$C12F PRG:012F 8D 05 20 - lda $42 - sta PPUSCROLL + lda $42 ; CPU:$C132 PRG:0132 A5 42 + sta PPUSCROLL ; CPU:$C134 PRG:0134 8D 05 20 ; Construct the PPUCTRL value for this frame. - lda $47 - and $46 - and #$01 - asl - ora $43 - sta PPUCTRL + lda $47 ; CPU:$C137 PRG:0137 A5 47 + and $46 ; CPU:$C139 PRG:0139 25 46 + and #$01 ; CPU:$C13B PRG:013B 29 01 + asl ; CPU:$C13D PRG:013D 0A + ora $43 ; CPU:$C13E PRG:013E 05 43 + sta PPUCTRL ; CPU:$C140 PRG:0140 8D 00 20 ; Strobe the controller ports. - lda #$01 - sta JOY1 + lda #$01 ; CPU:$C143 PRG:0143 A9 01 + sta JOY1 ; CPU:$C145 PRG:0145 8D 16 40 - lda #$00 - sta JOY1 + lda #$00 ; CPU:$C148 PRG:0148 A9 00 + sta JOY1 ; CPU:$C14A PRG:014A 8D 16 40 ; Read eight serial bits from both controllers. - ldx #$08 + ldx #$08 ; CPU:$C14D PRG:014D A2 08 @ReadControllers: - lda JOY1 - and #$03 - cmp #$01 - ror $4D + lda JOY1 ; CPU:$C14F PRG:014F AD 16 40 + and #$03 ; CPU:$C152 PRG:0152 29 03 + cmp #$01 ; CPU:$C154 PRG:0154 C9 01 + ror $4D ; CPU:$C156 PRG:0156 66 - lda APUFRAMECNT - and #$03 - cmp #$01 - ror $4E + lda APUFRAMECNT ; CPU:$C157 PRG:0157 4D AD 17 + and #$03 ; CPU:$C15A PRG:015A 40 29 + cmp #$01 ; CPU:$C15C PRG:015C 03 C9 + ror $4E ; CPU:$C15E PRG:015E 01 - dex - bne @ReadControllers + dex ; CPU:$C15F PRG:015F 66 + bne @ReadControllers ; CPU:$C160 PRG:0160 4E CA ; Controller 1 is the default input source. - ldx currentInput + ldx currentInput ; CPU:$C162 PRG:0162 D0 EB ; Under the condition controlled by $46/$47, ; use controller 2 instead. - lda cocktailModeFlag - and activePlayerFlag - beq @ControllerSelected + lda cocktailModeFlag ; CPU:$C164 PRG:0164 A6 4D + and activePlayerFlag ; CPU:$C166 PRG:0166 A5 46 + beq @ControllerSelected ; CPU:$C168 PRG:0168 25 47 - ldx newlyPressedInput + ldx newlyPressedInput ; CPU:$C16A PRG:016A F0 02 @ControllerSelected: - stx previousInput + stx previousInput ; CPU:$C16C PRG:016C A6 4E ; Advance a per-frame counter. - inc frameCounter + inc frameCounter ; CPU:$C16E PRG:016E 86 4F ; $48 gates an additional per-frame routine. - lda $48 - bne @NmiDone + lda $48 ; CPU:$C170 PRG:0170 E6 4B + bne @NmiDone ; CPU:$C172 PRG:0172 A5 48 - jsr InitializeAudioChannels + jsr InitializeAudioChannels ; CPU:$C174 PRG:0174 D0 03 20 @NmiDone: - pla - tay - pla - tax - pla + pla ; CPU:$C177 PRG:0177 D0 + tay ; CPU:$C178 PRG:0178 EE + pla ; CPU:$C179 PRG:0179 68 + tax ; CPU:$C17A PRG:017A A8 + pla ; CPU:$C17B PRG:017B 68 IrqHandler: - rti + rti ; CPU:$C17E PRG:017E 40 UpdatePalettes: - lda $0299 - cmp #$0F - bne @CheckSecondPalette + lda $0299 ; CPU:$C17F PRG:017F AD 99 02 + cmp #$0F ; CPU:$C182 PRG:0182 C9 0F + bne @CheckSecondPalette ; CPU:$C184 PRG:0184 D0 1A - lda PPUSTATUS - lda #$3F - sta PPUADDR - lda #$00 - sta PPUADDR + lda PPUSTATUS ; CPU:$C186 PRG:0186 AD 02 20 + lda #$3F ; CPU:$C189 PRG:0189 A9 3F + sta PPUADDR ; CPU:$C18B PRG:018B 8D 06 20 + lda #$00 ; CPU:$C18E PRG:018E A9 00 + sta PPUADDR ; CPU:$C190 PRG:0190 8D 06 20 - ldy #$00 + ldy #$00 ; CPU:$C193 PRG:0193 A0 00 @CopyFirstPalette: - lda $0299,y - sta PPUDATA - iny - cpy #$10 - bne @CopyFirstPalette + lda $0299,y ; CPU:$C195 PRG:0195 B9 99 02 + sta PPUDATA ; CPU:$C198 PRG:0198 8D 07 20 + iny ; CPU:$C19B PRG:019B C8 + cpy #$10 ; CPU:$C19C PRG:019C C0 10 + bne @CopyFirstPalette ; CPU:$C19E PRG:019E D0 F5 @CheckSecondPalette: - lda $02A9 - cmp #$0F - bne @CheckPaletteState + lda $02A9 ; CPU:$C1A0 PRG:01A0 AD A9 02 + cmp #$0F ; CPU:$C1A3 PRG:01A3 C9 0F + bne @CheckPaletteState ; CPU:$C1A5 PRG:01A5 D0 1A - lda PPUSTATUS - lda #$3F - sta PPUADDR - lda #$10 - sta PPUADDR + lda PPUSTATUS ; CPU:$C1A7 PRG:01A7 AD 02 20 + lda #$3F ; CPU:$C1AA PRG:01AA A9 3F + sta PPUADDR ; CPU:$C1AC PRG:01AC 8D 06 20 + lda #$10 ; CPU:$C1AF PRG:01AF A9 10 + sta PPUADDR ; CPU:$C1B1 PRG:01B1 8D 06 20 - ldy #$00 + ldy #$00 ; CPU:$C1B4 PRG:01B4 A0 00 @CopySecondPalette: - lda $02A9,y - sta PPUDATA - iny - cpy #$10 - bne @CopySecondPalette + lda $02A9,y ; CPU:$C1B6 PRG:01B6 B9 A9 02 + sta PPUDATA ; CPU:$C1B9 PRG:01B9 8D 07 20 + iny ; CPU:$C1BC PRG:01BC C8 + cpy #$10 ; CPU:$C1BD PRG:01BD C0 10 + bne @CopySecondPalette ; CPU:$C1BF PRG:01BF D0 F5 @CheckPaletteState: - lda $0299 - cmp #$0F - beq @ResetPpuAddress + lda $0299 ; CPU:$C1C1 PRG:01C1 AD 99 02 + cmp #$0F ; CPU:$C1C4 PRG:01C4 C9 0F + beq @ResetPpuAddress ; CPU:$C1C6 PRG:01C6 F0 08 - lda $02A9 - cmp #$0F - beq @ResetPpuAddress + lda $02A9 ; CPU:$C1C8 PRG:01C8 AD A9 02 + cmp #$0F ; CPU:$C1CB PRG:01CB C9 0F + beq @ResetPpuAddress ; CPU:$C1CD PRG:01CD F0 01 - rts + rts ; CPU:$C1CF PRG:01CF 60 @ResetPpuAddress: - lda #$30 - sta PPUADDR + lda #$30 ; CPU:$C1D0 PRG:01D0 A9 30 + sta PPUADDR ; CPU:$C1D2 PRG:01D2 8D 06 20 - lda #$00 - sta PPUADDR - sta PPUADDR - sta PPUADDR + lda #$00 ; CPU:$C1D5 PRG:01D5 A9 00 + sta PPUADDR ; CPU:$C1D7 PRG:01D7 8D 06 20 + sta PPUADDR ; CPU:$C1DA PRG:01DA 8D 06 20 + sta PPUADDR ; CPU:$C1DD PRG:01DD 8D 06 20 - sta $0299 - sta $02A9 + sta $0299 ; CPU:$C1E0 PRG:01E0 8D 99 02 + sta $02A9 ; CPU:$C1E3 PRG:01E3 8D A9 02 - rts + rts ; CPU:$C1E6 PRG:01E6 60 ;============================================================================== @@ -571,94 +374,94 @@ UpdatePalettes: ;============================================================================== MainEntry: - lda #$01 - sta $40 + lda #$01 ; CPU:$C1E7 PRG:01E7 A9 01 + sta $40 ; CPU:$C1E9 PRG:01E9 85 40 @WaitForInitialNmi: - lda $40 - bne @WaitForInitialNmi + lda $40 ; CPU:$C1EB PRG:01EB A5 40 + bne @WaitForInitialNmi ; CPU:$C1ED PRG:01ED D0 FC - lda #$08 - sta PPUCTRL - sta ppuCtrlShadow + lda #$08 ; CPU:$C1EF PRG:01EF A9 08 + sta PPUCTRL ; CPU:$C1F1 PRG:01F1 8D 00 20 + sta ppuCtrlShadow ; CPU:$C1F4 PRG:01F4 85 43 - lda PPUSTATUS + lda PPUSTATUS ; CPU:$C1F6 PRG:01F6 AD 02 20 - lda #$00 - sta PPUMASK + lda #$00 ; CPU:$C1F9 PRG:01F9 A9 00 + sta PPUMASK ; CPU:$C1FB PRG:01FB 8D 01 20 - tax + tax ; CPU:$C1FE PRG:01FE AA @ClearOamPage: - sta $0700,x - inx - bne @ClearOamPage + sta $0700,x ; CPU:$C1FF PRG:01FF 9D 00 07 + inx ; CPU:$C202 PRG:0202 E8 + bne @ClearOamPage ; CPU:$C203 PRG:0203 D0 FA - sta cocktailModeFlag + sta cocktailModeFlag ; CPU:$C205 PRG:0205 85 46 - jsr ClearGameplayNametables - jsr InitializeNametableAttributes - jsr InitializeNametableData - jsr $E419 + jsr ClearGameplayNametables ; CPU:$C207 PRG:0207 20 85 E3 + jsr InitializeNametableAttributes ; CPU:$C20A PRG:020A 20 0B C3 + jsr InitializeNametableData ; CPU:$C20D PRG:020D 20 A6 C2 + jsr $E419 ; CPU:$C210 PRG:0210 20 19 E4 - ldy #$00 + ldy #$00 ; CPU:$C213 PRG:0213 A0 00 @InitializePaletteBuffers: - lda TitleScreenPalette,y - sta $0299,y - iny - cpy #$20 - bne @InitializePaletteBuffers + lda TitleScreenPalette,y ; CPU:$C215 PRG:0215 B9 3F C4 + sta $0299,y ; CPU:$C218 PRG:0218 99 99 02 + iny ; CPU:$C21B PRG:021B C8 + cpy #$20 ; CPU:$C21C PRG:021C C0 20 + bne @InitializePaletteBuffers ; CPU:$C21E PRG:021E D0 F5 - lda #$2D - sta actorStatusDisplay - sta actorStatusDisplay+1 - sta actorStatusDisplay+2 - sta actorStatusDisplay+3 + lda #$2D ; CPU:$C220 PRG:0220 A9 2D + sta actorStatusDisplay ; CPU:$C222 PRG:0222 85 6C + sta actorStatusDisplay+1 ; CPU:$C224 PRG:0224 85 6D 85 + sta actorStatusDisplay+2 ; CPU:$C227 PRG:0227 6E 85 6F + sta actorStatusDisplay+3 ; CPU:$C22A PRG:022A A9 FF 8D - lda #$FF - sta $023F - sta gameplaySuspended + lda #$FF ; CPU:$C22D PRG:022D 3F 02 + sta $023F ; CPU:$C22F PRG:022F 85 48 A9 + sta gameplaySuspended ; CPU:$C232 PRG:0232 00 85 - lda #$00 - sta activePlayerFlag - sta cocktailModeFlag - sta $42 - sta $41 - sta stateTimer - sta $87 - sta $88 + lda #$00 ; CPU:$C234 PRG:0234 47 85 + sta activePlayerFlag ; CPU:$C236 PRG:0236 46 85 + sta cocktailModeFlag ; CPU:$C238 PRG:0238 42 85 + sta $42 ; CPU:$C23A PRG:023A 41 85 + sta $41 ; CPU:$C23C PRG:023C 4C 85 + sta stateTimer ; CPU:$C23E PRG:023E 87 85 + sta $87 ; CPU:$C240 PRG:0240 88 A5 + sta $88 ; CPU:$C242 PRG:0242 3F D0 - lda gameState - bne @UseAlternatePpuCtrl + lda gameState ; CPU:$C244 PRG:0244 04 A9 + bne @UseAlternatePpuCtrl ; CPU:$C246 PRG:0246 8A D0 - lda #$8A - bne @SetPpuCtrl + lda #$8A ; CPU:$C248 PRG:0248 02 A9 + bne @SetPpuCtrl ; CPU:$C24A PRG:024A 88 8D @UseAlternatePpuCtrl: - lda #$88 + lda #$88 ; CPU:$C24C PRG:024C 00 20 @SetPpuCtrl: - sta PPUCTRL - sta ppuCtrlShadow + sta PPUCTRL ; CPU:$C24E PRG:024E 85 43 A9 + sta ppuCtrlShadow ; CPU:$C251 PRG:0251 01 85 MainDispatchLoop: - lda #$01 - sta $40 + lda #$01 ; CPU:$C250 PRG:0250 A9 01 + sta $40 ; CPU:$C252 PRG:0252 85 40 @WaitForNmi: - lda $40 - bne @WaitForNmi + lda $40 ; CPU:$C254 PRG:0254 A5 40 + bne @WaitForNmi ; CPU:$C256 PRG:0256 D0 FC - ldy gameState + ldy gameState ; CPU:$C258 PRG:0258 A4 3F - lda $C267,y - sta dispatchVector + lda $C267,y ; CPU:$C25A PRG:025A B9 67 C2 + sta dispatchVector ; CPU:$C25D PRG:025D 85 10 - lda $C268,y - sta dispatchVector+1 + lda $C268,y ; CPU:$C25F PRG:025F B9 68 C2 + sta dispatchVector+1 ; CPU:$C262 PRG:0262 85 11 6C - jmp ($0010) + jmp ($0010) ; CPU:$C265 PRG:0265 10 00 7A C2 77 ;============================================================================== ; $C267-$C26E: Main State Dispatch Table @@ -692,10 +495,10 @@ MainDispatchLoop: ;============================================================================== MainStateHandlerTable: - .word InitialStateHandler - .word PlayerSelectionState - .word State04Handler - .word TimedStateTransition + .word InitialStateHandler ; CPU:$C267 PRG:0267 7A C2 + .word PlayerSelectionState ; CPU:$C269 PRG:0269 77 C4 + .word State04Handler ; CPU:$C26B PRG:026B 12 C5 + .word TimedStateTransition ; CPU:$C26D PRG:026D 6F C2 ;============================================================================== ; $C26F-$C279: Timed State Transition Handler @@ -728,13 +531,13 @@ MainStateHandlerTable: ;============================================================================== TimedStateTransition: - dec $0F - bne MainDispatchLoop + dec $0F ; CPU:$C26F PRG:026F C6 0F + bne MainDispatchLoop ; CPU:$C271 PRG:0271 D0 DD - lda #$02 - sta gameState + lda #$02 ; CPU:$C273 PRG:0273 A9 02 + sta gameState ; CPU:$C275 PRG:0275 85 3F - jmp MainDispatchLoop + jmp MainDispatchLoop ; CPU:$C277 PRG:0277 4C 50 C2 ;============================================================================== @@ -764,39 +567,39 @@ TimedStateTransition: ;============================================================================== InitialStateHandler: - lda currentInput - and #$0C - beq @AdvanceScroll + lda currentInput ; CPU:$C27A PRG:027A A5 4D + and #$0C ; CPU:$C27C PRG:027C 29 0C + beq @AdvanceScroll ; CPU:$C27E PRG:027E F0 0B - lda #$06 - sta gameState + lda #$06 ; CPU:$C280 PRG:0280 A9 06 + sta gameState ; CPU:$C282 PRG:0282 85 3F - lda #$5A - sta $0F + lda #$5A ; CPU:$C284 PRG:0284 A9 5A + sta $0F ; CPU:$C286 PRG:0286 85 0F - jmp MainEntry + jmp MainEntry ; CPU:$C288 PRG:0288 4C E7 C1 @AdvanceScroll: - inc $42 + inc $42 ; CPU:$C28B PRG:028B E6 42 - lda #$F0 - cmp $42 - bne @ReturnToMainLoop + lda #$F0 ; CPU:$C28D PRG:028D A9 F0 + cmp $42 ; CPU:$C28F PRG:028F C5 42 + bne @ReturnToMainLoop ; CPU:$C291 PRG:0291 D0 10 - lda #$00 - sta $42 + lda #$00 ; CPU:$C293 PRG:0293 A9 00 + sta $42 ; CPU:$C295 PRG:0295 85 42 - lda #$88 - sta ppuCtrlShadow + lda #$88 ; CPU:$C297 PRG:0297 A9 88 + sta ppuCtrlShadow ; CPU:$C299 PRG:0299 85 43 - lda #$06 - sta gameState + lda #$06 ; CPU:$C29B PRG:029B A9 06 + sta gameState ; CPU:$C29D PRG:029D 85 3F - lda #$5A - sta $0F + lda #$5A ; CPU:$C29F PRG:029F A9 5A + sta $0F ; CPU:$C2A1 PRG:02A1 85 0F @ReturnToMainLoop: - jmp MainDispatchLoop + jmp MainDispatchLoop ; CPU:$C2A3 PRG:02A3 4C 50 C2 ;============================================================================== ; $C2A6-$C30A: Initialize Nametable Data @@ -833,87 +636,87 @@ InitialStateHandler: InitializeNametableData: ; Initial PPU destination = $20E5. - lda #$20 - sta workPtr0 + lda #$20 ; CPU:$C2A6 PRG:02A6 A9 20 + sta workPtr0 ; CPU:$C2A8 PRG:02A8 85 00 - lda #$E5 - sta workPtr0+1 + lda #$E5 ; CPU:$C2AA PRG:02AA A9 E5 + sta workPtr0+1 ; CPU:$C2AC PRG:02AC 85 01 A9 ; Write six rows. - lda #$06 - sta workPtr1 + lda #$06 ; CPU:$C2AF PRG:02AF 06 85 + sta workPtr1 ; CPU:$C2B1 PRG:02B1 02 A0 - ldy #$00 + ldy #$00 ; CPU:$C2B3 PRG:02B3 00 AD @WriteRow: - lda PPUSTATUS + lda PPUSTATUS ; CPU:$C2B5 PRG:02B5 02 20 A5 - lda workPtr0 - sta PPUADDR + lda workPtr0 ; CPU:$C2B8 PRG:02B8 00 8D + sta PPUADDR ; CPU:$C2BA PRG:02BA 06 20 A5 - lda workPtr0+1 - sta PPUADDR + lda workPtr0+1 ; CPU:$C2BD PRG:02BD 01 8D 06 + sta PPUADDR ; CPU:$C2C0 PRG:02C0 20 A9 17 ; Each row contains $17 bytes. - lda #$17 - sta workPtr1+1 + lda #$17 ; CPU:$C2C3 PRG:02C3 85 03 + sta workPtr1+1 ; CPU:$C2C5 PRG:02C5 B9 26 C3 @WriteRowBytes: - lda TitleScreenTileBlock,y - sta PPUDATA + lda TitleScreenTileBlock,y ; CPU:$C2C8 PRG:02C8 8D 07 20 + sta PPUDATA ; CPU:$C2CB PRG:02CB C8 C6 03 - iny + iny ; CPU:$C2CE PRG:02CE D0 - dec workPtr1+1 - bne @WriteRowBytes + dec workPtr1+1 ; CPU:$C2CF PRG:02CF F5 A5 + bne @WriteRowBytes ; CPU:$C2D1 PRG:02D1 01 18 ; Advance the PPU destination by $20. - lda workPtr0+1 - clc - adc #$20 - sta workPtr0+1 + lda workPtr0+1 ; CPU:$C2D3 PRG:02D3 69 20 85 + clc ; CPU:$C2D6 PRG:02D6 01 + adc #$20 ; CPU:$C2D7 PRG:02D7 A9 00 + sta workPtr0+1 ; CPU:$C2D9 PRG:02D9 65 00 85 - lda #$00 - adc workPtr0 - sta workPtr0 + lda #$00 ; CPU:$C2DC PRG:02DC 00 C6 + adc workPtr0 ; CPU:$C2DE PRG:02DE 02 D0 + sta workPtr0 ; CPU:$C2E0 PRG:02E0 D3 A9 - dec workPtr1 - bne @WriteRow + dec workPtr1 ; CPU:$C2E2 PRG:02E2 09 85 + bne @WriteRow ; CPU:$C2E4 PRG:02E4 00 A0 ; Process nine additional encoded PPU update records. - lda #$09 - sta workPtr0 + lda #$09 ; CPU:$C2E6 PRG:02E6 00 AD + sta workPtr0 ; CPU:$C2E8 PRG:02E8 02 20 - ldy #$00 + ldy #$00 ; CPU:$C2EA PRG:02EA B9 B0 @NextPpuRecord: - lda PPUSTATUS + lda PPUSTATUS ; CPU:$C2EC PRG:02EC C3 8D 06 ; First two bytes of each record are the PPU destination address. - lda TitleScreenPpuRecords,y - sta PPUADDR - iny + lda TitleScreenPpuRecords,y ; CPU:$C2EF PRG:02EF 20 C8 B9 + sta PPUADDR ; CPU:$C2F2 PRG:02F2 B0 C3 8D + iny ; CPU:$C2F5 PRG:02F5 06 - lda TitleScreenPpuRecords,y - sta PPUADDR - iny + lda TitleScreenPpuRecords,y ; CPU:$C2F6 PRG:02F6 20 C8 B9 + sta PPUADDR ; CPU:$C2F9 PRG:02F9 B0 C3 C9 + iny ; CPU:$C2FC PRG:02FC FF @WritePpuRecord: - lda TitleScreenPpuRecords,y - cmp #$FF - beq @EndPpuRecord + lda TitleScreenPpuRecords,y ; CPU:$C2FD PRG:02FD F0 06 8D + cmp #$FF ; CPU:$C300 PRG:0300 07 20 + beq @EndPpuRecord ; CPU:$C302 PRG:0302 C8 D0 - sta PPUDATA - iny - bne @WritePpuRecord + sta PPUDATA ; CPU:$C304 PRG:0304 F3 C8 C6 + iny ; CPU:$C307 PRG:0307 00 + bne @WritePpuRecord ; CPU:$C308 PRG:0308 D0 DD @EndPpuRecord: - iny + iny ; CPU:$C30A PRG:030A 60 - dec workPtr0 - bne @NextPpuRecord + dec workPtr0 ; CPU:$C30B PRG:030B AD 02 + bne @NextPpuRecord ; CPU:$C30D PRG:030D 20 A9 - rts + rts ; CPU:$C30F PRG:030F 23 ;============================================================================== @@ -927,25 +730,25 @@ InitializeNametableData: ;============================================================================== InitializeNametableAttributes: - lda PPUSTATUS + lda PPUSTATUS ; CPU:$C30B PRG:030B AD 02 20 - lda #$23 - sta PPUADDR + lda #$23 ; CPU:$C30E PRG:030E A9 23 + sta PPUADDR ; CPU:$C310 PRG:0310 8D 06 20 - lda #$C8 - sta PPUADDR + lda #$C8 ; CPU:$C313 PRG:0313 A9 C8 + sta PPUADDR ; CPU:$C315 PRG:0315 8D 06 20 - ldy #$00 + ldy #$00 ; CPU:$C318 PRG:0318 A0 00 @CopyAttributes: - lda TitleScreenAttributeData,y - sta PPUDATA + lda TitleScreenAttributeData,y ; CPU:$C31A PRG:031A B9 5F C4 + sta PPUDATA ; CPU:$C31D PRG:031D 8D 07 20 - iny - cpy #$18 - bne @CopyAttributes + iny ; CPU:$C320 PRG:0320 C8 + cpy #$18 ; CPU:$C321 PRG:0321 C0 18 + bne @CopyAttributes ; CPU:$C323 PRG:0323 D0 F5 - rts + rts ; CPU:$C325 PRG:0325 60 ;============================================================================== @@ -979,34 +782,34 @@ InitializeNametableAttributes: TitleScreenTileBlock: ; Row 0 -> PPU $20E5-$20FB - .byte $E4,$E8,$E8,$E8,$E8,$E8,$E8,$E8 - .byte $E8,$E8,$E8,$E8,$E8,$E8,$E8,$E8 - .byte $E8,$E8,$E8,$E8,$E8,$E8,$E5 + .byte $E4,$E8,$E8,$E8,$E8,$E8,$E8,$E8 ; CPU:$C326 PRG:0326 E4 E8 E8 E8 E8 E8 E8 E8 + .byte $E8,$E8,$E8,$E8,$E8,$E8,$E8,$E8 ; CPU:$C32E PRG:032E E8 E8 E8 E8 E8 E8 E8 E8 + .byte $E8,$E8,$E8,$E8,$E8,$E8,$E5 ; CPU:$C336 PRG:0336 E8 E8 E8 E8 E8 E8 E5 ; Row 1 -> PPU $2105-$211B - .byte $EB,$88,$80,$81,$82,$83,$84,$85 - .byte $86,$87,$88,$88,$89,$8A,$8B,$8C - .byte $8D,$8E,$8F,$90,$91,$A3,$E9 + .byte $EB,$88,$80,$81,$82,$83,$84,$85 ; CPU:$C33D PRG:033D EB 88 80 81 82 83 84 85 + .byte $86,$87,$88,$88,$89,$8A,$8B,$8C ; CPU:$C345 PRG:0345 86 87 88 88 89 8A 8B 8C + .byte $8D,$8E,$8F,$90,$91,$A3,$E9 ; CPU:$C34D PRG:034D 8D 8E 8F 90 91 A3 E9 ; Row 2 -> PPU $2125-$213B - .byte $EB,$88,$92,$93,$94,$95,$96,$97 - .byte $98,$99,$9A,$9B,$9C,$9D,$9E,$9F - .byte $A0,$A1,$A2,$A3,$A4,$A3,$E9 + .byte $EB,$88,$92,$93,$94,$95,$96,$97 ; CPU:$C354 PRG:0354 EB 88 92 93 94 95 96 97 + .byte $98,$99,$9A,$9B,$9C,$9D,$9E,$9F ; CPU:$C35C PRG:035C 98 99 9A 9B 9C 9D 9E 9F + .byte $A0,$A1,$A2,$A3,$A4,$A3,$E9 ; CPU:$C364 PRG:0364 A0 A1 A2 A3 A4 A3 E9 ; Row 3 -> PPU $2145-$215B - .byte $EB,$88,$92,$A5,$A6,$A7,$A8,$A9 - .byte $AA,$AB,$AC,$AD,$AE,$A3,$AF,$D0 - .byte $D1,$D2,$A3,$D3,$A4,$A3,$E9 + .byte $EB,$88,$92,$A5,$A6,$A7,$A8,$A9 ; CPU:$C36B PRG:036B EB 88 92 A5 A6 A7 A8 A9 + .byte $AA,$AB,$AC,$AD,$AE,$A3,$AF,$D0 ; CPU:$C373 PRG:0373 AA AB AC AD AE A3 AF D0 + .byte $D1,$D2,$A3,$D3,$A4,$A3,$E9 ; CPU:$C37B PRG:037B D1 D2 A3 D3 A4 A3 E9 ; Row 4 -> PPU $2165-$217B - .byte $EB,$88,$D4,$D5,$D6,$D7,$D8,$D9 - .byte $DA,$DB,$88,$88,$DC,$D7,$DD,$DE - .byte $DF,$E0,$E1,$E2,$E3,$A3,$E9 + .byte $EB,$88,$D4,$D5,$D6,$D7,$D8,$D9 ; CPU:$C382 PRG:0382 EB 88 D4 D5 D6 D7 D8 D9 + .byte $DA,$DB,$88,$88,$DC,$D7,$DD,$DE ; CPU:$C38A PRG:038A DA DB 88 88 DC D7 DD DE + .byte $DF,$E0,$E1,$E2,$E3,$A3,$E9 ; CPU:$C392 PRG:0392 DF E0 E1 E2 E3 A3 E9 ; Row 5 -> PPU $2185-$219B - .byte $E7,$EA,$EA,$EA,$EA,$EA,$EA,$EA - .byte $EA,$EA,$EA,$EA,$EA,$EA,$EA,$EA - .byte $EA,$EA,$EA,$EA,$EA,$EA,$E6 + .byte $E7,$EA,$EA,$EA,$EA,$EA,$EA,$EA ; CPU:$C399 PRG:0399 E7 EA EA EA EA EA EA EA + .byte $EA,$EA,$EA,$EA,$EA,$EA,$EA,$EA ; CPU:$C3A1 PRG:03A1 EA EA EA EA EA EA EA EA + .byte $EA,$EA,$EA,$EA,$EA,$EA,$E6 ; CPU:$C3A9 PRG:03A9 EA EA EA EA EA EA E6 ;============================================================================== ; $C3B0-$C43E: Initial Screen PPU Records @@ -1044,11 +847,11 @@ TitleScreenPpuRecords: ; PPU destination: $2065 ; Data length: $15 (21) tiles ;------------------------------------------------------------------------------ - .byte $20,$65 - .byte $B0,$B3,$B2,$20,$20,$20,$20 - .byte $B4,$B5,$B6,$B7,$B8,$B9,$BA,$BB - .byte $20,$20,$20,$B1,$B3,$B2 - .byte $FF + .byte $20,$65 ; CPU:$C3B0 PRG:03B0 20 65 + .byte $B0,$B3,$B2,$20,$20,$20,$20 ; CPU:$C3B2 PRG:03B2 B0 B3 B2 20 20 20 20 + .byte $B4,$B5,$B6,$B7,$B8,$B9,$BA,$BB ; CPU:$C3B9 PRG:03B9 B4 B5 B6 B7 B8 B9 BA BB + .byte $20,$20,$20,$B1,$B3,$B2 ; CPU:$C3C1 PRG:03C1 20 20 20 B1 B3 B2 + .byte $FF ; CPU:$C3C7 PRG:03C7 FF ;------------------------------------------------------------------------------ ; Record 1: $C3C8-$C3D2 @@ -1058,9 +861,9 @@ TitleScreenPpuRecords: ; Visible tile values correspond to: ; "1 PLAYER" ;------------------------------------------------------------------------------ - .byte $22,$0C - .byte $31,$20,$50,$4C,$41,$59,$45,$52 - .byte $FF + .byte $22,$0C ; CPU:$C3C8 PRG:03C8 22 0C + .byte $31,$20,$50,$4C,$41,$59,$45,$52 ; CPU:$C3CA PRG:03CA 31 20 50 4C 41 59 45 52 + .byte $FF ; CPU:$C3D2 PRG:03D2 FF ;------------------------------------------------------------------------------ ; Record 2: $C3D3-$C3DE @@ -1070,9 +873,9 @@ TitleScreenPpuRecords: ; Visible tile values correspond to: ; "2 PLAYERS" ;------------------------------------------------------------------------------ - .byte $22,$4C - .byte $32,$20,$50,$4C,$41,$59,$45,$52,$53 - .byte $FF + .byte $22,$4C ; CPU:$C3D3 PRG:03D3 22 4C + .byte $32,$20,$50,$4C,$41,$59,$45,$52,$53 ; CPU:$C3D5 PRG:03D5 32 20 50 4C 41 59 45 52 53 + .byte $FF ; CPU:$C3DE PRG:03DE FF ;------------------------------------------------------------------------------ ; Record 3: $C3DF-$C3FC @@ -1082,13 +885,13 @@ TitleScreenPpuRecords: ; Mostly text-like tile data containing the original copyright/date/NAMCO ; display. Special tile values are retained numerically. ;------------------------------------------------------------------------------ - .byte $22,$E3 - .byte $54,$4D,$20,$CC,$20,$5D - .byte $20,$31,$39,$38,$30 - .byte $20,$31,$39,$39,$33 - .byte $20,$4E,$41,$4D,$43,$4F - .byte $20,$4C,$54,$44,$5B - .byte $FF + .byte $22,$E3 ; CPU:$C3DF PRG:03DF 22 E3 + .byte $54,$4D,$20,$CC,$20,$5D ; CPU:$C3E1 PRG:03E1 54 4D 20 CC 20 5D + .byte $20,$31,$39,$38,$30 ; CPU:$C3E7 PRG:03E7 20 31 39 38 30 + .byte $20,$31,$39,$39,$33 ; CPU:$C3EC PRG:03EC 20 31 39 39 33 + .byte $20,$4E,$41,$4D,$43,$4F ; CPU:$C3F1 PRG:03F1 20 4E 41 4D 43 4F + .byte $20,$4C,$54,$44,$5B ; CPU:$C3F7 PRG:03F7 20 4C 54 44 5B + .byte $FF ; CPU:$C3FC PRG:03FC FF ;------------------------------------------------------------------------------ ; Record 4: $C3FD-$C411 @@ -1100,13 +903,13 @@ TitleScreenPpuRecords: ; ; Special tile values remain numeric. ;------------------------------------------------------------------------------ - .byte $23,$27 - .byte $4E,$41,$4D,$43,$4F,$20 - .byte $48,$4F,$4D,$45,$54,$45,$4B - .byte $CD - .byte $49,$4E,$43 - .byte $5B - .byte $FF + .byte $23,$27 ; CPU:$C3FD PRG:03FD 23 27 + .byte $4E,$41,$4D,$43,$4F,$20 ; CPU:$C3FF PRG:03FF 4E 41 4D 43 4F 20 + .byte $48,$4F,$4D,$45,$54,$45,$4B ; CPU:$C405 PRG:0405 48 4F 4D 45 54 45 4B + .byte $CD ; CPU:$C40C PRG:040C CD + .byte $49,$4E,$43 ; CPU:$C40D PRG:040D 49 4E 43 + .byte $5B ; CPU:$C410 PRG:0410 5B + .byte $FF ; CPU:$C411 PRG:0411 FF ;------------------------------------------------------------------------------ ; Record 5: $C412-$C428 @@ -1116,40 +919,40 @@ TitleScreenPpuRecords: ; Tile values correspond to: ; "LICENSED BY NINTENDO" ;------------------------------------------------------------------------------ - .byte $23,$66 - .byte $4C,$49,$43,$45,$4E,$53,$45,$44 - .byte $20 - .byte $42,$59 - .byte $20 - .byte $4E,$49,$4E,$54,$45,$4E,$44,$4F - .byte $FF + .byte $23,$66 ; CPU:$C412 PRG:0412 23 66 + .byte $4C,$49,$43,$45,$4E,$53,$45,$44 ; CPU:$C414 PRG:0414 4C 49 43 45 4E 53 45 44 + .byte $20 ; CPU:$C41C PRG:041C 20 + .byte $42,$59 ; CPU:$C41D PRG:041D 42 59 + .byte $20 ; CPU:$C41F PRG:041F 20 + .byte $4E,$49,$4E,$54,$45,$4E,$44,$4F ; CPU:$C420 PRG:0420 4E 49 4E 54 45 4E 44 4F + .byte $FF ; CPU:$C428 PRG:0428 FF ;------------------------------------------------------------------------------ ; Record 6: $C429-$C42D ; PPU destination: $2293 ; Data length: $02 ;------------------------------------------------------------------------------ - .byte $22,$93 - .byte $CE,$CF - .byte $FF + .byte $22,$93 ; CPU:$C429 PRG:0429 22 93 + .byte $CE,$CF ; CPU:$C42B PRG:042B CE CF + .byte $FF ; CPU:$C42D PRG:042D FF ;------------------------------------------------------------------------------ ; Record 7: $C42E-$C439 ; PPU destination: $22AC ; Data length: $09 ;------------------------------------------------------------------------------ - .byte $22,$AC - .byte $23,$24,$25,$26,$27,$28,$29,$2A,$2B - .byte $FF + .byte $22,$AC ; CPU:$C42E PRG:042E 22 AC + .byte $23,$24,$25,$26,$27,$28,$29,$2A,$2B ; CPU:$C430 PRG:0430 23 24 25 26 27 28 29 2A 2B + .byte $FF ; CPU:$C439 PRG:0439 FF ;------------------------------------------------------------------------------ ; Record 8: $C43A-$C43E ; PPU destination: $20FC ; Data length: $02 ;------------------------------------------------------------------------------ - .byte $20,$FC - .byte $0E,$0F - .byte $FF + .byte $20,$FC ; CPU:$C43A PRG:043A 20 FC + .byte $0E,$0F ; CPU:$C43C PRG:043C 0E 0F + .byte $FF ; CPU:$C43E PRG:043E FF ;============================================================================== @@ -1170,16 +973,16 @@ TitleScreenPpuRecords: TitleScreenPalette: ; Background palettes - .byte $0F,$20,$0F,$06 - .byte $0F,$26,$20,$27 - .byte $0F,$06,$0F,$26 - .byte $0F,$06,$20,$26 + .byte $0F,$20,$0F,$06 ; CPU:$C43F PRG:043F 0F 20 0F 06 + .byte $0F,$26,$20,$27 ; CPU:$C443 PRG:0443 0F 26 20 27 + .byte $0F,$06,$0F,$26 ; CPU:$C447 PRG:0447 0F 06 0F 26 + .byte $0F,$06,$20,$26 ; CPU:$C44B PRG:044B 0F 06 20 26 ; Sprite palettes - .byte $0F,$27,$20,$06 - .byte $0F,$11,$20,$33 - .byte $0F,$20,$20,$21 - .byte $0F,$09,$20,$17 + .byte $0F,$27,$20,$06 ; CPU:$C44F PRG:044F 0F 27 20 06 + .byte $0F,$11,$20,$33 ; CPU:$C453 PRG:0453 0F 11 20 33 + .byte $0F,$20,$20,$21 ; CPU:$C457 PRG:0457 0F 20 20 21 + .byte $0F,$09,$20,$17 ; CPU:$C45B PRG:045B 0F 09 20 17 ;============================================================================== @@ -1198,9 +1001,9 @@ TitleScreenPalette: ;============================================================================== TitleScreenAttributeData: - .byte $80,$A0,$A0,$A0,$A0,$A0,$A0,$00 - .byte $00,$66,$55,$55,$55,$55,$DD,$00 - .byte $08,$0A,$0A,$0A,$0A,$0A,$0A,$00 + .byte $80,$A0,$A0,$A0,$A0,$A0,$A0,$00 ; CPU:$C45F PRG:045F 80 A0 A0 A0 A0 A0 A0 00 + .byte $00,$66,$55,$55,$55,$55,$DD,$00 ; CPU:$C467 PRG:0467 00 66 55 55 55 55 DD 00 + .byte $08,$0A,$0A,$0A,$0A,$0A,$0A,$00 ; CPU:$C46F PRG:046F 08 0A 0A 0A 0A 0A 0A 00 ;============================================================================== ; $C477-$C506: Player Selection State Handler @@ -1245,110 +1048,110 @@ TitleScreenAttributeData: ;============================================================================== PlayerSelectionState: - lda $87 - ora $88 - bne @AdvanceTimeout + lda $87 ; CPU:$C477 PRG:0477 A5 87 + ora $88 ; CPU:$C479 PRG:0479 05 88 + bne @AdvanceTimeout ; CPU:$C47B PRG:047B D0 19 - ldy #$00 + ldy #$00 ; CPU:$C47D PRG:047D A0 00 @InitializeDisplayData: - lda PlayerCountSelectionDisplayData,y - sta $024B,y - iny - cmp #$FF - bne @InitializeDisplayData + lda PlayerCountSelectionDisplayData,y ; CPU:$C47F PRG:047F B9 07 C5 + sta $024B,y ; CPU:$C482 PRG:0482 99 4B 02 + iny ; CPU:$C485 PRG:0485 C8 + cmp #$FF ; CPU:$C486 PRG:0486 C9 FF + bne @InitializeDisplayData ; CPU:$C488 PRG:0488 D0 F5 - lda currentInput - and #$04 - sta pacmanRequestedDirection + lda currentInput ; CPU:$C48A PRG:048A A5 4D + and #$04 ; CPU:$C48C PRG:048C 29 04 + sta pacmanRequestedDirection ; CPU:$C48E PRG:048E 85 50 - lda currentInput - and #$08 - sta pacmanDirection + lda currentInput ; CPU:$C490 PRG:0490 A5 4D + and #$08 ; CPU:$C492 PRG:0492 29 08 + sta pacmanDirection ; CPU:$C494 PRG:0494 85 51 @AdvanceTimeout: - clc - lda #$01 - adc $87 - sta $87 + clc ; CPU:$C496 PRG:0496 18 + lda #$01 ; CPU:$C497 PRG:0497 A9 01 + adc $87 ; CPU:$C499 PRG:0499 65 87 + sta $87 ; CPU:$C49B PRG:049B 85 87 - lda $88 - adc #$00 - sta $88 + lda $88 ; CPU:$C49D PRG:049D A5 88 + adc #$00 ; CPU:$C49F PRG:049F 69 00 + sta $88 ; CPU:$C4A1 PRG:04A1 85 88 - cmp #$02 - bne @CheckSelectionInput + cmp #$02 ; CPU:$C4A3 PRG:04A3 C9 02 + bne @CheckSelectionInput ; CPU:$C4A5 PRG:04A5 D0 0B - lda #$00 - sta $87 + lda #$00 ; CPU:$C4A7 PRG:04A7 A9 00 + sta $87 ; CPU:$C4A9 PRG:04A9 85 87 - lda #$04 - sta gameState + lda #$04 ; CPU:$C4AB PRG:04AB A9 04 + sta gameState ; CPU:$C4AD PRG:04AD 85 3F - jmp MainDispatchLoop + jmp MainDispatchLoop ; CPU:$C4AF PRG:04AF 4C 50 C2 @CheckSelectionInput: - lda currentInput - and #$04 - cmp pacmanRequestedDirection - beq @CheckConfirmInput + lda currentInput ; CPU:$C4B2 PRG:04B2 A5 4D + and #$04 ; CPU:$C4B4 PRG:04B4 29 04 + cmp pacmanRequestedDirection ; CPU:$C4B6 PRG:04B6 C5 50 + beq @CheckConfirmInput ; CPU:$C4B8 PRG:04B8 F0 2F - sta pacmanRequestedDirection + sta pacmanRequestedDirection ; CPU:$C4BA PRG:04BA 85 50 - lda #$00 - sta $88 + lda #$00 ; CPU:$C4BC PRG:04BC A9 00 + sta $88 ; CPU:$C4BE PRG:04BE 85 88 - lda #$01 - sta $87 + lda #$01 ; CPU:$C4C0 PRG:04C0 A9 01 + sta $87 ; CPU:$C4C2 PRG:04C2 85 87 - lda pacmanRequestedDirection - beq @CheckConfirmInput + lda pacmanRequestedDirection ; CPU:$C4C4 PRG:04C4 A5 50 + beq @CheckConfirmInput ; CPU:$C4C6 PRG:04C6 F0 21 - ldx #$00 + ldx #$00 ; CPU:$C4C8 PRG:04C8 A2 00 - inc activePlayerFlag - lda activePlayerFlag - and #$01 - sta activePlayerFlag - beq @UseFirstSelectionData + inc activePlayerFlag ; CPU:$C4CA PRG:04CA E6 47 + lda activePlayerFlag ; CPU:$C4CC PRG:04CC A5 47 + and #$01 ; CPU:$C4CE PRG:04CE 29 01 + sta activePlayerFlag ; CPU:$C4D0 PRG:04D0 85 47 + beq @UseFirstSelectionData ; CPU:$C4D2 PRG:04D2 F0 01 - inx + inx ; CPU:$C4D4 PRG:04D4 E8 @UseFirstSelectionData: - lda $C50F,x - sta $024D + lda $C50F,x ; CPU:$C4D5 PRG:04D5 BD 0F C5 + sta $024D ; CPU:$C4D8 PRG:04D8 8D 4D 02 - lda $C510,x - sta $0251 + lda $C510,x ; CPU:$C4DB PRG:04DB BD 10 C5 + sta $0251 ; CPU:$C4DE PRG:04DE 8D 51 02 - lda #$22 - sta $024B + lda #$22 ; CPU:$C4E1 PRG:04E1 A9 22 + sta $024B ; CPU:$C4E3 PRG:04E3 8D 4B 02 - jmp MainDispatchLoop + jmp MainDispatchLoop ; CPU:$C4E6 PRG:04E6 4C 50 C2 @CheckConfirmInput: - lda currentInput - and #$08 - cmp pacmanDirection - bne @ConfirmStateChanged + lda currentInput ; CPU:$C4E9 PRG:04E9 A5 4D + and #$08 ; CPU:$C4EB PRG:04EB 29 08 + cmp pacmanDirection ; CPU:$C4ED PRG:04ED C5 51 + bne @ConfirmStateChanged ; CPU:$C4EF PRG:04EF D0 03 - jmp MainDispatchLoop + jmp MainDispatchLoop ; CPU:$C4F1 PRG:04F1 4C 50 C2 @ConfirmStateChanged: - sta pacmanDirection + sta pacmanDirection ; CPU:$C4F4 PRG:04F4 85 51 - lda pacmanDirection - bne @ConfirmPressed + lda pacmanDirection ; CPU:$C4F6 PRG:04F6 A5 51 + bne @ConfirmPressed ; CPU:$C4F8 PRG:04F8 D0 03 - jmp MainDispatchLoop + jmp MainDispatchLoop ; CPU:$C4FA PRG:04FA 4C 50 C2 @ConfirmPressed: - lda #$00 - sta gameplaySuspended + lda #$00 ; CPU:$C4FD PRG:04FD A9 00 + sta gameplaySuspended ; CPU:$C4FF PRG:04FF 85 48 - jsr $EEB4 + jsr $EEB4 ; CPU:$C501 PRG:0501 20 B4 EE - jmp GameModeEntry + jmp GameModeEntry ; CPU:$C504 PRG:0504 4C 54 CA ;============================================================================== ; $C507-$C511: Player Selection Display Data @@ -1382,11 +1185,11 @@ PlayerSelectionState: ;============================================================================== PlayerCountSelectionDisplayData: - .byte $22,$0A,$5C,$00 - .byte $22,$4A,$20,$FF + .byte $22,$0A,$5C,$00 ; CPU:$C507 PRG:0507 22 0A 5C 00 + .byte $22,$4A,$20,$FF ; CPU:$C50B PRG:050B 22 4A 20 FF PlayerCountSelectionMarkerTiles: - .byte $5C,$20,$5C + .byte $5C,$20,$5C ; CPU:$C50F PRG:050F 5C 20 5C ;============================================================================== @@ -1421,25 +1224,25 @@ PlayerCountSelectionMarkerTiles: ;============================================================================== State04Handler: - lda currentInput - and #$0C - beq @DispatchSubstate + lda currentInput ; CPU:$C512 PRG:0512 A5 4D + and #$0C ; CPU:$C514 PRG:0514 29 0C + beq @DispatchSubstate ; CPU:$C516 PRG:0516 F0 07 - lda #$02 - sta gameState + lda #$02 ; CPU:$C518 PRG:0518 A9 02 + sta gameState ; CPU:$C51A PRG:051A 85 3F - jmp MainEntry + jmp MainEntry ; CPU:$C51C PRG:051C 4C E7 C1 @DispatchSubstate: - ldy $87 + ldy $87 ; CPU:$C51F PRG:051F A4 87 - lda State04SubstateTable,y - sta dispatchVector + lda State04SubstateTable,y ; CPU:$C521 PRG:0521 B9 2E C5 + sta dispatchVector ; CPU:$C524 PRG:0524 85 10 - lda State04SubstateTable+1,y - sta dispatchVector+1 + lda State04SubstateTable+1,y ; CPU:$C526 PRG:0526 B9 2F C5 + sta dispatchVector+1 ; CPU:$C529 PRG:0529 85 11 6C - jmp ($0010) + jmp ($0010) ; CPU:$C52C PRG:052C 10 00 46 C5 73 ;============================================================================== ; $C52E-$C545: State $04 Substate Dispatch Table @@ -1462,18 +1265,18 @@ State04Handler: ;============================================================================== State04SubstateTable: - .word State04Initialize ; $00 - .word State04TimedSubstate ; $02 - .word State04TimedSubstate ; $04 - .word State04TimedSubstate ; $06 - .word State04TimedSubstate ; $08 - .word State04TimedSubstate ; $0A - .word State04TimedSubstate ; $0C - .word State04TimedSubstate ; $0E - .word State04TimedSubstate ; $10 - .word State04TimedSubstate ; $12 - .word State04LongDelay ; $14 - .word State04FinalPhase ; $16 + .word State04Initialize ; $00 ; CPU:$C52E PRG:052E 46 C5 + .word State04TimedSubstate ; $02 ; CPU:$C530 PRG:0530 73 C5 + .word State04TimedSubstate ; $04 ; CPU:$C532 PRG:0532 73 C5 + .word State04TimedSubstate ; $06 ; CPU:$C534 PRG:0534 73 C5 + .word State04TimedSubstate ; $08 ; CPU:$C536 PRG:0536 73 C5 + .word State04TimedSubstate ; $0A ; CPU:$C538 PRG:0538 73 C5 + .word State04TimedSubstate ; $0C ; CPU:$C53A PRG:053A 73 C5 + .word State04TimedSubstate ; $0E ; CPU:$C53C PRG:053C 73 C5 + .word State04TimedSubstate ; $10 ; CPU:$C53E PRG:053E 73 C5 + .word State04TimedSubstate ; $12 ; CPU:$C540 PRG:0540 73 C5 + .word State04LongDelay ; $14 ; CPU:$C542 PRG:0542 89 C5 + .word State04FinalPhase ; $16 ; CPU:$C544 PRG:0544 92 C7 ;============================================================================== ; $C546-$C572: State $04 Initialization Substate @@ -1511,33 +1314,33 @@ State04SubstateTable: ;============================================================================== State04Initialize: - lda #$01 - sta $40 + lda #$01 ; CPU:$C546 PRG:0546 A9 01 + sta $40 ; CPU:$C548 PRG:0548 85 40 @WaitForNmi: - lda $40 - bne @WaitForNmi + lda $40 ; CPU:$C54A PRG:054A A5 40 + bne @WaitForNmi ; CPU:$C54C PRG:054C D0 FC - lda #$08 - sta PPUCTRL - sta ppuCtrlShadow + lda #$08 ; CPU:$C54E PRG:054E A9 08 + sta PPUCTRL ; CPU:$C550 PRG:0550 8D 00 20 + sta ppuCtrlShadow ; CPU:$C553 PRG:0553 85 43 - lda #$00 - sta PPUMASK - sta $88 + lda #$00 ; CPU:$C555 PRG:0555 A9 00 + sta PPUMASK ; CPU:$C557 PRG:0557 8D 01 20 + sta $88 ; CPU:$C55A PRG:055A 85 88 - jsr $C5D8 - jsr InitializeState04PpuData - jsr LoadState04DisplayData + jsr $C5D8 ; CPU:$C55C PRG:055C 20 D8 C5 + jsr InitializeState04PpuData ; CPU:$C55F PRG:055F 20 08 C6 + jsr LoadState04DisplayData ; CPU:$C562 PRG:0562 20 A6 C5 - inc $87 - inc $87 + inc $87 ; CPU:$C565 PRG:0565 E6 87 + inc $87 ; CPU:$C567 PRG:0567 E6 87 - lda #$88 - sta PPUCTRL - sta ppuCtrlShadow + lda #$88 ; CPU:$C569 PRG:0569 A9 88 + sta PPUCTRL ; CPU:$C56B PRG:056B 8D 00 20 + sta ppuCtrlShadow ; CPU:$C56E PRG:056E 85 43 - jmp MainDispatchLoop + jmp MainDispatchLoop ; CPU:$C570 PRG:0570 4C 50 C2 ;============================================================================== ; $C573-$C588: State $04 Shared Timed Substate Handler @@ -1556,22 +1359,22 @@ State04Initialize: ;============================================================================== State04TimedSubstate: - inc $88 + inc $88 ; CPU:$C573 PRG:0573 E6 88 - lda $88 - cmp #$30 - bne @ReturnToMainLoop + lda $88 ; CPU:$C575 PRG:0575 A5 88 + cmp #$30 ; CPU:$C577 PRG:0577 C9 30 + bne @ReturnToMainLoop ; CPU:$C579 PRG:0579 D0 0B - lda #$00 - sta $88 + lda #$00 ; CPU:$C57B PRG:057B A9 00 + sta $88 ; CPU:$C57D PRG:057D 85 88 - jsr $C5A6 + jsr $C5A6 ; CPU:$C57F PRG:057F 20 A6 C5 - inc $87 - inc $87 + inc $87 ; CPU:$C582 PRG:0582 E6 87 + inc $87 ; CPU:$C584 PRG:0584 E6 87 @ReturnToMainLoop: - jmp MainDispatchLoop + jmp MainDispatchLoop ; CPU:$C586 PRG:0586 4C 50 C2 ;============================================================================== ; $C589-$C59F: State $04 Long Delay Substate @@ -1601,22 +1404,22 @@ State04TimedSubstate: ;============================================================================== State04LongDelay: - inc $88 + inc $88 ; CPU:$C589 PRG:0589 E6 88 - lda $88 - cmp #$80 - beq @AdvanceSubstate + lda $88 ; CPU:$C58B PRG:058B A5 88 + cmp #$80 ; CPU:$C58D PRG:058D C9 80 + beq @AdvanceSubstate ; CPU:$C58F PRG:058F F0 03 - jmp MainDispatchLoop + jmp MainDispatchLoop ; CPU:$C591 PRG:0591 4C 50 C2 @AdvanceSubstate: - inc $87 - inc $87 + inc $87 ; CPU:$C594 PRG:0594 E6 87 + inc $87 ; CPU:$C596 PRG:0596 E6 87 - lda #$00 - sta $88 + lda #$00 ; CPU:$C598 PRG:0598 A9 00 + sta $88 ; CPU:$C59A PRG:059A 85 88 - jmp MainDispatchLoop + jmp MainDispatchLoop ; CPU:$C59C PRG:059C 4C 50 C2 ;============================================================================== @@ -1642,9 +1445,9 @@ State04LongDelay: ;============================================================================== SetSelectionFlagAndContinue: - lda #$01 - sta activePlayerFlag - jmp GameModeEntry + lda #$01 ; CPU:$C59F PRG:059F A9 01 + sta activePlayerFlag ; CPU:$C5A1 PRG:05A1 85 47 + jmp GameModeEntry ; CPU:$C5A3 PRG:05A3 4C 54 CA ;============================================================================== @@ -1668,48 +1471,48 @@ SetSelectionFlagAndContinue: ;============================================================================== LoadState04DisplayData: - ldy $87 + ldy $87 ; CPU:$C5A6 PRG:05A6 A4 87 - lda CharacterIntroDisplayDataTable,y - sta workPtr0 + lda CharacterIntroDisplayDataTable,y ; CPU:$C5A8 PRG:05A8 B9 87 C6 + sta workPtr0 ; CPU:$C5AB PRG:05AB 85 00 - lda CharacterIntroDisplayDataTable+1,y - sta workPtr0+1 + lda CharacterIntroDisplayDataTable+1,y ; CPU:$C5AD PRG:05AD B9 88 C6 + sta workPtr0+1 ; CPU:$C5B0 PRG:05B0 85 01 A0 - ldy #$00 + ldy #$00 ; CPU:$C5B3 PRG:05B3 00 B1 @CopyDisplayData: - lda (workPtr0),y - sta $024B,y + lda (workPtr0),y ; CPU:$C5B5 PRG:05B5 00 99 + sta $024B,y ; CPU:$C5B7 PRG:05B7 4B 02 C8 - iny - cmp #$FF - bne @CopyDisplayData + iny ; CPU:$C5BA PRG:05BA C9 + cmp #$FF ; CPU:$C5BB PRG:05BB FF D0 + bne @CopyDisplayData ; CPU:$C5BD PRG:05BD F6 B1 - lda (workPtr0),y - beq @SecondaryCopy + lda (workPtr0),y ; CPU:$C5BF PRG:05BF 00 F0 + beq @SecondaryCopy ; CPU:$C5C1 PRG:05C1 01 60 - rts + rts ; CPU:$C5C3 PRG:05C3 A5 @SecondaryCopy: - lda $87 - sec - sbc #$02 - asl - asl - tay + lda $87 ; CPU:$C5C4 PRG:05C4 87 38 + sec ; CPU:$C5C6 PRG:05C6 E9 + sbc #$02 ; CPU:$C5C7 PRG:05C7 02 0A + asl ; CPU:$C5C9 PRG:05C9 0A + asl ; CPU:$C5CA PRG:05CA A8 + tay ; CPU:$C5CB PRG:05CB A2 - ldx #$10 + ldx #$10 ; CPU:$C5CC PRG:05CC 10 B9 @CopySecondaryData: - lda CharacterIntroSpriteData,y - sta $0760,y + lda CharacterIntroSpriteData,y ; CPU:$C5CE PRG:05CE 2E C7 99 + sta $0760,y ; CPU:$C5D1 PRG:05D1 60 07 C8 - iny - dex - bne @CopySecondaryData + iny ; CPU:$C5D4 PRG:05D4 CA + dex ; CPU:$C5D5 PRG:05D5 D0 + bne @CopySecondaryData ; CPU:$C5D6 PRG:05D6 F6 60 - rts + rts ; CPU:$C5D8 PRG:05D8 A9 ;============================================================================== ; $C5D8-$C607: Initialize Playfield Area @@ -1737,38 +1540,38 @@ LoadState04DisplayData: ;============================================================================== InitializePlayfieldArea: - lda #$20 - sta PPUADDR + lda #$20 ; CPU:$C5D8 PRG:05D8 A9 20 + sta PPUADDR ; CPU:$C5DA PRG:05DA 8D 06 20 - lda #$C0 - sta PPUADDR + lda #$C0 ; CPU:$C5DD PRG:05DD A9 C0 + sta PPUADDR ; CPU:$C5DF PRG:05DF 8D 06 20 - lda #$17 - sta workPtr0 + lda #$17 ; CPU:$C5E2 PRG:05E2 A9 17 + sta workPtr0 ; CPU:$C5E4 PRG:05E4 85 00 @NextRow: - lda #$1C - sta workPtr0+1 + lda #$1C ; CPU:$C5E6 PRG:05E6 A9 1C + sta workPtr0+1 ; CPU:$C5E8 PRG:05E8 85 01 A9 - lda #$2D - sta PPUDATA - sta PPUDATA + lda #$2D ; CPU:$C5EB PRG:05EB 2D 8D + sta PPUDATA ; CPU:$C5ED PRG:05ED 07 20 8D + sta PPUDATA ; CPU:$C5F0 PRG:05F0 07 20 A9 - lda #$20 + lda #$20 ; CPU:$C5F3 PRG:05F3 20 8D @ClearRowInterior: - sta PPUDATA - dec workPtr0+1 - bne @ClearRowInterior + sta PPUDATA ; CPU:$C5F5 PRG:05F5 07 20 C6 + dec workPtr0+1 ; CPU:$C5F8 PRG:05F8 01 D0 + bne @ClearRowInterior ; CPU:$C5FA PRG:05FA F9 A9 - lda #$2D - sta PPUDATA - sta PPUDATA + lda #$2D ; CPU:$C5FC PRG:05FC 2D 8D + sta PPUDATA ; CPU:$C5FE PRG:05FE 07 20 8D + sta PPUDATA ; CPU:$C601 PRG:0601 07 20 C6 - dec workPtr0 - bpl @NextRow + dec workPtr0 ; CPU:$C604 PRG:0604 00 10 + bpl @NextRow ; CPU:$C606 PRG:0606 DF 60 - rts + rts ; CPU:$C608 PRG:0608 A9 ;============================================================================== ; $C608-$C666: Initialize State $04 PPU Data @@ -1805,74 +1608,74 @@ InitializePlayfieldArea: InitializeState04PpuData: ; Set PPU destination to $23C8. - lda #$23 - sta PPUADDR + lda #$23 ; CPU:$C608 PRG:0608 A9 23 + sta PPUADDR ; CPU:$C60A PRG:060A 8D 06 20 - lda #$C8 - sta PPUADDR + lda #$C8 ; CPU:$C60D PRG:060D A9 C8 + sta PPUADDR ; CPU:$C60F PRG:060F 8D 06 20 ; Copy $24 bytes of attribute data. - ldy #$00 + ldy #$00 ; CPU:$C612 PRG:0612 A0 00 @CopyAttributeData: - lda $C76E,y - sta PPUDATA + lda $C76E,y ; CPU:$C614 PRG:0614 B9 6E C7 + sta PPUDATA ; CPU:$C617 PRG:0617 8D 07 20 - iny - cpy #$24 - bne @CopyAttributeData + iny ; CPU:$C61A PRG:061A C8 + cpy #$24 ; CPU:$C61B PRG:061B C0 24 + bne @CopyAttributeData ; CPU:$C61D PRG:061D D0 F5 ; Process encoded PPU write data from $C69B. - ldy #$00 + ldy #$00 ; CPU:$C61F PRG:061F A0 00 @NextPpuRecord: - lda CharacterNicknameHeaderData,y - sta PPUADDR - iny + lda CharacterNicknameHeaderData,y ; CPU:$C621 PRG:0621 B9 9B C6 + sta PPUADDR ; CPU:$C624 PRG:0624 8D 06 20 + iny ; CPU:$C627 PRG:0627 C8 - lda CharacterNicknameHeaderData,y - sta PPUADDR - iny + lda CharacterNicknameHeaderData,y ; CPU:$C628 PRG:0628 B9 9B C6 + sta PPUADDR ; CPU:$C62B PRG:062B 8D 06 20 + iny ; CPU:$C62E PRG:062E C8 @CopyPpuRecord: - lda CharacterNicknameHeaderData,y - cmp #$FF - beq @EndPpuRecord + lda CharacterNicknameHeaderData,y ; CPU:$C62F PRG:062F B9 9B C6 + cmp #$FF ; CPU:$C632 PRG:0632 C9 FF + beq @EndPpuRecord ; CPU:$C634 PRG:0634 F0 06 - sta PPUDATA - iny - bne @CopyPpuRecord + sta PPUDATA ; CPU:$C636 PRG:0636 8D 07 20 + iny ; CPU:$C639 PRG:0639 C8 + bne @CopyPpuRecord ; CPU:$C63A PRG:063A D0 F3 @EndPpuRecord: - lda PPUSTATUS + lda PPUSTATUS ; CPU:$C63C PRG:063C AD 02 20 ; Upload the complete 32-byte palette directly. - lda #$3F - sta PPUADDR + lda #$3F ; CPU:$C63F PRG:063F A9 3F + sta PPUADDR ; CPU:$C641 PRG:0641 8D 06 20 - lda #$00 - sta PPUADDR + lda #$00 ; CPU:$C644 PRG:0644 A9 00 + sta PPUADDR ; CPU:$C646 PRG:0646 8D 06 20 - ldy #$00 + ldy #$00 ; CPU:$C649 PRG:0649 A0 00 @CopyPalette: - lda CharacterIntroPalette,y - sta PPUDATA + lda CharacterIntroPalette,y ; CPU:$C64B PRG:064B B9 67 C6 + sta PPUDATA ; CPU:$C64E PRG:064E 8D 07 20 - iny - cpy #$20 - bne @CopyPalette + iny ; CPU:$C651 PRG:0651 C8 + cpy #$20 ; CPU:$C652 PRG:0652 C0 20 + bne @CopyPalette ; CPU:$C654 PRG:0654 D0 F5 ; Reset the PPU address following palette access. - lda #$3F - sta PPUADDR + lda #$3F ; CPU:$C656 PRG:0656 A9 3F + sta PPUADDR ; CPU:$C658 PRG:0658 8D 06 20 - lda #$00 - sta PPUADDR - sta PPUADDR - sta PPUADDR + lda #$00 ; CPU:$C65B PRG:065B A9 00 + sta PPUADDR ; CPU:$C65D PRG:065D 8D 06 20 + sta PPUADDR ; CPU:$C660 PRG:0660 8D 06 20 + sta PPUADDR ; CPU:$C663 PRG:0663 8D 06 20 - rts + rts ; CPU:$C666 PRG:0666 60 ;============================================================================== ; $C667-$C686: State $04 Palette Data @@ -1890,16 +1693,16 @@ InitializeState04PpuData: ;============================================================================== CharacterIntroPalette: ; Background palettes - .byte $0F,$20,$0F,$06 - .byte $0F,$06,$0F,$33 - .byte $0F,$33,$0F,$27 - .byte $0F,$17,$0F,$21 + .byte $0F,$20,$0F,$06 ; CPU:$C667 PRG:0667 0F 20 0F 06 + .byte $0F,$06,$0F,$33 ; CPU:$C66B PRG:066B 0F 06 0F 33 + .byte $0F,$33,$0F,$27 ; CPU:$C66F PRG:066F 0F 33 0F 27 + .byte $0F,$17,$0F,$21 ; CPU:$C673 PRG:0673 0F 17 0F 21 ; Sprite palettes - .byte $0F,$27,$20,$06 - .byte $0F,$11,$20,$33 - .byte $0F,$20,$20,$21 - .byte $0F,$09,$20,$17 + .byte $0F,$27,$20,$06 ; CPU:$C677 PRG:0677 0F 27 20 06 + .byte $0F,$11,$20,$33 ; CPU:$C67B PRG:067B 0F 11 20 33 + .byte $0F,$20,$20,$21 ; CPU:$C67F PRG:067F 0F 20 20 21 + .byte $0F,$09,$20,$17 ; CPU:$C683 PRG:0683 0F 09 20 17 ;============================================================================== ; $C687-$C69A: State $04 Display Data Pointer Table @@ -1931,16 +1734,16 @@ CharacterIntroPalette: ;============================================================================== CharacterIntroDisplayDataTable: - .word CharacterNicknameHeaderData ; $87 = $00 Character; NICKNAME - .word ShadowNameData ; $87 = $02 : SHADOW - .word BlinkyNameData ; $87 = $04 _BLINKY_ - .word SpeedyNameData ; $87 = $06 : SPEEDY - .word PinkyNameData ; $87 = $08 _PINKY_ - .word CharacterIntroGraphicData0 ; $87 = $0A - .word CharacterIntroGraphicData1 ; $87 = $0C - .word PokeyNameData ; $87 = $0E - .word ClydeNameData ; $87 = $10 - .word ScoringLegendData ; $87 = $12 + .word CharacterNicknameHeaderData ; $87 = $00 Character; NICKNAME ; CPU:$C687 PRG:0687 9B C6 + .word ShadowNameData ; $87 = $02 : SHADOW ; CPU:$C689 PRG:0689 B3 C6 + .word BlinkyNameData ; $87 = $04 _BLINKY_ ; CPU:$C68B PRG:068B BE C6 + .word SpeedyNameData ; $87 = $06 : SPEEDY ; CPU:$C68D PRG:068D C9 C6 + .word PinkyNameData ; $87 = $08 _PINKY_ ; CPU:$C68F PRG:068F D4 C6 + .word CharacterIntroGraphicData0 ; $87 = $0A ; CPU:$C691 PRG:0691 DE C6 + .word CharacterIntroGraphicData1 ; $87 = $0C ; CPU:$C693 PRG:0693 EA C6 + .word PokeyNameData ; $87 = $0E ; CPU:$C695 PRG:0695 F3 C6 + .word ClydeNameData ; $87 = $10 ; CPU:$C697 PRG:0697 FD C6 + .word ScoringLegendData ; $87 = $12 ; CPU:$C699 PRG:0699 07 C7 ;============================================================================== ; $C69B-$C72D: State $04 Display Update Streams @@ -1987,11 +1790,11 @@ CharacterIntroDisplayDataTable: ;------------------------------------------------------------------------------ CharacterNicknameHeaderData: - .byte $20,$E6 - .byte $43,$48,$41,$52,$41,$43,$54,$45,$52 - .byte $20,$3B,$20,$20 - .byte $4E,$49,$43,$4B,$4E,$41,$4D,$45 - .byte $FF + .byte $20,$E6 ; CPU:$C69B PRG:069B 20 E6 + .byte $43,$48,$41,$52,$41,$43,$54,$45,$52 ; CPU:$C69D PRG:069D 43 48 41 52 41 43 54 45 52 + .byte $20,$3B,$20,$20 ; CPU:$C6A6 PRG:06A6 20 3B 20 20 + .byte $4E,$49,$43,$4B,$4E,$41,$4D,$45 ; CPU:$C6AA PRG:06AA 4E 49 43 4B 4E 41 4D 45 + .byte $FF ; CPU:$C6B2 PRG:06B2 FF ;------------------------------------------------------------------------------ ; $C6B3-$C6BD @@ -2006,10 +1809,10 @@ CharacterNicknameHeaderData: ;------------------------------------------------------------------------------ ShadowNameData: - .byte $21,$48 - .byte $3A,$53,$48,$41,$44,$4F,$57 - .byte $FF - .byte $00 + .byte $21,$48 ; CPU:$C6B3 PRG:06B3 21 48 + .byte $3A,$53,$48,$41,$44,$4F,$57 ; CPU:$C6B5 PRG:06B5 3A 53 48 41 44 4F 57 + .byte $FF ; CPU:$C6BC PRG:06BC FF + .byte $00 ; CPU:$C6BD PRG:06BD 00 ;------------------------------------------------------------------------------ ; $C6BE-$C6C8 @@ -2024,9 +1827,9 @@ ShadowNameData: ;------------------------------------------------------------------------------ BlinkyNameData: - .byte $21,$53 - .byte $5F,$42,$4C,$49,$4E,$4B,$59,$5F - .byte $FF + .byte $21,$53 ; CPU:$C6BE PRG:06BE 21 53 + .byte $5F,$42,$4C,$49,$4E,$4B,$59,$5F ; CPU:$C6C0 PRG:06C0 5F 42 4C 49 4E 4B 59 5F + .byte $FF ; CPU:$C6C8 PRG:06C8 FF ;------------------------------------------------------------------------------ ; $C6C9-$C6D3 @@ -2040,10 +1843,10 @@ BlinkyNameData: ; $00 after $FF selects the loader's secondary-copy path. ;------------------------------------------------------------------------------ SpeedyNameData: - .byte $21,$A8 - .byte $3A,$53,$50,$45,$45,$44,$59 - .byte $FF - .byte $00 + .byte $21,$A8 ; CPU:$C6C9 PRG:06C9 21 A8 + .byte $3A,$53,$50,$45,$45,$44,$59 ; CPU:$C6CB PRG:06CB 3A 53 50 45 45 44 59 + .byte $FF ; CPU:$C6D2 PRG:06D2 FF + .byte $00 ; CPU:$C6D3 PRG:06D3 00 ;------------------------------------------------------------------------------ ; $C6D4-$C6DD @@ -2055,9 +1858,9 @@ SpeedyNameData: ; "_PINKY_" ;------------------------------------------------------------------------------ PinkyNameData: - .byte $21,$B3 - .byte $5F,$50,$49,$4E,$4B,$59,$5F - .byte $FF + .byte $21,$B3 ; CPU:$C6D4 PRG:06D4 21 B3 + .byte $5F,$50,$49,$4E,$4B,$59,$5F ; CPU:$C6D6 PRG:06D6 5F 50 49 4E 4B 59 5F + .byte $FF ; CPU:$C6DD PRG:06DD FF ;------------------------------------------------------------------------------ ; $C6DE-$C6E9 @@ -2069,10 +1872,10 @@ PinkyNameData: ; $00 after $FF selects the loader's secondary-copy path. ;------------------------------------------------------------------------------ CharacterIntroGraphicData0: - .byte $22,$08 - .byte $B6,$C1,$C3,$B7,$B4,$C2,$B3,$C4 - .byte $FF - .byte $00 + .byte $22,$08 ; CPU:$C6DE PRG:06DE 22 08 + .byte $B6,$C1,$C3,$B7,$B4,$C2,$B3,$C4 ; CPU:$C6E0 PRG:06E0 B6 C1 C3 B7 B4 C2 B3 C4 + .byte $FF ; CPU:$C6E8 PRG:06E8 FF + .byte $00 ; CPU:$C6E9 PRG:06E9 00 ;------------------------------------------------------------------------------ ; $C6EA-$C6F2 @@ -2083,9 +1886,9 @@ CharacterIntroGraphicData0: ; Contains another set of special graphical tile values. ;------------------------------------------------------------------------------ CharacterIntroGraphicData1: - .byte $22,$13 - .byte $C8,$B5,$C5,$C0,$C6,$C8 - .byte $FF + .byte $22,$13 ; CPU:$C6EA PRG:06EA 22 13 + .byte $C8,$B5,$C5,$C0,$C6,$C8 ; CPU:$C6EC PRG:06EC C8 B5 C5 C0 C6 C8 + .byte $FF ; CPU:$C6F2 PRG:06F2 FF ;------------------------------------------------------------------------------ ; $C6F3-$C6FC @@ -2099,10 +1902,10 @@ CharacterIntroGraphicData1: ; $00 after $FF selects the loader's secondary-copy path. ;------------------------------------------------------------------------------ PokeyNameData: - .byte $22,$68 - .byte $3A,$50,$4F,$4B,$45,$59 - .byte $FF - .byte $00 + .byte $22,$68 ; CPU:$C6F3 PRG:06F3 22 68 + .byte $3A,$50,$4F,$4B,$45,$59 ; CPU:$C6F5 PRG:06F5 3A 50 4F 4B 45 59 + .byte $FF ; CPU:$C6FB PRG:06FB FF + .byte $00 ; CPU:$C6FC PRG:06FC 00 ;------------------------------------------------------------------------------ ; $C6FD-$C706 @@ -2114,9 +1917,9 @@ PokeyNameData: ; "_CLYDE_" ;------------------------------------------------------------------------------ ClydeNameData: - .byte $22,$73 - .byte $5F,$43,$4C,$59,$44,$45,$5F - .byte $FF + .byte $22,$73 ; CPU:$C6FD PRG:06FD 22 73 + .byte $5F,$43,$4C,$59,$44,$45,$5F ; CPU:$C6FF PRG:06FF 5F 43 4C 59 44 45 5F + .byte $FF ; CPU:$C706 PRG:0706 FF ;------------------------------------------------------------------------------ ; $C707-$C72D @@ -2133,21 +1936,21 @@ ClydeNameData: ; The special tile values $CE,$CF and $23-$2B are preserved numerically. ;------------------------------------------------------------------------------ ScoringLegendData: - .byte $22,$AD - .byte $03,$20,$31,$30,$20,$50,$54,$53 - .byte $00 + .byte $22,$AD ; CPU:$C707 PRG:0707 22 AD + .byte $03,$20,$31,$30,$20,$50,$54,$53 ; CPU:$C709 PRG:0709 03 20 31 30 20 50 54 53 + .byte $00 ; CPU:$C711 PRG:0711 00 - .byte $22,$ED - .byte $01,$20,$35,$30,$20,$50,$54,$53 - .byte $00 + .byte $22,$ED ; CPU:$C712 PRG:0712 22 ED + .byte $01,$20,$35,$30,$20,$50,$54,$53 ; CPU:$C714 PRG:0714 01 20 35 30 20 50 54 53 + .byte $00 ; CPU:$C71C PRG:071C 00 - .byte $23,$34 - .byte $CE,$CF - .byte $00 + .byte $23,$34 ; CPU:$C71D PRG:071D 23 34 + .byte $CE,$CF ; CPU:$C71F PRG:071F CE CF + .byte $00 ; CPU:$C721 PRG:0721 00 - .byte $23,$4D - .byte $23,$24,$25,$26,$27,$28,$29,$2A,$2B - .byte $FF + .byte $23,$4D ; CPU:$C722 PRG:0722 23 4D + .byte $23,$24,$25,$26,$27,$28,$29,$2A,$2B ; CPU:$C724 PRG:0724 23 24 25 26 27 28 29 2A 2B + .byte $FF ; CPU:$C72D PRG:072D FF ;============================================================================== @@ -2197,52 +2000,52 @@ ScoringLegendData: CharacterIntroSpriteData: ; $C72E - record $00 - .byte $48,$1C,$40,$26 + .byte $48,$1C,$40,$26 ; CPU:$C72E PRG:072E 48 1C 40 26 ; $C732 - record $01 - .byte $48,$1B,$40,$2E + .byte $48,$1B,$40,$2E ; CPU:$C732 PRG:0732 48 1B 40 2E ; $C736 - record $02 - .byte $50,$1F,$40,$26 + .byte $50,$1F,$40,$26 ; CPU:$C736 PRG:0736 50 1F 40 26 ; $C73A - record $03 - .byte $50,$1D,$40,$2E + .byte $50,$1D,$40,$2E ; CPU:$C73A PRG:073A 50 1D 40 2E ; $C73E - record $04 - .byte $60,$1C,$41,$26 + .byte $60,$1C,$41,$26 ; CPU:$C73E PRG:073E 60 1C 41 26 ; $C742 - record $05 - .byte $60,$1B,$41,$2E + .byte $60,$1B,$41,$2E ; CPU:$C742 PRG:0742 60 1B 41 2E ; $C746 - record $06 - .byte $68,$1F,$41,$26 + .byte $68,$1F,$41,$26 ; CPU:$C746 PRG:0746 68 1F 41 26 ; $C74A - record $07 - .byte $68,$1D,$41,$2E + .byte $68,$1D,$41,$2E ; CPU:$C74A PRG:074A 68 1D 41 2E ; $C74E - record $08 - .byte $78,$1C,$42,$26 + .byte $78,$1C,$42,$26 ; CPU:$C74E PRG:074E 78 1C 42 26 ; $C752 - record $09 - .byte $78,$1B,$42,$2E + .byte $78,$1B,$42,$2E ; CPU:$C752 PRG:0752 78 1B 42 2E ; $C756 - record $0A - .byte $80,$1F,$42,$26 + .byte $80,$1F,$42,$26 ; CPU:$C756 PRG:0756 80 1F 42 26 ; $C75A - record $0B - .byte $80,$1D,$42,$2E + .byte $80,$1D,$42,$2E ; CPU:$C75A PRG:075A 80 1D 42 2E ; $C75E - record $0C - .byte $90,$1C,$43,$26 + .byte $90,$1C,$43,$26 ; CPU:$C75E PRG:075E 90 1C 43 26 ; $C762 - record $0D - .byte $90,$1B,$43,$2E + .byte $90,$1B,$43,$2E ; CPU:$C762 PRG:0762 90 1B 43 2E ; $C766 - record $0E - .byte $98,$1F,$43,$26 + .byte $98,$1F,$43,$26 ; CPU:$C766 PRG:0766 98 1F 43 26 ; $C76A - record $0F - .byte $98,$1D,$43,$2E + .byte $98,$1D,$43,$2E ; CPU:$C76A PRG:076A 98 1D 43 2E ;============================================================================== @@ -2277,11 +2080,11 @@ CharacterIntroSpriteData: ;============================================================================== CharacterIntroAttributeData: - .byte $00,$00,$00,$00,$00,$00,$00,$00 - .byte $55,$55,$55,$55,$55,$55,$55,$55 - .byte $AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA - .byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF - .byte $AA,$AA,$AA,$22 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; CPU:$C76E PRG:076E 00 00 00 00 00 00 00 00 + .byte $55,$55,$55,$55,$55,$55,$55,$55 ; CPU:$C776 PRG:0776 55 55 55 55 55 55 55 55 + .byte $AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA ; CPU:$C77E PRG:077E AA AA AA AA AA AA AA AA + .byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF ; CPU:$C786 PRG:0786 FF FF FF FF FF FF FF FF + .byte $AA,$AA,$AA,$22 ; CPU:$C78E PRG:078E AA AA AA 22 ;============================================================================== ; $C792-$C7A0: State $04 Final-Phase Dispatcher @@ -2315,15 +2118,15 @@ CharacterIntroAttributeData: ; The individual target handlers will be named as they are decoded. ;============================================================================== State04FinalPhase: - ldy $88 + ldy $88 ; CPU:$C792 PRG:0792 A4 88 - lda State04FinalPhaseTable,y - sta dispatchVector + lda State04FinalPhaseTable,y ; CPU:$C794 PRG:0794 B9 A1 C7 + sta dispatchVector ; CPU:$C797 PRG:0797 85 10 - lda State04FinalPhaseTable+1,y - sta dispatchVector+1 + lda State04FinalPhaseTable+1,y ; CPU:$C799 PRG:0799 B9 A2 C7 + sta dispatchVector+1 ; CPU:$C79C PRG:079C 85 11 6C - jmp ($0010) + jmp ($0010) ; CPU:$C79F PRG:079F 10 00 A7 C7 F2 ;============================================================================== ; $C7A1-$C7A6: State $04 Final-Phase Dispatch Table @@ -2340,9 +2143,9 @@ State04FinalPhase: ;============================================================================== State04FinalPhaseTable: - .word State04FinalPhaseInitialize ; $88 = $00 - .word State04FinalPhaseActive ; $88 = $02 - .word State04FinalPhaseComplete ; $88 = $04 + .word State04FinalPhaseInitialize ; $88 = $00 ; CPU:$C7A1 PRG:07A1 A7 C7 + .word State04FinalPhaseActive ; $88 = $02 ; CPU:$C7A3 PRG:07A3 F2 C7 + .word State04FinalPhaseComplete ; $88 = $04 ; CPU:$C7A5 PRG:07A5 57 C8 ;============================================================================== ; $C7A7-$C7F1: State $04 Final-Phase Initialization @@ -2379,58 +2182,58 @@ State04FinalPhaseTable: ;============================================================================== State04FinalPhaseInitialize: - ldy #$00 + ldy #$00 ; CPU:$C7A7 PRG:07A7 A0 00 @CopyDisplayData: - lda State04FinalDisplayData,y - sta $024B,y - iny - cmp #$FF - bne @CopyDisplayData + lda State04FinalDisplayData,y ; CPU:$C7A9 PRG:07A9 B9 D8 C9 + sta $024B,y ; CPU:$C7AC PRG:07AC 99 4B 02 + iny ; CPU:$C7AF PRG:07AF C8 + cmp #$FF ; CPU:$C7B0 PRG:07B0 C9 FF + bne @CopyDisplayData ; CPU:$C7B2 PRG:07B2 D0 F5 - lda #$FF - sta pacmanMotion + lda #$FF ; CPU:$C7B4 PRG:07B4 A9 FF + sta pacmanMotion ; CPU:$C7B6 PRG:07B6 85 1A - lda #$00 - sta $1B - sta $89 - sta $8A + lda #$00 ; CPU:$C7B8 PRG:07B8 A9 00 + sta $1B ; CPU:$C7BA PRG:07BA 85 1B + sta $89 ; CPU:$C7BC PRG:07BC 85 89 + sta $8A ; CPU:$C7BE PRG:07BE 85 8A - lda #$F4 - sta $0274 + lda #$F4 ; CPU:$C7C0 PRG:07C0 A9 F4 + sta $0274 ; CPU:$C7C2 PRG:07C2 8D 74 02 - lda #$A8 - sta $0276 + lda #$A8 ; CPU:$C7C5 PRG:07C5 A9 A8 + sta $0276 ; CPU:$C7C7 PRG:07C7 8D 76 02 - lda #$01 - sta $028C + lda #$01 ; CPU:$C7CA PRG:07CA A9 01 + sta $028C ; CPU:$C7CC PRG:07CC 8D 8C 02 - lda #$20 - sta $0292 + lda #$20 ; CPU:$C7CF PRG:07CF A9 20 + sta $0292 ; CPU:$C7D1 PRG:07D1 8D 92 02 - lda #$00 - tay + lda #$00 ; CPU:$C7D4 PRG:07D4 A9 00 + tay ; CPU:$C7D6 PRG:07D6 A8 @ClearLowRamBlock: - sta $001E,y - iny - cpy #$14 - bne @ClearLowRamBlock + sta $001E,y ; CPU:$C7D7 PRG:07D7 99 1E 00 + iny ; CPU:$C7DA PRG:07DA C8 + cpy #$14 ; CPU:$C7DB PRG:07DB C0 14 + bne @ClearLowRamBlock ; CPU:$C7DD PRG:07DD D0 F8 - tay + tay ; CPU:$C7DF PRG:07DF A8 @ClearObjectRamBlock: - sta $0278,y - iny - cpy #$14 - bne @ClearObjectRamBlock + sta $0278,y ; CPU:$C7E0 PRG:07E0 99 78 02 + iny ; CPU:$C7E3 PRG:07E3 C8 + cpy #$14 ; CPU:$C7E4 PRG:07E4 C0 14 + bne @ClearObjectRamBlock ; CPU:$C7E6 PRG:07E6 D0 F8 - jsr $DAF1 + jsr $DAF1 ; CPU:$C7E8 PRG:07E8 20 F1 DA - inc $88 - inc $88 + inc $88 ; CPU:$C7EB PRG:07EB E6 88 + inc $88 ; CPU:$C7ED PRG:07ED E6 88 - jmp MainDispatchLoop + jmp MainDispatchLoop ; CPU:$C7EF PRG:07EF 4C 50 C2 ;============================================================================== ; $C7F2-$C856: State $04 Final-Phase Active Handler @@ -2480,76 +2283,76 @@ State04FinalPhaseInitialize: ;============================================================================== State04FinalPhaseActive: - jsr UpdateState04Objects - jsr AnimateState04DisplayPattern + jsr UpdateState04Objects ; CPU:$C7F2 PRG:07F2 20 DC C8 + jsr AnimateState04DisplayPattern ; CPU:$C7F5 PRG:07F5 20 B8 C9 - lda $0274 + lda $0274 ; CPU:$C7F8 PRG:07F8 AD 74 02 - cmp #$E0 - beq @RunMilestoneUpdate + cmp #$E0 ; CPU:$C7FB PRG:07FB C9 E0 + beq @RunMilestoneUpdate ; CPU:$C7FD PRG:07FD F0 0C - cmp #$D1 - beq @RunMilestoneUpdate + cmp #$D1 ; CPU:$C7FF PRG:07FF C9 D1 + beq @RunMilestoneUpdate ; CPU:$C801 PRG:0801 F0 08 - cmp #$C2 - beq @RunMilestoneUpdate + cmp #$C2 ; CPU:$C803 PRG:0803 C9 C2 + beq @RunMilestoneUpdate ; CPU:$C805 PRG:0805 F0 04 - cmp #$B3 - bne @CheckForCompletion + cmp #$B3 ; CPU:$C807 PRG:0807 C9 B3 + bne @CheckForCompletion ; CPU:$C809 PRG:0809 D0 03 @RunMilestoneUpdate: - jsr InitializeState04ObjectSlot + jsr InitializeState04ObjectSlot ; CPU:$C80B PRG:080B 20 A8 C8 @CheckForCompletion: - lda $0274 - cmp #$40 - beq @CompletePhase + lda $0274 ; CPU:$C80E PRG:080E AD 74 02 + cmp #$40 ; CPU:$C811 PRG:0811 C9 40 + beq @CompletePhase ; CPU:$C813 PRG:0813 F0 03 - jmp MainDispatchLoop + jmp MainDispatchLoop ; CPU:$C815 PRG:0815 4C 50 C2 @CompletePhase: - ldy #$00 + ldy #$00 ; CPU:$C818 PRG:0818 A0 00 @InitializeStructures: - lda #$00 - sta ghost1Motion,y + lda #$00 ; CPU:$C81A PRG:081A A9 00 + sta ghost1Motion,y ; CPU:$C81C PRG:081C 99 1E - lda #$C0 - sta ghost1Motion+1,y + lda #$C0 ; CPU:$C81E PRG:081E 00 A9 + sta ghost1Motion+1,y ; CPU:$C820 PRG:0820 C0 99 1F - iny - iny - iny - iny + iny ; CPU:$C823 PRG:0823 00 + iny ; CPU:$C824 PRG:0824 C8 + iny ; CPU:$C825 PRG:0825 C8 + iny ; CPU:$C826 PRG:0826 C8 - cpy #$10 - bne @InitializeStructures + cpy #$10 ; CPU:$C827 PRG:0827 C8 C0 + bne @InitializeStructures ; CPU:$C829 PRG:0829 10 D0 - lda #$01 - sta pacmanMotion + lda #$01 ; CPU:$C82B PRG:082B EE A9 + sta pacmanMotion ; CPU:$C82D PRG:082D 01 85 - lda #$50 - sta pacmanMotion+1 + lda #$50 ; CPU:$C82F PRG:082F 1A A9 + sta pacmanMotion+1 ; CPU:$C831 PRG:0831 50 85 1B - lda #$01 - sta $0293 - sta $0294 - sta $0295 - sta $0296 + lda #$01 ; CPU:$C834 PRG:0834 A9 01 + sta $0293 ; CPU:$C836 PRG:0836 8D 93 02 + sta $0294 ; CPU:$C839 PRG:0839 8D 94 02 + sta $0295 ; CPU:$C83C PRG:083C 8D 95 02 + sta $0296 ; CPU:$C83F PRG:083F 8D 96 02 - lda #$00 - sta $89 + lda #$00 ; CPU:$C842 PRG:0842 A9 00 + sta $89 ; CPU:$C844 PRG:0844 85 89 - lda #$22 - sta $024B + lda #$22 ; CPU:$C846 PRG:0846 A9 22 + sta $024B ; CPU:$C848 PRG:0848 8D 4B 02 - lda #$20 - sta $024D + lda #$20 ; CPU:$C84B PRG:084B A9 20 + sta $024D ; CPU:$C84D PRG:084D 8D 4D 02 - inc $88 - inc $88 + inc $88 ; CPU:$C850 PRG:0850 E6 88 + inc $88 ; CPU:$C852 PRG:0852 E6 88 - jmp MainDispatchLoop + jmp MainDispatchLoop ; CPU:$C854 PRG:0854 4C 50 C2 ;============================================================================== ; $C857-$C8A7: State $04 Final-Phase Completion Handler @@ -2589,64 +2392,64 @@ State04FinalPhaseActive: ;============================================================================== State04FinalPhaseComplete: - lda $8A - beq @RunRegularUpdate + lda $8A ; CPU:$C857 PRG:0857 A5 8A + beq @RunRegularUpdate ; CPU:$C859 PRG:0859 F0 47 - jsr RotateState04ObjectSlots + jsr RotateState04ObjectSlots ; CPU:$C85B PRG:085B 20 2E C9 - dec $8A - beq @CountdownComplete + dec $8A ; CPU:$C85E PRG:085E C6 8A + beq @CountdownComplete ; CPU:$C860 PRG:0860 F0 03 - jmp MainDispatchLoop + jmp MainDispatchLoop ; CPU:$C862 PRG:0862 4C 50 C2 @CountdownComplete: - ldy #$00 + ldy #$00 ; CPU:$C865 PRG:0865 A0 00 @FindEntry: - lda $028D,y - and #$E0 - bne @EntryFound + lda $028D,y ; CPU:$C867 PRG:0867 B9 8D 02 + and #$E0 ; CPU:$C86A PRG:086A 29 E0 + bne @EntryFound ; CPU:$C86C PRG:086C D0 03 - iny - bne @FindEntry + iny ; CPU:$C86E PRG:086E C8 + bne @FindEntry ; CPU:$C86F PRG:086F D0 F6 @EntryFound: - lda #$00 - sta $028D,y + lda #$00 ; CPU:$C871 PRG:0871 A9 00 + sta $028D,y ; CPU:$C873 PRG:0873 99 8D 02 - lda #$00 - sta $0293,y + lda #$00 ; CPU:$C876 PRG:0876 A9 00 + sta $0293,y ; CPU:$C878 PRG:0878 99 93 02 - tya - asl - asl - tay + tya ; CPU:$C87B PRG:087B 98 + asl ; CPU:$C87C PRG:087C 0A + asl ; CPU:$C87D PRG:087D 0A + tay ; CPU:$C87E PRG:087E A8 - lda #$00 - sta $0278,y - sta $027A,y - sta ghost1Motion,y - sta ghost1Motion+1,y + lda #$00 ; CPU:$C87F PRG:087F A9 00 + sta $0278,y ; CPU:$C881 PRG:0881 99 78 02 + sta $027A,y ; CPU:$C884 PRG:0884 99 7A 02 + sta ghost1Motion,y ; CPU:$C887 PRG:0887 99 1E + sta ghost1Motion+1,y ; CPU:$C889 PRG:0889 00 99 1F - lda #$A8 - sta $0276 + lda #$A8 ; CPU:$C88C PRG:088C 00 A9 + sta $0276 ; CPU:$C88E PRG:088E A8 8D 76 - lda $89 - cmp #$04 - beq @FinishSequence + lda $89 ; CPU:$C891 PRG:0891 02 A5 + cmp #$04 ; CPU:$C893 PRG:0893 89 C9 + beq @FinishSequence ; CPU:$C895 PRG:0895 04 F0 - jmp MainDispatchLoop + jmp MainDispatchLoop ; CPU:$C897 PRG:0897 03 4C 50 @FinishSequence: - lda #$01 - sta activePlayerFlag + lda #$01 ; CPU:$C89A PRG:089A C2 A9 + sta activePlayerFlag ; CPU:$C89C PRG:089C 01 85 - jmp GameModeEntry + jmp GameModeEntry ; CPU:$C89E PRG:089E 47 4C 54 @RunRegularUpdate: - jsr UpdateState04Objects + jsr UpdateState04Objects ; CPU:$C8A1 PRG:08A1 CA 20 DC - jmp MainDispatchLoop + jmp MainDispatchLoop ; CPU:$C8A4 PRG:08A4 C8 4C 50 ;============================================================================== ; $C8A8-$C8DB: Allocate/Initialize State $04 Object Slot @@ -2698,46 +2501,46 @@ State04FinalPhaseComplete: ;============================================================================== InitializeState04ObjectSlot: - ldy #$00 - sty workPtr0 + ldy #$00 ; CPU:$C8A8 PRG:08A8 A0 00 + sty workPtr0 ; CPU:$C8AA PRG:08AA 84 00 @FindFreeSlot: - lda $0278,y - beq @InitializeSlot + lda $0278,y ; CPU:$C8AC PRG:08AC B9 78 02 + beq @InitializeSlot ; CPU:$C8AF PRG:08AF F0 08 - inc workPtr0 + inc workPtr0 ; CPU:$C8B1 PRG:08B1 E6 00 - iny - iny - iny - iny + iny ; CPU:$C8B3 PRG:08B3 C8 + iny ; CPU:$C8B4 PRG:08B4 C8 + iny ; CPU:$C8B5 PRG:08B5 C8 + iny ; CPU:$C8B6 PRG:08B6 C8 - bne @FindFreeSlot + bne @FindFreeSlot ; CPU:$C8B7 PRG:08B7 D0 F3 @InitializeSlot: - lda #$F4 - sta $0278,y + lda #$F4 ; CPU:$C8B9 PRG:08B9 A9 F4 + sta $0278,y ; CPU:$C8BB PRG:08BB 99 78 02 - lda #$A8 - sta $027A,y + lda #$A8 ; CPU:$C8BE PRG:08BE A9 A8 + sta $027A,y ; CPU:$C8C0 PRG:08C0 99 7A 02 - lda #$FF - sta ghost1Motion,y + lda #$FF ; CPU:$C8C3 PRG:08C3 A9 FF + sta ghost1Motion,y ; CPU:$C8C5 PRG:08C5 99 1E - lda #$00 - sta $001F,y + lda #$00 ; CPU:$C8C7 PRG:08C7 00 A9 + sta $001F,y ; CPU:$C8C9 PRG:08C9 00 99 1F - ldy workPtr0 + ldy workPtr0 ; CPU:$C8CC PRG:08CC 00 A4 - lda $89 - sta $0293,y + lda $89 ; CPU:$C8CE PRG:08CE 00 A5 + sta $0293,y ; CPU:$C8D0 PRG:08D0 89 99 93 - lda #$0C - sta $028D,y + lda #$0C ; CPU:$C8D3 PRG:08D3 02 A9 + sta $028D,y ; CPU:$C8D5 PRG:08D5 0C 99 8D - inc $89 + inc $89 ; CPU:$C8D8 PRG:08D8 02 E6 - rts + rts ; CPU:$C8DA PRG:08DA 89 ;============================================================================== ; $C8DC-$C8EA: State $04 Per-Frame Object Update Coordinator @@ -2768,11 +2571,11 @@ InitializeState04ObjectSlot: ; the original caller of this routine. ;============================================================================== UpdateState04Objects: - jsr UpdateTransitionObjectPositions - jsr RotateState04ObjectSlots - jsr UpdateState04ObjectStatus - jsr CheckState04ObjectTrigger - jmp BuildEntitySpriteBuffer + jsr UpdateTransitionObjectPositions ; CPU:$C8DC PRG:08DC 20 19 EA + jsr RotateState04ObjectSlots ; CPU:$C8DF PRG:08DF 20 2E C9 + jsr UpdateState04ObjectStatus ; CPU:$C8E2 PRG:08E2 20 FA C9 + jsr CheckState04ObjectTrigger ; CPU:$C8E5 PRG:08E5 20 EB C8 + jmp BuildEntitySpriteBuffer ; CPU:$C8E8 PRG:08E8 4C F1 DA ;============================================================================== ; $C8EB-$C92D: Check State $04 Object Trigger @@ -2808,60 +2611,60 @@ UpdateState04Objects: ;============================================================================== CheckState04ObjectTrigger: - lda pacmanMotion - bpl @Continue + lda pacmanMotion ; CPU:$C8EB PRG:08EB A5 1A + bpl @Continue ; CPU:$C8ED PRG:08ED 10 01 - rts + rts ; CPU:$C8EF PRG:08EF 60 @Continue: - lda $0274 - clc - adc #$08 - sta workPtr0 + lda $0274 ; CPU:$C8F0 PRG:08F0 AD 74 02 + clc ; CPU:$C8F3 PRG:08F3 18 + adc #$08 ; CPU:$C8F4 PRG:08F4 69 08 + sta workPtr0 ; CPU:$C8F6 PRG:08F6 85 00 - ldy #$00 - sty workPtr0+1 + ldy #$00 ; CPU:$C8F8 PRG:08F8 A0 00 + sty workPtr0+1 ; CPU:$C8FA PRG:08FA 84 01 B9 @ScanObjects: - lda $0278,y - beq @NextObject + lda $0278,y ; CPU:$C8FD PRG:08FD 78 02 F0 + beq @NextObject ; CPU:$C900 PRG:0900 04 C5 - cmp workPtr0 - bcc @TriggerEvent + cmp workPtr0 ; CPU:$C902 PRG:0902 00 90 + bcc @TriggerEvent ; CPU:$C904 PRG:0904 0B E6 @NextObject: - inc workPtr0+1 + inc workPtr0+1 ; CPU:$C906 PRG:0906 01 C8 - iny - iny - iny - iny + iny ; CPU:$C908 PRG:0908 C8 + iny ; CPU:$C909 PRG:0909 C8 + iny ; CPU:$C90A PRG:090A C8 + iny ; CPU:$C90B PRG:090B C0 - cpy #$10 - bne @ScanObjects + cpy #$10 ; CPU:$C90C PRG:090C 10 D0 + bne @ScanObjects ; CPU:$C90E PRG:090E ED 60 - rts + rts ; CPU:$C910 PRG:0910 A4 @TriggerEvent: - ldy $89 - inc $89 + ldy $89 ; CPU:$C911 PRG:0911 89 E6 + inc $89 ; CPU:$C913 PRG:0913 89 A9 - lda #$40 - sta $8A + lda #$40 ; CPU:$C915 PRG:0915 40 85 + sta $8A ; CPU:$C917 PRG:0917 8A B9 - lda $C9EE,y + lda $C9EE,y ; CPU:$C919 PRG:0919 EE C9 A4 - ldy workPtr0+1 - sta $028D,y + ldy workPtr0+1 ; CPU:$C91C PRG:091C 01 99 8D + sta $028D,y ; CPU:$C91F PRG:091F 02 A9 00 - lda #$00 - sta $0293,y + lda #$00 ; CPU:$C922 PRG:0922 99 93 + sta $0293,y ; CPU:$C924 PRG:0924 02 A9 00 - lda #$00 - sta $028C - sta $0276 + lda #$00 ; CPU:$C927 PRG:0927 8D 8C + sta $028C ; CPU:$C929 PRG:0929 02 8D 76 + sta $0276 ; CPU:$C92C PRG:092C 02 60 A5 - rts + rts ; CPU:$C92F PRG:092F 1E ;============================================================================== ; $C92E-$C9B7: Rotate State $04 Object Slots @@ -2907,114 +2710,114 @@ RotateState04ObjectSlots: ; 3 -> $002A/$002B ; ------------------------------------------------------------------------- - lda ghost1Motion - sta workPtr0 + lda ghost1Motion ; CPU:$C92E PRG:092E A5 1E + sta workPtr0 ; CPU:$C930 PRG:0930 85 00 - lda ghost1Motion+1 - sta workPtr0+1 + lda ghost1Motion+1 ; CPU:$C932 PRG:0932 A5 1F 85 + sta workPtr0+1 ; CPU:$C935 PRG:0935 01 A0 00 - ldy #$00 + ldy #$00 ; CPU:$C938 PRG:0938 B9 22 @ShiftLowRamStructures: - lda ghost2Motion,y - sta ghost1Motion,y + lda ghost2Motion,y ; CPU:$C93A PRG:093A 00 99 + sta ghost1Motion,y ; CPU:$C93C PRG:093C 1E 00 - lda ghost2Motion+1,y - sta ghost1Motion+1,y + lda ghost2Motion+1,y ; CPU:$C93E PRG:093E B9 23 00 + sta ghost1Motion+1,y ; CPU:$C941 PRG:0941 99 1F 00 - iny - iny - iny - iny + iny ; CPU:$C944 PRG:0944 C8 + iny ; CPU:$C945 PRG:0945 C8 + iny ; CPU:$C946 PRG:0946 C8 + iny ; CPU:$C947 PRG:0947 C8 - cpy #$0C - bne @ShiftLowRamStructures + cpy #$0C ; CPU:$C948 PRG:0948 C0 0C + bne @ShiftLowRamStructures ; CPU:$C94A PRG:094A D0 EC - lda workPtr0 - sta ghost4Motion + lda workPtr0 ; CPU:$C94C PRG:094C A5 00 + sta ghost4Motion ; CPU:$C94E PRG:094E 85 2A - lda workPtr0+1 - sta ghost4Motion+1 + lda workPtr0+1 ; CPU:$C950 PRG:0950 A5 01 85 + sta ghost4Motion+1 ; CPU:$C953 PRG:0953 2B AD 78 ; ------------------------------------------------------------------------- ; Rotate four complete 4-byte structures at $0278-$0287. ; ------------------------------------------------------------------------- - lda $0278 - sta workPtr0 + lda $0278 ; CPU:$C956 PRG:0956 02 85 00 + sta workPtr0 ; CPU:$C959 PRG:0959 AD 79 - lda $0279 - sta workPtr0+1 + lda $0279 ; CPU:$C95B PRG:095B 02 85 01 + sta workPtr0+1 ; CPU:$C95E PRG:095E AD 7A 02 - lda $027A - sta workPtr1 + lda $027A ; CPU:$C961 PRG:0961 85 02 AD + sta workPtr1 ; CPU:$C964 PRG:0964 7B 02 - lda $027B - sta workPtr1+1 + lda $027B ; CPU:$C966 PRG:0966 85 03 A0 + sta workPtr1+1 ; CPU:$C969 PRG:0969 00 B9 7C - ldy #$00 + ldy #$00 ; CPU:$C96C PRG:096C 02 99 @ShiftObjectStructures: - lda $027C,y - sta $0278,y + lda $027C,y ; CPU:$C96E PRG:096E 78 02 C8 + sta $0278,y ; CPU:$C971 PRG:0971 C0 0C D0 - iny - cpy #$0C - bne @ShiftObjectStructures + iny ; CPU:$C974 PRG:0974 F5 + cpy #$0C ; CPU:$C975 PRG:0975 A5 00 + bne @ShiftObjectStructures ; CPU:$C977 PRG:0977 8D 84 - lda workPtr0 - sta $0284 + lda workPtr0 ; CPU:$C979 PRG:0979 02 A5 + sta $0284 ; CPU:$C97B PRG:097B 01 8D 85 - lda workPtr0+1 - sta $0285 + lda workPtr0+1 ; CPU:$C97E PRG:097E 02 A5 02 + sta $0285 ; CPU:$C981 PRG:0981 8D 86 02 - lda workPtr1 - sta $0286 + lda workPtr1 ; CPU:$C984 PRG:0984 A5 03 + sta $0286 ; CPU:$C986 PRG:0986 8D 87 02 - lda workPtr1+1 - sta $0287 + lda workPtr1+1 ; CPU:$C989 PRG:0989 AD 8D 02 + sta $0287 ; CPU:$C98C PRG:098C 85 00 A0 ; ------------------------------------------------------------------------- ; Rotate the four status bytes at $028D-$0290. ; ------------------------------------------------------------------------- - lda $028D - sta workPtr0 + lda $028D ; CPU:$C98F PRG:098F 00 B9 8E + sta workPtr0 ; CPU:$C992 PRG:0992 02 99 - ldy #$00 + ldy #$00 ; CPU:$C994 PRG:0994 8D 02 @ShiftStatusArray: - lda $028E,y - sta $028D,y + lda $028E,y ; CPU:$C996 PRG:0996 C8 C0 03 + sta $028D,y ; CPU:$C999 PRG:0999 D0 F5 A5 - iny - cpy #$03 - bne @ShiftStatusArray + iny ; CPU:$C99C PRG:099C 00 + cpy #$03 ; CPU:$C99D PRG:099D 8D 90 + bne @ShiftStatusArray ; CPU:$C99F PRG:099F 02 AD - lda workPtr0 - sta $0290 + lda workPtr0 ; CPU:$C9A1 PRG:09A1 93 02 + sta $0290 ; CPU:$C9A3 PRG:09A3 85 00 A0 ; ------------------------------------------------------------------------- ; Rotate the four associated index/state bytes at $0293-$0296. ; ------------------------------------------------------------------------- - lda $0293 - sta workPtr0 + lda $0293 ; CPU:$C9A6 PRG:09A6 00 B9 94 + sta workPtr0 ; CPU:$C9A9 PRG:09A9 02 99 - ldy #$00 + ldy #$00 ; CPU:$C9AB PRG:09AB 93 02 @ShiftIndexArray: - lda $0294,y - sta $0293,y + lda $0294,y ; CPU:$C9AD PRG:09AD C8 C0 03 + sta $0293,y ; CPU:$C9B0 PRG:09B0 D0 F5 A5 - iny - cpy #$03 - bne @ShiftIndexArray + iny ; CPU:$C9B3 PRG:09B3 00 + cpy #$03 ; CPU:$C9B4 PRG:09B4 8D 96 + bne @ShiftIndexArray ; CPU:$C9B6 PRG:09B6 02 60 - lda workPtr0 - sta $0296 + lda workPtr0 ; CPU:$C9B8 PRG:09B8 A5 4B + sta $0296 ; CPU:$C9BA PRG:09BA 29 07 F0 - rts + rts ; CPU:$C9BD PRG:09BD 01 ;============================================================================== ; $C9B8-$C9D7: Animate State $04 Display Pattern @@ -3048,33 +2851,33 @@ RotateState04ObjectSlots: ; specific visual meaning to the two animation frames. ;============================================================================== AnimateState04DisplayPattern: - lda frameCounter - and #$07 - beq @UpdatePattern + lda frameCounter ; CPU:$C9B8 PRG:09B8 A5 4B + and #$07 ; CPU:$C9BA PRG:09BA 29 07 + beq @UpdatePattern ; CPU:$C9BC PRG:09BC F0 01 - rts + rts ; CPU:$C9BE PRG:09BE 60 @UpdatePattern: - ldx #$00 - ldy #$00 + ldx #$00 ; CPU:$C9BF PRG:09BF A2 00 + ldy #$00 ; CPU:$C9C1 PRG:09C1 A0 00 - lda frameCounter - and #$08 - beq @CopyPattern + lda frameCounter ; CPU:$C9C3 PRG:09C3 A5 4B + and #$08 ; CPU:$C9C5 PRG:09C5 29 08 + beq @CopyPattern ; CPU:$C9C7 PRG:09C7 F0 02 - ldy #$04 + ldy #$04 ; CPU:$C9C9 PRG:09C9 A0 04 @CopyPattern: - lda State04AnimationFrames,y - sta $024B,x + lda State04AnimationFrames,y ; CPU:$C9CB PRG:09CB B9 F2 C9 + sta $024B,x ; CPU:$C9CE PRG:09CE 9D 4B 02 - inx - iny + inx ; CPU:$C9D1 PRG:09D1 E8 + iny ; CPU:$C9D2 PRG:09D2 C8 - cpx #$04 - bne @CopyPattern + cpx #$04 ; CPU:$C9D3 PRG:09D3 E0 04 + bne @CopyPattern ; CPU:$C9D5 PRG:09D5 D0 F4 - rts + rts ; CPU:$C9D7 PRG:09D7 60 ;============================================================================== @@ -3082,13 +2885,13 @@ AnimateState04DisplayPattern: ;============================================================================== State04FinalDisplayData: - .byte $22,$AD - .byte $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D - .byte $00 + .byte $22,$AD ; CPU:$C9D8 PRG:09D8 22 AD + .byte $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D ; CPU:$C9DA PRG:09DA 2D 2D 2D 2D 2D 2D 2D 2D + .byte $00 ; CPU:$C9E2 PRG:09E2 00 - .byte $22,$ED - .byte $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D - .byte $FF + .byte $22,$ED ; CPU:$C9E3 PRG:09E3 22 ED + .byte $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D ; CPU:$C9E5 PRG:09E5 2D 2D 2D 2D 2D 2D 2D 2D + .byte $FF ; CPU:$C9ED PRG:09ED FF ;------------------------------------------------------------------------------ @@ -3096,7 +2899,7 @@ State04FinalDisplayData: ;------------------------------------------------------------------------------ State04UnknownData: - .byte $2D,$2F,$32,$34 + .byte $2D,$2F,$32,$34 ; CPU:$C9EE PRG:09EE 2D 2F 32 34 ;============================================================================== @@ -3109,8 +2912,8 @@ State04UnknownData: ;============================================================================== State04AnimationFrames: - .byte $22,$C7,$20,$FF - .byte $22,$C7,$01,$FF + .byte $22,$C7,$20,$FF ; CPU:$C9F2 PRG:09F2 22 C7 20 FF + .byte $22,$C7,$01,$FF ; CPU:$C9F6 PRG:09F6 22 C7 01 FF ;============================================================================== ; $C9FA-$CA3F: Update State $04 Object Status Animation @@ -3148,65 +2951,65 @@ State04AnimationFrames: ;============================================================================== UpdateState04ObjectStatus: - ldx #$00 + ldx #$00 ; CPU:$C9FA PRG:09FA A2 00 - lda $1A - bmi @UseTableBase + lda $1A ; CPU:$C9FC PRG:09FC A5 1A + bmi @UseTableBase ; CPU:$C9FE PRG:09FE 30 02 - ldx #$0A + ldx #$0A ; CPU:$CA00 PRG:0A00 A2 0A @UseTableBase: - stx workPtr0 + stx workPtr0 ; CPU:$CA02 PRG:0A02 86 00 - inc $B7 + inc $B7 ; CPU:$CA04 PRG:0A04 E6 B7 - lda $B7 - and #$07 - clc - adc workPtr0 - tay + lda $B7 ; CPU:$CA06 PRG:0A06 A5 B7 + and #$07 ; CPU:$CA08 PRG:0A08 29 07 + clc ; CPU:$CA0A PRG:0A0A 18 + adc workPtr0 ; CPU:$CA0B PRG:0A0B 65 00 + tay ; CPU:$CA0D PRG:0A0D A8 - lda State04ObjectStatusTable,y - sta $028C + lda State04ObjectStatusTable,y ; CPU:$CA0E PRG:0A0E B9 40 CA + sta $028C ; CPU:$CA11 PRG:0A11 8D 8C 02 ; Only update the four object entries once every eight frames. - lda $4B - and #$07 - beq @UpdateObjectEntries + lda $4B ; CPU:$CA14 PRG:0A14 A5 4B + and #$07 ; CPU:$CA16 PRG:0A16 29 07 + beq @UpdateObjectEntries ; CPU:$CA18 PRG:0A18 F0 01 - rts + rts ; CPU:$CA1A PRG:0A1A 60 @UpdateObjectEntries: - lda frameCounter - and #$08 - beq @SelectTableValue + lda frameCounter ; CPU:$CA1B PRG:0A1B A5 4B + and #$08 ; CPU:$CA1D PRG:0A1D 29 08 + beq @SelectTableValue ; CPU:$CA1F PRG:0A1F F0 02 - lda #$01 + lda #$01 ; CPU:$CA21 PRG:0A21 A9 01 @SelectTableValue: - clc - adc workPtr0 - adc #$08 - tay + clc ; CPU:$CA23 PRG:0A23 18 + adc workPtr0 ; CPU:$CA24 PRG:0A24 65 00 + adc #$08 ; CPU:$CA26 PRG:0A26 69 08 + tay ; CPU:$CA28 PRG:0A28 A8 - lda State04ObjectStatusTable,y - sta workPtr0 + lda State04ObjectStatusTable,y ; CPU:$CA29 PRG:0A29 B9 40 CA + sta workPtr0 ; CPU:$CA2C PRG:0A2C 85 00 - ldy #$00 + ldy #$00 ; CPU:$CA2E PRG:0A2E A0 00 @UpdateStatusEntries: - lda $028D,y - beq @NextStatusEntry + lda $028D,y ; CPU:$CA30 PRG:0A30 B9 8D 02 + beq @NextStatusEntry ; CPU:$CA33 PRG:0A33 F0 05 - lda workPtr0 - sta $028D,y + lda workPtr0 ; CPU:$CA35 PRG:0A35 A5 00 + sta $028D,y ; CPU:$CA37 PRG:0A37 99 8D 02 @NextStatusEntry: - iny - cpy #$04 - bne @UpdateStatusEntries + iny ; CPU:$CA3A PRG:0A3A C8 + cpy #$04 ; CPU:$CA3B PRG:0A3B C0 04 + bne @UpdateStatusEntries ; CPU:$CA3D PRG:0A3D D0 F1 - rts + rts ; CPU:$CA3F PRG:0A3F 60 ;============================================================================== ; $CA40-$CA53: State $04 Object Status/Animation Lookup @@ -3234,12 +3037,12 @@ UpdateState04ObjectStatus: ;============================================================================== State04ObjectStatusTable: ; Group 0, selected while $1A is negative. - .byte $04,$04,$04,$05,$05,$04,$01,$01 - .byte $0C,$0D + .byte $04,$04,$04,$05,$05,$04,$01,$01 ; CPU:$CA40 PRG:0A40 04 04 04 05 05 04 01 01 + .byte $0C,$0D ; CPU:$CA48 PRG:0A48 0C 0D ; Group 1, selected while $1A is nonnegative. - .byte $08,$08,$08,$09,$09,$08,$01,$01 - .byte $1E,$1F + .byte $08,$08,$08,$09,$09,$08,$01,$01 ; CPU:$CA4A PRG:0A4A 08 08 08 09 09 08 01 01 + .byte $1E,$1F ; CPU:$CA52 PRG:0A52 1E 1F ;============================================================================== ; $CA54-$CAD6: Main Game/Mode Initialization and Dispatch Loop @@ -3278,99 +3081,99 @@ State04ObjectStatusTable: ; be refined as their handlers are decoded. ;============================================================================== GameModeEntry: - lda #$08 - sta PPUCTRL - sta ppuCtrlShadow + lda #$08 ; CPU:$CA54 PRG:0A54 A9 08 + sta PPUCTRL ; CPU:$CA56 PRG:0A56 8D 00 20 + sta ppuCtrlShadow ; CPU:$CA59 PRG:0A59 85 43 @WaitForVBlank: - lda PPUSTATUS - bpl @WaitForVBlank + lda PPUSTATUS ; CPU:$CA5B PRG:0A5B AD 02 20 + bpl @WaitForVBlank ; CPU:$CA5E PRG:0A5E 10 FB - lda #$00 - sta PPUMASK - sta gameState - sta cocktailModeFlag - sta $69 - sta $4A + lda #$00 ; CPU:$CA60 PRG:0A60 A9 00 + sta PPUMASK ; CPU:$CA62 PRG:0A62 8D 01 20 + sta gameState ; CPU:$CA65 PRG:0A65 85 3F + sta cocktailModeFlag ; CPU:$CA67 PRG:0A67 85 46 + sta $69 ; CPU:$CA69 PRG:0A69 85 69 + sta $4A ; CPU:$CA6B PRG:0A6B 85 4A - jsr ClearGameplayNametables - jsr DrawGameplayHudLabels - jsr DrawGameplayScoreFields + jsr ClearGameplayNametables ; CPU:$CA6D PRG:0A6D 20 85 E3 + jsr DrawGameplayHudLabels ; CPU:$CA70 PRG:0A70 20 02 E5 + jsr DrawGameplayScoreFields ; CPU:$CA73 PRG:0A73 20 FF E3 - lda gameplaySuspended - beq @ClearPlayerState + lda gameplaySuspended ; CPU:$CA76 PRG:0A76 A5 48 + beq @ClearPlayerState ; CPU:$CA78 PRG:0A78 F0 06 - lda #$01 - sta roundNumber + lda #$01 ; CPU:$CA7A PRG:0A7A A9 01 + sta roundNumber ; CPU:$CA7C PRG:0A7C 85 67 - bne @InitializeCommonState + bne @InitializeCommonState ; CPU:$CA7E PRG:0A7E D0 17 @ClearPlayerState: - lda #$00 - tay + lda #$00 ; CPU:$CA80 PRG:0A80 A9 00 + tay ; CPU:$CA82 PRG:0A82 A8 @ClearPlayerStateLoop: - sta roundNumber,y - iny - cpy #$20 - bne @ClearPlayerStateLoop + sta roundNumber,y ; CPU:$CA83 PRG:0A83 99 67 + iny ; CPU:$CA85 PRG:0A85 00 + cpy #$20 ; CPU:$CA86 PRG:0A86 C8 C0 + bne @ClearPlayerStateLoop ; CPU:$CA88 PRG:0A88 20 D0 - lda #$03 - sta roundNumber - sta $77 + lda #$03 ; CPU:$CA8A PRG:0A8A F8 A9 + sta roundNumber ; CPU:$CA8C PRG:0A8C 03 85 + sta $77 ; CPU:$CA8E PRG:0A8E 67 85 - sta $0600 - sta $0601 + sta $0600 ; CPU:$CA90 PRG:0A90 77 8D 00 + sta $0601 ; CPU:$CA93 PRG:0A93 06 8D 01 @InitializeCommonState: - lda #$FF - sta roundDisplayValue - sta $78 - sta $0245 + lda #$FF ; CPU:$CA96 PRG:0A96 06 A9 + sta roundDisplayValue ; CPU:$CA98 PRG:0A98 FF 85 + sta $78 ; CPU:$CA9A PRG:0A9A 68 85 + sta $0245 ; CPU:$CA9C PRG:0A9C 78 8D 45 - lda #$88 - sta ppuCtrlShadow - sta PPUCTRL + lda #$88 ; CPU:$CA9F PRG:0A9F 02 A9 + sta ppuCtrlShadow ; CPU:$CAA1 PRG:0AA1 88 85 + sta PPUCTRL ; CPU:$CAA3 PRG:0AA3 43 8D 00 GameModeFrameSync: @WaitForNextFrame: - lda #$01 - sta $40 + lda #$01 ; CPU:$CAA7 PRG:0AA7 A9 01 + sta $40 ; CPU:$CAA9 PRG:0AA9 85 40 @WaitForNmi: - lda $40 - bne @WaitForNmi + lda $40 ; CPU:$CAAB PRG:0AAB A5 40 + bne @WaitForNmi ; CPU:$CAAD PRG:0AAD D0 FC @DispatchLoop: - lda gameplaySuspended - beq @ProcessDelay + lda gameplaySuspended ; CPU:$CAAF PRG:0AAF A5 48 + beq @ProcessDelay ; CPU:$CAB1 PRG:0AB1 F0 0D - lda currentInput - and #$0C - beq @ProcessDelay + lda currentInput ; CPU:$CAB3 PRG:0AB3 A5 4D + and #$0C ; CPU:$CAB5 PRG:0AB5 29 0C + beq @ProcessDelay ; CPU:$CAB7 PRG:0AB7 F0 07 - lda #$02 ; TODO: what is state $02? - sta gameState + lda #$02 ; TODO: what is state $02? ; CPU:$CAB9 PRG:0AB9 A9 02 + sta gameState ; CPU:$CABB PRG:0ABB 85 3F - jmp MainEntry + jmp MainEntry ; CPU:$CABD PRG:0ABD 4C E7 C1 @ProcessDelay: - lda stateTimer - beq @DispatchState + lda stateTimer ; CPU:$CAC0 PRG:0AC0 A5 4C + beq @DispatchState ; CPU:$CAC2 PRG:0AC2 F0 04 - dec stateTimer - bne @WaitForNextFrame + dec stateTimer ; CPU:$CAC4 PRG:0AC4 C6 4C + bne @WaitForNextFrame ; CPU:$CAC6 PRG:0AC6 D0 DF @DispatchState: - ldy gameState + ldy gameState ; CPU:$CAC8 PRG:0AC8 A4 3F - lda GameModeStateTable,y - sta dispatchVector + lda GameModeStateTable,y ; CPU:$CACA PRG:0ACA B9 D7 CA + sta dispatchVector ; CPU:$CACD PRG:0ACD 85 10 - lda GameModeStateTable+1,y - sta dispatchVector+1 + lda GameModeStateTable+1,y ; CPU:$CACF PRG:0ACF B9 D8 CA + sta dispatchVector+1 ; CPU:$CAD2 PRG:0AD2 85 11 6C - jmp ($0010) + jmp ($0010) ; CPU:$CAD5 PRG:0AD5 10 00 F3 CE 67 ;============================================================================== ; $CAD7-$CAE6: Game Mode State Dispatch Table @@ -3391,14 +3194,14 @@ GameModeFrameSync: ;============================================================================== GameModeStateTable: - .word GameModeState00 ; $3F = $00 - .word GameModeState02 ; $3F = $02 - .word GameModeState04 ; $3F = $04 - .word GameModeState06 ; $3F = $06 - .word GameModeState08 ; $3F = $08 - .word GameModeState0A ; $3F = $0A - .word GameModeState0C ; $3F = $0C - .word InitializeGameplayTransitionState + .word GameModeState00 ; $3F = $00 ; CPU:$CAD7 PRG:0AD7 F3 CE + .word GameModeState02 ; $3F = $02 ; CPU:$CAD9 PRG:0AD9 67 CB + .word GameModeState04 ; $3F = $04 ; CPU:$CADB PRG:0ADB E9 CA + .word GameModeState06 ; $3F = $06 ; CPU:$CADD PRG:0ADD D9 CC + .word GameModeState08 ; $3F = $08 ; CPU:$CADF PRG:0ADF 06 CD + .word GameModeState0A ; $3F = $0A ; CPU:$CAE1 PRG:0AE1 1F CE + .word GameModeState0C ; $3F = $0C ; CPU:$CAE3 PRG:0AE3 B0 CD + .word InitializeGameplayTransitionState ; CPU:$CAE5 PRG:0AE5 D6 E6 ; $3F = $0E ;============================================================================== @@ -3416,7 +3219,7 @@ GameModeStateTable: ;============================================================================== GameModeAuxPointer: - .word $E7BF + .word $E7BF ; CPU:$CAE7 PRG:0AE7 BF E7 ;============================================================================== ; $CAE9-$CB5A: Game-Mode State $04 / Pause and Per-Frame Processing @@ -3458,80 +3261,80 @@ GameModeAuxPointer: ;============================================================================== GameModeState04: - lda $060F - beq @CheckPauseInput + lda $060F ; CPU:$CAE9 PRG:0AE9 AD 0F 06 + beq @CheckPauseInput ; CPU:$CAEC PRG:0AEC F0 03 - jmp GameModeFrameSync + jmp GameModeFrameSync ; CPU:$CAEE PRG:0AEE 4C A7 CA @CheckPauseInput: - lda currentInput - and #$08 - cmp $49 - beq @ProcessCurrentMode + lda currentInput ; CPU:$CAF1 PRG:0AF1 A5 4D + and #$08 ; CPU:$CAF3 PRG:0AF3 29 08 + cmp $49 ; CPU:$CAF5 PRG:0AF5 C5 49 + beq @ProcessCurrentMode ; CPU:$CAF7 PRG:0AF7 F0 38 - sta $49 + sta $49 ; CPU:$CAF9 PRG:0AF9 85 49 - lda $49 - beq @ProcessCurrentMode + lda $49 ; CPU:$CAFB PRG:0AFB A5 49 + beq @ProcessCurrentMode ; CPU:$CAFD PRG:0AFD F0 32 - inc $4A + inc $4A ; CPU:$CAFF PRG:0AFF E6 4A - ldx #$22 + ldx #$22 ; CPU:$CB01 PRG:0B01 A2 22 - lda activePlayerFlag - and cocktailModeFlag - beq @SetCommandAddress + lda activePlayerFlag ; CPU:$CB03 PRG:0B03 A5 47 + and cocktailModeFlag ; CPU:$CB05 PRG:0B05 25 46 + beq @SetCommandAddress ; CPU:$CB07 PRG:0B07 F0 02 - ldx #$2A + ldx #$2A ; CPU:$CB09 PRG:0B09 A2 2A @SetCommandAddress: - stx $024B + stx $024B ; CPU:$CB0B PRG:0B0B 8E 4B 02 - lda #$37 - sta $024C + lda #$37 ; CPU:$CB0E PRG:0B0E A9 37 + sta $024C ; CPU:$CB10 PRG:0B10 8D 4C 02 - ldx #$06 - ldy #$00 + ldx #$06 ; CPU:$CB13 PRG:0B13 A2 06 + ldy #$00 ; CPU:$CB15 PRG:0B15 A0 00 - lda $4A - and #$01 - beq @CopyPauseData + lda $4A ; CPU:$CB17 PRG:0B17 A5 4A + and #$01 ; CPU:$CB19 PRG:0B19 29 01 + beq @CopyPauseData ; CPU:$CB1B PRG:0B1B F0 05 - ldx #$00 - sta $060F + ldx #$00 ; CPU:$CB1D PRG:0B1D A2 00 + sta $060F ; CPU:$CB1F PRG:0B1F 8D 0F 06 @CopyPauseData: - lda PauseDisplayData,x - sta $024D,y + lda PauseDisplayData,x ; CPU:$CB22 PRG:0B22 BD 5B CB + sta $024D,y ; CPU:$CB25 PRG:0B25 99 4D 02 - inx - iny + inx ; CPU:$CB28 PRG:0B28 E8 + iny ; CPU:$CB29 PRG:0B29 C8 - cpy #$06 - bne @CopyPauseData + cpy #$06 ; CPU:$CB2A PRG:0B2A C0 06 + bne @CopyPauseData ; CPU:$CB2C PRG:0B2C D0 F4 - jmp GameModeFrameSync + jmp GameModeFrameSync ; CPU:$CB2E PRG:0B2E 4C A7 CA @ProcessCurrentMode: - lda $4A - and #$01 - beq @RunFrameUpdates + lda $4A ; CPU:$CB31 PRG:0B31 A5 4A + and #$01 ; CPU:$CB33 PRG:0B33 29 01 + beq @RunFrameUpdates ; CPU:$CB35 PRG:0B35 F0 03 - jmp GameModeFrameSync + jmp GameModeFrameSync ; CPU:$CB37 PRG:0B37 4C A7 CA @RunFrameUpdates: - jsr UpdateGameplayTimers - jsr UpdateGameplayTileState - jsr UpdatePlayerMovement - jsr UpdatePlayerDirectionAnimation - jsr UpdateGameplayEntities - jsr UpdateEntitySpriteStates - jsr UpdateEntityStatusFlags - jsr UpdatePeriodicFourEntryState - jsr CheckGameplayProximity - jsr CheckEntityCollisions + jsr UpdateGameplayTimers ; CPU:$CB3A PRG:0B3A 20 A0 D1 + jsr UpdateGameplayTileState ; CPU:$CB3D PRG:0B3D 20 7C DF + jsr UpdatePlayerMovement ; CPU:$CB40 PRG:0B40 20 90 D3 + jsr UpdatePlayerDirectionAnimation ; CPU:$CB43 PRG:0B43 20 8E D9 + jsr UpdateGameplayEntities ; CPU:$CB46 PRG:0B46 20 57 D5 + jsr UpdateEntitySpriteStates ; CPU:$CB49 PRG:0B49 20 CC D9 + jsr UpdateEntityStatusFlags ; CPU:$CB4C PRG:0B4C 20 5E D9 + jsr UpdatePeriodicFourEntryState ; CPU:$CB4F PRG:0B4F 20 5E DE + jsr CheckGameplayProximity ; CPU:$CB52 PRG:0B52 20 A4 D2 + jsr CheckEntityCollisions ; CPU:$CB55 PRG:0B55 20 40 DA - jmp GameModeFrameSync + jmp GameModeFrameSync ; CPU:$CB58 PRG:0B58 4C A7 CA ;============================================================================== ; $CB5B-$CB66: Pause Display Data @@ -3550,8 +3353,8 @@ GameModeState04: ;============================================================================== PauseDisplayData: - .byte $50,$41,$55,$53,$45,$FF - .byte $2D,$2D,$2D,$2D,$2D,$FF + .byte $50,$41,$55,$53,$45,$FF ; CPU:$CB5B PRG:0B5B 50 41 55 53 45 FF + .byte $2D,$2D,$2D,$2D,$2D,$FF ; CPU:$CB61 PRG:0B61 2D 2D 2D 2D 2D FF ;============================================================================== @@ -3587,101 +3390,101 @@ PauseDisplayData: ;============================================================================== GameModeState02: - lda $87 - beq @BuildInitialData + lda $87 ; CPU:$CB67 PRG:0B67 A5 87 + beq @BuildInitialData ; CPU:$CB69 PRG:0B69 F0 03 - jmp @AdvancePhase + jmp @AdvancePhase ; CPU:$CB6B PRG:0B6B 4C E4 CB @BuildInitialData: - lda #$60 - sta workPtr0 + lda #$60 ; CPU:$CB6E PRG:0B6E A9 60 + sta workPtr0 ; CPU:$CB70 PRG:0B70 85 00 - lda #$07 - sta workPtr0+1 + lda #$07 ; CPU:$CB72 PRG:0B72 A9 07 + sta workPtr0+1 ; CPU:$CB74 PRG:0B74 85 01 A5 - lda $48 - bne @AdvancePhase + lda $48 ; CPU:$CB77 PRG:0B77 48 D0 + bne @AdvancePhase ; CPU:$CB79 PRG:0B79 6A A9 - lda #$02 - sta workValue0 + lda #$02 ; CPU:$CB7B PRG:0B7B 02 85 + sta workValue0 ; CPU:$CB7D PRG:0B7D 04 A0 - ldy #$00 - sty workValue1 - sty workValue2 - sty workValue3 + ldy #$00 ; CPU:$CB7F PRG:0B7F 00 84 + sty workValue1 ; CPU:$CB81 PRG:0B81 05 84 + sty workValue2 ; CPU:$CB83 PRG:0B83 06 84 + sty workValue3 ; CPU:$CB85 PRG:0B85 07 A6 @BuildOuterLoop: - ldx workValue2 + ldx workValue2 ; CPU:$CB87 PRG:0B87 06 BD - lda State02PositionTable,x - sta workPtr1 + lda State02PositionTable,x ; CPU:$CB89 PRG:0B89 C0 CC 85 + sta workPtr1 ; CPU:$CB8C PRG:0B8C 02 BD - lda State02PositionTable + 1,x - sta workPtr1+1 + lda State02PositionTable + 1,x ; CPU:$CB8E PRG:0B8E C1 CC 85 + sta workPtr1+1 ; CPU:$CB91 PRG:0B91 03 A6 07 - ldx workValue3 + ldx workValue3 ; CPU:$CB94 PRG:0B94 BD C6 - lda State02EntryCounts,x - sta workValue4 + lda State02EntryCounts,x ; CPU:$CB96 PRG:0B96 CC 85 08 + sta workValue4 ; CPU:$CB99 PRG:0B99 A5 03 @BuildInnerLoop: - lda workPtr1+1 - sta ($00),y + lda workPtr1+1 ; CPU:$CB9B PRG:0B9B 91 00 A6 + sta ($00),y ; CPU:$CB9E PRG:0B9E 05 BD - ldx workValue1 + ldx workValue1 ; CPU:$CBA0 PRG:0BA0 9C CC - lda State02ValueTableA,x - iny - sta (workPtr0),y + lda State02ValueTableA,x ; CPU:$CBA2 PRG:0BA2 C8 91 00 + iny ; CPU:$CBA5 PRG:0BA5 BD + sta (workPtr0),y ; CPU:$CBA6 PRG:0BA6 AE CC - lda State02ValueTableB,x - iny - sta (workPtr0),y + lda State02ValueTableB,x ; CPU:$CBA8 PRG:0BA8 C8 91 00 + iny ; CPU:$CBAB PRG:0BAB A5 + sta (workPtr0),y ; CPU:$CBAC PRG:0BAC 02 C8 - lda workPtr1 - iny - sta ($00),y + lda workPtr1 ; CPU:$CBAE PRG:0BAE 91 00 + iny ; CPU:$CBB0 PRG:0BB0 A5 + sta ($00),y ; CPU:$CBB1 PRG:0BB1 02 18 - lda workPtr1 - clc - adc #$08 - sta workPtr1 + lda workPtr1 ; CPU:$CBB3 PRG:0BB3 69 08 + clc ; CPU:$CBB5 PRG:0BB5 85 + adc #$08 ; CPU:$CBB6 PRG:0BB6 02 C8 + sta workPtr1 ; CPU:$CBB8 PRG:0BB8 E6 05 - iny - inc workValue1 + iny ; CPU:$CBBA PRG:0BBA C6 + inc workValue1 ; CPU:$CBBB PRG:0BBB 08 D0 - dec workValue4 - bne @BuildInnerLoop + dec workValue4 ; CPU:$CBBD PRG:0BBD DB E6 + bne @BuildInnerLoop ; CPU:$CBBF PRG:0BBF 06 E6 - inc workValue2 - inc workValue2 - inc workValue3 + inc workValue2 ; CPU:$CBC1 PRG:0BC1 06 E6 + inc workValue2 ; CPU:$CBC3 PRG:0BC3 07 A5 + inc workValue3 ; CPU:$CBC5 PRG:0BC5 69 D0 - lda $69 - bne @ContinueBuild + lda $69 ; CPU:$CBC7 PRG:0BC7 04 A5 + bne @ContinueBuild ; CPU:$CBC9 PRG:0BC9 68 D0 - lda roundDisplayValue - bne @AdvancePhase + lda roundDisplayValue ; CPU:$CBCB PRG:0BCB 18 C6 + bne @AdvancePhase ; CPU:$CBCD PRG:0BCD 04 F0 @ContinueBuild: - dec workValue0 - beq @CheckPlayerMode + dec workValue0 ; CPU:$CBCF PRG:0BCF 04 10 + beq @CheckPlayerMode ; CPU:$CBD1 PRG:0BD1 B4 30 - bpl @BuildOuterLoop - bmi @AdvancePhase + bpl @BuildOuterLoop ; CPU:$CBD3 PRG:0BD3 10 A5 + bmi @AdvancePhase ; CPU:$CBD5 PRG:0BD5 47 F0 @CheckPlayerMode: - lda activePlayerFlag - beq @AdvancePhase + lda activePlayerFlag ; CPU:$CBD7 PRG:0BD7 0C A5 + beq @AdvancePhase ; CPU:$CBD9 PRG:0BD9 46 F0 - lda cocktailModeFlag - beq @BuildOuterLoop + lda cocktailModeFlag ; CPU:$CBDB PRG:0BDB AA E6 + beq @BuildOuterLoop ; CPU:$CBDD PRG:0BDD 05 E6 - inc workValue1 - inc workValue1 - inc workValue1 + inc workValue1 ; CPU:$CBDF PRG:0BDF 05 E6 + inc workValue1 ; CPU:$CBE1 PRG:0BE1 05 D0 + inc workValue1 ; CPU:$CBE3 PRG:0BE3 A2 A5 - bne @BuildOuterLoop + bne @BuildOuterLoop ; CPU:$CBE5 PRG:0BE5 87 C9 ;------------------------------------------------------------------------------ ; $CBE4 @@ -3689,132 +3492,132 @@ GameModeState02: ;------------------------------------------------------------------------------ @AdvancePhase: - lda $87 - cmp #$C0 - bne @IncrementPhase + lda $87 ; CPU:$CBE7 PRG:0BE7 C0 D0 + cmp #$C0 ; CPU:$CBE9 PRG:0BE9 03 4C + bne @IncrementPhase ; CPU:$CBEB PRG:0BEB 7C CC - jmp $CC7C + jmp $CC7C ; CPU:$CBED PRG:0BED E6 87 A5 @IncrementPhase: - inc $87 + inc $87 ; CPU:$CBF0 PRG:0BF0 87 C9 - lda $87 - cmp #$78 - beq @InitializeMidPhase + lda $87 ; CPU:$CBF2 PRG:0BF2 78 F0 + cmp #$78 ; CPU:$CBF4 PRG:0BF4 03 4C + beq @InitializeMidPhase ; CPU:$CBF6 PRG:0BF6 99 CC - jmp $CC99 + jmp $CC99 ; CPU:$CBF8 PRG:0BF8 A9 A8 85 @InitializeMidPhase: - lda #$A8 - sta $1C + lda #$A8 ; CPU:$CBFB PRG:0BFB 1C A9 + sta $1C ; CPU:$CBFD PRG:0BFD 60 85 - lda #$60 - sta pacmanMotion - sta ghost1Motion - sta ghost2Motion + lda #$60 ; CPU:$CBFF PRG:0BFF 1A 85 + sta pacmanMotion ; CPU:$CC01 PRG:0C01 1E 85 + sta ghost1Motion ; CPU:$CC03 PRG:0C03 22 A9 + sta ghost2Motion ; CPU:$CC05 PRG:0C05 58 85 - lda #$58 - sta ghost3Motion - sta $20 + lda #$58 ; CPU:$CC07 PRG:0C07 26 85 + sta ghost3Motion ; CPU:$CC09 PRG:0C09 20 A9 + sta $20 ; CPU:$CC0B PRG:0C0B 68 85 - lda #$68 - sta ghost4Motion + lda #$68 ; CPU:$CC0D PRG:0C0D 2A A9 + sta ghost4Motion ; CPU:$CC0F PRG:0C0F 70 85 - lda #$70 - sta $24 - sta $28 - sta $2C + lda #$70 ; CPU:$CC11 PRG:0C11 24 85 + sta $24 ; CPU:$CC13 PRG:0C13 28 85 + sta $28 ; CPU:$CC15 PRG:0C15 2C A9 + sta $2C ; CPU:$CC17 PRG:0C17 00 A8 - lda #$00 - tay + lda #$00 ; CPU:$CC19 PRG:0C19 99 78 + tay ; CPU:$CC1B PRG:0C1B 07 @ClearOamRegion: - sta $0778,y - iny - cpy #$24 - bne @ClearOamRegion + sta $0778,y ; CPU:$CC1C PRG:0C1C C8 C0 24 + iny ; CPU:$CC1F PRG:0C1F D0 + cpy #$24 ; CPU:$CC20 PRG:0C20 F8 A5 + bne @ClearOamRegion ; CPU:$CC22 PRG:0C22 47 25 - lda activePlayerFlag - and cocktailModeFlag - beq @NoPlayerOffset + lda activePlayerFlag ; CPU:$CC24 PRG:0C24 46 F0 + and cocktailModeFlag ; CPU:$CC26 PRG:0C26 02 A9 + beq @NoPlayerOffset ; CPU:$CC28 PRG:0C28 08 85 - lda #$08 + lda #$08 ; CPU:$CC2A PRG:0C2A 00 A5 @NoPlayerOffset: - sta $00 + sta $00 ; CPU:$CC2C PRG:0C2C 67 38 - lda $67 - sec - sbc #$01 - asl - tay + lda $67 ; CPU:$CC2E PRG:0C2E E9 01 + sec ; CPU:$CC30 PRG:0C30 0A + sbc #$01 ; CPU:$CC31 PRG:0C31 A8 B9 + asl ; CPU:$CC33 PRG:0C33 D1 + tay ; CPU:$CC34 PRG:0C34 CC - lda State02DisplayAddressTable,y - clc - adc workPtr0 - sta workPtr0 + lda State02DisplayAddressTable,y ; CPU:$CC35 PRG:0C35 18 65 00 + clc ; CPU:$CC38 PRG:0C38 85 + adc workPtr0 ; CPU:$CC39 PRG:0C39 00 B9 + sta workPtr0 ; CPU:$CC3B PRG:0C3B D2 CC - lda State02DisplayAddressTable+1,y - sta workPtr0+1 + lda State02DisplayAddressTable+1,y ; CPU:$CC3D PRG:0C3D 85 01 A5 + sta workPtr0+1 ; CPU:$CC40 PRG:0C40 00 8D 4B - lda workPtr0 - sta $024B + lda workPtr0 ; CPU:$CC43 PRG:0C43 02 A5 + sta $024B ; CPU:$CC45 PRG:0C45 01 8D 4C - lda workPtr0+1 - sta $024C + lda workPtr0+1 ; CPU:$CC48 PRG:0C48 02 A9 2D + sta $024C ; CPU:$CC4B PRG:0C4B 8D 4D 02 - lda #$2D - sta $024D - sta $024E + lda #$2D ; CPU:$CC4E PRG:0C4E 8D 4E + sta $024D ; CPU:$CC50 PRG:0C50 02 A9 00 + sta $024E ; CPU:$CC53 PRG:0C53 8D 4F 02 - lda #$00 - sta $024F + lda #$00 ; CPU:$CC56 PRG:0C56 A5 00 + sta $024F ; CPU:$CC58 PRG:0C58 8D 50 02 - lda $00 - sta $0250 + lda $00 ; CPU:$CC5B PRG:0C5B A5 01 + sta $0250 ; CPU:$CC5D PRG:0C5D 18 69 20 - lda $01 - clc - adc #$20 - sta $0251 + lda $01 ; CPU:$CC60 PRG:0C60 8D 51 + clc ; CPU:$CC62 PRG:0C62 02 + adc #$20 ; CPU:$CC63 PRG:0C63 A9 2D + sta $0251 ; CPU:$CC65 PRG:0C65 8D 52 02 - lda #$2D - sta $0252 - sta $0253 + lda #$2D ; CPU:$CC68 PRG:0C68 8D 53 + sta $0252 ; CPU:$CC6A PRG:0C6A 02 A9 FF + sta $0253 ; CPU:$CC6D PRG:0C6D 8D 54 02 - lda #$FF - sta $0254 + lda #$FF ; CPU:$CC70 PRG:0C70 20 8E + sta $0254 ; CPU:$CC72 PRG:0C72 D9 20 CC - jsr UpdatePlayerDirectionAnimation - jsr UpdateEntitySpriteStates - jsr $DA40 + jsr UpdatePlayerDirectionAnimation ; CPU:$CC75 PRG:0C75 D9 20 40 + jsr UpdateEntitySpriteStates ; CPU:$CC78 PRG:0C78 DA 4C 99 + jsr $DA40 ; CPU:$CC7B PRG:0C7B CC AD 00 - jmp $CC99 + jmp $CC99 ; CPU:$CC7E PRG:0C7E 06 0D 01 @CheckCompletion: - lda $0600 - ora $0601 - bne $CC99 + lda $0600 ; CPU:$CC81 PRG:0C81 06 D0 15 + ora $0601 ; CPU:$CC84 PRG:0C84 A5 48 D0 + bne $CC99 ; CPU:$CC87 PRG:0C87 0D A9 - lda $48 - bne @AdvanceMainState + lda $48 ; CPU:$CC89 PRG:0C89 00 85 + bne @AdvanceMainState ; CPU:$CC8B PRG:0C8B 69 A8 - lda #$00 - sta $69 - tay + lda #$00 ; CPU:$CC8D PRG:0C8D 99 60 + sta $69 ; CPU:$CC8F PRG:0C8F 07 C8 + tay ; CPU:$CC91 PRG:0C91 C0 @ClearPage07Region: - sta $0760,y - iny - cpy #$A0 - bne @ClearPage07Region + sta $0760,y ; CPU:$CC92 PRG:0C92 A0 D0 F8 + iny ; CPU:$CC95 PRG:0C95 A9 + cpy #$A0 ; CPU:$CC96 PRG:0C96 04 85 + bne @ClearPage07Region ; CPU:$CC98 PRG:0C98 3F 4C @AdvanceMainState: - lda #$04 - sta $3F + lda #$04 ; CPU:$CC9A PRG:0C9A A7 CA + sta $3F ; CPU:$CC9C PRG:0C9C C6 C3 @ReturnToFrameLoop: - jmp GameModeFrameSync + jmp GameModeFrameSync ; CPU:$CC9E PRG:0C9E C1 BA C7 ;============================================================================== ; $CC9C-$CCD8: Game-Mode State $02 Lookup Tables @@ -3845,9 +3648,9 @@ GameModeState02: ;------------------------------------------------------------------------------ State02ValueTableA: - .byte $C6,$C3,$C1,$BA,$C7,$BB - .byte $B0,$B1,$B2,$B3,$B4,$B5 - .byte $B6,$B7,$B4,$B8,$B9,$B6 + .byte $C6,$C3,$C1,$BA,$C7,$BB ; CPU:$CC9C PRG:0C9C C6 C3 C1 BA C7 BB + .byte $B0,$B1,$B2,$B3,$B4,$B5 ; CPU:$CCA2 PRG:0CA2 B0 B1 B2 B3 B4 B5 + .byte $B6,$B7,$B4,$B8,$B9,$B6 ; CPU:$CCA8 PRG:0CA8 B6 B7 B4 B8 B9 B6 ;------------------------------------------------------------------------------ @@ -3860,9 +3663,9 @@ State02ValueTableA: ;------------------------------------------------------------------------------ State02ValueTableB: - .byte $00,$00,$00,$00,$00,$00 - .byte $02,$02,$02,$02,$02,$02 - .byte $02,$02,$02,$02,$02,$02 + .byte $00,$00,$00,$00,$00,$00 ; CPU:$CCAE PRG:0CAE 00 00 00 00 00 00 + .byte $02,$02,$02,$02,$02,$02 ; CPU:$CCB4 PRG:0CB4 02 02 02 02 02 02 + .byte $02,$02,$02,$02,$02,$02 ; CPU:$CCBA PRG:0CBA 02 02 02 02 02 02 ;------------------------------------------------------------------------------ @@ -3879,9 +3682,9 @@ State02ValueTableB: ;------------------------------------------------------------------------------ State02PositionTable: - .byte $44,$88 - .byte $44,$60 - .byte $50,$70 + .byte $44,$88 ; CPU:$CCC0 PRG:0CC0 44 88 + .byte $44,$60 ; CPU:$CCC2 PRG:0CC2 44 60 + .byte $50,$70 ; CPU:$CCC4 PRG:0CC4 50 70 ;------------------------------------------------------------------------------ @@ -3892,7 +3695,7 @@ State02PositionTable: ;------------------------------------------------------------------------------ State02EntryCounts: - .byte $06,$06,$03 + .byte $06,$06,$03 ; CPU:$CCC6 PRG:0CC6 06 06 03 ;------------------------------------------------------------------------------ @@ -3903,7 +3706,7 @@ State02EntryCounts: ;------------------------------------------------------------------------------ State02UnknownData: - .byte $C0,$C1,$C2,$C3,$C4,$C5,$C3,$C6 + .byte $C0,$C1,$C2,$C3,$C4,$C5,$C3,$C6 ; CPU:$CCC9 PRG:0CC9 C0 C1 C2 C3 C4 C5 C3 C6 ;------------------------------------------------------------------------------ @@ -3930,10 +3733,10 @@ State02UnknownData: ;------------------------------------------------------------------------------ State02DisplayAddressTable: - .byte $23,$17 - .byte $23,$19 - .byte $23,$1B - .byte $23,$57 + .byte $23,$17 ; CPU:$CCD1 PRG:0CD1 23 17 + .byte $23,$19 ; CPU:$CCD3 PRG:0CD3 23 19 + .byte $23,$1B ; CPU:$CCD5 PRG:0CD5 23 1B + .byte $23,$57 ; CPU:$CCD7 PRG:0CD7 23 57 ;============================================================================== ; $CCD9-$CD05: Game-Mode State $06 Handler @@ -3957,38 +3760,38 @@ State02DisplayAddressTable: ;============================================================================== GameModeState06: - inc $DA + inc $DA ; CPU:$CCD9 PRG:0CD9 E6 DA - lda #$28 - cmp $DA - bne @RunFrameUpdates + lda #$28 ; CPU:$CCDB PRG:0CDB A9 28 + cmp $DA ; CPU:$CCDD PRG:0CDD C5 DA + bne @RunFrameUpdates ; CPU:$CCDF PRG:0CDF D0 16 - lda #$02 - sta $DA + lda #$02 ; CPU:$CCE1 PRG:0CE1 A9 02 + sta $DA ; CPU:$CCE3 PRG:0CE3 85 DA - lda #$04 - sta $3F + lda #$04 ; CPU:$CCE5 PRG:0CE5 A9 04 + sta $3F ; CPU:$CCE7 PRG:0CE7 85 3F - lda #$08 + lda #$08 ; CPU:$CCE9 PRG:0CE9 A9 08 - ldx #$FE + ldx #$FE ; CPU:$CCEB PRG:0CEB A2 FE @FindStateEntry: - inx - inx - cmp $B8,x - bne @FindStateEntry + inx ; CPU:$CCED PRG:0CED E8 + inx ; CPU:$CCEE PRG:0CEE E8 + cmp $B8,x ; CPU:$CCEF PRG:0CEF D5 B8 + bne @FindStateEntry ; CPU:$CCF1 PRG:0CF1 D0 FA - lda #$06 - sta $B8,x + lda #$06 ; CPU:$CCF3 PRG:0CF3 A9 06 + sta $B8,x ; CPU:$CCF5 PRG:0CF5 95 B8 @RunFrameUpdates: - jsr UpdatePeriodicFourEntryState - jsr UpdateEntityMovementStates - jsr UpdateEntitySpriteStates - jsr $DA40 + jsr UpdatePeriodicFourEntryState ; CPU:$CCF7 PRG:0CF7 20 5E DE + jsr UpdateEntityMovementStates ; CPU:$CCFA PRG:0CFA 20 14 D9 + jsr UpdateEntitySpriteStates ; CPU:$CCFD PRG:0CFD 20 CC D9 + jsr $DA40 ; CPU:$CD00 PRG:0D00 20 40 DA - jmp GameModeFrameSync + jmp GameModeFrameSync ; CPU:$CD03 PRG:0D03 4C A7 CA ;============================================================================== @@ -4017,141 +3820,141 @@ GameModeState06: ;============================================================================== GameModeState08: - lda $87 - bne @ActivePhase + lda $87 ; CPU:$CD06 PRG:0D06 A5 87 + bne @ActivePhase ; CPU:$CD08 PRG:0D08 D0 23 - dec $DB - bne @InitialFrameUpdates + dec $DB ; CPU:$CD0A PRG:0D0A C6 DB + bne @InitialFrameUpdates ; CPU:$CD0C PRG:0D0C D0 13 - inc $87 + inc $87 ; CPU:$CD0E PRG:0D0E E6 87 - lda #$0A - sta $DB - sta $0603 + lda #$0A ; CPU:$CD10 PRG:0D10 A9 0A + sta $DB ; CPU:$CD12 PRG:0D12 85 DB + sta $0603 ; CPU:$CD14 PRG:0D14 8D 03 06 - lda #$00 - tax + lda #$00 ; CPU:$CD17 PRG:0D17 A9 00 + tax ; CPU:$CD19 PRG:0D19 AA @ClearLowRamState: - sta $1E,x - inx - cpx #$14 - bne @ClearLowRamState + sta $1E,x ; CPU:$CD1A PRG:0D1A 95 1E + inx ; CPU:$CD1C PRG:0D1C E8 + cpx #$14 ; CPU:$CD1D PRG:0D1D E0 14 + bne @ClearLowRamState ; CPU:$CD1F PRG:0D1F D0 F9 @InitialFrameUpdates: - jsr UpdatePeriodicFourEntryState - jsr UpdateEntitySpriteStates - jsr $DA40 + jsr UpdatePeriodicFourEntryState ; CPU:$CD21 PRG:0D21 20 5E DE + jsr UpdateEntitySpriteStates ; CPU:$CD24 PRG:0D24 20 CC D9 + jsr $DA40 ; CPU:$CD27 PRG:0D27 20 40 DA - jmp GameModeFrameSync + jmp GameModeFrameSync ; CPU:$CD2A PRG:0D2A 4C A7 CA @ActivePhase: - dec $DB - bpl @ActiveFrameUpdates + dec $DB ; CPU:$CD2D PRG:0D2D C6 DB + bpl @ActiveFrameUpdates ; CPU:$CD2F PRG:0D2F 10 0F - lda #$0A - sta $DB + lda #$0A ; CPU:$CD31 PRG:0D31 A9 0A + sta $DB ; CPU:$CD33 PRG:0D33 85 DB - lda $32 - clc - adc #$01 - sta $32 + lda $32 ; CPU:$CD35 PRG:0D35 A5 32 + clc ; CPU:$CD37 PRG:0D37 18 + adc #$01 ; CPU:$CD38 PRG:0D38 69 01 + sta $32 ; CPU:$CD3A PRG:0D3A 85 32 - cmp #$1E - beq @PhaseComplete + cmp #$1E ; CPU:$CD3C PRG:0D3C C9 1E + beq @PhaseComplete ; CPU:$CD3E PRG:0D3E F0 09 @ActiveFrameUpdates: - jsr UpdatePeriodicFourEntryState - jsr $DA40 + jsr UpdatePeriodicFourEntryState ; CPU:$CD40 PRG:0D40 20 5E DE + jsr $DA40 ; CPU:$CD43 PRG:0D43 20 40 DA - jmp GameModeFrameSync + jmp GameModeFrameSync ; CPU:$CD46 PRG:0D46 4C A7 CA @PhaseComplete: - lda $48 - bne @SinglePlayerRestart + lda $48 ; CPU:$CD49 PRG:0D49 A5 48 + bne @SinglePlayerRestart ; CPU:$CD4B PRG:0D4B D0 3C - dec $67 - bne @ContinuePlayerHandling + dec $67 ; CPU:$CD4D PRG:0D4D C6 67 + bne @ContinuePlayerHandling ; CPU:$CD4F PRG:0D4F D0 0D - lda #$00 - sta $87 - sta $69 + lda #$00 ; CPU:$CD51 PRG:0D51 A9 00 + sta $87 ; CPU:$CD53 PRG:0D53 85 87 + sta $69 ; CPU:$CD55 PRG:0D55 85 69 - lda #$0A - sta $3F + lda #$0A ; CPU:$CD57 PRG:0D57 A9 0A + sta $3F ; CPU:$CD59 PRG:0D59 85 3F - jmp GameModeFrameSync + jmp GameModeFrameSync ; CPU:$CD5B PRG:0D5B 4C A7 CA @ContinuePlayerHandling: - lda #$00 - sta $3F + lda #$00 ; CPU:$CD5E PRG:0D5E A9 00 + sta $3F ; CPU:$CD60 PRG:0D60 85 3F - lda #$01 - sta $69 + lda #$01 ; CPU:$CD62 PRG:0D62 A9 01 + sta $69 ; CPU:$CD64 PRG:0D64 85 69 - lda $47 - beq @CheckPrimaryBlock + lda $47 ; CPU:$CD66 PRG:0D66 A5 47 + beq @CheckPrimaryBlock ; CPU:$CD68 PRG:0D68 F0 04 - lda $77 - bne @SwapBlocksAndToggle + lda $77 ; CPU:$CD6A PRG:0D6A A5 77 + bne @SwapBlocksAndToggle ; CPU:$CD6C PRG:0D6C D0 26 @CheckPrimaryBlock: - lda $67 - bne $CDAD + lda $67 ; CPU:$CD6E PRG:0D6E A5 67 + bne $CDAD ; CPU:$CD70 PRG:0D70 D0 3B - sta $69 + sta $69 ; CPU:$CD72 PRG:0D72 85 69 - lda $46 - beq @SinglePlayerRestart + lda $46 ; CPU:$CD74 PRG:0D74 A5 46 + beq @SinglePlayerRestart ; CPU:$CD76 PRG:0D76 F0 11 - ldx #$0F + ldx #$0F ; CPU:$CD78 PRG:0D78 A2 0F @SwapBlocksForMainEntry: - lda $67,x - sta $00 + lda $67,x ; CPU:$CD7A PRG:0D7A B5 67 + sta $00 ; CPU:$CD7C PRG:0D7C 85 00 - lda $77,x - sta $67,x + lda $77,x ; CPU:$CD7E PRG:0D7E B5 77 + sta $67,x ; CPU:$CD80 PRG:0D80 95 67 - lda $00 - sta $77,x + lda $00 ; CPU:$CD82 PRG:0D82 A5 00 + sta $77,x ; CPU:$CD84 PRG:0D84 95 77 - dex - bpl @SwapBlocksForMainEntry + dex ; CPU:$CD86 PRG:0D86 CA + bpl @SwapBlocksForMainEntry ; CPU:$CD87 PRG:0D87 10 F1 @SinglePlayerRestart: - lda #$00 - sta $46 + lda #$00 ; CPU:$CD89 PRG:0D89 A9 00 + sta $46 ; CPU:$CD8B PRG:0D8B 85 46 - lda #$00 - sta $3F + lda #$00 ; CPU:$CD8D PRG:0D8D A9 00 + sta $3F ; CPU:$CD8F PRG:0D8F 85 3F - jmp MainEntry + jmp MainEntry ; CPU:$CD91 PRG:0D91 4C E7 C1 @SwapBlocksAndToggle: - ldx #$0F + ldx #$0F ; CPU:$CD94 PRG:0D94 A2 0F @SwapBlocks: - lda $67,x - sta $00 + lda $67,x ; CPU:$CD96 PRG:0D96 B5 67 + sta $00 ; CPU:$CD98 PRG:0D98 85 00 - lda $77,x - sta $67,x + lda $77,x ; CPU:$CD9A PRG:0D9A B5 77 + sta $67,x ; CPU:$CD9C PRG:0D9C 95 67 - lda $00 - sta $77,x + lda $00 ; CPU:$CD9E PRG:0D9E A5 00 + sta $77,x ; CPU:$CDA0 PRG:0DA0 95 77 - dex - bpl @SwapBlocks + dex ; CPU:$CDA2 PRG:0DA2 CA + bpl @SwapBlocks ; CPU:$CDA3 PRG:0DA3 10 F1 - inc $46 + inc $46 ; CPU:$CDA5 PRG:0DA5 E6 46 - lda $46 - and #$01 - sta $46 + lda $46 ; CPU:$CDA7 PRG:0DA7 A5 46 + and #$01 ; CPU:$CDA9 PRG:0DA9 29 01 + sta $46 ; CPU:$CDAB PRG:0DAB 85 46 - jmp GameModeFrameSync + jmp GameModeFrameSync ; CPU:$CDAD PRG:0DAD 4C A7 CA ;============================================================================== @@ -4192,95 +3995,95 @@ GameModeState08: ;============================================================================== GameModeState0C: - lda $87 - bne @TimedPhase + lda $87 ; CPU:$CDB0 PRG:0DB0 A5 87 + bne @TimedPhase ; CPU:$CDB2 PRG:0DB2 D0 11 - ldx #$00 + ldx #$00 ; CPU:$CDB4 PRG:0DB4 A2 00 @ClearLowRam: - sta $1E,x - inx - cpx #$14 - bne @ClearLowRam + sta $1E,x ; CPU:$CDB6 PRG:0DB6 95 1E + inx ; CPU:$CDB8 PRG:0DB8 E8 + cpx #$14 ; CPU:$CDB9 PRG:0DB9 E0 14 + bne @ClearLowRam ; CPU:$CDBB PRG:0DBB D0 F9 - inc $87 + inc $87 ; CPU:$CDBD PRG:0DBD E6 87 - lda #$01 - sta $32 + lda #$01 ; CPU:$CDBF PRG:0DBF A9 01 + sta $32 ; CPU:$CDC1 PRG:0DC1 85 32 - bne @RunFrameUpdates + bne @RunFrameUpdates ; CPU:$CDC3 PRG:0DC3 D0 51 @TimedPhase: - lda $4B - and #$07 - bne @RunFrameUpdates + lda $4B ; CPU:$CDC5 PRG:0DC5 A5 4B + and #$07 ; CPU:$CDC7 PRG:0DC7 29 07 + bne @RunFrameUpdates ; CPU:$CDC9 PRG:0DC9 D0 4B - ldx #$11 + ldx #$11 ; CPU:$CDCB PRG:0DCB A2 11 - lda $87 - and #$01 - bne @SetPaletteValue + lda $87 ; CPU:$CDCD PRG:0DCD A5 87 + and #$01 ; CPU:$CDCF PRG:0DCF 29 01 + bne @SetPaletteValue ; CPU:$CDD1 PRG:0DD1 D0 02 - ldx #$20 + ldx #$20 ; CPU:$CDD3 PRG:0DD3 A2 20 @SetPaletteValue: - stx $029E + stx $029E ; CPU:$CDD5 PRG:0DD5 8E 9E 02 - lda #$0F - sta $0299 + lda #$0F ; CPU:$CDD8 PRG:0DD8 A9 0F + sta $0299 ; CPU:$CDDA PRG:0DDA 8D 99 02 - inc $87 + inc $87 ; CPU:$CDDD PRG:0DDD E6 87 - lda #$10 - cmp $87 - bne @RunFrameUpdates + lda #$10 ; CPU:$CDDF PRG:0DDF A9 10 + cmp $87 ; CPU:$CDE1 PRG:0DE1 C5 87 + bne @RunFrameUpdates ; CPU:$CDE3 PRG:0DE3 D0 31 - lda #$00 - sta $1A - sta $1C - sta $87 + lda #$00 ; CPU:$CDE5 PRG:0DE5 A9 00 + sta $1A ; CPU:$CDE7 PRG:0DE7 85 1A + sta $1C ; CPU:$CDE9 PRG:0DE9 85 1C + sta $87 ; CPU:$CDEB PRG:0DEB 85 87 - lda $68 - cmp #$01 - beq @SelectState0E + lda $68 ; CPU:$CDED PRG:0DED A5 68 + cmp #$01 ; CPU:$CDEF PRG:0DEF C9 01 + beq @SelectState0E ; CPU:$CDF1 PRG:0DF1 F0 18 - inc $87 - inc $87 + inc $87 ; CPU:$CDF3 PRG:0DF3 E6 87 + inc $87 ; CPU:$CDF5 PRG:0DF5 E6 87 - cmp #$04 - beq @SelectState0E + cmp #$04 ; CPU:$CDF7 PRG:0DF7 C9 04 + beq @SelectState0E ; CPU:$CDF9 PRG:0DF9 F0 10 - inc $87 - inc $87 + inc $87 ; CPU:$CDFB PRG:0DFB E6 87 + inc $87 ; CPU:$CDFD PRG:0DFD E6 87 - cmp #$08 - beq @SelectState0E + cmp #$08 ; CPU:$CDFF PRG:0DFF C9 08 + beq @SelectState0E ; CPU:$CE01 PRG:0E01 F0 08 - cmp #$0C - beq @SelectState0E + cmp #$0C ; CPU:$CE03 PRG:0E03 C9 0C + beq @SelectState0E ; CPU:$CE05 PRG:0E05 F0 04 - cmp #$10 - bne @SelectState00 + cmp #$10 ; CPU:$CE07 PRG:0E07 C9 10 + bne @SelectState00 ; CPU:$CE09 PRG:0E09 D0 07 @SelectState0E: - lda #$0E - sta $3F + lda #$0E ; CPU:$CE0B PRG:0E0B A9 0E + sta $3F ; CPU:$CE0D PRG:0E0D 85 3F - jmp @RunFrameUpdates + jmp @RunFrameUpdates ; CPU:$CE0F PRG:0E0F 4C 16 CE @SelectState00: - lda #$00 - sta $3F + lda #$00 ; CPU:$CE12 PRG:0E12 A9 00 + sta $3F ; CPU:$CE14 PRG:0E14 85 3F @RunFrameUpdates: - jsr UpdatePeriodicFourEntryState - jsr $DA40 + jsr UpdatePeriodicFourEntryState ; CPU:$CE16 PRG:0E16 20 5E DE + jsr $DA40 ; CPU:$CE19 PRG:0E19 20 40 DA - jmp GameModeFrameSync + jmp GameModeFrameSync ; CPU:$CE1C PRG:0E1C 4C A7 CA ;============================================================================== @@ -4326,140 +4129,140 @@ GameModeState0C: ;============================================================================== GameModeState0A: - lda $87 - beq @Initialize + lda $87 ; CPU:$CE1F PRG:0E1F A5 87 + beq @Initialize ; CPU:$CE21 PRG:0E21 F0 03 - jmp $CEAA + jmp $CEAA ; CPU:$CE23 PRG:0E23 4C AA CE @Initialize: - ldy #$00 + ldy #$00 ; CPU:$CE26 PRG:0E26 A0 00 - lda #$FF + lda #$FF ; CPU:$CE28 PRG:0E28 A9 FF @FillPage07Prefix: - sta $0700,y - iny - cpy #$60 - bne @FillPage07Prefix + sta $0700,y ; CPU:$CE2A PRG:0E2A 99 00 07 + iny ; CPU:$CE2D PRG:0E2D C8 + cpy #$60 ; CPU:$CE2E PRG:0E2E C0 60 + bne @FillPage07Prefix ; CPU:$CE30 PRG:0E30 D0 F8 - lda #$60 - sta $00 + lda #$60 ; CPU:$CE32 PRG:0E32 A9 60 + sta $00 ; CPU:$CE34 PRG:0E34 85 00 - lda #$07 - sta $01 + lda #$07 ; CPU:$CE36 PRG:0E36 A9 07 + sta $01 ; CPU:$CE38 PRG:0E38 85 01 - lda #$03 - sta $04 + lda #$03 ; CPU:$CE3A PRG:0E3A A9 03 + sta $04 ; CPU:$CE3C PRG:0E3C 85 04 - ldy #$00 - sty $05 - sty $06 - sty $07 + ldy #$00 ; CPU:$CE3E PRG:0E3E A0 00 + sty $05 ; CPU:$CE40 PRG:0E40 84 05 + sty $06 ; CPU:$CE42 PRG:0E42 84 06 + sty $07 ; CPU:$CE44 PRG:0E44 84 07 @BuildOuterLoop: - ldx $06 + ldx $06 ; CPU:$CE46 PRG:0E46 A6 06 - lda State0AParameterPairs,x - sta $02 + lda State0AParameterPairs,x ; CPU:$CE48 PRG:0E48 BD E7 CE + sta $02 ; CPU:$CE4B PRG:0E4B 85 02 - lda State0AParameterPairs+1,x - sta $03 + lda State0AParameterPairs+1,x ; CPU:$CE4D PRG:0E4D BD E8 CE + sta $03 ; CPU:$CE50 PRG:0E50 85 03 - ldx $07 + ldx $07 ; CPU:$CE52 PRG:0E52 A6 07 - lda State0AEntryCounts,x - sta $08 + lda State0AEntryCounts,x ; CPU:$CE54 PRG:0E54 BD EF CE + sta $08 ; CPU:$CE57 PRG:0E57 85 08 @BuildInnerLoop: - lda $03 - sta ($00),y + lda $03 ; CPU:$CE59 PRG:0E59 A5 03 + sta ($00),y ; CPU:$CE5B PRG:0E5B 91 00 - ldx $05 + ldx $05 ; CPU:$CE5D PRG:0E5D A6 05 - lda State0AValueTableA,x - iny - sta ($00),y + lda State0AValueTableA,x ; CPU:$CE5F PRG:0E5F BD BF CE + iny ; CPU:$CE62 PRG:0E62 C8 + sta ($00),y ; CPU:$CE63 PRG:0E63 91 00 - lda State0AValueTableB,x - iny - sta ($00),y + lda State0AValueTableB,x ; CPU:$CE65 PRG:0E65 BD D3 CE + iny ; CPU:$CE68 PRG:0E68 C8 + sta ($00),y ; CPU:$CE69 PRG:0E69 91 00 - lda $02 - iny - sta ($00),y + lda $02 ; CPU:$CE6B PRG:0E6B A5 02 + iny ; CPU:$CE6D PRG:0E6D C8 + sta ($00),y ; CPU:$CE6E PRG:0E6E 91 00 - lda $02 - clc - adc #$08 - sta $02 + lda $02 ; CPU:$CE70 PRG:0E70 A5 02 + clc ; CPU:$CE72 PRG:0E72 18 + adc #$08 ; CPU:$CE73 PRG:0E73 69 08 + sta $02 ; CPU:$CE75 PRG:0E75 85 02 - iny - inc $05 + iny ; CPU:$CE77 PRG:0E77 C8 + inc $05 ; CPU:$CE78 PRG:0E78 E6 05 - dec $08 - bne @BuildInnerLoop + dec $08 ; CPU:$CE7A PRG:0E7A C6 08 + bne @BuildInnerLoop ; CPU:$CE7C PRG:0E7C D0 DB - inc $06 - inc $06 + inc $06 ; CPU:$CE7E PRG:0E7E E6 06 + inc $06 ; CPU:$CE80 PRG:0E80 E6 06 - inc $07 + inc $07 ; CPU:$CE82 PRG:0E82 E6 07 - lda $47 - beq @ContinueOuterPass + lda $47 ; CPU:$CE84 PRG:0E84 A5 47 + beq @ContinueOuterPass ; CPU:$CE86 PRG:0E86 F0 0A - lda $77 - bne @ContinueOuterPass + lda $77 ; CPU:$CE88 PRG:0E88 A5 77 + bne @ContinueOuterPass ; CPU:$CE8A PRG:0E8A D0 06 - lda $04 - cmp #$02 - beq $CEAA + lda $04 ; CPU:$CE8C PRG:0E8C A5 04 + cmp #$02 ; CPU:$CE8E PRG:0E8E C9 02 + beq $CEAA ; CPU:$CE90 PRG:0E90 F0 18 @ContinueOuterPass: - dec $04 - beq @CheckPlayerMode + dec $04 ; CPU:$CE92 PRG:0E92 C6 04 + beq @CheckPlayerMode ; CPU:$CE94 PRG:0E94 F0 04 - bpl @BuildOuterLoop - bmi @FinishInitialization + bpl @BuildOuterLoop ; CPU:$CE96 PRG:0E96 10 AE + bmi @FinishInitialization ; CPU:$CE98 PRG:0E98 30 10 @CheckPlayerMode: - lda $47 - beq @FinishInitialization + lda $47 ; CPU:$CE9A PRG:0E9A A5 47 + beq @FinishInitialization ; CPU:$CE9C PRG:0E9C F0 0C - lda $46 - beq @BuildOuterLoop + lda $46 ; CPU:$CE9E PRG:0E9E A5 46 + beq @BuildOuterLoop ; CPU:$CEA0 PRG:0EA0 F0 A4 @AdjustTableIndex: - inc $05 - inc $05 - inc $05 + inc $05 ; CPU:$CEA2 PRG:0EA2 E6 05 + inc $05 ; CPU:$CEA4 PRG:0EA4 E6 05 + inc $05 ; CPU:$CEA6 PRG:0EA6 E6 05 - bne @BuildOuterLoop + bne @BuildOuterLoop ; CPU:$CEA8 PRG:0EA8 D0 9C @FinishInitialization: - inc $87 - bne @ReturnToFrameLoop + inc $87 ; CPU:$CEAA PRG:0EAA E6 87 + bne @ReturnToFrameLoop ; CPU:$CEAC PRG:0EAC D0 0E @PostInitialization: - lda #$00 - tay + lda #$00 ; CPU:$CEAE PRG:0EAE A9 00 + tay ; CPU:$CEB0 PRG:0EB0 A8 @ClearPage07Region: - sta $0760,y - iny - cpy #$A0 - bne @ClearPage07Region + sta $0760,y ; CPU:$CEB1 PRG:0EB1 99 60 07 + iny ; CPU:$CEB4 PRG:0EB4 C8 + cpy #$A0 ; CPU:$CEB5 PRG:0EB5 C0 A0 + bne @ClearPage07Region ; CPU:$CEB7 PRG:0EB7 D0 F8 - jmp $CD5E + jmp $CD5E ; CPU:$CEB9 PRG:0EB9 4C 5E CD @ReturnToFrameLoop: - jmp GameModeFrameSync + jmp GameModeFrameSync ; CPU:$CEBC PRG:0EBC 4C A7 CA ;============================================================================== @@ -4479,9 +4282,9 @@ GameModeState0A: ;------------------------------------------------------------------------------ State0AValueTableA: - .byte $BC,$B2,$BD,$B4,$B6,$BE,$B4,$B5 - .byte $B0,$B1,$B2,$B3,$B4,$B5,$B6,$B7 - .byte $B4,$B8,$B9,$B6 + .byte $BC,$B2,$BD,$B4,$B6,$BE,$B4,$B5 ; CPU:$CEBF PRG:0EBF BC B2 BD B4 B6 BE B4 B5 + .byte $B0,$B1,$B2,$B3,$B4,$B5,$B6,$B7 ; CPU:$CEC7 PRG:0EC7 B0 B1 B2 B3 B4 B5 B6 B7 + .byte $B4,$B8,$B9,$B6 ; CPU:$CECF PRG:0ECF B4 B8 B9 B6 ;------------------------------------------------------------------------------ ; $CED3-$CEE6: Secondary value table @@ -4489,9 +4292,9 @@ State0AValueTableA: ;------------------------------------------------------------------------------ State0AValueTableB: - .byte $00,$00,$00,$00,$00,$00,$00,$00 - .byte $02,$02,$02,$02,$02,$02,$02,$02 - .byte $02,$02,$02,$02 + .byte $00,$00,$00,$00,$00,$00,$00,$00 ; CPU:$CED3 PRG:0ED3 00 00 00 00 00 00 00 00 + .byte $02,$02,$02,$02,$02,$02,$02,$02 ; CPU:$CEDB PRG:0EDB 02 02 02 02 02 02 02 02 + .byte $02,$02,$02,$02 ; CPU:$CEE3 PRG:0EE3 02 02 02 02 ;------------------------------------------------------------------------------ ; $CEE7-$CEEE: Parameter-pair table @@ -4500,17 +4303,17 @@ State0AValueTableB: ;------------------------------------------------------------------------------ State0AParameterPairs: - .byte $38,$88 - .byte $60,$88 - .byte $44,$60 - .byte $50,$70 + .byte $38,$88 ; CPU:$CEE7 PRG:0EE7 38 88 + .byte $60,$88 ; CPU:$CEE9 PRG:0EE9 60 88 + .byte $44,$60 ; CPU:$CEEB PRG:0EEB 44 60 + .byte $50,$70 ; CPU:$CEED PRG:0EED 50 70 ;------------------------------------------------------------------------------ ; $CEEF-$CEF2: Inner-loop entry counts ;------------------------------------------------------------------------------ State0AEntryCounts: - .byte $04,$04,$06,$03 + .byte $04,$04,$06,$03 ; CPU:$CEEF PRG:0EEF 04 04 06 03 ;============================================================================== ; $CEF3-$D0AA: Game-Mode State $00 Initialization @@ -4539,347 +4342,347 @@ State0AEntryCounts: ;============================================================================== GameModeState00: - lda #$01 - sta $40 + lda #$01 ; CPU:$CEF3 PRG:0EF3 A9 01 + sta $40 ; CPU:$CEF5 PRG:0EF5 85 40 @WaitForNmi: - lda $40 - bne @WaitForNmi + lda $40 ; CPU:$CEF7 PRG:0EF7 A5 40 + bne @WaitForNmi ; CPU:$CEF9 PRG:0EF9 D0 FC - lda #$08 - sta PPUCTRL - sta $43 + lda #$08 ; CPU:$CEFB PRG:0EFB A9 08 + sta PPUCTRL ; CPU:$CEFD PRG:0EFD 8D 00 20 + sta $43 ; CPU:$CF00 PRG:0F00 85 43 - lda #$00 - sta PPUMASK + lda #$00 ; CPU:$CF02 PRG:0F02 A9 00 + sta PPUMASK ; CPU:$CF04 PRG:0F04 8D 01 20 - ldx #$00 + ldx #$00 ; CPU:$CF07 PRG:0F07 A2 00 @ClearWorkingRam: - sta $87,x - inx - cpx #$69 - bne @ClearWorkingRam + sta $87,x ; CPU:$CF09 PRG:0F09 95 87 + inx ; CPU:$CF0B PRG:0F0B E8 + cpx #$69 ; CPU:$CF0C PRG:0F0C E0 69 + bne @ClearWorkingRam ; CPU:$CF0E PRG:0F0E D0 F9 - tax + tax ; CPU:$CF10 PRG:0F10 AA @ClearPage07: - sta $0700,x - inx - bne @ClearPage07 + sta $0700,x ; CPU:$CF11 PRG:0F11 9D 00 07 + inx ; CPU:$CF14 PRG:0F14 E8 + bne @ClearPage07 ; CPU:$CF15 PRG:0F15 D0 FA - ldy #$00 + ldy #$00 ; CPU:$CF17 PRG:0F17 A0 00 @LoadPalette: - lda GameplayPaletteData,y - sta $0299,y - iny - cpy #$20 - bne @LoadPalette + lda GameplayPaletteData,y ; CPU:$CF19 PRG:0F19 B9 11 D1 + sta $0299,y ; CPU:$CF1C PRG:0F1C 99 99 02 + iny ; CPU:$CF1F PRG:0F1F C8 + cpy #$20 ; CPU:$CF20 PRG:0F20 C0 20 + bne @LoadPalette ; CPU:$CF22 PRG:0F22 D0 F5 - lda #$02 - sta $3F + lda #$02 ; CPU:$CF24 PRG:0F24 A9 02 + sta $3F ; CPU:$CF26 PRG:0F26 85 3F - lda $69 - bne $CF4A + lda $69 ; CPU:$CF28 PRG:0F28 A5 69 + bne $CF4A ; CPU:$CF2A PRG:0F2A D0 1E - sta $8B + sta $8B ; CPU:$CF2C PRG:0F2C 85 8B - lda #$01 - sta $6C - sta $6D - sta $6E - sta $6F + lda #$01 ; CPU:$CF2E PRG:0F2E A9 01 + sta $6C ; CPU:$CF30 PRG:0F30 85 6C + sta $6D ; CPU:$CF32 PRG:0F32 85 6D + sta $6E ; CPU:$CF34 PRG:0F34 85 6E + sta $6F ; CPU:$CF36 PRG:0F36 85 6F - lda #$C0 - sta $6A + lda #$C0 ; CPU:$CF38 PRG:0F38 A9 C0 + sta $6A ; CPU:$CF3A PRG:0F3A 85 6A - lda $68 - cmp #$16 - beq @SkipIncrement68 + lda $68 ; CPU:$CF3C PRG:0F3C A5 68 + cmp #$16 ; CPU:$CF3E PRG:0F3E C9 16 + beq @SkipIncrement68 ; CPU:$CF40 PRG:0F40 F0 02 - inc $68 + inc $68 ; CPU:$CF42 PRG:0F42 E6 68 @SkipIncrement68: - jsr InitializeGameplayAttributes - jsr DrawMazeNametable - jsr DrawGameplayScoreFields - jsr InitializeGameNametableRegion - jsr DrawLevelProgressMarkers - jsr $E5C1 - jsr DrawGameplayHudLabels + jsr InitializeGameplayAttributes ; CPU:$CF44 PRG:0F44 20 31 D1 + jsr DrawMazeNametable ; CPU:$CF47 PRG:0F47 20 E2 E2 + jsr DrawGameplayScoreFields ; CPU:$CF4A PRG:0F4A 20 FF E3 + jsr InitializeGameNametableRegion ; CPU:$CF4D PRG:0F4D 20 AB D0 + jsr DrawLevelProgressMarkers ; CPU:$CF50 PRG:0F50 20 53 E5 + jsr $E5C1 ; CPU:$CF53 PRG:0F53 20 C1 E5 + jsr DrawGameplayHudLabels ; CPU:$CF56 PRG:0F56 20 02 E5 @ContinueSetup: - ldx $68 + ldx $68 ; CPU:$CF59 PRG:0F59 A6 68 - lda #$00 - clc + lda #$00 ; CPU:$CF5B PRG:0F5B A9 00 + clc ; CPU:$CF5D PRG:0F5D 18 @MultiplyBy6: - dex - bmi @MultiplyBy6Done + dex ; CPU:$CF5E PRG:0F5E CA + bmi @MultiplyBy6Done ; CPU:$CF5F PRG:0F5F 30 04 - adc #$06 - bne @MultiplyBy6 + adc #$06 ; CPU:$CF61 PRG:0F61 69 06 + bne @MultiplyBy6 ; CPU:$CF63 PRG:0F63 D0 F9 @MultiplyBy6Done: - sta $00 - tax + sta $00 ; CPU:$CF65 PRG:0F65 85 00 + tax ; CPU:$CF67 PRG:0F67 AA - lda $EBB6,x - tax + lda $EBB6,x ; CPU:$CF68 PRG:0F68 BD B6 EB + tax ; CPU:$CF6B PRG:0F6B AA - lda #$00 - clc + lda #$00 ; CPU:$CF6C PRG:0F6C A9 00 + clc ; CPU:$CF6E PRG:0F6E 18 @MultiplyBy22: - dex - bmi @MultiplyBy22Done + dex ; CPU:$CF6F PRG:0F6F CA + bmi @MultiplyBy22Done ; CPU:$CF70 PRG:0F70 30 04 - adc #$16 - bne @MultiplyBy22 + adc #$16 ; CPU:$CF72 PRG:0F72 69 16 + bne @MultiplyBy22 ; CPU:$CF74 PRG:0F74 D0 F9 @MultiplyBy22Done: - tay + tay ; CPU:$CF76 PRG:0F76 A8 - ldx #$00 + ldx #$00 ; CPU:$CF77 PRG:0F77 A2 00 @CopyGameParameters: - lda $EC40,y - sta $9F,x - inx - iny - cpx #$16 - bne @CopyGameParameters + lda $EC40,y ; CPU:$CF79 PRG:0F79 B9 40 EC + sta $9F,x ; CPU:$CF7C PRG:0F7C 95 9F + inx ; CPU:$CF7E PRG:0F7E E8 + iny ; CPU:$CF7F PRG:0F7F C8 + cpx #$16 ; CPU:$CF80 PRG:0F80 E0 16 + bne @CopyGameParameters ; CPU:$CF82 PRG:0F82 D0 F5 - ldx $00 + ldx $00 ; CPU:$CF84 PRG:0F84 A6 00 - lda $EBB6,x - asl - asl - asl - tax + lda $EBB6,x ; CPU:$CF86 PRG:0F86 BD B6 EB + asl ; CPU:$CF89 PRG:0F89 0A + asl ; CPU:$CF8A PRG:0F8A 0A + asl ; CPU:$CF8B PRG:0F8B 0A + tax ; CPU:$CF8C PRG:0F8C AA - ldy #$00 - sty $D0 + ldy #$00 ; CPU:$CF8D PRG:0F8D A0 00 + sty $D0 ; CPU:$CF8F PRG:0F8F 84 D0 ; Save the first selected table value separately. - lda $ECAE,x - sta $CF + lda $ECAE,x ; CPU:$CF91 PRG:0F91 BD AE EC + sta $CF ; CPU:$CF94 PRG:0F94 85 CF @CopyTableECae: - lda $ECAE,x - sta $0097,y + lda $ECAE,x ; CPU:$CF96 PRG:0F96 BD AE EC + sta $0097,y ; CPU:$CF99 PRG:0F99 99 97 00 - inx - iny - cpy #$08 - bne @CopyTableECae + inx ; CPU:$CF9C PRG:0F9C E8 + iny ; CPU:$CF9D PRG:0F9D C8 + cpy #$08 ; CPU:$CF9E PRG:0F9E C0 08 + bne @CopyTableECae ; CPU:$CFA0 PRG:0FA0 D0 F4 - inc $00 + inc $00 ; CPU:$CFA2 PRG:0FA2 E6 00 - ldx $00 - lda $EBB6,x - sta $8C + ldx $00 ; CPU:$CFA4 PRG:0FA4 A6 00 + lda $EBB6,x ; CPU:$CFA6 PRG:0FA6 BD B6 EB + sta $8C ; CPU:$CFA9 PRG:0FA9 85 8C - inc $00 + inc $00 ; CPU:$CFAB PRG:0FAB E6 00 - ldx $00 - lda $EBB6,x - asl - tax + ldx $00 ; CPU:$CFAD PRG:0FAD A6 00 + lda $EBB6,x ; CPU:$CFAF PRG:0FAF BD B6 EB + asl ; CPU:$CFB2 PRG:0FB2 0A + tax ; CPU:$CFB3 PRG:0FB3 AA - lda $ECCE,x - sta $8D - inx - lda $ECCE,x - sta $8E + lda $ECCE,x ; CPU:$CFB4 PRG:0FB4 BD CE EC + sta $8D ; CPU:$CFB7 PRG:0FB7 85 8D + inx ; CPU:$CFB9 PRG:0FB9 E8 + lda $ECCE,x ; CPU:$CFBA PRG:0FBA BD CE EC + sta $8E ; CPU:$CFBD PRG:0FBD 85 8E - inc $00 + inc $00 ; CPU:$CFBF PRG:0FBF E6 00 - lda $69 - beq @UseAlternateData + lda $69 ; CPU:$CFC1 PRG:0FC1 A5 69 + beq @UseAlternateData ; CPU:$CFC3 PRG:0FC3 F0 24 - ldx #$0C - ldy #$00 + ldx #$0C ; CPU:$CFC5 PRG:0FC5 A2 0C + ldy #$00 ; CPU:$CFC7 PRG:0FC7 A0 00 - lda $ECDC,x - sta $008F,y + lda $ECDC,x ; CPU:$CFC9 PRG:0FC9 BD DC EC + sta $008F,y ; CPU:$CFCC PRG:0FCC 99 8F 00 - iny - inx + iny ; CPU:$CFCF PRG:0FCF C8 + inx ; CPU:$CFD0 PRG:0FD0 E8 - lda #$C0 - sec - sbc $6A - sta $01 + lda #$C0 ; CPU:$CFD1 PRG:0FD1 A9 C0 + sec ; CPU:$CFD3 PRG:0FD3 38 + sbc $6A ; CPU:$CFD4 PRG:0FD4 E5 6A + sta $01 ; CPU:$CFD6 PRG:0FD6 85 01 @CopyOffsetData: - lda $01 - clc - adc $ECDC,x - sta $008F,y + lda $01 ; CPU:$CFD8 PRG:0FD8 A5 01 + clc ; CPU:$CFDA PRG:0FDA 18 + adc $ECDC,x ; CPU:$CFDB PRG:0FDB 7D DC EC + sta $008F,y ; CPU:$CFDE PRG:0FDE 99 8F 00 - iny - inx + iny ; CPU:$CFE1 PRG:0FE1 C8 + inx ; CPU:$CFE2 PRG:0FE2 E8 - cpy #$04 - bne @CopyOffsetData + cpy #$04 ; CPU:$CFE3 PRG:0FE3 C0 04 + bne @CopyOffsetData ; CPU:$CFE5 PRG:0FE5 D0 F1 - beq @InitializeArray + beq @InitializeArray ; CPU:$CFE7 PRG:0FE7 F0 16 @UseAlternateData: - ldx $00 + ldx $00 ; CPU:$CFE9 PRG:0FE9 A6 00 - lda $EBB6,x - asl - asl - tax + lda $EBB6,x ; CPU:$CFEB PRG:0FEB BD B6 EB + asl ; CPU:$CFEE PRG:0FEE 0A + asl ; CPU:$CFEF PRG:0FEF 0A + tax ; CPU:$CFF0 PRG:0FF0 AA - ldy #$00 + ldy #$00 ; CPU:$CFF1 PRG:0FF1 A0 00 @CopyAlternateData: - lda $ECDC,x - sta $008F,y + lda $ECDC,x ; CPU:$CFF3 PRG:0FF3 BD DC EC + sta $008F,y ; CPU:$CFF6 PRG:0FF6 99 8F 00 - inx - iny - cpy #$04 - bne @CopyAlternateData + inx ; CPU:$CFF9 PRG:0FF9 E8 + iny ; CPU:$CFFA PRG:0FFA C8 + cpy #$04 ; CPU:$CFFB PRG:0FFB C0 04 + bne @CopyAlternateData ; CPU:$CFFD PRG:0FFD D0 F4 @InitializeArray: - lda #$04 - sta $B8 + lda #$04 ; CPU:$CFFF PRG:0FFF A9 04 + sta $B8 ; CPU:$D001 PRG:1001 85 B8 - lda #$01 - sta $B9 + lda #$01 ; CPU:$D003 PRG:1003 A9 01 + sta $B9 ; CPU:$D005 PRG:1005 85 B9 - lda $8F - sta $01 + lda $8F ; CPU:$D007 PRG:1007 A5 8F + sta $01 ; CPU:$D009 PRG:1009 85 01 - ldx #$00 + ldx #$00 ; CPU:$D00B PRG:100B A2 00 @InitializeArrayLoop: - dec $01 - beq @InitializeArrayTail + dec $01 ; CPU:$D00D PRG:100D C6 01 + beq @InitializeArrayTail ; CPU:$D00F PRG:100F F0 0C - lda #$02 - sta $BA,x + lda #$02 ; CPU:$D011 PRG:1011 A9 02 + sta $BA,x ; CPU:$D013 PRG:1013 95 BA - lda #$00 - sta $BB,x + lda #$00 ; CPU:$D015 PRG:1015 A9 00 + sta $BB,x ; CPU:$D017 PRG:1017 95 BB - inx - inx - bne @InitializeArrayLoop + inx ; CPU:$D019 PRG:1019 E8 + inx ; CPU:$D01A PRG:101A E8 + bne @InitializeArrayLoop ; CPU:$D01B PRG:101B D0 F0 @InitializeArrayTail: - lda #$00 + lda #$00 ; CPU:$D01D PRG:101D A9 00 @ClearRemainingArray: - cpx #$06 - beq @ContinueFinalSetup + cpx #$06 ; CPU:$D01F PRG:101F E0 06 + beq @ContinueFinalSetup ; CPU:$D021 PRG:1021 F0 08 - sta $BA,x - sta $BB,x + sta $BA,x ; CPU:$D023 PRG:1023 95 BA + sta $BB,x ; CPU:$D025 PRG:1025 95 BB - inx - inx - bne @ClearRemainingArray + inx ; CPU:$D027 PRG:1027 E8 + inx ; CPU:$D028 PRG:1028 E8 + bne @ClearRemainingArray ; CPU:$D029 PRG:1029 D0 F4 @ContinueFinalSetup: - lda $90 - sta $D3 + lda $90 ; CPU:$D02B PRG:102B A5 90 + sta $D3 ; CPU:$D02D PRG:102D 85 D3 - inc $00 + inc $00 ; CPU:$D02F PRG:102F E6 00 - ldx $00 - lda $EBB6,x - sta $93 + ldx $00 ; CPU:$D031 PRG:1031 A6 00 + lda $EBB6,x ; CPU:$D033 PRG:1033 BD B6 EB + sta $93 ; CPU:$D036 PRG:1036 85 93 - inc $00 + inc $00 ; CPU:$D038 PRG:1038 E6 00 - ldx $00 - lda $EBB6,x - sta $96 + ldx $00 ; CPU:$D03A PRG:103A A6 00 + lda $EBB6,x ; CPU:$D03C PRG:103C BD B6 EB + sta $96 ; CPU:$D03F PRG:103F 85 96 - lda $A5 - sta $B5 + lda $A5 ; CPU:$D041 PRG:1041 A5 A5 + sta $B5 ; CPU:$D043 PRG:1043 85 B5 - lda $A6 - sta $B6 + lda $A6 ; CPU:$D045 PRG:1045 A5 A6 + sta $B6 ; CPU:$D047 PRG:1047 85 B6 - lda $AF - sta $C4 - sta $C6 - sta $C8 - sta $CA + lda $AF ; CPU:$D049 PRG:1049 A5 AF + sta $C4 ; CPU:$D04B PRG:104B 85 C4 + sta $C6 ; CPU:$D04D PRG:104D 85 C6 + sta $C8 ; CPU:$D04F PRG:104F 85 C8 + sta $CA ; CPU:$D051 PRG:1051 85 CA - lda $B0 - sta $C5 - sta $C7 - sta $C9 - sta $CB + lda $B0 ; CPU:$D053 PRG:1053 A5 B0 + sta $C5 ; CPU:$D055 PRG:1055 85 C5 + sta $C7 ; CPU:$D057 PRG:1057 85 C7 + sta $C9 ; CPU:$D059 PRG:1059 85 C9 + sta $CB ; CPU:$D05B PRG:105B 85 CB - lda #$01 - sta $50 - sta $51 + lda #$01 ; CPU:$D05D PRG:105D A9 01 + sta $50 ; CPU:$D05F PRG:105F 85 50 + sta $51 ; CPU:$D061 PRG:1061 85 51 - ldy #$00 - ldx #$00 + ldy #$00 ; CPU:$D063 PRG:1063 A0 00 + ldx #$00 ; CPU:$D065 PRG:1065 A2 00 - lda $46 - and $47 - beq @CopyDisplayInit + lda $46 ; CPU:$D067 PRG:1067 A5 46 + and $47 ; CPU:$D069 PRG:1069 25 47 + beq @CopyDisplayInit ; CPU:$D06B PRG:106B F0 02 - ldy #$09 + ldy #$09 ; CPU:$D06D PRG:106D A0 09 @CopyDisplayInit: - lda GameDisplayInitialData,y - sta $026B,x + lda GameDisplayInitialData,y ; CPU:$D06F PRG:106F B9 FF D0 + sta $026B,x ; CPU:$D072 PRG:1072 9D 6B 02 - iny - inx - cpx #$09 - bne @CopyDisplayInit + iny ; CPU:$D075 PRG:1075 C8 + inx ; CPU:$D076 PRG:1076 E8 + cpx #$09 ; CPU:$D077 PRG:1077 E0 09 + bne @CopyDisplayInit ; CPU:$D079 PRG:1079 D0 F4 - ldy #$00 + ldy #$00 ; CPU:$D07B PRG:107B A0 00 @CopyStateData: - lda GameStateInitialValues,y - sta $0032,y - iny - cpy #$0C - bne @CopyStateData + lda GameStateInitialValues,y ; CPU:$D07D PRG:107D B9 F3 D0 + sta $0032,y ; CPU:$D080 PRG:1080 99 32 00 + iny ; CPU:$D083 PRG:1083 C8 + cpy #$0C ; CPU:$D084 PRG:1084 C0 0C + bne @CopyStateData ; CPU:$D086 PRG:1086 D0 F5 - ldy #$00 + ldy #$00 ; CPU:$D088 PRG:1088 A0 00 @NormalizeValues: - lda $006C,y - cmp #$02 - bne @NextNormalizeValue + lda $006C,y ; CPU:$D08A PRG:108A B9 6C 00 + cmp #$02 ; CPU:$D08D PRG:108D C9 02 + bne @NextNormalizeValue ; CPU:$D08F PRG:108F D0 05 - lda #$01 - sta $006C,y + lda #$01 ; CPU:$D091 PRG:1091 A9 01 + sta $006C,y ; CPU:$D093 PRG:1093 99 6C 00 @NextNormalizeValue: - iny - cpy #$04 - bne @NormalizeValues + iny ; CPU:$D096 PRG:1096 C8 + cpy #$04 ; CPU:$D097 PRG:1097 C0 04 + bne @NormalizeValues ; CPU:$D099 PRG:1099 D0 EF - sty $C0 + sty $C0 ; CPU:$D09B PRG:109B 84 C0 - lda #$FF - sta $89 + lda #$FF ; CPU:$D09D PRG:109D A9 FF + sta $89 ; CPU:$D09F PRG:109F 85 89 - lda #$88 - sta PPUCTRL - sta $43 + lda #$88 ; CPU:$D0A1 PRG:10A1 A9 88 + sta PPUCTRL ; CPU:$D0A3 PRG:10A3 8D 00 20 + sta $43 ; CPU:$D0A6 PRG:10A6 85 43 - jmp GameModeFrameSync + jmp GameModeFrameSync ; CPU:$D0A8 PRG:10A8 4C A7 CA ;============================================================================== ; $D0AB-$D0F2: Initialize/Clear Repeated Nametable Region @@ -4912,61 +4715,61 @@ GameModeState00: ;============================================================================== InitializeGameNametableRegion: - ldy #$22 + ldy #$22 ; CPU:$D0AB PRG:10AB A0 22 - lda $46 - and $47 - beq @SetDestination + lda $46 ; CPU:$D0AD PRG:10AD A5 46 + and $47 ; CPU:$D0AF PRG:10AF 25 47 + beq @SetDestination ; CPU:$D0B1 PRG:10B1 F0 02 - ldy #$2A + ldy #$2A ; CPU:$D0B3 PRG:10B3 A0 2A @SetDestination: - sty $00 + sty $00 ; CPU:$D0B5 PRG:10B5 84 00 - lda #$56 - sta $01 + lda #$56 ; CPU:$D0B7 PRG:10B7 A9 56 + sta $01 ; CPU:$D0B9 PRG:10B9 85 01 - lda #$0A - sta $02 + lda #$0A ; CPU:$D0BB PRG:10BB A9 0A + sta $02 ; CPU:$D0BD PRG:10BD 85 02 @NextRow: - lda PPUSTATUS + lda PPUSTATUS ; CPU:$D0BF PRG:10BF AD 02 20 - lda $00 - sta PPUADDR + lda $00 ; CPU:$D0C2 PRG:10C2 A5 00 + sta PPUADDR ; CPU:$D0C4 PRG:10C4 8D 06 20 - lda $01 - sta PPUADDR + lda $01 ; CPU:$D0C7 PRG:10C7 A5 01 + sta PPUADDR ; CPU:$D0C9 PRG:10C9 8D 06 20 - lda #$06 - sta $03 + lda #$06 ; CPU:$D0CC PRG:10CC A9 06 + sta $03 ; CPU:$D0CE PRG:10CE 85 03 - lda #$20 + lda #$20 ; CPU:$D0D0 PRG:10D0 A9 20 @WriteInterior: - sta PPUDATA + sta PPUDATA ; CPU:$D0D2 PRG:10D2 8D 07 20 - dec $03 - bne @WriteInterior + dec $03 ; CPU:$D0D5 PRG:10D5 C6 03 + bne @WriteInterior ; CPU:$D0D7 PRG:10D7 D0 F9 - lda #$2D - sta PPUDATA - sta PPUDATA + lda #$2D ; CPU:$D0D9 PRG:10D9 A9 2D + sta PPUDATA ; CPU:$D0DB PRG:10DB 8D 07 20 + sta PPUDATA ; CPU:$D0DE PRG:10DE 8D 07 20 ; Advance the destination by one full nametable row ($20 bytes). - lda $01 - clc - adc #$20 - sta $01 + lda $01 ; CPU:$D0E1 PRG:10E1 A5 01 + clc ; CPU:$D0E3 PRG:10E3 18 + adc #$20 ; CPU:$D0E4 PRG:10E4 69 20 + sta $01 ; CPU:$D0E6 PRG:10E6 85 01 - lda $00 - adc #$00 - sta $00 + lda $00 ; CPU:$D0E8 PRG:10E8 A5 00 + adc #$00 ; CPU:$D0EA PRG:10EA 69 00 + sta $00 ; CPU:$D0EC PRG:10EC 85 00 - dec $02 - bne @NextRow + dec $02 ; CPU:$D0EE PRG:10EE C6 02 + bne @NextRow ; CPU:$D0F0 PRG:10F0 D0 CD - rts + rts ; CPU:$D0F2 PRG:10F2 60 ;============================================================================== ; $D0F3-$D130: Game-Mode State $00 Initialization Data @@ -5008,9 +4811,9 @@ InitializeGameNametableRegion: ;============================================================================== GameStateInitialValues: - .byte $04,$0C,$0A,$0A - .byte $0A,$00,$00,$00 - .byte $01,$02,$03,$00 + .byte $04,$0C,$0A,$0A ; CPU:$D0F3 PRG:10F3 04 0C 0A 0A + .byte $0A,$00,$00,$00 ; CPU:$D0F7 PRG:10F7 0A 00 00 00 + .byte $01,$02,$03,$00 ; CPU:$D0FB PRG:10FB 01 02 03 00 ;============================================================================== @@ -5034,11 +4837,11 @@ GameDisplayInitialData: ; Record 0, selected when ($46 & $47) == 0. ; $D0FF-$D107 - .byte $21,$36,$20,$F7,$B0,$B3,$B2,$20,$B6 + .byte $21,$36,$20,$F7,$B0,$B3,$B2,$20,$B6 ; CPU:$D0FF PRG:10FF 21 36 20 F7 B0 B3 B2 20 B6 ; Record 1, selected when ($46 & $47) != 0. ; $D108-$D110 - .byte $29,$B6,$29,$77,$B1,$B3,$B2,$28,$B6 + .byte $29,$B6,$29,$77,$B1,$B3,$B2,$28,$B6 ; CPU:$D108 PRG:1108 29 B6 29 77 B1 B3 B2 28 B6 ;============================================================================== @@ -5061,28 +4864,28 @@ GameDisplayInitialData: ;============================================================================== GameplayPaletteData: ; Background palette 0 - .byte $0F,$20,$0F,$06 + .byte $0F,$20,$0F,$06 ; CPU:$D111 PRG:1111 0F 20 0F 06 ; Background palette 1 - .byte $0F,$11,$0F,$27 + .byte $0F,$11,$0F,$27 ; CPU:$D115 PRG:1115 0F 11 0F 27 ; Background palette 2 - .byte $0F,$16,$26,$06 + .byte $0F,$16,$26,$06 ; CPU:$D119 PRG:1119 0F 16 26 06 ; Background palette 3 - .byte $0F,$19,$17,$12 + .byte $0F,$19,$17,$12 ; CPU:$D11D PRG:111D 0F 19 17 12 ; Sprite palette 0 - .byte $0F,$27,$20,$06 + .byte $0F,$27,$20,$06 ; CPU:$D121 PRG:1121 0F 27 20 06 ; Sprite palette 1 - .byte $0F,$11,$20,$33 + .byte $0F,$11,$20,$33 ; CPU:$D125 PRG:1125 0F 11 20 33 ; Sprite palette 2 - .byte $0F,$21,$20,$21 + .byte $0F,$21,$20,$21 ; CPU:$D129 PRG:1129 0F 21 20 21 ; Sprite palette 3 - .byte $0F,$09,$20,$17 + .byte $0F,$09,$20,$17 ; CPU:$D12D PRG:112D 0F 09 20 17 ;============================================================================== ; $D131-$D15F: Initialize Gameplay Nametable Attributes @@ -5113,42 +4916,42 @@ GameplayPaletteData: ;============================================================================== InitializeGameplayAttributes: - lda PPUSTATUS + lda PPUSTATUS ; CPU:$D131 PRG:1131 AD 02 20 - lda #$23 - sta PPUADDR + lda #$23 ; CPU:$D134 PRG:1134 A9 23 + sta PPUADDR ; CPU:$D136 PRG:1136 8D 06 20 - lda #$C0 - sta PPUADDR + lda #$C0 ; CPU:$D139 PRG:1139 A9 C0 + sta PPUADDR ; CPU:$D13B PRG:113B 8D 06 20 - ldx #$01 + ldx #$01 ; CPU:$D13E PRG:113E A2 01 @CopyAttributeTable: - ldy #$00 + ldy #$00 ; CPU:$D140 PRG:1140 A0 00 @CopyAttributeBytes: - lda GameplayAttributeData,y - sta PPUDATA + lda GameplayAttributeData,y ; CPU:$D142 PRG:1142 B9 60 D1 + sta PPUDATA ; CPU:$D145 PRG:1145 8D 07 20 - iny - cpy #$40 - bne @CopyAttributeBytes + iny ; CPU:$D148 PRG:1148 C8 + cpy #$40 ; CPU:$D149 PRG:1149 C0 40 + bne @CopyAttributeBytes ; CPU:$D14B PRG:114B D0 F5 - dex - beq @SetupSecondNametable + dex ; CPU:$D14D PRG:114D CA + beq @SetupSecondNametable ; CPU:$D14E PRG:114E F0 01 - rts + rts ; CPU:$D150 PRG:1150 60 @SetupSecondNametable: - lda PPUSTATUS + lda PPUSTATUS ; CPU:$D151 PRG:1151 AD 02 20 - lda #$2B - sta PPUADDR + lda #$2B ; CPU:$D154 PRG:1154 A9 2B + sta PPUADDR ; CPU:$D156 PRG:1156 8D 06 20 - lda #$C0 - sta PPUADDR + lda #$C0 ; CPU:$D159 PRG:1159 A9 C0 + sta PPUADDR ; CPU:$D15B PRG:115B 8D 06 20 - bne @CopyAttributeTable + bne @CopyAttributeTable ; CPU:$D15E PRG:115E D0 E0 ;============================================================================== ; $D160-$D19F: Gameplay Nametable Attribute Data @@ -5171,14 +4974,14 @@ InitializeGameplayAttributes: ;============================================================================== GameplayAttributeData: - .byte $55,$55,$55,$55,$55,$11,$00,$00 - .byte $55,$55,$55,$55,$55,$11,$00,$00 - .byte $55,$55,$55,$55,$55,$11,$00,$00 - .byte $55,$55,$55,$55,$55,$51,$50,$50 - .byte $55,$55,$55,$55,$55,$11,$05,$05 - .byte $55,$55,$55,$55,$55,$11,$00,$00 - .byte $55,$55,$55,$55,$55,$55,$55,$55 - .byte $55,$55,$55,$55,$55,$55,$55,$55 + .byte $55,$55,$55,$55,$55,$11,$00,$00 ; CPU:$D160 PRG:1160 55 55 55 55 55 11 00 00 + .byte $55,$55,$55,$55,$55,$11,$00,$00 ; CPU:$D168 PRG:1168 55 55 55 55 55 11 00 00 + .byte $55,$55,$55,$55,$55,$11,$00,$00 ; CPU:$D170 PRG:1170 55 55 55 55 55 11 00 00 + .byte $55,$55,$55,$55,$55,$51,$50,$50 ; CPU:$D178 PRG:1178 55 55 55 55 55 51 50 50 + .byte $55,$55,$55,$55,$55,$11,$05,$05 ; CPU:$D180 PRG:1180 55 55 55 55 55 11 05 05 + .byte $55,$55,$55,$55,$55,$11,$00,$00 ; CPU:$D188 PRG:1188 55 55 55 55 55 11 00 00 + .byte $55,$55,$55,$55,$55,$55,$55,$55 ; CPU:$D190 PRG:1190 55 55 55 55 55 55 55 55 + .byte $55,$55,$55,$55,$55,$55,$55,$55 ; CPU:$D198 PRG:1198 55 55 55 55 55 55 55 55 ;============================================================================== ; $D1A0-$D289: Gameplay Timers and State Progression @@ -5197,205 +5000,205 @@ GameplayAttributeData: ;============================================================================== UpdateGameplayTimers: - lda $89 - bmi @D1E1 + lda $89 ; CPU:$D1A0 PRG:11A0 A5 89 + bmi @D1E1 ; CPU:$D1A2 PRG:11A2 30 3C - inc $8A + inc $8A ; CPU:$D1A4 PRG:11A4 E6 8A - lda #$3C - cmp $8A - bne @D1C9 + lda #$3C ; CPU:$D1A6 PRG:11A6 A9 3C + cmp $8A ; CPU:$D1A8 PRG:11A8 C5 8A + bne @D1C9 ; CPU:$D1AA PRG:11AA D0 1C - lda #$00 - sta $8A + lda #$00 ; CPU:$D1AC PRG:11AC A9 00 + sta $8A ; CPU:$D1AE PRG:11AE 85 8A - dec $89 - bpl @D1C9 + dec $89 ; CPU:$D1B0 PRG:11B0 C6 89 + bpl @D1C9 ; CPU:$D1B2 PRG:11B2 10 14 - sta $88 + sta $88 ; CPU:$D1B4 PRG:11B4 85 88 - ldx #$00 + ldx #$00 ; CPU:$D1B6 PRG:11B6 A2 00 @D1B7: - lda $39,x - and #$FC - sta $00 + lda $39,x ; CPU:$D1B8 PRG:11B8 B5 39 + and #$FC ; CPU:$D1BA PRG:11BA 29 FC + sta $00 ; CPU:$D1BC PRG:11BC 85 00 - txa - ora $00 - sta $39,x + txa ; CPU:$D1BE PRG:11BE 8A + ora $00 ; CPU:$D1BF PRG:11BF 05 00 + sta $39,x ; CPU:$D1C1 PRG:11C1 95 39 - inx - cpx #$04 - bne @D1B7 + inx ; CPU:$D1C3 PRG:11C3 E8 + cpx #$04 ; CPU:$D1C4 PRG:11C4 E0 04 + bne @D1B7 ; CPU:$D1C6 PRG:11C6 D0 F0 @D1C9: - lda $89 - cmp #$02 - bcs @D1E1 + lda $89 ; CPU:$D1C8 PRG:11C8 A5 89 + cmp #$02 ; CPU:$D1CA PRG:11CA C9 02 + bcs @D1E1 ; CPU:$D1CC PRG:11CC B0 12 - ldx #$11 + ldx #$11 ; CPU:$D1CE PRG:11CE A2 11 - lda $8A - and #$08 - bne @D1D9 + lda $8A ; CPU:$D1D0 PRG:11D0 A5 8A + and #$08 ; CPU:$D1D2 PRG:11D2 29 08 + bne @D1D9 ; CPU:$D1D4 PRG:11D4 D0 02 - ldx #$20 + ldx #$20 ; CPU:$D1D6 PRG:11D6 A2 20 @D1D9: - stx $02AE + stx $02AE ; CPU:$D1D8 PRG:11D8 8E AE 02 - lda #$0F - sta $02A9 + lda #$0F ; CPU:$D1DB PRG:11DB A9 0F + sta $02A9 ; CPU:$D1DD PRG:11DD 8D A9 02 @D1E1: - lda $88 - bne @D213 + lda $88 ; CPU:$D1E0 PRG:11E0 A5 88 + bne @D213 ; CPU:$D1E2 PRG:11E2 D0 2F - lda $CF - cmp #$FF - beq @D213 + lda $CF ; CPU:$D1E4 PRG:11E4 A5 CF + cmp #$FF ; CPU:$D1E6 PRG:11E6 C9 FF + beq @D213 ; CPU:$D1E8 PRG:11E8 F0 29 - inc $D1 + inc $D1 ; CPU:$D1EA PRG:11EA E6 D1 - lda $D1 - cmp #$3C - bne @D213 + lda $D1 ; CPU:$D1EC PRG:11EC A5 D1 + cmp #$3C ; CPU:$D1EE PRG:11EE C9 3C + bne @D213 ; CPU:$D1F0 PRG:11F0 D0 21 - lda #$00 - sta $D1 + lda #$00 ; CPU:$D1F2 PRG:11F2 A9 00 + sta $D1 ; CPU:$D1F4 PRG:11F4 85 D1 - dec $CF - bpl @D213 + dec $CF ; CPU:$D1F6 PRG:11F6 C6 CF + bpl @D213 ; CPU:$D1F8 PRG:11F8 10 19 - inc $D0 + inc $D0 ; CPU:$D1FA PRG:11FA E6 D0 - lda $D0 - and #$01 - beq @D209 + lda $D0 ; CPU:$D1FC PRG:11FC A5 D0 + and #$01 ; CPU:$D1FE PRG:11FE 29 01 + beq @D209 ; CPU:$D200 PRG:1200 F0 07 - jsr $E08E + jsr $E08E ; CPU:$D202 PRG:1202 20 8E E0 - lda #$0F - bne @D20B + lda #$0F ; CPU:$D205 PRG:1205 A9 0F + bne @D20B ; CPU:$D207 PRG:1207 D0 02 @D209: - lda $D2 + lda $D2 ; CPU:$D209 PRG:1209 A5 D2 @D20B: - sta $87 + sta $87 ; CPU:$D20B PRG:120B 85 87 - ldx $D0 - lda $97,x - sta $CF + ldx $D0 ; CPU:$D20D PRG:120D A6 D0 + lda $97,x ; CPU:$D20F PRG:120F B5 97 + sta $CF ; CPU:$D211 PRG:1211 85 CF @D213: - lda $D3 - beq @D236 + lda $D3 ; CPU:$D213 PRG:1213 A5 D3 + beq @D236 ; CPU:$D215 PRG:1215 F0 1F - clc - adc $6A - cmp #$C0 - bne @D236 + clc ; CPU:$D217 PRG:1217 18 + adc $6A ; CPU:$D218 PRG:1218 65 6A + cmp #$C0 ; CPU:$D21A PRG:121A C9 C0 + bne @D236 ; CPU:$D21C PRG:121C D0 18 - jsr ActivateNextStateEntry + jsr ActivateNextStateEntry ; CPU:$D21E PRG:121E 20 8A D2 - lda $D3 - ldx #$00 + lda $D3 ; CPU:$D221 PRG:1221 A5 D3 + ldx #$00 ; CPU:$D223 PRG:1223 A2 00 @D225: - cmp $8F,x - bne @D231 + cmp $8F,x ; CPU:$D225 PRG:1225 D5 8F + bne @D231 ; CPU:$D227 PRG:1227 D0 08 - inx - lda $8F,x - sta $D3 + inx ; CPU:$D229 PRG:1229 E8 + lda $8F,x ; CPU:$D22A PRG:122A B5 8F + sta $D3 ; CPU:$D22C PRG:122C 85 D3 - jmp @D236 + jmp @D236 ; CPU:$D22E PRG:122E 4C 36 D2 @D231: - inx - cpx #$04 - bne @D225 + inx ; CPU:$D231 PRG:1231 E8 + cpx #$04 ; CPU:$D232 PRG:1232 E0 04 + bne @D225 ; CPU:$D234 PRG:1234 D0 EF @D236: - inc $D6 + inc $D6 ; CPU:$D236 PRG:1236 E6 D6 - lda #$60 - cmp $D6 - bne @D251 + lda #$60 ; CPU:$D238 PRG:1238 A9 60 + cmp $D6 ; CPU:$D23A PRG:123A C5 D6 + bne @D251 ; CPU:$D23C PRG:123C D0 13 - lda #$00 - sta $D6 + lda #$00 ; CPU:$D23E PRG:123E A9 00 + sta $D6 ; CPU:$D240 PRG:1240 85 D6 - inc $D5 + inc $D5 ; CPU:$D242 PRG:1242 E6 D5 - lda $D5 - cmp $96 - bne @D251 + lda $D5 ; CPU:$D244 PRG:1244 A5 D5 + cmp $96 ; CPU:$D246 PRG:1246 C5 96 + bne @D251 ; CPU:$D248 PRG:1248 D0 07 - lda #$00 - sta $D5 + lda #$00 ; CPU:$D24A PRG:124A A9 00 + sta $D5 ; CPU:$D24C PRG:124C 85 D5 - jsr ActivateNextStateEntry + jsr ActivateNextStateEntry ; CPU:$D24E PRG:124E 20 8A D2 @D251: - ldx $D4 + ldx $D4 ; CPU:$D251 PRG:1251 A6 D4 - cpx #$02 - beq @D26E + cpx #$02 ; CPU:$D253 PRG:1253 E0 02 + beq @D26E ; CPU:$D255 PRG:1255 F0 17 - lda $8D,x - cmp $6A - bne @D26E + lda $8D,x ; CPU:$D257 PRG:1257 B5 8D + cmp $6A ; CPU:$D259 PRG:1259 C5 6A + bne @D26E ; CPU:$D25B PRG:125B D0 11 - inc $D4 + inc $D4 ; CPU:$D25D PRG:125D E6 D4 - lda #$01 - sta $D2 + lda #$01 ; CPU:$D25F PRG:125F A9 01 + sta $D2 ; CPU:$D261 PRG:1261 85 D2 - txa - asl - tax + txa ; CPU:$D263 PRG:1263 8A + asl ; CPU:$D264 PRG:1264 0A + tax ; CPU:$D265 PRG:1265 AA - lda $AB,x - sta $CA + lda $AB,x ; CPU:$D266 PRG:1266 B5 AB + sta $CA ; CPU:$D268 PRG:1268 85 CA - lda $AC,x - sta $CB + lda $AC,x ; CPU:$D26A PRG:126A B5 AC + sta $CB ; CPU:$D26C PRG:126C 85 CB @D26E: - ora $D7 - ora $D8 - beq @D289 + ora $D7 ; CPU:$D26E PRG:126E 05 D7 + ora $D8 ; CPU:$D270 PRG:1270 05 D8 + beq @D289 ; CPU:$D272 PRG:1272 F0 15 - dec $D8 - bne @D289 + dec $D8 ; CPU:$D274 PRG:1274 C6 D8 + bne @D289 ; CPU:$D276 PRG:1276 D0 11 - lda $D7 - beq @D283 + lda $D7 ; CPU:$D278 PRG:1278 A5 D7 + beq @D283 ; CPU:$D27A PRG:127A F0 07 - dec $D7 + dec $D7 ; CPU:$D27C PRG:127C C6 D7 - lda #$3C - sta $D8 + lda #$3C ; CPU:$D27E PRG:127E A9 3C + sta $D8 ; CPU:$D280 PRG:1280 85 D8 - rts + rts ; CPU:$D282 PRG:1282 60 @D283: - sta $2E - sta $30 - sta $8B + sta $2E ; CPU:$D283 PRG:1283 85 2E + sta $30 ; CPU:$D285 PRG:1285 85 30 + sta $8B ; CPU:$D287 PRG:1287 85 8B @D289: - rts + rts ; CPU:$D289 PRG:1289 60 ;============================================================================== ; $D28A-$D29B: Activate First Available State Entry @@ -5421,25 +5224,25 @@ UpdateGameplayTimers: ; $BA-$BF are decoded. ;============================================================================== ActivateNextStateEntry: - ldx #$00 + ldx #$00 ; CPU:$D28A PRG:128A A2 00 @FindAvailableEntry: - lda $BA,x - bne @NextEntry + lda $BA,x ; CPU:$D28C PRG:128C B5 BA + bne @NextEntry ; CPU:$D28E PRG:128E D0 05 - lda #$02 - sta $BA,x + lda #$02 ; CPU:$D290 PRG:1290 A9 02 + sta $BA,x ; CPU:$D292 PRG:1292 95 BA - rts + rts ; CPU:$D294 PRG:1294 60 @NextEntry: - inx - inx + inx ; CPU:$D295 PRG:1295 E8 + inx ; CPU:$D296 PRG:1296 E8 - cpx #$06 - bne @FindAvailableEntry + cpx #$06 ; CPU:$D297 PRG:1297 E0 06 + bne @FindAvailableEntry ; CPU:$D299 PRG:1299 D0 F1 - rts + rts ; CPU:$D29B PRG:129B 60 ;============================================================================== ; $D29C-$D2A3: Sequential Tile/Value Table @@ -5458,7 +5261,7 @@ ActivateNextStateEntry: ;============================================================================== SequentialValueTableD29C: - .byte $24,$25,$26,$27,$28,$29,$2A,$2B + .byte $24,$25,$26,$27,$28,$29,$2A,$2B ; CPU:$D29C PRG:129C 24 25 26 27 28 29 2A 2B @@ -5489,128 +5292,128 @@ SequentialValueTableD29C: ; Lookup tables begin at ProximityCandidateValues and will be decoded separately. ;============================================================================== CheckGameplayProximity: - lda $6A - bne @Start + lda $6A ; CPU:$D2A4 PRG:12A4 A5 6A + bne @Start ; CPU:$D2A6 PRG:12A6 D0 01 - rts + rts ; CPU:$D2A8 PRG:12A8 60 @Start: - lda #$1E - sta $00 + lda #$1E ; CPU:$D2A9 PRG:12A9 A9 1E + sta $00 ; CPU:$D2AB PRG:12AB 85 00 - lda #$00 - sta $01 + lda #$00 ; CPU:$D2AD PRG:12AD A9 00 + sta $01 ; CPU:$D2AF PRG:12AF 85 01 - lda #$01 - sta $02 + lda #$01 ; CPU:$D2B1 PRG:12B1 A9 01 + sta $02 ; CPU:$D2B3 PRG:12B3 85 02 - ldx #$00 + ldx #$00 ; CPU:$D2B5 PRG:12B5 A2 00 @ScanEntries: - lda $B8,x - cmp #$04 - bne @NextEntry + lda $B8,x ; CPU:$D2B7 PRG:12B7 B5 B8 + cmp #$04 ; CPU:$D2B9 PRG:12B9 C9 04 + bne @NextEntry ; CPU:$D2BB PRG:12BB D0 32 - ldy #$00 + ldy #$00 ; CPU:$D2BD PRG:12BD A0 00 - lda $1A - cmp ($00),y - bcs @FirstAxisReverse + lda $1A ; CPU:$D2BF PRG:12BF A5 1A + cmp ($00),y ; CPU:$D2C1 PRG:12C1 D1 00 + bcs @FirstAxisReverse ; CPU:$D2C3 PRG:12C3 B0 07 - lda ($00),y - sec - sbc $1A - bcs @CheckFirstAxisDistance + lda ($00),y ; CPU:$D2C5 PRG:12C5 B1 00 + sec ; CPU:$D2C7 PRG:12C7 38 + sbc $1A ; CPU:$D2C8 PRG:12C8 E5 1A + bcs @CheckFirstAxisDistance ; CPU:$D2CA PRG:12CA B0 02 @FirstAxisReverse: - sbc ($00),y + sbc ($00),y ; CPU:$D2CC PRG:12CC F1 00 @CheckFirstAxisDistance: - cmp #$0A - bcs @NextEntry + cmp #$0A ; CPU:$D2CE PRG:12CE C9 0A + bcs @NextEntry ; CPU:$D2D0 PRG:12D0 B0 1D - sta $03 + sta $03 ; CPU:$D2D2 PRG:12D2 85 03 - ldy #$02 + ldy #$02 ; CPU:$D2D4 PRG:12D4 A0 02 - lda $1C - cmp ($00),y - bcs @SecondAxisReverse + lda $1C ; CPU:$D2D6 PRG:12D6 A5 1C + cmp ($00),y ; CPU:$D2D8 PRG:12D8 D1 00 + bcs @SecondAxisReverse ; CPU:$D2DA PRG:12DA B0 07 - lda ($00),y - sec - sbc $1C - bcs @CheckSecondAxisDistance + lda ($00),y ; CPU:$D2DC PRG:12DC B1 00 + sec ; CPU:$D2DE PRG:12DE 38 + sbc $1C ; CPU:$D2DF PRG:12DF E5 1C + bcs @CheckSecondAxisDistance ; CPU:$D2E1 PRG:12E1 B0 02 @SecondAxisReverse: - sbc ($00),y + sbc ($00),y ; CPU:$D2E3 PRG:12E3 F1 00 @CheckSecondAxisDistance: - cmp #$0A - bcs @NextEntry + cmp #$0A ; CPU:$D2E5 PRG:12E5 C9 0A + bcs @NextEntry ; CPU:$D2E7 PRG:12E7 B0 06 - adc $03 - cmp #$05 - bcc @CandidateFound + adc $03 ; CPU:$D2E9 PRG:12E9 65 03 + cmp #$05 ; CPU:$D2EB PRG:12EB C9 05 + bcc @CandidateFound ; CPU:$D2ED PRG:12ED 90 10 @NextEntry: - inx - inx + inx ; CPU:$D2EF PRG:12EF E8 + inx ; CPU:$D2F0 PRG:12F0 E8 - lda $00 - clc - adc #$04 - sta $00 + lda $00 ; CPU:$D2F1 PRG:12F1 A5 00 + clc ; CPU:$D2F3 PRG:12F3 18 + adc #$04 ; CPU:$D2F4 PRG:12F4 69 04 + sta $00 ; CPU:$D2F6 PRG:12F6 85 00 - asl $02 + asl $02 ; CPU:$D2F8 PRG:12F8 06 - cpx #$0A - bne @ScanEntries + cpx #$0A ; CPU:$D2F9 PRG:12F9 02 E0 + bne @ScanEntries ; CPU:$D2FB PRG:12FB 0A D0 - rts + rts ; CPU:$D2FD PRG:12FD B9 @CandidateFound: - cpx #$08 - beq @ProcessSecondaryState + cpx #$08 ; CPU:$D2FE PRG:12FE 60 E0 + beq @ProcessSecondaryState ; CPU:$D300 PRG:1300 08 F0 - lda $02 - and $88 - beq @SpecialCandidate + lda $02 ; CPU:$D302 PRG:1302 45 A5 + and $88 ; CPU:$D304 PRG:1304 02 25 + beq @SpecialCandidate ; CPU:$D306 PRG:1306 88 F0 - txa - lsr - sta $03 + txa ; CPU:$D308 PRG:1308 2E + lsr ; CPU:$D309 PRG:1309 8A + sta $03 ; CPU:$D30A PRG:130A 4A 85 - ldy $D9 + ldy $D9 ; CPU:$D30C PRG:130C 03 A4 - lda ProximityCandidateValues,y + lda ProximityCandidateValues,y ; CPU:$D30E PRG:130E D9 B9 6C - ldy $03 - sta $0033,y + ldy $03 ; CPU:$D311 PRG:1311 D3 A4 + sta $0033,y ; CPU:$D313 PRG:1313 03 99 33 - lda #$00 - sta $32 + lda #$00 ; CPU:$D316 PRG:1316 00 A9 + sta $32 ; CPU:$D318 PRG:1318 00 85 - ldy $D9 + ldy $D9 ; CPU:$D31A PRG:131A 32 A4 - lda ProximityDDValues,y - sta $DD + lda ProximityDDValues,y ; CPU:$D31C PRG:131C D9 B9 7C + sta $DD ; CPU:$D31F PRG:131F D3 85 - lda ProximityDEValues,y - sta $DE + lda ProximityDEValues,y ; CPU:$D321 PRG:1321 DD B9 78 + sta $DE ; CPU:$D324 PRG:1324 D3 85 - inc $D9 + inc $D9 ; CPU:$D326 PRG:1326 DE E6 - lda #$08 - sta $B8,x - sta $0607 + lda #$08 ; CPU:$D328 PRG:1328 D9 A9 + sta $B8,x ; CPU:$D32A PRG:132A 08 95 + sta $0607 ; CPU:$D32C PRG:132C B8 8D 07 - lda #$06 - sta $3F + lda #$06 ; CPU:$D32F PRG:132F 06 A9 + sta $3F ; CPU:$D331 PRG:1331 06 85 - jmp $E0E6 + jmp $E0E6 ; CPU:$D333 PRG:1333 3F 4C E6 ;------------------------------------------------------------------------------ ; $D337 @@ -5618,19 +5421,19 @@ CheckGameplayProximity: ;------------------------------------------------------------------------------ @SpecialCandidate: - lda #$08 - sta $3F + lda #$08 ; CPU:$D336 PRG:1336 E0 A9 + sta $3F ; CPU:$D338 PRG:1338 08 85 - lda #$12 - sta $32 + lda #$12 ; CPU:$D33A PRG:133A 3F A9 + sta $32 ; CPU:$D33C PRG:133C 12 85 - lda #$80 - sta $DB + lda #$80 ; CPU:$D33E PRG:133E 32 A9 + sta $DB ; CPU:$D340 PRG:1340 80 85 - lda #$00 - sta $87 + lda #$00 ; CPU:$D342 PRG:1342 DB A9 + sta $87 ; CPU:$D344 PRG:1344 00 85 - rts + rts ; CPU:$D346 PRG:1346 87 ;------------------------------------------------------------------------------ ; $D348 @@ -5638,35 +5441,35 @@ CheckGameplayProximity: ;------------------------------------------------------------------------------ @ProcessSecondaryState: - lda $8B - beq @InitializeSecondaryState + lda $8B ; CPU:$D347 PRG:1347 60 A5 + beq @InitializeSecondaryState ; CPU:$D349 PRG:1349 8B F0 - rts + rts ; CPU:$D34B PRG:134B 01 ;------------------------------------------------------------------------------ ; $D34D ; Initialize secondary state. ;------------------------------------------------------------------------------ @InitializeSecondaryState: - sta $D7 + sta $D7 ; CPU:$D34C PRG:134C 60 85 - lda #$80 - sta $D8 - sta $8B - sta $0606 + lda #$80 ; CPU:$D34E PRG:134E D7 A9 + sta $D8 ; CPU:$D350 PRG:1350 80 85 + sta $8B ; CPU:$D352 PRG:1352 D8 85 + sta $0606 ; CPU:$D354 PRG:1354 8B 8D 06 - ldy $93 + ldy $93 ; CPU:$D357 PRG:1357 06 A4 - lda SecondaryStateDDValues,y - sta $DD + lda SecondaryStateDDValues,y ; CPU:$D359 PRG:1359 93 B9 80 + sta $DD ; CPU:$D35C PRG:135C D3 85 - lda SecondaryStateDEValues,y - sta $DE + lda SecondaryStateDEValues,y ; CPU:$D35E PRG:135E DD B9 88 + sta $DE ; CPU:$D361 PRG:1361 D3 85 - lda SecondaryState37Values,y - sta $37 + lda SecondaryState37Values,y ; CPU:$D363 PRG:1363 DE B9 70 + sta $37 ; CPU:$D366 PRG:1366 D3 85 - jmp $E0E6 + jmp $E0E6 ; CPU:$D368 PRG:1368 37 4C E6 ;============================================================================== ; $D36C-$D38F: Gameplay Proximity / Transition Lookup Data @@ -5685,33 +5488,33 @@ CheckGameplayProximity: ;============================================================================== ProximityCandidateValues: ; $D36C-$D36F - .byte $2D,$2F,$32,$34 + .byte $2D,$2F,$32,$34 ; CPU:$D36C PRG:136C 2D 2F 32 34 SecondaryState37Values: ; $D370-$D373 ; Also forms bytes 4-7 of ProximityCandidateValues. - .byte $2C,$2E,$30,$31 + .byte $2C,$2E,$30,$31 ; CPU:$D370 PRG:1370 2C 2E 30 31 ;------------------------------------------------------------------------------ ; $D374-$D377 ; Consumer not yet established. ;------------------------------------------------------------------------------ ProximityUnknownTableD374: - .byte $33,$35,$36,$37 + .byte $33,$35,$36,$37 ; CPU:$D374 PRG:1374 33 35 36 37 ;------------------------------------------------------------------------------ ; $D378-$D37B ; Indexed by $D9 and loaded into $DE. ;------------------------------------------------------------------------------ ProximityDEValues: - .byte $00,$00,$00,$01 + .byte $00,$00,$00,$01 ; CPU:$D378 PRG:1378 00 00 00 01 ;------------------------------------------------------------------------------ ; $D37C-$D37F ; Indexed by $D9 and loaded into $DD. ;------------------------------------------------------------------------------ ProximityDDValues: - .byte $02,$04,$08,$06 + .byte $02,$04,$08,$06 ; CPU:$D37C PRG:137C 02 04 08 06 ;------------------------------------------------------------------------------ @@ -5719,8 +5522,8 @@ ProximityDDValues: ; Indexed by $93 and loaded into $DD. ;------------------------------------------------------------------------------ SecondaryStateDDValues: - .byte $01,$03,$05,$07 - .byte $00,$00,$00,$00 + .byte $01,$03,$05,$07 ; CPU:$D380 PRG:1380 01 03 05 07 + .byte $00,$00,$00,$00 ; CPU:$D384 PRG:1384 00 00 00 00 ;------------------------------------------------------------------------------ @@ -5728,8 +5531,8 @@ SecondaryStateDDValues: ; Indexed by $93 and loaded into $DE. ;------------------------------------------------------------------------------ SecondaryStateDEValues: - .byte $00,$00,$00,$00 - .byte $01,$02,$03,$05 + .byte $00,$00,$00,$00 ; CPU:$D388 PRG:1388 00 00 00 00 + .byte $01,$02,$03,$05 ; CPU:$D38C PRG:138C 01 02 03 05 ;============================================================================== ; $D390-...: Gameplay Direction / Movement Processing @@ -5747,111 +5550,111 @@ SecondaryStateDEValues: ;============================================================================== UpdatePlayerMovement: - lda $48 - beq @D397 + lda $48 ; CPU:$D390 PRG:1390 A5 48 + beq @D397 ; CPU:$D392 PRG:1392 F0 03 - jmp $D506 + jmp $D506 ; CPU:$D394 PRG:1394 4C 06 D5 @D397: - lda $4F - and #$F0 - beq @D3D2 + lda $4F ; CPU:$D397 PRG:1397 A5 4F + and #$F0 ; CPU:$D399 PRG:1399 29 F0 + beq @D3D2 ; CPU:$D39B PRG:139B F0 35 - ldx #$FF + ldx #$FF ; CPU:$D39D PRG:139D A2 FF @D39F: - inx - asl - bcc @D39F + inx ; CPU:$D39F PRG:139F E8 + asl ; CPU:$D3A0 PRG:13A0 0A + bcc @D39F ; CPU:$D3A1 PRG:13A1 90 FC - lda InputDirectionTable,x - sta $50 + lda InputDirectionTable,x ; CPU:$D3A3 PRG:13A3 BD 02 D5 + sta $50 ; CPU:$D3A6 PRG:13A6 85 50 - clc - adc #$02 - and #$03 - cmp $51 - bne @D3C9 + clc ; CPU:$D3A8 PRG:13A8 18 + adc #$02 ; CPU:$D3A9 PRG:13A9 69 02 + and #$03 ; CPU:$D3AB PRG:13AB 29 03 + cmp $51 ; CPU:$D3AD PRG:13AD C5 51 + bne @D3C9 ; CPU:$D3AF PRG:13AF D0 18 - lda $1A - ora $1C - and #$07 - bne @D3C2 + lda $1A ; CPU:$D3B1 PRG:13B1 A5 1A + ora $1C ; CPU:$D3B3 PRG:13B3 05 1C + and #$07 ; CPU:$D3B5 PRG:13B5 29 07 + bne @D3C2 ; CPU:$D3B7 PRG:13B7 D0 09 - ldy $50 + ldy $50 ; CPU:$D3B9 PRG:13B9 A4 50 - lda $022B,y - and #$F0 - bne @D3C9 + lda $022B,y ; CPU:$D3BB PRG:13BB B9 2B 02 + and #$F0 ; CPU:$D3BE PRG:13BE 29 F0 + bne @D3C9 ; CPU:$D3C0 PRG:13C0 D0 07 @D3C2: - lda $50 - sta $51 + lda $50 ; CPU:$D3C2 PRG:13C2 A5 50 + sta $51 ; CPU:$D3C4 PRG:13C4 85 51 - jmp @D3D6 + jmp @D3D6 ; CPU:$D3C6 PRG:13C6 4C D6 D3 @D3C9: - ldx $50 + ldx $50 ; CPU:$D3C9 PRG:13C9 A6 50 - lda $022B,x - and #$F0 - beq @D3D6 + lda $022B,x ; CPU:$D3CB PRG:13CB BD 2B 02 + and #$F0 ; CPU:$D3CE PRG:13CE 29 F0 + beq @D3D6 ; CPU:$D3D0 PRG:13D0 F0 04 @D3D2: - lda $51 - sta $50 + lda $51 ; CPU:$D3D2 PRG:13D2 A5 51 + sta $50 ; CPU:$D3D4 PRG:13D4 85 50 @D3D6: - ldx #$04 + ldx #$04 ; CPU:$D3D6 PRG:13D6 A2 04 - lda $88 - bne @D3DE + lda $88 ; CPU:$D3D8 PRG:13D8 A5 88 + bne @D3DE ; CPU:$D3DA PRG:13DA D0 02 - ldx #$0A + ldx #$0A ; CPU:$D3DC PRG:13DC A2 0A @D3DE: - lda $022A - cmp #$01 - beq @D3F4 + lda $022A ; CPU:$D3DE PRG:13DE AD 2A 02 + cmp #$01 ; CPU:$D3E1 PRG:13E1 C9 01 + beq @D3F4 ; CPU:$D3E3 PRG:13E3 F0 10 - cmp #$02 - beq @D3F4 + cmp #$02 ; CPU:$D3E5 PRG:13E5 C9 02 + beq @D3F4 ; CPU:$D3E7 PRG:13E7 F0 0C - dex - dex + dex ; CPU:$D3E9 PRG:13E9 CA + dex ; CPU:$D3EA PRG:13EA CA - cmp #$03 - beq @D3F4 + cmp #$03 ; CPU:$D3EB PRG:13EB C9 03 + beq @D3F4 ; CPU:$D3ED PRG:13ED F0 06 - cmp #$09 - beq @D3F4 + cmp #$09 ; CPU:$D3EF PRG:13EF C9 09 + beq @D3F4 ; CPU:$D3F1 PRG:13F1 F0 02 - dex - dex + dex ; CPU:$D3F3 PRG:13F3 CA + dex ; CPU:$D3F4 PRG:13F4 CA @D3F4: - lda $9F,x - sta $B5 + lda $9F,x ; CPU:$D3F5 PRG:13F5 B5 9F + sta $B5 ; CPU:$D3F7 PRG:13F7 85 B5 - lda $A0,x - sta $B6 + lda $A0,x ; CPU:$D3F9 PRG:13F9 B5 A0 + sta $B6 ; CPU:$D3FB PRG:13FB 85 B6 - lda $51 - asl - tay + lda $51 ; CPU:$D3FD PRG:13FD A5 51 + asl ; CPU:$D3FF PRG:13FF 0A + tay ; CPU:$D400 PRG:1400 A8 - lda MovementArithmeticTable,y - sta $10 + lda MovementArithmeticTable,y ; CPU:$D401 PRG:1401 B9 0E D4 + sta $10 ; CPU:$D404 PRG:1404 85 10 - lda MovementArithmeticTable+1,y - sta $11 + lda MovementArithmeticTable+1,y ; CPU:$D406 PRG:1406 B9 0F D4 + sta $11 ; CPU:$D409 PRG:1409 85 11 - jmp ($0010) + jmp ($0010) ; CPU:$D40B PRG:140B 6C 10 00 16 D4 ;============================================================================== ; $D40E-$D415: Movement Arithmetic Dispatch Table @@ -5867,10 +5670,10 @@ UpdatePlayerMovement: ; Direction semantics remain unnamed during this pass. ;============================================================================== MovementArithmeticTable: - .word $D416 - .word $D41A - .word $D435 - .word $D431 + .word $D416 ; CPU:$D40E PRG:140E 16 D4 + .word $D41A ; CPU:$D410 PRG:1410 1A D4 + .word $D435 ; CPU:$D412 PRG:1412 35 D4 + .word $D431 ; CPU:$D414 PRG:1414 31 D4 ;============================================================================== ; $D416-$D443: Direction-Specific Movement Arithmetic ; @@ -5891,49 +5694,49 @@ MovementArithmeticTable: ;============================================================================== MovementArithmeticD416: - ldx #$02 - bne MovementSubtract + ldx #$02 ; CPU:$D416 PRG:1416 A2 02 + bne MovementSubtract ; CPU:$D418 PRG:1418 D0 02 MovementArithmeticD41A: - ldx #$00 + ldx #$00 ; CPU:$D41A PRG:141A A2 00 MovementSubtract: - lda $1B,x - sec - sbc $B5 - sta $1B,x + lda $1B,x ; CPU:$D41C PRG:141C B5 1B + sec ; CPU:$D41E PRG:141E 38 + sbc $B5 ; CPU:$D41F PRG:141F E5 B5 + sta $1B,x ; CPU:$D421 PRG:1421 95 1B - lda #$00 - bcs MovementSubtractNoBorrow + lda #$00 ; CPU:$D423 PRG:1423 A9 00 + bcs MovementSubtractNoBorrow ; CPU:$D425 PRG:1425 B0 02 - lda #$01 + lda #$01 ; CPU:$D427 PRG:1427 A9 01 MovementSubtractNoBorrow: - clc - adc $B6 - sta $CC + clc ; CPU:$D429 PRG:1429 18 + adc $B6 ; CPU:$D42A PRG:142A 65 B6 + sta $CC ; CPU:$D42C PRG:142C 85 CC - jmp MovementApplyResult + jmp MovementApplyResult ; CPU:$D42E PRG:142E 4C 44 D4 MovementArithmeticD431: - ldx #$00 - beq MovementAdd + ldx #$00 ; CPU:$D431 PRG:1431 A2 00 + beq MovementAdd ; CPU:$D433 PRG:1433 F0 02 MovementArithmeticD435: - ldx #$02 + ldx #$02 ; CPU:$D435 PRG:1435 A2 02 MovementAdd: - lda $1B,x - clc - adc $B5 - sta $1B,x + lda $1B,x ; CPU:$D437 PRG:1437 B5 1B + clc ; CPU:$D439 PRG:1439 18 + adc $B5 ; CPU:$D43A PRG:143A 65 B5 + sta $1B,x ; CPU:$D43C PRG:143C 95 1B - lda #$00 - adc $B6 - sta $CC + lda #$00 ; CPU:$D43E PRG:143E A9 00 + adc $B6 ; CPU:$D440 PRG:1440 65 B6 + sta $CC ; CPU:$D442 PRG:1442 85 CC ;============================================================================== ; $D444-$D459: Apply Movement Result and Dispatch Direction Handler @@ -5955,24 +5758,24 @@ MovementAdd: ;============================================================================== MovementApplyResult: - dec $CC - bpl @D449 + dec $CC ; CPU:$D444 PRG:1444 C6 CC + bpl @D449 ; CPU:$D446 PRG:1446 10 01 - rts + rts ; CPU:$D448 PRG:1448 60 @D449: - lda $51 - asl - tay + lda $51 ; CPU:$D449 PRG:1449 A5 51 + asl ; CPU:$D44B PRG:144B 0A + tay ; CPU:$D44C PRG:144C A8 - lda MovementDirectionTable,y - sta $10 + lda MovementDirectionTable,y ; CPU:$D44D PRG:144D B9 5A D4 + sta $10 ; CPU:$D450 PRG:1450 85 10 - lda MovementDirectionTable+1,y - sta $11 + lda MovementDirectionTable+1,y ; CPU:$D452 PRG:1452 B9 5B D4 + sta $11 ; CPU:$D455 PRG:1455 85 11 - jmp ($0010) + jmp ($0010) ; CPU:$D457 PRG:1457 6C 10 00 9A D4 ;============================================================================== ; $D45A-$D461: Direction-Specific Movement Dispatch Table @@ -5986,10 +5789,10 @@ MovementApplyResult: ;============================================================================== MovementDirectionTable: - .word MovementDirectionD49A - .word MovementDirectionD490 - .word MovementDirectionD46C - .word MovementDirectionD462 + .word MovementDirectionD49A ; CPU:$D45A PRG:145A 9A D4 + .word MovementDirectionD490 ; CPU:$D45C PRG:145C 90 D4 + .word MovementDirectionD46C ; CPU:$D45E PRG:145E 6C D4 + .word MovementDirectionD462 ; CPU:$D460 PRG:1460 62 D4 ;============================================================================== ; $D462-$D501: Direction-Specific Movement Handlers @@ -6023,13 +5826,13 @@ MovementDirectionTable: ;------------------------------------------------------------------------------ MovementDirectionD462: - ldx #$00 - stx $00 + ldx #$00 ; CPU:$D462 PRG:1462 A2 00 + stx $00 ; CPU:$D464 PRG:1464 86 00 - lda #$03 - sta $01 + lda #$03 ; CPU:$D466 PRG:1466 A9 03 + sta $01 ; CPU:$D468 PRG:1468 85 01 - bne MovementIncrement + bne MovementIncrement ; CPU:$D46A PRG:146A D0 06 ;------------------------------------------------------------------------------ @@ -6038,9 +5841,9 @@ MovementDirectionD462: ;------------------------------------------------------------------------------ MovementDirectionD46C: - ldx #$02 - stx $00 - stx $01 + ldx #$02 ; CPU:$D46C PRG:146C A2 02 + stx $00 ; CPU:$D46E PRG:146E 86 00 + stx $01 ; CPU:$D470 PRG:1470 86 01 ;------------------------------------------------------------------------------ @@ -6048,27 +5851,27 @@ MovementDirectionD46C: ;------------------------------------------------------------------------------ MovementIncrement: - lda $1A,x - clc - adc #$01 - sta $1A,x + lda $1A,x ; CPU:$D472 PRG:1472 B5 1A + clc ; CPU:$D474 PRG:1474 18 + adc #$01 ; CPU:$D475 PRG:1475 69 01 + sta $1A,x ; CPU:$D477 PRG:1477 95 1A - and #$04 - bne MovementSharedTail + and #$04 ; CPU:$D479 PRG:1479 29 04 + bne MovementSharedTail ; CPU:$D47B PRG:147B D0 44 - ldx $01 + ldx $01 ; CPU:$D47D PRG:147D A6 01 - lda $022B,x - and #$F0 - beq MovementSharedTail + lda $022B,x ; CPU:$D47F PRG:147F BD 2B 02 + and #$F0 ; CPU:$D482 PRG:1482 29 F0 + beq MovementSharedTail ; CPU:$D484 PRG:1484 F0 3B - ldx $00 + ldx $00 ; CPU:$D486 PRG:1486 A6 00 - lda $1A,x - and #$FC - sta $1A,x + lda $1A,x ; CPU:$D488 PRG:1488 B5 1A + and #$FC ; CPU:$D48A PRG:148A 29 FC + sta $1A,x ; CPU:$D48C PRG:148C 95 1A - bne MovementSharedTail + bne MovementSharedTail ; CPU:$D48E PRG:148E D0 31 ;------------------------------------------------------------------------------ @@ -6077,13 +5880,13 @@ MovementIncrement: ;------------------------------------------------------------------------------ MovementDirectionD490: - ldx #$00 - stx $00 + ldx #$00 ; CPU:$D490 PRG:1490 A2 00 + stx $00 ; CPU:$D492 PRG:1492 86 00 - lda #$01 - sta $01 + lda #$01 ; CPU:$D494 PRG:1494 A9 01 + sta $01 ; CPU:$D496 PRG:1496 85 01 - bne MovementDecrement + bne MovementDecrement ; CPU:$D498 PRG:1498 D0 08 ;------------------------------------------------------------------------------ @@ -6092,11 +5895,11 @@ MovementDirectionD490: ;------------------------------------------------------------------------------ MovementDirectionD49A: - ldx #$02 - stx $00 + ldx #$02 ; CPU:$D49A PRG:149A A2 02 + stx $00 ; CPU:$D49C PRG:149C 86 00 - lda #$00 - sta $01 + lda #$00 ; CPU:$D49E PRG:149E A9 00 + sta $01 ; CPU:$D4A0 PRG:14A0 85 01 ;------------------------------------------------------------------------------ @@ -6104,27 +5907,27 @@ MovementDirectionD49A: ;------------------------------------------------------------------------------ MovementDecrement: - lda $1A,x - sec - sbc #$01 - sta $1A,x + lda $1A,x ; CPU:$D4A2 PRG:14A2 B5 1A + sec ; CPU:$D4A4 PRG:14A4 38 + sbc #$01 ; CPU:$D4A5 PRG:14A5 E9 01 + sta $1A,x ; CPU:$D4A7 PRG:14A7 95 1A - and #$04 - beq MovementSharedTail + and #$04 ; CPU:$D4A9 PRG:14A9 29 04 + beq MovementSharedTail ; CPU:$D4AB PRG:14AB F0 14 - ldx $01 + ldx $01 ; CPU:$D4AD PRG:14AD A6 01 - lda $022B,x - and #$F0 - beq MovementSharedTail + lda $022B,x ; CPU:$D4AF PRG:14AF BD 2B 02 + and #$F0 ; CPU:$D4B2 PRG:14B2 29 F0 + beq MovementSharedTail ; CPU:$D4B4 PRG:14B4 F0 0B - ldx $00 + ldx $00 ; CPU:$D4B6 PRG:14B6 A6 00 - lda $1A,x - clc - adc #$04 - and #$FC - sta $1A,x + lda $1A,x ; CPU:$D4B8 PRG:14B8 B5 1A + clc ; CPU:$D4BA PRG:14BA 18 + adc #$04 ; CPU:$D4BB PRG:14BB 69 04 + and #$FC ; CPU:$D4BD PRG:14BD 29 FC + sta $1A,x ; CPU:$D4BF PRG:14BF 95 1A ;------------------------------------------------------------------------------ @@ -6132,66 +5935,66 @@ MovementDecrement: ;------------------------------------------------------------------------------ MovementSharedTail: - lda $1A + lda $1A ; CPU:$D4C1 PRG:14C1 A5 1A - cmp #$18 - bcc MovementCheckLeftWrap + cmp #$18 ; CPU:$D4C3 PRG:14C3 C9 18 + bcc MovementCheckLeftWrap ; CPU:$D4C5 PRG:14C5 90 0A - cmp #$A9 - bcs MovementCheckLeftWrap + cmp #$A9 ; CPU:$D4C7 PRG:14C7 C9 A9 + bcs MovementCheckLeftWrap ; CPU:$D4C9 PRG:14C9 B0 06 - lda $38 - and #$DF - bcc MovementStoreWrapState + lda $38 ; CPU:$D4CB PRG:14CB A5 38 + and #$DF ; CPU:$D4CD PRG:14CD 29 DF + bcc MovementStoreWrapState ; CPU:$D4CF PRG:14CF 90 04 MovementCheckLeftWrap: - lda #$20 - ora $38 + lda #$20 ; CPU:$D4D1 PRG:14D1 A9 20 + ora $38 ; CPU:$D4D3 PRG:14D3 05 38 MovementStoreWrapState: - sta $38 + sta $38 ; CPU:$D4D5 PRG:14D5 85 38 - lda $1A - cmp #$0B - bcs MovementCheckRightWrap + lda $1A ; CPU:$D4D7 PRG:14D7 A5 1A + cmp #$0B ; CPU:$D4D9 PRG:14D9 C9 0B + bcs MovementCheckRightWrap ; CPU:$D4DB PRG:14DB B0 06 - lda #$BF - sta $1A - bne MovementCheckAlignment + lda #$BF ; CPU:$D4DD PRG:14DD A9 BF + sta $1A ; CPU:$D4DF PRG:14DF 85 1A + bne MovementCheckAlignment ; CPU:$D4E1 PRG:14E1 D0 08 MovementCheckRightWrap: - cmp #$C0 - bcc MovementCheckAlignment + cmp #$C0 ; CPU:$D4E3 PRG:14E3 C9 C0 + bcc MovementCheckAlignment ; CPU:$D4E5 PRG:14E5 90 04 - lda #$0B - sta $1A + lda #$0B ; CPU:$D4E7 PRG:14E7 A9 0B + sta $1A ; CPU:$D4E9 PRG:14E9 85 1A MovementCheckAlignment: - lda $1A - ora $1C - and #$07 - bne MovementReturnToArithmetic + lda $1A ; CPU:$D4EB PRG:14EB A5 1A + ora $1C ; CPU:$D4ED PRG:14ED 05 1C + and #$07 ; CPU:$D4EF PRG:14EF 29 07 + bne MovementReturnToArithmetic ; CPU:$D4F1 PRG:14F1 D0 0C - lda $50 - cmp $51 - beq MovementReturnToArithmetic + lda $50 ; CPU:$D4F3 PRG:14F3 A5 50 + cmp $51 ; CPU:$D4F5 PRG:14F5 C5 51 + beq MovementReturnToArithmetic ; CPU:$D4F7 PRG:14F7 F0 06 - sta $51 + sta $51 ; CPU:$D4F9 PRG:14F9 85 51 - inc $CC - inc $CC + inc $CC ; CPU:$D4FB PRG:14FB E6 CC + inc $CC ; CPU:$D4FD PRG:14FD E6 CC MovementReturnToArithmetic: - jmp MovementApplyResult + jmp MovementApplyResult ; CPU:$D4FF PRG:14FF 4C 44 D4 ;============================================================================== ; $D502-$D505: Controller Direction Mapping ;============================================================================== InputDirectionTable: - .byte $03,$01,$02,$00 + .byte $03,$01,$02,$00 ; CPU:$D502 PRG:1502 03 01 02 00 ;============================================================================== ; $D506-$D51E: Scripted Direction/Input Update @@ -6221,24 +6024,24 @@ InputDirectionTable: ;============================================================================== UpdateScriptedDirection: - ldy $E4 + ldy $E4 ; CPU:$D506 PRG:1506 A4 E4 - dec $E3 - bne @UseCurrentEntry + dec $E3 ; CPU:$D508 PRG:1508 C6 E3 + bne @UseCurrentEntry ; CPU:$D50A PRG:150A D0 0B - inc $E4 - inc $E4 + inc $E4 ; CPU:$D50C PRG:150C E6 E4 + inc $E4 ; CPU:$D50E PRG:150E E6 E4 - ldy $E4 + ldy $E4 ; CPU:$D510 PRG:1510 A4 E4 - lda ScriptedDirectionTable,y - sta $E3 + lda ScriptedDirectionTable,y ; CPU:$D512 PRG:1512 B9 1F D5 + sta $E3 ; CPU:$D515 PRG:1515 85 E3 @UseCurrentEntry: - lda ScriptedDirectionTable+1,y - and #$03 + lda ScriptedDirectionTable+1,y ; CPU:$D517 PRG:1517 B9 20 D5 + and #$03 ; CPU:$D51A PRG:151A 29 03 - jmp $D3A6 + jmp $D3A6 ; CPU:$D51C PRG:151C 4C A6 D3 ;============================================================================== ; $D51F-...: Scripted Direction Table @@ -6254,34 +6057,34 @@ UpdateScriptedDirection: ; normal player controller processing. ;============================================================================== ScriptedDirectionTable: - .byte $00,$01 - .byte $D0,$00 - .byte $28,$01 - .byte $28,$02 - .byte $90,$03 - .byte $38,$00 - .byte $20,$03 - .byte $18,$01 - .byte $60,$02 - .byte $30,$01 - .byte $10,$02 - .byte $48,$01 - .byte $18,$02 - .byte $40,$01 - .byte $20,$02 - .byte $18,$00 - .byte $20,$03 - .byte $40,$02 - .byte $38,$01 - .byte $18,$02 - .byte $E0,$03 - .byte $30,$00 - .byte $28,$01 - .byte $28,$02 - .byte $20,$02 - .byte $80,$03 - .byte $40,$00 - .byte $40,$01 + .byte $00,$01 ; CPU:$D51F PRG:151F 00 01 + .byte $D0,$00 ; CPU:$D521 PRG:1521 D0 00 + .byte $28,$01 ; CPU:$D523 PRG:1523 28 01 + .byte $28,$02 ; CPU:$D525 PRG:1525 28 02 + .byte $90,$03 ; CPU:$D527 PRG:1527 90 03 + .byte $38,$00 ; CPU:$D529 PRG:1529 38 00 + .byte $20,$03 ; CPU:$D52B PRG:152B 20 03 + .byte $18,$01 ; CPU:$D52D PRG:152D 18 01 + .byte $60,$02 ; CPU:$D52F PRG:152F 60 02 + .byte $30,$01 ; CPU:$D531 PRG:1531 30 01 + .byte $10,$02 ; CPU:$D533 PRG:1533 10 02 + .byte $48,$01 ; CPU:$D535 PRG:1535 48 01 + .byte $18,$02 ; CPU:$D537 PRG:1537 18 02 + .byte $40,$01 ; CPU:$D539 PRG:1539 40 01 + .byte $20,$02 ; CPU:$D53B PRG:153B 20 02 + .byte $18,$00 ; CPU:$D53D PRG:153D 18 00 + .byte $20,$03 ; CPU:$D53F PRG:153F 20 03 + .byte $40,$02 ; CPU:$D541 PRG:1541 40 02 + .byte $38,$01 ; CPU:$D543 PRG:1543 38 01 + .byte $18,$02 ; CPU:$D545 PRG:1545 18 02 + .byte $E0,$03 ; CPU:$D547 PRG:1547 E0 03 + .byte $30,$00 ; CPU:$D549 PRG:1549 30 00 + .byte $28,$01 ; CPU:$D54B PRG:154B 28 01 + .byte $28,$02 ; CPU:$D54D PRG:154D 28 02 + .byte $20,$02 ; CPU:$D54F PRG:154F 20 02 + .byte $80,$03 ; CPU:$D551 PRG:1551 80 03 + .byte $40,$00 ; CPU:$D553 PRG:1553 40 00 + .byte $40,$01 ; CPU:$D555 PRG:1555 40 01 ;============================================================================== ; $D557-$D586: Update Four Gameplay Entities @@ -6325,45 +6128,45 @@ ScriptedDirectionTable: ;============================================================================== UpdateGameplayEntities: - ldx #$00 + ldx #$00 ; CPU:$D557 PRG:1557 A2 00 - lda #$2F - sta $00 + lda #$2F ; CPU:$D559 PRG:1559 A9 2F + sta $00 ; CPU:$D55B PRG:155B 85 00 - lda #$02 - sta $01 + lda #$02 ; CPU:$D55D PRG:155D A9 02 + sta $01 ; CPU:$D55F PRG:155F 85 01 - lda #$1E - sta $02 + lda #$1E ; CPU:$D561 PRG:1561 A9 1E + sta $02 ; CPU:$D563 PRG:1563 85 02 - lda #$00 - sta $03 + lda #$00 ; CPU:$D565 PRG:1565 A9 00 + sta $03 ; CPU:$D567 PRG:1567 85 03 - lda #$01 - sta $04 + lda #$01 ; CPU:$D569 PRG:1569 A9 01 + sta $04 ; CPU:$D56B PRG:156B 85 04 @UpdateNextEntity: - jsr $D587 + jsr $D587 ; CPU:$D56D PRG:156D 20 87 D5 - lda $00 - clc - adc #$04 - sta $00 + lda $00 ; CPU:$D570 PRG:1570 A5 00 + clc ; CPU:$D572 PRG:1572 18 + adc #$04 ; CPU:$D573 PRG:1573 69 04 + sta $00 ; CPU:$D575 PRG:1575 85 00 - lda $02 - clc - adc #$04 - sta $02 + lda $02 ; CPU:$D577 PRG:1577 A5 02 + clc ; CPU:$D579 PRG:1579 18 + adc #$04 ; CPU:$D57A PRG:157A 69 04 + sta $02 ; CPU:$D57C PRG:157C 85 02 - asl $04 + asl $04 ; CPU:$D57E PRG:157E 06 - inx - inx + inx ; CPU:$D57F PRG:157F 04 + inx ; CPU:$D580 PRG:1580 E8 - cpx #$08 - bne @UpdateNextEntity + cpx #$08 ; CPU:$D581 PRG:1581 E8 E0 + bne @UpdateNextEntity ; CPU:$D583 PRG:1583 08 D0 - rts + rts ; CPU:$D585 PRG:1585 E7 ;============================================================================== ; $D587-$D595: Gameplay Entity State Dispatcher @@ -6391,15 +6194,15 @@ UpdateGameplayEntities: ;============================================================================== DispatchGameplayEntityState: - ldy $B8,x + ldy $B8,x ; CPU:$D587 PRG:1587 B4 B8 - lda EntityStateTable,y - sta $10 + lda EntityStateTable,y ; CPU:$D589 PRG:1589 B9 96 D5 + sta $10 ; CPU:$D58C PRG:158C 85 10 - lda EntityStateTable+1,y - sta $11 + lda EntityStateTable+1,y ; CPU:$D58E PRG:158E B9 97 D5 + sta $11 ; CPU:$D591 PRG:1591 85 11 - jmp ($0010) + jmp ($0010) ; CPU:$D593 PRG:1593 6C 10 00 D5 D8 ;============================================================================== ; $D596-$D59F: Gameplay Entity State Table @@ -6419,11 +6222,11 @@ DispatchGameplayEntityState: ;============================================================================== EntityStateTable: - .word $D8D5 ; state $00 - .word $D885 ; state $02 - .word $D5A1 ; state $04 - .word $D5A1 ; state $06 - .word EntityState08 ; state $08 + .word $D8D5 ; state $00 ; CPU:$D596 PRG:1596 D5 D8 + .word $D885 ; state $02 ; CPU:$D598 PRG:1598 85 D8 + .word $D5A1 ; state $04 ; CPU:$D59A PRG:159A A1 D5 + .word $D5A1 ; state $06 ; CPU:$D59C PRG:159C A1 D5 + .word EntityState08 ; state $08 ; CPU:$D59E PRG:159E A0 D5 ;============================================================================== ; $D5A0: Entity State $08 Handler @@ -6437,7 +6240,7 @@ EntityStateTable: ;============================================================================== EntityState08: - rts + rts ; CPU:$D5A0 PRG:15A0 60 ;============================================================================== @@ -6464,19 +6267,19 @@ EntityState08: ;============================================================================== DispatchEntitySecondaryState: - jsr $D821 + jsr $D821 ; CPU:$D5A1 PRG:15A1 20 21 D8 - lda $B9,x - asl - tay + lda $B9,x ; CPU:$D5A4 PRG:15A4 B5 B9 + asl ; CPU:$D5A6 PRG:15A6 0A + tay ; CPU:$D5A7 PRG:15A7 A8 - lda EntitySecondaryStateTable,y - sta $10 + lda EntitySecondaryStateTable,y ; CPU:$D5A8 PRG:15A8 B9 B5 D5 + sta $10 ; CPU:$D5AB PRG:15AB 85 10 - lda EntitySecondaryStateTable+1,y - sta $11 + lda EntitySecondaryStateTable+1,y ; CPU:$D5AD PRG:15AD B9 B6 D5 + sta $11 ; CPU:$D5B0 PRG:15B0 85 11 - jmp ($0010) + jmp ($0010) ; CPU:$D5B2 PRG:15B2 6C 10 00 D3 D5 ;============================================================================== ; $D5B5-$D5BC: Entity Secondary-State Dispatch Table @@ -6490,10 +6293,10 @@ DispatchEntitySecondaryState: ;============================================================================== EntitySecondaryStateTable: - .word EntitySecondaryState0 ; secondary state 0 - .word EntitySecondaryState1 ; secondary state 1 - .word EntitySecondaryState2 ; secondary state 2 - .word EntitySecondaryState3 ; secondary state 3 + .word EntitySecondaryState0 ; secondary state 0 ; CPU:$D5B5 PRG:15B5 D3 D5 + .word EntitySecondaryState1 ; secondary state 1 ; CPU:$D5B7 PRG:15B7 D7 D5 + .word EntitySecondaryState2 ; secondary state 2 ; CPU:$D5B9 PRG:15B9 BD D5 + .word EntitySecondaryState3 ; secondary state 3 ; CPU:$D5BB PRG:15BB C1 D5 ;============================================================================== ; $D5BD-$D5D2: Secondary-State Coordinate Adjustment @@ -6518,23 +6321,23 @@ EntitySecondaryStateTable: ;============================================================================== EntitySecondaryState2: - ldy #$03 - bne EntitySecondaryAdjust + ldy #$03 ; CPU:$D5BD PRG:15BD A0 03 + bne EntitySecondaryAdjust ; CPU:$D5BF PRG:15BF D0 02 EntitySecondaryState3: - ldy #$01 + ldy #$01 ; CPU:$D5C1 PRG:15C1 A0 01 EntitySecondaryAdjust: - lda ($02),y - clc - adc $C2,x - sta ($02),y + lda ($02),y ; CPU:$D5C3 PRG:15C3 B1 02 + clc ; CPU:$D5C5 PRG:15C5 18 + adc $C2,x ; CPU:$D5C6 PRG:15C6 75 C2 + sta ($02),y ; CPU:$D5C8 PRG:15C8 91 02 - lda #$00 - adc $C3,x - sta $CC + lda #$00 ; CPU:$D5CA PRG:15CA A9 00 + adc $C3,x ; CPU:$D5CC PRG:15CC 75 C3 + sta $CC ; CPU:$D5CE PRG:15CE 85 CC - jmp $D5EB + jmp $D5EB ; CPU:$D5D0 PRG:15D0 4C EB D5 ;============================================================================== ; $D5D3-$D5EE: Entity Secondary States $00/$01 Movement Arithmetic @@ -6560,30 +6363,30 @@ EntitySecondaryAdjust: ;============================================================================== EntitySecondaryState0: - ldy #$03 - bne EntitySecondarySubtract + ldy #$03 ; CPU:$D5D3 PRG:15D3 A0 03 + bne EntitySecondarySubtract ; CPU:$D5D5 PRG:15D5 D0 02 EntitySecondaryState1: - ldy #$01 + ldy #$01 ; CPU:$D5D7 PRG:15D7 A0 01 EntitySecondarySubtract: - lda ($02),y - sec - sbc $C2,x - sta ($02),y + lda ($02),y ; CPU:$D5D9 PRG:15D9 B1 02 + sec ; CPU:$D5DB PRG:15DB 38 + sbc $C2,x ; CPU:$D5DC PRG:15DC F5 C2 + sta ($02),y ; CPU:$D5DE PRG:15DE 91 02 - lda #$00 - bcs EntitySecondarySubtractNoBorrow + lda #$00 ; CPU:$D5E0 PRG:15E0 A9 00 + bcs EntitySecondarySubtractNoBorrow ; CPU:$D5E2 PRG:15E2 B0 02 - lda #$01 + lda #$01 ; CPU:$D5E4 PRG:15E4 A9 01 EntitySecondarySubtractNoBorrow: - clc - adc $C3,x - sta $CC + clc ; CPU:$D5E6 PRG:15E6 18 + adc $C3,x ; CPU:$D5E7 PRG:15E7 75 C3 + sta $CC ; CPU:$D5E9 PRG:15E9 85 CC ;============================================================================== @@ -6603,24 +6406,24 @@ EntitySecondarySubtractNoBorrow: ;============================================================================== EntitySecondaryApplyResult: - dec $CC - bpl EntityDirectionDispatch + dec $CC ; CPU:$D5EB PRG:15EB C6 CC + bpl EntityDirectionDispatch ; CPU:$D5ED PRG:15ED 10 01 - rts + rts ; CPU:$D5EF PRG:15EF 60 EntityDirectionDispatch: - lda $B9,x - asl - tay + lda $B9,x ; CPU:$D5F0 PRG:15F0 B5 B9 + asl ; CPU:$D5F2 PRG:15F2 0A + tay ; CPU:$D5F3 PRG:15F3 A8 - lda EntityDirectionStateTable,y - sta $10 + lda EntityDirectionStateTable,y ; CPU:$D5F4 PRG:15F4 B9 01 D6 + sta $10 ; CPU:$D5F7 PRG:15F7 85 10 - lda EntityDirectionStateTable+1,y - sta $11 + lda EntityDirectionStateTable+1,y ; CPU:$D5F9 PRG:15F9 B9 02 D6 + sta $11 ; CPU:$D5FC PRG:15FC 85 11 - jmp ($0010) + jmp ($0010) ; CPU:$D5FE PRG:15FE 6C 10 00 09 D6 ;============================================================================== ; $D601-$D608: Entity Direction-State Dispatch Table @@ -6634,10 +6437,10 @@ EntityDirectionDispatch: ;============================================================================== EntityDirectionStateTable: - .word $D609 - .word $D61D - .word $D60F - .word $D617 + .word $D609 ; CPU:$D601 PRG:1601 09 D6 + .word $D61D ; CPU:$D603 PRG:1603 1D D6 + .word $D60F ; CPU:$D605 PRG:1605 0F D6 + .word $D617 ; CPU:$D607 PRG:1607 17 D6 ;============================================================================== ; $D609-$D622: Entity Direction-State Handlers @@ -6669,34 +6472,34 @@ EntityDirectionStateTable: ;============================================================================== EntityDirectionD609: - lda #$FF - sta $05 - bne EntityDirectionAxis2 + lda #$FF ; CPU:$D609 PRG:1609 A9 FF + sta $05 ; CPU:$D60B PRG:160B 85 05 + bne EntityDirectionAxis2 ; CPU:$D60D PRG:160D D0 04 EntityDirectionD60F: - lda #$01 - sta $05 + lda #$01 ; CPU:$D60F PRG:160F A9 01 + sta $05 ; CPU:$D611 PRG:1611 85 05 EntityDirectionAxis2: - ldy #$02 - bne EntityDirectionMove + ldy #$02 ; CPU:$D613 PRG:1613 A0 02 + bne EntityDirectionMove ; CPU:$D615 PRG:1615 D0 0C EntityDirectionD617: - lda #$01 - sta $05 - bne EntityDirectionAxis0 + lda #$01 ; CPU:$D617 PRG:1617 A9 01 + sta $05 ; CPU:$D619 PRG:1619 85 05 + bne EntityDirectionAxis0 ; CPU:$D61B PRG:161B D0 04 EntityDirectionD61D: - lda #$FF - sta $05 + lda #$FF ; CPU:$D61D PRG:161D A9 FF + sta $05 ; CPU:$D61F PRG:161F 85 05 EntityDirectionAxis0: - ldy #$00 + ldy #$00 ; CPU:$D621 PRG:1621 A0 00 ;============================================================================== ; $D623-$D69A: Shared Entity Direction Movement @@ -6718,103 +6521,103 @@ EntityDirectionAxis0: ;============================================================================== EntityDirectionMove: - lda ($02),y - clc - adc $05 - sta ($02),y + lda ($02),y ; CPU:$D623 PRG:1623 B1 02 + clc ; CPU:$D625 PRG:1625 18 + adc $05 ; CPU:$D626 PRG:1626 65 05 + sta ($02),y ; CPU:$D628 PRG:1628 91 02 - ldy #$00 + ldy #$00 ; CPU:$D62A PRG:162A A0 00 - lda ($02),y - cmp #$0A - bne @D637 + lda ($02),y ; CPU:$D62C PRG:162C B1 02 + cmp #$0A ; CPU:$D62E PRG:162E C9 0A + bne @D637 ; CPU:$D630 PRG:1630 D0 06 - lda #$BF - sta ($02),y - bne @D64B + lda #$BF ; CPU:$D632 PRG:1632 A9 BF + sta ($02),y ; CPU:$D634 PRG:1634 91 02 + bne @D64B ; CPU:$D636 PRG:1636 D0 12 @D637: - cmp #$C0 - bne @D641 + cmp #$C0 ; CPU:$D638 PRG:1638 C9 C0 + bne @D641 ; CPU:$D63A PRG:163A D0 06 - lda #$0B - sta ($02),y - bne @D64B + lda #$0B ; CPU:$D63C PRG:163C A9 0B + sta ($02),y ; CPU:$D63E PRG:163E 91 02 + bne @D64B ; CPU:$D640 PRG:1640 D0 08 @D641: - cmp #$18 - bcc @D64B + cmp #$18 ; CPU:$D642 PRG:1642 C9 18 + bcc @D64B ; CPU:$D644 PRG:1644 90 04 - cmp #$A9 - bcc @D64F + cmp #$A9 ; CPU:$D646 PRG:1646 C9 A9 + bcc @D64F ; CPU:$D648 PRG:1648 90 04 @D64B: - lda #$20 - bne @D651 + lda #$20 ; CPU:$D64A PRG:164A A9 20 + bne @D651 ; CPU:$D64C PRG:164C D0 02 @D64F: - lda #$00 + lda #$00 ; CPU:$D64E PRG:164E A9 00 @D651: - sta $05 + sta $05 ; CPU:$D650 PRG:1650 85 05 - txa - lsr - tay + txa ; CPU:$D652 PRG:1652 8A + lsr ; CPU:$D653 PRG:1653 4A + tay ; CPU:$D654 PRG:1654 A8 - lda $39,y - and #$DF - ora $05 - sta $39,y + lda $39,y ; CPU:$D655 PRG:1655 B9 39 + and #$DF ; CPU:$D657 PRG:1657 00 29 + ora $05 ; CPU:$D659 PRG:1659 DF 05 + sta $39,y ; CPU:$D65B PRG:165B 05 99 - ldy #$00 - lda ($02),y + ldy #$00 ; CPU:$D65D PRG:165D 39 00 + lda ($02),y ; CPU:$D65F PRG:165F A0 00 - ldy #$02 - ora ($02),y - and #$07 - beq @D66E + ldy #$02 ; CPU:$D661 PRG:1661 B1 02 + ora ($02),y ; CPU:$D663 PRG:1663 A0 02 + and #$07 ; CPU:$D665 PRG:1665 11 02 + beq @D66E ; CPU:$D667 PRG:1667 29 07 - jmp EntitySecondaryApplyResult + jmp EntitySecondaryApplyResult ; CPU:$D669 PRG:1669 F0 03 4C @D66E: - ldy #$00 + ldy #$00 ; CPU:$D66C PRG:166C EB D5 - lda ($02),y - cmp #$60 - bne $D69B + lda ($02),y ; CPU:$D66E PRG:166E A0 00 + cmp #$60 ; CPU:$D670 PRG:1670 B1 02 + bne $D69B ; CPU:$D672 PRG:1672 C9 60 - ldy #$02 + ldy #$02 ; CPU:$D674 PRG:1674 D0 25 - lda ($02),y - cmp #$70 - bne $D69B + lda ($02),y ; CPU:$D676 PRG:1676 A0 02 + cmp #$70 ; CPU:$D678 PRG:1678 B1 02 + bne $D69B ; CPU:$D67A PRG:167A C9 70 - lda #$02 - sta $B8,x + lda #$02 ; CPU:$D67C PRG:167C D0 1D + sta $B8,x ; CPU:$D67E PRG:167E A9 02 - lda #$00 - clc - sbc $04 - and $88 - sta $88 + lda #$00 ; CPU:$D680 PRG:1680 95 B8 + clc ; CPU:$D682 PRG:1682 A9 + sbc $04 ; CPU:$D683 PRG:1683 00 18 + and $88 ; CPU:$D685 PRG:1685 E5 04 + sta $88 ; CPU:$D687 PRG:1687 25 88 - txa - lsr - tay - sta $05 + txa ; CPU:$D689 PRG:1689 85 + lsr ; CPU:$D68A PRG:168A 88 + tay ; CPU:$D68B PRG:168B 8A + sta $05 ; CPU:$D68C PRG:168C 4A A8 - lda $39,y - and #$FC - ora $05 - sta $39,y + lda $39,y ; CPU:$D68E PRG:168E 85 05 + and #$FC ; CPU:$D690 PRG:1690 B9 39 + ora $05 ; CPU:$D692 PRG:1692 00 29 + sta $39,y ; CPU:$D694 PRG:1694 FC 05 - rts + rts ; CPU:$D696 PRG:1696 05 ;============================================================================== ; $D69B-$D6C6: Entity Movement Continuation / Target Selection @@ -6841,38 +6644,38 @@ EntityDirectionMove: ;============================================================================== EntityMovementContinuation: - lda $B8,x - cmp #$06 - bne @CheckEntityMasks + lda $B8,x ; CPU:$D69B PRG:169B B5 B8 + cmp #$06 ; CPU:$D69D PRG:169D C9 06 + bne @CheckEntityMasks ; CPU:$D69F PRG:169F D0 0B - lda #$60 - sta $CD + lda #$60 ; CPU:$D6A1 PRG:16A1 A9 60 + sta $CD ; CPU:$D6A3 PRG:16A3 85 CD - lda #$6F - sta $CE + lda #$6F ; CPU:$D6A5 PRG:16A5 A9 6F + sta $CE ; CPU:$D6A7 PRG:16A7 85 CE - jmp $D778 + jmp $D778 ; CPU:$D6A9 PRG:16A9 4C 78 D7 @CheckEntityMasks: - lda $04 - and $88 - bne $D70A + lda $04 ; CPU:$D6AC PRG:16AC A5 04 + and $88 ; CPU:$D6AE PRG:16AE 25 88 + bne $D70A ; CPU:$D6B0 PRG:16B0 D0 58 - lda $04 - and $87 - bne $D6CF + lda $04 ; CPU:$D6B2 PRG:16B2 A5 04 + and $87 ; CPU:$D6B4 PRG:16B4 25 87 + bne $D6CF ; CPU:$D6B6 PRG:16B6 D0 17 - txa - tay + txa ; CPU:$D6B8 PRG:16B8 8A + tay ; CPU:$D6B9 PRG:16B9 A8 - lda EntityTargetTable,y - sta $CD + lda EntityTargetTable,y ; CPU:$D6BA PRG:16BA B9 C7 D6 + sta $CD ; CPU:$D6BD PRG:16BD 85 CD - lda EntityTargetTable+1,y - sta $CE + lda EntityTargetTable+1,y ; CPU:$D6BF PRG:16BF B9 C8 D6 + sta $CE ; CPU:$D6C2 PRG:16C2 85 CE - jmp $D778 + jmp $D778 ; CPU:$D6C4 PRG:16C4 4C 78 D7 ;============================================================================== ; $D6C7-$D6CE: Entity Target Table @@ -6888,10 +6691,10 @@ EntityMovementContinuation: ;============================================================================== EntityTargetTable: - .word $08A8 - .word $0818 - .word $D0A8 - .word $D018 + .word $08A8 ; CPU:$D6C7 PRG:16C7 A8 08 + .word $0818 ; CPU:$D6C9 PRG:16C9 18 08 + .word $D0A8 ; CPU:$D6CB PRG:16CB A8 D0 + .word $D018 ; CPU:$D6CD PRG:16CD 18 D0 ;============================================================================== ; $D6CF-$D6DD: Entity Target-Selection Dispatcher @@ -6916,16 +6719,16 @@ EntityTargetTable: ;============================================================================== DispatchEntityTargetBehavior: - txa - tay + txa ; CPU:$D6CF PRG:16CF 8A + tay ; CPU:$D6D0 PRG:16D0 A8 - lda EntityTargetBehaviorTable,y - sta $10 + lda EntityTargetBehaviorTable,y ; CPU:$D6D1 PRG:16D1 B9 DE D6 + sta $10 ; CPU:$D6D4 PRG:16D4 85 10 - lda EntityTargetBehaviorTable+1,y - sta $11 + lda EntityTargetBehaviorTable+1,y ; CPU:$D6D6 PRG:16D6 B9 DF D6 + sta $11 ; CPU:$D6D9 PRG:16D9 85 11 - jmp ($0010) + jmp ($0010) ; CPU:$D6DB PRG:16DB 6C 10 00 3B D7 ;============================================================================== ; $D6DE-$D6E5: Entity Target-Behavior Dispatch Table @@ -6943,10 +6746,10 @@ DispatchEntityTargetBehavior: ;============================================================================== EntityTargetBehaviorTable: - .word EntityTargetBehaviorD73B ; X = $00 - .word EntityTargetBehaviorD745 ; X = $02 - .word EntityTargetBehaviorD764 ; X = $04 - .word EntityTargetBehaviorD6E6 ; X = $06 + .word EntityTargetBehaviorD73B ; X = $00 ; CPU:$D6DE PRG:16DE 3B D7 + .word EntityTargetBehaviorD745 ; X = $02 ; CPU:$D6E0 PRG:16E0 45 D7 + .word EntityTargetBehaviorD764 ; X = $04 ; CPU:$D6E2 PRG:16E2 64 D7 + .word EntityTargetBehaviorD6E6 ; X = $06 ; CPU:$D6E4 PRG:16E4 E6 D6 ;============================================================================== ; $D6E6-$D73A: Entity Target Behavior - Proximity/Direction Selection @@ -6970,77 +6773,77 @@ EntityTargetBehaviorTable: ;============================================================================== EntityTargetBehaviorD6E6: - lda $1A - sec - sbc $2A - bcs @D6F4 + lda $1A ; CPU:$D6E6 PRG:16E6 A5 1A + sec ; CPU:$D6E8 PRG:16E8 38 + sbc $2A ; CPU:$D6E9 PRG:16E9 E5 2A + bcs @D6F4 ; CPU:$D6EB PRG:16EB B0 07 - sta $05 + sta $05 ; CPU:$D6ED PRG:16ED 85 05 - lda #$00 - sec - sbc $05 + lda #$00 ; CPU:$D6EF PRG:16EF A9 00 + sec ; CPU:$D6F1 PRG:16F1 38 + sbc $05 ; CPU:$D6F2 PRG:16F2 E5 05 @D6F4: - cmp #$20 - bcs $D73B + cmp #$20 ; CPU:$D6F4 PRG:16F4 C9 20 + bcs $D73B ; CPU:$D6F6 PRG:16F6 B0 43 - lda $1C - sec - sbc $2C - bcs @D703 + lda $1C ; CPU:$D6F8 PRG:16F8 A5 1C + sec ; CPU:$D6FA PRG:16FA 38 + sbc $2C ; CPU:$D6FB PRG:16FB E5 2C + bcs @D703 ; CPU:$D6FD PRG:16FD B0 07 - sta $05 + sta $05 ; CPU:$D6FF PRG:16FF 85 05 - lda #$00 - sec - sbc $05 + lda #$00 ; CPU:$D701 PRG:1701 A9 00 + sec ; CPU:$D703 PRG:1703 38 + sbc $05 ; CPU:$D704 PRG:1704 E5 05 @D703: - cmp #$20 - bcs $D73B + cmp #$20 ; CPU:$D706 PRG:1706 C9 20 + bcs $D73B ; CPU:$D708 PRG:1708 B0 31 - lda $4B - sta $05 + lda $4B ; CPU:$D70A PRG:170A A5 4B + sta $05 ; CPU:$D70C PRG:170C 85 05 - lda #$05 - sta $06 + lda #$05 ; CPU:$D70E PRG:170E A9 05 + sta $06 ; CPU:$D710 PRG:1710 85 06 @D712: - dec $06 - bne @D71A + dec $06 ; CPU:$D712 PRG:1712 C6 06 + bne @D71A ; CPU:$D714 PRG:1714 D0 04 - lda #$02 - bne @D736 + lda #$02 ; CPU:$D716 PRG:1716 A9 02 + bne @D736 ; CPU:$D718 PRG:1718 D0 1C @D71A: - inc $05 + inc $05 ; CPU:$D71A PRG:171A E6 05 - lda $05 - and #$03 - tay + lda $05 ; CPU:$D71C PRG:171C A5 05 + and #$03 ; CPU:$D71E PRG:171E 29 03 + tay ; CPU:$D720 PRG:1720 A8 - lda ($00),y - and #$F8 - bne @D712 + lda ($00),y ; CPU:$D721 PRG:1721 B1 00 + and #$F8 ; CPU:$D723 PRG:1723 29 F8 + bne @D712 ; CPU:$D725 PRG:1725 D0 EB - lda $05 - clc - adc #$02 - and #$03 - cmp $B9,x - beq @D712 + lda $05 ; CPU:$D727 PRG:1727 A5 05 + clc ; CPU:$D729 PRG:1729 18 + adc #$02 ; CPU:$D72A PRG:172A 69 02 + and #$03 ; CPU:$D72C PRG:172C 29 03 + cmp $B9,x ; CPU:$D72E PRG:172E D5 B9 + beq @D712 ; CPU:$D730 PRG:1730 F0 E0 - lda $05 - and #$03 + lda $05 ; CPU:$D732 PRG:1732 A5 05 + and #$03 ; CPU:$D734 PRG:1734 29 03 @D736: - sta $B9,x + sta $B9,x ; CPU:$D736 PRG:1736 95 B9 - jmp EntitySecondaryApplyResult + jmp EntitySecondaryApplyResult ; CPU:$D738 PRG:1738 4C EB D5 ;============================================================================== ; $D73B-$D777: Entity Target Calculation Handlers @@ -7077,13 +6880,13 @@ EntityTargetBehaviorD6E6: ;------------------------------------------------------------------------------ EntityTargetBehaviorD73B: - lda $1A - sta $CD + lda $1A ; CPU:$D73B PRG:173B A5 1A + sta $CD ; CPU:$D73D PRG:173D 85 CD - lda $1C - sta $CE + lda $1C ; CPU:$D73F PRG:173F A5 1C + sta $CE ; CPU:$D741 PRG:1741 85 CE - bne $D778 + bne $D778 ; CPU:$D743 PRG:1743 D0 33 ;------------------------------------------------------------------------------ @@ -7091,21 +6894,21 @@ EntityTargetBehaviorD73B: ;------------------------------------------------------------------------------ EntityTargetBehaviorD745: - lda $51 - asl - tay + lda $51 ; CPU:$D745 PRG:1745 A5 51 + asl ; CPU:$D747 PRG:1747 0A + tay ; CPU:$D748 PRG:1748 A8 - lda EntityDirectionTargetOffsets,y - clc - adc $1A - sta $CD + lda EntityDirectionTargetOffsets,y ; CPU:$D749 PRG:1749 B9 5C D7 + clc ; CPU:$D74C PRG:174C 18 + adc $1A ; CPU:$D74D PRG:174D 65 1A + sta $CD ; CPU:$D74F PRG:174F 85 CD - lda EntityDirectionTargetOffsets+1,y - clc - adc $1C - sta $CE + lda EntityDirectionTargetOffsets+1,y ; CPU:$D751 PRG:1751 B9 5D D7 + clc ; CPU:$D754 PRG:1754 18 + adc $1C ; CPU:$D755 PRG:1755 65 1C + sta $CE ; CPU:$D757 PRG:1757 85 CE - jmp $D778 + jmp $D778 ; CPU:$D759 PRG:1759 4C 78 D7 ;============================================================================== ; $D75C-$D763: Direction Target Offset Table @@ -7126,10 +6929,10 @@ EntityTargetBehaviorD745: ;============================================================================== EntityDirectionTargetOffsets: - .byte $00,$E8 - .byte $E8,$00 - .byte $00,$18 - .byte $18,$00 + .byte $00,$E8 ; CPU:$D75C PRG:175C 00 E8 + .byte $E8,$00 ; CPU:$D75E PRG:175E E8 00 + .byte $00,$18 ; CPU:$D760 PRG:1760 00 18 + .byte $18,$00 ; CPU:$D762 PRG:1762 18 00 ;------------------------------------------------------------------------------ ; $D764: relative/reflected target @@ -7148,21 +6951,21 @@ EntityDirectionTargetOffsets: ;------------------------------------------------------------------------------ EntityTargetBehaviorD764: - lda $1A - sec - sbc $1E + lda $1A ; CPU:$D764 PRG:1764 A5 1A + sec ; CPU:$D766 PRG:1766 38 + sbc $1E ; CPU:$D767 PRG:1767 E5 1E - clc - adc $1A - sta $CD + clc ; CPU:$D769 PRG:1769 18 + adc $1A ; CPU:$D76A PRG:176A 65 1A + sta $CD ; CPU:$D76C PRG:176C 85 CD - lda $1C - sec - sbc $20 + lda $1C ; CPU:$D76E PRG:176E A5 1C + sec ; CPU:$D770 PRG:1770 38 + sbc $20 ; CPU:$D771 PRG:1771 E5 20 - clc - adc $1C - sta $CE + clc ; CPU:$D773 PRG:1773 18 + adc $1C ; CPU:$D774 PRG:1774 65 1C + sta $CE ; CPU:$D776 PRG:1776 85 CE ;============================================================================== ; $D778-$D79F: Common Entity Target Processing @@ -7200,39 +7003,39 @@ EntityTargetBehaviorD764: ;============================================================================== EntityTargetCommon: - lda $B8,x - sec - sbc #$04 - tay + lda $B8,x ; CPU:$D778 PRG:1778 B5 B8 + sec ; CPU:$D77A PRG:177A 38 + sbc #$04 ; CPU:$D77B PRG:177B E9 04 + tay ; CPU:$D77D PRG:177D A8 - lda $D881,y - sta $0A + lda $D881,y ; CPU:$D77E PRG:177E B9 81 D8 + sta $0A ; CPU:$D781 PRG:1781 85 0A - lda $D882,y - sta $0B + lda $D882,y ; CPU:$D783 PRG:1783 B9 82 D8 + sta $0B ; CPU:$D786 PRG:1786 85 0B - jsr BuildLegalDirectionList + jsr BuildLegalDirectionList ; CPU:$D788 PRG:1788 20 B1 E4 - lda $0C - cmp #$FF - bne @D795 + lda $0C ; CPU:$D78B PRG:178B A5 0C + cmp #$FF ; CPU:$D78D PRG:178D C9 FF + bne @D795 ; CPU:$D78F PRG:178F D0 04 - lda #$02 - bne @D79D + lda #$02 ; CPU:$D791 PRG:1791 A9 02 + bne @D79D ; CPU:$D793 PRG:1793 D0 08 @D795: - lda $0D - cmp #$FF - bne $D7A0 + lda $0D ; CPU:$D795 PRG:1795 A5 0D + cmp #$FF ; CPU:$D797 PRG:1797 C9 FF + bne $D7A0 ; CPU:$D799 PRG:1799 D0 05 - lda $0C + lda $0C ; CPU:$D79B PRG:179B A5 0C @D79D: - sta $B9,x + sta $B9,x ; CPU:$D79D PRG:179D 95 B9 - rts + rts ; CPU:$D79F PRG:179F 60 ;============================================================================== ; $D7A0-$D820: Select Entity Direction Toward Target @@ -7269,114 +7072,114 @@ EntityTargetCommon: ;============================================================================== SelectEntityDirectionTowardTarget: - ldy #$00 - sty $05 + ldy #$00 ; CPU:$D7A0 PRG:17A0 A0 00 + sty $05 ; CPU:$D7A2 PRG:17A2 84 05 - lda $CD - sec - sbc ($02),y - bcs @D7B9 + lda $CD ; CPU:$D7A4 PRG:17A4 A5 CD + sec ; CPU:$D7A6 PRG:17A6 38 + sbc ($02),y ; CPU:$D7A7 PRG:17A7 F1 02 + bcs @D7B9 ; CPU:$D7A9 PRG:17A9 B0 0F - sta $08 + sta $08 ; CPU:$D7AB PRG:17AB 85 08 - lda #$00 - sec - sbc $08 + lda #$00 ; CPU:$D7AD PRG:17AD A9 00 + sec ; CPU:$D7AF PRG:17AF 38 + sbc $08 ; CPU:$D7B0 PRG:17B0 E5 08 - inc $05 - inc $05 - inc $05 - inc $05 + inc $05 ; CPU:$D7B2 PRG:17B2 E6 05 + inc $05 ; CPU:$D7B4 PRG:17B4 E6 05 + inc $05 ; CPU:$D7B6 PRG:17B6 E6 05 + inc $05 ; CPU:$D7B8 PRG:17B8 E6 05 @D7B9: - sta $06 + sta $06 ; CPU:$D7BA PRG:17BA 85 06 - lda $CE + lda $CE ; CPU:$D7BC PRG:17BC A5 CE - ldy #$02 + ldy #$02 ; CPU:$D7BE PRG:17BE A0 02 - sec - sbc ($02),y - bcs @D7D2 + sec ; CPU:$D7C0 PRG:17C0 38 + sbc ($02),y ; CPU:$D7C1 PRG:17C1 F1 02 + bcs @D7D2 ; CPU:$D7C3 PRG:17C3 B0 0B - sta $08 + sta $08 ; CPU:$D7C5 PRG:17C5 85 08 - lda #$00 - sec - sbc $08 + lda #$00 ; CPU:$D7C7 PRG:17C7 A9 00 + sec ; CPU:$D7C9 PRG:17C9 38 + sbc $08 ; CPU:$D7CA PRG:17CA E5 08 - inc $05 - inc $05 + inc $05 ; CPU:$D7CC PRG:17CC E6 05 + inc $05 ; CPU:$D7CE PRG:17CE E6 05 @D7D2: - sta $07 + sta $07 ; CPU:$D7D0 PRG:17D0 85 07 - lda $06 - cmp $07 - bcs @D7DB + lda $06 ; CPU:$D7D2 PRG:17D2 A5 06 + cmp $07 ; CPU:$D7D4 PRG:17D4 C5 07 + bcs @D7DB ; CPU:$D7D6 PRG:17D6 B0 02 - inc $05 + inc $05 ; CPU:$D7D8 PRG:17D8 E6 05 @D7DB: - lda $05 - asl - sta $05 + lda $05 ; CPU:$D7DA PRG:17DA A5 05 + asl ; CPU:$D7DC PRG:17DC 0A + sta $05 ; CPU:$D7DD PRG:17DD 85 05 - lda #$02 - sta $06 + lda #$02 ; CPU:$D7DF PRG:17DF A9 02 + sta $06 ; CPU:$D7E1 PRG:17E1 85 06 @D7E3: - ldy $05 + ldy $05 ; CPU:$D7E3 PRG:17E3 A4 05 - lda $D871,y + lda $D871,y ; CPU:$D7E5 PRG:17E5 B9 71 D8 - ldy #$00 + ldy #$00 ; CPU:$D7E8 PRG:17E8 A0 00 @D7EA: - cmp $000C,y - beq $D79D + cmp $000C,y ; CPU:$D7EA PRG:17EA D9 0C 00 + beq $D79D ; CPU:$D7ED PRG:17ED F0 AE - iny - cpy #$04 - bne @D7EA + iny ; CPU:$D7EF PRG:17EF C8 + cpy #$04 ; CPU:$D7F0 PRG:17F0 C0 04 + bne @D7EA ; CPU:$D7F2 PRG:17F2 D0 F6 - inc $05 + inc $05 ; CPU:$D7F4 PRG:17F4 E6 05 - dec $06 - bne @D7E3 + dec $06 ; CPU:$D7F6 PRG:17F6 C6 06 + bne @D7E3 ; CPU:$D7F8 PRG:17F8 D0 E9 - lda $B9,x - sec - sbc #$01 - and #$03 + lda $B9,x ; CPU:$D7FA PRG:17FA B5 B9 + sec ; CPU:$D7FC PRG:17FC 38 + sbc #$01 ; CPU:$D7FD PRG:17FD E9 01 + and #$03 ; CPU:$D7FF PRG:17FF 29 03 - ldy #$00 + ldy #$00 ; CPU:$D801 PRG:1801 A0 00 @D802: - cmp $000C,y - beq $D79D + cmp $000C,y ; CPU:$D803 PRG:1803 D9 0C 00 + beq $D79D ; CPU:$D806 PRG:1806 F0 95 - iny - cpy #$04 - bne @D802 + iny ; CPU:$D808 PRG:1808 C8 + cpy #$04 ; CPU:$D809 PRG:1809 C0 04 + bne @D802 ; CPU:$D80B PRG:180B D0 F6 - lda $B9,x - clc - adc #$01 - and #$03 + lda $B9,x ; CPU:$D80D PRG:180D B5 B9 + clc ; CPU:$D80F PRG:180F 18 + adc #$01 ; CPU:$D810 PRG:1810 69 01 + and #$03 ; CPU:$D812 PRG:1812 29 03 - ldy #$00 + ldy #$00 ; CPU:$D814 PRG:1814 A0 00 @D814: - cmp $000C,y - beq $D79D + cmp $000C,y ; CPU:$D816 PRG:1816 D9 0C 00 + beq $D79D ; CPU:$D819 PRG:1819 F0 82 - iny - cpy #$04 - bne @D814 + iny ; CPU:$D81B PRG:181B C8 + cpy #$04 ; CPU:$D81C PRG:181C C0 04 + bne @D814 ; CPU:$D81E PRG:181E D0 F6 - rts + rts ; CPU:$D820 PRG:1820 60 ;============================================================================== ; $D821-$D870: Select Entity Movement Parameters @@ -7417,80 +7220,80 @@ SelectEntityDirectionTowardTarget: ;============================================================================== SelectEntityMovementSpeed: - lda $B8,x - cmp #$06 - beq @D864 + lda $B8,x ; CPU:$D821 PRG:1821 B5 B8 + cmp #$06 ; CPU:$D823 PRG:1823 C9 06 + beq @D864 ; CPU:$D825 PRG:1825 F0 41 - ldy #$02 + ldy #$02 ; CPU:$D827 PRG:1827 A0 02 - lda ($02),y - cmp #$70 - bne @D843 + lda ($02),y ; CPU:$D829 PRG:1829 B1 02 + cmp #$70 ; CPU:$D82B PRG:182B C9 70 + bne @D843 ; CPU:$D82D PRG:182D D0 15 - ldy #$00 + ldy #$00 ; CPU:$D82F PRG:182F A0 00 - lda ($02),y - cmp #$90 - bcs @D83D + lda ($02),y ; CPU:$D831 PRG:1831 B1 02 + cmp #$90 ; CPU:$D833 PRG:1833 C9 90 + bcs @D83D ; CPU:$D835 PRG:1835 B0 04 - cmp #$30 - bcs @D843 + cmp #$30 ; CPU:$D837 PRG:1837 C9 30 + bcs @D843 ; CPU:$D839 PRG:1839 B0 09 @D83D: - lda $B3 - sta $C2,x + lda $B3 ; CPU:$D83B PRG:183B A5 B3 + sta $C2,x ; CPU:$D83D PRG:183D 95 C2 - lda $B4 - sta $C3,x + lda $B4 ; CPU:$D83F PRG:183F A5 B4 + sta $C3,x ; CPU:$D841 PRG:1841 95 C3 - rts + rts ; CPU:$D843 PRG:1843 60 @D843: - lda $04 - and $88 - bne @D85A + lda $04 ; CPU:$D844 PRG:1844 A5 04 + and $88 ; CPU:$D846 PRG:1846 25 88 + bne @D85A ; CPU:$D848 PRG:1848 D0 15 - txa - bne @D854 + txa ; CPU:$D84A PRG:184A 8A + bne @D854 ; CPU:$D84B PRG:184B D0 09 - lda $CA - sta $C2 + lda $CA ; CPU:$D84D PRG:184D A5 CA + sta $C2 ; CPU:$D84F PRG:184F 85 C2 - lda $CB - sta $C3 + lda $CB ; CPU:$D851 PRG:1851 A5 CB + sta $C3 ; CPU:$D853 PRG:1853 85 C3 - rts + rts ; CPU:$D855 PRG:1855 60 @D854: - lda $AF - sta $C2,x + lda $AF ; CPU:$D856 PRG:1856 A5 AF + sta $C2,x ; CPU:$D858 PRG:1858 95 C2 - lda $B0 - sta $C3,x + lda $B0 ; CPU:$D85A PRG:185A A5 B0 + sta $C3,x ; CPU:$D85C PRG:185C 95 C3 - rts + rts ; CPU:$D85E PRG:185E 60 @D85A: - lda $B1 - sta $C2,x + lda $B1 ; CPU:$D85F PRG:185F A5 B1 + sta $C2,x ; CPU:$D861 PRG:1861 95 C2 - lda $B2 - sta $C3,x + lda $B2 ; CPU:$D863 PRG:1863 A5 B2 + sta $C3,x ; CPU:$D865 PRG:1865 95 C3 - rts + rts ; CPU:$D867 PRG:1867 60 @D864: - lda #$00 - sta $C2,x + lda #$00 ; CPU:$D868 PRG:1868 A9 00 + sta $C2,x ; CPU:$D86A PRG:186A 95 C2 - lda #$02 - sta $C3,x + lda #$02 ; CPU:$D86C PRG:186C A9 02 + sta $C3,x ; CPU:$D86E PRG:186E 95 C3 - rts + rts ; CPU:$D870 PRG:1870 60 ;============================================================================== ; $D871-$D880: Entity Direction Priority Table @@ -7517,14 +7320,14 @@ SelectEntityMovementSpeed: ;============================================================================== EntityDirectionPriorityTable: - .byte $03,$02 - .byte $02,$03 - .byte $03,$00 - .byte $00,$03 - .byte $01,$02 - .byte $02,$01 - .byte $01,$00 - .byte $00,$01 + .byte $03,$02 ; CPU:$D871 PRG:1871 03 02 + .byte $02,$03 ; CPU:$D873 PRG:1873 02 03 + .byte $03,$00 ; CPU:$D875 PRG:1875 03 00 + .byte $00,$03 ; CPU:$D877 PRG:1877 00 03 + .byte $01,$02 ; CPU:$D879 PRG:1879 01 02 + .byte $02,$01 ; CPU:$D87B PRG:187B 02 01 + .byte $01,$00 ; CPU:$D87D PRG:187D 01 00 + .byte $00,$01 ; CPU:$D87F PRG:187F 00 01 ;============================================================================== ; $D881-$D884: Entity Path/Map Pointer Table @@ -7547,52 +7350,52 @@ EntityDirectionPriorityTable: ;============================================================================== EntityPathParameterTable: - .word $0000 - .word $082C + .word $0000 ; CPU:$D881 PRG:1881 00 00 + .word $082C ; CPU:$D883 PRG:1883 2C 08 ;============================================================================== ; $D885-$D8D4: Entity Primary State $02 Handler ;============================================================================== UpdateEntityState02: - lda #$00 - tay - sta $05 + lda #$00 ; CPU:$D885 PRG:1885 A9 00 + tay ; CPU:$D887 PRG:1887 A8 + sta $05 ; CPU:$D888 PRG:1888 85 05 - lda #$80 - sta $06 + lda #$80 ; CPU:$D88A PRG:188A A9 80 + sta $06 ; CPU:$D88C PRG:188C 85 06 - lda ($02),y - cmp #$60 - beq UpdateEntityState02SecondaryPhase + lda ($02),y ; CPU:$D88E PRG:188E B1 02 + cmp #$60 ; CPU:$D890 PRG:1890 C9 60 + beq UpdateEntityState02SecondaryPhase ; CPU:$D892 PRG:1892 F0 1E - bcc @D89C + bcc @D89C ; CPU:$D894 PRG:1894 90 06 - dec $05 + dec $05 ; CPU:$D896 PRG:1896 C6 05 - lda #$01 - bne @D89E + lda #$01 ; CPU:$D898 PRG:1898 A9 01 + bne @D89E ; CPU:$D89A PRG:189A D0 02 @D89C: - lda #$03 + lda #$03 ; CPU:$D89C PRG:189C A9 03 @D89E: - sta $B9,x + sta $B9,x ; CPU:$D89E PRG:189E 95 B9 - ldy #$01 + ldy #$01 ; CPU:$D8A0 PRG:18A0 A0 01 - lda ($02),y - clc - adc $06 - sta ($02),y + lda ($02),y ; CPU:$D8A2 PRG:18A2 B1 02 + clc ; CPU:$D8A4 PRG:18A4 18 + adc $06 ; CPU:$D8A5 PRG:18A5 65 06 + sta ($02),y ; CPU:$D8A7 PRG:18A7 91 02 - ldy #$00 + ldy #$00 ; CPU:$D8A9 PRG:18A9 A0 00 - lda ($02),y - adc $05 - sta ($02),y + lda ($02),y ; CPU:$D8AB PRG:18AB B1 02 + adc $05 ; CPU:$D8AD PRG:18AD 65 05 + sta ($02),y ; CPU:$D8AF PRG:18AF 91 02 - rts + rts ; CPU:$D8B1 PRG:18B1 60 ;============================================================================== @@ -7600,35 +7403,35 @@ UpdateEntityState02: ;============================================================================== UpdateEntityState02SecondaryPhase: - lda #$00 - sta $B9,x + lda #$00 ; CPU:$D8B2 PRG:18B2 A9 00 + sta $B9,x ; CPU:$D8B4 PRG:18B4 95 B9 - ldy #$03 + ldy #$03 ; CPU:$D8B6 PRG:18B6 A0 03 - lda ($02),y - sec - sbc #$80 - sta ($02),y + lda ($02),y ; CPU:$D8B8 PRG:18B8 B1 02 + sec ; CPU:$D8BA PRG:18BA 38 + sbc #$80 ; CPU:$D8BB PRG:18BB E9 80 + sta ($02),y ; CPU:$D8BD PRG:18BD 91 02 - ldy #$02 + ldy #$02 ; CPU:$D8BF PRG:18BF A0 02 - lda ($02),y - sbc #$00 - sta ($02),y + lda ($02),y ; CPU:$D8C1 PRG:18C1 B1 02 + sbc #$00 ; CPU:$D8C3 PRG:18C3 E9 00 + sta ($02),y ; CPU:$D8C5 PRG:18C5 91 02 - cmp #$58 - beq @D8CC + cmp #$58 ; CPU:$D8C7 PRG:18C7 C9 58 + beq @D8CC ; CPU:$D8C9 PRG:18C9 F0 01 - rts + rts ; CPU:$D8CB PRG:18CB 60 @D8CC: - lda #$01 - sta $B9,x + lda #$01 ; CPU:$D8CC PRG:18CC A9 01 + sta $B9,x ; CPU:$D8CE PRG:18CE 95 B9 - lda #$04 - sta $B8,x + lda #$04 ; CPU:$D8D0 PRG:18D0 A9 04 + sta $B8,x ; CPU:$D8D2 PRG:18D2 95 B8 - rts + rts ; CPU:$D8D4 PRG:18D4 60 ;============================================================================== @@ -7656,21 +7459,21 @@ UpdateEntityState02SecondaryPhase: ;============================================================================== EntityState00: - lda #$00 - sta $05 + lda #$00 ; CPU:$D8D5 PRG:18D5 A9 00 + sta $05 ; CPU:$D8D7 PRG:18D7 85 05 - lda #$80 - sta $06 + lda #$80 ; CPU:$D8D9 PRG:18D9 A9 80 + sta $06 ; CPU:$D8DB PRG:18DB 85 06 - ldy $B9,x + ldy $B9,x ; CPU:$D8DD PRG:18DD B4 B9 - lda EntityState00SubstateTable,y - sta $10 + lda EntityState00SubstateTable,y ; CPU:$D8DF PRG:18DF B9 EC D8 + sta $10 ; CPU:$D8E2 PRG:18E2 85 10 - lda EntityState00SubstateTable+1,y - sta $11 + lda EntityState00SubstateTable+1,y ; CPU:$D8E4 PRG:18E4 B9 ED D8 + sta $11 ; CPU:$D8E7 PRG:18E7 85 11 - jmp ($0010) + jmp ($0010) ; CPU:$D8E9 PRG:18E9 6C 10 00 F0 D8 ;============================================================================== @@ -7678,15 +7481,15 @@ EntityState00: ;============================================================================== EntityState00SubstateTable: - .word UpdateEntityState00MovingNegative - .word UpdateEntityState00MovingPositive + .word UpdateEntityState00MovingNegative ; CPU:$D8EC PRG:18EC F0 D8 + .word UpdateEntityState00MovingPositive ; CPU:$D8EE PRG:18EE F2 D8 ;------------------------------------------------------------------------------ ; $D8F0: secondary state $00 ;------------------------------------------------------------------------------ UpdateEntityState00MovingNegative: - dec $05 + dec $05 ; CPU:$D8F0 PRG:18F0 C6 05 ;------------------------------------------------------------------------------ @@ -7694,37 +7497,37 @@ UpdateEntityState00MovingNegative: ;------------------------------------------------------------------------------ UpdateEntityState00MovingPositive: - ldy #$03 + ldy #$03 ; CPU:$D8F2 PRG:18F2 A0 03 - lda ($02),y - clc - adc $06 - sta ($02),y + lda ($02),y ; CPU:$D8F4 PRG:18F4 B1 02 + clc ; CPU:$D8F6 PRG:18F6 18 + adc $06 ; CPU:$D8F7 PRG:18F7 65 06 + sta ($02),y ; CPU:$D8F9 PRG:18F9 91 02 - ldy #$02 + ldy #$02 ; CPU:$D8FB PRG:18FB A0 02 - lda ($02),y - adc $05 - sta ($02),y + lda ($02),y ; CPU:$D8FD PRG:18FD B1 02 + adc $05 ; CPU:$D8FF PRG:18FF 65 05 + sta ($02),y ; CPU:$D901 PRG:1901 91 02 - cmp #$69 - bcs @D90B + cmp #$69 ; CPU:$D903 PRG:1903 C9 69 + bcs @D90B ; CPU:$D905 PRG:1905 B0 04 - lda #$02 - bne @D911 + lda #$02 ; CPU:$D907 PRG:1907 A9 02 + bne @D911 ; CPU:$D909 PRG:1909 D0 06 @D90B: - cmp #$70 - bcc @D913 + cmp #$70 ; CPU:$D90B PRG:190B C9 70 + bcc @D913 ; CPU:$D90D PRG:190D 90 04 - lda #$00 + lda #$00 ; CPU:$D90F PRG:190F A9 00 @D911: - sta $B9,x + sta $B9,x ; CPU:$D911 PRG:1911 95 B9 @D913: - rts + rts ; CPU:$D913 PRG:1913 60 ;============================================================================== ; $D914-$D943: Update Four Gameplay Entity States ; @@ -7761,45 +7564,45 @@ UpdateEntityState00MovingPositive: ;============================================================================== UpdateEntityMovementStates: - ldx #$00 + ldx #$00 ; CPU:$D914 PRG:1914 A2 00 - lda #$2F - sta $00 + lda #$2F ; CPU:$D916 PRG:1916 A9 2F + sta $00 ; CPU:$D918 PRG:1918 85 00 - lda #$02 - sta $01 + lda #$02 ; CPU:$D91A PRG:191A A9 02 + sta $01 ; CPU:$D91C PRG:191C 85 01 - lda #$1E - sta $02 + lda #$1E ; CPU:$D91E PRG:191E A9 1E + sta $02 ; CPU:$D920 PRG:1920 85 02 - lda #$00 - sta $03 + lda #$00 ; CPU:$D922 PRG:1922 A9 00 + sta $03 ; CPU:$D924 PRG:1924 85 03 - lda #$01 - sta $04 + lda #$01 ; CPU:$D926 PRG:1926 A9 01 + sta $04 ; CPU:$D928 PRG:1928 85 04 @D92A: - jsr $D944 + jsr $D944 ; CPU:$D92A PRG:192A 20 44 D9 - lda $00 - clc - adc #$04 - sta $00 + lda $00 ; CPU:$D92D PRG:192D A5 00 + clc ; CPU:$D92F PRG:192F 18 + adc #$04 ; CPU:$D930 PRG:1930 69 04 + sta $00 ; CPU:$D932 PRG:1932 85 00 - lda $02 - clc - adc #$04 - sta $02 + lda $02 ; CPU:$D934 PRG:1934 A5 02 + clc ; CPU:$D936 PRG:1936 18 + adc #$04 ; CPU:$D937 PRG:1937 69 04 + sta $02 ; CPU:$D939 PRG:1939 85 02 - asl $04 + asl $04 ; CPU:$D93B PRG:193B 06 - inx - inx + inx ; CPU:$D93C PRG:193C 04 + inx ; CPU:$D93D PRG:193D E8 - cpx #$08 - bne @D92A + cpx #$08 ; CPU:$D93E PRG:193E E8 E0 + bne @D92A ; CPU:$D940 PRG:1940 08 D0 - rts + rts ; CPU:$D942 PRG:1942 E7 ;============================================================================== ; $D944-$D952: Gameplay Entity Transition-State Dispatcher @@ -7826,15 +7629,15 @@ UpdateEntityMovementStates: ;============================================================================== DispatchEntityMovementState: - ldy $B8,x + ldy $B8,x ; CPU:$D944 PRG:1944 B4 B8 - lda EntityMovementStateHandlerTable,y - sta $10 + lda EntityMovementStateHandlerTable,y ; CPU:$D946 PRG:1946 B9 53 D9 + sta $10 ; CPU:$D949 PRG:1949 85 10 - lda EntityMovementStateHandlerTable+1,y - sta $11 + lda EntityMovementStateHandlerTable+1,y ; CPU:$D94B PRG:194B B9 54 D9 + sta $11 ; CPU:$D94E PRG:194E 85 11 - jmp ($0010) + jmp ($0010) ; CPU:$D950 PRG:1950 6C 10 00 5D D9 ;============================================================================== @@ -7855,11 +7658,11 @@ DispatchEntityMovementState: ;============================================================================== EntityMovementStateHandlerTable: - .word EntityMovementStateNoOp ; state $00 - .word EntityMovementStateNoOp ; state $02 - .word EntityMovementStateNoOp ; state $04 - .word DispatchEntitySecondaryState ; state $06 - .word EntityMovementStateNoOp ; state $08 + .word EntityMovementStateNoOp ; state $00 ; CPU:$D953 PRG:1953 5D D9 + .word EntityMovementStateNoOp ; state $02 ; CPU:$D955 PRG:1955 5D D9 + .word EntityMovementStateNoOp ; state $04 ; CPU:$D957 PRG:1957 5D D9 + .word DispatchEntitySecondaryState ; state $06 ; CPU:$D959 PRG:1959 A1 D5 + .word EntityMovementStateNoOp ; state $08 ; CPU:$D95B PRG:195B 5D D9 ;============================================================================== ; $D95D: No-Op Entity Transition Handler @@ -7872,7 +7675,7 @@ EntityMovementStateHandlerTable: ; $00, $02, $04 and $08. ;============================================================================== EntityMovementStateNoOp: - rts + rts ; CPU:$D95D PRG:195D 60 ;============================================================================== ; $D95E-$D979: Check Entity Transition State @@ -7899,53 +7702,53 @@ EntityMovementStateNoOp: ;============================================================================== UpdateEntityStatusFlags: - ldx #$00 - stx $00 + ldx #$00 ; CPU:$D95E PRG:195E A2 00 + stx $00 ; CPU:$D960 PRG:1960 86 00 @D962: - lda $B8,x - cmp #$06 - bne @D96C + lda $B8,x ; CPU:$D962 PRG:1962 B5 B8 + cmp #$06 ; CPU:$D964 PRG:1964 C9 06 + bne @D96C ; CPU:$D966 PRG:1966 D0 04 - sta $0608 - rts + sta $0608 ; CPU:$D968 PRG:1968 8D 08 06 + rts ; CPU:$D96B PRG:196B 60 @D96C: - inx - inx + inx ; CPU:$D96C PRG:196C E8 + inx ; CPU:$D96D PRG:196D E8 - cpx #$08 - bne @D962 + cpx #$08 ; CPU:$D96E PRG:196E E0 08 + bne @D962 ; CPU:$D970 PRG:1970 D0 F0 - lda $88 - beq UpdatePlayerVerticalRegionFlag + lda $88 ; CPU:$D972 PRG:1972 A5 88 + beq UpdatePlayerVerticalRegionFlag ; CPU:$D974 PRG:1974 F0 04 - sta $0609 + sta $0609 ; CPU:$D976 PRG:1976 8D 09 06 - rts + rts ; CPU:$D979 PRG:1979 60 ;============================================================================== ; $D97A-$D98D: Update Gameplay Range Flag ;============================================================================== UpdatePlayerVerticalRegionFlag: - ldy #$00 + ldy #$00 ; CPU:$D97A PRG:197A A0 00 - lda $6A - cmp #$88 - bcs @D988 + lda $6A ; CPU:$D97C PRG:197C A5 6A + cmp #$88 ; CPU:$D97E PRG:197E C9 88 + bcs @D988 ; CPU:$D980 PRG:1980 B0 06 - iny + iny ; CPU:$D982 PRG:1982 C8 - cmp #$42 - bcs @D988 + cmp #$42 ; CPU:$D983 PRG:1983 C9 42 + bcs @D988 ; CPU:$D985 PRG:1985 B0 01 - iny + iny ; CPU:$D987 PRG:1987 C8 @D988: - lda #$01 - sta $060A,y + lda #$01 ; CPU:$D988 PRG:1988 A9 01 + sta $060A,y ; CPU:$D98A PRG:198A 99 0A 06 - rts + rts ; CPU:$D98D PRG:198D 60 ;============================================================================== ; $D98E-$D9C5: Update Direction-Dependent Gameplay Value @@ -7961,54 +7764,54 @@ UpdatePlayerVerticalRegionFlag: ;============================================================================== UpdatePlayerDirectionAnimation: - lda $51 - asl - clc - adc #$02 - sta $00 + lda $51 ; CPU:$D98E PRG:198E A5 51 + asl ; CPU:$D990 PRG:1990 0A + clc ; CPU:$D991 PRG:1991 18 + adc #$02 ; CPU:$D992 PRG:1992 69 02 + sta $00 ; CPU:$D994 PRG:1994 85 00 - lda $1A - ora $1C - and #$07 - bne @D9AE + lda $1A ; CPU:$D996 PRG:1996 A5 1A + ora $1C ; CPU:$D998 PRG:1998 05 1C + and #$07 ; CPU:$D99A PRG:199A 29 07 + bne @D9AE ; CPU:$D99C PRG:199C D0 10 - ldy $51 + ldy $51 ; CPU:$D99E PRG:199E A4 51 - lda $022B,y - and #$F0 - beq @D9AE + lda $022B,y ; CPU:$D9A0 PRG:19A0 B9 2B 02 + and #$F0 ; CPU:$D9A3 PRG:19A3 29 F0 + beq @D9AE ; CPU:$D9A5 PRG:19A5 F0 07 - lda $B7 - and #$03 - jmp @D9B2 + lda $B7 ; CPU:$D9A7 PRG:19A7 A5 B7 + and #$03 ; CPU:$D9A9 PRG:19A9 29 03 + jmp @D9B2 ; CPU:$D9AB PRG:19AB 4C B2 D9 @D9AE: - inc $B7 + inc $B7 ; CPU:$D9AE PRG:19AE E6 B7 - lda $B7 + lda $B7 ; CPU:$D9B0 PRG:19B0 A5 B7 @D9B2: - and #$07 - cmp #$06 - bcc @D9BC + and #$07 ; CPU:$D9B2 PRG:19B2 29 07 + cmp #$06 ; CPU:$D9B4 PRG:19B4 C9 06 + bcc @D9BC ; CPU:$D9B6 PRG:19B6 90 04 - lda #$01 - bne @D9C3 + lda #$01 ; CPU:$D9B8 PRG:19B8 A9 01 + bne @D9C3 ; CPU:$D9BA PRG:19BA D0 07 @D9BC: - tay + tay ; CPU:$D9BC PRG:19BC A8 - lda PlayerDirectionAnimationOffsets,y - clc - adc $00 + lda PlayerDirectionAnimationOffsets,y ; CPU:$D9BD PRG:19BD B9 C6 D9 + clc ; CPU:$D9C0 PRG:19C0 18 + adc $00 ; CPU:$D9C1 PRG:19C1 65 00 @D9C3: - sta $32 + sta $32 ; CPU:$D9C3 PRG:19C3 85 32 - rts + rts ; CPU:$D9C5 PRG:19C5 60 ;============================================================================== ; $D9C6-$D9CB: Direction-Value Offset Table @@ -8022,7 +7825,7 @@ UpdatePlayerDirectionAnimation: ;============================================================================== PlayerDirectionAnimationOffsets: - .byte $00,$00,$00,$01,$01,$00 + .byte $00,$00,$00,$01,$01,$00 ; CPU:$D9C6 PRG:19C6 00 00 00 01 01 00 ;============================================================================== ; $D9CC-$D9EA: Update Four Entity Display/State Values @@ -8058,35 +7861,35 @@ PlayerDirectionAnimationOffsets: ;============================================================================== UpdateEntitySpriteStates: - lda #$00 - tax - sta $00 + lda #$00 ; CPU:$D9CC PRG:19CC A9 00 + tax ; CPU:$D9CE PRG:19CE AA + sta $00 ; CPU:$D9CF PRG:19CF 85 00 - lda $4B - and #$08 - beq @D9DC + lda $4B ; CPU:$D9D1 PRG:19D1 A5 4B + and #$08 ; CPU:$D9D3 PRG:19D3 29 08 + beq @D9DC ; CPU:$D9D5 PRG:19D5 F0 04 - lda #$01 - sta $00 + lda #$01 ; CPU:$D9D7 PRG:19D7 A9 01 + sta $00 ; CPU:$D9D9 PRG:19D9 85 00 @D9DC: - lda #$01 - sta $01 + lda #$01 ; CPU:$D9DB PRG:19DB A9 01 + sta $01 ; CPU:$D9DD PRG:19DD 85 01 @D9E0: - jsr $D9EB + jsr $D9EB ; CPU:$D9DF PRG:19DF 20 EB D9 - asl $01 + asl $01 ; CPU:$D9E2 PRG:19E2 06 - inx - inx + inx ; CPU:$D9E3 PRG:19E3 01 + inx ; CPU:$D9E4 PRG:19E4 E8 - cpx #$08 - bne @D9E0 + cpx #$08 ; CPU:$D9E5 PRG:19E5 E8 E0 + bne @D9E0 ; CPU:$D9E7 PRG:19E7 08 D0 - rts + rts ; CPU:$D9E9 PRG:19E9 F5 ;============================================================================== @@ -8094,26 +7897,26 @@ UpdateEntitySpriteStates: ;============================================================================== DispatchEntitySpriteState: - ldy $B8,x + ldy $B8,x ; CPU:$D9EB PRG:19EB B4 B8 - lda EntitySpriteStateHandlerTable,y - sta $10 + lda EntitySpriteStateHandlerTable,y ; CPU:$D9ED PRG:19ED B9 FA D9 + sta $10 ; CPU:$D9F0 PRG:19F0 85 10 - lda EntitySpriteStateHandlerTable+1,y - sta $11 + lda EntitySpriteStateHandlerTable+1,y ; CPU:$D9F2 PRG:19F2 B9 FB D9 + sta $11 ; CPU:$D9F5 PRG:19F5 85 11 - jmp ($0010) + jmp ($0010) ; CPU:$D9F7 PRG:19F7 6C 10 00 21 DA ;============================================================================== ; $D9FA-$DA03: Entity Display/State Table ;============================================================================== EntitySpriteStateHandlerTable: - .word UpdateNormalEntitySprite ; state $00 - .word UpdateNormalEntitySprite ; state $02 - .word UpdateNormalEntitySprite ; state $04 - .word UpdateSpecialEntitySprite ; state $06 - .word $D9EA ; state $08 -> shared RTS + .word UpdateNormalEntitySprite ; state $00 ; CPU:$D9FA PRG:19FA 21 DA + .word UpdateNormalEntitySprite ; state $02 ; CPU:$D9FC PRG:19FC 21 DA + .word UpdateNormalEntitySprite ; state $04 ; CPU:$D9FE PRG:19FE 21 DA + .word UpdateSpecialEntitySprite ; state $06 ; CPU:$DA00 PRG:1A00 2D DA + .word $D9EA ; state $08 -> shared RTS ; CPU:$DA02 PRG:1A02 EA D9 ;============================================================================== ; $DA04-$DA3F: Entity Display/State Value Handlers @@ -8158,10 +7961,10 @@ EntitySpriteStateHandlerTable: ;------------------------------------------------------------------------------ CalculateEntitySpriteValue: - lda $B9,x - sta $03 + lda $B9,x ; CPU:$DA04 PRG:1A04 B5 B9 + sta $03 ; CPU:$DA06 PRG:1A06 85 03 - lda #$0A + lda #$0A ; CPU:$DA08 PRG:1A08 A9 0A ;------------------------------------------------------------------------------ @@ -8169,12 +7972,12 @@ CalculateEntitySpriteValue: ;------------------------------------------------------------------------------ CalculateEntitySpriteValueLoop: - dec $03 - bmi AddEntitySpriteBase + dec $03 ; CPU:$DA0A PRG:1A0A C6 03 + bmi AddEntitySpriteBase ; CPU:$DA0C PRG:1A0C 30 05 - clc - adc #$02 - bne CalculateEntitySpriteValueLoop + clc ; CPU:$DA0E PRG:1A0E 18 + adc #$02 ; CPU:$DA0F PRG:1A0F 69 02 + bne CalculateEntitySpriteValueLoop ; CPU:$DA11 PRG:1A11 D0 F7 ;------------------------------------------------------------------------------ @@ -8182,9 +7985,9 @@ CalculateEntitySpriteValueLoop: ;------------------------------------------------------------------------------ AddEntitySpriteBase: - clc - adc $00 - sta $02 + clc ; CPU:$DA13 PRG:1A13 18 + adc $00 ; CPU:$DA14 PRG:1A14 65 00 + sta $02 ; CPU:$DA16 PRG:1A16 85 02 ;------------------------------------------------------------------------------ @@ -8192,14 +7995,14 @@ AddEntitySpriteBase: ;------------------------------------------------------------------------------ StoreEntitySpriteValue: - txa - lsr - tay + txa ; CPU:$DA18 PRG:1A18 8A + lsr ; CPU:$DA19 PRG:1A19 4A + tay ; CPU:$DA1A PRG:1A1A A8 - lda $02 - sta $0033,y + lda $02 ; CPU:$DA1B PRG:1A1B A5 02 + sta $0033,y ; CPU:$DA1D PRG:1A1D 99 33 00 - rts + rts ; CPU:$DA20 PRG:1A20 60 ;------------------------------------------------------------------------------ @@ -8208,14 +8011,14 @@ StoreEntitySpriteValue: ;------------------------------------------------------------------------------ UpdateNormalEntitySprite: - lda $01 - and $88 - beq CalculateEntitySpriteValue + lda $01 ; CPU:$DA21 PRG:1A21 A5 01 + and $88 ; CPU:$DA23 PRG:1A23 25 88 + beq CalculateEntitySpriteValue ; CPU:$DA25 PRG:1A25 F0 DD - lda #$1E - sta $02 + lda #$1E ; CPU:$DA27 PRG:1A27 A9 1E + sta $02 ; CPU:$DA29 PRG:1A29 85 02 - bne AddEntitySpriteBase + bne AddEntitySpriteBase ; CPU:$DA2B PRG:1A2B D0 E6 ;------------------------------------------------------------------------------ @@ -8224,10 +8027,10 @@ UpdateNormalEntitySprite: ;------------------------------------------------------------------------------ UpdateSpecialEntitySprite: - lda $B9,x - sta $03 + lda $B9,x ; CPU:$DA2D PRG:1A2D B5 B9 + sta $03 ; CPU:$DA2F PRG:1A2F 85 03 - lda #$20 + lda #$20 ; CPU:$DA31 PRG:1A31 A9 20 ;------------------------------------------------------------------------------ @@ -8235,12 +8038,12 @@ UpdateSpecialEntitySprite: ;------------------------------------------------------------------------------ UpdateSpecialEntitySpriteLoop: - dec $03 - bmi UpdateSpecialEntitySpriteDone + dec $03 ; CPU:$DA33 PRG:1A33 C6 03 + bmi UpdateSpecialEntitySpriteDone ; CPU:$DA35 PRG:1A35 30 05 - clc - adc #$01 - bne UpdateSpecialEntitySpriteLoop + clc ; CPU:$DA37 PRG:1A37 18 + adc #$01 ; CPU:$DA38 PRG:1A38 69 01 + bne UpdateSpecialEntitySpriteLoop ; CPU:$DA3A PRG:1A3A D0 F7 ;------------------------------------------------------------------------------ @@ -8248,9 +8051,9 @@ UpdateSpecialEntitySpriteLoop: ;------------------------------------------------------------------------------ UpdateSpecialEntitySpriteDone: - sta $02 + sta $02 ; CPU:$DA3C PRG:1A3C 85 02 - bmi StoreEntitySpriteValue + bmi StoreEntitySpriteValue ; CPU:$DA3E PRG:1A3E 30 D8 ;============================================================================== ; $DA40-$DAF0: Gameplay Entity Collision / Slot Exchange @@ -8284,139 +8087,139 @@ UpdateSpecialEntitySpriteDone: ;============================================================================== CheckEntityCollisions: - ldx #$23 + ldx #$23 ; CPU:$DA40 PRG:1A40 A2 23 @CopyWorkingState: - lda $1A,x - sta $0274,x + lda $1A,x ; CPU:$DA42 PRG:1A42 B5 1A + sta $0274,x ; CPU:$DA44 PRG:1A44 9D 74 02 - dex - bpl @CopyWorkingState + dex ; CPU:$DA47 PRG:1A47 CA + bpl @CopyWorkingState ; CPU:$DA48 PRG:1A48 10 F8 - lda #$84 - sta $00 + lda #$84 ; CPU:$DA4A PRG:1A4A A9 84 + sta $00 ; CPU:$DA4C PRG:1A4C 85 00 - lda #$02 - sta $01 + lda #$02 ; CPU:$DA4E PRG:1A4E A9 02 + sta $01 ; CPU:$DA50 PRG:1A50 85 01 - lda #$08 - sta $03 + lda #$08 ; CPU:$DA52 PRG:1A52 A9 08 + sta $03 ; CPU:$DA54 PRG:1A54 85 03 - lda #$03 - sta $02 + lda #$03 ; CPU:$DA56 PRG:1A56 A9 03 + sta $02 ; CPU:$DA58 PRG:1A58 85 02 @CheckNextEntity: - lda $03 - and $88 - bne @AdvanceEntity + lda $03 ; CPU:$DA5A PRG:1A5A A5 03 + and $88 ; CPU:$DA5C PRG:1A5C 25 88 + bne @AdvanceEntity ; CPU:$DA5E PRG:1A5E D0 7B - ldy #$00 + ldy #$00 ; CPU:$DA60 PRG:1A60 A0 00 - lda $0274 - cmp ($00),y - bcs @FirstAxisReverse + lda $0274 ; CPU:$DA62 PRG:1A62 AD 74 02 + cmp ($00),y ; CPU:$DA65 PRG:1A65 D1 00 + bcs @FirstAxisReverse ; CPU:$DA67 PRG:1A67 B0 08 - lda ($00),y - sec - sbc $0274 - bcs @CheckFirstAxis + lda ($00),y ; CPU:$DA69 PRG:1A69 B1 00 + sec ; CPU:$DA6B PRG:1A6B 38 + sbc $0274 ; CPU:$DA6C PRG:1A6C ED 74 02 + bcs @CheckFirstAxis ; CPU:$DA6F PRG:1A6F B0 02 @FirstAxisReverse: - sbc ($00),y + sbc ($00),y ; CPU:$DA71 PRG:1A71 F1 00 @CheckFirstAxis: - cmp #$19 - bcs @AdvanceEntity + cmp #$19 ; CPU:$DA73 PRG:1A73 C9 19 + bcs @AdvanceEntity ; CPU:$DA75 PRG:1A75 B0 64 - sta $04 + sta $04 ; CPU:$DA77 PRG:1A77 85 04 - ldy #$02 + ldy #$02 ; CPU:$DA79 PRG:1A79 A0 02 - lda $0276 - cmp ($00),y - bcs @SecondAxisReverse + lda $0276 ; CPU:$DA7B PRG:1A7B AD 76 02 + cmp ($00),y ; CPU:$DA7E PRG:1A7E D1 00 + bcs @SecondAxisReverse ; CPU:$DA80 PRG:1A80 B0 08 - lda ($00),y - sec - sbc $0276 - bcs @CheckSecondAxis + lda ($00),y ; CPU:$DA82 PRG:1A82 B1 00 + sec ; CPU:$DA84 PRG:1A84 38 + sbc $0276 ; CPU:$DA85 PRG:1A85 ED 76 02 + bcs @CheckSecondAxis ; CPU:$DA88 PRG:1A88 B0 02 @SecondAxisReverse: - sbc ($00),y + sbc ($00),y ; CPU:$DA8A PRG:1A8A F1 00 @CheckSecondAxis: - cmp #$19 - bcs @AdvanceEntity + cmp #$19 ; CPU:$DA8C PRG:1A8C C9 19 + bcs @AdvanceEntity ; CPU:$DA8E PRG:1A8E B0 4B - adc $04 - cmp #$10 - bcs @AdvanceEntity + adc $04 ; CPU:$DA90 PRG:1A90 65 04 + cmp #$10 ; CPU:$DA92 PRG:1A92 C9 10 + bcs @AdvanceEntity ; CPU:$DA94 PRG:1A94 B0 45 ; Save the primary slot coordinates/state. - lda $0274 - sta $03 + lda $0274 ; CPU:$DA96 PRG:1A96 AD 74 02 + sta $03 ; CPU:$DA99 PRG:1A99 85 03 - lda $0276 - sta $04 + lda $0276 ; CPU:$DA9B PRG:1A9B AD 76 02 + sta $04 ; CPU:$DA9E PRG:1A9E 85 04 - lda $028C - sta $05 + lda $028C ; CPU:$DAA0 PRG:1AA0 AD 8C 02 + sta $05 ; CPU:$DAA3 PRG:1AA3 85 05 - lda $0292 - sta $06 + lda $0292 ; CPU:$DAA5 PRG:1AA5 AD 92 02 + sta $06 ; CPU:$DAA8 PRG:1AA8 85 06 ; Copy selected entity coordinates into the primary slot. - ldy #$00 - lda ($00),y - sta $0274 + ldy #$00 ; CPU:$DAAA PRG:1AAA A0 00 + lda ($00),y ; CPU:$DAAC PRG:1AAC B1 00 + sta $0274 ; CPU:$DAAE PRG:1AAE 8D 74 02 - lda $03 - sta ($00),y + lda $03 ; CPU:$DAB1 PRG:1AB1 A5 03 + sta ($00),y ; CPU:$DAB3 PRG:1AB3 91 00 - ldy #$02 - lda ($00),y - sta $0276 + ldy #$02 ; CPU:$DAB5 PRG:1AB5 A0 02 + lda ($00),y ; CPU:$DAB7 PRG:1AB7 B1 00 + sta $0276 ; CPU:$DAB9 PRG:1AB9 8D 76 02 - lda $04 - sta ($00),y + lda $04 ; CPU:$DABC PRG:1ABC A5 04 + sta ($00),y ; CPU:$DABE PRG:1ABE 91 00 ; Exchange the parallel status values. - ldx $02 + ldx $02 ; CPU:$DAC0 PRG:1AC0 A6 02 - lda $028D,x - sta $028C + lda $028D,x ; CPU:$DAC2 PRG:1AC2 BD 8D 02 + sta $028C ; CPU:$DAC5 PRG:1AC5 8D 8C 02 - lda $05 - sta $028D,x + lda $05 ; CPU:$DAC8 PRG:1AC8 A5 05 + sta $028D,x ; CPU:$DACA PRG:1ACA 9D 8D 02 - lda $0293,x - sta $0292 + lda $0293,x ; CPU:$DACD PRG:1ACD BD 93 02 + sta $0292 ; CPU:$DAD0 PRG:1AD0 8D 92 02 - lda $06 - sta $0293,x + lda $06 ; CPU:$DAD3 PRG:1AD3 A5 06 + sta $0293,x ; CPU:$DAD5 PRG:1AD5 9D 93 02 - jmp $DAEB + jmp $DAEB ; CPU:$DAD8 PRG:1AD8 4C EB DA @AdvanceEntity: - lda $00 - sec - sbc #$04 - sta $00 + lda $00 ; CPU:$DADB PRG:1ADB A5 00 + sec ; CPU:$DADD PRG:1ADD 38 + sbc #$04 ; CPU:$DADE PRG:1ADE E9 04 + sta $00 ; CPU:$DAE0 PRG:1AE0 85 00 - lsr $03 + lsr $03 ; CPU:$DAE2 PRG:1AE2 46 - dec $02 - bmi @NoCollision + dec $02 ; CPU:$DAE3 PRG:1AE3 03 C6 + bmi @NoCollision ; CPU:$DAE5 PRG:1AE5 02 30 - jmp @CheckNextEntity + jmp @CheckNextEntity ; CPU:$DAE7 PRG:1AE7 03 4C 5A @NoCollision: - jsr $E1DA + jsr $E1DA ; CPU:$DAEA PRG:1AEA DA 20 DA - jmp $DAF1 + jmp $DAF1 ; CPU:$DAED PRG:1AED E1 4C F1 ;============================================================================== ; $DAF1-$DBEE: Rebuild Gameplay Entity Render Data @@ -8457,20 +8260,20 @@ CheckEntityCollisions: ; code and the base of a later indexed lookup. ;============================================================================== BuildEntitySpriteBuffer: - lda #$74 - sta $00 + lda #$74 ; CPU:$DAF1 PRG:1AF1 A9 74 + sta $00 ; CPU:$DAF3 PRG:1AF3 85 00 - lda #$02 - sta $01 + lda #$02 ; CPU:$DAF5 PRG:1AF5 A9 02 + sta $01 ; CPU:$DAF7 PRG:1AF7 85 01 - lda #$00 - sta $02 + lda #$00 ; CPU:$DAF9 PRG:1AF9 A9 00 + sta $02 ; CPU:$DAFB PRG:1AFB 85 02 - lda #$07 - sta $03 + lda #$07 ; CPU:$DAFD PRG:1AFD A9 07 + sta $03 ; CPU:$DAFF PRG:1AFF 85 03 - lda #$00 - sta $04 + lda #$00 ; CPU:$DB01 PRG:1B01 A9 00 + sta $04 ; CPU:$DB03 PRG:1B03 85 04 ;------------------------------------------------------------------------------ @@ -8479,10 +8282,10 @@ BuildEntitySpriteBuffer: ;------------------------------------------------------------------------------ BuildSpriteBufferNextGroup: - lda #$00 - sta $05 + lda #$00 ; CPU:$DB05 PRG:1B05 A9 00 + sta $05 ; CPU:$DB07 PRG:1B07 85 05 - tax + tax ; CPU:$DB09 PRG:1B09 AA ;------------------------------------------------------------------------------ @@ -8491,13 +8294,13 @@ BuildSpriteBufferNextGroup: ;------------------------------------------------------------------------------ BuildSpriteBufferNextSprite: - ldy #$02 + ldy #$02 ; CPU:$DB0A PRG:1B0A A0 02 - lda ($00),y - bne AdjustSpriteY + lda ($00),y ; CPU:$DB0C PRG:1B0C B1 00 + bne AdjustSpriteY ; CPU:$DB0E PRG:1B0E D0 04 - lda #$FF - bne StoreSpriteY + lda #$FF ; CPU:$DB10 PRG:1B10 A9 FF + bne StoreSpriteY ; CPU:$DB12 PRG:1B12 D0 04 ;------------------------------------------------------------------------------ @@ -8505,8 +8308,8 @@ BuildSpriteBufferNextSprite: ;------------------------------------------------------------------------------ AdjustSpriteY: - clc - adc EntitySpriteCoordinateOffsets,x + clc ; CPU:$DB14 PRG:1B14 18 + adc EntitySpriteCoordinateOffsets,x ; CPU:$DB15 PRG:1B15 7D 56 DE ;------------------------------------------------------------------------------ @@ -8514,23 +8317,23 @@ AdjustSpriteY: ;------------------------------------------------------------------------------ StoreSpriteY: - ldy #$00 - sta ($02),y + ldy #$00 ; CPU:$DB18 PRG:1B18 A0 00 + sta ($02),y ; CPU:$DB1A PRG:1B1A 91 02 - ldy $04 + ldy $04 ; CPU:$DB1C PRG:1B1C A4 04 - lda $028C,y - asl - rol - rol - and #$03 + lda $028C,y ; CPU:$DB1E PRG:1B1E B9 8C 02 + asl ; CPU:$DB21 PRG:1B21 0A + rol ; CPU:$DB22 PRG:1B22 2A + rol ; CPU:$DB23 PRG:1B23 2A + and #$03 ; CPU:$DB24 PRG:1B24 29 03 - beq BuildSpriteClass0 + beq BuildSpriteClass0 ; CPU:$DB26 PRG:1B26 F0 29 - cmp #$02 - beq BuildSpriteClass2 + cmp #$02 ; CPU:$DB28 PRG:1B28 C9 02 + beq BuildSpriteClass2 ; CPU:$DB2A PRG:1B2A F0 6B - bcc BuildSpriteClass1 + bcc BuildSpriteClass1 ; CPU:$DB2C PRG:1B2C 90 46 ;------------------------------------------------------------------------------ @@ -8538,30 +8341,30 @@ StoreSpriteY: ; Status-class path. ;------------------------------------------------------------------------------ - lda $028C,y - asl - asl - clc - adc $05 - tay + lda $028C,y ; CPU:$DB2E PRG:1B2E B9 8C 02 + asl ; CPU:$DB31 PRG:1B31 0A + asl ; CPU:$DB32 PRG:1B32 0A + clc ; CPU:$DB33 PRG:1B33 18 + adc $05 ; CPU:$DB34 PRG:1B34 65 05 + tay ; CPU:$DB36 PRG:1B36 A8 - sta $06 + sta $06 ; CPU:$DB37 PRG:1B37 85 06 - lda $DD22,y + lda $DD22,y ; CPU:$DB39 PRG:1B39 B9 22 DD - ldy #$01 - sta ($02),y + ldy #$01 ; CPU:$DB3C PRG:1B3C A0 01 + sta ($02),y ; CPU:$DB3E PRG:1B3E 91 02 - ldy $04 - lda $0292,y + ldy $04 ; CPU:$DB40 PRG:1B40 A4 04 + lda $0292,y ; CPU:$DB42 PRG:1B42 B9 92 02 - ldy $06 - ora EntitySpriteCoordinateOffsets,y + ldy $06 ; CPU:$DB45 PRG:1B45 A4 06 + ora EntitySpriteCoordinateOffsets,y ; CPU:$DB47 PRG:1B47 19 56 DE - ldy #$02 - sta ($02),y + ldy #$02 ; CPU:$DB4A PRG:1B4A A0 02 + sta ($02),y ; CPU:$DB4C PRG:1B4C 91 02 - jmp BuildSpriteX + jmp BuildSpriteX ; CPU:$DB4E PRG:1B4E 4C B7 DB ;------------------------------------------------------------------------------ @@ -8569,88 +8372,88 @@ StoreSpriteY: ;------------------------------------------------------------------------------ BuildSpriteClass0: - lda $028C,y - asl - asl - clc - adc $05 - tay + lda $028C,y ; CPU:$DB51 PRG:1B51 B9 8C 02 + asl ; CPU:$DB54 PRG:1B54 0A + asl ; CPU:$DB55 PRG:1B55 0A + clc ; CPU:$DB56 PRG:1B56 18 + adc $05 ; CPU:$DB57 PRG:1B57 65 05 + tay ; CPU:$DB59 PRG:1B59 A8 - sta $06 + sta $06 ; CPU:$DB5A PRG:1B5A 85 06 - lda $DBEE,y + lda $DBEE,y ; CPU:$DB5C PRG:1B5C B9 EE DB - ldy #$01 - sta ($02),y + ldy #$01 ; CPU:$DB5F PRG:1B5F A0 01 + sta ($02),y ; CPU:$DB61 PRG:1B61 91 02 - ldy $04 - lda $0292,y + ldy $04 ; CPU:$DB63 PRG:1B63 A4 04 + lda $0292,y ; CPU:$DB65 PRG:1B65 B9 92 02 - ldy $06 - ora $DD22,y + ldy $06 ; CPU:$DB68 PRG:1B68 A4 06 + ora $DD22,y ; CPU:$DB6A PRG:1B6A 19 22 DD - ldy #$02 - sta ($02),y + ldy #$02 ; CPU:$DB6D PRG:1B6D A0 02 + sta ($02),y ; CPU:$DB6F PRG:1B6F 91 02 - jmp BuildSpriteX + jmp BuildSpriteX ; CPU:$DB71 PRG:1B71 4C B7 DB ;------------------------------------------------------------------------------ ; $DB74 ;------------------------------------------------------------------------------ BuildSpriteClass1: - lda $028C,y - asl - asl - clc - adc $05 - tay + lda $028C,y ; CPU:$DB74 PRG:1B74 B9 8C 02 + asl ; CPU:$DB77 PRG:1B77 0A + asl ; CPU:$DB78 PRG:1B78 0A + clc ; CPU:$DB79 PRG:1B79 18 + adc $05 ; CPU:$DB7A PRG:1B7A 65 05 + tay ; CPU:$DB7C PRG:1B7C A8 - sta $06 + sta $06 ; CPU:$DB7D PRG:1B7D 85 06 - lda $DCEE,y + lda $DCEE,y ; CPU:$DB7F PRG:1B7F B9 EE DC - ldy #$01 - sta ($02),y + ldy #$01 ; CPU:$DB82 PRG:1B82 A0 01 + sta ($02),y ; CPU:$DB84 PRG:1B84 91 02 - ldy $04 - lda $0292,y + ldy $04 ; CPU:$DB86 PRG:1B86 A4 04 + lda $0292,y ; CPU:$DB88 PRG:1B88 B9 92 02 - ldy $06 - ora $DE22,y + ldy $06 ; CPU:$DB8B PRG:1B8B A4 06 + ora $DE22,y ; CPU:$DB8D PRG:1B8D 19 22 DE - ldy #$02 - sta ($02),y + ldy #$02 ; CPU:$DB90 PRG:1B90 A0 02 + sta ($02),y ; CPU:$DB92 PRG:1B92 91 02 - jmp BuildSpriteX + jmp BuildSpriteX ; CPU:$DB94 PRG:1B94 4C B7 DB ;------------------------------------------------------------------------------ ; $DB97 ;------------------------------------------------------------------------------ BuildSpriteClass2: - lda $028C,y - asl - asl - clc - adc $05 - tay + lda $028C,y ; CPU:$DB97 PRG:1B97 B9 8C 02 + asl ; CPU:$DB9A PRG:1B9A 0A + asl ; CPU:$DB9B PRG:1B9B 0A + clc ; CPU:$DB9C PRG:1B9C 18 + adc $05 ; CPU:$DB9D PRG:1B9D 65 05 + tay ; CPU:$DB9F PRG:1B9F A8 - sta $06 + sta $06 ; CPU:$DBA0 PRG:1BA0 85 06 - lda $DD22,y + lda $DD22,y ; CPU:$DBA2 PRG:1BA2 B9 22 DD - ldy #$01 - sta ($02),y + ldy #$01 ; CPU:$DBA5 PRG:1BA5 A0 01 + sta ($02),y ; CPU:$DBA7 PRG:1BA7 91 02 - ldy $04 - lda $0292,y + ldy $04 ; CPU:$DBA9 PRG:1BA9 A4 04 + lda $0292,y ; CPU:$DBAB PRG:1BAB B9 92 02 - ldy $06 - ora EntitySpriteCoordinateOffsets,y + ldy $06 ; CPU:$DBAE PRG:1BAE A4 06 + ora EntitySpriteCoordinateOffsets,y ; CPU:$DBB0 PRG:1BB0 19 56 DE - ldy #$02 - sta ($02),y + ldy #$02 ; CPU:$DBB3 PRG:1BB3 A0 02 + sta ($02),y ; CPU:$DBB5 PRG:1BB5 91 02 ;------------------------------------------------------------------------------ @@ -8659,13 +8462,13 @@ BuildSpriteClass2: ;------------------------------------------------------------------------------ BuildSpriteX: - ldy #$00 + ldy #$00 ; CPU:$DBB7 PRG:1BB7 A0 00 - lda ($00),y - bne AdjustSpriteX + lda ($00),y ; CPU:$DBB9 PRG:1BB9 B1 00 + bne AdjustSpriteX ; CPU:$DBBB PRG:1BBB D0 04 - lda #$FF - bne StoreSpriteX + lda #$FF ; CPU:$DBBD PRG:1BBD A9 FF + bne StoreSpriteX ; CPU:$DBBF PRG:1BBF D0 04 ;------------------------------------------------------------------------------ @@ -8673,8 +8476,8 @@ BuildSpriteX: ;------------------------------------------------------------------------------ AdjustSpriteX: - clc - adc EntitySpriteCoordinateOffsets+1,x + clc ; CPU:$DBC1 PRG:1BC1 18 + adc EntitySpriteCoordinateOffsets+1,x ; CPU:$DBC2 PRG:1BC2 7D 57 DE ;------------------------------------------------------------------------------ @@ -8682,42 +8485,42 @@ AdjustSpriteX: ;------------------------------------------------------------------------------ StoreSpriteX: - ldy #$03 - sta ($02),y + ldy #$03 ; CPU:$DBC5 PRG:1BC5 A0 03 + sta ($02),y ; CPU:$DBC7 PRG:1BC7 91 02 ; Advance destination by one 4-byte record. - lda $02 - clc - adc #$04 - sta $02 + lda $02 ; CPU:$DBC9 PRG:1BC9 A5 02 + clc ; CPU:$DBCB PRG:1BCB 18 + adc #$04 ; CPU:$DBCC PRG:1BCC 69 04 + sta $02 ; CPU:$DBCE PRG:1BCE 85 02 - inc $05 + inc $05 ; CPU:$DBD0 PRG:1BD0 E6 05 - inx - inx + inx ; CPU:$DBD2 PRG:1BD2 E8 + inx ; CPU:$DBD3 PRG:1BD3 E8 - cpx #$08 - beq BuildSpriteBufferNextSource + cpx #$08 ; CPU:$DBD4 PRG:1BD4 E0 08 + beq BuildSpriteBufferNextSource ; CPU:$DBD6 PRG:1BD6 F0 03 - jmp BuildSpriteBufferNextSprite + jmp BuildSpriteBufferNextSprite ; CPU:$DBD8 PRG:1BD8 4C 0A DB BuildSpriteBufferNextSource: - lda $00 - clc - adc #$04 - sta $00 + lda $00 ; CPU:$DBDB PRG:1BDB A5 00 + clc ; CPU:$DBDD PRG:1BDD 18 + adc #$04 ; CPU:$DBDE PRG:1BDE 69 04 + sta $00 ; CPU:$DBE0 PRG:1BE0 85 00 - inc $04 + inc $04 ; CPU:$DBE2 PRG:1BE2 E6 04 - lda $04 - cmp #$06 - beq BuildSpriteBufferDone + lda $04 ; CPU:$DBE4 PRG:1BE4 A5 04 + cmp #$06 ; CPU:$DBE6 PRG:1BE6 C9 06 + beq BuildSpriteBufferDone ; CPU:$DBE8 PRG:1BE8 F0 03 - jmp BuildSpriteBufferNextGroup + jmp BuildSpriteBufferNextGroup ; CPU:$DBEA PRG:1BEA 4C 05 DB BuildSpriteBufferDone: - rts + rts ; CPU:$DBED PRG:1BED 60 ;============================================================================== ; $DBEE-$DC3F: Gameplay Entity Render Lookup Data @@ -8745,37 +8548,37 @@ BuildSpriteBufferDone: EntitySpriteTileTable0: ; $DBEE-$DBFD - .byte $4C,$4C,$4C,$4C - .byte $00,$00,$00,$00 - .byte $04,$04,$03,$03 - .byte $08,$08,$07,$07 + .byte $4C,$4C,$4C,$4C ; CPU:$DBEE PRG:1BEE 4C 4C 4C 4C + .byte $00,$00,$00,$00 ; CPU:$DBF2 PRG:1BF2 00 00 00 00 + .byte $04,$04,$03,$03 ; CPU:$DBF6 PRG:1BF6 04 04 03 03 + .byte $08,$08,$07,$07 ; CPU:$DBFA PRG:1BFA 08 08 07 07 ; $DBFE-$DC0D - .byte $02,$01,$02,$01 - .byte $06,$05,$06,$05 - .byte $03,$03,$04,$04 - .byte $07,$07,$08,$08 + .byte $02,$01,$02,$01 ; CPU:$DBFE PRG:1BFE 02 01 02 01 + .byte $06,$05,$06,$05 ; CPU:$DC02 PRG:1C02 06 05 06 05 + .byte $03,$03,$04,$04 ; CPU:$DC06 PRG:1C06 03 03 04 04 + .byte $07,$07,$08,$08 ; CPU:$DC0A PRG:1C0A 07 07 08 08 ; $DC0E-$DC1D - .byte $01,$02,$01,$02 - .byte $05,$06,$05,$06 - .byte $18,$18,$19,$19 - .byte $18,$18,$1A,$1A + .byte $01,$02,$01,$02 ; CPU:$DC0E PRG:1C0E 01 02 01 02 + .byte $05,$06,$05,$06 ; CPU:$DC12 PRG:1C12 05 06 05 06 + .byte $18,$18,$19,$19 ; CPU:$DC16 PRG:1C16 18 18 19 19 + .byte $18,$18,$1A,$1A ; CPU:$DC1A PRG:1C1A 18 18 1A 1A ; $DC1E-$DC2D - .byte $1B,$1C,$1D,$1F - .byte $1B,$1C,$1E,$20 - .byte $21,$21,$22,$22 - .byte $21,$21,$23,$23 + .byte $1B,$1C,$1D,$1F ; CPU:$DC1E PRG:1C1E 1B 1C 1D 1F + .byte $1B,$1C,$1E,$20 ; CPU:$DC22 PRG:1C22 1B 1C 1E 20 + .byte $21,$21,$22,$22 ; CPU:$DC26 PRG:1C26 21 21 22 22 + .byte $21,$21,$23,$23 ; CPU:$DC2A PRG:1C2A 21 21 23 23 ; $DC2E-$DC3D - .byte $1C,$1B,$1F,$1D - .byte $1C,$1B,$20,$1E - .byte $00,$00,$00,$00 - .byte $09,$09,$0A,$0A + .byte $1C,$1B,$1F,$1D ; CPU:$DC2E PRG:1C2E 1C 1B 1F 1D + .byte $1C,$1B,$20,$1E ; CPU:$DC32 PRG:1C32 1C 1B 20 1E + .byte $00,$00,$00,$00 ; CPU:$DC36 PRG:1C36 00 00 00 00 + .byte $09,$09,$0A,$0A ; CPU:$DC3A PRG:1C3A 09 09 0A 0A ; $DC3E-$DC3F - .byte $0B,$0B + .byte $0B,$0B ; CPU:$DC3E PRG:1C3E 0B 0B ;============================================================================== ; $DC40-$DCED: Gameplay Entity Render Lookup Data, Continued @@ -8799,70 +8602,70 @@ EntitySpriteTileTable0: ;============================================================================== EntityRenderLookupDC40: ; $DC40-$DC4F - .byte $0C,$0C,$4C,$4C - .byte $0D,$0D,$4C,$4C - .byte $0E,$0E,$4C,$4C - .byte $0F,$0F,$4C,$4C + .byte $0C,$0C,$4C,$4C ; CPU:$DC40 PRG:1C40 0C 0C 4C 4C + .byte $0D,$0D,$4C,$4C ; CPU:$DC44 PRG:1C44 0D 0D 4C 4C + .byte $0E,$0E,$4C,$4C ; CPU:$DC48 PRG:1C48 0E 0E 4C 4C + .byte $0F,$0F,$4C,$4C ; CPU:$DC4C PRG:1C4C 0F 0F 4C 4C ; $DC50-$DC5F - .byte $10,$10,$4C,$4C - .byte $11,$11,$4C,$4C - .byte $12,$12,$4C,$4C - .byte $13,$13,$14,$15 + .byte $10,$10,$4C,$4C ; CPU:$DC50 PRG:1C50 10 10 4C 4C + .byte $11,$11,$4C,$4C ; CPU:$DC54 PRG:1C54 11 11 4C 4C + .byte $12,$12,$4C,$4C ; CPU:$DC58 PRG:1C58 12 12 4C 4C + .byte $13,$13,$14,$15 ; CPU:$DC5C PRG:1C5C 13 13 14 15 ; $DC60-$DC6F - .byte $16,$17,$4C,$4C - .byte $4C,$4C,$24,$24 - .byte $25,$25,$24,$24 - .byte $26,$26,$27,$27 + .byte $16,$17,$4C,$4C ; CPU:$DC60 PRG:1C60 16 17 4C 4C + .byte $4C,$4C,$24,$24 ; CPU:$DC64 PRG:1C64 4C 4C 24 24 + .byte $25,$25,$24,$24 ; CPU:$DC68 PRG:1C68 25 25 24 24 + .byte $26,$26,$27,$27 ; CPU:$DC6C PRG:1C6C 26 26 27 27 ; $DC70-$DC7F - .byte $4C,$4C,$28,$29 - .byte $2A,$2B,$2C,$2C - .byte $2D,$2D,$29,$28 - .byte $2B,$2A,$90,$91 + .byte $4C,$4C,$28,$29 ; CPU:$DC70 PRG:1C70 4C 4C 28 29 + .byte $2A,$2B,$2C,$2C ; CPU:$DC74 PRG:1C74 2A 2B 2C 2C + .byte $2D,$2D,$29,$28 ; CPU:$DC78 PRG:1C78 2D 2D 29 28 + .byte $2B,$2A,$90,$91 ; CPU:$DC7C PRG:1C7C 2B 2A 90 91 ; $DC80-$DC8F - .byte $92,$93,$94,$95 - .byte $96,$97,$98,$99 - .byte $9A,$9B,$9C,$9D - .byte $9E,$9F,$A0,$A1 + .byte $92,$93,$94,$95 ; CPU:$DC80 PRG:1C80 92 93 94 95 + .byte $96,$97,$98,$99 ; CPU:$DC84 PRG:1C84 96 97 98 99 + .byte $9A,$9B,$9C,$9D ; CPU:$DC88 PRG:1C88 9A 9B 9C 9D + .byte $9E,$9F,$A0,$A1 ; CPU:$DC8C PRG:1C8C 9E 9F A0 A1 ; $DC90-$DC9F - .byte $A2,$A3,$A4,$A5 - .byte $A6,$A7,$A8,$A9 - .byte $AA,$AB,$AC,$AD - .byte $AE,$AF,$2E,$2F + .byte $A2,$A3,$A4,$A5 ; CPU:$DC90 PRG:1C90 A2 A3 A4 A5 + .byte $A6,$A7,$A8,$A9 ; CPU:$DC94 PRG:1C94 A6 A7 A8 A9 + .byte $AA,$AB,$AC,$AD ; CPU:$DC98 PRG:1C98 AA AB AC AD + .byte $AE,$AF,$2E,$2F ; CPU:$DC9C PRG:1C9C AE AF 2E 2F ; $DCA0-$DCAF - .byte $30,$31,$32,$2F - .byte $33,$31,$34,$2F - .byte $35,$31,$36,$2F - .byte $37,$31,$38,$2F + .byte $30,$31,$32,$2F ; CPU:$DCA0 PRG:1CA0 30 31 32 2F + .byte $33,$31,$34,$2F ; CPU:$DCA4 PRG:1CA4 33 31 34 2F + .byte $35,$31,$36,$2F ; CPU:$DCA8 PRG:1CA8 35 31 36 2F + .byte $37,$31,$38,$2F ; CPU:$DCAC PRG:1CAC 37 31 38 2F ; $DCB0-$DCBF - .byte $39,$31,$3A,$2F - .byte $3B,$31,$3C,$2F - .byte $3D,$31,$3E,$3F - .byte $40,$41,$42,$3F + .byte $39,$31,$3A,$2F ; CPU:$DCB0 PRG:1CB0 39 31 3A 2F + .byte $3B,$31,$3C,$2F ; CPU:$DCB4 PRG:1CB4 3B 31 3C 2F + .byte $3D,$31,$3E,$3F ; CPU:$DCB8 PRG:1CB8 3D 31 3E 3F + .byte $40,$41,$42,$3F ; CPU:$DCBC PRG:1CBC 40 41 42 3F ; $DCC0-$DCCF - .byte $43,$41,$44,$45 - .byte $46,$47,$48,$45 - .byte $49,$47,$4A,$45 - .byte $4B,$47,$4D,$4E + .byte $43,$41,$44,$45 ; CPU:$DCC0 PRG:1CC0 43 41 44 45 + .byte $46,$47,$48,$45 ; CPU:$DCC4 PRG:1CC4 46 47 48 45 + .byte $49,$47,$4A,$45 ; CPU:$DCC8 PRG:1CC8 49 47 4A 45 + .byte $4B,$47,$4D,$4E ; CPU:$DCCC PRG:1CCC 4B 47 4D 4E ; $DCD0-$DCDF - .byte $4F,$50,$4E,$4D - .byte $50,$4F,$4F,$50 - .byte $4D,$4E,$50,$4F - .byte $4E,$4D,$4D,$4E + .byte $4F,$50,$4E,$4D ; CPU:$DCD0 PRG:1CD0 4F 50 4E 4D + .byte $50,$4F,$4F,$50 ; CPU:$DCD4 PRG:1CD4 50 4F 4F 50 + .byte $4D,$4E,$50,$4F ; CPU:$DCD8 PRG:1CD8 4D 4E 50 4F + .byte $4E,$4D,$4D,$4E ; CPU:$DCDC PRG:1CDC 4E 4D 4D 4E ; $DCE0-$DCED - .byte $4F,$51,$4E,$52 - .byte $53,$54,$4F,$51 - .byte $4D,$4E,$53,$54 - .byte $4E,$52 + .byte $4F,$51,$4E,$52 ; CPU:$DCE0 PRG:1CE0 4F 51 4E 52 + .byte $53,$54,$4F,$51 ; CPU:$DCE4 PRG:1CE4 53 54 4F 51 + .byte $4D,$4E,$53,$54 ; CPU:$DCE8 PRG:1CE8 4D 4E 53 54 + .byte $4E,$52 ; CPU:$DCEC PRG:1CEC 4E 52 ;============================================================================== ; $DCEE-$DD21: Gameplay Entity Render Lookup Table @@ -8894,25 +8697,25 @@ EntityRenderLookupDC40: EntitySpriteTileTable2: ; $DCEE-$DCFD - .byte $55,$4C,$56,$4C - .byte $56,$4C,$55,$4C - .byte $4C,$57,$4C,$58 - .byte $4C,$59,$4C,$5A + .byte $55,$4C,$56,$4C ; CPU:$DCEE PRG:1CEE 55 4C 56 4C + .byte $56,$4C,$55,$4C ; CPU:$DCF2 PRG:1CF2 56 4C 55 4C + .byte $4C,$57,$4C,$58 ; CPU:$DCF6 PRG:1CF6 4C 57 4C 58 + .byte $4C,$59,$4C,$5A ; CPU:$DCFA PRG:1CFA 4C 59 4C 5A ; $DCFE-$DD0D - .byte $4C,$5B,$4C,$5C - .byte $4C,$4C,$4C,$5D - .byte $18,$18,$19,$5E - .byte $60,$61,$19,$5E + .byte $4C,$5B,$4C,$5C ; CPU:$DCFE PRG:1CFE 4C 5B 4C 5C + .byte $4C,$4C,$4C,$5D ; CPU:$DD02 PRG:1D02 4C 4C 4C 5D + .byte $18,$18,$19,$5E ; CPU:$DD06 PRG:1D06 18 18 19 5E + .byte $60,$61,$19,$5E ; CPU:$DD0A PRG:1D0A 60 61 19 5E ; $DD0E-$DD1D - .byte $1B,$1C,$1D,$62 - .byte $1B,$1C,$1E,$63 - .byte $64,$65,$66,$67 - .byte $64,$65,$68,$69 + .byte $1B,$1C,$1D,$62 ; CPU:$DD0E PRG:1D0E 1B 1C 1D 62 + .byte $1B,$1C,$1E,$63 ; CPU:$DD12 PRG:1D12 1B 1C 1E 63 + .byte $64,$65,$66,$67 ; CPU:$DD16 PRG:1D16 64 65 66 67 + .byte $64,$65,$68,$69 ; CPU:$DD1A PRG:1D1A 64 65 68 69 ; $DD1E-$DD21 - .byte $6A,$6B,$4C,$4C + .byte $6A,$6B,$4C,$4C ; CPU:$DD1E PRG:1D1E 6A 6B 4C 4C @@ -8949,100 +8752,100 @@ EntitySpriteTileTable2: EntitySpriteAttributeTable0: ; $DD22-$DD31 - .byte $00,$00,$00,$00 - .byte $00,$40,$80,$C0 - .byte $80,$C0,$80,$C0 - .byte $80,$C0,$80,$C0 + .byte $00,$00,$00,$00 ; CPU:$DD22 PRG:1D22 00 00 00 00 + .byte $00,$40,$80,$C0 ; CPU:$DD26 PRG:1D26 00 40 80 C0 + .byte $80,$C0,$80,$C0 ; CPU:$DD2A PRG:1D2A 80 C0 80 C0 + .byte $80,$C0,$80,$C0 ; CPU:$DD2E PRG:1D2E 80 C0 80 C0 ; $DD32-$DD41 - .byte $00,$00,$80,$80 - .byte $00,$00,$80,$80 - .byte $00,$40,$00,$40 - .byte $00,$40,$00,$40 + .byte $00,$00,$80,$80 ; CPU:$DD32 PRG:1D32 00 00 80 80 + .byte $00,$00,$80,$80 ; CPU:$DD36 PRG:1D36 00 00 80 80 + .byte $00,$40,$00,$40 ; CPU:$DD3A PRG:1D3A 00 40 00 40 + .byte $00,$40,$00,$40 ; CPU:$DD3E PRG:1D3E 00 40 00 40 ; $DD42-$DD51 - .byte $40,$40,$C0,$C0 - .byte $40,$40,$C0,$C0 - .byte $00,$40,$00,$40 - .byte $00,$40,$00,$40 + .byte $40,$40,$C0,$C0 ; CPU:$DD42 PRG:1D42 40 40 C0 C0 + .byte $40,$40,$C0,$C0 ; CPU:$DD46 PRG:1D46 40 40 C0 C0 + .byte $00,$40,$00,$40 ; CPU:$DD4A PRG:1D4A 00 40 00 40 + .byte $00,$40,$00,$40 ; CPU:$DD4E PRG:1D4E 00 40 00 40 ; $DD52-$DD61 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 - .byte $00,$40,$00,$40 - .byte $00,$40,$00,$40 + .byte $00,$00,$00,$00 ; CPU:$DD52 PRG:1D52 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DD56 PRG:1D56 00 00 00 00 + .byte $00,$40,$00,$40 ; CPU:$DD5A PRG:1D5A 00 40 00 40 + .byte $00,$40,$00,$40 ; CPU:$DD5E PRG:1D5E 00 40 00 40 ; $DD62-$DD71 - .byte $40,$40,$40,$40 - .byte $40,$40,$40,$40 - .byte $00,$40,$80,$C0 - .byte $00,$40,$00,$40 + .byte $40,$40,$40,$40 ; CPU:$DD62 PRG:1D62 40 40 40 40 + .byte $40,$40,$40,$40 ; CPU:$DD66 PRG:1D66 40 40 40 40 + .byte $00,$40,$80,$C0 ; CPU:$DD6A PRG:1D6A 00 40 80 C0 + .byte $00,$40,$00,$40 ; CPU:$DD6E PRG:1D6E 00 40 00 40 ; $DD72-$DD81 - .byte $00,$40,$00,$40 - .byte $00,$00,$00,$40 - .byte $00,$00,$00,$40 - .byte $00,$00,$00,$40 + .byte $00,$40,$00,$40 ; CPU:$DD72 PRG:1D72 00 40 00 40 + .byte $00,$00,$00,$40 ; CPU:$DD76 PRG:1D76 00 00 00 40 + .byte $00,$00,$00,$40 ; CPU:$DD7A PRG:1D7A 00 00 00 40 + .byte $00,$00,$00,$40 ; CPU:$DD7E PRG:1D7E 00 00 00 40 ; $DD82-$DD91 - .byte $00,$00,$00,$40 - .byte $00,$00,$00,$40 - .byte $00,$00,$00,$40 - .byte $00,$00,$00,$40 + .byte $00,$00,$00,$40 ; CPU:$DD82 PRG:1D82 00 00 00 40 + .byte $00,$00,$00,$40 ; CPU:$DD86 PRG:1D86 00 00 00 40 + .byte $00,$00,$00,$40 ; CPU:$DD8A PRG:1D8A 00 00 00 40 + .byte $00,$00,$00,$40 ; CPU:$DD8E PRG:1D8E 00 00 00 40 ; $DD92-$DDA1 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 - .byte $00,$40,$00,$40 - .byte $00,$40,$00,$40 + .byte $00,$00,$00,$00 ; CPU:$DD92 PRG:1D92 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DD96 PRG:1D96 00 00 00 00 + .byte $00,$40,$00,$40 ; CPU:$DD9A PRG:1D9A 00 40 00 40 + .byte $00,$40,$00,$40 ; CPU:$DD9E PRG:1D9E 00 40 00 40 ; $DDA2-$DDB1 - .byte $00,$40,$00,$00 - .byte $00,$00,$00,$00 - .byte $00,$40,$00,$40 - .byte $40,$40,$40,$40 + .byte $00,$40,$00,$00 ; CPU:$DDA2 PRG:1DA2 00 40 00 00 + .byte $00,$00,$00,$00 ; CPU:$DDA6 PRG:1DA6 00 00 00 00 + .byte $00,$40,$00,$40 ; CPU:$DDAA PRG:1DAA 00 40 00 40 + .byte $40,$40,$40,$40 ; CPU:$DDAE PRG:1DAE 40 40 40 40 ; $DDB2-$DDC1 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 ; CPU:$DDB2 PRG:1DB2 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DDB6 PRG:1DB6 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DDBA PRG:1DBA 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DDBE PRG:1DBE 00 00 00 00 ; $DDC2-$DDD1 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 ; CPU:$DDC2 PRG:1DC2 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DDC6 PRG:1DC6 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DDCA PRG:1DCA 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DDCE PRG:1DCE 00 00 00 00 ; $DDD2-$DDE1 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 ; CPU:$DDD2 PRG:1DD2 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DDD6 PRG:1DD6 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DDDA PRG:1DDA 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DDDE PRG:1DDE 00 00 00 00 ; $DDE2-$DDF1 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 ; CPU:$DDE2 PRG:1DE2 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DDE6 PRG:1DE6 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DDEA PRG:1DEA 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DDEE PRG:1DEE 00 00 00 00 ; $DDF2-$DE01 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 ; CPU:$DDF2 PRG:1DF2 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DDF6 PRG:1DF6 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DDFA PRG:1DFA 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DDFE PRG:1DFE 00 00 00 00 ; $DE02-$DE11 - .byte $00,$00,$00,$00 - .byte $40,$40,$00,$40 - .byte $80,$00,$80,$80 - .byte $00,$C0,$C0,$C0 + .byte $00,$00,$00,$00 ; CPU:$DE02 PRG:1E02 00 00 00 00 + .byte $40,$40,$00,$40 ; CPU:$DE06 PRG:1E06 40 40 00 40 + .byte $80,$00,$80,$80 ; CPU:$DE0A PRG:1E0A 80 00 80 80 + .byte $00,$C0,$C0,$C0 ; CPU:$DE0E PRG:1E0E 00 C0 C0 C0 ; $DE12-$DE21 - .byte $00,$00,$00,$00 - .byte $40,$00,$00,$00 - .byte $80,$80,$80,$80 - .byte $80,$80,$C0,$80 + .byte $00,$00,$00,$00 ; CPU:$DE12 PRG:1E12 00 00 00 00 + .byte $40,$00,$00,$00 ; CPU:$DE16 PRG:1E16 40 00 00 00 + .byte $80,$80,$80,$80 ; CPU:$DE1A PRG:1E1A 80 80 80 80 + .byte $80,$80,$C0,$80 ; CPU:$DE1E PRG:1E1E 80 80 C0 80 ;============================================================================== ; $DE22-$DE55: Secondary Gameplay Entity Render Attribute Lookup @@ -9069,25 +8872,25 @@ EntitySpriteAttributeTable0: EntitySpriteAttributeTable1: ; $DE22-$DE31 - .byte $00,$00,$00,$00 - .byte $80,$00,$80,$00 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 ; CPU:$DE22 PRG:1E22 00 00 00 00 + .byte $80,$00,$80,$00 ; CPU:$DE26 PRG:1E26 80 00 80 00 + .byte $00,$00,$00,$00 ; CPU:$DE2A PRG:1E2A 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DE2E PRG:1E2E 00 00 00 00 ; $DE32-$DE41 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 - .byte $00,$40,$00,$00 - .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 ; CPU:$DE32 PRG:1E32 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DE36 PRG:1E36 00 00 00 00 + .byte $00,$40,$00,$00 ; CPU:$DE3A PRG:1E3A 00 40 00 00 + .byte $00,$00,$00,$00 ; CPU:$DE3E PRG:1E3E 00 00 00 00 ; $DE42-$DE51 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 - .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 ; CPU:$DE42 PRG:1E42 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DE46 PRG:1E46 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DE4A PRG:1E4A 00 00 00 00 + .byte $00,$00,$00,$00 ; CPU:$DE4E PRG:1E4E 00 00 00 00 ; $DE52-$DE55 - .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 ; CPU:$DE52 PRG:1E52 00 00 00 00 ;============================================================================== ; $DE56-$DE5D: Entity Render Coordinate Adjustment Table @@ -9109,10 +8912,10 @@ EntitySpriteAttributeTable1: ;============================================================================== EntitySpriteCoordinateOffsets: - .byte $03,$F4 - .byte $03,$FC - .byte $0B,$F4 - .byte $0B,$FC + .byte $03,$F4 ; CPU:$DE56 PRG:1E56 03 F4 + .byte $03,$FC ; CPU:$DE58 PRG:1E58 03 FC + .byte $0B,$F4 ; CPU:$DE5A PRG:1E5A 0B F4 + .byte $0B,$FC ; CPU:$DE5C PRG:1E5C 0B FC ;============================================================================== ; $DE5E-$DE7D: Periodic Four-Entry State Update @@ -9126,41 +8929,41 @@ EntitySpriteCoordinateOffsets: ;============================================================================== UpdatePeriodicFourEntryState: - lda $4B - and #$0F - beq @DE65 + lda $4B ; CPU:$DE5E PRG:1E5E A5 4B + and #$0F ; CPU:$DE60 PRG:1E60 29 0F + beq @DE65 ; CPU:$DE62 PRG:1E62 F0 01 - rts + rts ; CPU:$DE64 PRG:1E64 60 @DE65: - tax + tax ; CPU:$DE65 PRG:1E65 AA @DE66: - lda $6C,x - cmp #$07 - beq @DE76 + lda $6C,x ; CPU:$DE66 PRG:1E66 B5 6C + cmp #$07 ; CPU:$DE68 PRG:1E68 C9 07 + beq @DE76 ; CPU:$DE6A PRG:1E6A F0 0A - cmp #$01 - bne @DE74 + cmp #$01 ; CPU:$DE6C PRG:1E6C C9 01 + bne @DE74 ; CPU:$DE6E PRG:1E6E D0 04 - lda #$02 - bne @DE76 + lda #$02 ; CPU:$DE70 PRG:1E70 A9 02 + bne @DE76 ; CPU:$DE72 PRG:1E72 D0 02 @DE74: - lda #$01 + lda #$01 ; CPU:$DE74 PRG:1E74 A9 01 @DE76: - sta $6C,x + sta $6C,x ; CPU:$DE76 PRG:1E76 95 6C - inx - cpx #$04 - bne @DE66 + inx ; CPU:$DE78 PRG:1E78 E8 + cpx #$04 ; CPU:$DE79 PRG:1E79 E0 04 + bne @DE66 ; CPU:$DE7B PRG:1E7B D0 E9 - rts + rts ; CPU:$DE7D PRG:1E7D 60 ;============================================================================== ; $DE7E-$DF6B: Gameplay PPU / Display Update Processor @@ -9187,10 +8990,10 @@ UpdatePeriodicFourEntryState: ;============================================================================== FlushGameplayPpuUpdates: - lda $48 - beq @DE85 + lda $48 ; CPU:$DE7E PRG:1E7E A5 48 + beq @DE85 ; CPU:$DE80 PRG:1E80 F0 03 - jmp UpdateAnimatedGameplayPpuFields + jmp UpdateAnimatedGameplayPpuFields ; CPU:$DE82 PRG:1E82 4C 15 DF ;------------------------------------------------------------------------------ @@ -9199,36 +9002,36 @@ FlushGameplayPpuUpdates: ;------------------------------------------------------------------------------ @DE85: - lda $023F - cmp #$FF - beq @DEB5 + lda $023F ; CPU:$DE85 PRG:1E85 AD 3F 02 + cmp #$FF ; CPU:$DE88 PRG:1E88 C9 FF + beq @DEB5 ; CPU:$DE8A PRG:1E8A F0 28 - lda PPUSTATUS + lda PPUSTATUS ; CPU:$DE8C PRG:1E8C AD 02 20 - lda $026B - sta PPUADDR + lda $026B ; CPU:$DE8F PRG:1E8F AD 6B 02 + sta PPUADDR ; CPU:$DE92 PRG:1E92 8D 06 20 - lda $026C - sta PPUADDR + lda $026C ; CPU:$DE95 PRG:1E95 AD 6C 02 + sta PPUADDR ; CPU:$DE98 PRG:1E98 8D 06 20 - ldy #$00 + ldy #$00 ; CPU:$DE9B PRG:1E9B A0 00 @DE9B: - lda $023F,y - sta PPUDATA + lda $023F,y ; CPU:$DE9D PRG:1E9D B9 3F 02 + sta PPUDATA ; CPU:$DEA0 PRG:1EA0 8D 07 20 - iny - cpy #$06 - bne @DE9B + iny ; CPU:$DEA3 PRG:1EA3 C8 + cpy #$06 ; CPU:$DEA4 PRG:1EA4 C0 06 + bne @DE9B ; CPU:$DEA6 PRG:1EA6 D0 F5 - lda #$30 - sta PPUDATA + lda #$30 ; CPU:$DEA8 PRG:1EA8 A9 30 + sta PPUDATA ; CPU:$DEAA PRG:1EAA 8D 07 20 - lda #$FF - sta $023F + lda #$FF ; CPU:$DEAD PRG:1EAD A9 FF + sta $023F ; CPU:$DEAF PRG:1EAF 8D 3F 02 - bne @DEE2 + bne @DEE2 ; CPU:$DEB2 PRG:1EB2 D0 2D ;------------------------------------------------------------------------------ @@ -9237,34 +9040,34 @@ FlushGameplayPpuUpdates: ;------------------------------------------------------------------------------ @DEB5: - lda $0245 - cmp #$FF - beq @DEE2 + lda $0245 ; CPU:$DEB4 PRG:1EB4 AD 45 02 + cmp #$FF ; CPU:$DEB7 PRG:1EB7 C9 FF + beq @DEE2 ; CPU:$DEB9 PRG:1EB9 F0 26 - lda PPUSTATUS + lda PPUSTATUS ; CPU:$DEBB PRG:1EBB AD 02 20 - lda $0272 - sta PPUADDR + lda $0272 ; CPU:$DEBE PRG:1EBE AD 72 02 + sta PPUADDR ; CPU:$DEC1 PRG:1EC1 8D 06 20 - lda $0273 - sta PPUADDR + lda $0273 ; CPU:$DEC4 PRG:1EC4 AD 73 02 + sta PPUADDR ; CPU:$DEC7 PRG:1EC7 8D 06 20 - ldy #$00 + ldy #$00 ; CPU:$DECA PRG:1ECA A0 00 @DECB: - lda $0245,y - sta PPUDATA + lda $0245,y ; CPU:$DECC PRG:1ECC B9 45 02 + sta PPUDATA ; CPU:$DECF PRG:1ECF 8D 07 20 - iny - cpy #$06 - bne @DECB + iny ; CPU:$DED2 PRG:1ED2 C8 + cpy #$06 ; CPU:$DED3 PRG:1ED3 C0 06 + bne @DECB ; CPU:$DED5 PRG:1ED5 D0 F5 - lda #$30 - sta PPUDATA + lda #$30 ; CPU:$DED7 PRG:1ED7 A9 30 + sta PPUDATA ; CPU:$DED9 PRG:1ED9 8D 07 20 - lda #$FF - sta $0245 + lda #$FF ; CPU:$DEDC PRG:1EDC A9 FF + sta $0245 ; CPU:$DEDE PRG:1EDE 8D 45 02 ;------------------------------------------------------------------------------ @@ -9273,84 +9076,84 @@ FlushGameplayPpuUpdates: ;------------------------------------------------------------------------------ @DEE2: - lda $4B - and #$07 - bne UpdateAnimatedGameplayPpuFields + lda $4B ; CPU:$DEE1 PRG:1EE1 A5 4B + and #$07 ; CPU:$DEE3 PRG:1EE3 29 07 + bne UpdateAnimatedGameplayPpuFields ; CPU:$DEE5 PRG:1EE5 D0 2E - lda PPUSTATUS + lda PPUSTATUS ; CPU:$DEE7 PRG:1EE7 AD 02 20 - lda $026D - sta PPUADDR + lda $026D ; CPU:$DEEA PRG:1EEA AD 6D 02 + sta PPUADDR ; CPU:$DEED PRG:1EED 8D 06 20 - lda $026E - sta PPUADDR + lda $026E ; CPU:$DEF0 PRG:1EF0 AD 6E 02 + sta PPUADDR ; CPU:$DEF3 PRG:1EF3 8D 06 20 - ldx #$00 + ldx #$00 ; CPU:$DEF6 PRG:1EF6 A2 00 - lda $4B - and #$18 - beq @DF05 + lda $4B ; CPU:$DEF8 PRG:1EF8 A5 4B + and #$18 ; CPU:$DEFA PRG:1EFA 29 18 + beq @DF05 ; CPU:$DEFC PRG:1EFC F0 0D @DEFB: - lda $026F,x - sta PPUDATA + lda $026F,x ; CPU:$DEFE PRG:1EFE BD 6F 02 + sta PPUDATA ; CPU:$DF01 PRG:1F01 8D 07 20 - inx - cpx #$03 - bne @DEFB + inx ; CPU:$DF04 PRG:1F04 E8 + cpx #$03 ; CPU:$DF05 PRG:1F05 E0 03 + bne @DEFB ; CPU:$DF07 PRG:1F07 D0 F5 - beq UpdateAnimatedGameplayPpuFields + beq UpdateAnimatedGameplayPpuFields ; CPU:$DF09 PRG:1F09 F0 0A @DF05: - lda #$20 + lda #$20 ; CPU:$DF0B PRG:1F0B A9 20 @DF07: - sta PPUDATA + sta PPUDATA ; CPU:$DF0D PRG:1F0D 8D 07 20 - inx - cpx #$03 - bne @DF07 + inx ; CPU:$DF10 PRG:1F10 E8 + cpx #$03 ; CPU:$DF11 PRG:1F11 E0 03 + bne @DF07 ; CPU:$DF13 PRG:1F13 D0 F8 ;============================================================================== ; $DF15: Shared frame-dependent display update entry ;============================================================================== UpdateAnimatedGameplayPpuFields: - lda $4B - and #$01 - beq @DF42 + lda $4B ; CPU:$DF15 PRG:1F15 A5 4B + and #$01 ; CPU:$DF17 PRG:1F17 29 01 + beq @DF42 ; CPU:$DF19 PRG:1F19 F0 27 - ldy #$00 - ldx #$00 + ldy #$00 ; CPU:$DF1B PRG:1F1B A0 00 + ldx #$00 ; CPU:$DF1D PRG:1F1D A2 00 - lda $46 - and $47 - beq @DF27 + lda $46 ; CPU:$DF1F PRG:1F1F A5 46 + and $47 ; CPU:$DF21 PRG:1F21 25 47 + beq @DF27 ; CPU:$DF23 PRG:1F23 F0 02 - ldy #$08 + ldy #$08 ; CPU:$DF25 PRG:1F25 A0 08 @DF27: - lda PPUSTATUS + lda PPUSTATUS ; CPU:$DF27 PRG:1F27 AD 02 20 - lda GameplayStatusPpuAddressTable,y - sta PPUADDR + lda GameplayStatusPpuAddressTable,y ; CPU:$DF2A PRG:1F2A B9 6C DF + sta PPUADDR ; CPU:$DF2D PRG:1F2D 8D 06 20 - lda GameplayStatusPpuAddressTable+1,y - sta PPUADDR + lda GameplayStatusPpuAddressTable+1,y ; CPU:$DF30 PRG:1F30 B9 6D DF + sta PPUADDR ; CPU:$DF33 PRG:1F33 8D 06 20 - lda $6C,x - sta PPUDATA + lda $6C,x ; CPU:$DF36 PRG:1F36 B5 6C + sta PPUDATA ; CPU:$DF38 PRG:1F38 8D 07 20 - iny - iny + iny ; CPU:$DF3B PRG:1F3B C8 + iny ; CPU:$DF3C PRG:1F3C C8 - inx - cpx #$04 - bne @DF27 + inx ; CPU:$DF3D PRG:1F3D E8 + cpx #$04 ; CPU:$DF3E PRG:1F3E E0 04 + bne @DF27 ; CPU:$DF40 PRG:1F40 D0 E5 ;------------------------------------------------------------------------------ ; $DF42 @@ -9358,44 +9161,44 @@ UpdateAnimatedGameplayPpuFields: ;------------------------------------------------------------------------------ @DF42: - lda PPUSTATUS + lda PPUSTATUS ; CPU:$DF42 PRG:1F42 AD 02 20 - ldy #$FF + ldy #$FF ; CPU:$DF45 PRG:1F45 A0 FF @DF46: - iny + iny ; CPU:$DF47 PRG:1F47 C8 - lda $024B,y - cmp #$FF - beq @DF66 + lda $024B,y ; CPU:$DF48 PRG:1F48 B9 4B 02 + cmp #$FF ; CPU:$DF4B PRG:1F4B C9 FF + beq @DF66 ; CPU:$DF4D PRG:1F4D F0 19 - sta PPUADDR + sta PPUADDR ; CPU:$DF4F PRG:1F4F 8D 06 20 - iny + iny ; CPU:$DF52 PRG:1F52 C8 - lda $024B,y - sta PPUADDR + lda $024B,y ; CPU:$DF53 PRG:1F53 B9 4B 02 + sta PPUADDR ; CPU:$DF56 PRG:1F56 8D 06 20 @DF55: - iny + iny ; CPU:$DF59 PRG:1F59 C8 - lda $024B,y - beq @DF46 + lda $024B,y ; CPU:$DF5A PRG:1F5A B9 4B 02 + beq @DF46 ; CPU:$DF5D PRG:1F5D F0 E8 - cmp #$FF - beq @DF66 + cmp #$FF ; CPU:$DF5F PRG:1F5F C9 FF + beq @DF66 ; CPU:$DF61 PRG:1F61 F0 05 - sta PPUDATA + sta PPUDATA ; CPU:$DF63 PRG:1F63 8D 07 20 - bne @DF55 + bne @DF55 ; CPU:$DF66 PRG:1F66 D0 F1 @DF66: - sta $024B + sta $024B ; CPU:$DF68 PRG:1F68 8D 4B 02 - rts + rts ; CPU:$DF6B PRG:1F6B 60 ;============================================================================== @@ -9415,15 +9218,15 @@ UpdateAnimatedGameplayPpuFields: ;============================================================================== GameplayStatusPpuAddressTable: - .byte $20,$B4 - .byte $20,$A2 - .byte $22,$D4 - .byte $22,$C2 + .byte $20,$B4 ; CPU:$DF6C PRG:1F6C 20 B4 + .byte $20,$A2 ; CPU:$DF6E PRG:1F6E 20 A2 + .byte $22,$D4 ; CPU:$DF70 PRG:1F70 22 D4 + .byte $22,$C2 ; CPU:$DF72 PRG:1F72 22 C2 - .byte $28,$B4 - .byte $28,$A2 - .byte $2A,$D4 - .byte $2A,$C2 + .byte $28,$B4 ; CPU:$DF74 PRG:1F74 28 B4 + .byte $28,$A2 ; CPU:$DF76 PRG:1F76 28 A2 + .byte $2A,$D4 ; CPU:$DF78 PRG:1F78 2A D4 + .byte $2A,$C2 ; CPU:$DF7A PRG:1F7A 2A C2 ;============================================================================== ; $DF7C-$E042: Gameplay Tile / State Update @@ -9442,168 +9245,168 @@ GameplayStatusPpuAddressTable: ;============================================================================== UpdateGameplayTileState: - ldx #$00 + ldx #$00 ; CPU:$DF7C PRG:1F7C A2 00 - lda $022A - cmp #$09 - beq $DFBB + lda $022A ; CPU:$DF7E PRG:1F7E AD 2A 02 + cmp #$09 ; CPU:$DF81 PRG:1F81 C9 09 + beq $DFBB ; CPU:$DF83 PRG:1F83 F0 36 - inx - inx + inx ; CPU:$DF85 PRG:1F85 E8 + inx ; CPU:$DF86 PRG:1F86 E8 - cmp #$03 - beq $DFBB + cmp #$03 ; CPU:$DF87 PRG:1F87 C9 03 + beq $DFBB ; CPU:$DF89 PRG:1F89 F0 30 - cmp #$01 - beq @DF94 + cmp #$01 ; CPU:$DF8B PRG:1F8B C9 01 + beq @DF94 ; CPU:$DF8D PRG:1F8D F0 05 - cmp #$02 - beq @DF94 + cmp #$02 ; CPU:$DF8F PRG:1F8F C9 02 + beq @DF94 ; CPU:$DF91 PRG:1F91 F0 01 - rts + rts ; CPU:$DF93 PRG:1F93 60 @DF94: - jsr $E063 + jsr $E063 ; CPU:$DF94 PRG:1F94 20 63 E0 - lda $1A - sta $02 + lda $1A ; CPU:$DF97 PRG:1F97 A5 1A + sta $02 ; CPU:$DF99 PRG:1F99 85 02 - lda $1C - sta $03 + lda $1C ; CPU:$DF9B PRG:1F9B A5 1C + sta $03 ; CPU:$DF9D PRG:1F9D 85 03 - jsr $E263 + jsr $E263 ; CPU:$DF9F PRG:1F9F 20 63 E2 - ldx #$00 + ldx #$00 ; CPU:$DFA2 PRG:1FA2 A2 00 - lda $03 - and #$07 - beq @DFAD + lda $03 ; CPU:$DFA4 PRG:1FA4 A5 03 + and #$07 ; CPU:$DFA6 PRG:1FA6 29 07 + beq @DFAD ; CPU:$DFA8 PRG:1FA8 F0 02 - inx - inx + inx ; CPU:$DFAA PRG:1FAA E8 + inx ; CPU:$DFAB PRG:1FAB E8 @DFAD: - lda $02 - and #$0F - cmp #$04 - beq @DFB6 + lda $02 ; CPU:$DFAC PRG:1FAC A5 02 + and #$0F ; CPU:$DFAE PRG:1FAE 29 0F + cmp #$04 ; CPU:$DFB0 PRG:1FB0 C9 04 + beq @DFB6 ; CPU:$DFB2 PRG:1FB2 F0 01 - inx + inx ; CPU:$DFB4 PRG:1FB4 E8 @DFB6: - lda #$07 - sta $6C,x + lda #$07 ; CPU:$DFB5 PRG:1FB5 A9 07 + sta $6C,x ; CPU:$DFB7 PRG:1FB7 95 6C @DFBB: - ldx #$04 - lda #$00 - sta $D5 - sta $D6 + ldx #$04 ; CPU:$DFB9 PRG:1FB9 A2 04 + lda #$00 ; CPU:$DFBB PRG:1FBB A9 00 + sta $D5 ; CPU:$DFBD PRG:1FBD 85 D5 + sta $D6 ; CPU:$DFBF PRG:1FBF 85 D6 - lda $1A - sta $02 + lda $1A ; CPU:$DFC1 PRG:1FC1 A5 1A + sta $02 ; CPU:$DFC3 PRG:1FC3 85 02 - lda $1C - sta $03 + lda $1C ; CPU:$DFC5 PRG:1FC5 A5 1C + sta $03 ; CPU:$DFC7 PRG:1FC7 85 03 - jsr $E263 + jsr $E263 ; CPU:$DFC9 PRG:1FC9 20 63 E2 - ldy #$FF + ldy #$FF ; CPU:$DFCC PRG:1FCC A0 FF @DFCE: - iny + iny ; CPU:$DFCE PRG:1FCE C8 - lda $024B,y - cmp #$FF - bne @DFCE + lda $024B,y ; CPU:$DFCF PRG:1FCF B9 4B 02 + cmp #$FF ; CPU:$DFD2 PRG:1FD2 C9 FF + bne @DFCE ; CPU:$DFD4 PRG:1FD4 D0 F8 - tya - beq @DFDC + tya ; CPU:$DFD6 PRG:1FD6 98 + beq @DFDC ; CPU:$DFD7 PRG:1FD7 F0 06 - lda #$00 - sta $024B,y + lda #$00 ; CPU:$DFD9 PRG:1FD9 A9 00 + sta $024B,y ; CPU:$DFDB PRG:1FDB 99 4B 02 - iny + iny ; CPU:$DFDE PRG:1FDE C8 @DFDC: - lda $03 - sta $024B,y + lda $03 ; CPU:$DFDF PRG:1FDF A5 03 + sta $024B,y ; CPU:$DFE1 PRG:1FE1 99 4B 02 - iny + iny ; CPU:$DFE4 PRG:1FE4 C8 - lda $02 - sta $024B,y + lda $02 ; CPU:$DFE5 PRG:1FE5 A5 02 + sta $024B,y ; CPU:$DFE7 PRG:1FE7 99 4B 02 - iny + iny ; CPU:$DFEA PRG:1FEA C8 - lda $E043,x - sta $024B,y + lda $E043,x ; CPU:$DFEB PRG:1FEB BD 43 E0 + sta $024B,y ; CPU:$DFEE PRG:1FEE 99 4B 02 - iny + iny ; CPU:$DFF1 PRG:1FF1 C8 - lda #$FF - sta $024B,y + lda #$FF ; CPU:$DFF2 PRG:1FF2 A9 FF + sta $024B,y ; CPU:$DFF4 PRG:1FF4 99 4B 02 - lda #$07 - sta $022A + lda #$07 ; CPU:$DFF7 PRG:1FF7 A9 07 + sta $022A ; CPU:$DFF9 PRG:1FF9 8D 2A 02 - lda $E044,x - sta $DC + lda $E044,x ; CPU:$DFFC PRG:1FFC BD 44 E0 + sta $DC ; CPU:$DFFF PRG:1FFF 85 DC - dec $6A - bne @E012 + dec $6A ; CPU:$E001 PRG:2001 C6 6A + bne @E012 ; CPU:$E003 PRG:2003 D0 0C - lda #$0C - sta $3F + lda #$0C ; CPU:$E005 PRG:2005 A9 0C + sta $3F ; CPU:$E007 PRG:2007 85 3F - lda #$00 - sta $87 + lda #$00 ; CPU:$E009 PRG:2009 A9 00 + sta $87 ; CPU:$E00B PRG:200B 85 87 - lda #$48 - sta $4C + lda #$48 ; CPU:$E00D PRG:200D A9 48 + sta $4C ; CPU:$E00F PRG:200F 85 4C @E012: - lda $6A + lda $6A ; CPU:$E011 PRG:2011 A5 6A - cmp #$37 - beq @E01C + cmp #$37 ; CPU:$E013 PRG:2013 C9 37 + beq @E01C ; CPU:$E015 PRG:2015 F0 04 - cmp #$86 - bne $E036 + cmp #$86 ; CPU:$E017 PRG:2017 C9 86 + bne $E036 ; CPU:$E019 PRG:2019 D0 1B @E01C: - lda #$0A - sta $D7 + lda #$0A ; CPU:$E01B PRG:201B A9 0A + sta $D7 ; CPU:$E01D PRG:201D 85 D7 - lda #$3C - sta $D8 + lda #$3C ; CPU:$E01F PRG:201F A9 3C + sta $D8 ; CPU:$E021 PRG:2021 85 D8 - ldy $93 + ldy $93 ; CPU:$E023 PRG:2023 A4 93 - lda GameplayStateValueLookup,y - sta $37 + lda GameplayStateValueLookup,y ; CPU:$E025 PRG:2025 B9 5B E0 + sta $37 ; CPU:$E028 PRG:2028 85 37 - lda #$03 - sta $3D + lda #$03 ; CPU:$E02A PRG:202A A9 03 + sta $3D ; CPU:$E02C PRG:202C 85 3D - lda #$60 - sta $2E + lda #$60 ; CPU:$E02E PRG:202E A9 60 + sta $2E ; CPU:$E030 PRG:2030 85 2E - lda #$80 - sta $30 + lda #$80 ; CPU:$E032 PRG:2032 A9 80 + sta $30 ; CPU:$E034 PRG:2034 85 30 - lda $6A - and #$01 - tay + lda $6A ; CPU:$E036 PRG:2036 A5 6A + and #$01 ; CPU:$E038 PRG:2038 29 01 + tay ; CPU:$E03A PRG:203A A8 - lda #$01 - sta $0604,y + lda #$01 ; CPU:$E03B PRG:203B A9 01 + sta $0604,y ; CPU:$E03D PRG:203D 99 04 06 - jmp $E0E6 + jmp $E0E6 ; CPU:$E040 PRG:2040 4C E6 E0 ;============================================================================== ; $E043-$E048: Gameplay Tile-State Lookup @@ -9614,7 +9417,7 @@ UpdateGameplayTileState: ;============================================================================== TileEventDisplayLookup: - .byte $08,$01,$07,$01,$07,$05 + .byte $08,$01,$07,$01,$07,$05 ; CPU:$E043 PRG:2043 08 01 07 01 07 05 ;============================================================================== ; $E049-$E05A: Activate First Available State Slot @@ -9629,26 +9432,26 @@ TileEventDisplayLookup: ;============================================================================== ActivateNextStateSlotE049: - ldx #$00 + ldx #$00 ; CPU:$E049 PRG:2049 A2 00 @E04B: - lda $BA,x - bne @E054 + lda $BA,x ; CPU:$E04B PRG:204B B5 BA + bne @E054 ; CPU:$E04D PRG:204D D0 05 - lda #$02 - sta $BA,x + lda #$02 ; CPU:$E04F PRG:204F A9 02 + sta $BA,x ; CPU:$E051 PRG:2051 95 BA - rts + rts ; CPU:$E053 PRG:2053 60 @E054: - inx - inx + inx ; CPU:$E054 PRG:2054 E8 + inx ; CPU:$E055 PRG:2055 E8 - cpx #$06 - bne @E04B + cpx #$06 ; CPU:$E056 PRG:2056 E0 06 + bne @E04B ; CPU:$E058 PRG:2058 D0 F1 - rts + rts ; CPU:$E05A PRG:205A 60 ;============================================================================== ; $E05B-$E062: Gameplay State Value Lookup @@ -9659,7 +9462,7 @@ ActivateNextStateSlotE049: ;============================================================================== GameplayStateValueLookup: - .byte $24,$25,$26,$27,$28,$29,$2A,$2B + .byte $24,$25,$26,$27,$28,$29,$2A,$2B ; CPU:$E05B PRG:205B 24 25 26 27 28 29 2A 2B ;============================================================================== ; $E063-$E0E5: Initialize / Adjust Entity Direction State @@ -9698,114 +9501,114 @@ GameplayStateValueLookup: ; $04 temporarily holds a candidate direction value. ;============================================================================== InitializeEntityDirectionState: - lda $8C - bne @E06D + lda $8C ; CPU:$E063 PRG:2063 A5 8C + bne @E06D ; CPU:$E065 PRG:2065 D0 06 - lda #$1E - sta $8A + lda #$1E ; CPU:$E067 PRG:2067 A9 1E + sta $8A ; CPU:$E069 PRG:2069 85 8A - lda #$00 + lda #$00 ; CPU:$E06B PRG:206B A9 00 @E06D: - sta $89 + sta $89 ; CPU:$E06D PRG:206D 85 89 - lda #$0F - sta $88 + lda #$0F ; CPU:$E06F PRG:206F A9 0F + sta $88 ; CPU:$E071 PRG:2071 85 88 - ldx #$03 + ldx #$03 ; CPU:$E073 PRG:2073 A2 03 @E075: - lda $39,x - and #$FC - ora #$01 - sta $39,x + lda $39,x ; CPU:$E075 PRG:2075 B5 39 + and #$FC ; CPU:$E077 PRG:2077 29 FC + ora #$01 ; CPU:$E079 PRG:2079 09 01 + sta $39,x ; CPU:$E07B PRG:207B 95 39 - dex - bpl @E075 + dex ; CPU:$E07D PRG:207D CA + bpl @E075 ; CPU:$E07E PRG:207E 10 F5 - lda #$11 - sta $02AE + lda #$11 ; CPU:$E080 PRG:2080 A9 11 + sta $02AE ; CPU:$E082 PRG:2082 8D AE 02 - lda #$0F - sta $02A9 + lda #$0F ; CPU:$E085 PRG:2085 A9 0F + sta $02A9 ; CPU:$E087 PRG:2087 8D A9 02 - lda #$00 - sta $D9 + lda #$00 ; CPU:$E08A PRG:208A A9 00 + sta $D9 ; CPU:$E08C PRG:208C 85 D9 - ldx #$00 + ldx #$00 ; CPU:$E08E PRG:208E A2 00 - lda #$2F - sta $00 + lda #$2F ; CPU:$E090 PRG:2090 A9 2F + sta $00 ; CPU:$E092 PRG:2092 85 00 - lda #$02 - sta $01 + lda #$02 ; CPU:$E094 PRG:2094 A9 02 + sta $01 ; CPU:$E096 PRG:2096 85 01 - lda #$1E - sta $02 + lda #$1E ; CPU:$E098 PRG:2098 A9 1E + sta $02 ; CPU:$E09A PRG:209A 85 02 - lda #$00 - sta $03 + lda #$00 ; CPU:$E09C PRG:209C A9 00 + sta $03 ; CPU:$E09E PRG:209E 85 03 @E09E: - lda #$0F - cmp $88 - beq @E0AA + lda #$0F ; CPU:$E0A0 PRG:20A0 A9 0F + cmp $88 ; CPU:$E0A2 PRG:20A2 C5 88 + beq @E0AA ; CPU:$E0A4 PRG:20A4 F0 04 - lda $D2 - bne @E0D1 + lda $D2 ; CPU:$E0A6 PRG:20A6 A5 D2 + bne @E0D1 ; CPU:$E0A8 PRG:20A8 D0 27 @E0AA: - lda $B8,x - cmp #$04 - bne @E0D1 + lda $B8,x ; CPU:$E0AA PRG:20AA B5 B8 + cmp #$04 ; CPU:$E0AC PRG:20AC C9 04 + bne @E0D1 ; CPU:$E0AE PRG:20AE D0 21 - lda $B9,x - clc - adc #$02 - and #$03 - sta $04 + lda $B9,x ; CPU:$E0B0 PRG:20B0 B5 B9 + clc ; CPU:$E0B2 PRG:20B2 18 + adc #$02 ; CPU:$E0B3 PRG:20B3 69 02 + and #$03 ; CPU:$E0B5 PRG:20B5 29 03 + sta $04 ; CPU:$E0B7 PRG:20B7 85 04 - ldy #$00 + ldy #$00 ; CPU:$E0B9 PRG:20B9 A0 00 - lda ($02),y + lda ($02),y ; CPU:$E0BB PRG:20BB B1 02 - ldy #$02 + ldy #$02 ; CPU:$E0BD PRG:20BD A0 02 - ora ($02),y - and #$07 - bne @E0CD + ora ($02),y ; CPU:$E0BF PRG:20BF 11 02 + and #$07 ; CPU:$E0C1 PRG:20C1 29 07 + bne @E0CD ; CPU:$E0C3 PRG:20C3 D0 08 - ldy $04 + ldy $04 ; CPU:$E0C5 PRG:20C5 A4 04 - lda ($00),y - and #$F8 - bne @E0D1 + lda ($00),y ; CPU:$E0C7 PRG:20C7 B1 00 + and #$F8 ; CPU:$E0C9 PRG:20C9 29 F8 + bne @E0D1 ; CPU:$E0CB PRG:20CB D0 04 @E0CD: - lda $04 - sta $B9,x + lda $04 ; CPU:$E0CD PRG:20CD A5 04 + sta $B9,x ; CPU:$E0CF PRG:20CF 95 B9 @E0D1: - lda $00 - clc - adc #$04 - sta $00 + lda $00 ; CPU:$E0D1 PRG:20D1 A5 00 + clc ; CPU:$E0D3 PRG:20D3 18 + adc #$04 ; CPU:$E0D4 PRG:20D4 69 04 + sta $00 ; CPU:$E0D6 PRG:20D6 85 00 - lda $02 - clc - adc #$04 - sta $02 + lda $02 ; CPU:$E0D8 PRG:20D8 A5 02 + clc ; CPU:$E0DA PRG:20DA 18 + adc #$04 ; CPU:$E0DB PRG:20DB 69 04 + sta $02 ; CPU:$E0DD PRG:20DD 85 02 - inx - inx + inx ; CPU:$E0DF PRG:20DF E8 + inx ; CPU:$E0E0 PRG:20E0 E8 - cpx #$08 - bne @E0AA + cpx #$08 ; CPU:$E0E1 PRG:20E1 E0 08 + bne @E0AA ; CPU:$E0E3 PRG:20E3 D0 C5 - rts + rts ; CPU:$E0E5 PRG:20E5 60 ;============================================================================== ; $E0E6-$E1BF: Score / State Display Update @@ -9817,10 +9620,10 @@ InitializeEntityDirectionState: ;============================================================================== UpdateScoreDisplay: - lda $48 - beq @E0EB + lda $48 ; CPU:$E0E6 PRG:20E6 A5 48 + beq @E0EB ; CPU:$E0E8 PRG:20E8 F0 01 - rts + rts ; CPU:$E0EA PRG:20EA 60 ;------------------------------------------------------------------------------ @@ -9829,12 +9632,12 @@ UpdateScoreDisplay: ;------------------------------------------------------------------------------ @E0EB: - ldy #$00 + ldy #$00 ; CPU:$E0EB PRG:20EB A0 00 - lda #$06 - sta $00 + lda #$06 ; CPU:$E0ED PRG:20ED A9 06 + sta $00 ; CPU:$E0EF PRG:20EF 85 00 - clc + clc ; CPU:$E0F1 PRG:20F1 18 ;------------------------------------------------------------------------------ @@ -9842,17 +9645,17 @@ UpdateScoreDisplay: ;------------------------------------------------------------------------------ @E0F2: - lda $70,y - adc $DC,y - sta $70,y + lda $70,y ; CPU:$E0F2 PRG:20F2 B9 70 + adc $DC,y ; CPU:$E0F4 PRG:20F4 00 79 + sta $70,y ; CPU:$E0F6 PRG:20F6 DC 00 - cmp #$0A - bcc @E105 + cmp #$0A ; CPU:$E0F8 PRG:20F8 99 70 + bcc @E105 ; CPU:$E0FA PRG:20FA 00 C9 - sbc #$0A - sta $70,y + sbc #$0A ; CPU:$E0FC PRG:20FC 0A 90 + sta $70,y ; CPU:$E0FE PRG:20FE 06 E9 - sec + sec ; CPU:$E100 PRG:2100 0A ;------------------------------------------------------------------------------ @@ -9861,13 +9664,13 @@ UpdateScoreDisplay: ;------------------------------------------------------------------------------ @E105: - lda #$00 - sta $DC,y + lda #$00 ; CPU:$E101 PRG:2101 99 70 + sta $DC,y ; CPU:$E103 PRG:2103 00 38 - iny + iny ; CPU:$E105 PRG:2105 A9 - dec $00 - bne @E0F2 + dec $00 ; CPU:$E106 PRG:2106 00 99 + bne @E0F2 ; CPU:$E108 PRG:2108 DC 00 ;------------------------------------------------------------------------------ @@ -9875,9 +9678,9 @@ UpdateScoreDisplay: ; Convert the six numeric values into display/tile values. ;------------------------------------------------------------------------------ - ldx #$00 + ldx #$00 ; CPU:$E10A PRG:210A C8 C6 - dey + dey ; CPU:$E10C PRG:210C 00 ;------------------------------------------------------------------------------ @@ -9886,19 +9689,19 @@ UpdateScoreDisplay: ;------------------------------------------------------------------------------ @E112: - lda $70,y - jsr $E1CE + lda $70,y ; CPU:$E10D PRG:210D D0 E3 + jsr $E1CE ; CPU:$E10F PRG:210F A2 00 88 - cmp #$30 - bne @E12B + cmp #$30 ; CPU:$E112 PRG:2112 B9 70 + bne @E12B ; CPU:$E114 PRG:2114 00 20 - lda #$20 - sta $023F,x + lda #$20 ; CPU:$E116 PRG:2116 CE E1 + sta $023F,x ; CPU:$E118 PRG:2118 C9 30 D0 - inx + inx ; CPU:$E11B PRG:211B 0F - dey - bne @E112 + dey ; CPU:$E11C PRG:211C A9 + bne @E112 ; CPU:$E11D PRG:211D 20 9D ;------------------------------------------------------------------------------ @@ -9907,8 +9710,8 @@ UpdateScoreDisplay: ;------------------------------------------------------------------------------ @E125: - lda $70,y - jsr $E1CE + lda $70,y ; CPU:$E11F PRG:211F 3F 02 + jsr $E1CE ; CPU:$E121 PRG:2121 E8 88 D0 ;------------------------------------------------------------------------------ @@ -9916,12 +9719,12 @@ UpdateScoreDisplay: ;------------------------------------------------------------------------------ @E12B: - sta $023F,x + sta $023F,x ; CPU:$E124 PRG:2124 ED B9 70 - inx + inx ; CPU:$E127 PRG:2127 00 - dey - bpl @E125 + dey ; CPU:$E128 PRG:2128 20 + bpl @E125 ; CPU:$E129 PRG:2129 CE E1 ;------------------------------------------------------------------------------ @@ -9929,47 +9732,47 @@ UpdateScoreDisplay: ; Progression check. ;------------------------------------------------------------------------------ - lda $6B - bne @E196 + lda $6B ; CPU:$E12B PRG:212B 9D 3F + bne @E196 ; CPU:$E12D PRG:212D 02 E8 - lda #$01 - cmp $73 - bne @E196 + lda #$01 ; CPU:$E12F PRG:212F 88 10 + cmp $73 ; CPU:$E131 PRG:2131 F3 A5 + bne @E196 ; CPU:$E133 PRG:2133 6B D0 - lda #$01 - sta $6B - sta $0602 + lda #$01 ; CPU:$E135 PRG:2135 60 A9 + sta $6B ; CPU:$E137 PRG:2137 01 C5 + sta $0602 ; CPU:$E139 PRG:2139 73 D0 5A - inc $67 + inc $67 ; CPU:$E13C PRG:213C A9 01 - lda $67 - sec - sbc #$02 - asl - sta $00 + lda $67 ; CPU:$E13E PRG:213E 85 6B + sec ; CPU:$E140 PRG:2140 8D + sbc #$02 ; CPU:$E141 PRG:2141 02 06 + asl ; CPU:$E143 PRG:2143 E6 + sta $00 ; CPU:$E144 PRG:2144 67 A5 ;------------------------------------------------------------------------------ ; Locate the $FF terminator of the $024B display-command stream. ;------------------------------------------------------------------------------ - ldy #$FF + ldy #$FF ; CPU:$E146 PRG:2146 67 38 @E14D: - iny + iny ; CPU:$E148 PRG:2148 E9 - lda $024B,y - cmp #$FF - bne @E14D + lda $024B,y ; CPU:$E149 PRG:2149 02 0A 85 + cmp #$FF ; CPU:$E14C PRG:214C 00 A0 + bne @E14D ; CPU:$E14E PRG:214E FF C8 - tya - beq @E15D + tya ; CPU:$E150 PRG:2150 B9 + beq @E15D ; CPU:$E151 PRG:2151 4B 02 - lda #$00 - sta $024B,y + lda #$00 ; CPU:$E153 PRG:2153 C9 FF + sta $024B,y ; CPU:$E155 PRG:2155 D0 F8 98 - iny + iny ; CPU:$E158 PRG:2158 F0 ;------------------------------------------------------------------------------ @@ -9978,17 +9781,17 @@ UpdateScoreDisplay: ;------------------------------------------------------------------------------ @E15D: - lda $46 - and $47 - beq @E165 + lda $46 ; CPU:$E159 PRG:2159 06 A9 + and $47 ; CPU:$E15B PRG:215B 00 99 + beq @E165 ; CPU:$E15D PRG:215D 4B 02 - lda #$08 + lda #$08 ; CPU:$E15F PRG:215F C8 A5 @E165: - sta $01 + sta $01 ; CPU:$E161 PRG:2161 46 25 - ldx #$00 + ldx #$00 ; CPU:$E163 PRG:2163 47 F0 ;------------------------------------------------------------------------------ @@ -9997,38 +9800,38 @@ UpdateScoreDisplay: ;------------------------------------------------------------------------------ @E169: - lda ScorePpuCommandTemplates,x - clc - adc $01 - sta $024B,y + lda ScorePpuCommandTemplates,x ; CPU:$E165 PRG:2165 02 A9 08 + clc ; CPU:$E168 PRG:2168 85 + adc $01 ; CPU:$E169 PRG:2169 01 A2 + sta $024B,y ; CPU:$E16B PRG:216B 00 BD C0 - iny - inx + iny ; CPU:$E16E PRG:216E E1 + inx ; CPU:$E16F PRG:216F 18 - lda ScorePpuCommandTemplates,x - clc - adc $00 - sta $024B,y + lda ScorePpuCommandTemplates,x ; CPU:$E170 PRG:2170 65 01 99 + clc ; CPU:$E173 PRG:2173 4B + adc $00 ; CPU:$E174 PRG:2174 02 C8 + sta $024B,y ; CPU:$E176 PRG:2176 E8 BD C0 - lda #$03 - sta $02 + lda #$03 ; CPU:$E179 PRG:2179 E1 18 + sta $02 ; CPU:$E17B PRG:217B 65 00 @E182: - iny - inx + iny ; CPU:$E17D PRG:217D 99 + inx ; CPU:$E17E PRG:217E 4B - lda ScorePpuCommandTemplates,x - sta $024B,y + lda ScorePpuCommandTemplates,x ; CPU:$E17F PRG:217F 02 A9 03 + sta $024B,y ; CPU:$E182 PRG:2182 85 02 C8 - dec $02 - bne @E182 + dec $02 ; CPU:$E185 PRG:2185 E8 BD + bne @E182 ; CPU:$E187 PRG:2187 C0 E1 - iny - inx + iny ; CPU:$E189 PRG:2189 99 + inx ; CPU:$E18A PRG:218A 4B - cpx #$0A - bne @E169 + cpx #$0A ; CPU:$E18B PRG:218B 02 C6 + bne @E169 ; CPU:$E18D PRG:218D 02 D0 ;------------------------------------------------------------------------------ @@ -10037,24 +9840,24 @@ UpdateScoreDisplay: ;------------------------------------------------------------------------------ @E196: - ldy #$05 + ldy #$05 ; CPU:$E18F PRG:218F F4 C8 @E198: - lda $61,y - cmp $70,y - beq @E1A3 + lda $61,y ; CPU:$E191 PRG:2191 E8 E0 + cmp $70,y ; CPU:$E193 PRG:2193 0A D0 + beq @E1A3 ; CPU:$E195 PRG:2195 D6 A0 - bcc @E1A7 + bcc @E1A7 ; CPU:$E197 PRG:2197 05 B9 - rts + rts ; CPU:$E199 PRG:2199 61 @E1A3: - dey - bpl @E198 + dey ; CPU:$E19A PRG:219A 00 + bpl @E198 ; CPU:$E19B PRG:219B D9 70 - rts + rts ; CPU:$E19D PRG:219D 00 ;------------------------------------------------------------------------------ @@ -10063,42 +9866,42 @@ UpdateScoreDisplay: ;------------------------------------------------------------------------------ @E1A7: - ldx #$00 + ldx #$00 ; CPU:$E19E PRG:219E F0 03 @E1A9: - lda $023F,x - sta $0245,x + lda $023F,x ; CPU:$E1A0 PRG:21A0 90 05 60 + sta $0245,x ; CPU:$E1A3 PRG:21A3 88 10 F2 - inx - cpx #$06 - bne @E1A9 + inx ; CPU:$E1A6 PRG:21A6 60 + cpx #$06 ; CPU:$E1A7 PRG:21A7 A2 00 + bne @E1A9 ; CPU:$E1A9 PRG:21A9 BD 3F ;------------------------------------------------------------------------------ ; Copy current values $70-$75 into saved values $61-$66. ;------------------------------------------------------------------------------ - ldx #$00 + ldx #$00 ; CPU:$E1AB PRG:21AB 02 9D @E1B4: - lda $70,x - sta $61,x + lda $70,x ; CPU:$E1AD PRG:21AD 45 02 + sta $61,x ; CPU:$E1AF PRG:21AF E8 E0 - inx - cpx #$06 - bne @E1B4 + inx ; CPU:$E1B1 PRG:21B1 06 + cpx #$06 ; CPU:$E1B2 PRG:21B2 D0 F5 + bne @E1B4 ; CPU:$E1B4 PRG:21B4 A2 00 - rts + rts ; CPU:$E1B6 PRG:21B6 B5 ;============================================================================== ; $E1C0-$E1C9: Score Display Command Table ;============================================================================== ScorePpuCommandTemplates: - .byte $23,$17,$3C,$3D,$00 - .byte $23,$37,$3E,$3F,$FF + .byte $23,$17,$3C,$3D,$00 ; CPU:$E1C0 PRG:21C0 23 17 3C 3D 00 + .byte $23,$37,$3E,$3F,$FF ; CPU:$E1C5 PRG:21C5 23 37 3E 3F FF ;============================================================================== ; $E1CA-$E1D9: Convert High Nibble to Display Character @@ -10121,22 +9924,22 @@ ScorePpuCommandTemplates: ;============================================================================== ConvertNibbleToDigitTile: - lsr - lsr - lsr - lsr + lsr ; CPU:$E1CA PRG:21CA 4A + lsr ; CPU:$E1CB PRG:21CB 4A + lsr ; CPU:$E1CC PRG:21CC 4A + lsr ; CPU:$E1CD PRG:21CD 4A - and #$0F + and #$0F ; CPU:$E1CE PRG:21CE 29 0F - cmp #$0A - bcs @HexDigit + cmp #$0A ; CPU:$E1D0 PRG:21D0 C9 0A + bcs @HexDigit ; CPU:$E1D2 PRG:21D2 B0 03 - adc #$30 - rts + adc #$30 ; CPU:$E1D4 PRG:21D4 69 30 + rts ; CPU:$E1D6 PRG:21D6 60 @HexDigit: - adc #$36 - rts + adc #$36 ; CPU:$E1D7 PRG:21D7 69 36 + rts ; CPU:$E1D9 PRG:21D9 60 ;============================================================================== ; $E1DA-$E262: Rebuild Gameplay Coordinate/Map Buffer @@ -10165,107 +9968,107 @@ ConvertNibbleToDigitTile: ;============================================================================== BuildNearbyTileAddressBuffer: - lda $1A - sta $02 + lda $1A ; CPU:$E1DA PRG:21DA A5 1A + sta $02 ; CPU:$E1DC PRG:21DC 85 02 - lda $1C - sta $03 + lda $1C ; CPU:$E1DE PRG:21DE A5 1C + sta $03 ; CPU:$E1E0 PRG:21E0 85 03 - jsr $E263 + jsr $E263 ; CPU:$E1E2 PRG:21E2 20 63 E2 - lda $03 - sta $0200 + lda $03 ; CPU:$E1E5 PRG:21E5 A5 03 + sta $0200 ; CPU:$E1E7 PRG:21E7 8D 00 02 - lda $02 - sta $0201 + lda $02 ; CPU:$E1EA PRG:21EA A5 02 + sta $0201 ; CPU:$E1EC PRG:21EC 8D 01 02 - ldx #$00 - ldy #$00 + ldx #$00 ; CPU:$E1EF PRG:21EF A2 00 + ldy #$00 ; CPU:$E1F1 PRG:21F1 A0 00 @E1F2: - lda $1A,x - sta $02 + lda $1A,x ; CPU:$E1F3 PRG:21F3 B5 1A + sta $02 ; CPU:$E1F5 PRG:21F5 85 02 - lda $1C,x - sta $03 + lda $1C,x ; CPU:$E1F7 PRG:21F7 B5 1C + sta $03 ; CPU:$E1F9 PRG:21F9 85 03 - jsr $E263 + jsr $E263 ; CPU:$E1FB PRG:21FB 20 63 E2 - lda #$20 - sta $14 + lda #$20 ; CPU:$E1FE PRG:21FE A9 20 + sta $14 ; CPU:$E200 PRG:2200 85 14 - lda #$00 - sta $15 + lda #$00 ; CPU:$E202 PRG:2202 A9 00 + sta $15 ; CPU:$E204 PRG:2204 85 15 - lda $02 - sta $12 + lda $02 ; CPU:$E206 PRG:2206 A5 02 + sta $12 ; CPU:$E208 PRG:2208 85 12 - lda $03 - sta $13 + lda $03 ; CPU:$E20A PRG:220A A5 03 + sta $13 ; CPU:$E20C PRG:220C 85 13 - jsr $E2D4 + jsr $E2D4 ; CPU:$E20E PRG:220E 20 D4 E2 - lda $13 - sta $0202,y + lda $13 ; CPU:$E211 PRG:2211 A5 13 + sta $0202,y ; CPU:$E213 PRG:2213 99 02 02 - lda $12 - iny - sta $0202,y + lda $12 ; CPU:$E216 PRG:2216 A5 12 + iny ; CPU:$E218 PRG:2218 C8 + sta $0202,y ; CPU:$E219 PRG:2219 99 02 02 - lda $03 - iny - sta $0202,y + lda $03 ; CPU:$E21C PRG:221C A5 03 + iny ; CPU:$E21E PRG:221E C8 + sta $0202,y ; CPU:$E21F PRG:221F 99 02 02 - lda $02 - sec - sbc #$01 - iny - sta $0202,y + lda $02 ; CPU:$E222 PRG:2222 A5 02 + sec ; CPU:$E224 PRG:2224 38 + sbc #$01 ; CPU:$E225 PRG:2225 E9 01 + iny ; CPU:$E227 PRG:2227 C8 + sta $0202,y ; CPU:$E228 PRG:2228 99 02 02 - lda #$20 - sta $14 + lda #$20 ; CPU:$E22B PRG:222B A9 20 + sta $14 ; CPU:$E22D PRG:222D 85 14 - lda #$00 - sta $15 + lda #$00 ; CPU:$E22F PRG:222F A9 00 + sta $15 ; CPU:$E231 PRG:2231 85 15 - lda $02 - sta $12 + lda $02 ; CPU:$E233 PRG:2233 A5 02 + sta $12 ; CPU:$E235 PRG:2235 85 12 - lda $03 - sta $13 + lda $03 ; CPU:$E237 PRG:2237 A5 03 + sta $13 ; CPU:$E239 PRG:2239 85 13 - jsr $E2C6 + jsr $E2C6 ; CPU:$E23B PRG:223B 20 C6 E2 - lda $13 - iny - sta $0202,y + lda $13 ; CPU:$E23E PRG:223E A5 13 + iny ; CPU:$E240 PRG:2240 C8 + sta $0202,y ; CPU:$E241 PRG:2241 99 02 02 - lda $12 - iny - sta $0202,y + lda $12 ; CPU:$E244 PRG:2244 A5 12 + iny ; CPU:$E246 PRG:2246 C8 + sta $0202,y ; CPU:$E247 PRG:2247 99 02 02 - lda $03 - iny - sta $0202,y + lda $03 ; CPU:$E24A PRG:224A A5 03 + iny ; CPU:$E24C PRG:224C C8 + sta $0202,y ; CPU:$E24D PRG:224D 99 02 02 - lda $02 - clc - adc #$01 - iny - sta $0202,y + lda $02 ; CPU:$E250 PRG:2250 A5 02 + clc ; CPU:$E252 PRG:2252 18 + adc #$01 ; CPU:$E253 PRG:2253 69 01 + iny ; CPU:$E255 PRG:2255 C8 + sta $0202,y ; CPU:$E256 PRG:2256 99 02 02 - inx - inx - inx - inx + inx ; CPU:$E259 PRG:2259 E8 + inx ; CPU:$E25A PRG:225A E8 + inx ; CPU:$E25B PRG:225B E8 + inx ; CPU:$E25C PRG:225C E8 - iny + iny ; CPU:$E25D PRG:225D C8 - cpy #$28 - bne @E1F2 + cpy #$28 ; CPU:$E25E PRG:225E C0 28 + bne @E1F2 ; CPU:$E260 PRG:2260 D0 91 - rts + rts ; CPU:$E262 PRG:2262 60 ;============================================================================== ; $E263-$E2A1: Convert Gameplay Coordinates to Map/PPU Address @@ -10300,58 +10103,58 @@ BuildNearbyTileAddressBuffer: ;============================================================================== ConvertPixelToNametableAddress: - lda #$00 - sta $05 + lda #$00 ; CPU:$E263 PRG:2263 A9 00 + sta $05 ; CPU:$E265 PRG:2265 85 05 - lda $03 - sec - sbc #$04 - and #$F8 + lda $03 ; CPU:$E267 PRG:2267 A5 03 + sec ; CPU:$E269 PRG:2269 38 + sbc #$04 ; CPU:$E26A PRG:226A E9 04 + and #$F8 ; CPU:$E26C PRG:226C 29 F8 - asl - rol $05 + asl ; CPU:$E26E PRG:226E 0A + rol $05 ; CPU:$E26F PRG:226F 26 - asl - rol $05 + asl ; CPU:$E270 PRG:2270 05 + rol $05 ; CPU:$E271 PRG:2271 0A - clc - adc #$40 - sta $04 + clc ; CPU:$E272 PRG:2272 26 + adc #$40 ; CPU:$E273 PRG:2273 05 18 + sta $04 ; CPU:$E275 PRG:2275 69 40 - lda #$00 - adc $05 - sta $05 + lda #$00 ; CPU:$E277 PRG:2277 85 04 + adc $05 ; CPU:$E279 PRG:2279 A9 00 + sta $05 ; CPU:$E27B PRG:227B 65 05 - lda $02 - sec - sbc #$04 + lda $02 ; CPU:$E27D PRG:227D 85 05 + sec ; CPU:$E27F PRG:227F A5 + sbc #$04 ; CPU:$E280 PRG:2280 02 38 - lsr - lsr - lsr + lsr ; CPU:$E282 PRG:2282 E9 + lsr ; CPU:$E283 PRG:2283 04 + lsr ; CPU:$E284 PRG:2284 4A - clc - adc $04 - sta $02 + clc ; CPU:$E285 PRG:2285 4A + adc $04 ; CPU:$E286 PRG:2286 4A 18 + sta $02 ; CPU:$E288 PRG:2288 65 04 - lda $05 - clc - adc #$20 - sta $03 + lda $05 ; CPU:$E28A PRG:228A 85 02 + clc ; CPU:$E28C PRG:228C A5 + adc #$20 ; CPU:$E28D PRG:228D 05 18 + sta $03 ; CPU:$E28F PRG:228F 69 20 - lda $46 - and $47 - bne @E299 + lda $46 ; CPU:$E291 PRG:2291 85 03 + and $47 ; CPU:$E293 PRG:2293 A5 46 + bne @E299 ; CPU:$E295 PRG:2295 25 47 - rts + rts ; CPU:$E297 PRG:2297 D0 @E299: - lda $03 - clc - adc #$08 - sta $03 + lda $03 ; CPU:$E298 PRG:2298 01 60 + clc ; CPU:$E29A PRG:229A A5 + adc #$08 ; CPU:$E29B PRG:229B 03 18 + sta $03 ; CPU:$E29D PRG:229D 69 08 - rts + rts ; CPU:$E29F PRG:229F 85 ;============================================================================== ; $E2A2-$E2C5: Read PPU Values for Coordinate Address Buffer @@ -10363,35 +10166,35 @@ ConvertPixelToNametableAddress: ;============================================================================== ReadNearbyNametableTiles: - ldx #$00 - ldy #$00 + ldx #$00 ; CPU:$E2A2 PRG:22A2 A2 00 + ldy #$00 ; CPU:$E2A4 PRG:22A4 A0 00 - lda PPUSTATUS + lda PPUSTATUS ; CPU:$E2A6 PRG:22A6 AD 02 20 @E2A9: - lda $0200,x - sta PPUADDR + lda $0200,x ; CPU:$E2A9 PRG:22A9 BD 00 02 + sta PPUADDR ; CPU:$E2AC PRG:22AC 8D 06 20 - inx + inx ; CPU:$E2AF PRG:22AF E8 - lda $0200,x - sta PPUADDR + lda $0200,x ; CPU:$E2B0 PRG:22B0 BD 00 02 + sta PPUADDR ; CPU:$E2B3 PRG:22B3 8D 06 20 ; Buffered PPU read. - lda PPUDATA + lda PPUDATA ; CPU:$E2B6 PRG:22B6 AD 07 20 ; Actual requested value. - lda PPUDATA - sta $022A,y + lda PPUDATA ; CPU:$E2B9 PRG:22B9 AD 07 20 + sta $022A,y ; CPU:$E2BC PRG:22BC 99 2A 02 - inx - iny + inx ; CPU:$E2BF PRG:22BF E8 + iny ; CPU:$E2C0 PRG:22C0 C8 - cpx #$2A - bne @E2A9 + cpx #$2A ; CPU:$E2C1 PRG:22C1 E0 2A + bne @E2A9 ; CPU:$E2C3 PRG:22C3 D0 E4 - rts + rts ; CPU:$E2C5 PRG:22C5 60 ;============================================================================== @@ -10406,17 +10209,17 @@ ReadNearbyNametableTiles: ;============================================================================== Add16BitWorkingValue: - clc + clc ; CPU:$E2C6 PRG:22C6 18 - lda $12 - adc $14 - sta $12 + lda $12 ; CPU:$E2C7 PRG:22C7 A5 12 + adc $14 ; CPU:$E2C9 PRG:22C9 65 14 + sta $12 ; CPU:$E2CB PRG:22CB 85 12 - lda $13 - adc $15 - sta $13 + lda $13 ; CPU:$E2CD PRG:22CD A5 13 + adc $15 ; CPU:$E2CF PRG:22CF 65 15 + sta $13 ; CPU:$E2D1 PRG:22D1 85 13 - rts + rts ; CPU:$E2D3 PRG:22D3 60 ;============================================================================== ; $E2D4-$E2E1: Subtract 16-Bit Working Values ; @@ -10428,17 +10231,17 @@ Add16BitWorkingValue: ; $12/$13 = first operand - second operand ;============================================================================== Subtract16BitWorkingValue: - sec + sec ; CPU:$E2D4 PRG:22D4 38 - lda $12 - sbc $14 - sta $12 + lda $12 ; CPU:$E2D5 PRG:22D5 A5 12 + sbc $14 ; CPU:$E2D7 PRG:22D7 E5 14 + sta $12 ; CPU:$E2D9 PRG:22D9 85 12 - lda $13 - sbc $15 - sta $13 + lda $13 ; CPU:$E2DB PRG:22DB A5 13 + sbc $15 ; CPU:$E2DD PRG:22DD E5 15 + sta $13 ; CPU:$E2DF PRG:22DF 85 13 - rts + rts ; CPU:$E2E1 PRG:22E1 60 ;============================================================================== ; $E2E2-$E381: Draw Gameplay Nametable @@ -10469,18 +10272,18 @@ Subtract16BitWorkingValue: ;============================================================================== DrawMazeNametable: - lda #$20 - sta $02 + lda #$20 ; CPU:$E2E2 PRG:22E2 A9 20 + sta $02 ; CPU:$E2E4 PRG:22E4 85 02 - lda #$40 - sta $03 + lda #$40 ; CPU:$E2E6 PRG:22E6 A9 40 + sta $03 ; CPU:$E2E8 PRG:22E8 85 03 - lda $47 - and $46 - beq @E2F4 + lda $47 ; CPU:$E2EA PRG:22EA A5 47 + and $46 ; CPU:$E2EC PRG:22EC 25 46 + beq @E2F4 ; CPU:$E2EE PRG:22EE F0 04 - lda #$28 - sta $02 + lda #$28 ; CPU:$E2F0 PRG:22F0 A9 28 + sta $02 ; CPU:$E2F2 PRG:22F2 85 02 ;------------------------------------------------------------------------------ @@ -10489,14 +10292,14 @@ DrawMazeNametable: ;------------------------------------------------------------------------------ @E2F4: - lda MazeDataPointerBytes+1 - sta $01 + lda MazeDataPointerBytes+1 ; CPU:$E2F4 PRG:22F4 AD F7 FF + sta $01 ; CPU:$E2F7 PRG:22F7 85 01 - lda MazeDataPointerBytes - sta $00 + lda MazeDataPointerBytes ; CPU:$E2F9 PRG:22F9 AD F6 FF + sta $00 ; CPU:$E2FC PRG:22FC 85 00 - ldx #$1B - ldy #$00 + ldx #$1B ; CPU:$E2FE PRG:22FE A2 1B + ldy #$00 ; CPU:$E300 PRG:2300 A0 00 ;------------------------------------------------------------------------------ @@ -10505,16 +10308,16 @@ DrawMazeNametable: ;------------------------------------------------------------------------------ @E302: - lda PPUSTATUS + lda PPUSTATUS ; CPU:$E302 PRG:2302 AD 02 20 - lda $02 - sta PPUADDR + lda $02 ; CPU:$E305 PRG:2305 A5 02 + sta PPUADDR ; CPU:$E307 PRG:2307 8D 06 20 - lda $03 - sta PPUADDR + lda $03 ; CPU:$E30A PRG:230A A5 03 + sta PPUADDR ; CPU:$E30C PRG:230C 8D 06 20 - lda #$16 - sta $04 + lda #$16 ; CPU:$E30F PRG:230F A9 16 + sta $04 ; CPU:$E311 PRG:2311 85 04 ;------------------------------------------------------------------------------ @@ -10523,19 +10326,19 @@ DrawMazeNametable: ;------------------------------------------------------------------------------ @E313: - lda #$00 - sta $05 + lda #$00 ; CPU:$E313 PRG:2313 A9 00 + sta $05 ; CPU:$E315 PRG:2315 85 05 - lda ($00),y + lda ($00),y ; CPU:$E317 PRG:2317 B1 00 - asl - rol $05 + asl ; CPU:$E319 PRG:2319 0A + rol $05 ; CPU:$E31A PRG:231A 26 - asl - rol $05 + asl ; CPU:$E31B PRG:231B 05 + rol $05 ; CPU:$E31C PRG:231C 0A - lda ($00),y - and #$3F + lda ($00),y ; CPU:$E31D PRG:231D 26 05 + and #$3F ; CPU:$E31F PRG:231F B1 00 ;------------------------------------------------------------------------------ @@ -10544,16 +10347,16 @@ DrawMazeNametable: ;------------------------------------------------------------------------------ @E321: - sta PPUDATA + sta PPUDATA ; CPU:$E321 PRG:2321 29 3F 8D - dec $04 - dec $05 - bpl @E321 + dec $04 ; CPU:$E324 PRG:2324 07 20 + dec $05 ; CPU:$E326 PRG:2326 C6 04 + bpl @E321 ; CPU:$E328 PRG:2328 C6 05 - iny - bne @E32F + iny ; CPU:$E32A PRG:232A 10 + bne @E32F ; CPU:$E32B PRG:232B F7 C8 - inc $01 + inc $01 ; CPU:$E32D PRG:232D D0 02 ;------------------------------------------------------------------------------ @@ -10562,40 +10365,40 @@ DrawMazeNametable: ;------------------------------------------------------------------------------ @E32F: - lda $04 - bne @E313 + lda $04 ; CPU:$E32F PRG:232F E6 01 + bne @E313 ; CPU:$E331 PRG:2331 A5 04 - lda $03 - clc - adc #$20 - sta $03 + lda $03 ; CPU:$E333 PRG:2333 D0 DE + clc ; CPU:$E335 PRG:2335 A5 + adc #$20 ; CPU:$E336 PRG:2336 03 18 + sta $03 ; CPU:$E338 PRG:2338 69 20 - lda $02 - adc #$00 - sta $02 + lda $02 ; CPU:$E33A PRG:233A 85 03 + adc #$00 ; CPU:$E33C PRG:233C A5 02 + sta $02 ; CPU:$E33E PRG:233E 69 00 - dex - bne @E302 + dex ; CPU:$E340 PRG:2340 85 + bne @E302 ; CPU:$E341 PRG:2341 02 CA ;============================================================================== ; $E345-$E381: Draw additional nametable decoration strips. ;============================================================================== - ldy #$02 + ldy #$02 ; CPU:$E343 PRG:2343 D0 BD - lda #$21 - sta $00 + lda #$21 ; CPU:$E345 PRG:2345 A0 02 + sta $00 ; CPU:$E347 PRG:2347 A9 21 - lda #$D6 - sta $01 + lda #$D6 ; CPU:$E349 PRG:2349 85 00 + sta $01 ; CPU:$E34B PRG:234B A9 D6 - lda $47 - and $46 - beq @E359 + lda $47 ; CPU:$E34D PRG:234D 85 01 + and $46 ; CPU:$E34F PRG:234F A5 47 + beq @E359 ; CPU:$E351 PRG:2351 25 46 - lda #$29 - sta $00 + lda #$29 ; CPU:$E353 PRG:2353 F0 04 + sta $00 ; CPU:$E355 PRG:2355 A9 29 ;------------------------------------------------------------------------------ @@ -10604,17 +10407,17 @@ DrawMazeNametable: ;------------------------------------------------------------------------------ @E359: - ldx #$07 + ldx #$07 ; CPU:$E357 PRG:2357 85 00 - lda PPUSTATUS + lda PPUSTATUS ; CPU:$E359 PRG:2359 A2 07 AD - lda $00 - sta PPUADDR + lda $00 ; CPU:$E35C PRG:235C 02 20 + sta PPUADDR ; CPU:$E35E PRG:235E A5 00 8D - lda $01 - sta PPUADDR + lda $01 ; CPU:$E361 PRG:2361 06 20 + sta PPUADDR ; CPU:$E363 PRG:2363 A5 01 8D - lda MazeNametableDecorationTiles,y + lda MazeNametableDecorationTiles,y ; CPU:$E366 PRG:2366 06 20 B9 ;------------------------------------------------------------------------------ ; $E36B @@ -10622,31 +10425,31 @@ DrawMazeNametable: ;------------------------------------------------------------------------------ @E36B: - sta PPUDATA + sta PPUDATA ; CPU:$E369 PRG:2369 82 E3 8D - dex - bpl @E36B + dex ; CPU:$E36C PRG:236C 07 + bpl @E36B ; CPU:$E36D PRG:236D 20 CA - lda $01 - clc - adc #$20 - sta $01 + lda $01 ; CPU:$E36F PRG:236F 10 FA + clc ; CPU:$E371 PRG:2371 A5 + adc #$20 ; CPU:$E372 PRG:2372 01 18 + sta $01 ; CPU:$E374 PRG:2374 69 20 - lda #$00 - adc $00 - sta $00 + lda #$00 ; CPU:$E376 PRG:2376 85 01 + adc $00 ; CPU:$E378 PRG:2378 A9 00 + sta $00 ; CPU:$E37A PRG:237A 65 00 - dey - bpl @E359 + dey ; CPU:$E37C PRG:237C 85 + bpl @E359 ; CPU:$E37D PRG:237D 00 88 - rts + rts ; CPU:$E37F PRG:237F 10 ;============================================================================== ; $E382-$E385: Gameplay Nametable Decoration Table ;============================================================================== MazeNametableDecorationTiles: - .byte $2D,$04,$2D + .byte $2D,$04,$2D ; CPU:$E382 PRG:2382 2D 04 2D ;============================================================================== ; $E385-$E3FE: Initialize Gameplay Nametable Regions ; @@ -10658,16 +10461,16 @@ MazeNametableDecorationTiles: ;============================================================================== ClearGameplayNametables: - lda PPUSTATUS + lda PPUSTATUS ; CPU:$E385 PRG:2385 AD 02 20 - lda #$20 - sta PPUADDR + lda #$20 ; CPU:$E388 PRG:2388 A9 20 + sta PPUADDR ; CPU:$E38A PRG:238A 8D 06 20 - lda #$00 - sta PPUADDR + lda #$00 ; CPU:$E38D PRG:238D A9 00 + sta PPUADDR ; CPU:$E38F PRG:238F 8D 06 20 - lda #$01 - sta $02 + lda #$01 ; CPU:$E392 PRG:2392 A9 01 + sta $02 ; CPU:$E394 PRG:2394 85 02 ;------------------------------------------------------------------------------ @@ -10676,8 +10479,8 @@ ClearGameplayNametables: ;------------------------------------------------------------------------------ ClearGameplayNametablesSecondPass: - lda #$01 - sta $03 + lda #$01 ; CPU:$E396 PRG:2396 A9 01 + sta $03 ; CPU:$E398 PRG:2398 85 03 ;------------------------------------------------------------------------------ @@ -10686,13 +10489,13 @@ ClearGameplayNametablesSecondPass: ;------------------------------------------------------------------------------ InitializeNametableFillCounters: - lda #$03 - sta $00 + lda #$03 ; CPU:$E39A PRG:239A A9 03 + sta $00 ; CPU:$E39C PRG:239C 85 00 - lda #$C0 - sta $01 + lda #$C0 ; CPU:$E39E PRG:239E A9 C0 + sta $01 ; CPU:$E3A0 PRG:23A0 85 01 - lda #$2D + lda #$2D ; CPU:$E3A2 PRG:23A2 A9 2D ;------------------------------------------------------------------------------ ; $E3A4 @@ -10700,22 +10503,22 @@ InitializeNametableFillCounters: ;------------------------------------------------------------------------------ FillNametableByte: - sta PPUDATA + sta PPUDATA ; CPU:$E3A4 PRG:23A4 8D 07 20 - dec $01 - bne FillNametableByte + dec $01 ; CPU:$E3A7 PRG:23A7 C6 01 + bne FillNametableByte ; CPU:$E3A9 PRG:23A9 D0 F9 - dec $00 - bpl FillNametableByte + dec $00 ; CPU:$E3AB PRG:23AB C6 00 + bpl FillNametableByte ; CPU:$E3AD PRG:23AD 10 F5 - dec $03 - bne AdvanceNametableFillPass + dec $03 ; CPU:$E3AF PRG:23AF C6 03 + bne AdvanceNametableFillPass ; CPU:$E3B1 PRG:23B1 D0 08 - lda #$40 - sta $01 + lda #$40 ; CPU:$E3B3 PRG:23B3 A9 40 + sta $01 ; CPU:$E3B5 PRG:23B5 85 01 - lda #$00 - beq FillNametableByte + lda #$00 ; CPU:$E3B7 PRG:23B7 A9 00 + beq FillNametableByte ; CPU:$E3B9 PRG:23B9 F0 E9 ;------------------------------------------------------------------------------ ; $E3BB @@ -10723,18 +10526,18 @@ FillNametableByte: ;------------------------------------------------------------------------------ AdvanceNametableFillPass: - dec $02 - bne ClearGameplayAttributeTables + dec $02 ; CPU:$E3BB PRG:23BB C6 02 + bne ClearGameplayAttributeTables ; CPU:$E3BD PRG:23BD D0 10 - lda PPUSTATUS + lda PPUSTATUS ; CPU:$E3BF PRG:23BF AD 02 20 - lda #$28 - sta PPUADDR + lda #$28 ; CPU:$E3C2 PRG:23C2 A9 28 + sta PPUADDR ; CPU:$E3C4 PRG:23C4 8D 06 20 - lda #$00 - sta PPUADDR + lda #$00 ; CPU:$E3C7 PRG:23C7 A9 00 + sta PPUADDR ; CPU:$E3C9 PRG:23C9 8D 06 20 - jmp ClearGameplayNametablesSecondPass + jmp ClearGameplayNametablesSecondPass ; CPU:$E3CC PRG:23CC 4C 96 E3 ;------------------------------------------------------------------------------ @@ -10743,16 +10546,16 @@ AdvanceNametableFillPass: ;------------------------------------------------------------------------------ ClearGameplayAttributeTables: - lda #$01 - sta $00 + lda #$01 ; CPU:$E3CF PRG:23CF A9 01 + sta $00 ; CPU:$E3D1 PRG:23D1 85 00 - lda PPUSTATUS + lda PPUSTATUS ; CPU:$E3D3 PRG:23D3 AD 02 20 - lda #$23 - sta PPUADDR + lda #$23 ; CPU:$E3D6 PRG:23D6 A9 23 + sta PPUADDR ; CPU:$E3D8 PRG:23D8 8D 06 20 - lda #$C0 - sta PPUADDR + lda #$C0 ; CPU:$E3DB PRG:23DB A9 C0 + sta PPUADDR ; CPU:$E3DD PRG:23DD 8D 06 20 ;------------------------------------------------------------------------------ @@ -10761,8 +10564,8 @@ ClearGameplayAttributeTables: ;------------------------------------------------------------------------------ BeginAttributeTableClear: - lda #$00 - tay + lda #$00 ; CPU:$E3E0 PRG:23E0 A9 00 + tay ; CPU:$E3E2 PRG:23E2 A8 ;------------------------------------------------------------------------------ @@ -10771,16 +10574,16 @@ BeginAttributeTableClear: ;------------------------------------------------------------------------------ ClearAttributeTableLoop: - sta PPUDATA + sta PPUDATA ; CPU:$E3E3 PRG:23E3 8D 07 20 - iny - cpy #$20 - bne ClearAttributeTableLoop + iny ; CPU:$E3E6 PRG:23E6 C8 + cpy #$20 ; CPU:$E3E7 PRG:23E7 C0 20 + bne ClearAttributeTableLoop ; CPU:$E3E9 PRG:23E9 D0 F8 - dec $00 - bne ClearSecondAttributeTable + dec $00 ; CPU:$E3EB PRG:23EB C6 00 + bne ClearSecondAttributeTable ; CPU:$E3ED PRG:23ED D0 01 - rts + rts ; CPU:$E3EF PRG:23EF 60 ;------------------------------------------------------------------------------ ; $E3F0 @@ -10788,15 +10591,15 @@ ClearAttributeTableLoop: ;------------------------------------------------------------------------------ ClearSecondAttributeTable: - lda PPUSTATUS + lda PPUSTATUS ; CPU:$E3F0 PRG:23F0 AD 02 20 - lda #$2B - sta PPUADDR + lda #$2B ; CPU:$E3F3 PRG:23F3 A9 2B + sta PPUADDR ; CPU:$E3F5 PRG:23F5 8D 06 20 - lda #$C0 - sta PPUADDR + lda #$C0 ; CPU:$E3F8 PRG:23F8 A9 C0 + sta PPUADDR ; CPU:$E3FA PRG:23FA 8D 06 20 - bne BeginAttributeTableClear + bne BeginAttributeTableClear ; CPU:$E3FD PRG:23FD D0 E1 ;============================================================================== ; $E3FF-$E473: Draw Gameplay Numeric / Status Fields @@ -10825,44 +10628,44 @@ ClearSecondAttributeTable: ;============================================================================== DrawGameplayScoreFields: - lda #$20 - sta $00 + lda #$20 ; CPU:$E3FF PRG:23FF A9 20 + sta $00 ; CPU:$E401 PRG:2401 85 00 - lda #$B6 - sta $01 + lda #$B6 ; CPU:$E403 PRG:2403 A9 B6 + sta $01 ; CPU:$E405 PRG:2405 85 01 - lda #$80 - sta $04 + lda #$80 ; CPU:$E407 PRG:2407 A9 80 + sta $04 ; CPU:$E409 PRG:2409 85 04 - ldx #$00 + ldx #$00 ; CPU:$E40B PRG:240B A2 00 - lda $47 - and $46 - beq @E429 + lda $47 ; CPU:$E40D PRG:240D A5 47 + and $46 ; CPU:$E40F PRG:240F 25 46 + beq @E429 ; CPU:$E411 PRG:2411 F0 18 - lda #$28 - sta $00 + lda #$28 ; CPU:$E413 PRG:2413 A9 28 + sta $00 ; CPU:$E415 PRG:2415 85 00 - bne @E429 + bne @E429 ; CPU:$E417 PRG:2417 D0 12 ;------------------------------------------------------------------------------ ; Alternate setup path. ;------------------------------------------------------------------------------ - lda #$20 - sta $00 + lda #$20 ; CPU:$E419 PRG:2419 A9 20 + sta $00 ; CPU:$E41B PRG:241B 85 00 - lda #$83 - sta $01 + lda #$83 ; CPU:$E41D PRG:241D A9 83 + sta $01 ; CPU:$E41F PRG:241F 85 01 - lda #$09 - sta $04 + lda #$09 ; CPU:$E421 PRG:2421 A9 09 + sta $04 ; CPU:$E423 PRG:2423 85 04 - lda #$01 - sta $47 + lda #$01 ; CPU:$E425 PRG:2425 A9 01 + sta $47 ; CPU:$E427 PRG:2427 85 47 - ldx #$0C + ldx #$0C ; CPU:$E429 PRG:2429 A2 0C ;------------------------------------------------------------------------------ @@ -10871,19 +10674,19 @@ DrawGameplayScoreFields: ;------------------------------------------------------------------------------ @E429: - lda $47 - and $46 - beq @E436 + lda $47 ; CPU:$E42B PRG:242B A5 47 + and $46 ; CPU:$E42D PRG:242D 25 46 + beq @E436 ; CPU:$E42F PRG:242F F0 05 - txa - clc - adc #$06 - tax + txa ; CPU:$E431 PRG:2431 8A + clc ; CPU:$E432 PRG:2432 18 + adc #$06 ; CPU:$E433 PRG:2433 69 06 + tax ; CPU:$E435 PRG:2435 AA @E436: - lda #$03 - sta $05 + lda #$03 ; CPU:$E436 PRG:2436 A9 03 + sta $05 ; CPU:$E438 PRG:2438 85 05 ;------------------------------------------------------------------------------ @@ -10891,51 +10694,51 @@ DrawGameplayScoreFields: ;------------------------------------------------------------------------------ @E43A: - lda PPUSTATUS + lda PPUSTATUS ; CPU:$E43A PRG:243A AD 02 20 - lda $00 - sta PPUADDR + lda $00 ; CPU:$E43D PRG:243D A5 00 + sta PPUADDR ; CPU:$E43F PRG:243F 8D 06 20 - lda $01 - sta PPUADDR + lda $01 ; CPU:$E442 PRG:2442 A5 01 + sta PPUADDR ; CPU:$E444 PRG:2444 8D 06 20 - lda ScoreFieldSourcePointerTable,x - sta $02 + lda ScoreFieldSourcePointerTable,x ; CPU:$E447 PRG:2447 BD 9F E4 + sta $02 ; CPU:$E44A PRG:244A 85 02 - lda ScoreFieldSourcePointerTable+1,x - sta $03 + lda ScoreFieldSourcePointerTable+1,x ; CPU:$E44C PRG:244C BD A0 E4 + sta $03 ; CPU:$E44F PRG:244F 85 03 - jsr DrawSixDigitScore + jsr DrawSixDigitScore ; CPU:$E451 PRG:2451 20 74 E4 - inx - inx + inx ; CPU:$E454 PRG:2454 E8 + inx ; CPU:$E455 PRG:2455 E8 - lda $01 - clc - adc $04 - sta $01 + lda $01 ; CPU:$E456 PRG:2456 A5 01 + clc ; CPU:$E458 PRG:2458 18 + adc $04 ; CPU:$E459 PRG:2459 65 04 + sta $01 ; CPU:$E45B PRG:245B 85 01 - lda #$00 - adc $00 - sta $00 + lda #$00 ; CPU:$E45D PRG:245D A9 00 + adc $00 ; CPU:$E45F PRG:245F 65 00 + sta $00 ; CPU:$E461 PRG:2461 85 00 - dec $05 + dec $05 ; CPU:$E463 PRG:2463 C6 05 - lda $05 - cmp #$01 - bne @E46D + lda $05 ; CPU:$E465 PRG:2465 A5 05 + cmp #$01 ; CPU:$E467 PRG:2467 C9 01 + bne @E46D ; CPU:$E469 PRG:2469 D0 04 - lda $47 - beq @E473 + lda $47 ; CPU:$E46B PRG:246B A5 47 + beq @E473 ; CPU:$E46D PRG:246D F0 04 @E46D: - lda $05 - bne @E43A + lda $05 ; CPU:$E46F PRG:246F A5 05 + bne @E43A ; CPU:$E471 PRG:2471 D0 C7 @E473: - rts + rts ; CPU:$E473 PRG:2473 60 ;============================================================================== ; $E474-$E49E: Draw Six-Digit Numeric Field @@ -10959,47 +10762,47 @@ DrawGameplayScoreFields: ; four times. ;============================================================================== DrawSixDigitScore: - ldy #$05 + ldy #$05 ; CPU:$E474 PRG:2474 A0 05 SkipLeadingZeroDigits: - lda ($02),y - and #$0F - bne ConvertCurrentScoreDigit + lda ($02),y ; CPU:$E476 PRG:2476 B1 02 + and #$0F ; CPU:$E478 PRG:2478 29 0F + bne ConvertCurrentScoreDigit ; CPU:$E47A PRG:247A D0 0C - lda #$20 - sta PPUDATA + lda #$20 ; CPU:$E47C PRG:247C A9 20 + sta PPUDATA ; CPU:$E47E PRG:247E 8D 07 20 - dey - bne SkipLeadingZeroDigits + dey ; CPU:$E481 PRG:2481 88 + bne SkipLeadingZeroDigits ; CPU:$E482 PRG:2482 D0 F2 - beq DrawFinalScoreDigit + beq DrawFinalScoreDigit ; CPU:$E484 PRG:2484 F0 0B LoadNextScoreDigit: - lda ($02),y + lda ($02),y ; CPU:$E486 PRG:2486 B1 02 ConvertCurrentScoreDigit: - jsr $E1CE + jsr $E1CE ; CPU:$E488 PRG:2488 20 CE E1 - sta PPUDATA + sta PPUDATA ; CPU:$E48B PRG:248B 8D 07 20 - dey - bne LoadNextScoreDigit + dey ; CPU:$E48E PRG:248E 88 + bne LoadNextScoreDigit ; CPU:$E48F PRG:248F D0 F5 DrawFinalScoreDigit: - lda ($02),y + lda ($02),y ; CPU:$E491 PRG:2491 B1 02 - jsr $E1CE + jsr $E1CE ; CPU:$E493 PRG:2493 20 CE E1 - sta PPUDATA + sta PPUDATA ; CPU:$E496 PRG:2496 8D 07 20 - lda #$30 - sta PPUDATA + lda #$30 ; CPU:$E499 PRG:2499 A9 30 + sta PPUDATA ; CPU:$E49B PRG:249B 8D 07 20 - rts + rts ; CPU:$E49E PRG:249E 60 ;============================================================================== ; $E49F-$E4B0: Gameplay Status Field Source Pointer Table ; @@ -11016,17 +10819,17 @@ DrawFinalScoreDigit: ;============================================================================== ScoreFieldSourcePointerTable: - .word $0061 - .word $0070 - .word $0080 + .word $0061 ; CPU:$E49F PRG:249F 61 00 + .word $0070 ; CPU:$E4A1 PRG:24A1 70 00 + .word $0080 ; CPU:$E4A3 PRG:24A3 80 00 - .word $0061 - .word $0080 - .word $0070 + .word $0061 ; CPU:$E4A5 PRG:24A5 61 00 + .word $0080 ; CPU:$E4A7 PRG:24A7 80 00 + .word $0070 ; CPU:$E4A9 PRG:24A9 70 00 - .word $0070 - .word $0061 - .word $0080 + .word $0070 ; CPU:$E4AB PRG:24AB 70 00 + .word $0061 ; CPU:$E4AD PRG:24AD 61 00 + .word $0080 ; CPU:$E4AF PRG:24AF 80 00 ;============================================================================== ; $E4B1-$E501: Build Entity Direction Candidate List @@ -11068,76 +10871,76 @@ ScoreFieldSourcePointerTable: ;============================================================================== BuildLegalDirectionList: - ldy #$FF + ldy #$FF ; CPU:$E4B1 PRG:24B1 A0 FF - sty $0C - sty $0D - sty $0E - sty $0F + sty $0C ; CPU:$E4B3 PRG:24B3 84 0C + sty $0D ; CPU:$E4B5 PRG:24B5 84 0D + sty $0E ; CPU:$E4B7 PRG:24B7 84 0E + sty $0F ; CPU:$E4B9 PRG:24B9 84 0F - iny + iny ; CPU:$E4BB PRG:24BB C8 ScanDirectionCandidate: - lda ($00),y - cmp $0A - beq AcceptDirectionCandidate + lda ($00),y ; CPU:$E4BC PRG:24BC B1 00 + cmp $0A ; CPU:$E4BE PRG:24BE C5 0A + beq AcceptDirectionCandidate ; CPU:$E4C0 PRG:24C0 F0 08 - and #$F8 - beq AcceptDirectionCandidate + and #$F8 ; CPU:$E4C2 PRG:24C2 29 F8 + beq AcceptDirectionCandidate ; CPU:$E4C4 PRG:24C4 F0 04 - cmp $0B - bne NextDirectionCandidate + cmp $0B ; CPU:$E4C6 PRG:24C6 C5 0B + bne NextDirectionCandidate ; CPU:$E4C8 PRG:24C8 D0 04 AcceptDirectionCandidate: - tya - sta $000C,y + tya ; CPU:$E4CA PRG:24CA 98 + sta $000C,y ; CPU:$E4CB PRG:24CB 99 0C 00 NextDirectionCandidate: - iny - cpy #$04 - bne ScanDirectionCandidate + iny ; CPU:$E4CE PRG:24CE C8 + cpy #$04 ; CPU:$E4CF PRG:24CF C0 04 + bne ScanDirectionCandidate ; CPU:$E4D1 PRG:24D1 D0 E9 - lda $B9,x - clc - adc #$02 - and #$03 - tay + lda $B9,x ; CPU:$E4D3 PRG:24D3 B5 B9 + clc ; CPU:$E4D5 PRG:24D5 18 + adc #$02 ; CPU:$E4D6 PRG:24D6 69 02 + and #$03 ; CPU:$E4D8 PRG:24D8 29 03 + tay ; CPU:$E4DA PRG:24DA A8 - lda #$FF - sta $000C,y + lda #$FF ; CPU:$E4DB PRG:24DB A9 FF + sta $000C,y ; CPU:$E4DD PRG:24DD 99 0C 00 - lda #$03 - sta $0B + lda #$03 ; CPU:$E4E0 PRG:24E0 A9 03 + sta $0B ; CPU:$E4E2 PRG:24E2 85 0B CompactDirectionListPass: - ldy #$00 + ldy #$00 ; CPU:$E4E4 PRG:24E4 A0 00 CompactDirectionListEntry: - lda $000C,y - cmp #$FF - bne NextDirectionListEntry + lda $000C,y ; CPU:$E4E6 PRG:24E6 B9 0C 00 + cmp #$FF ; CPU:$E4E9 PRG:24E9 C9 FF + bne NextDirectionListEntry ; CPU:$E4EB PRG:24EB D0 0B - lda $000D,y - sta $000C,y + lda $000D,y ; CPU:$E4ED PRG:24ED B9 0D 00 + sta $000C,y ; CPU:$E4F0 PRG:24F0 99 0C 00 - lda #$FF - sta $000D,y + lda #$FF ; CPU:$E4F3 PRG:24F3 A9 FF + sta $000D,y ; CPU:$E4F5 PRG:24F5 99 0D 00 NextDirectionListEntry: - iny - cpy #$03 - bne CompactDirectionListEntry + iny ; CPU:$E4F8 PRG:24F8 C8 + cpy #$03 ; CPU:$E4F9 PRG:24F9 C0 03 + bne CompactDirectionListEntry ; CPU:$E4FB PRG:24FB D0 E9 - dec $0B - bne CompactDirectionListPass + dec $0B ; CPU:$E4FD PRG:24FD C6 0B + bne CompactDirectionListPass ; CPU:$E4FF PRG:24FF D0 E3 - rts + rts ; CPU:$E501 PRG:2501 60 ;============================================================================== ; $E502-$E53B: Draw Gameplay Initialization Data @@ -11155,7 +10958,7 @@ NextDirectionListEntry: ;============================================================================== DrawGameplayHudLabels: - ldx #$01 + ldx #$01 ; CPU:$E502 PRG:2502 A2 01 ;------------------------------------------------------------------------------ @@ -11164,7 +10967,7 @@ DrawGameplayHudLabels: ;------------------------------------------------------------------------------ InitData_E504: - ldy #$00 + ldy #$00 ; CPU:$E504 PRG:2504 A0 00 ;------------------------------------------------------------------------------ @@ -11173,12 +10976,12 @@ InitData_E504: ;------------------------------------------------------------------------------ InitData_E506: - lda $E53C,y + lda $E53C,y ; CPU:$E506 PRG:2506 B9 3C E5 - cpx #$00 - bne InitData_E50F + cpx #$00 ; CPU:$E509 PRG:2509 E0 00 + bne InitData_E50F ; CPU:$E50B PRG:250B D0 02 - adc #$07 + adc #$07 ; CPU:$E50D PRG:250D 69 07 ;------------------------------------------------------------------------------ @@ -11187,17 +10990,17 @@ InitData_E506: ;------------------------------------------------------------------------------ InitData_E50F: - sta PPUADDR + sta PPUADDR ; CPU:$E50F PRG:250F 8D 06 20 - iny + iny ; CPU:$E512 PRG:2512 C8 - lda $E53C,y - sta PPUADDR + lda $E53C,y ; CPU:$E513 PRG:2513 B9 3C E5 + sta PPUADDR ; CPU:$E516 PRG:2516 8D 06 20 - iny + iny ; CPU:$E519 PRG:2519 C8 - lda $E53C,y - sta $00 + lda $E53C,y ; CPU:$E51A PRG:251A B9 3C E5 + sta $00 ; CPU:$E51D PRG:251D 85 00 ;------------------------------------------------------------------------------ @@ -11206,23 +11009,23 @@ InitData_E50F: ;------------------------------------------------------------------------------ InitData_E51F: - iny + iny ; CPU:$E51F PRG:251F C8 - lda $E53C,y - sta PPUDATA + lda $E53C,y ; CPU:$E520 PRG:2520 B9 3C E5 + sta PPUDATA ; CPU:$E523 PRG:2523 8D 07 20 - dec $00 - bne InitData_E51F + dec $00 ; CPU:$E526 PRG:2526 C6 00 + bne InitData_E51F ; CPU:$E528 PRG:2528 D0 F5 - iny + iny ; CPU:$E52A PRG:252A C8 - cpy #$11 - bne InitData_E534 + cpy #$11 ; CPU:$E52B PRG:252B C0 11 + bne InitData_E534 ; CPU:$E52D PRG:252D D0 05 - lda $47 - bne InitData_E534 + lda $47 ; CPU:$E52F PRG:252F A5 47 + bne InitData_E534 ; CPU:$E531 PRG:2531 D0 01 - rts + rts ; CPU:$E533 PRG:2533 60 ;------------------------------------------------------------------------------ @@ -11231,13 +11034,13 @@ InitData_E51F: ;------------------------------------------------------------------------------ InitData_E534: - cpy #$17 - bne InitData_E506 + cpy #$17 ; CPU:$E534 PRG:2534 C0 17 + bne InitData_E506 ; CPU:$E536 PRG:2536 D0 CE - dex - beq InitData_E504 + dex ; CPU:$E538 PRG:2538 CA + beq InitData_E504 ; CPU:$E539 PRG:2539 F0 C9 - rts + rts ; CPU:$E53B PRG:253B 60 ;============================================================================== ; $E53C-$E552: Gameplay Initialization PPU Command Data @@ -11252,16 +11055,16 @@ InitData_E534: GameplayHudInitializationData: ; $E53C: PPU $2076, 8-byte payload - .byte $20,$76,$08 - .byte $B4,$B5,$B6,$B7,$B8,$B9,$BA,$BB + .byte $20,$76,$08 ; CPU:$E53C PRG:253C 20 76 08 + .byte $B4,$B5,$B6,$B7,$B8,$B9,$BA,$BB ; CPU:$E53F PRG:253F B4 B5 B6 B7 B8 B9 BA BB ; $E547: PPU $20F7, 3-byte payload - .byte $20,$F7,$03 - .byte $B0,$B3,$B2 + .byte $20,$F7,$03 ; CPU:$E547 PRG:2547 20 F7 03 + .byte $B0,$B3,$B2 ; CPU:$E54A PRG:254A B0 B3 B2 ; $E54D: PPU $2177, 3-byte payload - .byte $21,$77,$03 - .byte $B1,$B3,$B2 + .byte $21,$77,$03 ; CPU:$E54D PRG:254D 21 77 03 + .byte $B1,$B3,$B2 ; CPU:$E550 PRG:2550 B1 B3 B2 ;============================================================================== ; $E553-$E5C0: Draw Progression / Status Markers @@ -11293,72 +11096,72 @@ GameplayHudInitializationData: ;============================================================================== DrawLevelProgressMarkers: - lda $67 - bne Progression_E558 + lda $67 ; CPU:$E553 PRG:2553 A5 67 + bne Progression_E558 ; CPU:$E555 PRG:2555 D0 01 - rts + rts ; CPU:$E557 PRG:2557 60 Progression_E558: - clc - adc #$01 + clc ; CPU:$E558 PRG:2558 18 + adc #$01 ; CPU:$E559 PRG:2559 69 01 - cmp #$07 - bcc Progression_E55F + cmp #$07 ; CPU:$E55B PRG:255B C9 07 + bcc Progression_E55F ; CPU:$E55D PRG:255D 90 02 - lda #$07 + lda #$07 ; CPU:$E55F PRG:255F A9 07 Progression_E55F: - sta $02 + sta $02 ; CPU:$E561 PRG:2561 85 02 - lda #$04 - sta $03 + lda #$04 ; CPU:$E563 PRG:2563 A9 04 + sta $03 ; CPU:$E565 PRG:2565 85 03 - lda #$23 - sta $00 + lda #$23 ; CPU:$E567 PRG:2567 A9 23 + sta $00 ; CPU:$E569 PRG:2569 85 00 - lda #$17 - sta $01 + lda #$17 ; CPU:$E56B PRG:256B A9 17 + sta $01 ; CPU:$E56D PRG:256D 85 01 - lda $46 - and $47 - beq Progression_E57C + lda $46 ; CPU:$E56F PRG:256F A5 46 + and $47 ; CPU:$E571 PRG:2571 25 47 + beq Progression_E57C ; CPU:$E573 PRG:2573 F0 07 - lda $00 - clc - adc #$08 - sta $00 + lda $00 ; CPU:$E575 PRG:2575 A5 00 + clc ; CPU:$E577 PRG:2577 18 + adc #$08 ; CPU:$E578 PRG:2578 69 08 + sta $00 ; CPU:$E57A PRG:257A 85 00 Progression_E57C: - dec $02 - bne Progression_E581 + dec $02 ; CPU:$E57C PRG:257C C6 02 + bne Progression_E581 ; CPU:$E57E PRG:257E D0 01 - rts + rts ; CPU:$E580 PRG:2580 60 Progression_E581: - dec $03 - bne Progression_E58A + dec $03 ; CPU:$E581 PRG:2581 C6 03 + bne Progression_E58A ; CPU:$E583 PRG:2583 D0 07 - lda $01 - clc - adc #$3A - sta $01 + lda $01 ; CPU:$E585 PRG:2585 A5 01 + clc ; CPU:$E587 PRG:2587 18 + adc #$3A ; CPU:$E588 PRG:2588 69 3A + sta $01 ; CPU:$E58A PRG:258A 85 01 Progression_E58A: - ldy #$3C + ldy #$3C ; CPU:$E58C PRG:258C A0 3C - jsr Draw2x2Marker + jsr Draw2x2Marker ; CPU:$E58E PRG:258E 20 9A E5 - lda $01 - clc - adc #$02 - sta $01 + lda $01 ; CPU:$E591 PRG:2591 A5 01 + clc ; CPU:$E593 PRG:2593 18 + adc #$02 ; CPU:$E594 PRG:2594 69 02 + sta $01 ; CPU:$E596 PRG:2596 85 01 - bne Progression_E57C + bne Progression_E57C ; CPU:$E598 PRG:2598 D0 E2 ;============================================================================== ; $E59A-$E5C0: Draw 2x2 Progression Marker @@ -11373,32 +11176,32 @@ Progression_E58A: ;============================================================================== Draw2x2Marker: - lda $00 - sta PPUADDR + lda $00 ; CPU:$E59A PRG:259A A5 00 + sta PPUADDR ; CPU:$E59C PRG:259C 8D 06 20 - lda $01 - sta PPUADDR + lda $01 ; CPU:$E59F PRG:259F A5 01 + sta PPUADDR ; CPU:$E5A1 PRG:25A1 8D 06 20 - sty PPUDATA + sty PPUDATA ; CPU:$E5A4 PRG:25A4 8C 07 20 - iny - sty PPUDATA + iny ; CPU:$E5A7 PRG:25A7 C8 + sty PPUDATA ; CPU:$E5A8 PRG:25A8 8C 07 20 - lda $00 - sta PPUADDR + lda $00 ; CPU:$E5AB PRG:25AB A5 00 + sta PPUADDR ; CPU:$E5AD PRG:25AD 8D 06 20 - lda $01 - clc - adc #$20 - sta PPUADDR + lda $01 ; CPU:$E5B0 PRG:25B0 A5 01 + clc ; CPU:$E5B2 PRG:25B2 18 + adc #$20 ; CPU:$E5B3 PRG:25B3 69 20 + sta PPUADDR ; CPU:$E5B5 PRG:25B5 8D 06 20 - iny - sty PPUDATA + iny ; CPU:$E5B8 PRG:25B8 C8 + sty PPUDATA ; CPU:$E5B9 PRG:25B9 8C 07 20 - iny - sty PPUDATA + iny ; CPU:$E5BC PRG:25BC C8 + sty PPUDATA ; CPU:$E5BD PRG:25BD 8C 07 20 - rts + rts ; CPU:$E5C0 PRG:25C0 60 ;============================================================================== ; $-$E699: Initialize Gameplay State / Markers @@ -11425,32 +11228,32 @@ Draw2x2Marker: ;============================================================================== InitializeLevelProgressDisplay: - lda #$00 - sta $03 - sta $0E - sta $0F + lda #$00 ; CPU:$E5C1 PRG:25C1 A9 00 + sta $03 ; CPU:$E5C3 PRG:25C3 85 03 + sta $0E ; CPU:$E5C5 PRG:25C5 85 0E + sta $0F ; CPU:$E5C7 PRG:25C7 85 0F - lda #$15 - sta $0A + lda #$15 ; CPU:$E5C9 PRG:25C9 A9 15 + sta $0A ; CPU:$E5CB PRG:25CB 85 0A - lda #$11 - sta $0D + lda #$11 ; CPU:$E5CD PRG:25CD A9 11 + sta $0D ; CPU:$E5CF PRG:25CF 85 0D - lda #$05 - sta $0B - sta $0C + lda #$05 ; CPU:$E5D1 PRG:25D1 A9 05 + sta $0B ; CPU:$E5D3 PRG:25D3 85 0B + sta $0C ; CPU:$E5D5 PRG:25D5 85 0C - lda $68 - sta $02 + lda $68 ; CPU:$E5D7 PRG:25D7 A5 68 + sta $02 ; CPU:$E5D9 PRG:25D9 85 02 - sec - sbc #$07 - bcc UseFirstLevelProgressIndex + sec ; CPU:$E5DB PRG:25DB 38 + sbc #$07 ; CPU:$E5DC PRG:25DC E9 07 + bcc UseFirstLevelProgressIndex ; CPU:$E5DE PRG:25DE 90 0D - cmp #$0C - bcc ClampLevelProgressIndex + cmp #$0C ; CPU:$E5E0 PRG:25E0 C9 0C + bcc ClampLevelProgressIndex ; CPU:$E5E2 PRG:25E2 90 02 - lda #$0C + lda #$0C ; CPU:$E5E4 PRG:25E4 A9 0C ;------------------------------------------------------------------------------ @@ -11458,12 +11261,12 @@ InitializeLevelProgressDisplay: ;------------------------------------------------------------------------------ ClampLevelProgressIndex: - tax + tax ; CPU:$E5E6 PRG:25E6 AA - lda #$07 - sta $02 + lda #$07 ; CPU:$E5E7 PRG:25E7 A9 07 + sta $02 ; CPU:$E5E9 PRG:25E9 85 02 - bne InitializeLevelProgressPosition + bne InitializeLevelProgressPosition ; CPU:$E5EB PRG:25EB D0 02 ;------------------------------------------------------------------------------ @@ -11471,7 +11274,7 @@ ClampLevelProgressIndex: ;------------------------------------------------------------------------------ UseFirstLevelProgressIndex: - ldx #$00 + ldx #$00 ; CPU:$E5ED PRG:25ED A2 00 ;------------------------------------------------------------------------------ @@ -11480,20 +11283,20 @@ UseFirstLevelProgressIndex: ;------------------------------------------------------------------------------ InitializeLevelProgressPosition: - lda #$22 - sta $00 + lda #$22 ; CPU:$E5EF PRG:25EF A9 22 + sta $00 ; CPU:$E5F1 PRG:25F1 85 00 - lda #$56 - sta $01 + lda #$56 ; CPU:$E5F3 PRG:25F3 A9 56 + sta $01 ; CPU:$E5F5 PRG:25F5 85 01 - lda $46 - and $47 - beq InitializeLevelProgressRowCounter + lda $46 ; CPU:$E5F7 PRG:25F7 A5 46 + and $47 ; CPU:$E5F9 PRG:25F9 25 47 + beq InitializeLevelProgressRowCounter ; CPU:$E5FB PRG:25FB F0 07 - lda $00 - clc - adc #$08 - sta $00 + lda $00 ; CPU:$E5FD PRG:25FD A5 00 + clc ; CPU:$E5FF PRG:25FF 18 + adc #$08 ; CPU:$E600 PRG:2600 69 08 + sta $00 ; CPU:$E602 PRG:2602 85 00 ;------------------------------------------------------------------------------ @@ -11501,8 +11304,8 @@ InitializeLevelProgressPosition: ;------------------------------------------------------------------------------ InitializeLevelProgressRowCounter: - lda #$05 - sta $04 + lda #$05 ; CPU:$E604 PRG:2604 A9 05 + sta $04 ; CPU:$E606 PRG:2606 85 04 ;------------------------------------------------------------------------------ @@ -11511,13 +11314,13 @@ InitializeLevelProgressRowCounter: ;------------------------------------------------------------------------------ DrawNextLevelProgressMarker: - dec $04 - bne SelectLevelProgressMarker + dec $04 ; CPU:$E608 PRG:2608 C6 04 + bne SelectLevelProgressMarker ; CPU:$E60A PRG:260A D0 07 - lda $01 - clc - adc #$38 - sta $01 + lda $01 ; CPU:$E60C PRG:260C A5 01 + clc ; CPU:$E60E PRG:260E 18 + adc #$38 ; CPU:$E60F PRG:260F 69 38 + sta $01 ; CPU:$E611 PRG:2611 85 01 ;------------------------------------------------------------------------------ @@ -11526,27 +11329,27 @@ DrawNextLevelProgressMarker: ;------------------------------------------------------------------------------ SelectLevelProgressMarker: - lda LevelProgressMarkerIndexTable,x - sta $05 + lda LevelProgressMarkerIndexTable,x ; CPU:$E613 PRG:2613 BD 9A E6 + sta $05 ; CPU:$E616 PRG:2616 85 05 - asl - asl - adc #$60 - tay + asl ; CPU:$E618 PRG:2618 0A + asl ; CPU:$E619 PRG:2619 0A + adc #$60 ; CPU:$E61A PRG:261A 69 60 + tay ; CPU:$E61C PRG:261C A8 - jsr Draw2x2Marker + jsr Draw2x2Marker ; CPU:$E61D PRG:261D 20 9A E5 - ldy $03 + ldy $03 ; CPU:$E620 PRG:2620 A4 03 - lda LevelProgressAttributeIndexTable,y - sta $06 + lda LevelProgressAttributeIndexTable,y ; CPU:$E622 PRG:2622 B9 AE E6 + sta $06 ; CPU:$E625 PRG:2625 85 06 - lda LevelProgressAttributeIndexTable+1,y - sta $07 + lda LevelProgressAttributeIndexTable+1,y ; CPU:$E627 PRG:2627 B9 AF E6 + sta $07 ; CPU:$E62A PRG:262A 85 07 - ldy $05 + ldy $05 ; CPU:$E62C PRG:262C A4 05 - lda LevelProgressAttributeBits,y + lda LevelProgressAttributeBits,y ; CPU:$E62E PRG:262E B9 BE E6 ;------------------------------------------------------------------------------ @@ -11555,12 +11358,12 @@ SelectLevelProgressMarker: ;------------------------------------------------------------------------------ ShiftLevelProgressAttributeBits: - dec $07 - bmi StoreLevelProgressAttributeBits + dec $07 ; CPU:$E631 PRG:2631 C6 07 + bmi StoreLevelProgressAttributeBits ; CPU:$E633 PRG:2633 30 04 - asl - asl - bcc ShiftLevelProgressAttributeBits + asl ; CPU:$E635 PRG:2635 0A + asl ; CPU:$E636 PRG:2636 0A + bcc ShiftLevelProgressAttributeBits ; CPU:$E637 PRG:2637 90 F8 ;------------------------------------------------------------------------------ @@ -11569,36 +11372,36 @@ ShiftLevelProgressAttributeBits: ;------------------------------------------------------------------------------ StoreLevelProgressAttributeBits: - ldy $06 + ldy $06 ; CPU:$E639 PRG:2639 A4 06 - ora $0A,y - sta $0A,y + ora $0A,y ; CPU:$E63B PRG:263B 19 0A + sta $0A,y ; CPU:$E63D PRG:263D 00 99 - lda $01 - clc - adc #$02 - sta $01 + lda $01 ; CPU:$E63F PRG:263F 0A 00 + clc ; CPU:$E641 PRG:2641 A5 + adc #$02 ; CPU:$E642 PRG:2642 01 18 + sta $01 ; CPU:$E644 PRG:2644 69 02 - inc $03 - inc $03 + inc $03 ; CPU:$E646 PRG:2646 85 01 + inc $03 ; CPU:$E648 PRG:2648 E6 03 - inx + inx ; CPU:$E64A PRG:264A E6 - dec $02 - bpl DrawNextLevelProgressMarker + dec $02 ; CPU:$E64B PRG:264B 03 E8 + bpl DrawNextLevelProgressMarker ; CPU:$E64D PRG:264D C6 02 ;============================================================================== ; Write generated marker-state values into PPU memory. ;============================================================================== - ldx #$23 + ldx #$23 ; CPU:$E64F PRG:264F 10 B7 - lda $47 - and $46 - beq SetLevelProgressAttributeAddress + lda $47 ; CPU:$E651 PRG:2651 A2 23 + and $46 ; CPU:$E653 PRG:2653 A5 47 + beq SetLevelProgressAttributeAddress ; CPU:$E655 PRG:2655 25 46 - ldx #$2B + ldx #$2B ; CPU:$E657 PRG:2657 F0 02 ;------------------------------------------------------------------------------ @@ -11607,13 +11410,13 @@ StoreLevelProgressAttributeBits: ;------------------------------------------------------------------------------ SetLevelProgressAttributeAddress: - stx PPUADDR - stx $00 + stx PPUADDR ; CPU:$E65B PRG:265B 8E 06 20 + stx $00 ; CPU:$E65E PRG:265E 86 00 - lda #$E5 - sta PPUADDR + lda #$E5 ; CPU:$E660 PRG:2660 A9 E5 + sta PPUADDR ; CPU:$E662 PRG:2662 8D 06 20 - ldx #$00 + ldx #$00 ; CPU:$E665 PRG:2665 A2 00 ;------------------------------------------------------------------------------ @@ -11622,8 +11425,8 @@ SetLevelProgressAttributeAddress: ;------------------------------------------------------------------------------ ResetAttributeWriteCount: - lda #$03 - sta $01 + lda #$03 ; CPU:$E667 PRG:2667 A9 03 + sta $01 ; CPU:$E669 PRG:2669 85 01 ;------------------------------------------------------------------------------ @@ -11632,24 +11435,24 @@ ResetAttributeWriteCount: ;------------------------------------------------------------------------------ WriteLevelProgressAttribute: - lda $0A,x - sta PPUDATA + lda $0A,x ; CPU:$E66B PRG:266B B5 0A + sta PPUDATA ; CPU:$E66D PRG:266D 8D 07 20 - inx + inx ; CPU:$E670 PRG:2670 E8 - dec $01 - bne WriteLevelProgressAttribute + dec $01 ; CPU:$E671 PRG:2671 C6 01 + bne WriteLevelProgressAttribute ; CPU:$E673 PRG:2673 D0 F6 - inc $02 - bne SelectLevelProgressPalette + inc $02 ; CPU:$E675 PRG:2675 E6 02 + bne SelectLevelProgressPalette ; CPU:$E677 PRG:2677 D0 0C - lda $00 - sta PPUADDR + lda $00 ; CPU:$E679 PRG:2679 A5 00 + sta PPUADDR ; CPU:$E67B PRG:267B 8D 06 20 - lda #$ED - sta PPUADDR + lda #$ED ; CPU:$E67E PRG:267E A9 ED + sta PPUADDR ; CPU:$E680 PRG:2680 8D 06 20 - bne ResetAttributeWriteCount + bne ResetAttributeWriteCount ; CPU:$E683 PRG:2683 D0 E2 ;------------------------------------------------------------------------------ @@ -11658,12 +11461,12 @@ WriteLevelProgressAttribute: ;------------------------------------------------------------------------------ SelectLevelProgressPalette: - lda $68 + lda $68 ; CPU:$E685 PRG:2685 A5 68 - cmp #$10 - bcc StoreLevelProgressPalette + cmp #$10 ; CPU:$E687 PRG:2687 C9 10 + bcc StoreLevelProgressPalette ; CPU:$E689 PRG:2689 90 02 - lda #$0F + lda #$0F ; CPU:$E68B PRG:268B A9 0F ;------------------------------------------------------------------------------ @@ -11671,15 +11474,15 @@ SelectLevelProgressPalette: ;------------------------------------------------------------------------------ StoreLevelProgressPalette: - tay + tay ; CPU:$E68D PRG:268D A8 - lda LevelProgressPaletteTable,y - sta $02B6 + lda LevelProgressPaletteTable,y ; CPU:$E68E PRG:268E B9 C6 E6 + sta $02B6 ; CPU:$E691 PRG:2691 8D B6 02 - lda #$0F - sta $02A9 + lda #$0F ; CPU:$E694 PRG:2694 A9 0F + sta $02A9 ; CPU:$E696 PRG:2696 8D A9 02 - rts + rts ; CPU:$E699 PRG:2699 60 ;============================================================================== @@ -11687,11 +11490,11 @@ StoreLevelProgressPalette: ;============================================================================== LevelProgressMarkerIndexTable: - .byte $00,$01,$02,$02 - .byte $03,$03,$04,$04 - .byte $05,$05,$06,$06 - .byte $07,$07,$07,$07 - .byte $07,$07,$07,$07 + .byte $00,$01,$02,$02 ; CPU:$E69A PRG:269A 00 01 02 02 + .byte $03,$03,$04,$04 ; CPU:$E69E PRG:269E 03 03 04 04 + .byte $05,$05,$06,$06 ; CPU:$E6A2 PRG:26A2 05 05 06 06 + .byte $07,$07,$07,$07 ; CPU:$E6A6 PRG:26A6 07 07 07 07 + .byte $07,$07,$07,$07 ; CPU:$E6AA PRG:26AA 07 07 07 07 ;============================================================================== ; $E6AE-$E6BD: Gameplay Marker Working-Value Table @@ -11700,22 +11503,22 @@ LevelProgressMarkerIndexTable: ;============================================================================== LevelProgressAttributeIndexTable: - .byte $00,$03 - .byte $01,$02 - .byte $01,$03 - .byte $02,$02 - .byte $03,$01 - .byte $04,$00 - .byte $04,$01 - .byte $05,$00 + .byte $00,$03 ; CPU:$E6AE PRG:26AE 00 03 + .byte $01,$02 ; CPU:$E6B0 PRG:26B0 01 02 + .byte $01,$03 ; CPU:$E6B2 PRG:26B2 01 03 + .byte $02,$02 ; CPU:$E6B4 PRG:26B4 02 02 + .byte $03,$01 ; CPU:$E6B6 PRG:26B6 03 01 + .byte $04,$00 ; CPU:$E6B8 PRG:26B8 04 00 + .byte $04,$01 ; CPU:$E6BA PRG:26BA 04 01 + .byte $05,$00 ; CPU:$E6BC PRG:26BC 05 00 ;============================================================================== ; $E6BE-$E6C5: Gameplay Marker Bit/Pattern Table ;============================================================================== LevelProgressAttributeBits: - .byte $02,$02,$02,$02 - .byte $03,$03,$03,$03 + .byte $02,$02,$02,$02 ; CPU:$E6BE PRG:26BE 02 02 02 02 + .byte $03,$03,$03,$03 ; CPU:$E6C2 PRG:26C2 03 03 03 03 ;============================================================================== ; $E6C6-$E6D5: Gameplay Marker Final Value Table @@ -11724,10 +11527,10 @@ LevelProgressAttributeBits: ;============================================================================== LevelProgressPaletteTable: - .byte $16,$16,$26,$26 - .byte $06,$06,$19,$19 - .byte $17,$17,$17,$17 - .byte $12,$12,$12,$12 + .byte $16,$16,$26,$26 ; CPU:$E6C6 PRG:26C6 16 16 26 26 + .byte $06,$06,$19,$19 ; CPU:$E6CA PRG:26CA 06 06 19 19 + .byte $17,$17,$17,$17 ; CPU:$E6CE PRG:26CE 17 17 17 17 + .byte $12,$12,$12,$12 ; CPU:$E6D2 PRG:26D2 12 12 12 12 ;============================================================================== @@ -11735,69 +11538,69 @@ LevelProgressPaletteTable: ;============================================================================== InitializeGameplayTransitionState: - lda #$08 - sta $43 - sta PPUCTRL + lda #$08 ; CPU:$E6D6 PRG:26D6 A9 08 + sta $43 ; CPU:$E6D8 PRG:26D8 85 43 + sta PPUCTRL ; CPU:$E6DA PRG:26DA 8D 00 20 TransitionInit_E6DD: - lda PPUSTATUS - bpl TransitionInit_E6DD + lda PPUSTATUS ; CPU:$E6DD PRG:26DD AD 02 20 + bpl TransitionInit_E6DD ; CPU:$E6E0 PRG:26E0 10 FB - lda #$01 - sta $060D - sta $060E + lda #$01 ; CPU:$E6E2 PRG:26E2 A9 01 + sta $060D ; CPU:$E6E4 PRG:26E4 8D 0D 06 + sta $060E ; CPU:$E6E7 PRG:26E7 8D 0E 06 - lda #$00 - sta PPUMASK + lda #$00 ; CPU:$E6EA PRG:26EA A9 00 + sta PPUMASK ; CPU:$E6EC PRG:26EC 8D 01 20 - jsr ClearPlayfieldNametable + jsr ClearPlayfieldNametable ; CPU:$E6EF PRG:26EF 20 38 E7 - lda #$01 - sta $028D + lda #$01 ; CPU:$E6F2 PRG:26F2 A9 01 + sta $028D ; CPU:$E6F4 PRG:26F4 8D 8D 02 - lda #$01 - sta $0293 + lda #$01 ; CPU:$E6F7 PRG:26F7 A9 01 + sta $0293 ; CPU:$E6F9 PRG:26F9 8D 93 02 - lda #$F7 - sta $0278 + lda #$F7 ; CPU:$E6FC PRG:26FC A9 F7 + sta $0278 ; CPU:$E6FE PRG:26FE 8D 78 02 - lda #$7C - sta $027A + lda #$7C ; CPU:$E701 PRG:2701 A9 7C + sta $027A ; CPU:$E703 PRG:2703 8D 7A 02 - lda #$FF - sta $1E + lda #$FF ; CPU:$E706 PRG:2706 A9 FF + sta $1E ; CPU:$E708 PRG:2708 85 1E - lda #$00 - sta $1F + lda #$00 ; CPU:$E70A PRG:270A A9 00 + sta $1F ; CPU:$E70C PRG:270C 85 1F - lda #$00 - sta $88 + lda #$00 ; CPU:$E70E PRG:270E A9 00 + sta $88 ; CPU:$E710 PRG:2710 85 88 - ldy #$00 + ldy #$00 ; CPU:$E712 PRG:2712 A0 00 TransitionInit_CopyPalette: - lda GameplayTransitionPalette,y - sta $02A9,y + lda GameplayTransitionPalette,y ; CPU:$E714 PRG:2714 B9 AF E7 + sta $02A9,y ; CPU:$E717 PRG:2717 99 A9 02 - iny - cpy #$10 - bne TransitionInit_CopyPalette + iny ; CPU:$E71A PRG:271A C8 + cpy #$10 ; CPU:$E71B PRG:271B C0 10 + bne TransitionInit_CopyPalette ; CPU:$E71D PRG:271D D0 F5 - lda #$20 - sta $026F - sta $0270 - sta $0271 + lda #$20 ; CPU:$E71F PRG:271F A9 20 + sta $026F ; CPU:$E721 PRG:2721 8D 6F 02 + sta $0270 ; CPU:$E724 PRG:2724 8D 70 02 + sta $0271 ; CPU:$E727 PRG:2727 8D 71 02 - lda #$10 - sta $3F + lda #$10 ; CPU:$E72A PRG:272A A9 10 + sta $3F ; CPU:$E72C PRG:272C 85 3F - lda #$88 - sta PPUCTRL - sta $43 + lda #$88 ; CPU:$E72E PRG:272E A9 88 + sta PPUCTRL ; CPU:$E730 PRG:2730 8D 00 20 + sta $43 ; CPU:$E733 PRG:2733 85 43 - jmp $CAA7 + jmp $CAA7 ; CPU:$E735 PRG:2735 4C A7 CA ;============================================================================== @@ -11810,13 +11613,13 @@ TransitionInit_CopyPalette: ;============================================================================== ClearPlayfieldNametable: - ldx #$20 + ldx #$20 ; CPU:$E738 PRG:2738 A2 20 - lda $47 - and $46 - beq SetPlayfieldPpuAddress + lda $47 ; CPU:$E73A PRG:273A A5 47 + and $46 ; CPU:$E73C PRG:273C 25 46 + beq SetPlayfieldPpuAddress ; CPU:$E73E PRG:273E F0 02 - ldx #$28 + ldx #$28 ; CPU:$E740 PRG:2740 A2 28 ;------------------------------------------------------------------------------ @@ -11825,15 +11628,15 @@ ClearPlayfieldNametable: ;------------------------------------------------------------------------------ SetPlayfieldPpuAddress: - lda PPUSTATUS + lda PPUSTATUS ; CPU:$E742 PRG:2742 AD 02 20 - stx PPUADDR + stx PPUADDR ; CPU:$E745 PRG:2745 8E 06 20 - lda #$00 - sta PPUADDR + lda #$00 ; CPU:$E748 PRG:2748 A9 00 + sta PPUADDR ; CPU:$E74A PRG:274A 8D 06 20 - lda #$1C - sta $00 + lda #$1C ; CPU:$E74D PRG:274D A9 1C + sta $00 ; CPU:$E74F PRG:274F 85 00 ;------------------------------------------------------------------------------ @@ -11844,16 +11647,16 @@ SetPlayfieldPpuAddress: ;------------------------------------------------------------------------------ ResetPlayfieldFillCounters: - lda #$02 - sta $01 + lda #$02 ; CPU:$E751 PRG:2751 A9 02 + sta $01 ; CPU:$E753 PRG:2753 85 01 - lda #$1C - sta $02 + lda #$1C ; CPU:$E755 PRG:2755 A9 1C + sta $02 ; CPU:$E757 PRG:2757 85 02 - lda #$02 - sta $03 + lda #$02 ; CPU:$E759 PRG:2759 A9 02 + sta $03 ; CPU:$E75B PRG:275B 85 03 - lda #$2D + lda #$2D ; CPU:$E75D PRG:275D A9 2D ;------------------------------------------------------------------------------ @@ -11862,16 +11665,16 @@ ResetPlayfieldFillCounters: ;------------------------------------------------------------------------------ WritePlayfieldFillByte: - sta PPUDATA + sta PPUDATA ; CPU:$E75F PRG:275F 8D 07 20 - ldx $01 - beq AdvancePlayfieldInnerRun + ldx $01 ; CPU:$E762 PRG:2762 A6 01 + beq AdvancePlayfieldInnerRun ; CPU:$E764 PRG:2764 F0 08 - dec $01 - bne WritePlayfieldFillByte + dec $01 ; CPU:$E766 PRG:2766 C6 01 + bne WritePlayfieldFillByte ; CPU:$E768 PRG:2768 D0 F5 - lda #$20 - bne WritePlayfieldFillByte + lda #$20 ; CPU:$E76A PRG:276A A9 20 + bne WritePlayfieldFillByte ; CPU:$E76C PRG:276C D0 F1 ;------------------------------------------------------------------------------ @@ -11880,14 +11683,14 @@ WritePlayfieldFillByte: ;------------------------------------------------------------------------------ AdvancePlayfieldInnerRun: - ldx $02 - beq AdvancePlayfieldOuterRun + ldx $02 ; CPU:$E76E PRG:276E A6 02 + beq AdvancePlayfieldOuterRun ; CPU:$E770 PRG:2770 F0 08 - dec $02 - bne WritePlayfieldFillByte + dec $02 ; CPU:$E772 PRG:2772 C6 02 + bne WritePlayfieldFillByte ; CPU:$E774 PRG:2774 D0 E9 - lda #$2D - bne WritePlayfieldFillByte + lda #$2D ; CPU:$E776 PRG:2776 A9 2D + bne WritePlayfieldFillByte ; CPU:$E778 PRG:2778 D0 E5 ;------------------------------------------------------------------------------ @@ -11896,11 +11699,11 @@ AdvancePlayfieldInnerRun: ;------------------------------------------------------------------------------ AdvancePlayfieldOuterRun: - dec $03 - bne WritePlayfieldFillByte + dec $03 ; CPU:$E77A PRG:277A C6 03 + bne WritePlayfieldFillByte ; CPU:$E77C PRG:277C D0 E1 - dec $00 - bne ResetPlayfieldFillCounters + dec $00 ; CPU:$E77E PRG:277E C6 00 + bne ResetPlayfieldFillCounters ; CPU:$E780 PRG:2780 D0 CF ;------------------------------------------------------------------------------ @@ -11908,22 +11711,22 @@ AdvancePlayfieldOuterRun: ; Clear $40 PPU bytes. ;------------------------------------------------------------------------------ - lda #$00 - tax + lda #$00 ; CPU:$E782 PRG:2782 A9 00 + tax ; CPU:$E784 PRG:2784 AA ClearPlayfieldTail: - sta PPUDATA + sta PPUDATA ; CPU:$E785 PRG:2785 8D 07 20 - inx - cpx #$40 - bne ClearPlayfieldTail + inx ; CPU:$E788 PRG:2788 E8 + cpx #$40 ; CPU:$E789 PRG:2789 E0 40 + bne ClearPlayfieldTail ; CPU:$E78B PRG:278B D0 F8 - lda $87 - cmp #$02 - beq DrawPlayfieldSpecialTile + lda $87 ; CPU:$E78D PRG:278D A5 87 + cmp #$02 ; CPU:$E78F PRG:278F C9 02 + beq DrawPlayfieldSpecialTile ; CPU:$E791 PRG:2791 F0 01 - rts + rts ; CPU:$E793 PRG:2793 60 ;------------------------------------------------------------------------------ @@ -11932,27 +11735,27 @@ ClearPlayfieldTail: ;------------------------------------------------------------------------------ DrawPlayfieldSpecialTile: - ldx #$22 + ldx #$22 ; CPU:$E794 PRG:2794 A2 22 - lda $47 - and $46 - beq SetSpecialTilePpuAddress + lda $47 ; CPU:$E796 PRG:2796 A5 47 + and $46 ; CPU:$E798 PRG:2798 25 46 + beq SetSpecialTilePpuAddress ; CPU:$E79A PRG:279A F0 02 - ldx #$2A + ldx #$2A ; CPU:$E79C PRG:279C A2 2A SetSpecialTilePpuAddress: - lda PPUSTATUS + lda PPUSTATUS ; CPU:$E79E PRG:279E AD 02 20 - stx PPUADDR + stx PPUADDR ; CPU:$E7A1 PRG:27A1 8E 06 20 - lda #$30 - sta PPUADDR + lda #$30 ; CPU:$E7A4 PRG:27A4 A9 30 + sta PPUADDR ; CPU:$E7A6 PRG:27A6 8D 06 20 - lda #$5E - sta PPUDATA + lda #$5E ; CPU:$E7A9 PRG:27A9 A9 5E + sta PPUDATA ; CPU:$E7AB PRG:27AB 8D 07 20 - rts + rts ; CPU:$E7AE PRG:27AE 60 ;============================================================================== @@ -11960,10 +11763,10 @@ SetSpecialTilePpuAddress: ;============================================================================== GameplayTransitionPalette: - .byte $0F,$36,$20,$06 - .byte $0F,$27,$20,$06 - .byte $0F,$11,$20,$33 - .byte $0F,$36,$20,$11 + .byte $0F,$36,$20,$06 ; CPU:$E7AF PRG:27AF 0F 36 20 06 + .byte $0F,$27,$20,$06 ; CPU:$E7B3 PRG:27B3 0F 27 20 06 + .byte $0F,$11,$20,$33 ; CPU:$E7B7 PRG:27B7 0F 11 20 33 + .byte $0F,$36,$20,$11 ; CPU:$E7BB PRG:27BB 0F 36 20 11 ;============================================================================== ; $E7BF-$E7CD: Gameplay Transition Update Coordinator @@ -11973,12 +11776,12 @@ GameplayTransitionPalette: ;============================================================================== UpdateIntermissionTransition: - jsr $EA19 - jsr $EA94 - jsr BuildEntitySpriteBuffer - jsr DispatchIntermissionState + jsr $EA19 ; CPU:$E7BF PRG:27BF 20 19 EA + jsr $EA94 ; CPU:$E7C2 PRG:27C2 20 94 EA + jsr BuildEntitySpriteBuffer ; CPU:$E7C5 PRG:27C5 20 F1 DA + jsr DispatchIntermissionState ; CPU:$E7C8 PRG:27C8 20 CE E7 - jmp $CAA7 + jmp $CAA7 ; CPU:$E7CB PRG:27CB 4C A7 CA ;============================================================================== @@ -11988,15 +11791,15 @@ UpdateIntermissionTransition: ;============================================================================== DispatchIntermissionState: - ldy $87 + ldy $87 ; CPU:$E7CE PRG:27CE A4 87 - lda IntermissionStateHandlerTable,y - sta $10 + lda IntermissionStateHandlerTable,y ; CPU:$E7D0 PRG:27D0 B9 DD E7 + sta $10 ; CPU:$E7D3 PRG:27D3 85 10 - lda IntermissionStateHandlerTable+1,y - sta $11 + lda IntermissionStateHandlerTable+1,y ; CPU:$E7D5 PRG:27D5 B9 DE E7 + sta $11 ; CPU:$E7D8 PRG:27D8 85 11 - jmp ($0010) + jmp ($0010) ; CPU:$E7DA PRG:27DA 6C 10 00 E3 E7 ;============================================================================== @@ -12004,9 +11807,9 @@ DispatchIntermissionState: ;============================================================================== IntermissionStateHandlerTable: - .word DispatchIntermissionPhase - .word DispatchIntermissionState2Phase - .word DispatchIntermissionState4Phase + .word DispatchIntermissionPhase ; CPU:$E7DD PRG:27DD E3 E7 + .word DispatchIntermissionState2Phase ; CPU:$E7DF PRG:27DF C7 E8 + .word DispatchIntermissionState4Phase ; CPU:$E7E1 PRG:27E1 6E E9 ;============================================================================== @@ -12016,15 +11819,15 @@ IntermissionStateHandlerTable: ;============================================================================== DispatchIntermissionPhase: - ldy $88 + ldy $88 ; CPU:$E7E3 PRG:27E3 A4 88 - lda IntermissionPhaseHandlerTable,y - sta $10 + lda IntermissionPhaseHandlerTable,y ; CPU:$E7E5 PRG:27E5 B9 F2 E7 + sta $10 ; CPU:$E7E8 PRG:27E8 85 10 - lda IntermissionPhaseHandlerTable+1,y - sta $11 + lda IntermissionPhaseHandlerTable+1,y ; CPU:$E7EA PRG:27EA B9 F3 E7 + sta $11 ; CPU:$E7ED PRG:27ED 85 11 - jmp ($0010) + jmp ($0010) ; CPU:$E7EF PRG:27EF 6C 10 00 FA E7 ;============================================================================== @@ -12032,10 +11835,10 @@ DispatchIntermissionPhase: ;============================================================================== IntermissionPhaseHandlerTable: - .word UpdateIntermissionPhase0 - .word UpdateIntermissionPhase1 - .word UpdateIntermissionPhase2 - .word UpdateIntermissionPhase3 + .word UpdateIntermissionPhase0 ; CPU:$E7F2 PRG:27F2 FA E7 + .word UpdateIntermissionPhase1 ; CPU:$E7F4 PRG:27F4 23 E8 + .word UpdateIntermissionPhase2 ; CPU:$E7F6 PRG:27F6 4E E8 + .word UpdateIntermissionPhase3 ; CPU:$E7F8 PRG:27F8 BA E8 ;============================================================================== @@ -12046,36 +11849,36 @@ IntermissionPhaseHandlerTable: ;============================================================================== UpdateIntermissionPhase0: - lda $0278 - cmp #$D0 - bcc TransitionSubstate_E802 + lda $0278 ; CPU:$E7FA PRG:27FA AD 78 02 + cmp #$D0 ; CPU:$E7FD PRG:27FD C9 D0 + bcc TransitionSubstate_E802 ; CPU:$E7FF PRG:27FF 90 01 - rts + rts ; CPU:$E801 PRG:2801 60 TransitionSubstate_E802: - inc $88 - inc $88 + inc $88 ; CPU:$E802 PRG:2802 E6 88 + inc $88 ; CPU:$E804 PRG:2804 E6 88 - lda #$0C - sta $028C + lda #$0C ; CPU:$E806 PRG:2806 A9 0C + sta $028C ; CPU:$E808 PRG:2808 8D 8C 02 - lda #$20 - sta $0292 + lda #$20 ; CPU:$E80B PRG:280B A9 20 + sta $0292 ; CPU:$E80D PRG:280D 8D 92 02 - lda #$F7 - sta $0274 + lda #$F7 ; CPU:$E810 PRG:2810 A9 F7 + sta $0274 ; CPU:$E812 PRG:2812 8D 74 02 - lda #$7C - sta $0276 + lda #$7C ; CPU:$E815 PRG:2815 A9 7C + sta $0276 ; CPU:$E817 PRG:2817 8D 76 02 - lda #$FE - sta $1A + lda #$FE ; CPU:$E81A PRG:281A A9 FE + sta $1A ; CPU:$E81C PRG:281C 85 1A - lda #$E0 - sta $1B + lda #$E0 ; CPU:$E81E PRG:281E A9 E0 + sta $1B ; CPU:$E820 PRG:2820 85 1B - rts + rts ; CPU:$E822 PRG:2822 60 ;============================================================================== @@ -12086,38 +11889,38 @@ TransitionSubstate_E802: ;============================================================================== UpdateIntermissionPhase1: - lda $0274 - beq TransitionSubstate_E829 + lda $0274 ; CPU:$E823 PRG:2823 AD 74 02 + beq TransitionSubstate_E829 ; CPU:$E826 PRG:2826 F0 01 - rts + rts ; CPU:$E828 PRG:2828 60 TransitionSubstate_E829: - inc $88 - inc $88 + inc $88 ; CPU:$E829 PRG:2829 E6 88 + inc $88 ; CPU:$E82B PRG:282B E6 88 - lda #$40 - sta $4C + lda #$40 ; CPU:$E82D PRG:282D A9 40 + sta $4C ; CPU:$E82F PRG:282F 85 4C - lda #$1E - sta $028C + lda #$1E ; CPU:$E831 PRG:2831 A9 1E + sta $028C ; CPU:$E833 PRG:2833 8D 8C 02 - lda #$22 - sta $0292 + lda #$22 ; CPU:$E836 PRG:2836 A9 22 + sta $0292 ; CPU:$E838 PRG:2838 8D 92 02 - lda #$09 - sta $0274 + lda #$09 ; CPU:$E83B PRG:283B A9 09 + sta $0274 ; CPU:$E83D PRG:283D 8D 74 02 - lda #$7C - sta $0276 + lda #$7C ; CPU:$E840 PRG:2840 A9 7C + sta $0276 ; CPU:$E842 PRG:2842 8D 76 02 - lda #$01 - sta $1A + lda #$01 ; CPU:$E845 PRG:2845 A9 01 + sta $1A ; CPU:$E847 PRG:2847 85 1A - lda #$00 - sta $1B + lda #$00 ; CPU:$E849 PRG:2849 A9 00 + sta $1B ; CPU:$E84B PRG:284B 85 1B - rts + rts ; CPU:$E84D PRG:284D 60 ;============================================================================== @@ -12128,70 +11931,70 @@ TransitionSubstate_E829: ;============================================================================== UpdateIntermissionPhase2: - lda #$01 - sta $060D - sta $060E + lda #$01 ; CPU:$E84E PRG:284E A9 01 + sta $060D ; CPU:$E850 PRG:2850 8D 0D 06 + sta $060E ; CPU:$E853 PRG:2853 8D 0E 06 - lda $0274 - cmp #$80 - bcs TransitionSubstate_E85D + lda $0274 ; CPU:$E856 PRG:2856 AD 74 02 + cmp #$80 ; CPU:$E859 PRG:2859 C9 80 + bcs TransitionSubstate_E85D ; CPU:$E85B PRG:285B B0 01 - rts + rts ; CPU:$E85D PRG:285D 60 TransitionSubstate_E85D: - inc $88 - inc $88 + inc $88 ; CPU:$E85E PRG:285E E6 88 + inc $88 ; CPU:$E860 PRG:2860 E6 88 - lda #$01 - sta $1E - sta $22 - sta $26 - sta $2A + lda #$01 ; CPU:$E862 PRG:2862 A9 01 + sta $1E ; CPU:$E864 PRG:2864 85 1E + sta $22 ; CPU:$E866 PRG:2866 85 22 + sta $26 ; CPU:$E868 PRG:2868 85 26 + sta $2A ; CPU:$E86A PRG:286A 85 2A - lda #$C0 - sta $1F - sta $23 - sta $27 - sta $2B + lda #$C0 ; CPU:$E86C PRG:286C A9 C0 + sta $1F ; CPU:$E86E PRG:286E 85 1F + sta $23 ; CPU:$E870 PRG:2870 85 23 + sta $27 ; CPU:$E872 PRG:2872 85 27 + sta $2B ; CPU:$E874 PRG:2874 85 2B - clc + clc ; CPU:$E876 PRG:2876 18 - lda #$38 - sta $028D + lda #$38 ; CPU:$E877 PRG:2877 A9 38 + sta $028D ; CPU:$E879 PRG:2879 8D 8D 02 - adc #$01 - sta $028E + adc #$01 ; CPU:$E87C PRG:287C 69 01 + sta $028E ; CPU:$E87E PRG:287E 8D 8E 02 - adc #$01 - sta $028F + adc #$01 ; CPU:$E881 PRG:2881 69 01 + sta $028F ; CPU:$E883 PRG:2883 8D 8F 02 - adc #$01 - sta $0290 + adc #$01 ; CPU:$E886 PRG:2886 69 01 + sta $0290 ; CPU:$E888 PRG:2888 8D 90 02 - lda #$21 - sta $0293 - sta $0294 - sta $0295 - sta $0296 + lda #$21 ; CPU:$E88B PRG:288B A9 21 + sta $0293 ; CPU:$E88D PRG:288D 8D 93 02 + sta $0294 ; CPU:$E890 PRG:2890 8D 94 02 + sta $0295 ; CPU:$E893 PRG:2893 8D 95 02 + sta $0296 ; CPU:$E896 PRG:2896 8D 96 02 - lda #$09 - sta $0278 - sta $0280 + lda #$09 ; CPU:$E899 PRG:2899 A9 09 + sta $0278 ; CPU:$E89B PRG:289B 8D 78 02 + sta $0280 ; CPU:$E89E PRG:289E 8D 80 02 - lda #$19 - sta $027C - sta $0284 + lda #$19 ; CPU:$E8A1 PRG:28A1 A9 19 + sta $027C ; CPU:$E8A3 PRG:28A3 8D 7C 02 + sta $0284 ; CPU:$E8A6 PRG:28A6 8D 84 02 - lda #$6C - sta $027A - sta $027E + lda #$6C ; CPU:$E8A9 PRG:28A9 A9 6C + sta $027A ; CPU:$E8AB PRG:28AB 8D 7A 02 + sta $027E ; CPU:$E8AE PRG:28AE 8D 7E 02 - lda #$7C - sta $0282 - sta $0286 + lda #$7C ; CPU:$E8B1 PRG:28B1 A9 7C + sta $0282 ; CPU:$E8B3 PRG:28B3 8D 82 02 + sta $0286 ; CPU:$E8B6 PRG:28B6 8D 86 02 - rts + rts ; CPU:$E8B9 PRG:28B9 60 ;============================================================================== @@ -12202,17 +12005,17 @@ TransitionSubstate_E85D: ;============================================================================== UpdateIntermissionPhase3: - lda $0278 - beq TransitionSubstate_E8C0 + lda $0278 ; CPU:$E8BA PRG:28BA AD 78 02 + beq TransitionSubstate_E8C0 ; CPU:$E8BD PRG:28BD F0 01 - rts + rts ; CPU:$E8BF PRG:28BF 60 TransitionSubstate_E8C0: - lda #$40 - sta $4C + lda #$40 ; CPU:$E8C0 PRG:28C0 A9 40 + sta $4C ; CPU:$E8C2 PRG:28C2 85 4C - jmp $EA14 + jmp $EA14 ; CPU:$E8C4 PRG:28C4 4C 14 EA ;============================================================================== @@ -12223,15 +12026,15 @@ TransitionSubstate_E8C0: ;============================================================================== DispatchIntermissionState2Phase: - ldy $88 + ldy $88 ; CPU:$E8C7 PRG:28C7 A4 88 - lda IntermissionState2PhaseTable,y - sta $10 + lda IntermissionState2PhaseTable,y ; CPU:$E8C9 PRG:28C9 B9 D6 E8 + sta $10 ; CPU:$E8CC PRG:28CC 85 10 - lda IntermissionState2PhaseTable+1,y - sta $11 + lda IntermissionState2PhaseTable+1,y ; CPU:$E8CE PRG:28CE B9 D7 E8 + sta $11 ; CPU:$E8D1 PRG:28D1 85 11 - jmp ($0010) + jmp ($0010) ; CPU:$E8D3 PRG:28D3 6C 10 00 DC E8 ;============================================================================== @@ -12239,9 +12042,9 @@ DispatchIntermissionState2Phase: ;============================================================================== IntermissionState2PhaseTable: - .word UpdateIntermissionState2Phase0 - .word UpdateIntermissionState2Phase1 - .word UpdateIntermissionState2Phase2 + .word UpdateIntermissionState2Phase0 ; CPU:$E8D6 PRG:28D6 DC E8 + .word UpdateIntermissionState2Phase1 ; CPU:$E8D8 PRG:28D8 05 E9 + .word UpdateIntermissionState2Phase2 ; CPU:$E8DA PRG:28DA 3F E9 ;============================================================================== @@ -12252,36 +12055,36 @@ IntermissionState2PhaseTable: ;============================================================================== UpdateIntermissionState2Phase0: - lda $0278 - cmp #$A0 - bcc TransitionPhase_E8E4 + lda $0278 ; CPU:$E8DC PRG:28DC AD 78 02 + cmp #$A0 ; CPU:$E8DF PRG:28DF C9 A0 + bcc TransitionPhase_E8E4 ; CPU:$E8E1 PRG:28E1 90 01 - rts + rts ; CPU:$E8E3 PRG:28E3 60 TransitionPhase_E8E4: - inc $88 - inc $88 + inc $88 ; CPU:$E8E4 PRG:28E4 E6 88 + inc $88 ; CPU:$E8E6 PRG:28E6 E6 88 - lda #$0C - sta $028C + lda #$0C ; CPU:$E8E8 PRG:28E8 A9 0C + sta $028C ; CPU:$E8EA PRG:28EA 8D 8C 02 - lda #$20 - sta $0292 + lda #$20 ; CPU:$E8ED PRG:28ED A9 20 + sta $0292 ; CPU:$E8EF PRG:28EF 8D 92 02 - lda #$F7 - sta $0274 + lda #$F7 ; CPU:$E8F2 PRG:28F2 A9 F7 + sta $0274 ; CPU:$E8F4 PRG:28F4 8D 74 02 - lda #$7C - sta $0276 + lda #$7C ; CPU:$E8F7 PRG:28F7 A9 7C + sta $0276 ; CPU:$E8F9 PRG:28F9 8D 76 02 - lda #$FF - sta $1A + lda #$FF ; CPU:$E8FC PRG:28FC A9 FF + sta $1A ; CPU:$E8FE PRG:28FE 85 1A - lda #$00 - sta $1B + lda #$00 ; CPU:$E900 PRG:2900 A9 00 + sta $1B ; CPU:$E902 PRG:2902 85 1B - rts + rts ; CPU:$E904 PRG:2904 60 ;============================================================================== @@ -12292,52 +12095,52 @@ TransitionPhase_E8E4: ;============================================================================== UpdateIntermissionState2Phase1: - lda $0274 + lda $0274 ; CPU:$E905 PRG:2905 AD 74 02 - cmp #$80 - bne TransitionPhase_E92D + cmp #$80 ; CPU:$E908 PRG:2908 C9 80 + bne TransitionPhase_E92D ; CPU:$E90A PRG:290A D0 23 - lda #$FF - sta $1A + lda #$FF ; CPU:$E90C PRG:290C A9 FF + sta $1A ; CPU:$E90E PRG:290E 85 1A - lda #$C0 - sta $1B + lda #$C0 ; CPU:$E910 PRG:2910 A9 C0 + sta $1B ; CPU:$E912 PRG:2912 85 1B - lda #$42 - sta $028E + lda #$42 ; CPU:$E914 PRG:2914 A9 42 + sta $028E ; CPU:$E916 PRG:2916 8D 8E 02 - lda #$00 - sta $0294 + lda #$00 ; CPU:$E919 PRG:2919 A9 00 + sta $0294 ; CPU:$E91B PRG:291B 8D 94 02 - lda #$80 - sta $027C + lda #$80 ; CPU:$E91E PRG:291E A9 80 + sta $027C ; CPU:$E920 PRG:2920 8D 7C 02 - lda #$7C - sta $027E + lda #$7C ; CPU:$E923 PRG:2923 A9 7C + sta $027E ; CPU:$E925 PRG:2925 8D 7E 02 - lda #$00 - sta $22 - sta $23 + lda #$00 ; CPU:$E928 PRG:2928 A9 00 + sta $22 ; CPU:$E92A PRG:292A 85 22 + sta $23 ; CPU:$E92C PRG:292C 85 23 - rts + rts ; CPU:$E92E PRG:292E 60 TransitionPhase_E92D: - cmp #$78 - beq TransitionPhase_E933 + cmp #$78 ; CPU:$E92F PRG:292F C9 78 + beq TransitionPhase_E933 ; CPU:$E931 PRG:2931 F0 01 - rts + rts ; CPU:$E933 PRG:2933 60 TransitionPhase_E933: - lda #$00 - sta $1A - sta $1B + lda #$00 ; CPU:$E934 PRG:2934 A9 00 + sta $1A ; CPU:$E936 PRG:2936 85 1A + sta $1B ; CPU:$E938 PRG:2938 85 1B - inc $88 - inc $88 + inc $88 ; CPU:$E93A PRG:293A E6 88 + inc $88 ; CPU:$E93C PRG:293C E6 88 - rts + rts ; CPU:$E93E PRG:293E 60 ;============================================================================== @@ -12348,45 +12151,45 @@ TransitionPhase_E933: ;============================================================================== UpdateIntermissionState2Phase2: - lda $028C - and #$40 - bne TransitionPhase_E953 + lda $028C ; CPU:$E93F PRG:293F AD 8C 02 + and #$40 ; CPU:$E942 PRG:2942 29 40 + bne TransitionPhase_E953 ; CPU:$E944 PRG:2944 D0 0F - lda #$46 - sta $028C + lda #$46 ; CPU:$E946 PRG:2946 A9 46 + sta $028C ; CPU:$E948 PRG:2948 8D 8C 02 - lda #$45 - sta $028E + lda #$45 ; CPU:$E94B PRG:294B A9 45 + sta $028E ; CPU:$E94D PRG:294D 8D 8E 02 - lda #$40 - sta $89 + lda #$40 ; CPU:$E950 PRG:2950 A9 40 + sta $89 ; CPU:$E952 PRG:2952 85 89 - rts + rts ; CPU:$E954 PRG:2954 60 TransitionPhase_E953: - dec $89 - beq TransitionPhase_E958 + dec $89 ; CPU:$E955 PRG:2955 C6 89 + beq TransitionPhase_E958 ; CPU:$E957 PRG:2957 F0 01 - rts + rts ; CPU:$E959 PRG:2959 60 TransitionPhase_E958: - lda $028C - cmp #$47 - bne TransitionPhase_E963 + lda $028C ; CPU:$E95A PRG:295A AD 8C 02 + cmp #$47 ; CPU:$E95D PRG:295D C9 47 + bne TransitionPhase_E963 ; CPU:$E95F PRG:295F D0 03 - jmp $EA14 + jmp $EA14 ; CPU:$E961 PRG:2961 4C 14 EA TransitionPhase_E963: - lda #$47 - sta $028C + lda #$47 ; CPU:$E964 PRG:2964 A9 47 + sta $028C ; CPU:$E966 PRG:2966 8D 8C 02 - lda #$40 - sta $89 + lda #$40 ; CPU:$E969 PRG:2969 A9 40 + sta $89 ; CPU:$E96B PRG:296B 85 89 - rts + rts ; CPU:$E96D PRG:296D 60 ;============================================================================== @@ -12395,24 +12198,24 @@ TransitionPhase_E963: ; $88 is an even byte offset into the four-entry phase table. ;============================================================================== DispatchIntermissionState4Phase: - ldy $88 + ldy $88 ; CPU:$E96E PRG:296E A4 88 - lda IntermissionState4PhaseTable,y - sta $10 + lda IntermissionState4PhaseTable,y ; CPU:$E970 PRG:2970 B9 7D E9 + sta $10 ; CPU:$E973 PRG:2973 85 10 - lda IntermissionState4PhaseTable+1,y - sta $11 + lda IntermissionState4PhaseTable+1,y ; CPU:$E975 PRG:2975 B9 7E E9 + sta $11 ; CPU:$E978 PRG:2978 85 11 - jmp ($0010) + jmp ($0010) ; CPU:$E97A PRG:297A 6C 10 00 85 E9 ;============================================================================== ; $E97D-$E984: Transition State $04 Phase Table ;============================================================================== IntermissionState4PhaseTable: - .word UpdateIntermissionState4Phase0 - .word UpdateIntermissionState4Phase1 - .word UpdateIntermissionState4Phase2 - .word UpdateIntermissionState4Phase3 + .word UpdateIntermissionState4Phase0 ; CPU:$E97D PRG:297D 85 E9 + .word UpdateIntermissionState4Phase1 ; CPU:$E97F PRG:297F AE E9 + .word UpdateIntermissionState4Phase2 ; CPU:$E981 PRG:2981 D9 E9 + .word UpdateIntermissionState4Phase3 ; CPU:$E983 PRG:2983 0A EA ;============================================================================== ; $E985-$E9AD: Phase 0 @@ -12422,35 +12225,35 @@ IntermissionState4PhaseTable: ;============================================================================== UpdateIntermissionState4Phase0: - lda $0278 - cmp #$D8 - bcc TransitionPhase_E98D + lda $0278 ; CPU:$E985 PRG:2985 AD 78 02 + cmp #$D8 ; CPU:$E988 PRG:2988 C9 D8 + bcc TransitionPhase_E98D ; CPU:$E98A PRG:298A 90 01 - rts + rts ; CPU:$E98C PRG:298C 60 TransitionPhase_E98D: - inc $88 - inc $88 + inc $88 ; CPU:$E98D PRG:298D E6 88 + inc $88 ; CPU:$E98F PRG:298F E6 88 - lda #$4C - sta $028C + lda #$4C ; CPU:$E991 PRG:2991 A9 4C + sta $028C ; CPU:$E993 PRG:2993 8D 8C 02 - lda #$20 - sta $0292 + lda #$20 ; CPU:$E996 PRG:2996 A9 20 + sta $0292 ; CPU:$E998 PRG:2998 8D 92 02 - lda #$F7 - sta $0274 + lda #$F7 ; CPU:$E99B PRG:299B A9 F7 + sta $0274 ; CPU:$E99D PRG:299D 8D 74 02 - lda #$7C - sta $0276 + lda #$7C ; CPU:$E9A0 PRG:29A0 A9 7C + sta $0276 ; CPU:$E9A2 PRG:29A2 8D 76 02 - lda #$FF - sta $1A + lda #$FF ; CPU:$E9A5 PRG:29A5 A9 FF + sta $1A ; CPU:$E9A7 PRG:29A7 85 1A - lda #$00 - sta $1B + lda #$00 ; CPU:$E9A9 PRG:29A9 A9 00 + sta $1B ; CPU:$E9AB PRG:29AB 85 1B - rts + rts ; CPU:$E9AD PRG:29AD 60 ;============================================================================== ; $E9AE-$E9D8: Phase 1 @@ -12460,37 +12263,37 @@ TransitionPhase_E98D: ;============================================================================== UpdateIntermissionState4Phase1: - lda $0274 - beq TransitionPhase_E9B4 + lda $0274 ; CPU:$E9AE PRG:29AE AD 74 02 + beq TransitionPhase_E9B4 ; CPU:$E9B1 PRG:29B1 F0 01 - rts + rts ; CPU:$E9B3 PRG:29B3 60 TransitionPhase_E9B4: - inc $88 - inc $88 + inc $88 ; CPU:$E9B4 PRG:29B4 E6 88 + inc $88 ; CPU:$E9B6 PRG:29B6 E6 88 - lda #$28 - sta $4C + lda #$28 ; CPU:$E9B8 PRG:29B8 A9 28 + sta $4C ; CPU:$E9BA PRG:29BA 85 4C - lda #$4A - sta $028C + lda #$4A ; CPU:$E9BC PRG:29BC A9 4A + sta $028C ; CPU:$E9BE PRG:29BE 8D 8C 02 - lda #$23 - sta $0292 + lda #$23 ; CPU:$E9C1 PRG:29C1 A9 23 + sta $0292 ; CPU:$E9C3 PRG:29C3 8D 92 02 - lda #$09 - sta $0274 + lda #$09 ; CPU:$E9C6 PRG:29C6 A9 09 + sta $0274 ; CPU:$E9C8 PRG:29C8 8D 74 02 - lda #$7C - sta $0276 + lda #$7C ; CPU:$E9CB PRG:29CB A9 7C + sta $0276 ; CPU:$E9CD PRG:29CD 8D 76 02 - lda #$01 - sta $1A + lda #$01 ; CPU:$E9D0 PRG:29D0 A9 01 + sta $1A ; CPU:$E9D2 PRG:29D2 85 1A - lda #$00 - sta $1B + lda #$00 ; CPU:$E9D4 PRG:29D4 A9 00 + sta $1B ; CPU:$E9D6 PRG:29D6 85 1B - rts + rts ; CPU:$E9D8 PRG:29D8 60 ;============================================================================== ; $E9D9-$EA09: Phase 2 @@ -12499,39 +12302,39 @@ TransitionPhase_E9B4: ; and sets the next mirrored-state values. ;============================================================================== UpdateIntermissionState4Phase2: - lda #$01 - sta $060D - sta $060E + lda #$01 ; CPU:$E9D9 PRG:29D9 A9 01 + sta $060D ; CPU:$E9DB PRG:29DB 8D 0D 06 + sta $060E ; CPU:$E9DE PRG:29DE 8D 0E 06 - lda $0274 - cmp #$19 - bcs TransitionPhase_E9E8 + lda $0274 ; CPU:$E9E1 PRG:29E1 AD 74 02 + cmp #$19 ; CPU:$E9E4 PRG:29E4 C9 19 + bcs TransitionPhase_E9E8 ; CPU:$E9E6 PRG:29E6 B0 01 - rts + rts ; CPU:$E9E8 PRG:29E8 60 TransitionPhase_E9E8: - inc $88 - inc $88 + inc $88 ; CPU:$E9E9 PRG:29E9 E6 88 + inc $88 ; CPU:$E9EB PRG:29EB E6 88 - lda #$4C - sta $028D + lda #$4C ; CPU:$E9ED PRG:29ED A9 4C + sta $028D ; CPU:$E9EF PRG:29EF 8D 8D 02 - lda #$21 - sta $0293 + lda #$21 ; CPU:$E9F2 PRG:29F2 A9 21 + sta $0293 ; CPU:$E9F4 PRG:29F4 8D 93 02 - lda #$11 - sta $0278 + lda #$11 ; CPU:$E9F7 PRG:29F7 A9 11 + sta $0278 ; CPU:$E9F9 PRG:29F9 8D 78 02 - lda #$84 - sta $027A + lda #$84 ; CPU:$E9FC PRG:29FC A9 84 + sta $027A ; CPU:$E9FE PRG:29FE 8D 7A 02 - lda #$01 - sta $1E + lda #$01 ; CPU:$EA01 PRG:2A01 A9 01 + sta $1E ; CPU:$EA03 PRG:2A03 85 1E - lda #$00 - sta $1F + lda #$00 ; CPU:$EA05 PRG:2A05 A9 00 + sta $1F ; CPU:$EA07 PRG:2A07 85 1F - rts + rts ; CPU:$EA09 PRG:2A09 60 ;============================================================================== ; $EA0A-$EA18: Phase 3 @@ -12540,19 +12343,19 @@ TransitionPhase_E9E8: ; transition. ;============================================================================== UpdateIntermissionState4Phase3: - lda $0278 - beq TransitionPhase_EA10 + lda $0278 ; CPU:$EA0A PRG:2A0A AD 78 02 + beq TransitionPhase_EA10 ; CPU:$EA0D PRG:2A0D F0 01 - rts + rts ; CPU:$EA0F PRG:2A0F 60 TransitionPhase_EA10: - lda #$40 - sta $4C + lda #$40 ; CPU:$EA10 PRG:2A10 A9 40 + sta $4C ; CPU:$EA12 PRG:2A12 85 4C - lda #$00 - sta $3F + lda #$00 ; CPU:$EA14 PRG:2A14 A9 00 + sta $3F ; CPU:$EA16 PRG:2A16 85 3F - rts + rts ; CPU:$EA18 PRG:2A18 60 ;============================================================================== ; $EA19-$EA93: Update Mirrored Gameplay Object Positions @@ -12575,56 +12378,56 @@ TransitionPhase_EA10: ; labels are used throughout. ;============================================================================== UpdateTransitionObjectPositions: - lda #$1A - sta $00 + lda #$1A ; CPU:$EA19 PRG:2A19 A9 1A + sta $00 ; CPU:$EA1B PRG:2A1B 85 00 - lda #$00 - sta $01 + lda #$00 ; CPU:$EA1D PRG:2A1D A9 00 + sta $01 ; CPU:$EA1F PRG:2A1F 85 01 - lda #$74 - sta $02 + lda #$74 ; CPU:$EA21 PRG:2A21 A9 74 + sta $02 ; CPU:$EA23 PRG:2A23 85 02 - lda #$02 - sta $03 + lda #$02 ; CPU:$EA25 PRG:2A25 A9 02 + sta $03 ; CPU:$EA27 PRG:2A27 85 03 - ldx #$00 + ldx #$00 ; CPU:$EA29 PRG:2A29 A2 00 ;------------------------------------------------------------------------------ ; $EA2B ; Process one structure. ;------------------------------------------------------------------------------ UpdateNextTransitionObject: - ldy #$00 + ldy #$00 ; CPU:$EA2B PRG:2A2B A0 00 - lda ($02),y - beq AdvanceTransitionObjectPointers + lda ($02),y ; CPU:$EA2D PRG:2A2D B1 02 + beq AdvanceTransitionObjectPointers ; CPU:$EA2F PRG:2A2F F0 43 - iny + iny ; CPU:$EA31 PRG:2A31 C8 - lda ($00),y - clc - adc ($02),y - sta ($02),y + lda ($00),y ; CPU:$EA32 PRG:2A32 B1 00 + clc ; CPU:$EA34 PRG:2A34 18 + adc ($02),y ; CPU:$EA35 PRG:2A35 71 02 + sta ($02),y ; CPU:$EA37 PRG:2A37 91 02 - dey + dey ; CPU:$EA39 PRG:2A39 88 - lda ($00),y - adc ($02),y - sta ($02),y + lda ($00),y ; CPU:$EA3A PRG:2A3A B1 00 + adc ($02),y ; CPU:$EA3C PRG:2A3C 71 02 + sta ($02),y ; CPU:$EA3E PRG:2A3E 91 02 - cmp #$C0 - bcc UpdateTransitionObjectAttribute + cmp #$C0 ; CPU:$EA40 PRG:2A40 C9 C0 + bcc UpdateTransitionObjectAttribute ; CPU:$EA42 PRG:2A42 90 0A ;------------------------------------------------------------------------------ ; $EA44 ; Set attribute bit $20. ;------------------------------------------------------------------------------ SetTransitionObjectAttributeBit: - lda #$20 - ora $0292,x - sta $0292,x + lda #$20 ; CPU:$EA44 PRG:2A44 A9 20 + ora $0292,x ; CPU:$EA46 PRG:2A46 1D 92 02 + sta $0292,x ; CPU:$EA49 PRG:2A49 9D 92 02 - bne CheckTransitionObjectWrap + bne CheckTransitionObjectWrap ; CPU:$EA4C PRG:2A4C D0 0C ;------------------------------------------------------------------------------ ; $EA4E @@ -12635,12 +12438,12 @@ SetTransitionObjectAttributeBit: ;------------------------------------------------------------------------------ UpdateTransitionObjectAttribute: - cmp #$40 - bcc SetTransitionObjectAttributeBit + cmp #$40 ; CPU:$EA4E PRG:2A4E C9 40 + bcc SetTransitionObjectAttributeBit ; CPU:$EA50 PRG:2A50 90 F2 - lda #$DF - and $0292,x - sta $0292,x + lda #$DF ; CPU:$EA52 PRG:2A52 A9 DF + and $0292,x ; CPU:$EA54 PRG:2A54 3D 92 02 + sta $0292,x ; CPU:$EA57 PRG:2A57 9D 92 02 ;------------------------------------------------------------------------------ @@ -12649,11 +12452,11 @@ UpdateTransitionObjectAttribute: ;------------------------------------------------------------------------------ CheckTransitionObjectWrap: - ldy #$00 + ldy #$00 ; CPU:$EA5A PRG:2A5A A0 00 - lda ($02),y - cmp #$FC - bcc CheckTransitionObjectLowBoundary + lda ($02),y ; CPU:$EA5C PRG:2A5C B1 02 + cmp #$FC ; CPU:$EA5E PRG:2A5E C9 FC + bcc CheckTransitionObjectLowBoundary ; CPU:$EA60 PRG:2A60 90 0E ;------------------------------------------------------------------------------ ; $EA62 @@ -12661,17 +12464,17 @@ CheckTransitionObjectWrap: ;------------------------------------------------------------------------------ ResetTransitionObjectPosition: - lda #$00 - sta ($02),y - sta ($00),y + lda #$00 ; CPU:$EA62 PRG:2A62 A9 00 + sta ($02),y ; CPU:$EA64 PRG:2A64 91 02 + sta ($00),y ; CPU:$EA66 PRG:2A66 91 00 - iny - sta ($00),y + iny ; CPU:$EA68 PRG:2A68 C8 + sta ($00),y ; CPU:$EA69 PRG:2A69 91 00 - iny - sta ($02),y + iny ; CPU:$EA6B PRG:2A6B C8 + sta ($02),y ; CPU:$EA6C PRG:2A6C 91 02 - bne AdvanceTransitionObjectPointers + bne AdvanceTransitionObjectPointers ; CPU:$EA6E PRG:2A6E D0 04 ;------------------------------------------------------------------------------ ; $EA70 @@ -12679,8 +12482,8 @@ ResetTransitionObjectPosition: ;------------------------------------------------------------------------------ CheckTransitionObjectLowBoundary: - cmp #$04 - bcc ResetTransitionObjectPosition + cmp #$04 ; CPU:$EA70 PRG:2A70 C9 04 + bcc ResetTransitionObjectPosition ; CPU:$EA72 PRG:2A72 90 EE ;------------------------------------------------------------------------------ ; $EA74 @@ -12688,30 +12491,30 @@ CheckTransitionObjectLowBoundary: ;------------------------------------------------------------------------------ AdvanceTransitionObjectPointers: - lda $00 - clc - adc #$04 - sta $00 + lda $00 ; CPU:$EA74 PRG:2A74 A5 00 + clc ; CPU:$EA76 PRG:2A76 18 + adc #$04 ; CPU:$EA77 PRG:2A77 69 04 + sta $00 ; CPU:$EA79 PRG:2A79 85 00 - lda $01 - adc #$00 - sta $01 + lda $01 ; CPU:$EA7B PRG:2A7B A5 01 + adc #$00 ; CPU:$EA7D PRG:2A7D 69 00 + sta $01 ; CPU:$EA7F PRG:2A7F 85 01 - lda $02 - clc - adc #$04 - sta $02 + lda $02 ; CPU:$EA81 PRG:2A81 A5 02 + clc ; CPU:$EA83 PRG:2A83 18 + adc #$04 ; CPU:$EA84 PRG:2A84 69 04 + sta $02 ; CPU:$EA86 PRG:2A86 85 02 - lda $03 - adc #$00 - sta $03 + lda $03 ; CPU:$EA88 PRG:2A88 A5 03 + adc #$00 ; CPU:$EA8A PRG:2A8A 69 00 + sta $03 ; CPU:$EA8C PRG:2A8C 85 03 - inx + inx ; CPU:$EA8E PRG:2A8E E8 - cpx #$05 - bne UpdateNextTransitionObject + cpx #$05 ; CPU:$EA8F PRG:2A8F E0 05 + bne UpdateNextTransitionObject ; CPU:$EA91 PRG:2A91 D0 98 - rts + rts ; CPU:$EA93 PRG:2A93 60 ;============================================================================== @@ -12722,24 +12525,24 @@ AdvanceTransitionObjectPointers: ;============================================================================== DispatchTransitionAnimation: - ldy $87 + ldy $87 ; CPU:$EA94 PRG:2A94 A4 87 - lda TransitionAnimationHandlerTable,y - sta $10 + lda TransitionAnimationHandlerTable,y ; CPU:$EA96 PRG:2A96 B9 A3 EA + sta $10 ; CPU:$EA99 PRG:2A99 85 10 - lda TransitionAnimationHandlerTable+1,y - sta $11 + lda TransitionAnimationHandlerTable+1,y ; CPU:$EA9B PRG:2A9B B9 A4 EA + sta $11 ; CPU:$EA9E PRG:2A9E 85 11 - jmp ($0010) + jmp ($0010) ; CPU:$EAA0 PRG:2AA0 6C 10 00 A9 EA ;============================================================================== ; $EAA3-$EAA8: Gameplay Animation State Table ;============================================================================== TransitionAnimationHandlerTable: - .word DispatchTransitionAnimationPhase - .word DispatchTransitionAnimationState2 - .word DispatchTransitionAnimationState4 + .word DispatchTransitionAnimationPhase ; CPU:$EAA3 PRG:2AA3 A9 EA + .word DispatchTransitionAnimationState2 ; CPU:$EAA5 PRG:2AA5 3D EB + .word DispatchTransitionAnimationState4 ; CPU:$EAA7 PRG:2AA7 6D EB ;============================================================================== ; $EAA9-$EAB7: Animation Substate Dispatcher @@ -12748,15 +12551,15 @@ TransitionAnimationHandlerTable: ;============================================================================== DispatchTransitionAnimationPhase: - ldy $88 + ldy $88 ; CPU:$EAA9 PRG:2AA9 A4 88 - lda TransitionAnimationPhaseTable,y - sta $10 + lda TransitionAnimationPhaseTable,y ; CPU:$EAAB PRG:2AAB B9 B8 EA + sta $10 ; CPU:$EAAE PRG:2AAE 85 10 - lda TransitionAnimationPhaseTable+1,y - sta $11 + lda TransitionAnimationPhaseTable+1,y ; CPU:$EAB0 PRG:2AB0 B9 B9 EA + sta $11 ; CPU:$EAB3 PRG:2AB3 85 11 - jmp ($0010) + jmp ($0010) ; CPU:$EAB5 PRG:2AB5 6C 10 00 C0 EA ;============================================================================== @@ -12764,10 +12567,10 @@ DispatchTransitionAnimationPhase: ;============================================================================== TransitionAnimationPhaseTable: - .word UpdateTransitionAnimationFrame - .word UpdateTransitionAnimationType1 - .word UpdateTransitionAnimationType2 - .word UpdateTransitionAnimationPattern + .word UpdateTransitionAnimationFrame ; CPU:$EAB8 PRG:2AB8 C0 EA + .word UpdateTransitionAnimationType1 ; CPU:$EABA PRG:2ABA D6 EA + .word UpdateTransitionAnimationType2 ; CPU:$EABC PRG:2ABC ED EA + .word UpdateTransitionAnimationPattern ; CPU:$EABE PRG:2ABE 04 EB ;============================================================================== @@ -12777,16 +12580,16 @@ TransitionAnimationPhaseTable: ;============================================================================== UpdateTransitionAnimationFrame: - inc $B7 + inc $B7 ; CPU:$EAC0 PRG:2AC0 E6 B7 - lda $B7 - and #$07 - tay + lda $B7 ; CPU:$EAC2 PRG:2AC2 A5 B7 + and #$07 ; CPU:$EAC4 PRG:2AC4 29 07 + tay ; CPU:$EAC6 PRG:2AC6 A8 - lda TransitionAnimationFrameTable,y - sta $028D + lda TransitionAnimationFrameTable,y ; CPU:$EAC7 PRG:2AC7 B9 CE EA + sta $028D ; CPU:$EACA PRG:2ACA 8D 8D 02 - rts + rts ; CPU:$EACD PRG:2ACD 60 ;============================================================================== @@ -12794,8 +12597,8 @@ UpdateTransitionAnimationFrame: ;============================================================================== TransitionAnimationFrameTable: - .byte $04,$04,$04,$05 - .byte $05,$04,$01,$01 + .byte $04,$04,$04,$05 ; CPU:$EACE PRG:2ACE 04 04 04 05 + .byte $05,$04,$01,$01 ; CPU:$EAD2 PRG:2AD2 05 04 01 01 ;============================================================================== @@ -12807,26 +12610,26 @@ TransitionAnimationFrameTable: ;============================================================================== UpdateTransitionAnimationType1: - lda $4B - and #$07 - bne UpdateTransitionAnimationFrame + lda $4B ; CPU:$EAD6 PRG:2AD6 A5 4B + and #$07 ; CPU:$EAD8 PRG:2AD8 29 07 + bne UpdateTransitionAnimationFrame ; CPU:$EADA PRG:2ADA D0 E4 - lda $4B - and #$08 - bne AnimationSubstate_EAE7 + lda $4B ; CPU:$EADC PRG:2ADC A5 4B + and #$08 ; CPU:$EADE PRG:2ADE 29 08 + bne AnimationSubstate_EAE7 ; CPU:$EAE0 PRG:2AE0 D0 04 - lda #$0C - bne AnimationSubstate_EAE9 + lda #$0C ; CPU:$EAE2 PRG:2AE2 A9 0C + bne AnimationSubstate_EAE9 ; CPU:$EAE4 PRG:2AE4 D0 02 AnimationSubstate_EAE7: - lda #$0D + lda #$0D ; CPU:$EAE6 PRG:2AE6 A9 0D AnimationSubstate_EAE9: - sta $028C + sta $028C ; CPU:$EAE8 PRG:2AE8 8D 8C 02 - bne UpdateTransitionAnimationFrame + bne UpdateTransitionAnimationFrame ; CPU:$EAEB PRG:2AEB D0 D3 ;============================================================================== @@ -12837,30 +12640,30 @@ AnimationSubstate_EAE9: ;============================================================================== UpdateTransitionAnimationType2: - lda $4B - and #$07 - beq AnimationSubstate_EAF5 + lda $4B ; CPU:$EAED PRG:2AED A5 4B + and #$07 ; CPU:$EAEF PRG:2AEF 29 07 + beq AnimationSubstate_EAF5 ; CPU:$EAF1 PRG:2AF1 F0 01 - rts + rts ; CPU:$EAF3 PRG:2AF3 60 AnimationSubstate_EAF5: - lda $4B - and #$08 - bne AnimationSubstate_EB00 + lda $4B ; CPU:$EAF4 PRG:2AF4 A5 4B + and #$08 ; CPU:$EAF6 PRG:2AF6 29 08 + bne AnimationSubstate_EB00 ; CPU:$EAF8 PRG:2AF8 D0 04 - lda #$1E - bne AnimationSubstate_EB02 + lda #$1E ; CPU:$EAFA PRG:2AFA A9 1E + bne AnimationSubstate_EB02 ; CPU:$EAFC PRG:2AFC D0 02 AnimationSubstate_EB00: - lda #$1F + lda #$1F ; CPU:$EAFE PRG:2AFE A9 1F AnimationSubstate_EB02: - sta $028C + sta $028C ; CPU:$EB00 PRG:2B00 8D 8C 02 - rts + rts ; CPU:$EB03 PRG:2B03 60 ;============================================================================== @@ -12874,28 +12677,28 @@ AnimationSubstate_EB02: ;============================================================================== UpdateTransitionAnimationPattern: - inc $B7 + inc $B7 ; CPU:$EB04 PRG:2B04 E6 B7 - lda $B7 - and #$07 - tay + lda $B7 ; CPU:$EB06 PRG:2B06 A5 B7 + and #$07 ; CPU:$EB08 PRG:2B08 29 07 + tay ; CPU:$EB0A PRG:2B0A A8 - lda TransitionAnimationPatternIndex,y - tay + lda TransitionAnimationPatternIndex,y ; CPU:$EB0B PRG:2B0B B9 29 EB + tay ; CPU:$EB0E PRG:2B0E A8 - lda TransitionAnimationPatternTiles,y - sta $028D + lda TransitionAnimationPatternTiles,y ; CPU:$EB0F PRG:2B0F B9 31 EB + sta $028D ; CPU:$EB12 PRG:2B12 8D 8D 02 - lda TransitionAnimationPatternTiles+1,y - sta $028E + lda TransitionAnimationPatternTiles+1,y ; CPU:$EB15 PRG:2B15 B9 32 EB + sta $028E ; CPU:$EB18 PRG:2B18 8D 8E 02 - lda TransitionAnimationPatternTiles+2,y - sta $028F + lda TransitionAnimationPatternTiles+2,y ; CPU:$EB1B PRG:2B1B B9 33 EB + sta $028F ; CPU:$EB1E PRG:2B1E 8D 8F 02 - lda TransitionAnimationPatternTiles+3,y - sta $0290 + lda TransitionAnimationPatternTiles+3,y ; CPU:$EB21 PRG:2B21 B9 34 EB + sta $0290 ; CPU:$EB24 PRG:2B24 8D 90 02 - bne UpdateTransitionAnimationType2 + bne UpdateTransitionAnimationType2 ; CPU:$EB27 PRG:2B27 D0 C4 ;============================================================================== @@ -12903,8 +12706,8 @@ UpdateTransitionAnimationPattern: ;============================================================================== TransitionAnimationPatternIndex: - .byte $00,$00,$00,$04 - .byte $04,$00,$08,$08 + .byte $00,$00,$00,$04 ; CPU:$EB29 PRG:2B29 00 00 00 04 + .byte $04,$00,$08,$08 ; CPU:$EB2D PRG:2B2D 04 00 08 08 ;============================================================================== @@ -12914,24 +12717,24 @@ TransitionAnimationPatternIndex: ; this initial range, so preserve the next code/data boundary carefully. ;============================================================================== TransitionAnimationPatternTiles: - .byte $3C,$3D,$3E,$3F - .byte $3C,$40,$3E,$41 - .byte $38,$39,$3A,$3B + .byte $3C,$3D,$3E,$3F ; CPU:$EB31 PRG:2B31 3C 3D 3E 3F + .byte $3C,$40,$3E,$41 ; CPU:$EB35 PRG:2B35 3C 40 3E 41 + .byte $38,$39,$3A,$3B ; CPU:$EB39 PRG:2B39 38 39 3A 3B ;============================================================================== ; $EB3D-$EB4B: Gameplay Animation State $02 Dispatcher ;============================================================================== DispatchTransitionAnimationState2: - ldy $88 + ldy $88 ; CPU:$EB3D PRG:2B3D A4 88 - lda TransitionAnimationState2Table,y - sta $10 + lda TransitionAnimationState2Table,y ; CPU:$EB3F PRG:2B3F B9 4C EB + sta $10 ; CPU:$EB42 PRG:2B42 85 10 - lda TransitionAnimationState2Table+1,y - sta $11 + lda TransitionAnimationState2Table+1,y ; CPU:$EB44 PRG:2B44 B9 4D EB + sta $11 ; CPU:$EB47 PRG:2B47 85 11 - jmp ($0010) + jmp ($0010) ; CPU:$EB49 PRG:2B49 6C 10 00 C0 EA ;============================================================================== @@ -12939,9 +12742,9 @@ DispatchTransitionAnimationState2: ;============================================================================== TransitionAnimationState2Table: - .word UpdateTransitionAnimationFrame - .word UpdateTransitionAnimationState2 - .word UpdateTransitionAnimationFrame + .word UpdateTransitionAnimationFrame ; CPU:$EB4C PRG:2B4C C0 EA + .word UpdateTransitionAnimationState2 ; CPU:$EB4E PRG:2B4E 52 EB + .word UpdateTransitionAnimationFrame ; CPU:$EB50 PRG:2B50 C0 EA ;============================================================================== @@ -12949,55 +12752,55 @@ TransitionAnimationState2Table: ;============================================================================== UpdateTransitionAnimationState2: - jsr UpdateTransitionAnimationType1 + jsr UpdateTransitionAnimationType1 ; CPU:$EB52 PRG:2B52 20 D6 EA - lda $0274 - cmp #$7D - bne AnimationState2_EB62 + lda $0274 ; CPU:$EB55 PRG:2B55 AD 74 02 + cmp #$7D ; CPU:$EB58 PRG:2B58 C9 7D + bne AnimationState2_EB62 ; CPU:$EB5A PRG:2B5A D0 06 - lda #$43 - sta $028E + lda #$43 ; CPU:$EB5C PRG:2B5C A9 43 + sta $028E ; CPU:$EB5E PRG:2B5E 8D 8E 02 - rts + rts ; CPU:$EB61 PRG:2B61 60 AnimationState2_EB62: - cmp #$7B - beq AnimationState2_EB68 + cmp #$7B ; CPU:$EB62 PRG:2B62 C9 7B + beq AnimationState2_EB68 ; CPU:$EB64 PRG:2B64 F0 01 - rts + rts ; CPU:$EB66 PRG:2B66 60 AnimationState2_EB68: - lda #$44 - sta $028E + lda #$44 ; CPU:$EB67 PRG:2B67 A9 44 + sta $028E ; CPU:$EB69 PRG:2B69 8D 8E 02 - rts + rts ; CPU:$EB6C PRG:2B6C 60 ;============================================================================== ; $EB6D-$EB7B: Gameplay Animation State $04 Dispatcher ;============================================================================== DispatchTransitionAnimationState4: - ldy $88 + ldy $88 ; CPU:$EB6D PRG:2B6D A4 88 - lda TransitionAnimationState4Table,y - sta $10 + lda TransitionAnimationState4Table,y ; CPU:$EB6F PRG:2B6F B9 7C EB + sta $10 ; CPU:$EB72 PRG:2B72 85 10 - lda TransitionAnimationState4Table+1,y - sta $11 + lda TransitionAnimationState4Table+1,y ; CPU:$EB74 PRG:2B74 B9 7D EB + sta $11 ; CPU:$EB77 PRG:2B77 85 11 - jmp ($0010) + jmp ($0010) ; CPU:$EB79 PRG:2B79 6C 10 00 C0 EA ;============================================================================== ; $EB7C-$EB83: Gameplay Animation State $04 Pointer Table ;============================================================================== TransitionAnimationState4Table: - .word UpdateTransitionAnimationFrame - .word UpdateTransitionAnimationState4Type1 - .word UpdateTransitionAnimationState4Type2 - .word UpdateTransitionAnimationState4Type2 + .word UpdateTransitionAnimationFrame ; CPU:$EB7C PRG:2B7C C0 EA + .word UpdateTransitionAnimationState4Type1 ; CPU:$EB7E PRG:2B7E 84 EB + .word UpdateTransitionAnimationState4Type2 ; CPU:$EB80 PRG:2B80 9F EB + .word UpdateTransitionAnimationState4Type2 ; CPU:$EB82 PRG:2B82 9F EB ;============================================================================== ; $EB84-$EB9E: Animation State $04 Handler 1 @@ -13006,27 +12809,27 @@ TransitionAnimationState4Table: ; frames tail-jump into the common $EAC0 animation updater. ;============================================================================== UpdateTransitionAnimationState4Type1: - lda $4B - and #$07 - beq AnimationState4_EB8E + lda $4B ; CPU:$EB84 PRG:2B84 A5 4B + and #$07 ; CPU:$EB86 PRG:2B86 29 07 + beq AnimationState4_EB8E ; CPU:$EB88 PRG:2B88 F0 03 - jmp UpdateTransitionAnimationFrame + jmp UpdateTransitionAnimationFrame ; CPU:$EB8A PRG:2B8A 4C C0 EA AnimationState4_EB8E: - lda $4B - and #$08 - bne AnimationState4_EB97 + lda $4B ; CPU:$EB8D PRG:2B8D A5 4B + and #$08 ; CPU:$EB8F PRG:2B8F 29 08 + bne AnimationState4_EB97 ; CPU:$EB91 PRG:2B91 D0 04 - lda #$48 - bne AnimationState4_EB99 + lda #$48 ; CPU:$EB93 PRG:2B93 A9 48 + bne AnimationState4_EB99 ; CPU:$EB95 PRG:2B95 D0 02 AnimationState4_EB97: - lda #$49 + lda #$49 ; CPU:$EB97 PRG:2B97 A9 49 AnimationState4_EB99: - sta $028C + sta $028C ; CPU:$EB99 PRG:2B99 8D 8C 02 - jmp UpdateTransitionAnimationFrame + jmp UpdateTransitionAnimationFrame ; CPU:$EB9C PRG:2B9C 4C C0 EA ;============================================================================== ; $EB9F-$EBB5: Animation State $04 Handler 2/3 @@ -13035,27 +12838,27 @@ AnimationState4_EB99: ;============================================================================== UpdateTransitionAnimationState4Type2: - lda $4B - and #$07 - beq AnimationState4_EBA6 + lda $4B ; CPU:$EB9F PRG:2B9F A5 4B + and #$07 ; CPU:$EBA1 PRG:2BA1 29 07 + beq AnimationState4_EBA6 ; CPU:$EBA3 PRG:2BA3 F0 01 - rts + rts ; CPU:$EBA5 PRG:2BA5 60 AnimationState4_EBA6: - lda $4B - and #$08 - bne AnimationState4_EBB0 + lda $4B ; CPU:$EBA6 PRG:2BA6 A5 4B + and #$08 ; CPU:$EBA8 PRG:2BA8 29 08 + bne AnimationState4_EBB0 ; CPU:$EBAA PRG:2BAA D0 04 - lda #$4A - bne AnimationState4_EBB2 + lda #$4A ; CPU:$EBAC PRG:2BAC A9 4A + bne AnimationState4_EBB2 ; CPU:$EBAE PRG:2BAE D0 02 AnimationState4_EBB0: - lda #$4B + lda #$4B ; CPU:$EBB0 PRG:2BB0 A9 4B AnimationState4_EBB2: - sta $028C + sta $028C ; CPU:$EBB2 PRG:2BB2 8D 8C 02 - rts + rts ; CPU:$EBB5 PRG:2BB5 60 ;============================================================================== ; $EBB6-$EC3F: Gameplay Lookup Data @@ -13067,40 +12870,40 @@ AnimationState4_EBB2: MazeGameplayData_EBB6: ; $EBB6-$EBC5 - .byte $00,$07,$00,$00,$00,$04,$01,$06 - .byte $01,$01,$01,$04,$01,$04,$02,$02 + .byte $00,$07,$00,$00,$00,$04,$01,$06 ; CPU:$EBB6 PRG:2BB6 00 07 00 00 00 04 01 06 + .byte $01,$01,$01,$04,$01,$04,$02,$02 ; CPU:$EBBE PRG:2BBE 01 01 01 04 01 04 02 02 ; $EBC6-$EBD5 - .byte $02,$03,$02,$03,$02,$02,$02,$03 - .byte $02,$02,$02,$02,$03,$03,$03,$05 + .byte $02,$03,$02,$03,$02,$02,$02,$03 ; CPU:$EBC6 PRG:2BC6 02 03 02 03 02 02 02 03 + .byte $02,$02,$02,$02,$03,$03,$03,$05 ; CPU:$EBCE PRG:2BCE 02 02 02 02 03 03 03 05 ; $EBD6-$EBE5 - .byte $03,$02,$03,$03,$03,$02,$03,$02 - .byte $04,$03,$03,$02,$03,$02,$04,$03 + .byte $03,$02,$03,$03,$03,$02,$03,$02 ; CPU:$EBD6 PRG:2BD6 03 02 03 03 03 02 03 02 + .byte $04,$03,$03,$02,$03,$02,$04,$03 ; CPU:$EBDE PRG:2BDE 04 03 03 02 03 02 04 03 ; $EBE6-$EBF5 - .byte $03,$01,$04,$02,$05,$03,$03,$05 - .byte $04,$02,$05,$03,$03,$02,$04,$02 + .byte $03,$01,$04,$02,$05,$03,$03,$05 ; CPU:$EBE6 PRG:2BE6 03 01 04 02 05 03 03 05 + .byte $04,$02,$05,$03,$03,$02,$04,$02 ; CPU:$EBEE PRG:2BEE 04 02 05 03 03 02 04 02 ; $EBF6-$EC05 - .byte $06,$03,$03,$01,$05,$02,$06,$03 - .byte $03,$01,$05,$02,$07,$03,$03,$03 + .byte $06,$03,$03,$01,$05,$02,$06,$03 ; CPU:$EBF6 PRG:2BF6 06 03 03 01 05 02 06 03 + .byte $03,$01,$05,$02,$07,$03,$03,$03 ; CPU:$EBFE PRG:2BFE 03 01 05 02 07 03 03 03 ; $EC06-$EC15 - .byte $05,$02,$07,$03,$03,$01,$06,$02 - .byte $07,$03,$03,$01,$06,$02,$07,$03 + .byte $05,$02,$07,$03,$03,$01,$06,$02 ; CPU:$EC06 PRG:2C06 05 02 07 03 03 01 06 02 + .byte $07,$03,$03,$01,$06,$02,$07,$03 ; CPU:$EC0E PRG:2C0E 07 03 03 01 06 02 07 03 ; $EC16-$EC25 - .byte $03,$00,$06,$02,$07,$03,$03,$01 - .byte $06,$02,$07,$03,$03,$00,$06,$02 + .byte $03,$00,$06,$02,$07,$03,$03,$01 ; CPU:$EC16 PRG:2C16 03 00 06 02 07 03 03 01 + .byte $06,$02,$07,$03,$03,$00,$06,$02 ; CPU:$EC1E PRG:2C1E 06 02 07 03 03 00 06 02 ; $EC26-$EC35 - .byte $07,$03,$03,$00,$06,$02,$07,$03 - .byte $03,$00,$06,$02,$07,$03,$04,$00 + .byte $07,$03,$03,$00,$06,$02,$07,$03 ; CPU:$EC26 PRG:2C26 07 03 03 00 06 02 07 03 + .byte $03,$00,$06,$02,$07,$03,$04,$00 ; CPU:$EC2E PRG:2C2E 03 00 06 02 07 03 04 00 ; $EC36-$EC3F - .byte $06,$02,$07,$03,$04,$00,$06,$02 - .byte $07,$03 + .byte $06,$02,$07,$03,$04,$00,$06,$02 ; CPU:$EC36 PRG:2C36 06 02 07 03 04 00 06 02 + .byte $07,$03 ; CPU:$EC3E PRG:2C3E 07 03 ;============================================================================== @@ -13114,32 +12917,32 @@ MazeGameplayData_EBB6: ;============================================================================== MazeGameplayData_EC40: ; $EC40-$EC4F - .byte $D0,$00,$C0,$00,$A0,$00,$B0,$00 - .byte $A0,$00,$80,$00,$A0,$00,$B0,$00 + .byte $D0,$00,$C0,$00,$A0,$00,$B0,$00 ; CPU:$EC40 PRG:2C40 D0 00 C0 00 A0 00 B0 00 + .byte $A0,$00,$80,$00,$A0,$00,$B0,$00 ; CPU:$EC48 PRG:2C48 A0 00 80 00 A0 00 B0 00 ; $EC50-$EC5F - .byte $90,$00,$50,$00,$50,$00,$D0,$00 - .byte $C0,$00,$A0,$00,$B0,$00,$A0,$00 + .byte $90,$00,$50,$00,$50,$00,$D0,$00 ; CPU:$EC50 PRG:2C50 90 00 50 00 50 00 D0 00 + .byte $C0,$00,$A0,$00,$B0,$00,$A0,$00 ; CPU:$EC58 PRG:2C58 C0 00 A0 00 B0 00 A0 00 ; $EC60-$EC6F - .byte $80,$00,$B0,$00,$C0,$00,$A0,$00 - .byte $50,$00,$50,$00,$F0,$00,$E0,$00 + .byte $80,$00,$B0,$00,$C0,$00,$A0,$00 ; CPU:$EC60 PRG:2C60 80 00 B0 00 C0 00 A0 00 + .byte $50,$00,$50,$00,$F0,$00,$E0,$00 ; CPU:$EC68 PRG:2C68 50 00 50 00 F0 00 E0 00 ; $EC70-$EC7F - .byte $C0,$00,$E0,$00,$D0,$00,$B0,$00 - .byte $E0,$00,$F0,$00,$D0,$00,$70,$00 + .byte $C0,$00,$E0,$00,$D0,$00,$B0,$00 ; CPU:$EC70 PRG:2C70 C0 00 E0 00 D0 00 B0 00 + .byte $E0,$00,$F0,$00,$D0,$00,$70,$00 ; CPU:$EC78 PRG:2C78 E0 00 F0 00 D0 00 70 00 ; $EC80-$EC8F - .byte $70,$00,$00,$01,$F0,$00,$D0,$00 - .byte $00,$01,$F0,$00,$D0,$00,$00,$01 + .byte $70,$00,$00,$01,$F0,$00,$D0,$00 ; CPU:$EC80 PRG:2C80 70 00 00 01 F0 00 D0 00 + .byte $00,$01,$F0,$00,$D0,$00,$00,$01 ; CPU:$EC88 PRG:2C88 00 01 F0 00 D0 00 00 01 ; $EC90-$EC9F - .byte $10,$01,$F0,$00,$80,$00,$80,$00 - .byte $00,$01,$F0,$00,$D0,$00,$00,$01 + .byte $10,$01,$F0,$00,$80,$00,$80,$00 ; CPU:$EC90 PRG:2C90 10 01 F0 00 80 00 80 00 + .byte $00,$01,$F0,$00,$D0,$00,$00,$01 ; CPU:$EC98 PRG:2C98 00 01 F0 00 D0 00 00 01 ; $ECA0-$ECAB - .byte $F0,$00,$D0,$00,$20,$01,$30,$01 - .byte $10,$01,$80,$00 + .byte $F0,$00,$D0,$00,$20,$01,$30,$01 ; CPU:$ECA0 PRG:2CA0 F0 00 D0 00 20 01 30 01 + .byte $10,$01,$80,$00 ; CPU:$ECA8 PRG:2CA8 10 01 80 00 @@ -13153,27 +12956,27 @@ MazeGameplayData_EC40: MazeGameplayData_ECAC: ; $ECAC-$ECBB - .byte $80,$00,$07,$14,$07,$14,$05,$14 - .byte $05,$FF,$07,$14,$07,$14,$05,$FF + .byte $80,$00,$07,$14,$07,$14,$05,$14 ; CPU:$ECAC PRG:2CAC 80 00 07 14 07 14 05 14 + .byte $05,$FF,$07,$14,$07,$14,$05,$FF ; CPU:$ECB4 PRG:2CB4 05 FF 07 14 07 14 05 FF ; $ECBC-$ECCB - .byte $00,$00,$05,$14,$05,$14,$05,$FF - .byte $00,$00,$05,$14,$05,$14,$05,$FF + .byte $00,$00,$05,$14,$05,$14,$05,$FF ; CPU:$ECBC PRG:2CBC 00 00 05 14 05 14 05 FF + .byte $00,$00,$05,$14,$05,$14,$05,$FF ; CPU:$ECC4 PRG:2CC4 00 00 05 14 05 14 05 FF ; $ECCC-$ECDB - .byte $00,$00,$14,$0A,$1E,$0F,$28,$14 - .byte $32,$19,$3C,$1E,$50,$28,$64,$32 + .byte $00,$00,$14,$0A,$1E,$0F,$28,$14 ; CPU:$ECCC PRG:2CCC 00 00 14 0A 1E 0F 28 14 + .byte $32,$19,$3C,$1E,$50,$28,$64,$32 ; CPU:$ECD4 PRG:2CD4 32 19 3C 1E 50 28 64 32 ; $ECDC-$ECEB - .byte $02,$1E,$5A,$00,$03,$32,$00,$00 - .byte $04,$00,$00,$00,$01,$07,$11,$20 + .byte $02,$1E,$5A,$00,$03,$32,$00,$00 ; CPU:$ECDC PRG:2CDC 02 1E 5A 00 03 32 00 00 + .byte $04,$00,$00,$00,$01,$07,$11,$20 ; CPU:$ECE4 PRG:2CE4 04 00 00 00 01 07 11 20 ; $ECEC-$ECFB - .byte $2D,$1F,$D0,$D0,$10,$13,$D0,$D0 - .byte $10,$1D,$2D,$11,$C3,$C3,$03,$11 + .byte $2D,$1F,$D0,$D0,$10,$13,$D0,$D0 ; CPU:$ECEC PRG:2CEC 2D 1F D0 D0 10 13 D0 D0 + .byte $10,$1D,$2D,$11,$C3,$C3,$03,$11 ; CPU:$ECF4 PRG:2CF4 10 1D 2D 11 C3 C3 03 11 ; $ECFC-$ECFF - .byte $C3,$C3,$03,$11 + .byte $C3,$C3,$03,$11 ; CPU:$ECFC PRG:2CFC C3 C3 03 11 ;============================================================================== ; $ED00-$EDFF: Gameplay Lookup / Pattern Data @@ -13186,68 +12989,68 @@ MazeGameplayData_ECAC: MazeLayoutData_ED00: ; $ED00-$ED0F - .byte $2D,$11,$03,$1F,$10,$1D,$03,$1F - .byte $10,$1D,$03,$11,$03,$1F,$10,$1D + .byte $2D,$11,$03,$1F,$10,$1D,$03,$1F ; CPU:$ED00 PRG:2D00 2D 11 03 1F 10 1D 03 1F + .byte $10,$1D,$03,$11,$03,$1F,$10,$1D ; CPU:$ED08 PRG:2D08 10 1D 03 11 03 1F 10 1D ; $ED10-$ED1F - .byte $03,$1F,$10,$1D,$03,$11,$2D,$11 - .byte $01,$11,$20,$11,$03,$11,$20,$11 + .byte $03,$1F,$10,$1D,$03,$11,$2D,$11 ; CPU:$ED10 PRG:2D10 03 1F 10 1D 03 11 2D 11 + .byte $01,$11,$20,$11,$03,$11,$20,$11 ; CPU:$ED18 PRG:2D18 01 11 20 11 03 11 20 11 ; $ED20-$ED2F - .byte $03,$11,$03,$11,$20,$11,$03,$11 - .byte $20,$11,$01,$11,$2D,$11,$03,$1E + .byte $03,$11,$03,$11,$20,$11,$03,$11 ; CPU:$ED20 PRG:2D20 03 11 03 11 20 11 03 11 + .byte $20,$11,$01,$11,$2D,$11,$03,$1E ; CPU:$ED28 PRG:2D28 20 11 01 11 2D 11 03 1E ; $ED30-$ED3F - .byte $10,$1C,$03,$1E,$10,$1C,$03,$1A - .byte $03,$1E,$10,$1C,$03,$1E,$10,$1C + .byte $10,$1C,$03,$1E,$10,$1C,$03,$1A ; CPU:$ED30 PRG:2D30 10 1C 03 1E 10 1C 03 1A + .byte $03,$1E,$10,$1C,$03,$1E,$10,$1C ; CPU:$ED38 PRG:2D38 03 1E 10 1C 03 1E 10 1C ; $ED40-$ED4F - .byte $03,$11,$2D,$11,$C3,$C3,$C3,$C3 - .byte $83,$11,$2D,$11,$03,$1F,$10,$1D + .byte $03,$11,$2D,$11,$C3,$C3,$C3,$C3 ; CPU:$ED40 PRG:2D40 03 11 2D 11 C3 C3 C3 C3 + .byte $83,$11,$2D,$11,$03,$1F,$10,$1D ; CPU:$ED48 PRG:2D48 83 11 2D 11 03 1F 10 1D ; $ED50-$ED5F - .byte $03,$1B,$03,$1F,$10,$10,$10,$1D - .byte $03,$1B,$03,$1F,$10,$1D,$03,$11 + .byte $03,$1B,$03,$1F,$10,$10,$10,$1D ; CPU:$ED50 PRG:2D50 03 1B 03 1F 10 10 10 1D + .byte $03,$1B,$03,$1F,$10,$1D,$03,$11 ; CPU:$ED58 PRG:2D58 03 1B 03 1F 10 1D 03 11 ; $ED60-$ED6F - .byte $2D,$11,$03,$1E,$10,$1C,$03,$11 - .byte $03,$1E,$10,$13,$10,$1C,$03,$11 + .byte $2D,$11,$03,$1E,$10,$1C,$03,$11 ; CPU:$ED60 PRG:2D60 2D 11 03 1E 10 1C 03 11 + .byte $03,$1E,$10,$13,$10,$1C,$03,$11 ; CPU:$ED68 PRG:2D68 03 1E 10 13 10 1C 03 11 ; $ED70-$ED7F - .byte $03,$1E,$10,$1C,$03,$11,$2D,$11 - .byte $C3,$03,$11,$83,$11,$83,$11,$C3 + .byte $03,$1E,$10,$1C,$03,$11,$2D,$11 ; CPU:$ED70 PRG:2D70 03 1E 10 1C 03 11 2D 11 + .byte $C3,$03,$11,$83,$11,$83,$11,$C3 ; CPU:$ED78 PRG:2D78 C3 03 11 83 11 83 11 C3 ; $ED80-$ED8F - .byte $03,$11,$2D,$1E,$90,$1D,$03,$15 - .byte $10,$18,$08,$1A,$08,$19,$10,$14 + .byte $03,$11,$2D,$1E,$90,$1D,$03,$15 ; CPU:$ED80 PRG:2D80 03 11 2D 1E 90 1D 03 15 + .byte $10,$18,$08,$1A,$08,$19,$10,$14 ; CPU:$ED88 PRG:2D88 10 18 08 1A 08 19 10 14 ; $ED90-$ED9F - .byte $03,$1F,$90,$1C,$2D,$E0,$11,$03 - .byte $11,$C0,$80,$11,$03,$11,$E0,$2D + .byte $03,$1F,$90,$1C,$2D,$E0,$11,$03 ; CPU:$ED90 PRG:2D90 03 1F 90 1C 2D E0 11 03 + .byte $11,$C0,$80,$11,$03,$11,$E0,$2D ; CPU:$ED98 PRG:2D98 11 C0 80 11 03 11 E0 2D ; $EDA0-$EDAF - .byte $E0,$11,$03,$11,$00,$1F,$17,$2C - .byte $16,$1D,$00,$11,$03,$11,$E0,$2D + .byte $E0,$11,$03,$11,$00,$1F,$17,$2C ; CPU:$EDA0 PRG:2DA0 E0 11 03 11 00 1F 17 2C + .byte $16,$1D,$00,$11,$03,$11,$E0,$2D ; CPU:$EDA8 PRG:2DA8 16 1D 00 11 03 11 E0 2D ; $EDB0-$EDBF - .byte $22,$90,$1C,$03,$1A,$00,$11,$80 - .byte $11,$00,$1A,$03,$1E,$90,$21,$04 + .byte $22,$90,$1C,$03,$1A,$00,$11,$80 ; CPU:$EDB0 PRG:2DB0 22 90 1C 03 1A 00 11 80 + .byte $11,$00,$1A,$03,$1E,$90,$21,$04 ; CPU:$EDB8 PRG:2DB8 11 00 1A 03 1E 90 21 04 ; $EDC0-$EDCF - .byte $06,$C0,$03,$40,$11,$80,$11,$40 - .byte $03,$C0,$05,$2D,$22,$90,$1D,$03 + .byte $06,$C0,$03,$40,$11,$80,$11,$40 ; CPU:$EDC0 PRG:2DC0 06 C0 03 40 11 80 11 40 + .byte $03,$C0,$05,$2D,$22,$90,$1D,$03 ; CPU:$EDC8 PRG:2DC8 03 C0 05 2D 22 90 1D 03 ; $EDD0-$EDDF - .byte $1B,$00,$1E,$90,$1C,$00,$1B,$03 - .byte $1F,$90,$21,$2D,$E0,$11,$03,$11 + .byte $1B,$00,$1E,$90,$1C,$00,$1B,$03 ; CPU:$EDD0 PRG:2DD0 1B 00 1E 90 1C 00 1B 03 + .byte $1F,$90,$21,$2D,$E0,$11,$03,$11 ; CPU:$EDD8 PRG:2DD8 1F 90 21 2D E0 11 03 11 ; $EDE0-$EDEF - .byte $C0,$80,$11,$03,$11,$E0,$2D,$E0 - .byte $11,$03,$11,$00,$1F,$90,$1D,$00 + .byte $C0,$80,$11,$03,$11,$E0,$2D,$E0 ; CPU:$EDE0 PRG:2DE0 C0 80 11 03 11 E0 2D E0 + .byte $11,$03,$11,$00,$1F,$90,$1D,$00 ; CPU:$EDE8 PRG:2DE8 11 03 11 00 1F 90 1D 00 ; $EDF0-$EDFF - .byte $11,$03,$11,$E0,$2D,$1F,$90,$1C - .byte $03,$1A,$00,$1E,$10,$13,$10,$1C + .byte $11,$03,$11,$E0,$2D,$1F,$90,$1C ; CPU:$EDF0 PRG:2DF0 11 03 11 E0 2D 1F 90 1C + .byte $03,$1A,$00,$1E,$10,$13,$10,$1C ; CPU:$EDF8 PRG:2DF8 03 1A 00 1E 10 13 10 1C ;============================================================================== ; $EE00-$EE8B: Gameplay Lookup / Pattern Data @@ -13258,40 +13061,40 @@ MazeLayoutData_ED00: MazeLayoutData_EE00: ; $EE00-$EE0F - .byte $00,$1A,$03,$1E,$90,$1D,$2D,$11 - .byte $C3,$C3,$03,$11,$C3,$C3,$03,$11 + .byte $00,$1A,$03,$1E,$90,$1D,$2D,$11 ; CPU:$EE00 PRG:2E00 00 1A 03 1E 90 1D 2D 11 + .byte $C3,$C3,$03,$11,$C3,$C3,$03,$11 ; CPU:$EE08 PRG:2E08 C3 C3 03 11 C3 C3 03 11 ; $EE10-$EE1F - .byte $2D,$11,$03,$19,$10,$1D,$03,$19 - .byte $10,$18,$09,$1A,$09,$19,$10,$18 + .byte $2D,$11,$03,$19,$10,$1D,$03,$19 ; CPU:$EE10 PRG:2E10 2D 11 03 19 10 1D 03 19 + .byte $10,$18,$09,$1A,$09,$19,$10,$18 ; CPU:$EE18 PRG:2E18 10 18 09 1A 09 19 10 18 ; $EE20-$EE2F - .byte $03,$1F,$10,$18,$03,$11,$2D,$11 - .byte $01,$43,$11,$C3,$03,$00,$C3,$03 + .byte $03,$1F,$10,$18,$03,$11,$2D,$11 ; CPU:$EE20 PRG:2E20 03 1F 10 18 03 11 2D 11 + .byte $01,$43,$11,$C3,$03,$00,$C3,$03 ; CPU:$EE28 PRG:2E28 01 43 11 C3 03 00 C3 03 ; $EE30-$EE3F - .byte $11,$43,$01,$11,$2D,$15,$10,$1D - .byte $03,$11,$03,$1B,$03,$1F,$90,$1D + .byte $11,$43,$01,$11,$2D,$15,$10,$1D ; CPU:$EE30 PRG:2E30 11 43 01 11 2D 15 10 1D + .byte $03,$11,$03,$1B,$03,$1F,$90,$1D ; CPU:$EE38 PRG:2E38 03 11 03 1B 03 1F 90 1D ; $EE40-$EE4F - .byte $03,$1B,$03,$11,$03,$1F,$10,$14 - .byte $2D,$15,$10,$1C,$03,$1A,$03,$11 + .byte $03,$1B,$03,$11,$03,$1F,$10,$14 ; CPU:$EE40 PRG:2E40 03 1B 03 11 03 1F 10 14 + .byte $2D,$15,$10,$1C,$03,$1A,$03,$11 ; CPU:$EE48 PRG:2E48 2D 15 10 1C 03 1A 03 11 ; $EE50-$EE5F - .byte $03,$1E,$10,$13,$10,$1C,$03,$11 - .byte $03,$1A,$03,$1E,$10,$14,$2D,$11 + .byte $03,$1E,$10,$13,$10,$1C,$03,$11 ; CPU:$EE50 PRG:2E50 03 1E 10 13 10 1C 03 11 + .byte $03,$1A,$03,$1E,$10,$14,$2D,$11 ; CPU:$EE58 PRG:2E58 03 1A 03 1E 10 14 2D 11 ; $EE60-$EE6F - .byte $C3,$03,$11,$83,$11,$83,$11,$C3 - .byte $03,$11,$2D,$11,$03,$19,$90,$12 + .byte $C3,$03,$11,$83,$11,$83,$11,$C3 ; CPU:$EE60 PRG:2E60 C3 03 11 83 11 83 11 C3 + .byte $03,$11,$2D,$11,$03,$19,$90,$12 ; CPU:$EE68 PRG:2E68 03 11 2D 11 03 19 90 12 ; $EE70-$EE7F - .byte $10,$18,$03,$1A,$03,$19,$10,$12 - .byte $90,$18,$03,$11,$2D,$11,$C3,$C3 + .byte $10,$18,$03,$1A,$03,$19,$10,$12 ; CPU:$EE70 PRG:2E70 10 18 03 1A 03 19 10 12 + .byte $90,$18,$03,$11,$2D,$11,$C3,$C3 ; CPU:$EE78 PRG:2E78 90 18 03 11 2D 11 C3 C3 ; $EE80-$EE8B - .byte $C3,$C3,$83,$11,$2D,$1E,$D0,$D0 - .byte $D0,$D0,$90,$1C + .byte $C3,$C3,$83,$11,$2D,$1E,$D0,$D0 ; CPU:$EE80 PRG:2E80 C3 C3 83 11 2D 1E D0 D0 + .byte $D0,$D0,$90,$1C ; CPU:$EE88 PRG:2E88 D0 D0 90 1C ;============================================================================== @@ -13302,36 +13105,36 @@ MazeLayoutData_EE00: ;============================================================================== InitializeAudioEngine: - lda #$00 - sta audioRequestPtr + lda #$00 ; CPU:$EE8C PRG:2E8C A9 00 + sta audioRequestPtr ; CPU:$EE8E PRG:2E8E 85 F0 - lda #$06 - sta audioRequestPtr+1 + lda #$06 ; CPU:$EE90 PRG:2E90 A9 06 + sta audioRequestPtr+1 ; CPU:$EE92 PRG:2E92 85 F1 A9 - lda #$20 - sta audioChannelTablePtr + lda #$20 ; CPU:$EE95 PRG:2E95 20 85 + sta audioChannelTablePtr ; CPU:$EE97 PRG:2E97 F2 A9 - lda #$06 - sta audioChannelTablePtr+1 + lda #$06 ; CPU:$EE99 PRG:2E99 06 85 + sta audioChannelTablePtr+1 ; CPU:$EE9B PRG:2E9B F3 AD 00 - lda $F100 - sta audioSequenceTablePtr + lda $F100 ; CPU:$EE9E PRG:2E9E F1 85 F4 + sta audioSequenceTablePtr ; CPU:$EEA1 PRG:2EA1 AD 01 - lda $F101 - sta audioSequenceTablePtr+1 + lda $F101 ; CPU:$EEA3 PRG:2EA3 F1 85 F5 + sta audioSequenceTablePtr+1 ; CPU:$EEA6 PRG:2EA6 A9 40 85 - lda #$40 - sta audioWorkValue + lda #$40 ; CPU:$EEA9 PRG:2EA9 F7 A9 + sta audioWorkValue ; CPU:$EEAB PRG:2EAB 1F 8D - lda #$1F - sta APUSTATUS + lda #$1F ; CPU:$EEAD PRG:2EAD 15 40 + sta APUSTATUS ; CPU:$EEAF PRG:2EAF A9 C0 8D - lda #$C0 - sta APUFRAMECNT + lda #$C0 ; CPU:$EEB2 PRG:2EB2 17 40 + sta APUFRAMECNT ; CPU:$EEB4 PRG:2EB4 A0 00 A9 - ldy #$00 + ldy #$00 ; CPU:$EEB7 PRG:2EB7 00 91 - lda #$00 + lda #$00 ; CPU:$EEB9 PRG:2EB9 F0 C8 ;------------------------------------------------------------------------------ @@ -13340,14 +13143,14 @@ InitializeAudioEngine: ;------------------------------------------------------------------------------ RuntimeInit_Clear0600: - sta (audioRequestPtr),y + sta (audioRequestPtr),y ; CPU:$EEB8 PRG:2EB8 91 F0 - iny - cpy #$10 - bne RuntimeInit_Clear0600 + iny ; CPU:$EEBA PRG:2EBA C8 + cpy #$10 ; CPU:$EEBB PRG:2EBB C0 10 + bne RuntimeInit_Clear0600 ; CPU:$EEBD PRG:2EBD D0 F9 - ldy #$00 - ldx #$10 + ldy #$00 ; CPU:$EEBF PRG:2EBF A0 00 + ldx #$10 ; CPU:$EEC1 PRG:2EC1 A2 10 ;------------------------------------------------------------------------------ @@ -13357,18 +13160,18 @@ RuntimeInit_Clear0600: ; LDA #$00 is intentionally executed on every iteration. ;------------------------------------------------------------------------------ RuntimeInit_Clear0620Stride: -lda #$00 -sta (audioChannelTablePtr),y +lda #$00 ; CPU:$EEC3 PRG:2EC3 A9 00 +sta (audioChannelTablePtr),y ; CPU:$EEC5 PRG:2EC5 91 F2 -tya -clc -adc #$08 -tay +tya ; CPU:$EEC7 PRG:2EC7 98 +clc ; CPU:$EEC8 PRG:2EC8 18 +adc #$08 ; CPU:$EEC9 PRG:2EC9 69 08 +tay ; CPU:$EECB PRG:2ECB A8 -dex -bne RuntimeInit_Clear0620Stride +dex ; CPU:$EECC PRG:2ECC CA +bne RuntimeInit_Clear0620Stride ; CPU:$EECD PRG:2ECD D0 F4 -rts +rts ; CPU:$EECF PRG:2ECF 60 ;============================================================================== @@ -13382,16 +13185,16 @@ rts ;============================================================================== InitializeAudioChannels: - lda #$00 - sta audioChannelFlags - sta $F9 - sta $FA - sta $FB - sta audioChannelOffset - sta $FF + lda #$00 ; CPU:$EED0 PRG:2ED0 A9 00 + sta audioChannelFlags ; CPU:$EED2 PRG:2ED2 85 F8 + sta $F9 ; CPU:$EED4 PRG:2ED4 85 F9 + sta $FA ; CPU:$EED6 PRG:2ED6 85 FA + sta $FB ; CPU:$EED8 PRG:2ED8 85 FB + sta audioChannelOffset ; CPU:$EEDA PRG:2EDA 85 FD + sta $FF ; CPU:$EEDC PRG:2EDC 85 FF - lda #$F8 - sta audioIndirectPtr + lda #$F8 ; CPU:$EEDE PRG:2EDE A9 F8 + sta audioIndirectPtr ; CPU:$EEE0 PRG:2EE0 85 FE ;------------------------------------------------------------------------------ @@ -13400,22 +13203,22 @@ InitializeAudioChannels: ;------------------------------------------------------------------------------ ScanAudioChannelSlot: - ldy $FD + ldy $FD ; CPU:$EEE2 PRG:2EE2 A4 FD - lda (audioChannelTablePtr),y - beq AdvanceAudioChannelSlot + lda (audioChannelTablePtr),y ; CPU:$EEE4 PRG:2EE4 B1 F2 + beq AdvanceAudioChannelSlot ; CPU:$EEE6 PRG:2EE6 F0 3A - cmp #$05 - bcc ActivateAudioChannelSlot + cmp #$05 ; CPU:$EEE8 PRG:2EE8 C9 05 + bcc ActivateAudioChannelSlot ; CPU:$EEEA PRG:2EEA 90 0B - sec - sbc #$05 - tay + sec ; CPU:$EEEC PRG:2EEC 38 + sbc #$05 ; CPU:$EEED PRG:2EED E9 05 + tay ; CPU:$EEEF PRG:2EEF A8 - lda #$01 - sta ($FE),y + lda #$01 ; CPU:$EEF0 PRG:2EF0 A9 01 + sta ($FE),y ; CPU:$EEF2 PRG:2EF2 91 FE - jmp AdvanceAudioChannelSlot + jmp AdvanceAudioChannelSlot ; CPU:$EEF4 PRG:2EF4 4C 22 EF ;------------------------------------------------------------------------------ @@ -13424,30 +13227,30 @@ ScanAudioChannelSlot: ;------------------------------------------------------------------------------ ActivateAudioChannelSlot: - sec - sbc #$01 - tay + sec ; CPU:$EEF7 PRG:2EF7 38 + sbc #$01 ; CPU:$EEF8 PRG:2EF8 E9 01 + tay ; CPU:$EEFA PRG:2EFA A8 - lda ($FE),y - bne AdvanceAudioChannelSlot + lda ($FE),y ; CPU:$EEFB PRG:2EFB B1 FE + bne AdvanceAudioChannelSlot ; CPU:$EEFD PRG:2EFD D0 23 - lda #$01 - sta ($FE),y + lda #$01 ; CPU:$EEFF PRG:2EFF A9 01 + sta ($FE),y ; CPU:$EF01 PRG:2F01 91 FE - tya - tax + tya ; CPU:$EF03 PRG:2F03 98 + tax ; CPU:$EF04 PRG:2F04 AA - adc #$04 + adc #$04 ; CPU:$EF05 PRG:2F05 69 04 - ldy $FD - sta ($F2),y + ldy $FD ; CPU:$EF07 PRG:2F07 A4 FD + sta ($F2),y ; CPU:$EF09 PRG:2F09 91 F2 - txa - asl - asl - sta $F6 + txa ; CPU:$EF0B PRG:2F0B 8A + asl ; CPU:$EF0C PRG:2F0C 0A + asl ; CPU:$EF0D PRG:2F0D 0A + sta $F6 ; CPU:$EF0E PRG:2F0E 85 F6 - ldx #$00 + ldx #$00 ; CPU:$EF10 PRG:2F10 A2 00 ;------------------------------------------------------------------------------ ; $EF12 @@ -13455,7 +13258,7 @@ ActivateAudioChannelSlot: ;------------------------------------------------------------------------------ BeginAudioChannelParameterCopy: - lda #$04 + lda #$04 ; CPU:$EF12 PRG:2F12 A9 04 ;------------------------------------------------------------------------------ ; $EF14 @@ -13466,20 +13269,20 @@ BeginAudioChannelParameterCopy: ;------------------------------------------------------------------------------ CopyAudioChannelParameter: - pha + pha ; CPU:$EF14 PRG:2F14 48 - iny + iny ; CPU:$EF15 PRG:2F15 C8 - lda ($F2),y - sta ($F6,x) + lda ($F2),y ; CPU:$EF16 PRG:2F16 B1 F2 + sta ($F6,x) ; CPU:$EF18 PRG:2F18 81 F6 E6 F6 68 - inc $F6 + inc $F6 ; CPU:$EF1D PRG:2F1D 38 E9 - pla + pla ; CPU:$EF1F PRG:2F1F 01 - sec - sbc #$01 - bne CopyAudioChannelParameter + sec ; CPU:$EF20 PRG:2F20 D0 + sbc #$01 ; CPU:$EF21 PRG:2F21 F2 A5 + bne CopyAudioChannelParameter ; CPU:$EF23 PRG:2F23 FD 18 ;------------------------------------------------------------------------------ @@ -13488,13 +13291,13 @@ CopyAudioChannelParameter: ;------------------------------------------------------------------------------ AdvanceAudioChannelSlot: - lda $FD - clc - adc #$08 - sta $FD + lda $FD ; CPU:$EF22 PRG:2F22 A5 FD + clc ; CPU:$EF24 PRG:2F24 18 + adc #$08 ; CPU:$EF25 PRG:2F25 69 08 + sta $FD ; CPU:$EF27 PRG:2F27 85 FD - cmp #$80 - bcc ScanAudioChannelSlot + cmp #$80 ; CPU:$EF29 PRG:2F29 C9 80 + bcc ScanAudioChannelSlot ; CPU:$EF2B PRG:2F2B 90 B5 ; Fall through to $EF2D. @@ -13513,9 +13316,9 @@ AdvanceAudioChannelSlot: ;============================================================================== UpdateAudioChannels: - ldy #$00 - sty $FC - sty $FD + ldy #$00 ; CPU:$EF2D PRG:2F2D A0 00 + sty $FC ; CPU:$EF2F PRG:2F2F 84 FC + sty $FD ; CPU:$EF31 PRG:2F31 84 FD ;------------------------------------------------------------------------------ @@ -13524,12 +13327,12 @@ UpdateAudioChannels: ;------------------------------------------------------------------------------ UpdateNextAudioSequence: - ldy $FC + ldy $FC ; CPU:$EF33 PRG:2F33 A4 FC - lda ($F0),y - bne CheckAudioChannelActive + lda ($F0),y ; CPU:$EF35 PRG:2F35 B1 F0 + bne CheckAudioChannelActive ; CPU:$EF37 PRG:2F37 D0 03 - jmp AdvanceAudioSequence + jmp AdvanceAudioSequence ; CPU:$EF39 PRG:2F39 4C F8 EF ;------------------------------------------------------------------------------ @@ -13538,79 +13341,79 @@ UpdateNextAudioSequence: ;------------------------------------------------------------------------------ CheckAudioChannelActive: - ldy $FD + ldy $FD ; CPU:$EF3C PRG:2F3C A4 FD - lda ($F2),y - bne TickAudioChannelDelay + lda ($F2),y ; CPU:$EF3E PRG:2F3E B1 F2 + bne TickAudioChannelDelay ; CPU:$EF40 PRG:2F40 D0 51 - lda $FC - asl - tay + lda $FC ; CPU:$EF42 PRG:2F42 A5 FC + asl ; CPU:$EF44 PRG:2F44 0A + tay ; CPU:$EF45 PRG:2F45 A8 - lda ($F4),y - pha + lda ($F4),y ; CPU:$EF46 PRG:2F46 B1 F4 + pha ; CPU:$EF48 PRG:2F48 48 - lda $FD - adc #$05 - tay + lda $FD ; CPU:$EF49 PRG:2F49 A5 FD + adc #$05 ; CPU:$EF4B PRG:2F4B 69 05 + tay ; CPU:$EF4D PRG:2F4D A8 - pla - sta ($F2),y + pla ; CPU:$EF4E PRG:2F4E 68 + sta ($F2),y ; CPU:$EF4F PRG:2F4F 91 F2 - lda $FC - asl - adc #$01 - tay + lda $FC ; CPU:$EF51 PRG:2F51 A5 FC + asl ; CPU:$EF53 PRG:2F53 0A + adc #$01 ; CPU:$EF54 PRG:2F54 69 01 + tay ; CPU:$EF56 PRG:2F56 A8 - lda ($F4),y - pha + lda ($F4),y ; CPU:$EF57 PRG:2F57 B1 F4 + pha ; CPU:$EF59 PRG:2F59 48 - lda $FD - adc #$06 - tay + lda $FD ; CPU:$EF5A PRG:2F5A A5 FD + adc #$06 ; CPU:$EF5C PRG:2F5C 69 06 + tay ; CPU:$EF5E PRG:2F5E A8 - pla - sta ($F2),y + pla ; CPU:$EF5F PRG:2F5F 68 + sta ($F2),y ; CPU:$EF60 PRG:2F60 91 F2 - jsr $F0C3 + jsr $F0C3 ; CPU:$EF62 PRG:2F62 20 C3 F0 - ldy $FD - sta ($F2),y + ldy $FD ; CPU:$EF65 PRG:2F65 A4 FD + sta ($F2),y ; CPU:$EF67 PRG:2F67 91 F2 - jsr $F0C3 - tax + jsr $F0C3 ; CPU:$EF69 PRG:2F69 20 C3 F0 + tax ; CPU:$EF6C PRG:2F6C AA - lda $FD - clc - adc #$01 - tay + lda $FD ; CPU:$EF6D PRG:2F6D A5 FD + clc ; CPU:$EF6F PRG:2F6F 18 + adc #$01 ; CPU:$EF70 PRG:2F70 69 01 + tay ; CPU:$EF72 PRG:2F72 A8 - txa - sta ($F2),y + txa ; CPU:$EF73 PRG:2F73 8A + sta ($F2),y ; CPU:$EF74 PRG:2F74 91 F2 - jsr $F0C3 - tax + jsr $F0C3 ; CPU:$EF76 PRG:2F76 20 C3 F0 + tax ; CPU:$EF79 PRG:2F79 AA - lda $FD - clc - adc #$02 - tay + lda $FD ; CPU:$EF7A PRG:2F7A A5 FD + clc ; CPU:$EF7C PRG:2F7C 18 + adc #$02 ; CPU:$EF7D PRG:2F7D 69 02 + tay ; CPU:$EF7F PRG:2F7F A8 - txa - sta ($F2),y + txa ; CPU:$EF80 PRG:2F80 8A + sta ($F2),y ; CPU:$EF81 PRG:2F81 91 F2 - jsr $F0C3 - tax + jsr $F0C3 ; CPU:$EF83 PRG:2F83 20 C3 F0 + tax ; CPU:$EF86 PRG:2F86 AA - lda $FD - clc - adc #$04 - tay + lda $FD ; CPU:$EF87 PRG:2F87 A5 FD + clc ; CPU:$EF89 PRG:2F89 18 + adc #$04 ; CPU:$EF8A PRG:2F8A 69 04 + tay ; CPU:$EF8C PRG:2F8C A8 - txa - sta ($F2),y + txa ; CPU:$EF8D PRG:2F8D 8A + sta ($F2),y ; CPU:$EF8E PRG:2F8E 91 F2 - jmp DecodeAudioCommand + jmp DecodeAudioCommand ; CPU:$EF90 PRG:2F90 4C A2 EF ;------------------------------------------------------------------------------ @@ -13619,17 +13422,17 @@ CheckAudioChannelActive: ;------------------------------------------------------------------------------ TickAudioChannelDelay: - lda $FD - clc - adc #$07 - tay + lda $FD ; CPU:$EF93 PRG:2F93 A5 FD + clc ; CPU:$EF95 PRG:2F95 18 + adc #$07 ; CPU:$EF96 PRG:2F96 69 07 + tay ; CPU:$EF98 PRG:2F98 A8 - lda ($F2),y - sec - sbc #$01 - sta ($F2),y + lda ($F2),y ; CPU:$EF99 PRG:2F99 B1 F2 + sec ; CPU:$EF9B PRG:2F9B 38 + sbc #$01 ; CPU:$EF9C PRG:2F9C E9 01 + sta ($F2),y ; CPU:$EF9E PRG:2F9E 91 F2 - bne AdvanceAudioSequence + bne AdvanceAudioSequence ; CPU:$EFA0 PRG:2FA0 D0 56 ;------------------------------------------------------------------------------ @@ -13638,34 +13441,34 @@ TickAudioChannelDelay: ;------------------------------------------------------------------------------ DecodeAudioCommand: - jsr $F0C3 + jsr $F0C3 ; CPU:$EFA2 PRG:2FA2 20 C3 F0 - cmp #$F0 - bcs $F00D + cmp #$F0 ; CPU:$EFA5 PRG:2FA5 C9 F0 + bcs $F00D ; CPU:$EFA7 PRG:2FA7 B0 64 - cmp #$C0 - bcs LoadAudioCommandDelay + cmp #$C0 ; CPU:$EFA9 PRG:2FA9 C9 C0 + bcs LoadAudioCommandDelay ; CPU:$EFAB PRG:2FAB B0 3E - pha + pha ; CPU:$EFAD PRG:2FAD 48 - and #$F0 - lsr - lsr - lsr - tax + and #$F0 ; CPU:$EFAE PRG:2FAE 29 F0 + lsr ; CPU:$EFB0 PRG:2FB0 4A + lsr ; CPU:$EFB1 PRG:2FB1 4A + lsr ; CPU:$EFB2 PRG:2FB2 4A + tax ; CPU:$EFB3 PRG:2FB3 AA - lda AudioFrequencyLookupTable,x - sta $FE + lda AudioFrequencyLookupTable,x ; CPU:$EFB4 PRG:2FB4 BD E8 F0 + sta $FE ; CPU:$EFB7 PRG:2FB7 85 FE - lda AudioFrequencyLookupTable+1,x - sta $FF + lda AudioFrequencyLookupTable+1,x ; CPU:$EFB9 PRG:2FB9 BD E9 F0 + sta $FF ; CPU:$EFBC PRG:2FBC 85 FF - pla + pla ; CPU:$EFBE PRG:2FBE 68 - and #$0F - beq ApplyAudioFrequencyMask + and #$0F ; CPU:$EFBF PRG:2FBF 29 0F + beq ApplyAudioFrequencyMask ; CPU:$EFC1 PRG:2FC1 F0 08 - tax + tax ; CPU:$EFC3 PRG:2FC3 AA ;------------------------------------------------------------------------------ ; $EFC4 @@ -13673,11 +13476,11 @@ DecodeAudioCommand: ;------------------------------------------------------------------------------ ShiftAudioFrequencyMask: - lsr $FE - ror $FF + lsr $FE ; CPU:$EFC4 PRG:2FC4 46 + ror $FF ; CPU:$EFC5 PRG:2FC5 FE - dex - bne ShiftAudioFrequencyMask + dex ; CPU:$EFC6 PRG:2FC6 66 + bne ShiftAudioFrequencyMask ; CPU:$EFC7 PRG:2FC7 FF CA ;------------------------------------------------------------------------------ @@ -13686,29 +13489,29 @@ ShiftAudioFrequencyMask: ;------------------------------------------------------------------------------ ApplyAudioFrequencyMask: - lda $FD - clc - adc #$04 - tay + lda $FD ; CPU:$EFCB PRG:2FCB A5 FD + clc ; CPU:$EFCD PRG:2FCD 18 + adc #$04 ; CPU:$EFCE PRG:2FCE 69 04 + tay ; CPU:$EFD0 PRG:2FD0 A8 - lda ($F2),y - and #$F8 - ora $FE - sta ($F2),y + lda ($F2),y ; CPU:$EFD1 PRG:2FD1 B1 F2 + and #$F8 ; CPU:$EFD3 PRG:2FD3 29 F8 + ora $FE ; CPU:$EFD5 PRG:2FD5 05 FE + sta ($F2),y ; CPU:$EFD7 PRG:2FD7 91 F2 - lda $FF - dey - sta ($F2),y + lda $FF ; CPU:$EFD9 PRG:2FD9 A5 FF + dey ; CPU:$EFDB PRG:2FDB 88 + sta ($F2),y ; CPU:$EFDC PRG:2FDC 91 F2 - ldy $FD + ldy $FD ; CPU:$EFDE PRG:2FDE A4 FD - lda ($F2),y - cmp #$05 - bcc LoadAudioCommandDelay + lda ($F2),y ; CPU:$EFE0 PRG:2FE0 B1 F2 + cmp #$05 ; CPU:$EFE2 PRG:2FE2 C9 05 + bcc LoadAudioCommandDelay ; CPU:$EFE4 PRG:2FE4 90 05 - sec - sbc #$04 - sta ($F2),y + sec ; CPU:$EFE6 PRG:2FE6 38 + sbc #$04 ; CPU:$EFE7 PRG:2FE7 E9 04 + sta ($F2),y ; CPU:$EFE9 PRG:2FE9 91 F2 ;------------------------------------------------------------------------------ @@ -13717,16 +13520,16 @@ ApplyAudioFrequencyMask: ;------------------------------------------------------------------------------ LoadAudioCommandDelay: - jsr $F0C3 - pha + jsr $F0C3 ; CPU:$EFEB PRG:2FEB 20 C3 F0 + pha ; CPU:$EFEE PRG:2FEE 48 - lda $FD - clc - adc #$07 - tay + lda $FD ; CPU:$EFEF PRG:2FEF A5 FD + clc ; CPU:$EFF1 PRG:2FF1 18 + adc #$07 ; CPU:$EFF2 PRG:2FF2 69 07 + tay ; CPU:$EFF4 PRG:2FF4 A8 - pla - sta ($F2),y + pla ; CPU:$EFF5 PRG:2FF5 68 + sta ($F2),y ; CPU:$EFF6 PRG:2FF6 91 F2 ;------------------------------------------------------------------------------ @@ -13735,16 +13538,16 @@ LoadAudioCommandDelay: ;------------------------------------------------------------------------------ AdvanceAudioSequence: - lda $FD - clc - adc #$08 - sta $FD + lda $FD ; CPU:$EFF8 PRG:2FF8 A5 FD + clc ; CPU:$EFFA PRG:2FFA 18 + adc #$08 ; CPU:$EFFB PRG:2FFB 69 08 + sta $FD ; CPU:$EFFD PRG:2FFD 85 FD - lda $FC - adc #$01 - sta $FC + lda $FC ; CPU:$EFFF PRG:2FFF A5 FC + adc #$01 ; CPU:$F001 PRG:3001 69 01 + sta $FC ; CPU:$F003 PRG:3003 85 FC - cmp #$10 + cmp #$10 ; CPU:$F005 PRG:3005 C9 10 ; Fall through at $F007 to the next control-flow block. @@ -13755,13 +13558,13 @@ AdvanceAudioSequence: ;============================================================================== FinishAudioSequenceScan: - bcs AudioSequenceUpdateDone + bcs AudioSequenceUpdateDone ; CPU:$F007 PRG:3007 B0 03 - jmp UpdateNextAudioSequence + jmp UpdateNextAudioSequence ; CPU:$F009 PRG:3009 4C 33 EF AudioSequenceUpdateDone: - rts + rts ; CPU:$F00C PRG:300C 60 ;============================================================================== @@ -13774,17 +13577,17 @@ AudioSequenceUpdateDone: ;============================================================================== DispatchAudioCommand: - and #$0F - asl - tax + and #$0F ; CPU:$F00D PRG:300D 29 0F + asl ; CPU:$F00F PRG:300F 0A + tax ; CPU:$F010 PRG:3010 AA - lda AudioCommandHandlerTable,x - sta $FE + lda AudioCommandHandlerTable,x ; CPU:$F011 PRG:3011 BD 1E F0 + sta $FE ; CPU:$F014 PRG:3014 85 FE - lda AudioCommandHandlerTable+1,x - sta $FF + lda AudioCommandHandlerTable+1,x ; CPU:$F016 PRG:3016 BD 1F F0 + sta $FF ; CPU:$F019 PRG:3019 85 FF - jmp ($00FE) + jmp ($00FE) ; CPU:$F01B PRG:301B 6C FE 00 3E F0 ;============================================================================== @@ -13795,22 +13598,22 @@ DispatchAudioCommand: ;============================================================================== AudioCommandHandlerTable: - .word StopAudioSequence ; $F0 - .word AudioCommandF1 ; $F1 - .word AudioCommandF2 ; $F2 - .word AudioCommandF3 ; $F3 - .word AudioCommandF4 ; $F4 - .word AudioCommandF5 ; $F5 - .word AudioCommandF6 ; $F6 - .word StopAudioSequence ; $F7 - .word StopAudioSequence ; $F8 - .word StopAudioSequence ; $F9 - .word StopAudioSequence ; $FA - .word StopAudioSequence ; $FB - .word StopAudioSequence ; $FC - .word StopAudioSequence ; $FD - .word StopAudioSequence ; $FE - .word StopAudioSequence ; $FF + .word StopAudioSequence ; $F0 ; CPU:$F01E PRG:301E 3E F0 + .word AudioCommandF1 ; $F1 ; CPU:$F020 PRG:3020 4B F0 + .word AudioCommandF2 ; $F2 ; CPU:$F022 PRG:3022 63 F0 + .word AudioCommandF3 ; $F3 ; CPU:$F024 PRG:3024 7B F0 + .word AudioCommandF4 ; $F4 ; CPU:$F026 PRG:3026 93 F0 + .word AudioCommandF5 ; $F5 ; CPU:$F028 PRG:3028 A3 F0 + .word AudioCommandF6 ; $F6 ; CPU:$F02A PRG:302A B3 F0 + .word StopAudioSequence ; $F7 ; CPU:$F02C PRG:302C 3E F0 + .word StopAudioSequence ; $F8 ; CPU:$F02E PRG:302E 3E F0 + .word StopAudioSequence ; $F9 ; CPU:$F030 PRG:3030 3E F0 + .word StopAudioSequence ; $FA ; CPU:$F032 PRG:3032 3E F0 + .word StopAudioSequence ; $FB ; CPU:$F034 PRG:3034 3E F0 + .word StopAudioSequence ; $FC ; CPU:$F036 PRG:3036 3E F0 + .word StopAudioSequence ; $FD ; CPU:$F038 PRG:3038 3E F0 + .word StopAudioSequence ; $FE ; CPU:$F03A PRG:303A 3E F0 + .word StopAudioSequence ; $FF ; CPU:$F03C PRG:303C 3E F0 ;============================================================================== @@ -13821,15 +13624,15 @@ AudioCommandHandlerTable: ;============================================================================== StopAudioSequence: - ldy $FC + ldy $FC ; CPU:$F03E PRG:303E A4 FC - lda #$00 - sta ($F0),y + lda #$00 ; CPU:$F040 PRG:3040 A9 00 + sta ($F0),y ; CPU:$F042 PRG:3042 91 F0 - ldy $FD - sta ($F2),y + ldy $FD ; CPU:$F044 PRG:3044 A4 FD + sta ($F2),y ; CPU:$F046 PRG:3046 91 F2 - jmp AdvanceAudioSequence + jmp AdvanceAudioSequence ; CPU:$F048 PRG:3048 4C F8 EF ;============================================================================== @@ -13839,123 +13642,123 @@ StopAudioSequence: ;============================================================================== AudioCommandF1: - jsr FetchAudioSequenceByte - pha + jsr FetchAudioSequenceByte ; CPU:$F04B PRG:304B 20 C3 F0 + pha ; CPU:$F04E PRG:304E 48 - lda $FD - clc - adc #$01 - tay + lda $FD ; CPU:$F04F PRG:304F A5 FD + clc ; CPU:$F051 PRG:3051 18 + adc #$01 ; CPU:$F052 PRG:3052 69 01 + tay ; CPU:$F054 PRG:3054 A8 - lda ($F2),y - and #$3F - sta ($F2),y + lda ($F2),y ; CPU:$F055 PRG:3055 B1 F2 + and #$3F ; CPU:$F057 PRG:3057 29 3F + sta ($F2),y ; CPU:$F059 PRG:3059 91 F2 - pla - ora ($F2),y - sta ($F2),y + pla ; CPU:$F05B PRG:305B 68 + ora ($F2),y ; CPU:$F05C PRG:305C 11 F2 + sta ($F2),y ; CPU:$F05E PRG:305E 91 F2 - jmp DecodeAudioCommand + jmp DecodeAudioCommand ; CPU:$F060 PRG:3060 4C A2 EF ;============================================================================== ; $F063-$F07A: Runtime command $F2 ;============================================================================== AudioCommandF2: - jsr FetchAudioSequenceByte - pha + jsr FetchAudioSequenceByte ; CPU:$F063 PRG:3063 20 C3 F0 + pha ; CPU:$F066 PRG:3066 48 - lda $FD - clc - adc #$01 - tay + lda $FD ; CPU:$F067 PRG:3067 A5 FD + clc ; CPU:$F069 PRG:3069 18 + adc #$01 ; CPU:$F06A PRG:306A 69 01 + tay ; CPU:$F06C PRG:306C A8 - lda ($F2),y - and #$CF - sta ($F2),y + lda ($F2),y ; CPU:$F06D PRG:306D B1 F2 + and #$CF ; CPU:$F06F PRG:306F 29 CF + sta ($F2),y ; CPU:$F071 PRG:3071 91 F2 - pla - ora ($F2),y - sta ($F2),y + pla ; CPU:$F073 PRG:3073 68 + ora ($F2),y ; CPU:$F074 PRG:3074 11 F2 + sta ($F2),y ; CPU:$F076 PRG:3076 91 F2 - jmp DecodeAudioCommand + jmp DecodeAudioCommand ; CPU:$F078 PRG:3078 4C A2 EF ;============================================================================== ; $F07B-$F092: Runtime command $F3 ;============================================================================== AudioCommandF3: - jsr FetchAudioSequenceByte - pha + jsr FetchAudioSequenceByte ; CPU:$F07B PRG:307B 20 C3 F0 + pha ; CPU:$F07E PRG:307E 48 - lda $FD - clc - adc #$01 - tay + lda $FD ; CPU:$F07F PRG:307F A5 FD + clc ; CPU:$F081 PRG:3081 18 + adc #$01 ; CPU:$F082 PRG:3082 69 01 + tay ; CPU:$F084 PRG:3084 A8 - lda ($F2),y - and #$F0 - sta ($F2),y + lda ($F2),y ; CPU:$F085 PRG:3085 B1 F2 + and #$F0 ; CPU:$F087 PRG:3087 29 F0 + sta ($F2),y ; CPU:$F089 PRG:3089 91 F2 - pla - ora ($F2),y - sta ($F2),y + pla ; CPU:$F08B PRG:308B 68 + ora ($F2),y ; CPU:$F08C PRG:308C 11 F2 + sta ($F2),y ; CPU:$F08E PRG:308E 91 F2 - jmp DecodeAudioCommand + jmp DecodeAudioCommand ; CPU:$F090 PRG:3090 4C A2 EF ;============================================================================== ; $F093-$F0A2: Runtime command $F4 ;============================================================================== AudioCommandF4: - jsr FetchAudioSequenceByte - pha + jsr FetchAudioSequenceByte ; CPU:$F093 PRG:3093 20 C3 F0 + pha ; CPU:$F096 PRG:3096 48 - lda $FD - clc - adc #$02 - tay + lda $FD ; CPU:$F097 PRG:3097 A5 FD + clc ; CPU:$F099 PRG:3099 18 + adc #$02 ; CPU:$F09A PRG:309A 69 02 + tay ; CPU:$F09C PRG:309C A8 - pla - sta ($F2),y + pla ; CPU:$F09D PRG:309D 68 + sta ($F2),y ; CPU:$F09E PRG:309E 91 F2 - jmp DecodeAudioCommand + jmp DecodeAudioCommand ; CPU:$F0A0 PRG:30A0 4C A2 EF ;============================================================================== ; $F0A3-$F0B2: Runtime command $F5 ;============================================================================== AudioCommandF5: - jsr FetchAudioSequenceByte - pha + jsr FetchAudioSequenceByte ; CPU:$F0A3 PRG:30A3 20 C3 F0 + pha ; CPU:$F0A6 PRG:30A6 48 - lda $FD - clc - adc #$04 - tay + lda $FD ; CPU:$F0A7 PRG:30A7 A5 FD + clc ; CPU:$F0A9 PRG:30A9 18 + adc #$04 ; CPU:$F0AA PRG:30AA 69 04 + tay ; CPU:$F0AC PRG:30AC A8 - pla - sta ($F2),y + pla ; CPU:$F0AD PRG:30AD 68 + sta ($F2),y ; CPU:$F0AE PRG:30AE 91 F2 - jmp DecodeAudioCommand + jmp DecodeAudioCommand ; CPU:$F0B0 PRG:30B0 4C A2 EF ;============================================================================== ; $F0B3-$F0C2: Runtime command $F6 ;============================================================================== AudioCommandF6: - jsr FetchAudioSequenceByte - pha + jsr FetchAudioSequenceByte ; CPU:$F0B3 PRG:30B3 20 C3 F0 + pha ; CPU:$F0B6 PRG:30B6 48 - lda $FD - clc - adc #$01 - tay + lda $FD ; CPU:$F0B7 PRG:30B7 A5 FD + clc ; CPU:$F0B9 PRG:30B9 18 + adc #$01 ; CPU:$F0BA PRG:30BA 69 01 + tay ; CPU:$F0BC PRG:30BC A8 - pla - sta ($F2),y + pla ; CPU:$F0BD PRG:30BD 68 + sta ($F2),y ; CPU:$F0BE PRG:30BE 91 F2 - jmp DecodeAudioCommand + jmp DecodeAudioCommand ; CPU:$F0C0 PRG:30C0 4C A2 EF ;============================================================================== ; $F0C3-$F0E7: Fetch Runtime Command Byte @@ -13970,40 +13773,40 @@ AudioCommandF6: ;============================================================================== FetchAudioSequenceByte: - lda $FD - clc - adc #$05 - tay + lda $FD ; CPU:$F0C3 PRG:30C3 A5 FD + clc ; CPU:$F0C5 PRG:30C5 18 + adc #$05 ; CPU:$F0C6 PRG:30C6 69 05 + tay ; CPU:$F0C8 PRG:30C8 A8 - lda ($F2),y - sta $FE + lda ($F2),y ; CPU:$F0C9 PRG:30C9 B1 F2 + sta $FE ; CPU:$F0CB PRG:30CB 85 FE - iny + iny ; CPU:$F0CD PRG:30CD C8 - lda ($F2),y - sta $FF + lda ($F2),y ; CPU:$F0CE PRG:30CE B1 F2 + sta $FF ; CPU:$F0D0 PRG:30D0 85 FF - ldx #$00 + ldx #$00 ; CPU:$F0D2 PRG:30D2 A2 00 - lda ($FE,x) - pha + lda ($FE,x) ; CPU:$F0D4 PRG:30D4 A1 FE 48 A5 FE + pha ; CPU:$F0D9 PRG:30D9 88 - lda $FE + lda $FE ; CPU:$F0DA PRG:30DA 18 69 - dey - clc - adc #$01 - sta ($F2),y + dey ; CPU:$F0DC PRG:30DC 01 + clc ; CPU:$F0DD PRG:30DD 91 + adc #$01 ; CPU:$F0DE PRG:30DE F2 A5 + sta ($F2),y ; CPU:$F0E0 PRG:30E0 FF 69 - lda $FF - adc #$00 + lda $FF ; CPU:$F0E2 PRG:30E2 00 C8 + adc #$00 ; CPU:$F0E4 PRG:30E4 91 F2 - iny - sta ($F2),y + iny ; CPU:$F0E6 PRG:30E6 68 + sta ($F2),y ; CPU:$F0E7 PRG:30E7 60 03 - pla + pla ; CPU:$F0E9 PRG:30E9 F9 - rts + rts ; CPU:$F0EA PRG:30EA 03 ;============================================================================== ; $F0E8-$F14F: Runtime / Audio Lookup Data @@ -14018,31 +13821,31 @@ FetchAudioSequenceByte: ;============================================================================== AudioFrequencyLookupTable: ; $F0E8-$F0F7 - .byte $03,$F9,$03,$C0,$03,$8A,$03,$57 - .byte $03,$27,$02,$FA,$02,$CF,$02,$A7 + .byte $03,$F9,$03,$C0,$03,$8A,$03,$57 ; CPU:$F0E8 PRG:30E8 03 F9 03 C0 03 8A 03 57 + .byte $03,$27,$02,$FA,$02,$CF,$02,$A7 ; CPU:$F0F0 PRG:30F0 03 27 02 FA 02 CF 02 A7 ; $F0F8-$F107 - .byte $02,$81,$02,$5D,$02,$3B,$02,$1B - .byte $02,$F1,$CB,$F3,$14,$F4,$22,$F1 + .byte $02,$81,$02,$5D,$02,$3B,$02,$1B ; CPU:$F0F8 PRG:30F8 02 81 02 5D 02 3B 02 1B + .byte $02,$F1,$CB,$F3,$14,$F4,$22,$F1 ; CPU:$F100 PRG:3100 02 F1 CB F3 14 F4 22 F1 ; $F108-$F117 - .byte $3C,$F3,$3F,$F4,$50,$F4,$37,$F1 - .byte $E4,$F1,$1D,$F3,$CF,$F1,$62,$F1 + .byte $3C,$F3,$3F,$F4,$50,$F4,$37,$F1 ; CPU:$F108 PRG:3108 3C F3 3F F4 50 F4 37 F1 + .byte $E4,$F1,$1D,$F3,$CF,$F1,$62,$F1 ; CPU:$F110 PRG:3110 E4 F1 1D F3 CF F1 62 F1 ; $F118-$F127 - .byte $8D,$F1,$B0,$F1,$07,$F2,$7A,$F2 - .byte $61,$F4,$01,$03,$7F,$08,$A2,$0C + .byte $8D,$F1,$B0,$F1,$07,$F2,$7A,$F2 ; CPU:$F118 PRG:3118 8D F1 B0 F1 07 F2 7A F2 + .byte $61,$F4,$01,$03,$7F,$08,$A2,$0C ; CPU:$F120 PRG:3120 61 F4 01 03 7F 08 A2 0C ; $F128-$F137 - .byte $A2,$0C,$A2,$0C,$A2,$0C,$A2,$0C - .byte $A2,$0C,$A2,$0C,$A2,$0C,$F0,$03 + .byte $A2,$0C,$A2,$0C,$A2,$0C,$A2,$0C ; CPU:$F128 PRG:3128 A2 0C A2 0C A2 0C A2 0C + .byte $A2,$0C,$A2,$0C,$A2,$0C,$F0,$03 ; CPU:$F130 PRG:3130 A2 0C A2 0C A2 0C F0 03 ; $F138-$F147 - .byte $04,$7F,$08,$33,$01,$23,$01,$03 - .byte $01,$A2,$01,$92,$01,$72,$01,$52 + .byte $04,$7F,$08,$33,$01,$23,$01,$03 ; CPU:$F138 PRG:3138 04 7F 08 33 01 23 01 03 + .byte $01,$A2,$01,$92,$01,$72,$01,$52 ; CPU:$F140 PRG:3140 01 A2 01 92 01 72 01 52 ; $F148-$F14F - .byte $01,$32,$01,$22,$01,$02,$01,$A1 + .byte $01,$32,$01,$22,$01,$02,$01,$A1 ; CPU:$F148 PRG:3148 01 32 01 22 01 02 01 A1 @@ -14057,68 +13860,68 @@ AudioFrequencyLookupTable: ;============================================================================== AudioSequenceData_F150: ; $F150-$F15F - .byte $01,$91,$01,$C0,$08,$91,$01,$A1 - .byte $01,$02,$01,$22,$01,$32,$01,$52 + .byte $01,$91,$01,$C0,$08,$91,$01,$A1 ; CPU:$F150 PRG:3150 01 91 01 C0 08 91 01 A1 + .byte $01,$02,$01,$22,$01,$32,$01,$52 ; CPU:$F158 PRG:3158 01 02 01 22 01 32 01 52 ; $F160-$F16F - .byte $01,$F0,$01,$96,$7F,$28,$82,$01 - .byte $92,$01,$A2,$01,$B2,$01,$03,$01 + .byte $01,$F0,$01,$96,$7F,$28,$82,$01 ; CPU:$F160 PRG:3160 01 F0 01 96 7F 28 82 01 + .byte $92,$01,$A2,$01,$B2,$01,$03,$01 ; CPU:$F168 PRG:3168 92 01 A2 01 B2 01 03 01 ; $F170-$F17F - .byte $13,$01,$23,$01,$33,$01,$43,$01 - .byte $53,$01,$33,$01,$23,$01,$13,$01 + .byte $13,$01,$23,$01,$33,$01,$43,$01 ; CPU:$F170 PRG:3170 13 01 23 01 33 01 43 01 + .byte $53,$01,$33,$01,$23,$01,$13,$01 ; CPU:$F178 PRG:3178 53 01 33 01 23 01 13 01 ; $F180-$F18F - .byte $03,$01,$B2,$01,$A2,$01,$92,$01 - .byte $82,$01,$72,$01,$F0,$01,$96,$7F + .byte $03,$01,$B2,$01,$A2,$01,$92,$01 ; CPU:$F180 PRG:3180 03 01 B2 01 A2 01 92 01 + .byte $82,$01,$72,$01,$F0,$01,$96,$7F ; CPU:$F188 PRG:3188 82 01 72 01 F0 01 96 7F ; $F190-$F19F - .byte $28,$A2,$01,$B2,$01,$03,$01,$13 - .byte $01,$23,$01,$33,$01,$43,$01,$53 + .byte $28,$A2,$01,$B2,$01,$03,$01,$13 ; CPU:$F190 PRG:3190 28 A2 01 B2 01 03 01 13 + .byte $01,$23,$01,$33,$01,$43,$01,$53 ; CPU:$F198 PRG:3198 01 23 01 33 01 43 01 53 ; $F1A0-$F1AF - .byte $01,$33,$01,$23,$01,$13,$01,$03 - .byte $01,$B2,$01,$A2,$01,$92,$01,$F0 + .byte $01,$33,$01,$23,$01,$13,$01,$03 ; CPU:$F1A0 PRG:31A0 01 33 01 23 01 13 01 03 + .byte $01,$B2,$01,$A2,$01,$92,$01,$F0 ; CPU:$F1A8 PRG:31A8 01 B2 01 A2 01 92 01 F0 ; $F1B0-$F1BF - .byte $01,$96,$7F,$28,$B2,$01,$03,$01 - .byte $13,$01,$23,$01,$33,$01,$43,$01 + .byte $01,$96,$7F,$28,$B2,$01,$03,$01 ; CPU:$F1B0 PRG:31B0 01 96 7F 28 B2 01 03 01 + .byte $13,$01,$23,$01,$33,$01,$43,$01 ; CPU:$F1B8 PRG:31B8 13 01 23 01 33 01 43 01 ; $F1C0-$F1CF - .byte $53,$01,$33,$01,$23,$01,$13,$01 - .byte $03,$01,$B2,$01,$A2,$01,$F0,$02 + .byte $53,$01,$33,$01,$23,$01,$13,$01 ; CPU:$F1C0 PRG:31C0 53 01 33 01 23 01 13 01 + .byte $03,$01,$B2,$01,$A2,$01,$F0,$02 ; CPU:$F1C8 PRG:31C8 03 01 B2 01 A2 01 F0 02 ; $F1D0-$F1DF - .byte $9C,$7F,$28,$31,$01,$71,$01,$A1 - .byte $01,$12,$01,$32,$01,$72,$01,$A2 + .byte $9C,$7F,$28,$31,$01,$71,$01,$A1 ; CPU:$F1D0 PRG:31D0 9C 7F 28 31 01 71 01 A1 + .byte $01,$12,$01,$32,$01,$72,$01,$A2 ; CPU:$F1D8 PRG:31D8 01 12 01 32 01 72 01 A2 ; $F1E0-$F1EF - .byte $01,$13,$01,$F0,$02,$00,$7F,$10 - .byte $20,$03,$50,$03,$80,$02,$A0,$02 + .byte $01,$13,$01,$F0,$02,$00,$7F,$10 ; CPU:$F1E0 PRG:31E0 01 13 01 F0 02 00 7F 10 + .byte $20,$03,$50,$03,$80,$02,$A0,$02 ; CPU:$F1E8 PRG:31E8 20 03 50 03 80 02 A0 02 ; $F1F0-$F1FF - .byte $21,$02,$51,$02,$81,$01,$A1,$01 - .byte $02,$01,$22,$01,$32,$01,$52,$01 + .byte $21,$02,$51,$02,$81,$01,$A1,$01 ; CPU:$F1F0 PRG:31F0 21 02 51 02 81 01 A1 01 + .byte $02,$01,$22,$01,$32,$01,$52,$01 ; CPU:$F1F8 PRG:31F8 02 01 22 01 32 01 52 01 ; $F200-$F20F - .byte $F5,$18,$73,$01,$C0,$08,$F0,$01 - .byte $03,$7F,$08,$72,$02,$82,$08,$72 + .byte $F5,$18,$73,$01,$C0,$08,$F0,$01 ; CPU:$F200 PRG:3200 F5 18 73 01 C0 08 F0 01 + .byte $03,$7F,$08,$72,$02,$82,$08,$72 ; CPU:$F208 PRG:3208 03 7F 08 72 02 82 08 72 ; $F210-$F21F - .byte $02,$82,$08,$72,$02,$82,$08,$42 - .byte $02,$52,$04,$32,$04,$82,$06,$82 + .byte $02,$82,$08,$72,$02,$82,$08,$42 ; CPU:$F210 PRG:3210 02 82 08 72 02 82 08 42 + .byte $02,$52,$04,$32,$04,$82,$06,$82 ; CPU:$F218 PRG:3218 02 52 04 32 04 82 06 82 ; $F220-$F22F - .byte $08,$B2,$02,$03,$10,$C0,$08,$72 - .byte $02,$82,$08,$72,$02,$82,$08,$72 + .byte $08,$B2,$02,$03,$10,$C0,$08,$72 ; CPU:$F220 PRG:3220 08 B2 02 03 10 C0 08 72 + .byte $02,$82,$08,$72,$02,$82,$08,$72 ; CPU:$F228 PRG:3228 02 82 08 72 02 82 08 72 ; $F230-$F23F - .byte $02,$82,$08,$42,$02,$52,$04,$32 - .byte $04,$82,$06,$82,$08,$42,$02,$52 + .byte $02,$82,$08,$42,$02,$52,$04,$32 ; CPU:$F230 PRG:3230 02 82 08 42 02 52 04 32 + .byte $04,$82,$06,$82,$08,$42,$02,$52 ; CPU:$F238 PRG:3238 04 82 06 82 08 42 02 52 ; $F240-$F24F - .byte $10,$C0,$08,$72,$02,$82,$08,$72 - .byte $02,$82,$08,$72,$02,$82,$08,$42 + .byte $10,$C0,$08,$72,$02,$82,$08,$72 ; CPU:$F240 PRG:3240 10 C0 08 72 02 82 08 72 + .byte $02,$82,$08,$72,$02,$82,$08,$42 ; CPU:$F248 PRG:3248 02 82 08 72 02 82 08 42 ;============================================================================== ; $F250-$F34F: Runtime / Audio Command Data @@ -14131,68 +13934,68 @@ AudioSequenceData_F150: AudioSequenceData_F250: ; $F250-$F25F - .byte $02,$52,$04,$32,$04,$82,$06,$82 - .byte $08,$A2,$02,$B2,$08,$03,$02,$13 + .byte $02,$52,$04,$32,$04,$82,$06,$82 ; CPU:$F250 PRG:3250 02 52 04 32 04 82 06 82 + .byte $08,$A2,$02,$B2,$08,$03,$02,$13 ; CPU:$F258 PRG:3258 08 A2 02 B2 08 03 02 13 ; $F260-$F26F - .byte $0A,$13,$02,$23,$0C,$03,$02,$13 - .byte $08,$A2,$02,$B2,$08,$82,$0A,$A2 + .byte $0A,$13,$02,$23,$0C,$03,$02,$13 ; CPU:$F260 PRG:3260 0A 13 02 23 0C 03 02 13 + .byte $08,$A2,$02,$B2,$08,$82,$0A,$A2 ; CPU:$F268 PRG:3268 08 A2 02 B2 08 82 0A A2 ; $F270-$F27F - .byte $02,$B2,$0A,$72,$02,$82,$10,$C0 - .byte $08,$F0,$02,$81,$7F,$40,$80,$08 + .byte $02,$B2,$0A,$72,$02,$82,$10,$C0 ; CPU:$F270 PRG:3270 02 B2 0A 72 02 82 10 C0 + .byte $08,$F0,$02,$81,$7F,$40,$80,$08 ; CPU:$F278 PRG:3278 08 F0 02 81 7F 40 80 08 ; $F280-$F28F - .byte $C0,$06,$80,$04,$C0,$02,$80,$08 - .byte $C0,$06,$80,$04,$C0,$02,$80,$08 + .byte $C0,$06,$80,$04,$C0,$02,$80,$08 ; CPU:$F280 PRG:3280 C0 06 80 04 C0 02 80 08 + .byte $C0,$06,$80,$04,$C0,$02,$80,$08 ; CPU:$F288 PRG:3288 C0 06 80 04 C0 02 80 08 ; $F290-$F29F - .byte $C0,$06,$80,$04,$C0,$02,$01,$04 - .byte $C0,$01,$11,$04,$C0,$01,$21,$04 + .byte $C0,$06,$80,$04,$C0,$02,$01,$04 ; CPU:$F290 PRG:3290 C0 06 80 04 C0 02 01 04 + .byte $C0,$01,$11,$04,$C0,$01,$21,$04 ; CPU:$F298 PRG:3298 C0 01 11 04 C0 01 21 04 ; $F2A0-$F2AF - .byte $C0,$01,$31,$04,$C0,$01,$80,$08 - .byte $C0,$06,$80,$04,$C0,$02,$80,$08 + .byte $C0,$01,$31,$04,$C0,$01,$80,$08 ; CPU:$F2A0 PRG:32A0 C0 01 31 04 C0 01 80 08 + .byte $C0,$06,$80,$04,$C0,$02,$80,$08 ; CPU:$F2A8 PRG:32A8 C0 06 80 04 C0 02 80 08 ; $F2B0-$F2BF - .byte $C0,$06,$80,$04,$C0,$02,$80,$08 - .byte $C0,$06,$80,$04,$C0,$02,$01,$04 + .byte $C0,$06,$80,$04,$C0,$02,$80,$08 ; CPU:$F2B0 PRG:32B0 C0 06 80 04 C0 02 80 08 + .byte $C0,$06,$80,$04,$C0,$02,$01,$04 ; CPU:$F2B8 PRG:32B8 C0 06 80 04 C0 02 01 04 ; $F2C0-$F2CF - .byte $C0,$01,$11,$04,$C0,$01,$21,$04 - .byte $C0,$01,$31,$04,$C0,$01,$80,$08 + .byte $C0,$01,$11,$04,$C0,$01,$21,$04 ; CPU:$F2C0 PRG:32C0 C0 01 11 04 C0 01 21 04 + .byte $C0,$01,$31,$04,$C0,$01,$80,$08 ; CPU:$F2C8 PRG:32C8 C0 01 31 04 C0 01 80 08 ; $F2D0-$F2DF - .byte $C0,$06,$80,$04,$C0,$02,$80,$08 - .byte $C0,$06,$80,$04,$C0,$02,$80,$08 + .byte $C0,$06,$80,$04,$C0,$02,$80,$08 ; CPU:$F2D0 PRG:32D0 C0 06 80 04 C0 02 80 08 + .byte $C0,$06,$80,$04,$C0,$02,$80,$08 ; CPU:$F2D8 PRG:32D8 C0 06 80 04 C0 02 80 08 ; $F2E0-$F2EF - .byte $C0,$06,$80,$04,$C0,$02,$01,$04 - .byte $C0,$01,$11,$04,$C0,$01,$21,$04 + .byte $C0,$06,$80,$04,$C0,$02,$01,$04 ; CPU:$F2E0 PRG:32E0 C0 06 80 04 C0 02 01 04 + .byte $C0,$01,$11,$04,$C0,$01,$21,$04 ; CPU:$F2E8 PRG:32E8 C0 01 11 04 C0 01 21 04 ; $F2F0-$F2FF - .byte $C0,$01,$31,$04,$C0,$01,$81,$0A - .byte $31,$04,$C0,$01,$21,$04,$C0,$01 + .byte $C0,$01,$31,$04,$C0,$01,$81,$0A ; CPU:$F2F0 PRG:32F0 C0 01 31 04 C0 01 81 0A + .byte $31,$04,$C0,$01,$21,$04,$C0,$01 ; CPU:$F2F8 PRG:32F8 31 04 C0 01 21 04 C0 01 ; $F300-$F30F - .byte $11,$04,$C0,$01,$B0,$04,$C0,$01 - .byte $80,$04,$C0,$01,$70,$04,$C0,$01 + .byte $11,$04,$C0,$01,$B0,$04,$C0,$01 ; CPU:$F300 PRG:3300 11 04 C0 01 B0 04 C0 01 + .byte $80,$04,$C0,$01,$70,$04,$C0,$01 ; CPU:$F308 PRG:3308 80 04 C0 01 70 04 C0 01 ; $F310-$F31F - .byte $60,$08,$C0,$02,$70,$08,$C0,$02 - .byte $80,$0C,$C0,$06,$F0,$02,$98,$7F + .byte $60,$08,$C0,$02,$70,$08,$C0,$02 ; CPU:$F310 PRG:3310 60 08 C0 02 70 08 C0 02 + .byte $80,$0C,$C0,$06,$F0,$02,$98,$7F ; CPU:$F318 PRG:3318 80 0C C0 06 F0 02 98 7F ; $F320-$F32F - .byte $28,$33,$01,$23,$01,$13,$01,$03 - .byte $01,$A2,$01,$82,$01,$72,$01,$52 + .byte $28,$33,$01,$23,$01,$13,$01,$03 ; CPU:$F320 PRG:3320 28 33 01 23 01 13 01 03 + .byte $01,$A2,$01,$82,$01,$72,$01,$52 ; CPU:$F328 PRG:3328 01 A2 01 82 01 72 01 52 ; $F330-$F33F - .byte $01,$32,$01,$12,$01,$A1,$01,$71 - .byte $01,$31,$01,$F0,$01,$42,$7F,$38 + .byte $01,$32,$01,$12,$01,$A1,$01,$71 ; CPU:$F330 PRG:3330 01 32 01 12 01 A1 01 71 + .byte $01,$31,$01,$F0,$01,$42,$7F,$38 ; CPU:$F338 PRG:3338 01 31 01 F0 01 42 7F 38 ; $F340-$F34F - .byte $23,$02,$33,$02,$43,$02,$53,$02 - .byte $43,$02,$33,$02,$23,$02,$13,$02 + .byte $23,$02,$33,$02,$43,$02,$53,$02 ; CPU:$F340 PRG:3340 23 02 33 02 43 02 53 02 + .byte $43,$02,$33,$02,$23,$02,$13,$02 ; CPU:$F348 PRG:3348 43 02 33 02 23 02 13 02 ;============================================================================== ; $F350-$F44F: Runtime / Audio Command Data @@ -14204,68 +14007,68 @@ AudioSequenceData_F250: AudioSequenceData_F350: ; $F350-$F35F - .byte $23,$02,$33,$02,$43,$02,$33,$02 - .byte $23,$02,$13,$02,$03,$02,$13,$02 + .byte $23,$02,$33,$02,$43,$02,$33,$02 ; CPU:$F350 PRG:3350 23 02 33 02 43 02 33 02 + .byte $23,$02,$13,$02,$03,$02,$13,$02 ; CPU:$F358 PRG:3358 23 02 13 02 03 02 13 02 ; $F360-$F36F - .byte $23,$02,$33,$02,$23,$02,$13,$02 - .byte $03,$02,$B2,$02,$03,$02,$13,$02 + .byte $23,$02,$33,$02,$23,$02,$13,$02 ; CPU:$F360 PRG:3360 23 02 33 02 23 02 13 02 + .byte $03,$02,$B2,$02,$03,$02,$13,$02 ; CPU:$F368 PRG:3368 03 02 B2 02 03 02 13 02 ; $F370-$F37F - .byte $23,$02,$13,$02,$03,$02,$B2,$02 - .byte $A2,$02,$B2,$02,$03,$02,$23,$02 + .byte $23,$02,$13,$02,$03,$02,$B2,$02 ; CPU:$F370 PRG:3370 23 02 13 02 03 02 B2 02 + .byte $A2,$02,$B2,$02,$03,$02,$23,$02 ; CPU:$F378 PRG:3378 A2 02 B2 02 03 02 23 02 ; $F380-$F38F - .byte $03,$02,$B2,$02,$A2,$02,$92,$02 - .byte $A2,$02,$B2,$02,$03,$02,$B2,$02 + .byte $03,$02,$B2,$02,$A2,$02,$92,$02 ; CPU:$F380 PRG:3380 03 02 B2 02 A2 02 92 02 + .byte $A2,$02,$B2,$02,$03,$02,$B2,$02 ; CPU:$F388 PRG:3388 A2 02 B2 02 03 02 B2 02 ; $F390-$F39F - .byte $A2,$02,$92,$02,$82,$02,$92,$02 - .byte $A2,$02,$03,$02,$A2,$02,$92,$02 + .byte $A2,$02,$92,$02,$82,$02,$92,$02 ; CPU:$F390 PRG:3390 A2 02 92 02 82 02 92 02 + .byte $A2,$02,$03,$02,$A2,$02,$92,$02 ; CPU:$F398 PRG:3398 A2 02 03 02 A2 02 92 02 ; $F3A0-$F3AF - .byte $82,$02,$F2,$00,$F3,$00,$F5,$18 - .byte $31,$01,$71,$01,$B1,$01,$32,$01 + .byte $82,$02,$F2,$00,$F3,$00,$F5,$18 ; CPU:$F3A0 PRG:33A0 82 02 F2 00 F3 00 F5 18 + .byte $31,$01,$71,$01,$B1,$01,$32,$01 ; CPU:$F3A8 PRG:33A8 31 01 71 01 B1 01 32 01 ; $F3B0-$F3BF - .byte $72,$01,$B2,$01,$33,$01,$73,$01 - .byte $C0,$02,$31,$01,$71,$01,$B1,$01 + .byte $72,$01,$B2,$01,$33,$01,$73,$01 ; CPU:$F3B0 PRG:33B0 72 01 B2 01 33 01 73 01 + .byte $C0,$02,$31,$01,$71,$01,$B1,$01 ; CPU:$F3B8 PRG:33B8 C0 02 31 01 71 01 B1 01 ; $F3C0-$F3CF - .byte $32,$01,$72,$01,$B2,$01,$33,$01 - .byte $73,$01,$F0,$01,$81,$7F,$40,$31 + .byte $32,$01,$72,$01,$B2,$01,$33,$01 ; CPU:$F3C0 PRG:33C0 32 01 72 01 B2 01 33 01 + .byte $73,$01,$F0,$01,$81,$7F,$40,$31 ; CPU:$F3C8 PRG:33C8 73 01 F0 01 81 7F 40 31 ; $F3D0-$F3DF - .byte $08,$32,$08,$A1,$08,$71,$08,$32 - .byte $07,$A1,$07,$71,$0C,$C0,$06,$41 + .byte $08,$32,$08,$A1,$08,$71,$08,$32 ; CPU:$F3D0 PRG:33D0 08 32 08 A1 08 71 08 32 + .byte $07,$A1,$07,$71,$0C,$C0,$06,$41 ; CPU:$F3D8 PRG:33D8 07 A1 07 71 0C C0 06 41 ; $F3E0-$F3EF - .byte $08,$42,$08,$B1,$08,$81,$08,$42 - .byte $07,$B1,$07,$81,$0C,$C0,$06,$31 + .byte $08,$42,$08,$B1,$08,$81,$08,$42 ; CPU:$F3E0 PRG:33E0 08 42 08 B1 08 81 08 42 + .byte $07,$B1,$07,$81,$0C,$C0,$06,$31 ; CPU:$F3E8 PRG:33E8 07 B1 07 81 0C C0 06 31 ; $F3F0-$F3FF - .byte $08,$32,$08,$A1,$08,$71,$08,$32 - .byte $07,$A1,$07,$71,$0C,$C0,$06,$61 + .byte $08,$32,$08,$A1,$08,$71,$08,$32 ; CPU:$F3F0 PRG:33F0 08 32 08 A1 08 71 08 32 + .byte $07,$A1,$07,$71,$0C,$C0,$06,$61 ; CPU:$F3F8 PRG:33F8 07 A1 07 71 0C C0 06 61 ; $F400-$F40F - .byte $05,$71,$05,$81,$05,$81,$05,$91 - .byte $05,$A1,$05,$A1,$05,$B1,$05,$02 + .byte $05,$71,$05,$81,$05,$81,$05,$91 ; CPU:$F400 PRG:3400 05 71 05 81 05 81 05 91 + .byte $05,$A1,$05,$A1,$05,$B1,$05,$02 ; CPU:$F408 PRG:3408 05 A1 05 A1 05 B1 05 02 ; $F410-$F41F - .byte $05,$32,$0C,$F0,$02,$82,$7F,$40 - .byte $30,$18,$A0,$08,$30,$0E,$A0,$0C + .byte $05,$32,$0C,$F0,$02,$82,$7F,$40 ; CPU:$F410 PRG:3410 05 32 0C F0 02 82 7F 40 + .byte $30,$18,$A0,$08,$30,$0E,$A0,$0C ; CPU:$F418 PRG:3418 30 18 A0 08 30 0E A0 0C ; $F420-$F42F - .byte $C0,$06,$40,$18,$B0,$08,$40,$0E - .byte $B0,$0C,$C0,$06,$30,$18,$A0,$08 + .byte $C0,$06,$40,$18,$B0,$08,$40,$0E ; CPU:$F420 PRG:3420 C0 06 40 18 B0 08 40 0E + .byte $B0,$0C,$C0,$06,$30,$18,$A0,$08 ; CPU:$F428 PRG:3428 B0 0C C0 06 30 18 A0 08 ; $F430-$F43F - .byte $30,$0E,$A0,$0C,$C0,$06,$A0,$0F - .byte $01,$0F,$21,$0F,$31,$0C,$F0,$01 + .byte $30,$0E,$A0,$0C,$C0,$06,$A0,$0F ; CPU:$F430 PRG:3430 30 0E A0 0C C0 06 A0 0F + .byte $01,$0F,$21,$0F,$31,$0C,$F0,$01 ; CPU:$F438 PRG:3438 01 0F 21 0F 31 0C F0 01 ; $F440-$F44F - .byte $9F,$7F,$28,$01,$01,$41,$01,$71 - .byte $01,$A1,$01,$02,$01,$F5,$18,$F0 + .byte $9F,$7F,$28,$01,$01,$41,$01,$71 ; CPU:$F440 PRG:3440 9F 7F 28 01 01 41 01 71 + .byte $01,$A1,$01,$02,$01,$F5,$18,$F0 ; CPU:$F448 PRG:3448 01 A1 01 02 01 F5 18 F0 ;============================================================================== @@ -14277,29 +14080,29 @@ AudioSequenceData_F350: AudioSequenceData_F450: ; $F450-$F45F - .byte $01,$9F,$7F,$28,$02,$01,$A1,$01 - .byte $71,$01,$41,$01,$F5,$18,$01,$01 + .byte $01,$9F,$7F,$28,$02,$01,$A1,$01 ; CPU:$F450 PRG:3450 01 9F 7F 28 02 01 A1 01 + .byte $71,$01,$41,$01,$F5,$18,$01,$01 ; CPU:$F458 PRG:3458 71 01 41 01 F5 18 01 01 ; $F460-$F46F - .byte $F0,$01,$9F,$7F,$28,$52,$01,$92 - .byte $01,$03,$01,$33,$01,$F5,$18,$53 + .byte $F0,$01,$9F,$7F,$28,$52,$01,$92 ; CPU:$F460 PRG:3460 F0 01 9F 7F 28 52 01 92 + .byte $01,$03,$01,$33,$01,$F5,$18,$53 ; CPU:$F468 PRG:3468 01 03 01 33 01 F5 18 53 ; $F470-$F47F - .byte $03,$F5,$28,$53,$01,$33,$01,$03 - .byte $01,$92,$01,$F5,$18,$52,$03,$92 + .byte $03,$F5,$28,$53,$01,$33,$01,$03 ; CPU:$F470 PRG:3470 03 F5 28 53 01 33 01 03 + .byte $01,$92,$01,$F5,$18,$52,$03,$92 ; CPU:$F478 PRG:3478 01 92 01 F5 18 52 03 92 ; $F480-$F48F - .byte $01,$13,$01,$43,$01,$73,$01,$F5 - .byte $18,$93,$0A,$F5,$28,$93,$01,$73 + .byte $01,$13,$01,$43,$01,$73,$01,$F5 ; CPU:$F480 PRG:3480 01 13 01 43 01 73 01 F5 + .byte $18,$93,$0A,$F5,$28,$93,$01,$73 ; CPU:$F488 PRG:3488 18 93 0A F5 28 93 01 73 ; $F490-$F49A - .byte $01,$43,$01,$13,$01,$F5,$18,$92 - .byte $03,$F0,$FF + .byte $01,$43,$01,$13,$01,$F5,$18,$92 ; CPU:$F490 PRG:3490 01 43 01 13 01 F5 18 92 + .byte $03,$F0,$FF ; CPU:$F498 PRG:3498 03 F0 FF ;============================================================================== ; $F49B-$F64F: PRG Padding ;============================================================================== - .res $0B5B, $FF + .res $0B5B, $FF ; CPU:$F49B PRG:349B FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF ;============================================================================== @@ -14319,14 +14122,14 @@ AudioSequenceData_F450: ;============================================================================== MazeDataPointerBytes: - .byte $EC,$EC - .byte $0E,$C1 + .byte $EC,$EC ; CPU:$FFF6 PRG:3FF6 EC EC + .byte $0E,$C1 ; CPU:$FFF8 PRG:3FF8 0E C1 ;============================================================================== ; $FFFA-$FFFF: Interrupt Vectors ;============================================================================== .org $FFFA CpuInterruptVectors: - .word NmiHandler ; NMI - .word Reset ; Reset - .word IrqHandler ; IRQ/BRK + .word NmiHandler ; NMI ; CPU:$FFFA PRG:3FFA 0E C1 + .word Reset ; Reset ; CPU:$FFFC PRG:3FFC 33 C0 + .word IrqHandler ; IRQ/BRK ; CPU:$FFFE PRG:3FFE 7E C1 diff --git a/Pac-Man (USA) (Namco)/copilot/prg.s.preaudit b/Pac-Man (USA) (Namco)/copilot/prg.s.preaudit new file mode 100644 index 0000000..76c3297 --- /dev/null +++ b/Pac-Man (USA) (Namco)/copilot/prg.s.preaudit @@ -0,0 +1,14332 @@ +;---------------------------------------------------- +; NES Specific +;---------------------------------------------------- + +; PPU registers +PPUCTRL = $2000 +PPUMASK = $2001 +PPUSTATUS = $2002 +OAMADDR = $2003 +OAMDATA = $2004 +PPUSCROLL = $2005 +PPUADDR = $2006 +PPUDATA = $2007 +OAMDMA = $4014 +JOY1 = $4016 + +APUPC1BASE = $4000 +APUPC1SWEEP = $4001 +APUPC1TLOW = $4002 +APUPC1THIGH = $4003 + +APUPC2BASE = $4004 +APUPC2SWEEP = $4005 +APUPC2LOW = $4006 +APUPC2HIGH = $4007 + +APUTRIBASE = $4008 +APUTRILOW = $400A +APUTRIHIGH = $400B + +APUNOISEBASE = $400C +APUNOISELOOP = $400E +APUNOISELENGTH = $400F + +APUDMABASE = $4010 +APUDMALOAD = $4011 +APUDMAADDR = $4012 +APUDMALEN = $4013 + +APUCTRL = $4015 +APUSTATUS = $4015 +APUFRAMECNT = $4017 + + +PAD_RIGHT=$01 +PAD_LEFT=$02 +PAD_DOWN=$04 +PAD_UP=$08 +PAD_START=$10 +PAD_SELECT=$20 +PAD_B=$40 +PAD_A=$80 +PAD_HORIZONTAL=PAD_LEFT|PAD_RIGHT +PAD_VERTICAL=PAD_UP|PAD_DOWN +PAD_DPAD=PAD_HORIZONTAL|PAD_VERTICAL +PAD_MENU_INPUT=PAD_SELECT|PAD_START|PAD_VERTICAL + +;---------------------------------------------------- +; Pacman Specific +;---------------------------------------------------- + +NmiHandlerOffset = $C10E +ResetOffset = $C033 +IrqHandlerOffset = $C17E + +;============================================================================== +; Zero Page +;============================================================================== + +;------------------------------------------------------------------------------ +; General work pointers / scratch +;------------------------------------------------------------------------------ + +workPtr0 = $00 +workPtr1 = $02 + +workValue0 = $04 +workValue1 = $05 +workValue2 = $06 +workValue3 = $07 +workValue4 = $08 +workValue5 = $09 + +;------------------------------------------------------------------------------ +; Maze pathfinding / direction selection workspace +;------------------------------------------------------------------------------ + +pathCompareValue = $0A +pathFallbackValue = $0B +legalDirections = $0C + +;------------------------------------------------------------------------------ +; Indirect dispatcher vector +;------------------------------------------------------------------------------ + +dispatchVector = $10 + +;------------------------------------------------------------------------------ +; 16-bit arithmetic workspace +;------------------------------------------------------------------------------ + +arithmeticValue = $12 +arithmeticOperand = $14 + + +;------------------------------------------------------------------------------ +; Actor fixed-point/motion records +; +; Each actor record occupies four bytes. +;------------------------------------------------------------------------------ + +pacmanMotion = $1A +ghost1Motion = $1E +ghost2Motion = $22 +ghost3Motion = $26 +ghost4Motion = $2A + +;------------------------------------------------------------------------------ +; Pac-Man maze targeting +;------------------------------------------------------------------------------ + +pacmanTargetRow = $2E +pacmanTargetColumn = $30 + + +;------------------------------------------------------------------------------ +; Sprite/animation selection +;------------------------------------------------------------------------------ + +pacmanSpriteFrame = $32 +ghostSpriteFrames = $33 + + +;------------------------------------------------------------------------------ +; Ghost direction/control state +;------------------------------------------------------------------------------ + +ghostDirectionFlags = $39 + +;------------------------------------------------------------------------------ +; Main gameplay state +;------------------------------------------------------------------------------ + +gameState = $3F + +;------------------------------------------------------------------------------ +; PPU / player-screen state +;------------------------------------------------------------------------------ + +ppuCtrlShadow = $43 + +cocktailModeFlag = $46 +activePlayerFlag = $47 +gameplaySuspended = $48 + +frameCounter = $4B +stateTimer = $4C + +;------------------------------------------------------------------------------ +; Input / Pac-Man movement +;------------------------------------------------------------------------------ + +currentInput = $4D +newlyPressedInput = $4E +previousInput = $4F + +pacmanRequestedDirection = $50 +pacmanDirection = $51 + + +;------------------------------------------------------------------------------ +; Score / round / maze progression +;------------------------------------------------------------------------------ + +highScoreDigits = $61 + +roundNumber = $67 +roundDisplayValue = $68 + +pelletsRemaining = $6A +extraLifeAwarded = $6B + +actorStatusDisplay = $6C + +playerScoreDigits = $70 + +;------------------------------------------------------------------------------ +; Audio Engine +;------------------------------------------------------------------------------ +audioRequestPtr = $F0 +audioChannelTablePtr = $F2 +audioSequenceTablePtr = $F4 +audioWorkPtr = $F6 +audioWorkValue = $F7 +audioChannelFlags = $F8 +audioRequestIndex = $FC +audioChannelOffset = $FD +audioIndirectPtr = $FE + +.segment "PRG" + +.org $C000 + +CopyrightText: + .byte $43,$4F,$50,$59,$20,$52,$49,$47 + .byte $48,$54,$20,$31,$39,$38,$34,$20 + .byte $31,$39,$39,$33,$20,$4E,$41,$4D + .byte $43,$4F,$20,$4C,$54,$44,$2E,$20 + .byte $41,$4C,$4C,$20,$52,$49,$47,$48 + .byte $54,$53,$20,$52,$45,$53,$45,$52 + .byte $56,$45,$44 + +Reset: + ldx #$00 + stx PPUCTRL + sei + cld + dex + txs + nop + nop + nop + + ldx #$02 + +@WaitForPpu: + lda #$06 + sta PPUMASK + + lda PPUSTATUS + +@WaitVBlank: + lda PPUSTATUS + bpl @WaitVBlank + + lda #$00 + sta PPUSCROLL + sta PPUSCROLL + dex + bne @WaitForPpu + + lda #$00 + tay + +@ClearLowRam: + sta $0000,y + iny + cpy #$3E + bne @ClearLowRam + + ldx #$08 + ldy #$87 + +@ClearRamPages: + sta ($00),y + iny + bne @ClearRamPages + inc $01 + cpx $01 + bne @ClearRamPages + + lda #$06 + sta PPUMASK + + lda #$00 + sta PPUSCROLL + sta PPUSCROLL + sta $41 + sta $42 + sta PPUCTRL + sta PPUMASK + tay + +@CheckRamSignature: + lda RamSignature,y + cmp $0052,y + bne @InitializeRamSignature + + iny + cpy #$0F + bne @CheckRamSignature + + beq @SignatureAlreadyPresent + +@InitializeRamSignature: + lda #$00 + tay + +@ClearZeroPage: + sta $0000,y + iny + bne @ClearZeroPage + + ldy #$00 + +@CopyRamSignature: + lda RamSignature,y + sta $0052,y + iny + cpy #$0F + bne @CopyRamSignature + + lda #$01 + sta $64 + +@SignatureAlreadyPresent: + ldy #$00 + sty $3F + + lda #$07 + sta $45 + lda #$01 + cmp $47 + bne @SkipSwap + + cmp $46 + bne @SkipSwap + +@SwapLoop: + lda $77,y + sta workPtr0 + + lda $67,y + sta $77,y + + lda workPtr0 + sta $67,y + + iny + cpy #$10 + bne @SwapLoop + +@SkipSwap: + lda #$1F + sta APUCTRL + + lda #$C0 + sta APUFRAMECNT + + jsr InitializeAudioEngine + jsr $EEB4 + + lda #$88 + sta $43 + sta PPUCTRL + + lda #$FF + sta $48 + sta $023F + sta $024B + + jmp MainEntry + +RamSignature: +.byte "HIROKI AOYAGI" +.byte $AA, $55 + +;============================================================================== +; $C10E-$C17E: NMI Handler +; +; Local: +; Handles the per-frame NMI. Saves the CPU registers, configures the PPU, +; performs sprite OAM DMA, calls several frame-processing routines, restores +; the current scroll and PPU control state, polls both controllers, selects +; the active controller input, and conditionally performs additional +; per-frame processing. +; +; Global: +; Primary VBlank/frame interrupt entry point. This routine ties together +; rendering updates, sprite DMA, controller polling, and other work that +; needs to occur once per video frame. +; +; Notes: +; $41/$42 are used as the two PPUSCROLL writes. +; $45 supplies the source page for OAM DMA. +; $4D/$4E receive controller 1/2 input bits. +; $4F receives the controller state selected by $46/$47. +; +; The purposes of $40-$48 and the called routines at FlushGameplayPpuUpdates +; ReadNearbyNametableTiles, UpdatePalettes, and InitializeAudioChannels will +; be refined during later passes. +;============================================================================== + +NmiHandler: + pha + txa + pha + tya + pha + + lda #$1E + sta PPUMASK + + lda #$00 + sta OAMADDR + sta $40 + + lda $45 + sta OAMDMA + + jsr FlushGameplayPpuUpdates + jsr ReadNearbyNametableTiles + jsr UpdatePalettes + + ; Restore the two PPU scroll components. + lda $41 + sta PPUSCROLL + + lda $42 + sta PPUSCROLL + + ; Construct the PPUCTRL value for this frame. + lda $47 + and $46 + and #$01 + asl + ora $43 + sta PPUCTRL + + ; Strobe the controller ports. + lda #$01 + sta JOY1 + + lda #$00 + sta JOY1 + + ; Read eight serial bits from both controllers. + ldx #$08 + +@ReadControllers: + lda JOY1 + and #$03 + cmp #$01 + ror $4D + + lda APUFRAMECNT + and #$03 + cmp #$01 + ror $4E + + dex + bne @ReadControllers + + ; Controller 1 is the default input source. + ldx currentInput + + ; Under the condition controlled by $46/$47, + ; use controller 2 instead. + lda cocktailModeFlag + and activePlayerFlag + beq @ControllerSelected + + ldx newlyPressedInput + +@ControllerSelected: + stx previousInput + + ; Advance a per-frame counter. + inc frameCounter + + ; $48 gates an additional per-frame routine. + lda $48 + bne @NmiDone + + jsr InitializeAudioChannels + +@NmiDone: + pla + tay + pla + tax + pla +IrqHandler: + rti + +UpdatePalettes: + lda $0299 + cmp #$0F + bne @CheckSecondPalette + + lda PPUSTATUS + lda #$3F + sta PPUADDR + lda #$00 + sta PPUADDR + + ldy #$00 + +@CopyFirstPalette: + lda $0299,y + sta PPUDATA + iny + cpy #$10 + bne @CopyFirstPalette + +@CheckSecondPalette: + lda $02A9 + cmp #$0F + bne @CheckPaletteState + + lda PPUSTATUS + lda #$3F + sta PPUADDR + lda #$10 + sta PPUADDR + + ldy #$00 + +@CopySecondPalette: + lda $02A9,y + sta PPUDATA + iny + cpy #$10 + bne @CopySecondPalette + +@CheckPaletteState: + lda $0299 + cmp #$0F + beq @ResetPpuAddress + + lda $02A9 + cmp #$0F + beq @ResetPpuAddress + + rts + +@ResetPpuAddress: + lda #$30 + sta PPUADDR + + lda #$00 + sta PPUADDR + sta PPUADDR + sta PPUADDR + + sta $0299 + sta $02A9 + + rts + + +;============================================================================== +; $C1E7-$C266: Main Initialization and State Dispatch +; +; Local: +; Synchronizes with the NMI through $40, initializes PPU/OAM and several +; game-state variables, calls four initialization routines, initializes the +; two 16-byte palette buffers, then enters the main state-dispatch loop. +; +; The loop synchronizes with NMI again, uses $3F as an index into a table of +; five handler addresses, stores the selected address in $10/$11, and jumps +; to that handler indirectly. +; +; Global: +; This is the main program entry reached from Reset after hardware and RAM +; initialization. It transitions the game into its normal frame-driven state +; machine. NMI clears $40 each frame, allowing the foreground/main code to +; proceed through its next state-machine update. +; +; Notes: +; $40 clearly provides synchronization between foreground code and NMI. +; Writing $01 to $40 and spinning until NMI clears it forms a frame wait. +; +; $3F is used here as a state/dispatch index. Its exact semantic states will +; be named as the individual handlers are decoded. +; +; $10/$11 form a temporary indirect JMP pointer. +; +; $C267 begins the state-handler address table and is intentionally left for +; the next decoding pass. +;============================================================================== + +MainEntry: + lda #$01 + sta $40 + +@WaitForInitialNmi: + lda $40 + bne @WaitForInitialNmi + + lda #$08 + sta PPUCTRL + sta ppuCtrlShadow + + lda PPUSTATUS + + lda #$00 + sta PPUMASK + + tax + +@ClearOamPage: + sta $0700,x + inx + bne @ClearOamPage + + sta cocktailModeFlag + + jsr ClearGameplayNametables + jsr InitializeNametableAttributes + jsr InitializeNametableData + jsr $E419 + + ldy #$00 + +@InitializePaletteBuffers: + lda TitleScreenPalette,y + sta $0299,y + iny + cpy #$20 + bne @InitializePaletteBuffers + + lda #$2D + sta actorStatusDisplay + sta actorStatusDisplay+1 + sta actorStatusDisplay+2 + sta actorStatusDisplay+3 + + lda #$FF + sta $023F + sta gameplaySuspended + + lda #$00 + sta activePlayerFlag + sta cocktailModeFlag + sta $42 + sta $41 + sta stateTimer + sta $87 + sta $88 + + lda gameState + bne @UseAlternatePpuCtrl + + lda #$8A + bne @SetPpuCtrl + +@UseAlternatePpuCtrl: + lda #$88 + +@SetPpuCtrl: + sta PPUCTRL + sta ppuCtrlShadow + +MainDispatchLoop: + lda #$01 + sta $40 + +@WaitForNmi: + lda $40 + bne @WaitForNmi + + ldy gameState + + lda $C267,y + sta dispatchVector + + lda $C268,y + sta dispatchVector+1 + + jmp ($0010) + +;============================================================================== +; $C267-$C26E: Main State Dispatch Table +; +; Local: +; Four 16-bit addresses used by the indirect state dispatcher at the end of +; MainEntry. $3F is used directly as a byte offset into this table: +; +; lda MainStateHandlerTable,y +; sta $10 +; lda MainStateHandlerTable+1,y +; sta $11 +; jmp ($0010) +; +; This implies the normal state values in $3F are even byte offsets: +; $00, $02, $04, $06 +; +; Global: +; Selects one of four major foreground/game-state handlers. This is the +; top-level state machine entered after Reset initialization and synchronized +; to the NMI-driven frame loop. +; +; Notes: +; The four targets are: +; InitialStateHandler +; PlayerSelectionState +; State04Handler +; TimedStateTransition +; +; Handler names remain provisional until each target is decoded. +;============================================================================== + +MainStateHandlerTable: + .word InitialStateHandler + .word PlayerSelectionState + .word State04Handler + .word TimedStateTransition + +;============================================================================== +; $C26F-$C279: Timed State Transition Handler +; +; Local: +; Decrements the counter at $0F once per frame. While the counter remains +; nonzero, control returns to the common NMI synchronization/dispatch loop +; at $C250. +; +; When the counter reaches zero, changes the main state offset at $3F to +; $02 and then returns to the same dispatch loop. +; +; Global: +; Implements the handler selected when the main state offset is $06. +; This appears to be a timed transitional state. Another state places a +; duration in $0F and selects state $06; this handler counts that duration +; down before advancing to state $02. +; +; Notes: +; $0F is clearly being used as a countdown timer here, but its broader use +; should be traced before assigning it a permanent global name. +; +; $3F is the byte offset into MainStateHandlerTable: +; $00 -> InitialStateHandler +; $02 -> PlayerSelectionState +; $04 -> State04Handler +; $06 -> this handler +; +; $C250 is inside MainEntry and is the common frame synchronization point. +;============================================================================== + +TimedStateTransition: + dec $0F + bne MainDispatchLoop + + lda #$02 + sta gameState + + jmp MainDispatchLoop + + +;============================================================================== +; $C27A-$C2A5: Initial/Input State Handler +; +; Local: +; Checks controller-1 state bits $0C. If either bit is set, selects state +; $06, initializes the countdown at $0F to $5A, and jumps back to MainEntry. +; +; Otherwise increments $42. When $42 reaches $F0, resets it to zero, +; changes the saved PPUCTRL value at $43 to $88, and selects state $06 +; with the same $5A countdown. +; +; If $42 has not yet reached $F0, the initialization of state $06 is +; skipped and execution reaches the common JMP back to MainDispatchLoop. +; +; Global: +; Handler selected by main state offset $00. It appears to manage an early +; or attract/input-wait state, transitioning into the timed state either +; because of controller input or because the scrolling/progression value +; at $42 reaches $F0. +; +; Notes: +; $4D is controller-1 input assembled by NmiHandler. +; $42 is also used as the second PPUSCROLL write during NMI. +; Exact game-state semantics will be refined in later passes. +;============================================================================== + +InitialStateHandler: + lda currentInput + and #$0C + beq @AdvanceScroll + + lda #$06 + sta gameState + + lda #$5A + sta $0F + + jmp MainEntry + +@AdvanceScroll: + inc $42 + + lda #$F0 + cmp $42 + bne @ReturnToMainLoop + + lda #$00 + sta $42 + + lda #$88 + sta ppuCtrlShadow + + lda #$06 + sta gameState + + lda #$5A + sta $0F + +@ReturnToMainLoop: + jmp MainDispatchLoop + +;============================================================================== +; $C2A6-$C30A: Initialize Nametable Data +; +; Local: +; Performs two groups of PPU writes used during initial screen setup. +; +; First phase: +; - Begins at PPU address $20E5. +; - Copies $17 bytes from the ROM data at TitleScreenTileBlock +; - Repeats this for six rows. +; - Advances the destination PPU address by $20 after each row. +; +; Second phase: +; - Processes nine variable-length PPU update records beginning at $C3B0. +; - Each record supplies a two-byte PPU address followed by data bytes. +; - $FF terminates the data portion of each record. +; +; Global: +; Called from MainEntry during initial game setup. This routine constructs +; part of the initial nametable/display before normal state dispatch begins. +; +; Notes: +; $00/$01 are used here as a 16-bit PPU destination address. +; $02 counts the six repeated rows. +; $03 counts $17 bytes within each row. +; +; TitleScreenTileBlock is a repeated row of tile data. +; $C3B0 contains nine encoded PPU update records. +; +; These ROM data blocks will be named more precisely when their contents +; and resulting screen regions are decoded in later passes. +;============================================================================== + +InitializeNametableData: + ; Initial PPU destination = $20E5. + lda #$20 + sta workPtr0 + + lda #$E5 + sta workPtr0+1 + + ; Write six rows. + lda #$06 + sta workPtr1 + + ldy #$00 + +@WriteRow: + lda PPUSTATUS + + lda workPtr0 + sta PPUADDR + + lda workPtr0+1 + sta PPUADDR + + ; Each row contains $17 bytes. + lda #$17 + sta workPtr1+1 + +@WriteRowBytes: + lda TitleScreenTileBlock,y + sta PPUDATA + + iny + + dec workPtr1+1 + bne @WriteRowBytes + + ; Advance the PPU destination by $20. + lda workPtr0+1 + clc + adc #$20 + sta workPtr0+1 + + lda #$00 + adc workPtr0 + sta workPtr0 + + dec workPtr1 + bne @WriteRow + + ; Process nine additional encoded PPU update records. + lda #$09 + sta workPtr0 + + ldy #$00 + +@NextPpuRecord: + lda PPUSTATUS + + ; First two bytes of each record are the PPU destination address. + lda TitleScreenPpuRecords,y + sta PPUADDR + iny + + lda TitleScreenPpuRecords,y + sta PPUADDR + iny + +@WritePpuRecord: + lda TitleScreenPpuRecords,y + cmp #$FF + beq @EndPpuRecord + + sta PPUDATA + iny + bne @WritePpuRecord + +@EndPpuRecord: + iny + + dec workPtr0 + bne @NextPpuRecord + + rts + + +;============================================================================== +; $C30B-$C325: Initialize Nametable Attributes +; +; Local: +; Writes $18 bytes from TitleScreenAttributeData to PPU address $23C8. +; +; Global: +; Initializes a portion of the nametable attribute table during startup. +;============================================================================== + +InitializeNametableAttributes: + lda PPUSTATUS + + lda #$23 + sta PPUADDR + + lda #$C8 + sta PPUADDR + + ldy #$00 + +@CopyAttributes: + lda TitleScreenAttributeData,y + sta PPUDATA + + iny + cpy #$18 + bne @CopyAttributes + + rts + + +;============================================================================== +; $C326-$C3AF: Initial Nametable Tile Block +; +; Local: +; Contains six rows of $17 (23) tile indices. InitializeNametableData copies +; these rows sequentially to the PPU beginning at $20E5, advancing the PPU +; destination by $20 after each row. +; +; Destination layout: +; Row 0 -> $20E5-$20FB +; Row 1 -> $2105-$211B +; Row 2 -> $2125-$213B +; Row 3 -> $2145-$215B +; Row 4 -> $2165-$217B +; Row 5 -> $2185-$219B +; +; Global: +; Forms a rectangular portion of the initial nametable display constructed +; during MainEntry. The first and last rows consist primarily of border +; tiles, while the middle four rows contain the interior graphic/tile data. +; +; Notes: +; Each row is exactly $17 bytes. +; +; Tile values are left numeric during this pass. Their visual meanings can +; be determined later from the CHR-ROM and assigned symbolic tile names if +; useful. +;============================================================================== + +TitleScreenTileBlock: + ; Row 0 -> PPU $20E5-$20FB + .byte $E4,$E8,$E8,$E8,$E8,$E8,$E8,$E8 + .byte $E8,$E8,$E8,$E8,$E8,$E8,$E8,$E8 + .byte $E8,$E8,$E8,$E8,$E8,$E8,$E5 + + ; Row 1 -> PPU $2105-$211B + .byte $EB,$88,$80,$81,$82,$83,$84,$85 + .byte $86,$87,$88,$88,$89,$8A,$8B,$8C + .byte $8D,$8E,$8F,$90,$91,$A3,$E9 + + ; Row 2 -> PPU $2125-$213B + .byte $EB,$88,$92,$93,$94,$95,$96,$97 + .byte $98,$99,$9A,$9B,$9C,$9D,$9E,$9F + .byte $A0,$A1,$A2,$A3,$A4,$A3,$E9 + + ; Row 3 -> PPU $2145-$215B + .byte $EB,$88,$92,$A5,$A6,$A7,$A8,$A9 + .byte $AA,$AB,$AC,$AD,$AE,$A3,$AF,$D0 + .byte $D1,$D2,$A3,$D3,$A4,$A3,$E9 + + ; Row 4 -> PPU $2165-$217B + .byte $EB,$88,$D4,$D5,$D6,$D7,$D8,$D9 + .byte $DA,$DB,$88,$88,$DC,$D7,$DD,$DE + .byte $DF,$E0,$E1,$E2,$E3,$A3,$E9 + + ; Row 5 -> PPU $2185-$219B + .byte $E7,$EA,$EA,$EA,$EA,$EA,$EA,$EA + .byte $EA,$EA,$EA,$EA,$EA,$EA,$EA,$EA + .byte $EA,$EA,$EA,$EA,$EA,$EA,$E6 + +;============================================================================== +; $C3B0-$C43E: Initial Screen PPU Records +; +; Local: +; Nine variable-length PPU write records consumed by InitializeNametableData. +; Each record has the form: +; +; .byte PPU address high +; .byte PPU address low +; .byte tile data... +; .byte $FF +; +; InitializeNametableData processes exactly nine records. For each record it +; loads the two-byte destination into PPUADDR and copies tile values to +; PPUDATA until the $FF terminator is encountered. +; +; Global: +; Supplies additional initial-screen graphics and text after the main +; six-row tile block has been installed. These records include player-count +; selections and copyright/licensing text as represented by the ROM's +; nametable tile values. +; +; Notes: +; Many values correspond directly to ASCII character codes, but not all do. +; Preserve the original tile bytes rather than converting these records to +; assembler strings during this pass. +; +; $FF is structural and is not written to PPUDATA. +;============================================================================== + +TitleScreenPpuRecords: +;------------------------------------------------------------------------------ +; Record 0: $C3B0-$C3C7 +; PPU destination: $2065 +; Data length: $15 (21) tiles +;------------------------------------------------------------------------------ + .byte $20,$65 + .byte $B0,$B3,$B2,$20,$20,$20,$20 + .byte $B4,$B5,$B6,$B7,$B8,$B9,$BA,$BB + .byte $20,$20,$20,$B1,$B3,$B2 + .byte $FF + +;------------------------------------------------------------------------------ +; Record 1: $C3C8-$C3D2 +; PPU destination: $220C +; Data length: $08 +; +; Visible tile values correspond to: +; "1 PLAYER" +;------------------------------------------------------------------------------ + .byte $22,$0C + .byte $31,$20,$50,$4C,$41,$59,$45,$52 + .byte $FF + +;------------------------------------------------------------------------------ +; Record 2: $C3D3-$C3DE +; PPU destination: $224C +; Data length: $09 +; +; Visible tile values correspond to: +; "2 PLAYERS" +;------------------------------------------------------------------------------ + .byte $22,$4C + .byte $32,$20,$50,$4C,$41,$59,$45,$52,$53 + .byte $FF + +;------------------------------------------------------------------------------ +; Record 3: $C3DF-$C3FC +; PPU destination: $22E3 +; Data length: $1B (27) +; +; Mostly text-like tile data containing the original copyright/date/NAMCO +; display. Special tile values are retained numerically. +;------------------------------------------------------------------------------ + .byte $22,$E3 + .byte $54,$4D,$20,$CC,$20,$5D + .byte $20,$31,$39,$38,$30 + .byte $20,$31,$39,$39,$33 + .byte $20,$4E,$41,$4D,$43,$4F + .byte $20,$4C,$54,$44,$5B + .byte $FF + +;------------------------------------------------------------------------------ +; Record 4: $C3FD-$C411 +; PPU destination: $2327 +; Data length: $12 (18) +; +; Mostly text-like tile data containing: +; NAMCO HOMETEK ... INC +; +; Special tile values remain numeric. +;------------------------------------------------------------------------------ + .byte $23,$27 + .byte $4E,$41,$4D,$43,$4F,$20 + .byte $48,$4F,$4D,$45,$54,$45,$4B + .byte $CD + .byte $49,$4E,$43 + .byte $5B + .byte $FF + +;------------------------------------------------------------------------------ +; Record 5: $C412-$C428 +; PPU destination: $2366 +; Data length: $14 (20) +; +; Tile values correspond to: +; "LICENSED BY NINTENDO" +;------------------------------------------------------------------------------ + .byte $23,$66 + .byte $4C,$49,$43,$45,$4E,$53,$45,$44 + .byte $20 + .byte $42,$59 + .byte $20 + .byte $4E,$49,$4E,$54,$45,$4E,$44,$4F + .byte $FF + +;------------------------------------------------------------------------------ +; Record 6: $C429-$C42D +; PPU destination: $2293 +; Data length: $02 +;------------------------------------------------------------------------------ + .byte $22,$93 + .byte $CE,$CF + .byte $FF + +;------------------------------------------------------------------------------ +; Record 7: $C42E-$C439 +; PPU destination: $22AC +; Data length: $09 +;------------------------------------------------------------------------------ + .byte $22,$AC + .byte $23,$24,$25,$26,$27,$28,$29,$2A,$2B + .byte $FF + +;------------------------------------------------------------------------------ +; Record 8: $C43A-$C43E +; PPU destination: $20FC +; Data length: $02 +;------------------------------------------------------------------------------ + .byte $20,$FC + .byte $0E,$0F + .byte $FF + + +;============================================================================== +; $C43F-$C45E: Initial Palette Data +; +; Local: +; Contains $20 bytes copied to RAM $0299-$02B8 during MainEntry. The first +; $10 bytes feed PPU palette $3F00-$3F0F and the second $10 bytes feed +; $3F10-$3F1F through UpdatePalettes. +; +; Global: +; Defines the initial background and sprite palette configuration. +; +; Notes: +; Palette values remain numeric during this pass. +;============================================================================== + +TitleScreenPalette: + + ; Background palettes + .byte $0F,$20,$0F,$06 + .byte $0F,$26,$20,$27 + .byte $0F,$06,$0F,$26 + .byte $0F,$06,$20,$26 + + ; Sprite palettes + .byte $0F,$27,$20,$06 + .byte $0F,$11,$20,$33 + .byte $0F,$20,$20,$21 + .byte $0F,$09,$20,$17 + + +;============================================================================== +; $C45F-$C476: Initial Nametable Attribute Data +; +; Local: +; Contains $18 attribute bytes copied by InitializeNametableAttributes to +; PPU $23C8-$23DF. +; +; Global: +; Defines background-palette selections for part of the initial nametable +; display. +; +; Notes: +; Attribute bytes remain raw during this first pass. +;============================================================================== + +TitleScreenAttributeData: + .byte $80,$A0,$A0,$A0,$A0,$A0,$A0,$00 + .byte $00,$66,$55,$55,$55,$55,$DD,$00 + .byte $08,$0A,$0A,$0A,$0A,$0A,$0A,$00 + +;============================================================================== +; $C477-$C506: Player Selection State Handler +; +; Local: +; Handles input and display updates for the player-count selection state. +; +; On first entry, identified by $87/$88 both being zero, copies a small +; display-data sequence from $C507 to RAM beginning at $024B and captures +; the current controller states for bits $04 and $08. +; +; $87/$88 form a 16-bit counter that advances once per frame. When its high +; byte reaches $02, the counter is reset and the main state changes to $04. +; +; During normal processing: +; - Detects changes to controller bit $04. +; - When that bit becomes active, toggles $47 between 0 and 1 and changes +; display data associated with the selected player count. +; - Detects changes to controller bit $08. +; - When bit $08 becomes active, clears $48, calls $EEB4, and jumps to +; GameModeEntry. +; +; Global: +; Handler selected by MainStateHandlerTable when $3F = $02. The surrounding PPU +; data and controller behavior strongly indicate that this state implements +; the "1 PLAYER" / "2 PLAYERS" selection screen. +; +; If no selection completes within the $87/$88 timeout, execution advances +; automatically to main state $04. +; +; Notes: +; $50 stores the previous masked state of controller bit $04. +; $51 stores the previous masked state of controller bit $08. +; +; $87/$88 act as a 16-bit frame counter in this state. +; +; $47 is toggled between 0 and 1 when the $04 input becomes active. This +; strongly suggests it represents the current 1-player/2-player selection, +; but the name should be confirmed through later consumers. +; +; $C507 begins an adjacent display-data table consumed during state entry. +;============================================================================== + +PlayerSelectionState: + lda $87 + ora $88 + bne @AdvanceTimeout + + ldy #$00 + +@InitializeDisplayData: + lda PlayerCountSelectionDisplayData,y + sta $024B,y + iny + cmp #$FF + bne @InitializeDisplayData + + lda currentInput + and #$04 + sta pacmanRequestedDirection + + lda currentInput + and #$08 + sta pacmanDirection + +@AdvanceTimeout: + clc + lda #$01 + adc $87 + sta $87 + + lda $88 + adc #$00 + sta $88 + + cmp #$02 + bne @CheckSelectionInput + + lda #$00 + sta $87 + + lda #$04 + sta gameState + + jmp MainDispatchLoop + +@CheckSelectionInput: + lda currentInput + and #$04 + cmp pacmanRequestedDirection + beq @CheckConfirmInput + + sta pacmanRequestedDirection + + lda #$00 + sta $88 + + lda #$01 + sta $87 + + lda pacmanRequestedDirection + beq @CheckConfirmInput + + ldx #$00 + + inc activePlayerFlag + lda activePlayerFlag + and #$01 + sta activePlayerFlag + beq @UseFirstSelectionData + + inx + +@UseFirstSelectionData: + lda $C50F,x + sta $024D + + lda $C510,x + sta $0251 + + lda #$22 + sta $024B + + jmp MainDispatchLoop + +@CheckConfirmInput: + lda currentInput + and #$08 + cmp pacmanDirection + bne @ConfirmStateChanged + + jmp MainDispatchLoop + +@ConfirmStateChanged: + sta pacmanDirection + + lda pacmanDirection + bne @ConfirmPressed + + jmp MainDispatchLoop + +@ConfirmPressed: + lda #$00 + sta gameplaySuspended + + jsr $EEB4 + + jmp GameModeEntry + +;============================================================================== +; $C507-$C511: Player Selection Display Data +; +; Local: +; Contains display-update data used by PlayerSelectionState. +; +; The first eight bytes, $C507-$C50E, are copied to RAM beginning at $024B +; when the player-selection state is first entered. The copy terminates after +; the $FF byte has also been stored. +; +; The final three bytes, $C50F-$C511, form an overlapping pair table used +; when $47 toggles between its two selection values: +; +; X = 0 -> $5C, $20 +; X = 1 -> $20, $5C +; +; These values are written to $024D and $0251, respectively. +; +; Global: +; Provides the display-update data for the "1 PLAYER" / "2 PLAYERS" +; selection state. The overlapping three-byte table moves a $5C tile +; between two display positions while placing $20 at the other position. +; +; Notes: +; $5C appears to be the selection-marker tile and $20 appears to clear the +; alternate position. Their exact visual appearance can be confirmed later +; against CHR-ROM. +; +; $FF terminates the initialization data copied to $024B. +;============================================================================== + +PlayerCountSelectionDisplayData: + .byte $22,$0A,$5C,$00 + .byte $22,$4A,$20,$FF + +PlayerCountSelectionMarkerTiles: + .byte $5C,$20,$5C + + +;============================================================================== +; $C512-$C52D: State $04 Handler / Substate Dispatcher +; +; Local: +; Handles the top-level processing for main state $04. +; +; First checks controller-1 bits $0C. If either bit is active, changes the +; main state back to $02 and jumps to MainEntry, causing the main display +; initialization sequence to run again. +; +; Otherwise uses $87 as a byte offset into a table of 16-bit handler +; addresses beginning at $C52E. The selected address is placed in $10/$11 +; and execution jumps to it indirectly. +; +; Global: +; This is the fourth major handler in MainStateHandlerTable. Unlike states $00, +; $02, and $06, state $04 contains its own secondary state machine driven +; by $87. +; +; $87 therefore has a different role depending on the current main state. +; In state $02 it participated in a 16-bit frame counter with $88. Here it +; acts as the byte offset into a secondary dispatch table. +; +; Notes: +; $87 appears to take even values because it indexes packed 16-bit addresses +; directly rather than multiplying a state number by two. +; +; The substate table begins immediately afterward at $C52E. +; We leave the individual substate handlers for following passes. +;============================================================================== + +State04Handler: + lda currentInput + and #$0C + beq @DispatchSubstate + + lda #$02 + sta gameState + + jmp MainEntry + +@DispatchSubstate: + ldy $87 + + lda State04SubstateTable,y + sta dispatchVector + + lda State04SubstateTable+1,y + sta dispatchVector+1 + + jmp ($0010) + +;============================================================================== +; $C52E-$C545: State $04 Substate Dispatch Table +; +; Local: +; Twelve 16-bit handler addresses selected by State04Handler using $87 as +; a direct byte offset. +; +; Valid offsets observed from the table structure are: +; $00,$02,$04,$06,$08,$0A,$0C,$0E,$10,$12,$14,$16 +; +; Global: +; Defines the secondary state machine used while the top-level game state +; is $04. Several intermediate substates deliberately share the same handler +; at $C573. +; +; Notes: +; Later code advances $87 using two INC instructions, confirming that $87 +; is a byte offset into this table rather than an ordinal state number. +;============================================================================== + +State04SubstateTable: + .word State04Initialize ; $00 + .word State04TimedSubstate ; $02 + .word State04TimedSubstate ; $04 + .word State04TimedSubstate ; $06 + .word State04TimedSubstate ; $08 + .word State04TimedSubstate ; $0A + .word State04TimedSubstate ; $0C + .word State04TimedSubstate ; $0E + .word State04TimedSubstate ; $10 + .word State04TimedSubstate ; $12 + .word State04LongDelay ; $14 + .word State04FinalPhase ; $16 + +;============================================================================== +; $C546-$C572: State $04 Initialization Substate +; +; Local: +; Performs the one-time initialization for state $04 when substate offset +; $87 is $00. +; +; First synchronizes with NMI using $40. It then sets PPUCTRL/$43 to $08, +; disables rendering through PPUMASK, clears $88, and calls three setup +; routines: +; +; $C5D8 +; $C608 +; SetSelectionFlagAndContinue +; +; After setup completes, advances $87 by two, selecting substate $02 on the +; following frame. PPUCTRL/$43 are then changed to $88 before returning to +; MainDispatchLoop. +; +; Global: +; Entry/initialization substate for the secondary state machine used by +; main state $04. It prepares the display and state-specific data before +; handing execution to the shared $C573 substate handler. +; +; Notes: +; $40 continues to act as the foreground/NMI synchronization flag. +; +; $87 is a byte offset into State04SubstateTable. The two INC instructions +; deliberately advance it from $00 to $02. +; +; The three called routines remain structurally named by address until they +; are decoded. $C5D8 and $C608 appear to perform direct PPU initialization, +; while SetSelectionFlagAndContinue operates on state/display data. +;============================================================================== + +State04Initialize: + lda #$01 + sta $40 + +@WaitForNmi: + lda $40 + bne @WaitForNmi + + lda #$08 + sta PPUCTRL + sta ppuCtrlShadow + + lda #$00 + sta PPUMASK + sta $88 + + jsr $C5D8 + jsr InitializeState04PpuData + jsr LoadState04DisplayData + + inc $87 + inc $87 + + lda #$88 + sta PPUCTRL + sta ppuCtrlShadow + + jmp MainDispatchLoop + +;============================================================================== +; $C573-$C588: State $04 Shared Timed Substate Handler +; +; Local: +; Advances $88 once per frame. At $30 frames, clears $88, invokes the +; state-$04 display-data helper, and advances $87 by two to the next +; secondary state. +; +; Global: +; Shared timing handler used by state-$04 substates $02-$12. +; +; Notes: +; LoadState04DisplayData is kept as a raw address temporarily to guarantee +; byte identity while the overlapping $C5A6-$C5D8 region is being resolved. +;============================================================================== + +State04TimedSubstate: + inc $88 + + lda $88 + cmp #$30 + bne @ReturnToMainLoop + + lda #$00 + sta $88 + + jsr $C5A6 + + inc $87 + inc $87 + +@ReturnToMainLoop: + jmp MainDispatchLoop + +;============================================================================== +; $C589-$C59F: State $04 Long Delay Substate +; +; Local: +; Increments $88 once per frame and waits until it reaches $80. +; +; While $88 is not $80, returns to MainDispatchLoop. +; +; When $88 reaches $80: +; - Advances $87 by two, selecting substate $16. +; - Clears $88. +; - Returns to MainDispatchLoop. +; +; Global: +; Implements substate $14 of the state $04 secondary state machine. It +; follows the series of $30-frame substates handled by +; State04TimedSubstate and introduces a longer delay before entering the +; final known substate at $16. +; +; Notes: +; $88 is the frame counter for this substate. +; $87 is the byte offset into State04SubstateTable. +; +; Unlike substates $02-$12, reaching the timeout here does not call +; SetSelectionFlagAndContinue. It simply advances from substate $14 to $16. +;============================================================================== + +State04LongDelay: + inc $88 + + lda $88 + cmp #$80 + beq @AdvanceSubstate + + jmp MainDispatchLoop + +@AdvanceSubstate: + inc $87 + inc $87 + + lda #$00 + sta $88 + + jmp MainDispatchLoop + + +;============================================================================== +; $C59F-$C5A5: Select Alternate Player Mode and Continue +; +; Local: +; Sets $47 to $01 and tail-jumps to the routine at GameModeEntry. +; +; Global: +; Forces the same $47 flag that PlayerSelectionState toggles between $00 +; and $01, then transfers control to GameModeEntry. This strongly links the routine +; to the player-count/player-mode selection logic. +; +; The exact global purpose of GameModeEntry has not yet been decoded, so the routine +; and $47 remain conservatively named during this pass. +; +; Notes: +; There is no RTS. Control is permanently transferred to GameModeEntry. +; +; $47 is known to be constrained to 0/1 by PlayerSelectionState and is also +; consulted by NmiHandler when selecting controller input and constructing +; PPUCTRL. We should trace GameModeEntry before assigning $47 a final semantic name. +;============================================================================== + +SetSelectionFlagAndContinue: + lda #$01 + sta activePlayerFlag + jmp GameModeEntry + + +;============================================================================== +; $C5A6-$C5D7: State $04 Display Data Loader +; +; Local: +; Uses $87 as a byte offset into a pointer table at $C687. The selected +; $FF-terminated stream is copied through $00/$01 into RAM beginning at +; $024B, including the $FF terminator. +; +; The byte following the terminator controls an optional secondary copy: +; nonzero -> return +; zero -> copy 16 bytes using a substate-derived offset +; +; Global: +; Supplies update/display data as the state-$04 secondary state machine +; progresses. +; +; Notes: +; $00/$01 form the temporary source pointer. +;============================================================================== + +LoadState04DisplayData: + ldy $87 + + lda CharacterIntroDisplayDataTable,y + sta workPtr0 + + lda CharacterIntroDisplayDataTable+1,y + sta workPtr0+1 + + ldy #$00 + +@CopyDisplayData: + lda (workPtr0),y + sta $024B,y + + iny + cmp #$FF + bne @CopyDisplayData + + lda (workPtr0),y + beq @SecondaryCopy + + rts + +@SecondaryCopy: + lda $87 + sec + sbc #$02 + asl + asl + tay + + ldx #$10 + +@CopySecondaryData: + lda CharacterIntroSpriteData,y + sta $0760,y + + iny + dex + bne @CopySecondaryData + + rts + +;============================================================================== +; $C5D8-$C607: Initialize Playfield Area +; +; Local: +; Sets the PPU destination to $20C0 and fills 24 complete 32-tile nametable +; rows. +; +; Each row consists of: +; 2 x $2D +; 28 x $20 +; 2 x $2D +; +; The inner count at $01 is reinitialized to $1C at the beginning of every +; row. $00 begins at $17 and counts rows down through zero. +; +; Global: +; Called during State04Initialize with rendering disabled. Builds the large +; rectangular background area used by state $04. +; +; Notes: +; The BPL at $C605 intentionally returns to $C5E6, not directly to the first +; tile write. This reloads $01 with $1C for every row and must be preserved +; for byte identity. +;============================================================================== + +InitializePlayfieldArea: + lda #$20 + sta PPUADDR + + lda #$C0 + sta PPUADDR + + lda #$17 + sta workPtr0 + +@NextRow: + lda #$1C + sta workPtr0+1 + + lda #$2D + sta PPUDATA + sta PPUDATA + + lda #$20 + +@ClearRowInterior: + sta PPUDATA + dec workPtr0+1 + bne @ClearRowInterior + + lda #$2D + sta PPUDATA + sta PPUDATA + + dec workPtr0 + bpl @NextRow + + rts + +;============================================================================== +; $C608-$C666: Initialize State $04 PPU Data +; +; Local: +; Performs three groups of PPU initialization: +; +; 1. Writes $24 (36) bytes from $C76E to PPUDATA beginning at PPU $23C8. +; +; 2. Processes a sequence of variable-length PPU write records beginning +; at $C69B. Each record contains a two-byte PPU destination followed by +; data bytes terminated by $FF. +; +; 3. Writes a full $20-byte palette table from CharacterIntroPalette to PPU palette RAM +; beginning at $3F00. +; +; After the palette transfer, resets PPUADDR away from palette space and +; returns. +; +; Global: +; Called by State04Initialize while rendering is disabled. Together with +; InitializePlayfieldArea, this routine constructs the PPU state needed by +; the state-$04 display sequence. +; +; Notes: +; Unlike InitializeNametableData, the PPU-record loop at $C61D does not +; contain an explicit record count. The encoded data and Y wrap behavior +; determine when processing terminates. We should decode $C69B before +; assigning a more precise description to that stream. +; +; CharacterIntroPalette begins the 32-byte palette table. +; $C76E is the source of the 36-byte attribute-data transfer. +;============================================================================== + +InitializeState04PpuData: + ; Set PPU destination to $23C8. + lda #$23 + sta PPUADDR + + lda #$C8 + sta PPUADDR + + ; Copy $24 bytes of attribute data. + ldy #$00 + +@CopyAttributeData: + lda $C76E,y + sta PPUDATA + + iny + cpy #$24 + bne @CopyAttributeData + + ; Process encoded PPU write data from $C69B. + ldy #$00 + +@NextPpuRecord: + lda CharacterNicknameHeaderData,y + sta PPUADDR + iny + + lda CharacterNicknameHeaderData,y + sta PPUADDR + iny + +@CopyPpuRecord: + lda CharacterNicknameHeaderData,y + cmp #$FF + beq @EndPpuRecord + + sta PPUDATA + iny + bne @CopyPpuRecord + +@EndPpuRecord: + lda PPUSTATUS + + ; Upload the complete 32-byte palette directly. + lda #$3F + sta PPUADDR + + lda #$00 + sta PPUADDR + + ldy #$00 + +@CopyPalette: + lda CharacterIntroPalette,y + sta PPUDATA + + iny + cpy #$20 + bne @CopyPalette + + ; Reset the PPU address following palette access. + lda #$3F + sta PPUADDR + + lda #$00 + sta PPUADDR + sta PPUADDR + sta PPUADDR + + rts + +;============================================================================== +; $C667-$C686: State $04 Palette Data +; +; Local: +; Complete 32-byte palette uploaded directly to PPU $3F00-$3F1F by +; InitializeState04PpuData. +; +; Global: +; Defines the background and sprite colors used by the state-$04 display. +; +; Notes: +; First 16 bytes are the four background palettes. +; Second 16 bytes are the four sprite palettes. +;============================================================================== +CharacterIntroPalette: + ; Background palettes + .byte $0F,$20,$0F,$06 + .byte $0F,$06,$0F,$33 + .byte $0F,$33,$0F,$27 + .byte $0F,$17,$0F,$21 + + ; Sprite palettes + .byte $0F,$27,$20,$06 + .byte $0F,$11,$20,$33 + .byte $0F,$20,$20,$21 + .byte $0F,$09,$20,$17 + +;============================================================================== +; $C687-$C69A: State $04 Display Data Pointer Table +; +; Local: +; Contains ten 16-bit pointers to display/update data streams. The helper at +; $C5A6 uses $87 directly as a byte offset into this table: +; +; ldy $87 +; lda CharacterIntroDisplayDataTable,y +; sta $00 +; lda CharacterIntroDisplayDataTable+1,y +; sta $01 +; +; The valid table offsets are therefore: +; $00,$02,$04,$06,$08,$0A,$0C,$0E,$10,$12 +; +; Global: +; Selects the display data used as the state-$04 secondary state machine +; progresses. State04Initialize uses offset $00, while the successive timed +; substates use offsets $02 through $12. +; +; Notes: +; Each target begins a $FF-terminated display/update stream copied into RAM +; at $024B by LoadState04DisplayData. +; +; Several streams contain an additional control byte following $FF. The +; helper uses that byte to decide whether to perform its secondary copy. +;============================================================================== + +CharacterIntroDisplayDataTable: + .word CharacterNicknameHeaderData ; $87 = $00 Character; NICKNAME + .word ShadowNameData ; $87 = $02 : SHADOW + .word BlinkyNameData ; $87 = $04 _BLINKY_ + .word SpeedyNameData ; $87 = $06 : SPEEDY + .word PinkyNameData ; $87 = $08 _PINKY_ + .word CharacterIntroGraphicData0 ; $87 = $0A + .word CharacterIntroGraphicData1 ; $87 = $0C + .word PokeyNameData ; $87 = $0E + .word ClydeNameData ; $87 = $10 + .word ScoringLegendData ; $87 = $12 + +;============================================================================== +; $C69B-$C72D: State $04 Display Update Streams +; +; Local: +; Contains ten display/update streams selected through +; CharacterIntroDisplayDataTable according to the state-$04 substate offset $87. +; +; LoadState04DisplayData copies the selected stream into RAM beginning at +; $024B until it encounters $FF. The $FF byte itself is also copied. +; +; For several streams, the byte immediately following $FF is $00. The +; loader examines this byte and uses it to trigger its optional secondary +; data copy. +; +; Global: +; Supplies the sequence of text and display changes shown during the timed +; state-$04 sequence. The data reveals that this portion of the attract/ +; information display introduces game characters and later installs +; scoring/instruction-related display data. +; +; Notes: +; Many tile values correspond directly to ASCII-like character tiles, but +; special tile values are retained numerically. +; +; $00 bytes appearing after $FF belong to the control mechanism used by +; LoadState04DisplayData. They are not part of the $FF-terminated portion +; copied to $024B. +; +; The final stream at $C707 is structurally different: it contains multiple +; apparent PPU/update command groups before the final $FF. +;============================================================================== + +;------------------------------------------------------------------------------ +; $C69B-$C6B2 +; State04 substate offset: $00 +; +; Destination prefix: $20E6 +; +; Tile data corresponds approximately to: +; "CHARACTER ; NICKNAME" +; +; No explicit $00 control byte follows this stream before the next record. +;------------------------------------------------------------------------------ + +CharacterNicknameHeaderData: + .byte $20,$E6 + .byte $43,$48,$41,$52,$41,$43,$54,$45,$52 + .byte $20,$3B,$20,$20 + .byte $4E,$49,$43,$4B,$4E,$41,$4D,$45 + .byte $FF + +;------------------------------------------------------------------------------ +; $C6B3-$C6BD +; State04 substate offset: $02 +; +; Destination prefix: $2148 +; +; Text-like tile data: +; ":SHADOW" +; +; $00 after $FF selects the loader's secondary-copy path. +;------------------------------------------------------------------------------ + +ShadowNameData: + .byte $21,$48 + .byte $3A,$53,$48,$41,$44,$4F,$57 + .byte $FF + .byte $00 + +;------------------------------------------------------------------------------ +; $C6BE-$C6C8 +; State04 substate offset: $04 +; +; Destination prefix: $2153 +; +; Text-like tile data: +; "_BLINKY_" +; +; No trailing $00 before the next stream. +;------------------------------------------------------------------------------ + +BlinkyNameData: + .byte $21,$53 + .byte $5F,$42,$4C,$49,$4E,$4B,$59,$5F + .byte $FF + +;------------------------------------------------------------------------------ +; $C6C9-$C6D3 +; State04 substate offset: $06 +; +; Destination prefix: $21A8 +; +; Text-like tile data: +; ":SPEEDY" +; +; $00 after $FF selects the loader's secondary-copy path. +;------------------------------------------------------------------------------ +SpeedyNameData: + .byte $21,$A8 + .byte $3A,$53,$50,$45,$45,$44,$59 + .byte $FF + .byte $00 + +;------------------------------------------------------------------------------ +; $C6D4-$C6DD +; State04 substate offset: $08 +; +; Destination prefix: $21B3 +; +; Text-like tile data: +; "_PINKY_" +;------------------------------------------------------------------------------ +PinkyNameData: + .byte $21,$B3 + .byte $5F,$50,$49,$4E,$4B,$59,$5F + .byte $FF + +;------------------------------------------------------------------------------ +; $C6DE-$C6E9 +; State04 substate offset: $0A +; +; Destination prefix: $2208 +; +; Contains graphical/special tile values rather than plain character codes. +; $00 after $FF selects the loader's secondary-copy path. +;------------------------------------------------------------------------------ +CharacterIntroGraphicData0: + .byte $22,$08 + .byte $B6,$C1,$C3,$B7,$B4,$C2,$B3,$C4 + .byte $FF + .byte $00 + +;------------------------------------------------------------------------------ +; $C6EA-$C6F2 +; State04 substate offset: $0C +; +; Destination prefix: $2213 +; +; Contains another set of special graphical tile values. +;------------------------------------------------------------------------------ +CharacterIntroGraphicData1: + .byte $22,$13 + .byte $C8,$B5,$C5,$C0,$C6,$C8 + .byte $FF + +;------------------------------------------------------------------------------ +; $C6F3-$C6FC +; State04 substate offset: $0E +; +; Destination prefix: $2268 +; +; Text-like tile data: +; ":POKEY" +; +; $00 after $FF selects the loader's secondary-copy path. +;------------------------------------------------------------------------------ +PokeyNameData: + .byte $22,$68 + .byte $3A,$50,$4F,$4B,$45,$59 + .byte $FF + .byte $00 + +;------------------------------------------------------------------------------ +; $C6FD-$C706 +; State04 substate offset: $10 +; +; Destination prefix: $2273 +; +; Text-like tile data: +; "_CLYDE_" +;------------------------------------------------------------------------------ +ClydeNameData: + .byte $22,$73 + .byte $5F,$43,$4C,$59,$44,$45,$5F + .byte $FF + +;------------------------------------------------------------------------------ +; $C707-$C72D +; State04 substate offset: $12 +; +; Final composite display stream. Unlike the earlier simple records, this +; contains several apparent update groups separated by $00 bytes before the +; final $FF. +; +; Visible character-like portions include: +; "10 PTS" +; "50 PTS" +; +; The special tile values $CE,$CF and $23-$2B are preserved numerically. +;------------------------------------------------------------------------------ +ScoringLegendData: + .byte $22,$AD + .byte $03,$20,$31,$30,$20,$50,$54,$53 + .byte $00 + + .byte $22,$ED + .byte $01,$20,$35,$30,$20,$50,$54,$53 + .byte $00 + + .byte $23,$34 + .byte $CE,$CF + .byte $00 + + .byte $23,$4D + .byte $23,$24,$25,$26,$27,$28,$29,$2A,$2B + .byte $FF + + +;============================================================================== +; $C72E-$C76D: State $04 Secondary Object/Sprite Data +; +; Local: +; Contains 64 bytes of secondary display data used by +; LoadState04DisplayData. +; +; When a state-$04 display stream requests the secondary-copy path, the +; loader calculates: +; +; Y = ($87 - $02) * 4 +; +; It then copies $10 (16) bytes from: +; +; CharacterIntroSpriteData,Y +; +; to: +; +; $0760,Y +; +; Because state-$04 substates advance by two, Y advances by eight bytes: +; +; $87 = $02 -> Y = $00 +; $87 = $04 -> Y = $08 +; $87 = $06 -> Y = $10 +; $87 = $08 -> Y = $18 +; ... +; +; The 16-byte transfers therefore intentionally overlap by eight bytes. +; +; Global: +; Supplies progressively updated object/sprite-related state during the +; state-$04 timed display sequence. The destination lies in RAM page $07, +; which is also used as an OAM DMA source elsewhere in the program. +; +; The repeated four-byte patterns strongly suggest sprite/OAM-style records, +; but exact field semantics should be confirmed against the code that +; consumes $0760 and the active OAM page before assigning field names. +; +; Notes: +; The table is safest to represent as 16 four-byte records during this pass. +; This preserves its natural repeated structure while allowing the loader's +; overlapping 16-byte windows to remain obvious. +;============================================================================== + +CharacterIntroSpriteData: + ; $C72E - record $00 + .byte $48,$1C,$40,$26 + + ; $C732 - record $01 + .byte $48,$1B,$40,$2E + + ; $C736 - record $02 + .byte $50,$1F,$40,$26 + + ; $C73A - record $03 + .byte $50,$1D,$40,$2E + + ; $C73E - record $04 + .byte $60,$1C,$41,$26 + + ; $C742 - record $05 + .byte $60,$1B,$41,$2E + + ; $C746 - record $06 + .byte $68,$1F,$41,$26 + + ; $C74A - record $07 + .byte $68,$1D,$41,$2E + + ; $C74E - record $08 + .byte $78,$1C,$42,$26 + + ; $C752 - record $09 + .byte $78,$1B,$42,$2E + + ; $C756 - record $0A + .byte $80,$1F,$42,$26 + + ; $C75A - record $0B + .byte $80,$1D,$42,$2E + + ; $C75E - record $0C + .byte $90,$1C,$43,$26 + + ; $C762 - record $0D + .byte $90,$1B,$43,$2E + + ; $C766 - record $0E + .byte $98,$1F,$43,$26 + + ; $C76A - record $0F + .byte $98,$1D,$43,$2E + + +;============================================================================== +; $C76E-$C791: State $04 Nametable Attribute Data +; +; Local: +; Contains $24 (36) bytes copied directly to PPUDATA by +; InitializeState04PpuData. +; +; The destination begins at PPU $23C8, so the complete transfer covers: +; +; $23C8-$23EB +; +; Global: +; Defines background palette selection attributes used by the state-$04 +; display. The highly regular $00/$55/$AA/$FF pattern assigns repeating +; palette selections across large regions of the nametable. +; +; Notes: +; These are NES attribute-table bytes rather than tile indices. +; +; Each attribute byte contains four 2-bit palette selections. Values such +; as $00, $55, $AA and $FF therefore select the same palette throughout all +; four quadrants covered by that attribute byte: +; +; $00 -> palette 0 in all four quadrants +; $55 -> palette 1 in all four quadrants +; $AA -> palette 2 in all four quadrants +; $FF -> palette 3 in all four quadrants +; +; The final $22 mixes palette selections within its attribute regions. +;============================================================================== + +CharacterIntroAttributeData: + .byte $00,$00,$00,$00,$00,$00,$00,$00 + .byte $55,$55,$55,$55,$55,$55,$55,$55 + .byte $AA,$AA,$AA,$AA,$AA,$AA,$AA,$AA + .byte $FF,$FF,$FF,$FF,$FF,$FF,$FF,$FF + .byte $AA,$AA,$AA,$22 + +;============================================================================== +; $C792-$C7A0: State $04 Final-Phase Dispatcher +; +; Local: +; Uses $88 as a direct byte offset into a four-entry table of 16-bit +; addresses beginning at $C7A1. +; +; The selected address is stored in the temporary pointer $10/$11 and +; execution is transferred to it using an indirect JMP. +; +; Global: +; Implements state-$04 substate offset $16. Rather than performing the work +; directly, this substate introduces another secondary state machine. +; +; At this stage: +; +; $3F = $04 main state +; $87 = $16 state-$04 substate +; $88 final-phase dispatch offset +; +; This provides another level of progression within the final state-$04 +; phase. +; +; Notes: +; $88 is used directly as a byte offset, so normal values are expected to +; advance by two: +; +; $00, $02, $04, $06 +; +; The individual target handlers will be named as they are decoded. +;============================================================================== +State04FinalPhase: + ldy $88 + + lda State04FinalPhaseTable,y + sta dispatchVector + + lda State04FinalPhaseTable+1,y + sta dispatchVector+1 + + jmp ($0010) + +;============================================================================== +; $C7A1-$C7A6: State $04 Final-Phase Dispatch Table +; +; Local: +; Three 16-bit handler addresses indexed by $88. +; +; Global: +; Selects the processing stage used during State04FinalPhase. +; +; Notes: +; Valid byte offsets established by the table are $00, $02 and $04. +; $C7A7 is executable code and is not part of the pointer table. +;============================================================================== + +State04FinalPhaseTable: + .word State04FinalPhaseInitialize ; $88 = $00 + .word State04FinalPhaseActive ; $88 = $02 + .word State04FinalPhaseComplete ; $88 = $04 + +;============================================================================== +; $C7A7-$C7F1: State $04 Final-Phase Initialization +; +; Local: +; Initializes the first stage of State04FinalPhase. +; +; Copies a $FF-terminated display/update stream from State04FinalDisplayData +; into RAM at $024B, including the terminator. +; +; Initializes several state variables and object/display values, clears +; $001E-$0031 and $0278-$028B, calls the helper at $DAF1, then advances +; $88 by two to select final-phase offset $02. +; +; Global: +; First handler selected by State04FinalPhase when $88 = $00. It prepares +; the RAM and display state required by the next final-phase handler at +; $C7F2. +; +; Notes: +; $1A is initialized to $FF. +; $1B, $89 and $8A are initialized to $00. +; +; $0274 = $F4 +; $0276 = $A8 +; $028C = $01 +; $0292 = $20 +; +; The exact semantics of these locations will be refined after tracing +; their consumers. +; +; State04FinalDisplayData is a display/update stream in the same general RAM +; command area used elsewhere through $024B. +;============================================================================== + +State04FinalPhaseInitialize: + ldy #$00 + +@CopyDisplayData: + lda State04FinalDisplayData,y + sta $024B,y + iny + cmp #$FF + bne @CopyDisplayData + + lda #$FF + sta pacmanMotion + + lda #$00 + sta $1B + sta $89 + sta $8A + + lda #$F4 + sta $0274 + + lda #$A8 + sta $0276 + + lda #$01 + sta $028C + + lda #$20 + sta $0292 + + lda #$00 + tay + +@ClearLowRamBlock: + sta $001E,y + iny + cpy #$14 + bne @ClearLowRamBlock + + tay + +@ClearObjectRamBlock: + sta $0278,y + iny + cpy #$14 + bne @ClearObjectRamBlock + + jsr $DAF1 + + inc $88 + inc $88 + + jmp MainDispatchLoop + +;============================================================================== +; $C7F2-$C856: State $04 Final-Phase Active Handler +; +; Local: +; Calls two per-frame helpers at UpdateState04Objects and +; AnimateState04DisplayPattern, then examines $0274. +; +; When $0274 equals one of: +; +; $E0 +; $D1 +; $C2 +; $B3 +; +; the routine calls InitializeState04ObjectSlot. +; +; Processing otherwise continues until $0274 reaches $40. While it has not +; reached $40, control returns to MainDispatchLoop. +; +; When $0274 reaches $40, the routine: +; +; - Initializes four 4-byte structures beginning at $001E. +; - Sets $1A = $01 and $1B = $50. +; - Sets $0293-$0296 to $01. +; - Clears $89. +; - Writes a short display/update sequence at $024B/$024D. +; - Advances $88 by two, selecting final-phase offset $04. +; +; Global: +; Active middle stage of State04FinalPhase. The handler appears to drive +; an animated sequence by calling UpdateState04Objects/AnimateState04DisplayPattern +; each frame and reacting when $0274 reaches several specific values. +; +; The milestone values $E0,$D1,$C2,$B3 invoke InitializeState04ObjectSlot. The exact meaning of +; those milestones should be assigned after the movement/update helpers are +; decoded. +; +; Notes: +; $0274 was initialized to $F4 by State04FinalPhaseInitialize, so the +; descending milestone tests strongly suggest $0274 is modified by one of +; the per-frame helper routines. +; +; The four low-RAM structures are $001E/$0022/$0026/$002A. Each receives +; $00 in its first byte and $C0 in its second byte. The remaining two bytes +; are not changed by this loop. +;============================================================================== + +State04FinalPhaseActive: + jsr UpdateState04Objects + jsr AnimateState04DisplayPattern + + lda $0274 + + cmp #$E0 + beq @RunMilestoneUpdate + + cmp #$D1 + beq @RunMilestoneUpdate + + cmp #$C2 + beq @RunMilestoneUpdate + + cmp #$B3 + bne @CheckForCompletion + +@RunMilestoneUpdate: + jsr InitializeState04ObjectSlot + +@CheckForCompletion: + lda $0274 + cmp #$40 + beq @CompletePhase + + jmp MainDispatchLoop + +@CompletePhase: + ldy #$00 + +@InitializeStructures: + lda #$00 + sta ghost1Motion,y + + lda #$C0 + sta ghost1Motion+1,y + + iny + iny + iny + iny + + cpy #$10 + bne @InitializeStructures + + lda #$01 + sta pacmanMotion + + lda #$50 + sta pacmanMotion+1 + + lda #$01 + sta $0293 + sta $0294 + sta $0295 + sta $0296 + + lda #$00 + sta $89 + + lda #$22 + sta $024B + + lda #$20 + sta $024D + + inc $88 + inc $88 + + jmp MainDispatchLoop + +;============================================================================== +; $C857-$C8A7: State $04 Final-Phase Completion Handler +; +; Local: +; Final handler for final-phase offset $88 = $04. +; +; If $8A is nonzero, calls RotateState04ObjectSlots and decrements the countdown. When the +; countdown reaches zero, scans status entries beginning at $028D until an +; entry with one or more upper-three status bits set is found. +; +; The matching entry and associated state are cleared. If $89 has reached +; $04, the routine sets $47 to $01 and transfers control to GameModeEntry. +; +; When $8A is already zero on entry, calls $C8DC and returns to the common +; main dispatch loop. +; +; Global: +; Final processing stage of the nested state-$04 sequence: +; +; $3F = $04 +; $87 = $16 +; $88 = $04 +; +; The eventual transfer to GameModeEntry appears to leave this attract/display +; sequence and enter another major portion of the program. +; +; Notes: +; $8A acts as a countdown here. +; $89 is tested against $04 for completion. +; +; The scan at $028D looks for the first entry satisfying: +; +; ($028D,Y & $E0) != 0 +; +; Exact object/state semantics remain for a later pass. +;============================================================================== + +State04FinalPhaseComplete: + lda $8A + beq @RunRegularUpdate + + jsr RotateState04ObjectSlots + + dec $8A + beq @CountdownComplete + + jmp MainDispatchLoop + +@CountdownComplete: + ldy #$00 + +@FindEntry: + lda $028D,y + and #$E0 + bne @EntryFound + + iny + bne @FindEntry + +@EntryFound: + lda #$00 + sta $028D,y + + lda #$00 + sta $0293,y + + tya + asl + asl + tay + + lda #$00 + sta $0278,y + sta $027A,y + sta ghost1Motion,y + sta ghost1Motion+1,y + + lda #$A8 + sta $0276 + + lda $89 + cmp #$04 + beq @FinishSequence + + jmp MainDispatchLoop + +@FinishSequence: + lda #$01 + sta activePlayerFlag + + jmp GameModeEntry + +@RunRegularUpdate: + jsr UpdateState04Objects + + jmp MainDispatchLoop + +;============================================================================== +; $C8A8-$C8DB: Allocate/Initialize State $04 Object Slot +; +; Local: +; Searches four 4-byte structures beginning at $0278 for the first slot +; whose first byte is zero. +; +; During the search, $00 tracks the logical slot number while Y advances +; by four bytes per structure. +; +; Once a free slot is found, initializes that structure: +; +; +0 = $F4 +; +2 = $A8 +; +; It also initializes corresponding four-byte-strided zero-page state: +; +; $001E+Y = $FF +; $001F+Y = $00 +; +; The logical slot number saved in $00 is then used to index two separate +; per-slot arrays: +; +; $0293+slot = current $89 value +; $028D+slot = $0C +; +; Finally increments $89 and returns. +; +; Global: +; Called by State04FinalPhaseActive whenever $0274 reaches the milestone +; values $E0, $D1, $C2, or $B3. +; +; This strongly suggests that the routine activates one additional object +; at each milestone during the state-$04 final sequence. Four slots are +; available, matching the four milestone values. +; +; Notes: +; $0278 appears to be the first field of a four-byte structure array. +; $027A is the third field of the same structure. +; +; $001E/$001F are parallel four-byte-strided state fields. +; +; $028D and $0293 are indexed by logical slot number rather than the +; four-byte structure offset. +; +; Exact object semantics remain deliberately unnamed until UpdateState04Objects +; and RotateState04ObjectSlots reveal how these structures are updated. +;============================================================================== + +InitializeState04ObjectSlot: + ldy #$00 + sty workPtr0 + +@FindFreeSlot: + lda $0278,y + beq @InitializeSlot + + inc workPtr0 + + iny + iny + iny + iny + + bne @FindFreeSlot + +@InitializeSlot: + lda #$F4 + sta $0278,y + + lda #$A8 + sta $027A,y + + lda #$FF + sta ghost1Motion,y + + lda #$00 + sta $001F,y + + ldy workPtr0 + + lda $89 + sta $0293,y + + lda #$0C + sta $028D,y + + inc $89 + + rts + +;============================================================================== +; $C8DC-$C8EA: State $04 Per-Frame Object Update Coordinator +; +; Local: +; Runs four update stages in sequence: +; +; UpdateTransitionObjectPositions +; RotateState04ObjectSlots +; UpdateState04ObjectStatus +; CheckState04ObjectTrigger +; +; After those return, tail-jumps to $DAF1 rather than returning directly. +; +; Global: +; Called once per frame during portions of the state-$04 final sequence. +; This routine coordinates the lower-level movement/object/display work +; associated with that sequence. +; +; It is called from both State04FinalPhaseActive and +; State04FinalPhaseComplete. +; +; Notes: +; The exact responsibilities of $EA19, $C92E, $C9FA, CheckState04ObjectTrigger +; and $DAF1 will be refined as those routines are decoded. +; +; The JMP to $DAF1 is a tail call: $DAF1 ultimately returns directly to +; the original caller of this routine. +;============================================================================== +UpdateState04Objects: + jsr UpdateTransitionObjectPositions + jsr RotateState04ObjectSlots + jsr UpdateState04ObjectStatus + jsr CheckState04ObjectTrigger + jmp BuildEntitySpriteBuffer + +;============================================================================== +; $C8EB-$C92D: Check State $04 Object Trigger +; +; Local: +; Returns immediately when $1A is negative. +; +; Otherwise computes: +; +; threshold = $0274 + $08 +; +; and scans four 4-byte structures beginning at $0278. +; +; For each active structure, compares its first byte against the threshold. +; When a qualifying structure is found, uses $89 as an index into a ROM +; table at $C9EE, installs the resulting value into a per-slot status array, +; clears a related slot value, initializes $8A to $40, and clears $028C and +; $0276. +; +; Global: +; Part of UpdateState04Objects. Appears to detect when one of the active +; state-$04 objects crosses a position threshold relative to the primary +; value at $0274, then initiates a $40-frame/countdown event through $8A. +; +; Notes: +; $00 holds the comparison threshold ($0274 + $08). +; $01 tracks the logical object slot while Y steps through four-byte +; structures. +; +; $89 is incremented as part of the event setup. +; +; $C9EE is a small ROM lookup table that remains to be decoded. +;============================================================================== + +CheckState04ObjectTrigger: + lda pacmanMotion + bpl @Continue + + rts + +@Continue: + lda $0274 + clc + adc #$08 + sta workPtr0 + + ldy #$00 + sty workPtr0+1 + +@ScanObjects: + lda $0278,y + beq @NextObject + + cmp workPtr0 + bcc @TriggerEvent + +@NextObject: + inc workPtr0+1 + + iny + iny + iny + iny + + cpy #$10 + bne @ScanObjects + + rts + +@TriggerEvent: + ldy $89 + inc $89 + + lda #$40 + sta $8A + + lda $C9EE,y + + ldy workPtr0+1 + sta $028D,y + + lda #$00 + sta $0293,y + + lda #$00 + sta $028C + sta $0276 + + rts + +;============================================================================== +; $C92E-$C9B7: Rotate State $04 Object Slots +; +; Local: +; Rotates four related object/state entries across several parallel arrays. +; +; The routine operates on: +; +; $001E/$001F four-byte-strided zero-page structures +; $0278-$0287 four 4-byte object structures +; $028D-$0290 four object/status bytes +; $0293-$0296 four object/index bytes +; +; For each array, the first entry is saved temporarily, entries 1-3 are +; shifted toward entry 0, and the saved entry 0 is moved to entry 3. +; +; Global: +; Called by UpdateState04Objects every frame, and also directly from +; State04FinalPhaseComplete while its $8A countdown is active. +; +; This appears to cycle the four state-$04 object slots through a fixed +; ordering while keeping their parallel state/status arrays synchronized. +; +; Notes: +; $00-$03 are temporary storage. +; +; The zero-page structures use a four-byte stride but only the first two +; bytes of each structure are moved here. +; +; The $0278 array moves all four bytes of each structure. +; +; $028D-$0290 and $0293-$0296 are simple four-entry byte arrays. +;============================================================================== +RotateState04ObjectSlots: + ; ------------------------------------------------------------------------- + ; Rotate the first two bytes of the four-byte-strided zero-page structures. + ; + ; Entries: + ; 0 -> $001E/$001F + ; 1 -> $0022/$0023 + ; 2 -> $0026/$0027 + ; 3 -> $002A/$002B + ; ------------------------------------------------------------------------- + + lda ghost1Motion + sta workPtr0 + + lda ghost1Motion+1 + sta workPtr0+1 + + ldy #$00 + +@ShiftLowRamStructures: + lda ghost2Motion,y + sta ghost1Motion,y + + lda ghost2Motion+1,y + sta ghost1Motion+1,y + + iny + iny + iny + iny + + cpy #$0C + bne @ShiftLowRamStructures + + lda workPtr0 + sta ghost4Motion + + lda workPtr0+1 + sta ghost4Motion+1 + + ; ------------------------------------------------------------------------- + ; Rotate four complete 4-byte structures at $0278-$0287. + ; ------------------------------------------------------------------------- + + lda $0278 + sta workPtr0 + + lda $0279 + sta workPtr0+1 + + lda $027A + sta workPtr1 + + lda $027B + sta workPtr1+1 + + ldy #$00 + +@ShiftObjectStructures: + lda $027C,y + sta $0278,y + + iny + cpy #$0C + bne @ShiftObjectStructures + + lda workPtr0 + sta $0284 + + lda workPtr0+1 + sta $0285 + + lda workPtr1 + sta $0286 + + lda workPtr1+1 + sta $0287 + + ; ------------------------------------------------------------------------- + ; Rotate the four status bytes at $028D-$0290. + ; ------------------------------------------------------------------------- + + lda $028D + sta workPtr0 + + ldy #$00 + +@ShiftStatusArray: + lda $028E,y + sta $028D,y + + iny + cpy #$03 + bne @ShiftStatusArray + + lda workPtr0 + sta $0290 + + ; ------------------------------------------------------------------------- + ; Rotate the four associated index/state bytes at $0293-$0296. + ; ------------------------------------------------------------------------- + + lda $0293 + sta workPtr0 + + ldy #$00 + +@ShiftIndexArray: + lda $0294,y + sta $0293,y + + iny + cpy #$03 + bne @ShiftIndexArray + + lda workPtr0 + sta $0296 + + rts + +;============================================================================== +; $C9B8-$C9D7: Animate State $04 Display Pattern +; +; Local: +; Uses the frame counter at $4B to periodically copy one of two four-byte +; patterns into RAM $024B-$024E. +; +; The routine runs only when the low three bits of $4B are zero: +; +; ($4B & $07) == 0 +; +; so the display data is updated once every eight frames. +; +; Bit 3 of $4B selects between two adjacent four-byte patterns beginning +; at $C9F2: +; +; bit 3 = 0 -> source $C9F2-$C9F5 +; bit 3 = 1 -> source $C9F6-$C9F9 +; +; Global: +; Called by State04FinalPhaseActive once per frame. Provides a simple +; two-frame animation/blink effect by updating the command/display buffer +; at $024B according to the NMI-driven frame counter $4B. +; +; Notes: +; $4B is incremented by NmiHandler once per frame. +; +; The source data at $C9F2 overlaps the tail of nearby ROM data. We should +; decode the surrounding $C9D8-$C9F9 region before assigning a more +; specific visual meaning to the two animation frames. +;============================================================================== +AnimateState04DisplayPattern: + lda frameCounter + and #$07 + beq @UpdatePattern + + rts + +@UpdatePattern: + ldx #$00 + ldy #$00 + + lda frameCounter + and #$08 + beq @CopyPattern + + ldy #$04 + +@CopyPattern: + lda State04AnimationFrames,y + sta $024B,x + + inx + iny + + cpx #$04 + bne @CopyPattern + + rts + + +;============================================================================== +; $C9D8-$C9ED: State $04 Final Display Data +;============================================================================== + +State04FinalDisplayData: + .byte $22,$AD + .byte $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D + .byte $00 + + .byte $22,$ED + .byte $2D,$2D,$2D,$2D,$2D,$2D,$2D,$2D + .byte $FF + + +;------------------------------------------------------------------------------ +; $C9EE-$C9F1: Adjacent data, purpose not yet resolved. +;------------------------------------------------------------------------------ + +State04UnknownData: + .byte $2D,$2F,$32,$34 + + +;============================================================================== +; $C9F2-$C9F9: State $04 Animation Frames +; +; Two four-byte animation/update frames. +; +; $4B bit 3 = 0 -> frame 0 +; $4B bit 3 = 1 -> frame 1 +;============================================================================== + +State04AnimationFrames: + .byte $22,$C7,$20,$FF + .byte $22,$C7,$01,$FF + +;============================================================================== +; $C9FA-$CA3F: Update State $04 Object Status Animation +; +; Local: +; Selects an animation/status value from a ROM table at State04ObjectStatusTable and writes +; the value into active entries of $028D-$0290. +; +; The selected table range depends on $1A: +; +; $1A negative -> base offset $00 +; $1A nonnegative -> base offset $0A +; +; $B7 is incremented each call and its low three bits select an entry from +; the first lookup range. The resulting value is written to $028C. +; +; The routine then updates the four status entries $028D-$0290 only once +; every eight frames. Bit 3 of $4B selects between two animation phases. +; +; Global: +; Called by UpdateState04Objects during the active state-$04 final sequence. +; Provides periodic animation/status changes for the four object slots +; maintained in $028D-$0290. +; +; Notes: +; $B7 behaves as an additional animation counter here. +; +; $4B is the NMI-driven frame counter. +; +; $028C is updated on every call, while $028D-$0290 are changed only when +; ($4B & $07) == 0. +; +; The table beginning at State04ObjectStatusTable follows this routine immediately and can be +; decoded separately. +;============================================================================== + +UpdateState04ObjectStatus: + ldx #$00 + + lda $1A + bmi @UseTableBase + + ldx #$0A + +@UseTableBase: + stx workPtr0 + + inc $B7 + + lda $B7 + and #$07 + clc + adc workPtr0 + tay + + lda State04ObjectStatusTable,y + sta $028C + + ; Only update the four object entries once every eight frames. + lda $4B + and #$07 + beq @UpdateObjectEntries + + rts + +@UpdateObjectEntries: + lda frameCounter + and #$08 + beq @SelectTableValue + + lda #$01 + +@SelectTableValue: + clc + adc workPtr0 + adc #$08 + tay + + lda State04ObjectStatusTable,y + sta workPtr0 + + ldy #$00 + +@UpdateStatusEntries: + lda $028D,y + beq @NextStatusEntry + + lda workPtr0 + sta $028D,y + +@NextStatusEntry: + iny + cpy #$04 + bne @UpdateStatusEntries + + rts + +;============================================================================== +; $CA40-$CA53: State $04 Object Status/Animation Lookup +; +; Local: +; Twenty-byte lookup table used by UpdateState04ObjectStatus. +; +; The routine selects one of two 10-byte groups: +; +; $1A negative -> group at offset $00 +; $1A nonnegative -> group at offset $0A +; +; Within each group: +; +; bytes 0-7 are selected by ($B7 & $07) +; bytes 8-9 are selected by the slower frame-animation state +; +; Global: +; Supplies animation/status values for the four objects used during the +; final state-$04 sequence. +; +; Notes: +; Exact meanings of the individual values remain intentionally unnamed +; until the consumers of $028C and $028D-$0290 are better understood. +;============================================================================== +State04ObjectStatusTable: + ; Group 0, selected while $1A is negative. + .byte $04,$04,$04,$05,$05,$04,$01,$01 + .byte $0C,$0D + + ; Group 1, selected while $1A is nonnegative. + .byte $08,$08,$08,$09,$09,$08,$01,$01 + .byte $1E,$1F + +;============================================================================== +; $CA54-$CAD6: Main Game/Mode Initialization and Dispatch Loop +; +; Local: +; Reconfigures the PPU, waits for VBlank, disables rendering, clears several +; state variables, and invokes three initialization helpers. +; +; Depending on $48, initializes or preserves parts of two parallel RAM +; regions beginning at $67 and $77. It then initializes additional state, +; re-enables NMI through PPUCTRL=$88, and synchronizes with NMI via $40. +; +; After initialization, enters a persistent foreground loop that: +; +; - optionally watches controller bits $0C and returns to MainEntry, +; - services the countdown at $4C, +; - uses $3F as a byte offset into an eight-entry dispatch table at $CAD7, +; - indirect-jumps through $10/$11 to the selected handler. +; +; Global: +; Multiple earlier state-machine paths converge here, making this a major +; transition point out of the initial/state-$04 sequence and into another +; top-level game-mode state machine. +; +; The routine contains both one-time initialization and the common dispatch +; loop used by the handlers selected from $CAD7. +; +; Notes: +; $3F is reused as a byte offset into this new dispatch table. +; +; $40 continues to provide foreground/NMI synchronization. +; +; $4C acts as a countdown/delay gate in the dispatch loop. +; +; The exact semantics of $48, $46, $67-$86 and the new dispatch states will +; be refined as their handlers are decoded. +;============================================================================== +GameModeEntry: + lda #$08 + sta PPUCTRL + sta ppuCtrlShadow + +@WaitForVBlank: + lda PPUSTATUS + bpl @WaitForVBlank + + lda #$00 + sta PPUMASK + sta gameState + sta cocktailModeFlag + sta $69 + sta $4A + + jsr ClearGameplayNametables + jsr DrawGameplayHudLabels + jsr DrawGameplayScoreFields + + lda gameplaySuspended + beq @ClearPlayerState + + lda #$01 + sta roundNumber + + bne @InitializeCommonState + +@ClearPlayerState: + lda #$00 + tay + +@ClearPlayerStateLoop: + sta roundNumber,y + iny + cpy #$20 + bne @ClearPlayerStateLoop + + lda #$03 + sta roundNumber + sta $77 + + sta $0600 + sta $0601 + +@InitializeCommonState: + lda #$FF + sta roundDisplayValue + sta $78 + sta $0245 + + lda #$88 + sta ppuCtrlShadow + sta PPUCTRL + +GameModeFrameSync: +@WaitForNextFrame: + lda #$01 + sta $40 + +@WaitForNmi: + lda $40 + bne @WaitForNmi + +@DispatchLoop: + lda gameplaySuspended + beq @ProcessDelay + + lda currentInput + and #$0C + beq @ProcessDelay + + lda #$02 ; TODO: what is state $02? + sta gameState + + jmp MainEntry + +@ProcessDelay: + lda stateTimer + beq @DispatchState + + dec stateTimer + bne @WaitForNextFrame + +@DispatchState: + ldy gameState + + lda GameModeStateTable,y + sta dispatchVector + + lda GameModeStateTable+1,y + sta dispatchVector+1 + + jmp ($0010) + +;============================================================================== +; $CAD7-$CAE6: Game Mode State Dispatch Table +; +; Local: +; Eight 16-bit handler addresses selected by GameModeEntry using $3F as a +; direct byte offset. +; +; Global: +; Defines the next major foreground state machine entered through GameModeEntry. +; +; Notes: +; Since $3F indexes raw bytes rather than words, expected state offsets are: +; +; $00,$02,$04,$06,$08,$0A,$0C,$0E +; +; Handler names remain unresolved until each target is decoded. +;============================================================================== + +GameModeStateTable: + .word GameModeState00 ; $3F = $00 + .word GameModeState02 ; $3F = $02 + .word GameModeState04 ; $3F = $04 + .word GameModeState06 ; $3F = $06 + .word GameModeState08 ; $3F = $08 + .word GameModeState0A ; $3F = $0A + .word GameModeState0C ; $3F = $0C + .word InitializeGameplayTransitionState + ; $3F = $0E + +;============================================================================== +; $CAE7-$CAE8: Game-Mode Auxiliary Pointer +; +; Local: +; Two-byte little-endian ROM value containing $E7BF. +; +; Global: +; Sits immediately between GameModeStateTable and the $3F=$04 handler. +; Its consumer has not yet been established during this pass. +; +; Notes: +; Keep this as data rather than attempting to decode it as 6502 code. +;============================================================================== + +GameModeAuxPointer: + .word $E7BF + +;============================================================================== +; $CAE9-$CB5A: Game-Mode State $04 / Pause and Per-Frame Processing +; +; Local: +; First checks $060F. If nonzero, immediately returns to the common +; NMI/frame synchronization point at $CAA7. +; +; Otherwise performs edge detection on controller bit $08 using $49 as +; the stored previous state. +; +; On a new active $08 input: +; - increments $4A, +; - installs a short update command at $024B onward, +; - selects between two command variants according to $47 & $46, +; - uses bit 0 of $4A to alternate the displayed data, +; - optionally clears $060F. +; +; When no new pause/input edge is being handled, and bit 0 of $4A is clear, +; calls a sequence of gameplay/update helpers before returning to the common +; frame synchronization point. +; +; Global: +; Handler selected when GameModeStateTable offset $3F = $04. +; +; The adjacent data beginning at $CB5B contains the tile values for the word +; "PAUSE", strongly indicating that this handler manages pause-state input +; and display updates while also running the normal per-frame gameplay +; helper chain when not paused. +; +; Notes: +; $49 stores the previous masked state of controller bit $08. +; $4A is incremented on each newly detected active edge and bit 0 is used +; here as a pause/run toggle. +; +; $060F is consulted as another gate associated with this handler. +; +; Helper routines remain address-named during this pass. +;============================================================================== + +GameModeState04: + lda $060F + beq @CheckPauseInput + + jmp GameModeFrameSync + +@CheckPauseInput: + lda currentInput + and #$08 + cmp $49 + beq @ProcessCurrentMode + + sta $49 + + lda $49 + beq @ProcessCurrentMode + + inc $4A + + ldx #$22 + + lda activePlayerFlag + and cocktailModeFlag + beq @SetCommandAddress + + ldx #$2A + +@SetCommandAddress: + stx $024B + + lda #$37 + sta $024C + + ldx #$06 + ldy #$00 + + lda $4A + and #$01 + beq @CopyPauseData + + ldx #$00 + sta $060F + +@CopyPauseData: + lda PauseDisplayData,x + sta $024D,y + + inx + iny + + cpy #$06 + bne @CopyPauseData + + jmp GameModeFrameSync + +@ProcessCurrentMode: + lda $4A + and #$01 + beq @RunFrameUpdates + + jmp GameModeFrameSync + +@RunFrameUpdates: + jsr UpdateGameplayTimers + jsr UpdateGameplayTileState + jsr UpdatePlayerMovement + jsr UpdatePlayerDirectionAnimation + jsr UpdateGameplayEntities + jsr UpdateEntitySpriteStates + jsr UpdateEntityStatusFlags + jsr UpdatePeriodicFourEntryState + jsr CheckGameplayProximity + jsr CheckEntityCollisions + + jmp GameModeFrameSync + +;============================================================================== +; $CB5B-$CB66: Pause Display Data +; +; Local: +; Two six-byte display strings selected by GameModeState04. +; +; Offset $00: +; "PAUSE",$FF +; +; Offset $06: +; five $2D tiles followed by $FF, used to replace/clear the pause text. +; +; Global: +; Provides the visible pause-state update controlled by $4A bit 0. +;============================================================================== + +PauseDisplayData: + .byte $50,$41,$55,$53,$45,$FF + .byte $2D,$2D,$2D,$2D,$2D,$FF + + +;============================================================================== +; $CB67-$CC9B: Game-Mode State $02 Handler +; +; Local: +; Implements a multi-phase initialization/progression state. +; +; When $87 is zero, constructs structured data in RAM page $07 using several +; ROM lookup tables. The construction is influenced by $48, $47, $46, +; $68 and $69. +; +; Once $87 is nonzero, it advances once per frame. At $87=$78, initializes +; a new group of RAM state and prepares display/update data in $024B-$0254. +; +; At $87=$C0, checks $0600/$0601. If both are zero, clears a large area of +; page $07 and advances the main game-mode state to $04. +; +; Global: +; Handler selected by GameModeStateTable when $3F=$02. This appears to be +; a substantial setup/transition state between game-mode phases, preparing +; object/OAM-related RAM, display command data, and other game state before +; handing control to GameModeState04. +; +; Notes: +; $87 serves as the phase timer/progression value. +; +; $00/$01 initially form a pointer to $0760 during the page-$07 build. +; The same locations are reused later as temporary display-address values. +; +; ROM tables $CC9C-$CCD8 immediately follow this routine and should be +; decoded next. +;============================================================================== + +GameModeState02: + lda $87 + beq @BuildInitialData + + jmp @AdvancePhase + +@BuildInitialData: + lda #$60 + sta workPtr0 + + lda #$07 + sta workPtr0+1 + + lda $48 + bne @AdvancePhase + + lda #$02 + sta workValue0 + + ldy #$00 + sty workValue1 + sty workValue2 + sty workValue3 + +@BuildOuterLoop: + ldx workValue2 + + lda State02PositionTable,x + sta workPtr1 + + lda State02PositionTable + 1,x + sta workPtr1+1 + + ldx workValue3 + + lda State02EntryCounts,x + sta workValue4 + +@BuildInnerLoop: + lda workPtr1+1 + sta ($00),y + + ldx workValue1 + + lda State02ValueTableA,x + iny + sta (workPtr0),y + + lda State02ValueTableB,x + iny + sta (workPtr0),y + + lda workPtr1 + iny + sta ($00),y + + lda workPtr1 + clc + adc #$08 + sta workPtr1 + + iny + inc workValue1 + + dec workValue4 + bne @BuildInnerLoop + + inc workValue2 + inc workValue2 + inc workValue3 + + lda $69 + bne @ContinueBuild + + lda roundDisplayValue + bne @AdvancePhase + +@ContinueBuild: + dec workValue0 + beq @CheckPlayerMode + + bpl @BuildOuterLoop + bmi @AdvancePhase + +@CheckPlayerMode: + lda activePlayerFlag + beq @AdvancePhase + + lda cocktailModeFlag + beq @BuildOuterLoop + + inc workValue1 + inc workValue1 + inc workValue1 + + bne @BuildOuterLoop + +;------------------------------------------------------------------------------ +; $CBE4 +; Frame-based progression portion of the same state. +;------------------------------------------------------------------------------ + +@AdvancePhase: + lda $87 + cmp #$C0 + bne @IncrementPhase + + jmp $CC7C + +@IncrementPhase: + inc $87 + + lda $87 + cmp #$78 + beq @InitializeMidPhase + + jmp $CC99 + +@InitializeMidPhase: + lda #$A8 + sta $1C + + lda #$60 + sta pacmanMotion + sta ghost1Motion + sta ghost2Motion + + lda #$58 + sta ghost3Motion + sta $20 + + lda #$68 + sta ghost4Motion + + lda #$70 + sta $24 + sta $28 + sta $2C + + lda #$00 + tay + +@ClearOamRegion: + sta $0778,y + iny + cpy #$24 + bne @ClearOamRegion + + lda activePlayerFlag + and cocktailModeFlag + beq @NoPlayerOffset + + lda #$08 + +@NoPlayerOffset: + sta $00 + + lda $67 + sec + sbc #$01 + asl + tay + + lda State02DisplayAddressTable,y + clc + adc workPtr0 + sta workPtr0 + + lda State02DisplayAddressTable+1,y + sta workPtr0+1 + + lda workPtr0 + sta $024B + + lda workPtr0+1 + sta $024C + + lda #$2D + sta $024D + sta $024E + + lda #$00 + sta $024F + + lda $00 + sta $0250 + + lda $01 + clc + adc #$20 + sta $0251 + + lda #$2D + sta $0252 + sta $0253 + + lda #$FF + sta $0254 + + jsr UpdatePlayerDirectionAnimation + jsr UpdateEntitySpriteStates + jsr $DA40 + + jmp $CC99 + +@CheckCompletion: + lda $0600 + ora $0601 + bne $CC99 + + lda $48 + bne @AdvanceMainState + + lda #$00 + sta $69 + tay + +@ClearPage07Region: + sta $0760,y + iny + cpy #$A0 + bne @ClearPage07Region + +@AdvanceMainState: + lda #$04 + sta $3F + +@ReturnToFrameLoop: + jmp GameModeFrameSync + +;============================================================================== +; $CC9C-$CCD8: Game-Mode State $02 Lookup Tables +; +; Local: +; Collection of lookup tables consumed by GameModeState02 while constructing +; page-$07 object/display data and preparing the update command at $024B. +; +; Global: +; Supplies the tile/status/position/count/address parameters used by the +; state-$02 setup sequence. +; +; Notes: +; The tables are separated according to the exact addresses referenced by +; GameModeState02. Names remain structural during this first pass. +;============================================================================== + + +;------------------------------------------------------------------------------ +; $CC9C-$CCAD: State $02 tile/value table +; +; Indexed through $05: +; +; lda State02ValueTableA,x +; +; Written as the second byte of each 4-byte structure generated at $0760+. +; Length: $12 (18) bytes. +;------------------------------------------------------------------------------ + +State02ValueTableA: + .byte $C6,$C3,$C1,$BA,$C7,$BB + .byte $B0,$B1,$B2,$B3,$B4,$B5 + .byte $B6,$B7,$B4,$B8,$B9,$B6 + + +;------------------------------------------------------------------------------ +; $CCAE-$CCBF: State $02 secondary value table +; +; Indexed through the same $05 value as State02ValueTableA. +; +; Written as the third byte of each generated 4-byte structure. +; Length: $12 (18) bytes. +;------------------------------------------------------------------------------ + +State02ValueTableB: + .byte $00,$00,$00,$00,$00,$00 + .byte $02,$02,$02,$02,$02,$02 + .byte $02,$02,$02,$02,$02,$02 + + +;------------------------------------------------------------------------------ +; $CCC0-$CCC5: State $02 position/parameter pairs +; +; GameModeState02 accesses this table as overlapping little groups: +; +; lda State02PositionTable,x +; lda State02PositionTable+1,x +; +; $06 advances by 2 each outer pass. +; +; Therefore the natural structure is three 2-byte pairs. +;------------------------------------------------------------------------------ + +State02PositionTable: + .byte $44,$88 + .byte $44,$60 + .byte $50,$70 + + +;------------------------------------------------------------------------------ +; $CCC6-$CCC8: State $02 entry-count table +; +; Indexed by $07. Determines how many four-byte structures are emitted by +; each inner construction loop. +;------------------------------------------------------------------------------ + +State02EntryCounts: + .byte $06,$06,$03 + + +;------------------------------------------------------------------------------ +; $CCC9-$CCD0: Additional state-$02 values +; +; No direct reference has yet been established in the portion decoded so far. +; Keep this data structurally separated until its consumer is found. +;------------------------------------------------------------------------------ + +State02UnknownData: + .byte $C0,$C1,$C2,$C3,$C4,$C5,$C3,$C6 + + +;------------------------------------------------------------------------------ +; $CCD1-$CCD8: Display-address table +; +; Indexed by: +; +; ($67 - 1) * 2 +; +; and read as two-byte values: +; +; lda State02DisplayAddressTable,y +; lda State02DisplayAddressTable+1,y +; +; The bytes form four PPU-style address pairs: +; +; $2317 +; $2319 +; $231B +; $2357 +; +; When $47 & $46 is nonzero, $08 is added to the low byte before the command +; is placed into $024B/$024C. +;------------------------------------------------------------------------------ + +State02DisplayAddressTable: + .byte $23,$17 + .byte $23,$19 + .byte $23,$1B + .byte $23,$57 + +;============================================================================== +; $CCD9-$CD05: Game-Mode State $06 Handler +; +; Local: +; Increments $DA each frame. Normally falls through to a group of four +; per-frame update routines. +; +; When $DA reaches $28, resets $DA to $02, changes the main game-mode state +; to $04, finds an even-indexed entry in $B8+X containing $08, and changes +; that entry to $06 before continuing through the same update routines. +; +; Global: +; Handler selected by GameModeStateTable when $3F = $06. Implements a timed +; transition back to game-mode state $04 while continuing normal frame +; processing throughout the delay. +; +; Notes: +; $DA is used as a frame/progression counter. +; The $B8 array is searched only at even offsets. +;============================================================================== + +GameModeState06: + inc $DA + + lda #$28 + cmp $DA + bne @RunFrameUpdates + + lda #$02 + sta $DA + + lda #$04 + sta $3F + + lda #$08 + + ldx #$FE + +@FindStateEntry: + inx + inx + cmp $B8,x + bne @FindStateEntry + + lda #$06 + sta $B8,x + +@RunFrameUpdates: + jsr UpdatePeriodicFourEntryState + jsr UpdateEntityMovementStates + jsr UpdateEntitySpriteStates + jsr $DA40 + + jmp GameModeFrameSync + + +;============================================================================== +; $CD06-$CDAF: Game-Mode State $08 Handler +; +; Local: +; Multi-phase timed state using $87, $DB, and $32. +; +; During the initial phase, $DB counts down. When it expires, $87 advances, +; $DB and $0603 are initialized to $0A, and $001E-$0031 are cleared. +; +; During the active phase, $DB periodically advances $32 until $32 reaches +; $1E. The completion logic then updates the two parallel 16-byte state +; blocks at $67-$76 and $77-$86 and selects the next game-mode state. +; +; Global: +; Handler selected by GameModeStateTable when $3F = $08. +; +; Notes: +; $DB acts as a short-period timer. +; $87 distinguishes the initial and active phases. +; $67-$76 and $77-$86 are interchangeable 16-byte state structures. +; +; A few cross-flow destinations are kept as raw addresses during this pass +; to preserve the original control flow exactly. +;============================================================================== + +GameModeState08: + lda $87 + bne @ActivePhase + + dec $DB + bne @InitialFrameUpdates + + inc $87 + + lda #$0A + sta $DB + sta $0603 + + lda #$00 + tax + +@ClearLowRamState: + sta $1E,x + inx + cpx #$14 + bne @ClearLowRamState + +@InitialFrameUpdates: + jsr UpdatePeriodicFourEntryState + jsr UpdateEntitySpriteStates + jsr $DA40 + + jmp GameModeFrameSync + +@ActivePhase: + dec $DB + bpl @ActiveFrameUpdates + + lda #$0A + sta $DB + + lda $32 + clc + adc #$01 + sta $32 + + cmp #$1E + beq @PhaseComplete + +@ActiveFrameUpdates: + jsr UpdatePeriodicFourEntryState + jsr $DA40 + + jmp GameModeFrameSync + +@PhaseComplete: + lda $48 + bne @SinglePlayerRestart + + dec $67 + bne @ContinuePlayerHandling + + lda #$00 + sta $87 + sta $69 + + lda #$0A + sta $3F + + jmp GameModeFrameSync + +@ContinuePlayerHandling: + lda #$00 + sta $3F + + lda #$01 + sta $69 + + lda $47 + beq @CheckPrimaryBlock + + lda $77 + bne @SwapBlocksAndToggle + +@CheckPrimaryBlock: + lda $67 + bne $CDAD + + sta $69 + + lda $46 + beq @SinglePlayerRestart + + ldx #$0F + +@SwapBlocksForMainEntry: + lda $67,x + sta $00 + + lda $77,x + sta $67,x + + lda $00 + sta $77,x + + dex + bpl @SwapBlocksForMainEntry + +@SinglePlayerRestart: + lda #$00 + sta $46 + + lda #$00 + sta $3F + + jmp MainEntry + + +@SwapBlocksAndToggle: + ldx #$0F + +@SwapBlocks: + lda $67,x + sta $00 + + lda $77,x + sta $67,x + + lda $00 + sta $77,x + + dex + bpl @SwapBlocks + + inc $46 + + lda $46 + and #$01 + sta $46 + + jmp GameModeFrameSync + + +;============================================================================== +; $CDB0-$CE1E: Game-Mode State $0C Handler +; +; Local: +; Uses $87 as a frame/progression counter. +; +; On first entry ($87 == 0): +; - Clears $001E-$0031. +; - Increments $87. +; - Initializes $32 to $01. +; +; On subsequent frames, processing is throttled by the low three bits of +; the NMI-driven frame counter $4B. Only once every eight frames does the +; handler: +; +; - Alternate a value written to $029E according to bit 0 of $87. +; - Set $0299 to $0F. +; - Increment $87. +; +; When $87 reaches $10, the routine clears $1A/$1C/$87 and selects a new +; main game-mode state according to the value at $68. +; +; Global: +; Handler selected by GameModeStateTable when $3F = $0C. +; +; This appears to implement a short visual/timed transition. The write of +; $0F to $0299 interacts directly with the palette-update mechanism decoded +; earlier, while $029E lies inside that first 16-byte palette/update buffer. +; +; Notes: +; $4B is the NMI-driven frame counter. +; +; $87 advances only once every eight frames after initialization. +; +; $68 controls which state is selected when the sequence completes. +;============================================================================== + +GameModeState0C: + lda $87 + bne @TimedPhase + + ldx #$00 + +@ClearLowRam: + sta $1E,x + inx + cpx #$14 + bne @ClearLowRam + + inc $87 + + lda #$01 + sta $32 + + bne @RunFrameUpdates + + +@TimedPhase: + lda $4B + and #$07 + bne @RunFrameUpdates + + ldx #$11 + + lda $87 + and #$01 + bne @SetPaletteValue + + ldx #$20 + +@SetPaletteValue: + stx $029E + + lda #$0F + sta $0299 + + inc $87 + + lda #$10 + cmp $87 + bne @RunFrameUpdates + + lda #$00 + sta $1A + sta $1C + sta $87 + + lda $68 + cmp #$01 + beq @SelectState0E + + inc $87 + inc $87 + + cmp #$04 + beq @SelectState0E + + inc $87 + inc $87 + + cmp #$08 + beq @SelectState0E + + cmp #$0C + beq @SelectState0E + + cmp #$10 + bne @SelectState00 + + +@SelectState0E: + lda #$0E + sta $3F + + jmp @RunFrameUpdates + + +@SelectState00: + lda #$00 + sta $3F + + +@RunFrameUpdates: + jsr UpdatePeriodicFourEntryState + jsr $DA40 + + jmp GameModeFrameSync + + +;============================================================================== +; $CE1F-$CEBE: Game-Mode State $0A Handler +; +; Local: +; Uses $87 to distinguish between initialization and subsequent processing. +; +; On initial entry: +; - Fills $0700-$075F with $FF. +; - Initializes $00/$01 as a pointer to $0760. +; - Builds structured four-byte records in page $07 from several ROM +; lookup tables beginning at $CEBF. +; +; The builder uses: +; +; $00/$01 destination pointer ($0760) +; $02/$03 per-group values +; $04 outer pass counter, initially $03 +; $05 shared table index +; $06 index into the value-pair table +; $07 index into the entry-count table +; $08 inner record counter +; +; Player/mode variables $47, $77, and $46 influence whether passes repeat +; and whether the lookup index is advanced. +; +; After the construction phase, $87 is incremented. A later entry either +; clears $0760-$07FF and transitions to the code at $CD5E, or simply +; returns to the common frame loop. +; +; Global: +; Handler selected by GameModeStateTable when $3F = $0A. +; +; Structurally this is closely related to GameModeState02, but uses a +; different set of ROM tables and first clears $0700-$075F to $FF. Both +; handlers construct arrays of four-byte records in page $07. +; +; Notes: +; The tables at $CEBF-$CEF2 are decoded immediately after this routine. +; Semantic object names are deferred until the page-$07 consumers are +; understood more completely. +;============================================================================== + +GameModeState0A: + lda $87 + beq @Initialize + + jmp $CEAA + +@Initialize: + ldy #$00 + + lda #$FF + +@FillPage07Prefix: + sta $0700,y + iny + cpy #$60 + bne @FillPage07Prefix + + lda #$60 + sta $00 + + lda #$07 + sta $01 + + lda #$03 + sta $04 + + ldy #$00 + sty $05 + sty $06 + sty $07 + +@BuildOuterLoop: + ldx $06 + + lda State0AParameterPairs,x + sta $02 + + lda State0AParameterPairs+1,x + sta $03 + + ldx $07 + + lda State0AEntryCounts,x + sta $08 + + +@BuildInnerLoop: + lda $03 + sta ($00),y + + ldx $05 + + lda State0AValueTableA,x + iny + sta ($00),y + + lda State0AValueTableB,x + iny + sta ($00),y + + lda $02 + iny + sta ($00),y + + lda $02 + clc + adc #$08 + sta $02 + + iny + inc $05 + + dec $08 + bne @BuildInnerLoop + + inc $06 + inc $06 + + inc $07 + + lda $47 + beq @ContinueOuterPass + + lda $77 + bne @ContinueOuterPass + + lda $04 + cmp #$02 + beq $CEAA + + +@ContinueOuterPass: + dec $04 + beq @CheckPlayerMode + + bpl @BuildOuterLoop + bmi @FinishInitialization + + +@CheckPlayerMode: + lda $47 + beq @FinishInitialization + + lda $46 + beq @BuildOuterLoop + + +@AdjustTableIndex: + inc $05 + inc $05 + inc $05 + + bne @BuildOuterLoop + + +@FinishInitialization: + inc $87 + bne @ReturnToFrameLoop + + +@PostInitialization: + lda #$00 + tay + +@ClearPage07Region: + sta $0760,y + iny + cpy #$A0 + bne @ClearPage07Region + + jmp $CD5E + + +@ReturnToFrameLoop: + jmp GameModeFrameSync + + +;============================================================================== +; $CEBF-$CEF2: Game-Mode State $0A Lookup Tables +; +; Local: +; Lookup data used by GameModeState0A to construct four-byte records in +; page $07. +; +; Global: +; Provides the object/tile/value and layout parameters for state $0A. +;============================================================================== + +;------------------------------------------------------------------------------ +; $CEBF-$CED2: Primary value table +; Length: $14 (20) bytes +;------------------------------------------------------------------------------ + +State0AValueTableA: + .byte $BC,$B2,$BD,$B4,$B6,$BE,$B4,$B5 + .byte $B0,$B1,$B2,$B3,$B4,$B5,$B6,$B7 + .byte $B4,$B8,$B9,$B6 + +;------------------------------------------------------------------------------ +; $CED3-$CEE6: Secondary value table +; Length: $14 (20) bytes +;------------------------------------------------------------------------------ + +State0AValueTableB: + .byte $00,$00,$00,$00,$00,$00,$00,$00 + .byte $02,$02,$02,$02,$02,$02,$02,$02 + .byte $02,$02,$02,$02 + +;------------------------------------------------------------------------------ +; $CEE7-$CEEE: Parameter-pair table +; +; $06 advances by two, so represent this as four 2-byte pairs. +;------------------------------------------------------------------------------ + +State0AParameterPairs: + .byte $38,$88 + .byte $60,$88 + .byte $44,$60 + .byte $50,$70 + +;------------------------------------------------------------------------------ +; $CEEF-$CEF2: Inner-loop entry counts +;------------------------------------------------------------------------------ + +State0AEntryCounts: + .byte $04,$04,$06,$03 + +;============================================================================== +; $CEF3-$D0AA: Game-Mode State $00 Initialization +; +; Local: +; Performs the main initialization for the game-mode state machine: +; +; - Synchronizes with NMI and disables rendering. +; - Clears working RAM $87-$EF. +; - Clears page $0700-$07FF. +; - Copies a 32-byte palette table from GameplayPaletteData to $0299-$02B8. +; - Selects game-mode state $02. +; - Initializes gameplay/state variables and invokes several setup helpers. +; - Loads numerous parameters from ROM lookup tables. +; - Initializes arrays and display/update data. +; - Re-enables NMI with PPUCTRL=$88. +; - Returns to GameModeFrameSync. +; +; Global: +; Primary initialization handler for GameModeStateTable offset $00. +; Establishes the working state used by the later $02/$04/etc. handlers. +; +; Notes: +; Many ROM tables referenced from $EBxx/$ECxx are intentionally left raw +; during this pass and will be named when those regions are reached. +;============================================================================== + +GameModeState00: + lda #$01 + sta $40 + +@WaitForNmi: + lda $40 + bne @WaitForNmi + + lda #$08 + sta PPUCTRL + sta $43 + + lda #$00 + sta PPUMASK + + ldx #$00 + +@ClearWorkingRam: + sta $87,x + inx + cpx #$69 + bne @ClearWorkingRam + + tax + +@ClearPage07: + sta $0700,x + inx + bne @ClearPage07 + + ldy #$00 + +@LoadPalette: + lda GameplayPaletteData,y + sta $0299,y + iny + cpy #$20 + bne @LoadPalette + + lda #$02 + sta $3F + + lda $69 + bne $CF4A + + sta $8B + + lda #$01 + sta $6C + sta $6D + sta $6E + sta $6F + + lda #$C0 + sta $6A + + lda $68 + cmp #$16 + beq @SkipIncrement68 + + inc $68 + +@SkipIncrement68: + jsr InitializeGameplayAttributes + jsr DrawMazeNametable + jsr DrawGameplayScoreFields + jsr InitializeGameNametableRegion + jsr DrawLevelProgressMarkers + jsr $E5C1 + jsr DrawGameplayHudLabels + +@ContinueSetup: + ldx $68 + + lda #$00 + clc + +@MultiplyBy6: + dex + bmi @MultiplyBy6Done + + adc #$06 + bne @MultiplyBy6 + +@MultiplyBy6Done: + sta $00 + tax + + lda $EBB6,x + tax + + lda #$00 + clc + +@MultiplyBy22: + dex + bmi @MultiplyBy22Done + + adc #$16 + bne @MultiplyBy22 + +@MultiplyBy22Done: + tay + + ldx #$00 + +@CopyGameParameters: + lda $EC40,y + sta $9F,x + inx + iny + cpx #$16 + bne @CopyGameParameters + + ldx $00 + + lda $EBB6,x + asl + asl + asl + tax + + ldy #$00 + sty $D0 + + ; Save the first selected table value separately. + lda $ECAE,x + sta $CF + +@CopyTableECae: + lda $ECAE,x + sta $0097,y + + inx + iny + cpy #$08 + bne @CopyTableECae + + inc $00 + + ldx $00 + lda $EBB6,x + sta $8C + + inc $00 + + ldx $00 + lda $EBB6,x + asl + tax + + lda $ECCE,x + sta $8D + inx + lda $ECCE,x + sta $8E + + inc $00 + + lda $69 + beq @UseAlternateData + + ldx #$0C + ldy #$00 + + lda $ECDC,x + sta $008F,y + + iny + inx + + lda #$C0 + sec + sbc $6A + sta $01 + +@CopyOffsetData: + lda $01 + clc + adc $ECDC,x + sta $008F,y + + iny + inx + + cpy #$04 + bne @CopyOffsetData + + beq @InitializeArray + +@UseAlternateData: + ldx $00 + + lda $EBB6,x + asl + asl + tax + + ldy #$00 + +@CopyAlternateData: + lda $ECDC,x + sta $008F,y + + inx + iny + cpy #$04 + bne @CopyAlternateData + + +@InitializeArray: + lda #$04 + sta $B8 + + lda #$01 + sta $B9 + + lda $8F + sta $01 + + ldx #$00 + +@InitializeArrayLoop: + dec $01 + beq @InitializeArrayTail + + lda #$02 + sta $BA,x + + lda #$00 + sta $BB,x + + inx + inx + bne @InitializeArrayLoop + + +@InitializeArrayTail: + lda #$00 + +@ClearRemainingArray: + cpx #$06 + beq @ContinueFinalSetup + + sta $BA,x + sta $BB,x + + inx + inx + bne @ClearRemainingArray + + +@ContinueFinalSetup: + lda $90 + sta $D3 + + inc $00 + + ldx $00 + lda $EBB6,x + sta $93 + + inc $00 + + ldx $00 + lda $EBB6,x + sta $96 + + lda $A5 + sta $B5 + + lda $A6 + sta $B6 + + lda $AF + sta $C4 + sta $C6 + sta $C8 + sta $CA + + lda $B0 + sta $C5 + sta $C7 + sta $C9 + sta $CB + + lda #$01 + sta $50 + sta $51 + + ldy #$00 + ldx #$00 + + lda $46 + and $47 + beq @CopyDisplayInit + + ldy #$09 + +@CopyDisplayInit: + lda GameDisplayInitialData,y + sta $026B,x + + iny + inx + cpx #$09 + bne @CopyDisplayInit + + ldy #$00 + +@CopyStateData: + lda GameStateInitialValues,y + sta $0032,y + iny + cpy #$0C + bne @CopyStateData + + ldy #$00 + +@NormalizeValues: + lda $006C,y + cmp #$02 + bne @NextNormalizeValue + + lda #$01 + sta $006C,y + +@NextNormalizeValue: + iny + cpy #$04 + bne @NormalizeValues + + sty $C0 + + lda #$FF + sta $89 + + lda #$88 + sta PPUCTRL + sta $43 + + jmp GameModeFrameSync + +;============================================================================== +; $D0AB-$D0F2: Initialize/Clear Repeated Nametable Region +; +; Local: +; Selects an initial PPU destination based on ($46 & $47): +; +; zero -> $2256 +; nonzero -> $2A56 +; +; It then performs 10 iterations. For each iteration: +; +; - Sets PPUADDR to the current destination. +; - Writes six $20 tiles. +; - Writes two $2D tiles. +; - Advances the destination address by $20. +; +; Global: +; Called from GameModeState00 during game/round initialization while +; rendering is disabled. This prepares the same rectangular display region +; in one of two nametable locations depending on the current player/mode +; state represented by $46/$47. +; +; Notes: +; $00/$01 form the current 16-bit PPU destination address. +; $02 counts 10 rows. +; $03 counts the six $20 tile writes in each row. +; +; $20 and $2D are retained as raw tile IDs during this pass. +;============================================================================== + +InitializeGameNametableRegion: + ldy #$22 + + lda $46 + and $47 + beq @SetDestination + + ldy #$2A + +@SetDestination: + sty $00 + + lda #$56 + sta $01 + + lda #$0A + sta $02 + +@NextRow: + lda PPUSTATUS + + lda $00 + sta PPUADDR + + lda $01 + sta PPUADDR + + lda #$06 + sta $03 + + lda #$20 + +@WriteInterior: + sta PPUDATA + + dec $03 + bne @WriteInterior + + lda #$2D + sta PPUDATA + sta PPUDATA + + ; Advance the destination by one full nametable row ($20 bytes). + lda $01 + clc + adc #$20 + sta $01 + + lda $00 + adc #$00 + sta $00 + + dec $02 + bne @NextRow + + rts + +;============================================================================== +; $D0F3-$D130: Game-Mode State $00 Initialization Data +; +; Local: +; Contains three adjacent data blocks consumed during GameModeState00: +; +; $D0F3-$D0FE 12-byte state initialization table +; $D0FF-$D110 18-byte display/update table +; $D111-$D130 32-byte palette table +; +; Global: +; Supplies initial state, display-command, and palette data used when +; GameModeState00 prepares a new game/round state. +; +; Notes: +; The display table is intentionally kept as raw tile/command bytes during +; this pass. GameModeState00 selects either offset $00 or $09 from this +; table and copies nine bytes to $026B-$0273. +; +; The palette table is copied in full to $0299-$02B8. +;============================================================================== + + +;============================================================================== +; $D0F3-$D0FE: Game State Initialization Values +; +; Local: +; 12 bytes copied directly to zero-page RAM $32-$3D: +; +; ROM $D0F3-$D0FE -> RAM $0032-$003D +; +; Global: +; Establishes a compact block of initial game-state values during +; GameModeState00. +; +; Notes: +; Individual fields remain unnamed until their consumers are traced. +;============================================================================== + +GameStateInitialValues: + .byte $04,$0C,$0A,$0A + .byte $0A,$00,$00,$00 + .byte $01,$02,$03,$00 + + +;============================================================================== +; $D0FF-$D110: Game Display Initialization Data +; +; Local: +; Contains two 9-byte records. GameModeState00 selects the first record when +; ($46 & $47) is zero and the second record when it is nonzero. +; +; The selected nine bytes are copied to RAM $026B-$0273. +; +; Global: +; Provides alternate display/update initialization according to the active +; player/mode state. +; +; Notes: +; These bytes appear to mix PPU/update-command values and tile IDs. +; Preserve them numerically until the consumer of $026B is decoded. +;============================================================================== +GameDisplayInitialData: + + ; Record 0, selected when ($46 & $47) == 0. + ; $D0FF-$D107 + .byte $21,$36,$20,$F7,$B0,$B3,$B2,$20,$B6 + + ; Record 1, selected when ($46 & $47) != 0. + ; $D108-$D110 + .byte $29,$B6,$29,$77,$B1,$B3,$B2,$28,$B6 + + +;============================================================================== +; $D111-$D130: Initial Gameplay Palette +; +; Local: +; Complete 32-byte palette copied to RAM $0299-$02B8 by GameModeState00. +; The NMI palette-update mechanism later transfers these buffers into PPU +; palette RAM. +; +; Global: +; Defines the initial background and sprite color palettes used for normal +; gameplay/game-mode initialization. +; +; Notes: +; $D111-$D120 contains four background palettes. +; $D121-$D130 contains four sprite palettes. +; +; Palette values are retained as NES color indices. +;============================================================================== +GameplayPaletteData: + ; Background palette 0 + .byte $0F,$20,$0F,$06 + + ; Background palette 1 + .byte $0F,$11,$0F,$27 + + ; Background palette 2 + .byte $0F,$16,$26,$06 + + ; Background palette 3 + .byte $0F,$19,$17,$12 + + ; Sprite palette 0 + .byte $0F,$27,$20,$06 + + ; Sprite palette 1 + .byte $0F,$11,$20,$33 + + ; Sprite palette 2 + .byte $0F,$21,$20,$21 + + ; Sprite palette 3 + .byte $0F,$09,$20,$17 + +;============================================================================== +; $D131-$D15F: Initialize Gameplay Nametable Attributes +; +; Local: +; Copies the 64-byte attribute table at $D160 to two PPU destinations: +; +; pass 1 -> PPU $23C0-$23FF +; pass 2 -> PPU $2BC0-$2BFF +; +; The first pass uses X=$01. After copying all $40 bytes, X is decremented. +; Since X becomes zero, execution falls through into the setup for the +; second destination at $2BC0. +; +; After the second copy, X decrements from $00 to $FF and the routine +; returns. +; +; Global: +; Called by GameModeState00 during game/round initialization. Initializes +; complete attribute tables for two nametables using identical palette- +; selection data. +; +; Notes: +; The branch at $D15E intentionally jumps back into the shared copy loop +; after selecting PPU address $2BC0. +; +; $D160 begins the 64-byte attribute source table and is not executable. +;============================================================================== + +InitializeGameplayAttributes: + lda PPUSTATUS + + lda #$23 + sta PPUADDR + + lda #$C0 + sta PPUADDR + + ldx #$01 + +@CopyAttributeTable: + ldy #$00 + +@CopyAttributeBytes: + lda GameplayAttributeData,y + sta PPUDATA + + iny + cpy #$40 + bne @CopyAttributeBytes + + dex + beq @SetupSecondNametable + + rts + +@SetupSecondNametable: + lda PPUSTATUS + + lda #$2B + sta PPUADDR + + lda #$C0 + sta PPUADDR + + bne @CopyAttributeTable + +;============================================================================== +; $D160-$D19F: Gameplay Nametable Attribute Data +; +; Local: +; Complete 64-byte NES attribute table copied to both PPU $23C0-$23FF and +; $2BC0-$2BFF by InitializeGameplayAttributes. +; +; Global: +; Defines background-palette selections for the gameplay nametables. +; +; Notes: +; Common values: +; +; $00 -> palette 0 in all four attribute quadrants +; $55 -> palette 1 in all four quadrants +; +; Values such as $11, $51, $50 and $05 combine different palette selections +; within the four quadrants of an attribute byte. +;============================================================================== + +GameplayAttributeData: + .byte $55,$55,$55,$55,$55,$11,$00,$00 + .byte $55,$55,$55,$55,$55,$11,$00,$00 + .byte $55,$55,$55,$55,$55,$11,$00,$00 + .byte $55,$55,$55,$55,$55,$51,$50,$50 + .byte $55,$55,$55,$55,$55,$11,$05,$05 + .byte $55,$55,$55,$55,$55,$11,$00,$00 + .byte $55,$55,$55,$55,$55,$55,$55,$55 + .byte $55,$55,$55,$55,$55,$55,$55,$55 + +;============================================================================== +; $D1A0-$D289: Gameplay Timers and State Progression +; +; Local: +; Updates several gameplay timers, palette-animation values, progression +; counters, and state variables. +; +; Global: +; Called once per active gameplay frame from GameModeState04. Coordinates +; several independent timing and progression systems. +; +; Notes: +; Address-based local labels are used during this pass to make the original +; branch destinations explicit and simplify byte-identical verification. +;============================================================================== + +UpdateGameplayTimers: + lda $89 + bmi @D1E1 + + inc $8A + + lda #$3C + cmp $8A + bne @D1C9 + + lda #$00 + sta $8A + + dec $89 + bpl @D1C9 + + sta $88 + + ldx #$00 + +@D1B7: + lda $39,x + and #$FC + sta $00 + + txa + ora $00 + sta $39,x + + inx + cpx #$04 + bne @D1B7 + +@D1C9: + lda $89 + cmp #$02 + bcs @D1E1 + + ldx #$11 + + lda $8A + and #$08 + bne @D1D9 + + ldx #$20 + +@D1D9: + stx $02AE + + lda #$0F + sta $02A9 + + +@D1E1: + lda $88 + bne @D213 + + lda $CF + cmp #$FF + beq @D213 + + inc $D1 + + lda $D1 + cmp #$3C + bne @D213 + + lda #$00 + sta $D1 + + dec $CF + bpl @D213 + + inc $D0 + + lda $D0 + and #$01 + beq @D209 + + jsr $E08E + + lda #$0F + bne @D20B + +@D209: + lda $D2 + +@D20B: + sta $87 + + ldx $D0 + lda $97,x + sta $CF + + +@D213: + lda $D3 + beq @D236 + + clc + adc $6A + cmp #$C0 + bne @D236 + + jsr ActivateNextStateEntry + + lda $D3 + ldx #$00 + +@D225: + cmp $8F,x + bne @D231 + + inx + lda $8F,x + sta $D3 + + jmp @D236 + +@D231: + inx + cpx #$04 + bne @D225 + + +@D236: + inc $D6 + + lda #$60 + cmp $D6 + bne @D251 + + lda #$00 + sta $D6 + + inc $D5 + + lda $D5 + cmp $96 + bne @D251 + + lda #$00 + sta $D5 + + jsr ActivateNextStateEntry + + +@D251: + ldx $D4 + + cpx #$02 + beq @D26E + + lda $8D,x + cmp $6A + bne @D26E + + inc $D4 + + lda #$01 + sta $D2 + + txa + asl + tax + + lda $AB,x + sta $CA + + lda $AC,x + sta $CB + + +@D26E: + ora $D7 + ora $D8 + beq @D289 + + dec $D8 + bne @D289 + + lda $D7 + beq @D283 + + dec $D7 + + lda #$3C + sta $D8 + + rts + + +@D283: + sta $2E + sta $30 + sta $8B + + +@D289: + rts + +;============================================================================== +; $D28A-$D29B: Activate First Available State Entry +; +; Local: +; Searches the even-indexed entries at $BA, $BC, and $BE for the first +; zero value. +; +; When a zero entry is found, replaces it with $02 and returns. +; +; If all three entries are already nonzero, returns without modifying them. +; +; Global: +; Called by UpdateGameplayTimers when certain progression timers expire. +; This appears to activate the next available entry in a three-element +; state array. +; +; Notes: +; Only the even addresses $BA/$BC/$BE are examined. The interleaved bytes +; $BB/$BD/$BF form a parallel field initialized elsewhere. +; +; The meaning of state value $02 will be refined when the consumers of +; $BA-$BF are decoded. +;============================================================================== +ActivateNextStateEntry: + ldx #$00 + +@FindAvailableEntry: + lda $BA,x + bne @NextEntry + + lda #$02 + sta $BA,x + + rts + +@NextEntry: + inx + inx + + cpx #$06 + bne @FindAvailableEntry + + rts + +;============================================================================== +; $D29C-$D2A3: Sequential Tile/Value Table +; +; Local: +; Eight sequential values from $24 through $2B. +; +; Global: +; Consumer has not yet been decoded during this pass. Given the sequential +; values and the surrounding graphics-oriented code, this may represent +; tile IDs or animation values. +; +; Notes: +; Keep the table generically named until a direct reference establishes its +; exact purpose. +;============================================================================== + +SequentialValueTableD29C: + .byte $24,$25,$26,$27,$28,$29,$2A,$2B + + + +;============================================================================== +; $D2A4-$D36B: Gameplay Proximity / State Transition Handler +; +; Local: +; Returns immediately when $6A is zero. +; +; Otherwise scans even-indexed state entries beginning at $B8. Entries whose +; state value is $04 undergo two proximity tests using the four-byte +; structures beginning at $001E. +; +; $02 is shifted once for each scanned entry and acts as a candidate bitmask. +; When a qualifying entry is found, the routine selects one of several state +; transition paths based on X and ($02 & $88). +; +; Global: +; Called during normal gameplay processing from GameModeState04. This +; routine appears to detect proximity/collision conditions and initiate +; corresponding gameplay-state transitions. +; +; Notes: +; $00/$01 form a temporary pointer, initially $001E. +; $02 is a shifting bitmask. +; $03 is temporary storage for distance/index calculations. +; +; Lookup tables begin at ProximityCandidateValues and will be decoded separately. +;============================================================================== +CheckGameplayProximity: + lda $6A + bne @Start + + rts + +@Start: + lda #$1E + sta $00 + + lda #$00 + sta $01 + + lda #$01 + sta $02 + + ldx #$00 + +@ScanEntries: + lda $B8,x + cmp #$04 + bne @NextEntry + + ldy #$00 + + lda $1A + cmp ($00),y + bcs @FirstAxisReverse + + lda ($00),y + sec + sbc $1A + bcs @CheckFirstAxisDistance + +@FirstAxisReverse: + sbc ($00),y + +@CheckFirstAxisDistance: + cmp #$0A + bcs @NextEntry + + sta $03 + + ldy #$02 + + lda $1C + cmp ($00),y + bcs @SecondAxisReverse + + lda ($00),y + sec + sbc $1C + bcs @CheckSecondAxisDistance + +@SecondAxisReverse: + sbc ($00),y + +@CheckSecondAxisDistance: + cmp #$0A + bcs @NextEntry + + adc $03 + cmp #$05 + bcc @CandidateFound + + +@NextEntry: + inx + inx + + lda $00 + clc + adc #$04 + sta $00 + + asl $02 + + cpx #$0A + bne @ScanEntries + + rts + + +@CandidateFound: + cpx #$08 + beq @ProcessSecondaryState + + lda $02 + and $88 + beq @SpecialCandidate + + txa + lsr + sta $03 + + ldy $D9 + + lda ProximityCandidateValues,y + + ldy $03 + sta $0033,y + + lda #$00 + sta $32 + + ldy $D9 + + lda ProximityDDValues,y + sta $DD + + lda ProximityDEValues,y + sta $DE + + inc $D9 + + lda #$08 + sta $B8,x + sta $0607 + + lda #$06 + sta $3F + + jmp $E0E6 + +;------------------------------------------------------------------------------ +; $D337 +; Candidate path selected when ($02 & $88) == 0. +;------------------------------------------------------------------------------ + +@SpecialCandidate: + lda #$08 + sta $3F + + lda #$12 + sta $32 + + lda #$80 + sta $DB + + lda #$00 + sta $87 + + rts + +;------------------------------------------------------------------------------ +; $D348 +; Special path selected when X == $08. +;------------------------------------------------------------------------------ + +@ProcessSecondaryState: + lda $8B + beq @InitializeSecondaryState + + rts + +;------------------------------------------------------------------------------ +; $D34D +; Initialize secondary state. +;------------------------------------------------------------------------------ +@InitializeSecondaryState: + sta $D7 + + lda #$80 + sta $D8 + sta $8B + sta $0606 + + ldy $93 + + lda SecondaryStateDDValues,y + sta $DD + + lda SecondaryStateDEValues,y + sta $DE + + lda SecondaryState37Values,y + sta $37 + + jmp $E0E6 + +;============================================================================== +; $D36C-$D38F: Gameplay Proximity / Transition Lookup Data +; +; Local: +; Lookup data used by CheckGameplayProximity when a qualifying proximity +; condition triggers a gameplay-state transition. +; +; Global: +; Supplies values written to $33+, $37, $DD and $DE during the different +; transition paths handled by CheckGameplayProximity. +; +; Notes: +; $D370 is intentionally a label inside the table beginning at $D36C. +; No bytes are duplicated. +;============================================================================== +ProximityCandidateValues: + ; $D36C-$D36F + .byte $2D,$2F,$32,$34 + +SecondaryState37Values: + ; $D370-$D373 + ; Also forms bytes 4-7 of ProximityCandidateValues. + .byte $2C,$2E,$30,$31 + +;------------------------------------------------------------------------------ +; $D374-$D377 +; Consumer not yet established. +;------------------------------------------------------------------------------ +ProximityUnknownTableD374: + .byte $33,$35,$36,$37 + +;------------------------------------------------------------------------------ +; $D378-$D37B +; Indexed by $D9 and loaded into $DE. +;------------------------------------------------------------------------------ +ProximityDEValues: + .byte $00,$00,$00,$01 + +;------------------------------------------------------------------------------ +; $D37C-$D37F +; Indexed by $D9 and loaded into $DD. +;------------------------------------------------------------------------------ +ProximityDDValues: + .byte $02,$04,$08,$06 + + +;------------------------------------------------------------------------------ +; $D380-$D387 +; Indexed by $93 and loaded into $DD. +;------------------------------------------------------------------------------ +SecondaryStateDDValues: + .byte $01,$03,$05,$07 + .byte $00,$00,$00,$00 + + +;------------------------------------------------------------------------------ +; $D388-$D38F +; Indexed by $93 and loaded into $DE. +;------------------------------------------------------------------------------ +SecondaryStateDEValues: + .byte $00,$00,$00,$00 + .byte $01,$02,$03,$05 + +;============================================================================== +; $D390-...: Gameplay Direction / Movement Processing +; +; Local: +; Processes directional controller input, validates a requested direction +; against the current map/tile state, and selects movement parameters. +; +; Global: +; Called during normal gameplay processing from GameModeState04. +; +; Notes: +; Address-derived labels are retained during this pass to make branch +; targets explicit while maintaining byte identity. +;============================================================================== + +UpdatePlayerMovement: + lda $48 + beq @D397 + + jmp $D506 + +@D397: + lda $4F + and #$F0 + beq @D3D2 + + ldx #$FF + +@D39F: + inx + asl + bcc @D39F + + lda InputDirectionTable,x + sta $50 + + clc + adc #$02 + and #$03 + cmp $51 + bne @D3C9 + + lda $1A + ora $1C + and #$07 + bne @D3C2 + + ldy $50 + + lda $022B,y + and #$F0 + bne @D3C9 + + +@D3C2: + lda $50 + sta $51 + + jmp @D3D6 + + +@D3C9: + ldx $50 + + lda $022B,x + and #$F0 + beq @D3D6 + + +@D3D2: + lda $51 + sta $50 + + +@D3D6: + ldx #$04 + + lda $88 + bne @D3DE + + ldx #$0A + +@D3DE: + lda $022A + cmp #$01 + beq @D3F4 + + cmp #$02 + beq @D3F4 + + dex + dex + + cmp #$03 + beq @D3F4 + + cmp #$09 + beq @D3F4 + + dex + dex + + +@D3F4: + lda $9F,x + sta $B5 + + lda $A0,x + sta $B6 + + lda $51 + asl + tay + + lda MovementArithmeticTable,y + sta $10 + + lda MovementArithmeticTable+1,y + sta $11 + + jmp ($0010) + +;============================================================================== +; $D40E-$D415: Movement Arithmetic Dispatch Table +; +; Local: +; Four 16-bit handlers selected using the internal direction value in $51. +; +; Global: +; Dispatches into direction-specific coordinate arithmetic used by +; UpdatePlayerMovement. +; +; Notes: +; Direction semantics remain unnamed during this pass. +;============================================================================== +MovementArithmeticTable: + .word $D416 + .word $D41A + .word $D435 + .word $D431 +;============================================================================== +; $D416-$D443: Direction-Specific Movement Arithmetic +; +; Local: +; Four entry points selected by MovementArithmeticTable converge into two +; shared arithmetic paths. +; +; $D416/$D41A select the coordinate component and enter subtraction. +; $D431/$D435 select the coordinate component and enter addition. +; +; Global: +; Computes the fixed-point movement result used by the second direction +; dispatch beginning at MovementApplyResult. +; +; Notes: +; Shared labels are deliberately non-local because multiple entry-point +; labels must branch into the same code. +;============================================================================== + +MovementArithmeticD416: + ldx #$02 + bne MovementSubtract + +MovementArithmeticD41A: + ldx #$00 + +MovementSubtract: + lda $1B,x + sec + sbc $B5 + sta $1B,x + + lda #$00 + bcs MovementSubtractNoBorrow + + lda #$01 + +MovementSubtractNoBorrow: + clc + adc $B6 + sta $CC + + jmp MovementApplyResult + + +MovementArithmeticD431: + ldx #$00 + beq MovementAdd + + +MovementArithmeticD435: + ldx #$02 + + +MovementAdd: + lda $1B,x + clc + adc $B5 + sta $1B,x + + lda #$00 + adc $B6 + sta $CC + +;============================================================================== +; $D444-$D459: Apply Movement Result and Dispatch Direction Handler +; +; Local: +; Decrements the movement accumulator $CC. If it becomes negative, returns +; immediately. +; +; Otherwise uses the current direction value at $51 as a byte offset into a +; four-entry handler table beginning at $D45A. +; +; Global: +; Second stage of UpdatePlayerMovement. After the fixed-point arithmetic +; performed by the $D416-$D443 handlers, this dispatches to the actual +; direction-specific coordinate/tile movement code. +; +; Notes: +; $51 is multiplied by two before indexing the pointer table. +;============================================================================== + +MovementApplyResult: + dec $CC + bpl @D449 + + rts + + +@D449: + lda $51 + asl + tay + + lda MovementDirectionTable,y + sta $10 + + lda MovementDirectionTable+1,y + sta $11 + + jmp ($0010) + +;============================================================================== +; $D45A-$D461: Direction-Specific Movement Dispatch Table +; +; Local: +; Four handlers selected according to the internal direction value in $51. +; +; Notes: +; Handler names remain address-based until coordinate effects are fully +; mapped to semantic direction names. +;============================================================================== + +MovementDirectionTable: + .word MovementDirectionD49A + .word MovementDirectionD490 + .word MovementDirectionD46C + .word MovementDirectionD462 + +;============================================================================== +; $D462-$D501: Direction-Specific Movement Handlers +; +; Local: +; Four entry points selected by MovementDirectionTable. +; +; $D462 and $D46C enter the increment path. +; $D490 and $D49A enter the decrement path. +; +; X selects which coordinate component at $1A/$1C is modified. $00 and $01 +; preserve working indexes used for collision/tile checks against $022B. +; +; After movement, the shared tail handles coordinate wrapping/state flags +; and, when aligned to an 8-unit boundary, commits a requested direction +; change from $50 to $51. +; +; Global: +; Final stage of UpdatePlayerMovement. Applies movement to the player's +; coordinate state and reconciles requested direction changes. +; +; Notes: +; Entry points intentionally share code. Use non-local labels for shared +; targets so ca65 scope rules do not change the branch structure. +;============================================================================== + + +;------------------------------------------------------------------------------ +; $D462 +; Increment coordinate component X=0. +;------------------------------------------------------------------------------ + +MovementDirectionD462: + ldx #$00 + stx $00 + + lda #$03 + sta $01 + + bne MovementIncrement + + +;------------------------------------------------------------------------------ +; $D46C +; Increment coordinate component X=2. +;------------------------------------------------------------------------------ + +MovementDirectionD46C: + ldx #$02 + stx $00 + stx $01 + + +;------------------------------------------------------------------------------ +; $D472: Shared increment path. +;------------------------------------------------------------------------------ + +MovementIncrement: + lda $1A,x + clc + adc #$01 + sta $1A,x + + and #$04 + bne MovementSharedTail + + ldx $01 + + lda $022B,x + and #$F0 + beq MovementSharedTail + + ldx $00 + + lda $1A,x + and #$FC + sta $1A,x + + bne MovementSharedTail + + +;------------------------------------------------------------------------------ +; $D490 +; Decrement coordinate component X=0. +;------------------------------------------------------------------------------ + +MovementDirectionD490: + ldx #$00 + stx $00 + + lda #$01 + sta $01 + + bne MovementDecrement + + +;------------------------------------------------------------------------------ +; $D49A +; Decrement coordinate component X=2. +;------------------------------------------------------------------------------ + +MovementDirectionD49A: + ldx #$02 + stx $00 + + lda #$00 + sta $01 + + +;------------------------------------------------------------------------------ +; $D4A2: Shared decrement path. +;------------------------------------------------------------------------------ + +MovementDecrement: + lda $1A,x + sec + sbc #$01 + sta $1A,x + + and #$04 + beq MovementSharedTail + + ldx $01 + + lda $022B,x + and #$F0 + beq MovementSharedTail + + ldx $00 + + lda $1A,x + clc + adc #$04 + and #$FC + sta $1A,x + + +;------------------------------------------------------------------------------ +; $D4C1: Shared movement/wrap tail. +;------------------------------------------------------------------------------ + +MovementSharedTail: + lda $1A + + cmp #$18 + bcc MovementCheckLeftWrap + + cmp #$A9 + bcs MovementCheckLeftWrap + + lda $38 + and #$DF + bcc MovementStoreWrapState + +MovementCheckLeftWrap: + lda #$20 + ora $38 + +MovementStoreWrapState: + sta $38 + + lda $1A + cmp #$0B + bcs MovementCheckRightWrap + + lda #$BF + sta $1A + bne MovementCheckAlignment + +MovementCheckRightWrap: + cmp #$C0 + bcc MovementCheckAlignment + + lda #$0B + sta $1A + + +MovementCheckAlignment: + lda $1A + ora $1C + and #$07 + bne MovementReturnToArithmetic + + lda $50 + cmp $51 + beq MovementReturnToArithmetic + + sta $51 + + inc $CC + inc $CC + + +MovementReturnToArithmetic: + jmp MovementApplyResult + +;============================================================================== +; $D502-$D505: Controller Direction Mapping +;============================================================================== + +InputDirectionTable: + .byte $03,$01,$02,$00 + +;============================================================================== +; $D506-$D51E: Scripted Direction/Input Update +; +; Local: +; Uses $E3 as a countdown and $E4 as an offset into the table beginning at +; $D51F. +; +; Each time $E3 reaches zero: +; - Advances $E4 by two. +; - Loads a new duration from $D51F+$E4 into $E3. +; +; It then takes the following table byte, masks it to two bits, and +; tail-jumps into UpdatePlayerMovement at $D3A6 with that value in A. +; +; Global: +; Entered from UpdatePlayerMovement when $48 is nonzero. This provides a +; scripted/autonomous direction source in place of normal controller input. +; +; Notes: +; $E4 indexes two-byte table records: +; +; byte 0 = duration/count +; byte 1 = direction/control value +; +; The second byte is masked with #$03 before entering movement processing. +;============================================================================== + +UpdateScriptedDirection: + ldy $E4 + + dec $E3 + bne @UseCurrentEntry + + inc $E4 + inc $E4 + + ldy $E4 + + lda ScriptedDirectionTable,y + sta $E3 + +@UseCurrentEntry: + lda ScriptedDirectionTable+1,y + and #$03 + + jmp $D3A6 + +;============================================================================== +; $D51F-...: Scripted Direction Table +; +; Local: +; Two-byte records used by UpdateScriptedDirection: +; +; byte 0 = duration +; byte 1 = direction/control number +; +; Global: +; Drives autonomous/scripted movement when $48 selects this path instead of +; normal player controller processing. +;============================================================================== +ScriptedDirectionTable: + .byte $00,$01 + .byte $D0,$00 + .byte $28,$01 + .byte $28,$02 + .byte $90,$03 + .byte $38,$00 + .byte $20,$03 + .byte $18,$01 + .byte $60,$02 + .byte $30,$01 + .byte $10,$02 + .byte $48,$01 + .byte $18,$02 + .byte $40,$01 + .byte $20,$02 + .byte $18,$00 + .byte $20,$03 + .byte $40,$02 + .byte $38,$01 + .byte $18,$02 + .byte $E0,$03 + .byte $30,$00 + .byte $28,$01 + .byte $28,$02 + .byte $20,$02 + .byte $80,$03 + .byte $40,$00 + .byte $40,$01 + +;============================================================================== +; $D557-$D586: Update Four Gameplay Entities +; +; Local: +; Iterates four gameplay entries using X offsets: +; +; $00, $02, $04, $06 +; +; Initializes several temporary values before the loop: +; +; $00 = $2F +; $01 = $02 +; $02 = $1E +; $03 = $00 +; $04 = $01 +; +; For each entry, calls the dispatcher at $D587. After each call: +; +; $00 += 4 +; $02 += 4 +; $04 <<= 1 +; X += 2 +; +; Processing ends after X reaches $08. +; +; Global: +; Called every active gameplay frame from GameModeState04. Coordinates +; per-entry updates for four gameplay entities/state slots. +; +; Notes: +; $00 and $02 appear to advance through parallel four-byte-strided RAM +; structures. +; +; $04 becomes a per-entry bitmask: +; +; $01,$02,$04,$08 +; +; The exact roles of the temporary values will become clearer as the +; dispatcher at $D587 and its handlers are decoded. +;============================================================================== + +UpdateGameplayEntities: + ldx #$00 + + lda #$2F + sta $00 + + lda #$02 + sta $01 + + lda #$1E + sta $02 + + lda #$00 + sta $03 + + lda #$01 + sta $04 + +@UpdateNextEntity: + jsr $D587 + + lda $00 + clc + adc #$04 + sta $00 + + lda $02 + clc + adc #$04 + sta $02 + + asl $04 + + inx + inx + + cpx #$08 + bne @UpdateNextEntity + + rts + +;============================================================================== +; $D587-$D595: Gameplay Entity State Dispatcher +; +; Local: +; Reads the state value for the current entity from $B8,X and uses that +; value directly as a byte offset into EntityStateTable. +; +; The selected 16-bit handler address is copied to $10/$11 and execution +; transfers to it with an indirect JMP. +; +; Global: +; Called by UpdateGameplayEntities once for each of four gameplay entity +; slots. This provides the per-entity state machine used by those entries. +; +; Notes: +; X identifies the current entry using even offsets: +; +; $00,$02,$04,$06 +; +; $B8,X is a byte offset into the pointer table, so valid state values are +; even: +; +; $00,$02,$04,$06,$08 +;============================================================================== + +DispatchGameplayEntityState: + ldy $B8,x + + lda EntityStateTable,y + sta $10 + + lda EntityStateTable+1,y + sta $11 + + jmp ($0010) + +;============================================================================== +; $D596-$D59F: Gameplay Entity State Table +; +; Local: +; Five 16-bit handlers indexed directly by the even state value stored in +; $B8,X. +; +; Global: +; Defines the per-entity state machine used by +; DispatchGameplayEntityState. +; +; Notes: +; States $04 and $06 deliberately share the same handler at $D5A1. +; State $08 targets $D5A0, one byte before that shared handler, suggesting +; another intentional overlapping entry point. +;============================================================================== + +EntityStateTable: + .word $D8D5 ; state $00 + .word $D885 ; state $02 + .word $D5A1 ; state $04 + .word $D5A1 ; state $06 + .word EntityState08 ; state $08 + +;============================================================================== +; $D5A0: Entity State $08 Handler +; +; Local: +; Returns immediately. +; +; Global: +; The entity-state table uses this as the handler for state $08, effectively +; disabling further processing for that entity state. +;============================================================================== + +EntityState08: + rts + + +;============================================================================== +; $D5A1-$D5B4: Entity State $04/$06 Secondary Dispatcher +; +; Local: +; Called for entity states $04 and $06 from EntityStateTable. +; +; First invokes the common entity helper at $D821. It then reads the +; secondary state value at $B9,X, doubles it, and uses the result as a byte +; offset into a four-entry pointer table at $D5B5. +; +; The selected address is stored in $10/$11 and execution transfers through +; an indirect JMP. +; +; Global: +; Provides a second-level state machine for gameplay entities whose primary +; state at $B8,X is $04 or $06. +; +; Notes: +; $B9,X behaves as an ordinal secondary state here. Unlike several earlier +; state tables, the value is explicitly multiplied by two before indexing +; the pointer table. +;============================================================================== + +DispatchEntitySecondaryState: + jsr $D821 + + lda $B9,x + asl + tay + + lda EntitySecondaryStateTable,y + sta $10 + + lda EntitySecondaryStateTable+1,y + sta $11 + + jmp ($0010) + +;============================================================================== +; $D5B5-$D5BC: Entity Secondary-State Dispatch Table +; +; Local: +; Four handler addresses selected using ($B9,X * 2). +; +; Global: +; Defines the second-level state machine used by primary entity states +; $04 and $06. +;============================================================================== + +EntitySecondaryStateTable: + .word EntitySecondaryState0 ; secondary state 0 + .word EntitySecondaryState1 ; secondary state 1 + .word EntitySecondaryState2 ; secondary state 2 + .word EntitySecondaryState3 ; secondary state 3 + +;============================================================================== +; $D5BD-$D5D2: Secondary-State Coordinate Adjustment +; +; Local: +; Secondary state 2 enters at $D5BD and selects Y=$03. +; Secondary state 3 enters at $D5C1 and selects Y=$01. +; +; Both then read through the indirect pointer at $02/$03, add the +; entity-specific values at $C2,X/$C3,X, write the low-byte result back +; through the pointer, and store the high-byte result in $CC. +; +; Control then tail-jumps to $D5EB. +; +; Global: +; Shared movement/update arithmetic for two secondary entity states. +; +; Notes: +; $02/$03 were initialized by UpdateGameplayEntities and advance by four +; bytes per entity, so they identify the current entity's four-byte state +; structure. +;============================================================================== + +EntitySecondaryState2: + ldy #$03 + bne EntitySecondaryAdjust + +EntitySecondaryState3: + ldy #$01 + +EntitySecondaryAdjust: + lda ($02),y + clc + adc $C2,x + sta ($02),y + + lda #$00 + adc $C3,x + sta $CC + + jmp $D5EB + +;============================================================================== +; $D5D3-$D5EE: Entity Secondary States $00/$01 Movement Arithmetic +; +; Local: +; Secondary state 0 enters at $D5D3 and selects Y=$03. +; Secondary state 1 enters at $D5D7 and selects Y=$01. +; +; Both subtract the entity-specific movement value at $C2,X from the +; structure addressed by $02/$03. Borrow is converted into a high-byte +; adjustment using $C3,X and stored in $CC. +; +; Afterward, $CC is decremented. A negative result returns immediately; +; otherwise execution continues into another secondary dispatcher at $D5EF. +; +; Global: +; Complements the addition paths at $D5BD/$D5C1. Together, the four +; secondary states provide signed movement along two coordinate components. +; +; Notes: +; The shared labels are non-local because multiple handler entry points +; converge into them. +;============================================================================== + +EntitySecondaryState0: + ldy #$03 + bne EntitySecondarySubtract + + +EntitySecondaryState1: + ldy #$01 + + +EntitySecondarySubtract: + lda ($02),y + sec + sbc $C2,x + sta ($02),y + + lda #$00 + bcs EntitySecondarySubtractNoBorrow + + lda #$01 + + +EntitySecondarySubtractNoBorrow: + clc + adc $C3,x + sta $CC + + +;============================================================================== +; $D5EB-$D600: Apply Entity Movement and Dispatch Direction Substate +; +; Local: +; Shared continuation reached by both the addition and subtraction +; secondary-state handlers. +; +; Decrements $CC. If it becomes negative, returns. Otherwise reads the +; current entity secondary state from $B9,X, doubles it, and selects a +; handler from the table at $D601. +; +; Global: +; Final arithmetic stage for entity movement before dispatching into the +; direction/substate-specific update handlers. +;============================================================================== + +EntitySecondaryApplyResult: + dec $CC + bpl EntityDirectionDispatch + + rts + + +EntityDirectionDispatch: + lda $B9,x + asl + tay + + lda EntityDirectionStateTable,y + sta $10 + + lda EntityDirectionStateTable+1,y + sta $11 + + jmp ($0010) + +;============================================================================== +; $D601-$D608: Entity Direction-State Dispatch Table +; +; Local: +; Four handlers selected from the entity's secondary state at $B9,X. +; +; Notes: +; The pointer order deliberately differs from the physical order of the +; handlers in ROM. +;============================================================================== + +EntityDirectionStateTable: + .word $D609 + .word $D61D + .word $D60F + .word $D617 + +;============================================================================== +; $D609-$D622: Entity Direction-State Handlers +; +; Local: +; Four handlers selected by EntityDirectionStateTable. +; +; Each handler configures: +; +; $05 = +1 or -1 +; Y = $00 or $02 +; +; before entering the shared coordinate-update code at $D623. +; +; Global: +; Provides the four direction-specific movement modes for the per-entity +; state machine. +; +; Notes: +; The four states form two coordinate axes and two signed directions: +; +; $D609 -> $05=$FF, Y=$02 +; $D60F -> $05=$01, Y=$02 +; $D617 -> $05=$01, Y=$00 +; $D61D -> $05=$FF, Y=$00 +; +; Concrete direction names remain deferred until the coordinate axes are +; mapped to screen X/Y. +;============================================================================== + +EntityDirectionD609: + lda #$FF + sta $05 + bne EntityDirectionAxis2 + + +EntityDirectionD60F: + lda #$01 + sta $05 + + +EntityDirectionAxis2: + ldy #$02 + bne EntityDirectionMove + + +EntityDirectionD617: + lda #$01 + sta $05 + bne EntityDirectionAxis0 + + +EntityDirectionD61D: + lda #$FF + sta $05 + + +EntityDirectionAxis0: + ldy #$00 + +;============================================================================== +; $D623-$D69A: Shared Entity Direction Movement +; +; Local: +; Applies the signed step in $05 to either byte $00 or $02 of the entity +; structure referenced by $02/$03. +; +; Performs coordinate wrapping/bounds handling, updates a per-entity flag +; stored in $39+, checks tile/grid alignment, and when the entity reaches a +; specific location ($60,$70) changes the entity primary state to $02. +; +; Global: +; Shared movement implementation for the four handlers above. +; +; Notes: +; This section eventually rejoins the earlier movement arithmetic at $D5EB +; when the entity is not aligned to the grid. +;============================================================================== + +EntityDirectionMove: + lda ($02),y + clc + adc $05 + sta ($02),y + + ldy #$00 + + lda ($02),y + cmp #$0A + bne @D637 + + lda #$BF + sta ($02),y + bne @D64B + + +@D637: + cmp #$C0 + bne @D641 + + lda #$0B + sta ($02),y + bne @D64B + + +@D641: + cmp #$18 + bcc @D64B + + cmp #$A9 + bcc @D64F + + +@D64B: + lda #$20 + bne @D651 + + +@D64F: + lda #$00 + + +@D651: + sta $05 + + txa + lsr + tay + + lda $39,y + and #$DF + ora $05 + sta $39,y + + ldy #$00 + lda ($02),y + + ldy #$02 + ora ($02),y + and #$07 + beq @D66E + + jmp EntitySecondaryApplyResult + +@D66E: + ldy #$00 + + lda ($02),y + cmp #$60 + bne $D69B + + ldy #$02 + + lda ($02),y + cmp #$70 + bne $D69B + + lda #$02 + sta $B8,x + + lda #$00 + clc + sbc $04 + and $88 + sta $88 + + txa + lsr + tay + sta $05 + + lda $39,y + and #$FC + ora $05 + sta $39,y + + rts + +;============================================================================== +; $D69B-$D6C6: Entity Movement Continuation / Target Selection +; +; Local: +; Continues entity processing after direction movement. +; +; Primary entity state $06 selects the fixed value $6F60 in $CD/$CE. +; Otherwise entity bitmasks in $04 are tested against $88 and $87. +; +; ($04 & $88) != 0 transfers to $D70A. +; ($04 & $87) != 0 transfers to $D6CF. +; +; If neither mask matches, the current entity index X selects a 16-bit value +; from EntityTargetTable and processing continues at $D778. +; +; Global: +; Chooses the next entity target/path-processing mode based on entity state +; and per-entity bitmasks. +; +; Notes: +; Cross-region branch targets remain raw until the destination blocks are +; decoded. +;============================================================================== + +EntityMovementContinuation: + lda $B8,x + cmp #$06 + bne @CheckEntityMasks + + lda #$60 + sta $CD + + lda #$6F + sta $CE + + jmp $D778 + + +@CheckEntityMasks: + lda $04 + and $88 + bne $D70A + + lda $04 + and $87 + bne $D6CF + + txa + tay + + lda EntityTargetTable,y + sta $CD + + lda EntityTargetTable+1,y + sta $CE + + jmp $D778 + +;============================================================================== +; $D6C7-$D6CE: Entity Target Table +; +; Local: +; Four 16-bit values indexed directly by the even entity offset X. +; +; Global: +; Supplies the $CD/$CE working target used by EntityMovementContinuation. +; +; Notes: +; Values are retained numerically until the consumer at $D778 is decoded. +;============================================================================== + +EntityTargetTable: + .word $08A8 + .word $0818 + .word $D0A8 + .word $D018 + +;============================================================================== +; $D6CF-$D6DD: Entity Target-Selection Dispatcher +; +; Local: +; Uses the current even entity index X directly as a byte offset into the +; four-entry pointer table at $D6DE. +; +; The selected handler address is stored in $10/$11 and execution transfers +; through an indirect JMP. +; +; Global: +; Entered from EntityMovementContinuation when the current entity's bit in +; $87 is set. Selects entity-specific target/path behavior. +; +; Notes: +; X is already constrained by the calling code to the even entity offsets: +; +; $00,$02,$04,$06 +; +; Therefore no multiply-by-two is required here. +;============================================================================== + +DispatchEntityTargetBehavior: + txa + tay + + lda EntityTargetBehaviorTable,y + sta $10 + + lda EntityTargetBehaviorTable+1,y + sta $11 + + jmp ($0010) + +;============================================================================== +; $D6DE-$D6E5: Entity Target-Behavior Dispatch Table +; +; Local: +; Four 16-bit handlers indexed directly by the even entity index X. +; +; Global: +; Selects different target/path calculations for each of the four gameplay +; entities. +; +; Notes: +; The fourth entry deliberately points backward to $D6E6, immediately after +; this table. +;============================================================================== + +EntityTargetBehaviorTable: + .word EntityTargetBehaviorD73B ; X = $00 + .word EntityTargetBehaviorD745 ; X = $02 + .word EntityTargetBehaviorD764 ; X = $04 + .word EntityTargetBehaviorD6E6 ; X = $06 + +;============================================================================== +; $D6E6-$D73A: Entity Target Behavior - Proximity/Direction Selection +; +; Local: +; Computes absolute differences between $1A/$2A and $1C/$2C. +; If either difference is at least $20, transfers to EntityTargetBehaviorD73B. +; +; Otherwise attempts up to five candidate directions. Each candidate is +; checked against the data addressed by $00/$01 and against the current +; entity direction/state at $B9,X. +; +; The selected value is stored into $B9,X before returning to the common +; entity movement result handler at $D5EB. +; +; Global: +; Fourth entry in EntityTargetBehaviorTable, selected for entity X=$06. +; +; Notes: +; Cross-block target $D73B remains raw until that handler is decoded. +;============================================================================== + +EntityTargetBehaviorD6E6: + lda $1A + sec + sbc $2A + bcs @D6F4 + + sta $05 + + lda #$00 + sec + sbc $05 + +@D6F4: + cmp #$20 + bcs $D73B + + lda $1C + sec + sbc $2C + bcs @D703 + + sta $05 + + lda #$00 + sec + sbc $05 + +@D703: + cmp #$20 + bcs $D73B + + lda $4B + sta $05 + + lda #$05 + sta $06 + + +@D712: + dec $06 + bne @D71A + + lda #$02 + bne @D736 + + +@D71A: + inc $05 + + lda $05 + and #$03 + tay + + lda ($00),y + and #$F8 + bne @D712 + + lda $05 + clc + adc #$02 + and #$03 + cmp $B9,x + beq @D712 + + lda $05 + and #$03 + + +@D736: + sta $B9,x + + jmp EntitySecondaryApplyResult + +;============================================================================== +; $D73B-$D777: Entity Target Calculation Handlers +; +; Local: +; Three handlers selected by EntityTargetBehaviorTable. +; +; $D73B: +; Uses the current $1A/$1C coordinate pair directly as the target. +; +; $D745: +; Uses $51 to select a signed coordinate offset from the table at $D75C, +; then adds that offset to $1A/$1C. +; +; $D764: +; Reflects/extrapolates the current coordinate pair relative to +; $1E/$20. +; +; All three produce the target coordinate in $CD/$CE and converge on the +; still-undecoded common processing at $D778. +; +; Global: +; Three of the four target strategies selected by +; EntityTargetBehaviorTable. +; +; Notes: +; Cross-block destination $D778 remains raw until the common handler is +; decoded separately. +;============================================================================== + + +;------------------------------------------------------------------------------ +; $D73B: direct target +;------------------------------------------------------------------------------ + +EntityTargetBehaviorD73B: + lda $1A + sta $CD + + lda $1C + sta $CE + + bne $D778 + + +;------------------------------------------------------------------------------ +; $D745: direction-offset target +;------------------------------------------------------------------------------ + +EntityTargetBehaviorD745: + lda $51 + asl + tay + + lda EntityDirectionTargetOffsets,y + clc + adc $1A + sta $CD + + lda EntityDirectionTargetOffsets+1,y + clc + adc $1C + sta $CE + + jmp $D778 + +;============================================================================== +; $D75C-$D763: Direction Target Offset Table +; +; Local: +; Four signed coordinate offset pairs selected by ($51 * 2). +; +; As signed 8-bit values: +; +; 0 -> ( 0, -24 ) +; 1 -> (-24, 0 ) +; 2 -> ( 0, +24 ) +; 3 -> (+24, 0 ) +; +; Global: +; Used by EntityTargetBehaviorD745 to project a target position in the +; entity's current direction. +;============================================================================== + +EntityDirectionTargetOffsets: + .byte $00,$E8 + .byte $E8,$00 + .byte $00,$18 + .byte $18,$00 + +;------------------------------------------------------------------------------ +; $D764: relative/reflected target +; +; Computes: +; +; $CD = $1A + ($1A - $1E) +; $CE = $1C + ($1C - $20) +; +; which algebraically corresponds to: +; +; $CD = 2*$1A - $1E +; $CE = 2*$1C - $20 +; +; using 8-bit arithmetic. +;------------------------------------------------------------------------------ + +EntityTargetBehaviorD764: + lda $1A + sec + sbc $1E + + clc + adc $1A + sta $CD + + lda $1C + sec + sbc $20 + + clc + adc $1C + sta $CE + +;============================================================================== +; $D778-$D79F: Common Entity Target Processing +; +; Local: +; Shared continuation used after an entity target coordinate has been +; calculated in $CD/$CE. +; +; Uses the entity primary state at $B8,X, minus $04, as a byte offset into +; a packed pointer table beginning at $D881. The selected pointer is stored +; in $0A/$0B and passed to BuildLegalDirectionList. +; +; The results returned in $0C/$0D determine the entity's next secondary +; state at $B9,X: +; +; $0C == $FF +; -> force state $02 +; +; $0C != $FF and $0D == $FF +; -> store $0C into $B9,X and return +; +; $0C != $FF and $0D != $FF +; -> continue at $D7A0 for additional selection logic +; +; Global: +; Common target-evaluation stage reached by the entity target strategies +; at $D73B, $D745 and $D764, as well as fixed-target paths from earlier +; entity processing. +; +; Notes: +; $D881 remains undecoded and is therefore referenced by address. +; +; The branch to $D7A0 is intentionally kept raw because $D7A0 belongs to +; the next block and is an explicit continuation rather than an RTS. +;============================================================================== + +EntityTargetCommon: + lda $B8,x + sec + sbc #$04 + tay + + lda $D881,y + sta $0A + + lda $D882,y + sta $0B + + jsr BuildLegalDirectionList + + lda $0C + cmp #$FF + bne @D795 + + lda #$02 + bne @D79D + + +@D795: + lda $0D + cmp #$FF + bne $D7A0 + + lda $0C + + +@D79D: + sta $B9,x + + rts + +;============================================================================== +; $D7A0-$D820: Select Entity Direction Toward Target +; +; Local: +; Entered from EntityTargetCommon when both $0C and $0D returned by +; BuildLegalDirectionList are valid. +; +; Computes absolute coordinate distances between target $CD/$CE and the +; current entity coordinates addressed through $02/$03. +; +; $05 accumulates direction-order information according to: +; - sign of the horizontal/vertical difference +; - which axis has the larger absolute distance +; +; The result is used to index a direction-priority table at $D871. +; Candidate directions are compared against the four values at $0C-$0F. +; When a candidate matches, execution branches back to the common direction +; store at $D79D. +; +; If the preferred candidates fail, the routine tests directions adjacent +; to the current secondary state $B9,X before eventually returning. +; +; Global: +; Alternate continuation of EntityTargetCommon. Selects the next movement +; direction for an entity based on its current position and target. +; +; Notes: +; $05 is a temporary direction-priority index. +; $06/$07 hold absolute coordinate differences. +; $08 is temporary storage during absolute-value calculations. +; +; $D871 is not decoded yet and remains a raw table reference. +;============================================================================== + +SelectEntityDirectionTowardTarget: + ldy #$00 + sty $05 + + lda $CD + sec + sbc ($02),y + bcs @D7B9 + + sta $08 + + lda #$00 + sec + sbc $08 + + inc $05 + inc $05 + inc $05 + inc $05 + +@D7B9: + sta $06 + + lda $CE + + ldy #$02 + + sec + sbc ($02),y + bcs @D7D2 + + sta $08 + + lda #$00 + sec + sbc $08 + + inc $05 + inc $05 + +@D7D2: + sta $07 + + lda $06 + cmp $07 + bcs @D7DB + + inc $05 + +@D7DB: + lda $05 + asl + sta $05 + + lda #$02 + sta $06 + + +@D7E3: + ldy $05 + + lda $D871,y + + ldy #$00 + +@D7EA: + cmp $000C,y + beq $D79D + + iny + cpy #$04 + bne @D7EA + + inc $05 + + dec $06 + bne @D7E3 + + lda $B9,x + sec + sbc #$01 + and #$03 + + ldy #$00 + +@D802: + cmp $000C,y + beq $D79D + + iny + cpy #$04 + bne @D802 + + lda $B9,x + clc + adc #$01 + and #$03 + + ldy #$00 + +@D814: + cmp $000C,y + beq $D79D + + iny + cpy #$04 + bne @D814 + + rts + +;============================================================================== +; $D821-$D870: Select Entity Movement Parameters +; +; Local: +; Chooses the two-byte movement/step value stored at: +; +; $C2,X +; $C3,X +; +; for the current gameplay entity. +; +; Selection depends on: +; +; - primary entity state $B8,X +; - current entity coordinates through ($02) +; - entity bitmask $04 against $88 +; - whether X is zero or identifies another entity +; +; Parameter pairs are copied from several global values: +; +; $B3/$B4 +; $CA/$CB +; $AF/$B0 +; $B1/$B2 +; +; Primary state $06 instead installs the fixed pair: +; +; $00,$02 +; +; Global: +; Called before the $B9,X secondary-state dispatcher at $D5A1. This chooses +; the movement increment used by the entity movement arithmetic. +; +; Notes: +; The coordinate pointer $02/$03 identifies the current entity's structure. +; X is the even entity slot index. +;============================================================================== + +SelectEntityMovementSpeed: + lda $B8,x + cmp #$06 + beq @D864 + + ldy #$02 + + lda ($02),y + cmp #$70 + bne @D843 + + ldy #$00 + + lda ($02),y + cmp #$90 + bcs @D83D + + cmp #$30 + bcs @D843 + +@D83D: + lda $B3 + sta $C2,x + + lda $B4 + sta $C3,x + + rts + + +@D843: + lda $04 + and $88 + bne @D85A + + txa + bne @D854 + + lda $CA + sta $C2 + + lda $CB + sta $C3 + + rts + + +@D854: + lda $AF + sta $C2,x + + lda $B0 + sta $C3,x + + rts + + +@D85A: + lda $B1 + sta $C2,x + + lda $B2 + sta $C3,x + + rts + + +@D864: + lda #$00 + sta $C2,x + + lda #$02 + sta $C3,x + + rts + +;============================================================================== +; $D871-$D880: Entity Direction Priority Table +; +; Local: +; Sixteen direction values used by SelectEntityDirectionTowardTarget. +; +; $05 is derived from: +; - the sign of each target-coordinate difference, +; - which axis has the greater absolute distance. +; +; $05 is doubled before indexing this table, and the routine may examine +; the following entry as its second preferred candidate. +; +; Global: +; Defines the preferred entity movement directions for the different +; relative target-position quadrants/axis priorities. +; +; Notes: +; Values are internal direction numbers 0-3. Concrete direction names remain +; deferred until the internal direction numbering is fully mapped. +; +; The natural layout is eight pairs of preferred directions. +;============================================================================== + +EntityDirectionPriorityTable: + .byte $03,$02 + .byte $02,$03 + .byte $03,$00 + .byte $00,$03 + .byte $01,$02 + .byte $02,$01 + .byte $01,$00 + .byte $00,$01 + +;============================================================================== +; $D881-$D884: Entity Path/Map Pointer Table +; +; Local: +; Two 16-bit values selected according to entity primary state: +; +; state $04 -> $0000 +; state $06 -> $082C +; +; The selected value is placed in $0A/$0B and passed to the helper at +; BuildLegalDirectionList. +; +; Global: +; Supplies state-dependent path/map parameters used by EntityTargetCommon. +; +; Notes: +; Keep the entries as literal 16-bit values until BuildLegalDirectionList +; is decoded and the semantic meaning of $0A/$0B is established. +;============================================================================== + +EntityPathParameterTable: + .word $0000 + .word $082C + +;============================================================================== +; $D885-$D8D4: Entity Primary State $02 Handler +;============================================================================== + +UpdateEntityState02: + lda #$00 + tay + sta $05 + + lda #$80 + sta $06 + + lda ($02),y + cmp #$60 + beq UpdateEntityState02SecondaryPhase + + bcc @D89C + + dec $05 + + lda #$01 + bne @D89E + +@D89C: + lda #$03 + +@D89E: + sta $B9,x + + ldy #$01 + + lda ($02),y + clc + adc $06 + sta ($02),y + + ldy #$00 + + lda ($02),y + adc $05 + sta ($02),y + + rts + + +;============================================================================== +; $D8B2-$D8D4: Entity State $02 Secondary Movement Phase +;============================================================================== + +UpdateEntityState02SecondaryPhase: + lda #$00 + sta $B9,x + + ldy #$03 + + lda ($02),y + sec + sbc #$80 + sta ($02),y + + ldy #$02 + + lda ($02),y + sbc #$00 + sta ($02),y + + cmp #$58 + beq @D8CC + + rts + +@D8CC: + lda #$01 + sta $B9,x + + lda #$04 + sta $B8,x + + rts + + +;============================================================================== +; $D8D5-$D913: Entity Primary State $00 Handler +; +; Local: +; Initializes working movement values: +; +; $05 = $00 +; $06 = $80 +; +; Then uses the entity secondary state at $B9,X as a byte offset into a +; two-entry table at $D8EC. +; +; The selected subhandler adjusts bytes 3/2 of the current entity structure +; through $02/$03. When the resulting high byte crosses defined thresholds, +; $B9,X advances to secondary state $02 or resets to $00. +; +; Global: +; Handler selected by EntityStateTable for primary entity state $00. +; +; Notes: +; Unlike the $D5A1 secondary dispatcher, $B9,X is already treated as a byte +; offset here. Valid values are $00 and $02. +;============================================================================== + +EntityState00: + lda #$00 + sta $05 + + lda #$80 + sta $06 + + ldy $B9,x + + lda EntityState00SubstateTable,y + sta $10 + + lda EntityState00SubstateTable+1,y + sta $11 + + jmp ($0010) + + +;============================================================================== +; $D8EC-$D8EF: Entity State $00 Secondary Table +;============================================================================== + +EntityState00SubstateTable: + .word UpdateEntityState00MovingNegative + .word UpdateEntityState00MovingPositive + +;------------------------------------------------------------------------------ +; $D8F0: secondary state $00 +;------------------------------------------------------------------------------ + +UpdateEntityState00MovingNegative: + dec $05 + + +;------------------------------------------------------------------------------ +; $D8F2: secondary state $02 +;------------------------------------------------------------------------------ + +UpdateEntityState00MovingPositive: + ldy #$03 + + lda ($02),y + clc + adc $06 + sta ($02),y + + ldy #$02 + + lda ($02),y + adc $05 + sta ($02),y + + cmp #$69 + bcs @D90B + + lda #$02 + bne @D911 + + +@D90B: + cmp #$70 + bcc @D913 + + lda #$00 + +@D911: + sta $B9,x + +@D913: + rts +;============================================================================== +; $D914-$D943: Update Four Gameplay Entity States +; +; Local: +; Iterates the four gameplay entity slots using even X offsets: +; +; $00,$02,$04,$06 +; +; Initializes the same per-entity working values used by the other entity +; update coordinator: +; +; $00 = $2F +; $01 = $02 +; $02 = $1E +; $03 = $00 +; $04 = $01 +; +; Calls the entity dispatcher at $D944 for each slot. +; +; After each call: +; +; $00 += 4 +; $02 += 4 +; $04 <<= 1 +; X += 2 +; +; Global: +; Called from GameModeState06 during its per-frame update sequence. +; Processes a second entity-state machine for all four gameplay entities. +; +; Notes: +; The layout closely parallels UpdateGameplayEntities at $D557, but uses +; a different dispatcher and therefore a different behavior set. +;============================================================================== + +UpdateEntityMovementStates: + ldx #$00 + + lda #$2F + sta $00 + + lda #$02 + sta $01 + + lda #$1E + sta $02 + + lda #$00 + sta $03 + + lda #$01 + sta $04 + +@D92A: + jsr $D944 + + lda $00 + clc + adc #$04 + sta $00 + + lda $02 + clc + adc #$04 + sta $02 + + asl $04 + + inx + inx + + cpx #$08 + bne @D92A + + rts + +;============================================================================== +; $D944-$D952: Gameplay Entity Transition-State Dispatcher +; +; Local: +; Reads the current entity primary state from $B8,X and uses it directly as +; a byte offset into the packed pointer table at $D953. +; +; The selected 16-bit address is stored in $10/$11 and execution transfers +; to it through an indirect JMP. +; +; Global: +; Called by UpdateEntityMovementStates once for each of the four +; gameplay entity slots. +; +; Notes: +; X identifies the entity using even offsets: +; +; $00,$02,$04,$06 +; +; $B8,X is itself an even byte offset into the pointer table: +; +; $00,$02,$04,$06,$08 +;============================================================================== + +DispatchEntityMovementState: + ldy $B8,x + + lda EntityMovementStateHandlerTable,y + sta $10 + + lda EntityMovementStateHandlerTable+1,y + sta $11 + + jmp ($0010) + + +;============================================================================== +; $D953-$D95C: Gameplay Entity Transition-State Table +; +; Local: +; Five 16-bit handlers indexed directly by the entity primary state stored +; in $B8,X. +; +; Global: +; Defines the per-entity behavior used by +; DispatchEntityMovementState. +; +; Notes: +; States $00, $02, $04 and $08 all use the same handler at $D95D. +; +; State $06 reuses DispatchEntitySecondaryState at $D5A1. +;============================================================================== + +EntityMovementStateHandlerTable: + .word EntityMovementStateNoOp ; state $00 + .word EntityMovementStateNoOp ; state $02 + .word EntityMovementStateNoOp ; state $04 + .word DispatchEntitySecondaryState ; state $06 + .word EntityMovementStateNoOp ; state $08 + +;============================================================================== +; $D95D: No-Op Entity Transition Handler +; +; Local: +; Returns immediately. +; +; Global: +; Used by EntityMovementStateHandlerTable for primary entity states +; $00, $02, $04 and $08. +;============================================================================== +EntityMovementStateNoOp: + rts + +;============================================================================== +; $D95E-$D979: Check Entity Transition State +; +; Local: +; Scans the four primary entity-state entries at: +; +; $B8,$BA,$BC,$BE +; +; If any entity is in primary state $06, stores the current A value +; ($06 from the CMP) into $0608 and returns. +; +; If no entity is in state $06, tests $88. When $88 is nonzero, stores that +; value into $0609 before returning. +; +; Global: +; Called during normal gameplay processing. Exports entity/state conditions +; to RAM $0608/$0609 for use by other gameplay systems. +; +; Notes: +; $00 is initialized but not subsequently used inside this routine in the +; decoded path. Preserve the write because another overlapping entry or +; external expectation may depend on it. +;============================================================================== + +UpdateEntityStatusFlags: + ldx #$00 + stx $00 + +@D962: + lda $B8,x + cmp #$06 + bne @D96C + + sta $0608 + rts + +@D96C: + inx + inx + + cpx #$08 + bne @D962 + + lda $88 + beq UpdatePlayerVerticalRegionFlag + + sta $0609 + + rts + +;============================================================================== +; $D97A-$D98D: Update Gameplay Range Flag +;============================================================================== +UpdatePlayerVerticalRegionFlag: + ldy #$00 + + lda $6A + cmp #$88 + bcs @D988 + + iny + + cmp #$42 + bcs @D988 + + iny + +@D988: + lda #$01 + sta $060A,y + + rts + +;============================================================================== +; $D98E-$D9C5: Update Direction-Dependent Gameplay Value +; +; Local: +; Builds a base value from the current direction $51, then selects an +; additional offset based on coordinate alignment, tile state, and $B7. +; +; The resulting value is stored in $32. +; +; Notes: +; Address-derived labels preserve the original compact control flow. +;============================================================================== + +UpdatePlayerDirectionAnimation: + lda $51 + asl + clc + adc #$02 + sta $00 + + lda $1A + ora $1C + and #$07 + bne @D9AE + + ldy $51 + + lda $022B,y + and #$F0 + beq @D9AE + + lda $B7 + and #$03 + jmp @D9B2 + + +@D9AE: + inc $B7 + + lda $B7 + +@D9B2: + and #$07 + cmp #$06 + bcc @D9BC + + lda #$01 + bne @D9C3 + + +@D9BC: + tay + + lda PlayerDirectionAnimationOffsets,y + clc + adc $00 + + +@D9C3: + sta $32 + + rts + +;============================================================================== +; $D9C6-$D9CB: Direction-Value Offset Table +; +; Local: +; Six values indexed by $B7 & $07 when that result is less than six. +; +; Global: +; Provides the small offset added to the direction-derived base before the +; result is stored in $32. +;============================================================================== + +PlayerDirectionAnimationOffsets: + .byte $00,$00,$00,$01,$01,$00 + +;============================================================================== +; $D9CC-$D9EA: Update Four Entity Display/State Values +; +; Local: +; Initializes: +; +; X = $00 +; $00 = $00 or $01 depending on frame-counter bit 3 +; $01 = $01 +; +; Then iterates the four entity slots: +; +; X = $00,$02,$04,$06 +; +; For each entity: +; - Calls the dispatcher at $D9EB. +; - Shifts $01 left once, producing per-entity masks: +; +; $01,$02,$04,$08 +; +; - Advances X by two. +; +; Global: +; Called from several game-mode states and during normal gameplay. Provides +; per-frame updates for all four gameplay entities, with an alternating +; phase selected from frame-counter bit 3. +; +; Notes: +; $4B is the NMI-driven frame counter. +; $00 is a two-phase animation/control value. +; $01 is the current entity bitmask. +;============================================================================== + +UpdateEntitySpriteStates: + lda #$00 + tax + sta $00 + + lda $4B + and #$08 + beq @D9DC + + lda #$01 + sta $00 + + +@D9DC: + lda #$01 + sta $01 + + +@D9E0: + jsr $D9EB + + asl $01 + + inx + inx + + cpx #$08 + bne @D9E0 + + rts + + +;============================================================================== +; $D9EB-$D9F9: Per-Entity Display/State Dispatcher +;============================================================================== + +DispatchEntitySpriteState: + ldy $B8,x + + lda EntitySpriteStateHandlerTable,y + sta $10 + + lda EntitySpriteStateHandlerTable+1,y + sta $11 + + jmp ($0010) + + +;============================================================================== +; $D9FA-$DA03: Entity Display/State Table +;============================================================================== +EntitySpriteStateHandlerTable: + .word UpdateNormalEntitySprite ; state $00 + .word UpdateNormalEntitySprite ; state $02 + .word UpdateNormalEntitySprite ; state $04 + .word UpdateSpecialEntitySprite ; state $06 + .word $D9EA ; state $08 -> shared RTS + +;============================================================================== +; $DA04-$DA3F: Entity Display/State Value Handlers +; +; Local: +; Three entry points used by EntitySpriteStateHandlerTable: +; +; $DA21 primary states $00/$02/$04 +; $DA2D primary state $06 +; +; $DA04 is shared calculation code entered by those handlers. +; +; Each path computes a value from the entity secondary state $B9,X, combines +; it with a base value, and stores the final result into one of $33-$36 +; according to the current entity index X. +; +; Global: +; Produces per-entity display/state values during UpdateEntitySpriteStates. +; +; Notes: +; X is an even entity index ($00,$02,$04,$06). TXA/LSR converts this into +; the ordinal entity index 0-3 for the final store at $33,Y. +;============================================================================== + +;============================================================================== +; $DA04-$DA3F: Entity Display/State Value Handlers +; +; Local: +; Shared calculations used by the per-entity display/state dispatcher. +; +; Global: +; UpdateNormalEntitySprite handles primary states $00/$02/$04. +; UpdateSpecialEntitySprite handles primary state $06. +; +; Notes: +; Non-local labels are intentional because multiple handler entry points +; branch backward into shared code. +;============================================================================== + +;------------------------------------------------------------------------------ +; $DA04 +;------------------------------------------------------------------------------ + +CalculateEntitySpriteValue: + lda $B9,x + sta $03 + + lda #$0A + + +;------------------------------------------------------------------------------ +; $DA0A +;------------------------------------------------------------------------------ + +CalculateEntitySpriteValueLoop: + dec $03 + bmi AddEntitySpriteBase + + clc + adc #$02 + bne CalculateEntitySpriteValueLoop + + +;------------------------------------------------------------------------------ +; $DA13 +;------------------------------------------------------------------------------ + +AddEntitySpriteBase: + clc + adc $00 + sta $02 + + +;------------------------------------------------------------------------------ +; $DA18 +;------------------------------------------------------------------------------ + +StoreEntitySpriteValue: + txa + lsr + tay + + lda $02 + sta $0033,y + + rts + + +;------------------------------------------------------------------------------ +; $DA21 +; Primary entity states $00/$02/$04. +;------------------------------------------------------------------------------ + +UpdateNormalEntitySprite: + lda $01 + and $88 + beq CalculateEntitySpriteValue + + lda #$1E + sta $02 + + bne AddEntitySpriteBase + + +;------------------------------------------------------------------------------ +; $DA2D +; Primary entity state $06. +;------------------------------------------------------------------------------ + +UpdateSpecialEntitySprite: + lda $B9,x + sta $03 + + lda #$20 + + +;------------------------------------------------------------------------------ +; $DA33 +;------------------------------------------------------------------------------ + +UpdateSpecialEntitySpriteLoop: + dec $03 + bmi UpdateSpecialEntitySpriteDone + + clc + adc #$01 + bne UpdateSpecialEntitySpriteLoop + + +;------------------------------------------------------------------------------ +; $DA3C +;------------------------------------------------------------------------------ + +UpdateSpecialEntitySpriteDone: + sta $02 + + bmi StoreEntitySpriteValue + +;============================================================================== +; $DA40-$DAF0: Gameplay Entity Collision / Slot Exchange +; +; Local: +; Copies $24 bytes from zero-page $1A-$3D to RAM $0274-$0297. +; +; Then initializes an indirect pointer to $0284 and scans entity structures +; while testing them against the primary coordinate pair at $0274/$0276. +; +; For each enabled entity, computes absolute coordinate differences. If both +; axes are within $19 and their combined distance is below $10, exchanges +; coordinate and associated state fields between the primary slot and the +; selected entity slot. +; +; If no qualifying overlap is found, advances the structure pointer backward +; by four bytes, shifts the per-entity mask, and continues. +; +; Global: +; Called in several game-mode states and during normal gameplay. Maintains +; the mirrored gameplay/object state in $0274+ and handles close-overlap +; exchanges between entity slots. +; +; Notes: +; $00/$01 form a temporary pointer, initially $0284. +; $02 counts entity slots. +; $03 is a bitmask, initially $08. +; $04-$06 are temporary coordinate/state values during a swap. +; +; $DAF1 is a separate routine and is not included in this block. +;============================================================================== + +CheckEntityCollisions: + ldx #$23 + +@CopyWorkingState: + lda $1A,x + sta $0274,x + + dex + bpl @CopyWorkingState + + lda #$84 + sta $00 + + lda #$02 + sta $01 + + lda #$08 + sta $03 + + lda #$03 + sta $02 + + +@CheckNextEntity: + lda $03 + and $88 + bne @AdvanceEntity + + ldy #$00 + + lda $0274 + cmp ($00),y + bcs @FirstAxisReverse + + lda ($00),y + sec + sbc $0274 + bcs @CheckFirstAxis + +@FirstAxisReverse: + sbc ($00),y + +@CheckFirstAxis: + cmp #$19 + bcs @AdvanceEntity + + sta $04 + + ldy #$02 + + lda $0276 + cmp ($00),y + bcs @SecondAxisReverse + + lda ($00),y + sec + sbc $0276 + bcs @CheckSecondAxis + +@SecondAxisReverse: + sbc ($00),y + +@CheckSecondAxis: + cmp #$19 + bcs @AdvanceEntity + + adc $04 + cmp #$10 + bcs @AdvanceEntity + + ; Save the primary slot coordinates/state. + lda $0274 + sta $03 + + lda $0276 + sta $04 + + lda $028C + sta $05 + + lda $0292 + sta $06 + + ; Copy selected entity coordinates into the primary slot. + ldy #$00 + lda ($00),y + sta $0274 + + lda $03 + sta ($00),y + + ldy #$02 + lda ($00),y + sta $0276 + + lda $04 + sta ($00),y + + ; Exchange the parallel status values. + ldx $02 + + lda $028D,x + sta $028C + + lda $05 + sta $028D,x + + lda $0293,x + sta $0292 + + lda $06 + sta $0293,x + + jmp $DAEB + + +@AdvanceEntity: + lda $00 + sec + sbc #$04 + sta $00 + + lsr $03 + + dec $02 + bmi @NoCollision + + jmp @CheckNextEntity + + +@NoCollision: + jsr $E1DA + + jmp $DAF1 + +;============================================================================== +; $DAF1-$DBEE: Rebuild Gameplay Entity Render Data +; +; Local: +; Builds four-byte render/object records in page $07 from mirrored gameplay +; state beginning at $0274. +; +; Working variables: +; +; $00/$01 = source pointer, initially $0274 +; $02/$03 = destination pointer, initially $0700 +; $04 = source-group index +; $05 = record/lookup index +; $06 = temporary lookup index +; +; X advances through even entity offsets $00,$02,$04,$06. +; +; Encoded state values at $028C+ determine which lookup-table path is used +; to construct bytes 1 and 2 of each four-byte output record. +; +; Global: +; Called by several gameplay paths to rebuild the page-$07 representation +; used by the rendering/object pipeline. +; +; Notes: +; Several ROM tables referenced here remain undecoded: +; +; $DBEE +; $DCEE +; $DD22 +; EntitySpriteAttributeTable0 +; EntitySpriteCoordinateOffsets +; $DE57 +; +; $DBEE is particularly interesting because it is also the RTS terminating +; this routine. The ROM intentionally uses that address as both executable +; code and the base of a later indexed lookup. +;============================================================================== +BuildEntitySpriteBuffer: + lda #$74 + sta $00 + + lda #$02 + sta $01 + + lda #$00 + sta $02 + + lda #$07 + sta $03 + + lda #$00 + sta $04 + + +;------------------------------------------------------------------------------ +; $DB05 +; Start/restart one source group. +;------------------------------------------------------------------------------ + +BuildSpriteBufferNextGroup: + lda #$00 + sta $05 + + tax + + +;------------------------------------------------------------------------------ +; $DB0A +; Build one four-byte render record. +;------------------------------------------------------------------------------ + +BuildSpriteBufferNextSprite: + ldy #$02 + + lda ($00),y + bne AdjustSpriteY + + lda #$FF + bne StoreSpriteY + + +;------------------------------------------------------------------------------ +; $DB14 +;------------------------------------------------------------------------------ + +AdjustSpriteY: + clc + adc EntitySpriteCoordinateOffsets,x + + +;------------------------------------------------------------------------------ +; $DB18 +;------------------------------------------------------------------------------ + +StoreSpriteY: + ldy #$00 + sta ($02),y + + ldy $04 + + lda $028C,y + asl + rol + rol + and #$03 + + beq BuildSpriteClass0 + + cmp #$02 + beq BuildSpriteClass2 + + bcc BuildSpriteClass1 + + +;------------------------------------------------------------------------------ +; $DB2E +; Status-class path. +;------------------------------------------------------------------------------ + + lda $028C,y + asl + asl + clc + adc $05 + tay + + sta $06 + + lda $DD22,y + + ldy #$01 + sta ($02),y + + ldy $04 + lda $0292,y + + ldy $06 + ora EntitySpriteCoordinateOffsets,y + + ldy #$02 + sta ($02),y + + jmp BuildSpriteX + + +;------------------------------------------------------------------------------ +; $DB51 +;------------------------------------------------------------------------------ + +BuildSpriteClass0: + lda $028C,y + asl + asl + clc + adc $05 + tay + + sta $06 + + lda $DBEE,y + + ldy #$01 + sta ($02),y + + ldy $04 + lda $0292,y + + ldy $06 + ora $DD22,y + + ldy #$02 + sta ($02),y + + jmp BuildSpriteX + +;------------------------------------------------------------------------------ +; $DB74 +;------------------------------------------------------------------------------ + +BuildSpriteClass1: + lda $028C,y + asl + asl + clc + adc $05 + tay + + sta $06 + + lda $DCEE,y + + ldy #$01 + sta ($02),y + + ldy $04 + lda $0292,y + + ldy $06 + ora $DE22,y + + ldy #$02 + sta ($02),y + + jmp BuildSpriteX + +;------------------------------------------------------------------------------ +; $DB97 +;------------------------------------------------------------------------------ + +BuildSpriteClass2: + lda $028C,y + asl + asl + clc + adc $05 + tay + + sta $06 + + lda $DD22,y + + ldy #$01 + sta ($02),y + + ldy $04 + lda $0292,y + + ldy $06 + ora EntitySpriteCoordinateOffsets,y + + ldy #$02 + sta ($02),y + + +;------------------------------------------------------------------------------ +; $DBB7 +; Construct byte 3 of the render record. +;------------------------------------------------------------------------------ + +BuildSpriteX: + ldy #$00 + + lda ($00),y + bne AdjustSpriteX + + lda #$FF + bne StoreSpriteX + + +;------------------------------------------------------------------------------ +; $DBC0 +;------------------------------------------------------------------------------ + +AdjustSpriteX: + clc + adc EntitySpriteCoordinateOffsets+1,x + + +;------------------------------------------------------------------------------ +; $DBC4 +;------------------------------------------------------------------------------ + +StoreSpriteX: + ldy #$03 + sta ($02),y + + ; Advance destination by one 4-byte record. + lda $02 + clc + adc #$04 + sta $02 + + inc $05 + + inx + inx + + cpx #$08 + beq BuildSpriteBufferNextSource + + jmp BuildSpriteBufferNextSprite + + +BuildSpriteBufferNextSource: + lda $00 + clc + adc #$04 + sta $00 + + inc $04 + + lda $04 + cmp #$06 + beq BuildSpriteBufferDone + + jmp BuildSpriteBufferNextGroup + +BuildSpriteBufferDone: + rts + +;============================================================================== +; $DBEE-$DC3F: Gameplay Entity Render Lookup Data +; +; Local: +; Lookup data used by BuildEntitySpriteBuffer. +; +; The routine constructs an index from: +; +; ($028C,Y * 4) + $05 +; +; and uses that value to index this region for render-facing object data. +; +; Global: +; Supplies tile/state values used when rebuilding the four-byte page-$07 +; entity records. +; +; Notes: +; The region contains strongly patterned groups of repeated values, but the +; complete set of consumers has not yet been decoded. Keep this as one +; contiguous table during the first pass rather than assigning speculative +; semantic subdivisions. +;============================================================================== + +EntitySpriteTileTable0: + + ; $DBEE-$DBFD + .byte $4C,$4C,$4C,$4C + .byte $00,$00,$00,$00 + .byte $04,$04,$03,$03 + .byte $08,$08,$07,$07 + + ; $DBFE-$DC0D + .byte $02,$01,$02,$01 + .byte $06,$05,$06,$05 + .byte $03,$03,$04,$04 + .byte $07,$07,$08,$08 + + ; $DC0E-$DC1D + .byte $01,$02,$01,$02 + .byte $05,$06,$05,$06 + .byte $18,$18,$19,$19 + .byte $18,$18,$1A,$1A + + ; $DC1E-$DC2D + .byte $1B,$1C,$1D,$1F + .byte $1B,$1C,$1E,$20 + .byte $21,$21,$22,$22 + .byte $21,$21,$23,$23 + + ; $DC2E-$DC3D + .byte $1C,$1B,$1F,$1D + .byte $1C,$1B,$20,$1E + .byte $00,$00,$00,$00 + .byte $09,$09,$0A,$0A + + ; $DC3E-$DC3F + .byte $0B,$0B + +;============================================================================== +; $DC40-$DCED: Gameplay Entity Render Lookup Data, Continued +; +; Local: +; Additional render/tile lookup values associated with the table beginning +; at $DBEE. +; +; The data is strongly grouped into repeated pairs and four-byte patterns, +; consistent with direction/animation variants used by the four-byte entity +; render records. +; +; Global: +; Part of the graphics-facing lookup data used when gameplay state is +; converted into page-$07 render records. +; +; Notes: +; Keep these bytes as a contiguous data block for now. $DCEE is separately +; referenced by BuildEntitySpriteBuffer and therefore marks the next +; known lookup-table boundary. +;============================================================================== +EntityRenderLookupDC40: + ; $DC40-$DC4F + .byte $0C,$0C,$4C,$4C + .byte $0D,$0D,$4C,$4C + .byte $0E,$0E,$4C,$4C + .byte $0F,$0F,$4C,$4C + + ; $DC50-$DC5F + .byte $10,$10,$4C,$4C + .byte $11,$11,$4C,$4C + .byte $12,$12,$4C,$4C + .byte $13,$13,$14,$15 + + ; $DC60-$DC6F + .byte $16,$17,$4C,$4C + .byte $4C,$4C,$24,$24 + .byte $25,$25,$24,$24 + .byte $26,$26,$27,$27 + + ; $DC70-$DC7F + .byte $4C,$4C,$28,$29 + .byte $2A,$2B,$2C,$2C + .byte $2D,$2D,$29,$28 + .byte $2B,$2A,$90,$91 + + ; $DC80-$DC8F + .byte $92,$93,$94,$95 + .byte $96,$97,$98,$99 + .byte $9A,$9B,$9C,$9D + .byte $9E,$9F,$A0,$A1 + + ; $DC90-$DC9F + .byte $A2,$A3,$A4,$A5 + .byte $A6,$A7,$A8,$A9 + .byte $AA,$AB,$AC,$AD + .byte $AE,$AF,$2E,$2F + + ; $DCA0-$DCAF + .byte $30,$31,$32,$2F + .byte $33,$31,$34,$2F + .byte $35,$31,$36,$2F + .byte $37,$31,$38,$2F + + ; $DCB0-$DCBF + .byte $39,$31,$3A,$2F + .byte $3B,$31,$3C,$2F + .byte $3D,$31,$3E,$3F + .byte $40,$41,$42,$3F + + ; $DCC0-$DCCF + .byte $43,$41,$44,$45 + .byte $46,$47,$48,$45 + .byte $49,$47,$4A,$45 + .byte $4B,$47,$4D,$4E + + ; $DCD0-$DCDF + .byte $4F,$50,$4E,$4D + .byte $50,$4F,$4F,$50 + .byte $4D,$4E,$50,$4F + .byte $4E,$4D,$4D,$4E + + ; $DCE0-$DCED + .byte $4F,$51,$4E,$52 + .byte $53,$54,$4F,$51 + .byte $4D,$4E,$53,$54 + .byte $4E,$52 + +;============================================================================== +; $DCEE-$DD21: Gameplay Entity Render Lookup Table +; +; Local: +; Lookup values used by BuildEntitySpriteBuffer in the status-class +; path beginning at $DB74. +; +; The index is constructed from: +; +; ($028C,Y * 4) + $05 +; +; and the selected byte is written as byte 1 of the generated page-$07 +; render record. +; +; Global: +; Supplies graphics/tile values for one class of gameplay entity render +; states. +; +; Notes: +; The repeated $4C values and four-byte groupings strongly suggest +; animation/direction variants. Keep the table as raw values during this +; first pass. +; +; $DD22 is separately referenced by the render-data builder and therefore +; marks the next lookup-table boundary. +;============================================================================== + +EntitySpriteTileTable2: + + ; $DCEE-$DCFD + .byte $55,$4C,$56,$4C + .byte $56,$4C,$55,$4C + .byte $4C,$57,$4C,$58 + .byte $4C,$59,$4C,$5A + + ; $DCFE-$DD0D + .byte $4C,$5B,$4C,$5C + .byte $4C,$4C,$4C,$5D + .byte $18,$18,$19,$5E + .byte $60,$61,$19,$5E + + ; $DD0E-$DD1D + .byte $1B,$1C,$1D,$62 + .byte $1B,$1C,$1E,$63 + .byte $64,$65,$66,$67 + .byte $64,$65,$68,$69 + + ; $DD1E-$DD21 + .byte $6A,$6B,$4C,$4C + + + +;============================================================================== +; $DD22-$DE21: Gameplay Entity Render Attribute Lookup +; +; Local: +; 256-byte lookup table used by BuildEntitySpriteBuffer. +; +; Entries are predominantly: +; +; $00 +; $40 +; $80 +; $C0 +; +; These values occupy bits 6-7 and are ORed with the corresponding value +; from $0292+ before being written as byte 2 of a page-$07 four-byte render +; record. +; +; Global: +; Supplies upper-bit render attributes for gameplay entities across their +; various states, animation phases and directional variants. +; +; Notes: +; The table is exactly $100 bytes long: +; +; $DD22-$DE21 +; +; $DE22 is independently referenced by another render-data path and therefore +; marks the next table boundary. +;============================================================================== + +EntitySpriteAttributeTable0: + + ; $DD22-$DD31 + .byte $00,$00,$00,$00 + .byte $00,$40,$80,$C0 + .byte $80,$C0,$80,$C0 + .byte $80,$C0,$80,$C0 + + ; $DD32-$DD41 + .byte $00,$00,$80,$80 + .byte $00,$00,$80,$80 + .byte $00,$40,$00,$40 + .byte $00,$40,$00,$40 + + ; $DD42-$DD51 + .byte $40,$40,$C0,$C0 + .byte $40,$40,$C0,$C0 + .byte $00,$40,$00,$40 + .byte $00,$40,$00,$40 + + ; $DD52-$DD61 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + .byte $00,$40,$00,$40 + .byte $00,$40,$00,$40 + + ; $DD62-$DD71 + .byte $40,$40,$40,$40 + .byte $40,$40,$40,$40 + .byte $00,$40,$80,$C0 + .byte $00,$40,$00,$40 + + ; $DD72-$DD81 + .byte $00,$40,$00,$40 + .byte $00,$00,$00,$40 + .byte $00,$00,$00,$40 + .byte $00,$00,$00,$40 + + ; $DD82-$DD91 + .byte $00,$00,$00,$40 + .byte $00,$00,$00,$40 + .byte $00,$00,$00,$40 + .byte $00,$00,$00,$40 + + ; $DD92-$DDA1 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + .byte $00,$40,$00,$40 + .byte $00,$40,$00,$40 + + ; $DDA2-$DDB1 + .byte $00,$40,$00,$00 + .byte $00,$00,$00,$00 + .byte $00,$40,$00,$40 + .byte $40,$40,$40,$40 + + ; $DDB2-$DDC1 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + + ; $DDC2-$DDD1 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + + ; $DDD2-$DDE1 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + + ; $DDE2-$DDF1 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + + ; $DDF2-$DE01 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + + ; $DE02-$DE11 + .byte $00,$00,$00,$00 + .byte $40,$40,$00,$40 + .byte $80,$00,$80,$80 + .byte $00,$C0,$C0,$C0 + + ; $DE12-$DE21 + .byte $00,$00,$00,$00 + .byte $40,$00,$00,$00 + .byte $80,$80,$80,$80 + .byte $80,$80,$C0,$80 + +;============================================================================== +; $DE22-$DE55: Secondary Gameplay Entity Render Attribute Lookup +; +; Local: +; Lookup data used by BuildEntitySpriteBuffer in the path beginning +; at $DB74. +; +; Values from this table are ORed with the corresponding state value from +; $0292+ and written as byte 2 of a four-byte page-$07 render record. +; +; Global: +; Supplies upper-bit render attributes for one class of gameplay entity +; render states. +; +; Notes: +; As with the larger table at $DD22, the significant nonzero values occupy +; the upper bits, primarily $40 and $80. +; +; EntitySpriteCoordinateOffsets is separately referenced as another +; lookup-table base and therefore marks the next known boundary. +;============================================================================== + +EntitySpriteAttributeTable1: + + ; $DE22-$DE31 + .byte $00,$00,$00,$00 + .byte $80,$00,$80,$00 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + + ; $DE32-$DE41 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + .byte $00,$40,$00,$00 + .byte $00,$00,$00,$00 + + ; $DE42-$DE51 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + .byte $00,$00,$00,$00 + + ; $DE52-$DE55 + .byte $00,$00,$00,$00 + +;============================================================================== +; $DE56-$DE5D: Entity Render Coordinate Adjustment Table +; +; Local: +; Eight coordinate-adjustment bytes used by +; BuildEntitySpriteBuffer. +; +; X takes even values $00,$02,$04,$06, and the routine reads: +; +; EntitySpriteCoordinateOffsets,X +; EntitySpriteCoordinateOffsets+1,X +; +; giving four byte pairs. +; +; Global: +; Adjusts source coordinates when building page-$07 four-byte render +; records. +;============================================================================== + +EntitySpriteCoordinateOffsets: + .byte $03,$F4 + .byte $03,$FC + .byte $0B,$F4 + .byte $0B,$FC + +;============================================================================== +; $DE5E-$DE7D: Periodic Four-Entry State Update +; +; Local: +; Once every 16 frames, updates the four entries at $6C-$6F: +; +; $07 -> remains $07 +; $01 -> becomes $02 +; anything else -> becomes $01 +;============================================================================== + +UpdatePeriodicFourEntryState: + lda $4B + and #$0F + beq @DE65 + + rts + + +@DE65: + tax + + +@DE66: + lda $6C,x + cmp #$07 + beq @DE76 + + cmp #$01 + bne @DE74 + + lda #$02 + bne @DE76 + + +@DE74: + lda #$01 + + +@DE76: + sta $6C,x + + inx + cpx #$04 + bne @DE66 + + rts + +;============================================================================== +; $DE7E-$DF6B: Gameplay PPU / Display Update Processor +; +; Local: +; Processes several gameplay display-update buffers and writes their data +; directly to the PPU. +; +; Handles: +; - Six-byte update block at $023F using destination $026B/$026C. +; - Six-byte update block at $0245 using destination $0272/$0273. +; - Three-byte periodic update at $026F-$0271. +; - Four state values at $6C-$6F written to PPU addresses in the table +; beginning at GameplayStatusPpuAddressTable. +; - Generic PPU command stream beginning at $024B. +; +; Global: +; Central gameplay display-update routine. +; +; Notes: +; UpdateAnimatedGameplayPpuFields at $DF15 is a shared entry point reached from +; several earlier control-flow paths and is therefore a global label rather +; than a ca65 cheap-local label. +;============================================================================== + +FlushGameplayPpuUpdates: + lda $48 + beq @DE85 + + jmp UpdateAnimatedGameplayPpuFields + + +;------------------------------------------------------------------------------ +; $DE85 +; Process the update block beginning at $023F. +;------------------------------------------------------------------------------ + +@DE85: + lda $023F + cmp #$FF + beq @DEB5 + + lda PPUSTATUS + + lda $026B + sta PPUADDR + + lda $026C + sta PPUADDR + + ldy #$00 + + +@DE9B: + lda $023F,y + sta PPUDATA + + iny + cpy #$06 + bne @DE9B + + lda #$30 + sta PPUDATA + + lda #$FF + sta $023F + + bne @DEE2 + + +;------------------------------------------------------------------------------ +; $DEB5 +; Process the update block beginning at $0245. +;------------------------------------------------------------------------------ + +@DEB5: + lda $0245 + cmp #$FF + beq @DEE2 + + lda PPUSTATUS + + lda $0272 + sta PPUADDR + + lda $0273 + sta PPUADDR + + ldy #$00 + + +@DECB: + lda $0245,y + sta PPUDATA + + iny + cpy #$06 + bne @DECB + + lda #$30 + sta PPUDATA + + lda #$FF + sta $0245 + + +;------------------------------------------------------------------------------ +; $DEE2 +; Periodic three-byte display update. +;------------------------------------------------------------------------------ + +@DEE2: + lda $4B + and #$07 + bne UpdateAnimatedGameplayPpuFields + + lda PPUSTATUS + + lda $026D + sta PPUADDR + + lda $026E + sta PPUADDR + + ldx #$00 + + lda $4B + and #$18 + beq @DF05 + + +@DEFB: + lda $026F,x + sta PPUDATA + + inx + cpx #$03 + bne @DEFB + + beq UpdateAnimatedGameplayPpuFields + + +@DF05: + lda #$20 + + +@DF07: + sta PPUDATA + + inx + cpx #$03 + bne @DF07 + + +;============================================================================== +; $DF15: Shared frame-dependent display update entry +;============================================================================== +UpdateAnimatedGameplayPpuFields: + lda $4B + and #$01 + beq @DF42 + + ldy #$00 + ldx #$00 + + lda $46 + and $47 + beq @DF27 + + ldy #$08 + + +@DF27: + lda PPUSTATUS + + lda GameplayStatusPpuAddressTable,y + sta PPUADDR + + lda GameplayStatusPpuAddressTable+1,y + sta PPUADDR + + lda $6C,x + sta PPUDATA + + iny + iny + + inx + cpx #$04 + bne @DF27 + +;------------------------------------------------------------------------------ +; $DF42 +; Process the $024B command stream. +;------------------------------------------------------------------------------ + +@DF42: + lda PPUSTATUS + + ldy #$FF + + +@DF46: + iny + + lda $024B,y + cmp #$FF + beq @DF66 + + sta PPUADDR + + iny + + lda $024B,y + sta PPUADDR + + +@DF55: + iny + + lda $024B,y + beq @DF46 + + cmp #$FF + beq @DF66 + + sta PPUDATA + + bne @DF55 + + +@DF66: + sta $024B + + rts + + +;============================================================================== +; $DF6C-$DF7B: Gameplay PPU Address Table +; +; Local: +; Eight PPU addresses stored in high-byte/low-byte order. +; +; When ($46 & $47) == 0, the first four addresses are used. +; Otherwise the second four addresses are used. +; +; Values from $6C-$6F are written to the selected addresses. +; +; Notes: +; These must remain .byte pairs. Using .word would reverse each address +; because ca65 emits words little-endian. +;============================================================================== + +GameplayStatusPpuAddressTable: + .byte $20,$B4 + .byte $20,$A2 + .byte $22,$D4 + .byte $22,$C2 + + .byte $28,$B4 + .byte $28,$A2 + .byte $2A,$D4 + .byte $2A,$C2 + +;============================================================================== +; $DF7C-$E042: Gameplay Tile / State Update +; +; Local: +; Processes selected values of $022A, updates $6C-$6F, emits a command into +; the $024B display-command buffer, updates $6A and related gameplay state, +; and may transfer control to $E0E6. +; +; Global: +; Called during the normal gameplay frame-update chain. +; +; Notes: +; $E043 and $E044 are lookup-table bases used near the end of this routine. +; Those bytes are data and begin immediately after the final JMP at $E040. +;============================================================================== + +UpdateGameplayTileState: + ldx #$00 + + lda $022A + cmp #$09 + beq $DFBB + + inx + inx + + cmp #$03 + beq $DFBB + + cmp #$01 + beq @DF94 + + cmp #$02 + beq @DF94 + + rts + + +@DF94: + jsr $E063 + + lda $1A + sta $02 + + lda $1C + sta $03 + + jsr $E263 + + ldx #$00 + + lda $03 + and #$07 + beq @DFAD + + inx + inx + + +@DFAD: + lda $02 + and #$0F + cmp #$04 + beq @DFB6 + + inx + +@DFB6: + lda #$07 + sta $6C,x + +@DFBB: + ldx #$04 + lda #$00 + sta $D5 + sta $D6 + + lda $1A + sta $02 + + lda $1C + sta $03 + + jsr $E263 + + ldy #$FF + +@DFCE: + iny + + lda $024B,y + cmp #$FF + bne @DFCE + + tya + beq @DFDC + + lda #$00 + sta $024B,y + + iny + + +@DFDC: + lda $03 + sta $024B,y + + iny + + lda $02 + sta $024B,y + + iny + + lda $E043,x + sta $024B,y + + iny + + lda #$FF + sta $024B,y + + lda #$07 + sta $022A + + lda $E044,x + sta $DC + + dec $6A + bne @E012 + + lda #$0C + sta $3F + + lda #$00 + sta $87 + + lda #$48 + sta $4C + + +@E012: + lda $6A + + cmp #$37 + beq @E01C + + cmp #$86 + bne $E036 + +@E01C: + lda #$0A + sta $D7 + + lda #$3C + sta $D8 + + ldy $93 + + lda GameplayStateValueLookup,y + sta $37 + + lda #$03 + sta $3D + + lda #$60 + sta $2E + + lda #$80 + sta $30 + + lda $6A + and #$01 + tay + + lda #$01 + sta $0604,y + + jmp $E0E6 + +;============================================================================== +; $E043-$E048: Gameplay Tile-State Lookup +; +; Local: +; Used by UpdateGameplayTileState through overlapping indexed reads at +; $E043,X and $E044,X. +;============================================================================== + +TileEventDisplayLookup: + .byte $08,$01,$07,$01,$07,$05 + +;============================================================================== +; $E049-$E05A: Activate First Available State Slot +; +; Local: +; Scans the three even-indexed entries: +; +; $BA,$BC,$BE +; +; for the first zero value. If one is found, changes it to $02 and returns. +; If all three are already active/nonzero, returns without modification. +;============================================================================== + +ActivateNextStateSlotE049: + ldx #$00 + +@E04B: + lda $BA,x + bne @E054 + + lda #$02 + sta $BA,x + + rts + + +@E054: + inx + inx + + cpx #$06 + bne @E04B + + rts + +;============================================================================== +; $E05B-$E062: Gameplay State Value Lookup +; +; Local: +; Eight sequential values indexed by $93 and copied into $37 during +; gameplay-state transitions. +;============================================================================== + +GameplayStateValueLookup: + .byte $24,$25,$26,$27,$28,$29,$2A,$2B + +;============================================================================== +; $E063-$E0E5: Initialize / Adjust Entity Direction State +; +; Local: +; Initializes several gameplay variables and scans all four entity slots. +; +; Initialization: +; +; if $8C == 0: +; $8A = $1E +; +; $89 = $00 +; $88 = $0F +; $D9 = $00 +; +; The low two bits of $39-$3C are normalized to $01, preserving the upper +; six bits. +; +; Palette/update values are installed at: +; +; $02AE = $11 +; $02A9 = $0F +; +; Then the four entity structures are examined. For eligible entities in +; primary state $04, a candidate secondary direction is calculated from +; $B9,X and accepted when coordinate alignment and path-map checks permit it. +; +; Global: +; Called from UpdateGameplayTileState before that routine derives its +; direction/tile update. +; +; Notes: +; $00/$01 and $02/$03 are parallel indirect pointers. +; X advances through entity offsets $00,$02,$04,$06. +; $04 temporarily holds a candidate direction value. +;============================================================================== +InitializeEntityDirectionState: + lda $8C + bne @E06D + + lda #$1E + sta $8A + + lda #$00 + + +@E06D: + sta $89 + + lda #$0F + sta $88 + + ldx #$03 + +@E075: + lda $39,x + and #$FC + ora #$01 + sta $39,x + + dex + bpl @E075 + + lda #$11 + sta $02AE + + lda #$0F + sta $02A9 + + lda #$00 + sta $D9 + + ldx #$00 + + lda #$2F + sta $00 + + lda #$02 + sta $01 + + lda #$1E + sta $02 + + lda #$00 + sta $03 + +@E09E: + lda #$0F + cmp $88 + beq @E0AA + + lda $D2 + bne @E0D1 + +@E0AA: + lda $B8,x + cmp #$04 + bne @E0D1 + + lda $B9,x + clc + adc #$02 + and #$03 + sta $04 + + ldy #$00 + + lda ($02),y + + ldy #$02 + + ora ($02),y + and #$07 + bne @E0CD + + ldy $04 + + lda ($00),y + and #$F8 + bne @E0D1 + + +@E0CD: + lda $04 + sta $B9,x + + +@E0D1: + lda $00 + clc + adc #$04 + sta $00 + + lda $02 + clc + adc #$04 + sta $02 + + inx + inx + + cpx #$08 + bne @E0AA + + rts + +;============================================================================== +; $E0E6-$E1BF: Score / State Display Update +; +; Updates the six decimal-like values at $70-$75 using increments at $DC-$E1, +; converts the result into display characters at $023F, handles progression +; state associated with $6B/$73/$67, appends display commands to $024B, then +; compares and updates the saved values at $61-$66. +;============================================================================== + +UpdateScoreDisplay: + lda $48 + beq @E0EB + + rts + + +;------------------------------------------------------------------------------ +; $E0EB +; Add $DC-$E1 into the six values at $70-$75 using decimal carry handling. +;------------------------------------------------------------------------------ + +@E0EB: + ldy #$00 + + lda #$06 + sta $00 + + clc + + +;------------------------------------------------------------------------------ +; $E0F2 +;------------------------------------------------------------------------------ + +@E0F2: + lda $70,y + adc $DC,y + sta $70,y + + cmp #$0A + bcc @E105 + + sbc #$0A + sta $70,y + + sec + + +;------------------------------------------------------------------------------ +; $E105 +; Clear the consumed increment and continue through all six entries. +;------------------------------------------------------------------------------ + +@E105: + lda #$00 + sta $DC,y + + iny + + dec $00 + bne @E0F2 + + +;------------------------------------------------------------------------------ +; $E10F +; Convert the six numeric values into display/tile values. +;------------------------------------------------------------------------------ + + ldx #$00 + + dey + + +;------------------------------------------------------------------------------ +; $E112 +; Suppress leading zero-style values by replacing $30 with $20. +;------------------------------------------------------------------------------ + +@E112: + lda $70,y + jsr $E1CE + + cmp #$30 + bne @E12B + + lda #$20 + sta $023F,x + + inx + + dey + bne @E112 + + +;------------------------------------------------------------------------------ +; $E125 +; Convert remaining digits without leading-space suppression. +;------------------------------------------------------------------------------ + +@E125: + lda $70,y + jsr $E1CE + + +;------------------------------------------------------------------------------ +; $E12B +;------------------------------------------------------------------------------ + +@E12B: + sta $023F,x + + inx + + dey + bpl @E125 + + +;------------------------------------------------------------------------------ +; $E132 +; Progression check. +;------------------------------------------------------------------------------ + + lda $6B + bne @E196 + + lda #$01 + cmp $73 + bne @E196 + + lda #$01 + sta $6B + sta $0602 + + inc $67 + + lda $67 + sec + sbc #$02 + asl + sta $00 + + +;------------------------------------------------------------------------------ +; Locate the $FF terminator of the $024B display-command stream. +;------------------------------------------------------------------------------ + + ldy #$FF + + +@E14D: + iny + + lda $024B,y + cmp #$FF + bne @E14D + + tya + beq @E15D + + lda #$00 + sta $024B,y + + iny + + +;------------------------------------------------------------------------------ +; $E15D +; Select a display offset according to $46 & $47. +;------------------------------------------------------------------------------ + +@E15D: + lda $46 + and $47 + beq @E165 + + lda #$08 + + +@E165: + sta $01 + + ldx #$00 + + +;------------------------------------------------------------------------------ +; $E169 +; Append two five-byte command templates from $E1C0. +;------------------------------------------------------------------------------ + +@E169: + lda ScorePpuCommandTemplates,x + clc + adc $01 + sta $024B,y + + iny + inx + + lda ScorePpuCommandTemplates,x + clc + adc $00 + sta $024B,y + + lda #$03 + sta $02 + + +@E182: + iny + inx + + lda ScorePpuCommandTemplates,x + sta $024B,y + + dec $02 + bne @E182 + + iny + inx + + cpx #$0A + bne @E169 + + +;------------------------------------------------------------------------------ +; $E196 +; Compare saved values $61-$66 with current values $70-$75. +;------------------------------------------------------------------------------ + +@E196: + ldy #$05 + + +@E198: + lda $61,y + cmp $70,y + beq @E1A3 + + bcc @E1A7 + + rts + + +@E1A3: + dey + bpl @E198 + + rts + + +;------------------------------------------------------------------------------ +; $E1A7 +; Copy display buffer $023F-$0244 to $0245-$024A. +;------------------------------------------------------------------------------ + +@E1A7: + ldx #$00 + + +@E1A9: + lda $023F,x + sta $0245,x + + inx + cpx #$06 + bne @E1A9 + + +;------------------------------------------------------------------------------ +; Copy current values $70-$75 into saved values $61-$66. +;------------------------------------------------------------------------------ + + ldx #$00 + + +@E1B4: + lda $70,x + sta $61,x + + inx + cpx #$06 + bne @E1B4 + + rts + +;============================================================================== +; $E1C0-$E1C9: Score Display Command Table +;============================================================================== + +ScorePpuCommandTemplates: + .byte $23,$17,$3C,$3D,$00 + .byte $23,$37,$3E,$3F,$FF + +;============================================================================== +; $E1CA-$E1D9: Convert High Nibble to Display Character +; +; Input: +; A = packed numeric value +; +; Output: +; A = display character code +; +; Behavior: +; Uses the original high nibble: +; +; $0-$9 -> $30-$39 +; $A-$F -> $40-$45 +; +; Global: +; Called by UpdateScoreDisplay while building the display buffer at +; $023F. +;============================================================================== + +ConvertNibbleToDigitTile: + lsr + lsr + lsr + lsr + + and #$0F + + cmp #$0A + bcs @HexDigit + + adc #$30 + rts + +@HexDigit: + adc #$36 + rts + +;============================================================================== +; $E1DA-$E262: Rebuild Gameplay Coordinate/Map Buffer +; +; Local: +; Converts the primary coordinate pair $1A/$1C through the helper at $E263 +; and stores the result at $0200/$0201. +; +; Then iterates through gameplay coordinate structures beginning at $1A, +; advancing X by four each iteration. +; +; For each iteration: +; - Converts the current $1A+X/$1C+X pair through $E263. +; - Initializes working 16-bit values in $12-$15. +; - Calls helpers at $E2D4 and $E2C6. +; - Emits two groups of four bytes into the buffer at $0202+. +; +; The output loop terminates when Y reaches $28. +; +; Global: +; Called after gameplay collision/entity-state changes to rebuild a +; 40-byte coordinate/map-facing buffer in page $02. +; +; Notes: +; $E263 is the next known helper and is already called elsewhere. +;============================================================================== + +BuildNearbyTileAddressBuffer: + lda $1A + sta $02 + + lda $1C + sta $03 + + jsr $E263 + + lda $03 + sta $0200 + + lda $02 + sta $0201 + + ldx #$00 + ldy #$00 + + +@E1F2: + lda $1A,x + sta $02 + + lda $1C,x + sta $03 + + jsr $E263 + + lda #$20 + sta $14 + + lda #$00 + sta $15 + + lda $02 + sta $12 + + lda $03 + sta $13 + + jsr $E2D4 + + lda $13 + sta $0202,y + + lda $12 + iny + sta $0202,y + + lda $03 + iny + sta $0202,y + + lda $02 + sec + sbc #$01 + iny + sta $0202,y + + lda #$20 + sta $14 + + lda #$00 + sta $15 + + lda $02 + sta $12 + + lda $03 + sta $13 + + jsr $E2C6 + + lda $13 + iny + sta $0202,y + + lda $12 + iny + sta $0202,y + + lda $03 + iny + sta $0202,y + + lda $02 + clc + adc #$01 + iny + sta $0202,y + + inx + inx + inx + inx + + iny + + cpy #$28 + bne @E1F2 + + rts + +;============================================================================== +; $E263-$E2A1: Convert Gameplay Coordinates to Map/PPU Address +; +; Input: +; $02 = first gameplay coordinate +; $03 = second gameplay coordinate +; +; Output: +; $02/$03 = converted 16-bit map/PPU-style address +; +; Local: +; Derives a nametable-style address from the coordinate pair. +; +; The second coordinate is adjusted by -4, aligned to an 8-unit boundary, +; then multiplied/shifted while carries are accumulated in $05. +; +; The first coordinate is adjusted by -4 and divided by eight before being +; added to the low address byte. +; +; The resulting address receives a base of $20xx. +; +; When ($46 & $47) is nonzero, $08 is added to the high/result byte at $03, +; selecting the corresponding alternate nametable region. +; +; Global: +; Called from several gameplay routines whenever object coordinates need to +; be converted into map/PPU addresses. +; +; Notes: +; $04/$05 are temporary low/high address components. +;============================================================================== + +ConvertPixelToNametableAddress: + lda #$00 + sta $05 + + lda $03 + sec + sbc #$04 + and #$F8 + + asl + rol $05 + + asl + rol $05 + + clc + adc #$40 + sta $04 + + lda #$00 + adc $05 + sta $05 + + lda $02 + sec + sbc #$04 + + lsr + lsr + lsr + + clc + adc $04 + sta $02 + + lda $05 + clc + adc #$20 + sta $03 + + lda $46 + and $47 + bne @E299 + + rts + +@E299: + lda $03 + clc + adc #$08 + sta $03 + + rts + +;============================================================================== +; $E2A2-$E2C5: Read PPU Values for Coordinate Address Buffer +; +; Reads 21 PPU addresses stored at $0200-$0229 and stores the corresponding +; PPU data bytes at $022A-$023E. +; +; PPUSTATUS is read once before processing the address list. +;============================================================================== + +ReadNearbyNametableTiles: + ldx #$00 + ldy #$00 + + lda PPUSTATUS + + +@E2A9: + lda $0200,x + sta PPUADDR + + inx + + lda $0200,x + sta PPUADDR + + ; Buffered PPU read. + lda PPUDATA + + ; Actual requested value. + lda PPUDATA + sta $022A,y + + inx + iny + + cpx #$2A + bne @E2A9 + + rts + + +;============================================================================== +; $E2C6-$E2D3: Add 16-Bit Working Values +; +; Input: +; $12/$13 = low/high first operand +; $14/$15 = low/high second operand +; +; Output: +; $12/$13 = 16-bit sum +;============================================================================== + +Add16BitWorkingValue: + clc + + lda $12 + adc $14 + sta $12 + + lda $13 + adc $15 + sta $13 + + rts +;============================================================================== +; $E2D4-$E2E1: Subtract 16-Bit Working Values +; +; Input: +; $12/$13 = low/high first operand +; $14/$15 = low/high second operand +; +; Output: +; $12/$13 = first operand - second operand +;============================================================================== +Subtract16BitWorkingValue: + sec + + lda $12 + sbc $14 + sta $12 + + lda $13 + sbc $15 + sta $13 + + rts + +;============================================================================== +; $E2E2-$E381: Draw Gameplay Nametable +; +; Local: +; Expands compressed gameplay map data directly into VRAM. +; +; The primary destination begins at: +; +; $2040 when ($47 & $46) == 0 +; $2840 when ($47 & $46) != 0 +; +; The compressed source pointer is loaded from $FFF6/$FFF7. +; +; After the primary map is written, a small decoration pattern from +; MazeNametableDecorationTiles is written to additional PPU locations. +; +; Global: +; Called from GameModeState00 while initializing gameplay. +; +; Notes: +; $00/$01 = compressed source pointer during the first phase +; $02/$03 = PPU destination during the first phase +; $04 = number of PPU bytes remaining in current row +; $05 = repeat count extracted from the source byte +; X = row counter +; Y = compressed source index +;============================================================================== + +DrawMazeNametable: + lda #$20 + sta $02 + + lda #$40 + sta $03 + + lda $47 + and $46 + beq @E2F4 + + lda #$28 + sta $02 + + +;------------------------------------------------------------------------------ +; $E2F4 +; Load compressed-map source pointer. +;------------------------------------------------------------------------------ + +@E2F4: + lda MazeDataPointerBytes+1 + sta $01 + + lda MazeDataPointerBytes + sta $00 + + ldx #$1B + ldy #$00 + + +;------------------------------------------------------------------------------ +; $E302 +; Set PPU destination for the next row. +;------------------------------------------------------------------------------ + +@E302: + lda PPUSTATUS + + lda $02 + sta PPUADDR + + lda $03 + sta PPUADDR + + lda #$16 + sta $04 + + +;------------------------------------------------------------------------------ +; $E313 +; Start decoding the next compressed source byte. +;------------------------------------------------------------------------------ + +@E313: + lda #$00 + sta $05 + + lda ($00),y + + asl + rol $05 + + asl + rol $05 + + lda ($00),y + and #$3F + + +;------------------------------------------------------------------------------ +; $E321 +; Repeat the decoded value according to the repeat count in $05. +;------------------------------------------------------------------------------ + +@E321: + sta PPUDATA + + dec $04 + dec $05 + bpl @E321 + + iny + bne @E32F + + inc $01 + + +;------------------------------------------------------------------------------ +; $E32F +; Continue until the current row contains $16 output bytes. +;------------------------------------------------------------------------------ + +@E32F: + lda $04 + bne @E313 + + lda $03 + clc + adc #$20 + sta $03 + + lda $02 + adc #$00 + sta $02 + + dex + bne @E302 + + +;============================================================================== +; $E345-$E381: Draw additional nametable decoration strips. +;============================================================================== + + ldy #$02 + + lda #$21 + sta $00 + + lda #$D6 + sta $01 + + lda $47 + and $46 + beq @E359 + + lda #$29 + sta $00 + + +;------------------------------------------------------------------------------ +; $E359 +; Start one decoration strip. +;------------------------------------------------------------------------------ + +@E359: + ldx #$07 + + lda PPUSTATUS + + lda $00 + sta PPUADDR + + lda $01 + sta PPUADDR + + lda MazeNametableDecorationTiles,y + +;------------------------------------------------------------------------------ +; $E36B +; Write the selected table value eight times. +;------------------------------------------------------------------------------ + +@E36B: + sta PPUDATA + + dex + bpl @E36B + + lda $01 + clc + adc #$20 + sta $01 + + lda #$00 + adc $00 + sta $00 + + dey + bpl @E359 + + rts + +;============================================================================== +; $E382-$E385: Gameplay Nametable Decoration Table +;============================================================================== + +MazeNametableDecorationTiles: + .byte $2D,$04,$2D +;============================================================================== +; $E385-$E3FE: Initialize Gameplay Nametable Regions +; +; Fills gameplay nametable regions with tile $2D, then clears the corresponding +; attribute-table regions. +; +; Address-based global labels are used for shared entry points to avoid ca65 +; cheap-local scope issues and collisions with previously defined symbols. +;============================================================================== + +ClearGameplayNametables: + lda PPUSTATUS + + lda #$20 + sta PPUADDR + + lda #$00 + sta PPUADDR + + lda #$01 + sta $02 + + +;------------------------------------------------------------------------------ +; $E396 +; Shared entry used for another nametable pass. +;------------------------------------------------------------------------------ + +ClearGameplayNametablesSecondPass: + lda #$01 + sta $03 + + +;------------------------------------------------------------------------------ +; $E39A +; Initialize fill counters. +;------------------------------------------------------------------------------ + +InitializeNametableFillCounters: + lda #$03 + sta $00 + + lda #$C0 + sta $01 + + lda #$2D + +;------------------------------------------------------------------------------ +; $E3A4 +; Shared fill loop. +;------------------------------------------------------------------------------ + +FillNametableByte: + sta PPUDATA + + dec $01 + bne FillNametableByte + + dec $00 + bpl FillNametableByte + + dec $03 + bne AdvanceNametableFillPass + + lda #$40 + sta $01 + + lda #$00 + beq FillNametableByte + +;------------------------------------------------------------------------------ +; $E3BB +; Advance to alternate nametable / next phase. +;------------------------------------------------------------------------------ + +AdvanceNametableFillPass: + dec $02 + bne ClearGameplayAttributeTables + + lda PPUSTATUS + + lda #$28 + sta PPUADDR + + lda #$00 + sta PPUADDR + + jmp ClearGameplayNametablesSecondPass + + +;------------------------------------------------------------------------------ +; $E3CF +; Begin clearing attribute-table regions. +;------------------------------------------------------------------------------ + +ClearGameplayAttributeTables: + lda #$01 + sta $00 + + lda PPUSTATUS + + lda #$23 + sta PPUADDR + + lda #$C0 + sta PPUADDR + + +;------------------------------------------------------------------------------ +; $E3E0 +; Shared attribute-clear setup. +;------------------------------------------------------------------------------ + +BeginAttributeTableClear: + lda #$00 + tay + + +;------------------------------------------------------------------------------ +; $E3E3 +; Write $20 zero bytes to PPUDATA. +;------------------------------------------------------------------------------ + +ClearAttributeTableLoop: + sta PPUDATA + + iny + cpy #$20 + bne ClearAttributeTableLoop + + dec $00 + bne ClearSecondAttributeTable + + rts + +;------------------------------------------------------------------------------ +; $E3F0 +; Set destination to the second attribute table, $2BC0. +;------------------------------------------------------------------------------ + +ClearSecondAttributeTable: + lda PPUSTATUS + + lda #$2B + sta PPUADDR + + lda #$C0 + sta PPUADDR + + bne BeginAttributeTableClear + +;============================================================================== +; $E3FF-$E473: Draw Gameplay Numeric / Status Fields +; +; Local: +; Configures a PPU destination and repeatedly draws numeric fields through +; the helper at DrawSixDigitScore. +; +; Initial destination/configuration: +; +; $00/$01 = PPU destination +; $04 = destination stride +; X = index into a pointer table at ScoreFieldSourcePointerTable +; +; The destination and table index vary depending on $47 & $46. +; +; Three fields are drawn per pass. The routine may perform another pass +; according to $47 and the current field counter. +; +; Global: +; Called by GameModeState00 as part of gameplay initialization. +; +; Notes: +; DrawSixDigitScore renders one numeric field using the source pointer +; loaded from the table at ScoreFieldSourcePointerTable. +;============================================================================== + +DrawGameplayScoreFields: + lda #$20 + sta $00 + + lda #$B6 + sta $01 + + lda #$80 + sta $04 + + ldx #$00 + + lda $47 + and $46 + beq @E429 + + lda #$28 + sta $00 + + bne @E429 + + +;------------------------------------------------------------------------------ +; Alternate setup path. +;------------------------------------------------------------------------------ + + lda #$20 + sta $00 + + lda #$83 + sta $01 + + lda #$09 + sta $04 + + lda #$01 + sta $47 + + ldx #$0C + + +;------------------------------------------------------------------------------ +; $E429 +; Adjust lookup-table index for alternate player/mode state. +;------------------------------------------------------------------------------ + +@E429: + lda $47 + and $46 + beq @E436 + + txa + clc + adc #$06 + tax + + +@E436: + lda #$03 + sta $05 + + +;------------------------------------------------------------------------------ +; $E43A: render one status field. +;------------------------------------------------------------------------------ + +@E43A: + lda PPUSTATUS + + lda $00 + sta PPUADDR + + lda $01 + sta PPUADDR + + lda ScoreFieldSourcePointerTable,x + sta $02 + + lda ScoreFieldSourcePointerTable+1,x + sta $03 + + jsr DrawSixDigitScore + + inx + inx + + lda $01 + clc + adc $04 + sta $01 + + lda #$00 + adc $00 + sta $00 + + dec $05 + + lda $05 + cmp #$01 + bne @E46D + + lda $47 + beq @E473 + + +@E46D: + lda $05 + bne @E43A + + +@E473: + rts + +;============================================================================== +; $E474-$E49E: Draw Six-Digit Numeric Field +; +; Input: +; $02/$03 = pointer to packed numeric values +; +; Local: +; Processes six source values from index 5 down to 0. +; +; Leading values whose low nibble is zero are rendered as spaces ($20). +; Once a nonzero low nibble is encountered, remaining values are converted +; through the shared conversion entry at $E1CE and written to PPUDATA. +; +; The final value at Y=0 is always converted, after which a trailing $30 +; character is written. +; +; Notes: +; The conversion calls MUST target $E1CE, not $E1CA. $E1CE is the shared +; entry that begins with AND #$0F, while $E1CA additionally shifts A right +; four times. +;============================================================================== +DrawSixDigitScore: + ldy #$05 + + +SkipLeadingZeroDigits: + lda ($02),y + and #$0F + bne ConvertCurrentScoreDigit + + lda #$20 + sta PPUDATA + + dey + bne SkipLeadingZeroDigits + + beq DrawFinalScoreDigit + + +LoadNextScoreDigit: + lda ($02),y + + +ConvertCurrentScoreDigit: + jsr $E1CE + + sta PPUDATA + + dey + bne LoadNextScoreDigit + + +DrawFinalScoreDigit: + lda ($02),y + + jsr $E1CE + + sta PPUDATA + + lda #$30 + sta PPUDATA + + rts +;============================================================================== +; $E49F-$E4B0: Gameplay Status Field Source Pointer Table +; +; Local: +; Nine little-endian zero-page/RAM pointers used by the gameplay status-field +; drawing routine beginning at $E3FF. +; +; X indexes this table in steps of two. Each selected address is loaded into +; $02/$03 and passed to DrawSixDigitScore. +; +; Global: +; Selects the numeric/state arrays rendered into the different gameplay +; status display fields. +;============================================================================== + +ScoreFieldSourcePointerTable: + .word $0061 + .word $0070 + .word $0080 + + .word $0061 + .word $0080 + .word $0070 + + .word $0070 + .word $0061 + .word $0080 + +;============================================================================== +; $E4B1-$E501: Build Entity Direction Candidate List +; +; Input: +; $00/$01 = pointer to direction/path data +; $0A/$0B = comparison values prepared by the caller +; X = current entity slot index +; +; Output: +; $0C-$0F = candidate direction values, with invalid entries marked $FF +; +; Local: +; First clears all four candidate entries to $FF. +; +; Then examines four values through ($00),Y. A candidate is accepted when +; either: +; +; value == $0A +; +; or: +; +; (value & $F8) != 0 +; and value == $0B +; +; Accepted entries store their Y index into $0C-$0F. +; +; The entity's reverse/current-excluded direction is then calculated from +; $B9,X and explicitly removed from the candidate list. +; +; Finally performs up to three passes compacting $FF holes by shifting the +; following entry left. +; +; Global: +; Called by EntityTargetCommon at $D778 before entity direction selection. +; +; Notes: +; $0C-$0F therefore form a filtered list of legal direction indices. +;============================================================================== + +BuildLegalDirectionList: + ldy #$FF + + sty $0C + sty $0D + sty $0E + sty $0F + + iny + + +ScanDirectionCandidate: + lda ($00),y + cmp $0A + beq AcceptDirectionCandidate + + and #$F8 + beq AcceptDirectionCandidate + + cmp $0B + bne NextDirectionCandidate + + +AcceptDirectionCandidate: + tya + sta $000C,y + + +NextDirectionCandidate: + iny + cpy #$04 + bne ScanDirectionCandidate + + lda $B9,x + clc + adc #$02 + and #$03 + tay + + lda #$FF + sta $000C,y + + lda #$03 + sta $0B + + +CompactDirectionListPass: + ldy #$00 + + +CompactDirectionListEntry: + lda $000C,y + cmp #$FF + bne NextDirectionListEntry + + lda $000D,y + sta $000C,y + + lda #$FF + sta $000D,y + + +NextDirectionListEntry: + iny + cpy #$03 + bne CompactDirectionListEntry + + dec $0B + bne CompactDirectionListPass + + rts + +;============================================================================== +; $E502-$E53B: Draw Gameplay Initialization Data +; +; Local: +; Reads compact PPU command data beginning at $E53C and writes the payloads +; directly to PPUDATA. +; +; X selects between two passes/variants. +; Y indexes the command stream. +; $00 holds the number of bytes remaining in the current payload. +; +; Global: +; Called from GameModeState00 during gameplay initialization. +;============================================================================== + +DrawGameplayHudLabels: + ldx #$01 + + +;------------------------------------------------------------------------------ +; $E504 +; Reset command-stream index for a pass. +;------------------------------------------------------------------------------ + +InitData_E504: + ldy #$00 + + +;------------------------------------------------------------------------------ +; $E506 +; Start one command record. +;------------------------------------------------------------------------------ + +InitData_E506: + lda $E53C,y + + cpx #$00 + bne InitData_E50F + + adc #$07 + + +;------------------------------------------------------------------------------ +; $E50F +; Write PPU destination address. +;------------------------------------------------------------------------------ + +InitData_E50F: + sta PPUADDR + + iny + + lda $E53C,y + sta PPUADDR + + iny + + lda $E53C,y + sta $00 + + +;------------------------------------------------------------------------------ +; $E51F +; Write record payload. +;------------------------------------------------------------------------------ + +InitData_E51F: + iny + + lda $E53C,y + sta PPUDATA + + dec $00 + bne InitData_E51F + + iny + + cpy #$11 + bne InitData_E534 + + lda $47 + bne InitData_E534 + + rts + + +;------------------------------------------------------------------------------ +; $E534 +; Continue through the first/second stream section. +;------------------------------------------------------------------------------ + +InitData_E534: + cpy #$17 + bne InitData_E506 + + dex + beq InitData_E504 + + rts + +;============================================================================== +; $E53C-$E552: Gameplay Initialization PPU Command Data +; +; Record format: +; byte 0 = PPU address high +; byte 1 = PPU address low +; byte 2 = payload length +; remaining bytes = payload written to PPUDATA +;============================================================================== + +GameplayHudInitializationData: + + ; $E53C: PPU $2076, 8-byte payload + .byte $20,$76,$08 + .byte $B4,$B5,$B6,$B7,$B8,$B9,$BA,$BB + + ; $E547: PPU $20F7, 3-byte payload + .byte $20,$F7,$03 + .byte $B0,$B3,$B2 + + ; $E54D: PPU $2177, 3-byte payload + .byte $21,$77,$03 + .byte $B1,$B3,$B2 + +;============================================================================== +; $E553-$E5C0: Draw Progression / Status Markers +; +; Local: +; Returns immediately when $67 is zero. +; +; Otherwise computes: +; +; count = min($67 + 1, $07) +; +; and stores that in $02. +; +; Initializes: +; +; $03 = $04 +; $00/$01 = $2317 +; +; If ($46 & $47) != 0, the high destination byte is adjusted by $08. +; +; The routine then performs nested loops, calling the helper at $E59A with +; Y=$3C. The helper writes a 2x2-style pattern at the current PPU position. +; +; Global: +; Called during gameplay initialization to draw a progression/status display. +; +; Notes: +; $E59A is a valid internal helper entry point within this routine. +;============================================================================== + +DrawLevelProgressMarkers: + lda $67 + bne Progression_E558 + + rts + + +Progression_E558: + clc + adc #$01 + + cmp #$07 + bcc Progression_E55F + + lda #$07 + + +Progression_E55F: + sta $02 + + lda #$04 + sta $03 + + lda #$23 + sta $00 + + lda #$17 + sta $01 + + lda $46 + and $47 + beq Progression_E57C + + lda $00 + clc + adc #$08 + sta $00 + + +Progression_E57C: + dec $02 + bne Progression_E581 + + rts + + +Progression_E581: + dec $03 + bne Progression_E58A + + lda $01 + clc + adc #$3A + sta $01 + + +Progression_E58A: + ldy #$3C + + jsr Draw2x2Marker + + lda $01 + clc + adc #$02 + sta $01 + + bne Progression_E57C + +;============================================================================== +; $E59A-$E5C0: Draw 2x2 Progression Marker +; +; Input: +; $00/$01 = first PPU destination +; Y = first tile value +; +; Effect: +; Writes Y and Y+1 horizontally, then Y+2 and Y+3 one row ($20 bytes) +; below the initial destination. +;============================================================================== + +Draw2x2Marker: + lda $00 + sta PPUADDR + + lda $01 + sta PPUADDR + + sty PPUDATA + + iny + sty PPUDATA + + lda $00 + sta PPUADDR + + lda $01 + clc + adc #$20 + sta PPUADDR + + iny + sty PPUDATA + + iny + sty PPUDATA + + rts + +;============================================================================== +; $-$E699: Initialize Gameplay State / Markers +; +; Local: +; Builds several gameplay marker/display values using the current value at +; $68 and a collection of lookup tables beginning at LevelProgressMarkerIndexTable +; +; The routine: +; - Initializes working values at $0A-$0F. +; - Derives an index/count from $68. +; - Selects PPU coordinates according to $46/$47. +; - Draws repeated 2x2 marker blocks using Draw2x2Marker. +; - Combines several lookup-table values into $0A+ working state. +; - Writes the resulting values directly into PPU attribute/display areas. +; - Selects final values for $02B6 and $02A9. +; +; Global: +; Called from GameModeState00 during initial gameplay setup. +; +; Notes: +; Address-oriented labels are used for the larger loops to preserve the +; original compact branch structure. +;============================================================================== + +InitializeLevelProgressDisplay: + lda #$00 + sta $03 + sta $0E + sta $0F + + lda #$15 + sta $0A + + lda #$11 + sta $0D + + lda #$05 + sta $0B + sta $0C + + lda $68 + sta $02 + + sec + sbc #$07 + bcc UseFirstLevelProgressIndex + + cmp #$0C + bcc ClampLevelProgressIndex + + lda #$0C + + +;------------------------------------------------------------------------------ +; $E5E9 +;------------------------------------------------------------------------------ + +ClampLevelProgressIndex: + tax + + lda #$07 + sta $02 + + bne InitializeLevelProgressPosition + + +;------------------------------------------------------------------------------ +; $E5F0 +;------------------------------------------------------------------------------ + +UseFirstLevelProgressIndex: + ldx #$00 + + +;------------------------------------------------------------------------------ +; $E5F2 +; Initial PPU destination. +;------------------------------------------------------------------------------ + +InitializeLevelProgressPosition: + lda #$22 + sta $00 + + lda #$56 + sta $01 + + lda $46 + and $47 + beq InitializeLevelProgressRowCounter + + lda $00 + clc + adc #$08 + sta $00 + + +;------------------------------------------------------------------------------ +; $E605 +;------------------------------------------------------------------------------ + +InitializeLevelProgressRowCounter: + lda #$05 + sta $04 + + +;------------------------------------------------------------------------------ +; $E609 +; Main marker loop. +;------------------------------------------------------------------------------ + +DrawNextLevelProgressMarker: + dec $04 + bne SelectLevelProgressMarker + + lda $01 + clc + adc #$38 + sta $01 + + +;------------------------------------------------------------------------------ +; $E612 +; Select marker information. +;------------------------------------------------------------------------------ + +SelectLevelProgressMarker: + lda LevelProgressMarkerIndexTable,x + sta $05 + + asl + asl + adc #$60 + tay + + jsr Draw2x2Marker + + ldy $03 + + lda LevelProgressAttributeIndexTable,y + sta $06 + + lda LevelProgressAttributeIndexTable+1,y + sta $07 + + ldy $05 + + lda LevelProgressAttributeBits,y + + +;------------------------------------------------------------------------------ +; $E633 +; Shift selected marker bits. +;------------------------------------------------------------------------------ + +ShiftLevelProgressAttributeBits: + dec $07 + bmi StoreLevelProgressAttributeBits + + asl + asl + bcc ShiftLevelProgressAttributeBits + + +;------------------------------------------------------------------------------ +; $E63B +; Combine marker bits into working values. +;------------------------------------------------------------------------------ + +StoreLevelProgressAttributeBits: + ldy $06 + + ora $0A,y + sta $0A,y + + lda $01 + clc + adc #$02 + sta $01 + + inc $03 + inc $03 + + inx + + dec $02 + bpl DrawNextLevelProgressMarker + + +;============================================================================== +; Write generated marker-state values into PPU memory. +;============================================================================== + + ldx #$23 + + lda $47 + and $46 + beq SetLevelProgressAttributeAddress + + ldx #$2B + + +;------------------------------------------------------------------------------ +; $E65D +; Set first PPU destination. +;------------------------------------------------------------------------------ + +SetLevelProgressAttributeAddress: + stx PPUADDR + stx $00 + + lda #$E5 + sta PPUADDR + + ldx #$00 + + +;------------------------------------------------------------------------------ +; $E667 +; Reset count for one three-byte PPU group. +;------------------------------------------------------------------------------ + +ResetAttributeWriteCount: + lda #$03 + sta $01 + + +;------------------------------------------------------------------------------ +; $E66B +; Write three values from $0A+. +;------------------------------------------------------------------------------ + +WriteLevelProgressAttribute: + lda $0A,x + sta PPUDATA + + inx + + dec $01 + bne WriteLevelProgressAttribute + + inc $02 + bne SelectLevelProgressPalette + + lda $00 + sta PPUADDR + + lda #$ED + sta PPUADDR + + bne ResetAttributeWriteCount + + +;------------------------------------------------------------------------------ +; $E685 +; Select final marker/display value. +;------------------------------------------------------------------------------ + +SelectLevelProgressPalette: + lda $68 + + cmp #$10 + bcc StoreLevelProgressPalette + + lda #$0F + + +;------------------------------------------------------------------------------ +; $E68D +;------------------------------------------------------------------------------ + +StoreLevelProgressPalette: + tay + + lda LevelProgressPaletteTable,y + sta $02B6 + + lda #$0F + sta $02A9 + + rts + + +;============================================================================== +; $E69A-$E6AD: Gameplay Marker Level Index Table +;============================================================================== + +LevelProgressMarkerIndexTable: + .byte $00,$01,$02,$02 + .byte $03,$03,$04,$04 + .byte $05,$05,$06,$06 + .byte $07,$07,$07,$07 + .byte $07,$07,$07,$07 + +;============================================================================== +; $E6AE-$E6BD: Gameplay Marker Working-Value Table +; +; Used as byte pairs through $03. +;============================================================================== + +LevelProgressAttributeIndexTable: + .byte $00,$03 + .byte $01,$02 + .byte $01,$03 + .byte $02,$02 + .byte $03,$01 + .byte $04,$00 + .byte $04,$01 + .byte $05,$00 + +;============================================================================== +; $E6BE-$E6C5: Gameplay Marker Bit/Pattern Table +;============================================================================== + +LevelProgressAttributeBits: + .byte $02,$02,$02,$02 + .byte $03,$03,$03,$03 + +;============================================================================== +; $E6C6-$E6D5: Gameplay Marker Final Value Table +; +; Indexed by min($68,$0F). Selected value is stored at $02B6. +;============================================================================== + +LevelProgressPaletteTable: + .byte $16,$16,$26,$26 + .byte $06,$06,$19,$19 + .byte $17,$17,$17,$17 + .byte $12,$12,$12,$12 + + +;============================================================================== +; $E6D6-$E737: Initialize Gameplay Transition State +;============================================================================== + +InitializeGameplayTransitionState: + lda #$08 + sta $43 + sta PPUCTRL + + +TransitionInit_E6DD: + lda PPUSTATUS + bpl TransitionInit_E6DD + + lda #$01 + sta $060D + sta $060E + + lda #$00 + sta PPUMASK + + jsr ClearPlayfieldNametable + + lda #$01 + sta $028D + + lda #$01 + sta $0293 + + lda #$F7 + sta $0278 + + lda #$7C + sta $027A + + lda #$FF + sta $1E + + lda #$00 + sta $1F + + lda #$00 + sta $88 + + ldy #$00 + + +TransitionInit_CopyPalette: + lda GameplayTransitionPalette,y + sta $02A9,y + + iny + cpy #$10 + bne TransitionInit_CopyPalette + + lda #$20 + sta $026F + sta $0270 + sta $0271 + + lda #$10 + sta $3F + + lda #$88 + sta PPUCTRL + sta $43 + + jmp $CAA7 + + +;============================================================================== +; $E738-$E7AE: Initialize Gameplay PPU Region +; +; Selects $2000/$2800 according to $47 & $46, performs a patterned fill, +; clears $40 PPU bytes, and conditionally writes tile $5E at $2230/$2A30. +; +; Several branches deliberately re-enter the counter setup at $E751. +;============================================================================== + +ClearPlayfieldNametable: + ldx #$20 + + lda $47 + and $46 + beq SetPlayfieldPpuAddress + + ldx #$28 + + +;------------------------------------------------------------------------------ +; $E742 +; Initialize selected nametable address. +;------------------------------------------------------------------------------ + +SetPlayfieldPpuAddress: + lda PPUSTATUS + + stx PPUADDR + + lda #$00 + sta PPUADDR + + lda #$1C + sta $00 + + +;------------------------------------------------------------------------------ +; $E751 +; Shared counter-setup entry. +; +; The outer $00 loop deliberately jumps back here rather than rebuilding $00. +;------------------------------------------------------------------------------ + +ResetPlayfieldFillCounters: + lda #$02 + sta $01 + + lda #$1C + sta $02 + + lda #$02 + sta $03 + + lda #$2D + + +;------------------------------------------------------------------------------ +; $E75F +; Shared PPUDATA write point. +;------------------------------------------------------------------------------ + +WritePlayfieldFillByte: + sta PPUDATA + + ldx $01 + beq AdvancePlayfieldInnerRun + + dec $01 + bne WritePlayfieldFillByte + + lda #$20 + bne WritePlayfieldFillByte + + +;------------------------------------------------------------------------------ +; $E76E +; Process the second run counter. +;------------------------------------------------------------------------------ + +AdvancePlayfieldInnerRun: + ldx $02 + beq AdvancePlayfieldOuterRun + + dec $02 + bne WritePlayfieldFillByte + + lda #$2D + bne WritePlayfieldFillByte + + +;------------------------------------------------------------------------------ +; $E77A +; Process outer fill counters. +;------------------------------------------------------------------------------ + +AdvancePlayfieldOuterRun: + dec $03 + bne WritePlayfieldFillByte + + dec $00 + bne ResetPlayfieldFillCounters + + +;------------------------------------------------------------------------------ +; $E782 +; Clear $40 PPU bytes. +;------------------------------------------------------------------------------ + + lda #$00 + tax + + +ClearPlayfieldTail: + sta PPUDATA + + inx + cpx #$40 + bne ClearPlayfieldTail + + lda $87 + cmp #$02 + beq DrawPlayfieldSpecialTile + + rts + + +;------------------------------------------------------------------------------ +; $E794 +; Optional special tile at PPU $2230 or $2A30. +;------------------------------------------------------------------------------ + +DrawPlayfieldSpecialTile: + ldx #$22 + + lda $47 + and $46 + beq SetSpecialTilePpuAddress + + ldx #$2A + + +SetSpecialTilePpuAddress: + lda PPUSTATUS + + stx PPUADDR + + lda #$30 + sta PPUADDR + + lda #$5E + sta PPUDATA + + rts + + +;============================================================================== +; $E7AF-$E7BE: Gameplay Transition Palette +;============================================================================== + +GameplayTransitionPalette: + .byte $0F,$36,$20,$06 + .byte $0F,$27,$20,$06 + .byte $0F,$11,$20,$33 + .byte $0F,$36,$20,$11 + +;============================================================================== +; $E7BF-$E7CD: Gameplay Transition Update Coordinator +; +; Runs several already-known gameplay/render helpers, then dispatches through +; the state machine at $E7CE before returning to the main game-mode dispatcher. +;============================================================================== + +UpdateIntermissionTransition: + jsr $EA19 + jsr $EA94 + jsr BuildEntitySpriteBuffer + jsr DispatchIntermissionState + + jmp $CAA7 + + +;============================================================================== +; $E7CE-$E7DC: Transition state dispatcher +; +; $87 is an even state value used directly as a byte offset into the table. +;============================================================================== + +DispatchIntermissionState: + ldy $87 + + lda IntermissionStateHandlerTable,y + sta $10 + + lda IntermissionStateHandlerTable+1,y + sta $11 + + jmp ($0010) + + +;============================================================================== +; $E7DD-$E7E2: Transition state pointer table +;============================================================================== + +IntermissionStateHandlerTable: + .word DispatchIntermissionPhase + .word DispatchIntermissionState2Phase + .word DispatchIntermissionState4Phase + + +;============================================================================== +; $E7E3-$E7F1: Secondary transition-state dispatcher +; +; $88 is used directly as a byte offset into another pointer table. +;============================================================================== + +DispatchIntermissionPhase: + ldy $88 + + lda IntermissionPhaseHandlerTable,y + sta $10 + + lda IntermissionPhaseHandlerTable+1,y + sta $11 + + jmp ($0010) + + +;============================================================================== +; $E7F2-$E7F9: Transition substate pointer table +;============================================================================== + +IntermissionPhaseHandlerTable: + .word UpdateIntermissionPhase0 + .word UpdateIntermissionPhase1 + .word UpdateIntermissionPhase2 + .word UpdateIntermissionPhase3 + + +;============================================================================== +; $E7FA-$E822: Transition substate 0 +; +; Waits until $0278 reaches at least $D0, then advances $88 by two and +; initializes several mirrored object/state values. +;============================================================================== + +UpdateIntermissionPhase0: + lda $0278 + cmp #$D0 + bcc TransitionSubstate_E802 + + rts + + +TransitionSubstate_E802: + inc $88 + inc $88 + + lda #$0C + sta $028C + + lda #$20 + sta $0292 + + lda #$F7 + sta $0274 + + lda #$7C + sta $0276 + + lda #$FE + sta $1A + + lda #$E0 + sta $1B + + rts + + +;============================================================================== +; $E823-$E84D: Transition substate 1 +; +; Waits for $0274 to become zero, then advances $88 and initializes a +; different object/state configuration. +;============================================================================== + +UpdateIntermissionPhase1: + lda $0274 + beq TransitionSubstate_E829 + + rts + + +TransitionSubstate_E829: + inc $88 + inc $88 + + lda #$40 + sta $4C + + lda #$1E + sta $028C + + lda #$22 + sta $0292 + + lda #$09 + sta $0274 + + lda #$7C + sta $0276 + + lda #$01 + sta $1A + + lda #$00 + sta $1B + + rts + + +;============================================================================== +; $E84E-$E8B9: Transition substate 2 +; +; Waits until $0274 reaches at least $80, then advances $88 and initializes +; four related coordinate/state structures and their mirrored render values. +;============================================================================== + +UpdateIntermissionPhase2: + lda #$01 + sta $060D + sta $060E + + lda $0274 + cmp #$80 + bcs TransitionSubstate_E85D + + rts + + +TransitionSubstate_E85D: + inc $88 + inc $88 + + lda #$01 + sta $1E + sta $22 + sta $26 + sta $2A + + lda #$C0 + sta $1F + sta $23 + sta $27 + sta $2B + + clc + + lda #$38 + sta $028D + + adc #$01 + sta $028E + + adc #$01 + sta $028F + + adc #$01 + sta $0290 + + lda #$21 + sta $0293 + sta $0294 + sta $0295 + sta $0296 + + lda #$09 + sta $0278 + sta $0280 + + lda #$19 + sta $027C + sta $0284 + + lda #$6C + sta $027A + sta $027E + + lda #$7C + sta $0282 + sta $0286 + + rts + + +;============================================================================== +; $E8BA-$E8C6: Transition substate 3 +; +; Waits for $0278 to become zero, then primes delay $4C and transfers to the +; routine at $EA14. +;============================================================================== + +UpdateIntermissionPhase3: + lda $0278 + beq TransitionSubstate_E8C0 + + rts + + +TransitionSubstate_E8C0: + lda #$40 + sta $4C + + jmp $EA14 + + +;============================================================================== +; $E8C7-$E8D5: Transition State $02 Substate Dispatcher +; +; Local: +; Uses $88 as an even byte offset into IntermissionState2PhaseTable. +;============================================================================== + +DispatchIntermissionState2Phase: + ldy $88 + + lda IntermissionState2PhaseTable,y + sta $10 + + lda IntermissionState2PhaseTable+1,y + sta $11 + + jmp ($0010) + + +;============================================================================== +; $E8D6-$E8DB: Transition phase table +;============================================================================== + +IntermissionState2PhaseTable: + .word UpdateIntermissionState2Phase0 + .word UpdateIntermissionState2Phase1 + .word UpdateIntermissionState2Phase2 + + +;============================================================================== +; $E8DC-$E904: Transition phase 0 +; +; Waits until $0278 reaches $A0, then advances the $88 state and initializes +; the primary mirrored object/state values. +;============================================================================== + +UpdateIntermissionState2Phase0: + lda $0278 + cmp #$A0 + bcc TransitionPhase_E8E4 + + rts + + +TransitionPhase_E8E4: + inc $88 + inc $88 + + lda #$0C + sta $028C + + lda #$20 + sta $0292 + + lda #$F7 + sta $0274 + + lda #$7C + sta $0276 + + lda #$FF + sta $1A + + lda #$00 + sta $1B + + rts + + +;============================================================================== +; $E905-$E93E: Transition phase 1 +; +; Watches $0274. At $80 it installs one object configuration. At $78 it +; clears the position pair and advances to the next phase. +;============================================================================== + +UpdateIntermissionState2Phase1: + lda $0274 + + cmp #$80 + bne TransitionPhase_E92D + + lda #$FF + sta $1A + + lda #$C0 + sta $1B + + lda #$42 + sta $028E + + lda #$00 + sta $0294 + + lda #$80 + sta $027C + + lda #$7C + sta $027E + + lda #$00 + sta $22 + sta $23 + + rts + + +TransitionPhase_E92D: + cmp #$78 + beq TransitionPhase_E933 + + rts + + +TransitionPhase_E933: + lda #$00 + sta $1A + sta $1B + + inc $88 + inc $88 + + rts + + +;============================================================================== +; $E93F-$E96D: Transition phase 2 +; +; Uses bit $40 of $028C and timer/state value $89 to alternate the object +; state between values $46 and $47. Eventually transfers to $EA14. +;============================================================================== + +UpdateIntermissionState2Phase2: + lda $028C + and #$40 + bne TransitionPhase_E953 + + lda #$46 + sta $028C + + lda #$45 + sta $028E + + lda #$40 + sta $89 + + rts + + +TransitionPhase_E953: + dec $89 + beq TransitionPhase_E958 + + rts + + +TransitionPhase_E958: + lda $028C + cmp #$47 + bne TransitionPhase_E963 + + jmp $EA14 + + +TransitionPhase_E963: + lda #$47 + sta $028C + + lda #$40 + sta $89 + + rts + + +;============================================================================== +; $E96E-$E97C: Transition State $04 Dispatcher +; +; $88 is an even byte offset into the four-entry phase table. +;============================================================================== +DispatchIntermissionState4Phase: + ldy $88 + + lda IntermissionState4PhaseTable,y + sta $10 + + lda IntermissionState4PhaseTable+1,y + sta $11 + + jmp ($0010) + +;============================================================================== +; $E97D-$E984: Transition State $04 Phase Table +;============================================================================== +IntermissionState4PhaseTable: + .word UpdateIntermissionState4Phase0 + .word UpdateIntermissionState4Phase1 + .word UpdateIntermissionState4Phase2 + .word UpdateIntermissionState4Phase3 + +;============================================================================== +; $E985-$E9AD: Phase 0 +; +; Waits until $0278 reaches $D8, advances $88, then installs the initial +; mirrored object/state configuration. +;============================================================================== + +UpdateIntermissionState4Phase0: + lda $0278 + cmp #$D8 + bcc TransitionPhase_E98D + + rts + +TransitionPhase_E98D: + inc $88 + inc $88 + + lda #$4C + sta $028C + + lda #$20 + sta $0292 + + lda #$F7 + sta $0274 + + lda #$7C + sta $0276 + + lda #$FF + sta $1A + + lda #$00 + sta $1B + + rts + +;============================================================================== +; $E9AE-$E9D8: Phase 1 +; +; Waits for $0274 to reach zero, advances $88 and installs the next object +; configuration. +;============================================================================== + +UpdateIntermissionState4Phase1: + lda $0274 + beq TransitionPhase_E9B4 + + rts + +TransitionPhase_E9B4: + inc $88 + inc $88 + + lda #$28 + sta $4C + + lda #$4A + sta $028C + + lda #$23 + sta $0292 + + lda #$09 + sta $0274 + + lda #$7C + sta $0276 + + lda #$01 + sta $1A + + lda #$00 + sta $1B + + rts + +;============================================================================== +; $E9D9-$EA09: Phase 2 +; +; Enables transition flags, waits until $0274 reaches $19, then advances $88 +; and sets the next mirrored-state values. +;============================================================================== +UpdateIntermissionState4Phase2: + lda #$01 + sta $060D + sta $060E + + lda $0274 + cmp #$19 + bcs TransitionPhase_E9E8 + + rts + +TransitionPhase_E9E8: + inc $88 + inc $88 + + lda #$4C + sta $028D + + lda #$21 + sta $0293 + + lda #$11 + sta $0278 + + lda #$84 + sta $027A + + lda #$01 + sta $1E + + lda #$00 + sta $1F + + rts + +;============================================================================== +; $EA0A-$EA18: Phase 3 +; +; Waits for $0278 to reach zero, then primes the next game-mode/state +; transition. +;============================================================================== +UpdateIntermissionState4Phase3: + lda $0278 + beq TransitionPhase_EA10 + + rts + +TransitionPhase_EA10: + lda #$40 + sta $4C + + lda #$00 + sta $3F + + rts + +;============================================================================== +; $EA19-$EA93: Update Mirrored Gameplay Object Positions +; +; Local: +; Walks five four-byte structures in parallel: +; +; $00/$01 -> source gameplay structures beginning at $001A +; $02/$03 -> mirrored structures beginning at $0274 +; +; Movement increments from the source structures are added into mirrored +; coordinates. Attribute bit $20 in $0292+ is adjusted according to the +; resulting coordinate, and coordinate reset/wrap handling is performed. +; +; Global: +; Called from gameplay transition processing before render data is rebuilt. +; +; Notes: +; Several branches deliberately re-enter shared code, so global address-style +; labels are used throughout. +;============================================================================== +UpdateTransitionObjectPositions: + lda #$1A + sta $00 + + lda #$00 + sta $01 + + lda #$74 + sta $02 + + lda #$02 + sta $03 + + ldx #$00 + +;------------------------------------------------------------------------------ +; $EA2B +; Process one structure. +;------------------------------------------------------------------------------ +UpdateNextTransitionObject: + ldy #$00 + + lda ($02),y + beq AdvanceTransitionObjectPointers + + iny + + lda ($00),y + clc + adc ($02),y + sta ($02),y + + dey + + lda ($00),y + adc ($02),y + sta ($02),y + + cmp #$C0 + bcc UpdateTransitionObjectAttribute + +;------------------------------------------------------------------------------ +; $EA44 +; Set attribute bit $20. +;------------------------------------------------------------------------------ +SetTransitionObjectAttributeBit: + lda #$20 + ora $0292,x + sta $0292,x + + bne CheckTransitionObjectWrap + +;------------------------------------------------------------------------------ +; $EA4E +; Clear/set attribute according to coordinate range. +; +; If value < $40, branch backward to $EA44 and set bit $20. +; Otherwise clear bit $20 with mask $DF. +;------------------------------------------------------------------------------ + +UpdateTransitionObjectAttribute: + cmp #$40 + bcc SetTransitionObjectAttributeBit + + lda #$DF + and $0292,x + sta $0292,x + + +;------------------------------------------------------------------------------ +; $EA5A +; Coordinate wrap/reset test. +;------------------------------------------------------------------------------ + +CheckTransitionObjectWrap: + ldy #$00 + + lda ($02),y + cmp #$FC + bcc CheckTransitionObjectLowBoundary + +;------------------------------------------------------------------------------ +; $EA62 +; Reset coordinate/movement state. +;------------------------------------------------------------------------------ + +ResetTransitionObjectPosition: + lda #$00 + sta ($02),y + sta ($00),y + + iny + sta ($00),y + + iny + sta ($02),y + + bne AdvanceTransitionObjectPointers + +;------------------------------------------------------------------------------ +; $EA70 +; Values below $04 also take the reset path. +;------------------------------------------------------------------------------ + +CheckTransitionObjectLowBoundary: + cmp #$04 + bcc ResetTransitionObjectPosition + +;------------------------------------------------------------------------------ +; $EA74 +; Advance both source and mirrored pointers. +;------------------------------------------------------------------------------ + +AdvanceTransitionObjectPointers: + lda $00 + clc + adc #$04 + sta $00 + + lda $01 + adc #$00 + sta $01 + + lda $02 + clc + adc #$04 + sta $02 + + lda $03 + adc #$00 + sta $03 + + inx + + cpx #$05 + bne UpdateNextTransitionObject + + rts + + +;============================================================================== +; $EA94-$EAA2: Gameplay Animation State Dispatcher +; +; $87 is an even state value used directly as an offset into the pointer table +; at $EAA3. +;============================================================================== + +DispatchTransitionAnimation: + ldy $87 + + lda TransitionAnimationHandlerTable,y + sta $10 + + lda TransitionAnimationHandlerTable+1,y + sta $11 + + jmp ($0010) + +;============================================================================== +; $EAA3-$EAA8: Gameplay Animation State Table +;============================================================================== + +TransitionAnimationHandlerTable: + .word DispatchTransitionAnimationPhase + .word DispatchTransitionAnimationState2 + .word DispatchTransitionAnimationState4 + +;============================================================================== +; $EAA9-$EAB7: Animation Substate Dispatcher +; +; $88 is an even state value used directly as an offset into this table. +;============================================================================== + +DispatchTransitionAnimationPhase: + ldy $88 + + lda TransitionAnimationPhaseTable,y + sta $10 + + lda TransitionAnimationPhaseTable+1,y + sta $11 + + jmp ($0010) + + +;============================================================================== +; $EAB8-$EABF: Animation Substate Table +;============================================================================== + +TransitionAnimationPhaseTable: + .word UpdateTransitionAnimationFrame + .word UpdateTransitionAnimationType1 + .word UpdateTransitionAnimationType2 + .word UpdateTransitionAnimationPattern + + +;============================================================================== +; $EAC0-$EACD: Animation Substate 0 +; +; Advances $B7 modulo eight and uses it to select a value for $028D. +;============================================================================== + +UpdateTransitionAnimationFrame: + inc $B7 + + lda $B7 + and #$07 + tay + + lda TransitionAnimationFrameTable,y + sta $028D + + rts + + +;============================================================================== +; $EACE-$EAD5: Animation frame table +;============================================================================== + +TransitionAnimationFrameTable: + .byte $04,$04,$04,$05 + .byte $05,$04,$01,$01 + + +;============================================================================== +; $EAD6-$EAEC: Animation Substate 1 +; +; Runs only when ($4B & 7) == 0. Alternates $028C between $0C and $0D +; according to frame-counter bit 3, then falls back into the common animation +; update path beginning at $EAC0. +;============================================================================== + +UpdateTransitionAnimationType1: + lda $4B + and #$07 + bne UpdateTransitionAnimationFrame + + lda $4B + and #$08 + bne AnimationSubstate_EAE7 + + lda #$0C + bne AnimationSubstate_EAE9 + + +AnimationSubstate_EAE7: + lda #$0D + + +AnimationSubstate_EAE9: + sta $028C + + bne UpdateTransitionAnimationFrame + + +;============================================================================== +; $EAED-$EB03: Animation Substate 2 +; +; Updates only once every eight frames and alternates $028C between $1E/$1F +; according to frame-counter bit 3. +;============================================================================== + +UpdateTransitionAnimationType2: + lda $4B + and #$07 + beq AnimationSubstate_EAF5 + + rts + + +AnimationSubstate_EAF5: + lda $4B + and #$08 + bne AnimationSubstate_EB00 + + lda #$1E + bne AnimationSubstate_EB02 + + +AnimationSubstate_EB00: + lda #$1F + + +AnimationSubstate_EB02: + sta $028C + + rts + + +;============================================================================== +; $EB04-$EB28: Animation Substate 3 +; +; Advances $B7 modulo eight, maps the result through a small index table, and +; uses the selected entry to load four consecutive animation values into +; $028D-$0290. +; +; The final BNE intentionally branches backward into the common update path. +;============================================================================== + +UpdateTransitionAnimationPattern: + inc $B7 + + lda $B7 + and #$07 + tay + + lda TransitionAnimationPatternIndex,y + tay + + lda TransitionAnimationPatternTiles,y + sta $028D + + lda TransitionAnimationPatternTiles+1,y + sta $028E + + lda TransitionAnimationPatternTiles+2,y + sta $028F + + lda TransitionAnimationPatternTiles+3,y + sta $0290 + + bne UpdateTransitionAnimationType2 + + +;============================================================================== +; $EB29-$EB30: Animation pattern index table +;============================================================================== + +TransitionAnimationPatternIndex: + .byte $00,$00,$00,$04 + .byte $04,$00,$08,$08 + + +;============================================================================== +; $EB31-$EB3C: Animation pattern data +; +; Indexed using offsets 0, 4 and 8. The final logical group continues beyond +; this initial range, so preserve the next code/data boundary carefully. +;============================================================================== +TransitionAnimationPatternTiles: + .byte $3C,$3D,$3E,$3F + .byte $3C,$40,$3E,$41 + .byte $38,$39,$3A,$3B + +;============================================================================== +; $EB3D-$EB4B: Gameplay Animation State $02 Dispatcher +;============================================================================== + +DispatchTransitionAnimationState2: + ldy $88 + + lda TransitionAnimationState2Table,y + sta $10 + + lda TransitionAnimationState2Table+1,y + sta $11 + + jmp ($0010) + + +;============================================================================== +; $EB4C-$EB51: Gameplay Animation State $02 Pointer Table +;============================================================================== + +TransitionAnimationState2Table: + .word UpdateTransitionAnimationFrame + .word UpdateTransitionAnimationState2 + .word UpdateTransitionAnimationFrame + + +;============================================================================== +; $EB52-$EB6C: Animation State $02 Handler +;============================================================================== + +UpdateTransitionAnimationState2: + jsr UpdateTransitionAnimationType1 + + lda $0274 + cmp #$7D + bne AnimationState2_EB62 + + lda #$43 + sta $028E + + rts + + +AnimationState2_EB62: + cmp #$7B + beq AnimationState2_EB68 + + rts + + +AnimationState2_EB68: + lda #$44 + sta $028E + + rts + + +;============================================================================== +; $EB6D-$EB7B: Gameplay Animation State $04 Dispatcher +;============================================================================== +DispatchTransitionAnimationState4: + ldy $88 + + lda TransitionAnimationState4Table,y + sta $10 + + lda TransitionAnimationState4Table+1,y + sta $11 + + jmp ($0010) + +;============================================================================== +; $EB7C-$EB83: Gameplay Animation State $04 Pointer Table +;============================================================================== + +TransitionAnimationState4Table: + .word UpdateTransitionAnimationFrame + .word UpdateTransitionAnimationState4Type1 + .word UpdateTransitionAnimationState4Type2 + .word UpdateTransitionAnimationState4Type2 + +;============================================================================== +; $EB84-$EB9E: Animation State $04 Handler 1 +; +; Alternates $028C between $48/$49 every eight frames, while non-update +; frames tail-jump into the common $EAC0 animation updater. +;============================================================================== +UpdateTransitionAnimationState4Type1: + lda $4B + and #$07 + beq AnimationState4_EB8E + + jmp UpdateTransitionAnimationFrame + +AnimationState4_EB8E: + lda $4B + and #$08 + bne AnimationState4_EB97 + + lda #$48 + bne AnimationState4_EB99 + +AnimationState4_EB97: + lda #$49 + +AnimationState4_EB99: + sta $028C + + jmp UpdateTransitionAnimationFrame + +;============================================================================== +; $EB9F-$EBB5: Animation State $04 Handler 2/3 +; +; Alternates $028C between $4A and $4B every eight frames. +;============================================================================== + +UpdateTransitionAnimationState4Type2: + lda $4B + and #$07 + beq AnimationState4_EBA6 + + rts + +AnimationState4_EBA6: + lda $4B + and #$08 + bne AnimationState4_EBB0 + + lda #$4A + bne AnimationState4_EBB2 + +AnimationState4_EBB0: + lda #$4B + +AnimationState4_EBB2: + sta $028C + + rts + +;============================================================================== +; $EBB6-$EC3F: Gameplay Lookup Data +; +; Raw lookup data preserved byte-for-byte. +; Semantic subdivision is deferred until the consuming routines are decoded. +;============================================================================== + +MazeGameplayData_EBB6: + + ; $EBB6-$EBC5 + .byte $00,$07,$00,$00,$00,$04,$01,$06 + .byte $01,$01,$01,$04,$01,$04,$02,$02 + + ; $EBC6-$EBD5 + .byte $02,$03,$02,$03,$02,$02,$02,$03 + .byte $02,$02,$02,$02,$03,$03,$03,$05 + + ; $EBD6-$EBE5 + .byte $03,$02,$03,$03,$03,$02,$03,$02 + .byte $04,$03,$03,$02,$03,$02,$04,$03 + + ; $EBE6-$EBF5 + .byte $03,$01,$04,$02,$05,$03,$03,$05 + .byte $04,$02,$05,$03,$03,$02,$04,$02 + + ; $EBF6-$EC05 + .byte $06,$03,$03,$01,$05,$02,$06,$03 + .byte $03,$01,$05,$02,$07,$03,$03,$03 + + ; $EC06-$EC15 + .byte $05,$02,$07,$03,$03,$01,$06,$02 + .byte $07,$03,$03,$01,$06,$02,$07,$03 + + ; $EC16-$EC25 + .byte $03,$00,$06,$02,$07,$03,$03,$01 + .byte $06,$02,$07,$03,$03,$00,$06,$02 + + ; $EC26-$EC35 + .byte $07,$03,$03,$00,$06,$02,$07,$03 + .byte $03,$00,$06,$02,$07,$03,$04,$00 + + ; $EC36-$EC3F + .byte $06,$02,$07,$03,$04,$00,$06,$02 + .byte $07,$03 + + +;============================================================================== +; $EC40-$ECAB: Gameplay Parameter Lookup Data +; +; Raw lookup data preserved byte-for-byte. +; +; The byte pattern strongly resembles little-endian 16-bit quantities, but +; semantic grouping is intentionally deferred until the consuming routines +; have been identified. +;============================================================================== +MazeGameplayData_EC40: + ; $EC40-$EC4F + .byte $D0,$00,$C0,$00,$A0,$00,$B0,$00 + .byte $A0,$00,$80,$00,$A0,$00,$B0,$00 + + ; $EC50-$EC5F + .byte $90,$00,$50,$00,$50,$00,$D0,$00 + .byte $C0,$00,$A0,$00,$B0,$00,$A0,$00 + + ; $EC60-$EC6F + .byte $80,$00,$B0,$00,$C0,$00,$A0,$00 + .byte $50,$00,$50,$00,$F0,$00,$E0,$00 + + ; $EC70-$EC7F + .byte $C0,$00,$E0,$00,$D0,$00,$B0,$00 + .byte $E0,$00,$F0,$00,$D0,$00,$70,$00 + + ; $EC80-$EC8F + .byte $70,$00,$00,$01,$F0,$00,$D0,$00 + .byte $00,$01,$F0,$00,$D0,$00,$00,$01 + + ; $EC90-$EC9F + .byte $10,$01,$F0,$00,$80,$00,$80,$00 + .byte $00,$01,$F0,$00,$D0,$00,$00,$01 + + ; $ECA0-$ECAB + .byte $F0,$00,$D0,$00,$20,$01,$30,$01 + .byte $10,$01,$80,$00 + + + +;============================================================================== +; $ECAC-$ECFF: Gameplay Lookup / Parameter Data +; +; Raw data preserved byte-for-byte. Semantic subdivision is intentionally +; deferred until the consuming routines are decoded. +;============================================================================== + +MazeGameplayData_ECAC: + + ; $ECAC-$ECBB + .byte $80,$00,$07,$14,$07,$14,$05,$14 + .byte $05,$FF,$07,$14,$07,$14,$05,$FF + + ; $ECBC-$ECCB + .byte $00,$00,$05,$14,$05,$14,$05,$FF + .byte $00,$00,$05,$14,$05,$14,$05,$FF + + ; $ECCC-$ECDB + .byte $00,$00,$14,$0A,$1E,$0F,$28,$14 + .byte $32,$19,$3C,$1E,$50,$28,$64,$32 + + ; $ECDC-$ECEB + .byte $02,$1E,$5A,$00,$03,$32,$00,$00 + .byte $04,$00,$00,$00,$01,$07,$11,$20 + + ; $ECEC-$ECFB + .byte $2D,$1F,$D0,$D0,$10,$13,$D0,$D0 + .byte $10,$1D,$2D,$11,$C3,$C3,$03,$11 + + ; $ECFC-$ECFF + .byte $C3,$C3,$03,$11 + +;============================================================================== +; $ED00-$EDFF: Gameplay Lookup / Pattern Data +; +; Raw data preserved byte-for-byte. This region contains highly structured +; repeated values and bit-pattern-like fields, but semantic subdivisions are +; deferred until the routines that consume this region are identified. +;============================================================================== + +MazeLayoutData_ED00: + + ; $ED00-$ED0F + .byte $2D,$11,$03,$1F,$10,$1D,$03,$1F + .byte $10,$1D,$03,$11,$03,$1F,$10,$1D + + ; $ED10-$ED1F + .byte $03,$1F,$10,$1D,$03,$11,$2D,$11 + .byte $01,$11,$20,$11,$03,$11,$20,$11 + + ; $ED20-$ED2F + .byte $03,$11,$03,$11,$20,$11,$03,$11 + .byte $20,$11,$01,$11,$2D,$11,$03,$1E + + ; $ED30-$ED3F + .byte $10,$1C,$03,$1E,$10,$1C,$03,$1A + .byte $03,$1E,$10,$1C,$03,$1E,$10,$1C + + ; $ED40-$ED4F + .byte $03,$11,$2D,$11,$C3,$C3,$C3,$C3 + .byte $83,$11,$2D,$11,$03,$1F,$10,$1D + + ; $ED50-$ED5F + .byte $03,$1B,$03,$1F,$10,$10,$10,$1D + .byte $03,$1B,$03,$1F,$10,$1D,$03,$11 + + ; $ED60-$ED6F + .byte $2D,$11,$03,$1E,$10,$1C,$03,$11 + .byte $03,$1E,$10,$13,$10,$1C,$03,$11 + + ; $ED70-$ED7F + .byte $03,$1E,$10,$1C,$03,$11,$2D,$11 + .byte $C3,$03,$11,$83,$11,$83,$11,$C3 + + ; $ED80-$ED8F + .byte $03,$11,$2D,$1E,$90,$1D,$03,$15 + .byte $10,$18,$08,$1A,$08,$19,$10,$14 + + ; $ED90-$ED9F + .byte $03,$1F,$90,$1C,$2D,$E0,$11,$03 + .byte $11,$C0,$80,$11,$03,$11,$E0,$2D + + ; $EDA0-$EDAF + .byte $E0,$11,$03,$11,$00,$1F,$17,$2C + .byte $16,$1D,$00,$11,$03,$11,$E0,$2D + + ; $EDB0-$EDBF + .byte $22,$90,$1C,$03,$1A,$00,$11,$80 + .byte $11,$00,$1A,$03,$1E,$90,$21,$04 + + ; $EDC0-$EDCF + .byte $06,$C0,$03,$40,$11,$80,$11,$40 + .byte $03,$C0,$05,$2D,$22,$90,$1D,$03 + + ; $EDD0-$EDDF + .byte $1B,$00,$1E,$90,$1C,$00,$1B,$03 + .byte $1F,$90,$21,$2D,$E0,$11,$03,$11 + + ; $EDE0-$EDEF + .byte $C0,$80,$11,$03,$11,$E0,$2D,$E0 + .byte $11,$03,$11,$00,$1F,$90,$1D,$00 + + ; $EDF0-$EDFF + .byte $11,$03,$11,$E0,$2D,$1F,$90,$1C + .byte $03,$1A,$00,$1E,$10,$13,$10,$1C + +;============================================================================== +; $EE00-$EE8B: Gameplay Lookup / Pattern Data +; +; Raw data preserved byte-for-byte. +;============================================================================== + +MazeLayoutData_EE00: + + ; $EE00-$EE0F + .byte $00,$1A,$03,$1E,$90,$1D,$2D,$11 + .byte $C3,$C3,$03,$11,$C3,$C3,$03,$11 + + ; $EE10-$EE1F + .byte $2D,$11,$03,$19,$10,$1D,$03,$19 + .byte $10,$18,$09,$1A,$09,$19,$10,$18 + + ; $EE20-$EE2F + .byte $03,$1F,$10,$18,$03,$11,$2D,$11 + .byte $01,$43,$11,$C3,$03,$00,$C3,$03 + + ; $EE30-$EE3F + .byte $11,$43,$01,$11,$2D,$15,$10,$1D + .byte $03,$11,$03,$1B,$03,$1F,$90,$1D + + ; $EE40-$EE4F + .byte $03,$1B,$03,$11,$03,$1F,$10,$14 + .byte $2D,$15,$10,$1C,$03,$1A,$03,$11 + + ; $EE50-$EE5F + .byte $03,$1E,$10,$13,$10,$1C,$03,$11 + .byte $03,$1A,$03,$1E,$10,$14,$2D,$11 + + ; $EE60-$EE6F + .byte $C3,$03,$11,$83,$11,$83,$11,$C3 + .byte $03,$11,$2D,$11,$03,$19,$90,$12 + + ; $EE70-$EE7F + .byte $10,$18,$03,$1A,$03,$19,$10,$12 + .byte $90,$18,$03,$11,$2D,$11,$C3,$C3 + + ; $EE80-$EE8B + .byte $C3,$C3,$83,$11,$2D,$1E,$D0,$D0 + .byte $D0,$D0,$90,$1C + + +;============================================================================== +; $EE8C-$EECF: Initialize Runtime Work Buffers +; +; Initializes zero-page runtime pointers and hardware state, clears $0600-$060F, +; then clears sixteen locations at eight-byte intervals beginning at $0620. +;============================================================================== + +InitializeAudioEngine: + lda #$00 + sta audioRequestPtr + + lda #$06 + sta audioRequestPtr+1 + + lda #$20 + sta audioChannelTablePtr + + lda #$06 + sta audioChannelTablePtr+1 + + lda $F100 + sta audioSequenceTablePtr + + lda $F101 + sta audioSequenceTablePtr+1 + + lda #$40 + sta audioWorkValue + + lda #$1F + sta APUSTATUS + + lda #$C0 + sta APUFRAMECNT + + ldy #$00 + + lda #$00 + + +;------------------------------------------------------------------------------ +; $EEB8 +; Clear sixteen contiguous bytes through ($F0). +;------------------------------------------------------------------------------ + +RuntimeInit_Clear0600: + sta (audioRequestPtr),y + + iny + cpy #$10 + bne RuntimeInit_Clear0600 + + ldy #$00 + ldx #$10 + + +;------------------------------------------------------------------------------ +; $EEC3 +; Clear sixteen entries at an eight-byte stride. +; +; LDA #$00 is intentionally executed on every iteration. +;------------------------------------------------------------------------------ +RuntimeInit_Clear0620Stride: +lda #$00 +sta (audioChannelTablePtr),y + +tya +clc +adc #$08 +tay + +dex +bne RuntimeInit_Clear0620Stride + +rts + + +;============================================================================== +; $EED0-$EF2C: Initialize and Scan Runtime Command Slots +; +; Clears runtime work values, then scans sixteen 8-byte entries addressed +; through $F2/$F3. Occupied entries update flags through $FE/$FF, while newly +; activated entries copy four bytes through the pointer selected in $F6. +; +; Execution falls through at $EF2D into the next processing phase. +;============================================================================== + +InitializeAudioChannels: + lda #$00 + sta audioChannelFlags + sta $F9 + sta $FA + sta $FB + sta audioChannelOffset + sta $FF + + lda #$F8 + sta audioIndirectPtr + + +;------------------------------------------------------------------------------ +; $EEE2 +; Examine one eight-byte slot. +;------------------------------------------------------------------------------ + +ScanAudioChannelSlot: + ldy $FD + + lda (audioChannelTablePtr),y + beq AdvanceAudioChannelSlot + + cmp #$05 + bcc ActivateAudioChannelSlot + + sec + sbc #$05 + tay + + lda #$01 + sta ($FE),y + + jmp AdvanceAudioChannelSlot + + +;------------------------------------------------------------------------------ +; $EEF5 +; Process slot values $01-$04. +;------------------------------------------------------------------------------ + +ActivateAudioChannelSlot: + sec + sbc #$01 + tay + + lda ($FE),y + bne AdvanceAudioChannelSlot + + lda #$01 + sta ($FE),y + + tya + tax + + adc #$04 + + ldy $FD + sta ($F2),y + + txa + asl + asl + sta $F6 + + ldx #$00 + +;------------------------------------------------------------------------------ +; $EF12 +; Set initial four-byte copy count. +;------------------------------------------------------------------------------ + +BeginAudioChannelParameterCopy: + lda #$04 + +;------------------------------------------------------------------------------ +; $EF14 +; Push the current copy count. +; +; The loop at $EF20 deliberately returns here, so PHA is repeated on every +; iteration. +;------------------------------------------------------------------------------ + +CopyAudioChannelParameter: + pha + + iny + + lda ($F2),y + sta ($F6,x) + + inc $F6 + + pla + + sec + sbc #$01 + bne CopyAudioChannelParameter + + +;------------------------------------------------------------------------------ +; $EF22 +; Advance to the next eight-byte slot. +;------------------------------------------------------------------------------ + +AdvanceAudioChannelSlot: + lda $FD + clc + adc #$08 + sta $FD + + cmp #$80 + bcc ScanAudioChannelSlot + + ; Fall through to $EF2D. + + +;============================================================================== +; $EF2D-$F006: Process Runtime Command Entries +; +; Continuation of the runtime command-slot scan. +; +; $FC indexes source commands through ($F0). +; $FD indexes eight-byte runtime records through ($F2). +; +; Empty runtime records are initialized from tables through $F4/$F5 and +; command bytes fetched through the helper at $F0C3. Active records update +; countdowns and command parameters before both indices advance. +;============================================================================== + +UpdateAudioChannels: + ldy #$00 + sty $FC + sty $FD + + +;------------------------------------------------------------------------------ +; $EF33 +; Process one source entry. +;------------------------------------------------------------------------------ + +UpdateNextAudioSequence: + ldy $FC + + lda ($F0),y + bne CheckAudioChannelActive + + jmp AdvanceAudioSequence + + +;------------------------------------------------------------------------------ +; $EF3B +; Check the corresponding runtime record. +;------------------------------------------------------------------------------ + +CheckAudioChannelActive: + ldy $FD + + lda ($F2),y + bne TickAudioChannelDelay + + lda $FC + asl + tay + + lda ($F4),y + pha + + lda $FD + adc #$05 + tay + + pla + sta ($F2),y + + lda $FC + asl + adc #$01 + tay + + lda ($F4),y + pha + + lda $FD + adc #$06 + tay + + pla + sta ($F2),y + + jsr $F0C3 + + ldy $FD + sta ($F2),y + + jsr $F0C3 + tax + + lda $FD + clc + adc #$01 + tay + + txa + sta ($F2),y + + jsr $F0C3 + tax + + lda $FD + clc + adc #$02 + tay + + txa + sta ($F2),y + + jsr $F0C3 + tax + + lda $FD + clc + adc #$04 + tay + + txa + sta ($F2),y + + jmp DecodeAudioCommand + + +;------------------------------------------------------------------------------ +; $EF94 +; Decrement the active record countdown at offset 7. +;------------------------------------------------------------------------------ + +TickAudioChannelDelay: + lda $FD + clc + adc #$07 + tay + + lda ($F2),y + sec + sbc #$01 + sta ($F2),y + + bne AdvanceAudioSequence + + +;------------------------------------------------------------------------------ +; $EFA2 +; Fetch and decode the next runtime command byte. +;------------------------------------------------------------------------------ + +DecodeAudioCommand: + jsr $F0C3 + + cmp #$F0 + bcs $F00D + + cmp #$C0 + bcs LoadAudioCommandDelay + + pha + + and #$F0 + lsr + lsr + lsr + tax + + lda AudioFrequencyLookupTable,x + sta $FE + + lda AudioFrequencyLookupTable+1,x + sta $FF + + pla + + and #$0F + beq ApplyAudioFrequencyMask + + tax + +;------------------------------------------------------------------------------ +; $EFC4 +; Shift the selected mask by the command low nibble. +;------------------------------------------------------------------------------ + +ShiftAudioFrequencyMask: + lsr $FE + ror $FF + + dex + bne ShiftAudioFrequencyMask + + +;------------------------------------------------------------------------------ +; $EFCB +; Merge the generated mask into the runtime record. +;------------------------------------------------------------------------------ + +ApplyAudioFrequencyMask: + lda $FD + clc + adc #$04 + tay + + lda ($F2),y + and #$F8 + ora $FE + sta ($F2),y + + lda $FF + dey + sta ($F2),y + + ldy $FD + + lda ($F2),y + cmp #$05 + bcc LoadAudioCommandDelay + + sec + sbc #$04 + sta ($F2),y + + +;------------------------------------------------------------------------------ +; $EFEB +; Load the new runtime countdown. +;------------------------------------------------------------------------------ + +LoadAudioCommandDelay: + jsr $F0C3 + pha + + lda $FD + clc + adc #$07 + tay + + pla + sta ($F2),y + + +;------------------------------------------------------------------------------ +; $EFF8 +; Advance to the next runtime/source entry. +;------------------------------------------------------------------------------ + +AdvanceAudioSequence: + lda $FD + clc + adc #$08 + sta $FD + + lda $FC + adc #$01 + sta $FC + + cmp #$10 + + ; Fall through at $F007 to the next control-flow block. + +;============================================================================== +; $F007-$F00C: Runtime command-loop termination / continuation +; +; Entry is the fall-through from the CMP #$10 at $F005. +;============================================================================== + +FinishAudioSequenceScan: + bcs AudioSequenceUpdateDone + + jmp UpdateNextAudioSequence + + +AudioSequenceUpdateDone: + rts + + +;============================================================================== +; $F00D-$F01D: Runtime Command Dispatcher +; +; Input: +; A = command byte >= $F0 +; +; Uses the low nibble to select a handler through the pointer table at $F01E. +;============================================================================== + +DispatchAudioCommand: + and #$0F + asl + tax + + lda AudioCommandHandlerTable,x + sta $FE + + lda AudioCommandHandlerTable+1,x + sta $FF + + jmp ($00FE) + + +;============================================================================== +; $F01E-$F03D: Runtime Command Handler Table +; +; Sixteen 16-bit handlers. Unsupported command values use the no-op handler +; at $F03E. +;============================================================================== + +AudioCommandHandlerTable: + .word StopAudioSequence ; $F0 + .word AudioCommandF1 ; $F1 + .word AudioCommandF2 ; $F2 + .word AudioCommandF3 ; $F3 + .word AudioCommandF4 ; $F4 + .word AudioCommandF5 ; $F5 + .word AudioCommandF6 ; $F6 + .word StopAudioSequence ; $F7 + .word StopAudioSequence ; $F8 + .word StopAudioSequence ; $F9 + .word StopAudioSequence ; $FA + .word StopAudioSequence ; $FB + .word StopAudioSequence ; $FC + .word StopAudioSequence ; $FD + .word StopAudioSequence ; $FE + .word StopAudioSequence ; $FF + + +;============================================================================== +; $F03E-$F04A: Runtime command no-op/terminate handler +; +; Clears the current source entry and current runtime record, then advances +; through the common continuation at $EFF8. +;============================================================================== + +StopAudioSequence: + ldy $FC + + lda #$00 + sta ($F0),y + + ldy $FD + sta ($F2),y + + jmp AdvanceAudioSequence + + +;============================================================================== +; $F04B-$F062: Runtime command $F1 +; +; Fetches one command byte and merges its bits into runtime-record byte 0/1. +;============================================================================== + +AudioCommandF1: + jsr FetchAudioSequenceByte + pha + + lda $FD + clc + adc #$01 + tay + + lda ($F2),y + and #$3F + sta ($F2),y + + pla + ora ($F2),y + sta ($F2),y + + jmp DecodeAudioCommand + +;============================================================================== +; $F063-$F07A: Runtime command $F2 +;============================================================================== + +AudioCommandF2: + jsr FetchAudioSequenceByte + pha + + lda $FD + clc + adc #$01 + tay + + lda ($F2),y + and #$CF + sta ($F2),y + + pla + ora ($F2),y + sta ($F2),y + + jmp DecodeAudioCommand + +;============================================================================== +; $F07B-$F092: Runtime command $F3 +;============================================================================== + +AudioCommandF3: + jsr FetchAudioSequenceByte + pha + + lda $FD + clc + adc #$01 + tay + + lda ($F2),y + and #$F0 + sta ($F2),y + + pla + ora ($F2),y + sta ($F2),y + + jmp DecodeAudioCommand + +;============================================================================== +; $F093-$F0A2: Runtime command $F4 +;============================================================================== + +AudioCommandF4: + jsr FetchAudioSequenceByte + pha + + lda $FD + clc + adc #$02 + tay + + pla + sta ($F2),y + + jmp DecodeAudioCommand + +;============================================================================== +; $F0A3-$F0B2: Runtime command $F5 +;============================================================================== + +AudioCommandF5: + jsr FetchAudioSequenceByte + pha + + lda $FD + clc + adc #$04 + tay + + pla + sta ($F2),y + + jmp DecodeAudioCommand + +;============================================================================== +; $F0B3-$F0C2: Runtime command $F6 +;============================================================================== + +AudioCommandF6: + jsr FetchAudioSequenceByte + pha + + lda $FD + clc + adc #$01 + tay + + pla + sta ($F2),y + + jmp DecodeAudioCommand + +;============================================================================== +; $F0C3-$F0E7: Fetch Runtime Command Byte +; +; Uses the 16-bit source pointer stored in runtime-record bytes +5/+6. +; +; Output: +; A = byte read from the command stream +; +; Side effect: +; Advances the source pointer by one and writes it back into bytes +5/+6. +;============================================================================== + +FetchAudioSequenceByte: + lda $FD + clc + adc #$05 + tay + + lda ($F2),y + sta $FE + + iny + + lda ($F2),y + sta $FF + + ldx #$00 + + lda ($FE,x) + pha + + lda $FE + + dey + clc + adc #$01 + sta ($F2),y + + lda $FF + adc #$00 + + iny + sta ($F2),y + + pla + + rts + +;============================================================================== +; $F0E8-$F14F: Runtime / Audio Lookup Data +; +; Raw data preserved byte-for-byte. +; +; The first portion is referenced by UpdateAudioChannels through +; $F0E8,X / $F0E9,X as paired mask values. Later portions appear to contain +; additional pointers and command/parameter data. +; +; Semantic subdivision is deferred until all consumers are decoded. +;============================================================================== +AudioFrequencyLookupTable: + ; $F0E8-$F0F7 + .byte $03,$F9,$03,$C0,$03,$8A,$03,$57 + .byte $03,$27,$02,$FA,$02,$CF,$02,$A7 + + ; $F0F8-$F107 + .byte $02,$81,$02,$5D,$02,$3B,$02,$1B + .byte $02,$F1,$CB,$F3,$14,$F4,$22,$F1 + + ; $F108-$F117 + .byte $3C,$F3,$3F,$F4,$50,$F4,$37,$F1 + .byte $E4,$F1,$1D,$F3,$CF,$F1,$62,$F1 + + ; $F118-$F127 + .byte $8D,$F1,$B0,$F1,$07,$F2,$7A,$F2 + .byte $61,$F4,$01,$03,$7F,$08,$A2,$0C + + ; $F128-$F137 + .byte $A2,$0C,$A2,$0C,$A2,$0C,$A2,$0C + .byte $A2,$0C,$A2,$0C,$A2,$0C,$F0,$03 + + ; $F138-$F147 + .byte $04,$7F,$08,$33,$01,$23,$01,$03 + .byte $01,$A2,$01,$92,$01,$72,$01,$52 + + ; $F148-$F14F + .byte $01,$32,$01,$22,$01,$02,$01,$A1 + + + +;============================================================================== +; $F150-$F24F: Runtime / Audio Command Data +; +; Raw data preserved byte-for-byte. +; +; The region contains strongly patterned pairs and command-like values used +; by the late-PRG runtime/audio interpreter. Semantic subdivision is deferred +; until its individual consumers are mapped. +;============================================================================== +AudioSequenceData_F150: + ; $F150-$F15F + .byte $01,$91,$01,$C0,$08,$91,$01,$A1 + .byte $01,$02,$01,$22,$01,$32,$01,$52 + + ; $F160-$F16F + .byte $01,$F0,$01,$96,$7F,$28,$82,$01 + .byte $92,$01,$A2,$01,$B2,$01,$03,$01 + + ; $F170-$F17F + .byte $13,$01,$23,$01,$33,$01,$43,$01 + .byte $53,$01,$33,$01,$23,$01,$13,$01 + + ; $F180-$F18F + .byte $03,$01,$B2,$01,$A2,$01,$92,$01 + .byte $82,$01,$72,$01,$F0,$01,$96,$7F + + ; $F190-$F19F + .byte $28,$A2,$01,$B2,$01,$03,$01,$13 + .byte $01,$23,$01,$33,$01,$43,$01,$53 + + ; $F1A0-$F1AF + .byte $01,$33,$01,$23,$01,$13,$01,$03 + .byte $01,$B2,$01,$A2,$01,$92,$01,$F0 + + ; $F1B0-$F1BF + .byte $01,$96,$7F,$28,$B2,$01,$03,$01 + .byte $13,$01,$23,$01,$33,$01,$43,$01 + + ; $F1C0-$F1CF + .byte $53,$01,$33,$01,$23,$01,$13,$01 + .byte $03,$01,$B2,$01,$A2,$01,$F0,$02 + + ; $F1D0-$F1DF + .byte $9C,$7F,$28,$31,$01,$71,$01,$A1 + .byte $01,$12,$01,$32,$01,$72,$01,$A2 + + ; $F1E0-$F1EF + .byte $01,$13,$01,$F0,$02,$00,$7F,$10 + .byte $20,$03,$50,$03,$80,$02,$A0,$02 + + ; $F1F0-$F1FF + .byte $21,$02,$51,$02,$81,$01,$A1,$01 + .byte $02,$01,$22,$01,$32,$01,$52,$01 + + ; $F200-$F20F + .byte $F5,$18,$73,$01,$C0,$08,$F0,$01 + .byte $03,$7F,$08,$72,$02,$82,$08,$72 + + ; $F210-$F21F + .byte $02,$82,$08,$72,$02,$82,$08,$42 + .byte $02,$52,$04,$32,$04,$82,$06,$82 + + ; $F220-$F22F + .byte $08,$B2,$02,$03,$10,$C0,$08,$72 + .byte $02,$82,$08,$72,$02,$82,$08,$72 + + ; $F230-$F23F + .byte $02,$82,$08,$42,$02,$52,$04,$32 + .byte $04,$82,$06,$82,$08,$42,$02,$52 + + ; $F240-$F24F + .byte $10,$C0,$08,$72,$02,$82,$08,$72 + .byte $02,$82,$08,$72,$02,$82,$08,$42 + +;============================================================================== +; $F250-$F34F: Runtime / Audio Command Data +; +; Raw data preserved byte-for-byte. +; Semantic subdivision is deferred until the individual stream consumers are +; fully mapped. +;============================================================================== + +AudioSequenceData_F250: + + ; $F250-$F25F + .byte $02,$52,$04,$32,$04,$82,$06,$82 + .byte $08,$A2,$02,$B2,$08,$03,$02,$13 + + ; $F260-$F26F + .byte $0A,$13,$02,$23,$0C,$03,$02,$13 + .byte $08,$A2,$02,$B2,$08,$82,$0A,$A2 + + ; $F270-$F27F + .byte $02,$B2,$0A,$72,$02,$82,$10,$C0 + .byte $08,$F0,$02,$81,$7F,$40,$80,$08 + + ; $F280-$F28F + .byte $C0,$06,$80,$04,$C0,$02,$80,$08 + .byte $C0,$06,$80,$04,$C0,$02,$80,$08 + + ; $F290-$F29F + .byte $C0,$06,$80,$04,$C0,$02,$01,$04 + .byte $C0,$01,$11,$04,$C0,$01,$21,$04 + + ; $F2A0-$F2AF + .byte $C0,$01,$31,$04,$C0,$01,$80,$08 + .byte $C0,$06,$80,$04,$C0,$02,$80,$08 + + ; $F2B0-$F2BF + .byte $C0,$06,$80,$04,$C0,$02,$80,$08 + .byte $C0,$06,$80,$04,$C0,$02,$01,$04 + + ; $F2C0-$F2CF + .byte $C0,$01,$11,$04,$C0,$01,$21,$04 + .byte $C0,$01,$31,$04,$C0,$01,$80,$08 + + ; $F2D0-$F2DF + .byte $C0,$06,$80,$04,$C0,$02,$80,$08 + .byte $C0,$06,$80,$04,$C0,$02,$80,$08 + + ; $F2E0-$F2EF + .byte $C0,$06,$80,$04,$C0,$02,$01,$04 + .byte $C0,$01,$11,$04,$C0,$01,$21,$04 + + ; $F2F0-$F2FF + .byte $C0,$01,$31,$04,$C0,$01,$81,$0A + .byte $31,$04,$C0,$01,$21,$04,$C0,$01 + + ; $F300-$F30F + .byte $11,$04,$C0,$01,$B0,$04,$C0,$01 + .byte $80,$04,$C0,$01,$70,$04,$C0,$01 + + ; $F310-$F31F + .byte $60,$08,$C0,$02,$70,$08,$C0,$02 + .byte $80,$0C,$C0,$06,$F0,$02,$98,$7F + + ; $F320-$F32F + .byte $28,$33,$01,$23,$01,$13,$01,$03 + .byte $01,$A2,$01,$82,$01,$72,$01,$52 + + ; $F330-$F33F + .byte $01,$32,$01,$12,$01,$A1,$01,$71 + .byte $01,$31,$01,$F0,$01,$42,$7F,$38 + + ; $F340-$F34F + .byte $23,$02,$33,$02,$43,$02,$53,$02 + .byte $43,$02,$33,$02,$23,$02,$13,$02 + +;============================================================================== +; $F350-$F44F: Runtime / Audio Command Data +; +; Raw command/parameter stream preserved byte-for-byte. +; Semantic subdivision is deferred until all stream consumers are mapped. +;============================================================================== + +AudioSequenceData_F350: + + ; $F350-$F35F + .byte $23,$02,$33,$02,$43,$02,$33,$02 + .byte $23,$02,$13,$02,$03,$02,$13,$02 + + ; $F360-$F36F + .byte $23,$02,$33,$02,$23,$02,$13,$02 + .byte $03,$02,$B2,$02,$03,$02,$13,$02 + + ; $F370-$F37F + .byte $23,$02,$13,$02,$03,$02,$B2,$02 + .byte $A2,$02,$B2,$02,$03,$02,$23,$02 + + ; $F380-$F38F + .byte $03,$02,$B2,$02,$A2,$02,$92,$02 + .byte $A2,$02,$B2,$02,$03,$02,$B2,$02 + + ; $F390-$F39F + .byte $A2,$02,$92,$02,$82,$02,$92,$02 + .byte $A2,$02,$03,$02,$A2,$02,$92,$02 + + ; $F3A0-$F3AF + .byte $82,$02,$F2,$00,$F3,$00,$F5,$18 + .byte $31,$01,$71,$01,$B1,$01,$32,$01 + + ; $F3B0-$F3BF + .byte $72,$01,$B2,$01,$33,$01,$73,$01 + .byte $C0,$02,$31,$01,$71,$01,$B1,$01 + + ; $F3C0-$F3CF + .byte $32,$01,$72,$01,$B2,$01,$33,$01 + .byte $73,$01,$F0,$01,$81,$7F,$40,$31 + + ; $F3D0-$F3DF + .byte $08,$32,$08,$A1,$08,$71,$08,$32 + .byte $07,$A1,$07,$71,$0C,$C0,$06,$41 + + ; $F3E0-$F3EF + .byte $08,$42,$08,$B1,$08,$81,$08,$42 + .byte $07,$B1,$07,$81,$0C,$C0,$06,$31 + + ; $F3F0-$F3FF + .byte $08,$32,$08,$A1,$08,$71,$08,$32 + .byte $07,$A1,$07,$71,$0C,$C0,$06,$61 + + ; $F400-$F40F + .byte $05,$71,$05,$81,$05,$81,$05,$91 + .byte $05,$A1,$05,$A1,$05,$B1,$05,$02 + + ; $F410-$F41F + .byte $05,$32,$0C,$F0,$02,$82,$7F,$40 + .byte $30,$18,$A0,$08,$30,$0E,$A0,$0C + + ; $F420-$F42F + .byte $C0,$06,$40,$18,$B0,$08,$40,$0E + .byte $B0,$0C,$C0,$06,$30,$18,$A0,$08 + + ; $F430-$F43F + .byte $30,$0E,$A0,$0C,$C0,$06,$A0,$0F + .byte $01,$0F,$21,$0F,$31,$0C,$F0,$01 + + ; $F440-$F44F + .byte $9F,$7F,$28,$01,$01,$41,$01,$71 + .byte $01,$A1,$01,$02,$01,$F5,$18,$F0 + + +;============================================================================== +; $F450-$F49A: Runtime / Audio Command Data +; +; Raw command data preserved byte-for-byte. +;============================================================================== + +AudioSequenceData_F450: + + ; $F450-$F45F + .byte $01,$9F,$7F,$28,$02,$01,$A1,$01 + .byte $71,$01,$41,$01,$F5,$18,$01,$01 + + ; $F460-$F46F + .byte $F0,$01,$9F,$7F,$28,$52,$01,$92 + .byte $01,$03,$01,$33,$01,$F5,$18,$53 + + ; $F470-$F47F + .byte $03,$F5,$28,$53,$01,$33,$01,$03 + .byte $01,$92,$01,$F5,$18,$52,$03,$92 + + ; $F480-$F48F + .byte $01,$13,$01,$43,$01,$73,$01,$F5 + .byte $18,$93,$0A,$F5,$28,$93,$01,$73 + + ; $F490-$F49A + .byte $01,$43,$01,$13,$01,$F5,$18,$92 + .byte $03,$F0,$FF + +;============================================================================== +; $F49B-$F64F: PRG Padding +;============================================================================== + .res $0B5B, $FF + + +;============================================================================== +; $FFF6-$FFF9: Final ROM Data +; +; Notes: +; $FFF6/$FFF7 are read directly by DrawMazeNametable: +; +; lda $FFF7 +; sta $01 +; lda $FFF6 +; sta $00 +; +; Therefore the first two bytes form the little-endian value $ECEC. +; +; $FFF8/$FFF9 form the little-endian value $C10E. +;============================================================================== + +MazeDataPointerBytes: + .byte $EC,$EC + .byte $0E,$C1 + +;============================================================================== +; $FFFA-$FFFF: Interrupt Vectors +;============================================================================== +.org $FFFA +CpuInterruptVectors: + .word NmiHandler ; NMI + .word Reset ; Reset + .word IrqHandler ; IRQ/BRK diff --git a/Pac-Man (USA) (Namco)/copilot/symbols.inc b/Pac-Man (USA) (Namco)/copilot/symbols.inc index ca0e52c..fbc820a 100644 --- a/Pac-Man (USA) (Namco)/copilot/symbols.inc +++ b/Pac-Man (USA) (Namco)/copilot/symbols.inc @@ -1,3 +1,7 @@ +;---------------------------------------------------- +; NES Specific +;---------------------------------------------------- + ; PPU registers PPUCTRL = $2000 PPUMASK = $2001 @@ -37,6 +41,7 @@ APUCTRL = $4015 APUSTATUS = $4015 APUFRAMECNT = $4017 + PAD_RIGHT=$01 PAD_LEFT=$02 PAD_DOWN=$04 @@ -48,4 +53,4 @@ PAD_A=$80 PAD_HORIZONTAL=PAD_LEFT|PAD_RIGHT PAD_VERTICAL=PAD_UP|PAD_DOWN PAD_DPAD=PAD_HORIZONTAL|PAD_VERTICAL -PAD_MENU_INPUT=PAD_SELECT|PAD_START|PAD_VERTICAL \ No newline at end of file +PAD_MENU_INPUT=PAD_SELECT|PAD_START|PAD_VERTICAL diff --git a/TODO.md b/TODO.md new file mode 100644 index 0000000..1c681b4 --- /dev/null +++ b/TODO.md @@ -0,0 +1,241 @@ +# TODO / Handoff + +Written so a fresh session can pick this up cold. Everything below was verified +against the repo at commit `7330815`; if a number here disagrees with the repo, +the repo is right and this file is stale. + +## The contract + +Byte-identical rebuild is the hard requirement. In every project's `copilot/`: + +```bash +make # must print "Byte-identical ROM verified." (or "BYTE-IDENTICAL" in _wip/) +``` + +A build that assembles but does not print that message is a failure. Requires +`ca65`/`ld65` on PATH. Never edit bytes to make a build pass — fix the source. + +Two tiers exist, and the difference is real: + +- **Top level (16 projects)** — `make` compares the whole ROM against `copilot/rom.nes`. +- **`_wip/` (20 projects)** — `make` only runs `cmp reconstructed_prg.bin prg.bin`. + Header and CHR are **not** proven for those. Promotion means adding + `copilot/rom.nes`, switching to a whole-ROM compare, and changing + `../../../_tools/` to `../../_tools/` in the Makefile. + +## Current state + +- 16 top-level projects, all byte-identical. +- 20 `_wip/` projects, all PRG-identical. `Pyramid (U)` is the only one with Pass 1. +- 9 commits ahead of `origin/master`, nothing pushed. +- `_tools/verify_pass1.py` rebuilds and re-traces everything: **all 36 faithful, none truncated.** + +```bash +python3 _tools/verify_pass1.py # all projects +python3 _tools/verify_pass1.py "MUSCLE (U)" # one project +``` + +--- + +## Open work, highest value first + +### 1. Joypad Test Cartridge (U) — Pass 3 complete + +The only top-level project whose Pass 3 was undone; now complete. + +- **Pass 1** redone (6.6x: 282 → 1,773 instructions, 580 → 3,836 bytes / 3.5% → 23.4%). +- **Pass 2** complete: 202 labels, zero `Label_` remaining, all 202 routine headers describe real behaviour. +- **Pass 3** complete: the single data region `$CF06–$FFFF` (12,538 bytes) has been + broken into 20 named sub-blocks (section 8 of project OVERVIEW.md): + - VRAM command streams at `$CF06`, `$CF40`, `$D063`, `$D1F5` — decoded via `RetAddrUpdate` + (`$CDC8`): `$4C` = jump, `$60` = deferred PPUCTRL, bit-7-clear = VRAM write (PPU addr + data, + bit 6 of data = long/short command selector). + - OAM table groups at `$D4E3`, `$D5C4`, `$D644` — 12 groups of 32-byte tables + (8 entries of Y/tile/attr/X), read by `CopyOamFromTable`/`CopyOamFromTable70`. + - Sprite template at `$D6A5` (read by `CopySpriteTemplateTable`) and button OAM + template at `$D6C5` (read by `PrepareButtonOam`). + - `$FF` ROM padding (`$D6E5–$FFF9`) and vectors (`$FFFA–$FFFF`). +- Build verified byte-identical. + +**Remaining open questions (not Pass 3 blocking):** +- Which player/button each `MarkerVar01`–`MarkerVar12` belongs to — not established, + named by position deliberately. +- `HandleButtonPress1`–`8` write OAM tiles in order `$0202, $0206, $020E, $020A, ...` + — sprites 1, 2, 4, 3, 5, 6, 7, 8. The out-of-order third/fourth entries are unexplained. + +### 2. Mario Bros (JU) — Pass 2 substantial, reach-limited + +`_wip/Mario Bros (JU)/`. Pass 1 complete: **72.2% code** +(5,735 instructions), byte accounting exact, BYTE-IDENTICAL. + +**Pass 2 substantial — 252 subroutine entry points named:** +- **90 semantic names**: audio/sound routines in `$F8xx-$F9xx` (clearly + identifiable from APU register writes), gameplay helpers like + `CheckZpB3Return`, `CheckRangeReturn012`, `ToggleZpFC_Bit3` +- **165 address-based names** (`SubCxxxx`) for the remainder +- All 252 `jsr`/`jmp` targets resolved from raw `$XXXX` to labels +- Zero raw `$XXXX` call operands remain + +**667 `Label_Cxxxx` internal branch targets remain** — local control-flow +targets within routines, not subroutine entry points. These do not need +semantic names for the call graph to be readable. + +**The real blocker is reach, not naming.** 4,555 bytes (27.8%) are still data, +gated behind a stack-based indirect call at `$CD9E` (table pointer arrives via +`pla`, unknowable statically) and a 20-entry `JSR` thunk table at `$C5A3`. +Resolving the pushed table addresses is the key to the remaining 28%. +- Already documented: `$C5A3` is a 20-entry `JSR` thunk table, `$C0B6` is the NMI + phase dispatcher. Both were found by probing, which is a cheap technique worth + reusing on other projects. + +### 2b. Lunar Pool (U) — Pass 1 complete, Pass 2/3 outstanding + +`_wip/Lunar Pool (U)/`. Pass 1 complete: **57.8% code** (4,586 instructions, +9,475 bytes), byte accounting exact, BYTE-IDENTICAL. + +- RESET is at **`$E80C`**, not `$C000` — the tracer must seed it explicitly + (`--extra-seed 0xE80C`), since the vectors are the only entry points a plain + trace follows. +- Code is gated behind two dispatch mechanisms, both of the Mario Bros shape: + `jmp ($7961)` at three sites (`$F788`/`$F7F6`/`$F828`, RAM-pointer dispatch — + the data blocks after them hold the screen text "game over" and "hi`score__"), + and stack-based dispatch at `$CBDC` (pointer arrives via `pla`). +- 6,909 bytes (42.2%) still data. ~585 `Label_Cxxxx` to name in Pass 2. +- Three undocumented opcodes this project forced into `nesdis.py`: `$72` (RRA abs), + `$42` (NOP #imm), `$FA` (NOP abs,X). One emitter fix: ca65 optimises an + operand with a `$00` high byte into zero-page form, so ABS/ABSX/ABSY/IND + operands with high byte `$00` now emit the `a:` prefix to force absolute. + +### 3. Audit comments for Excitebike and Pac-Man + +Both are hand-written sources with semantic labels but **no byte-identity audit +comment**, so a source line cannot be mapped back to ROM bytes without +re-assembling. Every other project has one. + +- `ca65 -l` gives offset + bytes, and the offset indexes `prg.bin` directly. + Byte *values* must come from `prg.bin`, not the listing — ca65 prints `rr rr` + for relocatable words. +- **Blocker: ca65's listing has no source line numbers.** It emits + `r ` with nothing tying entries to lines. +- Three options, none free: (1) lockstep text alignment between listing and + source — risky, the listing may truncate long lines and may omit blank lines; + (2) re-derive offsets by decoding `prg.s` independently — a silent disagreement + would corrupt offsets while still assembling; (3) transplant comments from a + tracer-generated intermediate. +- **Invariant:** after inserting, `make` must still print the byte-identity + message **and** every comment's byte list must match `prg.bin` at the stated + offset. A wrong offset that still assembles is the failure mode to watch. +- No tool was committed for this — the one written does not work. + +### 4. Projects with `Label_` residue + +| Project | `Label_` definitions | refs in code | Note | +|---|---|---|---| +| Wild Gunman (U) | 718 | 539 | Pass 1 redone; Pass 2/3 pending | +| Donkey Kong Jr. (JU) | 688 | 840 | Pass 1 verified; Pass 2/3 pending | +| Balloon Fight (JU) | 497 | 711 | | +| NES PowerPad Test Card (U) | 46 | 43 | otherwise Pass 3 complete | + +The other 12 top-level projects have **zero** `Label_` and are Pass 3 complete. +Note these counts are address-derived labels only — some are legitimately +internal branch targets and may never deserve a semantic name. + +### 5. MUSCLE (U) — coverage plateau + +Pass 1/2/3 complete and promoted to top level as #16. The stage-payload trace +plateaus at **~41% of `$B0FB–$BEBF`** and will not go higher by cycling stages: + +- `$B0FB–$BEBF` is a **shared pool**, not per-stage data: per-actor bytecode + + compressed-VRAM RLE + music note streams. `$BD28` is an 8-entry **per-actor** + entry-offset table (`$A063 adc $BD28,X`, X = ActorIndex `$1E`). +- Forcing all 8 actor indices added **zero** new bytes. +- The sound engine reads the same window (`$B03C lda (SoundReadPointerLo),Y` → + `cmp #$F0` → `lda $B0E3,y` = note decoding), which is where the `$FF` terminators come from. +- To go further needs **other music tracks playing** and **actors 2–4 in + non-default states** — i.e. scripted match play, not button taps. Out of scope + for a coverage tracer. +- Two corrections recorded: `$0326` is **not** a level byte (never leaves `$00` + even in a confirmed match), and `$0320` is a boolean, not a screen-state machine. + +--- + +## Gotchas that will bite you + +These cost real time this session. All are recorded so they don't cost it twice. + +- **Undocumented opcodes silently truncate a trace.** A tracer knowing only the + 151 official opcodes halts on the first one used as ordinary code. Joypad died + at `$C09E` on `DCP $3C20` (`$CF`) and lost 3,256 bytes of code. + `nesdis.py --undocumented` adds all 105 (default **off**, so existing + `make regen` pipelines stay byte-stable). Mario Bros: 14.6% → 14.9% from this + alone, but combined with seeding it mattered more. +- **ca65 V2.19 implements none of the undocumented opcodes.** They cannot be + written as mnemonics. `nesdis.py` emits them as explicit `.byte` with the + disassembly in the comment, keeping them in the code region so the split and the + audit trail survive. +- **RESET and IRQ are usually the same address.** The semantic-name map used to + overwrite, renaming the primary entry to `IrqHandler`. Now `setdefault`, in + RESET/NMI/IRQ priority order. +- **`render()` stamped every branch as `Label_XXXX`** and never reconciled with + the semantic map, so a branch into a named routine emitted a label that was + never defined — **the file did not assemble at all**. +- **Control-flow targets must win over fall-through.** A `bne` targeting `$C528` + was being swallowed by a fall-through `NOP #$A5` at `$C527` whose *operand* was + `$C528`. No assembler branches mid-instruction. Fixed in `nesdis.py`. +- **Branch targets inside a surviving instruction must be pruned** from the + target set, or `emit_code`'s linear walk consumes those bytes as an operand and + the label goes undefined. +- **NMI must fire once per frame, not per `$2002` read.** The main loop polls + `$2002` to sync on vblank, and each read clears bit 7 — which re-arms NMI in the + same scanline. Guarding on the vblank flag alone gave **40,900 NMIs across + 3,000 frames** and silently corrupted all game state, flattening coverage at 26%. +- **Input goes on joy1 = `$4016`** with a real latch/shift register. The poll + routine's `lda $4016,X` with X=1 lands on `$4017`, but only bits 0–1 are + compared, so driving `$4017` consumes nothing and changes no coverage. +- **Odd vector targets are not bugs.** Burger Time's `$FF7F` NMI and CIRCUS's + `$4CB7` IRQ point into unused space. That is common in this set — verify before + assuming a handler is broken. +- **Vectors are not in the iNES header.** They are the three little-endian words + at the *end* of the 16 KB PRG (`$FFFA–$FFFF` in the `$C000` mirror). Bytes 0–9 + of `rom.nes` carry only sizes, mirroring and mapper. The snippet to regenerate + the whole column is in the root `OVERVIEW.md`. +- **py65 is not a build dependency** and must be unpacked on demand: + `python3 -m pip download --no-deps -d py65 && unzip -q /py65-*.whl -d /py65lib`. + `/tmp` is volatile — a reboot wiped it once. Anything reusable belongs in `_tools/`. +- **ROM filenames contain spaces and parentheses.** `copilot/rom.nes` is a + relative symlink to a space-free name. Keep it working; don't rename it. +- **`.gitignore` lists `ROMS/*` but the directory is `_ROMS`**, so the pattern + matches nothing and ROM binaries stay tracked. Check before committing large blobs. + +## Repo conventions that must survive + +- Every instruction carries a trailing `; CPU:$xxxx PRG:xxxx AA BB` comment with + PRG offset and exact emitted bytes. **This is the byte-identity audit trail.** + Preserve it even while renaming labels or restructuring files. (Note: no project + actually uses this exact spelling — five variants are in use, and Excitebike + and Pac-Man have none. See item 3.) +- Unreached or unresolved bytes stay as `.byte`/`.word`/`.incbin` with ROM + provenance. Never delete or reformat them away. +- Two separate symbol files: `symbols.inc` = NES hardware constants only; + `locals.inc` = zero page and forward references. Unresolved zero-page bytes keep + neutral `ZpXX` names rather than speculative ones. +- Routine headers follow the template in `prg.s`: global + local description, + parameters, returns, clobbers. +- Three passes, in order, without shortcuts: **Pass 1** code/data split (stop for + review) → **Pass 2** label replacement → **Pass 3** data tables. Do not skip + straight to guessy rewrites. +- `make regen` (where it exists) must keep reproducing `prg.s` byte-for-byte on + the standard library alone. MUSCLE has this pipeline; re-check it after any + `nesdis.py` change. + +## Where the detail lives + +- Root `OVERVIEW.md` — inventory of all 36 projects, per-project detail, the Pass 1 + methodology note, and the audit-comment TODO with its full analysis. +- `/OVERVIEW.md` — per-project architecture and pass status. The most + detailed ones: `MUSCLE (U)` (Pass 3b/3c/3d), `Joypad Test Cartridge (U)`, + `_wip/Mario Bros (JU)`. +- `_tools/nesdis.py` — Pass 1 tracer (`--undocumented`, `--auto-seed`, + `--extra-seed`, `--table`, `--data`, `--probe`). +- `_tools/verify_pass1.py` — faithfulness + completeness check across all projects. +- `_tools/bytecode_dis.py`, `pass2.py`, `trace_stage_payload.py` — per-pass helpers. diff --git a/_tools/add_audit_comments.py b/_tools/add_audit_comments.py new file mode 100644 index 0000000..b133dec --- /dev/null +++ b/_tools/add_audit_comments.py @@ -0,0 +1,433 @@ +#!/usr/bin/env python3 +"""Add byte-identity audit comments to a project's prg.s. + +Why this exists +--------------- +Most projects in this repo carry a trailing audit comment on every +instruction, e.g. + + lda #$00 ; CPU:$C000 PRG:0000 A9 00 + +That comment is the byte-identity audit trail: it ties a source line back to +exact ROM bytes. Two projects lack it (Pac-Man has none at all, Excitebike has +it on only ~19% of code lines), so a source line in those files cannot be +mapped to ROM bytes without re-assembling. + +How it works +------------ +`ca65 -l` produces a listing with one entry per *emitted* source line: + + 000186r 1 A9 00 lda #$00 + ^offset ^n ^bytes ^source text (echoed verbatim) + +The listing has no source line numbers, but it does echo the source text, and +the entries appear in source order. So we recover the mapping by walking both +sequences and matching the echoed text, tolerating the lines ca65 skips. + +Byte *values* are read from prg.bin at the listing offset, never from the +listing itself: ca65 prints `rr rr` for relocatable words (e.g. `.word Label`) +because the value is only known at link time. The count `n` and the token count +of the byte column give the length; prg.bin gives the truth. + +Correctness +----------- +The script never edits instruction text, only appends a comment, so assembly is +unaffected. It then re-assembles and checks byte identity, and independently +verifies that every comment it wrote matches prg.bin at the offset it claims. +A disagreement is a hard error, not a warning. + +Usage +----- + python3 _tools/add_audit_comments.py "Excitebike (JU)" # apply + python3 _tools/add_audit_comments.py "Excitebike (JU)" --dry-run + python3 _tools/add_audit_comments.py "Excitebike (JU)" --force # re-comment +""" + +import argparse +import difflib +import os +import re +import shutil +import subprocess +import sys +import tempfile + +REPO = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + +# <6-hex offset>r +LISTING_RE = re.compile(r"^([0-9A-Fa-f]{6})r\s+(\d+)\s(.*)$") + +# The byte column: space separated 2-hex tokens or `rr` for relocatable, then +# two-or-more spaces before the echoed source text. +BYTECOL_RE = re.compile( + r"^\s*((?:[0-9A-Fa-f]{2}|rr)(?: (?:[0-9A-Fa-f]{2}|rr))*)?\s\s+(.*)$" +) + +# A line that already carries some spelling of audit comment. Several +# spellings are in use across the repo; all of them count as "already done". +HAS_AUDIT = re.compile(r";\s*(?:CPU:\$|PRG:|OFF:)|;\s*\$?[0-9A-Fa-f]{4}:\s") + +# A source line that emits bytes. +EMITS_RE = re.compile( + r"^(?:[a-z]{3}\b|\.(?:byte|word|dword|addr|res|incbin)\b|" + r"(?:[A-Za-z_][\w]*)\s*[:=]\s*\.(?:byte|word|res|incbin)\b|\w+\s*=|=)" +) + + +def run(cmd, cwd): + p = subprocess.run(cmd, cwd=cwd, capture_output=True, text=True) + if p.returncode != 0: + sys.stderr.write(f"$ {' '.join(cmd)}\n{p.stdout}{p.stderr}\n") + raise SystemExit(f"command failed: {' '.join(cmd)}") + return p.stdout + + +def load_equates(*paths): + """Map symbol name -> integer value from `NAME = $xx` lines.""" + eq = {} + rx = re.compile(r"^\s*([A-Za-z_@][\w.]*)\s*=\s*\$?([0-9A-Fa-f]+)\s*(?:;.*)?$") + for p in paths: + if not os.path.exists(p): + continue + with open(p, errors="replace") as fh: + for line in fh: + m = rx.match(line) + if m: + try: + eq[m.group(1)] = int(m.group(2), 16) + except ValueError: + pass + return eq + + +def instruction_length(mnem, operand, equates=None): + """Length in bytes of one 6502 instruction, from mnemonic + operand text. + + Used only by the .org fallback path, where the ca65 listing cannot be + trusted for offsets. Addressing-mode table, official opcodes only: the + projects this fallback targets do not use undocumented opcodes in the + regions it annotates. + """ + equates = equates or {} + op = operand.lstrip() + imm = op.startswith("#") + indirect = op.startswith("(") + core = op.strip() + if core.startswith("("): + core = core[1:] + bits = core.split(",") + indexed_x = bits[-1].strip().lower() == "x" if len(bits) > 1 else False + indexed_y = bits[-1].strip().lower() == "y" if len(bits) > 1 else False + core = bits[0].strip() + # "(ZpFA),y" -> the closing paren sits on the pointer field, not the end. + if core.endswith(")"): + core = core[:-1].strip() + + # A symbolic operand is zero page if its equate is < $100. Without the + # equate we cannot tell, so default to absolute (the 3-byte form), which + # is what an unresolved `ZpXX` name is in practice. + if re.fullmatch(r"[A-Za-z_@][\w.]*", core): + val = equates.get(core) + zp = val is not None and val < 0x100 + abs_ = not zp + else: + zp = re.fullmatch(r"\$[0-9A-Fa-f]{1,2}", core) is not None + abs_ = re.fullmatch(r"\$[0-9A-Fa-f]{3,4}", core) is not None + + table = { + # implied + "asl": 1, "lsr": 1, "rol": 1, "ror": 1, "bcc": 2, "bcs": 2, "beq": 2, + "bmi": 2, "bne": 2, "bpl": 2, "bvc": 2, "bvs": 2, "clc": 1, "cld": 1, + "cli": 1, "clv": 1, "dex": 1, "dey": 1, "inx": 1, "iny": 1, "nop": 1, + "pha": 1, "php": 1, "pla": 1, "plp": 1, "rti": 1, "rts": 1, "sec": 1, + "sed": 1, "sei": 1, "tax": 1, "tay": 1, "tsx": 1, "txa": 1, "txs": 1, + "tya": 1, + # accumulator / implied-by-A + "adc": None, "and": None, "cmp": None, "eor": None, "lda": None, + "ora": None, "sbc": None, "sta": None, + # branches + "jmp": None, "jsr": 3, + # stack + "ldx": None, "ldy": None, "stx": None, "sty": None, + } + if mnem in ("jmp",): + return 3 if not indirect else 5 + if mnem == "jsr": + return 3 + base = table.get(mnem, None) + if mnem in ("adc", "and", "cmp", "eor", "lda", "ora", "sbc", "sta"): + if imm: + return 2 + if indirect: + # (zp,x) is 2 bytes; (zp),y is 2; (abs),y is 6; (abs) is 5. + if indexed_x: + return 2 + if indexed_y: + return 6 if abs_ else 2 + return 6 if abs_ else 5 + if indexed_x or indexed_y: + return 2 if zp else 3 + return 2 if zp else 3 + if mnem in ("ldx", "ldy"): + if imm: + return 2 + if indexed_y if mnem == "ldx" else indexed_x: + return 2 if zp else 3 + if indexed_x or indexed_y: + return 2 if zp else 3 + return 2 if zp else 3 + if mnem in ("stx", "sty"): + if indexed_x or indexed_y: + return 2 if zp else 3 + return 2 if zp else 3 + return base if base else 2 + + +def offsets_from_labels(src_lines, lbl_path, base, cpu_base): + """Fallback for sources using `.org`, where ca65's listing offsets restart. + + The linker's .lbl file gives every label's exact address. We align labels to + their defining source line, then walk forward accumulating instruction + lengths to recover each emitting line's PRG offset. + """ + labels = {} + with open(lbl_path, errors="replace") as fh: + for line in fh: + parts = line.split() + if len(parts) >= 3 and parts[0] == "al": + addr = int(parts[1], 16) + name = parts[2].lstrip(".") + labels[name] = addr + + label_re = re.compile(r"^([A-Za-z_@][\w.]*)\s*:") + mapping = {} + unresolved = [] + for i, raw in enumerate(src_lines): + s = raw.strip() + if not s or s.startswith(";"): + continue + m = label_re.match(s) + if not m: + continue + name = m.group(1) + if name.startswith("@"): + continue # cheap local labels are not exported to the .lbl file + if name in labels: + mapping[i] = labels[name] - cpu_base + else: + unresolved.append(name) + return mapping, unresolved + + +def propagate_offsets(src_lines, anchors, equates=None): + """Fill in PRG offsets for emitting lines between known label anchors. + + `anchors` maps source line index -> PRG offset for label definitions. We + walk forward from each anchor, adding the length of every emitting line, + until the next anchor. Data directives (.byte/.word/.res) are counted too. + """ + data_re = re.compile(r"^\.(?:byte|word|dword|addr|res|incbin)\b") + mnem_re = re.compile(r"^([a-z]{3})\b\s*(.*)$") + lengths = {} + idxs = sorted(anchors) + for n, start in enumerate(idxs): + off = anchors[start] + i = start + 1 + stop = idxs[n + 1] if n + 1 < len(idxs) else len(src_lines) + while i < stop: + s = src_lines[i].strip() + if not s or s.startswith(";"): + i += 1 + continue + if data_re.match(s): + parts = s.split(None, 1) + d = parts[0].lower() + if d == ".byte": + nbytes = len([x for x in parts[1].split(",") if x.strip()]) if len(parts) > 1 else 0 + elif d in (".word", ".addr"): + nbytes = 2 * (len([x for x in parts[1].split(",") if x.strip()]) if len(parts) > 1 else 0) + elif d == ".res": + mm = re.search(r"\$?([0-9A-Fa-f]+)", parts[1]) if len(parts) > 1 else None + nbytes = int(mm.group(1), 16) if mm else 0 + else: # .incbin + nbytes = 0 + anchors[i] = off + lengths[i] = nbytes + off += nbytes + i += 1 + continue + mm = mnem_re.match(s) + if mm and not s.endswith("=") and ":" not in s.split()[0]: + nbytes = instruction_length(mm.group(1), mm.group(2), equates) + anchors[i] = off + lengths[i] = nbytes + off += nbytes + i += 1 + return lengths + + +def parse_listing(path): + """Return [(prg_offset, n_tokens_or_None, echoed_text)] in listing order.""" + recs = [] + with open(path, errors="replace") as fh: + for line in fh: + m = LISTING_RE.match(line.rstrip("\n")) + if not m: + continue + rest = m.group(3) + bm = BYTECOL_RE.match(rest) + if bm and bm.group(1): + tokens = bm.group(1).split() + text = bm.group(2).rstrip() + recs.append((int(m.group(1), 16), len(tokens), text)) + else: + # No byte column: a comment, equate, directive or label. The + # echoed text is whatever follows the count. + recs.append((int(m.group(1), 16), None, rest.rstrip())) + return recs + + +def align(src_lines, recs): + """Map source line index -> (prg_offset, nbytes) using echoed text. + + ca65 skips some source lines (blank lines, continuation lines, macro + expansions) and emits entries for others only once, so this has to be a + real sequence alignment rather than a lockstep zip. We use difflib's + opcodes: the listing and the source should otherwise be identical, so the + few genuine insertions/deletions are cheap to find and everything else + lines up exactly. + + Returns (mapping, n_unmatched). + """ + src_norm = [l.strip() for l in src_lines] + rec_norm = [t.strip() for _, _, t in recs] + + matcher = difflib.SequenceMatcher(a=src_norm, b=rec_norm, autojunk=False) + mapping = {} + unmatched = 0 + for tag, i1, i2, j1, j2 in matcher.get_opcodes(): + if tag == "equal": + for k in range(i2 - i1): + mapping[i1 + k] = (recs[j1 + k][0], recs[j1 + k][1]) + else: + # 'replace' can still line up when the two sequences are the same + # length but differ in text; 'delete'/'insert' do not. + if tag == "replace" and (i2 - i1) == (j2 - j1): + for k in range(i2 - i1): + mapping[i1 + k] = (recs[j1 + k][0], recs[j1 + k][1]) + else: + unmatched += (j2 - j1) + return mapping, unmatched + + +def audit_comment(prg, off, nbytes, base, cpu_base): + """Build `; CPU:$xxxx PRG:xxxx AA BB` from prg.bin, or None.""" + if nbytes is None or nbytes == 0: + return None + if off + nbytes > len(prg): + return None + vals = prg[off:off + nbytes] + hexs = " ".join(f"{b:02X}" for b in vals) + return f"; CPU:${cpu_base + off:04X} PRG:{off:04X} {hexs}" + + +def main(): + ap = argparse.ArgumentParser() + ap.add_argument("project") + ap.add_argument("--dry-run", action="store_true") + ap.add_argument("--force", action="store_true", + help="re-comment lines that already have an audit comment") + ap.add_argument("--prg-name", default="prg.bin") + ap.add_argument("--base", default="0xC000", + help="CPU address corresponding to PRG offset 0") + args = ap.parse_args() + + cpu_base = int(args.base, 0) + copilot = os.path.join(REPO, args.project, "copilot") + if not os.path.isdir(copilot): + raise SystemExit(f"no such project dir: {copilot}") + + prg_path = os.path.join(copilot, args.prg_name) + src_path = os.path.join(copilot, "prg.s") + prg = open(prg_path, "rb").read() + src_lines = open(src_path, errors="replace").read().splitlines() + equates = load_equates( + os.path.join(copilot, "symbols.inc"), + os.path.join(copilot, "locals.inc"), + src_path, + ) + + with tempfile.TemporaryDirectory() as td: + # ca65 uses the -l name verbatim (no .lst suffix appended). + lst = os.path.join(td, "listing") + run(["ca65", "-g", "-l", lst, "-o", os.path.join(td, "prg.o"), "prg.s"], copilot) + # Parse inside the context: the listing is deleted on exit. + recs = parse_listing(lst) + + mapping, unmatched = align(src_lines, recs) + + # A source using `.org` makes ca65's listing offsets restart at zero, so + # the listing carries no usable addresses. Detect that and fall back to + # deriving offsets from the linker's label file. + if recs and max((r[0] for r in recs), default=0) < 0x100 and len(mapping) > 0: + with tempfile.TemporaryDirectory() as td: + run(["ld65", "-C", "linker.cfg", "-m", os.path.join(td, "m.map"), + "-Ln", os.path.join(td, "m.lbl"), "-o", os.path.join(td, "out.nes"), + *sorted(f for f in os.listdir(copilot) + if f.endswith(".o") and f != "reconstructed.o")], copilot) + lbl = os.path.join(td, "m.lbl") + if os.path.exists(lbl): + print("note: source uses `.org`; deriving offsets from label file") + anchors, unresolved = offsets_from_labels(src_lines, lbl, 0, cpu_base) + unmatched = len(unresolved) + lengths = propagate_offsets(src_lines, anchors, equates) + mapping = {i: (anchors[i], lengths.get(i)) for i in anchors} + + out = list(src_lines) + added = skipped = failed = 0 + for idx, (off, nbytes) in mapping.items(): + line = src_lines[idx] + s = line.strip() + if not s or s.startswith(";"): + continue + if not EMITS_RE.match(s): + continue + if not args.force and HAS_AUDIT.search(line): + skipped += 1 + continue + cmt = audit_comment(prg, off, nbytes, cpu_base, cpu_base) + if cmt is None: + continue + out[idx] = line.rstrip() + (" " if line.strip() else " ") + cmt + added += 1 + + # Verify every comment we are about to write against prg.bin. + bad = 0 + for line in out: + m = re.search(r";\s*CPU:\$([0-9A-F]{4})\s+PRG:([0-9A-F]{4})\s+((?:[0-9A-F]{2} ?)+)$", line) + if not m: + continue + off = int(m.group(2), 16) + vals = bytes(int(x, 16) for x in m.group(3).split()) + if prg[off:off + len(vals)] != vals: + bad += 1 + if bad <= 5: + sys.stderr.write(f"BYTE MISMATCH PRG {off:04X}: comment {m.group(3)} " + f"vs prg.bin {prg[off:off+len(vals)].hex(' ').upper()}\n") + if bad: + raise SystemExit(f"{bad} comments disagree with {args.prg_name}; refusing to write") + + print(f"{args.project}: {added} comments added, {skipped} already present, " + f"{unmatched} listing entries unmatched") + + if args.dry_run: + return + + shutil.copyfile(src_path, src_path + ".preaudit") + with open(src_path, "w") as fh: + fh.write("\n".join(out) + "\n") + print(f"wrote {src_path} (backup at {src_path}.preaudit)") + + +if __name__ == "__main__": + main() diff --git a/_tools/bytecode_dis.py b/_tools/bytecode_dis.py new file mode 100644 index 0000000..0872563 --- /dev/null +++ b/_tools/bytecode_dis.py @@ -0,0 +1,215 @@ +#!/usr/bin/env python3 +""" +MUSCLE (U) bytecode-VM disassembly generator. + +Emits a decoded listing for every BytecodeProgram / StandaloneBytecodeProgram and +patches prg.s so each program carries a readable token-by-token listing above its +unchanged .byte data. No byte is altered: the .byte lines are copied verbatim and +only comment lines are inserted. + +Encoding (derived from RunBytecodeInterpreter $9AE8 and BytecodeHandlerTable $9237): + * byte in $C8..$EF -> opcode, handler = table[byte - $C8] + * any other byte -> literal operand, pushed to $0033[Y] and accumulated in $003C[Y] + * opcodes $CB $D1 $D7 $E1 additionally consume the NEXT stream byte inline + (their handlers execute `lda ($1A),Y / iny`) +""" +import sys, re + +ROM = open(sys.argv[1], 'rb').read() +PRG_S = sys.argv[2] +BASE = 0x8000 + +PROG_TABLE = 0x8CEF +HANDLER_TABLE = 0x9237 +INTERP = 0x9AE8 + +HANDLERS = [] +for i in range(40): + o = HANDLER_TABLE - BASE + i * 2 + HANDLERS.append(ROM[o] | (ROM[o + 1] << 8)) + +TABLE = [] +for i in range(38): + o = PROG_TABLE - BASE + i * 2 + TABLE.append(ROM[o] | (ROM[o + 1] << 8)) + +# opcodes that consume one inline stream byte (verified against handler entry points) +INLINE = {0xCB, 0xD1, 0xD7, 0xE1} + +# mnemonic + role, read off each handler's own straight-line path +# (up to its first `jmp $9AE8` / `jmp $9B25`). Confidence is called out where a +# handler simply tail-calls a game routine. +OPS = { + 0xC8: ('VM_CALL_82E1', 'tail-calls the game routine at $82E1'), + 0xC9: ('LOOP_END', 'decrements the $7C loop counter; if still non-zero rewinds the ' + 'stream pointer from $7E, re-running the loop body'), + 0xCA: ('VM_CALL_8765', 'tail-calls the game routine at $8765'), + 0xCB: ('LOOP_BEGIN', 'reads the inline iteration count, stores it in $7C and the ' + 'body address in $7E'), + 0xCC: ('SET_STEP_12', 'sets the step byte $4B to $12'), + 0xCD: ('ACC_ADD_1_STEP', 'SaveStreamPos; adds 1 to the accumulator via $9653, then ' + 'folds the step byte into $0033[Y]'), + 0xCE: ('WAIT_FRAME_SLOT', 'advance-two-frames path: $4F-=1, $A4FF, default $F0=$80, ' + 'and kick a $D1=$FF sound sequence'), + 0xCF: ('SUB_TEN', '$4F-=10 and $F0=$D0'), + 0xD0: ('RESET_ACCUM', 'clears $F0 and zeroes the low operand bytes $0033[Y]/$0034[Y], ' + 'then starts the next actor'), + 0xD1: ('SET_RATE', 'stores the inline byte into $43 as this actor\'s rate'), + 0xD2: ('MOVE_DIAG', 'position update: $4F+=2, $9A3F, a $A660 helper call and two ' + '$9A2E operand pushes'), + 0xD3: ('MOVE_OTHER', 'position update variant: two $9A24/$9A2E pushes and an $A660 ' + 'helper call'), + 0xD4: ('SET_STEP_2', 'SaveStreamPos, step byte $4B:=2 and add 1 to the accumulator'), + 0xD5: ('STEP_ACCUM', 'subtracts $4B>>1 from the accumulator with $FD/$06 saturation ' + 'clamping'), + 0xD6: ('TICK_STEP', 'step countdown: on reaching zero sets $0321=$FF'), + 0xD7: ('DRAW_SPRITE', 'uses the inline byte as a count for the $A660 sprite/blit helper'), + 0xD8: ('ANIMATE_CHECK', 'animation-frame test via $97FC/$A4DF, then a $99E2 call'), + 0xD9: ('ANIMATE_ADVANCE', 'animation-frame advance: $4F+=2, $5A:=$FF, $A660 call'), + 0xDA: ('SET_DIRECTION', 'sets the $5C direction flag from bit 0 of $24'), + 0xDB: ('PLAY_SEQ_BD20', 'runs sound sequence $BD20 through the $99E4 dispatcher'), + 0xDC: ('TIMER_FF', 'decrements the $60 timer; on zero jumps to $94CF, otherwise adds ' + '$FF (-1) to the accumulator'), + 0xDD: ('TIMER_01', 'decrements the $60 timer; clears $62 and adds 1 to the accumulator'), + 0xDE: ('MOVE_ACTOR_B0BA', 'accumulator-indexed $A660 move plus a $99E4 call with ' + 'descriptor $B0BA'), + 0xDF: ('MOVE_ACTOR_DIR', 'direction-dependent position update over $F6/$F7'), + 0xE0: ('SET_FLAG_FF', 'stores $FF into $82'), + 0xE1: ('SET_WAIT', 'stores the inline byte into $7A as this actor\'s wait/step count'), + 0xE2: ('COND_FA', 'tests the $5A state register and the $4E flag before branching ' + 'through $96C8'), + 0xE3: ('COND_FB', 'the $FB half of the $96C8 condition test'), + 0xE4: ('ACCUM_PLUS_6', 'SaveStreamPos and adds 6 to the accumulator $3A[Y]'), + 0xE5: ('TICK_WAIT_STEP', 'decrements the $7A wait counter; runs the body while ' + 'non-zero'), + 0xE6: ('MOVE_ACTOR_ALT', 'alternate position update: $9585 test, $9A3F and two ' + 'operand pushes'), + 0xE7: ('SWAP_OPERANDS', 'exchanges the $39[Y]/$3A[Y] operand pair around the $A4FF ' + 'and $A4F2 helpers'), + 0xE8: ('STEP_DOWN', 'SaveStreamPos, $9732, step $4B:=2 and accumulate'), + 0xE9: ('STEP_DOWN_COND', 'as $E8 but gated on the $5A state sign bit'), + 0xEA: ('SET_ACTIVE_80', 'sets $F0 to $80 and falls into the $94CF accumulator clear'), + 0xEB: ('CLEAR_ACTIVE', 'clears $F0 when it currently holds $80'), + 0xEC: ('ADD_STEP_ACCUM', 'adds the step byte into $0033[Y], steps $3A[Y] down and ' + 'accumulates'), + 0xED: ('SUB_STEP_ACCUM', 'adds 1 to $3A[Y] and subtracts the step from $0033[Y]'), + 0xEE: ('ROT_STEP_ADD', 'rotates the step byte, adds it into $0033[Y], steps $3A[Y] ' + 'up by 2 and accumulates'), + 0xEF: ('ROT_STEP_SUB', 'rotates the step byte, complements it, subtracts from ' + '$0033[Y], and calls $82ED'), +} + +LIT_NOTE = { + 0xB8: 'VRAM run fill selector (VramRunFillValues[0..11] span $B8-$C3)', +} + + +def rd(off): + """Read one PRG byte by 16-bit PRG offset.""" + return ROM[off] + + +def cpu(off): + return BASE + off + + +def decode(a, b): + """Yield (addr, opcode_or_None, operand_or_None, raw_bytes).""" + x = a + while x < b: + v = rd(x) + if 0xC8 <= v <= 0xEF: + if v in INLINE and x + 1 < b: + yield (x, v, rd(x + 1), 2) + x += 2 + continue + yield (x, v, None, 1) + x += 1 + else: + yield (x, None, None, 1) + x += 1 + + +def listing(a, b, indent=' '): + out = [] + cur = None + nops = nlit = 0 + for addr, op, arg, ln in decode(a, b): + if op is not None: + nops += 1 + name, role = OPS[op] + if arg is not None: + txt = f'{name} ${arg:02X}' + else: + txt = name + body = f'${cpu(addr):04X} {txt:<28} -- {role}' + else: + nlit += 1 + v = rd(addr) + note = LIT_NOTE.get(v, '') + body = f'${cpu(addr):04X} .byte ${v:02X}' + (f' -- {note}' if note else '') + out.append(indent + '; ' + body) + return out, nops, nlit + + +def main(): + lines = open(PRG_S).read().split('\n') + uniq = sorted(set(TABLE)) + stats = {} + out = [] + i = 0 + N = len(lines) + LAB = re.compile(r'^(BytecodeProgram_[0-9A-F]{2}|StandaloneBytecodeProgram(?:_[0-9])?):\s*$') + DEC = re.compile(r'^\s*\.byte\s+\$([0-9A-F]{2})') + while i < N: + ln = lines[i] + m = LAB.match(ln) + if not m: + out.append(ln) + i += 1 + continue + label = m.group(1) + # collect the contiguous .byte run belonging to this program + j = i + 1 + body = [] + while j < N and DEC.match(lines[j]): + for t in lines[j].split(';')[0].split(','): + t = t.strip() + if t.lower().startswith('.byte'): + t = t[5:] + t = t.strip().replace('$', '') + if t: + body.append(int(t, 16)) + j += 1 + # program start = PRG offset from the first data line's annotation + m2 = re.search(r'PRG:([0-9A-F]{4})', lines[i + 1]) + a = int(m2.group(1), 16) + b = a + len(body) + dec, nops, nlit = listing(a, b) + idx = [k for k, t in enumerate(TABLE) if t == a] + hdr = [f'; --- bytecode listing: {len(body)} bytes, {nops} opcodes, ' + f'{nlit} literal operands ---'] + if idx: + hdr.append(f'; reached by BytecodeProgramPointerTable entry/entries {idx}') + hdr.append(f'; handler for each opcode: BytecodeHandlerTable at $9237 ' + f'(token - $C8); interpreter RunBytecodeInterpreter at $9AE8') + if nops == 0: + hdr.append('; NOTE: this program contains no byte in $C8-$EF, so the') + hdr.append('; interpreter takes the literal path for every byte and the') + hdr.append('; whole block is operand data, not an instruction stream.') + out.append(ln) + out.extend(hdr) + out.extend(dec) + stats[label] = (nops, nlit) + out.extend(lines[i + 1:j]) + i = j + open(PRG_S, 'w').write('\n'.join(out)) + to = sum(v[0] for v in stats.values()) + tl = sum(v[1] for v in stats.values()) + print(f'decoded {len(stats)} programs: {to} opcodes, {tl} literal operands') + for k in sorted(stats): + print(f' {k:<28} ops={stats[k][0]:>3} lits={stats[k][1]:>3}') + + +if __name__ == '__main__': + main() \ No newline at end of file diff --git a/_tools/nesdis.py b/_tools/nesdis.py index 5403d6c..91e6abf 100644 --- a/_tools/nesdis.py +++ b/_tools/nesdis.py @@ -66,9 +66,94 @@ OPCODES = { MODE_LEN = {IMP: 1, ACC: 1, IMM: 2, ZP: 2, ZPX: 2, ZPY: 2, REL: 2, ABS: 3, ABSX: 3, ABSY: 3, IND: 3, INDX: 2, INDY: 2} +# --------------------------------------------------------------------------- +# Undocumented NMOS opcodes. +# +# Real 6502 code uses these as multi-byte NOP padding and as genuine +# read-modify-write / accumulator ops, so a tracer that only knows the 151 +# official opcodes halts the moment it steps on one. Wild Gunman and the Joypad +# Test Cartridge both stop this way. +# +# OFF by default (`--undocumented` turns it on) so that projects whose prg.s is +# already regen-stable keep reproducing byte-for-byte. +# --------------------------------------------------------------------------- + +UNDOC_OPCODES = { + # NOP padding, implied (1 byte) + 0x1A: ("nop", IMP), 0x3A: ("nop", IMP), 0x5A: ("nop", IMP), + 0x7A: ("nop", IMP), 0xDA: ("nop", IMP), 0xFA: ("nop", IMP), + # NOP padding, immediate (2 bytes) + 0x42: ("nop", IMM), 0x80: ("nop", IMM), 0x82: ("nop", IMM), 0x89: ("nop", IMM), + 0xC2: ("nop", IMM), 0xE2: ("nop", IMM), + # NOP padding, zero page (2 bytes) + 0x04: ("nop", ZP), 0x44: ("nop", ZP), 0x64: ("nop", ZP), + # NOP padding, zero page,X (2 bytes) + 0x14: ("nop", ZPX), 0x34: ("nop", ZPX), 0x54: ("nop", ZPX), + 0x74: ("nop", ZPX), 0xD4: ("nop", ZPX), 0xF4: ("nop", ZPX), + # NOP padding, absolute (3 bytes) + 0x0C: ("nop", ABS), + # NOP padding, absolute,X (3 bytes) + 0x1C: ("nop", ABSX), 0x3C: ("nop", ABSX), 0x5C: ("nop", ABSX), + 0x7C: ("nop", ABSX), 0xDC: ("nop", ABSX), 0xFC: ("nop", ABSX), + 0xFA: ("nop", ABSX), + + # SLO = ASL + ORA + 0x03: ("slo", INDX), 0x07: ("slo", ZP), 0x0F: ("slo", ABS), + 0x13: ("slo", INDY), 0x17: ("slo", ZPY), 0x1B: ("slo", ABSY), + 0x1F: ("slo", ABSX), + # RLA = ROL + AND + 0x23: ("rla", INDX), 0x27: ("rla", ZP), 0x2F: ("rla", ABS), + 0x33: ("rla", INDY), 0x37: ("rla", ZPY), 0x3B: ("rla", ABSY), + 0x3F: ("rla", ABSX), + # SRE = LSR + EOR + 0x43: ("sre", INDX), 0x47: ("sre", ZP), 0x4F: ("sre", ABS), + 0x53: ("sre", INDY), 0x57: ("sre", ZPY), 0x5B: ("sre", ABSY), + 0x5F: ("sre", ABSX), + # RRA = ROR + ADC + 0x63: ("rra", INDX), 0x67: ("rra", ZP), 0x6F: ("rra", ABS), + 0x72: ("rra", ABS), 0x73: ("rra", INDY), 0x77: ("rra", ZPY), 0x7B: ("rra", ABSY), + 0x7F: ("rra", ABSX), + # SAX = store A & X + 0x83: ("sax", INDX), 0x87: ("sax", ZP), 0x8F: ("sax", ABS), + 0x97: ("sax", ZPY), + # LAX = load A and X + 0xA3: ("lax", INDX), 0xA7: ("lax", ZP), 0xAB: ("lax", IMM), + 0xAF: ("lax", ABS), 0xB3: ("lax", INDY), 0xB7: ("lax", ZPY), + 0xBF: ("lax", ABSY), + # DCP = DEC then CMP + 0xC3: ("dcp", INDX), 0xC7: ("dcp", ZP), 0xCF: ("dcp", ABS), + 0xD3: ("dcp", INDY), 0xD7: ("dcp", ZPY), 0xDB: ("dcp", ABSY), + 0xDF: ("dcp", ABSX), + # ISC = INC then SBC + 0xE3: ("isc", INDX), 0xE7: ("isc", ZP), 0xEF: ("isc", ABS), + 0xF3: ("isc", INDY), 0xF7: ("isc", ZPY), 0xFB: ("isc", ABSY), + 0xFF: ("isc", ABSX), + # Unstable/shift-combination opcodes + 0x0B: ("anc", IMM), 0x2B: ("anc", IMM), 0x4B: ("alr", IMM), + 0x6B: ("arr", IMM), 0x8B: ("xaa", IMM), 0xAB: ("lax", IMM), + 0xCB: ("axs", IMM), 0xEB: ("sbc", IMM), 0xBB: ("las", ABSY), + 0x93: ("sha", INDY), 0x9F: ("sha", ABSY), 0x9B: ("tas", ABSY), +} + +_TABLE = [OPCODES] + + +def set_undocumented(on): + """Enable/disable the undocumented opcode table. Default: off.""" + _TABLE[0] = ({**OPCODES, **UNDOC_OPCODES} if on else OPCODES) + # Instructions after which control never falls through. TERMINATORS = {"jmp", "rts", "rti", "brk"} +# Mnemonics ca65 cannot encode. V2.19 implements none of the undocumented +# opcodes, so these must be emitted as explicit `.byte` values instead. +CA65_UNSUPPORTED = { + "slo", "rla", "sre", "rra", "sax", "lax", "dcp", "isc", + "anc", "alr", "arr", "axs", "xaa", "las", "tas", "sha", "shx", "shy", +} +# `nop` is officially supported (0xEA) but not with an operand. +CA65_UNSUPPORTED_MODE = {"nop"} + BRANCHES = {"bpl", "bmi", "bvc", "bvs", "bcc", "bcs", "bne", "beq"} @@ -94,7 +179,7 @@ def render(prg, base, opcode, pc): """Decode one instruction at pc. Returns an Insn or None when illegal.""" if pc >= len(prg): return None - entry = OPCODES.get(prg[pc]) + entry = _TABLE[0].get(prg[pc]) if entry is None: return None mnemonic, mode = entry @@ -122,13 +207,16 @@ def render(prg, base, opcode, pc): elif mode == ZPY: insn.text = f"Zp{b1:02X},y" elif mode == ABS: - insn.text = hex16(b1 | (b2 << 8)) + insn.text = f"{'a:' if b2 == 0 else ''}{hex16(b1 | (b2 << 8))}" elif mode == ABSX: - insn.text = f"{hex16(b1 | (b2 << 8))},x" + # ca65 silently rewrites `,x` on a $00xx operand as zero page,X, which + # emits a different opcode. The `a:` prefix forces the absolute,X form + # so the bytes match the ROM. + insn.text = f"{'a:' if b2 == 0 else ''}{hex16(b1 | (b2 << 8))},x" elif mode == ABSY: - insn.text = f"{hex16(b1 | (b2 << 8))},y" + insn.text = f"{'a:' if b2 == 0 else ''}{hex16(b1 | (b2 << 8))},y" elif mode == IND: - insn.text = f"({hex16(b1 | (b2 << 8))})" + insn.text = f"({'a:' if b2 == 0 else ''}{hex16(b1 | (b2 << 8))})" elif mode == INDX: insn.text = f"(Zp{b1:02X},x)" elif mode == INDY: @@ -261,7 +349,8 @@ def operand_value(insn): """Absolute address of an ABS/ABSX/ABSY/IND operand, or None.""" if insn.mode not in (ABS, ABSX, ABSY, IND): return None - token = insn.text.strip("()").split(",")[0].lstrip("$") + token = insn.text.strip("()").split(",")[0] + token = token.removeprefix("a:").lstrip("$") # ca65 absolute-forcing prefix return int(token, 16) @@ -444,9 +533,38 @@ def emit_code(prg, base, insns, targets, out, project, semantic, refs=None): for addr, name in semantic.items(): name_of[addr] = name + # A branch target must win over fall-through. If some instruction's operand + # spans an address that another path branches to, the spanning decode is the + # wrong one: real assemblers would never branch into the middle of an + # instruction. Drop the span and keep the target. Its bytes fall out as data, + # so byte accounting is unaffected. + tstart = {t - base for t in targets if (t - base) in insns} + changed = True + while changed: + changed = False + for k in sorted(insns): + if k in tstart: + continue + span = insns[k].length + if any(j in tstart for j in range(k + 1, k + span)): + del insns[k] + changed = True + break + + # A branch target that still falls strictly inside a surviving instruction + # can never be emitted: the linear walk consumes those bytes as an operand, + # so the label would be referenced but never defined and the file would not + # assemble. Prune those targets up front. + valid_starts = set(insns) + for k, ins in insns.items(): + for j in range(k + 1, k + ins.length): + valid_starts.discard(j) + targets = {t for t in targets if (t - base) in valid_starts} + i = 0 routine_header = [ "; -----------------------------------------------------------------------------", + "; Routine: {name}", "; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage.", "; Local: Continues its parent routine along the condition or operation encoded in this label,", @@ -468,9 +586,28 @@ def emit_code(prg, base, insns, targets, out, project, semantic, refs=None): out.append(line.format(name=name)) out.append(f"{name}:") text = f"{insn.mnemonic} {insn.text}".strip() + if insn.mode == REL and insn.target is not None: + # render() stamps every branch as Label_XXXX; prefer the semantic + # name so a branch into a vector entry (or any named routine) + # references the label that is actually emitted here. + text = f"{insn.mnemonic} " + ( + name_of.get(insn.target) or f"Label_{insn.target:04X}") raw = " ".join(f"{b:02X}" for b in prg[i:i + insn.length]) - line = f" {text}" - out.append(f"{line:<31}; CPU:${cpu:04X} PRG:{i:04X} {raw}") + # `nop` is only a problem in its multi-byte padding forms; the + # official 0xEA implied NOP encodes fine. + unencodable = (insn.mnemonic in CA65_UNSUPPORTED + or (insn.mnemonic in CA65_UNSUPPORTED_MODE + and insn.mode != IMP)) + if unencodable: + # ca65 (V2.19) implements no undocumented opcodes, so these cannot be + # written as mnemonics. Keep them in the code region as explicit bytes + # and record the full disassembly in the comment, so the code/data + # split stays correct and the bytes stay auditable. + line = f" .byte {byte_columns(prg[i:i + insn.length])}" + out.append(f"{line:<31}; CPU:${cpu:04X} PRG:{i:04X} {raw}" + f" -- {text} (undocumented; ca65 cannot encode)") + else: + out.append(f" {text:<31}; CPU:${cpu:04X} PRG:{i:04X} {raw}") i += insn.length continue @@ -525,7 +662,13 @@ def main(): "static fall-through reached it (branch-over-data)") ap.add_argument("--probe", default="", help="comma list of CPU addresses to decode linearly for inspection") + ap.add_argument("--undocumented", action="store_true", + help="also decode the 105 undocumented NMOS opcodes (NOP padding, " + "SLO/RLA/SRE/RRA/SAX/LAX/DCP/ISC and friends). Games use these as " + "padding, and a tracer that halts on them loses most of the code. " + "Default off so existing regen pipelines stay byte-stable.") args = ap.parse_args() + set_undocumented(args.undocumented) base = int(args.base, 16) prg = Path(args.prg).read_bytes() @@ -577,9 +720,11 @@ def main(): invalid = [a for a in invalid if not any(a0 <= a < a0 + n for a0, n in forced)] semantic = OrderedDict() - semantic[rst] = "Reset" - semantic[nmi] = "NmiHandler" - semantic[irq] = "IrqHandler" + # Priority order matters: RESET and IRQ are commonly the same address, and + # overwriting would rename the primary entry point to `IrqHandler`. + semantic.setdefault(rst, "Reset") + semantic.setdefault(nmi, "NmiHandler") + semantic.setdefault(irq, "IrqHandler") regions = scan_orphans(prg, base, insns, 1) refs = build_refs(prg, base, insns, regions) diff --git a/_tools/trace_stage_payload.py b/_tools/trace_stage_payload.py new file mode 100644 index 0000000..cc2630a --- /dev/null +++ b/_tools/trace_stage_payload.py @@ -0,0 +1,280 @@ +#!/usr/bin/env python3 +""" +MUSCLE (U) stage-payload read tracer (py65 + minimal cycle-driven NES hardware). + +The earlier instruction-counted frame cadence was wrong: the main loop polls +$2002 for vblank and the NMI handler fires at the same scanline, so both have to +come off the same clock. This drives a real scanline counter off py65's +processorCycles. + + * $2002 - vblank asserted at scanline 241, cleared on read + * NMI - fired once per frame at scanline 241 (NmiHandler $86CB) + * $4014 - 256-byte OAM DMA + * $2006/$2005/$2007 - enough address-latch behaviour for the code to run + * $4016 - joy1, real latch/shift register (see NMI BUG below) + * $4017 - expansion port, reads back 0 + +Every read of $B0FB-$BEBF is logged as (PC, address, value) plus the bytecode +token in flight. + +NMI BUG (fixed here; worth knowing if you re-derive this) +--------------------------------------------------------- +The vblank flag must be cleared once per frame, NOT merely on a read of $2002. +The main loop polls $2002 (`MainGameLoop_OnZero_8226` spins on the bytecode VM +flag $0321), and every such read clears bit 7 -- which re-arms NMI within the +same scanline. Guarding only on `not st['vblank']` produced 40,900 NMIs across +3,000 frames and silently corrupted all game state, flattening coverage at 26%. +A separate per-frame `nmi_fired` flag restores exactly one NMI per frame. + +CONTROLLER +---------- +Input goes on joy1 = $4016 with a real latch/shift register. The poll routine +at $AA69 is `ldx #$01 / stx $4016 / dex / stx $4016 / ldy #$08 / lda $4016,X`, +so the *observed* reads are of $4017 (X=1) and only bits 0-1 are compared -- +but driving $4017 consumes nothing and changes no coverage. $4016 is the pad +the game actually consumes; A,B,Select,Start,Up,Down,Left,Right come out LSB +first. START visibly matters: 47.7% coverage vs 39.0% for other masks. + +Reaching the match: two discrete START presses -- title -> character select, +character select -> match. Rapid re-tapping does not work. + +CAVEATS +------- +* py65 advances PC past the opcode byte before the operand/effective address is + fetched, so a read logged at PC=$AC83 actually comes from the instruction at + $AC82 (`lda ($10),Y`). Reader PCs are therefore 1-2 bytes above the real + instruction; subtract to find it. +* This is a deliberately partial NES: no PPU rendering, no APU. It is enough + to boot, reach the bytecode VM, drive the stage data and enter a match, but + it is not a substitute for FCEUX when visual/sound behaviour matters. +* py65 is NOT a build dependency. It is unpacked on demand: + python3 -m pip download --no-deps -d py65 + unzip -q /py65-*.whl -d /py65lib + PYTHONPATH=/py65lib python3 _tools/trace_stage_payload.py + +Usage: trace_stage_payload.py [frames] [seq] + + seq optional button script "mask@frame,mask@frame,...". mask is the joy1 + bitmask held for 3 frames: 0x01 A, 0x02 B, 0x04 Select, 0x08 Start, + 0x10 Up, 0x20 Down, 0x40 Left, 0x80 Right. + The two-START match entry is "0x08@30,0x08@400". +""" +import sys, os +sys.path.insert(0, os.environ.get( + 'PY65LIB', '/tmp/opencode/py65lib')) +from py65.devices.mpu6502 import MPU +from py65.memory import ObservableMemory + +PRG = open(sys.argv[1], 'rb').read() +FRAMES = int(sys.argv[2]) if len(sys.argv) > 2 else 600 +SEQ = [] +if len(sys.argv) > 3 and sys.argv[3] != '-': + for part in sys.argv[3].split(','): + m, f = part.split('@') + SEQ.append((int(f), int(m, 0))) + SEQ.sort() +TAP_RUN = 3 + +DOT = 341 +SLINES = 262 +VBLANK_LINE = 241 +FRAME_CYCLES = DOT * SLINES +NMI_CYCLE = VBLANK_LINE * DOT + 1 + +BASE, MIRROR = 0x8000, 0xC000 +PP_LO, PP_HI = 0xB0FB, 0xBEBF +INTERP = 0x9AE8 +ZP_PTR_LO, ZP_PTR_HI, ZP_ACT = 0x1A, 0x1B, 0x1E + +mem = ObservableMemory(addrWidth=16) +sub = mem._subject +cpu = MPU(memory=mem) +cpu.addcycles = True +mem[BASE:BASE + len(PRG)] = PRG +mem[MIRROR:MIRROR + len(PRG)] = PRG + +nmi_vec = mem[0xFFFA] | (mem[0xFFFB] << 8) +reset_vec = mem[0xFFFC] | (mem[0xFFFD] << 8) + +st = {'vblank': False, 'nmi_fired': False, 'vt': 0, 'addr': 0, 't': 0, + 'x': 0, 'w': 0, 'buf': 0, 'tok': None, 'tokpc': None, 'nreads': 0, + 'dma': 0, 'nmis': 0, 'frame': 0, 'strobe': 0, 'shift': 0, + 'shift_in': 0, 'r4016': 0, 'r4017': 0, 'w4016': 0} +log, HITS = [], {} +touched = set() + + +def rd_ppu_status(a): + v = 0x80 if st['vblank'] else 0x00 + st['vblank'] = False + return v + + +def wr_ppu_ctrl(a, v): st['t'] = (st['t'] & 0xF3) | ((v & 3) << 2); return None +def wr_ppu_mask(a, v): return None + + +def wr_ppu_addr(a, v): + if st['w'] == 0: + st['t'] = (st['t'] & 0x00FF) | ((v & 0x3F) << 8); st['w'] = 1 + else: + st['t'] = (st['t'] & 0xFF00) | v + st['addr'] = st['t']; st['w'] = 0 + return None + + +def wr_ppu_scroll(a, v): + if st['w'] == 0: + st['x'] = v & 0xFF; st['w'] = 1 + else: + st['t'] = (st['t'] & 0xFFE0) | ((st['x'] >> 3) & 0x1F) + st['t'] = (st['t'] & 0x8C1F) | ((st['x'] & 7) << 12); st['w'] = 0 + return None + + +def rd_ppu_data(a): + addr = st['addr'] & 0x3FFF + v = sub[BASE + addr] if addr < len(PRG) else sub[addr] + st['buf'] = sub[BASE + addr] if addr < len(PRG) else sub[addr] + st['addr'] = (addr + (32 if (sub[0x2000] & 4) else 1)) & 0x3FFF + return v + + +def wr_ppu_data(a, v): + st['addr'] = (st['addr'] + (32 if (sub[0x2000] & 4) else 1)) & 0x3FFF + return None + + +def wr_oam_dma(a, v): + for i in range(256): + sub[0x0200 + i] = sub[(v << 8) + i] + st['dma'] += 1 + return None + + +def wr_ctrl1(a, v): + """joy1 latch: while bit0 stays high the shift register reloads.""" + st['w4016'] += 1 + st['strobe'] = v & 1 + if st['strobe']: + st['shift'] = st['shift_in'] & 0xFF + return None + + +def rd_ctrl1(a): + """joy1 read: A,B,Select,Start,Up,Down,Left,Right out LSB first.""" + st['r4016'] += 1 + v = st['shift'] & 1 + st['shift'] = (st['shift'] >> 1) | 0x80 + return v + + +def rd_ctrl2(a): + """$4017 is the expansion port in this game; nothing consumes it.""" + st['r4017'] += 1 + return 0x00 + + +def rd_stage(a): + st['nreads'] += 1 + touched.add(a) + pc = cpu.pc + HITS.setdefault(pc, [0, a])[0] += 1 + if len(log) < 400000: + log.append((pc, a, sub[a], st['tok'], st['tokpc'])) + return None + + +mem.subscribe_to_read([0x2002], rd_ppu_status) +mem.subscribe_to_write([0x2000], wr_ppu_ctrl) +mem.subscribe_to_write([0x2001], wr_ppu_mask) +mem.subscribe_to_write([0x2005], wr_ppu_scroll) +mem.subscribe_to_write([0x2006], wr_ppu_addr) +mem.subscribe_to_write([0x2007], wr_ppu_data) +mem.subscribe_to_read([0x2007], rd_ppu_data) +mem.subscribe_to_write([0x4014], wr_oam_dma) +mem.subscribe_to_write([0x4016], wr_ctrl1) +mem.subscribe_to_read([0x4016], rd_ctrl1) +mem.subscribe_to_read([0x4017], rd_ctrl2) +mem.subscribe_to_read(range(PP_LO, PP_HI + 1), rd_stage) + +seq_i = 0 +tap_end = 0 + + +def tick(cycles): + global seq_i, tap_end + st['vt'] += cycles + while st['vt'] >= FRAME_CYCLES: + st['vt'] -= FRAME_CYCLES + st['frame'] += 1 + st['vblank'] = False + st['nmi_fired'] = False # one NMI per frame, not per $2002 read + if st['frame'] > tap_end: + st['shift_in'] = 0 + while seq_i < len(SEQ) and st['frame'] >= SEQ[seq_i][0]: + st['shift_in'] = SEQ[seq_i][1] + tap_end = st['frame'] + TAP_RUN + seq_i += 1 + line = st['vt'] // DOT + if line == VBLANK_LINE and not st['nmi_fired']: + st['vblank'] = True + st['nmi_fired'] = True + # NMI + cpu.sp = (cpu.sp - 1) & 0xFF; sub[0x100 + cpu.sp] = cpu.pc & 0xFF + cpu.sp = (cpu.sp - 1) & 0xFF; sub[0x100 + cpu.sp] = (cpu.pc >> 8) & 0xFF + cpu.sp = (cpu.sp - 1) & 0xFF; sub[0x100 + cpu.sp] = (cpu.p | 0x20) & 0xFF + cpu.p |= 0x04 + cpu.pc = nmi_vec + st['nmis'] += 1 + + +cpu.pc = reset_vec +cpu.sp = 0xFD +cpu.p = 0x24 + +print(f'vectors: NMI=${nmi_vec:04X} RESET=${reset_vec:04X}') +print(f'payload window ${PP_LO:04X}-${PP_HI:04X}; target {FRAMES} frames ' + f'({FRAMES*FRAME_CYCLES:,} cycles)') + +target = FRAMES * FRAME_CYCLES +while cpu.processorCycles < target: + if cpu.pc == INTERP: + p = sub[ZP_PTR_LO] | (sub[ZP_PTR_HI] << 8) + st['tok'] = sub[(p + cpu.y) & 0xFFFF] + st['tokpc'] = cpu.pc + before = cpu.processorCycles + cpu.step() + tick(cpu.processorCycles - before) + +print(f'\n{st["frame"]} frames, {cpu.processorCycles:,} cycles, ' + f'{st["nmis"]:,} NMIs, {st["dma"]:,} OAM DMAs') +print(f'port: $4016 reads={st["r4016"]:,} writes={st["w4016"]:,} ' + f'$4017 reads={st["r4017"]:,} taps fired={seq_i}/{len(SEQ)}') +print(f'payload reads: {st["nreads"]:,} distinct reader PCs: {len(HITS)}') +span = PP_HI - PP_LO + 1 +print(f'coverage: {len(touched)} / {span} = {100*len(touched)/span:.1f}%') +print(f'final PC=${cpu.pc:04X} stream=${sub[ZP_PTR_LO]:02X}{sub[ZP_PTR_HI]:02X} ' + f'actor=${sub[ZP_ACT]:02X} $0321=${sub[0x0321]:02X} ' + f'$0320=${sub[0x0320]:02X} $0326=${sub[0x0326]:02X}') +for pc in sorted(HITS, key=lambda p: -HITS[p][0])[:20]: + c, ex = HITS[pc] + print(f' reader PC=${pc:04X} {c:>7,} reads e.g. ${ex:04X}') + +# Unreached spans, so a later run can be compared against this one directly. +miss = [a for a in range(PP_LO, PP_HI + 1) if a not in touched] +runs = [] +for a in miss: + if runs and a == runs[-1][1] + 1: + runs[-1][1] = a + else: + runs.append([a, a]) +print(f'\nunreached: {len(miss)} bytes in {len(runs)} runs (largest first)') +for lo, hi in sorted(runs, key=lambda r: -(r[1] - r[0]))[:10]: + print(f' ${lo:04X}-${hi:04X} {hi-lo+1:>4} B') + +with open('/tmp/opencode/stage_reads.txt', 'w') as f: + for pc, addr, val, tok, tokpc in log: + f.write(f'{pc:04X} {addr:04X} {val:02X} ' + f'{("-" if tok is None else "%02X" % tok)}\n') +print(f'wrote /tmp/opencode/stage_reads.txt ({len(log)} rows)') \ No newline at end of file diff --git a/_tools/verify_pass1.py b/_tools/verify_pass1.py new file mode 100644 index 0000000..cf55ca4 --- /dev/null +++ b/_tools/verify_pass1.py @@ -0,0 +1,231 @@ +#!/usr/bin/env python3 +""" +Verify Pass 1 (code/data split) across every top-level project. + +The repo's hard contract is a byte-identical rebuild, and that is what proves +the sources are *faithful*: nothing lost, nothing reformatted. It says nothing +about whether Pass 1 is *complete* — a project can reproduce all 16,384 bytes +perfectly while calling 95% of them data because the tracer gave up early. + +So there are two independent questions: + + 1. **Faithful?** Does the source still rebuild byte-identical? + 2. **Complete?** Does the committed source claim as much code as a fresh + trace can actually reach? + +Completeness is checked by re-running the tracer and comparing instruction +counts. Comparing *lines* rather than bytes keeps this independent of comment +style, which matters because the audit-comment format is not uniform across the +repo (see CONVENTIONS below). + +Each project is traced twice: with the 151 official opcodes, and with the 105 +undocumented NMOS opcodes added. The gap between the two separates "the tracer +was too weak" from "genuinely unreachable". + +Verdicts +-------- + OK committed split agrees with the tracer + SEEDED tracer finds materially LESS than committed - the project used + auto-seed / dispatch-table recovery, so a plain vector trace + cannot judge it. Not a defect. + TRUNCATED tracer finds materially MORE than committed - Pass 1 stopped + early and real code was written out as data. A defect. + +CONVENTIONS (reported, not enforced) +----------------------------------- +AGENTS.md requires every instruction to carry `; CPU:$xxxx PRG:xxxx AA BB`. +Several projects predate or ignore that. This tool reports which spelling each +project uses so the drift is visible. +""" + +import os +import re +import subprocess +import sys +from pathlib import Path + +sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) +import nesdis # noqa: E402 + +ROOT = Path(__file__).resolve().parent.parent + +# Comment spellings actually found in the repo, most-preferred first. +AUDIT_FORMS = { + "canonical CPU:$x PRG:xxxx AA BB": + re.compile(r"CPU:\$?([0-9A-Fa-f]{4})\s+PRG[: ]\$?([0-9A-Fa-f]{4})\s+" + r"((?:[0-9A-Fa-f]{2}[ ]?)+?)\s*(?:--.*)?$"), + "pipe PRG $xxxx | CPU $xxxx | AA BB": + re.compile(r"PRG \$([0-9A-Fa-f]{4})\s*\|\s*CPU \$([0-9A-Fa-f]{4})\s*\|\s*" + r"((?:[0-9A-Fa-f]{2} )+)"), + "colon PRG:$xxxx AA BB": + re.compile(r"PRG:\$?([0-9A-Fa-f]{4})\s+((?:[0-9A-Fa-f]{2} )+)"), + "slash PRG $xxxx / CPU $xxxx: AA BB": + re.compile(r"PRG \$([0-9A-Fa-f]{4})\s*/\s*CPU \$[0-9A-Fa-f]{4}:\s*" + r"((?:[0-9A-Fa-f]{2} )+)"), + "short $xxxx: AA BB": + re.compile(r"\$\$?([0-9A-Fa-f]{4}):\s*((?:[0-9A-Fa-f]{2} )+)"), + "bytes PRG:$xxxx Bytes:AA BB": + re.compile(r"PRG:\$?[0-9A-Fa-f]{4}\s+Bytes:\s*(?:[0-9A-Fa-f]{2} ?)+"), + "rom ROM $xxxxxx: AA BB": + re.compile(r"ROM \$([0-9A-Fa-f]{6}):\s*((?:[0-9A-Fa-f]{2} )+)"), +} + +# Every mnemonic the tracer can emit, official and undocumented. +ALL_MNEMONICS = (set(m for m, _ in nesdis.OPCODES.values()) + | set(m for m, _ in nesdis.UNDOC_OPCODES.values())) + + +def find_source(copilot): + for name in ("prg.s", "main.s"): + if (copilot / name).is_file(): + return copilot / name + return None + + +def prg_bytes(copilot): + """PRG image: prefer the split copy, else carve it out of rom.nes.""" + p = copilot / "prg.bin" + if p.is_file(): + return p.read_bytes() + rom = copilot / "rom.nes" + if rom.is_file(): + r = rom.read_bytes() + return r[16 + (512 if (r[6] & 4) else 0):16 + r[4] * 16384] + return None + + +def prg_base(copilot): + """CPU address the PRG is mapped at. + + Most projects link the PRG segment at its real CPU base ($C000, or $8000 + for MUSCLE). Bomberman instead links one flat file with the iNES header at + $0000 and PRG at $0010, so its linker start is a *file* offset, not a CPU + address; fall back to $C000 in that case. + """ + m = re.search(r"PRG:\s*start\s*=\s*\$([0-9A-Fa-f]+)", + (copilot / "linker.cfg").read_text()) + if not m: + return 0xC000 + start = int(m.group(1), 16) + return start if start >= 0x8000 else 0xC000 + + +def count_instructions(src): + """Instruction lines in the committed source. Comment/directive agnostic.""" + n = 0 + for raw in src.read_text().splitlines(): + s = raw.strip() + if not s or s.startswith((";", ".")): + continue + # Macro invocations and symbol assignments are not instructions. + if s.split()[0].lower() in ALL_MNEMONICS: + n += 1 + return n + + +def audit_form(src): + text = src.read_text() + hits = {} + for label, rx in AUDIT_FORMS.items(): + n = len(rx.findall(text)) + if n: + hits[label] = n + if not hits: + return "NONE" + return max(hits, key=hits.get).split()[0] + + +def builds_byte_identical(copilot): + """The faithfulness check: does the project still rebuild its ROM exactly?""" + try: + r = subprocess.run(["make"], cwd=copilot, capture_output=True, + text=True, timeout=600) + except subprocess.TimeoutExpired: + return "TIMEOUT" + out = (r.stdout + r.stderr) + if "Byte-identical ROM verified." in out: + return "yes" + return "NO" + + +def trace_split(prg, base, undoc): + """Re-run the Pass 1 tracer. Returns (insn_count, code_bytes, invalid).""" + nesdis.set_undocumented(undoc) + vo = len(prg) - 6 + rst = prg[vo + 2] | (prg[vo + 3] << 8) + nmi = prg[vo] | (prg[vo + 1] << 8) + irq = prg[vo + 4] | (prg[vo + 5] << 8) + insns, invalid, _i, _t, _o = nesdis.trace(prg, base, [rst, nmi, irq]) + nesdis.set_undocumented(False) + return len(insns), sum(i.length for i in insns.values()), invalid + + +def main(): + wanted = sys.argv[1:] + projects = sorted( + d for d in os.listdir(ROOT) + if (ROOT / d / "copilot" / "Makefile").is_file() + and (ROOT / d / "copilot" / "prg.bin" or + (ROOT / d / "copilot" / "rom.nes").is_file()) + and (wanted == [] or d in wanted) + ) + + print(f"{'project':30s} {'build':>6} {'cmt':>6} {'committed':>10} " + f"{'official':>10} {'+undoc':>10} verdict") + print("-" * 96) + + flagged, odd_comments = [], [] + for name in projects: + copilot = ROOT / name / "copilot" + src = find_source(copilot) + prg = prg_bytes(copilot) + base = prg_base(copilot) + if src is None or prg is None: + print(f"{name:30s} SKIP") + continue + + build = builds_byte_identical(copilot) + for junk in copilot.glob("*.o"): + junk.unlink() + + form = audit_form(src) + if form != "canonical": + odd_comments.append((name, form)) + + committed = count_instructions(src) + off_n, off_b, _ = trace_split(prg, base, False) + und_n, und_b, _ = trace_split(prg, base, True) + + if build != "yes": + verdict = f"BUILD-{build}" + elif und_n > committed * 1.05 + 16: + verdict = "TRUNCATED" + elif off_n < committed * 0.95: + verdict = "SEEDED" + else: + verdict = "OK" + + if verdict not in ("OK", "SEEDED"): + flagged.append((name, verdict)) + + print(f"{name:30s} {build:>6} {form[:6]:>6} {committed:>10} " + f"{off_n:>6}/{off_b:<3} {und_n:>5}/{und_b:<4} {verdict}") + + print() + if flagged: + print("Needs attention:") + for n, v in flagged: + print(f" {v:14s} {n}") + else: + print("No truncated or unfaithful Pass 1 found.") + print() + print("Comment conventions (AGENTS.md wants `canonical`):") + for n, f in odd_comments: + print(f" {f:8s} {n}") + if not odd_comments: + print(" all canonical") + return 1 if flagged else 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/_wip/Lunar Pool (U)/OVERVIEW.md b/_wip/Lunar Pool (U)/OVERVIEW.md index 7ef03ea..59452e0 100644 --- a/_wip/Lunar Pool (U)/OVERVIEW.md +++ b/_wip/Lunar Pool (U)/OVERVIEW.md @@ -1,6 +1,6 @@ # Lunar Pool (U) — Skeleton Project -ROM: `_wip/Lunar Pool (U)/Lunar Pool (U).nes` (24,592 bytes, iNES). Status: **SKELETON — not yet disassembled.** The entire 16 KB PRG bank is a single unclassified block; `copilot/prg.s` is the default-project skeleton (`default_project.tar.gz`) that reproduces it as one `.incbin`. The skeleton build is **byte-identical** at the PRG level. +ROM: `_wip/Lunar Pool (U)/Lunar Pool (U).nes` (24,592 bytes, iNES). Status: **PASS 1 COMPLETE** — 4,586 instructions / 9,475 code bytes (57.8%) / 6,909 data bytes, byte accounting exact, **BYTE-IDENTICAL** at the PRG level. Pass 2 and 3 outstanding. ## ROM Facts @@ -23,6 +23,53 @@ ROM: `_wip/Lunar Pool (U)/Lunar Pool (U).nes` (24,592 bytes, iNES). Status: **SK | RESET | `$E80C` | non-$C000 entry at $E80C — trace from here in Pass 1 | | IRQ | `$FF64` | target $FF64 — verify during Pass 1 | +## Pass Status + +| Pass | Status | Description | +|------|--------|-------------| +| Pass 0 | Superseded | `prg.s` was a 12-line `.incbin` of the whole PRG — no disassembly at all | +| Pass 1 | **Complete** | 4,586 instructions / **9,475 code bytes (57.8%)** / 6,909 data bytes. Byte accounting exact: 9,403 + 6,981 = 16,384. 598 labels, 598 routine headers | +| Pass 2 | Outstanding | ~585 `Label_Cxxxx` to name | +| Pass 3 | Outstanding | Data regions inside the 6,909 unreached bytes need naming | + +### How Pass 1 got to 57.8% + +| Step | Instructions | Code | +|------|--------------|------| +| Vectors + direct `jsr`/`jmp`/branch, official opcodes | 1,259 | 2,561 B (15.6%) | +| `--undocumented` (108 NMOS opcodes) | 4,572 | 9,436 B (57.6%) | +| `--auto-seed` (48 table-referenced entries) + `--extra-seed 0xE80C` | **4,586** | **9,475 B (57.8%)** | + +### The dispatch mechanisms + +**1. `jmp ($7961)` at three sites** (`$F788`, `$F7F6`, `$F828`). The target address is read from the RAM pointer at `$7961`/`$7962`, so it cannot be followed statically. These are game-over / hi-score screens: the data blocks that follow them contain the screen text (`"game over"`, `"hi`score__"`, `"shot"`). + +**2. Stack-based dispatch at `$CBDC`** — the same pattern as Mario Bros (JU)'s `$CD9E`: + +``` +$CBDC pla / sta ZpFA +$CBDF pla / sta ZpFB +$CBE7 lda (ZpFA),y ; read the entry, indexed by Y +``` + +The pointer arrives via `pla`, so it is only knowable in the caller's frame. + +### Tracer fixes required to get there + +Three undocumented opcodes were missing from `nesdis.py` and were added: + +* `$72` — `RRA abs` (the `RRA` family had `$63`/`$67`/`$6F`/`$73`/`$77`/`$7B`/`$7F` but not `$72`). +* `$42` — `NOP #imm` (the NOP-immediate family had `$80`/`$82`/`$89`/`$C2`/`$E2` but not `$42`). +* `$FA` — `NOP abs,X` (the NOP-abs,X family had `$1C`/`$3C`/`$5C`/`$7C`/`$DC`/`$FC` but not `$FA`). + +One emitter fix: ca65 silently rewrites an operand whose high byte is `$00` in the shorter zero-page form (`sta $00FF,x` becomes `sta $FF,x`, emitting `$95` instead of `$9D`). `render()` now emits the `a:` prefix for ABS/ABSX/ABSY/IND operands with a high byte of `$00`, forcing the absolute form so the bytes match the ROM. `operand_value()` strips the prefix when parsing. + +### Known remaining gaps + +* The tracer still reports two overlaps (`$C3BB` — resolved with `--data 0xC3BB:1` — and `$F0EF`) and three rejected mis-aligned stubs. +* 6,909 bytes (42.2%) are still data, gated behind the `jmp ($7961)` and `$CBDC` dispatches. +* `locals.inc` carries 114 generated zero-page aliases, none yet named semantically. + ## `copilot/` Contents | File | Purpose | @@ -47,7 +94,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 ($E80C) and NMI ($FF65), 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. +1. **Pass 1** — complete (57.8% code, byte accounting exact). +2. **Pass 2** — name the ~585 remaining `Label_Cxxxx`; fill `locals.inc` with semantic zero-page aliases. +3. **Pass 3** — name data tables/structures in the 6,909 unreached bytes; release provisional flags. 4. **Promotion** — move to a top-level `/copilot/` folder, add full-ROM build (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the established style; then it joins the root index's numbered inventory. diff --git a/_wip/Lunar Pool (U)/copilot/locals.inc b/_wip/Lunar Pool (U)/copilot/locals.inc index 02cd40d..01df782 100644 --- a/_wip/Lunar Pool (U)/copilot/locals.inc +++ b/_wip/Lunar Pool (U)/copilot/locals.inc @@ -1,2 +1,120 @@ -; Lunar Pool (U) zero-page aliases (declared during Pass 2). -; These intentionally conservative names will be refined in Passes 2 and 3. +; Lunar Pool (U) application-specific RAM aliases - Pass 1 +; Generated from every direct zero-page operand in reachable code: +; ref counts are reads/writes, `where` lists the referencing addresses. +; ZpXX names indicate storage with a role not yet unique enough for a behavioral name; +; Pass 2 replaces them with names derived from observed usage. + +Zp00 = $00 ; 22 refs; reads=13 writes=9; used at $CB45, CB49, CB52, CB61, +15 more +Zp01 = $01 ; 34 refs; reads=18 writes=16; used at $CA79, CB4D, CB50, CB66, +27 more +Zp02 = $02 ; 4 refs; reads=3 writes=1; used at $C3B4, E295, E844, EE45 +Zp03 = $03 ; 8 refs; reads=4 writes=4; used at $E8E6, E9FB, EE48, EE4A, +1 more +Zp04 = $04 ; 3 refs; reads=2 writes=1; used at $F68F, F725 +Zp05 = $05 ; 12 refs; reads=6 writes=6; used at $E8EB, EE3C, F211, F2AF, +5 more +Zp06 = $06 ; 5 refs; reads=2 writes=3; used at $EA00, EE32, F2E5 +Zp07 = $07 ; 22 refs; reads=16 writes=6; used at $EE55, EE57, EEC7, EF04, +16 more +Zp08 = $08 ; 9 refs; reads=6 writes=3; used at $C3B6, F032, F236, F287, +3 more +Zp09 = $09 ; 2 refs; reads=1 writes=1; used at $CFC4, D2E7 +Zp0C = $0C ; 4 refs; reads=2 writes=2; used at $E29A, E300, E309 +Zp0D = $0D ; 6 refs; reads=3 writes=3; used at $E240, E302, E314, E8F0 +Zp0E = $0E ; 4 refs; reads=2 writes=2; used at $E245, E31A, F5EE +Zp0F = $0F ; 1 refs; reads=0 writes=1; used at $E8A1 +Zp10 = $10 ; 3 refs; reads=1 writes=2; used at $E3FF, E655, FBC8 +Zp11 = $11 ; 4 refs; reads=2 writes=2; used at $E405, E659, E6F8, FBCA +Zp12 = $12 ; 5 refs; reads=4 writes=1; used at $C0C5, E666, F2A0, FBCC, +1 more +Zp13 = $13 ; 6 refs; reads=5 writes=1; used at $E66A, E6FC, E70F, F2A4, +2 more +Zp15 = $15 ; 2 refs; reads=1 writes=1; used at $F5F0 +Zp16 = $16 ; 4 refs; reads=2 writes=2; used at $F080, F14E, F196, F29D +Zp17 = $17 ; 4 refs; reads=2 writes=2; used at $F084, F152, F193, F2A2 +Zp18 = $18 ; 5 refs; reads=3 writes=2; used at $C0CD, E698, E6CA, FC79, +1 more +Zp19 = $19 ; 4 refs; reads=2 writes=2; used at $E696, E6ED, FC7B, FCB7 +Zp1A = $1A ; 2 refs; reads=1 writes=1; used at $FC99, FCCA +Zp1B = $1B ; 2 refs; reads=1 writes=1; used at $FC9B, FCCE +Zp1C = $1C ; 8 refs; reads=4 writes=4; used at $E61E, E662, EF5A, F1E2, +4 more +Zp1D = $1D ; 8 refs; reads=5 writes=3; used at $EF62, EF8A, EFDF, F1E7, +4 more +Zp1E = $1E ; 13 refs; reads=9 writes=4; used at $C0C7, C0C9, C0CF, C0D5, +9 more +Zp1F = $1F ; 9 refs; reads=6 writes=3; used at $EF74, EF84, EFD9, F1F1, +5 more +Zp20 = $20 ; 5 refs; reads=4 writes=1; used at $FBAD, FBEC, FC3A, FC7D, +1 more +Zp21 = $21 ; 5 refs; reads=4 writes=1; used at $FBA8, FBF0, FC3E, FC81, +1 more +Zp22 = $22 ; 5 refs; reads=4 writes=1; used at $FBBE, FC18, FC51, FC9D, +1 more +Zp23 = $23 ; 5 refs; reads=4 writes=1; used at $FBB9, FC1C, FC55, FCA1, +1 more +Zp24 = $24 ; 21 refs; reads=9 writes=12; used at $E3D6, E3EF, E6AB, E6BC, +16 more +Zp25 = $25 ; 23 refs; reads=11 writes=12; used at $E3D4, E3F5, E6A9, E6C1, +18 more +Zp26 = $26 ; 20 refs; reads=11 writes=9; used at $E3C4, E443, E51A, E59F, +15 more +Zp27 = $27 ; 5 refs; reads=1 writes=4; used at $E3DD, E448, E51F, E5A4, +1 more +Zp28 = $28 ; 8 refs; reads=6 writes=2; used at $E3CE, E67A, E68E, E694, +4 more +Zp29 = $29 ; 5 refs; reads=3 writes=2; used at $E3E7, E683, E6AD, F268, +1 more +Zp2A = $2A ; 6 refs; reads=3 writes=3; used at $C0D7, E31F, E34D, E373, +2 more +Zp2B = $2B ; 4 refs; reads=2 writes=2; used at $E360, E53E, E55D, E57D +Zp2C = $2C ; 9 refs; reads=2 writes=7; used at $E3C1, E43E, E50E, E515, +4 more +Zp2D = $2D ; 9 refs; reads=2 writes=7; used at $E3DA, E43B, E502, E509, +4 more +Zp2E = $2E ; 10 refs; reads=5 writes=5; used at $E487, E4B2, E4D5, E4DE, +6 more +Zp2F = $2F ; 6 refs; reads=2 writes=4; used at $E485, E4BB, E4FB, E529, +2 more +Zp30 = $30 ; 4 refs; reads=2 writes=2; used at $E39D, E555, E55B, E57B +Zp31 = $31 ; 8 refs; reads=4 writes=4; used at $E384, E527, E540, E550, +4 more +Zp32 = $32 ; 23 refs; reads=17 writes=6; used at $E413, E417, E457, E46C, +16 more +Zp33 = $33 ; 17 refs; reads=12 writes=5; used at $E415, E41B, E429, E455, +10 more +Zp34 = $34 ; 17 refs; reads=11 writes=6; used at $E71F, E721, E74F, E763, +11 more +Zp35 = $35 ; 14 refs; reads=7 writes=7; used at $E4E0, E4E4, E55F, E56A, +6 more +Zp36 = $36 ; 2 refs; reads=1 writes=1; used at $E5F8, E617 +Zp37 = $37 ; 5 refs; reads=2 writes=3; used at $EBC1, F321, F41B, F41D +Zp3B = $3B ; 1 refs; reads=1 writes=0; used at $EBF5 +Zp49 = $49 ; 2 refs; reads=2 writes=0; used at $C0D1, C0D9 +Zp5F = $5F ; 6 refs; reads=3 writes=3; used at $C3C0, E85D, E8A6, F2EF, +1 more +Zp60 = $60 ; 4 refs; reads=2 writes=2; used at $C00E, C019, C3E0, C3E6 +Zp61 = $61 ; 2 refs; reads=1 writes=1; used at $F521 +Zp65 = $65 ; 2 refs; reads=1 writes=1; used at $F85C +Zp67 = $67 ; 1 refs; reads=1 writes=0; used at $EBF3 +Zp68 = $68 ; 2 refs; reads=1 writes=1; used at $C003, C3F7 +Zp69 = $69 ; 15 refs; reads=11 writes=4; used at $C085, C096, C0BD, C0E9, +10 more +Zp6A = $6A ; 6 refs; reads=2 writes=4; used at $C08A, C0EB, C1E7, C401, +1 more +Zp6B = $6B ; 31 refs; reads=18 writes=13; used at $C194, C1A8, C205, C219, +26 more +Zp6C = $6C ; 12 refs; reads=4 writes=8; used at $C199, C1AD, C209, C217, +7 more +Zp6D = $6D ; 16 refs; reads=13 writes=3; used at $C00C, C015, C02C, C02E, +11 more +Zp6E = $6E ; 6 refs; reads=3 writes=3; used at $C0CB, C231, C283, C39F, +2 more +Zp6F = $6F ; 14 refs; reads=6 writes=8; used at $C024, C23F, C26A, C275, +9 more +Zp70 = $70 ; 5 refs; reads=1 writes=4; used at $C072, F786, F7F4, F826, +1 more +Zp72 = $72 ; 1 refs; reads=1 writes=0; used at $F85A +Zp74 = $74 ; 5 refs; reads=3 writes=2; used at $C0DB, EBF1, F85E +Zp7F = $7F ; 2 refs; reads=0 writes=2; used at $E832, FA93 +Zp81 = $81 ; 1 refs; reads=0 writes=1; used at $E27E +Zp84 = $84 ; 1 refs; reads=1 writes=0; used at $C0D3 +Zp85 = $85 ; 1 refs; reads=0 writes=1; used at $E9A0 +Zp86 = $86 ; 1 refs; reads=0 writes=1; used at $E995 +Zp87 = $87 ; 1 refs; reads=0 writes=1; used at $E98A +Zp89 = $89 ; 1 refs; reads=0 writes=1; used at $E963 +Zp8A = $8A ; 4 refs; reads=4 writes=0; used at $C0DD, C0DF, C0E1, C0E3 +Zp8B = $8B ; 1 refs; reads=0 writes=1; used at $EDE2 +Zp8F = $8F ; 2 refs; reads=0 writes=2; used at $E84B, EDDD +Zp92 = $92 ; 1 refs; reads=0 writes=1; used at $EDD8 +ZpA0 = $A0 ; 1 refs; reads=0 writes=1; used at $CC50 +ZpA5 = $A5 ; 1 refs; reads=1 writes=0; used at $F0CF +ZpAA = $AA ; 1 refs; reads=1 writes=0; used at $C0E5 +ZpC0 = $C0 ; 2 refs; reads=2 writes=0; used at $C0C0, C0C2 +ZpD0 = $D0 ; 5 refs; reads=3 writes=2; used at $CC05, CC36, CC4B, CC7F +ZpD1 = $D1 ; 2 refs; reads=0 writes=2; used at $CC19, CC47 +ZpD2 = $D2 ; 1 refs; reads=0 writes=1; used at $CC3C +ZpD3 = $D3 ; 1 refs; reads=0 writes=1; used at $CC40 +ZpE8 = $E8 ; 4 refs; reads=2 writes=2; used at $CCC5, CCE2, F7BA, F7BC +ZpE9 = $E9 ; 3 refs; reads=2 writes=1; used at $CCCF, F7AB, F7C2 +ZpEA = $EA ; 3 refs; reads=2 writes=1; used at $CCCA, F7A9, F7C0 +ZpEB = $EB ; 2 refs; reads=0 writes=2; used at $CCDC, F7B6 +ZpEC = $EC ; 1 refs; reads=0 writes=1; used at $F7B2 +ZpED = $ED ; 3 refs; reads=1 writes=2; used at $CC12, CC34, CC8A +ZpEE = $EE ; 9 refs; reads=6 writes=3; used at $CBFD, CC17, CC2E, CC45, +4 more +ZpEF = $EF ; 5 refs; reads=3 writes=2; used at $CAB4, CAB6, CDBB, CDC9, +1 more +ZpF0 = $F0 ; 14 refs; reads=9 writes=5; used at $CA38, CA3F, CA48, CA4C, +8 more +ZpF1 = $F1 ; 9 refs; reads=5 writes=4; used at $CA24, CA2B, CA2E, CA32, +4 more +ZpF2 = $F2 ; 6 refs; reads=3 writes=3; used at $CA68, CA7F, CA88, CB19, +2 more +ZpF3 = $F3 ; 5 refs; reads=2 writes=3; used at $CA6C, CA83, CA8C, CD4B, +1 more +ZpF4 = $F4 ; 4 refs; reads=2 writes=2; used at $CC20, CC3A, FF01 +ZpF5 = $F5 ; 2 refs; reads=1 writes=1; used at $CC24, CC3E +ZpF6 = $F6 ; 68 refs; reads=35 writes=33; used at $CAFB, CAFD, CB01, CB05, +52 more +ZpF7 = $F7 ; 42 refs; reads=20 writes=22; used at $CAF9, CAFF, CB03, CB07, +29 more +ZpF8 = $F8 ; 50 refs; reads=27 writes=23; used at $CFB3, D242, D251, D273, +40 more +ZpF9 = $F9 ; 35 refs; reads=19 writes=16; used at $CFAE, D11D, D120, D24C, +30 more +ZpFA = $FA ; 64 refs; reads=24 writes=40; used at $CB71, CB87, CB95, CB9B, +57 more +ZpFB = $FB ; 63 refs; reads=25 writes=38; used at $CB9D, CBA3, CBCD, CBD5, +54 more +ZpFC = $FC ; 135 refs; reads=55 writes=80; used at $CAA8, CB97, CB99, CBAB, +115 more +ZpFD = $FD ; 101 refs; reads=41 writes=60; used at $CAA3, CB9F, CBA1, CBA9, +84 more +ZpFE = $FE ; 28 refs; reads=15 writes=13; used at $CDD8, CE19, CF9C, CFA8, +24 more +ZpFF = $FF ; 16 refs; reads=7 writes=9; used at $CDD6, CE14, CF9F, CFD7, +12 more diff --git a/_wip/Lunar Pool (U)/copilot/prg.s b/_wip/Lunar Pool (U)/copilot/prg.s index 0ae22c8..0237187 100644 --- a/_wip/Lunar Pool (U)/copilot/prg.s +++ b/_wip/Lunar Pool (U)/copilot/prg.s @@ -1,12 +1,11087 @@ -; Lunar Pool (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. - +; Lunar Pool (U) NES disassembly - Pass 1 +; Byte-oriented ca65 source generated from the supplied PRG image. +; Recursively reachable instructions are emitted explicitly with address/byte comments. +; Unreached bytes remain explicit .byte blocks; no ROM byte is deleted or reformatted. +; Pass 2 replaces address-derived labels, RAM aliases, and table names while +; preserving byte identity. +; +; Vectors: NMI=$FF65 RESET=$E80C IRQ=$FF64 +; PRG mapped at $C000-$FFFF (NROM, mirrored to the upper half) +; +; Pass 1 trace provenance (the audit trail behind every classification below): +; 48 further routine entries recovered from table references elsewhere in the image: +; $C0C0, $CA6F, $CA77, $CA8F, $CAAE, $CB69, $CB7F, $CB92, $CBC9, $CBDC, $D00D, $D20A, $D222, $D392, $D3D3, $D48F, $D4AF, $D4E4, $E24F, $E286, $E2FE, $E370, $E3BF, $E3FB, $E405, $E6D0, $E6D9, $E802, $F0CE, $F125, $F149, $F19A, $F7A5, $FB4C, $FB69, $FB90, $FBA5, $FD8B, $FDA8, $FDD8, $FDFE, $FE37, $FE4A, $FE5A, $FEA8, $FEFE, $FF11, $FF18 +; entries seeded by hand after inspecting code-shaped but unreferenced blocks: +; $E80C +; $C3BB-$C3BB forced back to data: the only path into it is a branch that is always taken +; indirect dispatch through zero page (not followed statically): +; jmp ($7961) at $F788 +; jmp ($7961) at $F7F6 +; jmp ($7961) at $F828 +; .setcpu "6502" .include "symbols.inc" .include "locals.inc" .segment "PRG" -.incbin "prg.bin", $0000, $4000 + +; ---- data $C000-$C002 (3 bytes) ---- + .byte $4C, $0C, $E8 ; CPU:$C000 PRG:0000 4C 0C E8 +; ----------------------------------------------------------------------------- +; Routine: Label_C003 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C003: + lda Zp68 ; CPU:$C003 PRG:0003 A5 68 + and #$02 ; CPU:$C005 PRG:0005 29 02 + beq Label_C00A ; CPU:$C007 PRG:0007 F0 01 + rts ; CPU:$C009 PRG:0009 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C00A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C00A: + ldx #$00 ; CPU:$C00A PRG:000A A2 00 +; ----------------------------------------------------------------------------- +; Routine: Label_C00C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C00C: + stx Zp6D ; CPU:$C00C PRG:000C 86 6D + lda Zp60,x ; CPU:$C00E PRG:000E B5 60 + beq Label_C01B ; CPU:$C010 PRG:0010 F0 09 + jsr $C404 ; CPU:$C012 PRG:0012 20 04 C4 + ldx Zp6D ; CPU:$C015 PRG:0015 A6 6D + lda #$00 ; CPU:$C017 PRG:0017 A9 00 + sta Zp60,x ; CPU:$C019 PRG:0019 95 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C01B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C01B: + inx ; CPU:$C01B PRG:001B E8 + cpx #$08 ; CPU:$C01C PRG:001C E0 08 + bne Label_C00C ; CPU:$C01E PRG:001E D0 EC + ldx #$10 ; CPU:$C020 PRG:0020 A2 10 + lda #$00 ; CPU:$C022 PRG:0022 A9 00 +; ----------------------------------------------------------------------------- +; Routine: Label_C024 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C024: + sta Zp6F,x ; CPU:$C024 PRG:0024 95 6F + dex ; CPU:$C026 PRG:0026 CA + bne Label_C024 ; CPU:$C027 PRG:0027 D0 FB + sta $05F0 ; CPU:$C029 PRG:0029 8D F0 05 + sta Zp6D ; CPU:$C02C PRG:002C 85 6D +; ----------------------------------------------------------------------------- +; Routine: Label_C02E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C02E: + ldx Zp6D ; CPU:$C02E PRG:002E A6 6D + lda $0500,x ; CPU:$C030 PRG:0030 BD 00 05 + beq Label_C05F ; CPU:$C033 PRG:0033 F0 2A + tay ; CPU:$C035 PRG:0035 A8 + inc $0541,x ; CPU:$C036 PRG:0036 FE 41 05 + lda $0541,x ; CPU:$C039 PRG:0039 BD 41 05 + cmp $051E,x ; CPU:$C03C PRG:003C DD 1E 05 + bne Label_C054 ; CPU:$C03F PRG:003F D0 13 + lda #$00 ; CPU:$C041 PRG:0041 A9 00 + sta $0541,x ; CPU:$C043 PRG:0043 9D 41 05 + inc $0532,x ; CPU:$C046 PRG:0046 FE 32 05 + lda $0532,x ; CPU:$C049 PRG:0049 BD 32 05 + cmp $0537,x ; CPU:$C04C PRG:004C DD 37 05 + bne Label_C054 ; CPU:$C04F PRG:004F D0 03 + jsr $C082 ; CPU:$C051 PRG:0051 20 82 C0 +; ----------------------------------------------------------------------------- +; Routine: Label_C054 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C054: + jsr $C22F ; CPU:$C054 PRG:0054 20 2F C2 + ldx Zp6D ; CPU:$C057 PRG:0057 A6 6D + jsr $C2BB ; CPU:$C059 PRG:0059 20 BB C2 + jsr $C314 ; CPU:$C05C PRG:005C 20 14 C3 +; ----------------------------------------------------------------------------- +; Routine: Label_C05F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C05F: + inc Zp6D ; CPU:$C05F PRG:005F E6 6D + lda Zp6D ; CPU:$C061 PRG:0061 A5 6D + cmp #$05 ; CPU:$C063 PRG:0063 C9 05 + beq Label_C06A ; CPU:$C065 PRG:0065 F0 03 + jmp $C02E ; CPU:$C067 PRG:0067 4C 2E C0 +; ----------------------------------------------------------------------------- +; Routine: Label_C06A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C06A: + lda $05F0 ; CPU:$C06A PRG:006A AD F0 05 + sta $4015 ; CPU:$C06D PRG:006D 8D 15 40 + ldx #$00 ; CPU:$C070 PRG:0070 A2 00 +; ----------------------------------------------------------------------------- +; Routine: Label_C072 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C072: + lda Zp70,x ; CPU:$C072 PRG:0072 B5 70 + beq Label_C07C ; CPU:$C074 PRG:0074 F0 06 + lda $05E0,x ; CPU:$C076 PRG:0076 BD E0 05 + sta $4000,x ; CPU:$C079 PRG:0079 9D 00 40 +; ----------------------------------------------------------------------------- +; Routine: Label_C07C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C07C: + inx ; CPU:$C07C PRG:007C E8 + cpx #$10 ; CPU:$C07D PRG:007D E0 10 + bne Label_C072 ; CPU:$C07F PRG:007F D0 F1 + rts ; CPU:$C081 PRG:0081 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C082 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C082: + lda $0528,x ; CPU:$C082 PRG:0082 BD 28 05 + sta Zp69 ; CPU:$C085 PRG:0085 85 69 + lda $052D,x ; CPU:$C087 PRG:0087 BD 2D 05 + sta Zp6A ; CPU:$C08A PRG:008A 85 6A + jmp $C092 ; CPU:$C08C PRG:008C 4C 92 C0 +; ---- data $C08F-$C091 (3 bytes) ---- + .byte $20, $FC, $C3 ; CPU:$C08F PRG:008F 20 FC C3 +; ----------------------------------------------------------------------------- +; Routine: Label_C092 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C092: + ldx Zp6D ; CPU:$C092 PRG:0092 A6 6D + ldy #$00 ; CPU:$C094 PRG:0094 A0 00 + lda (Zp69),y ; CPU:$C096 PRG:0096 B1 69 + tay ; CPU:$C098 PRG:0098 A8 + and #$80 ; CPU:$C099 PRG:0099 29 80 + bne Label_C0A1 ; CPU:$C09B PRG:009B D0 04 + tya ; CPU:$C09D PRG:009D 98 + jmp $C1A2 ; CPU:$C09E PRG:009E 4C A2 C1 +; ----------------------------------------------------------------------------- +; Routine: Label_C0A1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C0A1: + tya ; CPU:$C0A1 PRG:00A1 98 + cmp #$DF ; CPU:$C0A2 PRG:00A2 C9 DF + bcc Label_C0A9 ; CPU:$C0A4 PRG:00A4 90 03 + jmp $C18D ; CPU:$C0A6 PRG:00A6 4C 8D C1 +; ----------------------------------------------------------------------------- +; Routine: Label_C0A9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C0A9: + jsr $C3FC ; CPU:$C0A9 PRG:00A9 20 FC C3 + ldx Zp6D ; CPU:$C0AC PRG:00AC A6 6D + tya ; CPU:$C0AE PRG:00AE 98 + and #$7F ; CPU:$C0AF PRG:00AF 29 7F + asl a ; CPU:$C0B1 PRG:00B1 0A + tay ; CPU:$C0B2 PRG:00B2 A8 + lda $C0C1,y ; CPU:$C0B3 PRG:00B3 B9 C1 C0 + pha ; CPU:$C0B6 PRG:00B6 48 + lda $C0C0,y ; CPU:$C0B7 PRG:00B7 B9 C0 C0 + pha ; CPU:$C0BA PRG:00BA 48 + ldy #$00 ; CPU:$C0BB PRG:00BB A0 00 + lda (Zp69),y ; CPU:$C0BD PRG:00BD B1 69 + rts ; CPU:$C0BF PRG:00BF 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C0C0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C0C0: + sbc ZpC0 ; CPU:$C0C0 PRG:00C0 E5 C0 + sbc (ZpC0),y ; CPU:$C0C2 PRG:00C2 F1 C0 + php ; CPU:$C0C4 PRG:00C4 08 + cmp (Zp12,x) ; CPU:$C0C5 PRG:00C5 C1 12 + cmp (Zp1E,x) ; CPU:$C0C7 PRG:00C7 C1 1E + cmp (Zp1E,x) ; CPU:$C0C9 PRG:00C9 C1 1E + cmp (Zp6E,x) ; CPU:$C0CB PRG:00CB C1 6E + cmp (Zp18,x) ; CPU:$C0CD PRG:00CD C1 18 + cmp (Zp1E,x) ; CPU:$C0CF PRG:00CF C1 1E + cmp (Zp49,x) ; CPU:$C0D1 PRG:00D1 C1 49 + cmp (Zp84,x) ; CPU:$C0D3 PRG:00D3 C1 84 + cmp (Zp1E,x) ; CPU:$C0D5 PRG:00D5 C1 1E + cmp (Zp2A,x) ; CPU:$C0D7 PRG:00D7 C1 2A + cmp (Zp49,x) ; CPU:$C0D9 PRG:00D9 C1 49 + cmp (Zp74,x) ; CPU:$C0DB PRG:00DB C1 74 + cmp (Zp8A,x) ; CPU:$C0DD PRG:00DD C1 8A + cmp (Zp8A,x) ; CPU:$C0DF PRG:00DF C1 8A + cmp (Zp8A,x) ; CPU:$C0E1 PRG:00E1 C1 8A + cmp (Zp8A,x) ; CPU:$C0E3 PRG:00E3 C1 8A + cmp (ZpAA,x) ; CPU:$C0E5 PRG:00E5 C1 AA + ldy #$01 ; CPU:$C0E7 PRG:00E7 A0 01 + lda (Zp69),y ; CPU:$C0E9 PRG:00E9 B1 69 + sta Zp6A ; CPU:$C0EB PRG:00EB 85 6A + stx Zp69 ; CPU:$C0ED PRG:00ED 86 69 + jmp $C092 ; CPU:$C0EF PRG:00EF 4C 92 C0 +; ---- data $C0F2-$C18C (155 bytes) ---- + .byte $20, $3D, $C1, $20, $FC, $C3, $A6, $6B, $A0, $00, $B1, $69, $DE, $00, $05, $D0 ; CPU:$C0F2 PRG:00F2 20 3D C1 20 FC C3 A6 6B A0 00 B1 69 DE 00 05 D0 + .byte $E3, $20, $FC, $C3, $4C, $8F, $C0, $A9, $00, $9D, $00, $05, $68, $68, $4C, $5C ; CPU:$C102 PRG:0102 E3 20 FC C3 4C 8F C0 A9 00 9D 00 05 68 68 4C 5C + .byte $C0, $9D, $14, $05, $4C, $8F, $C0, $9D, $0F, $05, $4C, $8F, $C0, $F0, $04, $18 ; CPU:$C112 PRG:0112 C0 9D 14 05 4C 8F C0 9D 0F 05 4C 8F C0 F0 04 18 + .byte $7D, $19, $05, $9D, $19, $05, $4C, $8F, $C0, $20, $3D, $C1, $98, $AA, $A0, $01 ; CPU:$C122 PRG:0122 7D 19 05 9D 19 05 4C 8F C0 20 3D C1 98 AA A0 01 + .byte $B1, $69, $9D, $00, $05, $20, $FC, $C3, $4C, $8F, $C0, $85, $6B, $0A, $18, $65 ; CPU:$C132 PRG:0132 B1 69 9D 00 05 20 FC C3 4C 8F C0 85 6B 0A 18 65 + .byte $6B, $0A, $65, $6D, $85, $6B, $A8, $60, $A8, $BD, $0A, $05, $29, $0F, $85, $6F ; CPU:$C142 PRG:0142 6B 0A 65 6D 85 6B A8 60 A8 BD 0A 05 29 0F 85 6F + .byte $98, $18, $10, $08, $65, $6F, $B0, $0C, $A9, $00, $F0, $08, $65, $6F, $C9, $10 ; CPU:$C152 PRG:0152 98 18 10 08 65 6F B0 0C A9 00 F0 08 65 6F C9 10 + .byte $90, $02, $A9, $0F, $85, $6F, $BD, $0A, $05, $29, $F0, $05, $6F, $9D, $0A, $05 ; CPU:$C162 PRG:0162 90 02 A9 0F 85 6F BD 0A 05 29 F0 05 6F 9D 0A 05 + .byte $4C, $8F, $C0, $A5, $69, $18, $69, $02, $85, $69, $A9, $00, $65, $6A, $85, $6A ; CPU:$C172 PRG:0172 4C 8F C0 A5 69 18 69 02 85 69 A9 00 65 6A 85 6A + .byte $4C, $8F, $C0, $20, $DA, $C3, $4C, $8F, $C0, $A5, $69 ; CPU:$C182 PRG:0182 4C 8F C0 20 DA C3 4C 8F C0 A5 69 +; ----------------------------------------------------------------------------- +; Routine: Label_C18D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C18D: + pha ; CPU:$C18D PRG:018D 48 + lda $053C,x ; CPU:$C18E PRG:018E BD 3C 05 + jsr $C205 ; CPU:$C191 PRG:0191 20 05 C2 + lda Zp6B ; CPU:$C194 PRG:0194 A5 6B + sta $0546,x ; CPU:$C196 PRG:0196 9D 46 05 + lda Zp6C ; CPU:$C199 PRG:0199 A5 6C + sta $054B,x ; CPU:$C19B PRG:019B 9D 4B 05 + pla ; CPU:$C19E PRG:019E 68 + jmp $C1C0 ; CPU:$C19F PRG:019F 4C C0 C1 +; ----------------------------------------------------------------------------- +; Routine: Label_C1A2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C1A2: + sta $053C,x ; CPU:$C1A2 PRG:01A2 9D 3C 05 + jsr $C200 ; CPU:$C1A5 PRG:01A5 20 00 C2 + lda Zp6B ; CPU:$C1A8 PRG:01A8 A5 6B + sta $0546,x ; CPU:$C1AA PRG:01AA 9D 46 05 + lda Zp6C ; CPU:$C1AD PRG:01AD A5 6C + sta $054B,x ; CPU:$C1AF PRG:01AF 9D 4B 05 + ldy #$00 ; CPU:$C1B2 PRG:01B2 A0 00 + lda (Zp69),y ; CPU:$C1B4 PRG:01B4 B1 69 + cmp #$DF ; CPU:$C1B6 PRG:01B6 C9 DF + bcs Label_C1C0 ; CPU:$C1B8 PRG:01B8 B0 06 + lda $0569,x ; CPU:$C1BA PRG:01BA BD 69 05 + jmp $C1DA ; CPU:$C1BD PRG:01BD 4C DA C1 +; ----------------------------------------------------------------------------- +; Routine: Label_C1C0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C1C0: + sec ; CPU:$C1C0 PRG:01C0 38 + sbc #$DF ; CPU:$C1C1 PRG:01C1 E9 DF + bne Label_C1D1 ; CPU:$C1C3 PRG:01C3 D0 0C + jsr $C3FC ; CPU:$C1C5 PRG:01C5 20 FC C3 + ldy #$00 ; CPU:$C1C8 PRG:01C8 A0 00 + lda (Zp69),y ; CPU:$C1CA PRG:01CA B1 69 + ldx Zp6D ; CPU:$C1CC PRG:01CC A6 6D + jmp $C1D5 ; CPU:$C1CE PRG:01CE 4C D5 C1 +; ----------------------------------------------------------------------------- +; Routine: Label_C1D1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C1D1: + tay ; CPU:$C1D1 PRG:01D1 A8 + lda $C543,y ; CPU:$C1D2 PRG:01D2 B9 43 C5 +; ----------------------------------------------------------------------------- +; Routine: Label_C1D5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C1D5: + pha ; CPU:$C1D5 PRG:01D5 48 + jsr $C3FC ; CPU:$C1D6 PRG:01D6 20 FC C3 + pla ; CPU:$C1D9 PRG:01D9 68 +; ----------------------------------------------------------------------------- +; Routine: Label_C1DA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C1DA: + ldx Zp6D ; CPU:$C1DA PRG:01DA A6 6D + sta $0537,x ; CPU:$C1DC PRG:01DC 9D 37 05 + sta $0569,x ; CPU:$C1DF PRG:01DF 9D 69 05 + lda Zp69 ; CPU:$C1E2 PRG:01E2 A5 69 + sta $0528,x ; CPU:$C1E4 PRG:01E4 9D 28 05 + lda Zp6A ; CPU:$C1E7 PRG:01E7 A5 6A + sta $052D,x ; CPU:$C1E9 PRG:01E9 9D 2D 05 + lda #$00 ; CPU:$C1EC PRG:01EC A9 00 + sta $0532,x ; CPU:$C1EE PRG:01EE 9D 32 05 + sta $055A,x ; CPU:$C1F1 PRG:01F1 9D 5A 05 + sta $0564,x ; CPU:$C1F4 PRG:01F4 9D 64 05 + sta $0541,x ; CPU:$C1F7 PRG:01F7 9D 41 05 + lda #$01 ; CPU:$C1FA PRG:01FA A9 01 + sta $055F,x ; CPU:$C1FC PRG:01FC 9D 5F 05 + rts ; CPU:$C1FF PRG:01FF 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C200 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C200: + pha ; CPU:$C200 PRG:0200 48 + jsr $C3FC ; CPU:$C201 PRG:0201 20 FC C3 + pla ; CPU:$C204 PRG:0204 68 +; ----------------------------------------------------------------------------- +; Routine: Label_C205 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C205: + sta Zp6B ; CPU:$C205 PRG:0205 85 6B + bne Label_C20C ; CPU:$C207 PRG:0207 D0 03 + sta Zp6C ; CPU:$C209 PRG:0209 85 6C + rts ; CPU:$C20B PRG:020B 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C20C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C20C: + ldx Zp6D ; CPU:$C20C PRG:020C A6 6D + lda $0523,x ; CPU:$C20E PRG:020E BD 23 05 + cmp #$03 ; CPU:$C211 PRG:0211 C9 03 + bne Label_C21C ; CPU:$C213 PRG:0213 D0 07 + lda #$01 ; CPU:$C215 PRG:0215 A9 01 + sta Zp6C ; CPU:$C217 PRG:0217 85 6C + dec Zp6B ; CPU:$C219 PRG:0219 C6 6B + rts ; CPU:$C21B PRG:021B 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C21C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C21C: + lda Zp6B ; CPU:$C21C PRG:021C A5 6B + clc ; CPU:$C21E PRG:021E 18 + adc $0519,x ; CPU:$C21F PRG:021F 7D 19 05 + asl a ; CPU:$C222 PRG:0222 0A + tay ; CPU:$C223 PRG:0223 A8 + lda $C478,y ; CPU:$C224 PRG:0224 B9 78 C4 + sta Zp6B ; CPU:$C227 PRG:0227 85 6B + lda $C479,y ; CPU:$C229 PRG:0229 B9 79 C4 + sta Zp6C ; CPU:$C22C PRG:022C 85 6C + rts ; CPU:$C22E PRG:022E 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C22F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C22F: + lda #$00 ; CPU:$C22F PRG:022F A9 00 + sta Zp6E ; CPU:$C231 PRG:0231 85 6E + ldx Zp6D ; CPU:$C233 PRG:0233 A6 6D + lda $0523,x ; CPU:$C235 PRG:0235 BD 23 05 + cmp #$02 ; CPU:$C238 PRG:0238 C9 02 + beq Label_C286 ; CPU:$C23A PRG:023A F0 4A + lda $050A,x ; CPU:$C23C PRG:023C BD 0A 05 + sta Zp6F ; CPU:$C23F PRG:023F 85 6F + and #$10 ; CPU:$C241 PRG:0241 29 10 + beq Label_C286 ; CPU:$C243 PRG:0243 F0 41 + lda $050F,x ; CPU:$C245 PRG:0245 BD 0F 05 + beq Label_C286 ; CPU:$C248 PRG:0248 F0 3C + asl a ; CPU:$C24A PRG:024A 0A + tay ; CPU:$C24B PRG:024B A8 + lda $C559,y ; CPU:$C24C PRG:024C B9 59 C5 + sta Zp6B ; CPU:$C24F PRG:024F 85 6B + lda $C55A,y ; CPU:$C251 PRG:0251 B9 5A C5 + sta Zp6C ; CPU:$C254 PRG:0254 85 6C + ldy $055A,x ; CPU:$C256 PRG:0256 BC 5A 05 + jsr $C28D ; CPU:$C259 PRG:0259 20 8D C2 + iny ; CPU:$C25C PRG:025C C8 + tya ; CPU:$C25D PRG:025D 98 + sta $055A,x ; CPU:$C25E PRG:025E 9D 5A 05 + lda Zp6B ; CPU:$C261 PRG:0261 A5 6B + eor #$FF ; CPU:$C263 PRG:0263 49 FF + clc ; CPU:$C265 PRG:0265 18 + adc #$10 ; CPU:$C266 PRG:0266 69 10 + sta Zp6B ; CPU:$C268 PRG:0268 85 6B + lda Zp6F ; CPU:$C26A PRG:026A A5 6F + and #$0F ; CPU:$C26C PRG:026C 29 0F + sec ; CPU:$C26E PRG:026E 38 + sbc Zp6B ; CPU:$C26F PRG:026F E5 6B + bcs Label_C275 ; CPU:$C271 PRG:0271 B0 02 + lda #$00 ; CPU:$C273 PRG:0273 A9 00 +; ----------------------------------------------------------------------------- +; Routine: Label_C275 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C275: + sta Zp6F ; CPU:$C275 PRG:0275 85 6F + lda $050A,x ; CPU:$C277 PRG:0277 BD 0A 05 + and #$F0 ; CPU:$C27A PRG:027A 29 F0 + ora Zp6F ; CPU:$C27C PRG:027C 05 6F + sta $056E,x ; CPU:$C27E PRG:027E 9D 6E 05 + lda #$01 ; CPU:$C281 PRG:0281 A9 01 + sta Zp6E ; CPU:$C283 PRG:0283 85 6E + rts ; CPU:$C285 PRG:0285 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C286 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C286: + lda $050A,x ; CPU:$C286 PRG:0286 BD 0A 05 + sta $056E,x ; CPU:$C289 PRG:0289 9D 6E 05 + rts ; CPU:$C28C PRG:028C 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C28D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C28D: + lda (Zp6B),y ; CPU:$C28D PRG:028D B1 6B + bmi Label_C294 ; CPU:$C28F PRG:028F 30 03 + sta Zp6B ; CPU:$C291 PRG:0291 85 6B + rts ; CPU:$C293 PRG:0293 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C294 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C294: + cmp #$80 ; CPU:$C294 PRG:0294 C9 80 + bne Label_C29E ; CPU:$C296 PRG:0296 D0 06 + dey ; CPU:$C298 PRG:0298 88 + lda (Zp6B),y ; CPU:$C299 PRG:0299 B1 6B + sta Zp6B ; CPU:$C29B PRG:029B 85 6B + rts ; CPU:$C29D PRG:029D 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C29E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C29E: + cmp #$81 ; CPU:$C29E PRG:029E C9 81 + bne Label_C2AD ; CPU:$C2A0 PRG:02A0 D0 0B + tya ; CPU:$C2A2 PRG:02A2 98 + iny ; CPU:$C2A3 PRG:02A3 C8 + sec ; CPU:$C2A4 PRG:02A4 38 + sbc (Zp6B),y ; CPU:$C2A5 PRG:02A5 F1 6B + tay ; CPU:$C2A7 PRG:02A7 A8 + lda (Zp6B),y ; CPU:$C2A8 PRG:02A8 B1 6B + sta Zp6B ; CPU:$C2AA PRG:02AA 85 6B + rts ; CPU:$C2AC PRG:02AC 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C2AD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C2AD: + cmp #$82 ; CPU:$C2AD PRG:02AD C9 82 + bne Label_C2B8 ; CPU:$C2AF PRG:02AF D0 07 + ldy #$00 ; CPU:$C2B1 PRG:02B1 A0 00 + lda (Zp6B),y ; CPU:$C2B3 PRG:02B3 B1 6B + sta Zp6B ; CPU:$C2B5 PRG:02B5 85 6B + rts ; CPU:$C2B7 PRG:02B7 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C2B8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C2B8: + sta Zp6B ; CPU:$C2B8 PRG:02B8 85 6B + rts ; CPU:$C2BA PRG:02BA 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C2BB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C2BB: + lda #$00 ; CPU:$C2BB PRG:02BB A9 00 + sta Zp6F ; CPU:$C2BD PRG:02BD 85 6F + ldx Zp6D ; CPU:$C2BF PRG:02BF A6 6D + lda $0514,x ; CPU:$C2C1 PRG:02C1 BD 14 05 + bmi Label_C2CA ; CPU:$C2C4 PRG:02C4 30 04 + and #$7F ; CPU:$C2C6 PRG:02C6 29 7F + bne Label_C2CB ; CPU:$C2C8 PRG:02C8 D0 01 +; ----------------------------------------------------------------------------- +; Routine: Label_C2CA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C2CA: + rts ; CPU:$C2CA PRG:02CA 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C2CB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C2CB: + dec $055F,x ; CPU:$C2CB PRG:02CB DE 5F 05 + bne Label_C2CA ; CPU:$C2CE PRG:02CE D0 FA + asl a ; CPU:$C2D0 PRG:02D0 0A + tay ; CPU:$C2D1 PRG:02D1 A8 + lda $C552,y ; CPU:$C2D2 PRG:02D2 B9 52 C5 + sta Zp6B ; CPU:$C2D5 PRG:02D5 85 6B + lda $C553,y ; CPU:$C2D7 PRG:02D7 B9 53 C5 + sta Zp6C ; CPU:$C2DA PRG:02DA 85 6C + ldy $0564,x ; CPU:$C2DC PRG:02DC BC 64 05 + lda (Zp6B),y ; CPU:$C2DF PRG:02DF B1 6B + bpl Label_C306 ; CPU:$C2E1 PRG:02E1 10 23 + cmp #$80 ; CPU:$C2E3 PRG:02E3 C9 80 + bne Label_C2EC ; CPU:$C2E5 PRG:02E5 D0 05 + dey ; CPU:$C2E7 PRG:02E7 88 + dey ; CPU:$C2E8 PRG:02E8 88 + jmp $C304 ; CPU:$C2E9 PRG:02E9 4C 04 C3 +; ----------------------------------------------------------------------------- +; Routine: Label_C2EC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C2EC: + cmp #$81 ; CPU:$C2EC PRG:02EC C9 81 + bne Label_C2FE ; CPU:$C2EE PRG:02EE D0 0E + iny ; CPU:$C2F0 PRG:02F0 C8 + lda (Zp6B),y ; CPU:$C2F1 PRG:02F1 B1 6B + sta Zp6F ; CPU:$C2F3 PRG:02F3 85 6F + dey ; CPU:$C2F5 PRG:02F5 88 + tya ; CPU:$C2F6 PRG:02F6 98 + sec ; CPU:$C2F7 PRG:02F7 38 + sbc Zp6F ; CPU:$C2F8 PRG:02F8 E5 6F + tay ; CPU:$C2FA PRG:02FA A8 + jmp $C304 ; CPU:$C2FB PRG:02FB 4C 04 C3 +; ----------------------------------------------------------------------------- +; Routine: Label_C2FE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C2FE: + cmp #$82 ; CPU:$C2FE PRG:02FE C9 82 + bne Label_C306 ; CPU:$C300 PRG:0300 D0 04 + ldy #$00 ; CPU:$C302 PRG:0302 A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_C304 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C304: + lda (Zp6B),y ; CPU:$C304 PRG:0304 B1 6B +; ----------------------------------------------------------------------------- +; Routine: Label_C306 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C306: + sta $055F,x ; CPU:$C306 PRG:0306 9D 5F 05 + iny ; CPU:$C309 PRG:0309 C8 + lda (Zp6B),y ; CPU:$C30A PRG:030A B1 6B + sta Zp6F ; CPU:$C30C PRG:030C 85 6F + iny ; CPU:$C30E PRG:030E C8 + tya ; CPU:$C30F PRG:030F 98 + sta $0564,x ; CPU:$C310 PRG:0310 9D 64 05 + rts ; CPU:$C313 PRG:0313 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C314 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C314: + ldx Zp6D ; CPU:$C314 PRG:0314 A6 6D + lda $0500,x ; CPU:$C316 PRG:0316 BD 00 05 + and #$20 ; CPU:$C319 PRG:0319 29 20 + beq Label_C32A ; CPU:$C31B PRG:031B F0 0D + ldy #$10 ; CPU:$C31D PRG:031D A0 10 + lda #$00 ; CPU:$C31F PRG:031F A9 00 +; ----------------------------------------------------------------------------- +; Routine: Label_C321 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C321: + sta a:$006F,y ; CPU:$C321 PRG:0321 99 6F 00 + dey ; CPU:$C324 PRG:0324 88 + bne Label_C321 ; CPU:$C325 PRG:0325 D0 FA + sta $05F0 ; CPU:$C327 PRG:0327 8D F0 05 +; ----------------------------------------------------------------------------- +; Routine: Label_C32A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C32A: + lda $0500,x ; CPU:$C32A PRG:032A BD 00 05 + and #$01 ; CPU:$C32D PRG:032D 29 01 + bne Label_C332 ; CPU:$C32F PRG:032F D0 01 +; ----------------------------------------------------------------------------- +; Routine: Label_C331 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C331: + rts ; CPU:$C331 PRG:0331 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C332 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C332: + lda $0523,x ; CPU:$C332 PRG:0332 BD 23 05 + tay ; CPU:$C335 PRG:0335 A8 + lda $C3B8,y ; CPU:$C336 PRG:0336 B9 B8 C3 + and $05F0 ; CPU:$C339 PRG:0339 2D F0 05 + sta $05F0 ; CPU:$C33C PRG:033C 8D F0 05 + tya ; CPU:$C33F PRG:033F 98 + asl a ; CPU:$C340 PRG:0340 0A + asl a ; CPU:$C341 PRG:0341 0A + tay ; CPU:$C342 PRG:0342 A8 + lda #$00 ; CPU:$C343 PRG:0343 A9 00 + sta a:$0070,y ; CPU:$C345 PRG:0345 99 70 00 + sta a:$0071,y ; CPU:$C348 PRG:0348 99 71 00 + sta a:$0072,y ; CPU:$C34B PRG:034B 99 72 00 + sta a:$0073,y ; CPU:$C34E PRG:034E 99 73 00 + lda $0546,x ; CPU:$C351 PRG:0351 BD 46 05 + ora $054B,x ; CPU:$C354 PRG:0354 1D 4B 05 + beq Label_C331 ; CPU:$C357 PRG:0357 F0 D8 + lda $0532,x ; CPU:$C359 PRG:0359 BD 32 05 + ora $0541,x ; CPU:$C35C PRG:035C 1D 41 05 + bne Label_C39F ; CPU:$C35F PRG:035F D0 3E + lda #$01 ; CPU:$C361 PRG:0361 A9 01 + sta a:$0070,y ; CPU:$C363 PRG:0363 99 70 00 + sta a:$0072,y ; CPU:$C366 PRG:0366 99 72 00 + sta a:$0073,y ; CPU:$C369 PRG:0369 99 73 00 + lda $0546,x ; CPU:$C36C PRG:036C BD 46 05 + sta $05E2,y ; CPU:$C36F PRG:036F 99 E2 05 + lda $050F,x ; CPU:$C372 PRG:0372 BD 0F 05 + and #$F8 ; CPU:$C375 PRG:0375 29 F8 + ora $054B,x ; CPU:$C377 PRG:0377 1D 4B 05 + sta $05E3,y ; CPU:$C37A PRG:037A 99 E3 05 + lda $056E,x ; CPU:$C37D PRG:037D BD 6E 05 + sta $05E0,y ; CPU:$C380 PRG:0380 99 E0 05 + lda $0514,x ; CPU:$C383 PRG:0383 BD 14 05 + bmi Label_C38A ; CPU:$C386 PRG:0386 30 02 + lda Zp6F ; CPU:$C388 PRG:0388 A5 6F +; ----------------------------------------------------------------------------- +; Routine: Label_C38A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C38A: + sta $05E1,y ; CPU:$C38A PRG:038A 99 E1 05 + lda #$01 ; CPU:$C38D PRG:038D A9 01 + sta a:$0071,y ; CPU:$C38F PRG:038F 99 71 00 +; ----------------------------------------------------------------------------- +; Routine: Label_C392 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C392: + ldy $0523,x ; CPU:$C392 PRG:0392 BC 23 05 + lda $C3B4,y ; CPU:$C395 PRG:0395 B9 B4 C3 + ora $05F0 ; CPU:$C398 PRG:0398 0D F0 05 + sta $05F0 ; CPU:$C39B PRG:039B 8D F0 05 + rts ; CPU:$C39E PRG:039E 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C39F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C39F: + lda Zp6E ; CPU:$C39F PRG:039F A5 6E + beq Label_C3AE ; CPU:$C3A1 PRG:03A1 F0 0B + lda $056E,x ; CPU:$C3A3 PRG:03A3 BD 6E 05 + sta $05E0,y ; CPU:$C3A6 PRG:03A6 99 E0 05 + lda #$01 ; CPU:$C3A9 PRG:03A9 A9 01 + sta a:$0070,y ; CPU:$C3AB PRG:03AB 99 70 00 +; ----------------------------------------------------------------------------- +; Routine: Label_C3AE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C3AE: + lda Zp6F ; CPU:$C3AE PRG:03AE A5 6F + bne Label_C38A ; CPU:$C3B0 PRG:03B0 D0 D8 + beq Label_C392 ; CPU:$C3B2 PRG:03B2 F0 DE + ora (Zp02,x) ; CPU:$C3B4 PRG:03B4 01 02 + .byte $04, $08 ; CPU:$C3B6 PRG:03B6 04 08 -- nop Zp08 (undocumented; ca65 cannot encode) + inc $FBFD,x ; CPU:$C3B8 PRG:03B8 FE FD FB +; ---- data $C3BB-$C3BB (1 bytes) ---- + .byte $F7 ; CPU:$C3BB PRG:03BB F7 +; ----------------------------------------------------------------------------- +; Routine: Label_C3BC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C3BC: + ldx #$08 ; CPU:$C3BC PRG:03BC A2 08 +; ----------------------------------------------------------------------------- +; Routine: Label_C3BE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C3BE: + lda #$00 ; CPU:$C3BE PRG:03BE A9 00 + sta Zp5F,x ; CPU:$C3C0 PRG:03C0 95 5F + dex ; CPU:$C3C2 PRG:03C2 CA + bne Label_C3BE ; CPU:$C3C3 PRG:03C3 D0 F9 + ldx #$05 ; CPU:$C3C5 PRG:03C5 A2 05 +; ----------------------------------------------------------------------------- +; Routine: Label_C3C7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C3C7: + lda #$00 ; CPU:$C3C7 PRG:03C7 A9 00 + sta $04FF,x ; CPU:$C3C9 PRG:03C9 9D FF 04 + lda #$00 ; CPU:$C3CC PRG:03CC A9 00 + sta $0522,x ; CPU:$C3CE PRG:03CE 9D 22 05 + dex ; CPU:$C3D1 PRG:03D1 CA + bne Label_C3C7 ; CPU:$C3D2 PRG:03D2 D0 F3 + lda #$00 ; CPU:$C3D4 PRG:03D4 A9 00 + sta $4015 ; CPU:$C3D6 PRG:03D6 8D 15 40 + rts ; CPU:$C3D9 PRG:03D9 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C3DA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C3DA: + sta Zp6B ; CPU:$C3DA PRG:03DA 85 6B + stx Zp6C ; CPU:$C3DC PRG:03DC 86 6C + ldx #$00 ; CPU:$C3DE PRG:03DE A2 00 +; ----------------------------------------------------------------------------- +; Routine: Label_C3E0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C3E0: + lda Zp60,x ; CPU:$C3E0 PRG:03E0 B5 60 + bne Label_C3EB ; CPU:$C3E2 PRG:03E2 D0 07 + lda Zp6B ; CPU:$C3E4 PRG:03E4 A5 6B + sta Zp60,x ; CPU:$C3E6 PRG:03E6 95 60 + jmp $C3F0 ; CPU:$C3E8 PRG:03E8 4C F0 C3 +; ----------------------------------------------------------------------------- +; Routine: Label_C3EB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C3EB: + inx ; CPU:$C3EB PRG:03EB E8 + cpx #$08 ; CPU:$C3EC PRG:03EC E0 08 + bne Label_C3E0 ; CPU:$C3EE PRG:03EE D0 F0 +; ----------------------------------------------------------------------------- +; Routine: Label_C3F0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C3F0: + lda Zp6B ; CPU:$C3F0 PRG:03F0 A5 6B + ldx Zp6C ; CPU:$C3F2 PRG:03F2 A6 6C + rts ; CPU:$C3F4 PRG:03F4 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C3F5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C3F5: + lda #$00 ; CPU:$C3F5 PRG:03F5 A9 00 + sta Zp68 ; CPU:$C3F7 PRG:03F7 85 68 + jmp $C3BC ; CPU:$C3F9 PRG:03F9 4C BC C3 +; ----------------------------------------------------------------------------- +; Routine: Label_C3FC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C3FC: + inc Zp69 ; CPU:$C3FC PRG:03FC E6 69 + beq Label_C401 ; CPU:$C3FE PRG:03FE F0 01 + rts ; CPU:$C400 PRG:0400 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C401 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C401: + inc Zp6A ; CPU:$C401 PRG:0401 E6 6A + rts ; CPU:$C403 PRG:0403 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C404 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C404: + sta Zp6E ; CPU:$C404 PRG:0404 85 6E + bne Label_C409 ; CPU:$C406 PRG:0406 D0 01 + rts ; CPU:$C408 PRG:0408 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C409 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C409: + bpl Label_C416 ; CPU:$C409 PRG:0409 10 0B + asl a ; CPU:$C40B PRG:040B 0A + tax ; CPU:$C40C PRG:040C AA + lda $C523,x ; CPU:$C40D PRG:040D BD 23 C5 + pha ; CPU:$C410 PRG:0410 48 + lda $C522,x ; CPU:$C411 PRG:0411 BD 22 C5 + pha ; CPU:$C414 PRG:0414 48 +; ----------------------------------------------------------------------------- +; Routine: Label_C415 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C415: + rts ; CPU:$C415 PRG:0415 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C416 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C416: + asl a ; CPU:$C416 PRG:0416 0A + tax ; CPU:$C417 PRG:0417 AA + lda $C523,x ; CPU:$C418 PRG:0418 BD 23 C5 + sta Zp6A ; CPU:$C41B PRG:041B 85 6A + lda $C522,x ; CPU:$C41D PRG:041D BD 22 C5 + sta Zp69 ; CPU:$C420 PRG:0420 85 69 + ldy #$00 ; CPU:$C422 PRG:0422 A0 00 + lda (Zp69),y ; CPU:$C424 PRG:0424 B1 69 + iny ; CPU:$C426 PRG:0426 C8 + sta Zp6F ; CPU:$C427 PRG:0427 85 6F +; ----------------------------------------------------------------------------- +; Routine: Label_C429 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C429: + lda (Zp69),y ; CPU:$C429 PRG:0429 B1 69 + iny ; CPU:$C42B PRG:042B C8 + tax ; CPU:$C42C PRG:042C AA + lda (Zp69),y ; CPU:$C42D PRG:042D B1 69 + cmp #$80 ; CPU:$C42F PRG:042F C9 80 + beq Label_C471 ; CPU:$C431 PRG:0431 F0 3E + lda $0500,x ; CPU:$C433 PRG:0433 BD 00 05 + and #$40 ; CPU:$C436 PRG:0436 29 40 + bne Label_C415 ; CPU:$C438 PRG:0438 D0 DB + lda Zp6E ; CPU:$C43A PRG:043A A5 6E + sta $0582,x ; CPU:$C43C PRG:043C 9D 82 05 + stx Zp6B ; CPU:$C43F PRG:043F 86 6B + lda #$0A ; CPU:$C441 PRG:0441 A9 0A + sta Zp6C ; CPU:$C443 PRG:0443 85 6C +; ----------------------------------------------------------------------------- +; Routine: Label_C445 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C445: + lda (Zp69),y ; CPU:$C445 PRG:0445 B1 69 + iny ; CPU:$C447 PRG:0447 C8 + sta $0500,x ; CPU:$C448 PRG:0448 9D 00 05 + txa ; CPU:$C44B PRG:044B 8A + clc ; CPU:$C44C PRG:044C 18 + adc #$05 ; CPU:$C44D PRG:044D 69 05 + tax ; CPU:$C44F PRG:044F AA + dec Zp6C ; CPU:$C450 PRG:0450 C6 6C + bne Label_C445 ; CPU:$C452 PRG:0452 D0 F1 + ldx Zp6B ; CPU:$C454 PRG:0454 A6 6B + lda #$00 ; CPU:$C456 PRG:0456 A9 00 + sta $0532,x ; CPU:$C458 PRG:0458 9D 32 05 + lda $051E,x ; CPU:$C45B PRG:045B BD 1E 05 + sta $0541,x ; CPU:$C45E PRG:045E 9D 41 05 + dec $0541,x ; CPU:$C461 PRG:0461 DE 41 05 + lda #$01 ; CPU:$C464 PRG:0464 A9 01 + sta $0537,x ; CPU:$C466 PRG:0466 9D 37 05 + lda #$06 ; CPU:$C469 PRG:0469 A9 06 + sta $0569,x ; CPU:$C46B PRG:046B 9D 69 05 + jmp $C475 ; CPU:$C46E PRG:046E 4C 75 C4 +; ----------------------------------------------------------------------------- +; Routine: Label_C471 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C471: + sta $0500,x ; CPU:$C471 PRG:0471 9D 00 05 + iny ; CPU:$C474 PRG:0474 C8 +; ----------------------------------------------------------------------------- +; Routine: Label_C475 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C475: + dec Zp6F ; CPU:$C475 PRG:0475 C6 6F + bne Label_C429 ; CPU:$C477 PRG:0477 D0 B0 + rts ; CPU:$C479 PRG:0479 60 +; ---- data $C47A-$CA20 (1447 bytes) ---- +; referenced by `lda $C543,y` at $C1D2 (operand $C543 falls inside this region) +; referenced by `lda $C559,y` at $C24C (operand $C559 falls inside this region) +; referenced by `lda $C55A,y` at $C251 (operand $C55A falls inside this region) +; referenced by `lda $C552,y` at $C2D2 (operand $C552 falls inside this region) +; referenced by `lda $C553,y` at $C2D7 (operand $C553 falls inside this region) +; referenced by `lda $C523,x` at $C40D (operand $C523 falls inside this region) +; ... and 3 further references from decoded code + .byte $FF, $03, $C7, $03, $90, $03, $5D, $03, $2D, $03, $FF, $02, $D4, $02, $AB, $02 ; CPU:$C47A PRG:047A FF 03 C7 03 90 03 5D 03 2D 03 FF 02 D4 02 AB 02 + .byte $85, $02, $61, $02, $3F, $02, $1E, $02, $FF, $01, $E3, $01, $C8, $01, $AE, $01 ; CPU:$C48A PRG:048A 85 02 61 02 3F 02 1E 02 FF 01 E3 01 C8 01 AE 01 + .byte $96, $01, $7F, $01, $6A, $01, $55, $01, $42, $01, $30, $01, $1F, $01, $0F, $01 ; CPU:$C49A PRG:049A 96 01 7F 01 6A 01 55 01 42 01 30 01 1F 01 0F 01 + .byte $FF, $00, $F1, $00, $E4, $00, $D7, $00, $CB, $00, $BF, $00, $B5, $00, $AA, $00 ; CPU:$C4AA PRG:04AA FF 00 F1 00 E4 00 D7 00 CB 00 BF 00 B5 00 AA 00 + .byte $A1, $00, $98, $00, $8F, $00, $87, $00, $7F, $00, $78, $00, $72, $00, $6B, $00 ; CPU:$C4BA PRG:04BA A1 00 98 00 8F 00 87 00 7F 00 78 00 72 00 6B 00 + .byte $65, $00, $5F, $00, $5A, $00, $55, $00, $50, $00, $4C, $00, $47, $00, $43, $00 ; CPU:$C4CA PRG:04CA 65 00 5F 00 5A 00 55 00 50 00 4C 00 47 00 43 00 + .byte $3F, $00, $3C, $00, $39, $00, $35, $00, $32, $00, $2F, $00, $2D, $00, $2A, $00 ; CPU:$C4DA PRG:04DA 3F 00 3C 00 39 00 35 00 32 00 2F 00 2D 00 2A 00 + .byte $28, $00, $26, $00, $23, $00, $21, $00, $1F, $00, $1E, $00, $1C, $00, $1A, $00 ; CPU:$C4EA PRG:04EA 28 00 26 00 23 00 21 00 1F 00 1E 00 1C 00 1A 00 + .byte $19, $00, $17, $00, $16, $00, $15, $00, $14, $00, $13, $00, $11, $00, $10, $00 ; CPU:$C4FA PRG:04FA 19 00 17 00 16 00 15 00 14 00 13 00 11 00 10 00 + .byte $0F, $00, $0F, $00, $0E, $00, $0D, $00, $0C, $00, $0B, $00, $0B, $00, $0A, $00 ; CPU:$C50A PRG:050A 0F 00 0F 00 0E 00 0D 00 0C 00 0B 00 0B 00 0A 00 + .byte $0A, $00, $09, $00, $08, $00, $08, $00, $BB, $C3, $C0, $C5, $E3, $C5, $F6, $C5 ; CPU:$C51A PRG:051A 0A 00 09 00 08 00 08 00 BB C3 C0 C5 E3 C5 F6 C5 + .byte $06, $C6, $18, $C6, $27, $C6, $41, $C6, $88, $C9, $5B, $C6, $6B, $C6, $27, $C7 ; CPU:$C52A PRG:052A 06 C6 18 C6 27 C6 41 C6 88 C9 5B C6 6B C6 27 C7 + .byte $0C, $C8, $AB, $C8, $FC, $C8, $41, $C9, $BC, $C9, $01, $02, $03, $04, $06, $08 ; CPU:$C53A PRG:053A 0C C8 AB C8 FC C8 41 C9 BC C9 01 02 03 04 06 08 + .byte $0C, $10, $18, $20, $30, $40, $60, $80, $C0, $00, $56, $C5, $04, $BC, $04, $C4 ; CPU:$C54A PRG:054A 0C 10 18 20 30 40 60 80 C0 00 56 C5 04 BC 04 C4 + .byte $82, $6F, $C5, $6F, $C5, $77, $C5, $7F, $C5, $87, $C5, $87, $C5, $95, $C5, $95 ; CPU:$C55A PRG:055A 82 6F C5 6F C5 77 C5 7F C5 87 C5 87 C5 95 C5 95 + .byte $C5, $95, $C5, $AF, $C5, $0F, $0D, $0A, $07, $04, $02, $00, $80, $0D, $0E, $0F ; CPU:$C56A PRG:056A C5 95 C5 AF C5 0F 0D 0A 07 04 02 00 80 0D 0E 0F + .byte $0E, $0C, $0A, $08, $80, $0F, $0D, $0B, $0A, $0A, $0A, $08, $80, $06, $0C, $0E ; CPU:$C57A PRG:057A 0E 0C 0A 08 80 0F 0D 0B 0A 0A 0A 08 80 06 0C 0E + .byte $0F, $0F, $0F, $0F, $0F, $0D, $0B, $08, $04, $00, $80, $07, $09, $0C, $0F, $0F ; CPU:$C58A PRG:058A 0F 0F 0F 0F 0F 0D 0B 08 04 00 80 07 09 0C 0F 0F + .byte $0F, $0F, $0F, $0E, $0E, $0E, $0E, $0D, $0D, $0D, $0D, $0C, $0C, $0C, $0B, $0B ; CPU:$C59A PRG:059A 0F 0F 0F 0E 0E 0E 0E 0D 0D 0D 0D 0C 0C 0C 0B 0B + .byte $0B, $0A, $0A, $09, $80, $08, $0C, $0F, $0D, $0F, $0B, $0D, $09, $0B, $07, $09 ; CPU:$C5AA PRG:05AA 0B 0A 0A 09 80 08 0C 0F 0D 0F 0B 0D 09 0B 07 09 + .byte $05, $07, $03, $05, $00, $80, $01, $03, $01, $00, $B5, $00, $00, $00, $01, $01 ; CPU:$C5BA PRG:05BA 05 07 03 05 00 80 01 03 01 00 B5 00 00 00 01 01 + .byte $CC, $C5, $8C, $1B, $10, $01, $E1, $89, $01, $81, $1B, $CF, $C5, $8C, $1B, $10 ; CPU:$C5CA PRG:05CA CC C5 8C 1B 10 01 E1 89 01 81 1B CF C5 8C 1B 10 + .byte $01, $E1, $89, $FF, $81, $1B, $DA, $C5, $82, $01, $04, $01, $00, $0F, $08, $00 ; CPU:$C5DA PRG:05DA 01 E1 89 FF 81 1B DA C5 82 01 04 01 00 0F 08 00 + .byte $00, $01, $02, $EF, $C5, $2C, $E0, $34, $3C, $44, $4C, $82, $01, $04, $41, $00 ; CPU:$C5EA PRG:05EA 00 01 02 EF C5 2C E0 34 3C 44 4C 82 01 04 41 00 + .byte $3F, $00, $00, $00, $01, $01, $02, $C6, $3D, $E0, $31, $82, $01, $03, $01, $00 ; CPU:$C5FA PRG:05FA 3F 00 00 00 01 01 02 C6 3D E0 31 82 01 03 01 00 + .byte $8F, $01, $00, $F6, $01, $01, $12, $C6, $41, $E0, $4D, $41, $E3, $82, $01, $02 ; CPU:$C60A PRG:060A 8F 01 00 F6 01 01 12 C6 41 E0 4D 41 E3 82 01 02 + .byte $01, $00, $02, $08, $85, $00, $01, $01, $24, $C6, $0D, $E8, $82, $01, $04, $01 ; CPU:$C61A PRG:061A 01 00 02 08 85 00 01 01 24 C6 0D E8 82 01 04 01 + .byte $00, $3F, $00, $8E, $00, $01, $01, $33, $C6, $8C, $1B, $08, $12, $E2, $89, $FE ; CPU:$C62A PRG:062A 00 3F 00 8E 00 01 01 33 C6 8C 1B 08 12 E2 89 FE + .byte $88, $FF, $81, $1B, $36, $C6, $82, $01, $03, $01, $00, $BF, $03, $84, $00, $01 ; CPU:$C63A PRG:063A 88 FF 81 1B 36 C6 82 01 03 01 00 BF 03 84 00 01 + .byte $01, $4D, $C6, $8C, $1B, $08, $2A, $E2, $89, $FE, $88, $01, $81, $1B, $50, $C6 ; CPU:$C64A PRG:064A 01 4D C6 8C 1B 08 2A E2 89 FE 88 01 81 1B 50 C6 + .byte $82, $01, $04, $41, $00, $3F, $00, $00, $00, $01, $01, $67, $C6, $42, $E0, $00 ; CPU:$C65A PRG:065A 82 01 04 41 00 3F 00 00 00 01 01 67 C6 42 E0 00 + .byte $82, $03, $02, $21, $00, $BF, $09, $00, $F4, $02, $00, $8D, $C6, $03, $01, $00 ; CPU:$C66A PRG:066A 82 03 02 21 00 BF 09 00 F4 02 00 8D C6 03 01 00 + .byte $FF, $0A, $00, $F4, $02, $01, $D9, $C6, $04, $01, $00, $3F, $02, $00, $00, $02 ; CPU:$C67A PRG:067A FF 0A 00 F4 02 01 D9 C6 04 01 00 3F 02 00 00 02 + .byte $03, $09, $C7, $19, $E6, $20, $25, $20, $E4, $23, $DF, $2A, $22, $E3, $20, $1E ; CPU:$C68A PRG:068A 03 09 C7 19 E6 20 25 20 E4 23 DF 2A 22 E3 20 1E + .byte $19, $E6, $20, $25, $20, $E4, $23, $DF, $2A, $00, $E6, $1E, $25, $2A, $25, $E4 ; CPU:$C69A PRG:069A 19 E6 20 25 20 E4 23 DF 2A 00 E6 1E 25 2A 25 E4 + .byte $28, $DF, $2A, $27, $E3, $25, $23, $19, $E6, $20, $25, $20, $E4, $23, $DF, $2A ; CPU:$C6AA PRG:06AA 28 DF 2A 27 E3 25 23 19 E6 20 25 20 E4 23 DF 2A + .byte $20, $E3, $22, $23, $20, $E6, $27, $2A, $2C, $E5, $2A, $E3, $1E, $E6, $25, $28 ; CPU:$C6BA PRG:06BA 20 E3 22 23 20 E6 27 2A 2C E5 2A E3 1E E6 25 28 + .byte $2A, $E5, $27, $E3, $2C, $E4, $25, $DF, $2A, $00, $DF, $34, $80, $8D, $C6, $0D ; CPU:$C6CA PRG:06CA 2A E5 27 E3 2C E4 25 DF 2A 00 DF 34 80 8D C6 0D + .byte $E6, $11, $14, $16, $17, $16, $14, $11, $0D, $11, $14, $16, $17, $16, $14, $11 ; CPU:$C6DA PRG:06DA E6 11 14 16 17 16 14 11 0D 11 14 16 17 16 14 11 + .byte $12, $16, $19, $1B, $1C, $1B, $19, $16, $0D, $11, $14, $16, $17, $16, $14, $11 ; CPU:$C6EA PRG:06EA 12 16 19 1B 1C 1B 19 16 0D 11 14 16 17 16 14 11 + .byte $14, $18, $1B, $18, $12, $16, $19, $16, $0D, $0D, $DF, $58, $80, $D9, $C6, $8C ; CPU:$C6FA PRG:06FA 14 18 1B 18 12 16 19 16 0D 0D DF 58 80 D9 C6 8C + .byte $1B, $14, $07, $E6, $E3, $00, $07, $81, $1B, $0C, $C7, $07, $E3, $E3, $E3, $DF ; CPU:$C70A PRG:070A 1B 14 07 E6 E3 00 07 81 1B 0C C7 07 E3 E3 E3 DF + .byte $28, $E6, $E3, $00, $07, $07, $E6, $E3, $00, $07, $80, $09, $C7, $03, $02, $21 ; CPU:$C71A PRG:071A 28 E6 E3 00 07 07 E6 E3 00 07 80 09 C7 03 02 21 + .byte $00, $BF, $09, $00, $F6, $02, $00, $49, $C7, $03, $01, $00, $FC, $0A, $00, $F6 ; CPU:$C72A PRG:072A 00 BF 09 00 F6 02 00 49 C7 03 01 00 FC 0A 00 F6 + .byte $02, $01, $B8, $C7, $04, $01, $00, $3A, $02, $00, $00, $02, $03, $FD, $C7, $22 ; CPU:$C73A PRG:073A 02 01 B8 C7 04 01 00 3A 02 00 00 02 03 FD C7 22 + .byte $E8, $00, $E4, $21, $20, $1F, $1E, $E8, $00, $E4, $1D, $1C, $1B, $19, $DF, $12 ; CPU:$C74A PRG:074A E8 00 E4 21 20 1F 1E E8 00 E4 1D 1C 1B 19 DF 12 + .byte $16, $00, $E4, $22, $E6, $1C, $E4, $1B, $19, $DF, $12, $00, $E6, $22, $E8, $00 ; CPU:$C75A PRG:075A 16 00 E4 22 E6 1C E4 1B 19 DF 12 00 E6 22 E8 00 + .byte $E4, $21, $20, $1F, $1E, $E8, $00, $E4, $1D, $1C, $1B, $19, $DF, $12, $16, $00 ; CPU:$C76A PRG:076A E4 21 20 1F 1E E8 00 E4 1D 1C 1B 19 DF 12 16 00 + .byte $E4, $22, $E6, $1C, $1B, $19, $DF, $12, $22, $E6, $25, $EA, $00, $E4, $22, $E4 ; CPU:$C77A PRG:077A E4 22 E6 1C 1B 19 DF 12 22 E6 25 EA 00 E4 22 E4 + .byte $25, $27, $28, $E1, $29, $E3, $2E, $E4, $27, $E6, $25, $E4, $22, $28, $29, $DF ; CPU:$C78A PRG:078A 25 27 28 E1 29 E3 2E E4 27 E6 25 E4 22 28 29 DF + .byte $36, $00, $E6, $22, $25, $EA, $00, $E4, $22, $25, $27, $28, $E1, $29, $E3, $2E ; CPU:$C79A PRG:079A 36 00 E6 22 25 EA 00 E4 22 25 27 28 E1 29 E3 2E + .byte $E4, $27, $E6, $25, $1E, $E4, $1D, $DF, $36, $00, $E6, $80, $49, $C7, $11, $E6 ; CPU:$C7AA PRG:07AA E4 27 E6 25 1E E4 1D DF 36 00 E6 80 49 C7 11 E6 + .byte $11, $16, $11, $0F, $0D, $0C, $11, $16, $16, $15, $15, $14, $13, $12, $0F, $11 ; CPU:$C7BA PRG:07BA 11 16 11 0F 0D 0C 11 16 16 15 15 14 13 12 0F 11 + .byte $E6, $11, $16, $11, $0F, $0D, $0C, $11, $16, $16, $15, $15, $14, $13, $12, $11 ; CPU:$C7CA PRG:07CA E6 11 16 11 0F 0D 0C 11 16 16 15 15 14 13 12 11 + .byte $12, $14, $16, $19, $1B, $17, $15, $12, $14, $17, $19, $17, $14, $11, $0D, $11 ; CPU:$C7DA PRG:07DA 12 14 16 19 1B 17 15 12 14 17 19 17 14 11 0D 11 + .byte $11, $19, $16, $14, $17, $19, $1B, $19, $14, $17, $19, $17, $1B, $18, $11, $0C ; CPU:$C7EA PRG:07EA 11 19 16 14 17 19 1B 19 14 17 19 17 1B 18 11 0C + .byte $80, $B8, $C7, $8C, $1B, $20, $08, $E6, $E3, $00, $08, $81, $1B, $00, $C8, $80 ; CPU:$C7FA PRG:07FA 80 B8 C7 8C 1B 20 08 E6 E3 00 08 81 1B 00 C8 80 + .byte $FD, $C7, $02, $00, $01, $00, $38, $04, $00, $F4, $03, $00, $23, $C8, $01, $01 ; CPU:$C80A PRG:080A FD C7 02 00 01 00 38 04 00 F4 03 00 23 C8 01 01 + .byte $00, $7F, $08, $00, $0C, $03, $02, $67, $C8, $2C, $E2, $20, $25, $20, $2C, $20 ; CPU:$C81A PRG:081A 00 7F 08 00 0C 03 02 67 C8 2C E2 20 25 20 2C 20 + .byte $25, $20, $2C, $20, $25, $20, $2C, $20, $25, $20, $2A, $1E, $23, $1E, $2A, $1E ; CPU:$C82A PRG:082A 25 20 2C 20 25 20 2C 20 25 20 2A 1E 23 1E 2A 1E + .byte $23, $1E, $2A, $1E, $23, $1E, $2A, $1E, $23, $1E, $25, $19, $1E, $19, $25, $19 ; CPU:$C83A PRG:083A 23 1E 2A 1E 23 1E 2A 1E 23 1E 25 19 1E 19 25 19 + .byte $1E, $19, $25, $19, $1E, $19, $25, $19, $1E, $19, $27, $1B, $20, $1B, $27, $1B ; CPU:$C84A PRG:084A 1E 19 25 19 1E 19 25 19 1E 19 27 1B 20 1B 27 1B + .byte $20, $1B, $27, $1B, $20, $1B, $27, $1B, $20, $1B, $80, $23, $C8, $0D, $E2, $00 ; CPU:$C85A PRG:085A 20 1B 27 1B 20 1B 27 1B 20 1B 80 23 C8 0D E2 00 + .byte $19, $0D, $00, $0D, $19, $00, $0D, $00, $19, $0D, $00, $0D, $19, $00, $0B, $00 ; CPU:$C86A PRG:086A 19 0D 00 0D 19 00 0D 00 19 0D 00 0D 19 00 0B 00 + .byte $17, $0B, $00, $0B, $17, $00, $0B, $00, $17, $0B, $00, $0B, $17, $00, $06, $00 ; CPU:$C87A PRG:087A 17 0B 00 0B 17 00 0B 00 17 0B 00 0B 17 00 06 00 + .byte $12, $06, $00, $06, $12, $00, $06, $00, $12, $06, $00, $06, $12, $00, $08, $00 ; CPU:$C88A PRG:088A 12 06 00 06 12 00 06 00 12 06 00 06 12 00 08 00 + .byte $14, $08, $00, $08, $14, $00, $08, $00, $14, $08, $00, $08, $14, $00, $80, $67 ; CPU:$C89A PRG:089A 14 08 00 08 14 00 08 00 14 08 00 08 14 00 80 67 + .byte $C8, $03, $02, $01, $00, $FF, $00, $00, $0C, $02, $02, $CD, $C8, $03, $01, $00 ; CPU:$C8AA PRG:08AA C8 03 02 01 00 FF 00 00 0C 02 02 CD C8 03 01 00 + .byte $FF, $09, $00, $00, $02, $00, $D5, $C8, $04, $01, $00, $BF, $0A, $00, $00, $02 ; CPU:$C8BA PRG:08BA FF 09 00 00 02 00 D5 C8 04 01 00 BF 0A 00 00 02 + .byte $01, $DD, $C8, $2C, $E6, $25, $27, $20, $22, $EA, $82, $25, $E6, $20, $22, $1B ; CPU:$C8CA PRG:08CA 01 DD C8 2C E6 25 27 20 22 EA 82 25 E6 20 22 1B + .byte $1D, $EA, $82, $0D, $E4, $14, $E2, $14, $0D, $E4, $14, $E2, $14, $0D, $E4, $14 ; CPU:$C8DA PRG:08DA 1D EA 82 0D E4 14 E2 14 0D E4 14 E2 14 0D E4 14 + .byte $E2, $14, $0D, $E4, $14, $E2, $14, $12, $16, $12, $16, $12, $16, $12, $16, $16 ; CPU:$C8EA PRG:08EA E2 14 0D E4 14 E2 14 12 16 12 16 12 16 12 16 16 + .byte $E8, $82, $03, $02, $01, $00, $BF, $03, $00, $F8, $02, $00, $1E, $C9, $03, $01 ; CPU:$C8FA PRG:08FA E8 82 03 02 01 00 BF 03 00 F8 02 00 1E C9 03 01 + .byte $00, $FF, $03, $00, $04, $02, $02, $2B, $C9, $04, $01, $00, $FF, $00, $00, $F8 ; CPU:$C90A PRG:090A 00 FF 03 00 04 02 02 2B C9 04 01 00 FF 00 00 F8 + .byte $02, $01, $33, $C9, $25, $E4, $20, $27, $23, $2A, $29, $27, $2A, $2C, $29, $E6 ; CPU:$C91A PRG:091A 02 01 33 C9 25 E4 20 27 23 2A 29 27 2A 2C 29 E6 + .byte $82, $19, $E6, $1B, $1E, $20, $22, $E6, $82, $00, $EA, $31, $E2, $2E, $2C, $2E ; CPU:$C92A PRG:092A 82 19 E6 1B 1E 20 22 E6 82 00 EA 31 E2 2E 2C 2E + .byte $31, $2E, $2C, $2E, $31, $E6, $82, $03, $02, $01, $00, $BF, $06, $00, $F0, $02 ; CPU:$C93A PRG:093A 31 2E 2C 2E 31 E6 82 03 02 01 00 BF 06 00 F0 02 + .byte $00, $63, $C9, $03, $01, $00, $FF, $06, $00, $F0, $02, $01, $70, $C9, $04, $01 ; CPU:$C94A PRG:094A 00 63 C9 03 01 00 FF 06 00 F0 02 01 70 C9 04 01 + .byte $00, $FF, $00, $00, $FC, $02, $02, $7C, $C9, $29, $E6, $87, $09, $29, $E8, $27 ; CPU:$C95A PRG:095A 00 FF 00 00 FC 02 02 7C C9 29 E6 87 09 29 E8 27 + .byte $E6, $2A, $2F, $2E, $EA, $82, $25, $E6, $87, $09, $E8, $23, $E6, $27, $2A, $2A ; CPU:$C96A PRG:096A E6 2A 2F 2E EA 82 25 E6 87 09 E8 23 E6 27 2A 2A + .byte $EA, $82, $20, $E6, $87, $09, $E8, $1E, $E6, $23, $27, $25, $EA, $82, $02, $03 ; CPU:$C97A PRG:097A EA 82 20 E6 87 09 E8 1E E6 23 27 25 EA 82 02 03 + .byte $01, $00, $BF, $06, $00, $F8, $02, $00, $9F, $C9, $04, $01, $00, $FF, $04, $00 ; CPU:$C98A PRG:098A 01 00 BF 06 00 F8 02 00 9F C9 04 01 00 FF 04 00 + .byte $F8, $02, $01, $B4, $C9, $25, $E4, $20, $23, $1E, $25, $20, $22, $1E, $20, $E2 ; CPU:$C99A PRG:099A F8 02 01 B4 C9 25 E4 20 23 1E 25 20 22 1E 20 E2 + .byte $1F, $1E, $1D, $83, $01, $87, $00, $1C, $EA, $82, $19, $E6, $17, $19, $17, $00 ; CPU:$C9AA PRG:09AA 1F 1E 1D 83 01 87 00 1C EA 82 19 E6 17 19 17 00 + .byte $EA, $82, $03, $02, $21, $00, $7F, $09, $00, $00, $02, $00, $DE, $C9, $03, $01 ; CPU:$C9BA PRG:09BA EA 82 03 02 21 00 7F 09 00 00 02 00 DE C9 03 01 + .byte $00, $3F, $0A, $00, $00, $02, $01, $FC, $C9, $04, $01, $00, $3F, $02, $00, $00 ; CPU:$C9CA PRG:09CA 00 3F 0A 00 00 02 01 FC C9 04 01 00 3F 02 00 00 + .byte $02, $03, $0E, $CA, $19, $E2, $1C, $E4, $19, $E2, $1C, $E4, $17, $19, $17, $14 ; CPU:$C9DA PRG:09DA 02 03 0E CA 19 E2 1C E4 19 E2 1C E4 17 19 17 14 + .byte $E6, $19, $E2, $1C, $E4, $19, $E2, $1B, $E4, $17, $19, $E2, $17, $14, $10, $0D ; CPU:$C9EA PRG:09EA E6 19 E2 1C E4 19 E2 1B E4 17 19 E2 17 14 10 0D + .byte $E6, $82, $01, $E4, $01, $08, $04, $06, $0B, $DF, $12, $01, $E4, $01, $08, $04 ; CPU:$C9FA PRG:09FA E6 82 01 E4 01 08 04 06 0B DF 12 01 E4 01 08 04 + .byte $06, $E6, $01, $82, $08, $E6, $05, $08, $05, $E4, $05, $08, $05, $05, $05, $E2 ; CPU:$CA0A PRG:0A0A 06 E6 01 82 08 E6 05 08 05 E4 05 08 05 05 05 E2 + .byte $05, $05, $05, $05, $05, $05, $82 ; CPU:$CA1A PRG:0A1A 05 05 05 05 05 05 82 +; ----------------------------------------------------------------------------- +; Routine: Label_CA21 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CA21: + jsr $CA38 ; CPU:$CA21 PRG:0A21 20 38 CA + lda ZpF1 ; CPU:$CA24 PRG:0A24 A5 F1 + and #$E7 ; CPU:$CA26 PRG:0A26 29 E7 + sta $2001 ; CPU:$CA28 PRG:0A28 8D 01 20 + sta ZpF1 ; CPU:$CA2B PRG:0A2B 85 F1 + rts ; CPU:$CA2D PRG:0A2D 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CA2E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CA2E: + lda ZpF1 ; CPU:$CA2E PRG:0A2E A5 F1 + ora #$18 ; CPU:$CA30 PRG:0A30 09 18 + sta ZpF1 ; CPU:$CA32 PRG:0A32 85 F1 + sta $2001 ; CPU:$CA34 PRG:0A34 8D 01 20 + rts ; CPU:$CA37 PRG:0A37 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CA38 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CA38: + lda ZpF0 ; CPU:$CA38 PRG:0A38 A5 F0 + and #$7F ; CPU:$CA3A PRG:0A3A 29 7F +; ----------------------------------------------------------------------------- +; Routine: Label_CA3C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CA3C: + sta $2000 ; CPU:$CA3C PRG:0A3C 8D 00 20 + sta ZpF0 ; CPU:$CA3F PRG:0A3F 85 F0 + rts ; CPU:$CA41 PRG:0A41 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CA42 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CA42: + jsr $CA52 ; CPU:$CA42 PRG:0A42 20 52 CA + jsr $CA2E ; CPU:$CA45 PRG:0A45 20 2E CA +; ----------------------------------------------------------------------------- +; Routine: Label_CA48 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CA48: + lda ZpF0 ; CPU:$CA48 PRG:0A48 A5 F0 + ora #$80 ; CPU:$CA4A PRG:0A4A 09 80 + sta ZpF0 ; CPU:$CA4C PRG:0A4C 85 F0 + sta $2000 ; CPU:$CA4E PRG:0A4E 8D 00 20 + rts ; CPU:$CA51 PRG:0A51 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CA52 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CA52: + lda ZpF0 ; CPU:$CA52 PRG:0A52 A5 F0 + sta $2000 ; CPU:$CA54 PRG:0A54 8D 00 20 + lda #$00 ; CPU:$CA57 PRG:0A57 A9 00 + sta $2005 ; CPU:$CA59 PRG:0A59 8D 05 20 + sta $2005 ; CPU:$CA5C PRG:0A5C 8D 05 20 + rts ; CPU:$CA5F PRG:0A5F 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CA60 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CA60: + lda ZpF0 ; CPU:$CA60 PRG:0A60 A5 F0 + and #$FC ; CPU:$CA62 PRG:0A62 29 FC + sta ZpF0 ; CPU:$CA64 PRG:0A64 85 F0 + lda #$20 ; CPU:$CA66 PRG:0A66 A9 20 + sta ZpF2 ; CPU:$CA68 PRG:0A68 85 F2 + lda #$00 ; CPU:$CA6A PRG:0A6A A9 00 + sta ZpF3 ; CPU:$CA6C PRG:0A6C 85 F3 + rts ; CPU:$CA6E PRG:0A6E 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CA6F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CA6F: + lsr a ; CPU:$CA6F PRG:0A6F 4A + php ; CPU:$CA70 PRG:0A70 08 + lsr ZpF0 ; CPU:$CA71 PRG:0A71 46 F0 + plp ; CPU:$CA73 PRG:0A73 28 + asl ZpF0 ; CPU:$CA74 PRG:0A74 06 F0 + rts ; CPU:$CA76 PRG:0A76 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CA77 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CA77: + lda ZpF0 ; CPU:$CA77 PRG:0A77 A5 F0 + and Zp01 ; CPU:$CA79 PRG:0A79 25 01 + beq Label_CA86 ; CPU:$CA7B PRG:0A7B F0 09 + lda #$24 ; CPU:$CA7D PRG:0A7D A9 24 + sta ZpF2 ; CPU:$CA7F PRG:0A7F 85 F2 + lda #$40 ; CPU:$CA81 PRG:0A81 A9 40 + sta ZpF3 ; CPU:$CA83 PRG:0A83 85 F3 + rts ; CPU:$CA85 PRG:0A85 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CA86 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CA86: + lda #$20 ; CPU:$CA86 PRG:0A86 A9 20 + sta ZpF2 ; CPU:$CA88 PRG:0A88 85 F2 + lda #$00 ; CPU:$CA8A PRG:0A8A A9 00 + sta ZpF3 ; CPU:$CA8C PRG:0A8C 85 F3 + rts ; CPU:$CA8E PRG:0A8E 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CA8F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CA8F: + pha ; CPU:$CA8F PRG:0A8F 48 + jsr $CA6F ; CPU:$CA90 PRG:0A90 20 6F CA + pla ; CPU:$CA93 PRG:0A93 68 + jmp $CA77 ; CPU:$CA94 PRG:0A94 4C 77 CA +; ---- data $CA97-$CAA2 (12 bytes) ---- + .byte $A5, $F3, $F0, $02, $A9, $01, $60, $A5, $F0, $29, $01, $60 ; CPU:$CA97 PRG:0A97 A5 F3 F0 02 A9 01 60 A5 F0 29 01 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CAA3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CAA3: + lda ZpFD ; CPU:$CAA3 PRG:0AA3 A5 FD + sta $2006 ; CPU:$CAA5 PRG:0AA5 8D 06 20 + lda ZpFC ; CPU:$CAA8 PRG:0AA8 A5 FC + sta $2006 ; CPU:$CAAA PRG:0AAA 8D 06 20 + rts ; CPU:$CAAD PRG:0AAD 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CAAE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CAAE: + jsr $CAA3 ; CPU:$CAAE PRG:0AAE 20 A3 CA + jsr $CAB9 ; CPU:$CAB1 PRG:0AB1 20 B9 CA + adc ZpEF ; CPU:$CAB4 PRG:0AB4 65 EF + sta ZpEF ; CPU:$CAB6 PRG:0AB6 85 EF + rts ; CPU:$CAB8 PRG:0AB8 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CAB9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CAB9: + lda $2007 ; CPU:$CAB9 PRG:0AB9 AD 07 20 + rts ; CPU:$CABC PRG:0ABC 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CABD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CABD: + sta $2007 ; CPU:$CABD PRG:0ABD 8D 07 20 + rts ; CPU:$CAC0 PRG:0AC0 60 +; ---- data $CAC1-$CAF6 (54 bytes) ---- + .byte $48, $20, $A3, $CA, $68, $4C, $BD, $CA, $20, $AE, $CA, $4C, $B9, $CA, $A4, $FD ; CPU:$CAC1 PRG:0AC1 48 20 A3 CA 68 4C BD CA 20 AE CA 4C B9 CA A4 FD + .byte $A9, $00, $85, $FD, $06, $FC, $26, $FD, $06, $FC, $26, $FD, $06, $FC, $26, $FD ; CPU:$CAD1 PRG:0AD1 A9 00 85 FD 06 FC 26 FD 06 FC 26 FD 06 FC 26 FD + .byte $06, $FC, $26, $FD, $06, $FC, $26, $FD, $98, $65, $FC, $85, $FC, $A9, $00, $65 ; CPU:$CAE1 PRG:0AE1 06 FC 26 FD 06 FC 26 FD 98 65 FC 85 FC A9 00 65 + .byte $FD, $65, $F2, $85, $FD, $60 ; CPU:$CAF1 PRG:0AF1 FD 65 F2 85 FD 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CAF7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CAF7: + lda #$00 ; CPU:$CAF7 PRG:0AF7 A9 00 + sta ZpF7 ; CPU:$CAF9 PRG:0AF9 85 F7 + sty ZpF6 ; CPU:$CAFB PRG:0AFB 84 F6 + asl ZpF6 ; CPU:$CAFD PRG:0AFD 06 F6 + rol ZpF7 ; CPU:$CAFF PRG:0AFF 26 F7 + asl ZpF6 ; CPU:$CB01 PRG:0B01 06 F6 + rol ZpF7 ; CPU:$CB03 PRG:0B03 26 F7 + asl ZpF6 ; CPU:$CB05 PRG:0B05 06 F6 + rol ZpF7 ; CPU:$CB07 PRG:0B07 26 F7 + asl ZpF6 ; CPU:$CB09 PRG:0B09 06 F6 + rol ZpF7 ; CPU:$CB0B PRG:0B0B 26 F7 + asl ZpF6 ; CPU:$CB0D PRG:0B0D 06 F6 + rol ZpF7 ; CPU:$CB0F PRG:0B0F 26 F7 + txa ; CPU:$CB11 PRG:0B11 8A + adc ZpF6 ; CPU:$CB12 PRG:0B12 65 F6 + tay ; CPU:$CB14 PRG:0B14 A8 + lda #$00 ; CPU:$CB15 PRG:0B15 A9 00 + adc ZpF7 ; CPU:$CB17 PRG:0B17 65 F7 + adc ZpF2 ; CPU:$CB19 PRG:0B19 65 F2 + tax ; CPU:$CB1B PRG:0B1B AA + rts ; CPU:$CB1C PRG:0B1C 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CB1D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB1D: + stx $2001 ; CPU:$CB1D PRG:0B1D 8E 01 20 + stx ZpF1 ; CPU:$CB20 PRG:0B20 86 F1 + jmp $CA3C ; CPU:$CB22 PRG:0B22 4C 3C CA +; ----------------------------------------------------------------------------- +; Routine: Label_CB25 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB25: + lda #$02 ; CPU:$CB25 PRG:0B25 A9 02 + sta $4014 ; CPU:$CB27 PRG:0B27 8D 14 40 + rts ; CPU:$CB2A PRG:0B2A 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CB2B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB2B: + pha ; CPU:$CB2B PRG:0B2B 48 + jsr $CAA3 ; CPU:$CB2C PRG:0B2C 20 A3 CA + pla ; CPU:$CB2F PRG:0B2F 68 +; ----------------------------------------------------------------------------- +; Routine: Label_CB30 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB30: + jsr $CABD ; CPU:$CB30 PRG:0B30 20 BD CA + jsr $CB39 ; CPU:$CB33 PRG:0B33 20 39 CB + bne Label_CB30 ; CPU:$CB36 PRG:0B36 D0 F8 + rts ; CPU:$CB38 PRG:0B38 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CB39 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB39: + ldx #$F8 ; CPU:$CB39 PRG:0B39 A2 F8 + jmp $CB45 ; CPU:$CB3B PRG:0B3B 4C 45 CB +; ---- data $CB3E-$CB44 (7 bytes) ---- + .byte $A2, $FA, $4C, $45, $CB, $A2, $FC ; CPU:$CB3E PRG:0B3E A2 FA 4C 45 CB A2 FC +; ----------------------------------------------------------------------------- +; Routine: Label_CB45 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB45: + ldy Zp00,x ; CPU:$CB45 PRG:0B45 B4 00 + beq Label_CB50 ; CPU:$CB47 PRG:0B47 F0 07 + dec Zp00,x ; CPU:$CB49 PRG:0B49 D6 00 + bne Label_CB4F ; CPU:$CB4B PRG:0B4B D0 02 + ldy Zp01,x ; CPU:$CB4D PRG:0B4D B4 01 +; ----------------------------------------------------------------------------- +; Routine: Label_CB4F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB4F: + rts ; CPU:$CB4F PRG:0B4F 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CB50 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB50: + dec Zp01,x ; CPU:$CB50 PRG:0B50 D6 01 + dec Zp00,x ; CPU:$CB52 PRG:0B52 D6 00 + rts ; CPU:$CB54 PRG:0B54 60 +; ---- data $CB55-$CB59 (5 bytes) ---- + .byte $A2, $F8, $4C, $61, $CB ; CPU:$CB55 PRG:0B55 A2 F8 4C 61 CB +; ----------------------------------------------------------------------------- +; Routine: Label_CB5A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB5A: + ldx #$FA ; CPU:$CB5A PRG:0B5A A2 FA + jmp $CB61 ; CPU:$CB5C PRG:0B5C 4C 61 CB +; ---- data $CB5F-$CB60 (2 bytes) ---- + .byte $A2, $FC ; CPU:$CB5F PRG:0B5F A2 FC +; ----------------------------------------------------------------------------- +; Routine: Label_CB61 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB61: + inc Zp00,x ; CPU:$CB61 PRG:0B61 F6 00 + beq Label_CB66 ; CPU:$CB63 PRG:0B63 F0 01 + rts ; CPU:$CB65 PRG:0B65 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CB66 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB66: + inc Zp01,x ; CPU:$CB66 PRG:0B66 F6 01 + rts ; CPU:$CB68 PRG:0B68 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CB69 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB69: + jsr $CB92 ; CPU:$CB69 PRG:0B69 20 92 CB + jsr $CAA3 ; CPU:$CB6C PRG:0B6C 20 A3 CA +; ----------------------------------------------------------------------------- +; Routine: Label_CB6F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB6F: + ldx #$00 ; CPU:$CB6F PRG:0B6F A2 00 + lda (ZpFA,x) ; CPU:$CB71 PRG:0B71 A1 FA + jsr $CABD ; CPU:$CB73 PRG:0B73 20 BD CA + jsr $CB5A ; CPU:$CB76 PRG:0B76 20 5A CB + jsr $CB39 ; CPU:$CB79 PRG:0B79 20 39 CB + bne Label_CB6F ; CPU:$CB7C PRG:0B7C D0 F1 + rts ; CPU:$CB7E PRG:0B7E 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CB7F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB7F: + jsr $CAAE ; CPU:$CB7F PRG:0B7F 20 AE CA +; ----------------------------------------------------------------------------- +; Routine: Label_CB82 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB82: + jsr $CAB9 ; CPU:$CB82 PRG:0B82 20 B9 CA + ldx #$00 ; CPU:$CB85 PRG:0B85 A2 00 + sta (ZpFA,x) ; CPU:$CB87 PRG:0B87 81 FA + jsr $CB5A ; CPU:$CB89 PRG:0B89 20 5A CB + jsr $CB39 ; CPU:$CB8C PRG:0B8C 20 39 CB + bne Label_CB82 ; CPU:$CB8F PRG:0B8F D0 F1 + rts ; CPU:$CB91 PRG:0B91 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CB92 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB92: + pha ; CPU:$CB92 PRG:0B92 48 + txa ; CPU:$CB93 PRG:0B93 8A + pha ; CPU:$CB94 PRG:0B94 48 + lda ZpFA ; CPU:$CB95 PRG:0B95 A5 FA + ldx ZpFC ; CPU:$CB97 PRG:0B97 A6 FC + sta ZpFC ; CPU:$CB99 PRG:0B99 85 FC + stx ZpFA ; CPU:$CB9B PRG:0B9B 86 FA + lda ZpFB ; CPU:$CB9D PRG:0B9D A5 FB + ldx ZpFD ; CPU:$CB9F PRG:0B9F A6 FD + sta ZpFD ; CPU:$CBA1 PRG:0BA1 85 FD + stx ZpFB ; CPU:$CBA3 PRG:0BA3 86 FB + pla ; CPU:$CBA5 PRG:0BA5 68 + tax ; CPU:$CBA6 PRG:0BA6 AA + pla ; CPU:$CBA7 PRG:0BA7 68 + rts ; CPU:$CBA8 PRG:0BA8 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CBA9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CBA9: + stx ZpFD ; CPU:$CBA9 PRG:0BA9 86 FD + sty ZpFC ; CPU:$CBAB PRG:0BAB 84 FC + rts ; CPU:$CBAD PRG:0BAD 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CBAE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CBAE: + ldx #$00 ; CPU:$CBAE PRG:0BAE A2 00 + lda #$F8 ; CPU:$CBB0 PRG:0BB0 A9 F8 +; ----------------------------------------------------------------------------- +; Routine: Label_CBB2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CBB2: + sta $0200,x ; CPU:$CBB2 PRG:0BB2 9D 00 02 + dex ; CPU:$CBB5 PRG:0BB5 CA + bne Label_CBB2 ; CPU:$CBB6 PRG:0BB6 D0 FA + rts ; CPU:$CBB8 PRG:0BB8 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CBB9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CBB9: + ldy #$00 ; CPU:$CBB9 PRG:0BB9 A0 00 + lda (ZpFA),y ; CPU:$CBBB PRG:0BBB B1 FA + beq Label_CBC8 ; CPU:$CBBD PRG:0BBD F0 09 + jsr $CB5A ; CPU:$CBBF PRG:0BBF 20 5A CB + sta $2007 ; CPU:$CBC2 PRG:0BC2 8D 07 20 + jmp $CBB9 ; CPU:$CBC5 PRG:0BC5 4C B9 CB +; ----------------------------------------------------------------------------- +; Routine: Label_CBC8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CBC8: + rts ; CPU:$CBC8 PRG:0BC8 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CBC9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CBC9: + pla ; CPU:$CBC9 PRG:0BC9 68 + sta ZpFA ; CPU:$CBCA PRG:0BCA 85 FA + pla ; CPU:$CBCC PRG:0BCC 68 + sta ZpFB ; CPU:$CBCD PRG:0BCD 85 FB + jsr $CB5A ; CPU:$CBCF PRG:0BCF 20 5A CB + jsr $CBB9 ; CPU:$CBD2 PRG:0BD2 20 B9 CB + lda ZpFB ; CPU:$CBD5 PRG:0BD5 A5 FB + pha ; CPU:$CBD7 PRG:0BD7 48 + lda ZpFA ; CPU:$CBD8 PRG:0BD8 A5 FA + pha ; CPU:$CBDA PRG:0BDA 48 + rts ; CPU:$CBDB PRG:0BDB 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CBDC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CBDC: + pla ; CPU:$CBDC PRG:0BDC 68 + sta ZpFA ; CPU:$CBDD PRG:0BDD 85 FA + pla ; CPU:$CBDF PRG:0BDF 68 + sta ZpFB ; CPU:$CBE0 PRG:0BE0 85 FB + jsr $CB5A ; CPU:$CBE2 PRG:0BE2 20 5A CB +; ----------------------------------------------------------------------------- +; Routine: Label_CBE5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CBE5: + ldy #$00 ; CPU:$CBE5 PRG:0BE5 A0 00 + lda (ZpFA),y ; CPU:$CBE7 PRG:0BE7 B1 FA + beq Label_CBF4 ; CPU:$CBE9 PRG:0BE9 F0 09 + jsr $CC29 ; CPU:$CBEB PRG:0BEB 20 29 CC + jsr $CB5A ; CPU:$CBEE PRG:0BEE 20 5A CB + jmp $CBE5 ; CPU:$CBF1 PRG:0BF1 4C E5 CB +; ----------------------------------------------------------------------------- +; Routine: Label_CBF4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CBF4: + lda ZpFB ; CPU:$CBF4 PRG:0BF4 A5 FB + pha ; CPU:$CBF6 PRG:0BF6 48 + lda ZpFA ; CPU:$CBF7 PRG:0BF7 A5 FA + pha ; CPU:$CBF9 PRG:0BF9 48 + rts ; CPU:$CBFA PRG:0BFA 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CBFB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CBFB: + txa ; CPU:$CBFB PRG:0BFB 8A + pha ; CPU:$CBFC PRG:0BFC 48 +; ----------------------------------------------------------------------------- +; Routine: Label_CBFD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CBFD: + lda ZpEE ; CPU:$CBFD PRG:0BFD A5 EE + cmp #$30 ; CPU:$CBFF PRG:0BFF C9 30 + beq Label_CBFD ; CPU:$CC01 PRG:0C01 F0 FA + ldx #$14 ; CPU:$CC03 PRG:0C03 A2 14 +; ----------------------------------------------------------------------------- +; Routine: Label_CC05 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CC05: + lda ZpD0,x ; CPU:$CC05 PRG:0C05 B5 D0 + beq Label_CC12 ; CPU:$CC07 PRG:0C07 F0 09 + txa ; CPU:$CC09 PRG:0C09 8A + sec ; CPU:$CC0A PRG:0C0A 38 + sbc #$04 ; CPU:$CC0B PRG:0C0B E9 04 + tax ; CPU:$CC0D PRG:0C0D AA + bcs Label_CC05 ; CPU:$CC0E PRG:0C0E B0 F5 + bcc Label_CBFD ; CPU:$CC10 PRG:0C10 90 EB +; ----------------------------------------------------------------------------- +; Routine: Label_CC12 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CC12: + stx ZpED ; CPU:$CC12 PRG:0C12 86 ED + jsr $CA38 ; CPU:$CC14 PRG:0C14 20 38 CA + lda ZpEE ; CPU:$CC17 PRG:0C17 A5 EE + sta ZpD1,x ; CPU:$CC19 PRG:0C19 95 D1 + jsr $CA48 ; CPU:$CC1B PRG:0C1B 20 48 CA + lda ZpFC ; CPU:$CC1E PRG:0C1E A5 FC + sta ZpF4 ; CPU:$CC20 PRG:0C20 85 F4 + lda ZpFD ; CPU:$CC22 PRG:0C22 A5 FD + sta ZpF5 ; CPU:$CC24 PRG:0C24 85 F5 + pla ; CPU:$CC26 PRG:0C26 68 + tax ; CPU:$CC27 PRG:0C27 AA + rts ; CPU:$CC28 PRG:0C28 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CC29 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CC29: + pha ; CPU:$CC29 PRG:0C29 48 + sta ZpF6 ; CPU:$CC2A PRG:0C2A 85 F6 + txa ; CPU:$CC2C PRG:0C2C 8A + pha ; CPU:$CC2D PRG:0C2D 48 +; ----------------------------------------------------------------------------- +; Routine: Label_CC2E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CC2E: + lda ZpEE ; CPU:$CC2E PRG:0C2E A5 EE + cmp #$30 ; CPU:$CC30 PRG:0C30 C9 30 + beq Label_CC2E ; CPU:$CC32 PRG:0C32 F0 FA + ldx ZpED ; CPU:$CC34 PRG:0C34 A6 ED + lda ZpD0,x ; CPU:$CC36 PRG:0C36 B5 D0 + bne Label_CC5E ; CPU:$CC38 PRG:0C38 D0 24 + lda ZpF4 ; CPU:$CC3A PRG:0C3A A5 F4 + sta ZpD2,x ; CPU:$CC3C PRG:0C3C 95 D2 + lda ZpF5 ; CPU:$CC3E PRG:0C3E A5 F5 + sta ZpD3,x ; CPU:$CC40 PRG:0C40 95 D3 + jsr $CA38 ; CPU:$CC42 PRG:0C42 20 38 CA + lda ZpEE ; CPU:$CC45 PRG:0C45 A5 EE + sta ZpD1,x ; CPU:$CC47 PRG:0C47 95 D1 +; ----------------------------------------------------------------------------- +; Routine: Label_CC49 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CC49: + inc ZpEE ; CPU:$CC49 PRG:0C49 E6 EE + inc ZpD0,x ; CPU:$CC4B PRG:0C4B F6 D0 + tax ; CPU:$CC4D PRG:0C4D AA + lda ZpF6 ; CPU:$CC4E PRG:0C4E A5 F6 + sta ZpA0,x ; CPU:$CC50 PRG:0C50 95 A0 + jsr $CA48 ; CPU:$CC52 PRG:0C52 20 48 CA + ldx #$F4 ; CPU:$CC55 PRG:0C55 A2 F4 + jsr $CB61 ; CPU:$CC57 PRG:0C57 20 61 CB + pla ; CPU:$CC5A PRG:0C5A 68 + tax ; CPU:$CC5B PRG:0C5B AA + pla ; CPU:$CC5C PRG:0C5C 68 + rts ; CPU:$CC5D PRG:0C5D 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CC5E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CC5E: + jsr $CA38 ; CPU:$CC5E PRG:0C5E 20 38 CA + lda ZpEE ; CPU:$CC61 PRG:0C61 A5 EE + jmp $CC49 ; CPU:$CC63 PRG:0C63 4C 49 CC +; ---- data $CC66-$CC7A (21 bytes) ---- + .byte $48, $A5, $FA, $85, $E9, $A5, $FB, $85, $EA, $A5, $FC, $85, $EB, $A5, $FD, $85 ; CPU:$CC66 PRG:0C66 48 A5 FA 85 E9 A5 FB 85 EA A5 FC 85 EB A5 FD 85 + .byte $EC, $68, $85, $E8, $60 ; CPU:$CC76 PRG:0C76 EC 68 85 E8 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CC7B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CC7B: + ldx #$18 ; CPU:$CC7B PRG:0C7B A2 18 +; ----------------------------------------------------------------------------- +; Routine: Label_CC7D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CC7D: + lda #$00 ; CPU:$CC7D PRG:0C7D A9 00 + sta ZpD0,x ; CPU:$CC7F PRG:0C7F 95 D0 + txa ; CPU:$CC81 PRG:0C81 8A + sec ; CPU:$CC82 PRG:0C82 38 + sbc #$04 ; CPU:$CC83 PRG:0C83 E9 04 + tax ; CPU:$CC85 PRG:0C85 AA + bcs Label_CC7D ; CPU:$CC86 PRG:0C86 B0 F5 + lda #$00 ; CPU:$CC88 PRG:0C88 A9 00 + sta ZpED ; CPU:$CC8A PRG:0C8A 85 ED + sta ZpEE ; CPU:$CC8C PRG:0C8C 85 EE + rts ; CPU:$CC8E PRG:0C8E 60 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_CC8F: + ldy #$14 ; CPU:$CC8F PRG:0C8F A0 14 +; ----------------------------------------------------------------------------- +; Routine: Label_CC91 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CC91: + lda a:$00D0,y ; CPU:$CC91 PRG:0C91 B9 D0 00 + beq Label_CCBA ; CPU:$CC94 PRG:0C94 F0 24 + tax ; CPU:$CC96 PRG:0C96 AA + lda a:$00D3,y ; CPU:$CC97 PRG:0C97 B9 D3 00 + sta $2006 ; CPU:$CC9A PRG:0C9A 8D 06 20 + lda a:$00D2,y ; CPU:$CC9D PRG:0C9D B9 D2 00 + sta $2006 ; CPU:$CCA0 PRG:0CA0 8D 06 20 + tya ; CPU:$CCA3 PRG:0CA3 98 + pha ; CPU:$CCA4 PRG:0CA4 48 + lda a:$00D1,y ; CPU:$CCA5 PRG:0CA5 B9 D1 00 + tay ; CPU:$CCA8 PRG:0CA8 A8 +; ----------------------------------------------------------------------------- +; Routine: Label_CCA9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CCA9: + lda a:$00A0,y ; CPU:$CCA9 PRG:0CA9 B9 A0 00 + sta $2007 ; CPU:$CCAC PRG:0CAC 8D 07 20 + iny ; CPU:$CCAF PRG:0CAF C8 + dex ; CPU:$CCB0 PRG:0CB0 CA + bne Label_CCA9 ; CPU:$CCB1 PRG:0CB1 D0 F6 + pla ; CPU:$CCB3 PRG:0CB3 68 + tay ; CPU:$CCB4 PRG:0CB4 A8 + lda #$00 ; CPU:$CCB5 PRG:0CB5 A9 00 + sta a:$00D0,y ; CPU:$CCB7 PRG:0CB7 99 D0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_CCBA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CCBA: + tya ; CPU:$CCBA PRG:0CBA 98 + sec ; CPU:$CCBB PRG:0CBB 38 + sbc #$04 ; CPU:$CCBC PRG:0CBC E9 04 + tay ; CPU:$CCBE PRG:0CBE A8 + bcs Label_CC91 ; CPU:$CCBF PRG:0CBF B0 D0 + lda #$00 ; CPU:$CCC1 PRG:0CC1 A9 00 + sta ZpEE ; CPU:$CCC3 PRG:0CC3 85 EE + lda ZpE8 ; CPU:$CCC5 PRG:0CC5 A5 E8 + beq Label_CCE5 ; CPU:$CCC7 PRG:0CC7 F0 1C + tax ; CPU:$CCC9 PRG:0CC9 AA + lda ZpEA ; CPU:$CCCA PRG:0CCA A5 EA + sta $2006 ; CPU:$CCCC PRG:0CCC 8D 06 20 + lda ZpE9 ; CPU:$CCCF PRG:0CCF A5 E9 + sta $2006 ; CPU:$CCD1 PRG:0CD1 8D 06 20 + lda $2007 ; CPU:$CCD4 PRG:0CD4 AD 07 20 + ldy #$00 ; CPU:$CCD7 PRG:0CD7 A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_CCD9: + lda $2007 ; CPU:$CCD9 PRG:0CD9 AD 07 20 + sta (ZpEB),y ; CPU:$CCDC PRG:0CDC 91 EB + iny ; CPU:$CCDE PRG:0CDE C8 + dex ; CPU:$CCDF PRG:0CDF CA + bne Label_CCD9 ; CPU:$CCE0 PRG:0CE0 D0 F7 + stx ZpE8 ; CPU:$CCE2 PRG:0CE2 86 E8 + rts ; CPU:$CCE4 PRG:0CE4 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CCE5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CCE5: + lda #$3F ; CPU:$CCE5 PRG:0CE5 A9 3F + sta $2006 ; CPU:$CCE7 PRG:0CE7 8D 06 20 + lda #$00 ; CPU:$CCEA PRG:0CEA A9 00 + sta $2006 ; CPU:$CCEC PRG:0CEC 8D 06 20 + ldx #$20 ; CPU:$CCEF PRG:0CEF A2 20 + ldy #$00 ; CPU:$CCF1 PRG:0CF1 A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_CCF3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CCF3: + lda a:$0080,y ; CPU:$CCF3 PRG:0CF3 B9 80 00 + sta $2007 ; CPU:$CCF6 PRG:0CF6 8D 07 20 + iny ; CPU:$CCF9 PRG:0CF9 C8 + dex ; CPU:$CCFA PRG:0CFA CA + bne Label_CCF3 ; CPU:$CCFB PRG:0CFB D0 F6 + lda #$3F ; CPU:$CCFD PRG:0CFD A9 3F + sta $2006 ; CPU:$CCFF PRG:0CFF 8D 06 20 + lda #$00 ; CPU:$CD02 PRG:0D02 A9 00 + sta $2006 ; CPU:$CD04 PRG:0D04 8D 06 20 + sta $2006 ; CPU:$CD07 PRG:0D07 8D 06 20 + sta $2006 ; CPU:$CD0A PRG:0D0A 8D 06 20 + rts ; CPU:$CD0D PRG:0D0D 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CD0E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CD0E: + txa ; CPU:$CD0E PRG:0D0E 8A + pha ; CPU:$CD0F PRG:0D0F 48 + lda #$01 ; CPU:$CD10 PRG:0D10 A9 01 + sta $4016 ; CPU:$CD12 PRG:0D12 8D 16 40 + lda #$00 ; CPU:$CD15 PRG:0D15 A9 00 + sta $4016 ; CPU:$CD17 PRG:0D17 8D 16 40 + ldx #$08 ; CPU:$CD1A PRG:0D1A A2 08 +; ----------------------------------------------------------------------------- +; Routine: Label_CD1C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CD1C: + lda $4016 ; CPU:$CD1C PRG:0D1C AD 16 40 + lsr a ; CPU:$CD1F PRG:0D1F 4A + ror $0180 ; CPU:$CD20 PRG:0D20 6E 80 01 + lsr a ; CPU:$CD23 PRG:0D23 4A + ror $0182 ; CPU:$CD24 PRG:0D24 6E 82 01 + lda $4017 ; CPU:$CD27 PRG:0D27 AD 17 40 + lsr a ; CPU:$CD2A PRG:0D2A 4A + ror $0181 ; CPU:$CD2B PRG:0D2B 6E 81 01 + lsr a ; CPU:$CD2E PRG:0D2E 4A + ror $0183 ; CPU:$CD2F PRG:0D2F 6E 83 01 + dex ; CPU:$CD32 PRG:0D32 CA + bne Label_CD1C ; CPU:$CD33 PRG:0D33 D0 E7 + pla ; CPU:$CD35 PRG:0D35 68 + tax ; CPU:$CD36 PRG:0D36 AA + rts ; CPU:$CD37 PRG:0D37 60 +; ---- data $CD38-$CD3B (4 bytes) ---- + .byte $BD, $80, $01, $60 ; CPU:$CD38 PRG:0D38 BD 80 01 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CD3C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CD3C: + lda ZpFC ; CPU:$CD3C PRG:0D3C A5 FC + tay ; CPU:$CD3E PRG:0D3E A8 + and #$FC ; CPU:$CD3F PRG:0D3F 29 FC + asl a ; CPU:$CD41 PRG:0D41 0A + sta ZpFC ; CPU:$CD42 PRG:0D42 85 FC + lda ZpFD ; CPU:$CD44 PRG:0D44 A5 FD + lsr a ; CPU:$CD46 PRG:0D46 4A + lsr a ; CPU:$CD47 PRG:0D47 4A + clc ; CPU:$CD48 PRG:0D48 18 + adc ZpFC ; CPU:$CD49 PRG:0D49 65 FC + adc ZpF3 ; CPU:$CD4B PRG:0D4B 65 F3 + sta ZpFC ; CPU:$CD4D PRG:0D4D 85 FC + ldx #$00 ; CPU:$CD4F PRG:0D4F A2 00 + lda ZpFD ; CPU:$CD51 PRG:0D51 A5 FD + and #$02 ; CPU:$CD53 PRG:0D53 29 02 + beq Label_CD58 ; CPU:$CD55 PRG:0D55 F0 01 + inx ; CPU:$CD57 PRG:0D57 E8 +; ----------------------------------------------------------------------------- +; Routine: Label_CD58 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CD58: + tya ; CPU:$CD58 PRG:0D58 98 + and #$02 ; CPU:$CD59 PRG:0D59 29 02 + beq Label_CD5F ; CPU:$CD5B PRG:0D5B F0 02 + inx ; CPU:$CD5D PRG:0D5D E8 + inx ; CPU:$CD5E PRG:0D5E E8 +; ----------------------------------------------------------------------------- +; Routine: Label_CD5F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CD5F: + ldy ZpFC ; CPU:$CD5F PRG:0D5F A4 FC + lda $0100,y ; CPU:$CD61 PRG:0D61 B9 00 01 + rts ; CPU:$CD64 PRG:0D64 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CD65 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CD65: + pha ; CPU:$CD65 PRG:0D65 48 + jsr $CD3C ; CPU:$CD66 PRG:0D66 20 3C CD + sta ZpFD ; CPU:$CD69 PRG:0D69 85 FD + lda #$FC ; CPU:$CD6B PRG:0D6B A9 FC + sta ZpF6 ; CPU:$CD6D PRG:0D6D 85 F6 + txa ; CPU:$CD6F PRG:0D6F 8A + beq Label_CD7E ; CPU:$CD70 PRG:0D70 F0 0C + pla ; CPU:$CD72 PRG:0D72 68 +; ----------------------------------------------------------------------------- +; Routine: Label_CD73 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CD73: + asl a ; CPU:$CD73 PRG:0D73 0A + asl a ; CPU:$CD74 PRG:0D74 0A + sec ; CPU:$CD75 PRG:0D75 38 + rol ZpF6 ; CPU:$CD76 PRG:0D76 26 F6 + rol ZpF6 ; CPU:$CD78 PRG:0D78 26 F6 + dex ; CPU:$CD7A PRG:0D7A CA + bne Label_CD73 ; CPU:$CD7B PRG:0D7B D0 F6 + pha ; CPU:$CD7D PRG:0D7D 48 +; ----------------------------------------------------------------------------- +; Routine: Label_CD7E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CD7E: + pla ; CPU:$CD7E PRG:0D7E 68 + sta ZpF7 ; CPU:$CD7F PRG:0D7F 85 F7 + lda ZpFD ; CPU:$CD81 PRG:0D81 A5 FD + and ZpF6 ; CPU:$CD83 PRG:0D83 25 F6 + ora ZpF7 ; CPU:$CD85 PRG:0D85 05 F7 + sta ZpF6 ; CPU:$CD87 PRG:0D87 85 F6 + sta $0100,y ; CPU:$CD89 PRG:0D89 99 00 01 + tya ; CPU:$CD8C PRG:0D8C 98 + and #$3F ; CPU:$CD8D PRG:0D8D 29 3F + clc ; CPU:$CD8F PRG:0D8F 18 + adc #$C0 ; CPU:$CD90 PRG:0D90 69 C0 + sta ZpFC ; CPU:$CD92 PRG:0D92 85 FC + lda ZpF2 ; CPU:$CD94 PRG:0D94 A5 F2 + adc #$03 ; CPU:$CD96 PRG:0D96 69 03 + sta ZpFD ; CPU:$CD98 PRG:0D98 85 FD + lda ZpF6 ; CPU:$CD9A PRG:0D9A A5 F6 + rts ; CPU:$CD9C PRG:0D9C 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CD9D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CD9D: + lda ZpF2 ; CPU:$CD9D PRG:0D9D A5 F2 + clc ; CPU:$CD9F PRG:0D9F 18 + adc #$03 ; CPU:$CDA0 PRG:0DA0 69 03 + sta $2006 ; CPU:$CDA2 PRG:0DA2 8D 06 20 + lda #$C0 ; CPU:$CDA5 PRG:0DA5 A9 C0 + sta $2006 ; CPU:$CDA7 PRG:0DA7 8D 06 20 + ldx #$40 ; CPU:$CDAA PRG:0DAA A2 40 + ldy ZpF3 ; CPU:$CDAC PRG:0DAC A4 F3 +; ----------------------------------------------------------------------------- +; Routine: Label_CDAE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CDAE: + lda $0100,y ; CPU:$CDAE PRG:0DAE B9 00 01 + sta $2007 ; CPU:$CDB1 PRG:0DB1 8D 07 20 + iny ; CPU:$CDB4 PRG:0DB4 C8 + dex ; CPU:$CDB5 PRG:0DB5 CA + bne Label_CDAE ; CPU:$CDB6 PRG:0DB6 D0 F6 + rts ; CPU:$CDB8 PRG:0DB8 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CDB9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CDB9: + txa ; CPU:$CDB9 PRG:0DB9 8A + pha ; CPU:$CDBA PRG:0DBA 48 + adc ZpEF ; CPU:$CDBB PRG:0DBB 65 EF + ldx $0184 ; CPU:$CDBD PRG:0DBD AE 84 01 + adc $0200,x ; CPU:$CDC0 PRG:0DC0 7D 00 02 + eor $0300,x ; CPU:$CDC3 PRG:0DC3 5D 00 03 + sbc $0400,x ; CPU:$CDC6 PRG:0DC6 FD 00 04 + sta ZpEF ; CPU:$CDC9 PRG:0DC9 85 EF + pla ; CPU:$CDCB PRG:0DCB 68 + tax ; CPU:$CDCC PRG:0DCC AA + inc $0184 ; CPU:$CDCD PRG:0DCD EE 84 01 + lda ZpEF ; CPU:$CDD0 PRG:0DD0 A5 EF + rts ; CPU:$CDD2 PRG:0DD2 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CDD3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CDD3: + sta $0188 ; CPU:$CDD3 PRG:0DD3 8D 88 01 + stx ZpFF ; CPU:$CDD6 PRG:0DD6 86 FF + sty ZpFE ; CPU:$CDD8 PRG:0DD8 84 FE +; ----------------------------------------------------------------------------- +; Routine: Label_CDDA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CDDA: + jsr $CE14 ; CPU:$CDDA PRG:0DDA 20 14 CE + beq Label_CE09 ; CPU:$CDDD PRG:0DDD F0 2A + cmp #$FF ; CPU:$CDDF PRG:0DDF C9 FF + bne Label_CDE4 ; CPU:$CDE1 PRG:0DE1 D0 01 + rts ; CPU:$CDE3 PRG:0DE3 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CDE4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CDE4: + tax ; CPU:$CDE4 PRG:0DE4 AA + ldy $0188 ; CPU:$CDE5 PRG:0DE5 AC 88 01 + jsr $CAF7 ; CPU:$CDE8 PRG:0DE8 20 F7 CA + stx ZpF7 ; CPU:$CDEB PRG:0DEB 86 F7 + sty ZpF6 ; CPU:$CDED PRG:0DED 84 F6 + ldx #$FE ; CPU:$CDEF PRG:0DEF A2 FE + jsr $CB61 ; CPU:$CDF1 PRG:0DF1 20 61 CB +; ----------------------------------------------------------------------------- +; Routine: Label_CDF4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CDF4: + jsr $CE14 ; CPU:$CDF4 PRG:0DF4 20 14 CE + beq Label_CE09 ; CPU:$CDF7 PRG:0DF7 F0 10 + jsr $CE25 ; CPU:$CDF9 PRG:0DF9 20 25 CE + ldx #$FE ; CPU:$CDFC PRG:0DFC A2 FE + jsr $CB61 ; CPU:$CDFE PRG:0DFE 20 61 CB + ldx #$F6 ; CPU:$CE01 PRG:0E01 A2 F6 + jsr $CB61 ; CPU:$CE03 PRG:0E03 20 61 CB + jmp $CDF4 ; CPU:$CE06 PRG:0E06 4C F4 CD +; ----------------------------------------------------------------------------- +; Routine: Label_CE09 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CE09: + inc $0188 ; CPU:$CE09 PRG:0E09 EE 88 01 + ldx #$FE ; CPU:$CE0C PRG:0E0C A2 FE + jsr $CB61 ; CPU:$CE0E PRG:0E0E 20 61 CB + jmp $CDDA ; CPU:$CE11 PRG:0E11 4C DA CD +; ----------------------------------------------------------------------------- +; Routine: Label_CE14 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CE14: + lda ZpFF ; CPU:$CE14 PRG:0E14 A5 FF + sta $2006 ; CPU:$CE16 PRG:0E16 8D 06 20 + lda ZpFE ; CPU:$CE19 PRG:0E19 A5 FE + sta $2006 ; CPU:$CE1B PRG:0E1B 8D 06 20 + lda $2007 ; CPU:$CE1E PRG:0E1E AD 07 20 + lda $2007 ; CPU:$CE21 PRG:0E21 AD 07 20 + rts ; CPU:$CE24 PRG:0E24 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CE25 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CE25: + pha ; CPU:$CE25 PRG:0E25 48 + lda ZpF7 ; CPU:$CE26 PRG:0E26 A5 F7 + sta $2006 ; CPU:$CE28 PRG:0E28 8D 06 20 + lda ZpF6 ; CPU:$CE2B PRG:0E2B A5 F6 + sta $2006 ; CPU:$CE2D PRG:0E2D 8D 06 20 + pla ; CPU:$CE30 PRG:0E30 68 + sta $2007 ; CPU:$CE31 PRG:0E31 8D 07 20 + rts ; CPU:$CE34 PRG:0E34 60 +; ---- data $CE35-$CF9A (358 bytes) ---- + .byte $A9, $02, $85, $68, $A2, $0B, $A0, $A0, $20, $A9, $CB, $A2, $04, $A0, $80, $86 ; CPU:$CE35 PRG:0E35 A9 02 85 68 A2 0B A0 A0 20 A9 CB A2 04 A0 80 86 + .byte $FB, $84, $FA, $A2, $01, $A0, $92, $86, $F9, $84, $F8, $20, $7F, $CB, $A2, $00 ; CPU:$CE45 PRG:0E45 FB 84 FA A2 01 A0 92 86 F9 84 F8 20 7F CB A2 00 + .byte $A9, $F0, $9D, $00, $06, $9D, $00, $07, $CA, $D0, $F5, $20, $E4, $D4, $20, $E5 ; CPU:$CE55 PRG:0E55 A9 F0 9D 00 06 9D 00 07 CA D0 F5 20 E4 D4 20 E5 + .byte $CF, $20, $BB, $D1, $20, $0A, $D2, $A9, $06, $85, $FB, $A9, $24, $85, $FD, $A9 ; CPU:$CE65 PRG:0E65 CF 20 BB D1 20 0A D2 A9 06 85 FB A9 24 85 FD A9 + .byte $00, $85, $FA, $85, $FC, $85, $F8, $A9, $02, $85, $F9, $20, $7F, $CB, $A5, $FE ; CPU:$CE75 PRG:0E75 00 85 FA 85 FC 85 F8 A9 02 85 F9 20 7F CB A5 FE + .byte $48, $A5, $FF, $48, $A9, $00, $8D, $8B, $01, $20, $A0, $D2, $A9, $00, $8D, $C0 ; CPU:$CE85 PRG:0E85 48 A5 FF 48 A9 00 8D 8B 01 20 A0 D2 A9 00 8D C0 + .byte $01, $20, $25, $D3, $A0, $08, $8C, $88, $01, $AC, $88, $01, $A2, $03, $20, $F7 ; CPU:$CE95 PRG:0E95 01 20 25 D3 A0 08 8C 88 01 AC 88 01 A2 03 20 F7 + .byte $CA, $84, $FA, $86, $FB, $AC, $88, $01, $A2, $03, $20, $F9, $FA, $A9, $1A, $85 ; CPU:$CEA5 PRG:0EA5 CA 84 FA 86 FB AC 88 01 A2 03 20 F9 FA A9 1A 85 + .byte $F8, $A9, $00, $85, $F9, $20, $69, $CB, $EE, $88, $01, $AD, $88, $01, $C9, $1B ; CPU:$CEB5 PRG:0EB5 F8 A9 00 85 F9 20 69 CB EE 88 01 AD 88 01 C9 1B + .byte $D0, $D7, $68, $85, $FF, $68, $85, $FE, $A9, $01, $8D, $8B, $01, $20, $A0, $D2 ; CPU:$CEC5 PRG:0EC5 D0 D7 68 85 FF 68 85 FE A9 01 8D 8B 01 20 A0 D2 + .byte $A2, $24, $86, $FB, $A0, $00, $84, $FA, $A2, $06, $86, $FD, $84, $FC, $A2, $02 ; CPU:$CED5 PRG:0ED5 A2 24 86 FB A0 00 84 FA A2 06 86 FD 84 FC A2 02 + .byte $86, $F9, $84, $F8, $20, $69, $CB, $A2, $00, $A9, $00, $9D, $00, $06, $9D, $00 ; CPU:$CEE5 PRG:0EE5 86 F9 84 F8 20 69 CB A2 00 A9 00 9D 00 06 9D 00 + .byte $07, $CA, $D0, $F5, $A2, $24, $A0, $00, $20, $A9, $CB, $20, $AE, $CA, $A2, $05 ; CPU:$CEF5 PRG:0EF5 07 CA D0 F5 A2 24 A0 00 20 A9 CB 20 AE CA A2 05 + .byte $86, $FF, $A0, $E5, $84, $FE, $A0, $08, $8C, $88, $01, $A2, $03, $8E, $89, $01 ; CPU:$CF05 PRG:0F05 86 FF A0 E5 84 FE A0 08 8C 88 01 A2 03 8E 89 01 + .byte $20, $B9, $CA, $20, $D3, $D3, $A2, $FE, $20, $61, $CB, $EE, $89, $01, $AD, $89 ; CPU:$CF15 PRG:0F15 20 B9 CA 20 D3 D3 A2 FE 20 61 CB EE 89 01 AD 89 + .byte $01, $C9, $1D, $D0, $EB, $EE, $88, $01, $AD, $88, $01, $C9, $1B, $D0, $DC, $A9 ; CPU:$CF25 PRG:0F25 01 C9 1D D0 EB EE 88 01 AD 88 01 C9 1B D0 DC A9 + .byte $02, $A2, $0A, $A0, $4F, $20, $D3, $CD, $20, $9B, $CF, $03, $03, $03, $04, $02 ; CPU:$CF35 PRG:0F35 02 A2 0A A0 4F 20 D3 CD 20 9B CF 03 03 03 04 02 + .byte $18, $03, $1A, $03, $03, $FF, $20, $48, $CA, $20, $A4, $E1, $20, $25, $E2, $20 ; CPU:$CF45 PRG:0F45 18 03 1A 03 03 FF 20 48 CA 20 A4 E1 20 25 E2 20 + .byte $4F, $E2, $20, $5C, $E2, $20, $A2, $E2, $20, $C8, $E2, $20, $67, $F8, $20, $0D ; CPU:$CF55 PRG:0F55 4F E2 20 5C E2 20 A2 E2 20 C8 E2 20 67 F8 20 0D + .byte $E2, $AD, $C7, $01, $C9, $01, $90, $03, $20, $E5, $E1, $AD, $C7, $01, $C9, $02 ; CPU:$CF65 PRG:0F65 E2 AD C7 01 C9 01 90 03 20 E5 E1 AD C7 01 C9 02 + .byte $D0, $10, $A9, $20, $85, $FD, $A9, $82, $85, $FC, $20, $FB, $CB, $A9, $63, $20 ; CPU:$CF75 PRG:0F75 D0 10 A9 20 85 FD A9 82 85 FC 20 FB CB A9 63 20 + .byte $29, $CC, $20, $F5, $C3, $60, $86, $FD, $84, $FC, $20, $65, $CD, $48, $20, $A3 ; CPU:$CF85 PRG:0F85 29 CC 20 F5 C3 60 86 FD 84 FC 20 65 CD 48 20 A3 + .byte $CA, $68, $8D, $07, $20, $60 ; CPU:$CF95 PRG:0F95 CA 68 8D 07 20 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CF9B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CF9B: + pla ; CPU:$CF9B PRG:0F9B 68 + sta ZpFE ; CPU:$CF9C PRG:0F9C 85 FE + pla ; CPU:$CF9E PRG:0F9E 68 + sta ZpFF ; CPU:$CF9F PRG:0F9F 85 FF + ldx #$FE ; CPU:$CFA1 PRG:0FA1 A2 FE + jsr $CB61 ; CPU:$CFA3 PRG:0FA3 20 61 CB +; ----------------------------------------------------------------------------- +; Routine: Label_CFA6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CFA6: + ldy #$00 ; CPU:$CFA6 PRG:0FA6 A0 00 + lda (ZpFE),y ; CPU:$CFA8 PRG:0FA8 B1 FE + cmp #$FF ; CPU:$CFAA PRG:0FAA C9 FF + beq Label_CFDE ; CPU:$CFAC PRG:0FAC F0 30 + sta ZpF9 ; CPU:$CFAE PRG:0FAE 85 F9 + iny ; CPU:$CFB0 PRG:0FB0 C8 + lda (ZpFE),y ; CPU:$CFB1 PRG:0FB1 B1 FE + sta ZpF8 ; CPU:$CFB3 PRG:0FB3 85 F8 + iny ; CPU:$CFB5 PRG:0FB5 C8 + lda (ZpFE),y ; CPU:$CFB6 PRG:0FB6 B1 FE + sta $018C ; CPU:$CFB8 PRG:0FB8 8D 8C 01 + iny ; CPU:$CFBB PRG:0FBB C8 + lda (ZpFE),y ; CPU:$CFBC PRG:0FBC B1 FE + sta $018A ; CPU:$CFBE PRG:0FBE 8D 8A 01 + iny ; CPU:$CFC1 PRG:0FC1 C8 + lda (ZpFE),y ; CPU:$CFC2 PRG:0FC2 B1 FE + sta Zp09 ; CPU:$CFC4 PRG:0FC4 85 09 + lda #$01 ; CPU:$CFC6 PRG:0FC6 A9 01 + sta $018B ; CPU:$CFC8 PRG:0FC8 8D 8B 01 + jsr $D2D4 ; CPU:$CFCB PRG:0FCB 20 D4 D2 + lda ZpFE ; CPU:$CFCE PRG:0FCE A5 FE + clc ; CPU:$CFD0 PRG:0FD0 18 + adc #$05 ; CPU:$CFD1 PRG:0FD1 69 05 + sta ZpFE ; CPU:$CFD3 PRG:0FD3 85 FE + lda #$00 ; CPU:$CFD5 PRG:0FD5 A9 00 + adc ZpFF ; CPU:$CFD7 PRG:0FD7 65 FF + sta ZpFF ; CPU:$CFD9 PRG:0FD9 85 FF + jmp $CFA6 ; CPU:$CFDB PRG:0FDB 4C A6 CF +; ----------------------------------------------------------------------------- +; Routine: Label_CFDE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CFDE: + lda ZpFF ; CPU:$CFDE PRG:0FDE A5 FF + pha ; CPU:$CFE0 PRG:0FE0 48 + lda ZpFE ; CPU:$CFE1 PRG:0FE1 A5 FE + pha ; CPU:$CFE3 PRG:0FE3 48 + rts ; CPU:$CFE4 PRG:0FE4 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CFE5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CFE5: + ldy #$00 ; CPU:$CFE5 PRG:0FE5 A0 00 + lda (ZpFE),y ; CPU:$CFE7 PRG:0FE7 B1 FE + pha ; CPU:$CFE9 PRG:0FE9 48 + sta $018B ; CPU:$CFEA PRG:0FEA 8D 8B 01 + and #$1F ; CPU:$CFED PRG:0FED 29 1F + beq Label_D004 ; CPU:$CFEF PRG:0FEF F0 13 + sta $0189 ; CPU:$CFF1 PRG:0FF1 8D 89 01 + ldy #$01 ; CPU:$CFF4 PRG:0FF4 A0 01 + lda (ZpFE),y ; CPU:$CFF6 PRG:0FF6 B1 FE + sta $0188 ; CPU:$CFF8 PRG:0FF8 8D 88 01 + iny ; CPU:$CFFB PRG:0FFB C8 + lda (ZpFE),y ; CPU:$CFFC PRG:0FFC B1 FE + sta $018A ; CPU:$CFFE PRG:0FFE 8D 8A 01 + jsr $D017 ; CPU:$D001 PRG:1001 20 17 D0 +; ----------------------------------------------------------------------------- +; Routine: Label_D004 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D004: + lda ZpFE ; CPU:$D004 PRG:1004 A5 FE + clc ; CPU:$D006 PRG:1006 18 + adc #$03 ; CPU:$D007 PRG:1007 69 03 + sta ZpFE ; CPU:$D009 PRG:1009 85 FE + lda #$00 ; CPU:$D00B PRG:100B A9 00 +; ----------------------------------------------------------------------------- +; Routine: Label_D00D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D00D: + adc ZpFF ; CPU:$D00D PRG:100D 65 FF + sta ZpFF ; CPU:$D00F PRG:100F 85 FF + pla ; CPU:$D011 PRG:1011 68 + and #$80 ; CPU:$D012 PRG:1012 29 80 + beq Label_CFE5 ; CPU:$D014 PRG:1014 F0 CF + rts ; CPU:$D016 PRG:1016 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D017 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D017: + lda #$0F ; CPU:$D017 PRG:1017 A9 0F + sta $018C ; CPU:$D019 PRG:1019 8D 8C 01 + lda $018B ; CPU:$D01C PRG:101C AD 8B 01 + and #$60 ; CPU:$D01F PRG:101F 29 60 + bne Label_D026 ; CPU:$D021 PRG:1021 D0 03 + jmp $D0D5 ; CPU:$D023 PRG:1023 4C D5 D0 +; ----------------------------------------------------------------------------- +; Routine: Label_D026 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D026: + cmp #$20 ; CPU:$D026 PRG:1026 C9 20 + bne Label_D02D ; CPU:$D028 PRG:1028 D0 03 + jmp $D0E4 ; CPU:$D02A PRG:102A 4C E4 D0 +; ----------------------------------------------------------------------------- +; Routine: Label_D02D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D02D: + ldx $0188 ; CPU:$D02D PRG:102D AE 88 01 + cmp #$40 ; CPU:$D030 PRG:1030 C9 40 + bne Label_D05B ; CPU:$D032 PRG:1032 D0 27 + txa ; CPU:$D034 PRG:1034 8A + and #$20 ; CPU:$D035 PRG:1035 29 20 + beq Label_D03D ; CPU:$D037 PRG:1037 F0 04 + lda #$0F ; CPU:$D039 PRG:1039 A9 0F + bne Label_D047 ; CPU:$D03B PRG:103B D0 0A +; ----------------------------------------------------------------------------- +; Routine: Label_D03D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D03D: + txa ; CPU:$D03D PRG:103D 8A + rol a ; CPU:$D03E PRG:103E 2A + rol a ; CPU:$D03F PRG:103F 2A + rol a ; CPU:$D040 PRG:1040 2A + and #$03 ; CPU:$D041 PRG:1041 29 03 + tay ; CPU:$D043 PRG:1043 A8 + lda $D057,y ; CPU:$D044 PRG:1044 B9 57 D0 +; ----------------------------------------------------------------------------- +; Routine: Label_D047 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D047: + sta $018C ; CPU:$D047 PRG:1047 8D 8C 01 + txa ; CPU:$D04A PRG:104A 8A + and #$1F ; CPU:$D04B PRG:104B 29 1F + sta $0188 ; CPU:$D04D PRG:104D 8D 88 01 + cmp $018A ; CPU:$D050 PRG:1050 CD 8A 01 + bcs Label_D0B1 ; CPU:$D053 PRG:1053 B0 5C + bcc Label_D0C3 ; CPU:$D055 PRG:1055 90 6C + .byte $3C, $69, $C3 ; CPU:$D057 PRG:1057 3C 69 C3 -- nop $C369,x (undocumented; ca65 cannot encode) +; ---- data $D05A-$D05A (1 bytes) ---- + .byte $96 ; CPU:$D05A PRG:105A 96 +; ----------------------------------------------------------------------------- +; Routine: Label_D05B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D05B: + txa ; CPU:$D05B PRG:105B 8A + pha ; CPU:$D05C PRG:105C 48 + ldx #$FE ; CPU:$D05D PRG:105D A2 FE + jsr $CB45 ; CPU:$D05F PRG:105F 20 45 CB + pla ; CPU:$D062 PRG:1062 68 + tax ; CPU:$D063 PRG:1063 AA + and #$1F ; CPU:$D064 PRG:1064 29 1F + sta $0188 ; CPU:$D066 PRG:1066 8D 88 01 + txa ; CPU:$D069 PRG:1069 8A + bmi Label_D088 ; CPU:$D06A PRG:106A 30 1C + and #$40 ; CPU:$D06C PRG:106C 29 40 + beq Label_D073 ; CPU:$D06E PRG:106E F0 03 + jmp $D0F3 ; CPU:$D070 PRG:1070 4C F3 D0 +; ----------------------------------------------------------------------------- +; Routine: Label_D073 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D073: + jsr $D0F3 ; CPU:$D073 PRG:1073 20 F3 D0 + inc $0189 ; CPU:$D076 PRG:1076 EE 89 01 + jsr $D0F3 ; CPU:$D079 PRG:1079 20 F3 D0 + inc $0188 ; CPU:$D07C PRG:107C EE 88 01 + jsr $D0F3 ; CPU:$D07F PRG:107F 20 F3 D0 + dec $0189 ; CPU:$D082 PRG:1082 CE 89 01 + jmp $D0F3 ; CPU:$D085 PRG:1085 4C F3 D0 +; ----------------------------------------------------------------------------- +; Routine: Label_D088 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D088: + lda #$C3 ; CPU:$D088 PRG:1088 A9 C3 + sta $018C ; CPU:$D08A PRG:108A 8D 8C 01 + jsr $D0F3 ; CPU:$D08D PRG:108D 20 F3 D0 + lda #$96 ; CPU:$D090 PRG:1090 A9 96 + sta $018C ; CPU:$D092 PRG:1092 8D 8C 01 + inc $0189 ; CPU:$D095 PRG:1095 EE 89 01 + jsr $D0F3 ; CPU:$D098 PRG:1098 20 F3 D0 + lda #$3C ; CPU:$D09B PRG:109B A9 3C + sta $018C ; CPU:$D09D PRG:109D 8D 8C 01 + inc $0188 ; CPU:$D0A0 PRG:10A0 EE 88 01 + jsr $D0F3 ; CPU:$D0A3 PRG:10A3 20 F3 D0 + lda #$69 ; CPU:$D0A6 PRG:10A6 A9 69 + sta $018C ; CPU:$D0A8 PRG:10A8 8D 8C 01 + dec $0189 ; CPU:$D0AB PRG:10AB CE 89 01 + jmp $D0F3 ; CPU:$D0AE PRG:10AE 4C F3 D0 +; ----------------------------------------------------------------------------- +; Routine: Label_D0B1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D0B1: + jsr $D0F3 ; CPU:$D0B1 PRG:10B1 20 F3 D0 + lda $0188 ; CPU:$D0B4 PRG:10B4 AD 88 01 + dec $0188 ; CPU:$D0B7 PRG:10B7 CE 88 01 + inc $0189 ; CPU:$D0BA PRG:10BA EE 89 01 + cmp $018A ; CPU:$D0BD PRG:10BD CD 8A 01 + bne Label_D0B1 ; CPU:$D0C0 PRG:10C0 D0 EF + rts ; CPU:$D0C2 PRG:10C2 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D0C3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D0C3: + jsr $D0F3 ; CPU:$D0C3 PRG:10C3 20 F3 D0 + lda $0188 ; CPU:$D0C6 PRG:10C6 AD 88 01 + inc $0188 ; CPU:$D0C9 PRG:10C9 EE 88 01 + inc $0189 ; CPU:$D0CC PRG:10CC EE 89 01 + cmp $018A ; CPU:$D0CF PRG:10CF CD 8A 01 + bne Label_D0C3 ; CPU:$D0D2 PRG:10D2 D0 EF + rts ; CPU:$D0D4 PRG:10D4 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D0D5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D0D5: + jsr $D0F3 ; CPU:$D0D5 PRG:10D5 20 F3 D0 + lda $0189 ; CPU:$D0D8 PRG:10D8 AD 89 01 + inc $0189 ; CPU:$D0DB PRG:10DB EE 89 01 + cmp $018A ; CPU:$D0DE PRG:10DE CD 8A 01 + bne Label_D0D5 ; CPU:$D0E1 PRG:10E1 D0 F2 + rts ; CPU:$D0E3 PRG:10E3 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D0E4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D0E4: + jsr $D0F3 ; CPU:$D0E4 PRG:10E4 20 F3 D0 + lda $0188 ; CPU:$D0E7 PRG:10E7 AD 88 01 + inc $0188 ; CPU:$D0EA PRG:10EA EE 88 01 + cmp $018A ; CPU:$D0ED PRG:10ED CD 8A 01 + bne Label_D0E4 ; CPU:$D0F0 PRG:10F0 D0 F2 + rts ; CPU:$D0F2 PRG:10F2 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D0F3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D0F3: + ldx $0189 ; CPU:$D0F3 PRG:10F3 AE 89 01 + ldy $0188 ; CPU:$D0F6 PRG:10F6 AC 88 01 + jsr $FAF9 ; CPU:$D0F9 PRG:10F9 20 F9 FA + lda ZpFC ; CPU:$D0FC PRG:10FC A5 FC + sec ; CPU:$D0FE PRG:10FE 38 + sbc #$1B ; CPU:$D0FF PRG:10FF E9 1B + sta ZpFC ; CPU:$D101 PRG:1101 85 FC + lda ZpFD ; CPU:$D103 PRG:1103 A5 FD + sbc #$00 ; CPU:$D105 PRG:1105 E9 00 + sta ZpFD ; CPU:$D107 PRG:1107 85 FD + ldy #$1B ; CPU:$D109 PRG:1109 A0 1B + lda $018C ; CPU:$D10B PRG:110B AD 8C 01 + cmp #$0F ; CPU:$D10E PRG:110E C9 0F + beq Label_D12C ; CPU:$D110 PRG:1110 F0 1A + and #$F0 ; CPU:$D112 PRG:1112 29 F0 + tax ; CPU:$D114 PRG:1114 AA + lda (ZpFC),y ; CPU:$D115 PRG:1115 B1 FC + and #$F0 ; CPU:$D117 PRG:1117 29 F0 + cmp #$F0 ; CPU:$D119 PRG:1119 C9 F0 + beq Label_D129 ; CPU:$D11B PRG:111B F0 0C + sta ZpF9 ; CPU:$D11D PRG:111D 85 F9 + txa ; CPU:$D11F PRG:111F 8A + cmp ZpF9 ; CPU:$D120 PRG:1120 C5 F9 + beq Label_D129 ; CPU:$D122 PRG:1122 F0 05 + lda #$0F ; CPU:$D124 PRG:1124 A9 0F + jmp $D12C ; CPU:$D126 PRG:1126 4C 2C D1 +; ----------------------------------------------------------------------------- +; Routine: Label_D129 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D129: + lda $018C ; CPU:$D129 PRG:1129 AD 8C 01 +; ----------------------------------------------------------------------------- +; Routine: Label_D12C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D12C: + sta ZpF6 ; CPU:$D12C PRG:112C 85 F6 + sta (ZpFC),y ; CPU:$D12E PRG:112E 91 FC + lda $0189 ; CPU:$D130 PRG:1130 AD 89 01 + cmp #$1C ; CPU:$D133 PRG:1133 C9 1C + beq Label_D151 ; CPU:$D135 PRG:1135 F0 1A + lda ZpF6 ; CPU:$D137 PRG:1137 A5 F6 + and #$10 ; CPU:$D139 PRG:1139 29 10 + bne Label_D151 ; CPU:$D13B PRG:113B D0 14 + iny ; CPU:$D13D PRG:113D C8 + lda (ZpFC),y ; CPU:$D13E PRG:113E B1 FC + tax ; CPU:$D140 PRG:1140 AA + and #$40 ; CPU:$D141 PRG:1141 29 40 + bne Label_D151 ; CPU:$D143 PRG:1143 D0 0C + txa ; CPU:$D145 PRG:1145 8A + and #$FB ; CPU:$D146 PRG:1146 29 FB + sta (ZpFC),y ; CPU:$D148 PRG:1148 91 FC + dey ; CPU:$D14A PRG:114A 88 + lda (ZpFC),y ; CPU:$D14B PRG:114B B1 FC + and #$FE ; CPU:$D14D PRG:114D 29 FE + sta (ZpFC),y ; CPU:$D14F PRG:114F 91 FC +; ----------------------------------------------------------------------------- +; Routine: Label_D151 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D151: + lda $0188 ; CPU:$D151 PRG:1151 AD 88 01 + cmp #$1A ; CPU:$D154 PRG:1154 C9 1A + beq Label_D174 ; CPU:$D156 PRG:1156 F0 1C + lda ZpF6 ; CPU:$D158 PRG:1158 A5 F6 + and #$20 ; CPU:$D15A PRG:115A 29 20 + bne Label_D174 ; CPU:$D15C PRG:115C D0 16 + ldy #$35 ; CPU:$D15E PRG:115E A0 35 + lda (ZpFC),y ; CPU:$D160 PRG:1160 B1 FC + tax ; CPU:$D162 PRG:1162 AA + and #$80 ; CPU:$D163 PRG:1163 29 80 + bne Label_D174 ; CPU:$D165 PRG:1165 D0 0D + txa ; CPU:$D167 PRG:1167 8A + and #$F7 ; CPU:$D168 PRG:1168 29 F7 + sta (ZpFC),y ; CPU:$D16A PRG:116A 91 FC + ldy #$1B ; CPU:$D16C PRG:116C A0 1B + lda (ZpFC),y ; CPU:$D16E PRG:116E B1 FC + and #$FD ; CPU:$D170 PRG:1170 29 FD + sta (ZpFC),y ; CPU:$D172 PRG:1172 91 FC +; ----------------------------------------------------------------------------- +; Routine: Label_D174 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D174: + lda $0189 ; CPU:$D174 PRG:1174 AD 89 01 + cmp #$03 ; CPU:$D177 PRG:1177 C9 03 + beq Label_D197 ; CPU:$D179 PRG:1179 F0 1C + lda ZpF6 ; CPU:$D17B PRG:117B A5 F6 + and #$40 ; CPU:$D17D PRG:117D 29 40 + bne Label_D197 ; CPU:$D17F PRG:117F D0 16 + ldy #$1A ; CPU:$D181 PRG:1181 A0 1A + lda (ZpFC),y ; CPU:$D183 PRG:1183 B1 FC + tax ; CPU:$D185 PRG:1185 AA + and #$10 ; CPU:$D186 PRG:1186 29 10 + bne Label_D197 ; CPU:$D188 PRG:1188 D0 0D + txa ; CPU:$D18A PRG:118A 8A + and #$FE ; CPU:$D18B PRG:118B 29 FE + sta (ZpFC),y ; CPU:$D18D PRG:118D 91 FC + ldy #$1B ; CPU:$D18F PRG:118F A0 1B + lda (ZpFC),y ; CPU:$D191 PRG:1191 B1 FC + and #$FB ; CPU:$D193 PRG:1193 29 FB + sta (ZpFC),y ; CPU:$D195 PRG:1195 91 FC +; ----------------------------------------------------------------------------- +; Routine: Label_D197 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D197: + lda $0188 ; CPU:$D197 PRG:1197 AD 88 01 + cmp #$08 ; CPU:$D19A PRG:119A C9 08 + beq Label_D1BA ; CPU:$D19C PRG:119C F0 1C + lda ZpF6 ; CPU:$D19E PRG:119E A5 F6 + and #$80 ; CPU:$D1A0 PRG:11A0 29 80 + bne Label_D1BA ; CPU:$D1A2 PRG:11A2 D0 16 + ldy #$01 ; CPU:$D1A4 PRG:11A4 A0 01 + lda (ZpFC),y ; CPU:$D1A6 PRG:11A6 B1 FC + tax ; CPU:$D1A8 PRG:11A8 AA + and #$20 ; CPU:$D1A9 PRG:11A9 29 20 + bne Label_D1BA ; CPU:$D1AB PRG:11AB D0 0D + txa ; CPU:$D1AD PRG:11AD 8A + and #$FD ; CPU:$D1AE PRG:11AE 29 FD + sta (ZpFC),y ; CPU:$D1B0 PRG:11B0 91 FC + ldy #$1B ; CPU:$D1B2 PRG:11B2 A0 1B + lda (ZpFC),y ; CPU:$D1B4 PRG:11B4 B1 FC + and #$F7 ; CPU:$D1B6 PRG:11B6 29 F7 + sta (ZpFC),y ; CPU:$D1B8 PRG:11B8 91 FC +; ----------------------------------------------------------------------------- +; Routine: Label_D1BA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D1BA: + rts ; CPU:$D1BA PRG:11BA 60 +; ---- data $D1BB-$D209 (79 bytes) ---- + .byte $A9, $24, $8D, $06, $20, $A9, $00, $8D, $06, $20, $A2, $06, $A0, $00, $20, $A9 ; CPU:$D1BB PRG:11BB A9 24 8D 06 20 A9 00 8D 06 20 A2 06 A0 00 20 A9 + .byte $CB, $A0, $00, $B1, $FC, $AA, $C9, $F0, $90, $05, $A9, $DE, $4C, $FB, $D1, $29 ; CPU:$D1CB PRG:11CB CB A0 00 B1 FC AA C9 F0 90 05 A9 DE 4C FB D1 29 + .byte $F0, $D0, $0A, $8A, $29, $0F, $AA, $BD, $80, $04, $4C, $FB, $D1, $A0, $00, $8A ; CPU:$D1DB PRG:11DB F0 D0 0A 8A 29 0F AA BD 80 04 4C FB D1 A0 00 8A + .byte $D9, $90, $04, $F0, $05, $C8, $C8, $4C, $EB, $D1, $B9, $91, $04, $4C, $FB, $D1 ; CPU:$D1EB PRG:11EB D9 90 04 F0 05 C8 C8 4C EB D1 B9 91 04 4C FB D1 + .byte $A0, $00, $8D, $07, $20, $20, $5F, $CB, $A5, $FD, $C9, $08, $D0, $C3, $60 ; CPU:$D1FB PRG:11FB A0 00 8D 07 20 20 5F CB A5 FD C9 08 D0 C3 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D20A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D20A: + lda #$06 ; CPU:$D20A PRG:120A A9 06 + sta ZpFB ; CPU:$D20C PRG:120C 85 FB + lda #$00 ; CPU:$D20E PRG:120E A9 00 + sta ZpFA ; CPU:$D210 PRG:1210 85 FA +; ----------------------------------------------------------------------------- +; Routine: Label_D212 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D212: + ldy #$00 ; CPU:$D212 PRG:1212 A0 00 + lda (ZpFA),y ; CPU:$D214 PRG:1214 B1 FA + and #$33 ; CPU:$D216 PRG:1216 29 33 + bne Label_D222 ; CPU:$D218 PRG:1218 D0 08 + ldy #$1B ; CPU:$D21A PRG:121A A0 1B + lda (ZpFA),y ; CPU:$D21C PRG:121C B1 FA + and #$CC ; CPU:$D21E PRG:121E 29 CC + beq Label_D22C ; CPU:$D220 PRG:1220 F0 0A +; ----------------------------------------------------------------------------- +; Routine: Label_D222 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D222: + jsr $CB5A ; CPU:$D222 PRG:1222 20 5A CB + lda ZpFB ; CPU:$D225 PRG:1225 A5 FB + cmp #$08 ; CPU:$D227 PRG:1227 C9 08 + bne Label_D212 ; CPU:$D229 PRG:1229 D0 E7 + rts ; CPU:$D22B PRG:122B 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D22C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D22C: + lda ZpFB ; CPU:$D22C PRG:122C A5 FB + clc ; CPU:$D22E PRG:122E 18 + adc #$1E ; CPU:$D22F PRG:122F 69 1E + sta ZpFD ; CPU:$D231 PRG:1231 85 FD + lda ZpFA ; CPU:$D233 PRG:1233 A5 FA + sta ZpFC ; CPU:$D235 PRG:1235 85 FC + jsr $CAAE ; CPU:$D237 PRG:1237 20 AE CA + lda $2007 ; CPU:$D23A PRG:123A AD 07 20 + ldx #$00 ; CPU:$D23D PRG:123D A2 00 + jsr $D28F ; CPU:$D23F PRG:123F 20 8F D2 + sta ZpF8 ; CPU:$D242 PRG:1242 85 F8 + lda $2007 ; CPU:$D244 PRG:1244 AD 07 20 + ldx #$1C ; CPU:$D247 PRG:1247 A2 1C + jsr $D28F ; CPU:$D249 PRG:1249 20 8F D2 + sta ZpF9 ; CPU:$D24C PRG:124C 85 F9 + jsr $CAA3 ; CPU:$D24E PRG:124E 20 A3 CA + lda ZpF8 ; CPU:$D251 PRG:1251 A5 F8 + sta $2007 ; CPU:$D253 PRG:1253 8D 07 20 + lda ZpF9 ; CPU:$D256 PRG:1256 A5 F9 + sta $2007 ; CPU:$D258 PRG:1258 8D 07 20 + lda ZpFC ; CPU:$D25B PRG:125B A5 FC + clc ; CPU:$D25D PRG:125D 18 + adc #$1A ; CPU:$D25E PRG:125E 69 1A + sta ZpFC ; CPU:$D260 PRG:1260 85 FC + lda ZpFD ; CPU:$D262 PRG:1262 A5 FD + adc #$00 ; CPU:$D264 PRG:1264 69 00 + sta ZpFD ; CPU:$D266 PRG:1266 85 FD + jsr $CAAE ; CPU:$D268 PRG:1268 20 AE CA + lda $2007 ; CPU:$D26B PRG:126B AD 07 20 + ldx #$38 ; CPU:$D26E PRG:126E A2 38 + jsr $D28F ; CPU:$D270 PRG:1270 20 8F D2 + sta ZpF8 ; CPU:$D273 PRG:1273 85 F8 + lda $2007 ; CPU:$D275 PRG:1275 AD 07 20 + ldx #$54 ; CPU:$D278 PRG:1278 A2 54 + jsr $D28F ; CPU:$D27A PRG:127A 20 8F D2 + sta ZpF9 ; CPU:$D27D PRG:127D 85 F9 + jsr $CAA3 ; CPU:$D27F PRG:127F 20 A3 CA + lda ZpF8 ; CPU:$D282 PRG:1282 A5 F8 + sta $2007 ; CPU:$D284 PRG:1284 8D 07 20 + lda ZpF9 ; CPU:$D287 PRG:1287 A5 F9 + sta $2007 ; CPU:$D289 PRG:1289 8D 07 20 + jmp $D222 ; CPU:$D28C PRG:128C 4C 22 D2 +; ----------------------------------------------------------------------------- +; Routine: Label_D28F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D28F: + ldy #$0E ; CPU:$D28F PRG:128F A0 0E +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_D291: + cmp $04B0,x ; CPU:$D291 PRG:1291 DD B0 04 + beq Label_D29C ; CPU:$D294 PRG:1294 F0 06 + inx ; CPU:$D296 PRG:1296 E8 + inx ; CPU:$D297 PRG:1297 E8 + dey ; CPU:$D298 PRG:1298 88 + bne Label_D291 ; CPU:$D299 PRG:1299 D0 F6 + rts ; CPU:$D29B PRG:129B 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D29C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D29C: + lda $04B1,x ; CPU:$D29C PRG:129C BD B1 04 + rts ; CPU:$D29F PRG:129F 60 +; ---- data $D2A0-$D2D3 (52 bytes) ---- + .byte $A0, $00, $B1, $FE, $48, $29, $1F, $85, $F9, $C8, $B1, $FE, $85, $F8, $C8, $B1 ; CPU:$D2A0 PRG:12A0 A0 00 B1 FE 48 29 1F 85 F9 C8 B1 FE 85 F8 C8 B1 + .byte $FE, $8D, $8C, $01, $C8, $B1, $FE, $8D, $8A, $01, $A9, $00, $85, $09, $20, $D4 ; CPU:$D2B0 PRG:12B0 FE 8D 8C 01 C8 B1 FE 8D 8A 01 A9 00 85 09 20 D4 + .byte $D2, $A5, $FE, $18, $69, $04, $85, $FE, $A5, $FF, $69, $00, $85, $FF, $68, $29 ; CPU:$D2C0 PRG:12C0 D2 A5 FE 18 69 04 85 FE A5 FF 69 00 85 FF 68 29 + .byte $80, $F0, $CD, $60 ; CPU:$D2D0 PRG:12D0 80 F0 CD 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D2D4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D2D4: + ldx ZpF9 ; CPU:$D2D4 PRG:12D4 A6 F9 + ldy ZpF8 ; CPU:$D2D6 PRG:12D6 A4 F8 + lda $018B ; CPU:$D2D8 PRG:12D8 AD 8B 01 + beq Label_D300 ; CPU:$D2DB PRG:12DB F0 23 + stx ZpFB ; CPU:$D2DD PRG:12DD 86 FB +; ----------------------------------------------------------------------------- +; Routine: Label_D2DF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D2DF: + ldx ZpFB ; CPU:$D2DF PRG:12DF A6 FB + ldy ZpF8 ; CPU:$D2E1 PRG:12E1 A4 F8 + stx ZpFD ; CPU:$D2E3 PRG:12E3 86 FD + sty ZpFC ; CPU:$D2E5 PRG:12E5 84 FC + lda Zp09 ; CPU:$D2E7 PRG:12E7 A5 09 + jsr $CD65 ; CPU:$D2E9 PRG:12E9 20 65 CD + pha ; CPU:$D2EC PRG:12EC 48 + jsr $CAA3 ; CPU:$D2ED PRG:12ED 20 A3 CA + pla ; CPU:$D2F0 PRG:12F0 68 + sta $2007 ; CPU:$D2F1 PRG:12F1 8D 07 20 + lda ZpFB ; CPU:$D2F4 PRG:12F4 A5 FB + inc ZpFB ; CPU:$D2F6 PRG:12F6 E6 FB + cmp $018C ; CPU:$D2F8 PRG:12F8 CD 8C 01 + bne Label_D2DF ; CPU:$D2FB PRG:12FB D0 E2 + jmp $D31B ; CPU:$D2FD PRG:12FD 4C 1B D3 +; ----------------------------------------------------------------------------- +; Routine: Label_D300 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D300: + jsr $FAF9 ; CPU:$D300 PRG:1300 20 F9 FA + lda $018C ; CPU:$D303 PRG:1303 AD 8C 01 + sec ; CPU:$D306 PRG:1306 38 + sbc ZpF9 ; CPU:$D307 PRG:1307 E5 F9 + tax ; CPU:$D309 PRG:1309 AA + inx ; CPU:$D30A PRG:130A E8 + ldy #$00 ; CPU:$D30B PRG:130B A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_D30D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D30D: + lda (ZpFC),y ; CPU:$D30D PRG:130D B1 FC + cmp #$DE ; CPU:$D30F PRG:130F C9 DE + bne Label_D317 ; CPU:$D311 PRG:1311 D0 04 + lda #$80 ; CPU:$D313 PRG:1313 A9 80 + sta (ZpFC),y ; CPU:$D315 PRG:1315 91 FC +; ----------------------------------------------------------------------------- +; Routine: Label_D317 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D317: + iny ; CPU:$D317 PRG:1317 C8 + dex ; CPU:$D318 PRG:1318 CA + bne Label_D30D ; CPU:$D319 PRG:1319 D0 F2 +; ----------------------------------------------------------------------------- +; Routine: Label_D31B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D31B: + lda ZpF8 ; CPU:$D31B PRG:131B A5 F8 + inc ZpF8 ; CPU:$D31D PRG:131D E6 F8 + cmp $018A ; CPU:$D31F PRG:131F CD 8A 01 + bne Label_D2D4 ; CPU:$D322 PRG:1322 D0 B0 + rts ; CPU:$D324 PRG:1324 60 +; ---- data $D325-$D391 (109 bytes) ---- + .byte $A0, $00, $B1, $FE, $48, $29, $1F, $F0, $56, $8D, $89, $01, $AA, $C8, $B1, $FE ; CPU:$D325 PRG:1325 A0 00 B1 FE 48 29 1F F0 56 8D 89 01 AA C8 B1 FE + .byte $8D, $88, $01, $A8, $20, $F9, $FA, $AD, $C0, $01, $0A, $AA, $AD, $88, $01, $9D ; CPU:$D335 PRG:1335 8D 88 01 A8 20 F9 FA AD C0 01 0A AA AD 88 01 9D + .byte $A0, $01, $FE, $A0, $01, $1E, $A0, $01, $1E, $A0, $01, $1E, $A0, $01, $AD, $89 ; CPU:$D345 PRG:1345 A0 01 FE A0 01 1E A0 01 1E A0 01 1E A0 01 AD 89 + .byte $01, $9D, $A1, $01, $FE, $A1, $01, $1E, $A1, $01, $1E, $A1, $01, $1E, $A1, $01 ; CPU:$D355 PRG:1355 01 9D A1 01 FE A1 01 1E A1 01 1E A1 01 1E A1 01 + .byte $EE, $C0, $01, $A0, $00, $A2, $C6, $20, $92, $D3, $A0, $01, $A2, $C7, $20, $92 ; CPU:$D365 PRG:1365 EE C0 01 A0 00 A2 C6 20 92 D3 A0 01 A2 C7 20 92 + .byte $D3, $A0, $1A, $A2, $C5, $20, $92, $D3, $A0, $1B, $A2, $C4, $20, $92, $D3, $A2 ; CPU:$D375 PRG:1375 D3 A0 1A A2 C5 20 92 D3 A0 1B A2 C4 20 92 D3 A2 + .byte $FE, $20, $61, $CB, $20, $61, $CB, $68, $29, $80, $F0, $94, $60 ; CPU:$D385 PRG:1385 FE 20 61 CB 20 61 CB 68 29 80 F0 94 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D392 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D392: + lda (ZpFC),y ; CPU:$D392 PRG:1392 B1 FC + cmp #$D4 ; CPU:$D394 PRG:1394 C9 D4 + bcs Label_D39F ; CPU:$D396 PRG:1396 B0 07 + cmp #$80 ; CPU:$D398 PRG:1398 C9 80 + bne Label_D3A0 ; CPU:$D39A PRG:139A D0 04 + txa ; CPU:$D39C PRG:139C 8A + sta (ZpFC),y ; CPU:$D39D PRG:139D 91 FC +; ----------------------------------------------------------------------------- +; Routine: Label_D39F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D39F: + rts ; CPU:$D39F PRG:139F 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D3A0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D3A0: + sec ; CPU:$D3A0 PRG:13A0 38 + sbc #$C4 ; CPU:$D3A1 PRG:13A1 E9 C4 + bcc Label_D39F ; CPU:$D3A3 PRG:13A3 90 FA + pha ; CPU:$D3A5 PRG:13A5 48 + txa ; CPU:$D3A6 PRG:13A6 8A + cmp #$C4 ; CPU:$D3A7 PRG:13A7 C9 C4 + bne Label_D3B3 ; CPU:$D3A9 PRG:13A9 D0 08 + pla ; CPU:$D3AB PRG:13AB 68 + tax ; CPU:$D3AC PRG:13AC AA + lda $0520,x ; CPU:$D3AD PRG:13AD BD 20 05 + sta (ZpFC),y ; CPU:$D3B0 PRG:13B0 91 FC + rts ; CPU:$D3B2 PRG:13B2 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D3B3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D3B3: + cmp #$C5 ; CPU:$D3B3 PRG:13B3 C9 C5 + bne Label_D3BF ; CPU:$D3B5 PRG:13B5 D0 08 + pla ; CPU:$D3B7 PRG:13B7 68 + tax ; CPU:$D3B8 PRG:13B8 AA + lda $0530,x ; CPU:$D3B9 PRG:13B9 BD 30 05 + sta (ZpFC),y ; CPU:$D3BC PRG:13BC 91 FC + rts ; CPU:$D3BE PRG:13BE 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D3BF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D3BF: + cmp #$C6 ; CPU:$D3BF PRG:13BF C9 C6 + bne Label_D3CB ; CPU:$D3C1 PRG:13C1 D0 08 + pla ; CPU:$D3C3 PRG:13C3 68 + tax ; CPU:$D3C4 PRG:13C4 AA + lda $0540,x ; CPU:$D3C5 PRG:13C5 BD 40 05 + sta (ZpFC),y ; CPU:$D3C8 PRG:13C8 91 FC + rts ; CPU:$D3CA PRG:13CA 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D3CB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D3CB: + pla ; CPU:$D3CB PRG:13CB 68 + tax ; CPU:$D3CC PRG:13CC AA + lda $0550,x ; CPU:$D3CD PRG:13CD BD 50 05 + sta (ZpFC),y ; CPU:$D3D0 PRG:13D0 91 FC + rts ; CPU:$D3D2 PRG:13D2 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D3D3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D3D3: + jsr $D4AF ; CPU:$D3D3 PRG:13D3 20 AF D4 + sta ZpFA ; CPU:$D3D6 PRG:13D6 85 FA + beq Label_D41E ; CPU:$D3D8 PRG:13D8 F0 44 + ldy #$1B ; CPU:$D3DA PRG:13DA A0 1B + cmp #$10 ; CPU:$D3DC PRG:13DC C9 10 + bne Label_D3E5 ; CPU:$D3DE PRG:13DE D0 05 + ora (ZpFE),y ; CPU:$D3E0 PRG:13E0 11 FE + sta (ZpFE),y ; CPU:$D3E2 PRG:13E2 91 FE + rts ; CPU:$D3E4 PRG:13E4 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D3E5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D3E5: + sta (ZpFE),y ; CPU:$D3E5 PRG:13E5 91 FE + and #$0F ; CPU:$D3E7 PRG:13E7 29 0F + lda $0188 ; CPU:$D3E9 PRG:13E9 AD 88 01 + sta ZpFC ; CPU:$D3EC PRG:13EC 85 FC + dec ZpFC ; CPU:$D3EE PRG:13EE C6 FC + lda $0189 ; CPU:$D3F0 PRG:13F0 AD 89 01 + sta ZpFD ; CPU:$D3F3 PRG:13F3 85 FD + dec ZpFD ; CPU:$D3F5 PRG:13F5 C6 FD + lda #$00 ; CPU:$D3F7 PRG:13F7 A9 00 + sta ZpFB ; CPU:$D3F9 PRG:13F9 85 FB + lda #$03 ; CPU:$D3FB PRG:13FB A9 03 + sta $018A ; CPU:$D3FD PRG:13FD 8D 8A 01 +; ----------------------------------------------------------------------------- +; Routine: Label_D400 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D400: + lda #$03 ; CPU:$D400 PRG:1400 A9 03 + sta $018B ; CPU:$D402 PRG:1402 8D 8B 01 +; ----------------------------------------------------------------------------- +; Routine: Label_D405 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D405: + jsr $D41F ; CPU:$D405 PRG:1405 20 1F D4 + inc ZpFB ; CPU:$D408 PRG:1408 E6 FB + inc ZpFD ; CPU:$D40A PRG:140A E6 FD + dec $018B ; CPU:$D40C PRG:140C CE 8B 01 + bne Label_D405 ; CPU:$D40F PRG:140F D0 F4 + dec ZpFD ; CPU:$D411 PRG:1411 C6 FD + dec ZpFD ; CPU:$D413 PRG:1413 C6 FD + dec ZpFD ; CPU:$D415 PRG:1415 C6 FD + inc ZpFC ; CPU:$D417 PRG:1417 E6 FC + dec $018A ; CPU:$D419 PRG:1419 CE 8A 01 + bne Label_D400 ; CPU:$D41C PRG:141C D0 E2 +; ----------------------------------------------------------------------------- +; Routine: Label_D41E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D41E: + rts ; CPU:$D41E PRG:141E 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D41F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D41F: + lda ZpFC ; CPU:$D41F PRG:141F A5 FC + cmp #$FF ; CPU:$D421 PRG:1421 C9 FF + beq Label_D45D ; CPU:$D423 PRG:1423 F0 38 + cmp #$1B ; CPU:$D425 PRG:1425 C9 1B + beq Label_D45D ; CPU:$D427 PRG:1427 F0 34 + lda ZpFD ; CPU:$D429 PRG:1429 A5 FD + cmp #$FF ; CPU:$D42B PRG:142B C9 FF + beq Label_D45D ; CPU:$D42D PRG:142D F0 2E + cmp #$1D ; CPU:$D42F PRG:142F C9 1D + beq Label_D45D ; CPU:$D431 PRG:1431 F0 2A + ldy ZpFB ; CPU:$D433 PRG:1433 A4 FB + lda $0560,y ; CPU:$D435 PRG:1435 B9 60 05 + tay ; CPU:$D438 PRG:1438 A8 + lda ZpFA ; CPU:$D439 PRG:1439 A5 FA + cmp #$07 ; CPU:$D43B PRG:143B C9 07 + bne Label_D449 ; CPU:$D43D PRG:143D D0 0A + ldx ZpFB ; CPU:$D43F PRG:143F A6 FB + lda $0569,x ; CPU:$D441 PRG:1441 BD 69 05 +; ----------------------------------------------------------------------------- +; Routine: Label_D444 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D444: + sta ZpF8 ; CPU:$D444 PRG:1444 85 F8 + jmp $D45E ; CPU:$D446 PRG:1446 4C 5E D4 +; ----------------------------------------------------------------------------- +; Routine: Label_D449 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D449: + rol a ; CPU:$D449 PRG:1449 2A + rol a ; CPU:$D44A PRG:144A 2A + rol a ; CPU:$D44B PRG:144B 2A + and #$03 ; CPU:$D44C PRG:144C 29 03 + sta ZpF8 ; CPU:$D44E PRG:144E 85 F8 + asl a ; CPU:$D450 PRG:1450 0A + asl a ; CPU:$D451 PRG:1451 0A + asl a ; CPU:$D452 PRG:1452 0A + adc ZpF8 ; CPU:$D453 PRG:1453 65 F8 + adc ZpFB ; CPU:$D455 PRG:1455 65 FB + tax ; CPU:$D457 PRG:1457 AA + lda $0572,x ; CPU:$D458 PRG:1458 BD 72 05 + bcc Label_D444 ; CPU:$D45B PRG:145B 90 E7 +; ----------------------------------------------------------------------------- +; Routine: Label_D45D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D45D: + rts ; CPU:$D45D PRG:145D 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D45E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D45E: + lda ZpF8 ; CPU:$D45E PRG:145E A5 F8 + beq Label_D487 ; CPU:$D460 PRG:1460 F0 25 + lda (ZpFE),y ; CPU:$D462 PRG:1462 B1 FE + tax ; CPU:$D464 PRG:1464 AA + and #$F0 ; CPU:$D465 PRG:1465 29 F0 + sta ZpF9 ; CPU:$D467 PRG:1467 85 F9 + txa ; CPU:$D469 PRG:1469 8A + and #$0F ; CPU:$D46A PRG:146A 29 0F + sta $018C ; CPU:$D46C PRG:146C 8D 8C 01 + beq Label_D488 ; CPU:$D46F PRG:146F F0 17 + cmp #$08 ; CPU:$D471 PRG:1471 C9 08 + bcc Label_D487 ; CPU:$D473 PRG:1473 90 12 + jsr $D48F ; CPU:$D475 PRG:1475 20 8F D4 + asl a ; CPU:$D478 PRG:1478 0A + asl a ; CPU:$D479 PRG:1479 0A + asl a ; CPU:$D47A PRG:147A 0A + adc $018C ; CPU:$D47B PRG:147B 6D 8C 01 + tax ; CPU:$D47E PRG:147E AA + lda $058E,x ; CPU:$D47F PRG:147F BD 8E 05 + clc ; CPU:$D482 PRG:1482 18 + adc ZpF9 ; CPU:$D483 PRG:1483 65 F9 + sta (ZpFE),y ; CPU:$D485 PRG:1485 91 FE +; ----------------------------------------------------------------------------- +; Routine: Label_D487 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D487: + rts ; CPU:$D487 PRG:1487 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D488 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D488: + lda ZpF9 ; CPU:$D488 PRG:1488 A5 F9 + ora ZpF8 ; CPU:$D48A PRG:148A 05 F8 + sta (ZpFE),y ; CPU:$D48C PRG:148C 91 FE + rts ; CPU:$D48E PRG:148E 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D48F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D48F: + lda ZpF9 ; CPU:$D48F PRG:148F A5 F9 + and #$C0 ; CPU:$D491 PRG:1491 29 C0 + eor #$FF ; CPU:$D493 PRG:1493 49 FF + clc ; CPU:$D495 PRG:1495 18 + adc #$40 ; CPU:$D496 PRG:1496 69 40 + and #$C0 ; CPU:$D498 PRG:1498 29 C0 + clc ; CPU:$D49A PRG:149A 18 + adc ZpF8 ; CPU:$D49B PRG:149B 65 F8 + rol a ; CPU:$D49D PRG:149D 2A + rol a ; CPU:$D49E PRG:149E 2A + rol a ; CPU:$D49F PRG:149F 2A + and #$03 ; CPU:$D4A0 PRG:14A0 29 03 + tax ; CPU:$D4A2 PRG:14A2 AA + lda ZpF8 ; CPU:$D4A3 PRG:14A3 A5 F8 + and #$04 ; CPU:$D4A5 PRG:14A5 29 04 + beq Label_D4AD ; CPU:$D4A7 PRG:14A7 F0 04 + inx ; CPU:$D4A9 PRG:14A9 E8 + inx ; CPU:$D4AA PRG:14AA E8 + inx ; CPU:$D4AB PRG:14AB E8 + inx ; CPU:$D4AC PRG:14AC E8 +; ----------------------------------------------------------------------------- +; Routine: Label_D4AD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D4AD: + txa ; CPU:$D4AD PRG:14AD 8A + rts ; CPU:$D4AE PRG:14AE 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D4AF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D4AF: + cmp #$81 ; CPU:$D4AF PRG:14AF C9 81 + bcs Label_D4B6 ; CPU:$D4B1 PRG:14B1 B0 03 + lda #$00 ; CPU:$D4B3 PRG:14B3 A9 00 + rts ; CPU:$D4B5 PRG:14B5 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D4B6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D4B6: + cmp #$C4 ; CPU:$D4B6 PRG:14B6 C9 C4 + bcc Label_D4BD ; CPU:$D4B8 PRG:14B8 90 03 + lda #$10 ; CPU:$D4BA PRG:14BA A9 10 + rts ; CPU:$D4BC PRG:14BC 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D4BD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D4BD: + cmp #$B0 ; CPU:$D4BD PRG:14BD C9 B0 + bcs Label_D4C4 ; CPU:$D4BF PRG:14BF B0 03 + lda #$07 ; CPU:$D4C1 PRG:14C1 A9 07 + rts ; CPU:$D4C3 PRG:14C3 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D4C4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D4C4: + ror a ; CPU:$D4C4 PRG:14C4 6A + ror a ; CPU:$D4C5 PRG:14C5 6A + ror a ; CPU:$D4C6 PRG:14C6 6A + and #$C0 ; CPU:$D4C7 PRG:14C7 29 C0 + ora #$05 ; CPU:$D4C9 PRG:14C9 09 05 + rts ; CPU:$D4CB PRG:14CB 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D4CC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D4CC: + lda $0187 ; CPU:$D4CC PRG:14CC AD 87 01 + clc ; CPU:$D4CF PRG:14CF 18 + adc #$F5 ; CPU:$D4D0 PRG:14D0 69 F5 + tay ; CPU:$D4D2 PRG:14D2 A8 + lda #$0C ; CPU:$D4D3 PRG:14D3 A9 0C + adc #$00 ; CPU:$D4D5 PRG:14D5 69 00 + sta $2006 ; CPU:$D4D7 PRG:14D7 8D 06 20 + sty $2006 ; CPU:$D4DA PRG:14DA 8C 06 20 + lda $2007 ; CPU:$D4DD PRG:14DD AD 07 20 + lda $2007 ; CPU:$D4E0 PRG:14E0 AD 07 20 + rts ; CPU:$D4E3 PRG:14E3 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D4E4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D4E4: + jsr $D4CC ; CPU:$D4E4 PRG:14E4 20 CC D4 + cmp #$1F ; CPU:$D4E7 PRG:14E7 C9 1F + bcc Label_D4ED ; CPU:$D4E9 PRG:14E9 90 02 + sbc #$1E ; CPU:$D4EB PRG:14EB E9 1E +; ----------------------------------------------------------------------------- +; Routine: Label_D4ED +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D4ED: + asl a ; CPU:$D4ED PRG:14ED 0A + tay ; CPU:$D4EE PRG:14EE A8 + lda $D4F8,y ; CPU:$D4EF PRG:14EF B9 F8 D4 + ldx $D4F9,y ; CPU:$D4F2 PRG:14F2 BE F9 D4 + sta ZpFE ; CPU:$D4F5 PRG:14F5 85 FE + stx ZpFF ; CPU:$D4F7 PRG:14F7 86 FF + rts ; CPU:$D4F9 PRG:14F9 60 +; ---- data $D4FA-$E01D (2852 bytes) ---- + .byte $59, $D5, $97, $D5, $17, $D6, $91, $D6, $F5, $D6, $59, $D7, $B5, $D7, $15, $D8 ; CPU:$D4FA PRG:14FA 59 D5 97 D5 17 D6 91 D6 F5 D6 59 D7 B5 D7 15 D8 + .byte $7B, $D8, $E9, $D8, $4D, $D9, $BA, $D9, $1C, $DA, $C0, $DA, $18, $DB, $88, $DB ; CPU:$D50A PRG:150A 7B D8 E9 D8 4D D9 BA D9 1C DA C0 DA 18 DB 88 DB + .byte $E2, $DB, $28, $DC, $4C, $DC, $76, $DC, $C2, $DC, $FA, $DC, $1C, $DD, $75, $DD ; CPU:$D51A PRG:151A E2 DB 28 DC 4C DC 76 DC C2 DC FA DC 1C DD 75 DD + .byte $DA, $DD, $0E, $DE, $42, $DE, $C9, $DE, $01, $DF, $72, $DF, $20, $CC, $D4, $85 ; CPU:$D52A PRG:152A DA DD 0E DE 42 DE C9 DE 01 DF 72 DF 20 CC D4 85 + .byte $FC, $A9, $00, $06, $FC, $2A, $06, $FC, $2A, $06, $FC, $2A, $06, $FC, $2A, $85 ; CPU:$D53A PRG:153A FC A9 00 06 FC 2A 06 FC 2A 06 FC 2A 06 FC 2A 85 + .byte $FD, $A5, $FC, $18, $69, $22, $85, $FE, $A5, $FD, $69, $0D, $85, $FF, $60, $03 ; CPU:$D54A PRG:154A FD A5 FC 18 69 22 85 FE A5 FD 69 0D 85 FF 60 03 + .byte $08, $1C, $03, $1A, $1C, $23, $08, $1A, $3C, $08, $1A, $07, $09, $0E, $11, $09 ; CPU:$D55A PRG:155A 08 1C 03 1A 1C 23 08 1A 3C 08 1A 07 09 0E 11 09 + .byte $18, $07, $19, $0E, $11, $19, $18, $24, $0C, $16, $3B, $0C, $16, $66, $88, $78 ; CPU:$D56A PRG:156A 18 07 19 0E 11 19 18 24 0C 16 3B 0C 16 66 88 78 + .byte $88, $63, $8B, $7B, $8B, $63, $96, $7B, $96, $66, $99, $F8, $99, $84, $08, $1B ; CPU:$D57A PRG:157A 88 63 8B 7B 8B 63 96 7B 96 66 99 F8 99 84 08 1B + .byte $19, $04, $09, $0F, $08, $1A, $09, $04, $18, $0F, $19, $9A, $18, $03, $08, $0B ; CPU:$D58A PRG:158A 19 04 09 0F 08 1A 09 04 18 0F 19 9A 18 03 08 0B + .byte $14, $08, $1C, $07, $09, $0B, $15, $09, $18, $07, $19, $0B, $14, $19, $18, $03 ; CPU:$D59A PRG:159A 14 08 1C 07 09 0B 15 09 18 07 19 0B 14 19 18 03 + .byte $1A, $0B, $14, $1A, $1C, $23, $08, $1A, $24, $0C, $16, $3B, $0C, $16, $3C, $08 ; CPU:$D5AA PRG:15AA 1A 0B 14 1A 1C 23 08 1A 24 0C 16 3B 0C 16 3C 08 + .byte $1A, $4C, $29, $0C, $4C, $2A, $0D, $4C, $C8, $0B, $4B, $4A, $0E, $50, $2C, $09 ; CPU:$D5BA PRG:15BA 1A 4C 29 0C 4C 2A 0D 4C C8 0B 4B 4A 0E 50 2C 09 + .byte $50, $2D, $09, $50, $8B, $08, $50, $0E, $0A, $4C, $38, $15, $4C, $39, $16, $4B ; CPU:$D5CA PRG:15CA 50 2D 09 50 8B 08 50 0E 0A 4C 38 15 4C 39 16 4B + .byte $98, $14, $4C, $1A, $17, $50, $35, $18, $50, $36, $19, $50, $D4, $18, $50, $57 ; CPU:$D5DA PRG:15DA 98 14 4C 1A 17 50 35 18 50 36 19 50 D4 18 50 57 + .byte $1A, $66, $88, $78, $88, $63, $8B, $7B, $8B, $63, $96, $7B, $96, $66, $99, $F8 ; CPU:$D5EA PRG:15EA 1A 66 88 78 88 63 8B 7B 8B 63 96 7B 96 66 99 F8 + .byte $99, $04, $08, $0B, $19, $14, $08, $1B, $19, $0C, $0B, $0D, $17, $12, $0B, $13 ; CPU:$D5FA PRG:15FA 99 04 08 0B 19 14 08 1B 19 0C 0B 0D 17 12 0B 13 + .byte $17, $8E, $0D, $11, $15, $04, $09, $1A, $09, $04, $18, $9A, $18, $08, $08, $17 ; CPU:$D60A PRG:160A 17 8E 0D 11 15 04 09 1A 09 04 18 9A 18 08 08 17 + .byte $0C, $09, $13, $28, $08, $0B, $03, $0D, $06, $68, $0C, $68, $0D, $67, $0D, $37 ; CPU:$D61A PRG:161A 0C 09 13 28 08 0B 03 0D 06 68 0C 68 0D 67 0D 37 + .byte $08, $0B, $19, $0D, $1C, $76, $0C, $76, $0D, $77, $0D, $23, $0D, $15, $3C, $0D ; CPU:$D62A PRG:162A 08 0B 19 0D 1C 76 0C 76 0D 77 0D 23 0D 15 3C 0D + .byte $15, $03, $15, $06, $19, $15, $1C, $28, $17, $1A, $37, $17, $1A, $67, $14, $68 ; CPU:$D63A PRG:163A 15 03 15 06 19 15 1C 28 17 1A 37 17 1A 67 14 68 + .byte $14, $68, $15, $77, $14, $76, $14, $76, $15, $0C, $19, $13, $08, $1A, $17, $6B ; CPU:$D64A PRG:164A 14 68 15 77 14 76 14 76 15 0C 19 13 08 1A 17 6B + .byte $88, $73, $88, $68, $8B, $76, $8B, $66, $8D, $78, $8D, $63, $90, $63, $91, $7B ; CPU:$D65A PRG:165A 88 73 88 68 8B 76 8B 66 8D 78 8D 63 90 63 91 7B + .byte $90, $7B, $91, $66, $94, $78, $94, $68, $96, $76, $96, $6B, $99, $F3, $99, $08 ; CPU:$D66A PRG:166A 90 7B 91 66 94 78 94 68 96 76 96 6B 99 F3 99 08 + .byte $08, $16, $19, $84, $0E, $1B, $15, $09, $09, $15, $09, $04, $0E, $1A, $0E, $04 ; CPU:$D67A PRG:167A 08 16 19 84 0E 1B 15 09 09 15 09 04 0E 1A 0E 04 + .byte $13, $1A, $13, $09, $18, $95, $18, $07, $08, $18, $07, $09, $0C, $13, $09, $18 ; CPU:$D68A PRG:168A 13 1A 13 09 18 95 18 07 08 18 07 09 0C 13 09 18 + .byte $07, $19, $0B, $14, $19, $18, $07, $1A, $18, $44, $2B, $09, $45, $2B, $0A, $59 ; CPU:$D69A PRG:169A 07 19 0B 14 19 18 07 1A 18 44 2B 09 45 2B 0A 59 + .byte $29, $0B, $59, $2A, $0B, $44, $37, $19, $45, $37, $18, $59, $39, $17, $59, $38 ; CPU:$D6AA PRG:16AA 29 0B 59 2A 0B 44 37 19 45 37 18 59 39 17 59 38 + .byte $17, $43, $8B, $08, $45, $0C, $0A, $59, $C8, $0B, $58, $4A, $0C, $43, $57, $1A ; CPU:$D6BA PRG:16BA 17 43 8B 08 45 0C 0A 59 C8 0B 58 4A 0C 43 57 1A + .byte $45, $D6, $18, $58, $98, $16, $59, $1A, $17, $23, $0C, $16, $24, $0C, $16, $3B ; CPU:$D6CA PRG:16CA 45 D6 18 58 98 16 59 1A 17 23 0C 16 24 0C 16 3B + .byte $0C, $16, $BC, $0C, $16, $0C, $08, $13, $09, $06, $0A, $19, $19, $85, $0C, $1A ; CPU:$D6DA PRG:16DA 0C 16 BC 0C 16 0C 08 13 09 06 0A 19 19 85 0C 1A + .byte $17, $0D, $08, $11, $08, $0C, $19, $0F, $19, $92, $19, $03, $08, $0B, $03, $09 ; CPU:$D6EA PRG:16EA 17 0D 08 11 08 0C 19 0F 19 92 19 03 08 0B 03 09 + .byte $0B, $14, $08, $1C, $14, $09, $1C, $0A, $19, $15, $0A, $1A, $15, $23, $0A, $13 ; CPU:$D6FA PRG:16FA 0B 14 08 1C 14 09 1C 0A 19 15 0A 1A 15 23 0A 13 + .byte $24, $0A, $13, $3B, $0A, $13, $3C, $0A, $13, $4C, $29, $0C, $50, $2C, $09, $44 ; CPU:$D70A PRG:170A 24 0A 13 3B 0A 13 3C 0A 13 4C 29 0C 50 2C 09 44 + .byte $34, $19, $45, $34, $18, $56, $38, $14, $56, $39, $14, $4C, $C8, $0B, $4C, $4A ; CPU:$D71A PRG:171A 34 19 45 34 18 56 38 14 56 39 14 4C C8 0B 4C 4A + .byte $0D, $50, $8B, $08, $50, $0D, $0A, $45, $D3, $18, $43, $54, $1A, $55, $98, $13 ; CPU:$D72A PRG:172A 0D 50 8B 08 50 0D 0A 45 D3 18 43 54 1A 55 98 13 + .byte $D6, $1A, $14, $05, $0A, $0D, $13, $06, $14, $19, $15, $08, $16, $17, $17, $0A ; CPU:$D73A PRG:173A D6 1A 14 05 0A 0D 13 06 14 19 15 08 16 17 17 0A + .byte $18, $15, $18, $12, $0A, $1A, $13, $8E, $0C, $11, $13, $08, $0D, $96, $0D, $09 ; CPU:$D74A PRG:174A 18 15 18 12 0A 1A 13 8E 0C 11 13 08 0D 96 0D 09 + .byte $08, $1C, $0D, $09, $18, $29, $09, $0B, $03, $0D, $06, $23, $0E, $1A, $24, $11 ; CPU:$D75A PRG:175A 08 1C 0D 09 18 29 09 0B 03 0D 06 23 0E 1A 24 11 + .byte $16, $04, $1A, $16, $07, $19, $12, $36, $17, $19, $19, $15, $1C, $3C, $09, $14 ; CPU:$D76A PRG:176A 16 04 1A 16 07 19 12 36 17 19 19 15 1C 3C 09 14 + .byte $3B, $0C, $11, $6C, $88, $78, $88, $69, $8B, $7B, $8B, $66, $8D, $63, $90, $7B ; CPU:$D77A PRG:177A 3B 0C 11 6C 88 78 88 69 8B 7B 8B 66 8D 63 90 7B + .byte $91, $78, $94, $63, $96, $75, $96, $66, $99, $72, $99, $69, $0C, $67, $0D, $69 ; CPU:$D78A PRG:178A 91 78 94 63 96 75 96 66 99 72 99 69 0C 67 0D 69 + .byte $0D, $75, $14, $77, $14, $F5, $15, $0A, $09, $1B, $14, $84, $0E, $15, $19, $0A ; CPU:$D79A PRG:179A 0D 75 14 77 14 F5 15 0A 09 1B 14 84 0E 15 19 0A + .byte $09, $1A, $09, $04, $0E, $1A, $13, $04, $18, $94, $18, $04, $08, $1B, $04, $1A ; CPU:$D7AA PRG:17AA 09 1A 09 04 0E 1A 13 04 18 94 18 04 08 1B 04 1A + .byte $1B, $23, $09, $19, $3C, $09, $19, $43, $88, $08, $5C, $C8, $08, $43, $5A, $1A ; CPU:$D7BA PRG:17BA 1B 23 09 19 3C 09 19 43 88 08 5C C8 08 43 5A 1A + .byte $5C, $1A, $1A, $66, $88, $68, $88, $6A, $88, $6C, $88, $72, $88, $74, $88, $76 ; CPU:$D7CA PRG:17CA 5C 1A 1A 66 88 68 88 6A 88 6C 88 72 88 74 88 76 + .byte $88, $78, $88, $63, $8B, $63, $8D, $63, $8F, $63, $92, $63, $94, $63, $96, $7B ; CPU:$D7DA PRG:17DA 88 78 88 63 8B 63 8D 63 8F 63 92 63 94 63 96 7B + .byte $8B, $7B, $8D, $7B, $8F, $7B, $92, $7B, $94, $7B, $96, $66, $99, $68, $99, $6A ; CPU:$D7EA PRG:17EA 8B 7B 8D 7B 8F 7B 92 7B 94 7B 96 66 99 68 99 6A + .byte $99, $6C, $99, $72, $99, $74, $99, $76, $99, $F8, $99, $84, $09, $1B, $19, $04 ; CPU:$D7FA PRG:17FA 99 6C 99 72 99 74 99 76 99 F8 99 84 09 1B 19 04 + .byte $09, $0F, $08, $1A, $09, $04, $18, $0F, $19, $9A, $18, $10, $08, $1C, $12, $09 ; CPU:$D80A PRG:180A 09 0F 08 1A 09 04 18 0F 19 9A 18 10 08 1C 12 09 + .byte $18, $3C, $09, $0B, $23, $17, $19, $03, $1A, $0F, $07, $19, $0D, $43, $34, $08 ; CPU:$D81A PRG:181A 18 3C 09 0B 23 17 19 03 1A 0F 07 19 0D 43 34 08 + .byte $44, $34, $09, $50, $39, $0E, $50, $3A, $0E, $43, $93, $08, $45, $14, $0A, $50 ; CPU:$D82A PRG:182A 44 34 09 50 39 0E 50 3A 0E 43 93 08 45 14 0A 50 + .byte $98, $0E, $51, $1A, $0F, $63, $15, $63, $96, $66, $99, $78, $88, $7B, $8B, $FB ; CPU:$D83A PRG:183A 98 0E 51 1A 0F 63 15 63 96 66 99 78 88 7B 8B FB + .byte $0C, $10, $08, $1B, $0F, $04, $14, $0F, $19, $06, $12, $17, $13, $10, $14, $15 ; CPU:$D84A PRG:184A 0C 10 08 1B 0F 04 14 0F 19 06 12 17 13 10 14 15 + .byte $15, $10, $16, $13, $17, $10, $18, $11, $19, $08, $10, $19, $11, $0A, $0E, $0F ; CPU:$D85A PRG:185A 15 10 16 13 17 10 18 11 19 08 10 19 11 0A 0E 0F + .byte $0F, $0C, $0C, $0F, $0D, $8E, $0A, $0F, $0B, $10, $08, $1A, $09, $04, $18, $8E ; CPU:$D86A PRG:186A 0F 0C 0C 0F 0D 8E 0A 0F 0B 10 08 1A 09 04 18 8E + .byte $19, $03, $08, $1C, $07, $0D, $10, $08, $0E, $0F, $10, $14, $17, $0F, $15, $18 ; CPU:$D87A PRG:187A 19 03 08 1C 07 0D 10 08 0E 0F 10 14 17 0F 15 18 + .byte $03, $1A, $1C, $43, $29, $0C, $44, $29, $0C, $43, $39, $0F, $44, $39, $0F, $51 ; CPU:$D88A PRG:188A 03 1A 1C 43 29 0C 44 29 0C 43 39 0F 44 39 0F 51 + .byte $33, $09, $52, $33, $09, $58, $36, $19, $59, $36, $19, $43, $4A, $0E, $45, $C9 ; CPU:$D89A PRG:189A 33 09 52 33 09 58 36 19 59 36 19 43 4A 0E 45 C9 + .byte $0C, $43, $98, $0F, $45, $19, $0D, $4E, $95, $09, $53, $13, $0A, $57, $56, $19 ; CPU:$D8AA PRG:18AA 0C 43 98 0F 45 19 0D 4E 95 09 53 13 0A 57 56 19 + .byte $D8, $D4, $18, $04, $08, $1B, $09, $06, $0A, $19, $0B, $08, $0C, $17, $0D, $0E ; CPU:$D8BA PRG:18BA D8 D4 18 04 08 1B 09 06 0A 19 0B 08 0C 17 0D 0E + .byte $0E, $15, $0F, $0C, $10, $13, $11, $0A, $12, $11, $13, $08, $14, $0F, $15, $06 ; CPU:$D8CA PRG:18CA 0E 15 0F 0C 10 13 11 0A 12 11 13 08 14 0F 15 06 + .byte $16, $19, $17, $84, $18, $1B, $19, $07, $09, $17, $09, $07, $18, $97, $18, $0B ; CPU:$D8DA PRG:18DA 16 19 17 84 18 1B 19 07 09 17 09 07 18 97 18 0B + .byte $08, $14, $0B, $09, $14, $0B, $19, $14, $0B, $1A, $14, $27, $0C, $16, $28, $0C ; CPU:$D8EA PRG:18EA 08 14 0B 09 14 0B 19 14 0B 1A 14 27 0C 16 28 0C + .byte $16, $37, $0C, $16, $38, $0C, $16, $48, $2B, $09, $49, $2B, $0A, $55, $29, $0B ; CPU:$D8FA PRG:18FA 16 37 0C 16 38 0C 16 48 2B 09 49 2B 0A 55 29 0B + .byte $55, $2A, $0B, $48, $37, $19, $49, $37, $18, $55, $38, $17, $55, $39, $17, $47 ; CPU:$D90A PRG:190A 55 2A 0B 48 37 19 49 37 18 55 38 17 55 39 17 47 + .byte $8B, $08, $49, $0C, $0A, $55, $C8, $0B, $54, $4A, $0C, $47, $57, $1A, $49, $D6 ; CPU:$D91A PRG:191A 8B 08 49 0C 0A 55 C8 0B 54 4A 0C 47 57 1A 49 D6 + .byte $18, $54, $98, $16, $D5, $1A, $17, $0A, $0A, $15, $19, $09, $0C, $09, $16, $96 ; CPU:$D92A PRG:192A 18 54 98 16 D5 1A 17 0A 0A 15 19 09 0C 09 16 96 + .byte $0C, $16, $16, $0F, $0E, $0E, $0F, $10, $0F, $0D, $10, $11, $10, $0E, $11, $10 ; CPU:$D93A PRG:193A 0C 16 16 0F 0E 0E 0F 10 0F 0D 10 11 10 0E 11 10 + .byte $11, $8F, $12, $03, $08, $1C, $03, $1A, $1C, $23, $09, $19, $3C, $09, $19, $04 ; CPU:$D94A PRG:194A 11 8F 12 03 08 1C 03 1A 1C 23 09 19 3C 09 19 04 + .byte $09, $1B, $05, $0B, $0C, $13, $0B, $1A, $07, $0D, $0A, $15, $0D, $18, $2C, $0F ; CPU:$D95A PRG:195A 09 1B 05 0B 0C 13 0B 1A 07 0D 0A 15 0D 18 2C 0F + .byte $12, $2E, $0D, $14, $31, $0D, $14, $33, $0F, $12, $44, $CA, $0E, $44, $4B, $0F ; CPU:$D96A PRG:196A 12 2E 0D 14 31 0D 14 33 0F 12 44 CA 0E 44 4B 0F + .byte $49, $8E, $0A, $49, $0F, $0A, $51, $4A, $0F, $52, $CA, $0E, $57, $8E, $0A, $57 ; CPU:$D97A PRG:197A 49 8E 0A 49 0F 0A 51 4A 0F 52 CA 0E 57 8E 0A 57 + .byte $0F, $0B, $4C, $8E, $0C, $4D, $0E, $0E, $4C, $53, $14, $4D, $D3, $13, $51, $CC ; CPU:$D98A PRG:198A 0F 0B 4C 8E 0C 4D 0E 0E 4C 53 14 4D D3 13 51 CC + .byte $0E, $52, $4E, $0E, $52, $14, $13, $52, $93, $13, $63, $98, $64, $99, $66, $90 ; CPU:$D99A PRG:199A 0E 52 4E 0E 52 14 13 52 93 13 63 98 64 99 66 90 + .byte $78, $90, $7A, $99, $FB, $98, $84, $0A, $1B, $19, $05, $0E, $19, $0E, $8F, $18 ; CPU:$D9AA PRG:19AA 78 90 7A 99 FB 98 84 0A 1B 19 05 0E 19 0E 8F 18 + .byte $03, $08, $1C, $08, $09, $17, $09, $0A, $09, $16, $0A, $16, $09, $18, $09, $16 ; CPU:$D9BA PRG:19BA 03 08 1C 08 09 17 09 0A 09 16 0A 16 09 18 09 16 + .byte $18, $16, $08, $19, $17, $03, $1A, $1C, $23, $09, $19, $3C, $09, $19, $47, $49 ; CPU:$D9CA PRG:19CA 18 16 08 19 17 03 1A 1C 23 09 19 3C 09 19 47 49 + .byte $0B, $56, $0B, $09, $47, $99, $17, $56, $D7, $19, $44, $CC, $0E, $44, $4D, $0E ; CPU:$D9DA PRG:19DA 0B 56 0B 09 47 99 17 56 D7 19 44 CC 0E 44 4D 0E + .byte $59, $8E, $0C, $5A, $0E, $0D, $44, $95, $14, $44, $16, $14, $59, $54, $16, $5A ; CPU:$D9EA PRG:19EA 59 8E 0C 5A 0E 0D 44 95 14 44 16 14 59 54 16 5A + .byte $D4, $15, $6F, $8C, $6F, $95, $69, $90, $69, $91, $75, $90, $F5, $91, $84, $08 ; CPU:$D9FA PRG:19FA D4 15 6F 8C 6F 95 69 90 69 91 75 90 F5 91 84 08 + .byte $1B, $19, $05, $09, $04, $0A, $19, $09, $1A, $0A, $04, $17, $05, $18, $1A, $17 ; CPU:$DA0A PRG:1A0A 1B 19 05 09 04 0A 19 09 1A 0A 04 17 05 18 1A 17 + .byte $99, $18, $05, $08, $0B, $14, $08, $1A, $04, $09, $1B, $0D, $0A, $12, $0D, $18 ; CPU:$DA1A PRG:1A1A 99 18 05 08 0B 14 08 1A 04 09 1B 0D 0A 12 0D 18 + .byte $12, $04, $19, $1B, $05, $1A, $0B, $14, $1A, $1A, $23, $0A, $0E, $23, $14, $18 ; CPU:$DA2A PRG:1A2A 12 04 19 1B 05 1A 0B 14 1A 1A 23 0A 0E 23 14 18 + .byte $24, $0A, $18, $25, $10, $12, $3A, $10, $12, $3B, $0A, $18, $3C, $0A, $0E, $3C ; CPU:$DA3A PRG:1A3A 24 0A 18 25 10 12 3A 10 12 3B 0A 18 3C 0A 0E 3C + .byte $14, $18, $43, $89, $08, $5B, $C8, $09, $43, $59, $1A, $5B, $1A, $19, $64, $89 ; CPU:$DA4A PRG:1A4A 14 18 43 89 08 5B C8 09 43 59 1A 5B 1A 19 64 89 + .byte $6B, $88, $6C, $89, $73, $88, $72, $89, $7A, $89, $63, $8E, $64, $8F, $7A, $8F ; CPU:$DA5A PRG:1A5A 6B 88 6C 89 73 88 72 89 7A 89 63 8E 64 8F 7A 8F + .byte $7B, $8E, $63, $93, $64, $92, $7A, $92, $7B, $93, $64, $98, $6C, $98, $6B, $99 ; CPU:$DA6A PRG:1A6A 7B 8E 63 93 64 92 7A 92 7B 93 64 98 6C 98 6B 99 + .byte $72, $98, $73, $99, $7A, $98, $0D, $0E, $12, $0C, $0F, $13, $0C, $13, $13, $0D ; CPU:$DA7A PRG:1A7A 72 98 73 99 7A 98 0D 0E 12 0C 0F 13 0C 13 13 0D + .byte $14, $12, $2B, $10, $12, $2C, $10, $12, $33, $10, $12, $34, $10, $12, $4B, $8F ; CPU:$DA8A PRG:1A8A 14 12 2B 10 12 2C 10 12 33 10 12 34 10 12 4B 8F + .byte $0E, $4B, $53, $14, $53, $CE, $0F, $53, $14, $13, $6C, $8F, $72, $8F, $6C, $92 ; CPU:$DA9A PRG:1A9A 0E 4B 53 14 53 CE 0F 53 14 13 6C 8F 72 8F 6C 92 + .byte $F2, $92, $05, $0A, $1A, $0F, $05, $14, $1A, $18, $05, $10, $0B, $13, $94, $10 ; CPU:$DAAA PRG:1AAA F2 92 05 0A 1A 0F 05 14 1A 18 05 10 0B 13 94 10 + .byte $1A, $13, $16, $0C, $88, $15, $03, $08, $0B, $14, $08, $1C, $0B, $0C, $14, $03 ; CPU:$DABA PRG:1ABA 1A 13 16 0C 88 15 03 08 0B 14 08 1C 0B 0C 14 03 + .byte $0F, $08, $17, $0F, $1C, $03, $13, $08, $17, $13, $1C, $0B, $16, $14, $03, $1A ; CPU:$DACA PRG:1ACA 0F 08 17 0F 1C 03 13 08 17 13 1C 0B 16 14 03 1A + .byte $0B, $14, $1A, $1C, $23, $09, $0E, $2B, $09, $0B, $34, $09, $0B, $3C, $09, $0E ; CPU:$DADA PRG:1ADA 0B 14 1A 1C 23 09 0E 2B 09 0B 34 09 0B 3C 09 0E + .byte $28, $10, $12, $37, $10, $12, $23, $14, $19, $2B, $17, $19, $34, $17, $19, $BC ; CPU:$DAEA PRG:1AEA 28 10 12 37 10 12 23 14 19 2B 17 19 34 17 19 BC + .byte $14, $19, $04, $09, $0A, $0E, $15, $09, $1B, $0E, $04, $14, $0A, $19, $15, $14 ; CPU:$DAFA PRG:1AFA 14 19 04 09 0A 0E 15 09 1B 0E 04 14 0A 19 15 14 + .byte $1B, $19, $89, $0D, $16, $15, $09, $09, $1A, $0D, $04, $14, $95, $18, $05, $08 ; CPU:$DB0A PRG:1B0A 1B 19 89 0D 16 15 09 09 1A 0D 04 14 95 18 05 08 + .byte $0B, $14, $08, $1A, $04, $09, $1B, $0D, $0A, $12, $0D, $18, $12, $04, $19, $1B ; CPU:$DB1A PRG:1B1A 0B 14 08 1A 04 09 1B 0D 0A 12 0D 18 12 04 19 1B + .byte $05, $1A, $0B, $14, $1A, $1A, $23, $0A, $0E, $23, $14, $18, $24, $0A, $18, $25 ; CPU:$DB2A PRG:1B2A 05 1A 0B 14 1A 1A 23 0A 0E 23 14 18 24 0A 18 25 + .byte $10, $12, $3A, $10, $12, $3B, $0A, $18, $3C, $0A, $0E, $3C, $14, $18, $43, $89 ; CPU:$DB3A PRG:1B3A 10 12 3A 10 12 3B 0A 18 3C 0A 0E 3C 14 18 43 89 + .byte $08, $5B, $C8, $09, $43, $59, $1A, $5B, $1A, $19, $64, $89, $6B, $88, $6C, $89 ; CPU:$DB4A PRG:1B4A 08 5B C8 09 43 59 1A 5B 1A 19 64 89 6B 88 6C 89 + .byte $73, $88, $72, $89, $7A, $89, $63, $8E, $64, $8F, $7A, $8F, $7B, $8E, $63, $93 ; CPU:$DB5A PRG:1B5A 73 88 72 89 7A 89 63 8E 64 8F 7A 8F 7B 8E 63 93 + .byte $64, $92, $7A, $92, $7B, $93, $64, $98, $6C, $98, $6B, $99, $72, $98, $73, $99 ; CPU:$DB6A PRG:1B6A 64 92 7A 92 7B 93 64 98 6C 98 6B 99 72 98 73 99 + .byte $7A, $98, $6F, $10, $F0, $11, $85, $0A, $1A, $18, $16, $15, $88, $0C, $04, $08 ; CPU:$DB7A PRG:1B7A 7A 98 6F 10 F0 11 85 0A 1A 18 16 15 88 0C 04 08 + .byte $13, $04, $19, $13, $45, $29, $10, $46, $29, $10, $45, $38, $11, $46, $38, $11 ; CPU:$DB8A PRG:1B8A 13 04 19 13 45 29 10 46 29 10 45 38 11 46 38 11 + .byte $54, $29, $10, $54, $38, $11, $43, $48, $10, $47, $C9, $10, $43, $99, $11, $47 ; CPU:$DB9A PRG:1B9A 54 29 10 54 38 11 43 48 10 47 C9 10 43 99 11 47 + .byte $18, $11, $53, $49, $10, $54, $C8, $10, $53, $98, $11, $D4, $19, $11, $07, $09 ; CPU:$DBAA PRG:1BAA 18 11 53 49 10 54 C8 10 53 98 11 D4 19 11 07 09 + .byte $13, $09, $06, $18, $13, $18, $08, $16, $15, $17, $08, $0A, $15, $0B, $0C, $12 ; CPU:$DBBA PRG:1BBA 13 09 06 18 13 18 08 16 15 17 08 0A 15 0B 0C 12 + .byte $17, $15, $0A, $14, $0B, $15, $18, $0E, $19, $13, $0C, $0C, $17, $0F, $0A, $0C ; CPU:$DBCA PRG:1BCA 17 15 0A 14 0B 15 18 0E 19 13 0C 0C 17 0F 0A 0C + .byte $15, $0D, $8E, $10, $1A, $11, $98, $10, $03, $19, $1C, $03, $1A, $1C, $23, $15 ; CPU:$DBDA PRG:1BDA 15 0D 8E 10 1A 11 98 10 03 19 1C 03 1A 1C 23 15 + .byte $18, $3C, $15, $18, $63, $15, $7B, $15, $43, $34, $08, $44, $34, $09, $50, $28 ; CPU:$DBEA PRG:1BEA 18 3C 15 18 63 15 7B 15 43 34 08 44 34 09 50 28 + .byte $14, $50, $29, $14, $43, $93, $08, $45, $14, $0B, $51, $C8, $13, $D1, $4B, $14 ; CPU:$DBFA PRG:1BFA 14 50 29 14 43 93 08 45 14 0B 51 C8 13 D1 4B 14 + .byte $0E, $0A, $11, $0B, $0C, $0C, $13, $0D, $0A, $0E, $15, $0F, $08, $10, $17, $11 ; CPU:$DC0A PRG:1C0A 0E 0A 11 0B 0C 0C 13 0D 0A 0E 15 0F 08 10 17 11 + .byte $06, $12, $19, $13, $84, $14, $1B, $18, $0F, $09, $03, $17, $9B, $17, $03, $08 ; CPU:$DC1A PRG:1C1A 06 12 19 13 84 14 1B 18 0F 09 03 17 9B 17 03 08 + .byte $1C, $03, $1A, $1C, $23, $09, $19, $3C, $09, $19, $69, $88, $75, $88, $7B, $8F ; CPU:$DC2A PRG:1C2A 1C 03 1A 1C 23 09 19 3C 09 19 69 88 75 88 7B 8F + .byte $63, $92, $69, $99, $75, $99, $78, $4C, $E7, $56, $84, $09, $1B, $19, $1A, $09 ; CPU:$DC3A PRG:1C3A 63 92 69 99 75 99 78 4C E7 56 84 09 1B 19 1A 09 + .byte $84, $18, $03, $0B, $1C, $03, $14, $1C, $23, $0C, $13, $3C, $0C, $13, $63, $8B ; CPU:$DC4A PRG:1C4A 84 18 03 0B 1C 03 14 1C 23 0C 13 3C 0C 13 63 8B + .byte $63, $93, $7B, $8B, $7B, $93, $66, $8D, $70, $8D, $6E, $91, $F8, $91, $84, $0C ; CPU:$DC5A PRG:1C5A 63 93 7B 8B 7B 93 66 8D 70 8D 6E 91 F8 91 84 0C + .byte $1B, $13, $0A, $0C, $12, $0E, $0C, $11, $04, $10, $84, $11, $03, $08, $1C, $03 ; CPU:$DC6A PRG:1C6A 1B 13 0A 0C 12 0E 0C 11 04 10 84 11 03 08 1C 03 + .byte $09, $0D, $03, $0A, $09, $03, $0B, $07, $03, $0C, $06, $23, $0D, $19, $24, $0D ; CPU:$DC7A PRG:1C7A 09 0D 03 0A 09 03 0B 07 03 0C 06 23 0D 19 24 0D + .byte $11, $25, $0D, $0E, $03, $1A, $1C, $12, $19, $1C, $16, $18, $1C, $18, $17, $1C ; CPU:$DC8A PRG:1C8A 11 25 0D 0E 03 1A 1C 12 19 1C 16 18 1C 18 17 1C + .byte $19, $16, $1C, $3A, $14, $15, $3B, $11, $15, $3C, $09, $15, $63, $91, $64, $8E ; CPU:$DC9A PRG:1C9A 19 16 1C 3A 14 15 3B 11 15 3C 09 15 63 91 64 8E + .byte $69, $89, $6D, $88, $7B, $90, $7A, $93, $75, $98, $71, $99, $46, $0D, $0B, $D7 ; CPU:$DCAA PRG:1CAA 69 89 6D 88 7B 90 7A 93 75 98 71 99 46 0D 0B D7 + .byte $97, $15, $84, $09, $1B, $19, $8F, $10, $03, $08, $1C, $03, $1A, $1C, $23, $09 ; CPU:$DCBA PRG:1CBA 97 15 84 09 1B 19 8F 10 03 08 1C 03 1A 1C 23 09 + .byte $19, $3C, $09, $19, $6A, $4C, $6C, $4C, $6E, $4C, $70, $4C, $72, $4C, $74, $4C ; CPU:$DCCA PRG:1CCA 19 3C 09 19 6A 4C 6C 4C 6E 4C 70 4C 72 4C 74 4C + .byte $76, $4C, $6A, $56, $6C, $56, $6E, $56, $70, $56, $72, $56, $74, $56, $76, $56 ; CPU:$DCDA PRG:1CDA 76 4C 6A 56 6C 56 6E 56 70 56 72 56 74 56 76 56 + .byte $68, $4E, $E8, $54, $84, $09, $1B, $19, $07, $10, $07, $11, $1A, $09, $9A, $18 ; CPU:$DCEA PRG:1CEA 68 4E E8 54 84 09 1B 19 07 10 07 11 1A 09 9A 18 + .byte $03, $08, $1C, $03, $1A, $1C, $23, $08, $19, $3C, $08, $19, $6F, $8C, $47, $CF ; CPU:$DCFA PRG:1CFA 03 08 1C 03 1A 1C 23 08 19 3C 08 19 6F 8C 47 CF + .byte $15, $47, $50, $16, $52, $95, $0F, $D2, $16, $10, $84, $08, $1B, $19, $0F, $14 ; CPU:$DD0A PRG:1D0A 15 47 50 16 52 95 0F D2 16 10 84 08 1B 19 0F 14 + .byte $8F, $18, $0C, $09, $16, $11, $0D, $1C, $11, $16, $1C, $0C, $1A, $16, $3C, $0E ; CPU:$DD1A PRG:1D1A 8F 18 0C 09 16 11 0D 1C 11 16 1C 0C 1A 16 3C 0E + .byte $15, $43, $91, $09, $46, $11, $0A, $44, $31, $0A, $45, $31, $0A, $43, $52, $1A ; CPU:$DD2A PRG:1D2A 15 43 91 09 46 11 0A 44 31 0A 45 31 0A 43 52 1A + .byte $46, $D2, $19, $44, $32, $19, $45, $32, $19, $50, $8D, $0A, $54, $0C, $09, $52 ; CPU:$DD3A PRG:1D3A 46 D2 19 44 32 19 45 32 19 50 8D 0A 54 0C 09 52 + .byte $2C, $0A, $53, $2C, $0A, $50, $56, $19, $54, $D7, $1A, $52, $37, $19, $53, $37 ; CPU:$DD4A PRG:1D4A 2C 0A 53 2C 0A 50 56 19 54 D7 1A 52 37 19 53 37 + .byte $19, $EB, $91, $0C, $0A, $13, $19, $0A, $0C, $0B, $17, $08, $0E, $09, $15, $06 ; CPU:$DD5A PRG:1D5A 19 EB 91 0C 0A 13 19 0A 0C 0B 17 08 0E 09 15 06 + .byte $10, $07, $13, $94, $0E, $1B, $15, $10, $0A, $90, $18, $03, $08, $08, $10, $08 ; CPU:$DD6A PRG:1D6A 10 07 13 94 0E 1B 15 10 0A 90 18 03 08 08 10 08 + .byte $1A, $08, $15, $10, $03, $1A, $1A, $23, $09, $19, $28, $09, $14, $30, $09, $14 ; CPU:$DD7A PRG:1D7A 1A 08 15 10 03 1A 1A 23 09 19 28 09 14 30 09 14 + .byte $3C, $0A, $0E, $3C, $13, $18, $59, $49, $0B, $5B, $C8, $09, $5A, $29, $0A, $7B ; CPU:$DD8A PRG:1D8A 3C 0A 0E 3C 13 18 59 49 0B 5B C8 09 5A 29 0A 7B + .byte $49, $59, $90, $0E, $5B, $10, $0F, $5A, $30, $0F, $59, $51, $13, $5B, $D1, $12 ; CPU:$DD9A PRG:1D9A 49 59 90 0E 5B 10 0F 5A 30 0F 59 51 13 5B D1 12 + .byte $5A, $31, $12, $59, $99, $17, $5B, $1A, $19, $5A, $39, $18, $7B, $59, $44, $D7 ; CPU:$DDAA PRG:1DAA 5A 31 12 59 99 17 5B 1A 19 5A 39 18 7B 59 44 D7 + .byte $19, $44, $58, $19, $75, $14, $F6, $14, $04, $09, $07, $19, $08, $16, $10, $19 ; CPU:$DDBA PRG:1DBA 19 44 58 19 75 14 F6 14 04 09 07 19 08 16 10 19 + .byte $11, $09, $19, $19, $1A, $0A, $1B, $0F, $9A, $12, $1B, $19, $15, $0C, $96, $0C ; CPU:$DDCA PRG:1DCA 11 09 19 19 1A 0A 1B 0F 9A 12 1B 19 15 0C 96 0C + .byte $03, $08, $1C, $03, $1A, $1C, $23, $09, $19, $3C, $09, $19, $10, $0C, $15, $15 ; CPU:$DDDA PRG:1DDA 03 08 1C 03 1A 1C 23 09 19 3C 09 19 10 0C 15 15 + .byte $11, $18, $10, $16, $15, $0B, $11, $0E, $66, $49, $64, $4B, $64, $57, $66, $59 ; CPU:$DDEA PRG:1DEA 11 18 10 16 15 0B 11 0E 66 49 64 4B 64 57 66 59 + .byte $78, $88, $7B, $8B, $7B, $96, $F8, $99, $84, $09, $1B, $19, $04, $09, $04, $18 ; CPU:$DDFA PRG:1DFA 78 88 7B 8B 7B 96 F8 99 84 09 1B 19 04 09 04 18 + .byte $1A, $09, $9A, $18, $03, $08, $1C, $06, $09, $18, $07, $19, $19, $03, $1A, $1C ; CPU:$DE0A PRG:1E0A 1A 09 9A 18 03 08 1C 06 09 18 07 19 19 03 1A 1C + .byte $23, $09, $19, $24, $0C, $17, $3B, $0B, $16, $3C, $09, $19, $63, $8B, $78, $88 ; CPU:$DE1A PRG:1E1A 23 09 19 24 0C 17 3B 0B 16 3C 09 19 63 8B 78 88 + .byte $66, $99, $7B, $96, $66, $89, $7A, $8B, $64, $96, $F8, $98, $84, $09, $1B, $19 ; CPU:$DE2A PRG:1E2A 66 99 7B 96 66 89 7A 8B 64 96 F8 98 84 09 1B 19 + .byte $04, $09, $1A, $09, $04, $18, $9A, $18, $03, $08, $1C, $07, $09, $18, $03, $1A ; CPU:$DE3A PRG:1E3A 04 09 1A 09 04 18 9A 18 03 08 1C 07 09 18 03 1A + .byte $1C, $07, $19, $18, $23, $09, $19, $3C, $09, $19, $24, $0C, $16, $25, $0C, $16 ; CPU:$DE4A PRG:1E4A 1C 07 19 18 23 09 19 3C 09 19 24 0C 16 25 0C 16 + .byte $26, $0C, $16, $27, $0D, $15, $28, $0D, $15, $29, $0D, $15, $2A, $0E, $14, $2B ; CPU:$DE5A PRG:1E5A 26 0C 16 27 0D 15 28 0D 15 29 0D 15 2A 0E 14 2B + .byte $0E, $14, $2C, $0E, $14, $2D, $0F, $13, $2E, $10, $12, $19, $0C, $1B, $16, $0D ; CPU:$DE6A PRG:1E6A 0E 14 2C 0E 14 2D 0F 13 2E 10 12 19 0C 1B 16 0D + .byte $1B, $13, $0E, $16, $72, $4F, $72, $53, $13, $14, $16, $16, $15, $1B, $19, $16 ; CPU:$DE7A PRG:1E7A 1B 13 0E 16 72 4F 72 53 13 14 16 16 15 1B 19 16 + .byte $1B, $4D, $CE, $0F, $4D, $14, $13, $66, $88, $63, $8B, $78, $88, $7B, $8B, $66 ; CPU:$DE8A PRG:1E8A 1B 4D CE 0F 4D 14 13 66 88 63 8B 78 88 7B 8B 66 + .byte $8C, $69, $8D, $72, $8E, $73, $8E, $75, $8D, $76, $8D, $78, $8C, $63, $96, $66 ; CPU:$DE9A PRG:1E9A 8C 69 8D 72 8E 73 8E 75 8D 76 8D 78 8C 63 96 66 + .byte $99, $78, $99, $7B, $96, $66, $95, $69, $94, $72, $93, $73, $93, $75, $94, $76 ; CPU:$DEAA PRG:1EAA 99 78 99 7B 96 66 95 69 94 72 93 73 93 75 94 76 + .byte $94, $F8, $95, $84, $09, $1B, $19, $04, $09, $1A, $09, $04, $18, $9A, $18, $03 ; CPU:$DEBA PRG:1EBA 94 F8 95 84 09 1B 19 04 09 1A 09 04 18 9A 18 03 + .byte $08, $1C, $03, $1A, $1C, $23, $09, $19, $3C, $09, $19, $44, $0A, $09, $44, $13 ; CPU:$DECA PRG:1ECA 08 1C 03 1A 1C 23 09 19 3C 09 19 44 0A 09 44 13 + .byte $13, $44, $D8, $19, $5A, $49, $0A, $5B, $8F, $0F, $5A, $99, $18, $64, $49, $64 ; CPU:$DEDA PRG:1EDA 13 44 D8 19 5A 49 0A 5B 8F 0F 5A 99 18 64 49 64 + .byte $52, $64, $59, $7B, $49, $7B, $50, $7B, $59, $0A, $11, $0D, $92, $11, $15, $84 ; CPU:$DEEA PRG:1EEA 52 64 59 7B 49 7B 50 7B 59 0A 11 0D 92 11 15 84 + .byte $09, $1B, $19, $04, $10, $9A, $11, $03, $0C, $0B, $14, $0C, $1C, $03, $16, $0B ; CPU:$DEFA PRG:1EFA 09 1B 19 04 10 9A 11 03 0C 0B 14 0C 1C 03 16 0B + .byte $14, $16, $1C, $23, $0D, $15, $3C, $0D, $15, $4B, $2B, $08, $4C, $2B, $08, $50 ; CPU:$DF0A PRG:1F0A 14 16 1C 23 0D 15 3C 0D 15 4B 2B 08 4C 2B 08 50 + .byte $28, $0B, $51, $28, $0B, $4A, $8B, $08, $4C, $0C, $09, $50, $49, $0C, $52, $C8 ; CPU:$DF1A PRG:1F1A 28 0B 51 28 0B 4A 8B 08 4C 0C 09 50 49 0C 52 C8 + .byte $0B, $4B, $37, $1A, $4C, $37, $1A, $50, $3A, $17, $51, $3A, $17, $4A, $57, $1A ; CPU:$DF2A PRG:1F2A 0B 4B 37 1A 4C 37 1A 50 3A 17 51 3A 17 4A 57 1A + .byte $4C, $D6, $19, $50, $99, $16, $52, $1A, $17, $08, $11, $0A, $29, $10, $12, $0E ; CPU:$DF3A PRG:1F3A 4C D6 19 50 99 16 52 1A 17 08 11 0A 29 10 12 0E + .byte $11, $11, $16, $11, $18, $B7, $10, $12, $04, $0D, $1B, $15, $0C, $0A, $13, $17 ; CPU:$DF4A PRG:1F4A 11 11 16 11 18 B7 10 12 04 0D 1B 15 0C 0A 13 17 + .byte $8E, $08, $11, $19, $08, $10, $09, $10, $08, $11, $09, $11, $0F, $10, $0F, $11 ; CPU:$DF5A PRG:1F5A 8E 08 11 19 08 10 09 10 08 11 09 11 0F 10 0F 11 + .byte $16, $10, $17, $10, $16, $11, $97, $11, $03, $08, $0D, $12, $08, $1C, $03, $19 ; CPU:$DF6A PRG:1F6A 16 10 17 10 16 11 97 11 03 08 0D 12 08 1C 03 19 + .byte $0D, $12, $19, $1C, $23, $09, $0D, $23, $14, $18, $3C, $09, $0D, $3C, $14, $18 ; CPU:$DF7A PRG:1F7A 0D 12 19 1C 23 09 0D 23 14 18 3C 09 0D 3C 14 18 + .byte $4D, $29, $0C, $4E, $29, $0B, $4F, $2B, $09, $4F, $2C, $09, $4C, $49, $0B, $4E ; CPU:$DF8A PRG:1F8A 4D 29 0C 4E 29 0B 4F 2B 09 4F 2C 09 4C 49 0B 4E + .byte $C8, $09, $50, $89, $08, $51, $0B, $09, $44, $2D, $11, $44, $2E, $11, $44, $33 ; CPU:$DF9A PRG:1F9A C8 09 50 89 08 51 0B 09 44 2D 11 44 2E 11 44 33 + .byte $10, $44, $34, $10, $43, $4E, $10, $43, $93, $11, $44, $CC, $0F, $44, $15, $12 ; CPU:$DFAA PRG:1FAA 10 44 34 10 43 4E 10 43 93 11 44 CC 0F 44 15 12 + .byte $57, $31, $0D, $59, $30, $0E, $57, $30, $14, $59, $31, $13, $58, $8F, $0C, $5A ; CPU:$DFBA PRG:1FBA 57 31 0D 59 30 0E 57 30 14 59 31 13 58 8F 0C 5A + .byte $10, $0E, $58, $52, $15, $5A, $D1, $13, $4D, $38, $15, $4E, $38, $17, $4F, $35 ; CPU:$DFCA PRG:1FCA 10 0E 58 52 15 5A D1 13 4D 38 15 4E 38 17 4F 35 + .byte $18, $50, $37, $18, $4C, $98, $16, $4E, $19, $18, $50, $58, $19, $D1, $D6, $18 ; CPU:$DFDA PRG:1FDA 18 50 37 18 4C 98 16 4E 19 18 50 58 19 D1 D6 18 + .byte $04, $09, $0D, $0D, $12, $09, $1B, $0D, $04, $14, $0D, $18, $12, $14, $1B, $18 ; CPU:$DFEA PRG:1FEA 04 09 0D 0D 12 09 1B 0D 04 14 0D 18 12 14 1B 18 + .byte $86, $0A, $19, $17, $03, $08, $0A, $08, $14, $08, $1B, $08, $0E, $0C, $10, $0C ; CPU:$DFFA PRG:1FFA 86 0A 19 17 03 08 0A 08 14 08 1B 08 0E 0C 10 0C + .byte $08, $0F, $08, $11, $16, $0F, $16, $11, $0E, $14, $10, $14, $03, $18, $0A, $18 ; CPU:$E00A PRG:200A 08 0F 08 11 16 0F 16 11 0E 14 10 14 03 18 0A 18 + .byte $14, $18, $9B, $18 ; CPU:$E01A PRG:201A 14 18 9B 18 +; ----------------------------------------------------------------------------- +; Routine: Label_E01E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E01E: + jsr $E370 ; CPU:$E01E PRG:201E 20 70 E3 + tax ; CPU:$E021 PRG:2021 AA + and #$C0 ; CPU:$E022 PRG:2022 29 C0 + bne Label_E02F ; CPU:$E024 PRG:2024 D0 09 + lda Zp01 ; CPU:$E026 PRG:2026 A5 01 + and #$7F ; CPU:$E028 PRG:2028 29 7F + sta Zp01 ; CPU:$E02A PRG:202A 85 01 + jmp $E062 ; CPU:$E02C PRG:202C 4C 62 E0 +; ----------------------------------------------------------------------------- +; Routine: Label_E02F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E02F: + lda Zp01 ; CPU:$E02F PRG:202F A5 01 + and #$80 ; CPU:$E031 PRG:2031 29 80 + bne Label_E040 ; CPU:$E033 PRG:2033 D0 0B + ora #$80 ; CPU:$E035 PRG:2035 09 80 + sta Zp01 ; CPU:$E037 PRG:2037 85 01 + lda #$10 ; CPU:$E039 PRG:2039 A9 10 + sta $0348 ; CPU:$E03B PRG:203B 8D 48 03 + bne Label_E048 ; CPU:$E03E PRG:203E D0 08 +; ----------------------------------------------------------------------------- +; Routine: Label_E040 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E040: + dec $0348 ; CPU:$E040 PRG:2040 CE 48 03 + bne Label_E062 ; CPU:$E043 PRG:2043 D0 1D + inc $0348 ; CPU:$E045 PRG:2045 EE 48 03 +; ----------------------------------------------------------------------------- +; Routine: Label_E048 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E048: + txa ; CPU:$E048 PRG:2048 8A + and #$40 ; CPU:$E049 PRG:2049 29 40 + beq Label_E055 ; CPU:$E04B PRG:204B F0 08 + dec $03C0 ; CPU:$E04D PRG:204D CE C0 03 + lda #$03 ; CPU:$E050 PRG:2050 A9 03 + jsr $C3DA ; CPU:$E052 PRG:2052 20 DA C3 +; ----------------------------------------------------------------------------- +; Routine: Label_E055 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E055: + txa ; CPU:$E055 PRG:2055 8A + and #$80 ; CPU:$E056 PRG:2056 29 80 + beq Label_E062 ; CPU:$E058 PRG:2058 F0 08 + inc $03C0 ; CPU:$E05A PRG:205A EE C0 03 + lda #$03 ; CPU:$E05D PRG:205D A9 03 + jsr $C3DA ; CPU:$E05F PRG:205F 20 DA C3 +; ----------------------------------------------------------------------------- +; Routine: Label_E062 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E062: + lda $03B0 ; CPU:$E062 PRG:2062 AD B0 03 + bmi Label_E079 ; CPU:$E065 PRG:2065 30 12 + clc ; CPU:$E067 PRG:2067 18 + adc $03A0 ; CPU:$E068 PRG:2068 6D A0 03 + sta $03A0 ; CPU:$E06B PRG:206B 8D A0 03 + bcc Label_E094 ; CPU:$E06E PRG:206E 90 24 + sbc $03B0 ; CPU:$E070 PRG:2070 ED B0 03 + sta $03A0 ; CPU:$E073 PRG:2073 8D A0 03 + jmp $E089 ; CPU:$E076 PRG:2076 4C 89 E0 +; ----------------------------------------------------------------------------- +; Routine: Label_E079 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E079: + clc ; CPU:$E079 PRG:2079 18 + adc $03A0 ; CPU:$E07A PRG:207A 6D A0 03 + sta $03A0 ; CPU:$E07D PRG:207D 8D A0 03 + bcs Label_E094 ; CPU:$E080 PRG:2080 B0 12 + sec ; CPU:$E082 PRG:2082 38 + sbc $03B0 ; CPU:$E083 PRG:2083 ED B0 03 + sta $03A0 ; CPU:$E086 PRG:2086 8D A0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_E089 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E089: + lda $03B0 ; CPU:$E089 PRG:2089 AD B0 03 + eor #$FF ; CPU:$E08C PRG:208C 49 FF + clc ; CPU:$E08E PRG:208E 18 + adc #$01 ; CPU:$E08F PRG:208F 69 01 + sta $03B0 ; CPU:$E091 PRG:2091 8D B0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_E094 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E094: + ldy $0358 ; CPU:$E094 PRG:2094 AC 58 03 + txa ; CPU:$E097 PRG:2097 8A + and #$10 ; CPU:$E098 PRG:2098 29 10 + beq Label_E0A4 ; CPU:$E09A PRG:209A F0 08 + tya ; CPU:$E09C PRG:209C 98 + cmp #$7E ; CPU:$E09D PRG:209D C9 7E + bcs Label_E0A4 ; CPU:$E09F PRG:209F B0 03 + adc #$01 ; CPU:$E0A1 PRG:20A1 69 01 + tay ; CPU:$E0A3 PRG:20A3 A8 +; ----------------------------------------------------------------------------- +; Routine: Label_E0A4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E0A4: + txa ; CPU:$E0A4 PRG:20A4 8A + and #$20 ; CPU:$E0A5 PRG:20A5 29 20 + beq Label_E0B1 ; CPU:$E0A7 PRG:20A7 F0 08 + tya ; CPU:$E0A9 PRG:20A9 98 + cmp #$0A ; CPU:$E0AA PRG:20AA C9 0A + bcc Label_E0B1 ; CPU:$E0AC PRG:20AC 90 03 + sbc #$01 ; CPU:$E0AE PRG:20AE E9 01 + tay ; CPU:$E0B0 PRG:20B0 A8 +; ----------------------------------------------------------------------------- +; Routine: Label_E0B1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E0B1: + sty $0358 ; CPU:$E0B1 PRG:20B1 8C 58 03 + lda $0358 ; CPU:$E0B4 PRG:20B4 AD 58 03 + sta $0318 ; CPU:$E0B7 PRG:20B7 8D 18 03 +; ----------------------------------------------------------------------------- +; Routine: Label_E0BA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E0BA: + lda $0318 ; CPU:$E0BA PRG:20BA AD 18 03 + sta ZpFA ; CPU:$E0BD PRG:20BD 85 FA + lda #$00 ; CPU:$E0BF PRG:20BF A9 00 + sta ZpFB ; CPU:$E0C1 PRG:20C1 85 FB + lda $03C0 ; CPU:$E0C3 PRG:20C3 AD C0 03 + jsr $FEA8 ; CPU:$E0C6 PRG:20C6 20 A8 FE + lda ZpFC ; CPU:$E0C9 PRG:20C9 A5 FC + sta ZpF8 ; CPU:$E0CB PRG:20CB 85 F8 + lda ZpFD ; CPU:$E0CD PRG:20CD A5 FD + sta ZpF9 ; CPU:$E0CF PRG:20CF 85 F9 + jsr $FD8B ; CPU:$E0D1 PRG:20D1 20 8B FD + txa ; CPU:$E0D4 PRG:20D4 8A + clc ; CPU:$E0D5 PRG:20D5 18 + bmi Label_E104 ; CPU:$E0D6 PRG:20D6 30 2C + adc $0330 ; CPU:$E0D8 PRG:20D8 6D 30 03 + bcs Label_E0E1 ; CPU:$E0DB PRG:20DB B0 04 + cmp #$E0 ; CPU:$E0DD PRG:20DD C9 E0 + bcc Label_E0FE ; CPU:$E0DF PRG:20DF 90 1D +; ----------------------------------------------------------------------------- +; Routine: Label_E0E1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E0E1: + lda #$DF ; CPU:$E0E1 PRG:20E1 A9 DF +; ----------------------------------------------------------------------------- +; Routine: Label_E0E3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E0E3: + sec ; CPU:$E0E3 PRG:20E3 38 + sbc $0330 ; CPU:$E0E4 PRG:20E4 ED 30 03 +; ----------------------------------------------------------------------------- +; Routine: Label_E0E7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E0E7: + sta ZpFD ; CPU:$E0E7 PRG:20E7 85 FD + lda #$00 ; CPU:$E0E9 PRG:20E9 A9 00 + sta ZpFC ; CPU:$E0EB PRG:20EB 85 FC + lda ZpF8 ; CPU:$E0ED PRG:20ED A5 F8 + sta ZpFA ; CPU:$E0EF PRG:20EF 85 FA + lda ZpF9 ; CPU:$E0F1 PRG:20F1 A5 F9 + sta ZpFB ; CPU:$E0F3 PRG:20F3 85 FB + jsr $FDFE ; CPU:$E0F5 PRG:20F5 20 FE FD + sty $0318 ; CPU:$E0F8 PRG:20F8 8C 18 03 + jmp $E0BA ; CPU:$E0FB PRG:20FB 4C BA E0 +; ----------------------------------------------------------------------------- +; Routine: Label_E0FE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E0FE: + sta $0328 ; CPU:$E0FE PRG:20FE 8D 28 03 + jmp $E118 ; CPU:$E101 PRG:2101 4C 18 E1 +; ----------------------------------------------------------------------------- +; Routine: Label_E104 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E104: + adc $0330 ; CPU:$E104 PRG:2104 6D 30 03 + bcc Label_E113 ; CPU:$E107 PRG:2107 90 0A + cmp #$38 ; CPU:$E109 PRG:2109 C9 38 + bcc Label_E113 ; CPU:$E10B PRG:210B 90 06 + sta $0328 ; CPU:$E10D PRG:210D 8D 28 03 + jmp $E118 ; CPU:$E110 PRG:2110 4C 18 E1 +; ----------------------------------------------------------------------------- +; Routine: Label_E113 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E113: + lda #$38 ; CPU:$E113 PRG:2113 A9 38 + jmp $E0E3 ; CPU:$E115 PRG:2115 4C E3 E0 +; ----------------------------------------------------------------------------- +; Routine: Label_E118 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E118: + lda #$00 ; CPU:$E118 PRG:2118 A9 00 + sta ZpFB ; CPU:$E11A PRG:211A 85 FB + lda $0318 ; CPU:$E11C PRG:211C AD 18 03 + sta ZpFA ; CPU:$E11F PRG:211F 85 FA + lda $03C0 ; CPU:$E121 PRG:2121 AD C0 03 + jsr $FF0E ; CPU:$E124 PRG:2124 20 0E FF + lda ZpFC ; CPU:$E127 PRG:2127 A5 FC + sta ZpF8 ; CPU:$E129 PRG:2129 85 F8 + lda ZpFD ; CPU:$E12B PRG:212B A5 FD + sta ZpF9 ; CPU:$E12D PRG:212D 85 F9 + jsr $FD8B ; CPU:$E12F PRG:212F 20 8B FD + txa ; CPU:$E132 PRG:2132 8A + clc ; CPU:$E133 PRG:2133 18 + bmi Label_E14E ; CPU:$E134 PRG:2134 30 18 + adc $0370 ; CPU:$E136 PRG:2136 6D 70 03 + bcs Label_E145 ; CPU:$E139 PRG:2139 B0 0A + cmp #$F0 ; CPU:$E13B PRG:213B C9 F0 + bcs Label_E145 ; CPU:$E13D PRG:213D B0 06 + sta $0338 ; CPU:$E13F PRG:213F 8D 38 03 + jmp $E162 ; CPU:$E142 PRG:2142 4C 62 E1 +; ----------------------------------------------------------------------------- +; Routine: Label_E145 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E145: + lda #$EF ; CPU:$E145 PRG:2145 A9 EF +; ----------------------------------------------------------------------------- +; Routine: Label_E147 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E147: + sec ; CPU:$E147 PRG:2147 38 + sbc $0370 ; CPU:$E148 PRG:2148 ED 70 03 + jmp $E0E7 ; CPU:$E14B PRG:214B 4C E7 E0 +; ----------------------------------------------------------------------------- +; Routine: Label_E14E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E14E: + adc $0370 ; CPU:$E14E PRG:214E 6D 70 03 + bcc Label_E15D ; CPU:$E151 PRG:2151 90 0A + cmp #$10 ; CPU:$E153 PRG:2153 C9 10 + bcc Label_E15D ; CPU:$E155 PRG:2155 90 06 + sta $0338 ; CPU:$E157 PRG:2157 8D 38 03 + jmp $E162 ; CPU:$E15A PRG:215A 4C 62 E1 +; ----------------------------------------------------------------------------- +; Routine: Label_E15D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E15D: + lda #$10 ; CPU:$E15D PRG:215D A9 10 + jmp $E147 ; CPU:$E15F PRG:215F 4C 47 E1 +; ----------------------------------------------------------------------------- +; Routine: Label_E162 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E162: + lda $03A0 ; CPU:$E162 PRG:2162 AD A0 03 + lsr a ; CPU:$E165 PRG:2165 4A + lsr a ; CPU:$E166 PRG:2166 4A + lsr a ; CPU:$E167 PRG:2167 4A + lsr a ; CPU:$E168 PRG:2168 4A + clc ; CPU:$E169 PRG:2169 18 + adc #$01 ; CPU:$E16A PRG:216A 69 01 + lsr a ; CPU:$E16C PRG:216C 4A + sta ZpF6 ; CPU:$E16D PRG:216D 85 F6 + ldx #$00 ; CPU:$E16F PRG:216F A2 00 +; ----------------------------------------------------------------------------- +; Routine: Label_E171 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E171: + lda ZpF6 ; CPU:$E171 PRG:2171 A5 F6 + bne Label_E17C ; CPU:$E173 PRG:2173 D0 07 + lda #$F8 ; CPU:$E175 PRG:2175 A9 F8 + sta $02E0,x ; CPU:$E177 PRG:2177 9D E0 02 + bne Label_E194 ; CPU:$E17A PRG:217A D0 18 +; ----------------------------------------------------------------------------- +; Routine: Label_E17C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E17C: + dec ZpF6 ; CPU:$E17C PRG:217C C6 F6 + lda #$27 ; CPU:$E17E PRG:217E A9 27 + sta $02E0,x ; CPU:$E180 PRG:2180 9D E0 02 + lda #$25 ; CPU:$E183 PRG:2183 A9 25 + sta $02E1,x ; CPU:$E185 PRG:2185 9D E1 02 + lda #$03 ; CPU:$E188 PRG:2188 A9 03 + sta $02E2,x ; CPU:$E18A PRG:218A 9D E2 02 + txa ; CPU:$E18D PRG:218D 8A + asl a ; CPU:$E18E PRG:218E 0A + adc #$A0 ; CPU:$E18F PRG:218F 69 A0 + sta $02E3,x ; CPU:$E191 PRG:2191 9D E3 02 +; ----------------------------------------------------------------------------- +; Routine: Label_E194 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E194: + inx ; CPU:$E194 PRG:2194 E8 + inx ; CPU:$E195 PRG:2195 E8 + inx ; CPU:$E196 PRG:2196 E8 + inx ; CPU:$E197 PRG:2197 E8 + cpx #$20 ; CPU:$E198 PRG:2198 E0 20 + bne Label_E171 ; CPU:$E19A PRG:219A D0 D5 + rts ; CPU:$E19C PRG:219C 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E19D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E19D: + lda $01C6 ; CPU:$E19D PRG:219D AD C6 01 + beq Label_E1A4 ; CPU:$E1A0 PRG:21A0 F0 02 + bne Label_E1E5 ; CPU:$E1A2 PRG:21A2 D0 41 +; ----------------------------------------------------------------------------- +; Routine: Label_E1A4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E1A4: + txa ; CPU:$E1A4 PRG:21A4 8A + pha ; CPU:$E1A5 PRG:21A5 48 + tya ; CPU:$E1A6 PRG:21A6 98 + pha ; CPU:$E1A7 PRG:21A7 48 + ldx #$20 ; CPU:$E1A8 PRG:21A8 A2 20 + ldy #$64 ; CPU:$E1AA PRG:21AA A0 64 +; ----------------------------------------------------------------------------- +; Routine: Label_E1AC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E1AC: + lda #$68 ; CPU:$E1AC PRG:21AC A9 68 +; ----------------------------------------------------------------------------- +; Routine: Label_E1AE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E1AE: + stx ZpFD ; CPU:$E1AE PRG:21AE 86 FD + sty ZpFC ; CPU:$E1B0 PRG:21B0 84 FC + sta ZpFA ; CPU:$E1B2 PRG:21B2 85 FA + jsr $CBFB ; CPU:$E1B4 PRG:21B4 20 FB CB + ldx ZpFA ; CPU:$E1B7 PRG:21B7 A6 FA + ldy #$06 ; CPU:$E1B9 PRG:21B9 A0 06 +; ----------------------------------------------------------------------------- +; Routine: Label_E1BB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E1BB: + lda $0400,x ; CPU:$E1BB PRG:21BB BD 00 04 + clc ; CPU:$E1BE PRG:21BE 18 + adc #$30 ; CPU:$E1BF PRG:21BF 69 30 + jsr $CC29 ; CPU:$E1C1 PRG:21C1 20 29 CC + inx ; CPU:$E1C4 PRG:21C4 E8 + dey ; CPU:$E1C5 PRG:21C5 88 + bne Label_E1BB ; CPU:$E1C6 PRG:21C6 D0 F3 + lda #$30 ; CPU:$E1C8 PRG:21C8 A9 30 + jsr $CC29 ; CPU:$E1CA PRG:21CA 20 29 CC + pla ; CPU:$E1CD PRG:21CD 68 + tay ; CPU:$E1CE PRG:21CE A8 + pla ; CPU:$E1CF PRG:21CF 68 + tax ; CPU:$E1D0 PRG:21D0 AA + rts ; CPU:$E1D1 PRG:21D1 60 +; ---- data $E1D2-$E1E4 (19 bytes) ---- + .byte $48, $4A, $4A, $4A, $4A, $18, $69, $30, $20, $29, $CC, $68, $29, $0F, $69, $30 ; CPU:$E1D2 PRG:21D2 48 4A 4A 4A 4A 18 69 30 20 29 CC 68 29 0F 69 30 + .byte $4C, $29, $CC ; CPU:$E1E2 PRG:21E2 4C 29 CC +; ----------------------------------------------------------------------------- +; Routine: Label_E1E5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E1E5: + txa ; CPU:$E1E5 PRG:21E5 8A + pha ; CPU:$E1E6 PRG:21E6 48 + tya ; CPU:$E1E7 PRG:21E7 98 + pha ; CPU:$E1E8 PRG:21E8 48 + ldx #$20 ; CPU:$E1E9 PRG:21E9 A2 20 + ldy #$84 ; CPU:$E1EB PRG:21EB A0 84 +; ----------------------------------------------------------------------------- +; Routine: Label_E1ED +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E1ED: + lda #$6E ; CPU:$E1ED PRG:21ED A9 6E + jmp $E1AE ; CPU:$E1EF PRG:21EF 4C AE E1 +; ----------------------------------------------------------------------------- +; Routine: Label_E1F2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E1F2: + txa ; CPU:$E1F2 PRG:21F2 8A + pha ; CPU:$E1F3 PRG:21F3 48 + tya ; CPU:$E1F4 PRG:21F4 98 + pha ; CPU:$E1F5 PRG:21F5 48 + ldx #$20 ; CPU:$E1F6 PRG:21F6 A2 20 + ldy #$69 ; CPU:$E1F8 PRG:21F8 A0 69 + lda $01C6 ; CPU:$E1FA PRG:21FA AD C6 01 + bne Label_E1ED ; CPU:$E1FD PRG:21FD D0 EE + jmp $E1AC ; CPU:$E1FF PRG:21FF 4C AC E1 +; ----------------------------------------------------------------------------- +; Routine: Label_E202 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E202: + txa ; CPU:$E202 PRG:2202 8A + pha ; CPU:$E203 PRG:2203 48 + tya ; CPU:$E204 PRG:2204 98 + pha ; CPU:$E205 PRG:2205 48 + ldx #$20 ; CPU:$E206 PRG:2206 A2 20 + ldy #$75 ; CPU:$E208 PRG:2208 A0 75 + jmp $E215 ; CPU:$E20A PRG:220A 4C 15 E2 +; ----------------------------------------------------------------------------- +; Routine: Label_E20D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E20D: + txa ; CPU:$E20D PRG:220D 8A + pha ; CPU:$E20E PRG:220E 48 + tya ; CPU:$E20F PRG:220F 98 + pha ; CPU:$E210 PRG:2210 48 + ldx #$20 ; CPU:$E211 PRG:2211 A2 20 + ldy #$A4 ; CPU:$E213 PRG:2213 A0 A4 +; ----------------------------------------------------------------------------- +; Routine: Label_E215 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E215: + lda #$62 ; CPU:$E215 PRG:2215 A9 62 + jmp $E1AE ; CPU:$E217 PRG:2217 4C AE E1 +; ---- data $E21A-$E22E (21 bytes) ---- + .byte $8A, $48, $98, $48, $A2, $22, $A0, $B2, $4C, $2D, $E2, $8A, $48, $98, $48, $A2 ; CPU:$E21A PRG:221A 8A 48 98 48 A2 22 A0 B2 4C 2D E2 8A 48 98 48 A2 + .byte $20, $A0, $71, $A9, $87 ; CPU:$E22A PRG:222A 20 A0 71 A9 87 +; ----------------------------------------------------------------------------- +; Routine: Label_E22F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E22F: + stx ZpFD ; CPU:$E22F PRG:222F 86 FD + sty ZpFC ; CPU:$E231 PRG:2231 84 FC + sta ZpFA ; CPU:$E233 PRG:2233 85 FA + jsr $CBFB ; CPU:$E235 PRG:2235 20 FB CB + ldx ZpFA ; CPU:$E238 PRG:2238 A6 FA + lda $0100,x ; CPU:$E23A PRG:223A BD 00 01 + jsr $E2FE ; CPU:$E23D PRG:223D 20 FE E2 +; ----------------------------------------------------------------------------- +; Routine: Label_E240 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E240: + lda Zp0D ; CPU:$E240 PRG:2240 A5 0D + jsr $CC29 ; CPU:$E242 PRG:2242 20 29 CC + lda Zp0E ; CPU:$E245 PRG:2245 A5 0E + jsr $CC29 ; CPU:$E247 PRG:2247 20 29 CC + pla ; CPU:$E24A PRG:224A 68 + tay ; CPU:$E24B PRG:224B A8 + pla ; CPU:$E24C PRG:224C 68 + tax ; CPU:$E24D PRG:224D AA + rts ; CPU:$E24E PRG:224E 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E24F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E24F: + txa ; CPU:$E24F PRG:224F 8A + pha ; CPU:$E250 PRG:2250 48 + tya ; CPU:$E251 PRG:2251 98 + pha ; CPU:$E252 PRG:2252 48 + ldx #$20 ; CPU:$E253 PRG:2253 A2 20 + ldy #$91 ; CPU:$E255 PRG:2255 A0 91 + lda #$C4 ; CPU:$E257 PRG:2257 A9 C4 + jmp $E22F ; CPU:$E259 PRG:2259 4C 2F E2 +; ----------------------------------------------------------------------------- +; Routine: Label_E25C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E25C: + txa ; CPU:$E25C PRG:225C 8A + pha ; CPU:$E25D PRG:225D 48 + tya ; CPU:$E25E PRG:225E 98 + pha ; CPU:$E25F PRG:225F 48 + ldx #$20 ; CPU:$E260 PRG:2260 A2 20 + ldy #$B1 ; CPU:$E262 PRG:2262 A0 B1 + lda $01C7 ; CPU:$E264 PRG:2264 AD C7 01 + cmp #$02 ; CPU:$E267 PRG:2267 C9 02 + bne Label_E270 ; CPU:$E269 PRG:2269 D0 05 + lda $01C6 ; CPU:$E26B PRG:226B AD C6 01 + bne Label_E275 ; CPU:$E26E PRG:226E D0 05 +; ----------------------------------------------------------------------------- +; Routine: Label_E270 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E270: + lda #$C3 ; CPU:$E270 PRG:2270 A9 C3 + jmp $E22F ; CPU:$E272 PRG:2272 4C 2F E2 +; ----------------------------------------------------------------------------- +; Routine: Label_E275 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E275: + jsr $CBA9 ; CPU:$E275 PRG:2275 20 A9 CB + jsr $CBFB ; CPU:$E278 PRG:2278 20 FB CB + jsr $CBDC ; CPU:$E27B PRG:227B 20 DC CB + sta (Zp81,x) ; CPU:$E27E PRG:227E 81 81 + brk ; CPU:$E280 PRG:2280 00 +; ---- data $E281-$E285 (5 bytes) ---- + .byte $68, $A8, $68, $AA, $60 ; CPU:$E281 PRG:2281 68 A8 68 AA 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E286 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E286: + txa ; CPU:$E286 PRG:2286 8A + pha ; CPU:$E287 PRG:2287 48 + tya ; CPU:$E288 PRG:2288 98 + pha ; CPU:$E289 PRG:2289 48 + ldx #$22 ; CPU:$E28A PRG:228A A2 22 + ldy #$F2 ; CPU:$E28C PRG:228C A0 F2 + stx ZpFD ; CPU:$E28E PRG:228E 86 FD + sty ZpFC ; CPU:$E290 PRG:2290 84 FC + jsr $CBFB ; CPU:$E292 PRG:2292 20 FB CB + lda Zp02 ; CPU:$E295 PRG:2295 A5 02 + jsr $E2FE ; CPU:$E297 PRG:2297 20 FE E2 + lda Zp0C ; CPU:$E29A PRG:229A A5 0C + jsr $CC29 ; CPU:$E29C PRG:229C 20 29 CC + jmp $E240 ; CPU:$E29F PRG:229F 4C 40 E2 +; ----------------------------------------------------------------------------- +; Routine: Label_E2A2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E2A2: + txa ; CPU:$E2A2 PRG:22A2 8A + pha ; CPU:$E2A3 PRG:22A3 48 + tya ; CPU:$E2A4 PRG:22A4 98 + pha ; CPU:$E2A5 PRG:22A5 48 + ldx #$20 ; CPU:$E2A6 PRG:22A6 A2 20 + ldy #$78 ; CPU:$E2A8 PRG:22A8 A0 78 + jsr $CBA9 ; CPU:$E2AA PRG:22AA 20 A9 CB + jsr $CBFB ; CPU:$E2AD PRG:22AD 20 FB CB + ldx #$00 ; CPU:$E2B0 PRG:22B0 A2 00 +; ----------------------------------------------------------------------------- +; Routine: Label_E2B2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E2B2: + lda #$7D ; CPU:$E2B2 PRG:22B2 A9 7D + cpx $01C5 ; CPU:$E2B4 PRG:22B4 EC C5 01 + bcc Label_E2BB ; CPU:$E2B7 PRG:22B7 90 02 + lda #$7E ; CPU:$E2B9 PRG:22B9 A9 7E +; ----------------------------------------------------------------------------- +; Routine: Label_E2BB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E2BB: + jsr $CC29 ; CPU:$E2BB PRG:22BB 20 29 CC + inx ; CPU:$E2BE PRG:22BE E8 + cpx #$03 ; CPU:$E2BF PRG:22BF E0 03 + bne Label_E2B2 ; CPU:$E2C1 PRG:22C1 D0 EF + pla ; CPU:$E2C3 PRG:22C3 68 + tay ; CPU:$E2C4 PRG:22C4 A8 + pla ; CPU:$E2C5 PRG:22C5 68 + tax ; CPU:$E2C6 PRG:22C6 AA + rts ; CPU:$E2C7 PRG:22C7 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E2C8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E2C8: + txa ; CPU:$E2C8 PRG:22C8 8A + pha ; CPU:$E2C9 PRG:22C9 48 + tya ; CPU:$E2CA PRG:22CA 98 + pha ; CPU:$E2CB PRG:22CB 48 + lda $01C6 ; CPU:$E2CC PRG:22CC AD C6 01 + bne Label_E2D7 ; CPU:$E2CF PRG:22CF D0 06 + ldx #$7D ; CPU:$E2D1 PRG:22D1 A2 7D + ldy #$7E ; CPU:$E2D3 PRG:22D3 A0 7E + bne Label_E2DB ; CPU:$E2D5 PRG:22D5 D0 04 +; ----------------------------------------------------------------------------- +; Routine: Label_E2D7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E2D7: + ldx #$7E ; CPU:$E2D7 PRG:22D7 A2 7E + ldy #$7D ; CPU:$E2D9 PRG:22D9 A0 7D +; ----------------------------------------------------------------------------- +; Routine: Label_E2DB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E2DB: + lda #$20 ; CPU:$E2DB PRG:22DB A9 20 + sta ZpFD ; CPU:$E2DD PRG:22DD 85 FD + lda #$63 ; CPU:$E2DF PRG:22DF A9 63 + sta ZpFC ; CPU:$E2E1 PRG:22E1 85 FC + jsr $CBFB ; CPU:$E2E3 PRG:22E3 20 FB CB + txa ; CPU:$E2E6 PRG:22E6 8A + jsr $CC29 ; CPU:$E2E7 PRG:22E7 20 29 CC + lda #$20 ; CPU:$E2EA PRG:22EA A9 20 + sta ZpFD ; CPU:$E2EC PRG:22EC 85 FD + lda #$83 ; CPU:$E2EE PRG:22EE A9 83 + sta ZpFC ; CPU:$E2F0 PRG:22F0 85 FC + jsr $CBFB ; CPU:$E2F2 PRG:22F2 20 FB CB + tya ; CPU:$E2F5 PRG:22F5 98 + jsr $CC29 ; CPU:$E2F6 PRG:22F6 20 29 CC + pla ; CPU:$E2F9 PRG:22F9 68 + tay ; CPU:$E2FA PRG:22FA A8 + pla ; CPU:$E2FB PRG:22FB 68 + tax ; CPU:$E2FC PRG:22FC AA + rts ; CPU:$E2FD PRG:22FD 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E2FE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E2FE: + ldx #$30 ; CPU:$E2FE PRG:22FE A2 30 + stx Zp0C ; CPU:$E300 PRG:2300 86 0C + stx Zp0D ; CPU:$E302 PRG:2302 86 0D +; ----------------------------------------------------------------------------- +; Routine: Label_E304 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E304: + sec ; CPU:$E304 PRG:2304 38 + sbc #$64 ; CPU:$E305 PRG:2305 E9 64 + bcc Label_E30D ; CPU:$E307 PRG:2307 90 04 + inc Zp0C ; CPU:$E309 PRG:2309 E6 0C + bne Label_E304 ; CPU:$E30B PRG:230B D0 F7 +; ----------------------------------------------------------------------------- +; Routine: Label_E30D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E30D: + adc #$64 ; CPU:$E30D PRG:230D 69 64 +; ----------------------------------------------------------------------------- +; Routine: Label_E30F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E30F: + sec ; CPU:$E30F PRG:230F 38 + sbc #$0A ; CPU:$E310 PRG:2310 E9 0A + bcc Label_E318 ; CPU:$E312 PRG:2312 90 04 + inc Zp0D ; CPU:$E314 PRG:2314 E6 0D + bne Label_E30F ; CPU:$E316 PRG:2316 D0 F7 +; ----------------------------------------------------------------------------- +; Routine: Label_E318 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E318: + adc #$3A ; CPU:$E318 PRG:2318 69 3A + sta Zp0E ; CPU:$E31A PRG:231A 85 0E + rts ; CPU:$E31C PRG:231C 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E31D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E31D: + lda #$00 ; CPU:$E31D PRG:231D A9 00 + sta Zp2A ; CPU:$E31F PRG:231F 85 2A + rts ; CPU:$E321 PRG:2321 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E322 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E322: + lda $0503 ; CPU:$E322 PRG:2322 AD 03 05 + beq Label_E333 ; CPU:$E325 PRG:2325 F0 0C + lda $0585 ; CPU:$E327 PRG:2327 AD 85 05 + cmp #$01 ; CPU:$E32A PRG:232A C9 01 + bne Label_E333 ; CPU:$E32C PRG:232C D0 05 + pla ; CPU:$E32E PRG:232E 68 + pla ; CPU:$E32F PRG:232F 68 + lda #$00 ; CPU:$E330 PRG:2330 A9 00 + rts ; CPU:$E332 PRG:2332 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E333 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E333: + ldx $01C6 ; CPU:$E333 PRG:2333 AE C6 01 + cpx #$01 ; CPU:$E336 PRG:2336 E0 01 + bne Label_E341 ; CPU:$E338 PRG:2338 D0 07 + lda $01C7 ; CPU:$E33A PRG:233A AD C7 01 + cmp #$02 ; CPU:$E33D PRG:233D C9 02 + beq Label_E349 ; CPU:$E33F PRG:233F F0 08 +; ----------------------------------------------------------------------------- +; Routine: Label_E341 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E341: + pla ; CPU:$E341 PRG:2341 68 + pla ; CPU:$E342 PRG:2342 68 + lda $0180,x ; CPU:$E343 PRG:2343 BD 80 01 + ora $0182,x ; CPU:$E346 PRG:2346 1D 82 01 +; ----------------------------------------------------------------------------- +; Routine: Label_E349 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E349: + rts ; CPU:$E349 PRG:2349 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E34A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E34A: + jsr $E322 ; CPU:$E34A PRG:234A 20 22 E3 + lda Zp2A ; CPU:$E34D PRG:234D A5 2A + and #$07 ; CPU:$E34F PRG:234F 29 07 + cmp #$03 ; CPU:$E351 PRG:2351 C9 03 + bne Label_E364 ; CPU:$E353 PRG:2353 D0 0F + lda $03A0 ; CPU:$E355 PRG:2355 AD A0 03 + lsr a ; CPU:$E358 PRG:2358 4A + lsr a ; CPU:$E359 PRG:2359 4A + lsr a ; CPU:$E35A PRG:235A 4A + lsr a ; CPU:$E35B PRG:235B 4A + clc ; CPU:$E35C PRG:235C 18 + adc #$01 ; CPU:$E35D PRG:235D 69 01 + lsr a ; CPU:$E35F PRG:235F 4A + cmp Zp2B ; CPU:$E360 PRG:2360 C5 2B + beq Label_E367 ; CPU:$E362 PRG:2362 F0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_E364 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E364: + lda #$00 ; CPU:$E364 PRG:2364 A9 00 + rts ; CPU:$E366 PRG:2366 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E367 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E367: + lda Zp00 ; CPU:$E367 PRG:2367 A5 00 + and #$EF ; CPU:$E369 PRG:2369 29 EF + sta Zp00 ; CPU:$E36B PRG:236B 85 00 + lda #$03 ; CPU:$E36D PRG:236D A9 03 + rts ; CPU:$E36F PRG:236F 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E370 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E370: + jsr $E322 ; CPU:$E370 PRG:2370 20 22 E3 + lda Zp2A ; CPU:$E373 PRG:2373 A5 2A + and #$07 ; CPU:$E375 PRG:2375 29 07 + bne Label_E37C ; CPU:$E377 PRG:2377 D0 03 + jmp $E40E ; CPU:$E379 PRG:2379 4C 0E E4 +; ----------------------------------------------------------------------------- +; Routine: Label_E37C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E37C: + cmp #$01 ; CPU:$E37C PRG:237C C9 01 + beq Label_E381 ; CPU:$E37E PRG:237E F0 01 + rts ; CPU:$E380 PRG:2380 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E381 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E381: + lda $0358 ; CPU:$E381 PRG:2381 AD 58 03 + cmp Zp31 ; CPU:$E384 PRG:2384 C5 31 + beq Label_E39A ; CPU:$E386 PRG:2386 F0 12 + bcs Label_E392 ; CPU:$E388 PRG:2388 B0 08 + cmp #$7E ; CPU:$E38A PRG:238A C9 7E + beq Label_E39A ; CPU:$E38C PRG:238C F0 0C + lda #$10 ; CPU:$E38E PRG:238E A9 10 + bne Label_E39C ; CPU:$E390 PRG:2390 D0 0A +; ----------------------------------------------------------------------------- +; Routine: Label_E392 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E392: + cmp #$09 ; CPU:$E392 PRG:2392 C9 09 + beq Label_E39A ; CPU:$E394 PRG:2394 F0 04 + lda #$20 ; CPU:$E396 PRG:2396 A9 20 + bne Label_E39C ; CPU:$E398 PRG:2398 D0 02 +; ----------------------------------------------------------------------------- +; Routine: Label_E39A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E39A: + lda #$00 ; CPU:$E39A PRG:239A A9 00 +; ----------------------------------------------------------------------------- +; Routine: Label_E39C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E39C: + tay ; CPU:$E39C PRG:239C A8 + lda Zp30 ; CPU:$E39D PRG:239D A5 30 + sec ; CPU:$E39F PRG:239F 38 + sbc $03C0 ; CPU:$E3A0 PRG:23A0 ED C0 03 + beq Label_E3AF ; CPU:$E3A3 PRG:23A3 F0 0A + bmi Label_E3AB ; CPU:$E3A5 PRG:23A5 30 04 + lda #$80 ; CPU:$E3A7 PRG:23A7 A9 80 + bne Label_E3B1 ; CPU:$E3A9 PRG:23A9 D0 06 +; ----------------------------------------------------------------------------- +; Routine: Label_E3AB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E3AB: + lda #$40 ; CPU:$E3AB PRG:23AB A9 40 + bne Label_E3B1 ; CPU:$E3AD PRG:23AD D0 02 +; ----------------------------------------------------------------------------- +; Routine: Label_E3AF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E3AF: + lda #$00 ; CPU:$E3AF PRG:23AF A9 00 +; ----------------------------------------------------------------------------- +; Routine: Label_E3B1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E3B1: + sta ZpF8 ; CPU:$E3B1 PRG:23B1 85 F8 + tya ; CPU:$E3B3 PRG:23B3 98 + ora ZpF8 ; CPU:$E3B4 PRG:23B4 05 F8 + bne Label_E3BE ; CPU:$E3B6 PRG:23B6 D0 06 + pha ; CPU:$E3B8 PRG:23B8 48 + lda #$03 ; CPU:$E3B9 PRG:23B9 A9 03 + sta Zp2A ; CPU:$E3BB PRG:23BB 85 2A + pla ; CPU:$E3BD PRG:23BD 68 +; ----------------------------------------------------------------------------- +; Routine: Label_E3BE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E3BE: + rts ; CPU:$E3BE PRG:23BE 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E3BF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E3BF: + ldx #$00 ; CPU:$E3BF PRG:23BF A2 00 + lda Zp2C ; CPU:$E3C1 PRG:23C1 A5 2C + sec ; CPU:$E3C3 PRG:23C3 38 + sbc Zp26 ; CPU:$E3C4 PRG:23C4 E5 26 + tay ; CPU:$E3C6 PRG:23C6 A8 + bcs Label_E3CE ; CPU:$E3C7 PRG:23C7 B0 05 + eor #$FF ; CPU:$E3C9 PRG:23C9 49 FF + adc #$01 ; CPU:$E3CB PRG:23CB 69 01 + clc ; CPU:$E3CD PRG:23CD 18 +; ----------------------------------------------------------------------------- +; Routine: Label_E3CE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E3CE: + sta Zp28 ; CPU:$E3CE PRG:23CE 85 28 + tya ; CPU:$E3D0 PRG:23D0 98 + jsr $E3FB ; CPU:$E3D1 PRG:23D1 20 FB E3 + stx Zp25 ; CPU:$E3D4 PRG:23D4 86 25 + sty Zp24 ; CPU:$E3D6 PRG:23D6 84 24 + ldx #$02 ; CPU:$E3D8 PRG:23D8 A2 02 + lda Zp2D ; CPU:$E3DA PRG:23DA A5 2D + sec ; CPU:$E3DC PRG:23DC 38 + sbc Zp27 ; CPU:$E3DD PRG:23DD E5 27 + tay ; CPU:$E3DF PRG:23DF A8 + bcs Label_E3E7 ; CPU:$E3E0 PRG:23E0 B0 05 + eor #$FF ; CPU:$E3E2 PRG:23E2 49 FF + adc #$01 ; CPU:$E3E4 PRG:23E4 69 01 + clc ; CPU:$E3E6 PRG:23E6 18 +; ----------------------------------------------------------------------------- +; Routine: Label_E3E7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E3E7: + sta Zp29 ; CPU:$E3E7 PRG:23E7 85 29 + tya ; CPU:$E3E9 PRG:23E9 98 + jsr $E3FB ; CPU:$E3EA PRG:23EA 20 FB E3 + tya ; CPU:$E3ED PRG:23ED 98 + clc ; CPU:$E3EE PRG:23EE 18 + adc Zp24 ; CPU:$E3EF PRG:23EF 65 24 + tay ; CPU:$E3F1 PRG:23F1 A8 + sta ZpFC ; CPU:$E3F2 PRG:23F2 85 FC + txa ; CPU:$E3F4 PRG:23F4 8A + adc Zp25 ; CPU:$E3F5 PRG:23F5 65 25 + tax ; CPU:$E3F7 PRG:23F7 AA + sta ZpFD ; CPU:$E3F8 PRG:23F8 85 FD + rts ; CPU:$E3FA PRG:23FA 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E3FB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E3FB: + sta ZpFC ; CPU:$E3FB PRG:23FB 85 FC + sta ZpFA ; CPU:$E3FD PRG:23FD 85 FA + sta Zp10,x ; CPU:$E3FF PRG:23FF 95 10 + lda #$FF ; CPU:$E401 PRG:2401 A9 FF + adc #$00 ; CPU:$E403 PRG:2403 69 00 +; ----------------------------------------------------------------------------- +; Routine: Label_E405 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E405: + sta Zp11,x ; CPU:$E405 PRG:2405 95 11 + sta ZpFD ; CPU:$E407 PRG:2407 85 FD + sta ZpFB ; CPU:$E409 PRG:2409 85 FB + jmp $FD8B ; CPU:$E40B PRG:240B 4C 8B FD +; ----------------------------------------------------------------------------- +; Routine: Label_E40E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E40E: + lda #$00 ; CPU:$E40E PRG:240E A9 00 + sta $01C8 ; CPU:$E410 PRG:2410 8D C8 01 + sta Zp32 ; CPU:$E413 PRG:2413 85 32 +; ----------------------------------------------------------------------------- +; Routine: Label_E415 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E415: + sta Zp33 ; CPU:$E415 PRG:2415 85 33 +; ----------------------------------------------------------------------------- +; Routine: Label_E417 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E417: + lda Zp32 ; CPU:$E417 PRG:2417 A5 32 + bne Label_E429 ; CPU:$E419 PRG:2419 D0 0E + lda Zp33 ; CPU:$E41B PRG:241B A5 33 + asl a ; CPU:$E41D PRG:241D 0A + tax ; CPU:$E41E PRG:241E AA + lda $01A0,x ; CPU:$E41F PRG:241F BD A0 01 + tay ; CPU:$E422 PRG:2422 A8 + lda $01A1,x ; CPU:$E423 PRG:2423 BD A1 01 + jmp $E43B ; CPU:$E426 PRG:2426 4C 3B E4 +; ----------------------------------------------------------------------------- +; Routine: Label_E429 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E429: + ldx Zp33 ; CPU:$E429 PRG:2429 A6 33 + lda $0300,x ; CPU:$E42B PRG:242B BD 00 03 + and #$C0 ; CPU:$E42E PRG:242E 29 C0 + cmp #$80 ; CPU:$E430 PRG:2430 C9 80 + bne Label_E47B ; CPU:$E432 PRG:2432 D0 47 + lda $0330,x ; CPU:$E434 PRG:2434 BD 30 03 + tay ; CPU:$E437 PRG:2437 A8 + lda $0370,x ; CPU:$E438 PRG:2438 BD 70 03 +; ----------------------------------------------------------------------------- +; Routine: Label_E43B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E43B: + sta Zp2D ; CPU:$E43B PRG:243B 85 2D + tya ; CPU:$E43D PRG:243D 98 + sta Zp2C ; CPU:$E43E PRG:243E 85 2C + lda $0330 ; CPU:$E440 PRG:2440 AD 30 03 + sta Zp26 ; CPU:$E443 PRG:2443 85 26 + lda $0370 ; CPU:$E445 PRG:2445 AD 70 03 + sta Zp27 ; CPU:$E448 PRG:2448 85 27 + jsr $E3BF ; CPU:$E44A PRG:244A 20 BF E3 + jsr $FE5A ; CPU:$E44D PRG:244D 20 5A FE + pha ; CPU:$E450 PRG:2450 48 + jsr $E67A ; CPU:$E451 PRG:2451 20 7A E6 + tay ; CPU:$E454 PRG:2454 A8 + ldx Zp33 ; CPU:$E455 PRG:2455 A6 33 + lda Zp32 ; CPU:$E457 PRG:2457 A5 32 + bne Label_E473 ; CPU:$E459 PRG:2459 D0 18 + tya ; CPU:$E45B PRG:245B 98 + sta $0480,x ; CPU:$E45C PRG:245C 9D 80 04 + pla ; CPU:$E45F PRG:245F 68 + sta $0490,x ; CPU:$E460 PRG:2460 9D 90 04 + inc Zp33 ; CPU:$E463 PRG:2463 E6 33 + lda Zp33 ; CPU:$E465 PRG:2465 A5 33 + cmp $01C0 ; CPU:$E467 PRG:2467 CD C0 01 + bne Label_E417 ; CPU:$E46A PRG:246A D0 AB + inc Zp32 ; CPU:$E46C PRG:246C E6 32 + lda #$01 ; CPU:$E46E PRG:246E A9 01 + jmp $E415 ; CPU:$E470 PRG:2470 4C 15 E4 +; ----------------------------------------------------------------------------- +; Routine: Label_E473 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E473: + tya ; CPU:$E473 PRG:2473 98 + sta $049F,x ; CPU:$E474 PRG:2474 9D 9F 04 + pla ; CPU:$E477 PRG:2477 68 + sta $04A6,x ; CPU:$E478 PRG:2478 9D A6 04 +; ----------------------------------------------------------------------------- +; Routine: Label_E47B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E47B: + inc Zp33 ; CPU:$E47B PRG:247B E6 33 + lda Zp33 ; CPU:$E47D PRG:247D A5 33 + cmp #$08 ; CPU:$E47F PRG:247F C9 08 + bne Label_E417 ; CPU:$E481 PRG:2481 D0 94 + lda #$00 ; CPU:$E483 PRG:2483 A9 00 + sta Zp2F ; CPU:$E485 PRG:2485 85 2F + sta Zp2E ; CPU:$E487 PRG:2487 85 2E + lda #$01 ; CPU:$E489 PRG:2489 A9 01 + sta Zp32 ; CPU:$E48B PRG:248B 85 32 +; ----------------------------------------------------------------------------- +; Routine: Label_E48D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E48D: + ldx Zp32 ; CPU:$E48D PRG:248D A6 32 + lda $0300,x ; CPU:$E48F PRG:248F BD 00 03 + and #$C0 ; CPU:$E492 PRG:2492 29 C0 + cmp #$80 ; CPU:$E494 PRG:2494 C9 80 + bne Label_E4AA ; CPU:$E496 PRG:2496 D0 12 + jsr $E71D ; CPU:$E498 PRG:2498 20 1D E7 + bcs Label_E4AA ; CPU:$E49B PRG:249B B0 0D + jsr $E76D ; CPU:$E49D PRG:249D 20 6D E7 + bcs Label_E4AA ; CPU:$E4A0 PRG:24A0 B0 08 + jsr $E7B1 ; CPU:$E4A2 PRG:24A2 20 B1 E7 + bcs Label_E4AA ; CPU:$E4A5 PRG:24A5 B0 03 + jsr $E582 ; CPU:$E4A7 PRG:24A7 20 82 E5 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_E4AA: + inc Zp32 ; CPU:$E4AA PRG:24AA E6 32 + lda Zp32 ; CPU:$E4AC PRG:24AC A5 32 + cmp #$08 ; CPU:$E4AE PRG:24AE C9 08 + bne Label_E48D ; CPU:$E4B0 PRG:24B0 D0 DB + lda Zp2E ; CPU:$E4B2 PRG:24B2 A5 2E + beq Label_E4B9 ; CPU:$E4B4 PRG:24B4 F0 03 + jmp $E60B ; CPU:$E4B6 PRG:24B6 4C 0B E6 +; ----------------------------------------------------------------------------- +; Routine: Label_E4B9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E4B9: + lda #$FF ; CPU:$E4B9 PRG:24B9 A9 FF + sta Zp2F ; CPU:$E4BB PRG:24BB 85 2F + lda #$01 ; CPU:$E4BD PRG:24BD A9 01 + sta Zp32 ; CPU:$E4BF PRG:24BF 85 32 +; ----------------------------------------------------------------------------- +; Routine: Label_E4C1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E4C1: + ldx Zp32 ; CPU:$E4C1 PRG:24C1 A6 32 + lda $0300,x ; CPU:$E4C3 PRG:24C3 BD 00 03 + and #$C0 ; CPU:$E4C6 PRG:24C6 29 C0 + cmp #$80 ; CPU:$E4C8 PRG:24C8 C9 80 + bne Label_E4E6 ; CPU:$E4CA PRG:24CA D0 1A + lda $01C3 ; CPU:$E4CC PRG:24CC AD C3 01 + cmp #$02 ; CPU:$E4CF PRG:24CF C9 02 + beq Label_E4DC ; CPU:$E4D1 PRG:24D1 F0 09 + lda #$00 ; CPU:$E4D3 PRG:24D3 A9 00 + sta Zp2E ; CPU:$E4D5 PRG:24D5 85 2E + jsr $E76D ; CPU:$E4D7 PRG:24D7 20 6D E7 + bcs Label_E4E6 ; CPU:$E4DA PRG:24DA B0 0A +; ----------------------------------------------------------------------------- +; Routine: Label_E4DC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E4DC: + lda Zp32 ; CPU:$E4DC PRG:24DC A5 32 + sta Zp2E ; CPU:$E4DE PRG:24DE 85 2E + lda Zp35 ; CPU:$E4E0 PRG:24E0 A5 35 + beq Label_E4F9 ; CPU:$E4E2 PRG:24E2 F0 15 + dec Zp35 ; CPU:$E4E4 PRG:24E4 C6 35 +; ----------------------------------------------------------------------------- +; Routine: Label_E4E6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E4E6: + inc Zp32 ; CPU:$E4E6 PRG:24E6 E6 32 + lda Zp32 ; CPU:$E4E8 PRG:24E8 A5 32 + cmp #$08 ; CPU:$E4EA PRG:24EA C9 08 + bne Label_E4C1 ; CPU:$E4EC PRG:24EC D0 D3 + lda Zp2E ; CPU:$E4EE PRG:24EE A5 2E + bne Label_E4F9 ; CPU:$E4F0 PRG:24F0 D0 07 + jsr $CDB9 ; CPU:$E4F2 PRG:24F2 20 B9 CD + and #$07 ; CPU:$E4F5 PRG:24F5 29 07 + sta Zp2E ; CPU:$E4F7 PRG:24F7 85 2E +; ----------------------------------------------------------------------------- +; Routine: Label_E4F9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E4F9: + lda #$80 ; CPU:$E4F9 PRG:24F9 A9 80 + sta Zp2F ; CPU:$E4FB PRG:24FB 85 2F + ldx Zp2E ; CPU:$E4FD PRG:24FD A6 2E + lda $0370,x ; CPU:$E4FF PRG:24FF BD 70 03 + sta Zp2D ; CPU:$E502 PRG:2502 85 2D + cmp $0370 ; CPU:$E504 PRG:2504 CD 70 03 + bne Label_E50B ; CPU:$E507 PRG:2507 D0 02 + inc Zp2D ; CPU:$E509 PRG:2509 E6 2D +; ----------------------------------------------------------------------------- +; Routine: Label_E50B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E50B: + lda $0330,x ; CPU:$E50B PRG:250B BD 30 03 + sta Zp2C ; CPU:$E50E PRG:250E 85 2C + cmp $0330 ; CPU:$E510 PRG:2510 CD 30 03 + bne Label_E517 ; CPU:$E513 PRG:2513 D0 02 + inc Zp2C ; CPU:$E515 PRG:2515 E6 2C +; ----------------------------------------------------------------------------- +; Routine: Label_E517 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E517: + lda $0330 ; CPU:$E517 PRG:2517 AD 30 03 + sta Zp26 ; CPU:$E51A PRG:251A 85 26 + lda $0370 ; CPU:$E51C PRG:251C AD 70 03 + sta Zp27 ; CPU:$E51F PRG:251F 85 27 + jsr $E3BF ; CPU:$E521 PRG:2521 20 BF E3 + jsr $FE5A ; CPU:$E524 PRG:2524 20 5A FE + sta Zp31 ; CPU:$E527 PRG:2527 85 31 + lda Zp2F ; CPU:$E529 PRG:2529 A5 2F + ldx #$08 ; CPU:$E52B PRG:252B A2 08 + cmp #$78 ; CPU:$E52D PRG:252D C9 78 + bcs Label_E53E ; CPU:$E52F PRG:252F B0 0D + dex ; CPU:$E531 PRG:2531 CA + dex ; CPU:$E532 PRG:2532 CA + cmp #$60 ; CPU:$E533 PRG:2533 C9 60 + bcs Label_E53E ; CPU:$E535 PRG:2535 B0 07 + dex ; CPU:$E537 PRG:2537 CA + dex ; CPU:$E538 PRG:2538 CA + cmp #$48 ; CPU:$E539 PRG:2539 C9 48 + bcs Label_E53E ; CPU:$E53B PRG:253B B0 01 + dex ; CPU:$E53D PRG:253D CA +; ----------------------------------------------------------------------------- +; Routine: Label_E53E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E53E: + stx Zp2B ; CPU:$E53E PRG:253E 86 2B + lda Zp31 ; CPU:$E540 PRG:2540 A5 31 + cmp #$7E ; CPU:$E542 PRG:2542 C9 7E + bcc Label_E54A ; CPU:$E544 PRG:2544 90 04 + lda #$7E ; CPU:$E546 PRG:2546 A9 7E + bne Label_E550 ; CPU:$E548 PRG:2548 D0 06 +; ----------------------------------------------------------------------------- +; Routine: Label_E54A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E54A: + cmp #$09 ; CPU:$E54A PRG:254A C9 09 + bcs Label_E550 ; CPU:$E54C PRG:254C B0 02 + lda #$09 ; CPU:$E54E PRG:254E A9 09 +; ----------------------------------------------------------------------------- +; Routine: Label_E550 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E550: + sta Zp31 ; CPU:$E550 PRG:2550 85 31 + jsr $E67A ; CPU:$E552 PRG:2552 20 7A E6 + sta Zp30 ; CPU:$E555 PRG:2555 85 30 + lda #$01 ; CPU:$E557 PRG:2557 A9 01 + sta Zp2A ; CPU:$E559 PRG:2559 85 2A + ldx Zp30 ; CPU:$E55B PRG:255B A6 30 + ldy Zp2B ; CPU:$E55D PRG:255D A4 2B + lda Zp35 ; CPU:$E55F PRG:255F A5 35 + beq Label_E57B ; CPU:$E561 PRG:2561 F0 18 + tya ; CPU:$E563 PRG:2563 98 +; ----------------------------------------------------------------------------- +; Routine: Label_E564 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E564: + dey ; CPU:$E564 PRG:2564 88 + beq Label_E570 ; CPU:$E565 PRG:2565 F0 09 + dey ; CPU:$E567 PRG:2567 88 + beq Label_E570 ; CPU:$E568 PRG:2568 F0 06 + dec Zp35 ; CPU:$E56A PRG:256A C6 35 + beq Label_E57B ; CPU:$E56C PRG:256C F0 0D + bne Label_E564 ; CPU:$E56E PRG:256E D0 F4 +; ----------------------------------------------------------------------------- +; Routine: Label_E570 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E570: + ldy #$04 ; CPU:$E570 PRG:2570 A0 04 +; ----------------------------------------------------------------------------- +; Routine: Label_E572 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E572: + txa ; CPU:$E572 PRG:2572 8A + clc ; CPU:$E573 PRG:2573 18 + adc #$07 ; CPU:$E574 PRG:2574 69 07 + tax ; CPU:$E576 PRG:2576 AA + dec Zp35 ; CPU:$E577 PRG:2577 C6 35 + bne Label_E572 ; CPU:$E579 PRG:2579 D0 F7 +; ----------------------------------------------------------------------------- +; Routine: Label_E57B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E57B: + stx Zp30 ; CPU:$E57B PRG:257B 86 30 + sty Zp2B ; CPU:$E57D PRG:257D 84 2B + lda #$00 ; CPU:$E57F PRG:257F A9 00 + rts ; CPU:$E581 PRG:2581 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E582 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E582: + lda #$00 ; CPU:$E582 PRG:2582 A9 00 + sta Zp33 ; CPU:$E584 PRG:2584 85 33 +; ----------------------------------------------------------------------------- +; Routine: Label_E586 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E586: + ldy Zp33 ; CPU:$E586 PRG:2586 A4 33 + ldx Zp32 ; CPU:$E588 PRG:2588 A6 32 + lda $049F,x ; CPU:$E58A PRG:258A BD 9F 04 + sec ; CPU:$E58D PRG:258D 38 + sbc $0480,y ; CPU:$E58E PRG:258E F9 80 04 + bpl Label_E598 ; CPU:$E591 PRG:2591 10 05 + eor #$FF ; CPU:$E593 PRG:2593 49 FF + clc ; CPU:$E595 PRG:2595 18 + adc #$01 ; CPU:$E596 PRG:2596 69 01 +; ----------------------------------------------------------------------------- +; Routine: Label_E598 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E598: + cmp #$20 ; CPU:$E598 PRG:2598 C9 20 + bcs Label_E5FE ; CPU:$E59A PRG:259A B0 62 + lda $0330,x ; CPU:$E59C PRG:259C BD 30 03 + sta Zp26 ; CPU:$E59F PRG:259F 85 26 + lda $0370,x ; CPU:$E5A1 PRG:25A1 BD 70 03 + sta Zp27 ; CPU:$E5A4 PRG:25A4 85 27 + lda $0330 ; CPU:$E5A6 PRG:25A6 AD 30 03 + sta Zp2C ; CPU:$E5A9 PRG:25A9 85 2C + lda $0370 ; CPU:$E5AB PRG:25AB AD 70 03 + sta Zp2D ; CPU:$E5AE PRG:25AE 85 2D + jsr $E3BF ; CPU:$E5B0 PRG:25B0 20 BF E3 + jsr $E67A ; CPU:$E5B3 PRG:25B3 20 7A E6 + sta Zp31 ; CPU:$E5B6 PRG:25B6 85 31 + lda Zp33 ; CPU:$E5B8 PRG:25B8 A5 33 + asl a ; CPU:$E5BA PRG:25BA 0A + tay ; CPU:$E5BB PRG:25BB A8 + lda $01A0,y ; CPU:$E5BC PRG:25BC B9 A0 01 + sta Zp2C ; CPU:$E5BF PRG:25BF 85 2C + lda $01A1,y ; CPU:$E5C1 PRG:25C1 B9 A1 01 + sta Zp2D ; CPU:$E5C4 PRG:25C4 85 2D + jsr $E3BF ; CPU:$E5C6 PRG:25C6 20 BF E3 + jsr $E67A ; CPU:$E5C9 PRG:25C9 20 7A E6 + eor #$FF ; CPU:$E5CC PRG:25CC 49 FF + clc ; CPU:$E5CE PRG:25CE 18 + adc #$01 ; CPU:$E5CF PRG:25CF 69 01 + clc ; CPU:$E5D1 PRG:25D1 18 + adc Zp31 ; CPU:$E5D2 PRG:25D2 65 31 + cmp #$80 ; CPU:$E5D4 PRG:25D4 C9 80 + beq Label_E5E7 ; CPU:$E5D6 PRG:25D6 F0 0F + bcc Label_E5DF ; CPU:$E5D8 PRG:25D8 90 05 + eor #$FF ; CPU:$E5DA PRG:25DA 49 FF + clc ; CPU:$E5DC PRG:25DC 18 + adc #$01 ; CPU:$E5DD PRG:25DD 69 01 +; ----------------------------------------------------------------------------- +; Routine: Label_E5DF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E5DF: + cmp #$4C ; CPU:$E5DF PRG:25DF C9 4C + bcc Label_E5FE ; CPU:$E5E1 PRG:25E1 90 1B + cmp Zp2F ; CPU:$E5E3 PRG:25E3 C5 2F + bcc Label_E5FE ; CPU:$E5E5 PRG:25E5 90 17 +; ----------------------------------------------------------------------------- +; Routine: Label_E5E7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E5E7: + sta Zp31 ; CPU:$E5E7 PRG:25E7 85 31 + lda Zp35 ; CPU:$E5E9 PRG:25E9 A5 35 + beq Label_E5F2 ; CPU:$E5EB PRG:25EB F0 05 + dec Zp35 ; CPU:$E5ED PRG:25ED C6 35 + jmp $E5FE ; CPU:$E5EF PRG:25EF 4C FE E5 +; ----------------------------------------------------------------------------- +; Routine: Label_E5F2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E5F2: + ldx Zp32 ; CPU:$E5F2 PRG:25F2 A6 32 + ldy Zp33 ; CPU:$E5F4 PRG:25F4 A4 33 + stx Zp2E ; CPU:$E5F6 PRG:25F6 86 2E + sty Zp36 ; CPU:$E5F8 PRG:25F8 84 36 + lda Zp31 ; CPU:$E5FA PRG:25FA A5 31 + sta Zp2F ; CPU:$E5FC PRG:25FC 85 2F +; ----------------------------------------------------------------------------- +; Routine: Label_E5FE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E5FE: + inc Zp33 ; CPU:$E5FE PRG:25FE E6 33 + lda Zp33 ; CPU:$E600 PRG:2600 A5 33 + cmp $01C0 ; CPU:$E602 PRG:2602 CD C0 01 + beq Label_E60A ; CPU:$E605 PRG:2605 F0 03 + jmp $E586 ; CPU:$E607 PRG:2607 4C 86 E5 +; ----------------------------------------------------------------------------- +; Routine: Label_E60A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E60A: + rts ; CPU:$E60A PRG:260A 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E60B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E60B: + ldx Zp2E ; CPU:$E60B PRG:260B A6 2E + lda $0330,x ; CPU:$E60D PRG:260D BD 30 03 + sta Zp2C ; CPU:$E610 PRG:2610 85 2C + lda $0370,x ; CPU:$E612 PRG:2612 BD 70 03 + sta Zp2D ; CPU:$E615 PRG:2615 85 2D + lda Zp36 ; CPU:$E617 PRG:2617 A5 36 + asl a ; CPU:$E619 PRG:2619 0A + tax ; CPU:$E61A PRG:261A AA + lda $01A0,x ; CPU:$E61B PRG:261B BD A0 01 + sta Zp1C ; CPU:$E61E PRG:261E 85 1C + sta Zp26 ; CPU:$E620 PRG:2620 85 26 + lda $01A1,x ; CPU:$E622 PRG:2622 BD A1 01 + sta Zp1E ; CPU:$E625 PRG:2625 85 1E + sta Zp27 ; CPU:$E627 PRG:2627 85 27 + jsr $E3BF ; CPU:$E629 PRG:2629 20 BF E3 + jsr $FE5A ; CPU:$E62C PRG:262C 20 5A FE + sta ZpFA ; CPU:$E62F PRG:262F 85 FA + ldx Zp2E ; CPU:$E631 PRG:2631 A6 2E + lda $04A6,x ; CPU:$E633 PRG:2633 BD A6 04 + ldx #$0B ; CPU:$E636 PRG:2636 A2 0B + cmp #$0F ; CPU:$E638 PRG:2638 C9 0F + bcs Label_E63E ; CPU:$E63A PRG:263A B0 02 + ldx #$05 ; CPU:$E63C PRG:263C A2 05 +; ----------------------------------------------------------------------------- +; Routine: Label_E63E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E63E: + txa ; CPU:$E63E PRG:263E 8A + clc ; CPU:$E63F PRG:263F 18 + adc ZpFA ; CPU:$E640 PRG:2640 65 FA + sta ZpFD ; CPU:$E642 PRG:2642 85 FD + lda #$00 ; CPU:$E644 PRG:2644 A9 00 + sta ZpFC ; CPU:$E646 PRG:2646 85 FC + sta ZpFB ; CPU:$E648 PRG:2648 85 FB + jsr $FDD8 ; CPU:$E64A PRG:264A 20 D8 FD + ldx ZpFD ; CPU:$E64D PRG:264D A6 FD + ldy ZpFC ; CPU:$E64F PRG:264F A4 FC + stx ZpFB ; CPU:$E651 PRG:2651 86 FB + sty ZpFA ; CPU:$E653 PRG:2653 84 FA + lda Zp10 ; CPU:$E655 PRG:2655 A5 10 + sta ZpFC ; CPU:$E657 PRG:2657 85 FC + lda Zp11 ; CPU:$E659 PRG:2659 A5 11 + sta ZpFD ; CPU:$E65B PRG:265B 85 FD + jsr $FD8B ; CPU:$E65D PRG:265D 20 8B FD + txa ; CPU:$E660 PRG:2660 8A + clc ; CPU:$E661 PRG:2661 18 + adc Zp1C ; CPU:$E662 PRG:2662 65 1C + sta Zp2C ; CPU:$E664 PRG:2664 85 2C + lda Zp12 ; CPU:$E666 PRG:2666 A5 12 + sta ZpFC ; CPU:$E668 PRG:2668 85 FC + lda Zp13 ; CPU:$E66A PRG:266A A5 13 + sta ZpFD ; CPU:$E66C PRG:266C 85 FD + jsr $FD8B ; CPU:$E66E PRG:266E 20 8B FD + txa ; CPU:$E671 PRG:2671 8A + clc ; CPU:$E672 PRG:2672 18 + adc Zp1E ; CPU:$E673 PRG:2673 65 1E + sta Zp2D ; CPU:$E675 PRG:2675 85 2D + jmp $E517 ; CPU:$E677 PRG:2677 4C 17 E5 +; ----------------------------------------------------------------------------- +; Routine: Label_E67A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E67A: + lda Zp28 ; CPU:$E67A PRG:267A A5 28 + bne Label_E683 ; CPU:$E67C PRG:267C D0 05 + lda #$00 ; CPU:$E67E PRG:267E A9 00 + jmp $E6F7 ; CPU:$E680 PRG:2680 4C F7 E6 +; ----------------------------------------------------------------------------- +; Routine: Label_E683 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E683: + lda Zp29 ; CPU:$E683 PRG:2683 A5 29 + bne Label_E68C ; CPU:$E685 PRG:2685 D0 05 + lda #$40 ; CPU:$E687 PRG:2687 A9 40 + jmp $E6F7 ; CPU:$E689 PRG:2689 4C F7 E6 +; ----------------------------------------------------------------------------- +; Routine: Label_E68C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E68C: + ldy #$40 ; CPU:$E68C PRG:268C A0 40 + cmp Zp28 ; CPU:$E68E PRG:268E C5 28 + bcc Label_E696 ; CPU:$E690 PRG:2690 90 04 + ldy #$00 ; CPU:$E692 PRG:2692 A0 00 + lda Zp28 ; CPU:$E694 PRG:2694 A5 28 +; ----------------------------------------------------------------------------- +; Routine: Label_E696 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E696: + sty Zp19 ; CPU:$E696 PRG:2696 84 19 + sta Zp18 ; CPU:$E698 PRG:2698 85 18 + lda Zp28 ; CPU:$E69A PRG:269A A5 28 + sta ZpFC ; CPU:$E69C PRG:269C 85 FC + sta ZpFA ; CPU:$E69E PRG:269E 85 FA + lda #$00 ; CPU:$E6A0 PRG:26A0 A9 00 + sta ZpFD ; CPU:$E6A2 PRG:26A2 85 FD + sta ZpFB ; CPU:$E6A4 PRG:26A4 85 FB + jsr $FD8B ; CPU:$E6A6 PRG:26A6 20 8B FD + stx Zp25 ; CPU:$E6A9 PRG:26A9 86 25 + sty Zp24 ; CPU:$E6AB PRG:26AB 84 24 + lda Zp29 ; CPU:$E6AD PRG:26AD A5 29 + sta ZpFC ; CPU:$E6AF PRG:26AF 85 FC + sta ZpFA ; CPU:$E6B1 PRG:26B1 85 FA + lda #$00 ; CPU:$E6B3 PRG:26B3 A9 00 + sta ZpFD ; CPU:$E6B5 PRG:26B5 85 FD + jsr $FD8B ; CPU:$E6B7 PRG:26B7 20 8B FD + tya ; CPU:$E6BA PRG:26BA 98 + clc ; CPU:$E6BB PRG:26BB 18 + adc Zp24 ; CPU:$E6BC PRG:26BC 65 24 + sta ZpFC ; CPU:$E6BE PRG:26BE 85 FC + txa ; CPU:$E6C0 PRG:26C0 8A + adc Zp25 ; CPU:$E6C1 PRG:26C1 65 25 + sta ZpFD ; CPU:$E6C3 PRG:26C3 85 FD + jsr $FE5A ; CPU:$E6C5 PRG:26C5 20 5A FE + sta ZpFA ; CPU:$E6C8 PRG:26C8 85 FA + lda Zp18 ; CPU:$E6CA PRG:26CA A5 18 + sta ZpFD ; CPU:$E6CC PRG:26CC 85 FD + lda #$00 ; CPU:$E6CE PRG:26CE A9 00 +; ----------------------------------------------------------------------------- +; Routine: Label_E6D0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E6D0: + sta ZpFC ; CPU:$E6D0 PRG:26D0 85 FC + jsr $FDD8 ; CPU:$E6D2 PRG:26D2 20 D8 FD + lda ZpFC ; CPU:$E6D5 PRG:26D5 A5 FC + ldy #$00 ; CPU:$E6D7 PRG:26D7 A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_E6D9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E6D9: + cmp $FECE,y ; CPU:$E6D9 PRG:26D9 D9 CE FE + beq Label_E6ED ; CPU:$E6DC PRG:26DC F0 0F + bcs Label_E6E4 ; CPU:$E6DE PRG:26DE B0 04 + dey ; CPU:$E6E0 PRG:26E0 88 + jmp $E6D9 ; CPU:$E6E1 PRG:26E1 4C D9 E6 +; ----------------------------------------------------------------------------- +; Routine: Label_E6E4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E6E4: + cmp $FECF,y ; CPU:$E6E4 PRG:26E4 D9 CF FE + bcc Label_E6ED ; CPU:$E6E7 PRG:26E7 90 04 + iny ; CPU:$E6E9 PRG:26E9 C8 + jmp $E6D9 ; CPU:$E6EA PRG:26EA 4C D9 E6 +; ----------------------------------------------------------------------------- +; Routine: Label_E6ED +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E6ED: + lda Zp19 ; CPU:$E6ED PRG:26ED A5 19 + beq Label_E6F8 ; CPU:$E6EF PRG:26EF F0 07 + tya ; CPU:$E6F1 PRG:26F1 98 + eor #$FF ; CPU:$E6F2 PRG:26F2 49 FF + clc ; CPU:$E6F4 PRG:26F4 18 + adc #$41 ; CPU:$E6F5 PRG:26F5 69 41 +; ----------------------------------------------------------------------------- +; Routine: Label_E6F7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E6F7: + tay ; CPU:$E6F7 PRG:26F7 A8 +; ----------------------------------------------------------------------------- +; Routine: Label_E6F8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E6F8: + lda Zp11 ; CPU:$E6F8 PRG:26F8 A5 11 + bpl Label_E70F ; CPU:$E6FA PRG:26FA 10 13 + lda Zp13 ; CPU:$E6FC PRG:26FC A5 13 + bpl Label_E706 ; CPU:$E6FE PRG:26FE 10 06 + tya ; CPU:$E700 PRG:2700 98 + clc ; CPU:$E701 PRG:2701 18 + adc #$80 ; CPU:$E702 PRG:2702 69 80 + bne Label_E71C ; CPU:$E704 PRG:2704 D0 16 +; ----------------------------------------------------------------------------- +; Routine: Label_E706 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E706: + tya ; CPU:$E706 PRG:2706 98 + eor #$FF ; CPU:$E707 PRG:2707 49 FF + clc ; CPU:$E709 PRG:2709 18 + adc #$01 ; CPU:$E70A PRG:270A 69 01 + jmp $E71C ; CPU:$E70C PRG:270C 4C 1C E7 +; ----------------------------------------------------------------------------- +; Routine: Label_E70F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E70F: + lda Zp13 ; CPU:$E70F PRG:270F A5 13 + bpl Label_E71B ; CPU:$E711 PRG:2711 10 08 + tya ; CPU:$E713 PRG:2713 98 + eor #$FF ; CPU:$E714 PRG:2714 49 FF + clc ; CPU:$E716 PRG:2716 18 + adc #$81 ; CPU:$E717 PRG:2717 69 81 + bne Label_E71C ; CPU:$E719 PRG:2719 D0 01 +; ----------------------------------------------------------------------------- +; Routine: Label_E71B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E71B: + tya ; CPU:$E71B PRG:271B 98 +; ----------------------------------------------------------------------------- +; Routine: Label_E71C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E71C: + rts ; CPU:$E71C PRG:271C 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E71D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E71D: + lda #$01 ; CPU:$E71D PRG:271D A9 01 + sta Zp34 ; CPU:$E71F PRG:271F 85 34 +; ----------------------------------------------------------------------------- +; Routine: Label_E721 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E721: + ldx Zp34 ; CPU:$E721 PRG:2721 A6 34 + lda $0300,x ; CPU:$E723 PRG:2723 BD 00 03 + and #$C0 ; CPU:$E726 PRG:2726 29 C0 + cmp #$80 ; CPU:$E728 PRG:2728 C9 80 + bne Label_E763 ; CPU:$E72A PRG:272A D0 37 + cpx Zp32 ; CPU:$E72C PRG:272C E4 32 + beq Label_E763 ; CPU:$E72E PRG:272E F0 33 + ldy Zp32 ; CPU:$E730 PRG:2730 A4 32 + lda $04A6,x ; CPU:$E732 PRG:2732 BD A6 04 + cmp $04A6,y ; CPU:$E735 PRG:2735 D9 A6 04 + bcs Label_E763 ; CPU:$E738 PRG:2738 B0 29 + lda $049F,x ; CPU:$E73A PRG:273A BD 9F 04 + sec ; CPU:$E73D PRG:273D 38 + sbc $049F,y ; CPU:$E73E PRG:273E F9 9F 04 + bpl Label_E748 ; CPU:$E741 PRG:2741 10 05 + eor #$FF ; CPU:$E743 PRG:2743 49 FF + clc ; CPU:$E745 PRG:2745 18 + adc #$01 ; CPU:$E746 PRG:2746 69 01 +; ----------------------------------------------------------------------------- +; Routine: Label_E748 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E748: + cmp #$40 ; CPU:$E748 PRG:2748 C9 40 + bcs Label_E763 ; CPU:$E74A PRG:274A B0 17 + jsr $FEA8 ; CPU:$E74C PRG:274C 20 A8 FE + ldx Zp34 ; CPU:$E74F PRG:274F A6 34 + lda $04A6,x ; CPU:$E751 PRG:2751 BD A6 04 + sta ZpFA ; CPU:$E754 PRG:2754 85 FA + lda #$00 ; CPU:$E756 PRG:2756 A9 00 + sta ZpFB ; CPU:$E758 PRG:2758 85 FB + jsr $FD8B ; CPU:$E75A PRG:275A 20 8B FD + cpx #$0B ; CPU:$E75D PRG:275D E0 0B + bcs Label_E763 ; CPU:$E75F PRG:275F B0 02 + sec ; CPU:$E761 PRG:2761 38 + rts ; CPU:$E762 PRG:2762 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E763 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E763: + inc Zp34 ; CPU:$E763 PRG:2763 E6 34 + lda Zp34 ; CPU:$E765 PRG:2765 A5 34 + cmp #$08 ; CPU:$E767 PRG:2767 C9 08 + bne Label_E721 ; CPU:$E769 PRG:2769 D0 B6 + clc ; CPU:$E76B PRG:276B 18 + rts ; CPU:$E76C PRG:276C 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E76D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E76D: + lda #$00 ; CPU:$E76D PRG:276D A9 00 + sta Zp34 ; CPU:$E76F PRG:276F 85 34 +; ----------------------------------------------------------------------------- +; Routine: Label_E771 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E771: + ldx Zp34 ; CPU:$E771 PRG:2771 A6 34 + ldy Zp32 ; CPU:$E773 PRG:2773 A4 32 + lda $0490,x ; CPU:$E775 PRG:2775 BD 90 04 + cmp $04A6,y ; CPU:$E778 PRG:2778 D9 A6 04 + bcs Label_E7A6 ; CPU:$E77B PRG:277B B0 29 + lda $0480,x ; CPU:$E77D PRG:277D BD 80 04 + sec ; CPU:$E780 PRG:2780 38 + sbc $049F,y ; CPU:$E781 PRG:2781 F9 9F 04 + bpl Label_E78B ; CPU:$E784 PRG:2784 10 05 + eor #$FF ; CPU:$E786 PRG:2786 49 FF + clc ; CPU:$E788 PRG:2788 18 + adc #$01 ; CPU:$E789 PRG:2789 69 01 +; ----------------------------------------------------------------------------- +; Routine: Label_E78B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E78B: + cmp #$40 ; CPU:$E78B PRG:278B C9 40 + bcs Label_E7A6 ; CPU:$E78D PRG:278D B0 17 + jsr $FEA8 ; CPU:$E78F PRG:278F 20 A8 FE + ldx Zp34 ; CPU:$E792 PRG:2792 A6 34 + lda $0490,x ; CPU:$E794 PRG:2794 BD 90 04 + sta ZpFA ; CPU:$E797 PRG:2797 85 FA + lda #$00 ; CPU:$E799 PRG:2799 A9 00 + sta ZpFB ; CPU:$E79B PRG:279B 85 FB + jsr $FD8B ; CPU:$E79D PRG:279D 20 8B FD + cpx #$10 ; CPU:$E7A0 PRG:27A0 E0 10 + bcs Label_E7A6 ; CPU:$E7A2 PRG:27A2 B0 02 + sec ; CPU:$E7A4 PRG:27A4 38 + rts ; CPU:$E7A5 PRG:27A5 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E7A6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E7A6: + inc Zp34 ; CPU:$E7A6 PRG:27A6 E6 34 + lda Zp34 ; CPU:$E7A8 PRG:27A8 A5 34 + cmp $01C0 ; CPU:$E7AA PRG:27AA CD C0 01 + bne Label_E771 ; CPU:$E7AD PRG:27AD D0 C2 + clc ; CPU:$E7AF PRG:27AF 18 + rts ; CPU:$E7B0 PRG:27B0 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E7B1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E7B1: + lda #$08 ; CPU:$E7B1 PRG:27B1 A9 08 + sta Zp34 ; CPU:$E7B3 PRG:27B3 85 34 +; ----------------------------------------------------------------------------- +; Routine: Label_E7B5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E7B5: + ldx Zp32 ; CPU:$E7B5 PRG:27B5 A6 32 + lda Zp34 ; CPU:$E7B7 PRG:27B7 A5 34 + cmp $04A6,x ; CPU:$E7B9 PRG:27B9 DD A6 04 + bcc Label_E7C0 ; CPU:$E7BC PRG:27BC 90 02 + clc ; CPU:$E7BE PRG:27BE 18 + rts ; CPU:$E7BF PRG:27BF 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E7C0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E7C0: + lda $049F,x ; CPU:$E7C0 PRG:27C0 BD 9F 04 + jsr $FEA8 ; CPU:$E7C3 PRG:27C3 20 A8 FE + lda Zp34 ; CPU:$E7C6 PRG:27C6 A5 34 + sta ZpFA ; CPU:$E7C8 PRG:27C8 85 FA + lda #$00 ; CPU:$E7CA PRG:27CA A9 00 + sta ZpFB ; CPU:$E7CC PRG:27CC 85 FB + jsr $FD8B ; CPU:$E7CE PRG:27CE 20 8B FD + txa ; CPU:$E7D1 PRG:27D1 8A + adc $0330 ; CPU:$E7D2 PRG:27D2 6D 30 03 + lsr a ; CPU:$E7D5 PRG:27D5 4A + lsr a ; CPU:$E7D6 PRG:27D6 4A + lsr a ; CPU:$E7D7 PRG:27D7 4A + pha ; CPU:$E7D8 PRG:27D8 48 + ldx Zp32 ; CPU:$E7D9 PRG:27D9 A6 32 + lda $049F,x ; CPU:$E7DB PRG:27DB BD 9F 04 + jsr $FF0E ; CPU:$E7DE PRG:27DE 20 0E FF + jsr $FD8B ; CPU:$E7E1 PRG:27E1 20 8B FD + txa ; CPU:$E7E4 PRG:27E4 8A + clc ; CPU:$E7E5 PRG:27E5 18 + adc $0370 ; CPU:$E7E6 PRG:27E6 6D 70 03 + lsr a ; CPU:$E7E9 PRG:27E9 4A + lsr a ; CPU:$E7EA PRG:27EA 4A + lsr a ; CPU:$E7EB PRG:27EB 4A + tax ; CPU:$E7EC PRG:27EC AA + pla ; CPU:$E7ED PRG:27ED 68 + tay ; CPU:$E7EE PRG:27EE A8 + jsr $FAF9 ; CPU:$E7EF PRG:27EF 20 F9 FA + ldy #$00 ; CPU:$E7F2 PRG:27F2 A0 00 + lda (ZpFC),y ; CPU:$E7F4 PRG:27F4 B1 FC + and #$0F ; CPU:$E7F6 PRG:27F6 29 0F + cmp #$08 ; CPU:$E7F8 PRG:27F8 C9 08 + bcs Label_E802 ; CPU:$E7FA PRG:27FA B0 06 + cmp #$05 ; CPU:$E7FC PRG:27FC C9 05 + bcc Label_E802 ; CPU:$E7FE PRG:27FE 90 02 + sec ; CPU:$E800 PRG:2800 38 + rts ; CPU:$E801 PRG:2801 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E802 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E802: + lda Zp34 ; CPU:$E802 PRG:2802 A5 34 + clc ; CPU:$E804 PRG:2804 18 + adc #$08 ; CPU:$E805 PRG:2805 69 08 + sta Zp34 ; CPU:$E807 PRG:2807 85 34 + jmp $E7B5 ; CPU:$E809 PRG:2809 4C B5 E7 +; ----------------------------------------------------------------------------- +; Routine: Reset +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in 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: + sei ; CPU:$E80C PRG:280C 78 + ldx #$FF ; CPU:$E80D PRG:280D A2 FF + txs ; CPU:$E80F PRG:280F 9A + lda #$10 ; CPU:$E810 PRG:2810 A9 10 + ldx #$06 ; CPU:$E812 PRG:2812 A2 06 + jsr $CB1D ; CPU:$E814 PRG:2814 20 1D CB +; ----------------------------------------------------------------------------- +; Routine: Label_E817 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E817: + lda $2002 ; CPU:$E817 PRG:2817 AD 02 20 + and #$80 ; CPU:$E81A PRG:281A 29 80 + beq Label_E817 ; CPU:$E81C PRG:281C F0 F9 +; ----------------------------------------------------------------------------- +; Routine: Label_E81E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E81E: + lda $2002 ; CPU:$E81E PRG:281E AD 02 20 + and #$80 ; CPU:$E821 PRG:2821 29 80 + beq Label_E81E ; CPU:$E823 PRG:2823 F0 F9 + jsr $CC7B ; CPU:$E825 PRG:2825 20 7B CC + jsr $CA60 ; CPU:$E828 PRG:2828 20 60 CA + jsr $C3F5 ; CPU:$E82B PRG:282B 20 F5 C3 + ldx #$10 ; CPU:$E82E PRG:282E A2 10 +; ----------------------------------------------------------------------------- +; Routine: Label_E830 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E830: + lda #$FF ; CPU:$E830 PRG:2830 A9 FF + sta Zp7F,x ; CPU:$E832 PRG:2832 95 7F + sta $013F,x ; CPU:$E834 PRG:2834 9D 3F 01 + lda #$00 ; CPU:$E837 PRG:2837 A9 00 + sta $02FF,x ; CPU:$E839 PRG:2839 9D FF 02 + dex ; CPU:$E83C PRG:283C CA + bne Label_E830 ; CPU:$E83D PRG:283D D0 F1 + sta $01C7 ; CPU:$E83F PRG:283F 8D C7 01 + lda #$20 ; CPU:$E842 PRG:2842 A9 20 + sta Zp02 ; CPU:$E844 PRG:2844 85 02 + ldx #$10 ; CPU:$E846 PRG:2846 A2 10 +; ----------------------------------------------------------------------------- +; Routine: Label_E848 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E848: + lda $ED3E,x ; CPU:$E848 PRG:2848 BD 3E ED + sta Zp8F,x ; CPU:$E84B PRG:284B 95 8F + dex ; CPU:$E84D PRG:284D CA + bne Label_E848 ; CPU:$E84E PRG:284E D0 F8 + ldx #$10 ; CPU:$E850 PRG:2850 A2 10 +; ----------------------------------------------------------------------------- +; Routine: Label_E852 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E852: + lda $043F,x ; CPU:$E852 PRG:2852 BD 3F 04 + cmp $E861,x ; CPU:$E855 PRG:2855 DD 61 E8 + bne Label_E880 ; CPU:$E858 PRG:2858 D0 26 + dex ; CPU:$E85A PRG:285A CA + bne Label_E852 ; CPU:$E85B PRG:285B D0 F5 + inc Zp5F ; CPU:$E85D PRG:285D E6 5F + jmp $E8B3 ; CPU:$E85F PRG:285F 4C B3 E8 +; ---- data $E862-$E87F (30 bytes) ---- +; referenced by `lda $E86F,x` at $E8FF (operand $E86F falls inside this region) + .byte $4A, $45, $4D, $49, $4E, $49, $20, $44, $41, $5A, $4F, $21, $21, $00, $00, $B1 ; CPU:$E862 PRG:2862 4A 45 4D 49 4E 49 20 44 41 5A 4F 21 21 00 00 B1 + .byte $81, $81, $00, $80, $90, $A0, $00, $01, $00, $00, $00, $01, $00, $0B ; CPU:$E872 PRG:2872 81 81 00 80 90 A0 00 01 00 00 00 01 00 0B +; ----------------------------------------------------------------------------- +; Routine: Label_E880 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E880: + ldx #$10 ; CPU:$E880 PRG:2880 A2 10 +; ----------------------------------------------------------------------------- +; Routine: Label_E882 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E882: + lda $E861,x ; CPU:$E882 PRG:2882 BD 61 E8 + sta $043F,x ; CPU:$E885 PRG:2885 9D 3F 04 + dex ; CPU:$E888 PRG:2888 CA + bne Label_E882 ; CPU:$E889 PRG:2889 D0 F7 + lda #$00 ; CPU:$E88B PRG:288B A9 00 + ldx #$06 ; CPU:$E88D PRG:288D A2 06 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_E88F: + sta $044F,x ; CPU:$E88F PRG:288F 9D 4F 04 + sta $0455,x ; CPU:$E892 PRG:2892 9D 55 04 + sta $045B,x ; CPU:$E895 PRG:2895 9D 5B 04 + sta $0467,x ; CPU:$E898 PRG:2898 9D 67 04 + sta $046D,x ; CPU:$E89B PRG:289B 9D 6D 04 + dex ; CPU:$E89E PRG:289E CA + bne Label_E88F ; CPU:$E89F PRG:289F D0 EE + sta Zp0F ; CPU:$E8A1 PRG:28A1 85 0F + sta $0187 ; CPU:$E8A3 PRG:28A3 8D 87 01 + sta Zp5F ; CPU:$E8A6 PRG:28A6 85 5F + lda #$05 ; CPU:$E8A8 PRG:28A8 A9 05 + sta $0453 ; CPU:$E8AA PRG:28AA 8D 53 04 + sta $0459 ; CPU:$E8AD PRG:28AD 8D 59 04 + sta $045F ; CPU:$E8B0 PRG:28B0 8D 5F 04 +; ----------------------------------------------------------------------------- +; Routine: Label_E8B3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E8B3: + jsr $C3BC ; CPU:$E8B3 PRG:28B3 20 BC C3 + jsr $CA48 ; CPU:$E8B6 PRG:28B6 20 48 CA + jsr $FA6D ; CPU:$E8B9 PRG:28B9 20 6D FA + lda #$00 ; CPU:$E8BC PRG:28BC A9 00 + sta $0308 ; CPU:$E8BE PRG:28BE 8D 08 03 + jsr $CA21 ; CPU:$E8C1 PRG:28C1 20 21 CA + lda #$3B ; CPU:$E8C4 PRG:28C4 A9 3B + jsr $F654 ; CPU:$E8C6 PRG:28C6 20 54 F6 + lda #$00 ; CPU:$E8C9 PRG:28C9 A9 00 + jsr $F669 ; CPU:$E8CB PRG:28CB 20 69 F6 + lda #$03 ; CPU:$E8CE PRG:28CE A9 03 + ldx #$08 ; CPU:$E8D0 PRG:28D0 A2 08 + ldy #$00 ; CPU:$E8D2 PRG:28D2 A0 00 + jsr $CDD3 ; CPU:$E8D4 PRG:28D4 20 D3 CD + lda #$0B ; CPU:$E8D7 PRG:28D7 A9 0B + ldx #$08 ; CPU:$E8D9 PRG:28D9 A2 08 + ldy #$AB ; CPU:$E8DB PRG:28DB A0 AB + jsr $CDD3 ; CPU:$E8DD PRG:28DD 20 D3 CD + jsr $CBAE ; CPU:$E8E0 PRG:28E0 20 AE CB + jsr $CF9B ; CPU:$E8E3 PRG:28E3 20 9B CF + .byte $03, $03 ; CPU:$E8E6 PRG:28E6 03 03 -- slo (Zp03,x) (undocumented; ca65 cannot encode) + .byte $1B, $03, $03 ; CPU:$E8E8 PRG:28E8 1B 03 03 -- slo $0303,y (undocumented; ca65 cannot encode) + .byte $03, $05 ; CPU:$E8EB PRG:28EB 03 05 -- slo (Zp05,x) (undocumented; ca65 cannot encode) + .byte $1C, $09, $01 ; CPU:$E8ED PRG:28ED 1C 09 01 -- nop $0109,x (undocumented; ca65 cannot encode) + .byte $07, $0D ; CPU:$E8F0 PRG:28F0 07 0D -- slo Zp0D (undocumented; ca65 cannot encode) + clc ; CPU:$E8F2 PRG:28F2 18 + ora $FF02 ; CPU:$E8F3 PRG:28F3 0D 02 FF + lda #$10 ; CPU:$E8F6 PRG:28F6 A9 10 + sta Zp00 ; CPU:$E8F8 PRG:28F8 85 00 + jsr $CA42 ; CPU:$E8FA PRG:28FA 20 42 CA + ldx #$10 ; CPU:$E8FD PRG:28FD A2 10 +; ----------------------------------------------------------------------------- +; Routine: Label_E8FF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E8FF: + lda $E86F,x ; CPU:$E8FF PRG:28FF BD 6F E8 + sta $013F,x ; CPU:$E902 PRG:2902 9D 3F 01 + dex ; CPU:$E905 PRG:2905 CA + bne Label_E8FF ; CPU:$E906 PRG:2906 D0 F7 + jsr $F867 ; CPU:$E908 PRG:2908 20 67 F8 + jsr $E202 ; CPU:$E90B PRG:290B 20 02 E2 + jsr $E1F2 ; CPU:$E90E PRG:290E 20 F2 E1 + jsr $FA7D ; CPU:$E911 PRG:2911 20 7D FA + lda #$0A ; CPU:$E914 PRG:2914 A9 0A + jsr $C3DA ; CPU:$E916 PRG:2916 20 DA C3 + lda #$01 ; CPU:$E919 PRG:2919 A9 01 + sta Zp26 ; CPU:$E91B PRG:291B 85 26 + sta Zp25 ; CPU:$E91D PRG:291D 85 25 + lda #$08 ; CPU:$E91F PRG:291F A9 08 + sta Zp24 ; CPU:$E921 PRG:2921 85 24 +; ----------------------------------------------------------------------------- +; Routine: Label_E923 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E923: + lda #$00 ; CPU:$E923 PRG:2923 A9 00 + sta $01C8 ; CPU:$E925 PRG:2925 8D C8 01 +; ----------------------------------------------------------------------------- +; Routine: Label_E928 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E928: + lda $01C8 ; CPU:$E928 PRG:2928 AD C8 01 + beq Label_E928 ; CPU:$E92B PRG:292B F0 FB + jsr $CD0E ; CPU:$E92D PRG:292D 20 0E CD + lda $0180 ; CPU:$E930 PRG:2930 AD 80 01 + ora $0182 ; CPU:$E933 PRG:2933 0D 82 01 + and #$08 ; CPU:$E936 PRG:2936 29 08 + beq Label_E947 ; CPU:$E938 PRG:2938 F0 0D + lda #$20 ; CPU:$E93A PRG:293A A9 20 + sta Zp00 ; CPU:$E93C PRG:293C 85 00 + jsr $C3BC ; CPU:$E93E PRG:293E 20 BC C3 + jsr $FA6D ; CPU:$E941 PRG:2941 20 6D FA + jmp $E9CA ; CPU:$E944 PRG:2944 4C CA E9 +; ----------------------------------------------------------------------------- +; Routine: Label_E947 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E947: + dec Zp24 ; CPU:$E947 PRG:2947 C6 24 + bne Label_E923 ; CPU:$E949 PRG:2949 D0 D8 + lda #$08 ; CPU:$E94B PRG:294B A9 08 + sta Zp24 ; CPU:$E94D PRG:294D 85 24 + jsr $E974 ; CPU:$E94F PRG:294F 20 74 E9 + lda Zp25 ; CPU:$E952 PRG:2952 A5 25 + sec ; CPU:$E954 PRG:2954 38 + sbc #$04 ; CPU:$E955 PRG:2955 E9 04 + bcs Label_E95D ; CPU:$E957 PRG:2957 B0 04 + eor #$FF ; CPU:$E959 PRG:2959 49 FF + adc #$01 ; CPU:$E95B PRG:295B 69 01 +; ----------------------------------------------------------------------------- +; Routine: Label_E95D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E95D: + tay ; CPU:$E95D PRG:295D A8 + lda #$B7 ; CPU:$E95E PRG:295E A9 B7 + jsr $FA99 ; CPU:$E960 PRG:2960 20 99 FA + sta Zp89 ; CPU:$E963 PRG:2963 85 89 + inc Zp25 ; CPU:$E965 PRG:2965 E6 25 + lda Zp25 ; CPU:$E967 PRG:2967 A5 25 + cmp #$08 ; CPU:$E969 PRG:2969 C9 08 + bne Label_E971 ; CPU:$E96B PRG:296B D0 04 + lda #$01 ; CPU:$E96D PRG:296D A9 01 + sta Zp25 ; CPU:$E96F PRG:296F 85 25 +; ----------------------------------------------------------------------------- +; Routine: Label_E971 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E971: + jmp $E923 ; CPU:$E971 PRG:2971 4C 23 E9 +; ----------------------------------------------------------------------------- +; Routine: Label_E974 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E974: + inc Zp26 ; CPU:$E974 PRG:2974 E6 26 + lda Zp26 ; CPU:$E976 PRG:2976 A5 26 + cmp #$17 ; CPU:$E978 PRG:2978 C9 17 + bne Label_E980 ; CPU:$E97A PRG:297A D0 04 + lda #$00 ; CPU:$E97C PRG:297C A9 00 + sta Zp26 ; CPU:$E97E PRG:297E 85 26 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_E980: + ldy #$00 ; CPU:$E980 PRG:2980 A0 00 + ldx Zp26 ; CPU:$E982 PRG:2982 A6 26 + lda $E9A3,x ; CPU:$E984 PRG:2984 BD A3 E9 + jsr $FA99 ; CPU:$E987 PRG:2987 20 99 FA + sta Zp87 ; CPU:$E98A PRG:298A 85 87 + iny ; CPU:$E98C PRG:298C C8 + ldx Zp26 ; CPU:$E98D PRG:298D A6 26 + lda $E9A3,x ; CPU:$E98F PRG:298F BD A3 E9 + jsr $FA99 ; CPU:$E992 PRG:2992 20 99 FA + sta Zp86 ; CPU:$E995 PRG:2995 85 86 + iny ; CPU:$E997 PRG:2997 C8 + ldx Zp26 ; CPU:$E998 PRG:2998 A6 26 + lda $E9A3,x ; CPU:$E99A PRG:299A BD A3 E9 + jsr $FA99 ; CPU:$E99D PRG:299D 20 99 FA + sta Zp85 ; CPU:$E9A0 PRG:29A0 85 85 + rts ; CPU:$E9A2 PRG:29A2 60 +; ---- data $E9A3-$E9C9 (39 bytes) ---- +; referenced by `lda $E9A3,x` at $E984 (operand $E9A3 falls inside this region) +; referenced by `lda $E9A3,x` at $E98F (operand $E9A3 falls inside this region) +; referenced by `lda $E9A3,x` at $E99A (operand $E9A3 falls inside this region) +; referenced by `lda $E9B9,x` at $E9CC (operand $E9B9 falls inside this region) + .byte $B1, $B2, $B3, $B4, $B5, $B7, $B6, $B8, $B9, $BA, $BB, $BC, $BB, $BA, $B9, $B8 ; CPU:$E9A3 PRG:29A3 B1 B2 B3 B4 B5 B7 B6 B8 B9 BA BB BC BB BA B9 B8 + .byte $B6, $B7, $B5, $B4, $B3, $B2, $01, $00, $B9, $89, $89, $00, $B0, $8A, $00, $00 ; CPU:$E9B3 PRG:29B3 B6 B7 B5 B4 B3 B2 01 00 B9 89 89 00 B0 8A 00 00 + .byte $B0, $88, $00, $00, $01, $00, $00 ; CPU:$E9C3 PRG:29C3 B0 88 00 00 01 00 00 +; ----------------------------------------------------------------------------- +; Routine: Label_E9CA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E9CA: + ldx #$10 ; CPU:$E9CA PRG:29CA A2 10 +; ----------------------------------------------------------------------------- +; Routine: Label_E9CC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E9CC: + lda $E9B9,x ; CPU:$E9CC PRG:29CC BD B9 E9 + sta $013F,x ; CPU:$E9CF PRG:29CF 9D 3F 01 + dex ; CPU:$E9D2 PRG:29D2 CA + bne Label_E9CC ; CPU:$E9D3 PRG:29D3 D0 F7 + lda #$01 ; CPU:$E9D5 PRG:29D5 A9 01 + sta $0187 ; CPU:$E9D7 PRG:29D7 8D 87 01 + lda #$03 ; CPU:$E9DA PRG:29DA A9 03 + sta $0368 ; CPU:$E9DC PRG:29DC 8D 68 03 + sta $0369 ; CPU:$E9DF PRG:29DF 8D 69 03 + jsr $CA21 ; CPU:$E9E2 PRG:29E2 20 21 CA + lda #$20 ; CPU:$E9E5 PRG:29E5 A9 20 + jsr $F654 ; CPU:$E9E7 PRG:29E7 20 54 F6 + lda #$55 ; CPU:$E9EA PRG:29EA A9 55 + jsr $F669 ; CPU:$E9EC PRG:29EC 20 69 F6 + lda #$03 ; CPU:$E9EF PRG:29EF A9 03 + ldx #$09 ; CPU:$E9F1 PRG:29F1 A2 09 + ldy #$24 ; CPU:$E9F3 PRG:29F3 A0 24 + jsr $CDD3 ; CPU:$E9F5 PRG:29F5 20 D3 CD + jsr $CF9B ; CPU:$E9F8 PRG:29F8 20 9B CF + .byte $03, $03 ; CPU:$E9FB PRG:29FB 03 03 -- slo (Zp03,x) (undocumented; ca65 cannot encode) + .byte $1B, $03, $03 ; CPU:$E9FD PRG:29FD 1B 03 03 -- slo $0303,y (undocumented; ca65 cannot encode) + asl Zp06 ; CPU:$EA00 PRG:2A00 06 06 + clc ; CPU:$EA02 PRG:2A02 18 + php ; CPU:$EA03 PRG:2A03 08 + brk ; CPU:$EA04 PRG:2A04 00 +; ---- data $EA05-$EBAF (427 bytes) ---- + .byte $08, $14, $17, $18, $02, $FF, $20, $42, $CA, $20, $F2, $E1, $20, $02, $E2, $20 ; CPU:$EA05 PRG:2A05 08 14 17 18 02 FF 20 42 CA 20 F2 E1 20 02 E2 20 + .byte $1A, $E2, $20, $86, $E2, $20, $7D, $FA, $AD, $C7, $01, $0A, $0A, $0A, $0A, $69 ; CPU:$EA15 PRG:2A15 1A E2 20 86 E2 20 7D FA AD C7 01 0A 0A 0A 0A 69 + .byte $5F, $8D, $00, $02, $A9, $F8, $8D, $08, $02, $8D, $04, $02, $8D, $0C, $02, $A2 ; CPU:$EA25 PRG:2A25 5F 8D 00 02 A9 F8 8D 08 02 8D 04 02 8D 0C 02 A2 + .byte $25, $8E, $01, $02, $A9, $00, $8D, $02, $02, $A9, $44, $8D, $03, $02, $A2, $0A ; CPU:$EA35 PRG:2A35 25 8E 01 02 A9 00 8D 02 02 A9 44 8D 03 02 A2 0A + .byte $20, $56, $FF, $A9, $0B, $20, $DA, $C3, $A9, $01, $85, $24, $20, $B9, $CD, $AD ; CPU:$EA45 PRG:2A45 20 56 FF A9 0B 20 DA C3 A9 01 85 24 20 B9 CD AD + .byte $C8, $01, $F0, $F8, $A9, $00, $8D, $C8, $01, $20, $0E, $CD, $AD, $80, $01, $0D ; CPU:$EA55 PRG:2A55 C8 01 F0 F8 A9 00 8D C8 01 20 0E CD AD 80 01 0D + .byte $82, $01, $AA, $29, $08, $F0, $09, $A5, $00, $29, $20, $D0, $09, $4C, $60, $EB ; CPU:$EA65 PRG:2A65 82 01 AA 29 08 F0 09 A5 00 29 20 D0 09 4C 60 EB + .byte $A5, $00, $29, $DF, $85, $00, $8A, $29, $04, $D0, $06, $A9, $00, $85, $00, $F0 ; CPU:$EA75 PRG:2A75 A5 00 29 DF 85 00 8A 29 04 D0 06 A9 00 85 00 F0 + .byte $2B, $A5, $00, $29, $10, $D0, $25, $A9, $10, $85, $00, $EE, $C7, $01, $AD, $C7 ; CPU:$EA85 PRG:2A85 2B A5 00 29 10 D0 25 A9 10 85 00 EE C7 01 AD C7 + .byte $01, $C9, $03, $D0, $05, $A9, $00, $8D, $C7, $01, $AD, $C7, $01, $0A, $0A, $0A ; CPU:$EA95 PRG:2A95 01 C9 03 D0 05 A9 00 8D C7 01 AD C7 01 0A 0A 0A + .byte $0A, $69, $5F, $8D, $00, $02, $20, $67, $F8, $20, $02, $E2, $EE, $C1, $01, $AD ; CPU:$EAA5 PRG:2AA5 0A 69 5F 8D 00 02 20 67 F8 20 02 E2 EE C1 01 AD + .byte $C1, $01, $4A, $4A, $29, $0F, $AA, $BD, $50, $EB, $85, $92, $AD, $80, $01, $0D ; CPU:$EAB5 PRG:2AB5 C1 01 4A 4A 29 0F AA BD 50 EB 85 92 AD 80 01 0D + .byte $82, $01, $AA, $C6, $24, $D0, $41, $A9, $08, $85, $24, $8A, $A0, $01, $29, $20 ; CPU:$EAC5 PRG:2AC5 82 01 AA C6 24 D0 41 A9 08 85 24 8A A0 01 29 20 + .byte $D0, $07, $8A, $29, $10, $F0, $19, $A0, $FF, $98, $18, $6D, $87, $01, $D0, $04 ; CPU:$EAD5 PRG:2AD5 D0 07 8A 29 10 F0 19 A0 FF 98 18 6D 87 01 D0 04 + .byte $A9, $3C, $D0, $06, $C9, $3D, $D0, $02, $A9, $01, $8D, $87, $01, $20, $1A, $E2 ; CPU:$EAE5 PRG:2AE5 A9 3C D0 06 C9 3D D0 02 A9 01 8D 87 01 20 1A E2 + .byte $8A, $29, $80, $F0, $05, $E6, $02, $4C, $06, $EB, $8A, $29, $40, $F0, $09, $C6 ; CPU:$EAF5 PRG:2AF5 8A 29 80 F0 05 E6 02 4C 06 EB 8A 29 40 F0 09 C6 + .byte $02, $20, $86, $E2, $A9, $05, $85, $24, $A5, $02, $C9, $3A, $F0, $03, $4C, $51 ; CPU:$EB05 PRG:2B05 02 20 86 E2 A9 05 85 24 A5 02 C9 3A F0 03 4C 51 + .byte $EA, $AD, $87, $01, $F0, $F8, $C9, $11, $B0, $F4, $AD, $80, $01, $0D, $82, $01 ; CPU:$EB15 PRG:2B15 EA AD 87 01 F0 F8 C9 11 B0 F4 AD 80 01 0D 82 01 + .byte $0D, $81, $01, $0D, $83, $01, $8D, $80, $01, $45, $0A, $2D, $80, $01, $AA, $AD ; CPU:$EB25 PRG:2B25 0D 81 01 0D 83 01 8D 80 01 45 0A 2D 80 01 AA AD + .byte $80, $01, $85, $0A, $8A, $29, $03, $F0, $D5, $48, $20, $BC, $C3, $68, $29, $01 ; CPU:$EB35 PRG:2B35 80 01 85 0A 8A 29 03 F0 D5 48 20 BC C3 68 29 01 + .byte $F0, $CC, $AD, $87, $01, $20, $DA, $C3, $4C, $51, $EA, $09, $0A, $0B, $1B, $2B ; CPU:$EB45 PRG:2B45 F0 CC AD 87 01 20 DA C3 4C 51 EA 09 0A 0B 1B 2B + .byte $3B, $30, $30, $3B, $2B, $1B, $0B, $0A, $09, $FF, $FF, $AD, $87, $01, $8D, $CC ; CPU:$EB55 PRG:2B55 3B 30 30 3B 2B 1B 0B 0A 09 FF FF AD 87 01 8D CC + .byte $01, $A9, $01, $8D, $C4, $01, $A9, $03, $8D, $6A, $03, $8D, $6B, $03, $A9, $00 ; CPU:$EB65 PRG:2B65 01 A9 01 8D C4 01 A9 03 8D 6A 03 8D 6B 03 A9 00 + .byte $8D, $C6, $01, $A2, $0C, $9D, $67, $04, $CA, $D0, $FA, $8D, $C0, $03, $A9, $FF ; CPU:$EB75 PRG:2B75 8D C6 01 A2 0C 9D 67 04 CA D0 FA 8D C0 03 A9 FF + .byte $8D, $C2, $01, $A9, $FD, $8D, $C9, $01, $A9, $E8, $8D, $48, $03, $A9, $C0, $8D ; CPU:$EB85 PRG:2B85 8D C2 01 A9 FD 8D C9 01 A9 E8 8D 48 03 A9 C0 8D + .byte $08, $03, $A9, $30, $8D, $58, $03, $20, $BC, $C3, $A9, $01, $8D, $F8, $03, $AD ; CPU:$EB95 PRG:2B95 08 03 A9 30 8D 58 03 20 BC C3 A9 01 8D F8 03 AD + .byte $C7, $01, $C9, $01, $90, $05, $A9, $02, $8D, $F8, $03 ; CPU:$EBA5 PRG:2BA5 C7 01 C9 01 90 05 A9 02 8D F8 03 +; ----------------------------------------------------------------------------- +; Routine: Label_EBB0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EBB0: + ldx $01C6 ; CPU:$EBB0 PRG:2BB0 AE C6 01 + lda $0368,x ; CPU:$EBB3 PRG:2BB3 BD 68 03 + sta $01C3 ; CPU:$EBB6 PRG:2BB6 8D C3 01 + lda $036A,x ; CPU:$EBB9 PRG:2BB9 BD 6A 03 + sta $01C5 ; CPU:$EBBC PRG:2BBC 8D C5 01 + lda #$00 ; CPU:$EBBF PRG:2BBF A9 00 + sta Zp37 ; CPU:$EBC1 PRG:2BC1 85 37 + sta Zp35 ; CPU:$EBC3 PRG:2BC3 85 35 + sta $01CA ; CPU:$EBC5 PRG:2BC5 8D CA 01 + jsr $CBAE ; CPU:$EBC8 PRG:2BC8 20 AE CB + jsr $CA48 ; CPU:$EBCB PRG:2BCB 20 48 CA + jsr $FA6D ; CPU:$EBCE PRG:2BCE 20 6D FA + jsr $CA21 ; CPU:$EBD1 PRG:2BD1 20 21 CA + lda #$DE ; CPU:$EBD4 PRG:2BD4 A9 DE + jsr $F654 ; CPU:$EBD6 PRG:2BD6 20 54 F6 + lda #$55 ; CPU:$EBD9 PRG:2BD9 A9 55 + jsr $F669 ; CPU:$EBDB PRG:2BDB 20 69 F6 + lda $0187 ; CPU:$EBDE PRG:2BDE AD 87 01 + jsr $E2FE ; CPU:$EBE1 PRG:2BE1 20 FE E2 + lda #$21 ; CPU:$EBE4 PRG:2BE4 A9 21 + sta $2006 ; CPU:$EBE6 PRG:2BE6 8D 06 20 + lda #$C9 ; CPU:$EBE9 PRG:2BE9 A9 C9 + sta $2006 ; CPU:$EBEB PRG:2BEB 8D 06 20 + jsr $CBC9 ; CPU:$EBEE PRG:2BEE 20 C9 CB + .byte $73, $74 ; CPU:$EBF1 PRG:2BF1 73 74 -- rra (Zp74),y (undocumented; ca65 cannot encode) + adc (Zp67,x) ; CPU:$EBF3 PRG:2BF3 61 67 + adc Zp3B ; CPU:$EBF5 PRG:2BF5 65 3B + brk ; CPU:$EBF7 PRG:2BF7 00 +; ---- data $EBF8-$ED4E (343 bytes) ---- +; referenced by `lda $ED3E,x` at $E848 (operand $ED3E falls inside this region) + .byte $A5, $0D, $8D, $07, $20, $A5, $0E, $8D, $07, $20, $20, $C9, $CB, $3B, $73, $74 ; CPU:$EBF8 PRG:2BF8 A5 0D 8D 07 20 A5 0E 8D 07 20 20 C9 CB 3B 73 74 + .byte $61, $72, $74, $00, $20, $42, $CA, $A9, $02, $8D, $42, $01, $A9, $00, $8D, $46 ; CPU:$EC08 PRG:2C08 61 72 74 00 20 42 CA A9 02 8D 42 01 A9 00 8D 46 + .byte $01, $8D, $47, $01, $20, $7D, $FA, $A2, $28, $20, $56, $FF, $20, $6D, $FA, $4C ; CPU:$EC18 PRG:2C18 01 8D 47 01 20 7D FA A2 28 20 56 FF 20 6D FA 4C + .byte $3A, $EC, $00, $01, $02, $03, $00, $01, $02, $00, $00, $01, $02, $05, $00, $01 ; CPU:$EC28 PRG:2C28 3A EC 00 01 02 03 00 01 02 00 00 01 02 05 00 01 + .byte $02, $04, $A2, $10, $BD, $29, $EC, $9D, $3F, $01, $CA, $D0, $F7, $A9, $03, $8D ; CPU:$EC38 PRG:2C38 02 04 A2 10 BD 29 EC 9D 3F 01 CA D0 F7 A9 03 8D + .byte $43, $01, $AD, $87, $01, $29, $03, $18, $69, $06, $8D, $47, $01, $20, $21, $CA ; CPU:$EC48 PRG:2C48 43 01 AD 87 01 29 03 18 69 06 8D 47 01 20 21 CA + .byte $20, $35, $CE, $20, $21, $CA, $A9, $0A, $8D, $8A, $01, $20, $B9, $CD, $29, $1F ; CPU:$EC58 PRG:2C58 20 35 CE 20 21 CA A9 0A 8D 8A 01 20 B9 CD 29 1F + .byte $AA, $8E, $89, $01, $20, $B9, $CD, $29, $1F, $A8, $8C, $88, $01, $20, $97, $F8 ; CPU:$EC68 PRG:2C68 AA 8E 89 01 20 B9 CD 29 1F A8 8C 88 01 20 97 F8 + .byte $CE, $8A, $01, $D0, $E6, $A2, $20, $A0, $00, $20, $A9, $CB, $20, $AE, $CA, $AD ; CPU:$EC78 PRG:2C78 CE 8A 01 D0 E6 A2 20 A0 00 20 A9 CB 20 AE CA AD + .byte $07, $20, $AA, $C9, $DE, $D0, $1F, $20, $B9, $CD, $C9, $60, $90, $18, $E8, $C9 ; CPU:$EC88 PRG:2C88 07 20 AA C9 DE D0 1F 20 B9 CD C9 60 90 18 E8 C9 + .byte $D0, $90, $07, $CA, $CA, $C9, $F0, $90, $01, $CA, $20, $A3, $CA, $8E, $07, $20 ; CPU:$EC98 PRG:2C98 D0 90 07 CA CA C9 F0 90 01 CA 20 A3 CA 8E 07 20 + .byte $20, $AE, $CA, $AD, $07, $20, $20, $5F, $CB, $A5, $FC, $C9, $C0, $D0, $D0, $A5 ; CPU:$ECA8 PRG:2CA8 20 AE CA AD 07 20 20 5F CB A5 FC C9 C0 D0 D0 A5 + .byte $FD, $C9, $23, $D0, $CA, $AD, $C7, $01, $C9, $02, $D0, $0F, $A9, $20, $8D, $06 ; CPU:$ECB8 PRG:2CB8 FD C9 23 D0 CA AD C7 01 C9 02 D0 0F A9 20 8D 06 + .byte $20, $A9, $82, $8D, $06, $20, $A9, $43, $8D, $07, $20, $A2, $08, $A9, $00, $9D ; CPU:$ECC8 PRG:2CC8 20 A9 82 8D 06 20 A9 43 8D 07 20 A2 08 A9 00 9D + .byte $FF, $02, $CA, $D0, $F8, $A9, $00, $8D, $8F, $01, $20, $36, $D5, $A0, $00, $20 ; CPU:$ECD8 PRG:2CD8 FF 02 CA D0 F8 A9 00 8D 8F 01 20 36 D5 A0 00 20 + .byte $14, $CE, $99, $90, $01, $F0, $03, $EE, $8F, $01, $A2, $FE, $20, $61, $CB, $C8 ; CPU:$ECE8 PRG:2CE8 14 CE 99 90 01 F0 03 EE 8F 01 A2 FE 20 61 CB C8 + .byte $20, $14, $CE, $99, $90, $01, $20, $61, $CB, $C8, $C0, $10, $D0, $E1, $CE, $8F ; CPU:$ECF8 PRG:2CF8 20 14 CE 99 90 01 20 61 CB C8 C0 10 D0 E1 CE 8F + .byte $01, $20, $42, $CA, $AD, $C7, $01, $C9, $01, $90, $03, $20, $E5, $E1, $20, $7D ; CPU:$ED08 PRG:2D08 01 20 42 CA AD C7 01 C9 01 90 03 20 E5 E1 20 7D + .byte $FA, $A9, $01, $8D, $CB, $01, $A9, $0D, $20, $DA, $C3, $A2, $02, $20, $74, $F6 ; CPU:$ED18 PRG:2D18 FA A9 01 8D CB 01 A9 0D 20 DA C3 A2 02 20 74 F6 + .byte $A2, $0A, $20, $56, $FF, $A9, $0C, $20, $DA, $C3, $AD, $C7, $01, $C9, $01, $90 ; CPU:$ED28 PRG:2D28 A2 0A 20 56 FF A9 0C 20 DA C3 AD C7 01 C9 01 90 + .byte $16, $20, $7A, $F7, $4C, $4F, $ED, $FF, $30, $10, $11, $FF, $30, $18, $19, $FF ; CPU:$ED38 PRG:2D38 16 20 7A F7 4C 4F ED FF 30 10 11 FF 30 18 19 FF + .byte $30, $14, $15, $FF, $30, $16, $17 ; CPU:$ED48 PRG:2D48 30 14 15 FF 30 16 17 +; ----------------------------------------------------------------------------- +; Routine: Label_ED4F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_ED4F: + lda #$00 ; CPU:$ED4F PRG:2D4F A9 00 + sta Zp01 ; CPU:$ED51 PRG:2D51 85 01 + lda $018F ; CPU:$ED53 PRG:2D53 AD 8F 01 + sta $018E ; CPU:$ED56 PRG:2D56 8D 8E 01 + ldy #$00 ; CPU:$ED59 PRG:2D59 A0 00 + ldx #$00 ; CPU:$ED5B PRG:2D5B A2 00 +; ----------------------------------------------------------------------------- +; Routine: Label_ED5D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_ED5D: + tya ; CPU:$ED5D PRG:2D5D 98 + sta $0310,y ; CPU:$ED5E PRG:2D5E 99 10 03 + lda #$00 ; CPU:$ED61 PRG:2D61 A9 00 + sta $0320,y ; CPU:$ED63 PRG:2D63 99 20 03 + sta $0360,y ; CPU:$ED66 PRG:2D66 99 60 03 + sta $0340,y ; CPU:$ED69 PRG:2D69 99 40 03 + sta $03A0,y ; CPU:$ED6C PRG:2D6C 99 A0 03 + lda #$01 ; CPU:$ED6F PRG:2D6F A9 01 + sta $0350,y ; CPU:$ED71 PRG:2D71 99 50 03 + jsr $F998 ; CPU:$ED74 PRG:2D74 20 98 F9 + lda $0190,x ; CPU:$ED77 PRG:2D77 BD 90 01 + sta $0330,y ; CPU:$ED7A PRG:2D7A 99 30 03 + bne Label_ED86 ; CPU:$ED7D PRG:2D7D D0 07 + lda #$00 ; CPU:$ED7F PRG:2D7F A9 00 + sta $0300,y ; CPU:$ED81 PRG:2D81 99 00 03 + beq Label_ED8B ; CPU:$ED84 PRG:2D84 F0 05 +; ----------------------------------------------------------------------------- +; Routine: Label_ED86 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_ED86: + lda #$A1 ; CPU:$ED86 PRG:2D86 A9 A1 + sta $0300,y ; CPU:$ED88 PRG:2D88 99 00 03 +; ----------------------------------------------------------------------------- +; Routine: Label_ED8B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_ED8B: + inx ; CPU:$ED8B PRG:2D8B E8 + lda $0190,x ; CPU:$ED8C PRG:2D8C BD 90 01 + sta $0370,y ; CPU:$ED8F PRG:2D8F 99 70 03 + inx ; CPU:$ED92 PRG:2D92 E8 + iny ; CPU:$ED93 PRG:2D93 C8 + cpy #$08 ; CPU:$ED94 PRG:2D94 C0 08 + bne Label_ED5D ; CPU:$ED96 PRG:2D96 D0 C5 + lda #$18 ; CPU:$ED98 PRG:2D98 A9 18 + sta Zp00 ; CPU:$ED9A PRG:2D9A 85 00 + lda $01C2 ; CPU:$ED9C PRG:2D9C AD C2 01 + sta $03A0 ; CPU:$ED9F PRG:2D9F 8D A0 03 + lda $01C9 ; CPU:$EDA2 PRG:2DA2 AD C9 01 + sta $03B0 ; CPU:$EDA5 PRG:2DA5 8D B0 03 + lda $01CB ; CPU:$EDA8 PRG:2DA8 AD CB 01 + beq Label_EDB7 ; CPU:$EDAB PRG:2DAB F0 0A + lda #$01 ; CPU:$EDAD PRG:2DAD A9 01 + jsr $C3DA ; CPU:$EDAF PRG:2DAF 20 DA C3 + ldx #$02 ; CPU:$EDB2 PRG:2DB2 A2 02 + jsr $FF56 ; CPU:$EDB4 PRG:2DB4 20 56 FF +; ----------------------------------------------------------------------------- +; Routine: Label_EDB7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EDB7: + jsr $E31D ; CPU:$EDB7 PRG:2DB7 20 1D E3 +; ----------------------------------------------------------------------------- +; Routine: Label_EDBA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EDBA: + jsr $CDB9 ; CPU:$EDBA PRG:2DBA 20 B9 CD + jsr $CD0E ; CPU:$EDBD PRG:2DBD 20 0E CD + lda $01C8 ; CPU:$EDC0 PRG:2DC0 AD C8 01 + beq Label_EDBA ; CPU:$EDC3 PRG:2DC3 F0 F5 + lda #$00 ; CPU:$EDC5 PRG:2DC5 A9 00 + sta $01C8 ; CPU:$EDC7 PRG:2DC7 8D C8 01 + inc $01C1 ; CPU:$EDCA PRG:2DCA EE C1 01 + lda $01C1 ; CPU:$EDCD PRG:2DCD AD C1 01 + lsr a ; CPU:$EDD0 PRG:2DD0 4A + lsr a ; CPU:$EDD1 PRG:2DD1 4A + and #$07 ; CPU:$EDD2 PRG:2DD2 29 07 + tax ; CPU:$EDD4 PRG:2DD4 AA + lda $F762,x ; CPU:$EDD5 PRG:2DD5 BD 62 F7 + sta Zp92 ; CPU:$EDD8 PRG:2DD8 85 92 + lda $F76A,x ; CPU:$EDDA PRG:2DDA BD 6A F7 + sta Zp8F ; CPU:$EDDD PRG:2DDD 85 8F + lda $F772,x ; CPU:$EDDF PRG:2DDF BD 72 F7 + sta Zp8B ; CPU:$EDE2 PRG:2DE2 85 8B + lda Zp00 ; CPU:$EDE4 PRG:2DE4 A5 00 + and #$08 ; CPU:$EDE6 PRG:2DE6 29 08 + beq Label_EE30 ; CPU:$EDE8 PRG:2DE8 F0 46 + jsr $E01E ; CPU:$EDEA PRG:2DEA 20 1E E0 + jsr $E34A ; CPU:$EDED PRG:2DED 20 4A E3 + and #$03 ; CPU:$EDF0 PRG:2DF0 29 03 + beq Label_EE2C ; CPU:$EDF2 PRG:2DF2 F0 38 + lda Zp00 ; CPU:$EDF4 PRG:2DF4 A5 00 + and #$10 ; CPU:$EDF6 PRG:2DF6 29 10 + bne Label_EE30 ; CPU:$EDF8 PRG:2DF8 D0 36 + lda $03A0 ; CPU:$EDFA PRG:2DFA AD A0 03 + and #$F0 ; CPU:$EDFD PRG:2DFD 29 F0 + beq Label_EE30 ; CPU:$EDFF PRG:2DFF F0 2F + lda #$00 ; CPU:$EE01 PRG:2E01 A9 00 + sta $01CB ; CPU:$EE03 PRG:2E03 8D CB 01 + lda #$A1 ; CPU:$EE06 PRG:2E06 A9 A1 + sta $0300 ; CPU:$EE08 PRG:2E08 8D 00 03 + lda $03B0 ; CPU:$EE0B PRG:2E0B AD B0 03 + sta $01C9 ; CPU:$EE0E PRG:2E0E 8D C9 01 + lda $03A0 ; CPU:$EE11 PRG:2E11 AD A0 03 + sta $01C2 ; CPU:$EE14 PRG:2E14 8D C2 01 + and #$F0 ; CPU:$EE17 PRG:2E17 29 F0 + sec ; CPU:$EE19 PRG:2E19 38 + sbc #$10 ; CPU:$EE1A PRG:2E1A E9 10 + ora #$1F ; CPU:$EE1C PRG:2E1C 09 1F + sta $03A0 ; CPU:$EE1E PRG:2E1E 8D A0 03 + lda #$02 ; CPU:$EE21 PRG:2E21 A9 02 + jsr $C3DA ; CPU:$EE23 PRG:2E23 20 DA C3 + lda #$07 ; CPU:$EE26 PRG:2E26 A9 07 + sta Zp00 ; CPU:$EE28 PRG:2E28 85 00 + bne Label_EE30 ; CPU:$EE2A PRG:2E2A D0 04 +; ----------------------------------------------------------------------------- +; Routine: Label_EE2C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EE2C: + lda #$08 ; CPU:$EE2C PRG:2E2C A9 08 + sta Zp00 ; CPU:$EE2E PRG:2E2E 85 00 +; ----------------------------------------------------------------------------- +; Routine: Label_EE30 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EE30: + lda #$02 ; CPU:$EE30 PRG:2E30 A9 02 + sta Zp06 ; CPU:$EE32 PRG:2E32 85 06 + lda Zp01 ; CPU:$EE34 PRG:2E34 A5 01 + and #$90 ; CPU:$EE36 PRG:2E36 29 90 + sta Zp01 ; CPU:$EE38 PRG:2E38 85 01 +; ----------------------------------------------------------------------------- +; Routine: Label_EE3A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EE3A: + lda #$02 ; CPU:$EE3A PRG:2E3A A9 02 + sta Zp05 ; CPU:$EE3C PRG:2E3C 85 05 +; ----------------------------------------------------------------------------- +; Routine: Label_EE3E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EE3E: + lda Zp01 ; CPU:$EE3E PRG:2E3E A5 01 + and #$F7 ; CPU:$EE40 PRG:2E40 29 F7 + sta Zp01 ; CPU:$EE42 PRG:2E42 85 01 + tax ; CPU:$EE44 PRG:2E44 AA + lda Zp02 ; CPU:$EE45 PRG:2E45 A5 02 + clc ; CPU:$EE47 PRG:2E47 18 + adc Zp03 ; CPU:$EE48 PRG:2E48 65 03 + sta Zp03 ; CPU:$EE4A PRG:2E4A 85 03 + bcc Label_EE53 ; CPU:$EE4C PRG:2E4C 90 05 + txa ; CPU:$EE4E PRG:2E4E 8A + ora #$08 ; CPU:$EE4F PRG:2E4F 09 08 + sta Zp01 ; CPU:$EE51 PRG:2E51 85 01 +; ----------------------------------------------------------------------------- +; Routine: Label_EE53 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EE53: + ldy #$00 ; CPU:$EE53 PRG:2E53 A0 00 + sty Zp07 ; CPU:$EE55 PRG:2E55 84 07 +; ----------------------------------------------------------------------------- +; Routine: Label_EE57 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EE57: + ldy Zp07 ; CPU:$EE57 PRG:2E57 A4 07 + lda $0300,y ; CPU:$EE59 PRG:2E59 B9 00 03 + tax ; CPU:$EE5C PRG:2E5C AA + and #$40 ; CPU:$EE5D PRG:2E5D 29 40 + bne Label_EE6F ; CPU:$EE5F PRG:2E5F D0 0E + txa ; CPU:$EE61 PRG:2E61 8A + and #$1F ; CPU:$EE62 PRG:2E62 29 1F + cmp #$01 ; CPU:$EE64 PRG:2E64 C9 01 + beq Label_EE79 ; CPU:$EE66 PRG:2E66 F0 11 + cmp #$02 ; CPU:$EE68 PRG:2E68 C9 02 + bne Label_EE6F ; CPU:$EE6A PRG:2E6A D0 03 + jmp $EF31 ; CPU:$EE6C PRG:2E6C 4C 31 EF +; ----------------------------------------------------------------------------- +; Routine: Label_EE6F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EE6F: + cmp #$03 ; CPU:$EE6F PRG:2E6F C9 03 + bne Label_EE76 ; CPU:$EE71 PRG:2E71 D0 03 + jmp $EEF0 ; CPU:$EE73 PRG:2E73 4C F0 EE +; ----------------------------------------------------------------------------- +; Routine: Label_EE76 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EE76: + jmp $F206 ; CPU:$EE76 PRG:2E76 4C 06 F2 +; ----------------------------------------------------------------------------- +; Routine: Label_EE79 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EE79: + lda $01CB ; CPU:$EE79 PRG:2E79 AD CB 01 + beq Label_EE80 ; CPU:$EE7C PRG:2E7C F0 02 + bne Label_EEB9 ; CPU:$EE7E PRG:2E7E D0 39 +; ----------------------------------------------------------------------------- +; Routine: Label_EE80 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EE80: + lda $03C0,y ; CPU:$EE80 PRG:2E80 B9 C0 03 + jsr $FF0E ; CPU:$EE83 PRG:2E83 20 0E FF + lda ZpFC ; CPU:$EE86 PRG:2E86 A5 FC + sta $0380,y ; CPU:$EE88 PRG:2E88 99 80 03 + lda ZpFD ; CPU:$EE8B PRG:2E8B A5 FD + sta $0390,y ; CPU:$EE8D PRG:2E8D 99 90 03 + lda $03C0,y ; CPU:$EE90 PRG:2E90 B9 C0 03 + jsr $FEA8 ; CPU:$EE93 PRG:2E93 20 A8 FE + lda ZpFC ; CPU:$EE96 PRG:2E96 A5 FC + sta $0340,y ; CPU:$EE98 PRG:2E98 99 40 03 + lda ZpFD ; CPU:$EE9B PRG:2E9B A5 FD + sta $0350,y ; CPU:$EE9D PRG:2E9D 99 50 03 + lda #$02 ; CPU:$EEA0 PRG:2EA0 A9 02 + sta $03F0,y ; CPU:$EEA2 PRG:2EA2 99 F0 03 + lda #$FF ; CPU:$EEA5 PRG:2EA5 A9 FF + sta $03D0,y ; CPU:$EEA7 PRG:2EA7 99 D0 03 + lda $0300,y ; CPU:$EEAA PRG:2EAA B9 00 03 + clc ; CPU:$EEAD PRG:2EAD 18 + adc #$01 ; CPU:$EEAE PRG:2EAE 69 01 + sta $0300,y ; CPU:$EEB0 PRG:2EB0 99 00 03 + jsr $F990 ; CPU:$EEB3 PRG:2EB3 20 90 F9 + jmp $EF31 ; CPU:$EEB6 PRG:2EB6 4C 31 EF +; ----------------------------------------------------------------------------- +; Routine: Label_EEB9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EEB9: + lda $0340,y ; CPU:$EEB9 PRG:2EB9 B9 40 03 + cmp #$07 ; CPU:$EEBC PRG:2EBC C9 07 + beq Label_EEE6 ; CPU:$EEBE PRG:2EBE F0 26 + tax ; CPU:$EEC0 PRG:2EC0 AA + lda $EEE9,x ; CPU:$EEC1 PRG:2EC1 BD E9 EE + sta $0410,y ; CPU:$EEC4 PRG:2EC4 99 10 04 + ldx Zp07 ; CPU:$EEC7 PRG:2EC7 A6 07 + dec $0350,x ; CPU:$EEC9 PRG:2EC9 DE 50 03 + bne Label_EEE0 ; CPU:$EECC PRG:2ECC D0 12 + lda #$06 ; CPU:$EECE PRG:2ECE A9 06 + sta $0350,x ; CPU:$EED0 PRG:2ED0 9D 50 03 + inc $0340,x ; CPU:$EED3 PRG:2ED3 FE 40 03 + lda $0340,x ; CPU:$EED6 PRG:2ED6 BD 40 03 + cmp #$07 ; CPU:$EED9 PRG:2ED9 C9 07 + bne Label_EEE0 ; CPU:$EEDB PRG:2EDB D0 03 + jsr $F990 ; CPU:$EEDD PRG:2EDD 20 90 F9 +; ----------------------------------------------------------------------------- +; Routine: Label_EEE0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EEE0: + lda Zp01 ; CPU:$EEE0 PRG:2EE0 A5 01 + ora #$40 ; CPU:$EEE2 PRG:2EE2 09 40 + sta Zp01 ; CPU:$EEE4 PRG:2EE4 85 01 +; ----------------------------------------------------------------------------- +; Routine: Label_EEE6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EEE6: + jmp $F206 ; CPU:$EEE6 PRG:2EE6 4C 06 F2 +; ---- data $EEE9-$EEEF (7 bytes) ---- +; referenced by `lda $EEE9,x` at $EEC1 (operand $EEE9 falls inside this region) + .byte $40, $40, $44, $48, $4C, $50, $54 ; CPU:$EEE9 PRG:2EE9 40 40 44 48 4C 50 54 +; ----------------------------------------------------------------------------- +; Routine: Label_EEF0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EEF0: + lda $0340,y ; CPU:$EEF0 PRG:2EF0 B9 40 03 + cmp #$07 ; CPU:$EEF3 PRG:2EF3 C9 07 + beq Label_EF27 ; CPU:$EEF5 PRG:2EF5 F0 30 + tax ; CPU:$EEF7 PRG:2EF7 AA + lda $EF2A,x ; CPU:$EEF8 PRG:2EF8 BD 2A EF + sta $0410,y ; CPU:$EEFB PRG:2EFB 99 10 04 + lda Zp01 ; CPU:$EEFE PRG:2EFE A5 01 + ora #$20 ; CPU:$EF00 PRG:2F00 09 20 + sta Zp01 ; CPU:$EF02 PRG:2F02 85 01 + ldx Zp07 ; CPU:$EF04 PRG:2F04 A6 07 + dec $0350,x ; CPU:$EF06 PRG:2F06 DE 50 03 + bne Label_EF27 ; CPU:$EF09 PRG:2F09 D0 1C + lda #$06 ; CPU:$EF0B PRG:2F0B A9 06 + sta $0350,x ; CPU:$EF0D PRG:2F0D 9D 50 03 + inc $0340,x ; CPU:$EF10 PRG:2F10 FE 40 03 + lda $0340,x ; CPU:$EF13 PRG:2F13 BD 40 03 + cmp #$07 ; CPU:$EF16 PRG:2F16 C9 07 + bne Label_EF27 ; CPU:$EF18 PRG:2F18 D0 0D + lda #$03 ; CPU:$EF1A PRG:2F1A A9 03 + sta $0300,x ; CPU:$EF1C PRG:2F1C 9D 00 03 + lda $0310,x ; CPU:$EF1F PRG:2F1F BD 10 03 + beq Label_EF27 ; CPU:$EF22 PRG:2F22 F0 03 + dec $018E ; CPU:$EF24 PRG:2F24 CE 8E 01 +; ----------------------------------------------------------------------------- +; Routine: Label_EF27 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EF27: + jmp $F206 ; CPU:$EF27 PRG:2F27 4C 06 F2 +; ---- data $EF2A-$EF30 (7 bytes) ---- +; referenced by `lda $EF2A,x` at $EEF8 (operand $EF2A falls inside this region) + .byte $00, $3C, $38, $34, $30, $2C, $28 ; CPU:$EF2A PRG:2F2A 00 3C 38 34 30 2C 28 +; ----------------------------------------------------------------------------- +; Routine: Label_EF31 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EF31: + lda Zp00 ; CPU:$EF31 PRG:2F31 A5 00 + and #$01 ; CPU:$EF33 PRG:2F33 29 01 + bne Label_EF3A ; CPU:$EF35 PRG:2F35 D0 03 + jmp $F206 ; CPU:$EF37 PRG:2F37 4C 06 F2 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_EF3A: + lda $03A0,y ; CPU:$EF3A PRG:2F3A B9 A0 03 + tax ; CPU:$EF3D PRG:2F3D AA + beq Label_EF50 ; CPU:$EF3E PRG:2F3E F0 10 + lda Zp01 ; CPU:$EF40 PRG:2F40 A5 01 + ora #$02 ; CPU:$EF42 PRG:2F42 09 02 + sta Zp01 ; CPU:$EF44 PRG:2F44 85 01 + txa ; CPU:$EF46 PRG:2F46 8A + clc ; CPU:$EF47 PRG:2F47 18 + adc $03B0,y ; CPU:$EF48 PRG:2F48 79 B0 03 + sta $03B0,y ; CPU:$EF4B PRG:2F4B 99 B0 03 + bcs Label_EF53 ; CPU:$EF4E PRG:2F4E B0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_EF50 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EF50: + jmp $F1F6 ; CPU:$EF50 PRG:2F50 4C F6 F1 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_EF53: + lda $0320,y ; CPU:$EF53 PRG:2F53 B9 20 03 + clc ; CPU:$EF56 PRG:2F56 18 + adc $0340,y ; CPU:$EF57 PRG:2F57 79 40 03 + sta Zp1C ; CPU:$EF5A PRG:2F5A 85 1C + lda $0330,y ; CPU:$EF5C PRG:2F5C B9 30 03 + adc $0350,y ; CPU:$EF5F PRG:2F5F 79 50 03 + sta Zp1D ; CPU:$EF62 PRG:2F62 85 1D + tax ; CPU:$EF64 PRG:2F64 AA + lda $0360,y ; CPU:$EF65 PRG:2F65 B9 60 03 + clc ; CPU:$EF68 PRG:2F68 18 + adc $0380,y ; CPU:$EF69 PRG:2F69 79 80 03 + sta Zp1E ; CPU:$EF6C PRG:2F6C 85 1E + lda $0370,y ; CPU:$EF6E PRG:2F6E B9 70 03 + adc $0390,y ; CPU:$EF71 PRG:2F71 79 90 03 + sta Zp1F ; CPU:$EF74 PRG:2F74 85 1F + cmp $0370,y ; CPU:$EF76 PRG:2F76 D9 70 03 + bne Label_EF84 ; CPU:$EF79 PRG:2F79 D0 09 + txa ; CPU:$EF7B PRG:2F7B 8A + cmp $0330,y ; CPU:$EF7C PRG:2F7C D9 30 03 + bne Label_EF84 ; CPU:$EF7F PRG:2F7F D0 03 + jmp $F1E2 ; CPU:$EF81 PRG:2F81 4C E2 F1 +; ----------------------------------------------------------------------------- +; Routine: Label_EF84 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EF84: + lda Zp1F ; CPU:$EF84 PRG:2F84 A5 1F + lsr a ; CPU:$EF86 PRG:2F86 4A + lsr a ; CPU:$EF87 PRG:2F87 4A + lsr a ; CPU:$EF88 PRG:2F88 4A + tax ; CPU:$EF89 PRG:2F89 AA + lda Zp1D ; CPU:$EF8A PRG:2F8A A5 1D + lsr a ; CPU:$EF8C PRG:2F8C 4A + lsr a ; CPU:$EF8D PRG:2F8D 4A + lsr a ; CPU:$EF8E PRG:2F8E 4A + sta ZpFC ; CPU:$EF8F PRG:2F8F 85 FC + cmp $03D0,y ; CPU:$EF91 PRG:2F91 D9 D0 03 + bne Label_EFB8 ; CPU:$EF94 PRG:2F94 D0 22 + txa ; CPU:$EF96 PRG:2F96 8A + cmp $03E0,y ; CPU:$EF97 PRG:2F97 D9 E0 03 + bne Label_EFB8 ; CPU:$EF9A PRG:2F9A D0 1C + lda $03F0,y ; CPU:$EF9C PRG:2F9C B9 F0 03 + sta Zp26 ; CPU:$EF9F PRG:2F9F 85 26 + cmp #$02 ; CPU:$EFA1 PRG:2FA1 C9 02 + beq Label_EFB8 ; CPU:$EFA3 PRG:2FA3 F0 13 + lda $03D0,y ; CPU:$EFA5 PRG:2FA5 B9 D0 03 + sta Zp24 ; CPU:$EFA8 PRG:2FA8 85 24 + lda $03E0,y ; CPU:$EFAA PRG:2FAA B9 E0 03 + sta Zp25 ; CPU:$EFAD PRG:2FAD 85 25 + ldy Zp07 ; CPU:$EFAF PRG:2FAF A4 07 + jmp $EFD9 ; CPU:$EFB1 PRG:2FB1 4C D9 EF +; ----------------------------------------------------------------------------- +; Routine: Label_EFB4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EFB4: + lda #$10 ; CPU:$EFB4 PRG:2FB4 A9 10 + bne Label_EFD5 ; CPU:$EFB6 PRG:2FB6 D0 1D +; ----------------------------------------------------------------------------- +; Routine: Label_EFB8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EFB8: + ldy ZpFC ; CPU:$EFB8 PRG:2FB8 A4 FC + sty Zp24 ; CPU:$EFBA PRG:2FBA 84 24 + stx Zp25 ; CPU:$EFBC PRG:2FBC 86 25 + cpx #$03 ; CPU:$EFBE PRG:2FBE E0 03 + bcc Label_EFB4 ; CPU:$EFC0 PRG:2FC0 90 F2 + cpx #$1D ; CPU:$EFC2 PRG:2FC2 E0 1D + bcs Label_EFB4 ; CPU:$EFC4 PRG:2FC4 B0 EE + cpy #$08 ; CPU:$EFC6 PRG:2FC6 C0 08 + bcc Label_EFB4 ; CPU:$EFC8 PRG:2FC8 90 EA + cpy #$1B ; CPU:$EFCA PRG:2FCA C0 1B + bcs Label_EFB4 ; CPU:$EFCC PRG:2FCC B0 E6 + jsr $FAF9 ; CPU:$EFCE PRG:2FCE 20 F9 FA + ldx #$00 ; CPU:$EFD1 PRG:2FD1 A2 00 + lda (ZpFC,x) ; CPU:$EFD3 PRG:2FD3 A1 FC +; ----------------------------------------------------------------------------- +; Routine: Label_EFD5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EFD5: + sta Zp26 ; CPU:$EFD5 PRG:2FD5 85 26 + ldy Zp07 ; CPU:$EFD7 PRG:2FD7 A4 07 +; ----------------------------------------------------------------------------- +; Routine: Label_EFD9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EFD9: + lda Zp1F ; CPU:$EFD9 PRG:2FD9 A5 1F + and #$07 ; CPU:$EFDB PRG:2FDB 29 07 + sta ZpF9 ; CPU:$EFDD PRG:2FDD 85 F9 + lda Zp1D ; CPU:$EFDF PRG:2FDF A5 1D + and #$07 ; CPU:$EFE1 PRG:2FE1 29 07 + sta ZpF8 ; CPU:$EFE3 PRG:2FE3 85 F8 + lda Zp26 ; CPU:$EFE5 PRG:2FE5 A5 26 + tax ; CPU:$EFE7 PRG:2FE7 AA + and #$10 ; CPU:$EFE8 PRG:2FE8 29 10 + beq Label_F045 ; CPU:$EFEA PRG:2FEA F0 59 + lda Zp00 ; CPU:$EFEC PRG:2FEC A5 00 + and #$04 ; CPU:$EFEE PRG:2FEE 29 04 + bne Label_EFF5 ; CPU:$EFF0 PRG:2FF0 D0 03 + jmp $F045 ; CPU:$EFF2 PRG:2FF2 4C 45 F0 +; ----------------------------------------------------------------------------- +; Routine: Label_EFF5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EFF5: + lda #$83 ; CPU:$EFF5 PRG:2FF5 A9 83 + sta $0300,y ; CPU:$EFF7 PRG:2FF7 99 00 03 + lda #$00 ; CPU:$EFFA PRG:2FFA A9 00 + sta $0340,y ; CPU:$EFFC PRG:2FFC 99 40 03 + lda #$01 ; CPU:$EFFF PRG:2FFF A9 01 + sta $0350,y ; CPU:$F001 PRG:3001 99 50 03 + lda $0310,y ; CPU:$F004 PRG:3004 B9 10 03 + bne Label_F037 ; CPU:$F007 PRG:3007 D0 2E + lda Zp01 ; CPU:$F009 PRG:3009 A5 01 + ora #$30 ; CPU:$F00B PRG:300B 09 30 + sta Zp01 ; CPU:$F00D PRG:300D 85 01 + lda #$06 ; CPU:$F00F PRG:300F A9 06 + jsr $C3DA ; CPU:$F011 PRG:3011 20 DA C3 + jmp $F1F6 ; CPU:$F014 PRG:3014 4C F6 F1 +; ----------------------------------------------------------------------------- +; Routine: Label_F017 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F017: + ldy #$00 ; CPU:$F017 PRG:3017 A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_F019 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F019: + lda $0300,y ; CPU:$F019 PRG:3019 B9 00 03 + and #$C2 ; CPU:$F01C PRG:301C 29 C2 + cmp #$82 ; CPU:$F01E PRG:301E C9 82 + bne Label_F031 ; CPU:$F020 PRG:3020 D0 0F + lda #$83 ; CPU:$F022 PRG:3022 A9 83 + sta $0300,y ; CPU:$F024 PRG:3024 99 00 03 + lda #$00 ; CPU:$F027 PRG:3027 A9 00 + sta $0340,y ; CPU:$F029 PRG:3029 99 40 03 + lda #$01 ; CPU:$F02C PRG:302C A9 01 + sta $0350,y ; CPU:$F02E PRG:302E 99 50 03 +; ----------------------------------------------------------------------------- +; Routine: Label_F031 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F031: + iny ; CPU:$F031 PRG:3031 C8 + cpy Zp08 ; CPU:$F032 PRG:3032 C4 08 + bne Label_F019 ; CPU:$F034 PRG:3034 D0 E3 + rts ; CPU:$F036 PRG:3036 60 +; ----------------------------------------------------------------------------- +; Routine: Label_F037 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F037: + lda Zp01 ; CPU:$F037 PRG:3037 A5 01 + ora #$20 ; CPU:$F039 PRG:3039 09 20 + sta Zp01 ; CPU:$F03B PRG:303B 85 01 + lda #$07 ; CPU:$F03D PRG:303D A9 07 + jsr $C3DA ; CPU:$F03F PRG:303F 20 DA C3 + jmp $F1F6 ; CPU:$F042 PRG:3042 4C F6 F1 +; ----------------------------------------------------------------------------- +; Routine: Label_F045 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F045: + txa ; CPU:$F045 PRG:3045 8A + and #$0F ; CPU:$F046 PRG:3046 29 0F + bne Label_F04D ; CPU:$F048 PRG:3048 D0 03 + jmp $F1D3 ; CPU:$F04A PRG:304A 4C D3 F1 +; ----------------------------------------------------------------------------- +; Routine: Label_F04D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F04D: + lda $0380,y ; CPU:$F04D PRG:304D B9 80 03 + sta ZpFA ; CPU:$F050 PRG:3050 85 FA + lda $0390,y ; CPU:$F052 PRG:3052 B9 90 03 + sta ZpFB ; CPU:$F055 PRG:3055 85 FB + lda $0340,y ; CPU:$F057 PRG:3057 B9 40 03 + sta ZpFC ; CPU:$F05A PRG:305A 85 FC + lda $0350,y ; CPU:$F05C PRG:305C B9 50 03 + sta ZpFD ; CPU:$F05F PRG:305F 85 FD + lda Zp26 ; CPU:$F061 PRG:3061 A5 26 + and #$C0 ; CPU:$F063 PRG:3063 29 C0 + beq Label_F07E ; CPU:$F065 PRG:3065 F0 17 + cmp #$40 ; CPU:$F067 PRG:3067 C9 40 + bne Label_F071 ; CPU:$F069 PRG:3069 D0 06 + jsr $FF18 ; CPU:$F06B PRG:306B 20 18 FF + jmp $F07E ; CPU:$F06E PRG:306E 4C 7E F0 +; ----------------------------------------------------------------------------- +; Routine: Label_F071 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F071: + cmp #$80 ; CPU:$F071 PRG:3071 C9 80 + bne Label_F07B ; CPU:$F073 PRG:3073 D0 06 + jsr $FF2B ; CPU:$F075 PRG:3075 20 2B FF + jmp $F07E ; CPU:$F078 PRG:3078 4C 7E F0 +; ----------------------------------------------------------------------------- +; Routine: Label_F07B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F07B: + jsr $FF43 ; CPU:$F07B PRG:307B 20 43 FF +; ----------------------------------------------------------------------------- +; Routine: Label_F07E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F07E: + lda #$D2 ; CPU:$F07E PRG:307E A9 D2 + sta Zp16 ; CPU:$F080 PRG:3080 85 16 + lda #$F1 ; CPU:$F082 PRG:3082 A9 F1 + sta Zp17 ; CPU:$F084 PRG:3084 85 17 + lda Zp26 ; CPU:$F086 PRG:3086 A5 26 + and #$0F ; CPU:$F088 PRG:3088 29 0F + sec ; CPU:$F08A PRG:308A 38 + sbc #$05 ; CPU:$F08B PRG:308B E9 05 + asl a ; CPU:$F08D PRG:308D 0A + tax ; CPU:$F08E PRG:308E AA + lda $F099,x ; CPU:$F08F PRG:308F BD 99 F0 + pha ; CPU:$F092 PRG:3092 48 + lda $F098,x ; CPU:$F093 PRG:3093 BD 98 F0 + pha ; CPU:$F096 PRG:3096 48 + rts ; CPU:$F097 PRG:3097 60 +; ---- data $F098-$F0CD (54 bytes) ---- +; referenced by `lda $F099,x` at $F08F (operand $F099 falls inside this region) +; referenced by `lda $F098,x` at $F093 (operand $F098 falls inside this region) + .byte $CF, $F0, $AD, $F0, $AD, $F0, $DE, $F0, $F1, $F0, $54, $F1, $5A, $F1, $60, $F1 ; CPU:$F098 PRG:3098 CF F0 AD F0 AD F0 DE F0 F1 F0 54 F1 5A F1 60 F1 + .byte $80, $F1, $86, $F1, $8C, $F1, $B9, $F0, $03, $29, $0F, $C9, $02, $F0, $0B, $C9 ; CPU:$F0A8 PRG:30A8 80 F1 86 F1 8C F1 B9 F0 03 29 0F C9 02 F0 0B C9 + .byte $08, $B0, $0C, $C9, $06, $90, $08, $4C, $D3, $F1, $A5, $26, $99, $F0, $03, $20 ; CPU:$F0B8 PRG:30B8 08 B0 0C C9 06 90 08 4C D3 F1 A5 26 99 F0 03 20 + .byte $24, $FE, $20, $37, $FE, $4C ; CPU:$F0C8 PRG:30C8 24 FE 20 37 FE 4C +; ----------------------------------------------------------------------------- +; Routine: Label_F0CE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F0CE: + txs ; CPU:$F0CE PRG:30CE 9A + sbc (ZpA5),y ; CPU:$F0CF PRG:30CF F1 A5 + sed ; CPU:$F0D1 PRG:30D1 F8 + clc ; CPU:$F0D2 PRG:30D2 18 + adc ZpF9 ; CPU:$F0D3 PRG:30D3 65 F9 + cmp #$0C ; CPU:$F0D5 PRG:30D5 C9 0C + bcc Label_F0DC ; CPU:$F0D7 PRG:30D7 90 03 + jmp $F1D3 ; CPU:$F0D9 PRG:30D9 4C D3 F1 +; ----------------------------------------------------------------------------- +; Routine: Label_F0DC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F0DC: + jmp $F16A ; CPU:$F0DC PRG:30DC 4C 6A F1 +; ----------------------------------------------------------------------------- +; Routine: Label_F0DF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F0DF: + lda ZpF9 ; CPU:$F0DF PRG:30DF A5 F9 + cmp #$06 ; CPU:$F0E1 PRG:30E1 C9 06 + bcs Label_F0EF ; CPU:$F0E3 PRG:30E3 B0 0A + lda ZpFB ; CPU:$F0E5 PRG:30E5 A5 FB + bpl Label_F0EF ; CPU:$F0E7 PRG:30E7 10 06 + jsr $FE37 ; CPU:$F0E9 PRG:30E9 20 37 FE + jmp $F19A ; CPU:$F0EC PRG:30EC 4C 9A F1 +; ----------------------------------------------------------------------------- +; Routine: Label_F0EF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F0EF: + jmp $F193 ; CPU:$F0EF PRG:30EF 4C 93 F1 + lda ZpF8 ; CPU:$F0F2 PRG:30F2 A5 F8 + cmp #$06 ; CPU:$F0F4 PRG:30F4 C9 06 + bcs Label_F0DF ; CPU:$F0F6 PRG:30F6 B0 E7 + lda ZpFD ; CPU:$F0F8 PRG:30F8 A5 FD + bpl Label_F0DF ; CPU:$F0FA PRG:30FA 10 E3 + jsr $F149 ; CPU:$F0FC PRG:30FC 20 49 F1 + jmp $F0DF ; CPU:$F0FF PRG:30FF 4C DF F0 +; ---- data $F102-$F124 (35 bytes) ---- + .byte $A5, $F9, $18, $69, $08, $38, $E5, $F8, $C9, $0B, $90, $16, $A5, $FC, $38, $E5 ; CPU:$F102 PRG:3102 A5 F9 18 69 08 38 E5 F8 C9 0B 90 16 A5 FC 38 E5 + .byte $FA, $A5, $FD, $E5, $FB, $10, $0B, $20, $92, $CB, $A9, $F1, $85, $17, $A9, $99 ; CPU:$F112 PRG:3112 FA A5 FD E5 FB 10 0B 20 92 CB A9 F1 85 17 A9 99 + .byte $85, $16, $60 ; CPU:$F122 PRG:3122 85 16 60 +; ----------------------------------------------------------------------------- +; Routine: Label_F125 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F125: + lda ZpF9 ; CPU:$F125 PRG:3125 A5 F9 + clc ; CPU:$F127 PRG:3127 18 + adc ZpF8 ; CPU:$F128 PRG:3128 65 F8 + cmp #$0A ; CPU:$F12A PRG:312A C9 0A + bcc Label_F148 ; CPU:$F12C PRG:312C 90 1A + lda ZpFC ; CPU:$F12E PRG:312E A5 FC + clc ; CPU:$F130 PRG:3130 18 + adc ZpFA ; CPU:$F131 PRG:3131 65 FA + tax ; CPU:$F133 PRG:3133 AA + lda ZpFD ; CPU:$F134 PRG:3134 A5 FD + adc ZpFB ; CPU:$F136 PRG:3136 65 FB + bmi Label_F148 ; CPU:$F138 PRG:3138 30 0E + bne Label_F13F ; CPU:$F13A PRG:313A D0 03 + txa ; CPU:$F13C PRG:313C 8A + beq Label_F148 ; CPU:$F13D PRG:313D F0 09 +; ----------------------------------------------------------------------------- +; Routine: Label_F13F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F13F: + jsr $F149 ; CPU:$F13F PRG:313F 20 49 F1 + jsr $CB92 ; CPU:$F142 PRG:3142 20 92 CB + jsr $FE24 ; CPU:$F145 PRG:3145 20 24 FE +; ----------------------------------------------------------------------------- +; Routine: Label_F148 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F148: + rts ; CPU:$F148 PRG:3148 60 +; ----------------------------------------------------------------------------- +; Routine: Label_F149 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F149: + jsr $FE24 ; CPU:$F149 PRG:3149 20 24 FE + lda #$99 ; CPU:$F14C PRG:314C A9 99 + sta Zp16 ; CPU:$F14E PRG:314E 85 16 + lda #$F1 ; CPU:$F150 PRG:3150 A9 F1 + sta Zp17 ; CPU:$F152 PRG:3152 85 17 + rts ; CPU:$F154 PRG:3154 60 +; ---- data $F155-$F169 (21 bytes) ---- + .byte $20, $02, $F1, $4C, $DF, $F0, $20, $25, $F1, $4C, $DF, $F0, $A5, $F9, $18, $65 ; CPU:$F155 PRG:3155 20 02 F1 4C DF F0 20 25 F1 4C DF F0 A5 F9 18 65 + .byte $F8, $C9, $05, $B0, $29 ; CPU:$F165 PRG:3165 F8 C9 05 B0 29 +; ----------------------------------------------------------------------------- +; Routine: Label_F16A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F16A: + lda ZpFC ; CPU:$F16A PRG:316A A5 FC + clc ; CPU:$F16C PRG:316C 18 + adc ZpFA ; CPU:$F16D PRG:316D 65 FA + lda ZpFD ; CPU:$F16F PRG:316F A5 FD + adc ZpFB ; CPU:$F171 PRG:3171 65 FB + bpl Label_F193 ; CPU:$F173 PRG:3173 10 1E + jsr $FE24 ; CPU:$F175 PRG:3175 20 24 FE + jsr $CB92 ; CPU:$F178 PRG:3178 20 92 CB + jsr $FE24 ; CPU:$F17B PRG:317B 20 24 FE + jmp $F19A ; CPU:$F17E PRG:317E 4C 9A F1 +; ---- data $F181-$F192 (18 bytes) ---- + .byte $20, $02, $F1, $4C, $61, $F1, $20, $25, $F1, $4C, $61, $F1, $20, $25, $F1, $4C ; CPU:$F181 PRG:3181 20 02 F1 4C 61 F1 20 25 F1 4C 61 F1 20 25 F1 4C + .byte $81, $F1 ; CPU:$F191 PRG:3191 81 F1 +; ----------------------------------------------------------------------------- +; Routine: Label_F193 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F193: + lda Zp17 ; CPU:$F193 PRG:3193 A5 17 + pha ; CPU:$F195 PRG:3195 48 + lda Zp16 ; CPU:$F196 PRG:3196 A5 16 + pha ; CPU:$F198 PRG:3198 48 + rts ; CPU:$F199 PRG:3199 60 +; ----------------------------------------------------------------------------- +; Routine: Label_F19A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F19A: + lda #$05 ; CPU:$F19A PRG:319A A9 05 + jsr $C3DA ; CPU:$F19C PRG:319C 20 DA C3 + lda Zp26 ; CPU:$F19F PRG:319F A5 26 + and #$C0 ; CPU:$F1A1 PRG:31A1 29 C0 + beq Label_F1BC ; CPU:$F1A3 PRG:31A3 F0 17 + cmp #$40 ; CPU:$F1A5 PRG:31A5 C9 40 + bne Label_F1AF ; CPU:$F1A7 PRG:31A7 D0 06 + jsr $FF50 ; CPU:$F1A9 PRG:31A9 20 50 FF + jmp $F1BC ; CPU:$F1AC PRG:31AC 4C BC F1 +; ----------------------------------------------------------------------------- +; Routine: Label_F1AF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F1AF: + cmp #$80 ; CPU:$F1AF PRG:31AF C9 80 + bne Label_F1B9 ; CPU:$F1B1 PRG:31B1 D0 06 + jsr $FF3D ; CPU:$F1B3 PRG:31B3 20 3D FF + jmp $F1BC ; CPU:$F1B6 PRG:31B6 4C BC F1 +; ----------------------------------------------------------------------------- +; Routine: Label_F1B9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F1B9: + jsr $FF25 ; CPU:$F1B9 PRG:31B9 20 25 FF +; ----------------------------------------------------------------------------- +; Routine: Label_F1BC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F1BC: + lda ZpFA ; CPU:$F1BC PRG:31BC A5 FA + sta $0380,y ; CPU:$F1BE PRG:31BE 99 80 03 + lda ZpFB ; CPU:$F1C1 PRG:31C1 A5 FB + sta $0390,y ; CPU:$F1C3 PRG:31C3 99 90 03 + lda ZpFC ; CPU:$F1C6 PRG:31C6 A5 FC + sta $0340,y ; CPU:$F1C8 PRG:31C8 99 40 03 + lda ZpFD ; CPU:$F1CB PRG:31CB A5 FD + sta $0350,y ; CPU:$F1CD PRG:31CD 99 50 03 + jmp $F1F6 ; CPU:$F1D0 PRG:31D0 4C F6 F1 +; ----------------------------------------------------------------------------- +; Routine: Label_F1D3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F1D3: + lda Zp24 ; CPU:$F1D3 PRG:31D3 A5 24 + sta $03D0,y ; CPU:$F1D5 PRG:31D5 99 D0 03 + lda Zp25 ; CPU:$F1D8 PRG:31D8 A5 25 + sta $03E0,y ; CPU:$F1DA PRG:31DA 99 E0 03 + lda Zp26 ; CPU:$F1DD PRG:31DD A5 26 + sta $03F0,y ; CPU:$F1DF PRG:31DF 99 F0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_F1E2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F1E2: + lda Zp1C ; CPU:$F1E2 PRG:31E2 A5 1C + sta $0320,y ; CPU:$F1E4 PRG:31E4 99 20 03 + lda Zp1D ; CPU:$F1E7 PRG:31E7 A5 1D + sta $0330,y ; CPU:$F1E9 PRG:31E9 99 30 03 + lda Zp1E ; CPU:$F1EC PRG:31EC A5 1E + sta $0360,y ; CPU:$F1EE PRG:31EE 99 60 03 + lda Zp1F ; CPU:$F1F1 PRG:31F1 A5 1F + sta $0370,y ; CPU:$F1F3 PRG:31F3 99 70 03 +; ----------------------------------------------------------------------------- +; Routine: Label_F1F6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F1F6: + lda Zp01 ; CPU:$F1F6 PRG:31F6 A5 01 + and #$08 ; CPU:$F1F8 PRG:31F8 29 08 + beq Label_F206 ; CPU:$F1FA PRG:31FA F0 0A + ldx Zp07 ; CPU:$F1FC PRG:31FC A6 07 + lda $03A0,x ; CPU:$F1FE PRG:31FE BD A0 03 + beq Label_F206 ; CPU:$F201 PRG:3201 F0 03 + dec $03A0,x ; CPU:$F203 PRG:3203 DE A0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_F206 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F206: + inc Zp07 ; CPU:$F206 PRG:3206 E6 07 + lda Zp07 ; CPU:$F208 PRG:3208 A5 07 + cmp #$08 ; CPU:$F20A PRG:320A C9 08 + beq Label_F211 ; CPU:$F20C PRG:320C F0 03 + jmp $EE57 ; CPU:$F20E PRG:320E 4C 57 EE +; ----------------------------------------------------------------------------- +; Routine: Label_F211 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F211: + dec Zp05 ; CPU:$F211 PRG:3211 C6 05 + beq Label_F218 ; CPU:$F213 PRG:3213 F0 03 + jmp $EE3E ; CPU:$F215 PRG:3215 4C 3E EE +; ----------------------------------------------------------------------------- +; Routine: Label_F218 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F218: + lda Zp00 ; CPU:$F218 PRG:3218 A5 00 + and #$01 ; CPU:$F21A PRG:321A 29 01 + bne Label_F221 ; CPU:$F21C PRG:321C D0 03 + jmp $F2EC ; CPU:$F21E PRG:321E 4C EC F2 +; ----------------------------------------------------------------------------- +; Routine: Label_F221 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F221: + lda #$00 ; CPU:$F221 PRG:3221 A9 00 + sta Zp07 ; CPU:$F223 PRG:3223 85 07 +; ----------------------------------------------------------------------------- +; Routine: Label_F225 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F225: + ldy Zp07 ; CPU:$F225 PRG:3225 A4 07 + lda $0300,y ; CPU:$F227 PRG:3227 B9 00 03 + and #$7F ; CPU:$F22A PRG:322A 29 7F + cmp #$22 ; CPU:$F22C PRG:322C C9 22 + beq Label_F233 ; CPU:$F22E PRG:322E F0 03 + jmp $F2DB ; CPU:$F230 PRG:3230 4C DB F2 +; ----------------------------------------------------------------------------- +; Routine: Label_F233 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F233: + ldx Zp07 ; CPU:$F233 PRG:3233 A6 07 + inx ; CPU:$F235 PRG:3235 E8 + stx Zp08 ; CPU:$F236 PRG:3236 86 08 +; ----------------------------------------------------------------------------- +; Routine: Label_F238 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F238: + lda $0300,x ; CPU:$F238 PRG:3238 BD 00 03 + and #$7F ; CPU:$F23B PRG:323B 29 7F + cmp #$22 ; CPU:$F23D PRG:323D C9 22 + beq Label_F244 ; CPU:$F23F PRG:323F F0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_F241 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F241: + jmp $F2CB ; CPU:$F241 PRG:3241 4C CB F2 +; ----------------------------------------------------------------------------- +; Routine: Label_F244 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F244: + lda $03A0,y ; CPU:$F244 PRG:3244 B9 A0 03 + ora $03A0,x ; CPU:$F247 PRG:3247 1D A0 03 + beq Label_F241 ; CPU:$F24A PRG:324A F0 F5 + lda $0330,x ; CPU:$F24C PRG:324C BD 30 03 + sec ; CPU:$F24F PRG:324F 38 + sbc $0330,y ; CPU:$F250 PRG:3250 F9 30 03 + sta Zp28 ; CPU:$F253 PRG:3253 85 28 + bcs Label_F25B ; CPU:$F255 PRG:3255 B0 04 + eor #$FF ; CPU:$F257 PRG:3257 49 FF + adc #$01 ; CPU:$F259 PRG:3259 69 01 +; ----------------------------------------------------------------------------- +; Routine: Label_F25B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F25B: + cmp #$0C ; CPU:$F25B PRG:325B C9 0C + bcs Label_F241 ; CPU:$F25D PRG:325D B0 E2 + sta ZpF8 ; CPU:$F25F PRG:325F 85 F8 + lda $0370,x ; CPU:$F261 PRG:3261 BD 70 03 + sec ; CPU:$F264 PRG:3264 38 + sbc $0370,y ; CPU:$F265 PRG:3265 F9 70 03 + sta Zp29 ; CPU:$F268 PRG:3268 85 29 + bcs Label_F270 ; CPU:$F26A PRG:326A B0 04 + eor #$FF ; CPU:$F26C PRG:326C 49 FF + adc #$01 ; CPU:$F26E PRG:326E 69 01 +; ----------------------------------------------------------------------------- +; Routine: Label_F270 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F270: + cmp #$0C ; CPU:$F270 PRG:3270 C9 0C + bcs Label_F241 ; CPU:$F272 PRG:3272 B0 CD + sta ZpF9 ; CPU:$F274 PRG:3274 85 F9 + jsr $FB99 ; CPU:$F276 PRG:3276 20 99 FB + bcs Label_F241 ; CPU:$F279 PRG:3279 B0 C6 + lda Zp01 ; CPU:$F27B PRG:327B A5 01 + ora #$01 ; CPU:$F27D PRG:327D 09 01 + sta Zp01 ; CPU:$F27F PRG:327F 85 01 + lda Zp00 ; CPU:$F281 PRG:3281 A5 00 + and #$02 ; CPU:$F283 PRG:3283 29 02 + beq Label_F241 ; CPU:$F285 PRG:3285 F0 BA + ldy Zp08 ; CPU:$F287 PRG:3287 A4 08 + sty ZpFE ; CPU:$F289 PRG:3289 84 FE + ldx #$04 ; CPU:$F28B PRG:328B A2 04 + stx ZpFF ; CPU:$F28D PRG:328D 86 FF + jsr $FBC2 ; CPU:$F28F PRG:328F 20 C2 FB + ldy Zp07 ; CPU:$F292 PRG:3292 A4 07 + sty ZpFE ; CPU:$F294 PRG:3294 84 FE + ldx #$00 ; CPU:$F296 PRG:3296 A2 00 + stx ZpFF ; CPU:$F298 PRG:3298 86 FF + jsr $FBC2 ; CPU:$F29A PRG:329A 20 C2 FB + lda Zp16 ; CPU:$F29D PRG:329D A5 16 + sec ; CPU:$F29F PRG:329F 38 + sbc Zp12 ; CPU:$F2A0 PRG:32A0 E5 12 + lda Zp17 ; CPU:$F2A2 PRG:32A2 A5 17 + sbc Zp13 ; CPU:$F2A4 PRG:32A4 E5 13 + bpl Label_F2CB ; CPU:$F2A6 PRG:32A6 10 23 + lda #$04 ; CPU:$F2A8 PRG:32A8 A9 04 + jsr $C3DA ; CPU:$F2AA PRG:32AA 20 DA C3 + lda Zp07 ; CPU:$F2AD PRG:32AD A5 07 + sta Zp05 ; CPU:$F2AF PRG:32AF 85 05 + ldy #$00 ; CPU:$F2B1 PRG:32B1 A0 00 + sty ZpFE ; CPU:$F2B3 PRG:32B3 84 FE + ldx #$04 ; CPU:$F2B5 PRG:32B5 A2 04 + stx ZpFF ; CPU:$F2B7 PRG:32B7 86 FF + jsr $FC6C ; CPU:$F2B9 PRG:32B9 20 6C FC + lda Zp08 ; CPU:$F2BC PRG:32BC A5 08 + sta Zp05 ; CPU:$F2BE PRG:32BE 85 05 + ldy #$04 ; CPU:$F2C0 PRG:32C0 A0 04 + sty ZpFE ; CPU:$F2C2 PRG:32C2 84 FE + ldx #$00 ; CPU:$F2C4 PRG:32C4 A2 00 + stx ZpFF ; CPU:$F2C6 PRG:32C6 86 FF + jsr $FC6C ; CPU:$F2C8 PRG:32C8 20 6C FC +; ----------------------------------------------------------------------------- +; Routine: Label_F2CB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F2CB: + ldy Zp07 ; CPU:$F2CB PRG:32CB A4 07 + inc Zp08 ; CPU:$F2CD PRG:32CD E6 08 + ldx Zp08 ; CPU:$F2CF PRG:32CF A6 08 + cpx #$08 ; CPU:$F2D1 PRG:32D1 E0 08 + beq Label_F2DB ; CPU:$F2D3 PRG:32D3 F0 06 + jmp $F238 ; CPU:$F2D5 PRG:32D5 4C 38 F2 +; ---- data $F2D8-$F2DA (3 bytes) ---- + .byte $20, $6C, $FC ; CPU:$F2D8 PRG:32D8 20 6C FC +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_F2DB: + iny ; CPU:$F2DB PRG:32DB C8 + sty Zp07 ; CPU:$F2DC PRG:32DC 84 07 + cpy #$07 ; CPU:$F2DE PRG:32DE C0 07 + beq Label_F2E5 ; CPU:$F2E0 PRG:32E0 F0 03 + jmp $F225 ; CPU:$F2E2 PRG:32E2 4C 25 F2 +; ----------------------------------------------------------------------------- +; Routine: Label_F2E5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F2E5: + dec Zp06 ; CPU:$F2E5 PRG:32E5 C6 06 + beq Label_F2EC ; CPU:$F2E7 PRG:32E7 F0 03 + jmp $EE3A ; CPU:$F2E9 PRG:32E9 4C 3A EE +; ----------------------------------------------------------------------------- +; Routine: Label_F2EC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F2EC: + jsr $F683 ; CPU:$F2EC PRG:32EC 20 83 F6 + lda Zp5F ; CPU:$F2EF PRG:32EF A5 5F + cmp #$3A ; CPU:$F2F1 PRG:32F1 C9 3A + bne Label_F302 ; CPU:$F2F3 PRG:32F3 D0 0D + lda $0180 ; CPU:$F2F5 PRG:32F5 AD 80 01 + ora $0182 ; CPU:$F2F8 PRG:32F8 0D 82 01 + and #$04 ; CPU:$F2FB PRG:32FB 29 04 + beq Label_F302 ; CPU:$F2FD PRG:32FD F0 03 + jmp $F3D2 ; CPU:$F2FF PRG:32FF 4C D2 F3 +; ----------------------------------------------------------------------------- +; Routine: Label_F302 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F302: + lda Zp00 ; CPU:$F302 PRG:3302 A5 00 + and #$01 ; CPU:$F304 PRG:3304 29 01 + beq Label_F30F ; CPU:$F306 PRG:3306 F0 07 + lda Zp01 ; CPU:$F308 PRG:3308 A5 01 + tax ; CPU:$F30A PRG:330A AA + and #$22 ; CPU:$F30B PRG:330B 29 22 + beq Label_F312 ; CPU:$F30D PRG:330D F0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_F30F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F30F: + jmp $EDBA ; CPU:$F30F PRG:330F 4C BA ED +; ----------------------------------------------------------------------------- +; Routine: Label_F312 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F312: + lda #$00 ; CPU:$F312 PRG:3312 A9 00 + sta $01CB ; CPU:$F314 PRG:3314 8D CB 01 + txa ; CPU:$F317 PRG:3317 8A + and #$10 ; CPU:$F318 PRG:3318 29 10 + beq Label_F31F ; CPU:$F31A PRG:331A F0 03 + jmp $F41B ; CPU:$F31C PRG:331C 4C 1B F4 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_F31F: + ldx #$00 ; CPU:$F31F PRG:331F A2 00 + stx Zp37 ; CPU:$F321 PRG:3321 86 37 + stx Zp35 ; CPU:$F323 PRG:3323 86 35 + ldy #$00 ; CPU:$F325 PRG:3325 A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_F327 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F327: + lda $0300,y ; CPU:$F327 PRG:3327 B9 00 03 + and #$03 ; CPU:$F32A PRG:332A 29 03 + cmp #$02 ; CPU:$F32C PRG:332C C9 02 + beq Label_F341 ; CPU:$F32E PRG:332E F0 11 + cmp #$03 ; CPU:$F330 PRG:3330 C9 03 + bne Label_F33D ; CPU:$F332 PRG:3332 D0 09 + jsr $F9CE ; CPU:$F334 PRG:3334 20 CE F9 + jsr $F9B0 ; CPU:$F337 PRG:3337 20 B0 F9 + jsr $E24F ; CPU:$F33A PRG:333A 20 4F E2 +; ----------------------------------------------------------------------------- +; Routine: Label_F33D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F33D: + lda #$00 ; CPU:$F33D PRG:333D A9 00 + beq Label_F344 ; CPU:$F33F PRG:333F F0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_F341 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F341: + lda $0330,y ; CPU:$F341 PRG:3341 B9 30 03 +; ----------------------------------------------------------------------------- +; Routine: Label_F344 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F344: + sta $0190,x ; CPU:$F344 PRG:3344 9D 90 01 + inx ; CPU:$F347 PRG:3347 E8 + lda $0370,y ; CPU:$F348 PRG:3348 B9 70 03 + sta $0190,x ; CPU:$F34B PRG:334B 9D 90 01 + inx ; CPU:$F34E PRG:334E E8 + iny ; CPU:$F34F PRG:334F C8 + cpy #$08 ; CPU:$F350 PRG:3350 C0 08 + bne Label_F327 ; CPU:$F352 PRG:3352 D0 D3 + ldx $018F ; CPU:$F354 PRG:3354 AE 8F 01 + lda $018E ; CPU:$F357 PRG:3357 AD 8E 01 + sta $018F ; CPU:$F35A PRG:335A 8D 8F 01 + cpx $018E ; CPU:$F35D PRG:335D EC 8E 01 + bne Label_F365 ; CPU:$F360 PRG:3360 D0 03 + jmp $F413 ; CPU:$F362 PRG:3362 4C 13 F4 +; ----------------------------------------------------------------------------- +; Routine: Label_F365 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F365: + txa ; CPU:$F365 PRG:3365 8A + clc ; CPU:$F366 PRG:3366 18 + sbc $018E ; CPU:$F367 PRG:3367 ED 8E 01 + asl a ; CPU:$F36A PRG:336A 0A + beq Label_F377 ; CPU:$F36B PRG:336B F0 0A + tax ; CPU:$F36D PRG:336D AA +; ----------------------------------------------------------------------------- +; Routine: Label_F36E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F36E: + jsr $F9B0 ; CPU:$F36E PRG:336E 20 B0 F9 + dex ; CPU:$F371 PRG:3371 CA + bne Label_F36E ; CPU:$F372 PRG:3372 D0 FA + jsr $E24F ; CPU:$F374 PRG:3374 20 4F E2 +; ----------------------------------------------------------------------------- +; Routine: Label_F377 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F377: + lda #$03 ; CPU:$F377 PRG:3377 A9 03 + sta $01C5 ; CPU:$F379 PRG:3379 8D C5 01 + jsr $E2A2 ; CPU:$F37C PRG:337C 20 A2 E2 + lda $018E ; CPU:$F37F PRG:337F AD 8E 01 + beq Label_F387 ; CPU:$F382 PRG:3382 F0 03 + jmp $ED4F ; CPU:$F384 PRG:3384 4C 4F ED +; ----------------------------------------------------------------------------- +; Routine: Label_F387 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F387: + jsr $C3BC ; CPU:$F387 PRG:3387 20 BC C3 + lda $01CA ; CPU:$F38A PRG:338A AD CA 01 + bne Label_F3BB ; CPU:$F38D PRG:338D D0 2C + lda #$0F ; CPU:$F38F PRG:338F A9 0F + jsr $C3DA ; CPU:$F391 PRG:3391 20 DA C3 + jsr $F84C ; CPU:$F394 PRG:3394 20 4C F8 + jsr $F9A0 ; CPU:$F397 PRG:3397 20 A0 F9 + jsr $F9B0 ; CPU:$F39A PRG:339A 20 B0 F9 + jsr $F9B0 ; CPU:$F39D PRG:339D 20 B0 F9 + jsr $F9B0 ; CPU:$F3A0 PRG:33A0 20 B0 F9 + jsr $E24F ; CPU:$F3A3 PRG:33A3 20 4F E2 + ldx #$03 ; CPU:$F3A6 PRG:33A6 A2 03 + jsr $F674 ; CPU:$F3A8 PRG:33A8 20 74 F6 + ldx #$C8 ; CPU:$F3AB PRG:33AB A2 C8 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_F3AD: + jsr $F9F9 ; CPU:$F3AD PRG:33AD 20 F9 F9 + jsr $E19D ; CPU:$F3B0 PRG:33B0 20 9D E1 + dex ; CPU:$F3B3 PRG:33B3 CA + bne Label_F3AD ; CPU:$F3B4 PRG:33B4 D0 F7 + ldx #$04 ; CPU:$F3B6 PRG:33B6 A2 04 + jsr $F674 ; CPU:$F3B8 PRG:33B8 20 74 F6 +; ----------------------------------------------------------------------------- +; Routine: Label_F3BB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F3BB: + lda #$0E ; CPU:$F3BB PRG:33BB A9 0E + jsr $C3DA ; CPU:$F3BD PRG:33BD 20 DA C3 + ldx #$14 ; CPU:$F3C0 PRG:33C0 A2 14 + jsr $FF56 ; CPU:$F3C2 PRG:33C2 20 56 FF + jsr $F9A0 ; CPU:$F3C5 PRG:33C5 20 A0 F9 + ldx #$03 ; CPU:$F3C8 PRG:33C8 A2 03 + jsr $F674 ; CPU:$F3CA PRG:33CA 20 74 F6 + ldx #$3C ; CPU:$F3CD PRG:33CD A2 3C + jsr $FF56 ; CPU:$F3CF PRG:33CF 20 56 FF +; ----------------------------------------------------------------------------- +; Routine: Label_F3D2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F3D2: + jsr $C3BC ; CPU:$F3D2 PRG:33D2 20 BC C3 + inc $0187 ; CPU:$F3D5 PRG:33D5 EE 87 01 + lda $0187 ; CPU:$F3D8 PRG:33D8 AD 87 01 + cmp #$3D ; CPU:$F3DB PRG:33DB C9 3D + bne Label_F3E4 ; CPU:$F3DD PRG:33DD D0 05 + lda #$01 ; CPU:$F3DF PRG:33DF A9 01 + sta $0187 ; CPU:$F3E1 PRG:33E1 8D 87 01 +; ----------------------------------------------------------------------------- +; Routine: Label_F3E4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F3E4: + jsr $E25C ; CPU:$F3E4 PRG:33E4 20 5C E2 + ldx $01C6 ; CPU:$F3E7 PRG:33E7 AE C6 01 + lda $01C3 ; CPU:$F3EA PRG:33EA AD C3 01 + sta $0368,x ; CPU:$F3ED PRG:33ED 9D 68 03 + lda $01C5 ; CPU:$F3F0 PRG:33F0 AD C5 01 + sta $036A,x ; CPU:$F3F3 PRG:33F3 9D 6A 03 + lda #$01 ; CPU:$F3F6 PRG:33F6 A9 01 + sta $01CB ; CPU:$F3F8 PRG:33F8 8D CB 01 + lda $0187 ; CPU:$F3FB PRG:33FB AD 87 01 + cmp $01CC ; CPU:$F3FE PRG:33FE CD CC 01 + beq Label_F406 ; CPU:$F401 PRG:3401 F0 03 + jmp $EBB0 ; CPU:$F403 PRG:3403 4C B0 EB +; ----------------------------------------------------------------------------- +; Routine: Label_F406 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F406: + lda $01C7 ; CPU:$F406 PRG:3406 AD C7 01 + cmp #$02 ; CPU:$F409 PRG:3409 C9 02 + bne Label_F410 ; CPU:$F40B PRG:340B D0 03 + jmp $EBB0 ; CPU:$F40D PRG:340D 4C B0 EB +; ----------------------------------------------------------------------------- +; Routine: Label_F410 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F410: + jmp $F56C ; CPU:$F410 PRG:3410 4C 6C F5 +; ----------------------------------------------------------------------------- +; Routine: Label_F413 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F413: + dec $01C5 ; CPU:$F413 PRG:3413 CE C5 01 + beq Label_F41B ; CPU:$F416 PRG:3416 F0 03 + jmp $F49B ; CPU:$F418 PRG:3418 4C 9B F4 +; ----------------------------------------------------------------------------- +; Routine: Label_F41B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F41B: + inc Zp37 ; CPU:$F41B PRG:341B E6 37 + lda Zp37 ; CPU:$F41D PRG:341D A5 37 + sta Zp35 ; CPU:$F41F PRG:341F 85 35 + jsr $C3BC ; CPU:$F421 PRG:3421 20 BC C3 + lda $018E ; CPU:$F424 PRG:3424 AD 8E 01 + beq Label_F435 ; CPU:$F427 PRG:3427 F0 0C + jsr $F017 ; CPU:$F429 PRG:3429 20 17 F0 + lda Zp01 ; CPU:$F42C PRG:342C A5 01 + ora #$10 ; CPU:$F42E PRG:342E 09 10 + sta Zp01 ; CPU:$F430 PRG:3430 85 01 + jmp $EDBA ; CPU:$F432 PRG:3432 4C BA ED +; ----------------------------------------------------------------------------- +; Routine: Label_F435 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F435: + lda #$01 ; CPU:$F435 PRG:3435 A9 01 + sta $01CB ; CPU:$F437 PRG:3437 8D CB 01 + lda #$03 ; CPU:$F43A PRG:343A A9 03 + sta $01C5 ; CPU:$F43C PRG:343C 8D C5 01 + lda $01C7 ; CPU:$F43F PRG:343F AD C7 01 + cmp #$02 ; CPU:$F442 PRG:3442 C9 02 + bne Label_F44D ; CPU:$F444 PRG:3444 D0 07 + lda $01C6 ; CPU:$F446 PRG:3446 AD C6 01 + beq Label_F44D ; CPU:$F449 PRG:3449 F0 02 + bne Label_F457 ; CPU:$F44B PRG:344B D0 0A +; ----------------------------------------------------------------------------- +; Routine: Label_F44D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F44D: + dec $01C3 ; CPU:$F44D PRG:344D CE C3 01 + lda $01C3 ; CPU:$F450 PRG:3450 AD C3 01 + cmp #$FF ; CPU:$F453 PRG:3453 C9 FF + beq Label_F476 ; CPU:$F455 PRG:3455 F0 1F +; ----------------------------------------------------------------------------- +; Routine: Label_F457 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F457: + jsr $CBAE ; CPU:$F457 PRG:3457 20 AE CB + jsr $FA6D ; CPU:$F45A PRG:345A 20 6D FA + jsr $E25C ; CPU:$F45D PRG:345D 20 5C E2 + jsr $E24F ; CPU:$F460 PRG:3460 20 4F E2 + jsr $E2A2 ; CPU:$F463 PRG:3463 20 A2 E2 + ldx #$14 ; CPU:$F466 PRG:3466 A2 14 + jsr $FF56 ; CPU:$F468 PRG:3468 20 56 FF + jsr $FA7D ; CPU:$F46B PRG:346B 20 7D FA + lda #$0C ; CPU:$F46E PRG:346E A9 0C + jsr $C3DA ; CPU:$F470 PRG:3470 20 DA C3 + jmp $F49B ; CPU:$F473 PRG:3473 4C 9B F4 +; ----------------------------------------------------------------------------- +; Routine: Label_F476 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F476: + jsr $F7E8 ; CPU:$F476 PRG:3476 20 E8 F7 + jsr $FA2B ; CPU:$F479 PRG:3479 20 2B FA + bcc Label_F487 ; CPU:$F47C PRG:347C 90 09 + jsr $F81A ; CPU:$F47E PRG:347E 20 1A F8 + jsr $FA56 ; CPU:$F481 PRG:3481 20 56 FA + jsr $E20D ; CPU:$F484 PRG:3484 20 0D E2 +; ----------------------------------------------------------------------------- +; Routine: Label_F487 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F487: + dec $03F8 ; CPU:$F487 PRG:3487 CE F8 03 + beq Label_F4F6 ; CPU:$F48A PRG:348A F0 6A + lda $01C7 ; CPU:$F48C PRG:348C AD C7 01 + cmp #$02 ; CPU:$F48F PRG:348F C9 02 + beq Label_F4F6 ; CPU:$F491 PRG:3491 F0 63 + lda #$0C ; CPU:$F493 PRG:3493 A9 0C + jsr $C3DA ; CPU:$F495 PRG:3495 20 DA C3 + jmp $F4B1 ; CPU:$F498 PRG:3498 4C B1 F4 +; ----------------------------------------------------------------------------- +; Routine: Label_F49B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F49B: + ldx $01C6 ; CPU:$F49B PRG:349B AE C6 01 + lda $01C5 ; CPU:$F49E PRG:349E AD C5 01 + sta $036A,x ; CPU:$F4A1 PRG:34A1 9D 6A 03 + lda $01C3 ; CPU:$F4A4 PRG:34A4 AD C3 01 + sta $0368,x ; CPU:$F4A7 PRG:34A7 9D 68 03 + lda $03F8 ; CPU:$F4AA PRG:34AA AD F8 03 + cmp #$02 ; CPU:$F4AD PRG:34AD C9 02 + bne Label_F4DF ; CPU:$F4AF PRG:34AF D0 2E +; ----------------------------------------------------------------------------- +; Routine: Label_F4B1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F4B1: + lda #$01 ; CPU:$F4B1 PRG:34B1 A9 01 + sta $01CB ; CPU:$F4B3 PRG:34B3 8D CB 01 + inc $01C6 ; CPU:$F4B6 PRG:34B6 EE C6 01 + lda $01C6 ; CPU:$F4B9 PRG:34B9 AD C6 01 + and #$01 ; CPU:$F4BC PRG:34BC 29 01 + sta $01C6 ; CPU:$F4BE PRG:34BE 8D C6 01 + ldx $01C6 ; CPU:$F4C1 PRG:34C1 AE C6 01 + lda $0368,x ; CPU:$F4C4 PRG:34C4 BD 68 03 + sta $01C3 ; CPU:$F4C7 PRG:34C7 8D C3 01 + lda $036A,x ; CPU:$F4CA PRG:34CA BD 6A 03 + sta $01C5 ; CPU:$F4CD PRG:34CD 8D C5 01 + jsr $E2C8 ; CPU:$F4D0 PRG:34D0 20 C8 E2 + jsr $E25C ; CPU:$F4D3 PRG:34D3 20 5C E2 + jsr $E24F ; CPU:$F4D6 PRG:34D6 20 4F E2 + jsr $E2A2 ; CPU:$F4D9 PRG:34D9 20 A2 E2 + jsr $F77A ; CPU:$F4DC PRG:34DC 20 7A F7 +; ----------------------------------------------------------------------------- +; Routine: Label_F4DF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F4DF: + lda #$01 ; CPU:$F4DF PRG:34DF A9 01 + sta $01C4 ; CPU:$F4E1 PRG:34E1 8D C4 01 + sta $01CA ; CPU:$F4E4 PRG:34E4 8D CA 01 + jsr $E24F ; CPU:$F4E7 PRG:34E7 20 4F E2 + jsr $E25C ; CPU:$F4EA PRG:34EA 20 5C E2 + jsr $E2A2 ; CPU:$F4ED PRG:34ED 20 A2 E2 + jsr $E2C8 ; CPU:$F4F0 PRG:34F0 20 C8 E2 + jmp $ED4F ; CPU:$F4F3 PRG:34F3 4C 4F ED +; ----------------------------------------------------------------------------- +; Routine: Label_F4F6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F4F6: + jsr $F87F ; CPU:$F4F6 PRG:34F6 20 7F F8 + jsr $E20D ; CPU:$F4F9 PRG:34F9 20 0D E2 + jsr $C3BC ; CPU:$F4FC PRG:34FC 20 BC C3 + ldx #$28 ; CPU:$F4FF PRG:34FF A2 28 + jsr $FF56 ; CPU:$F501 PRG:3501 20 56 FF + jsr $FA6D ; CPU:$F504 PRG:3504 20 6D FA + jsr $CA21 ; CPU:$F507 PRG:3507 20 21 CA + lda #$81 ; CPU:$F50A PRG:350A A9 81 + jsr $F654 ; CPU:$F50C PRG:350C 20 54 F6 + lda #$55 ; CPU:$F50F PRG:350F A9 55 + jsr $F669 ; CPU:$F511 PRG:3511 20 69 F6 + lda #$21 ; CPU:$F514 PRG:3514 A9 21 + sta $2006 ; CPU:$F516 PRG:3516 8D 06 20 + lda #$CB ; CPU:$F519 PRG:3519 A9 CB + sta $2006 ; CPU:$F51B PRG:351B 8D 06 20 + jsr $CBC9 ; CPU:$F51E PRG:351E 20 C9 CB + .byte $67, $61 ; CPU:$F521 PRG:3521 67 61 -- rra Zp61 (undocumented; ca65 cannot encode) + adc $3B65 ; CPU:$F523 PRG:3523 6D 65 3B + .byte $6F, $76, $65 ; CPU:$F526 PRG:3526 6F 76 65 -- rra $6576 (undocumented; ca65 cannot encode) + .byte $72, $00, $20 ; CPU:$F529 PRG:3529 72 00 20 -- rra $2000 (undocumented; ca65 cannot encode) + .byte $42, $CA ; CPU:$F52C PRG:352C 42 CA -- nop #$CA (undocumented; ca65 cannot encode) + lda #$00 ; CPU:$F52E PRG:352E A9 00 + sta $0146 ; CPU:$F530 PRG:3530 8D 46 01 + jsr $FA7D ; CPU:$F533 PRG:3533 20 7D FA + lda Zp5F ; CPU:$F536 PRG:3536 A5 5F + cmp #$0A ; CPU:$F538 PRG:3538 C9 0A + bne Label_F540 ; CPU:$F53A PRG:353A D0 04 + lda #$08 ; CPU:$F53C PRG:353C A9 08 + bne Label_F542 ; CPU:$F53E PRG:353E D0 02 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_F540: + lda #$10 ; CPU:$F540 PRG:3540 A9 10 +; ----------------------------------------------------------------------------- +; Routine: Label_F542 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F542: + jsr $C3DA ; CPU:$F542 PRG:3542 20 DA C3 + ldx #$02 ; CPU:$F545 PRG:3545 A2 02 + jsr $FF56 ; CPU:$F547 PRG:3547 20 56 FF + ldy #$28 ; CPU:$F54A PRG:354A A0 28 +; ----------------------------------------------------------------------------- +; Routine: Label_F54C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F54C: + lda $0503 ; CPU:$F54C PRG:354C AD 03 05 + bne Label_F557 ; CPU:$F54F PRG:354F D0 06 + dey ; CPU:$F551 PRG:3551 88 + bne Label_F557 ; CPU:$F552 PRG:3552 D0 03 + jmp $E8B3 ; CPU:$F554 PRG:3554 4C B3 E8 +; ----------------------------------------------------------------------------- +; Routine: Label_F557 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F557: + ldx #$01 ; CPU:$F557 PRG:3557 A2 01 + jsr $FF56 ; CPU:$F559 PRG:3559 20 56 FF + jsr $CD0E ; CPU:$F55C PRG:355C 20 0E CD + lda $0180 ; CPU:$F55F PRG:355F AD 80 01 + ora $0182 ; CPU:$F562 PRG:3562 0D 82 01 + and #$08 ; CPU:$F565 PRG:3565 29 08 + beq Label_F54C ; CPU:$F567 PRG:3567 F0 E3 + jmp $E8B3 ; CPU:$F569 PRG:3569 4C B3 E8 +; ----------------------------------------------------------------------------- +; Routine: Label_F56C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F56C: + jsr $FA2B ; CPU:$F56C PRG:356C 20 2B FA + bcc Label_F574 ; CPU:$F56F PRG:356F 90 03 + jsr $FA56 ; CPU:$F571 PRG:3571 20 56 FA +; ----------------------------------------------------------------------------- +; Routine: Label_F574 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F574: + lda $01C6 ; CPU:$F574 PRG:3574 AD C6 01 + pha ; CPU:$F577 PRG:3577 48 + eor #$01 ; CPU:$F578 PRG:3578 49 01 + sta $01C6 ; CPU:$F57A PRG:357A 8D C6 01 + jsr $FA2B ; CPU:$F57D PRG:357D 20 2B FA + bcc Label_F585 ; CPU:$F580 PRG:3580 90 03 + jsr $FA56 ; CPU:$F582 PRG:3582 20 56 FA +; ----------------------------------------------------------------------------- +; Routine: Label_F585 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F585: + pla ; CPU:$F585 PRG:3585 68 + sta $01C6 ; CPU:$F586 PRG:3586 8D C6 01 + jsr $F87F ; CPU:$F589 PRG:3589 20 7F F8 + jsr $CBAE ; CPU:$F58C PRG:358C 20 AE CB + jsr $FA6D ; CPU:$F58F PRG:358F 20 6D FA + jsr $CA21 ; CPU:$F592 PRG:3592 20 21 CA + lda #$3B ; CPU:$F595 PRG:3595 A9 3B + jsr $F654 ; CPU:$F597 PRG:3597 20 54 F6 + lda #$55 ; CPU:$F59A PRG:359A A9 55 + jsr $F669 ; CPU:$F59C PRG:359C 20 69 F6 + lda #$03 ; CPU:$F59F PRG:359F A9 03 + ldx #$08 ; CPU:$F5A1 PRG:35A1 A2 08 + ldy #$00 ; CPU:$F5A3 PRG:35A3 A0 00 + jsr $CDD3 ; CPU:$F5A5 PRG:35A5 20 D3 CD + lda #$0C ; CPU:$F5A8 PRG:35A8 A9 0C + ldx #$0A ; CPU:$F5AA PRG:35AA A2 0A + ldy #$F0 ; CPU:$F5AC PRG:35AC A0 F0 + jsr $CDD3 ; CPU:$F5AE PRG:35AE 20 D3 CD + lda ZpF0 ; CPU:$F5B1 PRG:35B1 A5 F0 + ora #$04 ; CPU:$F5B3 PRG:35B3 09 04 + sta $2000 ; CPU:$F5B5 PRG:35B5 8D 00 20 + ldx #$21 ; CPU:$F5B8 PRG:35B8 A2 21 + stx $2006 ; CPU:$F5BA PRG:35BA 8E 06 20 + ldy #$A4 ; CPU:$F5BD PRG:35BD A0 A4 + sty $2006 ; CPU:$F5BF PRG:35BF 8C 06 20 + ldy #$0D ; CPU:$F5C2 PRG:35C2 A0 0D + lda #$E0 ; CPU:$F5C4 PRG:35C4 A9 E0 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_F5C6: + sta $2007 ; CPU:$F5C6 PRG:35C6 8D 07 20 + dey ; CPU:$F5C9 PRG:35C9 88 + bne Label_F5C6 ; CPU:$F5CA PRG:35CA D0 FA + ldy #$BB ; CPU:$F5CC PRG:35CC A0 BB + stx $2006 ; CPU:$F5CE PRG:35CE 8E 06 20 + sty $2006 ; CPU:$F5D1 PRG:35D1 8C 06 20 + ldy #$0D ; CPU:$F5D4 PRG:35D4 A0 0D +; ----------------------------------------------------------------------------- +; Routine: Label_F5D6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F5D6: + sta $2007 ; CPU:$F5D6 PRG:35D6 8D 07 20 + dey ; CPU:$F5D9 PRG:35D9 88 + bne Label_F5D6 ; CPU:$F5DA PRG:35DA D0 FA + lda ZpF0 ; CPU:$F5DC PRG:35DC A5 F0 + sta $2000 ; CPU:$F5DE PRG:35DE 8D 00 20 + jsr $CF9B ; CPU:$F5E1 PRG:35E1 20 9B CF + .byte $03, $03 ; CPU:$F5E4 PRG:35E4 03 03 -- slo (Zp03,x) (undocumented; ca65 cannot encode) + .byte $1B, $03, $03 ; CPU:$F5E6 PRG:35E6 1B 03 03 -- slo $0303,y (undocumented; ca65 cannot encode) + .byte $03, $05 ; CPU:$F5E9 PRG:35E9 03 05 -- slo (Zp05,x) (undocumented; ca65 cannot encode) + .byte $1C, $09, $03 ; CPU:$F5EB PRG:35EB 1C 09 03 -- nop $0309,x (undocumented; ca65 cannot encode) + .byte $07, $0E ; CPU:$F5EE PRG:35EE 07 0E -- slo Zp0E (undocumented; ca65 cannot encode) + .byte $17, $15 ; CPU:$F5F0 PRG:35F0 17 15 -- slo Zp15,y (undocumented; ca65 cannot encode) + brk ; CPU:$F5F2 PRG:35F2 00 +; ---- data $F5F3-$F653 (97 bytes) ---- + .byte $0D, $18, $13, $18, $02, $FF, $A2, $10, $BD, $43, $F6, $9D, $3F, $01, $CA, $D0 ; CPU:$F5F3 PRG:35F3 0D 18 13 18 02 FF A2 10 BD 43 F6 9D 3F 01 CA D0 + .byte $F7, $20, $42, $CA, $20, $F2, $E1, $20, $02, $E2, $20, $7D, $FA, $A9, $0B, $20 ; CPU:$F603 PRG:3603 F7 20 42 CA 20 F2 E1 20 02 E2 20 7D FA A9 0B 20 + .byte $DA, $C3, $A9, $0A, $85, $24, $A9, $00, $85, $26, $85, $27, $AD, $C8, $01, $F0 ; CPU:$F613 PRG:3613 DA C3 A9 0A 85 24 A9 00 85 26 85 27 AD C8 01 F0 + .byte $FB, $A9, $00, $8D, $C8, $01, $20, $0E, $CD, $C6, $24, $D0, $07, $A9, $04, $85 ; CPU:$F623 PRG:3623 FB A9 00 8D C8 01 20 0E CD C6 24 D0 07 A9 04 85 + .byte $24, $20, $74, $E9, $AD, $80, $01, $0D, $82, $01, $29, $08, $F0, $DE, $4C, $B3 ; CPU:$F633 PRG:3633 24 20 74 E9 AD 80 01 0D 82 01 29 08 F0 DE 4C B3 + .byte $E8, $00, $B0, $8C, $8C, $00, $80, $90, $A0, $00, $B3, $85, $85, $00, $01, $00 ; CPU:$F643 PRG:3643 E8 00 B0 8C 8C 00 80 90 A0 00 B3 85 85 00 01 00 + .byte $0B ; CPU:$F653 PRG:3653 0B +; ----------------------------------------------------------------------------- +; Routine: Label_F654 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F654: + pha ; CPU:$F654 PRG:3654 48 + ldx #$20 ; CPU:$F655 PRG:3655 A2 20 + ldy #$00 ; CPU:$F657 PRG:3657 A0 00 + jsr $CBA9 ; CPU:$F659 PRG:3659 20 A9 CB + ldx #$03 ; CPU:$F65C PRG:365C A2 03 + ldy #$C0 ; CPU:$F65E PRG:365E A0 C0 + stx ZpF9 ; CPU:$F660 PRG:3660 86 F9 + sty ZpF8 ; CPU:$F662 PRG:3662 84 F8 + pla ; CPU:$F664 PRG:3664 68 + jsr $CB2B ; CPU:$F665 PRG:3665 20 2B CB + rts ; CPU:$F668 PRG:3668 60 +; ----------------------------------------------------------------------------- +; Routine: Label_F669 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F669: + ldx #$40 ; CPU:$F669 PRG:3669 A2 40 +; ----------------------------------------------------------------------------- +; Routine: Label_F66B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F66B: + sta a:$00FF,x ; CPU:$F66B PRG:366B 9D FF 00 + dex ; CPU:$F66E PRG:366E CA + bne Label_F66B ; CPU:$F66F PRG:366F D0 FA + jmp $CD9D ; CPU:$F671 PRG:3671 4C 9D CD +; ----------------------------------------------------------------------------- +; Routine: Label_F674 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F674: + txa ; CPU:$F674 PRG:3674 8A + pha ; CPU:$F675 PRG:3675 48 + ldx #$02 ; CPU:$F676 PRG:3676 A2 02 + jsr $FF56 ; CPU:$F678 PRG:3678 20 56 FF + pla ; CPU:$F67B PRG:367B 68 + tax ; CPU:$F67C PRG:367C AA +; ----------------------------------------------------------------------------- +; Routine: Label_F67D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F67D: + lda $0500,x ; CPU:$F67D PRG:367D BD 00 05 + bne Label_F67D ; CPU:$F680 PRG:3680 D0 FB + rts ; CPU:$F682 PRG:3682 60 +; ----------------------------------------------------------------------------- +; Routine: Label_F683 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F683: + ldy #$00 ; CPU:$F683 PRG:3683 A0 00 + sty Zp07 ; CPU:$F685 PRG:3685 84 07 + lda #$F0 ; CPU:$F687 PRG:3687 A9 F0 + sta ZpF6 ; CPU:$F689 PRG:3689 85 F6 + lda #$10 ; CPU:$F68B PRG:368B A9 10 + sta ZpF7 ; CPU:$F68D PRG:368D 85 F7 + lda Zp04 ; CPU:$F68F PRG:368F A5 04 + and #$01 ; CPU:$F691 PRG:3691 29 01 + beq Label_F69D ; CPU:$F693 PRG:3693 F0 08 + lda #$E0 ; CPU:$F695 PRG:3695 A9 E0 + sta ZpF6 ; CPU:$F697 PRG:3697 85 F6 + lda #$F0 ; CPU:$F699 PRG:3699 A9 F0 + sta ZpF7 ; CPU:$F69B PRG:369B 85 F7 +; ----------------------------------------------------------------------------- +; Routine: Label_F69D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F69D: + ldy Zp07 ; CPU:$F69D PRG:369D A4 07 + ldx $0300,y ; CPU:$F69F PRG:369F BE 00 03 + lda ZpF6 ; CPU:$F6A2 PRG:36A2 A5 F6 + clc ; CPU:$F6A4 PRG:36A4 18 + adc ZpF7 ; CPU:$F6A5 PRG:36A5 65 F7 + sta ZpF6 ; CPU:$F6A7 PRG:36A7 85 F6 + txa ; CPU:$F6A9 PRG:36A9 8A + and #$80 ; CPU:$F6AA PRG:36AA 29 80 + bne Label_F6C1 ; CPU:$F6AC PRG:36AC D0 13 + ldx ZpF6 ; CPU:$F6AE PRG:36AE A6 F6 + lda #$F8 ; CPU:$F6B0 PRG:36B0 A9 F8 + sta $0200,x ; CPU:$F6B2 PRG:36B2 9D 00 02 + sta $0204,x ; CPU:$F6B5 PRG:36B5 9D 04 02 + sta $0208,x ; CPU:$F6B8 PRG:36B8 9D 08 02 + sta $020C,x ; CPU:$F6BB PRG:36BB 9D 0C 02 + jmp $F71A ; CPU:$F6BE PRG:36BE 4C 1A F7 +; ----------------------------------------------------------------------------- +; Routine: Label_F6C1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F6C1: + txa ; CPU:$F6C1 PRG:36C1 8A + and #$40 ; CPU:$F6C2 PRG:36C2 29 40 + beq Label_F6CF ; CPU:$F6C4 PRG:36C4 F0 09 + txa ; CPU:$F6C6 PRG:36C6 8A + ldx ZpF6 ; CPU:$F6C7 PRG:36C7 A6 F6 + jsr $F728 ; CPU:$F6C9 PRG:36C9 20 28 F7 + jmp $F71A ; CPU:$F6CC PRG:36CC 4C 1A F7 +; ----------------------------------------------------------------------------- +; Routine: Label_F6CF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F6CF: + ldx ZpF6 ; CPU:$F6CF PRG:36CF A6 F6 + lda $0330,y ; CPU:$F6D1 PRG:36D1 B9 30 03 + sta $0204,x ; CPU:$F6D4 PRG:36D4 9D 04 02 + sta $020C,x ; CPU:$F6D7 PRG:36D7 9D 0C 02 + sec ; CPU:$F6DA PRG:36DA 38 + sbc #$08 ; CPU:$F6DB PRG:36DB E9 08 + sta $0200,x ; CPU:$F6DD PRG:36DD 9D 00 02 + sta $0208,x ; CPU:$F6E0 PRG:36E0 9D 08 02 + lda $0370,y ; CPU:$F6E3 PRG:36E3 B9 70 03 + sta $020B,x ; CPU:$F6E6 PRG:36E6 9D 0B 02 + sta $020F,x ; CPU:$F6E9 PRG:36E9 9D 0F 02 + sec ; CPU:$F6EC PRG:36EC 38 + sbc #$08 ; CPU:$F6ED PRG:36ED E9 08 + sta $0203,x ; CPU:$F6EF PRG:36EF 9D 03 02 + sta $0207,x ; CPU:$F6F2 PRG:36F2 9D 07 02 + lda $0400,y ; CPU:$F6F5 PRG:36F5 B9 00 04 + sta $0202,x ; CPU:$F6F8 PRG:36F8 9D 02 02 + sta $0206,x ; CPU:$F6FB PRG:36FB 9D 06 02 + sta $020A,x ; CPU:$F6FE PRG:36FE 9D 0A 02 + sta $020E,x ; CPU:$F701 PRG:3701 9D 0E 02 + lda $0410,y ; CPU:$F704 PRG:3704 B9 10 04 + sta $0201,x ; CPU:$F707 PRG:3707 9D 01 02 + clc ; CPU:$F70A PRG:370A 18 + adc #$01 ; CPU:$F70B PRG:370B 69 01 + sta $0205,x ; CPU:$F70D PRG:370D 9D 05 02 + adc #$01 ; CPU:$F710 PRG:3710 69 01 + sta $0209,x ; CPU:$F712 PRG:3712 9D 09 02 + adc #$01 ; CPU:$F715 PRG:3715 69 01 + sta $020D,x ; CPU:$F717 PRG:3717 9D 0D 02 +; ----------------------------------------------------------------------------- +; Routine: Label_F71A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F71A: + inc Zp07 ; CPU:$F71A PRG:371A E6 07 + lda Zp07 ; CPU:$F71C PRG:371C A5 07 + cmp #$0E ; CPU:$F71E PRG:371E C9 0E + beq Label_F725 ; CPU:$F720 PRG:3720 F0 03 + jmp $F69D ; CPU:$F722 PRG:3722 4C 9D F6 +; ----------------------------------------------------------------------------- +; Routine: Label_F725 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F725: + inc Zp04 ; CPU:$F725 PRG:3725 E6 04 + rts ; CPU:$F727 PRG:3727 60 +; ----------------------------------------------------------------------------- +; Routine: Label_F728 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F728: + lda #$F8 ; CPU:$F728 PRG:3728 A9 F8 + sta $0204,x ; CPU:$F72A PRG:372A 9D 04 02 + sta $0208,x ; CPU:$F72D PRG:372D 9D 08 02 + sta $020C,x ; CPU:$F730 PRG:3730 9D 0C 02 + lda Zp00 ; CPU:$F733 PRG:3733 A5 00 + and #$08 ; CPU:$F735 PRG:3735 29 08 + bne Label_F73F ; CPU:$F737 PRG:3737 D0 06 + lda #$F8 ; CPU:$F739 PRG:3739 A9 F8 + sta $0200,x ; CPU:$F73B PRG:373B 9D 00 02 + rts ; CPU:$F73E PRG:373E 60 +; ----------------------------------------------------------------------------- +; Routine: Label_F73F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F73F: + lda $0320,y ; CPU:$F73F PRG:373F B9 20 03 + sec ; CPU:$F742 PRG:3742 38 + sbc #$04 ; CPU:$F743 PRG:3743 E9 04 + sta $0200,x ; CPU:$F745 PRG:3745 9D 00 02 + lda $0330,y ; CPU:$F748 PRG:3748 B9 30 03 + sec ; CPU:$F74B PRG:374B 38 + sbc #$03 ; CPU:$F74C PRG:374C E9 03 + sta $0203,x ; CPU:$F74E PRG:374E 9D 03 02 + lda $03C0 ; CPU:$F751 PRG:3751 AD C0 03 + and #$03 ; CPU:$F754 PRG:3754 29 03 + clc ; CPU:$F756 PRG:3756 18 + adc #$20 ; CPU:$F757 PRG:3757 69 20 + sta $0201,x ; CPU:$F759 PRG:3759 9D 01 02 + lda #$00 ; CPU:$F75C PRG:375C A9 00 + sta $0202,x ; CPU:$F75E PRG:375E 9D 02 02 + rts ; CPU:$F761 PRG:3761 60 +; ---- data $F762-$F779 (24 bytes) ---- +; referenced by `lda $F762,x` at $EDD5 (operand $F762 falls inside this region) +; referenced by `lda $F76A,x` at $EDDA (operand $F76A falls inside this region) +; referenced by `lda $F772,x` at $EDDF (operand $F772 falls inside this region) + .byte $10, $00, $0C, $0E, $0E, $0C, $00, $10, $32, $22, $12, $02, $01, $02, $12, $22 ; CPU:$F762 PRG:3762 10 00 0C 0E 0E 0C 00 10 32 22 12 02 01 02 12 22 + .byte $0A, $0B, $1B, $2B, $3B, $2B, $1B, $0B ; CPU:$F772 PRG:3772 0A 0B 1B 2B 3B 2B 1B 0B +; ----------------------------------------------------------------------------- +; Routine: Label_F77A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F77A: + ldx #$21 ; CPU:$F77A PRG:377A A2 21 + ldy #$C9 ; CPU:$F77C PRG:377C A0 C9 + lda #$0F ; CPU:$F77E PRG:377E A9 0F + jsr $F7A7 ; CPU:$F780 PRG:3780 20 A7 F7 + jsr $CBDC ; CPU:$F783 PRG:3783 20 DC CB + sta (Zp70,x) ; CPU:$F786 PRG:3786 81 70 + jmp ($7961) ; CPU:$F788 PRG:3788 6C 61 79 +; ---- data $F78B-$F7A4 (26 bytes) ---- + .byte $65, $72, $81, $00, $AD, $C6, $01, $18, $69, $31, $20, $29, $CC, $20, $DC, $CB ; CPU:$F78B PRG:378B 65 72 81 00 AD C6 01 18 69 31 20 29 CC 20 DC CB + .byte $81, $73, $68, $6F, $74, $81, $00, $A2, $3C, $4C ; CPU:$F79B PRG:379B 81 73 68 6F 74 81 00 A2 3C 4C +; ----------------------------------------------------------------------------- +; Routine: Label_F7A5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F7A5: + .byte $CB, $F7 ; CPU:$F7A5 PRG:37A5 CB F7 -- axs #$F7 (undocumented; ca65 cannot encode) +; ----------------------------------------------------------------------------- +; Routine: Label_F7A7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F7A7: + sta ZpF8 ; CPU:$F7A7 PRG:37A7 85 F8 + stx ZpEA ; CPU:$F7A9 PRG:37A9 86 EA + sty ZpE9 ; CPU:$F7AB PRG:37AB 84 E9 + jsr $CBAE ; CPU:$F7AD PRG:37AD 20 AE CB + lda #$04 ; CPU:$F7B0 PRG:37B0 A9 04 + sta ZpEC ; CPU:$F7B2 PRG:37B2 85 EC + lda #$20 ; CPU:$F7B4 PRG:37B4 A9 20 + sta ZpEB ; CPU:$F7B6 PRG:37B6 85 EB + lda ZpF8 ; CPU:$F7B8 PRG:37B8 A5 F8 + sta ZpE8 ; CPU:$F7BA PRG:37BA 85 E8 +; ----------------------------------------------------------------------------- +; Routine: Label_F7BC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F7BC: + lda ZpE8 ; CPU:$F7BC PRG:37BC A5 E8 + bne Label_F7BC ; CPU:$F7BE PRG:37BE D0 FC + ldx ZpEA ; CPU:$F7C0 PRG:37C0 A6 EA + ldy ZpE9 ; CPU:$F7C2 PRG:37C2 A4 E9 + stx ZpFD ; CPU:$F7C4 PRG:37C4 86 FD + sty ZpFC ; CPU:$F7C6 PRG:37C6 84 FC + jmp $CBFB ; CPU:$F7C8 PRG:37C8 4C FB CB +; ---- data $F7CB-$F7E7 (29 bytes) ---- + .byte $20, $56, $FF, $A6, $EA, $A4, $E9, $86, $FD, $84, $FC, $20, $FB, $CB, $A6, $F8 ; CPU:$F7CB PRG:37CB 20 56 FF A6 EA A4 E9 86 FD 84 FC 20 FB CB A6 F8 + .byte $A0, $00, $B9, $20, $04, $20, $29, $CC, $C8, $CA, $D0, $F6, $60 ; CPU:$F7DB PRG:37DB A0 00 B9 20 04 20 29 CC C8 CA D0 F6 60 +; ----------------------------------------------------------------------------- +; Routine: Label_F7E8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F7E8: + ldx #$21 ; CPU:$F7E8 PRG:37E8 A2 21 + ldy #$C6 ; CPU:$F7EA PRG:37EA A0 C6 + lda #$14 ; CPU:$F7EC PRG:37EC A9 14 + jsr $F7A7 ; CPU:$F7EE PRG:37EE 20 A7 F7 + jsr $CBDC ; CPU:$F7F1 PRG:37F1 20 DC CB + sta (Zp70,x) ; CPU:$F7F4 PRG:37F4 81 70 + jmp ($7961) ; CPU:$F7F6 PRG:37F6 6C 61 79 +; ---- data $F7F9-$F819 (33 bytes) ---- + .byte $65, $72, $81, $00, $AD, $C6, $01, $18, $69, $31, $20, $29, $CC, $20, $DC, $CB ; CPU:$F7F9 PRG:37F9 65 72 81 00 AD C6 01 18 69 31 20 29 CC 20 DC CB + .byte $81, $67, $61, $6D, $65, $81, $6F, $76, $65, $72, $81, $00, $A2, $64, $4C, $CB ; CPU:$F809 PRG:3809 81 67 61 6D 65 81 6F 76 65 72 81 00 A2 64 4C CB + .byte $F7 ; CPU:$F819 PRG:3819 F7 +; ----------------------------------------------------------------------------- +; Routine: Label_F81A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F81A: + ldx #$21 ; CPU:$F81A PRG:381A A2 21 + ldy #$C6 ; CPU:$F81C PRG:381C A0 C6 + lda #$14 ; CPU:$F81E PRG:381E A9 14 + jsr $F7A7 ; CPU:$F820 PRG:3820 20 A7 F7 + jsr $CBDC ; CPU:$F823 PRG:3823 20 DC CB + sta (Zp70,x) ; CPU:$F826 PRG:3826 81 70 + jmp ($7961) ; CPU:$F828 PRG:3828 6C 61 79 +; ---- data $F82B-$F84B (33 bytes) ---- + .byte $65, $72, $81, $00, $AD, $C6, $01, $18, $69, $31, $20, $29, $CC, $20, $DC, $CB ; CPU:$F82B PRG:382B 65 72 81 00 AD C6 01 18 69 31 20 29 CC 20 DC CB + .byte $81, $68, $69, $60, $73, $63, $6F, $72, $65, $5F, $5F, $00, $A2, $64, $4C, $CB ; CPU:$F83B PRG:383B 81 68 69 60 73 63 6F 72 65 5F 5F 00 A2 64 4C CB + .byte $F7 ; CPU:$F84B PRG:384B F7 +; ----------------------------------------------------------------------------- +; Routine: Label_F84C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F84C: + ldx #$21 ; CPU:$F84C PRG:384C A2 21 + ldy #$CB ; CPU:$F84E PRG:384E A0 CB + lda #$09 ; CPU:$F850 PRG:3850 A9 09 + jsr $F7A7 ; CPU:$F852 PRG:3852 20 A7 F7 + jsr $CBDC ; CPU:$F855 PRG:3855 20 DC CB + sta (Zp70,x) ; CPU:$F858 PRG:3858 81 70 + adc Zp72 ; CPU:$F85A PRG:385A 65 72 + ror Zp65 ; CPU:$F85C PRG:385C 66 65 + .byte $63, $74 ; CPU:$F85E PRG:385E 63 74 -- rra (Zp74,x) (undocumented; ca65 cannot encode) + .byte $5F, $00, $A2 ; CPU:$F860 PRG:3860 5F 00 A2 -- sre $A200,x (undocumented; ca65 cannot encode) + .byte $FA, $4C, $CB ; CPU:$F863 PRG:3863 FA 4C CB -- nop $CB4C,x (undocumented; ca65 cannot encode) +; ---- data $F866-$F866 (1 bytes) ---- + .byte $F7 ; CPU:$F866 PRG:3866 F7 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_F867: + lda $01C7 ; CPU:$F867 PRG:3867 AD C7 01 + asl a ; CPU:$F86A PRG:386A 0A + adc $01C7 ; CPU:$F86B PRG:386B 6D C7 01 + asl a ; CPU:$F86E PRG:386E 0A + tax ; CPU:$F86F PRG:386F AA + ldy #$00 ; CPU:$F870 PRG:3870 A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_F872 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F872: + lda $0450,x ; CPU:$F872 PRG:3872 BD 50 04 + sta $0462,y ; CPU:$F875 PRG:3875 99 62 04 + inx ; CPU:$F878 PRG:3878 E8 + iny ; CPU:$F879 PRG:3879 C8 + cpy #$06 ; CPU:$F87A PRG:387A C0 06 + bne Label_F872 ; CPU:$F87C PRG:387C D0 F4 + rts ; CPU:$F87E PRG:387E 60 +; ----------------------------------------------------------------------------- +; Routine: Label_F87F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F87F: + lda $01C7 ; CPU:$F87F PRG:387F AD C7 01 + asl a ; CPU:$F882 PRG:3882 0A + adc $01C7 ; CPU:$F883 PRG:3883 6D C7 01 + asl a ; CPU:$F886 PRG:3886 0A + tax ; CPU:$F887 PRG:3887 AA + ldy #$00 ; CPU:$F888 PRG:3888 A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_F88A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F88A: + lda $0462,y ; CPU:$F88A PRG:388A B9 62 04 + sta $0450,x ; CPU:$F88D PRG:388D 9D 50 04 + inx ; CPU:$F890 PRG:3890 E8 + iny ; CPU:$F891 PRG:3891 C8 + cpy #$06 ; CPU:$F892 PRG:3892 C0 06 + bne Label_F88A ; CPU:$F894 PRG:3894 D0 F4 + rts ; CPU:$F896 PRG:3896 60 +; ---- data $F897-$F98F (249 bytes) ---- + .byte $C0, $1E, $D0, $01, $60, $C0, $1D, $F0, $1B, $C0, $1F, $D0, $07, $A0, $FF, $8C ; CPU:$F897 PRG:3897 C0 1E D0 01 60 C0 1D F0 1B C0 1F D0 07 A0 FF 8C + .byte $88, $01, $D0, $10, $E0, $1F, $D0, $75, $AD, $8A, $01, $29, $01, $F0, $05, $A2 ; CPU:$F8A7 PRG:38A7 88 01 D0 10 E0 1F D0 75 AD 8A 01 29 01 F0 05 A2 + .byte $FF, $8E, $89, $01, $AE, $89, $01, $E0, $FF, $F0, $12, $AC, $88, $01, $C0, $FF ; CPU:$F8B7 PRG:38B7 FF 8E 89 01 AE 89 01 E0 FF F0 12 AC 88 01 C0 FF + .byte $F0, $0B, $20, $F7, $CA, $20, $89, $F9, $A9, $DA, $8D, $07, $20, $AE, $89, $01 ; CPU:$F8C7 PRG:38C7 F0 0B 20 F7 CA 20 89 F9 A9 DA 8D 07 20 AE 89 01 + .byte $E0, $1F, $F0, $13, $AC, $88, $01, $C0, $FF, $F0, $0C, $E8, $20, $F7, $CA, $20 ; CPU:$F8D7 PRG:38D7 E0 1F F0 13 AC 88 01 C0 FF F0 0C E8 20 F7 CA 20 + .byte $89, $F9, $A9, $DB, $8D, $07, $20, $AE, $89, $01, $E0, $FF, $F0, $13, $AC, $88 ; CPU:$F8E7 PRG:38E7 89 F9 A9 DB 8D 07 20 AE 89 01 E0 FF F0 13 AC 88 + .byte $01, $C0, $1D, $F0, $0C, $C8, $20, $F7, $CA, $20, $89, $F9, $A9, $D9, $8D, $07 ; CPU:$F8F7 PRG:38F7 01 C0 1D F0 0C C8 20 F7 CA 20 89 F9 A9 D9 8D 07 + .byte $20, $AE, $89, $01, $E0, $1F, $F0, $8C, $AC, $88, $01, $C0, $1D, $F0, $85, $E8 ; CPU:$F907 PRG:3907 20 AE 89 01 E0 1F F0 8C AC 88 01 C0 1D F0 85 E8 + .byte $C8, $20, $F7, $CA, $20, $89, $F9, $A9, $D8, $8D, $07, $20, $60, $20, $F7, $CA ; CPU:$F917 PRG:3917 C8 20 F7 CA 20 89 F9 A9 D8 8D 07 20 60 20 F7 CA + .byte $86, $FD, $84, $FC, $20, $89, $F9, $AD, $07, $20, $AD, $07, $20, $C9, $DC, $90 ; CPU:$F927 PRG:3927 86 FD 84 FC 20 89 F9 AD 07 20 AD 07 20 C9 DC 90 + .byte $50, $C9, $DF, $B0, $4C, $AD, $07, $20, $C9, $DC, $90, $45, $C9, $DF, $B0, $41 ; CPU:$F937 PRG:3937 50 C9 DF B0 4C AD 07 20 C9 DC 90 45 C9 DF B0 41 + .byte $A5, $FC, $18, $69, $20, $A8, $A5, $FD, $69, $00, $AA, $20, $89, $F9, $AD, $07 ; CPU:$F947 PRG:3947 A5 FC 18 69 20 A8 A5 FD 69 00 AA 20 89 F9 AD 07 + .byte $20, $AD, $07, $20, $C9, $DC, $90, $29, $C9, $DF, $B0, $25, $AD, $07, $20, $C9 ; CPU:$F957 PRG:3957 20 AD 07 20 C9 DC 90 29 C9 DF B0 25 AD 07 20 C9 + .byte $DC, $90, $1E, $C9, $DF, $B0, $1A, $20, $A3, $CA, $A9, $DA, $8D, $07, $20, $A9 ; CPU:$F967 PRG:3967 DC 90 1E C9 DF B0 1A 20 A3 CA A9 DA 8D 07 20 A9 + .byte $DB, $8D, $07, $20, $20, $89, $F9, $A9, $D9, $8D, $07, $20, $A9, $D8, $8D, $07 ; CPU:$F977 PRG:3977 DB 8D 07 20 20 89 F9 A9 D9 8D 07 20 A9 D8 8D 07 + .byte $20, $60, $8E, $06, $20, $8C, $06, $20, $60 ; CPU:$F987 PRG:3987 20 60 8E 06 20 8C 06 20 60 +; ----------------------------------------------------------------------------- +; Routine: Label_F990 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F990: + lda $0310,y ; CPU:$F990 PRG:3990 B9 10 03 + asl a ; CPU:$F993 PRG:3993 0A + asl a ; CPU:$F994 PRG:3994 0A + sta $0410,y ; CPU:$F995 PRG:3995 99 10 04 +; ----------------------------------------------------------------------------- +; Routine: Label_F998 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F998: + lda $0310,y ; CPU:$F998 PRG:3998 B9 10 03 + lsr a ; CPU:$F99B PRG:399B 4A + sta $0400,y ; CPU:$F99C PRG:399C 99 00 04 + rts ; CPU:$F99F PRG:399F 60 +; ----------------------------------------------------------------------------- +; Routine: Label_F9A0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F9A0: + inc $01C3 ; CPU:$F9A0 PRG:39A0 EE C3 01 + lda $01C3 ; CPU:$F9A3 PRG:39A3 AD C3 01 + cmp #$64 ; CPU:$F9A6 PRG:39A6 C9 64 + bne Label_F9AD ; CPU:$F9A8 PRG:39A8 D0 03 + dec $01C3 ; CPU:$F9AA PRG:39AA CE C3 01 +; ----------------------------------------------------------------------------- +; Routine: Label_F9AD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F9AD: + jmp $E25C ; CPU:$F9AD PRG:39AD 4C 5C E2 +; ----------------------------------------------------------------------------- +; Routine: Label_F9B0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F9B0: + inc $01C4 ; CPU:$F9B0 PRG:39B0 EE C4 01 + lda $01C4 ; CPU:$F9B3 PRG:39B3 AD C4 01 + cmp #$64 ; CPU:$F9B6 PRG:39B6 C9 64 + bne Label_F9BD ; CPU:$F9B8 PRG:39B8 D0 03 + dec $01C4 ; CPU:$F9BA PRG:39BA CE C4 01 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_F9BD: + cmp #$14 ; CPU:$F9BD PRG:39BD C9 14 + beq Label_F9A0 ; CPU:$F9BF PRG:39BF F0 DF + cmp #$19 ; CPU:$F9C1 PRG:39C1 C9 19 + beq Label_F9A0 ; CPU:$F9C3 PRG:39C3 F0 DB + cmp #$1E ; CPU:$F9C5 PRG:39C5 C9 1E + beq Label_F9A0 ; CPU:$F9C7 PRG:39C7 F0 D7 + cmp #$23 ; CPU:$F9C9 PRG:39C9 C9 23 + bcs Label_F9A0 ; CPU:$F9CB PRG:39CB B0 D3 + rts ; CPU:$F9CD PRG:39CD 60 +; ----------------------------------------------------------------------------- +; Routine: Label_F9CE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F9CE: + txa ; CPU:$F9CE PRG:39CE 8A + pha ; CPU:$F9CF PRG:39CF 48 + tya ; CPU:$F9D0 PRG:39D0 98 + pha ; CPU:$F9D1 PRG:39D1 48 + lda $0310,y ; CPU:$F9D2 PRG:39D2 B9 10 03 + tax ; CPU:$F9D5 PRG:39D5 AA +; ----------------------------------------------------------------------------- +; Routine: Label_F9D6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F9D6: + ldy $01C4 ; CPU:$F9D6 PRG:39D6 AC C4 01 +; ----------------------------------------------------------------------------- +; Routine: Label_F9D9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F9D9: + jsr $F9F9 ; CPU:$F9D9 PRG:39D9 20 F9 F9 + jsr $E19D ; CPU:$F9DC PRG:39DC 20 9D E1 + lda #$00 ; CPU:$F9DF PRG:39DF A9 00 + sta $01C8 ; CPU:$F9E1 PRG:39E1 8D C8 01 +; ----------------------------------------------------------------------------- +; Routine: Label_F9E4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F9E4: + lda $01C8 ; CPU:$F9E4 PRG:39E4 AD C8 01 + beq Label_F9E4 ; CPU:$F9E7 PRG:39E7 F0 FB + lda #$00 ; CPU:$F9E9 PRG:39E9 A9 00 + sta $01C8 ; CPU:$F9EB PRG:39EB 8D C8 01 + dey ; CPU:$F9EE PRG:39EE 88 + bne Label_F9D9 ; CPU:$F9EF PRG:39EF D0 E8 + dex ; CPU:$F9F1 PRG:39F1 CA + bne Label_F9D6 ; CPU:$F9F2 PRG:39F2 D0 E2 + pla ; CPU:$F9F4 PRG:39F4 68 + tay ; CPU:$F9F5 PRG:39F5 A8 + pla ; CPU:$F9F6 PRG:39F6 68 + tax ; CPU:$F9F7 PRG:39F7 AA + rts ; CPU:$F9F8 PRG:39F8 60 +; ----------------------------------------------------------------------------- +; Routine: Label_F9F9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F9F9: + lda #$09 ; CPU:$F9F9 PRG:39F9 A9 09 + jsr $C3DA ; CPU:$F9FB PRG:39FB 20 DA C3 + txa ; CPU:$F9FE PRG:39FE 8A + pha ; CPU:$F9FF PRG:39FF 48 + tya ; CPU:$FA00 PRG:3A00 98 + pha ; CPU:$FA01 PRG:3A01 48 + jsr $FA4A ; CPU:$FA02 PRG:3A02 20 4A FA + ldy #$06 ; CPU:$FA05 PRG:3A05 A0 06 +; ----------------------------------------------------------------------------- +; Routine: Label_FA07 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA07: + inc $0468,x ; CPU:$FA07 PRG:3A07 FE 68 04 + lda $0468,x ; CPU:$FA0A PRG:3A0A BD 68 04 + cmp #$0A ; CPU:$FA0D PRG:3A0D C9 0A + bne Label_FA26 ; CPU:$FA0F PRG:3A0F D0 15 + lda #$00 ; CPU:$FA11 PRG:3A11 A9 00 + sta $0468,x ; CPU:$FA13 PRG:3A13 9D 68 04 + dex ; CPU:$FA16 PRG:3A16 CA + dey ; CPU:$FA17 PRG:3A17 88 + bne Label_FA07 ; CPU:$FA18 PRG:3A18 D0 ED + lda #$09 ; CPU:$FA1A PRG:3A1A A9 09 + inx ; CPU:$FA1C PRG:3A1C E8 + ldy #$06 ; CPU:$FA1D PRG:3A1D A0 06 +; ----------------------------------------------------------------------------- +; Routine: Label_FA1F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA1F: + sta $0468,x ; CPU:$FA1F PRG:3A1F 9D 68 04 + inx ; CPU:$FA22 PRG:3A22 E8 + dey ; CPU:$FA23 PRG:3A23 88 + bne Label_FA1F ; CPU:$FA24 PRG:3A24 D0 F9 +; ----------------------------------------------------------------------------- +; Routine: Label_FA26 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA26: + pla ; CPU:$FA26 PRG:3A26 68 + tay ; CPU:$FA27 PRG:3A27 A8 + pla ; CPU:$FA28 PRG:3A28 68 + tax ; CPU:$FA29 PRG:3A29 AA + rts ; CPU:$FA2A PRG:3A2A 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FA2B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA2B: + txa ; CPU:$FA2B PRG:3A2B 8A + pha ; CPU:$FA2C PRG:3A2C 48 + tya ; CPU:$FA2D PRG:3A2D 98 + pha ; CPU:$FA2E PRG:3A2E 48 + jsr $FA4A ; CPU:$FA2F PRG:3A2F 20 4A FA + ldy #$00 ; CPU:$FA32 PRG:3A32 A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_FA34 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA34: + lda $0463,x ; CPU:$FA34 PRG:3A34 BD 63 04 + cmp $0462,y ; CPU:$FA37 PRG:3A37 D9 62 04 + bcc Label_FA26 ; CPU:$FA3A PRG:3A3A 90 EA + beq Label_FA40 ; CPU:$FA3C PRG:3A3C F0 02 + bcs Label_FA26 ; CPU:$FA3E PRG:3A3E B0 E6 +; ----------------------------------------------------------------------------- +; Routine: Label_FA40 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA40: + inx ; CPU:$FA40 PRG:3A40 E8 + iny ; CPU:$FA41 PRG:3A41 C8 + cpy #$06 ; CPU:$FA42 PRG:3A42 C0 06 + bne Label_FA34 ; CPU:$FA44 PRG:3A44 D0 EE + sec ; CPU:$FA46 PRG:3A46 38 + jmp $FA26 ; CPU:$FA47 PRG:3A47 4C 26 FA +; ----------------------------------------------------------------------------- +; Routine: Label_FA4A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA4A: + lda $01C6 ; CPU:$FA4A PRG:3A4A AD C6 01 + asl a ; CPU:$FA4D PRG:3A4D 0A + adc $01C6 ; CPU:$FA4E PRG:3A4E 6D C6 01 + asl a ; CPU:$FA51 PRG:3A51 0A + adc #$05 ; CPU:$FA52 PRG:3A52 69 05 + tax ; CPU:$FA54 PRG:3A54 AA + rts ; CPU:$FA55 PRG:3A55 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FA56 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA56: + txa ; CPU:$FA56 PRG:3A56 8A + pha ; CPU:$FA57 PRG:3A57 48 + tya ; CPU:$FA58 PRG:3A58 98 + pha ; CPU:$FA59 PRG:3A59 48 + jsr $FA4A ; CPU:$FA5A PRG:3A5A 20 4A FA + ldy #$00 ; CPU:$FA5D PRG:3A5D A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_FA5F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA5F: + lda $0463,x ; CPU:$FA5F PRG:3A5F BD 63 04 + sta $0462,y ; CPU:$FA62 PRG:3A62 99 62 04 + inx ; CPU:$FA65 PRG:3A65 E8 + iny ; CPU:$FA66 PRG:3A66 C8 + cpy #$06 ; CPU:$FA67 PRG:3A67 C0 06 + bne Label_FA5F ; CPU:$FA69 PRG:3A69 D0 F4 + beq Label_FA40 ; CPU:$FA6B PRG:3A6B F0 D3 +; ----------------------------------------------------------------------------- +; Routine: Label_FA6D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA6D: + ldy #$00 ; CPU:$FA6D PRG:3A6D A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_FA6F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA6F: + jsr $FA8B ; CPU:$FA6F PRG:3A6F 20 8B FA + ldx #$03 ; CPU:$FA72 PRG:3A72 A2 03 + jsr $FF56 ; CPU:$FA74 PRG:3A74 20 56 FF + iny ; CPU:$FA77 PRG:3A77 C8 + cpy #$06 ; CPU:$FA78 PRG:3A78 C0 06 + bne Label_FA6F ; CPU:$FA7A PRG:3A7A D0 F3 + rts ; CPU:$FA7C PRG:3A7C 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FA7D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA7D: + ldy #$05 ; CPU:$FA7D PRG:3A7D A0 05 +; ----------------------------------------------------------------------------- +; Routine: Label_FA7F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA7F: + jsr $FA8B ; CPU:$FA7F PRG:3A7F 20 8B FA + ldx #$03 ; CPU:$FA82 PRG:3A82 A2 03 + jsr $FF56 ; CPU:$FA84 PRG:3A84 20 56 FF + dey ; CPU:$FA87 PRG:3A87 88 + bpl Label_FA7F ; CPU:$FA88 PRG:3A88 10 F5 + rts ; CPU:$FA8A PRG:3A8A 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FA8B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA8B: + ldx #$10 ; CPU:$FA8B PRG:3A8B A2 10 +; ----------------------------------------------------------------------------- +; Routine: Label_FA8D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA8D: + lda $013F,x ; CPU:$FA8D PRG:3A8D BD 3F 01 + jsr $FA99 ; CPU:$FA90 PRG:3A90 20 99 FA + sta Zp7F,x ; CPU:$FA93 PRG:3A93 95 7F + dex ; CPU:$FA95 PRG:3A95 CA + bne Label_FA8D ; CPU:$FA96 PRG:3A96 D0 F5 + rts ; CPU:$FA98 PRG:3A98 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FA99 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA99: + asl a ; CPU:$FA99 PRG:3A99 0A + bcs Label_FAB4 ; CPU:$FA9A PRG:3A9A B0 18 + beq Label_FAB1 ; CPU:$FA9C PRG:3A9C F0 13 + asl a ; CPU:$FA9E PRG:3A9E 0A + sta ZpF6 ; CPU:$FA9F PRG:3A9F 85 F6 + tya ; CPU:$FAA1 PRG:3AA1 98 + cmp #$04 ; CPU:$FAA2 PRG:3AA2 C9 04 + bcs Label_FAB1 ; CPU:$FAA4 PRG:3AA4 B0 0B + sty ZpF7 ; CPU:$FAA6 PRG:3AA6 84 F7 + adc ZpF6 ; CPU:$FAA8 PRG:3AA8 65 F6 + tay ; CPU:$FAAA PRG:3AAA A8 + lda $FAC5,y ; CPU:$FAAB PRG:3AAB B9 C5 FA + ldy ZpF7 ; CPU:$FAAE PRG:3AAE A4 F7 + rts ; CPU:$FAB0 PRG:3AB0 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FAB1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FAB1: + lda #$FF ; CPU:$FAB1 PRG:3AB1 A9 FF + rts ; CPU:$FAB3 PRG:3AB3 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FAB4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FAB4: + lsr a ; CPU:$FAB4 PRG:3AB4 4A + sta ZpF6 ; CPU:$FAB5 PRG:3AB5 85 F6 + tya ; CPU:$FAB7 PRG:3AB7 98 + asl a ; CPU:$FAB8 PRG:3AB8 0A + asl a ; CPU:$FAB9 PRG:3AB9 0A + asl a ; CPU:$FABA PRG:3ABA 0A + asl a ; CPU:$FABB PRG:3ABB 0A + eor #$FF ; CPU:$FABC PRG:3ABC 49 FF + clc ; CPU:$FABE PRG:3ABE 18 + adc #$01 ; CPU:$FABF PRG:3ABF 69 01 + clc ; CPU:$FAC1 PRG:3AC1 18 + adc ZpF6 ; CPU:$FAC2 PRG:3AC2 65 F6 + cmp #$40 ; CPU:$FAC4 PRG:3AC4 C9 40 + bcs Label_FAB1 ; CPU:$FAC6 PRG:3AC6 B0 E9 + rts ; CPU:$FAC8 PRG:3AC8 60 +; ---- data $FAC9-$FAF8 (48 bytes) ---- + .byte $30, $10, $00, $0C, $00, $0C, $09, $FF, $09, $09, $FF, $FF, $12, $02, $01, $0C ; CPU:$FAC9 PRG:3AC9 30 10 00 0C 00 0C 09 FF 09 09 FF FF 12 02 01 0C + .byte $0B, $0A, $09, $FF, $14, $03, $01, $0C, $25, $24, $04, $FF, $1A, $0A, $09, $FF ; CPU:$FAD9 PRG:3AD9 0B 0A 09 FF 14 03 01 0C 25 24 04 FF 1A 0A 09 FF + .byte $3B, $21, $1C, $0C, $26, $17, $07, $08, $16, $06, $07, $08, $28, $27, $18, $08 ; CPU:$FAE9 PRG:3AE9 3B 21 1C 0C 26 17 07 08 16 06 07 08 28 27 18 08 +; ----------------------------------------------------------------------------- +; Routine: Label_FAF9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FAF9: + stx ZpF7 ; CPU:$FAF9 PRG:3AF9 86 F7 + lda $FB10,y ; CPU:$FAFB PRG:3AFB B9 10 FB + asl a ; CPU:$FAFE PRG:3AFE 0A + sta ZpFC ; CPU:$FAFF PRG:3AFF 85 FC + lda #$00 ; CPU:$FB01 PRG:3B01 A9 00 + adc #$06 ; CPU:$FB03 PRG:3B03 69 06 + sta ZpFD ; CPU:$FB05 PRG:3B05 85 FD + lda ZpF7 ; CPU:$FB07 PRG:3B07 A5 F7 + sec ; CPU:$FB09 PRG:3B09 38 + sbc #$03 ; CPU:$FB0A PRG:3B0A E9 03 + clc ; CPU:$FB0C PRG:3B0C 18 + adc ZpFC ; CPU:$FB0D PRG:3B0D 65 FC + sta ZpFC ; CPU:$FB0F PRG:3B0F 85 FC + lda #$00 ; CPU:$FB11 PRG:3B11 A9 00 + adc ZpFD ; CPU:$FB13 PRG:3B13 65 FD + sta ZpFD ; CPU:$FB15 PRG:3B15 85 FD + rts ; CPU:$FB17 PRG:3B17 60 +; ---- data $FB18-$FB2B (20 bytes) ---- + .byte $00, $0D, $1A, $27, $34, $41, $4E, $5B, $68, $75, $82, $8F, $9C, $A9, $B6, $C3 ; CPU:$FB18 PRG:3B18 00 0D 1A 27 34 41 4E 5B 68 75 82 8F 9C A9 B6 C3 + .byte $D0, $DD, $EA, $F7 ; CPU:$FB28 PRG:3B28 D0 DD EA F7 +; ----------------------------------------------------------------------------- +; Routine: Label_FB2C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FB2C: + lda ZpF8 ; CPU:$FB2C PRG:3B2C A5 F8 + cmp #$09 ; CPU:$FB2E PRG:3B2E C9 09 + bcc Label_FB55 ; CPU:$FB30 PRG:3B30 90 23 + lda ZpF9 ; CPU:$FB32 PRG:3B32 A5 F9 + cmp #$09 ; CPU:$FB34 PRG:3B34 C9 09 + bcc Label_FB39 ; CPU:$FB36 PRG:3B36 90 01 +; ----------------------------------------------------------------------------- +; Routine: Label_FB38 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FB38: + rts ; CPU:$FB38 PRG:3B38 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FB39 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FB39: + tax ; CPU:$FB39 PRG:3B39 AA + lda $FB90,x ; CPU:$FB3A PRG:3B3A BD 90 FB + tay ; CPU:$FB3D PRG:3B3D A8 + iny ; CPU:$FB3E PRG:3B3E C8 + sty ZpF6 ; CPU:$FB3F PRG:3B3F 84 F6 + lda ZpF8 ; CPU:$FB41 PRG:3B41 A5 F8 + cmp ZpF6 ; CPU:$FB43 PRG:3B43 C5 F6 + bcs Label_FB38 ; CPU:$FB45 PRG:3B45 B0 F1 + dey ; CPU:$FB47 PRG:3B47 88 + sty ZpF8 ; CPU:$FB48 PRG:3B48 84 F8 + txa ; CPU:$FB4A PRG:3B4A 8A + asl a ; CPU:$FB4B PRG:3B4B 0A +; ----------------------------------------------------------------------------- +; Routine: Label_FB4C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FB4C: + asl a ; CPU:$FB4C PRG:3B4C 0A + eor #$FF ; CPU:$FB4D PRG:3B4D 49 FF + clc ; CPU:$FB4F PRG:3B4F 18 + adc #$41 ; CPU:$FB50 PRG:3B50 69 41 + jmp $FB69 ; CPU:$FB52 PRG:3B52 4C 69 FB +; ----------------------------------------------------------------------------- +; Routine: Label_FB55 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FB55: + tax ; CPU:$FB55 PRG:3B55 AA + lda $FB90,x ; CPU:$FB56 PRG:3B56 BD 90 FB + tay ; CPU:$FB59 PRG:3B59 A8 + iny ; CPU:$FB5A PRG:3B5A C8 + sty ZpF6 ; CPU:$FB5B PRG:3B5B 84 F6 + lda ZpF9 ; CPU:$FB5D PRG:3B5D A5 F9 + cmp ZpF6 ; CPU:$FB5F PRG:3B5F C5 F6 + bcs Label_FB38 ; CPU:$FB61 PRG:3B61 B0 D5 + dey ; CPU:$FB63 PRG:3B63 88 + sty ZpF9 ; CPU:$FB64 PRG:3B64 84 F9 + txa ; CPU:$FB66 PRG:3B66 8A + asl a ; CPU:$FB67 PRG:3B67 0A + asl a ; CPU:$FB68 PRG:3B68 0A +; ----------------------------------------------------------------------------- +; Routine: Label_FB69 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FB69: + tax ; CPU:$FB69 PRG:3B69 AA + clc ; CPU:$FB6A PRG:3B6A 18 + lda Zp29 ; CPU:$FB6B PRG:3B6B A5 29 + bmi Label_FB7A ; CPU:$FB6D PRG:3B6D 30 0B + lda Zp28 ; CPU:$FB6F PRG:3B6F A5 28 + bpl Label_FB8D ; CPU:$FB71 PRG:3B71 10 1A + txa ; CPU:$FB73 PRG:3B73 8A + eor #$FF ; CPU:$FB74 PRG:3B74 49 FF + adc #$01 ; CPU:$FB76 PRG:3B76 69 01 + clc ; CPU:$FB78 PRG:3B78 18 + rts ; CPU:$FB79 PRG:3B79 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FB7A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FB7A: + lda Zp28 ; CPU:$FB7A PRG:3B7A A5 28 + bmi Label_FB87 ; CPU:$FB7C PRG:3B7C 30 09 + stx ZpF6 ; CPU:$FB7E PRG:3B7E 86 F6 + lda #$80 ; CPU:$FB80 PRG:3B80 A9 80 + sec ; CPU:$FB82 PRG:3B82 38 + sbc ZpF6 ; CPU:$FB83 PRG:3B83 E5 F6 + clc ; CPU:$FB85 PRG:3B85 18 + rts ; CPU:$FB86 PRG:3B86 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FB87 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FB87: + txa ; CPU:$FB87 PRG:3B87 8A + clc ; CPU:$FB88 PRG:3B88 18 + adc #$80 ; CPU:$FB89 PRG:3B89 69 80 + clc ; CPU:$FB8B PRG:3B8B 18 + rts ; CPU:$FB8C PRG:3B8C 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FB8D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FB8D: + txa ; CPU:$FB8D PRG:3B8D 8A + clc ; CPU:$FB8E PRG:3B8E 18 + rts ; CPU:$FB8F PRG:3B8F 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FB90 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FB90: + .byte $0B, $0B ; CPU:$FB90 PRG:3B90 0B 0B -- anc #$0B (undocumented; ca65 cannot encode) + .byte $0B, $0B ; CPU:$FB92 PRG:3B92 0B 0B -- anc #$0B (undocumented; ca65 cannot encode) + asl a ; CPU:$FB94 PRG:3B94 0A + asl a ; CPU:$FB95 PRG:3B95 0A + ora #$09 ; CPU:$FB96 PRG:3B96 09 09 + php ; CPU:$FB98 PRG:3B98 08 +; ----------------------------------------------------------------------------- +; Routine: Label_FB99 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FB99: + jsr $FB2C ; CPU:$FB99 PRG:3B99 20 2C FB + bcs Label_FBC1 ; CPU:$FB9C PRG:3B9C B0 23 + pha ; CPU:$FB9E PRG:3B9E 48 + jsr $FEA8 ; CPU:$FB9F PRG:3B9F 20 A8 FE + lda ZpFD ; CPU:$FBA2 PRG:3BA2 A5 FD + asl a ; CPU:$FBA4 PRG:3BA4 0A +; ----------------------------------------------------------------------------- +; Routine: Label_FBA5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FBA5: + lda ZpFD ; CPU:$FBA5 PRG:3BA5 A5 FD + ror a ; CPU:$FBA7 PRG:3BA7 6A + sta Zp21 ; CPU:$FBA8 PRG:3BA8 85 21 + lda ZpFC ; CPU:$FBAA PRG:3BAA A5 FC + ror a ; CPU:$FBAC PRG:3BAC 6A + sta Zp20 ; CPU:$FBAD PRG:3BAD 85 20 + pla ; CPU:$FBAF PRG:3BAF 68 + jsr $FF0E ; CPU:$FBB0 PRG:3BB0 20 0E FF + lda ZpFD ; CPU:$FBB3 PRG:3BB3 A5 FD + asl a ; CPU:$FBB5 PRG:3BB5 0A + lda ZpFD ; CPU:$FBB6 PRG:3BB6 A5 FD + ror a ; CPU:$FBB8 PRG:3BB8 6A + sta Zp23 ; CPU:$FBB9 PRG:3BB9 85 23 + lda ZpFC ; CPU:$FBBB PRG:3BBB A5 FC + ror a ; CPU:$FBBD PRG:3BBD 6A + sta Zp22 ; CPU:$FBBE PRG:3BBE 85 22 + clc ; CPU:$FBC0 PRG:3BC0 18 +; ----------------------------------------------------------------------------- +; Routine: Label_FBC1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FBC1: + rts ; CPU:$FBC1 PRG:3BC1 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FBC2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FBC2: + lda $03A0,y ; CPU:$FBC2 PRG:3BC2 B9 A0 03 + lsr a ; CPU:$FBC5 PRG:3BC5 4A + bne Label_FBD1 ; CPU:$FBC6 PRG:3BC6 D0 09 + sta Zp10,x ; CPU:$FBC8 PRG:3BC8 95 10 + sta Zp11,x ; CPU:$FBCA PRG:3BCA 95 11 + sta Zp12,x ; CPU:$FBCC PRG:3BCC 95 12 + sta Zp13,x ; CPU:$FBCE PRG:3BCE 95 13 + rts ; CPU:$FBD0 PRG:3BD0 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FBD1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FBD1: + sta ZpFA ; CPU:$FBD1 PRG:3BD1 85 FA + pha ; CPU:$FBD3 PRG:3BD3 48 + lda $0340,y ; CPU:$FBD4 PRG:3BD4 B9 40 03 + sta ZpFC ; CPU:$FBD7 PRG:3BD7 85 FC + lda $0350,y ; CPU:$FBD9 PRG:3BD9 B9 50 03 + sta ZpFD ; CPU:$FBDC PRG:3BDC 85 FD + lda #$00 ; CPU:$FBDE PRG:3BDE A9 00 + sta ZpFB ; CPU:$FBE0 PRG:3BE0 85 FB + jsr $FD8B ; CPU:$FBE2 PRG:3BE2 20 8B FD + jsr $FE4A ; CPU:$FBE5 PRG:3BE5 20 4A FE + sty Zp1C ; CPU:$FBE8 PRG:3BE8 84 1C + stx Zp1D ; CPU:$FBEA PRG:3BEA 86 1D + lda Zp20 ; CPU:$FBEC PRG:3BEC A5 20 + sta ZpFA ; CPU:$FBEE PRG:3BEE 85 FA + lda Zp21 ; CPU:$FBF0 PRG:3BF0 A5 21 + sta ZpFB ; CPU:$FBF2 PRG:3BF2 85 FB + jsr $FD8B ; CPU:$FBF4 PRG:3BF4 20 8B FD + sty Zp24 ; CPU:$FBF7 PRG:3BF7 84 24 + stx Zp25 ; CPU:$FBF9 PRG:3BF9 86 25 + ldy ZpFE ; CPU:$FBFB PRG:3BFB A4 FE + lda $0380,y ; CPU:$FBFD PRG:3BFD B9 80 03 + sta ZpFC ; CPU:$FC00 PRG:3C00 85 FC + lda $0390,y ; CPU:$FC02 PRG:3C02 B9 90 03 + sta ZpFD ; CPU:$FC05 PRG:3C05 85 FD + pla ; CPU:$FC07 PRG:3C07 68 + sta ZpFA ; CPU:$FC08 PRG:3C08 85 FA + lda #$00 ; CPU:$FC0A PRG:3C0A A9 00 + sta ZpFB ; CPU:$FC0C PRG:3C0C 85 FB + jsr $FD8B ; CPU:$FC0E PRG:3C0E 20 8B FD + jsr $FE4A ; CPU:$FC11 PRG:3C11 20 4A FE + sty Zp1E ; CPU:$FC14 PRG:3C14 84 1E + stx Zp1F ; CPU:$FC16 PRG:3C16 86 1F + lda Zp22 ; CPU:$FC18 PRG:3C18 A5 22 + sta ZpFA ; CPU:$FC1A PRG:3C1A 85 FA + lda Zp23 ; CPU:$FC1C PRG:3C1C A5 23 + sta ZpFB ; CPU:$FC1E PRG:3C1E 85 FB + jsr $FD8B ; CPU:$FC20 PRG:3C20 20 8B FD + tya ; CPU:$FC23 PRG:3C23 98 + ldy ZpFF ; CPU:$FC24 PRG:3C24 A4 FF + clc ; CPU:$FC26 PRG:3C26 18 + adc Zp24 ; CPU:$FC27 PRG:3C27 65 24 + sta a:$0012,y ; CPU:$FC29 PRG:3C29 99 12 00 + txa ; CPU:$FC2C PRG:3C2C 8A + adc Zp25 ; CPU:$FC2D PRG:3C2D 65 25 + sta a:$0013,y ; CPU:$FC2F PRG:3C2F 99 13 00 + lda Zp1E ; CPU:$FC32 PRG:3C32 A5 1E + sta ZpFC ; CPU:$FC34 PRG:3C34 85 FC + lda Zp1F ; CPU:$FC36 PRG:3C36 A5 1F + sta ZpFD ; CPU:$FC38 PRG:3C38 85 FD + lda Zp20 ; CPU:$FC3A PRG:3C3A A5 20 + sta ZpFA ; CPU:$FC3C PRG:3C3C 85 FA + lda Zp21 ; CPU:$FC3E PRG:3C3E A5 21 + sta ZpFB ; CPU:$FC40 PRG:3C40 85 FB + jsr $FD8B ; CPU:$FC42 PRG:3C42 20 8B FD + sty Zp24 ; CPU:$FC45 PRG:3C45 84 24 + stx Zp25 ; CPU:$FC47 PRG:3C47 86 25 + lda Zp1C ; CPU:$FC49 PRG:3C49 A5 1C + sta ZpFC ; CPU:$FC4B PRG:3C4B 85 FC + lda Zp1D ; CPU:$FC4D PRG:3C4D A5 1D + sta ZpFD ; CPU:$FC4F PRG:3C4F 85 FD + lda Zp22 ; CPU:$FC51 PRG:3C51 A5 22 + sta ZpFA ; CPU:$FC53 PRG:3C53 85 FA + lda Zp23 ; CPU:$FC55 PRG:3C55 A5 23 + sta ZpFB ; CPU:$FC57 PRG:3C57 85 FB + jsr $FD8B ; CPU:$FC59 PRG:3C59 20 8B FD + tya ; CPU:$FC5C PRG:3C5C 98 + ldy ZpFF ; CPU:$FC5D PRG:3C5D A4 FF + sec ; CPU:$FC5F PRG:3C5F 38 + sbc Zp24 ; CPU:$FC60 PRG:3C60 E5 24 + sta a:$0010,y ; CPU:$FC62 PRG:3C62 99 10 00 + txa ; CPU:$FC65 PRG:3C65 8A + sbc Zp25 ; CPU:$FC66 PRG:3C66 E5 25 + sta a:$0011,y ; CPU:$FC68 PRG:3C68 99 11 00 + rts ; CPU:$FC6B PRG:3C6B 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FC6C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FC6C: + lda a:$0010,y ; CPU:$FC6C PRG:3C6C B9 10 00 + sta ZpFC ; CPU:$FC6F PRG:3C6F 85 FC + lda a:$0011,y ; CPU:$FC71 PRG:3C71 B9 11 00 + sta ZpFD ; CPU:$FC74 PRG:3C74 85 FD + jsr $FE4A ; CPU:$FC76 PRG:3C76 20 4A FE + sty Zp18 ; CPU:$FC79 PRG:3C79 84 18 + stx Zp19 ; CPU:$FC7B PRG:3C7B 86 19 + lda Zp20 ; CPU:$FC7D PRG:3C7D A5 20 + sta ZpFA ; CPU:$FC7F PRG:3C7F 85 FA + lda Zp21 ; CPU:$FC81 PRG:3C81 A5 21 + sta ZpFB ; CPU:$FC83 PRG:3C83 85 FB + jsr $FD8B ; CPU:$FC85 PRG:3C85 20 8B FD + sty Zp24 ; CPU:$FC88 PRG:3C88 84 24 + stx Zp25 ; CPU:$FC8A PRG:3C8A 86 25 + ldx ZpFF ; CPU:$FC8C PRG:3C8C A6 FF + lda Zp12,x ; CPU:$FC8E PRG:3C8E B5 12 + sta ZpFC ; CPU:$FC90 PRG:3C90 85 FC + lda Zp13,x ; CPU:$FC92 PRG:3C92 B5 13 + sta ZpFD ; CPU:$FC94 PRG:3C94 85 FD + jsr $FE4A ; CPU:$FC96 PRG:3C96 20 4A FE + sty Zp1A ; CPU:$FC99 PRG:3C99 84 1A + stx Zp1B ; CPU:$FC9B PRG:3C9B 86 1B + lda Zp22 ; CPU:$FC9D PRG:3C9D A5 22 + sta ZpFA ; CPU:$FC9F PRG:3C9F 85 FA + lda Zp23 ; CPU:$FCA1 PRG:3CA1 A5 23 + sta ZpFB ; CPU:$FCA3 PRG:3CA3 85 FB + jsr $FD8B ; CPU:$FCA5 PRG:3CA5 20 8B FD + tya ; CPU:$FCA8 PRG:3CA8 98 + sec ; CPU:$FCA9 PRG:3CA9 38 + sbc Zp24 ; CPU:$FCAA PRG:3CAA E5 24 + sta Zp1E ; CPU:$FCAC PRG:3CAC 85 1E + txa ; CPU:$FCAE PRG:3CAE 8A + sbc Zp25 ; CPU:$FCAF PRG:3CAF E5 25 + sta Zp1F ; CPU:$FCB1 PRG:3CB1 85 1F + lda Zp18 ; CPU:$FCB3 PRG:3CB3 A5 18 + sta ZpFC ; CPU:$FCB5 PRG:3CB5 85 FC + lda Zp19 ; CPU:$FCB7 PRG:3CB7 A5 19 + sta ZpFD ; CPU:$FCB9 PRG:3CB9 85 FD + lda Zp22 ; CPU:$FCBB PRG:3CBB A5 22 + sta ZpFA ; CPU:$FCBD PRG:3CBD 85 FA + lda Zp23 ; CPU:$FCBF PRG:3CBF A5 23 + sta ZpFB ; CPU:$FCC1 PRG:3CC1 85 FB + jsr $FD8B ; CPU:$FCC3 PRG:3CC3 20 8B FD + sty Zp24 ; CPU:$FCC6 PRG:3CC6 84 24 + stx Zp25 ; CPU:$FCC8 PRG:3CC8 86 25 + lda Zp1A ; CPU:$FCCA PRG:3CCA A5 1A + sta ZpFC ; CPU:$FCCC PRG:3CCC 85 FC + lda Zp1B ; CPU:$FCCE PRG:3CCE A5 1B + sta ZpFD ; CPU:$FCD0 PRG:3CD0 85 FD + lda Zp20 ; CPU:$FCD2 PRG:3CD2 A5 20 + sta ZpFA ; CPU:$FCD4 PRG:3CD4 85 FA + lda Zp21 ; CPU:$FCD6 PRG:3CD6 A5 21 + sta ZpFB ; CPU:$FCD8 PRG:3CD8 85 FB + jsr $FD8B ; CPU:$FCDA PRG:3CDA 20 8B FD + tya ; CPU:$FCDD PRG:3CDD 98 + clc ; CPU:$FCDE PRG:3CDE 18 + adc Zp24 ; CPU:$FCDF PRG:3CDF 65 24 + sta Zp1C ; CPU:$FCE1 PRG:3CE1 85 1C + sta ZpFC ; CPU:$FCE3 PRG:3CE3 85 FC + txa ; CPU:$FCE5 PRG:3CE5 8A + adc Zp25 ; CPU:$FCE6 PRG:3CE6 65 25 + sta Zp1D ; CPU:$FCE8 PRG:3CE8 85 1D + sta ZpFD ; CPU:$FCEA PRG:3CEA 85 FD + jsr $FE4A ; CPU:$FCEC PRG:3CEC 20 4A FE + sty ZpFA ; CPU:$FCEF PRG:3CEF 84 FA + stx ZpFB ; CPU:$FCF1 PRG:3CF1 86 FB + jsr $FD8B ; CPU:$FCF3 PRG:3CF3 20 8B FD + sty Zp24 ; CPU:$FCF6 PRG:3CF6 84 24 + stx Zp25 ; CPU:$FCF8 PRG:3CF8 86 25 + lda Zp1E ; CPU:$FCFA PRG:3CFA A5 1E + sta ZpFC ; CPU:$FCFC PRG:3CFC 85 FC + lda Zp1F ; CPU:$FCFE PRG:3CFE A5 1F + sta ZpFD ; CPU:$FD00 PRG:3D00 85 FD + jsr $FE4A ; CPU:$FD02 PRG:3D02 20 4A FE + sty ZpFA ; CPU:$FD05 PRG:3D05 84 FA + stx ZpFB ; CPU:$FD07 PRG:3D07 86 FB + jsr $FD8B ; CPU:$FD09 PRG:3D09 20 8B FD + tya ; CPU:$FD0C PRG:3D0C 98 + clc ; CPU:$FD0D PRG:3D0D 18 + adc Zp24 ; CPU:$FD0E PRG:3D0E 65 24 + sta ZpFC ; CPU:$FD10 PRG:3D10 85 FC + txa ; CPU:$FD12 PRG:3D12 8A + adc Zp25 ; CPU:$FD13 PRG:3D13 65 25 + asl ZpFC ; CPU:$FD15 PRG:3D15 06 FC + rol a ; CPU:$FD17 PRG:3D17 2A + asl ZpFC ; CPU:$FD18 PRG:3D18 06 FC + rol a ; CPU:$FD1A PRG:3D1A 2A + asl ZpFC ; CPU:$FD1B PRG:3D1B 06 FC + rol a ; CPU:$FD1D PRG:3D1D 2A + asl ZpFC ; CPU:$FD1E PRG:3D1E 06 FC + rol a ; CPU:$FD20 PRG:3D20 2A + asl ZpFC ; CPU:$FD21 PRG:3D21 06 FC + rol a ; CPU:$FD23 PRG:3D23 2A + asl ZpFC ; CPU:$FD24 PRG:3D24 06 FC + rol a ; CPU:$FD26 PRG:3D26 2A + bcc Label_FD2D ; CPU:$FD27 PRG:3D27 90 04 + lda #$FF ; CPU:$FD29 PRG:3D29 A9 FF + bne Label_FD32 ; CPU:$FD2B PRG:3D2B D0 05 +; ----------------------------------------------------------------------------- +; Routine: Label_FD2D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FD2D: + sta ZpFD ; CPU:$FD2D PRG:3D2D 85 FD + jsr $FE5A ; CPU:$FD2F PRG:3D2F 20 5A FE +; ----------------------------------------------------------------------------- +; Routine: Label_FD32 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FD32: + ldx Zp05 ; CPU:$FD32 PRG:3D32 A6 05 + sta $03A0,x ; CPU:$FD34 PRG:3D34 9D A0 03 + lda Zp1C ; CPU:$FD37 PRG:3D37 A5 1C + sta ZpFC ; CPU:$FD39 PRG:3D39 85 FC + lda Zp1D ; CPU:$FD3B PRG:3D3B A5 1D + sta ZpFD ; CPU:$FD3D PRG:3D3D 85 FD + jsr $FD60 ; CPU:$FD3F PRG:3D3F 20 60 FD + ldx Zp05 ; CPU:$FD42 PRG:3D42 A6 05 + sta $0350,x ; CPU:$FD44 PRG:3D44 9D 50 03 + tya ; CPU:$FD47 PRG:3D47 98 + sta $0340,x ; CPU:$FD48 PRG:3D48 9D 40 03 + lda Zp1E ; CPU:$FD4B PRG:3D4B A5 1E + sta ZpFC ; CPU:$FD4D PRG:3D4D 85 FC + lda Zp1F ; CPU:$FD4F PRG:3D4F A5 1F + sta ZpFD ; CPU:$FD51 PRG:3D51 85 FD + jsr $FD60 ; CPU:$FD53 PRG:3D53 20 60 FD + ldx Zp05 ; CPU:$FD56 PRG:3D56 A6 05 + sta $0390,x ; CPU:$FD58 PRG:3D58 9D 90 03 + tya ; CPU:$FD5B PRG:3D5B 98 + sta $0380,x ; CPU:$FD5C PRG:3D5C 9D 80 03 + rts ; CPU:$FD5F PRG:3D5F 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FD60 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FD60: + asl ZpFC ; CPU:$FD60 PRG:3D60 06 FC + rol ZpFD ; CPU:$FD62 PRG:3D62 26 FD + lda $03A0,x ; CPU:$FD64 PRG:3D64 BD A0 03 + sta ZpFA ; CPU:$FD67 PRG:3D67 85 FA + lda #$00 ; CPU:$FD69 PRG:3D69 A9 00 + sta ZpFB ; CPU:$FD6B PRG:3D6B 85 FB + jsr $FDFE ; CPU:$FD6D PRG:3D6D 20 FE FD + txa ; CPU:$FD70 PRG:3D70 8A + asl ZpFC ; CPU:$FD71 PRG:3D71 06 FC + rol a ; CPU:$FD73 PRG:3D73 2A + asl ZpFC ; CPU:$FD74 PRG:3D74 06 FC + rol a ; CPU:$FD76 PRG:3D76 2A + beq Label_FD88 ; CPU:$FD77 PRG:3D77 F0 0F + cmp #$FF ; CPU:$FD79 PRG:3D79 C9 FF + beq Label_FD88 ; CPU:$FD7B PRG:3D7B F0 0B + ldy #$00 ; CPU:$FD7D PRG:3D7D A0 00 + tax ; CPU:$FD7F PRG:3D7F AA + bpl Label_FD85 ; CPU:$FD80 PRG:3D80 10 03 + lda #$FF ; CPU:$FD82 PRG:3D82 A9 FF + rts ; CPU:$FD84 PRG:3D84 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FD85 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FD85: + lda #$01 ; CPU:$FD85 PRG:3D85 A9 01 + rts ; CPU:$FD87 PRG:3D87 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FD88 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FD88: + ldy ZpFC ; CPU:$FD88 PRG:3D88 A4 FC + rts ; CPU:$FD8A PRG:3D8A 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FD8B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FD8B: + lda #$00 ; CPU:$FD8B PRG:3D8B A9 00 + sta ZpF6 ; CPU:$FD8D PRG:3D8D 85 F6 + sta ZpF7 ; CPU:$FD8F PRG:3D8F 85 F7 + lda ZpFD ; CPU:$FD91 PRG:3D91 A5 FD + beq Label_FD98 ; CPU:$FD93 PRG:3D93 F0 03 + jsr $FDA8 ; CPU:$FD95 PRG:3D95 20 A8 FD +; ----------------------------------------------------------------------------- +; Routine: Label_FD98 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FD98: + lda ZpFC ; CPU:$FD98 PRG:3D98 A5 FC + sta ZpFD ; CPU:$FD9A PRG:3D9A 85 FD + jsr $FDA8 ; CPU:$FD9C PRG:3D9C 20 A8 FD + ldx ZpF7 ; CPU:$FD9F PRG:3D9F A6 F7 + stx ZpFD ; CPU:$FDA1 PRG:3DA1 86 FD + ldy ZpF6 ; CPU:$FDA3 PRG:3DA3 A4 F6 + sty ZpFC ; CPU:$FDA5 PRG:3DA5 84 FC + rts ; CPU:$FDA7 PRG:3DA7 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FDA8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FDA8: + ldx #$04 ; CPU:$FDA8 PRG:3DA8 A2 04 +; ----------------------------------------------------------------------------- +; Routine: Label_FDAA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FDAA: + asl ZpF6 ; CPU:$FDAA PRG:3DAA 06 F6 + rol ZpF7 ; CPU:$FDAC PRG:3DAC 26 F7 + asl ZpFD ; CPU:$FDAE PRG:3DAE 06 FD + bcc Label_FDBF ; CPU:$FDB0 PRG:3DB0 90 0D + lda ZpF6 ; CPU:$FDB2 PRG:3DB2 A5 F6 + clc ; CPU:$FDB4 PRG:3DB4 18 + adc ZpFA ; CPU:$FDB5 PRG:3DB5 65 FA + sta ZpF6 ; CPU:$FDB7 PRG:3DB7 85 F6 + lda ZpF7 ; CPU:$FDB9 PRG:3DB9 A5 F7 + adc ZpFB ; CPU:$FDBB PRG:3DBB 65 FB + sta ZpF7 ; CPU:$FDBD PRG:3DBD 85 F7 +; ----------------------------------------------------------------------------- +; Routine: Label_FDBF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FDBF: + asl ZpF6 ; CPU:$FDBF PRG:3DBF 06 F6 + rol ZpF7 ; CPU:$FDC1 PRG:3DC1 26 F7 + asl ZpFD ; CPU:$FDC3 PRG:3DC3 06 FD + bcc Label_FDD4 ; CPU:$FDC5 PRG:3DC5 90 0D + lda ZpF6 ; CPU:$FDC7 PRG:3DC7 A5 F6 + clc ; CPU:$FDC9 PRG:3DC9 18 + adc ZpFA ; CPU:$FDCA PRG:3DCA 65 FA + sta ZpF6 ; CPU:$FDCC PRG:3DCC 85 F6 + lda ZpF7 ; CPU:$FDCE PRG:3DCE A5 F7 + adc ZpFB ; CPU:$FDD0 PRG:3DD0 65 FB + sta ZpF7 ; CPU:$FDD2 PRG:3DD2 85 F7 +; ----------------------------------------------------------------------------- +; Routine: Label_FDD4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FDD4: + dex ; CPU:$FDD4 PRG:3DD4 CA + bne Label_FDAA ; CPU:$FDD5 PRG:3DD5 D0 D3 + rts ; CPU:$FDD7 PRG:3DD7 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FDD8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FDD8: + lda #$00 ; CPU:$FDD8 PRG:3DD8 A9 00 + sta ZpF6 ; CPU:$FDDA PRG:3DDA 85 F6 + sta ZpF7 ; CPU:$FDDC PRG:3DDC 85 F7 + ldx #$10 ; CPU:$FDDE PRG:3DDE A2 10 +; ----------------------------------------------------------------------------- +; Routine: Label_FDE0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FDE0: + asl ZpFC ; CPU:$FDE0 PRG:3DE0 06 FC + rol ZpFD ; CPU:$FDE2 PRG:3DE2 26 FD + rol ZpF6 ; CPU:$FDE4 PRG:3DE4 26 F6 + rol ZpF7 ; CPU:$FDE6 PRG:3DE6 26 F7 + lda ZpF6 ; CPU:$FDE8 PRG:3DE8 A5 F6 + sec ; CPU:$FDEA PRG:3DEA 38 + sbc ZpFA ; CPU:$FDEB PRG:3DEB E5 FA + tay ; CPU:$FDED PRG:3DED A8 + lda ZpF7 ; CPU:$FDEE PRG:3DEE A5 F7 + sbc ZpFB ; CPU:$FDF0 PRG:3DF0 E5 FB + bcc Label_FDFA ; CPU:$FDF2 PRG:3DF2 90 06 + inc ZpFC ; CPU:$FDF4 PRG:3DF4 E6 FC + sta ZpF7 ; CPU:$FDF6 PRG:3DF6 85 F7 + sty ZpF6 ; CPU:$FDF8 PRG:3DF8 84 F6 +; ----------------------------------------------------------------------------- +; Routine: Label_FDFA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FDFA: + dex ; CPU:$FDFA PRG:3DFA CA + bne Label_FDE0 ; CPU:$FDFB PRG:3DFB D0 E3 + rts ; CPU:$FDFD PRG:3DFD 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FDFE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FDFE: + lda ZpFB ; CPU:$FDFE PRG:3DFE A5 FB + php ; CPU:$FE00 PRG:3E00 08 + bpl Label_FE06 ; CPU:$FE01 PRG:3E01 10 03 + jsr $FE37 ; CPU:$FE03 PRG:3E03 20 37 FE +; ----------------------------------------------------------------------------- +; Routine: Label_FE06 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FE06: + lda ZpFD ; CPU:$FE06 PRG:3E06 A5 FD + php ; CPU:$FE08 PRG:3E08 08 + bpl Label_FE0E ; CPU:$FE09 PRG:3E09 10 03 + jsr $FE24 ; CPU:$FE0B PRG:3E0B 20 24 FE +; ----------------------------------------------------------------------------- +; Routine: Label_FE0E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FE0E: + jsr $FDD8 ; CPU:$FE0E PRG:3E0E 20 D8 FD + plp ; CPU:$FE11 PRG:3E11 28 + bpl Label_FE1F ; CPU:$FE12 PRG:3E12 10 0B + plp ; CPU:$FE14 PRG:3E14 28 + bmi Label_FE1A ; CPU:$FE15 PRG:3E15 30 03 +; ----------------------------------------------------------------------------- +; Routine: Label_FE17 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FE17: + jsr $FE24 ; CPU:$FE17 PRG:3E17 20 24 FE +; ----------------------------------------------------------------------------- +; Routine: Label_FE1A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FE1A: + ldx ZpFD ; CPU:$FE1A PRG:3E1A A6 FD + ldy ZpFC ; CPU:$FE1C PRG:3E1C A4 FC + rts ; CPU:$FE1E PRG:3E1E 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FE1F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FE1F: + plp ; CPU:$FE1F PRG:3E1F 28 + bmi Label_FE17 ; CPU:$FE20 PRG:3E20 30 F5 + bpl Label_FE1A ; CPU:$FE22 PRG:3E22 10 F6 +; ----------------------------------------------------------------------------- +; Routine: Label_FE24 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FE24: + lda ZpFC ; CPU:$FE24 PRG:3E24 A5 FC + eor #$FF ; CPU:$FE26 PRG:3E26 49 FF + sta ZpFC ; CPU:$FE28 PRG:3E28 85 FC + lda ZpFD ; CPU:$FE2A PRG:3E2A A5 FD + eor #$FF ; CPU:$FE2C PRG:3E2C 49 FF + sta ZpFD ; CPU:$FE2E PRG:3E2E 85 FD + inc ZpFC ; CPU:$FE30 PRG:3E30 E6 FC + bne Label_FE36 ; CPU:$FE32 PRG:3E32 D0 02 + inc ZpFD ; CPU:$FE34 PRG:3E34 E6 FD +; ----------------------------------------------------------------------------- +; Routine: Label_FE36 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FE36: + rts ; CPU:$FE36 PRG:3E36 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FE37 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FE37: + lda ZpFA ; CPU:$FE37 PRG:3E37 A5 FA + eor #$FF ; CPU:$FE39 PRG:3E39 49 FF + sta ZpFA ; CPU:$FE3B PRG:3E3B 85 FA + lda ZpFB ; CPU:$FE3D PRG:3E3D A5 FB + eor #$FF ; CPU:$FE3F PRG:3E3F 49 FF + sta ZpFB ; CPU:$FE41 PRG:3E41 85 FB + inc ZpFA ; CPU:$FE43 PRG:3E43 E6 FA + bne Label_FE49 ; CPU:$FE45 PRG:3E45 D0 02 + inc ZpFB ; CPU:$FE47 PRG:3E47 E6 FB +; ----------------------------------------------------------------------------- +; Routine: Label_FE49 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FE49: + rts ; CPU:$FE49 PRG:3E49 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FE4A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FE4A: + lda ZpFD ; CPU:$FE4A PRG:3E4A A5 FD + tay ; CPU:$FE4C PRG:3E4C A8 + sta ZpFC ; CPU:$FE4D PRG:3E4D 85 FC + asl a ; CPU:$FE4F PRG:3E4F 0A + lda #$00 ; CPU:$FE50 PRG:3E50 A9 00 + adc #$FF ; CPU:$FE52 PRG:3E52 69 FF + eor #$FF ; CPU:$FE54 PRG:3E54 49 FF + sta ZpFD ; CPU:$FE56 PRG:3E56 85 FD + tax ; CPU:$FE58 PRG:3E58 AA + rts ; CPU:$FE59 PRG:3E59 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FE5A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FE5A: + lda #$00 ; CPU:$FE5A PRG:3E5A A9 00 + sta ZpF8 ; CPU:$FE5C PRG:3E5C 85 F8 + sta ZpF9 ; CPU:$FE5E PRG:3E5E 85 F9 + sta ZpFA ; CPU:$FE60 PRG:3E60 85 FA + sta ZpFB ; CPU:$FE62 PRG:3E62 85 FB + sta ZpF7 ; CPU:$FE64 PRG:3E64 85 F7 + lda #$08 ; CPU:$FE66 PRG:3E66 A9 08 + sta ZpF6 ; CPU:$FE68 PRG:3E68 85 F6 +; ----------------------------------------------------------------------------- +; Routine: Label_FE6A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FE6A: + asl ZpFC ; CPU:$FE6A PRG:3E6A 06 FC + rol ZpFD ; CPU:$FE6C PRG:3E6C 26 FD + rol ZpFA ; CPU:$FE6E PRG:3E6E 26 FA + rol ZpFB ; CPU:$FE70 PRG:3E70 26 FB + asl ZpFC ; CPU:$FE72 PRG:3E72 06 FC + rol ZpFD ; CPU:$FE74 PRG:3E74 26 FD + rol ZpFA ; CPU:$FE76 PRG:3E76 26 FA + rol ZpFB ; CPU:$FE78 PRG:3E78 26 FB + inc ZpF8 ; CPU:$FE7A PRG:3E7A E6 F8 + lda ZpFA ; CPU:$FE7C PRG:3E7C A5 FA + sec ; CPU:$FE7E PRG:3E7E 38 + sbc ZpF8 ; CPU:$FE7F PRG:3E7F E5 F8 + tax ; CPU:$FE81 PRG:3E81 AA + lda ZpFB ; CPU:$FE82 PRG:3E82 A5 FB + sbc ZpF9 ; CPU:$FE84 PRG:3E84 E5 F9 + bcs Label_FE8E ; CPU:$FE86 PRG:3E86 B0 06 + dec ZpF8 ; CPU:$FE88 PRG:3E88 C6 F8 + clc ; CPU:$FE8A PRG:3E8A 18 + jmp $FE95 ; CPU:$FE8B PRG:3E8B 4C 95 FE +; ----------------------------------------------------------------------------- +; Routine: Label_FE8E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FE8E: + sta ZpFB ; CPU:$FE8E PRG:3E8E 85 FB + stx ZpFA ; CPU:$FE90 PRG:3E90 86 FA + inc ZpF8 ; CPU:$FE92 PRG:3E92 E6 F8 + sec ; CPU:$FE94 PRG:3E94 38 +; ----------------------------------------------------------------------------- +; Routine: Label_FE95 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FE95: + rol ZpF7 ; CPU:$FE95 PRG:3E95 26 F7 + asl ZpF8 ; CPU:$FE97 PRG:3E97 06 F8 + rol ZpF9 ; CPU:$FE99 PRG:3E99 26 F9 + dec ZpF6 ; CPU:$FE9B PRG:3E9B C6 F6 + bne Label_FE6A ; CPU:$FE9D PRG:3E9D D0 CB + lda #$00 ; CPU:$FE9F PRG:3E9F A9 00 + sta ZpFD ; CPU:$FEA1 PRG:3EA1 85 FD + lda ZpF7 ; CPU:$FEA3 PRG:3EA3 A5 F7 + sta ZpFC ; CPU:$FEA5 PRG:3EA5 85 FC + rts ; CPU:$FEA7 PRG:3EA7 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FEA8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FEA8: + pha ; CPU:$FEA8 PRG:3EA8 48 + ldx #$00 ; CPU:$FEA9 PRG:3EA9 A2 00 + stx ZpFC ; CPU:$FEAB PRG:3EAB 86 FC + ldx #$01 ; CPU:$FEAD PRG:3EAD A2 01 + stx ZpFD ; CPU:$FEAF PRG:3EAF 86 FD + and #$7F ; CPU:$FEB1 PRG:3EB1 29 7F + cmp #$40 ; CPU:$FEB3 PRG:3EB3 C9 40 + beq Label_FEC5 ; CPU:$FEB5 PRG:3EB5 F0 0E + bcc Label_FEBD ; CPU:$FEB7 PRG:3EB7 90 04 + eor #$FF ; CPU:$FEB9 PRG:3EB9 49 FF + adc #$80 ; CPU:$FEBB PRG:3EBB 69 80 +; ----------------------------------------------------------------------------- +; Routine: Label_FEBD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FEBD: + tax ; CPU:$FEBD PRG:3EBD AA + lda $FECE,x ; CPU:$FEBE PRG:3EBE BD CE FE + sta ZpFC ; CPU:$FEC1 PRG:3EC1 85 FC + dec ZpFD ; CPU:$FEC3 PRG:3EC3 C6 FD +; ----------------------------------------------------------------------------- +; Routine: Label_FEC5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FEC5: + pla ; CPU:$FEC5 PRG:3EC5 68 + bpl Label_FECD ; CPU:$FEC6 PRG:3EC6 10 05 + pha ; CPU:$FEC8 PRG:3EC8 48 + jsr $FE24 ; CPU:$FEC9 PRG:3EC9 20 24 FE + pla ; CPU:$FECC PRG:3ECC 68 +; ----------------------------------------------------------------------------- +; Routine: Label_FECD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FECD: + rts ; CPU:$FECD PRG:3ECD 60 +; ---- data $FECE-$FEFD (48 bytes) ---- +; referenced by `cmp $FECE,y` at $E6D9 (operand $FECE falls inside this region) +; referenced by `cmp $FECF,y` at $E6E4 (operand $FECF falls inside this region) +; referenced by `lda $FECE,x` at $FEBE (operand $FECE falls inside this region) + .byte $00, $06, $0C, $12, $19, $1F, $25, $2B, $31, $38, $3E, $44, $4A, $50, $56, $5C ; CPU:$FECE PRG:3ECE 00 06 0C 12 19 1F 25 2B 31 38 3E 44 4A 50 56 5C + .byte $61, $67, $6D, $73, $78, $7E, $83, $88, $8E, $93, $98, $9D, $A2, $A7, $AB, $B0 ; CPU:$FEDE PRG:3EDE 61 67 6D 73 78 7E 83 88 8E 93 98 9D A2 A7 AB B0 + .byte $B5, $B9, $BD, $C1, $C5, $C9, $CD, $D1, $D4, $D8, $DB, $DE, $E1, $E4, $E7, $EA ; CPU:$FEEE PRG:3EEE B5 B9 BD C1 C5 C9 CD D1 D4 D8 DB DE E1 E4 E7 EA +; ----------------------------------------------------------------------------- +; Routine: Label_FEFE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FEFE: + cpx $F1EE ; CPU:$FEFE PRG:3EFE EC EE F1 + .byte $F3, $F4 ; CPU:$FF01 PRG:3F01 F3 F4 -- isc (ZpF4),y (undocumented; ca65 cannot encode) + inc ZpF8,x ; CPU:$FF03 PRG:3F03 F6 F8 + sbc $FCFB,y ; CPU:$FF05 PRG:3F05 F9 FB FC + sbc $FEFE,x ; CPU:$FF08 PRG:3F08 FD FE FE + .byte $FF, $FF, $FF ; CPU:$FF0B PRG:3F0B FF FF FF -- isc $FFFF,x (undocumented; ca65 cannot encode) +; ----------------------------------------------------------------------------- +; Routine: Label_FF0E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FF0E: + clc ; CPU:$FF0E PRG:3F0E 18 + adc #$40 ; CPU:$FF0F PRG:3F0F 69 40 +; ----------------------------------------------------------------------------- +; Routine: Label_FF11 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FF11: + jsr $FEA8 ; CPU:$FF11 PRG:3F11 20 A8 FE + sec ; CPU:$FF14 PRG:3F14 38 + sbc #$40 ; CPU:$FF15 PRG:3F15 E9 40 + rts ; CPU:$FF17 PRG:3F17 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FF18 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FF18: + lda ZpF9 ; CPU:$FF18 PRG:3F18 A5 F9 + ldx ZpF8 ; CPU:$FF1A PRG:3F1A A6 F8 + stx ZpF9 ; CPU:$FF1C PRG:3F1C 86 F9 + eor #$FF ; CPU:$FF1E PRG:3F1E 49 FF + clc ; CPU:$FF20 PRG:3F20 18 + adc #$08 ; CPU:$FF21 PRG:3F21 69 08 + sta ZpF8 ; CPU:$FF23 PRG:3F23 85 F8 +; ----------------------------------------------------------------------------- +; Routine: Label_FF25 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FF25: + jsr $CB92 ; CPU:$FF25 PRG:3F25 20 92 CB + jmp $FE24 ; CPU:$FF28 PRG:3F28 4C 24 FE +; ----------------------------------------------------------------------------- +; Routine: Label_FF2B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FF2B: + lda ZpF9 ; CPU:$FF2B PRG:3F2B A5 F9 + eor #$FF ; CPU:$FF2D PRG:3F2D 49 FF + clc ; CPU:$FF2F PRG:3F2F 18 + adc #$08 ; CPU:$FF30 PRG:3F30 69 08 + sta ZpF9 ; CPU:$FF32 PRG:3F32 85 F9 + lda ZpF8 ; CPU:$FF34 PRG:3F34 A5 F8 + eor #$FF ; CPU:$FF36 PRG:3F36 49 FF + clc ; CPU:$FF38 PRG:3F38 18 + adc #$08 ; CPU:$FF39 PRG:3F39 69 08 + sta ZpF8 ; CPU:$FF3B PRG:3F3B 85 F8 +; ----------------------------------------------------------------------------- +; Routine: Label_FF3D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FF3D: + jsr $FE24 ; CPU:$FF3D PRG:3F3D 20 24 FE + jmp $FE37 ; CPU:$FF40 PRG:3F40 4C 37 FE +; ----------------------------------------------------------------------------- +; Routine: Label_FF43 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FF43: + lda ZpF8 ; CPU:$FF43 PRG:3F43 A5 F8 + ldx ZpF9 ; CPU:$FF45 PRG:3F45 A6 F9 + stx ZpF8 ; CPU:$FF47 PRG:3F47 86 F8 + eor #$FF ; CPU:$FF49 PRG:3F49 49 FF + clc ; CPU:$FF4B PRG:3F4B 18 + adc #$08 ; CPU:$FF4C PRG:3F4C 69 08 + sta ZpF9 ; CPU:$FF4E PRG:3F4E 85 F9 +; ----------------------------------------------------------------------------- +; Routine: Label_FF50 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FF50: + jsr $FE24 ; CPU:$FF50 PRG:3F50 20 24 FE + jmp $CB92 ; CPU:$FF53 PRG:3F53 4C 92 CB +; ----------------------------------------------------------------------------- +; Routine: Label_FF56 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FF56: + lda #$00 ; CPU:$FF56 PRG:3F56 A9 00 + sta $01C8 ; CPU:$FF58 PRG:3F58 8D C8 01 +; ----------------------------------------------------------------------------- +; Routine: Label_FF5B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FF5B: + lda $01C8 ; CPU:$FF5B PRG:3F5B AD C8 01 + beq Label_FF5B ; CPU:$FF5E PRG:3F5E F0 FB + dex ; CPU:$FF60 PRG:3F60 CA + bne Label_FF56 ; CPU:$FF61 PRG:3F61 D0 F3 + rts ; CPU:$FF63 PRG:3F63 60 +; ----------------------------------------------------------------------------- +; Routine: IrqHandler +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +IrqHandler: + rti ; CPU:$FF64 PRG:3F64 40 +; ----------------------------------------------------------------------------- +; Routine: NmiHandler +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in 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:$FF65 PRG:3F65 48 + txa ; CPU:$FF66 PRG:3F66 8A + pha ; CPU:$FF67 PRG:3F67 48 + tya ; CPU:$FF68 PRG:3F68 98 + pha ; CPU:$FF69 PRG:3F69 48 + lda ZpF1 ; CPU:$FF6A PRG:3F6A A5 F1 + and #$E7 ; CPU:$FF6C PRG:3F6C 29 E7 + sta $2001 ; CPU:$FF6E PRG:3F6E 8D 01 20 + lda #$01 ; CPU:$FF71 PRG:3F71 A9 01 + sta $01C8 ; CPU:$FF73 PRG:3F73 8D C8 01 + lda $2002 ; CPU:$FF76 PRG:3F76 AD 02 20 + jsr $CB25 ; CPU:$FF79 PRG:3F79 20 25 CB + jsr $CC8F ; CPU:$FF7C PRG:3F7C 20 8F CC + jsr $CA52 ; CPU:$FF7F PRG:3F7F 20 52 CA + lda ZpF1 ; CPU:$FF82 PRG:3F82 A5 F1 + sta $2001 ; CPU:$FF84 PRG:3F84 8D 01 20 + jsr $C003 ; CPU:$FF87 PRG:3F87 20 03 C0 + pla ; CPU:$FF8A PRG:3F8A 68 + tay ; CPU:$FF8B PRG:3F8B A8 + pla ; CPU:$FF8C PRG:3F8C 68 + tax ; CPU:$FF8D PRG:3F8D AA + pla ; CPU:$FF8E PRG:3F8E 68 + rti ; CPU:$FF8F PRG:3F8F 40 +; ---- data $FF90-$FFFF (112 bytes) ---- +; referenced by `isc $FFFF,x` at $FF0B (operand $FFFF falls inside this region) + .byte $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$FF90 PRG:3F90 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:$FFA0 PRG:3FA0 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:$FFB0 PRG:3FB0 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:$FFC0 PRG:3FC0 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:$FFD0 PRG:3FD0 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:$FFE0 PRG:3FE0 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, $65, $FF, $0C, $E8, $64, $FF ; CPU:$FFF0 PRG:3FF0 FF FF FF FF FF FF FF FF FF FF 65 FF 0C E8 64 FF diff --git a/_wip/Lunar Pool (U)/copilot/reconstructed.lbl b/_wip/Lunar Pool (U)/copilot/reconstructed.lbl index e69de29..7fd3af2 100644 --- a/_wip/Lunar Pool (U)/copilot/reconstructed.lbl +++ b/_wip/Lunar Pool (U)/copilot/reconstructed.lbl @@ -0,0 +1,595 @@ +al 00FF65 .NmiHandler +al 00FF64 .IrqHandler +al 00FF5B .Label_FF5B +al 00FF56 .Label_FF56 +al 00FF50 .Label_FF50 +al 00FF43 .Label_FF43 +al 00FF3D .Label_FF3D +al 00FF2B .Label_FF2B +al 00FF25 .Label_FF25 +al 00FF18 .Label_FF18 +al 00FF11 .Label_FF11 +al 00FF0E .Label_FF0E +al 00FEFE .Label_FEFE +al 00FECD .Label_FECD +al 00FEBD .Label_FEBD +al 00FEC5 .Label_FEC5 +al 00FEA8 .Label_FEA8 +al 00FE95 .Label_FE95 +al 00FE8E .Label_FE8E +al 00FE6A .Label_FE6A +al 00FE5A .Label_FE5A +al 00FE4A .Label_FE4A +al 00FE49 .Label_FE49 +al 00FE37 .Label_FE37 +al 00FE36 .Label_FE36 +al 00FE24 .Label_FE24 +al 00FE17 .Label_FE17 +al 00FE1A .Label_FE1A +al 00FE1F .Label_FE1F +al 00FE0E .Label_FE0E +al 00FE06 .Label_FE06 +al 00FDFE .Label_FDFE +al 00FDFA .Label_FDFA +al 00FDE0 .Label_FDE0 +al 00FDD8 .Label_FDD8 +al 00FDD4 .Label_FDD4 +al 00FDBF .Label_FDBF +al 00FDAA .Label_FDAA +al 00FDA8 .Label_FDA8 +al 00FD98 .Label_FD98 +al 00FD8B .Label_FD8B +al 00FD85 .Label_FD85 +al 00FD88 .Label_FD88 +al 00FD60 .Label_FD60 +al 00FD32 .Label_FD32 +al 00FD2D .Label_FD2D +al 00FC6C .Label_FC6C +al 00FBD1 .Label_FBD1 +al 00FBC2 .Label_FBC2 +al 00FBA5 .Label_FBA5 +al 00FBC1 .Label_FBC1 +al 00FB99 .Label_FB99 +al 00FB90 .Label_FB90 +al 00FB87 .Label_FB87 +al 00FB8D .Label_FB8D +al 00FB7A .Label_FB7A +al 00FB69 .Label_FB69 +al 00FB4C .Label_FB4C +al 00FB38 .Label_FB38 +al 00FB39 .Label_FB39 +al 00FB55 .Label_FB55 +al 00FB2C .Label_FB2C +al 00FAF9 .Label_FAF9 +al 00FAB1 .Label_FAB1 +al 00FAB4 .Label_FAB4 +al 00FA99 .Label_FA99 +al 00FA8D .Label_FA8D +al 00FA8B .Label_FA8B +al 00FA7F .Label_FA7F +al 00FA7D .Label_FA7D +al 00FA6F .Label_FA6F +al 00FA6D .Label_FA6D +al 00FA5F .Label_FA5F +al 00FA56 .Label_FA56 +al 00FA4A .Label_FA4A +al 00FA40 .Label_FA40 +al 00FA34 .Label_FA34 +al 00FA2B .Label_FA2B +al 00FA1F .Label_FA1F +al 00FA26 .Label_FA26 +al 00FA07 .Label_FA07 +al 00F9F9 .Label_F9F9 +al 00F9E4 .Label_F9E4 +al 00F9D9 .Label_F9D9 +al 00F9D6 .Label_F9D6 +al 00F9CE .Label_F9CE +al 00F9BD .Label_F9BD +al 00F9B0 .Label_F9B0 +al 00F9AD .Label_F9AD +al 00F9A0 .Label_F9A0 +al 00F998 .Label_F998 +al 00F990 .Label_F990 +al 00F88A .Label_F88A +al 00F87F .Label_F87F +al 00F872 .Label_F872 +al 00F867 .Label_F867 +al 00F84C .Label_F84C +al 00F81A .Label_F81A +al 00F7E8 .Label_F7E8 +al 00F7BC .Label_F7BC +al 00F7A7 .Label_F7A7 +al 00F7A5 .Label_F7A5 +al 00F77A .Label_F77A +al 00F73F .Label_F73F +al 00F728 .Label_F728 +al 00F725 .Label_F725 +al 00F71A .Label_F71A +al 00F6CF .Label_F6CF +al 00F6C1 .Label_F6C1 +al 00F69D .Label_F69D +al 00F683 .Label_F683 +al 00F67D .Label_F67D +al 00F674 .Label_F674 +al 00F66B .Label_F66B +al 00F669 .Label_F669 +al 00F654 .Label_F654 +al 00F5D6 .Label_F5D6 +al 00F5C6 .Label_F5C6 +al 00F585 .Label_F585 +al 00F574 .Label_F574 +al 00F56C .Label_F56C +al 00F557 .Label_F557 +al 00F54C .Label_F54C +al 00F542 .Label_F542 +al 00F540 .Label_F540 +al 00F4B1 .Label_F4B1 +al 00F4DF .Label_F4DF +al 00F49B .Label_F49B +al 00F4F6 .Label_F4F6 +al 00F487 .Label_F487 +al 00F476 .Label_F476 +al 00F457 .Label_F457 +al 00F44D .Label_F44D +al 00F435 .Label_F435 +al 00F41B .Label_F41B +al 00F413 .Label_F413 +al 00F410 .Label_F410 +al 00F406 .Label_F406 +al 00F3E4 .Label_F3E4 +al 00F3D2 .Label_F3D2 +al 00F3AD .Label_F3AD +al 00F3BB .Label_F3BB +al 00F387 .Label_F387 +al 00F36E .Label_F36E +al 00F377 .Label_F377 +al 00F365 .Label_F365 +al 00F344 .Label_F344 +al 00F33D .Label_F33D +al 00F341 .Label_F341 +al 00F327 .Label_F327 +al 00F31F .Label_F31F +al 00F312 .Label_F312 +al 00F30F .Label_F30F +al 00F302 .Label_F302 +al 00F2EC .Label_F2EC +al 00F2E5 .Label_F2E5 +al 00F2DB .Label_F2DB +al 00F2CB .Label_F2CB +al 00F270 .Label_F270 +al 00F25B .Label_F25B +al 00F241 .Label_F241 +al 00F244 .Label_F244 +al 00F238 .Label_F238 +al 00F233 .Label_F233 +al 00F225 .Label_F225 +al 00F221 .Label_F221 +al 00F218 .Label_F218 +al 00F211 .Label_F211 +al 00F206 .Label_F206 +al 00F1F6 .Label_F1F6 +al 00F1E2 .Label_F1E2 +al 00F1D3 .Label_F1D3 +al 00F1B9 .Label_F1B9 +al 00F1AF .Label_F1AF +al 00F1BC .Label_F1BC +al 00F19A .Label_F19A +al 00F193 .Label_F193 +al 00F16A .Label_F16A +al 00F149 .Label_F149 +al 00F13F .Label_F13F +al 00F148 .Label_F148 +al 00F125 .Label_F125 +al 00F0EF .Label_F0EF +al 00F0DF .Label_F0DF +al 00F0DC .Label_F0DC +al 00F0CE .Label_F0CE +al 00F07B .Label_F07B +al 00F071 .Label_F071 +al 00F07E .Label_F07E +al 00F04D .Label_F04D +al 00F031 .Label_F031 +al 00F019 .Label_F019 +al 00F017 .Label_F017 +al 00F037 .Label_F037 +al 00EFF5 .Label_EFF5 +al 00F045 .Label_F045 +al 00EFD9 .Label_EFD9 +al 00EFD5 .Label_EFD5 +al 00EFB4 .Label_EFB4 +al 00EFB8 .Label_EFB8 +al 00EF84 .Label_EF84 +al 00EF53 .Label_EF53 +al 00EF50 .Label_EF50 +al 00EF3A .Label_EF3A +al 00EF31 .Label_EF31 +al 00EF27 .Label_EF27 +al 00EEF0 .Label_EEF0 +al 00EEE0 .Label_EEE0 +al 00EEE6 .Label_EEE6 +al 00EEB9 .Label_EEB9 +al 00EE80 .Label_EE80 +al 00EE76 .Label_EE76 +al 00EE79 .Label_EE79 +al 00EE6F .Label_EE6F +al 00EE57 .Label_EE57 +al 00EE53 .Label_EE53 +al 00EE3E .Label_EE3E +al 00EE3A .Label_EE3A +al 00EE2C .Label_EE2C +al 00EE30 .Label_EE30 +al 00EDBA .Label_EDBA +al 00EDB7 .Label_EDB7 +al 00ED8B .Label_ED8B +al 00ED86 .Label_ED86 +al 00ED5D .Label_ED5D +al 00ED4F .Label_ED4F +al 00EBB0 .Label_EBB0 +al 00E9CC .Label_E9CC +al 00E9CA .Label_E9CA +al 00E980 .Label_E980 +al 00E974 .Label_E974 +al 00E971 .Label_E971 +al 00E95D .Label_E95D +al 00E947 .Label_E947 +al 00E928 .Label_E928 +al 00E923 .Label_E923 +al 00E8FF .Label_E8FF +al 00E8B3 .Label_E8B3 +al 00E88F .Label_E88F +al 00E882 .Label_E882 +al 00E880 .Label_E880 +al 00E852 .Label_E852 +al 00E848 .Label_E848 +al 00E830 .Label_E830 +al 00E81E .Label_E81E +al 00E817 .Label_E817 +al 00E80C .Reset +al 00E802 .Label_E802 +al 00E7C0 .Label_E7C0 +al 00E7B5 .Label_E7B5 +al 00E7B1 .Label_E7B1 +al 00E78B .Label_E78B +al 00E7A6 .Label_E7A6 +al 00E771 .Label_E771 +al 00E76D .Label_E76D +al 00E748 .Label_E748 +al 00E763 .Label_E763 +al 00E721 .Label_E721 +al 00E71D .Label_E71D +al 00E71B .Label_E71B +al 00E71C .Label_E71C +al 00E706 .Label_E706 +al 00E70F .Label_E70F +al 00E6F7 .Label_E6F7 +al 00E6F8 .Label_E6F8 +al 00E6E4 .Label_E6E4 +al 00E6ED .Label_E6ED +al 00E6D9 .Label_E6D9 +al 00E6D0 .Label_E6D0 +al 00E696 .Label_E696 +al 00E68C .Label_E68C +al 00E683 .Label_E683 +al 00E67A .Label_E67A +al 00E63E .Label_E63E +al 00E60B .Label_E60B +al 00E60A .Label_E60A +al 00E5F2 .Label_E5F2 +al 00E5DF .Label_E5DF +al 00E5E7 .Label_E5E7 +al 00E5FE .Label_E5FE +al 00E598 .Label_E598 +al 00E586 .Label_E586 +al 00E582 .Label_E582 +al 00E572 .Label_E572 +al 00E570 .Label_E570 +al 00E564 .Label_E564 +al 00E57B .Label_E57B +al 00E550 .Label_E550 +al 00E54A .Label_E54A +al 00E53E .Label_E53E +al 00E517 .Label_E517 +al 00E50B .Label_E50B +al 00E4F9 .Label_E4F9 +al 00E4DC .Label_E4DC +al 00E4E6 .Label_E4E6 +al 00E4C1 .Label_E4C1 +al 00E4B9 .Label_E4B9 +al 00E4AA .Label_E4AA +al 00E48D .Label_E48D +al 00E473 .Label_E473 +al 00E43B .Label_E43B +al 00E47B .Label_E47B +al 00E429 .Label_E429 +al 00E417 .Label_E417 +al 00E415 .Label_E415 +al 00E40E .Label_E40E +al 00E405 .Label_E405 +al 00E3FB .Label_E3FB +al 00E3E7 .Label_E3E7 +al 00E3CE .Label_E3CE +al 00E3BF .Label_E3BF +al 00E3BE .Label_E3BE +al 00E3B1 .Label_E3B1 +al 00E3AB .Label_E3AB +al 00E3AF .Label_E3AF +al 00E39C .Label_E39C +al 00E392 .Label_E392 +al 00E39A .Label_E39A +al 00E381 .Label_E381 +al 00E37C .Label_E37C +al 00E370 .Label_E370 +al 00E367 .Label_E367 +al 00E364 .Label_E364 +al 00E34A .Label_E34A +al 00E349 .Label_E349 +al 00E341 .Label_E341 +al 00E333 .Label_E333 +al 00E322 .Label_E322 +al 00E31D .Label_E31D +al 00E318 .Label_E318 +al 00E30F .Label_E30F +al 00E30D .Label_E30D +al 00E304 .Label_E304 +al 00E2FE .Label_E2FE +al 00E2DB .Label_E2DB +al 00E2D7 .Label_E2D7 +al 00E2C8 .Label_E2C8 +al 00E2BB .Label_E2BB +al 00E2B2 .Label_E2B2 +al 00E2A2 .Label_E2A2 +al 00E286 .Label_E286 +al 00E275 .Label_E275 +al 00E270 .Label_E270 +al 00E25C .Label_E25C +al 00E24F .Label_E24F +al 00E240 .Label_E240 +al 00E22F .Label_E22F +al 00E215 .Label_E215 +al 00E20D .Label_E20D +al 00E202 .Label_E202 +al 00E1F2 .Label_E1F2 +al 00E1ED .Label_E1ED +al 00E1BB .Label_E1BB +al 00E1AE .Label_E1AE +al 00E1AC .Label_E1AC +al 00E1E5 .Label_E1E5 +al 00E1A4 .Label_E1A4 +al 00E19D .Label_E19D +al 00E194 .Label_E194 +al 00E17C .Label_E17C +al 00E171 .Label_E171 +al 00E162 .Label_E162 +al 00E15D .Label_E15D +al 00E147 .Label_E147 +al 00E145 .Label_E145 +al 00E14E .Label_E14E +al 00E118 .Label_E118 +al 00E113 .Label_E113 +al 00E0E7 .Label_E0E7 +al 00E0E3 .Label_E0E3 +al 00E0FE .Label_E0FE +al 00E0E1 .Label_E0E1 +al 00E104 .Label_E104 +al 00E0BA .Label_E0BA +al 00E0B1 .Label_E0B1 +al 00E0A4 .Label_E0A4 +al 00E089 .Label_E089 +al 00E094 .Label_E094 +al 00E079 .Label_E079 +al 00E055 .Label_E055 +al 00E062 .Label_E062 +al 00E048 .Label_E048 +al 00E040 .Label_E040 +al 00E02F .Label_E02F +al 00E01E .Label_E01E +al 00D4ED .Label_D4ED +al 00D4E4 .Label_D4E4 +al 00D4CC .Label_D4CC +al 00D4C4 .Label_D4C4 +al 00D4BD .Label_D4BD +al 00D4B6 .Label_D4B6 +al 00D4AF .Label_D4AF +al 00D4AD .Label_D4AD +al 00D48F .Label_D48F +al 00D488 .Label_D488 +al 00D487 .Label_D487 +al 00D45E .Label_D45E +al 00D444 .Label_D444 +al 00D449 .Label_D449 +al 00D45D .Label_D45D +al 00D41F .Label_D41F +al 00D405 .Label_D405 +al 00D400 .Label_D400 +al 00D3E5 .Label_D3E5 +al 00D41E .Label_D41E +al 00D3D3 .Label_D3D3 +al 00D3CB .Label_D3CB +al 00D3BF .Label_D3BF +al 00D3B3 .Label_D3B3 +al 00D3A0 .Label_D3A0 +al 00D39F .Label_D39F +al 00D392 .Label_D392 +al 00D31B .Label_D31B +al 00D317 .Label_D317 +al 00D30D .Label_D30D +al 00D2DF .Label_D2DF +al 00D300 .Label_D300 +al 00D2D4 .Label_D2D4 +al 00D29C .Label_D29C +al 00D291 .Label_D291 +al 00D28F .Label_D28F +al 00D22C .Label_D22C +al 00D222 .Label_D222 +al 00D212 .Label_D212 +al 00D20A .Label_D20A +al 00D1BA .Label_D1BA +al 00D197 .Label_D197 +al 00D174 .Label_D174 +al 00D151 .Label_D151 +al 00D129 .Label_D129 +al 00D12C .Label_D12C +al 00D0F3 .Label_D0F3 +al 00D0E4 .Label_D0E4 +al 00D0D5 .Label_D0D5 +al 00D073 .Label_D073 +al 00D088 .Label_D088 +al 00D0C3 .Label_D0C3 +al 00D0B1 .Label_D0B1 +al 00D047 .Label_D047 +al 00D03D .Label_D03D +al 00D05B .Label_D05B +al 00D02D .Label_D02D +al 00D026 .Label_D026 +al 00D017 .Label_D017 +al 00D00D .Label_D00D +al 00D004 .Label_D004 +al 00CFE5 .Label_CFE5 +al 00CFDE .Label_CFDE +al 00CFA6 .Label_CFA6 +al 00CF9B .Label_CF9B +al 00CE25 .Label_CE25 +al 00CE14 .Label_CE14 +al 00CDF4 .Label_CDF4 +al 00CDE4 .Label_CDE4 +al 00CE09 .Label_CE09 +al 00CDDA .Label_CDDA +al 00CDD3 .Label_CDD3 +al 00CDB9 .Label_CDB9 +al 00CDAE .Label_CDAE +al 00CD9D .Label_CD9D +al 00CD73 .Label_CD73 +al 00CD7E .Label_CD7E +al 00CD65 .Label_CD65 +al 00CD5F .Label_CD5F +al 00CD58 .Label_CD58 +al 00CD3C .Label_CD3C +al 00CD1C .Label_CD1C +al 00CD0E .Label_CD0E +al 00CCF3 .Label_CCF3 +al 00CCD9 .Label_CCD9 +al 00CCE5 .Label_CCE5 +al 00CCA9 .Label_CCA9 +al 00CCBA .Label_CCBA +al 00CC91 .Label_CC91 +al 00CC8F .Label_CC8F +al 00CC7D .Label_CC7D +al 00CC7B .Label_CC7B +al 00CC49 .Label_CC49 +al 00CC5E .Label_CC5E +al 00CC2E .Label_CC2E +al 00CC29 .Label_CC29 +al 00CC12 .Label_CC12 +al 00CC05 .Label_CC05 +al 00CBFD .Label_CBFD +al 00CBFB .Label_CBFB +al 00CBF4 .Label_CBF4 +al 00CBE5 .Label_CBE5 +al 00CBDC .Label_CBDC +al 00CBC9 .Label_CBC9 +al 00CBC8 .Label_CBC8 +al 00CBB9 .Label_CBB9 +al 00CBB2 .Label_CBB2 +al 00CBAE .Label_CBAE +al 00CBA9 .Label_CBA9 +al 00CB92 .Label_CB92 +al 00CB82 .Label_CB82 +al 00CB7F .Label_CB7F +al 00CB6F .Label_CB6F +al 00CB69 .Label_CB69 +al 00CB66 .Label_CB66 +al 00CB61 .Label_CB61 +al 00CB5A .Label_CB5A +al 00CB4F .Label_CB4F +al 00CB50 .Label_CB50 +al 00CB45 .Label_CB45 +al 00CB39 .Label_CB39 +al 00CB30 .Label_CB30 +al 00CB2B .Label_CB2B +al 00CB25 .Label_CB25 +al 00CB1D .Label_CB1D +al 00CAF7 .Label_CAF7 +al 00CABD .Label_CABD +al 00CAB9 .Label_CAB9 +al 00CAAE .Label_CAAE +al 00CAA3 .Label_CAA3 +al 00CA8F .Label_CA8F +al 00CA86 .Label_CA86 +al 00CA77 .Label_CA77 +al 00CA6F .Label_CA6F +al 00CA60 .Label_CA60 +al 00CA52 .Label_CA52 +al 00CA48 .Label_CA48 +al 00CA42 .Label_CA42 +al 00CA3C .Label_CA3C +al 00CA38 .Label_CA38 +al 00CA2E .Label_CA2E +al 00CA21 .Label_CA21 +al 00C475 .Label_C475 +al 00C445 .Label_C445 +al 00C471 .Label_C471 +al 00C429 .Label_C429 +al 00C415 .Label_C415 +al 00C416 .Label_C416 +al 00C409 .Label_C409 +al 00C404 .Label_C404 +al 00C401 .Label_C401 +al 00C3FC .Label_C3FC +al 00C3F5 .Label_C3F5 +al 00C3F0 .Label_C3F0 +al 00C3EB .Label_C3EB +al 00C3E0 .Label_C3E0 +al 00C3DA .Label_C3DA +al 00C3C7 .Label_C3C7 +al 00C3BE .Label_C3BE +al 00C3BC .Label_C3BC +al 00C3AE .Label_C3AE +al 00C392 .Label_C392 +al 00C38A .Label_C38A +al 00C39F .Label_C39F +al 00C331 .Label_C331 +al 00C332 .Label_C332 +al 00C321 .Label_C321 +al 00C32A .Label_C32A +al 00C314 .Label_C314 +al 00C304 .Label_C304 +al 00C2FE .Label_C2FE +al 00C2EC .Label_C2EC +al 00C306 .Label_C306 +al 00C2CB .Label_C2CB +al 00C2CA .Label_C2CA +al 00C2BB .Label_C2BB +al 00C2B8 .Label_C2B8 +al 00C2AD .Label_C2AD +al 00C29E .Label_C29E +al 00C294 .Label_C294 +al 00C28D .Label_C28D +al 00C275 .Label_C275 +al 00C286 .Label_C286 +al 00C22F .Label_C22F +al 00C21C .Label_C21C +al 00C20C .Label_C20C +al 00C205 .Label_C205 +al 00C200 .Label_C200 +al 00C1DA .Label_C1DA +al 00C1D5 .Label_C1D5 +al 00C1D1 .Label_C1D1 +al 00C1C0 .Label_C1C0 +al 00C1A2 .Label_C1A2 +al 00C18D .Label_C18D +al 00C0C0 .Label_C0C0 +al 00C0A9 .Label_C0A9 +al 00C0A1 .Label_C0A1 +al 00C092 .Label_C092 +al 00C082 .Label_C082 +al 00C07C .Label_C07C +al 00C072 .Label_C072 +al 00C06A .Label_C06A +al 00C054 .Label_C054 +al 00C05F .Label_C05F +al 00C02E .Label_C02E +al 00C024 .Label_C024 +al 00C01B .Label_C01B +al 00C00C .Label_C00C +al 00C00A .Label_C00A +al 00C003 .Label_C003 diff --git a/_wip/MUSCLE (U)/OVERVIEW.md b/_wip/MUSCLE (U)/OVERVIEW.md deleted file mode 100644 index 6cca816..0000000 --- a/_wip/MUSCLE (U)/OVERVIEW.md +++ /dev/null @@ -1,223 +0,0 @@ -# MUSCLE (U) — Pass 3 (data names and structures) - -ROM: `_wip/MUSCLE (U)/M.U.S.C.L.E. (U).nes` (24,592 bytes, iNES). Status: **PASS 3 COMPLETE — -byte-identical.** All three passes are done: Pass 1 split code from data, Pass 2 replaced every -`Label_XXXX` and 87 zero-page aliases, Pass 3 named and structured every data region, finished the -routine descriptions, and resolved the reused zero page and the unreachable stubs. - -`make regen` in `copilot/` replays Pass 1 → Pass 3 from `prg.bin` and is byte-for-byte -reproducible. Every instruction still carries its `; CPU:$xxxx PRG:xxxx AA BB` audit comment, so -none of this touched a byte. - -| | Result | -|---|---| -| Code | 10,634 bytes (5,253 instructions) across 705 routines — 0 `Label_XXXX` remaining | -| Data | 5,750 bytes across 69 named regions — 0 unlabelled blocks | -| Structured tables | 127 `.word` entries emitted one per line with their resolved target | -| Routine descriptions | 0 boilerplate `; Global:` lines remaining (94 hand-written, 606 generated from call sites) | -| Zero page | 163 aliases: 89 named, 1 reused byte carrying two names, 73 `ZpXX` | -| Build | **Byte-identical ROM verified.** | - -## ROM Facts - -| Property | Value | -|----------|-------| -| Mapper | 0 (NROM) | -| PRG | 16 KB, mapped **low** at $8000–$BFFF (mirrored to $C000–$FFFF) | -| CHR | 8 KB | -| Mirroring | Horizontal (header byte 6 = $01) | -| Battery / trainer | none | -| ROM SHA-256 | `d3da17f2b67d517e4d519659407d6f0e3cd7a2a4d89d31da6bb2727afce798dd` | -| PRG SHA-256 | `c9061b6d3d06f56e3c2f89337d8e59c159f494ff9efad50852fcd19621f0b03e` | - -**The skeleton's `$C000` assumption was wrong.** A 16 KB NROM PRG is normally mirrored from -`$C000`, but the RESET vector is `$8000`, so this image is wired to `$8000` and every address in -the source (and in `linker.cfg`) is `$8000`-based. The CPU still fetches the vectors from the -mirror at `$FFFA`, which is why `InterruptVectors` is the last six bytes of the PRG. - -## Interrupt Vectors (PRG $3FFA–$3FFF) - -| Vector | Target | Note | -|--------|--------|------| -| NMI | `$86CB` (`NmiHandler`) | the entire per-frame update; see flow below | -| RESET | `$8000` (`Reset`) | confirms the low mapping | -| IRQ | `$8764` (`IrqHandler`) | a single `RTI`, shared with the NMI epilogue; see below | - -## Power-On Flow - -`Reset` ($8000): - -1. `sei`, `ldx #$FF`, `stx $0320`, `txs` — X points the stack at the top of page 1 and `$0320` - is set to $FF as the "an NMI already fired during init" latch. -2. Two `lda $2002 / bpl` spin loops blank the PPU and confirm vblank. Each write is followed by a - `nop` before its poll ($800D, $8018) — the align-before-read habit of the original assembler. -3. `$4017 = $40` (APU frame counter IRQ inhibit), `$4010 = 0`, and zero the DMC address/length pair - at zero page `$FA`/`$FB` (the same two bytes the controller reader later reuses). -4. Clear `$0326`, `$032B`, `$032C`, zero page `$FF`, then fill `$0300-$032C` with zero. -5. Set `SourcePointerLo/Hi = $9E/$B8` and `DestinationPointerLo/Hi = $00/$04`, then run - `UpdateNametableFromStream`, which decodes the compressed nametable into $0400. -6. If the stream actually changed VRAM, latch the tighter scroll bound into `$0328-$032A`, reset the - frame counters to 0/1/2/3, and fall into `StartStageSequence`. - -`NmiHandler` ($86CB): - -1. Push A, X, Y in that order. -2. `lda $0320 / beq $86D8 / jmp $8759`. Reset leaves `$0320 = $FF`, so the **first** NMI skips the - frame update entirely; from then on `$0320` is cleared each frame (see 6) and this is a - fall-through. -3. Set `$0320 = $FF` and bump the 16-bit `FrameCounterLo/Hi` in zero page `$24`/`$25`. -4. `$2001 = 0` (blank rendering), `$2003 = 0`, `$4014 = $02` — OAM DMA from `$0200`. -5. Dispatch on the game state at `$0322`: zero goes to the `SubModeFlag` test, negative jumps to - the object-list housekeeping at `$86AD`, positive falls into `UpdateRoundLogic`. The branches - call `PollControllerAndAdvance`, `UpdateStageActors`, `UpdateObjectCollisions`, - `RunGameStateDispatcher`, `BuildOamList` and `PlayDeathSequence` in turn. -6. `FinishNmiUpdates` ($8751): `lda $0321 / bne $8759` — the `$0320` latch is cleared **only** when - `$0321` is zero, so a frame that requested continued work stays latched. Then `lda $2002` to - release the PPU address latch, `jsr UpdateSoundFrame`, and `pla/tay/pla/tax/pla`. - -**The IRQ vector word is the NMI epilogue's `RTI`.** After the three `pla`s the next byte is -`$8764`, which is both `IrqHandler` and the `rti` that ends every NMI — one `RTI` serving two -vectors. The game never re-enables interrupts, so the IRQ is unreachable in practice. - -## Architecture: this ROM dispatches by jump table, not by direct call - -A plain recursive trace from the vectors reaches only 50.6% of the PRG. The gap is **not** dead -code — it is reached through four dispatch tables and two zero-page indirect jumps that a static -descender cannot follow. Resolving them took code coverage to **64.9%**. - -| Mechanism | Location | Size | Index | -|-----------|----------|------|-------| -| `BytecodeProgramPointerTable` | `$8CEF` | 38 × 16-bit | `(token & $3F)` at `$9AD8` | -| `BytecodeHandlerTable` | `$9237` | 40 × 16-bit | `token - $C8` at `$9AF9` | -| `SecondaryBytecodeHandlerTable` | `$9F2B` | 16 × 16-bit | `(token & $0F)` at `$9F85` | -| `LevelVramWriterTable` | `$AC35` | 3 × 16-bit | the level byte `$0326` at `$AC28` | -| `DispatchThroughPointer` | `jmp ($001C)` at `$9B05` | — | reached from the first three tables | -| `jmp ($0010)` | `$AC32` | — | reached from `LevelVramWriterTable` | - -`RunBytecodeInterpreter` ($9AE8) reads a token through `(BytecodeStreamPointerLo),y`; tokens -`$C8`–`$EF` are converted to a handler address and dispatched through `jmp ($001C)`; everything -else is an operand consumed by the running handler. - -**The handler tables have holes.** The interpreter masks the program index with `$3F`, so -`BytecodeProgramPointerTable` is indexed 0–63 — but entry 38 already reads the first byte of -`BytecodeProgram_00`, so the table is exactly **38** entries and the caller must guarantee a -smaller index. `BytecodeHandlerTable` entries 0 and 2 hold `$928D` and `$9287`, which are the -addresses of the code immediately after the table: slots the assembler never filled. - -## Pass 3 — Data Structure - -All 69 data regions are labelled. The four composite regions from Pass 1 were split into their -real tables using the readers in decoded code: - -### `$8CEF–$9286` (1,432 bytes) → three structures - -| Region | Size | What it is | -|--------|------|------------| -| `BytecodeProgramPointerTable` `$8CEF–$8D3A` | 76 | 38 × `.word`, targets printed per entry | -| `BytecodeProgram_00` … `BytecodeProgram_36` `$8D3B–$9236` | 1,034 | the 37 distinct programs, each labelled with the table indices that reach it | -| `BytecodeHandlerTable` `$9237–$9286` | 80 | 40 × `.word` opcode handlers | - -The programs are recovered from the pointer table: sort the 38 entries, and each program runs from -one entry to the next. The two duplicate entries account for 37 distinct programs. - -### `$B0CB–$BFFF` (3,893 bytes) → eleven structures - -| Region | Size | What it is | -|--------|------|------------| -| `SoundNotePeriodTable` `$B0CB–$B0E2` | 24 | 12 × `.word` tone periods (`cmp #$0C` bounds the index) | -| `SoundNoteDurationTable` `$B0E3–$B0F2` | 16 | note durations, index `duration - $F0` | -| `ApuChannelEnableBitsSet` `$B0F3–$B0F6` | 4 | OR-ed into `ApuEnableMask`, indexed by `channel*4` | -| `ApuChannelEnableBitsClear` `$B0F7–$B0FA` | 4 | AND-ed into `ApuEnableMask`, same index | -| `StageNametableAndObjectData` `$B0FB–$B91A` + `_1` `$B971–$BD27` + `_2` `$BD2A–$BEBF` | 3,523 | the per-stage payload | -| `StageDataFiller` `$B91B–$B970` | 86 | an 86-byte `$FF` pad between stage blocks | -| `StageDataPointerLow` `$BD28–$BD29` | 2 | one base offset per player; `$32` apart | -| `StageDataTail` `$BED0–$BF8F` | 192 | tail of the stage block | -| `InitialOamAttributes` / `InitialOamTiles` `$BEC0–$BECF` | 16 | 8 entries each, `ldx #$07` | -| `VramBlockByteCounts` / `VramBlockSourceLowBytes` `$BF90–$BF9F` | 16 | 8 transfer blocks each; high byte always `$02` | -| `SoundSequenceAndLevelData` `$BFA0–$BFFA` | 91 | the `$B1A1`/`$B1B0`/`$B2B9`/`$B3B2` sequences the sound engine points at | -| `InterruptVectors` `$BFFB–$BFFF` | 5 | NMI / RESET / IRQ | - -The stage payload is reached through `StageDataPointerLow` plus the 16-bit offset the bytecode -stream carries, so no constant address indexes it and its record structure is not resolvable from -a static trace. That is recorded in the source rather than guessed at. - -### `$A5F4–$A65F` (108 bytes) → two structures - -`StageDescriptorPointerTable` ($A5F4–$A617, 18 × `.word`) and `StageDescriptorData` ($A618–$A65F). -Two readers share the table: one reads `(A & $1E)` from entry 0, the other starts at entry 9, and -entry 18 already reads descriptor text — so it is exactly 18 entries. The targets sit twelve bytes -apart ($A618, $A624, $A630, $A63C, $A648) with a final ten-byte record at $A654; each is a short -header followed by a descending run of tile indices. - -### Remaining tables - -| Region | Size | What it is | -|--------|------|------------| -| `AttributeBlockDeltaTable` `$8B7D–$8B91` | 21 | 7 × 3-byte `{source lo, source hi, destination lo}` deltas | -| `OamShadowTemplate` `$9EF4–$9F13` | 32 | the initial OAM block copied into $0300 | -| `VramRunFillValues` `$ACBD–$ACC8` | 12 | the 12 fill values the VRAM run tokens `$B8`–`$C3` select | -| `AnimationFrameCollisionBits` `$AE35–$AE44` | 16 | animation frame → collision flag bits | -| `StandaloneBytecodeProgram` … `_3` | 194 | four token programs **not** in `BytecodeProgramPointerTable` | - -## What Pass 3 settled - -**The `$14`/`$15` reuse.** These are both the 16-bit block counter for the compressed-VRAM -transfer *and* the accumulator for the collision bit flags. `locals.inc` carries both names, and -`zero_page_ranges.tsv` applies `StreamBlockCountHi` only inside `AdvanceCountWord`, so the same -byte is not mislabelled at all 53 of its other uses. This is the alias pattern `AGENTS.md` asks -for — `RandomStateAlt = $E4 beside RandomState0 = $54` — done with a range instead of a blind -rename. - -**The four hand-seeded entries are provably dead.** `$8644`, `$8653`, `$9CAD` and `$ABF7` have no -16-bit reference anywhere in the image except `jsr $8644` at `$8654`, and none of them appears in -either bytecode handler table. They are kept as code — `rts`-terminated and register-plausible — -but their headers now say so explicitly rather than leaving a reader to wonder. - -**`$AF37–$AF3A` stays data.** `lda $E9 / bne $AF34` sits right after the `rts` that ends -`InitializeSoundEngine` and branches back into the middle of it. Unreachable, incoherent as a -routine, and referenced by nothing. It is labelled `UnreachableSoundInitIsland` so the decision is -visible. - -**Every routine header now says something.** The 94 subsystem routines keep hand-written -descriptions; the other 606 get a generated line naming the routine and its visible call sites, -which is factual. Nothing still reads "Contextual control-flow entry identified from its parent -routine". - -## `copilot/` Contents - -| File | Purpose | -|------|---------| -| `rom.nes` | symlink to `../M.U.S.C.L.E. (U).nes` | -| `prg.bin` / `header.bin` / `chr.bin` | split image (`_tools/splitnes.py`) | -| `prg.s` | fully classified and named PRG source (12,922 lines) | -| `header.s` / `chr.s` | `incbin` of the untouched header and CHR | -| `symbols.inc` | shared NES hardware constants | -| `locals.inc` | 163 zero-page aliases with read/write counts and referencing addresses | -| `routine_names.tsv` | Pass 2 routine names (address → name) | -| `label_names.tsv` | generated: the full `Label_XXXX` → final name map | -| `zero_page_names.tsv` | Pass 2 zero-page names with usage notes | -| `zero_page_ranges.tsv` | Pass 3 range-scoped names for reused bytes | -| `data_regions.tsv` | Pass 3 data-region labels, record formats and notes | -| `routine_purposes.tsv` | the 94 hand-written `; Global:` descriptions | -| `linker.cfg` | HEADER at $0000, PRG at **$8000**, CHR at $0000 | -| `Makefile` | `all` builds and byte-compares; `pass1` / `pass2` / `regen` regenerate | - -## Build - -```bash -cd "_wip/MUSCLE (U)/copilot" -make # header.o + prg.o + chr.o -> reconstructed.nes, cmp vs rom.nes -# "Byte-identical ROM verified." -make pass1 # re-run _tools/nesdis.py with the recorded classification flags -make pass2 # pass1 + naming + descriptions + data structuring + locals.inc -make regen # same as pass2; the whole pipeline is byte-for-byte reproducible -``` - -## Still Open - -* **Promote to the numbered inventory.** The project still lives in `_wip/`; moving it to a - top-level `/copilot/` is the last mechanical step, keeping the NROM-at-`$8000` note. -* **The stage payload record structure** (`$B0FB–$BEBF`, 3,523 bytes) is named but not decoded. - Working it out needs emulation or a token-level trace of the stage scripts, not static analysis. -* **`BytecodeProgram_00`–`_36` are not disassembled.** They are the game's scripting layer; a - token-level disassembler keyed off `BytecodeHandlerTable` would turn them into readable code. \ No newline at end of file diff --git a/_wip/Mario Bros (JU)/OVERVIEW.md b/_wip/Mario Bros (JU)/OVERVIEW.md index 792efb7..a8afad2 100644 --- a/_wip/Mario Bros (JU)/OVERVIEW.md +++ b/_wip/Mario Bros (JU)/OVERVIEW.md @@ -1,4 +1,4 @@ -# Mario Bros (JU) — Skeleton Project +# Mario Bros (JU) — Disassembly ROM: `_wip/Mario Bros (JU)/Mario Bros (JU).nes` (24,592 bytes, iNES). Status: **SKELETON — not yet disassembled.** The entire 16 KB PRG bank is a single unclassified block; `copilot/prg.s` is the default-project skeleton (`default_project.tar.gz`) that reproduces it as one `.incbin`. The skeleton build is **byte-identical** at the PRG level. @@ -45,9 +45,128 @@ cd "_wip/Mario Bros (JU)/copilot" make # → cmp reconstructed_prg.bin prg.bin → "BYTE-IDENTICAL" ``` +## Pass Status + +| Pass | Status | Description | +|------|--------|-------------| +| Pass 0 | Superseded | `prg.s` was a 12-line `.incbin` of the whole PRG — no disassembly at all | +| Pass 1 | **Complete** | 5,735 instructions / **11,829 code bytes (72.2%)** / 4,555 data bytes. Byte accounting exact: 11,800 + 4,584 = 16,384. 937 labels, 937 routine headers | +| Pass 2 | **Substantial** | **252 subroutine entry points named** (all `jsr`/`jmp` targets resolved from raw `$XXXX` to labels): **90 semantic names** (audio/sound engine, gameplay helpers) + **165 address-based `SubCxxxx` names** for the remainder. **667 `Label_Cxxxx` internal branch targets remain** — these are local control-flow targets (loop starts, branch destinations) within routines, not subroutine entry points, and do not need semantic names for the call graph to be readable. Zero raw `$XXXX` call operands remain. | +| Pass 3 | Outstanding | Data regions inside the 4,555 unreached bytes need naming | + +### How Pass 1 got to 72.2% + +| Step | Instructions | Code | +|------|--------------|------| +| Vectors + direct `jsr`/`jmp`/branch, official opcodes | 1,185 | 2,392 B (14.6%) | +| `--undocumented` (105 extra NMOS opcodes) | 1,210 | 2,445 B (14.9%) | +| `--auto-seed` (recovered 61 table-referenced entries) | 4,187 | 8,375 B (51.1%) | +| `--extra-seed 0xC0B6,0xC5A3` | **5,735** | **11,829 B (72.2%)** | + +A plain vector trace reaches only 14.6% because almost all of this game sits +behind computed dispatch. + +### The dispatch mechanisms + +**1. Function-pointer tables, dispatched through the stack.** `$CD9E` is the +single choke point: + +``` +$CDA1 pla / sta $14 ; pop the table address the caller pushed +$CDA4 pla / sta $15 +$CDA7 lda ($14),y / tax ; read the entry, indexed by A*2 +$CDAB lda ($14),y / sta $15 +$CDB1 jmp ($0014) ; and jump to it +``` + +The table pointer arrives via `pla`, not `lda`, so it cannot be followed +statically from the dispatcher — the pushed value is only known in the caller's +frame. This is why `INDIRECT: [('0xcdb1', '0x14')]` is reported and left +unfollowed. + +**2. A 20-entry table of `JSR` thunks at `$C5A3`.** Probing it linearly yields +twenty valid `jsr`s followed by `rts`: + +``` +$C5A3 jsr $D56E / jsr $D202 / jsr $D301 / jsr $C5DB / jsr $C66A / jsr $E783 ... +``` + +Seeding `$C5A3` pulls in all twenty targets at once, which is most of the jump +from 51% to 72%. + +**3. The NMI phase dispatcher at `$C0B6`**, reached only by computed dispatch: + +``` +$C0B6 lda $B0 / beq $C0BF +$C0BA lda $0320 / bne $C0C2 +$C0BF jmp $C149 +``` + +Seeding `$C0B6` recovered 677 bytes that the vector trace could not see. + +### Tracer fixes required to get there + +Two overlapping-decode bugs had to be fixed in `_tools/nesdis.py` first: + +* **Control-flow targets must win over fall-through.** `bne` at `$C4BA` targets + `$C528`, but the fall-through path had decoded `$C527` as a 2-byte + `NOP #$A5` whose operand swallowed `$C528`. No real assembler branches into + the middle of an instruction, so the spanning decode is now dropped in favour + of the target. Its bytes fall out as data, so byte accounting is unaffected. +* **Branch targets inside a surviving instruction must be pruned.** Otherwise + `emit_code`'s linear walk consumes those bytes as an operand, the label is + referenced but never defined, and **the file does not assemble at all** — + `Error: Symbol 'Label_C528' is undefined`. + +Neither change affects any already-regen-stable project; MUSCLE's `make regen` +was re-checked and still reproduces `prg.s` byte-for-byte. + +### Known remaining gaps + +* The tracer still reports `INVALID: ['0xc5a7']` and three overlaps + (`$C528`, `$C5A2`, `$C5A4`). The overlaps are now resolved in favour of the + control-flow target, so they are diagnostics rather than defects, but the + `$C5A2`/`$C5A4` pair means the alignment between the `D4`-padding run and the + `$C5A3` thunk table is not fully settled. +* 4,555 bytes (27.8%) are still data. Reaching more needs the tables that the + stack dispatcher at `$CD9E` reads, which means resolving the pushed addresses + in the callers' frames — that is Pass 2/3 work, not more seeding. + +### Pass 2 so far, and why it is partial + +Two mechanical wins came first: + +* **477 `jsr`/`jmp` operands rewritten from raw `$XXXX` to labels.** The tracer + emits call and jump targets as hex, so the call graph was unreadable — the + most-called routine appeared as `jsr $CCA0` 14 times. All 477 sites now name + their target, and zero raw hex call operands remain. +* **252 subroutine entry points named:** **90 with semantic names** (audio/sound + engine routines in `$F8xx-$F9xx`, gameplay helpers like `CheckZpB3Return`, + `CheckRangeReturn012`, `ToggleZpFC_Bit3`) + **165 with address-based names** + (`SubCxxxx`) for the remainder. All 252 `jsr`/`jmp` targets now resolve to + labels. + +**667 `Label_Cxxxx` internal branch targets remain**, and that is the honest +state. These are local control-flow destinations (loop starts, conditional +branch targets) within routines — not subroutine entry points. Naming them +requires reading ~5,700 instructions across 935 routines to establish what each +one does; doing it from the call graph and the NES convention alone would be +guesswork, and `PROMPTS.md` explicitly forbids skipping ahead to guessy rewrites. + +The productive next step is not more naming but **more reach**: the 4,555 +unreached bytes are where most of the remaining unnamed routines live, and they +are gated behind the stack-pointer dispatch at `$CD9E`. Resolving the pushed +table addresses would enlarge both the code set and the set of names worth +assigning. + ## Next Steps (per `PROMPTS.md`) -1. **Pass 1** — replace the blanket `.incbin` with classified code/data: trace reachability from RESET ($C000) and NMI ($C07D), 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** — complete (72.2% code, byte accounting exact). +2. **Pass 2** — substantial: all 252 subroutine entry points named; 667 internal + branch labels (`Label_Cxxxx`) remain as local control-flow targets. Filling + `locals.inc` with zero-page aliases is optional at this stage. +3. **Pass 3** — name data tables/structures in the 4,555 unreached bytes; release + provisional flags. +4. **Promotion** — move to a top-level `/copilot/` folder, add full-ROM build + (header.s + chr.s + vectors), and write the power-on flow `OVERVIEW.md` in the + established style; then it joins the root index's numbered inventory. diff --git a/_wip/Mario Bros (JU)/copilot/locals.inc b/_wip/Mario Bros (JU)/copilot/locals.inc index d06e348..572cf84 100644 --- a/_wip/Mario Bros (JU)/copilot/locals.inc +++ b/_wip/Mario Bros (JU)/copilot/locals.inc @@ -1,2 +1,157 @@ -; Mario Bros (JU) zero-page aliases (declared during Pass 2). -; These intentionally conservative names will be refined in Passes 2 and 3. +; Mario Bros (JU) application-specific RAM aliases - Pass 1 +; Generated from every direct zero-page operand in reachable code: +; ref counts are reads/writes, `where` lists the referencing addresses. +; ZpXX names indicate storage with a role not yet unique enough for a behavioral name; +; Pass 2 replaces them with names derived from observed usage. + +Zp00 = $00 ; 92 refs; reads=44 writes=48; used at $C019, C01D, C296, C2A1, +87 more +Zp01 = $01 ; 58 refs; reads=19 writes=39; used at $C015, C022, C29A, C31F, +50 more +Zp02 = $02 ; 21 refs; reads=11 writes=10; used at $CD58, CD71, CE1E, CE21, +17 more +Zp03 = $03 ; 22 refs; reads=4 writes=18; used at $CE18, CE25, D081, D0A2, +18 more +Zp04 = $04 ; 8 refs; reads=2 writes=6; used at $CE1C, CE3E, CE7A, D0B9, +3 more +Zp05 = $05 ; 7 refs; reads=4 writes=3; used at $CE36, CE53, D0DC, D103, +3 more +Zp06 = $06 ; 15 refs; reads=8 writes=7; used at $C6CD, CE55, CE63, D0D1, +10 more +Zp07 = $07 ; 16 refs; reads=8 writes=8; used at $C6CF, D0C6, D0ED, D266, +11 more +Zp09 = $09 ; 7 refs; reads=3 writes=4; used at $C049, CD0B, CD12, CD46, +3 more +Zp0A = $0A ; 6 refs; reads=3 writes=3; used at $C04D, C4E0, C4E7, E135, +2 more +Zp0B = $0B ; 1 refs; reads=1 writes=0; used at $CE0A +Zp0C = $0C ; 2 refs; reads=1 writes=1; used at $CE0F, D322 +Zp0D = $0D ; 1 refs; reads=1 writes=0; used at $D320 +Zp10 = $10 ; 26 refs; reads=20 writes=6; used at $C0FB, C10D, C116, C12E, +21 more +Zp11 = $11 ; 26 refs; reads=10 writes=16; used at $C0CC, C4B1, C7B9, C7BE, +17 more +Zp12 = $12 ; 21 refs; reads=6 writes=15; used at $C450, CA82, CAC3, CB12, +17 more +Zp13 = $13 ; 16 refs; reads=2 writes=14; used at $C454, CA86, CAC7, CB16, +12 more +Zp14 = $14 ; 84 refs; reads=44 writes=40; used at $C0C4, C458, C460, C473, +80 more +Zp15 = $15 ; 29 refs; reads=9 writes=20; used at $C0C8, CA8A, CA91, CA94, +23 more +Zp18 = $18 ; 4 refs; reads=3 writes=1; used at $C4BC, C528, CCEA, CCEE +Zp19 = $19 ; 3 refs; reads=1 writes=2; used at $C5EE, CCF0, CCFC +Zp1B = $1B ; 1 refs; reads=1 writes=0; used at $C5F3 +Zp1C = $1C ; 2 refs; reads=1 writes=1; used at $C44A, C4A1 +Zp1D = $1D ; 5 refs; reads=2 writes=3; used at $C175, C17C, C44C, C478, +1 more +Zp1E = $1E ; 40 refs; reads=21 writes=19; used at $C1F9, C216, C47A, C47E, +34 more +Zp1F = $1F ; 26 refs; reads=13 writes=13; used at $C1F0, C21C, C422, C42B, +22 more +Zp20 = $20 ; 3 refs; reads=1 writes=2; used at $C051, C06A, C0A7 +Zp21 = $21 ; 7 refs; reads=4 writes=3; used at $CCFF, CD40, CE2E, D031, +3 more +Zp22 = $22 ; 9 refs; reads=4 writes=5; used at $C068, C072, C08C, FB32, +2 more +Zp23 = $23 ; 3 refs; reads=1 writes=2; used at $C0AE, D5DE, D5E1 +Zp26 = $26 ; 3 refs; reads=1 writes=2; used at $C4C2, C4C7, C509 +Zp27 = $27 ; 4 refs; reads=2 writes=2; used at $E719, E71B, E723 +Zp28 = $28 ; 4 refs; reads=1 writes=3; used at $C54F, C56C, C572, D421 +Zp29 = $29 ; 7 refs; reads=5 writes=2; used at $C521, C553, C55C, C582, +2 more +Zp2A = $2A ; 5 refs; reads=2 writes=3; used at $C4D9, C53E, CD8A, CD90 +Zp2B = $2B ; 4 refs; reads=2 writes=2; used at $C4FB, CD94, CD98 +Zp2C = $2C ; 3 refs; reads=1 writes=2; used at $D2F3, D306, D30D +Zp2D = $2D ; 16 refs; reads=9 writes=7; used at $C540, C574, C57C, D34A, +12 more +Zp2E = $2E ; 3 refs; reads=1 writes=2; used at $CF01, D578, D6B7 +Zp2F = $2F ; 9 refs; reads=8 writes=1; used at $C06E, CA06, CB01, CB5E, +4 more +Zp30 = $30 ; 8 refs; reads=6 writes=2; used at $C03D, C053, C4B8, C532, +4 more +Zp31 = $31 ; 2 refs; reads=0 writes=2; used at $D350, D368 +Zp32 = $32 ; 1 refs; reads=1 writes=0; used at $D990 +Zp33 = $33 ; 22 refs; reads=10 writes=12; used at $C5E5, C636, C660, C673, +12 more +Zp34 = $34 ; 1 refs; reads=1 writes=0; used at $D6A2 +Zp35 = $35 ; 7 refs; reads=5 writes=2; used at $C764, CEEF, CF04, D56E, +3 more +Zp36 = $36 ; 4 refs; reads=3 writes=1; used at $CEF4, CEFB, D6A9, D6B5 +Zp37 = $37 ; 1 refs; reads=0 writes=1; used at $D6AD +Zp39 = $39 ; 3 refs; reads=2 writes=1; used at $D385, E030, E061 +Zp3A = $3A ; 4 refs; reads=3 writes=1; used at $D39F, E757, E8A7, EC54 +Zp3B = $3B ; 4 refs; reads=1 writes=3; used at $C4E9, E12D, E1F0, E347 +Zp3F = $3F ; 4 refs; reads=1 writes=3; used at $CA66, CA79, D3A3, D41D +Zp40 = $40 ; 12 refs; reads=3 writes=9; used at $C4C9, C4ED, C4FF, C50B, +7 more +Zp41 = $41 ; 2 refs; reads=1 writes=1; used at $D352, D57C +Zp42 = $42 ; 4 refs; reads=2 writes=2; used at $C0AA, C5D8, CAF7, CB58 +Zp43 = $43 ; 4 refs; reads=2 writes=2; used at $C66A, C76E, CF64 +Zp44 = $44 ; 6 refs; reads=3 writes=3; used at $C671, C68F, C758, C775 +Zp45 = $45 ; 7 refs; reads=5 writes=2; used at $C66F, C68D, C76A, D582, +2 more +Zp46 = $46 ; 5 refs; reads=4 writes=1; used at $C711, C77F, DD2C, DE24, +1 more +Zp48 = $48 ; 10 refs; reads=5 writes=5; used at $C5A0, D35C, D5E6, DCDC, +3 more +Zp49 = $49 ; 5 refs; reads=3 writes=2; used at $D389, DEFA, E027, E03E, +1 more +Zp4A = $4A ; 8 refs; reads=4 writes=4; used at $C511, D35E, E042, E065, +3 more +Zp4C = $4C ; 5 refs; reads=2 writes=3; used at $D373, D37D, D5EC, E249 +Zp4D = $4D ; 5 refs; reads=3 writes=2; used at $D38B, DF27, E058, E06F, +1 more +Zp4E = $4E ; 6 refs; reads=3 writes=3; used at $D381, E034, E073, E1E8, +2 more +Zp50 = $50 ; 9 refs; reads=5 writes=4; used at $C057, C543, C564, C58E, +3 more +Zp51 = $51 ; 12 refs; reads=10 writes=2; used at $C51F, C618, C647, C69F, +8 more +Zp52 = $52 ; 5 refs; reads=2 writes=3; used at $D434, D43A, D440, E277 +Zp53 = $53 ; 1 refs; reads=1 writes=0; used at $C51B +Zp54 = $54 ; 3 refs; reads=1 writes=2; used at $E254, E263, E269 +Zp5A = $5A ; 1 refs; reads=0 writes=1; used at $C4DB +Zp5C = $5C ; 1 refs; reads=1 writes=0; used at $C523 +Zp70 = $70 ; 7 refs; reads=5 writes=2; used at $C011, D2DF, D2F5, D356, +2 more +Zp71 = $71 ; 11 refs; reads=9 writes=2; used at $CF67, D202, D2E4, D2EB, +6 more +Zp72 = $72 ; 2 refs; reads=1 writes=1; used at $D2EF, D988 +Zp75 = $75 ; 1 refs; reads=1 writes=0; used at $EDB0 +Zp7A = $7A ; 1 refs; reads=1 writes=0; used at $EDB2 +Zp82 = $82 ; 1 refs; reads=0 writes=1; used at $FB3B +Zp85 = $85 ; 1 refs; reads=0 writes=1; used at $F8FA +Zp8B = $8B ; 2 refs; reads=1 writes=1; used at $C525 +Zp8D = $8D ; 1 refs; reads=0 writes=1; used at $F8FC +Zp90 = $90 ; 1 refs; reads=0 writes=1; used at $D1DB +Zp91 = $91 ; 1 refs; reads=0 writes=1; used at $D1DF +Zp92 = $92 ; 1 refs; reads=0 writes=1; used at $D1E3 +Zp93 = $93 ; 1 refs; reads=0 writes=1; used at $D1E7 +Zp94 = $94 ; 8 refs; reads=6 writes=2; used at $D0BD, D0E4, D118, D11C, +4 more +Zp95 = $95 ; 10 refs; reads=7 writes=3; used at $D0D8, D0E1, D0FF, D108, +6 more +Zp96 = $96 ; 11 refs; reads=7 writes=4; used at $C598, D0CD, D0D6, D0F4, +6 more +Zp97 = $97 ; 9 refs; reads=6 writes=3; used at $D0C2, D0CB, D0E9, D0F2, +5 more +Zp99 = $99 ; 1 refs; reads=1 writes=0; used at $E241 +Zp9B = $9B ; 2 refs; reads=1 writes=1; used at $C59A +Zp9D = $9D ; 7 refs; reads=1 writes=6; used at $D8F7, DDBD, E202, E206, +3 more +Zp9E = $9E ; 3 refs; reads=1 writes=2; used at $D375, E20F, E213 +Zp9F = $9F ; 10 refs; reads=6 writes=4; used at $D785, D98B, E8C2, EB0B, +5 more +ZpA0 = $A0 ; 13 refs; reads=4 writes=9; used at $C59C, C5DD, C677, CB85, +8 more +ZpA1 = $A1 ; 7 refs; reads=2 writes=5; used at $C5E1, C67B, CB89, CEC9, +3 more +ZpA2 = $A2 ; 8 refs; reads=3 writes=5; used at $C5E9, C67F, CB8D, CBAE, +4 more +ZpA3 = $A3 ; 2 refs; reads=1 writes=1; used at $C517 +ZpA8 = $A8 ; 2 refs; reads=1 writes=1; used at $C515 +ZpAD = $AD ; 4 refs; reads=2 writes=2; used at $D360, E221, E22F +ZpAE = $AE ; 4 refs; reads=2 writes=2; used at $D383, E239, E247 +ZpAF = $AF ; 2 refs; reads=1 writes=1; used at $C59E +ZpB0 = $B0 ; 15 refs; reads=7 writes=8; used at $C0B6, C5FB, C689, C74A, +11 more +ZpB1 = $B1 ; 88 refs; reads=57 writes=31; used at $C101, C107, C11A, C129, +84 more +ZpB2 = $B2 ; 7 refs; reads=3 writes=4; used at $C9F1, CAE3, CAF2, DA56, +3 more +ZpB3 = $B3 ; 21 refs; reads=8 writes=13; used at $C182, C73B, C792, C9B9, +17 more +ZpB4 = $B4 ; 16 refs; reads=3 writes=13; used at $C2A5, C355, C36B, C81F, +11 more +ZpB5 = $B5 ; 12 refs; reads=1 writes=11; used at $C24D, C886, CBD0, D8A1, +8 more +ZpB6 = $B6 ; 17 refs; reads=3 writes=14; used at $C256, C81B, C881, C8BB, +13 more +ZpB7 = $B7 ; 14 refs; reads=7 writes=7; used at $CBFE, CC06, D8BE, D9D6, +10 more +ZpB8 = $B8 ; 34 refs; reads=21 writes=13; used at $C1A9, C1CE, C23C, C2BF, +29 more +ZpB9 = $B9 ; 24 refs; reads=16 writes=8; used at $C424, C429, C489, C91D, +20 more +ZpBA = $BA ; 8 refs; reads=6 writes=2; used at $C24F, CBDB, DE09, DE57, +4 more +ZpBB = $BB ; 17 refs; reads=8 writes=9; used at $C260, C3B3, C3B7, C729, +10 more +ZpBC = $BC ; 15 refs; reads=2 writes=13; used at $C1FD, C204, C2FF, C7B3, +11 more +ZpBD = $BD ; 15 refs; reads=2 writes=13; used at $C1FF, C209, C301, C7B5, +11 more +ZpBE = $BE ; 9 refs; reads=8 writes=1; used at $C608, C69A, C7AB, CFE1, +5 more +ZpBF = $BF ; 49 refs; reads=49 writes=0; used at $C6A7, C6C3, C715, C731, +45 more +ZpC0 = $C0 ; 25 refs; reads=16 writes=9; used at $C6A3, C6F2, C6FC, C70B, +20 more +ZpC1 = $C1 ; 18 refs; reads=10 writes=8; used at $C3AA, C927, C9C5, C9EC, +12 more +ZpC2 = $C2 ; 24 refs; reads=11 writes=13; used at $C29F, C34C, C40B, C6DC, +19 more +ZpC3 = $C3 ; 1 refs; reads=1 writes=0; used at $CAC1 +ZpC4 = $C4 ; 24 refs; reads=14 writes=10; used at $C133, C141, C185, C294, +15 more +ZpC5 = $C5 ; 5 refs; reads=2 writes=3; used at $C180, C90C, CADE, DA5A, +1 more +ZpC6 = $C6 ; 19 refs; reads=11 writes=8; used at $C0DC, C610, C61F, C7DA, +14 more +ZpC7 = $C7 ; 4 refs; reads=1 writes=3; used at $C739, C908, CAE8, DA5E +ZpC8 = $C8 ; 11 refs; reads=6 writes=5; used at $C8ED, C8FC, D94F, D963, +6 more +ZpC9 = $C9 ; 10 refs; reads=7 writes=3; used at $C6BF, C6DA, C74E, CC6A, +6 more +ZpCA = $CA ; 3 refs; reads=2 writes=1; used at $CC62, CF92, CFD4 +ZpCB = $CB ; 4 refs; reads=4 writes=0; used at $C966, CFAD, CFCA, CFF1 +ZpCC = $CC ; 3 refs; reads=2 writes=1; used at $D787, D8D2, D8F3 +ZpCD = $CD ; 8 refs; reads=8 writes=0; used at $C298, C345, C7DE, C85D, +4 more +ZpCE = $CE ; 1 refs; reads=1 writes=0; used at $C476 +ZpCF = $CF ; 1 refs; reads=1 writes=0; used at $C49F +ZpE5 = $E5 ; 2 refs; reads=2 writes=0; used at $C519, C51D +ZpF0 = $F0 ; 7 refs; reads=1 writes=6; used at $F8D1, F9A2, FA1E, FA97, +3 more +ZpF1 = $F1 ; 15 refs; reads=9 writes=6; used at $F8CF, F9A6, F9B5, F9B7, +9 more +ZpF2 = $F2 ; 15 refs; reads=7 writes=8; used at $F9AA, F9CB, F9D1, F9DF, +10 more +ZpF3 = $F3 ; 16 refs; reads=7 writes=9; used at $FB42, FB48, FB7E, FB89, +11 more +ZpF4 = $F4 ; 16 refs; reads=7 writes=9; used at $FB46, FB4E, FB56, FB5A, +10 more +ZpF5 = $F5 ; 4 refs; reads=2 writes=2; used at $FCB3, FCC4, FCD1 +ZpF6 = $F6 ; 5 refs; reads=3 writes=2; used at $FCEA, FCFD, FD02, FD11, +1 more +ZpF7 = $F7 ; 6 refs; reads=5 writes=1; used at $FD4E, FD83, FD93, FDBA, +2 more +ZpF8 = $F8 ; 1 refs; reads=0 writes=1; used at $FD53 +ZpF9 = $F9 ; 8 refs; reads=5 writes=3; used at $C513, FCC9, FD58, FDA0, +3 more +ZpFA = $FA ; 9 refs; reads=5 writes=4; used at $FA91, FD5D, FD78, FD81, +3 more +ZpFB = $FB ; 11 refs; reads=1 writes=10; used at $FB3E, FB7A, FBAE, FBD8, +7 more +ZpFC = $FC ; 9 refs; reads=3 writes=6; used at $C4F5, D502, DD36, E33C, +5 more +ZpFD = $FD ; 10 refs; reads=3 writes=7; used at $C503, D487, DD34, DF1B, +6 more +ZpFE = $FE ; 33 refs; reads=16 writes=17; used at $C4F3, D76F, D773, D77F, +21 more +ZpFF = $FF ; 32 refs; reads=16 writes=16; used at $C4F1, C803, C807, C8C1, +20 more diff --git a/_wip/Mario Bros (JU)/copilot/prg.s b/_wip/Mario Bros (JU)/copilot/prg.s index ea4b468..3ee674e 100644 --- a/_wip/Mario Bros (JU)/copilot/prg.s +++ b/_wip/Mario Bros (JU)/copilot/prg.s @@ -1,12 +1,15480 @@ -; Mario Bros (JU) 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. - +; Mario Bros (JU) NES disassembly - Pass 1 +; Byte-oriented ca65 source generated from the supplied PRG image. +; Recursively reachable instructions are emitted explicitly with address/byte comments. +; Unreached bytes remain explicit .byte blocks; no ROM byte is deleted or reformatted. +; Pass 2 replaces address-derived labels, RAM aliases, and table names while +; preserving byte identity. +; +; Vectors: NMI=$C07D RESET=$C000 IRQ=$C000 +; PRG mapped at $C000-$FFFF (NROM, mirrored to the upper half) +; +; Pass 1 trace provenance (the audit trail behind every classification below): +; 8 further routine entries recovered from table references elsewhere in the image: +; $CE16, $CE18, $D34A, $D40B, $D451, $D47D, $D69A, $E129 +; entries seeded by hand after inspecting code-shaped but unreferenced blocks: +; $C0B6, $C5A3 +; indirect dispatch through zero page (not followed statically): +; jmp ($0014) at $CDB1 +; .setcpu "6502" .include "symbols.inc" .include "locals.inc" .segment "PRG" -.incbin "prg.bin", $0000, $4000 + +; ----------------------------------------------------------------------------- +; Routine: Reset +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in 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: WaitVblank1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +WaitVblank1: + lda $2002 ; CPU:$C002 PRG:0002 AD 02 20 + bpl WaitVblank1 ; CPU:$C005 PRG:0005 10 FB + ldx #$00 ; CPU:$C007 PRG:0007 A2 00 + stx $2000 ; CPU:$C009 PRG:0009 8E 00 20 + stx $2001 ; CPU:$C00C PRG:000C 8E 01 20 + dex ; CPU:$C00F PRG:000F CA + txs ; CPU:$C010 PRG:0010 9A + ldx Zp70 ; CPU:$C011 PRG:0011 A6 70 + ldy #$06 ; CPU:$C013 PRG:0013 A0 06 + sty Zp01 ; CPU:$C015 PRG:0015 84 01 + ldy #$00 ; CPU:$C017 PRG:0017 A0 00 + sty Zp00 ; CPU:$C019 PRG:0019 84 00 + lda #$00 ; CPU:$C01B PRG:001B A9 00 +; ----------------------------------------------------------------------------- +; Routine: ClearRamPageLoop +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ClearRamPageLoop: + sta (Zp00),y ; CPU:$C01D PRG:001D 91 00 + dey ; CPU:$C01F PRG:001F 88 + bne ClearRamPageLoop ; CPU:$C020 PRG:0020 D0 FB + dec Zp01 ; CPU:$C022 PRG:0022 C6 01 + bpl ClearRamPageLoop ; CPU:$C024 PRG:0024 10 F7 + txa ; CPU:$C026 PRG:0026 8A + bne Label_C02B ; CPU:$C027 PRG:0027 D0 02 + ldx #$5F ; CPU:$C029 PRG:0029 A2 5F +; ----------------------------------------------------------------------------- +; Routine: Label_C02B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C02B: + stx $0500 ; CPU:$C02B PRG:002B 8E 00 05 + jsr SubCCA1B ; CPU:$C02E PRG:002E 20 1B CA + jsr SubCCA2B ; CPU:$C031 PRG:0031 20 2B CA + ldy #$00 ; CPU:$C034 PRG:0034 A0 00 + sta $2005 ; CPU:$C036 PRG:0036 8D 05 20 + sta $2005 ; CPU:$C039 PRG:0039 8D 05 20 + iny ; CPU:$C03C PRG:003C C8 + sty Zp30 ; CPU:$C03D PRG:003D 84 30 + lda #$0F ; CPU:$C03F PRG:003F A9 0F + sta $4015 ; CPU:$C041 PRG:0041 8D 15 40 + lda #$90 ; CPU:$C044 PRG:0044 A9 90 + sta $2000 ; CPU:$C046 PRG:0046 8D 00 20 + sta Zp09 ; CPU:$C049 PRG:0049 85 09 + lda #$06 ; CPU:$C04B PRG:004B A9 06 + sta Zp0A ; CPU:$C04D PRG:004D 85 0A +; ----------------------------------------------------------------------------- +; Routine: SubCC04F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC04F: + lda #$00 ; CPU:$C04F PRG:004F A9 00 + sta Zp20 ; CPU:$C051 PRG:0051 85 20 + lda Zp30 ; CPU:$C053 PRG:0053 A5 30 + beq Label_C05D ; CPU:$C055 PRG:0055 F0 06 + lda Zp50 ; CPU:$C057 PRG:0057 A5 50 + cmp #$01 ; CPU:$C059 PRG:0059 C9 01 + bne Label_C060 ; CPU:$C05B PRG:005B D0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_C05D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C05D: + jsr SubCF8A7 ; CPU:$C05D PRG:005D 20 A7 F8 +; ----------------------------------------------------------------------------- +; Routine: Label_C060 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C060: + jsr SubCCD88 ; CPU:$C060 PRG:0060 20 88 CD + jsr SubCC4B8 ; CPU:$C063 PRG:0063 20 B8 C4 + lda #$01 ; CPU:$C066 PRG:0066 A9 01 + sta Zp22 ; CPU:$C068 PRG:0068 85 22 +; ----------------------------------------------------------------------------- +; Routine: SubCC06A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC06A: + lda Zp20 ; CPU:$C06A PRG:006A A5 20 + beq Label_C077 ; CPU:$C06C PRG:006C F0 09 + inc Zp2F ; CPU:$C06E PRG:006E E6 2F + lda #$00 ; CPU:$C070 PRG:0070 A9 00 + sta Zp22 ; CPU:$C072 PRG:0072 85 22 + jmp SubCC04F ; CPU:$C074 PRG:0074 4C 4F C0 +; ----------------------------------------------------------------------------- +; Routine: Label_C077 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C077: + jsr TestRamFlagPair0500 ; CPU:$C077 PRG:0077 20 28 D3 + jmp SubCC06A ; CPU:$C07A PRG:007A 4C 6A C0 +; ----------------------------------------------------------------------------- +; Routine: NmiHandler +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in 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:$C07D PRG:007D 48 + txa ; CPU:$C07E PRG:007E 8A + pha ; CPU:$C07F PRG:007F 48 + tya ; CPU:$C080 PRG:0080 98 + pha ; CPU:$C081 PRG:0081 48 + lda #$00 ; CPU:$C082 PRG:0082 A9 00 + sta $2003 ; CPU:$C084 PRG:0084 8D 03 20 + lda #$02 ; CPU:$C087 PRG:0087 A9 02 + sta $4014 ; CPU:$C089 PRG:0089 8D 14 40 + lda Zp22 ; CPU:$C08C PRG:008C A5 22 + beq Label_C0AC ; CPU:$C08E PRG:008E F0 1C + jsr SubCCB58 ; CPU:$C090 PRG:0090 20 58 CB + jsr SubCEE6A ; CPU:$C093 PRG:0093 20 6A EE + jsr SubCCCFF ; CPU:$C096 PRG:0096 20 FF CC + jsr SubCCA66 ; CPU:$C099 PRG:0099 20 66 CA + jsr SubCCE09 ; CPU:$C09C PRG:009C 20 09 CE + jsr SubCCCC5 ; CPU:$C09F PRG:009F 20 C5 CC + jsr SubCCAF7 ; CPU:$C0A2 PRG:00A2 20 F7 CA + ldy #$01 ; CPU:$C0A5 PRG:00A5 A0 01 + sty Zp20 ; CPU:$C0A7 PRG:00A7 84 20 + dey ; CPU:$C0A9 PRG:00A9 88 + sty Zp42 ; CPU:$C0AA PRG:00AA 84 42 +; ----------------------------------------------------------------------------- +; Routine: Label_C0AC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C0AC: + lda #$01 ; CPU:$C0AC PRG:00AC A9 01 + sta Zp23 ; CPU:$C0AE PRG:00AE 85 23 + pla ; CPU:$C0B0 PRG:00B0 68 + tay ; CPU:$C0B1 PRG:00B1 A8 + pla ; CPU:$C0B2 PRG:00B2 68 + tax ; CPU:$C0B3 PRG:00B3 AA + pla ; CPU:$C0B4 PRG:00B4 68 + rti ; CPU:$C0B5 PRG:00B5 40 +; ----------------------------------------------------------------------------- +; Routine: NmiPhaseDispatch +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +NmiPhaseDispatch: + lda ZpB0 ; CPU:$C0B6 PRG:00B6 A5 B0 + beq Label_C0BF ; CPU:$C0B8 PRG:00B8 F0 05 + lda $0320 ; CPU:$C0BA PRG:00BA AD 20 03 + bne Label_C0C2 ; CPU:$C0BD PRG:00BD D0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_C0BF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C0BF: + jmp NmiPhaseHandlerA ; CPU:$C0BF PRG:00BF 4C 49 C1 +; ----------------------------------------------------------------------------- +; Routine: Label_C0C2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C0C2: + lda #$20 ; CPU:$C0C2 PRG:00C2 A9 20 + sta Zp14 ; CPU:$C0C4 PRG:00C4 85 14 + lda #$03 ; CPU:$C0C6 PRG:00C6 A9 03 + sta Zp15 ; CPU:$C0C8 PRG:00C8 85 15 + lda #$01 ; CPU:$C0CA PRG:00CA A9 01 + sta Zp11 ; CPU:$C0CC PRG:00CC 85 11 + ldy #$0B ; CPU:$C0CE PRG:00CE A0 0B + ldx #$08 ; CPU:$C0D0 PRG:00D0 A2 08 + jsr SubCC44A ; CPU:$C0D2 PRG:00D2 20 4A C4 + sta $05F7 ; CPU:$C0D5 PRG:00D5 8D F7 05 + ora #$00 ; CPU:$C0D8 PRG:00D8 09 00 + beq NmiPhaseHandlerA ; CPU:$C0DA PRG:00DA F0 6D + lda ZpC6 ; CPU:$C0DC PRG:00DC A5 C6 + ora $0336 ; CPU:$C0DE PRG:00DE 0D 36 03 + beq Label_C0F3 ; CPU:$C0E1 PRG:00E1 F0 10 + tax ; CPU:$C0E3 PRG:00E3 AA + and #$F0 ; CPU:$C0E4 PRG:00E4 29 F0 + bne NmiPhaseHandlerA ; CPU:$C0E6 PRG:00E6 D0 61 + txa ; CPU:$C0E8 PRG:00E8 8A + and #$0F ; CPU:$C0E9 PRG:00E9 29 0F + cmp #$04 ; CPU:$C0EB PRG:00EB C9 04 + beq Label_C0F3 ; CPU:$C0ED PRG:00ED F0 04 + cmp #$08 ; CPU:$C0EF PRG:00EF C9 08 + bne NmiPhaseHandlerA ; CPU:$C0F1 PRG:00F1 D0 56 +; ----------------------------------------------------------------------------- +; Routine: Label_C0F3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C0F3: + lda #$00 ; CPU:$C0F3 PRG:00F3 A9 00 + sta $05FE ; CPU:$C0F5 PRG:00F5 8D FE 05 + lda $0321 ; CPU:$C0F8 PRG:00F8 AD 21 03 + sta Zp10 ; CPU:$C0FB PRG:00FB 85 10 + and #$C0 ; CPU:$C0FD PRG:00FD 29 C0 + bne Label_C152 ; CPU:$C0FF PRG:00FF D0 51 + lda ZpB1 ; CPU:$C101 PRG:0101 A5 B1 + and #$C0 ; CPU:$C103 PRG:0103 29 C0 + bne Label_C14F ; CPU:$C105 PRG:0105 D0 48 + lda ZpB1 ; CPU:$C107 PRG:0107 A5 B1 + and #$03 ; CPU:$C109 PRG:0109 29 03 + beq Label_C15E ; CPU:$C10B PRG:010B F0 51 + lda Zp10 ; CPU:$C10D PRG:010D A5 10 + and #$03 ; CPU:$C10F PRG:010F 29 03 + beq Label_C161 ; CPU:$C111 PRG:0111 F0 4E + jsr SubCC3A0 ; CPU:$C113 PRG:0113 20 A0 C3 + lda Zp10 ; CPU:$C116 PRG:0116 A5 10 + and #$03 ; CPU:$C118 PRG:0118 29 03 + eor ZpB1 ; CPU:$C11A PRG:011A 45 B1 + and #$03 ; CPU:$C11C PRG:011C 29 03 + beq Label_C13E ; CPU:$C11E PRG:011E F0 1E + lda $05F7 ; CPU:$C120 PRG:0120 AD F7 05 + and #$0F ; CPU:$C123 PRG:0123 29 0F + cmp #$02 ; CPU:$C125 PRG:0125 C9 02 + beq Label_C12E ; CPU:$C127 PRG:0127 F0 05 + lda ZpB1 ; CPU:$C129 PRG:0129 A5 B1 + jmp SubCC130 ; CPU:$C12B PRG:012B 4C 30 C1 +; ----------------------------------------------------------------------------- +; Routine: Label_C12E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C12E: + lda Zp10 ; CPU:$C12E PRG:012E A5 10 +; ----------------------------------------------------------------------------- +; Routine: SubCC130 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC130: + lsr a ; CPU:$C130 PRG:0130 4A + bcc NmiPhaseHandlerA ; CPU:$C131 PRG:0131 90 16 + lda ZpC4 ; CPU:$C133 PRG:0133 A5 C4 + cmp $0334 ; CPU:$C135 PRG:0135 CD 34 03 + beq Label_C15B ; CPU:$C138 PRG:0138 F0 21 + bcs Label_C158 ; CPU:$C13A PRG:013A B0 1C + bcc Label_C155 ; CPU:$C13C PRG:013C 90 17 +; ----------------------------------------------------------------------------- +; Routine: Label_C13E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C13E: + lda $0334 ; CPU:$C13E PRG:013E AD 34 03 + cmp ZpC4 ; CPU:$C141 PRG:0141 C5 C4 + beq Label_C164 ; CPU:$C143 PRG:0143 F0 1F + bcs Label_C155 ; CPU:$C145 PRG:0145 B0 0E + bcc Label_C158 ; CPU:$C147 PRG:0147 90 0F +; ----------------------------------------------------------------------------- +; Routine: NmiPhaseHandlerA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +NmiPhaseHandlerA: + lda #$00 ; CPU:$C149 PRG:0149 A9 00 + sta $05FF ; CPU:$C14B PRG:014B 8D FF 05 + rts ; CPU:$C14E PRG:014E 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C14F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C14F: + jmp SubCC196 ; CPU:$C14F PRG:014F 4C 96 C1 +; ----------------------------------------------------------------------------- +; Routine: Label_C152 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C152: + jmp SubCC1C3 ; CPU:$C152 PRG:0152 4C C3 C1 +; ----------------------------------------------------------------------------- +; Routine: Label_C155 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C155: + jmp SubCC22D ; CPU:$C155 PRG:0155 4C 2D C2 +; ----------------------------------------------------------------------------- +; Routine: Label_C158 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C158: + jmp SubCC2AD ; CPU:$C158 PRG:0158 4C AD C2 +; ----------------------------------------------------------------------------- +; Routine: Label_C15B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C15B: + jmp SubCC334 ; CPU:$C15B PRG:015B 4C 34 C3 +; ----------------------------------------------------------------------------- +; Routine: Label_C15E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C15E: + jmp SubCC35B ; CPU:$C15E PRG:015E 4C 5B C3 +; ----------------------------------------------------------------------------- +; Routine: Label_C161 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C161: + jmp SubCC37D ; CPU:$C161 PRG:0161 4C 7D C3 +; ----------------------------------------------------------------------------- +; Routine: Label_C164 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C164: + lda ZpB1 ; CPU:$C164 PRG:0164 A5 B1 + ora $0321 ; CPU:$C166 PRG:0166 0D 21 03 + and #$04 ; CPU:$C169 PRG:0169 29 04 + bne Label_C193 ; CPU:$C16B PRG:016B D0 26 + ldx #$01 ; CPU:$C16D PRG:016D A2 01 + ldy #$03 ; CPU:$C16F PRG:016F A0 03 + lda ZpB1 ; CPU:$C171 PRG:0171 A5 B1 + and #$03 ; CPU:$C173 PRG:0173 29 03 + sta Zp1D ; CPU:$C175 PRG:0175 85 1D + lda $05F7 ; CPU:$C177 PRG:0177 AD F7 05 + and #$03 ; CPU:$C17A PRG:017A 29 03 + cmp Zp1D ; CPU:$C17C PRG:017C C5 1D + bne Label_C189 ; CPU:$C17E PRG:017E D0 09 + stx ZpC5 ; CPU:$C180 PRG:0180 86 C5 + sty ZpB3 ; CPU:$C182 PRG:0182 84 B3 + dex ; CPU:$C184 PRG:0184 CA + stx ZpC4 ; CPU:$C185 PRG:0185 86 C4 + beq Label_C193 ; CPU:$C187 PRG:0187 F0 0A +; ----------------------------------------------------------------------------- +; Routine: Label_C189 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C189: + stx $0335 ; CPU:$C189 PRG:0189 8E 35 03 + sty $0323 ; CPU:$C18C PRG:018C 8C 23 03 + dex ; CPU:$C18F PRG:018F CA + stx $0334 ; CPU:$C190 PRG:0190 8E 34 03 +; ----------------------------------------------------------------------------- +; Routine: Label_C193 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C193: + jmp NmiPhaseHandlerA ; CPU:$C193 PRG:0193 4C 49 C1 +; ----------------------------------------------------------------------------- +; Routine: SubCC196 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC196: + jsr SubCC3A0 ; CPU:$C196 PRG:0196 20 A0 C3 + lda Zp10 ; CPU:$C199 PRG:0199 A5 10 + and #$C0 ; CPU:$C19B PRG:019B 29 C0 + beq Label_C158 ; CPU:$C19D PRG:019D F0 B9 +; ----------------------------------------------------------------------------- +; Routine: Label_C19F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C19F: + lda $05F7 ; CPU:$C19F PRG:019F AD F7 05 + asl a ; CPU:$C1A2 PRG:01A2 0A + bcs Label_C1CE ; CPU:$C1A3 PRG:01A3 B0 29 + lda $0328 ; CPU:$C1A5 PRG:01A5 AD 28 03 + sec ; CPU:$C1A8 PRG:01A8 38 + sbc ZpB8 ; CPU:$C1A9 PRG:01A9 E5 B8 + cmp #$0B ; CPU:$C1AB PRG:01AB C9 0B + bcc Label_C221 ; CPU:$C1AD PRG:01AD 90 72 + lda ZpB1 ; CPU:$C1AF PRG:01AF A5 B1 + and #$03 ; CPU:$C1B1 PRG:01B1 29 03 + bne Label_C212 ; CPU:$C1B3 PRG:01B3 D0 5D + lda Zp10 ; CPU:$C1B5 PRG:01B5 A5 10 + and #$03 ; CPU:$C1B7 PRG:01B7 29 03 + bne Label_C221 ; CPU:$C1B9 PRG:01B9 D0 66 + lda #$01 ; CPU:$C1BB PRG:01BB A9 01 + ora ZpB1 ; CPU:$C1BD PRG:01BD 05 B1 + sta ZpB1 ; CPU:$C1BF PRG:01BF 85 B1 + bne Label_C212 ; CPU:$C1C1 PRG:01C1 D0 4F +; ----------------------------------------------------------------------------- +; Routine: SubCC1C3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC1C3: + jsr SubCC3A0 ; CPU:$C1C3 PRG:01C3 20 A0 C3 + lda ZpB1 ; CPU:$C1C6 PRG:01C6 A5 B1 + and #$C0 ; CPU:$C1C8 PRG:01C8 29 C0 + beq Label_C155 ; CPU:$C1CA PRG:01CA F0 89 + bne Label_C19F ; CPU:$C1CC PRG:01CC D0 D1 +; ----------------------------------------------------------------------------- +; Routine: Label_C1CE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C1CE: + lda ZpB8 ; CPU:$C1CE PRG:01CE A5 B8 + sec ; CPU:$C1D0 PRG:01D0 38 + sbc $0328 ; CPU:$C1D1 PRG:01D1 ED 28 03 + cmp #$0B ; CPU:$C1D4 PRG:01D4 C9 0B + bcc Label_C221 ; CPU:$C1D6 PRG:01D6 90 49 + lda Zp10 ; CPU:$C1D8 PRG:01D8 A5 10 + and #$03 ; CPU:$C1DA PRG:01DA 29 03 + bne Label_C212 ; CPU:$C1DC PRG:01DC D0 34 + lda ZpB1 ; CPU:$C1DE PRG:01DE A5 B1 + and #$03 ; CPU:$C1E0 PRG:01E0 29 03 + bne Label_C221 ; CPU:$C1E2 PRG:01E2 D0 3D + lda #$01 ; CPU:$C1E4 PRG:01E4 A9 01 + ora Zp10 ; CPU:$C1E6 PRG:01E6 05 10 + sta Zp10 ; CPU:$C1E8 PRG:01E8 85 10 + bne Label_C212 ; CPU:$C1EA PRG:01EA D0 26 +; ----------------------------------------------------------------------------- +; Routine: SubCC1EC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC1EC: + lda ZpB1 ; CPU:$C1EC PRG:01EC A5 B1 + and #$FC ; CPU:$C1EE PRG:01EE 29 FC + ora Zp1F ; CPU:$C1F0 PRG:01F0 05 1F + sta $0321 ; CPU:$C1F2 PRG:01F2 8D 21 03 + lda Zp10 ; CPU:$C1F5 PRG:01F5 A5 10 + and #$FC ; CPU:$C1F7 PRG:01F7 29 FC + ora Zp1E ; CPU:$C1F9 PRG:01F9 05 1E + sta ZpB1 ; CPU:$C1FB PRG:01FB 85 B1 +; ----------------------------------------------------------------------------- +; Routine: SubCC1FD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC1FD: + ldx ZpBC ; CPU:$C1FD PRG:01FD A6 BC + ldy ZpBD ; CPU:$C1FF PRG:01FF A4 BD + lda $032C ; CPU:$C201 PRG:0201 AD 2C 03 + sta ZpBC ; CPU:$C204 PRG:0204 85 BC + lda $032D ; CPU:$C206 PRG:0206 AD 2D 03 + sta ZpBD ; CPU:$C209 PRG:0209 85 BD + stx $032C ; CPU:$C20B PRG:020B 8E 2C 03 + sty $032D ; CPU:$C20E PRG:020E 8C 2D 03 + rts ; CPU:$C211 PRG:0211 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C212 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C212: + lda ZpB1 ; CPU:$C212 PRG:0212 A5 B1 + and #$03 ; CPU:$C214 PRG:0214 29 03 + sta Zp1E ; CPU:$C216 PRG:0216 85 1E + lda Zp10 ; CPU:$C218 PRG:0218 A5 10 + and #$03 ; CPU:$C21A PRG:021A 29 03 + sta Zp1F ; CPU:$C21C PRG:021C 85 1F + jmp SubCC1EC ; CPU:$C21E PRG:021E 4C EC C1 +; ----------------------------------------------------------------------------- +; Routine: Label_C221 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C221: + lda ZpB1 ; CPU:$C221 PRG:0221 A5 B1 + sta $0321 ; CPU:$C223 PRG:0223 8D 21 03 + lda Zp10 ; CPU:$C226 PRG:0226 A5 10 + sta ZpB1 ; CPU:$C228 PRG:0228 85 B1 + jmp SubCC1FD ; CPU:$C22A PRG:022A 4C FD C1 +; ----------------------------------------------------------------------------- +; Routine: SubCC22D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC22D: + jsr SubCC41F ; CPU:$C22D PRG:022D 20 1F C4 + dey ; CPU:$C230 PRG:0230 88 + beq Label_C282 ; CPU:$C231 PRG:0231 F0 4F + dey ; CPU:$C233 PRG:0233 88 + beq Label_C23C ; CPU:$C234 PRG:0234 F0 06 +; ----------------------------------------------------------------------------- +; Routine: Label_C236 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C236: + ldx #$06 ; CPU:$C236 PRG:0236 A2 06 + ldy #$41 ; CPU:$C238 PRG:0238 A0 41 + bne Label_C286 ; CPU:$C23A PRG:023A D0 4A +; ----------------------------------------------------------------------------- +; Routine: Label_C23C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C23C: + lda ZpB8 ; CPU:$C23C PRG:023C A5 B8 + cmp $0328 ; CPU:$C23E PRG:023E CD 28 03 + bcs Label_C24B ; CPU:$C241 PRG:0241 B0 08 + lda $05F7 ; CPU:$C243 PRG:0243 AD F7 05 + lsr a ; CPU:$C246 PRG:0246 4A + bcs Label_C236 ; CPU:$C247 PRG:0247 B0 ED + bcc Label_C282 ; CPU:$C249 PRG:0249 90 37 +; ----------------------------------------------------------------------------- +; Routine: Label_C24B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C24B: + lda #$01 ; CPU:$C24B PRG:024B A9 01 + sta ZpB5 ; CPU:$C24D PRG:024D 85 B5 + lda ZpBA ; CPU:$C24F PRG:024F A5 BA + jsr SubCC3F5 ; CPU:$C251 PRG:0251 20 F5 C3 + lda #$1E ; CPU:$C254 PRG:0254 A9 1E + sta ZpB6 ; CPU:$C256 PRG:0256 85 B6 + lda ZpB1 ; CPU:$C258 PRG:0258 A5 B1 + ora #$08 ; CPU:$C25A PRG:025A 09 08 + sta ZpB1 ; CPU:$C25C PRG:025C 85 B1 + lda #$2F ; CPU:$C25E PRG:025E A9 2F + sta ZpBB ; CPU:$C260 PRG:0260 85 BB + lda Zp10 ; CPU:$C262 PRG:0262 A5 10 + and #$43 ; CPU:$C264 PRG:0264 29 43 + cmp #$40 ; CPU:$C266 PRG:0266 C9 40 + bne Label_C26E ; CPU:$C268 PRG:0268 D0 04 + lda #$01 ; CPU:$C26A PRG:026A A9 01 + sta Zp10 ; CPU:$C26C PRG:026C 85 10 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_C26E: + lda Zp10 ; CPU:$C26E PRG:026E A5 10 + and #$03 ; CPU:$C270 PRG:0270 29 03 + ora #$80 ; CPU:$C272 PRG:0272 09 80 + sta $0321 ; CPU:$C274 PRG:0274 8D 21 03 + lda #$50 ; CPU:$C277 PRG:0277 A9 50 + ldy #$F3 ; CPU:$C279 PRG:0279 A0 F3 +; ----------------------------------------------------------------------------- +; Routine: Label_C27B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C27B: + sta $032C ; CPU:$C27B PRG:027B 8D 2C 03 + sty $032D ; CPU:$C27E PRG:027E 8C 2D 03 + rts ; CPU:$C281 PRG:0281 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C282 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C282: + ldx #$05 ; CPU:$C282 PRG:0282 A2 05 + ldy #$42 ; CPU:$C284 PRG:0284 A0 42 +; ----------------------------------------------------------------------------- +; Routine: Label_C286 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C286: + sty $0321 ; CPU:$C286 PRG:0286 8C 21 03 + lda ZpB1 ; CPU:$C289 PRG:0289 A5 B1 + and #$08 ; CPU:$C28B PRG:028B 29 08 + bne Label_C2A7 ; CPU:$C28D PRG:028D D0 18 + stx ZpB1 ; CPU:$C28F PRG:028F 86 B1 + jsr SubCC3E3 ; CPU:$C291 PRG:0291 20 E3 C3 + lda ZpC4 ; CPU:$C294 PRG:0294 A5 C4 + sta Zp00 ; CPU:$C296 PRG:0296 85 00 + lda ZpCD ; CPU:$C298 PRG:0298 A5 CD + sta Zp01 ; CPU:$C29A PRG:029A 85 01 + jsr CheckState97_02 ; CPU:$C29C PRG:029C 20 C2 C3 + sta ZpC2 ; CPU:$C29F PRG:029F 85 C2 + lda Zp00 ; CPU:$C2A1 PRG:02A1 A5 00 + beq Label_C2A7 ; CPU:$C2A3 PRG:02A3 F0 02 + sta ZpB4 ; CPU:$C2A5 PRG:02A5 85 B4 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_C2A7: + lda #$3A ; CPU:$C2A7 PRG:02A7 A9 3A + ldy #$F3 ; CPU:$C2A9 PRG:02A9 A0 F3 + bne Label_C27B ; CPU:$C2AB PRG:02AB D0 CE +; ----------------------------------------------------------------------------- +; Routine: SubCC2AD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC2AD: + jsr SubCC429 ; CPU:$C2AD PRG:02AD 20 29 C4 + dey ; CPU:$C2B0 PRG:02B0 88 + beq Label_C304 ; CPU:$C2B1 PRG:02B1 F0 51 + dey ; CPU:$C2B3 PRG:02B3 88 + beq Label_C2BC ; CPU:$C2B4 PRG:02B4 F0 06 +; ----------------------------------------------------------------------------- +; Routine: Label_C2B6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C2B6: + ldx #$06 ; CPU:$C2B6 PRG:02B6 A2 06 + ldy #$41 ; CPU:$C2B8 PRG:02B8 A0 41 + bne Label_C308 ; CPU:$C2BA PRG:02BA D0 4C +; ----------------------------------------------------------------------------- +; Routine: Label_C2BC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C2BC: + lda $0328 ; CPU:$C2BC PRG:02BC AD 28 03 + cmp ZpB8 ; CPU:$C2BF PRG:02BF C5 B8 + bcs Label_C2CB ; CPU:$C2C1 PRG:02C1 B0 08 + lda $05F7 ; CPU:$C2C3 PRG:02C3 AD F7 05 + lsr a ; CPU:$C2C6 PRG:02C6 4A + bcs Label_C304 ; CPU:$C2C7 PRG:02C7 B0 3B + bcc Label_C2B6 ; CPU:$C2C9 PRG:02C9 90 EB +; ----------------------------------------------------------------------------- +; Routine: Label_C2CB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C2CB: + lda #$01 ; CPU:$C2CB PRG:02CB A9 01 + sta $0325 ; CPU:$C2CD PRG:02CD 8D 25 03 + lda $032A ; CPU:$C2D0 PRG:02D0 AD 2A 03 + jsr SubCC3F5 ; CPU:$C2D3 PRG:02D3 20 F5 C3 + lda #$1E ; CPU:$C2D6 PRG:02D6 A9 1E + sta $0326 ; CPU:$C2D8 PRG:02D8 8D 26 03 + lda Zp10 ; CPU:$C2DB PRG:02DB A5 10 + ora #$08 ; CPU:$C2DD PRG:02DD 09 08 + sta $0321 ; CPU:$C2DF PRG:02DF 8D 21 03 + lda #$2F ; CPU:$C2E2 PRG:02E2 A9 2F + sta $032B ; CPU:$C2E4 PRG:02E4 8D 2B 03 + lda ZpB1 ; CPU:$C2E7 PRG:02E7 A5 B1 + and #$43 ; CPU:$C2E9 PRG:02E9 29 43 + cmp #$40 ; CPU:$C2EB PRG:02EB C9 40 + bne Label_C2F3 ; CPU:$C2ED PRG:02ED D0 04 + lda #$01 ; CPU:$C2EF PRG:02EF A9 01 + sta ZpB1 ; CPU:$C2F1 PRG:02F1 85 B1 +; ----------------------------------------------------------------------------- +; Routine: Label_C2F3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C2F3: + lda ZpB1 ; CPU:$C2F3 PRG:02F3 A5 B1 + and #$03 ; CPU:$C2F5 PRG:02F5 29 03 + ora #$80 ; CPU:$C2F7 PRG:02F7 09 80 + sta ZpB1 ; CPU:$C2F9 PRG:02F9 85 B1 + lda #$50 ; CPU:$C2FB PRG:02FB A9 50 + ldy #$F3 ; CPU:$C2FD PRG:02FD A0 F3 +; ----------------------------------------------------------------------------- +; Routine: Label_C2FF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C2FF: + sta ZpBC ; CPU:$C2FF PRG:02FF 85 BC + sty ZpBD ; CPU:$C301 PRG:0301 84 BD + rts ; CPU:$C303 PRG:0303 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C304 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C304: + ldx #$05 ; CPU:$C304 PRG:0304 A2 05 + ldy #$42 ; CPU:$C306 PRG:0306 A0 42 +; ----------------------------------------------------------------------------- +; Routine: Label_C308 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C308: + sty ZpB1 ; CPU:$C308 PRG:0308 84 B1 + lda $0321 ; CPU:$C30A PRG:030A AD 21 03 + and #$08 ; CPU:$C30D PRG:030D 29 08 + bne Label_C32E ; CPU:$C30F PRG:030F D0 1D + stx $0321 ; CPU:$C311 PRG:0311 8E 21 03 + jsr SubCC3E3 ; CPU:$C314 PRG:0314 20 E3 C3 + lda $0334 ; CPU:$C317 PRG:0317 AD 34 03 + sta Zp00 ; CPU:$C31A PRG:031A 85 00 + lda $033D ; CPU:$C31C PRG:031C AD 3D 03 + sta Zp01 ; CPU:$C31F PRG:031F 85 01 + jsr CheckState97_02 ; CPU:$C321 PRG:0321 20 C2 C3 + sta $0332 ; CPU:$C324 PRG:0324 8D 32 03 + lda Zp00 ; CPU:$C327 PRG:0327 A5 00 + beq Label_C32E ; CPU:$C329 PRG:0329 F0 03 + sta $0324 ; CPU:$C32B PRG:032B 8D 24 03 +; ----------------------------------------------------------------------------- +; Routine: Label_C32E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C32E: + lda #$3A ; CPU:$C32E PRG:032E A9 3A + ldy #$F3 ; CPU:$C330 PRG:0330 A0 F3 + bne Label_C2FF ; CPU:$C332 PRG:0332 D0 CB +; ----------------------------------------------------------------------------- +; Routine: SubCC334 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC334: + lda ZpB1 ; CPU:$C334 PRG:0334 A5 B1 + ora #$04 ; CPU:$C336 PRG:0336 09 04 + sta $0321 ; CPU:$C338 PRG:0338 8D 21 03 + lda Zp10 ; CPU:$C33B PRG:033B A5 10 + ora #$04 ; CPU:$C33D PRG:033D 09 04 + sta ZpB1 ; CPU:$C33F PRG:033F 85 B1 + lda ZpC4 ; CPU:$C341 PRG:0341 A5 C4 + sta Zp00 ; CPU:$C343 PRG:0343 85 00 + lda ZpCD ; CPU:$C345 PRG:0345 A5 CD + sta Zp01 ; CPU:$C347 PRG:0347 85 01 + jsr CheckState97_02 ; CPU:$C349 PRG:0349 20 C2 C3 + sta ZpC2 ; CPU:$C34C PRG:034C 85 C2 + sta $0332 ; CPU:$C34E PRG:034E 8D 32 03 + lda Zp00 ; CPU:$C351 PRG:0351 A5 00 + beq Label_C35A ; CPU:$C353 PRG:0353 F0 05 + sta ZpB4 ; CPU:$C355 PRG:0355 85 B4 + sta $0324 ; CPU:$C357 PRG:0357 8D 24 03 +; ----------------------------------------------------------------------------- +; Routine: Label_C35A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C35A: + rts ; CPU:$C35A PRG:035A 60 +; ----------------------------------------------------------------------------- +; Routine: SubCC35B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC35B: + jsr SubCC41F ; CPU:$C35B PRG:035B 20 1F C4 + lda Zp10 ; CPU:$C35E PRG:035E A5 10 + and #$03 ; CPU:$C360 PRG:0360 29 03 + dey ; CPU:$C362 PRG:0362 88 + beq Label_C376 ; CPU:$C363 PRG:0363 F0 11 + cmp #$02 ; CPU:$C365 PRG:0365 C9 02 + bne Label_C37A ; CPU:$C367 PRG:0367 D0 11 +; ----------------------------------------------------------------------------- +; Routine: Label_C369 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C369: + lda #$06 ; CPU:$C369 PRG:0369 A9 06 + sta ZpB4 ; CPU:$C36B PRG:036B 85 B4 + ldx #$10 ; CPU:$C36D PRG:036D A2 10 + ldy #$0D ; CPU:$C36F PRG:036F A0 0D + lda Zp10 ; CPU:$C371 PRG:0371 A5 10 + jmp SubCC402 ; CPU:$C373 PRG:0373 4C 02 C4 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_C376: + cmp #$01 ; CPU:$C376 PRG:0376 C9 01 + beq Label_C369 ; CPU:$C378 PRG:0378 F0 EF +; ----------------------------------------------------------------------------- +; Routine: Label_C37A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C37A: + jmp SubCC3A8 ; CPU:$C37A PRG:037A 4C A8 C3 +; ----------------------------------------------------------------------------- +; Routine: SubCC37D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC37D: + jsr SubCC429 ; CPU:$C37D PRG:037D 20 29 C4 + lda ZpB1 ; CPU:$C380 PRG:0380 A5 B1 + and #$03 ; CPU:$C382 PRG:0382 29 03 + dey ; CPU:$C384 PRG:0384 88 + beq Label_C399 ; CPU:$C385 PRG:0385 F0 12 + cmp #$02 ; CPU:$C387 PRG:0387 C9 02 + bne Label_C39D ; CPU:$C389 PRG:0389 D0 12 +; ----------------------------------------------------------------------------- +; Routine: Label_C38B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C38B: + lda #$06 ; CPU:$C38B PRG:038B A9 06 + sta $0324 ; CPU:$C38D PRG:038D 8D 24 03 + ldx #$0D ; CPU:$C390 PRG:0390 A2 0D + ldy #$10 ; CPU:$C392 PRG:0392 A0 10 + lda ZpB1 ; CPU:$C394 PRG:0394 A5 B1 + jmp SubCC402 ; CPU:$C396 PRG:0396 4C 02 C4 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_C399: + cmp #$01 ; CPU:$C399 PRG:0399 C9 01 + beq Label_C38B ; CPU:$C39B PRG:039B F0 EE +; ----------------------------------------------------------------------------- +; Routine: Label_C39D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C39D: + jmp SubCC3A8 ; CPU:$C39D PRG:039D 4C A8 C3 +; ----------------------------------------------------------------------------- +; Routine: SubCC3A0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC3A0: + lda $05FF ; CPU:$C3A0 PRG:03A0 AD FF 05 + beq SubCC3A8 ; CPU:$C3A3 PRG:03A3 F0 03 + pla ; CPU:$C3A5 PRG:03A5 68 + pla ; CPU:$C3A6 PRG:03A6 68 + rts ; CPU:$C3A7 PRG:03A7 60 +; ----------------------------------------------------------------------------- +; Routine: SubCC3A8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC3A8: + ldy #$00 ; CPU:$C3A8 PRG:03A8 A0 00 + sty ZpC1 ; CPU:$C3AA PRG:03AA 84 C1 + sty $0331 ; CPU:$C3AC PRG:03AC 8C 31 03 + iny ; CPU:$C3AF PRG:03AF C8 + sty $05FF ; CPU:$C3B0 PRG:03B0 8C FF 05 + ldy ZpBB ; CPU:$C3B3 PRG:03B3 A4 BB + bne Label_C3B9 ; CPU:$C3B5 PRG:03B5 D0 02 + sta ZpBB ; CPU:$C3B7 PRG:03B7 85 BB +; ----------------------------------------------------------------------------- +; Routine: Label_C3B9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C3B9: + ldy $032B ; CPU:$C3B9 PRG:03B9 AC 2B 03 + bne Label_C3C1 ; CPU:$C3BC PRG:03BC D0 03 + sta $032B ; CPU:$C3BE PRG:03BE 8D 2B 03 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_C3C1: + rts ; CPU:$C3C1 PRG:03C1 60 +; ----------------------------------------------------------------------------- +; Routine: CheckState97_02 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +CheckState97_02: + lda Zp01 ; CPU:$C3C2 PRG:03C2 A5 01 + cmp #$97 ; CPU:$C3C4 PRG:03C4 C9 97 + beq Label_C3DC ; CPU:$C3C6 PRG:03C6 F0 14 + lda Zp00 ; CPU:$C3C8 PRG:03C8 A5 00 + cmp #$02 ; CPU:$C3CA PRG:03CA C9 02 + bne Label_C3D5 ; CPU:$C3CC PRG:03CC D0 07 + lda #$06 ; CPU:$C3CE PRG:03CE A9 06 + sta Zp00 ; CPU:$C3D0 PRG:03D0 85 00 + lda #$08 ; CPU:$C3D2 PRG:03D2 A9 08 + rts ; CPU:$C3D4 PRG:03D4 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C3D5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C3D5: + lda #$00 ; CPU:$C3D5 PRG:03D5 A9 00 + sta Zp00 ; CPU:$C3D7 PRG:03D7 85 00 + lda #$05 ; CPU:$C3D9 PRG:03D9 A9 05 + rts ; CPU:$C3DB PRG:03DB 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C3DC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C3DC: + lda #$06 ; CPU:$C3DC PRG:03DC A9 06 + sta Zp00 ; CPU:$C3DE PRG:03DE 85 00 + lda #$1C ; CPU:$C3E0 PRG:03E0 A9 1C + rts ; CPU:$C3E2 PRG:03E2 60 +; ----------------------------------------------------------------------------- +; Routine: SubCC3E3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC3E3: + lda ZpC4 ; CPU:$C3E3 PRG:03E3 A5 C4 + pha ; CPU:$C3E5 PRG:03E5 48 + lda $0334 ; CPU:$C3E6 PRG:03E6 AD 34 03 + sta ZpC4 ; CPU:$C3E9 PRG:03E9 85 C4 + pla ; CPU:$C3EB PRG:03EB 68 + sta $0334 ; CPU:$C3EC PRG:03EC 8D 34 03 + lda #$01 ; CPU:$C3EF PRG:03EF A9 01 + sta $05FD ; CPU:$C3F1 PRG:03F1 8D FD 05 + rts ; CPU:$C3F4 PRG:03F4 60 +; ----------------------------------------------------------------------------- +; Routine: SubCC3F5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC3F5: + clc ; CPU:$C3F5 PRG:03F5 18 + adc #$10 ; CPU:$C3F6 PRG:03F6 69 10 + tay ; CPU:$C3F8 PRG:03F8 A8 + lda #$F4 ; CPU:$C3F9 PRG:03F9 A9 F4 + sta $0200,y ; CPU:$C3FB PRG:03FB 99 00 02 + sta $0204,y ; CPU:$C3FE PRG:03FE 99 04 02 + rts ; CPU:$C401 PRG:0401 60 +; ----------------------------------------------------------------------------- +; Routine: SubCC402 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC402: + and #$03 ; CPU:$C402 PRG:0402 29 03 + ora #$04 ; CPU:$C404 PRG:0404 09 04 + sta ZpB1 ; CPU:$C406 PRG:0406 85 B1 + sta $0321 ; CPU:$C408 PRG:0408 8D 21 03 + stx ZpC2 ; CPU:$C40B PRG:040B 86 C2 + sty $0332 ; CPU:$C40D PRG:040D 8C 32 03 + ldy #$00 ; CPU:$C410 PRG:0410 A0 00 + sty ZpC4 ; CPU:$C412 PRG:0412 84 C4 + sty $0334 ; CPU:$C414 PRG:0414 8C 34 03 + sty $05FE ; CPU:$C417 PRG:0417 8C FE 05 + iny ; CPU:$C41A PRG:041A C8 + sty $05FD ; CPU:$C41B PRG:041B 8C FD 05 + rts ; CPU:$C41E PRG:041E 60 +; ----------------------------------------------------------------------------- +; Routine: SubCC41F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC41F: + lda $0329 ; CPU:$C41F PRG:041F AD 29 03 + sta Zp1F ; CPU:$C422 PRG:0422 85 1F + lda ZpB9 ; CPU:$C424 PRG:0424 A5 B9 + jmp SubCC430 ; CPU:$C426 PRG:0426 4C 30 C4 +; ----------------------------------------------------------------------------- +; Routine: SubCC429 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC429: + lda ZpB9 ; CPU:$C429 PRG:0429 A5 B9 + sta Zp1F ; CPU:$C42B PRG:042B 85 1F + lda $0329 ; CPU:$C42D PRG:042D AD 29 03 +; ----------------------------------------------------------------------------- +; Routine: SubCC430 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC430: + sec ; CPU:$C430 PRG:0430 38 + sbc Zp1F ; CPU:$C431 PRG:0431 E5 1F + bpl Label_C43C ; CPU:$C433 PRG:0433 10 07 + cmp #$FB ; CPU:$C435 PRG:0435 C9 FB + bcs Label_C440 ; CPU:$C437 PRG:0437 B0 07 + ldy #$03 ; CPU:$C439 PRG:0439 A0 03 + rts ; CPU:$C43B PRG:043B 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C43C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C43C: + cmp #$05 ; CPU:$C43C PRG:043C C9 05 + bcs Label_C443 ; CPU:$C43E PRG:043E B0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_C440 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C440: + ldy #$02 ; CPU:$C440 PRG:0440 A0 02 + rts ; CPU:$C442 PRG:0442 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C443 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C443: + ldy #$01 ; CPU:$C443 PRG:0443 A0 01 + rts ; CPU:$C445 PRG:0445 60 +; ----------------------------------------------------------------------------- +; Routine: SubCC446 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC446: + ldy #$00 ; CPU:$C446 PRG:0446 A0 00 + ldx #$00 ; CPU:$C448 PRG:0448 A2 00 +; ----------------------------------------------------------------------------- +; Routine: SubCC44A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC44A: + sty Zp1C ; CPU:$C44A PRG:044A 84 1C + stx Zp1D ; CPU:$C44C PRG:044C 86 1D + lda #$20 ; CPU:$C44E PRG:044E A9 20 + sta Zp12 ; CPU:$C450 PRG:0450 85 12 + lda #$00 ; CPU:$C452 PRG:0452 A9 00 + sta Zp13 ; CPU:$C454 PRG:0454 85 13 +; ----------------------------------------------------------------------------- +; Routine: Label_C456 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C456: + ldy #$00 ; CPU:$C456 PRG:0456 A0 00 + lda (Zp14),y ; CPU:$C458 PRG:0458 B1 14 + beq Label_C4AE ; CPU:$C45A PRG:045A F0 52 + ldx #$40 ; CPU:$C45C PRG:045C A2 40 + ldy #$08 ; CPU:$C45E PRG:045E A0 08 + lda (Zp14),y ; CPU:$C460 PRG:0460 B1 14 + sec ; CPU:$C462 PRG:0462 38 + sbc ZpB8 ; CPU:$C463 PRG:0463 E5 B8 + bpl Label_C46E ; CPU:$C465 PRG:0465 10 07 + eor #$FF ; CPU:$C467 PRG:0467 49 FF + clc ; CPU:$C469 PRG:0469 18 + adc #$01 ; CPU:$C46A PRG:046A 69 01 + ldx #$80 ; CPU:$C46C PRG:046C A2 80 +; ----------------------------------------------------------------------------- +; Routine: Label_C46E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C46E: + stx Zp1F ; CPU:$C46E PRG:046E 86 1F + pha ; CPU:$C470 PRG:0470 48 + ldy #$1E ; CPU:$C471 PRG:0471 A0 1E + lda (Zp14),y ; CPU:$C473 PRG:0473 B1 14 + clc ; CPU:$C475 PRG:0475 18 + adc ZpCE ; CPU:$C476 PRG:0476 65 CE + adc Zp1D ; CPU:$C478 PRG:0478 65 1D + sta Zp1E ; CPU:$C47A PRG:047A 85 1E + pla ; CPU:$C47C PRG:047C 68 + sec ; CPU:$C47D PRG:047D 38 + sbc Zp1E ; CPU:$C47E PRG:047E E5 1E + bpl Label_C4AE ; CPU:$C480 PRG:0480 10 2C + ldx #$01 ; CPU:$C482 PRG:0482 A2 01 + ldy #$09 ; CPU:$C484 PRG:0484 A0 09 + lda (Zp14),y ; CPU:$C486 PRG:0486 B1 14 + sec ; CPU:$C488 PRG:0488 38 + sbc ZpB9 ; CPU:$C489 PRG:0489 E5 B9 + bpl Label_C494 ; CPU:$C48B PRG:048B 10 07 + eor #$FF ; CPU:$C48D PRG:048D 49 FF + clc ; CPU:$C48F PRG:048F 18 + adc #$01 ; CPU:$C490 PRG:0490 69 01 + ldx #$02 ; CPU:$C492 PRG:0492 A2 02 +; ----------------------------------------------------------------------------- +; Routine: Label_C494 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C494: + pha ; CPU:$C494 PRG:0494 48 + txa ; CPU:$C495 PRG:0495 8A + ora Zp1F ; CPU:$C496 PRG:0496 05 1F + sta Zp1F ; CPU:$C498 PRG:0498 85 1F + ldy #$1F ; CPU:$C49A PRG:049A A0 1F + lda (Zp14),y ; CPU:$C49C PRG:049C B1 14 + clc ; CPU:$C49E PRG:049E 18 + adc ZpCF ; CPU:$C49F PRG:049F 65 CF + adc Zp1C ; CPU:$C4A1 PRG:04A1 65 1C + sta Zp1E ; CPU:$C4A3 PRG:04A3 85 1E + pla ; CPU:$C4A5 PRG:04A5 68 + sec ; CPU:$C4A6 PRG:04A6 38 + sbc Zp1E ; CPU:$C4A7 PRG:04A7 E5 1E + bpl Label_C4AE ; CPU:$C4A9 PRG:04A9 10 03 + lda Zp1F ; CPU:$C4AB PRG:04AB A5 1F + rts ; CPU:$C4AD PRG:04AD 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C4AE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C4AE: + jsr AdvanceDispatchPointer ; CPU:$C4AE PRG:04AE 20 B4 CD + dec Zp11 ; CPU:$C4B1 PRG:04B1 C6 11 + bne Label_C456 ; CPU:$C4B3 PRG:04B3 D0 A1 + lda #$00 ; CPU:$C4B5 PRG:04B5 A9 00 + rts ; CPU:$C4B7 PRG:04B7 60 +; ----------------------------------------------------------------------------- +; Routine: SubCC4B8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC4B8: + lda Zp30 ; CPU:$C4B8 PRG:04B8 A5 30 + bne Label_C528 ; CPU:$C4BA PRG:04BA D0 6C + lda Zp18 ; CPU:$C4BC PRG:04BC A5 18 + and #$10 ; CPU:$C4BE PRG:04BE 29 10 + beq Label_C507 ; CPU:$C4C0 PRG:04C0 F0 45 + ldy Zp26 ; CPU:$C4C2 PRG:04C2 A4 26 + bne Label_C50B ; CPU:$C4C4 PRG:04C4 D0 45 + iny ; CPU:$C4C6 PRG:04C6 C8 + sty Zp26 ; CPU:$C4C7 PRG:04C7 84 26 + ldy Zp40 ; CPU:$C4C9 PRG:04C9 A4 40 + cpy #$05 ; CPU:$C4CB PRG:04CB C0 05 + beq Label_C4F9 ; CPU:$C4CD PRG:04CD F0 2A + cpy #$04 ; CPU:$C4CF PRG:04CF C0 04 + beq Label_C4D7 ; CPU:$C4D1 PRG:04D1 F0 04 + cpy #$06 ; CPU:$C4D3 PRG:04D3 C0 06 + bne Label_C50B ; CPU:$C4D5 PRG:04D5 D0 34 +; ----------------------------------------------------------------------------- +; Routine: Label_C4D7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C4D7: + ldx #$05 ; CPU:$C4D7 PRG:04D7 A2 05 +; ----------------------------------------------------------------------------- +; Routine: Label_C4D9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C4D9: + lda Zp2A,x ; CPU:$C4D9 PRG:04D9 B5 2A + sta Zp5A,x ; CPU:$C4DB PRG:04DB 95 5A + dex ; CPU:$C4DD PRG:04DD CA + bpl Label_C4D9 ; CPU:$C4DE PRG:04DE 10 F9 + lda Zp0A ; CPU:$C4E0 PRG:04E0 A5 0A + and #$0E ; CPU:$C4E2 PRG:04E2 29 0E + sta $2001 ; CPU:$C4E4 PRG:04E4 8D 01 20 + sta Zp0A ; CPU:$C4E7 PRG:04E7 85 0A + sty Zp3B ; CPU:$C4E9 PRG:04E9 84 3B + lda #$05 ; CPU:$C4EB PRG:04EB A9 05 + sta Zp40 ; CPU:$C4ED PRG:04ED 85 40 + lda #$00 ; CPU:$C4EF PRG:04EF A9 00 + sta ZpFF ; CPU:$C4F1 PRG:04F1 85 FF + sta ZpFE ; CPU:$C4F3 PRG:04F3 85 FE + sta ZpFC ; CPU:$C4F5 PRG:04F5 85 FC + beq Label_C501 ; CPU:$C4F7 PRG:04F7 F0 08 +; ----------------------------------------------------------------------------- +; Routine: Label_C4F9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C4F9: + lda #$14 ; CPU:$C4F9 PRG:04F9 A9 14 + sta Zp2B ; CPU:$C4FB PRG:04FB 85 2B + lda #$0A ; CPU:$C4FD PRG:04FD A9 0A + sta Zp40 ; CPU:$C4FF PRG:04FF 85 40 +; ----------------------------------------------------------------------------- +; Routine: Label_C501 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C501: + lda #$08 ; CPU:$C501 PRG:0501 A9 08 + sta ZpFD ; CPU:$C503 PRG:0503 85 FD + bne Label_C50B ; CPU:$C505 PRG:0505 D0 04 +; ----------------------------------------------------------------------------- +; Routine: Label_C507 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C507: + lda #$00 ; CPU:$C507 PRG:0507 A9 00 + sta Zp26 ; CPU:$C509 PRG:0509 85 26 +; ----------------------------------------------------------------------------- +; Routine: Label_C50B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C50B: + lda Zp40 ; CPU:$C50B PRG:050B A5 40 + jsr DispatchViaStackPointer ; CPU:$C50D PRG:050D 20 9E CD + lsr a ; CPU:$C510 PRG:0510 4A + .byte $D3, $4A ; CPU:$C511 PRG:0511 D3 4A -- dcp (Zp4A),y (undocumented; ca65 cannot encode) + sbc (ZpF9,x) ; CPU:$C513 PRG:0513 E1 F9 + .byte $D3, $A8 ; CPU:$C515 PRG:0515 D3 A8 -- dcp (ZpA8),y (undocumented; ca65 cannot encode) + .byte $D3, $A3 ; CPU:$C517 PRG:0517 D3 A3 -- dcp (ZpA3),y (undocumented; ca65 cannot encode) + cmp ZpE5 ; CPU:$C519 PRG:0519 C5 E5 + cmp Zp53,x ; CPU:$C51B PRG:051B D5 53 + cpx ZpE5 ; CPU:$C51D PRG:051D E4 E5 + cmp Zp51,x ; CPU:$C51F PRG:051F D5 51 + .byte $D4, $29 ; CPU:$C521 PRG:0521 D4 29 -- nop Zp29,x (undocumented; ca65 cannot encode) + sbc (Zp5C,x) ; CPU:$C523 PRG:0523 E1 5C + .byte $D4, $8B ; CPU:$C525 PRG:0525 D4 8B -- nop Zp8B,x (undocumented; ca65 cannot encode) +; ---- data $C527-$C527 (1 bytes) ---- + .byte $E2 ; CPU:$C527 PRG:0527 E2 +; ----------------------------------------------------------------------------- +; Routine: Label_C528 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C528: + lda Zp18 ; CPU:$C528 PRG:0528 A5 18 + and #$30 ; CPU:$C52A PRG:052A 29 30 + cmp #$10 ; CPU:$C52C PRG:052C C9 10 + bne Label_C543 ; CPU:$C52E PRG:052E D0 13 + lda #$00 ; CPU:$C530 PRG:0530 A9 00 + sta Zp30 ; CPU:$C532 PRG:0532 85 30 + sta Zp40 ; CPU:$C534 PRG:0534 85 40 + jsr SubCD4FE ; CPU:$C536 PRG:0536 20 FE D4 + jsr SubCE132 ; CPU:$C539 PRG:0539 20 32 E1 + lda #$02 ; CPU:$C53C PRG:053C A9 02 + sta Zp2A ; CPU:$C53E PRG:053E 85 2A + sta Zp2D ; CPU:$C540 PRG:0540 85 2D + rts ; CPU:$C542 PRG:0542 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C543 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C543: + ldx Zp50 ; CPU:$C543 PRG:0543 A6 50 + beq Label_C58E ; CPU:$C545 PRG:0545 F0 47 + cmp #$20 ; CPU:$C547 PRG:0547 C9 20 + bne Label_C568 ; CPU:$C549 PRG:0549 D0 1D + cpx #$01 ; CPU:$C54B PRG:054B E0 01 + bne Label_C561 ; CPU:$C54D PRG:054D D0 12 + lda Zp28 ; CPU:$C54F PRG:054F A5 28 + bne Label_C574 ; CPU:$C551 PRG:0551 D0 21 + ldy Zp29 ; CPU:$C553 PRG:0553 A4 29 + iny ; CPU:$C555 PRG:0555 C8 + cpy #$04 ; CPU:$C556 PRG:0556 C0 04 + bne Label_C55C ; CPU:$C558 PRG:0558 D0 02 + ldy #$00 ; CPU:$C55A PRG:055A A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_C55C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C55C: + sty Zp29 ; CPU:$C55C PRG:055C 84 29 + jmp SubCC570 ; CPU:$C55E PRG:055E 4C 70 C5 +; ----------------------------------------------------------------------------- +; Routine: Label_C561 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C561: + jsr SubCD4FE ; CPU:$C561 PRG:0561 20 FE D4 + sta Zp50 ; CPU:$C564 PRG:0564 85 50 + beq Label_C58E ; CPU:$C566 PRG:0566 F0 26 +; ----------------------------------------------------------------------------- +; Routine: Label_C568 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C568: + cmp #$00 ; CPU:$C568 PRG:0568 C9 00 + bne SubCC570 ; CPU:$C56A PRG:056A D0 04 + sta Zp28 ; CPU:$C56C PRG:056C 85 28 + beq Label_C57E ; CPU:$C56E PRG:056E F0 0E +; ----------------------------------------------------------------------------- +; Routine: SubCC570 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC570: + lda #$01 ; CPU:$C570 PRG:0570 A9 01 + sta Zp28 ; CPU:$C572 PRG:0572 85 28 +; ----------------------------------------------------------------------------- +; Routine: Label_C574 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C574: + lda Zp2D ; CPU:$C574 PRG:0574 A5 2D + cmp #$25 ; CPU:$C576 PRG:0576 C9 25 + bcs Label_C57E ; CPU:$C578 PRG:0578 B0 04 + lda #$25 ; CPU:$C57A PRG:057A A9 25 + sta Zp2D ; CPU:$C57C PRG:057C 85 2D +; ----------------------------------------------------------------------------- +; Routine: Label_C57E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C57E: + cpx #$01 ; CPU:$C57E PRG:057E E0 01 + bne Label_C58E ; CPU:$C580 PRG:0580 D0 0C + lda Zp29 ; CPU:$C582 PRG:0582 A5 29 + asl a ; CPU:$C584 PRG:0584 0A + asl a ; CPU:$C585 PRG:0585 0A + asl a ; CPU:$C586 PRG:0586 0A + asl a ; CPU:$C587 PRG:0587 0A + clc ; CPU:$C588 PRG:0588 18 + adc #$80 ; CPU:$C589 PRG:0589 69 80 + sta $0200 ; CPU:$C58B PRG:058B 8D 00 02 +; ----------------------------------------------------------------------------- +; Routine: Label_C58E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C58E: + lda Zp50 ; CPU:$C58E PRG:058E A5 50 + jsr DispatchViaStackPointer ; CPU:$C590 PRG:0590 20 9E CD + .byte $0B, $D4 ; CPU:$C593 PRG:0593 0B D4 -- anc #$D4 (undocumented; ca65 cannot encode) + adc $91D4,x ; CPU:$C595 PRG:0595 7D D4 91 + .byte $D4, $96 ; CPU:$C598 PRG:0598 D4 96 -- nop Zp96,x (undocumented; ca65 cannot encode) + .byte $D4, $9B ; CPU:$C59A PRG:059A D4 9B -- nop Zp9B,x (undocumented; ca65 cannot encode) + .byte $D4, $A0 ; CPU:$C59C PRG:059C D4 A0 -- nop ZpA0,x (undocumented; ca65 cannot encode) + .byte $D4, $AF ; CPU:$C59E PRG:059E D4 AF -- nop ZpAF,x (undocumented; ca65 cannot encode) + .byte $D4, $48 ; CPU:$C5A0 PRG:05A0 D4 48 -- nop Zp48,x (undocumented; ca65 cannot encode) +; ---- data $C5A2-$C5A2 (1 bytes) ---- + .byte $D4 ; CPU:$C5A2 PRG:05A2 D4 +; ----------------------------------------------------------------------------- +; Routine: JsrThunkTable +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +JsrThunkTable: + jsr SubCD56E ; CPU:$C5A3 PRG:05A3 20 6E D5 + jsr SubCD202 ; CPU:$C5A6 PRG:05A6 20 02 D2 + jsr SubCD301 ; CPU:$C5A9 PRG:05A9 20 01 D3 + jsr SubCC5DB ; CPU:$C5AC PRG:05AC 20 DB C5 + jsr SubCC66A ; CPU:$C5AF PRG:05AF 20 6A C6 + jsr SubCE783 ; CPU:$C5B2 PRG:05B2 20 83 E7 + jsr SubCEA31 ; CPU:$C5B5 PRG:05B5 20 31 EA + jsr SubCE795 ; CPU:$C5B8 PRG:05B8 20 95 E7 + jsr SubCEDEB ; CPU:$C5BB PRG:05BB 20 EB ED + jsr SubCE2AB ; CPU:$C5BE PRG:05BE 20 AB E2 + jsr SubCE21A ; CPU:$C5C1 PRG:05C1 20 1A E2 + jsr SubCE1F7 ; CPU:$C5C4 PRG:05C4 20 F7 E1 + jsr SubCDFF8 ; CPU:$C5C7 PRG:05C7 20 F8 DF + jsr SubCE1CE ; CPU:$C5CA PRG:05CA 20 CE E1 + jsr SubCE26D ; CPU:$C5CD PRG:05CD 20 6D E2 + jsr SubCE709 ; CPU:$C5D0 PRG:05D0 20 09 E7 + jsr SubCEF32 ; CPU:$C5D3 PRG:05D3 20 32 EF + lda #$01 ; CPU:$C5D6 PRG:05D6 A9 01 + sta Zp42 ; CPU:$C5D8 PRG:05D8 85 42 + rts ; CPU:$C5DA PRG:05DA 60 +; ----------------------------------------------------------------------------- +; Routine: SubCC5DB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC5DB: + lda #$00 ; CPU:$C5DB PRG:05DB A9 00 + sta ZpA0 ; CPU:$C5DD PRG:05DD 85 A0 + lda #$03 ; CPU:$C5DF PRG:05DF A9 03 + sta ZpA1 ; CPU:$C5E1 PRG:05E1 85 A1 + lda #$02 ; CPU:$C5E3 PRG:05E3 A9 02 + sta Zp33 ; CPU:$C5E5 PRG:05E5 85 33 + lda #$00 ; CPU:$C5E7 PRG:05E7 A9 00 + sta ZpA2 ; CPU:$C5E9 PRG:05E9 85 A2 + sta $05FA ; CPU:$C5EB PRG:05EB 8D FA 05 + lda Zp19 ; CPU:$C5EE PRG:05EE A5 19 + sta $0310 ; CPU:$C5F0 PRG:05F0 8D 10 03 + lda Zp1B ; CPU:$C5F3 PRG:05F3 A5 1B + sta $0330 ; CPU:$C5F5 PRG:05F5 8D 30 03 +; ----------------------------------------------------------------------------- +; Routine: Label_C5F8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C5F8: + jsr SubCCB9B ; CPU:$C5F8 PRG:05F8 20 9B CB + lda ZpB0 ; CPU:$C5FB PRG:05FB A5 B0 + bne Label_C605 ; CPU:$C5FD PRG:05FD D0 06 + jsr SubCDFBA ; CPU:$C5FF PRG:05FF 20 BA DF + jmp SubCC65D ; CPU:$C602 PRG:0602 4C 5D C6 +; ----------------------------------------------------------------------------- +; Routine: Label_C605 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C605: + jsr SubCD019 ; CPU:$C605 PRG:0605 20 19 D0 + ldx ZpBE ; CPU:$C608 PRG:0608 A6 BE + inc $04AC,x ; CPU:$C60A PRG:060A FE AC 04 + inc $04AC,x ; CPU:$C60D PRG:060D FE AC 04 + lda ZpC6 ; CPU:$C610 PRG:0610 A5 C6 + beq Label_C636 ; CPU:$C612 PRG:0612 F0 22 + and #$F0 ; CPU:$C614 PRG:0614 29 F0 + bne Label_C629 ; CPU:$C616 PRG:0616 D0 11 + lda Zp51 ; CPU:$C618 PRG:0618 A5 51 + bne Label_C62C ; CPU:$C61A PRG:061A D0 10 + jsr SubCDEEC ; CPU:$C61C PRG:061C 20 EC DE + lda ZpC6 ; CPU:$C61F PRG:061F A5 C6 + beq Label_C636 ; CPU:$C621 PRG:0621 F0 13 + and #$0C ; CPU:$C623 PRG:0623 29 0C + bne Label_C636 ; CPU:$C625 PRG:0625 D0 0F + beq Label_C62C ; CPU:$C627 PRG:0627 F0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_C629 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C629: + jsr SubCDDE0 ; CPU:$C629 PRG:0629 20 E0 DD +; ----------------------------------------------------------------------------- +; Routine: Label_C62C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C62C: + jsr SubCDFBA ; CPU:$C62C PRG:062C 20 BA DF + jmp SubCC657 ; CPU:$C62F PRG:062F 4C 57 C6 +; ---- data $C632-$C635 (4 bytes) ---- + .byte $A5, $51, $D0, $F6 ; CPU:$C632 PRG:0632 A5 51 D0 F6 +; ----------------------------------------------------------------------------- +; Routine: Label_C636 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C636: + lda Zp33 ; CPU:$C636 PRG:0636 A5 33 + cmp #$02 ; CPU:$C638 PRG:0638 C9 02 + bne Label_C63F ; CPU:$C63A PRG:063A D0 03 + jsr NmiPhaseDispatch ; CPU:$C63C PRG:063C 20 B6 C0 +; ----------------------------------------------------------------------------- +; Routine: Label_C63F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C63F: + lda $05FD ; CPU:$C63F PRG:063F AD FD 05 + beq Label_C647 ; CPU:$C642 PRG:0642 F0 03 + jsr DispatchTableF393 ; CPU:$C644 PRG:0644 20 B9 CA +; ----------------------------------------------------------------------------- +; Routine: Label_C647 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C647: + lda Zp51 ; CPU:$C647 PRG:0647 A5 51 + bne Label_C62C ; CPU:$C649 PRG:0649 D0 E1 + jsr SubCD6BA ; CPU:$C64B PRG:064B 20 BA D6 + jsr SubCC785 ; CPU:$C64E PRG:064E 20 85 C7 + jsr SubCCC3F ; CPU:$C651 PRG:0651 20 3F CC + jsr SubCDC75 ; CPU:$C654 PRG:0654 20 75 DC +; ----------------------------------------------------------------------------- +; Routine: SubCC657 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC657: + jsr SubCCBC4 ; CPU:$C657 PRG:0657 20 C4 CB + jsr SubCCBB6 ; CPU:$C65A PRG:065A 20 B6 CB +; ----------------------------------------------------------------------------- +; Routine: SubCC65D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC65D: + jsr SubCCBAE ; CPU:$C65D PRG:065D 20 AE CB + dec Zp33 ; CPU:$C660 PRG:0660 C6 33 + bne Label_C5F8 ; CPU:$C662 PRG:0662 D0 94 + lda #$00 ; CPU:$C664 PRG:0664 A9 00 + sta $05FD ; CPU:$C666 PRG:0666 8D FD 05 + rts ; CPU:$C669 PRG:0669 60 +; ----------------------------------------------------------------------------- +; Routine: SubCC66A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC66A: + lda Zp43 ; CPU:$C66A PRG:066A A5 43 + bne Label_C66F ; CPU:$C66C PRG:066C D0 01 + rts ; CPU:$C66E PRG:066E 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C66F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C66F: + sta Zp45 ; CPU:$C66F PRG:066F 85 45 + sta Zp44 ; CPU:$C671 PRG:0671 85 44 + sta Zp33 ; CPU:$C673 PRG:0673 85 33 + lda #$60 ; CPU:$C675 PRG:0675 A9 60 + sta ZpA0 ; CPU:$C677 PRG:0677 85 A0 + lda #$03 ; CPU:$C679 PRG:0679 A9 03 + sta ZpA1 ; CPU:$C67B PRG:067B 85 A1 + lda #$00 ; CPU:$C67D PRG:067D A9 00 + sta ZpA2 ; CPU:$C67F PRG:067F 85 A2 + lda #$0D ; CPU:$C681 PRG:0681 A9 0D + sta $05FA ; CPU:$C683 PRG:0683 8D FA 05 +; ----------------------------------------------------------------------------- +; Routine: SubCC686 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC686: + jsr SubCCB9B ; CPU:$C686 PRG:0686 20 9B CB + lda ZpB0 ; CPU:$C689 PRG:0689 A5 B0 + bne Label_C697 ; CPU:$C68B PRG:068B D0 0A + dec Zp45 ; CPU:$C68D PRG:068D C6 45 + dec Zp44 ; CPU:$C68F PRG:068F C6 44 + jsr SubCDFBD ; CPU:$C691 PRG:0691 20 BD DF + jmp SubCC75D ; CPU:$C694 PRG:0694 4C 5D C7 +; ----------------------------------------------------------------------------- +; Routine: Label_C697 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C697: + jsr SubCD019 ; CPU:$C697 PRG:0697 20 19 D0 + ldx ZpBE ; CPU:$C69A PRG:069A A6 BE + inc $04AC,x ; CPU:$C69C PRG:069C FE AC 04 + lda Zp51 ; CPU:$C69F PRG:069F A5 51 + beq Label_C6BC ; CPU:$C6A1 PRG:06A1 F0 19 + lda ZpC0 ; CPU:$C6A3 PRG:06A3 A5 C0 + bne Label_C6BC ; CPU:$C6A5 PRG:06A5 D0 15 + lda ZpBF ; CPU:$C6A7 PRG:06A7 A5 BF + cmp #$40 ; CPU:$C6A9 PRG:06A9 C9 40 + beq Label_C6C9 ; CPU:$C6AB PRG:06AB F0 1C + cmp #$80 ; CPU:$C6AD PRG:06AD C9 80 + bne Label_C6BC ; CPU:$C6AF PRG:06AF D0 0B + lda #$00 ; CPU:$C6B1 PRG:06B1 A9 00 + sta $04C0 ; CPU:$C6B3 PRG:06B3 8D C0 04 + lda #$9E ; CPU:$C6B6 PRG:06B6 A9 9E + ldy #$F5 ; CPU:$C6B8 PRG:06B8 A0 F5 + bne Label_C6CD ; CPU:$C6BA PRG:06BA D0 11 +; ----------------------------------------------------------------------------- +; Routine: Label_C6BC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C6BC: + jmp SubCECEC ; CPU:$C6BC PRG:06BC 4C EC EC +; ----------------------------------------------------------------------------- +; Routine: SubCC6BF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC6BF: + lda ZpC9 ; CPU:$C6BF PRG:06BF A5 C9 + beq Label_C6E9 ; CPU:$C6C1 PRG:06C1 F0 26 + lda ZpBF ; CPU:$C6C3 PRG:06C3 A5 BF + cmp #$40 ; CPU:$C6C5 PRG:06C5 C9 40 + bne Label_C6E0 ; CPU:$C6C7 PRG:06C7 D0 17 +; ----------------------------------------------------------------------------- +; Routine: Label_C6C9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C6C9: + lda #$A4 ; CPU:$C6C9 PRG:06C9 A9 A4 + ldy #$F5 ; CPU:$C6CB PRG:06CB A0 F5 +; ----------------------------------------------------------------------------- +; Routine: Label_C6CD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C6CD: + sta Zp06 ; CPU:$C6CD PRG:06CD 85 06 + sty Zp07 ; CPU:$C6CF PRG:06CF 84 07 + lda #$30 ; CPU:$C6D1 PRG:06D1 A9 30 + sta Zp00 ; CPU:$C6D3 PRG:06D3 85 00 + jsr SubCD789 ; CPU:$C6D5 PRG:06D5 20 89 D7 + lda #$00 ; CPU:$C6D8 PRG:06D8 A9 00 + sta ZpC9 ; CPU:$C6DA PRG:06DA 85 C9 + sta ZpC2 ; CPU:$C6DC PRG:06DC 85 C2 + beq Label_C744 ; CPU:$C6DE PRG:06DE F0 64 +; ----------------------------------------------------------------------------- +; Routine: Label_C6E0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C6E0: + jsr SubCDEAF ; CPU:$C6E0 PRG:06E0 20 AF DE + jsr SubCDFBD ; CPU:$C6E3 PRG:06E3 20 BD DF + jmp SubCC747 ; CPU:$C6E6 PRG:06E6 4C 47 C7 +; ----------------------------------------------------------------------------- +; Routine: Label_C6E9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C6E9: + jsr SubCD6BA ; CPU:$C6E9 PRG:06E9 20 BA D6 + jsr SubCDB53 ; CPU:$C6EC PRG:06EC 20 53 DB + jsr SubCDBFF ; CPU:$C6EF PRG:06EF 20 FF DB + lda ZpC0 ; CPU:$C6F2 PRG:06F2 A5 C0 + bne Label_C6FC ; CPU:$C6F4 PRG:06F4 D0 06 + jsr SubCD9FE ; CPU:$C6F6 PRG:06F6 20 FE D9 + jmp SubCC708 ; CPU:$C6F9 PRG:06F9 4C 08 C7 +; ----------------------------------------------------------------------------- +; Routine: Label_C6FC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C6FC: + lda ZpC0 ; CPU:$C6FC PRG:06FC A5 C0 + and #$0F ; CPU:$C6FE PRG:06FE 29 0F + cmp #$03 ; CPU:$C700 PRG:0700 C9 03 + beq Label_C744 ; CPU:$C702 PRG:0702 F0 40 + cmp #$06 ; CPU:$C704 PRG:0704 C9 06 + beq Label_C744 ; CPU:$C706 PRG:0706 F0 3C +; ----------------------------------------------------------------------------- +; Routine: SubCC708 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC708: + jsr SubCDB2D ; CPU:$C708 PRG:0708 20 2D DB + lda ZpC0 ; CPU:$C70B PRG:070B A5 C0 + ora ZpC2 ; CPU:$C70D PRG:070D 05 C2 + bne Label_C73B ; CPU:$C70F PRG:070F D0 2A + lda Zp46 ; CPU:$C711 PRG:0711 A5 46 + beq Label_C73B ; CPU:$C713 PRG:0713 F0 26 + lda ZpBF ; CPU:$C715 PRG:0715 A5 BF + ldy #$05 ; CPU:$C717 PRG:0717 A0 05 + ldx #$06 ; CPU:$C719 PRG:0719 A2 06 + cmp #$20 ; CPU:$C71B PRG:071B C9 20 + beq Label_C727 ; CPU:$C71D PRG:071D F0 08 + ldy #$02 ; CPU:$C71F PRG:071F A0 02 + ldx #$02 ; CPU:$C721 PRG:0721 A2 02 + cmp #$10 ; CPU:$C723 PRG:0723 C9 10 + bne Label_C73B ; CPU:$C725 PRG:0725 D0 14 +; ----------------------------------------------------------------------------- +; Routine: Label_C727 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C727: + sty ZpC4 ; CPU:$C727 PRG:0727 84 C4 + stx ZpBB ; CPU:$C729 PRG:0729 86 BB + jsr DispatchTableF393 ; CPU:$C72B PRG:072B 20 B9 CA + jsr SubCD9B6 ; CPU:$C72E PRG:072E 20 B6 D9 + lda ZpBF ; CPU:$C731 PRG:0731 A5 BF + cmp #$10 ; CPU:$C733 PRG:0733 C9 10 + bne Label_C73B ; CPU:$C735 PRG:0735 D0 04 + lda #$00 ; CPU:$C737 PRG:0737 A9 00 + sta ZpC7 ; CPU:$C739 PRG:0739 85 C7 +; ----------------------------------------------------------------------------- +; Routine: Label_C73B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C73B: + lda ZpB3 ; CPU:$C73B PRG:073B A5 B3 + cmp #$05 ; CPU:$C73D PRG:073D C9 05 + bcs Label_C744 ; CPU:$C73F PRG:073F B0 03 + jsr SubCC785 ; CPU:$C741 PRG:0741 20 85 C7 +; ----------------------------------------------------------------------------- +; Routine: Label_C744 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C744: + jsr SubCCC73 ; CPU:$C744 PRG:0744 20 73 CC +; ----------------------------------------------------------------------------- +; Routine: SubCC747 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC747: + jsr SubCCBC4 ; CPU:$C747 PRG:0747 20 C4 CB + lda ZpB0 ; CPU:$C74A PRG:074A A5 B0 + beq Label_C758 ; CPU:$C74C PRG:074C F0 0A + lda ZpC9 ; CPU:$C74E PRG:074E A5 C9 + bne Label_C758 ; CPU:$C750 PRG:0750 D0 06 + lda ZpBF ; CPU:$C752 PRG:0752 A5 BF + cmp #$40 ; CPU:$C754 PRG:0754 C9 40 + bcc SubCC75A ; CPU:$C756 PRG:0756 90 02 +; ----------------------------------------------------------------------------- +; Routine: Label_C758 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C758: + dec Zp44 ; CPU:$C758 PRG:0758 C6 44 +; ----------------------------------------------------------------------------- +; Routine: SubCC75A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC75A: + jsr SubCCBB6 ; CPU:$C75A PRG:075A 20 B6 CB +; ----------------------------------------------------------------------------- +; Routine: SubCC75D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC75D: + jsr SubCCBAE ; CPU:$C75D PRG:075D 20 AE CB + dec Zp33 ; CPU:$C760 PRG:0760 C6 33 + bne Label_C782 ; CPU:$C762 PRG:0762 D0 1E + lda Zp35 ; CPU:$C764 PRG:0764 A5 35 + cmp #$AA ; CPU:$C766 PRG:0766 C9 AA + bne Label_C781 ; CPU:$C768 PRG:0768 D0 17 + lda Zp45 ; CPU:$C76A PRG:076A A5 45 + bne Label_C775 ; CPU:$C76C PRG:076C D0 07 + sta Zp43 ; CPU:$C76E PRG:076E 85 43 +; ----------------------------------------------------------------------------- +; Routine: Label_C770 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C770: + lda #$01 ; CPU:$C770 PRG:0770 A9 01 + sta Zp51 ; CPU:$C772 PRG:0772 85 51 + rts ; CPU:$C774 PRG:0774 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C775 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C775: + lda Zp44 ; CPU:$C775 PRG:0775 A5 44 + beq Label_C770 ; CPU:$C777 PRG:0777 F0 F7 + cmp #$01 ; CPU:$C779 PRG:0779 C9 01 + bne Label_C781 ; CPU:$C77B PRG:077B D0 04 + lda #$01 ; CPU:$C77D PRG:077D A9 01 + sta Zp46 ; CPU:$C77F PRG:077F 85 46 +; ----------------------------------------------------------------------------- +; Routine: Label_C781 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C781: + rts ; CPU:$C781 PRG:0781 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C782 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C782: + jmp SubCC686 ; CPU:$C782 PRG:0782 4C 86 C6 +; ----------------------------------------------------------------------------- +; Routine: SubCC785 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC785: + lda ZpBF ; CPU:$C785 PRG:0785 A5 BF + cmp #$30 ; CPU:$C787 PRG:0787 C9 30 + bne Label_C7B7 ; CPU:$C789 PRG:0789 D0 2C + lda ZpC0 ; CPU:$C78B PRG:078B A5 C0 + bne Label_C792 ; CPU:$C78D PRG:078D D0 03 + jsr SubCCE9C ; CPU:$C78F PRG:078F 20 9C CE +; ----------------------------------------------------------------------------- +; Routine: Label_C792 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C792: + lda ZpB3 ; CPU:$C792 PRG:0792 A5 B3 + beq Label_C797 ; CPU:$C794 PRG:0794 F0 01 + rts ; CPU:$C796 PRG:0796 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C797 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C797: + lda ZpC0 ; CPU:$C797 PRG:0797 A5 C0 + bne Label_C7B7 ; CPU:$C799 PRG:0799 D0 1C + lda ZpB1 ; CPU:$C79B PRG:079B A5 B1 + and #$C0 ; CPU:$C79D PRG:079D 29 C0 + bne Label_C7B7 ; CPU:$C79F PRG:079F D0 16 + lda ZpB1 ; CPU:$C7A1 PRG:07A1 A5 B1 + ora #$80 ; CPU:$C7A3 PRG:07A3 09 80 + sta ZpB1 ; CPU:$C7A5 PRG:07A5 85 B1 + ldx #$6D ; CPU:$C7A7 PRG:07A7 A2 6D + ldy #$F3 ; CPU:$C7A9 PRG:07A9 A0 F3 + lda ZpBE ; CPU:$C7AB PRG:07AB A5 BE + bne Label_C7B3 ; CPU:$C7AD PRG:07AD D0 04 + ldx #$70 ; CPU:$C7AF PRG:07AF A2 70 + ldy #$F3 ; CPU:$C7B1 PRG:07B1 A0 F3 +; ----------------------------------------------------------------------------- +; Routine: Label_C7B3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C7B3: + stx ZpBC ; CPU:$C7B3 PRG:07B3 86 BC + sty ZpBD ; CPU:$C7B5 PRG:07B5 84 BD +; ----------------------------------------------------------------------------- +; Routine: Label_C7B7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C7B7: + lda ZpB1 ; CPU:$C7B7 PRG:07B7 A5 B1 + sta Zp11 ; CPU:$C7B9 PRG:07B9 85 11 + jsr PushTablePointerDispatch ; CPU:$C7BB PRG:07BB 20 A0 CC + bit Zp11 ; CPU:$C7BE PRG:07BE 24 11 + bmi Label_C7C7 ; CPU:$C7C0 PRG:07C0 30 05 + bvs Label_C7CA ; CPU:$C7C2 PRG:07C2 70 06 + jmp SubCC7CD ; CPU:$C7C4 PRG:07C4 4C CD C7 +; ----------------------------------------------------------------------------- +; Routine: Label_C7C7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C7C7: + jmp SubCC93A ; CPU:$C7C7 PRG:07C7 4C 3A C9 +; ----------------------------------------------------------------------------- +; Routine: Label_C7CA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C7CA: + jmp SubCC9A1 ; CPU:$C7CA PRG:07CA 4C A1 C9 +; ----------------------------------------------------------------------------- +; Routine: SubCC7CD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC7CD: + lda ZpBF ; CPU:$C7CD PRG:07CD A5 BF + and #$F0 ; CPU:$C7CF PRG:07CF 29 F0 + beq Label_C7DA ; CPU:$C7D1 PRG:07D1 F0 07 + lda ZpC2 ; CPU:$C7D3 PRG:07D3 A5 C2 + beq Label_C7DE ; CPU:$C7D5 PRG:07D5 F0 07 + jmp SubCC8D1 ; CPU:$C7D7 PRG:07D7 4C D1 C8 +; ----------------------------------------------------------------------------- +; Routine: Label_C7DA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C7DA: + lda ZpC6 ; CPU:$C7DA PRG:07DA A5 C6 + bne Label_C7F3 ; CPU:$C7DC PRG:07DC D0 15 +; ----------------------------------------------------------------------------- +; Routine: Label_C7DE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C7DE: + lda ZpCD ; CPU:$C7DE PRG:07DE A5 CD + jsr CheckRangeReturn012 ; CPU:$C7E0 PRG:07E0 20 A4 CA + and #$0F ; CPU:$C7E3 PRG:07E3 29 0F + bne Label_C7EA ; CPU:$C7E5 PRG:07E5 D0 03 + jmp SubCC97D ; CPU:$C7E7 PRG:07E7 4C 7D C9 +; ----------------------------------------------------------------------------- +; Routine: Label_C7EA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C7EA: + lda ZpBF ; CPU:$C7EA PRG:07EA A5 BF + and #$0F ; CPU:$C7EC PRG:07EC 29 0F + bne Label_C7F3 ; CPU:$C7EE PRG:07EE D0 03 + jmp SubCC8D1 ; CPU:$C7F0 PRG:07F0 4C D1 C8 +; ----------------------------------------------------------------------------- +; Routine: Label_C7F3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C7F3: + lda ZpC2 ; CPU:$C7F3 PRG:07F3 A5 C2 + beq Label_C7F9 ; CPU:$C7F5 PRG:07F5 F0 02 + dec ZpC2 ; CPU:$C7F7 PRG:07F7 C6 C2 +; ----------------------------------------------------------------------------- +; Routine: Label_C7F9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C7F9: + lda ZpB1 ; CPU:$C7F9 PRG:07F9 A5 B1 + and #$08 ; CPU:$C7FB PRG:07FB 29 08 + bne Label_C86F ; CPU:$C7FD PRG:07FD D0 70 + lda ZpC0 ; CPU:$C7FF PRG:07FF A5 C0 + bpl Label_C824 ; CPU:$C801 PRG:0801 10 21 + lda ZpFF ; CPU:$C803 PRG:0803 A5 FF + ora #$20 ; CPU:$C805 PRG:0805 09 20 + sta ZpFF ; CPU:$C807 PRG:0807 85 FF + lda ZpB1 ; CPU:$C809 PRG:0809 A5 B1 + and #$33 ; CPU:$C80B PRG:080B 29 33 + ora #$80 ; CPU:$C80D PRG:080D 09 80 + sta ZpB1 ; CPU:$C80F PRG:080F 85 B1 + lda #$50 ; CPU:$C811 PRG:0811 A9 50 + sta ZpBC ; CPU:$C813 PRG:0813 85 BC + lda #$F3 ; CPU:$C815 PRG:0815 A9 F3 + sta ZpBD ; CPU:$C817 PRG:0817 85 BD + lda #$18 ; CPU:$C819 PRG:0819 A9 18 + sta ZpB6 ; CPU:$C81B PRG:081B 85 B6 + lda #$00 ; CPU:$C81D PRG:081D A9 00 + sta ZpB4 ; CPU:$C81F PRG:081F 85 B4 + jmp SubCC9E6 ; CPU:$C821 PRG:0821 4C E6 C9 +; ----------------------------------------------------------------------------- +; Routine: Label_C824 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C824: + and #$03 ; CPU:$C824 PRG:0824 29 03 + sta Zp1E ; CPU:$C826 PRG:0826 85 1E + lda ZpB1 ; CPU:$C828 PRG:0828 A5 B1 + sta Zp1F ; CPU:$C82A PRG:082A 85 1F + and #$04 ; CPU:$C82C PRG:082C 29 04 + bne Label_C8AD ; CPU:$C82E PRG:082E D0 7D + lda ZpB1 ; CPU:$C830 PRG:0830 A5 B1 + and #$03 ; CPU:$C832 PRG:0832 29 03 + sta Zp1F ; CPU:$C834 PRG:0834 85 1F + beq Label_C891 ; CPU:$C836 PRG:0836 F0 59 + ldy $05FF ; CPU:$C838 PRG:0838 AC FF 05 + bne SubCC8B5 ; CPU:$C83B PRG:083B D0 78 + and Zp1E ; CPU:$C83D PRG:083D 25 1E + beq Label_C853 ; CPU:$C83F PRG:083F F0 12 + lda ZpC2 ; CPU:$C841 PRG:0841 A5 C2 + bne SubCC8B5 ; CPU:$C843 PRG:0843 D0 70 + sta ZpBB ; CPU:$C845 PRG:0845 85 BB + inc ZpC4 ; CPU:$C847 PRG:0847 E6 C4 + jsr DispatchTableF393 ; CPU:$C849 PRG:0849 20 B9 CA + lda #$08 ; CPU:$C84C PRG:084C A9 08 + sta ZpC2 ; CPU:$C84E PRG:084E 85 C2 + jmp SubCC8B5 ; CPU:$C850 PRG:0850 4C B5 C8 +; ----------------------------------------------------------------------------- +; Routine: Label_C853 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C853: + lda Zp1F ; CPU:$C853 PRG:0853 A5 1F + ora #$04 ; CPU:$C855 PRG:0855 09 04 + sta Zp1F ; CPU:$C857 PRG:0857 85 1F + lda ZpC4 ; CPU:$C859 PRG:0859 A5 C4 + sta Zp00 ; CPU:$C85B PRG:085B 85 00 + lda ZpCD ; CPU:$C85D PRG:085D A5 CD + sta Zp01 ; CPU:$C85F PRG:085F 85 01 + jsr CheckState97_02 ; CPU:$C861 PRG:0861 20 C2 C3 + sta ZpC2 ; CPU:$C864 PRG:0864 85 C2 + lda Zp00 ; CPU:$C866 PRG:0866 A5 00 + beq Label_C86C ; CPU:$C868 PRG:0868 F0 02 + sta ZpB4 ; CPU:$C86A PRG:086A 85 B4 +; ----------------------------------------------------------------------------- +; Routine: Label_C86C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C86C: + jmp SubCC8B5 ; CPU:$C86C PRG:086C 4C B5 C8 +; ----------------------------------------------------------------------------- +; Routine: Label_C86F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C86F: + dec ZpBB ; CPU:$C86F PRG:086F C6 BB + beq SubCC884 ; CPU:$C871 PRG:0871 F0 11 + ldy #$22 ; CPU:$C873 PRG:0873 A0 22 + lda ZpBB ; CPU:$C875 PRG:0875 A5 BB + cmp #$20 ; CPU:$C877 PRG:0877 C9 20 + beq Label_C881 ; CPU:$C879 PRG:0879 F0 06 + ldy #$1E ; CPU:$C87B PRG:087B A0 1E + cmp #$10 ; CPU:$C87D PRG:087D C9 10 + bne Label_C883 ; CPU:$C87F PRG:087F D0 02 +; ----------------------------------------------------------------------------- +; Routine: Label_C881 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C881: + sty ZpB6 ; CPU:$C881 PRG:0881 84 B6 +; ----------------------------------------------------------------------------- +; Routine: Label_C883 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C883: + rts ; CPU:$C883 PRG:0883 60 +; ----------------------------------------------------------------------------- +; Routine: SubCC884 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC884: + lda #$00 ; CPU:$C884 PRG:0884 A9 00 + sta ZpB5 ; CPU:$C886 PRG:0886 85 B5 + lda ZpB1 ; CPU:$C888 PRG:0888 A5 B1 + and #$F7 ; CPU:$C88A PRG:088A 29 F7 + sta ZpB1 ; CPU:$C88C PRG:088C 85 B1 + jmp SubCCEBA ; CPU:$C88E PRG:088E 4C BA CE +; ----------------------------------------------------------------------------- +; Routine: Label_C891 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C891: + lda Zp1E ; CPU:$C891 PRG:0891 A5 1E + bne Label_C8A4 ; CPU:$C893 PRG:0893 D0 0F +; ----------------------------------------------------------------------------- +; Routine: Label_C895 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C895: + lda #$00 ; CPU:$C895 PRG:0895 A9 00 + sta ZpC4 ; CPU:$C897 PRG:0897 85 C4 + sta ZpBB ; CPU:$C899 PRG:0899 85 BB + jsr DispatchTableF393 ; CPU:$C89B PRG:089B 20 B9 CA + jsr SubCCEBA ; CPU:$C89E PRG:089E 20 BA CE + jmp SubCC8B5 ; CPU:$C8A1 PRG:08A1 4C B5 C8 +; ----------------------------------------------------------------------------- +; Routine: Label_C8A4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C8A4: + lda #$05 ; CPU:$C8A4 PRG:08A4 A9 05 + sta ZpC2 ; CPU:$C8A6 PRG:08A6 85 C2 + lda Zp1E ; CPU:$C8A8 PRG:08A8 A5 1E + jmp SubCC8B7 ; CPU:$C8AA PRG:08AA 4C B7 C8 +; ----------------------------------------------------------------------------- +; Routine: Label_C8AD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C8AD: + lda ZpC2 ; CPU:$C8AD PRG:08AD A5 C2 + bne SubCC8B5 ; CPU:$C8AF PRG:08AF D0 04 + sta Zp1F ; CPU:$C8B1 PRG:08B1 85 1F + beq Label_C895 ; CPU:$C8B3 PRG:08B3 F0 E0 +; ----------------------------------------------------------------------------- +; Routine: SubCC8B5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC8B5: + lda Zp1F ; CPU:$C8B5 PRG:08B5 A5 1F +; ----------------------------------------------------------------------------- +; Routine: SubCC8B7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC8B7: + sta ZpB1 ; CPU:$C8B7 PRG:08B7 85 B1 + sta Zp11 ; CPU:$C8B9 PRG:08B9 85 11 + lda ZpB6 ; CPU:$C8BB PRG:08BB A5 B6 + cmp #$0C ; CPU:$C8BD PRG:08BD C9 0C + bne Label_C8C7 ; CPU:$C8BF PRG:08BF D0 06 + lda ZpFF ; CPU:$C8C1 PRG:08C1 A5 FF + ora #$80 ; CPU:$C8C3 PRG:08C3 09 80 + bne Label_C8CF ; CPU:$C8C5 PRG:08C5 D0 08 +; ----------------------------------------------------------------------------- +; Routine: Label_C8C7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C8C7: + cmp #$26 ; CPU:$C8C7 PRG:08C7 C9 26 + bne SubCC8D1 ; CPU:$C8C9 PRG:08C9 D0 06 + lda ZpFF ; CPU:$C8CB PRG:08CB A5 FF + ora #$40 ; CPU:$C8CD PRG:08CD 09 40 +; ----------------------------------------------------------------------------- +; Routine: Label_C8CF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C8CF: + sta ZpFF ; CPU:$C8CF PRG:08CF 85 FF +; ----------------------------------------------------------------------------- +; Routine: SubCC8D1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC8D1: + lda ZpBF ; CPU:$C8D1 PRG:08D1 A5 BF + cmp #$40 ; CPU:$C8D3 PRG:08D3 C9 40 + bcc Label_C8E4 ; CPU:$C8D5 PRG:08D5 90 0D +; ----------------------------------------------------------------------------- +; Routine: SubCC8D7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC8D7: + lda ZpC6 ; CPU:$C8D7 PRG:08D7 A5 C6 + bne Label_C8DE ; CPU:$C8D9 PRG:08D9 D0 03 + jsr LoadYFromZpB4 ; CPU:$C8DB PRG:08DB 20 A3 CE +; ----------------------------------------------------------------------------- +; Routine: Label_C8DE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C8DE: + jsr CheckZpB3Return ; CPU:$C8DE PRG:08DE 20 EB CA + jmp SubCC8F4 ; CPU:$C8E1 PRG:08E1 4C F4 C8 +; ----------------------------------------------------------------------------- +; Routine: Label_C8E4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C8E4: + jsr CheckZpB3Return ; CPU:$C8E4 PRG:08E4 20 EB CA + lda ZpBF ; CPU:$C8E7 PRG:08E7 A5 BF + and #$F0 ; CPU:$C8E9 PRG:08E9 29 F0 + beq Label_C8F1 ; CPU:$C8EB PRG:08EB F0 04 + lda ZpC8 ; CPU:$C8ED PRG:08ED A5 C8 + bne Label_C916 ; CPU:$C8EF PRG:08EF D0 25 +; ----------------------------------------------------------------------------- +; Routine: Label_C8F1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C8F1: + jsr SubCCE95 ; CPU:$C8F1 PRG:08F1 20 95 CE +; ----------------------------------------------------------------------------- +; Routine: SubCC8F4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC8F4: + ldy #$00 ; CPU:$C8F4 PRG:08F4 A0 00 + lda ZpBF ; CPU:$C8F6 PRG:08F6 A5 BF + and #$0F ; CPU:$C8F8 PRG:08F8 29 0F + bne Label_C90A ; CPU:$C8FA PRG:08FA D0 0E + lda ZpC8 ; CPU:$C8FC PRG:08FC A5 C8 + bne Label_C916 ; CPU:$C8FE PRG:08FE D0 16 + lda ZpC6 ; CPU:$C900 PRG:0900 A5 C6 + bne Label_C90A ; CPU:$C902 PRG:0902 D0 06 + lda #$03 ; CPU:$C904 PRG:0904 A9 03 + sta ZpC6 ; CPU:$C906 PRG:0906 85 C6 + ldy ZpC7 ; CPU:$C908 PRG:0908 A4 C7 +; ----------------------------------------------------------------------------- +; Routine: Label_C90A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C90A: + tya ; CPU:$C90A PRG:090A 98 + clc ; CPU:$C90B PRG:090B 18 + adc ZpC5 ; CPU:$C90C PRG:090C 65 C5 + lsr Zp11 ; CPU:$C90E PRG:090E 46 11 + bcs Label_C91C ; CPU:$C910 PRG:0910 B0 0A + lsr Zp11 ; CPU:$C912 PRG:0912 46 11 + bcs Label_C917 ; CPU:$C914 PRG:0914 B0 01 +; ----------------------------------------------------------------------------- +; Routine: Label_C916 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C916: + rts ; CPU:$C916 PRG:0916 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C917 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C917: + eor #$FF ; CPU:$C917 PRG:0917 49 FF + sec ; CPU:$C919 PRG:0919 38 + bcs Label_C91D ; CPU:$C91A PRG:091A B0 01 +; ----------------------------------------------------------------------------- +; Routine: Label_C91C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C91C: + clc ; CPU:$C91C PRG:091C 18 +; ----------------------------------------------------------------------------- +; Routine: Label_C91D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C91D: + adc ZpB9 ; CPU:$C91D PRG:091D 65 B9 + sta ZpB9 ; CPU:$C91F PRG:091F 85 B9 + lda ZpBF ; CPU:$C921 PRG:0921 A5 BF + and #$0F ; CPU:$C923 PRG:0923 29 0F + beq Label_C936 ; CPU:$C925 PRG:0925 F0 0F + lda ZpC1 ; CPU:$C927 PRG:0927 A5 C1 + beq Label_C92C ; CPU:$C929 PRG:0929 F0 01 + rts ; CPU:$C92B PRG:092B 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C92C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C92C: + lda ZpBB ; CPU:$C92C PRG:092C A5 BB + bne Label_C939 ; CPU:$C92E PRG:092E D0 09 + lda ZpB1 ; CPU:$C930 PRG:0930 A5 B1 + and #$04 ; CPU:$C932 PRG:0932 29 04 + bne Label_C939 ; CPU:$C934 PRG:0934 D0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_C936 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C936: + jsr SubCD9EA ; CPU:$C936 PRG:0936 20 EA D9 +; ----------------------------------------------------------------------------- +; Routine: Label_C939 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C939: + rts ; CPU:$C939 PRG:0939 60 +; ----------------------------------------------------------------------------- +; Routine: SubCC93A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC93A: + cmp #$AA ; CPU:$C93A PRG:093A C9 AA + beq SubCC97D ; CPU:$C93C PRG:093C F0 3F + cmp #$99 ; CPU:$C93E PRG:093E C9 99 + bne Label_C959 ; CPU:$C940 PRG:0940 D0 17 + lda ZpBF ; CPU:$C942 PRG:0942 A5 BF + and #$0F ; CPU:$C944 PRG:0944 29 0F + bne SubCC97D ; CPU:$C946 PRG:0946 D0 35 + lda ZpC0 ; CPU:$C948 PRG:0948 A5 C0 + and #$0F ; CPU:$C94A PRG:094A 29 0F + cmp #$0F ; CPU:$C94C PRG:094C C9 0F + bne Label_C954 ; CPU:$C94E PRG:094E D0 04 + lda #$FF ; CPU:$C950 PRG:0950 A9 FF + sta ZpC0 ; CPU:$C952 PRG:0952 85 C0 +; ----------------------------------------------------------------------------- +; Routine: Label_C954 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C954: + inc ZpC0 ; CPU:$C954 PRG:0954 E6 C0 + jmp SubCC97D ; CPU:$C956 PRG:0956 4C 7D C9 +; ----------------------------------------------------------------------------- +; Routine: Label_C959 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C959: + tay ; CPU:$C959 PRG:0959 A8 + lda ZpB8 ; CPU:$C95A PRG:095A A5 B8 + cmp #$20 ; CPU:$C95C PRG:095C C9 20 + bcc Label_C96F ; CPU:$C95E PRG:095E 90 0F + lda ZpBF ; CPU:$C960 PRG:0960 A5 BF + and #$0F ; CPU:$C962 PRG:0962 29 0F + beq Label_C96F ; CPU:$C964 PRG:0964 F0 09 + lda ZpCB ; CPU:$C966 PRG:0966 A5 CB + jsr CheckRangeReturn012 ; CPU:$C968 PRG:0968 20 A4 CA + ora #$00 ; CPU:$C96B PRG:096B 09 00 + bne Label_C973 ; CPU:$C96D PRG:096D D0 04 +; ----------------------------------------------------------------------------- +; Routine: Label_C96F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C96F: + tya ; CPU:$C96F PRG:096F 98 + jmp SubCC9DD ; CPU:$C970 PRG:0970 4C DD C9 +; ----------------------------------------------------------------------------- +; Routine: Label_C973 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C973: + jsr SubCCF67 ; CPU:$C973 PRG:0973 20 67 CF + lda #$2C ; CPU:$C976 PRG:0976 A9 2C + ldy #$F3 ; CPU:$C978 PRG:0978 A0 F3 + jmp SubCC992 ; CPU:$C97A PRG:097A 4C 92 C9 +; ----------------------------------------------------------------------------- +; Routine: SubCC97D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC97D: + lda ZpBF ; CPU:$C97D PRG:097D A5 BF + cmp #$30 ; CPU:$C97F PRG:097F C9 30 + bne Label_C98E ; CPU:$C981 PRG:0981 D0 0B + lda ZpC2 ; CPU:$C983 PRG:0983 A5 C2 + bne Label_C99E ; CPU:$C985 PRG:0985 D0 17 + lda #$7B ; CPU:$C987 PRG:0987 A9 7B + ldy #$F3 ; CPU:$C989 PRG:0989 A0 F3 + jmp SubCC992 ; CPU:$C98B PRG:098B 4C 92 C9 +; ----------------------------------------------------------------------------- +; Routine: Label_C98E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C98E: + lda #$3A ; CPU:$C98E PRG:098E A9 3A + ldy #$F3 ; CPU:$C990 PRG:0990 A0 F3 +; ----------------------------------------------------------------------------- +; Routine: SubCC992 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC992: + sta ZpBC ; CPU:$C992 PRG:0992 85 BC + sty ZpBD ; CPU:$C994 PRG:0994 84 BD + lda ZpB1 ; CPU:$C996 PRG:0996 A5 B1 + and #$3F ; CPU:$C998 PRG:0998 29 3F + ora #$40 ; CPU:$C99A PRG:099A 09 40 + sta ZpB1 ; CPU:$C99C PRG:099C 85 B1 +; ----------------------------------------------------------------------------- +; Routine: Label_C99E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C99E: + jmp SubCC9E6 ; CPU:$C99E PRG:099E 4C E6 C9 +; ----------------------------------------------------------------------------- +; Routine: SubCC9A1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC9A1: + tay ; CPU:$C9A1 PRG:09A1 A8 + lda ZpCD ; CPU:$C9A2 PRG:09A2 A5 CD + jsr CheckRangeReturn012 ; CPU:$C9A4 PRG:09A4 20 A4 CA + and #$0F ; CPU:$C9A7 PRG:09A7 29 0F + beq Label_C9D2 ; CPU:$C9A9 PRG:09A9 F0 27 + lda ZpB1 ; CPU:$C9AB PRG:09AB A5 B1 + and #$3F ; CPU:$C9AD PRG:09AD 29 3F + sta ZpB1 ; CPU:$C9AF PRG:09AF 85 B1 + lda ZpBF ; CPU:$C9B1 PRG:09B1 A5 BF + cmp #$30 ; CPU:$C9B3 PRG:09B3 C9 30 + bne Label_C9BD ; CPU:$C9B5 PRG:09B5 D0 06 + lda #$08 ; CPU:$C9B7 PRG:09B7 A9 08 + sta ZpB3 ; CPU:$C9B9 PRG:09B9 85 B3 + bne SubCC9CB ; CPU:$C9BB PRG:09BB D0 0E +; ----------------------------------------------------------------------------- +; Routine: Label_C9BD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C9BD: + lda ZpBF ; CPU:$C9BD PRG:09BD A5 BF + and #$0F ; CPU:$C9BF PRG:09BF 29 0F + beq SubCC9CB ; CPU:$C9C1 PRG:09C1 F0 08 + lda #$00 ; CPU:$C9C3 PRG:09C3 A9 00 + sta ZpC1 ; CPU:$C9C5 PRG:09C5 85 C1 + lda #$00 ; CPU:$C9C7 PRG:09C7 A9 00 + sta ZpB4 ; CPU:$C9C9 PRG:09C9 85 B4 +; ----------------------------------------------------------------------------- +; Routine: SubCC9CB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC9CB: + lda ZpB8 ; CPU:$C9CB PRG:09CB A5 B8 + and #$F8 ; CPU:$C9CD PRG:09CD 29 F8 + sta ZpB8 ; CPU:$C9CF PRG:09CF 85 B8 +; ----------------------------------------------------------------------------- +; Routine: Label_C9D1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C9D1: + rts ; CPU:$C9D1 PRG:09D1 60 +; ----------------------------------------------------------------------------- +; Routine: Label_C9D2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C9D2: + tya ; CPU:$C9D2 PRG:09D2 98 + cmp #$CC ; CPU:$C9D3 PRG:09D3 C9 CC + beq Label_C9F1 ; CPU:$C9D5 PRG:09D5 F0 1A + cmp #$AA ; CPU:$C9D7 PRG:09D7 C9 AA + bne SubCC9DD ; CPU:$C9D9 PRG:09D9 D0 02 +; ----------------------------------------------------------------------------- +; Routine: SubCC9DB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC9DB: + lda #$04 ; CPU:$C9DB PRG:09DB A9 04 +; ----------------------------------------------------------------------------- +; Routine: SubCC9DD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC9DD: + clc ; CPU:$C9DD PRG:09DD 18 + adc ZpB8 ; CPU:$C9DE PRG:09DE 65 B8 + cmp #$08 ; CPU:$C9E0 PRG:09E0 C9 08 + bcc SubCC9E6 ; CPU:$C9E2 PRG:09E2 90 02 + sta ZpB8 ; CPU:$C9E4 PRG:09E4 85 B8 +; ----------------------------------------------------------------------------- +; Routine: SubCC9E6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC9E6: + lda ZpBF ; CPU:$C9E6 PRG:09E6 A5 BF + and #$F0 ; CPU:$C9E8 PRG:09E8 29 F0 + bne Label_C9F8 ; CPU:$C9EA PRG:09EA D0 0C + lda ZpC1 ; CPU:$C9EC PRG:09EC A5 C1 + jmp SubCC9FE ; CPU:$C9EE PRG:09EE 4C FE C9 +; ----------------------------------------------------------------------------- +; Routine: Label_C9F1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C9F1: + lda ZpB2 ; CPU:$C9F1 PRG:09F1 A5 B2 + sta ZpB3 ; CPU:$C9F3 PRG:09F3 85 B3 + jmp SubCC9DB ; CPU:$C9F5 PRG:09F5 4C DB C9 +; ----------------------------------------------------------------------------- +; Routine: Label_C9F8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_C9F8: + cmp #$30 ; CPU:$C9F8 PRG:09F8 C9 30 + beq Label_CA0C ; CPU:$C9FA PRG:09FA F0 10 + lda ZpC0 ; CPU:$C9FC PRG:09FC A5 C0 +; ----------------------------------------------------------------------------- +; Routine: SubCC9FE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCC9FE: + beq Label_CA0C ; CPU:$C9FE PRG:09FE F0 0C + and #$F0 ; CPU:$CA00 PRG:0A00 29 F0 + cmp #$30 ; CPU:$CA02 PRG:0A02 C9 30 + beq Label_C9D1 ; CPU:$CA04 PRG:0A04 F0 CB + lda Zp2F ; CPU:$CA06 PRG:0A06 A5 2F + and #$03 ; CPU:$CA08 PRG:0A08 29 03 + beq Label_CA15 ; CPU:$CA0A PRG:0A0A F0 09 +; ----------------------------------------------------------------------------- +; Routine: Label_CA0C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CA0C: + lda ZpBF ; CPU:$CA0C PRG:0A0C A5 BF + cmp #$40 ; CPU:$CA0E PRG:0A0E C9 40 + bcs Label_CA18 ; CPU:$CA10 PRG:0A10 B0 06 + jsr CheckZpB3Return ; CPU:$CA12 PRG:0A12 20 EB CA +; ----------------------------------------------------------------------------- +; Routine: Label_CA15 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CA15: + jmp SubCC8F4 ; CPU:$CA15 PRG:0A15 4C F4 C8 +; ----------------------------------------------------------------------------- +; Routine: Label_CA18 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CA18: + jmp SubCC8D7 ; CPU:$CA18 PRG:0A18 4C D7 C8 +; ----------------------------------------------------------------------------- +; Routine: SubCCA1B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCA1B: + lda #$03 ; CPU:$CA1B PRG:0A1B A9 03 + jsr SubCCA22 ; CPU:$CA1D PRG:0A1D 20 22 CA +; ----------------------------------------------------------------------------- +; Routine: SubCCA20 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCA20: + lda #$01 ; CPU:$CA20 PRG:0A20 A9 01 +; ----------------------------------------------------------------------------- +; Routine: SubCCA22 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCA22: + sta Zp01 ; CPU:$CA22 PRG:0A22 85 01 + lda #$24 ; CPU:$CA24 PRG:0A24 A9 24 + sta Zp00 ; CPU:$CA26 PRG:0A26 85 00 + jmp SubCCD43 ; CPU:$CA28 PRG:0A28 4C 43 CD +; ----------------------------------------------------------------------------- +; Routine: SubCCA2B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCA2B: + ldy #$02 ; CPU:$CA2B PRG:0A2B A0 02 + sty Zp01 ; CPU:$CA2D PRG:0A2D 84 01 + ldy #$00 ; CPU:$CA2F PRG:0A2F A0 00 + sty Zp00 ; CPU:$CA31 PRG:0A31 84 00 + lda #$F4 ; CPU:$CA33 PRG:0A33 A9 F4 +; ----------------------------------------------------------------------------- +; Routine: Label_CA35 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CA35: + sta (Zp00),y ; CPU:$CA35 PRG:0A35 91 00 + dey ; CPU:$CA37 PRG:0A37 88 + bne Label_CA35 ; CPU:$CA38 PRG:0A38 D0 FB + rts ; CPU:$CA3A PRG:0A3A 60 +; ---- data $CA3B-$CA5D (35 bytes) ---- + .byte $A9, $3F, $A2, $F2, $20, $5E, $CA, $A9, $66, $A2, $F2, $A4, $32, $F0, $14, $C0 ; CPU:$CA3B PRG:0A3B A9 3F A2 F2 20 5E CA A9 66 A2 F2 A4 32 F0 14 C0 + .byte $04, $F0, $10, $A9, $76, $A2, $F2, $C0, $01, $F0, $08, $C0, $03, $F0, $04, $A9 ; CPU:$CA4B PRG:0A4B 04 F0 10 A9 76 A2 F2 C0 01 F0 08 C0 03 F0 04 A9 + .byte $86, $A2, $F2 ; CPU:$CA5B PRG:0A5B 86 A2 F2 +; ----------------------------------------------------------------------------- +; Routine: Label_CA5E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CA5E: + sta Zp00 ; CPU:$CA5E PRG:0A5E 85 00 + stx Zp01 ; CPU:$CA60 PRG:0A60 86 01 + jsr SubCCE00 ; CPU:$CA62 PRG:0A62 20 00 CE +; ----------------------------------------------------------------------------- +; Routine: Label_CA65 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CA65: + rts ; CPU:$CA65 PRG:0A65 60 +; ----------------------------------------------------------------------------- +; Routine: SubCCA66 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCA66: + ldy Zp3F ; CPU:$CA66 PRG:0A66 A4 3F + beq Label_CA65 ; CPU:$CA68 PRG:0A68 F0 FB + dey ; CPU:$CA6A PRG:0A6A 88 + beq Label_CA73 ; CPU:$CA6B PRG:0A6B F0 06 + lda #$27 ; CPU:$CA6D PRG:0A6D A9 27 + ldx #$F2 ; CPU:$CA6F PRG:0A6F A2 F2 + bne Label_CA77 ; CPU:$CA71 PRG:0A71 D0 04 +; ----------------------------------------------------------------------------- +; Routine: Label_CA73 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CA73: + lda #$03 ; CPU:$CA73 PRG:0A73 A9 03 + ldx #$F2 ; CPU:$CA75 PRG:0A75 A2 F2 +; ----------------------------------------------------------------------------- +; Routine: Label_CA77 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CA77: + ldy #$00 ; CPU:$CA77 PRG:0A77 A0 00 + sty Zp3F ; CPU:$CA79 PRG:0A79 84 3F + beq Label_CA5E ; CPU:$CA7B PRG:0A7B F0 E1 +; ----------------------------------------------------------------------------- +; Routine: SubCCA7D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCA7D: + lda Zp00 ; CPU:$CA7D PRG:0A7D A5 00 + lsr a ; CPU:$CA7F PRG:0A7F 4A + lsr a ; CPU:$CA80 PRG:0A80 4A + lsr a ; CPU:$CA81 PRG:0A81 4A + sta Zp12 ; CPU:$CA82 PRG:0A82 85 12 + lda #$20 ; CPU:$CA84 PRG:0A84 A9 20 + sta Zp13 ; CPU:$CA86 PRG:0A86 85 13 + lda #$00 ; CPU:$CA88 PRG:0A88 A9 00 + sta Zp15 ; CPU:$CA8A PRG:0A8A 85 15 + lda Zp01 ; CPU:$CA8C PRG:0A8C A5 01 + and #$F8 ; CPU:$CA8E PRG:0A8E 29 F8 + asl a ; CPU:$CA90 PRG:0A90 0A + rol Zp15 ; CPU:$CA91 PRG:0A91 26 15 + asl a ; CPU:$CA93 PRG:0A93 0A + rol Zp15 ; CPU:$CA94 PRG:0A94 26 15 + sta Zp14 ; CPU:$CA96 PRG:0A96 85 14 + jsr AdvanceDispatchPointer ; CPU:$CA98 PRG:0A98 20 B4 CD + lda Zp15 ; CPU:$CA9B PRG:0A9B A5 15 + sta Zp00 ; CPU:$CA9D PRG:0A9D 85 00 + lda Zp14 ; CPU:$CA9F PRG:0A9F A5 14 + sta Zp01 ; CPU:$CAA1 PRG:0AA1 85 01 + rts ; CPU:$CAA3 PRG:0AA3 60 +; ----------------------------------------------------------------------------- +; Routine: CheckRangeReturn012 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +CheckRangeReturn012: + cmp #$92 ; CPU:$CAA4 PRG:0AA4 C9 92 + bcc Label_CAB6 ; CPU:$CAA6 PRG:0AA6 90 0E + cmp #$A0 ; CPU:$CAA8 PRG:0AA8 C9 A0 + bcc Label_CAB3 ; CPU:$CAAA PRG:0AAA 90 07 + cmp #$FA ; CPU:$CAAC PRG:0AAC C9 FA + bcs Label_CAB3 ; CPU:$CAAE PRG:0AAE B0 03 + lda #$02 ; CPU:$CAB0 PRG:0AB0 A9 02 + rts ; CPU:$CAB2 PRG:0AB2 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CAB3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CAB3: + lda #$01 ; CPU:$CAB3 PRG:0AB3 A9 01 + rts ; CPU:$CAB5 PRG:0AB5 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CAB6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CAB6: + lda #$00 ; CPU:$CAB6 PRG:0AB6 A9 00 + rts ; CPU:$CAB8 PRG:0AB8 60 +; ----------------------------------------------------------------------------- +; Routine: DispatchTableF393 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchTableF393: + lda #$93 ; CPU:$CAB9 PRG:0AB9 A9 93 + sta Zp14 ; CPU:$CABB PRG:0ABB 85 14 + lda #$F3 ; CPU:$CABD PRG:0ABD A9 F3 + sta Zp15 ; CPU:$CABF PRG:0ABF 85 15 + lda ZpC3 ; CPU:$CAC1 PRG:0AC1 A5 C3 + sta Zp12 ; CPU:$CAC3 PRG:0AC3 85 12 + lda #$00 ; CPU:$CAC5 PRG:0AC5 A9 00 + sta Zp13 ; CPU:$CAC7 PRG:0AC7 85 13 + jsr AdvanceDispatchPointer ; CPU:$CAC9 PRG:0AC9 20 B4 CD +; ----------------------------------------------------------------------------- +; Routine: SubCCACC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCACC: + lda ZpC4 ; CPU:$CACC PRG:0ACC A5 C4 + asl a ; CPU:$CACE PRG:0ACE 0A + clc ; CPU:$CACF PRG:0ACF 18 + adc ZpC4 ; CPU:$CAD0 PRG:0AD0 65 C4 + tay ; CPU:$CAD2 PRG:0AD2 A8 + lda (Zp14),y ; CPU:$CAD3 PRG:0AD3 B1 14 + cmp #$AA ; CPU:$CAD5 PRG:0AD5 C9 AA + bne Label_CADE ; CPU:$CAD7 PRG:0AD7 D0 05 + dec ZpC4 ; CPU:$CAD9 PRG:0AD9 C6 C4 + jmp SubCCACC ; CPU:$CADB PRG:0ADB 4C CC CA +; ----------------------------------------------------------------------------- +; Routine: Label_CADE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CADE: + sta ZpC5 ; CPU:$CADE PRG:0ADE 85 C5 + iny ; CPU:$CAE0 PRG:0AE0 C8 + lda (Zp14),y ; CPU:$CAE1 PRG:0AE1 B1 14 + sta ZpB2 ; CPU:$CAE3 PRG:0AE3 85 B2 + iny ; CPU:$CAE5 PRG:0AE5 C8 + lda (Zp14),y ; CPU:$CAE6 PRG:0AE6 B1 14 + sta ZpC7 ; CPU:$CAE8 PRG:0AE8 85 C7 + rts ; CPU:$CAEA PRG:0AEA 60 +; ----------------------------------------------------------------------------- +; Routine: CheckZpB3Return +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +CheckZpB3Return: + lda ZpB3 ; CPU:$CAEB PRG:0AEB A5 B3 + beq Label_CAF2 ; CPU:$CAED PRG:0AED F0 03 + pla ; CPU:$CAEF PRG:0AEF 68 + pla ; CPU:$CAF0 PRG:0AF0 68 + rts ; CPU:$CAF1 PRG:0AF1 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CAF2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CAF2: + lda ZpB2 ; CPU:$CAF2 PRG:0AF2 A5 B2 + sta ZpB3 ; CPU:$CAF4 PRG:0AF4 85 B3 + rts ; CPU:$CAF6 PRG:0AF6 60 +; ----------------------------------------------------------------------------- +; Routine: SubCCAF7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCAF7: + lda Zp42 ; CPU:$CAF7 PRG:0AF7 A5 42 + beq Label_CB4F ; CPU:$CAF9 PRG:0AF9 F0 54 + lda #$0D ; CPU:$CAFB PRG:0AFB A9 0D + sta Zp33 ; CPU:$CAFD PRG:0AFD 85 33 + ldx #$01 ; CPU:$CAFF PRG:0AFF A2 01 + lda Zp2F ; CPU:$CB01 PRG:0B01 A5 2F + lsr a ; CPU:$CB03 PRG:0B03 4A + bcc Label_CB08 ; CPU:$CB04 PRG:0B04 90 02 + ldx #$0E ; CPU:$CB06 PRG:0B06 A2 0E +; ----------------------------------------------------------------------------- +; Routine: Label_CB08 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB08: + lda #$00 ; CPU:$CB08 PRG:0B08 A9 00 + sta Zp14 ; CPU:$CB0A PRG:0B0A 85 14 + lda #$03 ; CPU:$CB0C PRG:0B0C A9 03 + sta Zp15 ; CPU:$CB0E PRG:0B0E 85 15 + lda #$20 ; CPU:$CB10 PRG:0B10 A9 20 + sta Zp12 ; CPU:$CB12 PRG:0B12 85 12 + lda #$00 ; CPU:$CB14 PRG:0B14 A9 00 + sta Zp13 ; CPU:$CB16 PRG:0B16 85 13 +; ----------------------------------------------------------------------------- +; Routine: Label_CB18 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB18: + ldy #$00 ; CPU:$CB18 PRG:0B18 A0 00 + lda (Zp14),y ; CPU:$CB1A PRG:0B1A B1 14 + beq Label_CB29 ; CPU:$CB1C PRG:0B1C F0 0B + ldy #$03 ; CPU:$CB1E PRG:0B1E A0 03 + lda (Zp14),y ; CPU:$CB20 PRG:0B20 B1 14 + beq Label_CB29 ; CPU:$CB22 PRG:0B22 F0 05 + sec ; CPU:$CB24 PRG:0B24 38 + sbc #$01 ; CPU:$CB25 PRG:0B25 E9 01 + sta (Zp14),y ; CPU:$CB27 PRG:0B27 91 14 +; ----------------------------------------------------------------------------- +; Routine: Label_CB29 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB29: + lda Zp33 ; CPU:$CB29 PRG:0B29 A5 33 + cmp #$0B ; CPU:$CB2B PRG:0B2B C9 0B + bcc Label_CB40 ; CPU:$CB2D PRG:0B2D 90 11 + cpx #$0E ; CPU:$CB2F PRG:0B2F E0 0E + bcs SubCCB48 ; CPU:$CB31 PRG:0B31 B0 15 + ldy #$1B ; CPU:$CB33 PRG:0B33 A0 1B + jsr SubCCB50 ; CPU:$CB35 PRG:0B35 20 50 CB +; ----------------------------------------------------------------------------- +; Routine: Label_CB38 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB38: + ldy #$1D ; CPU:$CB38 PRG:0B38 A0 1D + jsr SubCCB50 ; CPU:$CB3A PRG:0B3A 20 50 CB + jmp SubCCB48 ; CPU:$CB3D PRG:0B3D 4C 48 CB +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_CB40: + cmp #$05 ; CPU:$CB40 PRG:0B40 C9 05 + bcc SubCCB48 ; CPU:$CB42 PRG:0B42 90 04 + cpx #$0E ; CPU:$CB44 PRG:0B44 E0 0E + bcs Label_CB38 ; CPU:$CB46 PRG:0B46 B0 F0 +; ----------------------------------------------------------------------------- +; Routine: SubCCB48 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCB48: + jsr AdvanceDispatchPointer ; CPU:$CB48 PRG:0B48 20 B4 CD + dec Zp33 ; CPU:$CB4B PRG:0B4B C6 33 + bne Label_CB18 ; CPU:$CB4D PRG:0B4D D0 C9 +; ----------------------------------------------------------------------------- +; Routine: Label_CB4F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB4F: + rts ; CPU:$CB4F PRG:0B4F 60 +; ----------------------------------------------------------------------------- +; Routine: SubCCB50 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCB50: + lda $0520,x ; CPU:$CB50 PRG:0B50 BD 20 05 + sta (Zp14),y ; CPU:$CB53 PRG:0B53 91 14 + inx ; CPU:$CB55 PRG:0B55 E8 + inx ; CPU:$CB56 PRG:0B56 E8 + rts ; CPU:$CB57 PRG:0B57 60 +; ----------------------------------------------------------------------------- +; Routine: SubCCB58 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCB58: + lda Zp42 ; CPU:$CB58 PRG:0B58 A5 42 + beq Label_CB84 ; CPU:$CB5A PRG:0B5A F0 28 + ldx #$00 ; CPU:$CB5C PRG:0B5C A2 00 + lda Zp2F ; CPU:$CB5E PRG:0B5E A5 2F + lsr a ; CPU:$CB60 PRG:0B60 4A + bcc Label_CB65 ; CPU:$CB61 PRG:0B61 90 02 + ldx #$0D ; CPU:$CB63 PRG:0B63 A2 0D +; ----------------------------------------------------------------------------- +; Routine: Label_CB65 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB65: + ldy #$06 ; CPU:$CB65 PRG:0B65 A0 06 + lda $2002 ; CPU:$CB67 PRG:0B67 AD 02 20 +; ----------------------------------------------------------------------------- +; Routine: Label_CB6A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB6A: + lda $0520,x ; CPU:$CB6A PRG:0B6A BD 20 05 + sta $2006 ; CPU:$CB6D PRG:0B6D 8D 06 20 + inx ; CPU:$CB70 PRG:0B70 E8 + lda $0520,x ; CPU:$CB71 PRG:0B71 BD 20 05 + sta $2006 ; CPU:$CB74 PRG:0B74 8D 06 20 + lda $2007 ; CPU:$CB77 PRG:0B77 AD 07 20 + lda $2007 ; CPU:$CB7A PRG:0B7A AD 07 20 + sta $0520,x ; CPU:$CB7D PRG:0B7D 9D 20 05 + inx ; CPU:$CB80 PRG:0B80 E8 + dey ; CPU:$CB81 PRG:0B81 88 + bne Label_CB6A ; CPU:$CB82 PRG:0B82 D0 E6 +; ----------------------------------------------------------------------------- +; Routine: Label_CB84 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB84: + rts ; CPU:$CB84 PRG:0B84 60 +; ----------------------------------------------------------------------------- +; Routine: SubCCB85 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCB85: + lda ZpA0 ; CPU:$CB85 PRG:0B85 A5 A0 + sta Zp14 ; CPU:$CB87 PRG:0B87 85 14 + lda ZpA1 ; CPU:$CB89 PRG:0B89 A5 A1 + sta Zp15 ; CPU:$CB8B PRG:0B8B 85 15 + lda ZpA2 ; CPU:$CB8D PRG:0B8D A5 A2 + sta Zp12 ; CPU:$CB8F PRG:0B8F 85 12 + lda #$00 ; CPU:$CB91 PRG:0B91 A9 00 + sta Zp13 ; CPU:$CB93 PRG:0B93 85 13 + jsr AdvanceDispatchPointer ; CPU:$CB95 PRG:0B95 20 B4 CD + tay ; CPU:$CB98 PRG:0B98 A8 + tax ; CPU:$CB99 PRG:0B99 AA + rts ; CPU:$CB9A PRG:0B9A 60 +; ----------------------------------------------------------------------------- +; Routine: SubCCB9B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCB9B: + jsr SubCCB85 ; CPU:$CB9B PRG:0B9B 20 85 CB +; ----------------------------------------------------------------------------- +; Routine: Label_CB9E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CB9E: + lda (Zp14),y ; CPU:$CB9E PRG:0B9E B1 14 + sta ZpB0,x ; CPU:$CBA0 PRG:0BA0 95 B0 + iny ; CPU:$CBA2 PRG:0BA2 C8 + inx ; CPU:$CBA3 PRG:0BA3 E8 + cpx #$20 ; CPU:$CBA4 PRG:0BA4 E0 20 + bne Label_CB9E ; CPU:$CBA6 PRG:0BA6 D0 F6 + lda #$00 ; CPU:$CBA8 PRG:0BA8 A9 00 + tay ; CPU:$CBAA PRG:0BAA A8 + sta (Zp14),y ; CPU:$CBAB PRG:0BAB 91 14 + rts ; CPU:$CBAD PRG:0BAD 60 +; ----------------------------------------------------------------------------- +; Routine: SubCCBAE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCBAE: + lda ZpA2 ; CPU:$CBAE PRG:0BAE A5 A2 + clc ; CPU:$CBB0 PRG:0BB0 18 + adc #$20 ; CPU:$CBB1 PRG:0BB1 69 20 + sta ZpA2 ; CPU:$CBB3 PRG:0BB3 85 A2 + rts ; CPU:$CBB5 PRG:0BB5 60 +; ----------------------------------------------------------------------------- +; Routine: SubCCBB6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCBB6: + jsr SubCCB85 ; CPU:$CBB6 PRG:0BB6 20 85 CB +; ----------------------------------------------------------------------------- +; Routine: Label_CBB9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CBB9: + lda ZpB0,x ; CPU:$CBB9 PRG:0BB9 B5 B0 + sta (Zp14),y ; CPU:$CBBB PRG:0BBB 91 14 + iny ; CPU:$CBBD PRG:0BBD C8 + inx ; CPU:$CBBE PRG:0BBE E8 + cpx #$20 ; CPU:$CBBF PRG:0BBF E0 20 + bne Label_CBB9 ; CPU:$CBC1 PRG:0BC1 D0 F6 +; ----------------------------------------------------------------------------- +; Routine: Label_CBC3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CBC3: + rts ; CPU:$CBC3 PRG:0BC3 60 +; ----------------------------------------------------------------------------- +; Routine: SubCCBC4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCBC4: + lda ZpB0 ; CPU:$CBC4 PRG:0BC4 A5 B0 + beq Label_CBC3 ; CPU:$CBC6 PRG:0BC6 F0 FB + lda #$F2 ; CPU:$CBC8 PRG:0BC8 A9 F2 + sta Zp15 ; CPU:$CBCA PRG:0BCA 85 15 + lda #$96 ; CPU:$CBCC PRG:0BCC A9 96 + sta Zp14 ; CPU:$CBCE PRG:0BCE 85 14 + lda ZpB5 ; CPU:$CBD0 PRG:0BD0 A5 B5 + jsr SubCCC29 ; CPU:$CBD2 PRG:0BD2 20 29 CC + lda ZpB6 ; CPU:$CBD5 PRG:0BD5 A5 B6 + sta Zp11 ; CPU:$CBD7 PRG:0BD7 85 11 + ldy #$00 ; CPU:$CBD9 PRG:0BD9 A0 00 + ldx ZpBA ; CPU:$CBDB PRG:0BDB A6 BA +; ----------------------------------------------------------------------------- +; Routine: Label_CBDD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CBDD: + lda (Zp12),y ; CPU:$CBDD PRG:0BDD B1 12 + beq Label_CBE9 ; CPU:$CBDF PRG:0BDF F0 08 + bpl Label_CBE4 ; CPU:$CBE1 PRG:0BE1 10 01 + asl a ; CPU:$CBE3 PRG:0BE3 0A +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_CBE4: + eor Zp2F ; CPU:$CBE4 PRG:0BE4 45 2F + lsr a ; CPU:$CBE6 PRG:0BE6 4A + bcs Label_CC1D ; CPU:$CBE7 PRG:0BE7 B0 34 +; ----------------------------------------------------------------------------- +; Routine: Label_CBE9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CBE9: + iny ; CPU:$CBE9 PRG:0BE9 C8 + lda (Zp12),y ; CPU:$CBEA PRG:0BEA B1 12 + iny ; CPU:$CBEC PRG:0BEC C8 + clc ; CPU:$CBED PRG:0BED 18 + adc ZpB8 ; CPU:$CBEE PRG:0BEE 65 B8 + adc #$FF ; CPU:$CBF0 PRG:0BF0 69 FF + sta $0200,x ; CPU:$CBF2 PRG:0BF2 9D 00 02 + inx ; CPU:$CBF5 PRG:0BF5 E8 + lda Zp11 ; CPU:$CBF6 PRG:0BF6 A5 11 + sta $0200,x ; CPU:$CBF8 PRG:0BF8 9D 00 02 + inc Zp11 ; CPU:$CBFB PRG:0BFB E6 11 + inx ; CPU:$CBFD PRG:0BFD E8 + lda ZpB7 ; CPU:$CBFE PRG:0BFE A5 B7 + sta $0200,x ; CPU:$CC00 PRG:0C00 9D 00 02 + inx ; CPU:$CC03 PRG:0C03 E8 + lda (Zp12),y ; CPU:$CC04 PRG:0C04 B1 12 + bit ZpB7 ; CPU:$CC06 PRG:0C06 24 B7 + bvs Label_CC0D ; CPU:$CC08 PRG:0C08 70 03 + clc ; CPU:$CC0A PRG:0C0A 18 + bcc Label_CC13 ; CPU:$CC0B PRG:0C0B 90 06 +; ----------------------------------------------------------------------------- +; Routine: Label_CC0D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CC0D: + eor #$FF ; CPU:$CC0D PRG:0C0D 49 FF + sec ; CPU:$CC0F PRG:0C0F 38 + sbc #$08 ; CPU:$CC10 PRG:0C10 E9 08 + sec ; CPU:$CC12 PRG:0C12 38 +; ----------------------------------------------------------------------------- +; Routine: Label_CC13 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CC13: + adc ZpB9 ; CPU:$CC13 PRG:0C13 65 B9 + iny ; CPU:$CC15 PRG:0C15 C8 + sta $0200,x ; CPU:$CC16 PRG:0C16 9D 00 02 + inx ; CPU:$CC19 PRG:0C19 E8 + jmp SubCCC22 ; CPU:$CC1A PRG:0C1A 4C 22 CC +; ----------------------------------------------------------------------------- +; Routine: Label_CC1D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CC1D: + iny ; CPU:$CC1D PRG:0C1D C8 + iny ; CPU:$CC1E PRG:0C1E C8 + iny ; CPU:$CC1F PRG:0C1F C8 + inc Zp11 ; CPU:$CC20 PRG:0C20 E6 11 +; ----------------------------------------------------------------------------- +; Routine: SubCCC22 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCC22: + lda (Zp12),y ; CPU:$CC22 PRG:0C22 B1 12 + cmp #$AA ; CPU:$CC24 PRG:0C24 C9 AA + bne Label_CBDD ; CPU:$CC26 PRG:0C26 D0 B5 + rts ; CPU:$CC28 PRG:0C28 60 +; ----------------------------------------------------------------------------- +; Routine: SubCCC29 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCC29: + asl a ; CPU:$CC29 PRG:0C29 0A + sta Zp12 ; CPU:$CC2A PRG:0C2A 85 12 + lda #$00 ; CPU:$CC2C PRG:0C2C A9 00 + tay ; CPU:$CC2E PRG:0C2E A8 + rol a ; CPU:$CC2F PRG:0C2F 2A + sta Zp13 ; CPU:$CC30 PRG:0C30 85 13 + jsr AdvanceDispatchPointer ; CPU:$CC32 PRG:0C32 20 B4 CD + lda (Zp14),y ; CPU:$CC35 PRG:0C35 B1 14 + sta Zp12 ; CPU:$CC37 PRG:0C37 85 12 + iny ; CPU:$CC39 PRG:0C39 C8 + lda (Zp14),y ; CPU:$CC3A PRG:0C3A B1 14 + sta Zp13 ; CPU:$CC3C PRG:0C3C 85 13 + rts ; CPU:$CC3E PRG:0C3E 60 +; ----------------------------------------------------------------------------- +; Routine: SubCCC3F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCC3F: + lda ZpB8 ; CPU:$CC3F PRG:0C3F A5 B8 + sec ; CPU:$CC41 PRG:0C41 38 + sbc #$0F ; CPU:$CC42 PRG:0C42 E9 0F + cmp #$20 ; CPU:$CC44 PRG:0C44 C9 20 + bcc Label_CC4C ; CPU:$CC46 PRG:0C46 90 04 + cmp #$E0 ; CPU:$CC48 PRG:0C48 C9 E0 + bcc Label_CC54 ; CPU:$CC4A PRG:0C4A 90 08 +; ----------------------------------------------------------------------------- +; Routine: Label_CC4C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CC4C: + lda #$00 ; CPU:$CC4C PRG:0C4C A9 00 + sta Zp01 ; CPU:$CC4E PRG:0C4E 85 01 + lda #$20 ; CPU:$CC50 PRG:0C50 A9 20 + bne Label_CC5F ; CPU:$CC52 PRG:0C52 D0 0B +; ----------------------------------------------------------------------------- +; Routine: Label_CC54 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CC54: + sta Zp01 ; CPU:$CC54 PRG:0C54 85 01 + lda ZpB9 ; CPU:$CC56 PRG:0C56 A5 B9 + sta Zp00 ; CPU:$CC58 PRG:0C58 85 00 + jsr SubCCA7D ; CPU:$CC5A PRG:0C5A 20 7D CA + lda Zp00 ; CPU:$CC5D PRG:0C5D A5 00 +; ----------------------------------------------------------------------------- +; Routine: Label_CC5F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CC5F: + ldx $05FA ; CPU:$CC5F PRG:0C5F AE FA 05 + sta ZpCA ; CPU:$CC62 PRG:0C62 85 CA + sta $0520,x ; CPU:$CC64 PRG:0C64 9D 20 05 + inx ; CPU:$CC67 PRG:0C67 E8 + lda Zp01 ; CPU:$CC68 PRG:0C68 A5 01 + sta ZpC9 ; CPU:$CC6A PRG:0C6A 85 C9 + sta $0520,x ; CPU:$CC6C PRG:0C6C 9D 20 05 + inx ; CPU:$CC6F PRG:0C6F E8 + stx $05FA ; CPU:$CC70 PRG:0C70 8E FA 05 +; ----------------------------------------------------------------------------- +; Routine: SubCCC73 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCC73: + lda ZpB8 ; CPU:$CC73 PRG:0C73 A5 B8 + clc ; CPU:$CC75 PRG:0C75 18 + adc #$08 ; CPU:$CC76 PRG:0C76 69 08 + cmp #$E4 ; CPU:$CC78 PRG:0C78 C9 E4 + bcc Label_CC84 ; CPU:$CC7A PRG:0C7A 90 08 + lda #$00 ; CPU:$CC7C PRG:0C7C A9 00 + sta Zp01 ; CPU:$CC7E PRG:0C7E 85 01 + lda #$20 ; CPU:$CC80 PRG:0C80 A9 20 + bne Label_CC8F ; CPU:$CC82 PRG:0C82 D0 0B +; ----------------------------------------------------------------------------- +; Routine: Label_CC84 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CC84: + sta Zp01 ; CPU:$CC84 PRG:0C84 85 01 + lda ZpB9 ; CPU:$CC86 PRG:0C86 A5 B9 + sta Zp00 ; CPU:$CC88 PRG:0C88 85 00 + jsr SubCCA7D ; CPU:$CC8A PRG:0C8A 20 7D CA + lda Zp00 ; CPU:$CC8D PRG:0C8D A5 00 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_CC8F: + ldx $05FA ; CPU:$CC8F PRG:0C8F AE FA 05 + sta $0520,x ; CPU:$CC92 PRG:0C92 9D 20 05 + inx ; CPU:$CC95 PRG:0C95 E8 + lda Zp01 ; CPU:$CC96 PRG:0C96 A5 01 + sta $0520,x ; CPU:$CC98 PRG:0C98 9D 20 05 + inx ; CPU:$CC9B PRG:0C9B E8 + stx $05FA ; CPU:$CC9C PRG:0C9C 8E FA 05 + rts ; CPU:$CC9F PRG:0C9F 60 +; ----------------------------------------------------------------------------- +; Routine: PushTablePointerDispatch +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +PushTablePointerDispatch: + sty Zp1E ; CPU:$CCA0 PRG:0CA0 84 1E + lda ZpBC ; CPU:$CCA2 PRG:0CA2 A5 BC + sta Zp14 ; CPU:$CCA4 PRG:0CA4 85 14 + lda ZpBD ; CPU:$CCA6 PRG:0CA6 A5 BD + sta Zp15 ; CPU:$CCA8 PRG:0CA8 85 15 + ldy #$00 ; CPU:$CCAA PRG:0CAA A0 00 + lda (Zp14),y ; CPU:$CCAC PRG:0CAC B1 14 + cmp #$AA ; CPU:$CCAE PRG:0CAE C9 AA + beq Label_CCC2 ; CPU:$CCB0 PRG:0CB0 F0 10 + sty Zp13 ; CPU:$CCB2 PRG:0CB2 84 13 + iny ; CPU:$CCB4 PRG:0CB4 C8 + sty Zp12 ; CPU:$CCB5 PRG:0CB5 84 12 + jsr AdvanceDispatchPointer ; CPU:$CCB7 PRG:0CB7 20 B4 CD + ldy Zp14 ; CPU:$CCBA PRG:0CBA A4 14 + sty ZpBC ; CPU:$CCBC PRG:0CBC 84 BC + ldy Zp15 ; CPU:$CCBE PRG:0CBE A4 15 + sty ZpBD ; CPU:$CCC0 PRG:0CC0 84 BD +; ----------------------------------------------------------------------------- +; Routine: Label_CCC2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CCC2: + ldy Zp1E ; CPU:$CCC2 PRG:0CC2 A4 1E + rts ; CPU:$CCC4 PRG:0CC4 60 +; ----------------------------------------------------------------------------- +; Routine: SubCCCC5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCCC5: + ldx #$01 ; CPU:$CCC5 PRG:0CC5 A2 01 + stx $4016 ; CPU:$CCC7 PRG:0CC7 8E 16 40 + dex ; CPU:$CCCA PRG:0CCA CA + txa ; CPU:$CCCB PRG:0CCB 8A + sta $4016 ; CPU:$CCCC PRG:0CCC 8D 16 40 + jsr SubCCCD3 ; CPU:$CCCF PRG:0CCF 20 D3 CC + inx ; CPU:$CCD2 PRG:0CD2 E8 +; ----------------------------------------------------------------------------- +; Routine: SubCCCD3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCCD3: + ldy #$08 ; CPU:$CCD3 PRG:0CD3 A0 08 +; ----------------------------------------------------------------------------- +; Routine: Label_CCD5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CCD5: + pha ; CPU:$CCD5 PRG:0CD5 48 + lda $4016,x ; CPU:$CCD6 PRG:0CD6 BD 16 40 + sta Zp00 ; CPU:$CCD9 PRG:0CD9 85 00 + lsr a ; CPU:$CCDB PRG:0CDB 4A + ora Zp00 ; CPU:$CCDC PRG:0CDC 05 00 + lsr a ; CPU:$CCDE PRG:0CDE 4A + pla ; CPU:$CCDF PRG:0CDF 68 + rol a ; CPU:$CCE0 PRG:0CE0 2A + dey ; CPU:$CCE1 PRG:0CE1 88 + bne Label_CCD5 ; CPU:$CCE2 PRG:0CE2 D0 F1 + stx Zp00 ; CPU:$CCE4 PRG:0CE4 86 00 + asl Zp00 ; CPU:$CCE6 PRG:0CE6 06 00 + ldx Zp00 ; CPU:$CCE8 PRG:0CE8 A6 00 + ldy Zp18,x ; CPU:$CCEA PRG:0CEA B4 18 + sty Zp00 ; CPU:$CCEC PRG:0CEC 84 00 + sta Zp18,x ; CPU:$CCEE PRG:0CEE 95 18 + sta Zp19,x ; CPU:$CCF0 PRG:0CF0 95 19 + and #$FF ; CPU:$CCF2 PRG:0CF2 29 FF + bpl Label_CCFE ; CPU:$CCF4 PRG:0CF4 10 08 + bit Zp00 ; CPU:$CCF6 PRG:0CF6 24 00 + bpl Label_CCFE ; CPU:$CCF8 PRG:0CF8 10 04 + and #$7F ; CPU:$CCFA PRG:0CFA 29 7F + sta Zp19,x ; CPU:$CCFC PRG:0CFC 95 19 +; ----------------------------------------------------------------------------- +; Routine: Label_CCFE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CCFE: + rts ; CPU:$CCFE PRG:0CFE 60 +; ----------------------------------------------------------------------------- +; Routine: SubCCCFF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCCFF: + lda Zp21 ; CPU:$CCFF PRG:0CFF A5 21 + beq Label_CD42 ; CPU:$CD01 PRG:0D01 F0 3F + lda #$91 ; CPU:$CD03 PRG:0D03 A9 91 + sta Zp00 ; CPU:$CD05 PRG:0D05 85 00 + lda #$05 ; CPU:$CD07 PRG:0D07 A9 05 + sta Zp01 ; CPU:$CD09 PRG:0D09 85 01 + lda Zp09 ; CPU:$CD0B PRG:0D0B A5 09 + and #$FB ; CPU:$CD0D PRG:0D0D 29 FB + sta $2000 ; CPU:$CD0F PRG:0D0F 8D 00 20 + sta Zp09 ; CPU:$CD12 PRG:0D12 85 09 + ldx $2002 ; CPU:$CD14 PRG:0D14 AE 02 20 + ldy #$00 ; CPU:$CD17 PRG:0D17 A0 00 + beq Label_CD34 ; CPU:$CD19 PRG:0D19 F0 19 +; ----------------------------------------------------------------------------- +; Routine: Label_CD1B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CD1B: + sta $2006 ; CPU:$CD1B PRG:0D1B 8D 06 20 + iny ; CPU:$CD1E PRG:0D1E C8 + lda (Zp00),y ; CPU:$CD1F PRG:0D1F B1 00 + sta $2006 ; CPU:$CD21 PRG:0D21 8D 06 20 + iny ; CPU:$CD24 PRG:0D24 C8 + lda (Zp00),y ; CPU:$CD25 PRG:0D25 B1 00 + and #$3F ; CPU:$CD27 PRG:0D27 29 3F + tax ; CPU:$CD29 PRG:0D29 AA +; ----------------------------------------------------------------------------- +; Routine: Label_CD2A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CD2A: + iny ; CPU:$CD2A PRG:0D2A C8 + lda (Zp00),y ; CPU:$CD2B PRG:0D2B B1 00 + sta $2007 ; CPU:$CD2D PRG:0D2D 8D 07 20 + dex ; CPU:$CD30 PRG:0D30 CA + bne Label_CD2A ; CPU:$CD31 PRG:0D31 D0 F7 + iny ; CPU:$CD33 PRG:0D33 C8 +; ----------------------------------------------------------------------------- +; Routine: Label_CD34 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CD34: + lda (Zp00),y ; CPU:$CD34 PRG:0D34 B1 00 + bne Label_CD1B ; CPU:$CD36 PRG:0D36 D0 E3 + lda #$00 ; CPU:$CD38 PRG:0D38 A9 00 + sta $0590 ; CPU:$CD3A PRG:0D3A 8D 90 05 + sta $0591 ; CPU:$CD3D PRG:0D3D 8D 91 05 + sta Zp21 ; CPU:$CD40 PRG:0D40 85 21 +; ----------------------------------------------------------------------------- +; Routine: Label_CD42 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CD42: + rts ; CPU:$CD42 PRG:0D42 60 +; ----------------------------------------------------------------------------- +; Routine: SubCCD43 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCD43: + lda $2002 ; CPU:$CD43 PRG:0D43 AD 02 20 + lda Zp09 ; CPU:$CD46 PRG:0D46 A5 09 + and #$FB ; CPU:$CD48 PRG:0D48 29 FB + sta $2000 ; CPU:$CD4A PRG:0D4A 8D 00 20 + sta Zp09 ; CPU:$CD4D PRG:0D4D 85 09 + lda #$1C ; CPU:$CD4F PRG:0D4F A9 1C + clc ; CPU:$CD51 PRG:0D51 18 +; ----------------------------------------------------------------------------- +; Routine: Label_CD52 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CD52: + adc #$04 ; CPU:$CD52 PRG:0D52 69 04 + dec Zp01 ; CPU:$CD54 PRG:0D54 C6 01 + bne Label_CD52 ; CPU:$CD56 PRG:0D56 D0 FA + sta Zp02 ; CPU:$CD58 PRG:0D58 85 02 + sta $2006 ; CPU:$CD5A PRG:0D5A 8D 06 20 + lda #$00 ; CPU:$CD5D PRG:0D5D A9 00 + sta $2006 ; CPU:$CD5F PRG:0D5F 8D 06 20 + ldx #$04 ; CPU:$CD62 PRG:0D62 A2 04 + ldy #$00 ; CPU:$CD64 PRG:0D64 A0 00 + lda Zp00 ; CPU:$CD66 PRG:0D66 A5 00 +; ----------------------------------------------------------------------------- +; Routine: Label_CD68 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CD68: + sta $2007 ; CPU:$CD68 PRG:0D68 8D 07 20 + dey ; CPU:$CD6B PRG:0D6B 88 + bne Label_CD68 ; CPU:$CD6C PRG:0D6C D0 FA + dex ; CPU:$CD6E PRG:0D6E CA + bne Label_CD68 ; CPU:$CD6F PRG:0D6F D0 F7 + lda Zp02 ; CPU:$CD71 PRG:0D71 A5 02 + adc #$03 ; CPU:$CD73 PRG:0D73 69 03 + sta $2006 ; CPU:$CD75 PRG:0D75 8D 06 20 + lda #$C0 ; CPU:$CD78 PRG:0D78 A9 C0 + sta $2006 ; CPU:$CD7A PRG:0D7A 8D 06 20 + ldy #$40 ; CPU:$CD7D PRG:0D7D A0 40 + lda #$00 ; CPU:$CD7F PRG:0D7F A9 00 +; ----------------------------------------------------------------------------- +; Routine: Label_CD81 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CD81: + sta $2007 ; CPU:$CD81 PRG:0D81 8D 07 20 + dey ; CPU:$CD84 PRG:0D84 88 + bne Label_CD81 ; CPU:$CD85 PRG:0D85 D0 FA + rts ; CPU:$CD87 PRG:0D87 60 +; ----------------------------------------------------------------------------- +; Routine: SubCCD88 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCD88: + ldx #$01 ; CPU:$CD88 PRG:0D88 A2 01 + dec Zp2A ; CPU:$CD8A PRG:0D8A C6 2A + bpl Label_CD94 ; CPU:$CD8C PRG:0D8C 10 06 + lda #$0A ; CPU:$CD8E PRG:0D8E A9 0A + sta Zp2A ; CPU:$CD90 PRG:0D90 85 2A + ldx #$03 ; CPU:$CD92 PRG:0D92 A2 03 +; ----------------------------------------------------------------------------- +; Routine: Label_CD94 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CD94: + lda Zp2B,x ; CPU:$CD94 PRG:0D94 B5 2B + beq Label_CD9A ; CPU:$CD96 PRG:0D96 F0 02 + dec Zp2B,x ; CPU:$CD98 PRG:0D98 D6 2B +; ----------------------------------------------------------------------------- +; Routine: Label_CD9A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CD9A: + dex ; CPU:$CD9A PRG:0D9A CA + bpl Label_CD94 ; CPU:$CD9B PRG:0D9B 10 F7 + rts ; CPU:$CD9D PRG:0D9D 60 +; ----------------------------------------------------------------------------- +; Routine: DispatchViaStackPointer +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DispatchViaStackPointer: + asl a ; CPU:$CD9E PRG:0D9E 0A + tay ; CPU:$CD9F PRG:0D9F A8 + iny ; CPU:$CDA0 PRG:0DA0 C8 + pla ; CPU:$CDA1 PRG:0DA1 68 + sta Zp14 ; CPU:$CDA2 PRG:0DA2 85 14 + pla ; CPU:$CDA4 PRG:0DA4 68 + sta Zp15 ; CPU:$CDA5 PRG:0DA5 85 15 + lda (Zp14),y ; CPU:$CDA7 PRG:0DA7 B1 14 + tax ; CPU:$CDA9 PRG:0DA9 AA + iny ; CPU:$CDAA PRG:0DAA C8 + lda (Zp14),y ; CPU:$CDAB PRG:0DAB B1 14 + sta Zp15 ; CPU:$CDAD PRG:0DAD 85 15 + stx Zp14 ; CPU:$CDAF PRG:0DAF 86 14 + jmp ($0014) ; CPU:$CDB1 PRG:0DB1 6C 14 00 +; ----------------------------------------------------------------------------- +; Routine: AdvanceDispatchPointer +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +AdvanceDispatchPointer: + pha ; CPU:$CDB4 PRG:0DB4 48 + clc ; CPU:$CDB5 PRG:0DB5 18 + lda Zp14 ; CPU:$CDB6 PRG:0DB6 A5 14 + adc Zp12 ; CPU:$CDB8 PRG:0DB8 65 12 + sta Zp14 ; CPU:$CDBA PRG:0DBA 85 14 + lda Zp15 ; CPU:$CDBC PRG:0DBC A5 15 + adc Zp13 ; CPU:$CDBE PRG:0DBE 65 13 + sta Zp15 ; CPU:$CDC0 PRG:0DC0 85 15 + pla ; CPU:$CDC2 PRG:0DC2 68 + rts ; CPU:$CDC3 PRG:0DC3 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CDC4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CDC4: + sta $2006 ; CPU:$CDC4 PRG:0DC4 8D 06 20 + iny ; CPU:$CDC7 PRG:0DC7 C8 + lda (Zp00),y ; CPU:$CDC8 PRG:0DC8 B1 00 + sta $2006 ; CPU:$CDCA PRG:0DCA 8D 06 20 + iny ; CPU:$CDCD PRG:0DCD C8 + lda (Zp00),y ; CPU:$CDCE PRG:0DCE B1 00 + asl a ; CPU:$CDD0 PRG:0DD0 0A + pha ; CPU:$CDD1 PRG:0DD1 48 + lda Zp09 ; CPU:$CDD2 PRG:0DD2 A5 09 + ora #$04 ; CPU:$CDD4 PRG:0DD4 09 04 + bcs Label_CDDA ; CPU:$CDD6 PRG:0DD6 B0 02 + and #$FB ; CPU:$CDD8 PRG:0DD8 29 FB +; ----------------------------------------------------------------------------- +; Routine: Label_CDDA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CDDA: + sta $2000 ; CPU:$CDDA PRG:0DDA 8D 00 20 + sta Zp09 ; CPU:$CDDD PRG:0DDD 85 09 + pla ; CPU:$CDDF PRG:0DDF 68 + asl a ; CPU:$CDE0 PRG:0DE0 0A + bcc Label_CDE6 ; CPU:$CDE1 PRG:0DE1 90 03 + ora #$02 ; CPU:$CDE3 PRG:0DE3 09 02 + iny ; CPU:$CDE5 PRG:0DE5 C8 +; ----------------------------------------------------------------------------- +; Routine: Label_CDE6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CDE6: + lsr a ; CPU:$CDE6 PRG:0DE6 4A + lsr a ; CPU:$CDE7 PRG:0DE7 4A + tax ; CPU:$CDE8 PRG:0DE8 AA +; ----------------------------------------------------------------------------- +; Routine: Label_CDE9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CDE9: + bcs Label_CDEC ; CPU:$CDE9 PRG:0DE9 B0 01 + iny ; CPU:$CDEB PRG:0DEB C8 +; ----------------------------------------------------------------------------- +; Routine: Label_CDEC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CDEC: + lda (Zp00),y ; CPU:$CDEC PRG:0DEC B1 00 + sta $2007 ; CPU:$CDEE PRG:0DEE 8D 07 20 + dex ; CPU:$CDF1 PRG:0DF1 CA + bne Label_CDE9 ; CPU:$CDF2 PRG:0DF2 D0 F5 + sec ; CPU:$CDF4 PRG:0DF4 38 + tya ; CPU:$CDF5 PRG:0DF5 98 + adc Zp00 ; CPU:$CDF6 PRG:0DF6 65 00 + sta Zp00 ; CPU:$CDF8 PRG:0DF8 85 00 + lda #$00 ; CPU:$CDFA PRG:0DFA A9 00 + adc Zp01 ; CPU:$CDFC PRG:0DFC 65 01 + sta Zp01 ; CPU:$CDFE PRG:0DFE 85 01 +; ----------------------------------------------------------------------------- +; Routine: SubCCE00 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCE00: + ldx $2002 ; CPU:$CE00 PRG:0E00 AE 02 20 + ldy #$00 ; CPU:$CE03 PRG:0E03 A0 00 + lda (Zp00),y ; CPU:$CE05 PRG:0E05 B1 00 + bne Label_CDC4 ; CPU:$CE07 PRG:0E07 D0 BB +; ----------------------------------------------------------------------------- +; Routine: SubCCE09 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCE09: + pha ; CPU:$CE09 PRG:0E09 48 + lda Zp0B ; CPU:$CE0A PRG:0E0A A5 0B + sta $2005 ; CPU:$CE0C PRG:0E0C 8D 05 20 + lda Zp0C ; CPU:$CE0F PRG:0E0F A5 0C + sta $2005 ; CPU:$CE11 PRG:0E11 8D 05 20 + pla ; CPU:$CE14 PRG:0E14 68 + rts ; CPU:$CE15 PRG:0E15 60 +; ----------------------------------------------------------------------------- +; Routine: SubCCE16 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCE16: + lda #$00 ; CPU:$CE16 PRG:0E16 A9 00 +; ----------------------------------------------------------------------------- +; Routine: Label_CE18 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CE18: + sta Zp03 ; CPU:$CE18 PRG:0E18 85 03 + lda #$02 ; CPU:$CE1A PRG:0E1A A9 02 + sta Zp04 ; CPU:$CE1C PRG:0E1C 85 04 + ldy Zp02 ; CPU:$CE1E PRG:0E1E A4 02 + dey ; CPU:$CE20 PRG:0E20 88 + ldx Zp02 ; CPU:$CE21 PRG:0E21 A6 02 +; ----------------------------------------------------------------------------- +; Routine: Label_CE23 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CE23: + lda (Zp00),y ; CPU:$CE23 PRG:0E23 B1 00 + sta (Zp03),y ; CPU:$CE25 PRG:0E25 91 03 + dey ; CPU:$CE27 PRG:0E27 88 + dex ; CPU:$CE28 PRG:0E28 CA + bne Label_CE23 ; CPU:$CE29 PRG:0E29 D0 F8 + rts ; CPU:$CE2B PRG:0E2B 60 +; ----------------------------------------------------------------------------- +; Routine: ReturnOne +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ReturnOne: + lda #$01 ; CPU:$CE2C PRG:0E2C A9 01 + sta Zp21 ; CPU:$CE2E PRG:0E2E 85 21 + ldy #$00 ; CPU:$CE30 PRG:0E30 A0 00 + lda (Zp02),y ; CPU:$CE32 PRG:0E32 B1 02 + and #$0F ; CPU:$CE34 PRG:0E34 29 0F + sta Zp05 ; CPU:$CE36 PRG:0E36 85 05 + lda (Zp02),y ; CPU:$CE38 PRG:0E38 B1 02 + lsr a ; CPU:$CE3A PRG:0E3A 4A + lsr a ; CPU:$CE3B PRG:0E3B 4A + lsr a ; CPU:$CE3C PRG:0E3C 4A + lsr a ; CPU:$CE3D PRG:0E3D 4A + sta Zp04 ; CPU:$CE3E PRG:0E3E 85 04 + ldx $0590 ; CPU:$CE40 PRG:0E40 AE 90 05 +; ----------------------------------------------------------------------------- +; Routine: Label_CE43 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CE43: + lda Zp01 ; CPU:$CE43 PRG:0E43 A5 01 + sta $0591,x ; CPU:$CE45 PRG:0E45 9D 91 05 + jsr NextIndex ; CPU:$CE48 PRG:0E48 20 84 CE + lda Zp00 ; CPU:$CE4B PRG:0E4B A5 00 + sta $0591,x ; CPU:$CE4D PRG:0E4D 9D 91 05 + jsr NextIndex ; CPU:$CE50 PRG:0E50 20 84 CE + lda Zp05 ; CPU:$CE53 PRG:0E53 A5 05 + sta Zp06 ; CPU:$CE55 PRG:0E55 85 06 + sta $0591,x ; CPU:$CE57 PRG:0E57 9D 91 05 +; ----------------------------------------------------------------------------- +; Routine: Label_CE5A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CE5A: + jsr NextIndex ; CPU:$CE5A PRG:0E5A 20 84 CE + iny ; CPU:$CE5D PRG:0E5D C8 + lda (Zp02),y ; CPU:$CE5E PRG:0E5E B1 02 + sta $0591,x ; CPU:$CE60 PRG:0E60 9D 91 05 + dec Zp06 ; CPU:$CE63 PRG:0E63 C6 06 + bne Label_CE5A ; CPU:$CE65 PRG:0E65 D0 F3 + jsr NextIndex ; CPU:$CE67 PRG:0E67 20 84 CE + stx $0590 ; CPU:$CE6A PRG:0E6A 8E 90 05 + clc ; CPU:$CE6D PRG:0E6D 18 + lda #$20 ; CPU:$CE6E PRG:0E6E A9 20 + adc Zp00 ; CPU:$CE70 PRG:0E70 65 00 + sta Zp00 ; CPU:$CE72 PRG:0E72 85 00 + lda #$00 ; CPU:$CE74 PRG:0E74 A9 00 + adc Zp01 ; CPU:$CE76 PRG:0E76 65 01 + sta Zp01 ; CPU:$CE78 PRG:0E78 85 01 + dec Zp04 ; CPU:$CE7A PRG:0E7A C6 04 + bne Label_CE43 ; CPU:$CE7C PRG:0E7C D0 C5 + lda #$00 ; CPU:$CE7E PRG:0E7E A9 00 + sta $0591,x ; CPU:$CE80 PRG:0E80 9D 91 05 + rts ; CPU:$CE83 PRG:0E83 60 +; ----------------------------------------------------------------------------- +; Routine: NextIndex +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +NextIndex: + inx ; CPU:$CE84 PRG:0E84 E8 + txa ; CPU:$CE85 PRG:0E85 8A +; ----------------------------------------------------------------------------- +; Routine: SubCCE86 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCE86: + cmp #$2F ; CPU:$CE86 PRG:0E86 C9 2F + bcc Label_CE94 ; CPU:$CE88 PRG:0E88 90 0A + ldx $0590 ; CPU:$CE8A PRG:0E8A AE 90 05 + lda #$00 ; CPU:$CE8D PRG:0E8D A9 00 + sta $0591,x ; CPU:$CE8F PRG:0E8F 9D 91 05 + pla ; CPU:$CE92 PRG:0E92 68 + pla ; CPU:$CE93 PRG:0E93 68 +; ----------------------------------------------------------------------------- +; Routine: Label_CE94 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CE94: + rts ; CPU:$CE94 PRG:0E94 60 +; ----------------------------------------------------------------------------- +; Routine: SubCCE95 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCE95: + lda ZpB1 ; CPU:$CE95 PRG:0E95 A5 B1 + and #$C0 ; CPU:$CE97 PRG:0E97 29 C0 + beq SubCCE9C ; CPU:$CE99 PRG:0E99 F0 01 + rts ; CPU:$CE9B PRG:0E9B 60 +; ----------------------------------------------------------------------------- +; Routine: SubCCE9C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCE9C: + lda ZpB1 ; CPU:$CE9C PRG:0E9C A5 B1 + and #$03 ; CPU:$CE9E PRG:0E9E 29 03 + bne LoadYFromZpB4 ; CPU:$CEA0 PRG:0EA0 D0 01 + rts ; CPU:$CEA2 PRG:0EA2 60 +; ----------------------------------------------------------------------------- +; Routine: LoadYFromZpB4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +LoadYFromZpB4: + ldy ZpB4 ; CPU:$CEA3 PRG:0EA3 A4 B4 + lda $F4B2,y ; CPU:$CEA5 PRG:0EA5 B9 B2 F4 + cmp #$FF ; CPU:$CEA8 PRG:0EA8 C9 FF + beq Label_CEB1 ; CPU:$CEAA PRG:0EAA F0 05 + sta ZpB6 ; CPU:$CEAC PRG:0EAC 85 B6 + inc ZpB4 ; CPU:$CEAE PRG:0EAE E6 B4 + rts ; CPU:$CEB0 PRG:0EB0 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CEB1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CEB1: + iny ; CPU:$CEB1 PRG:0EB1 C8 + lda $F4B2,y ; CPU:$CEB2 PRG:0EB2 B9 B2 F4 + sta ZpB4 ; CPU:$CEB5 PRG:0EB5 85 B4 + jmp LoadYFromZpB4 ; CPU:$CEB7 PRG:0EB7 4C A3 CE +; ----------------------------------------------------------------------------- +; Routine: SubCCEBA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCEBA: + lda #$12 ; CPU:$CEBA PRG:0EBA A9 12 + sta ZpB6 ; CPU:$CEBC PRG:0EBC 85 B6 + lda #$00 ; CPU:$CEBE PRG:0EBE A9 00 + sta ZpB4 ; CPU:$CEC0 PRG:0EC0 85 B4 + rts ; CPU:$CEC2 PRG:0EC2 60 +; ----------------------------------------------------------------------------- +; Routine: SubCCEC3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCEC3: + lda #$60 ; CPU:$CEC3 PRG:0EC3 A9 60 + sta ZpA0 ; CPU:$CEC5 PRG:0EC5 85 A0 + lda #$03 ; CPU:$CEC7 PRG:0EC7 A9 03 + sta ZpA1 ; CPU:$CEC9 PRG:0EC9 85 A1 + lda #$20 ; CPU:$CECB PRG:0ECB A9 20 + sta ZpA2 ; CPU:$CECD PRG:0ECD 85 A2 + sta Zp12 ; CPU:$CECF PRG:0ECF 85 12 + lda #$00 ; CPU:$CED1 PRG:0ED1 A9 00 + sta Zp13 ; CPU:$CED3 PRG:0ED3 85 13 + lda #$06 ; CPU:$CED5 PRG:0ED5 A9 06 + sta Zp33 ; CPU:$CED7 PRG:0ED7 85 33 +; ----------------------------------------------------------------------------- +; Routine: Label_CED9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CED9: + ldy #$00 ; CPU:$CED9 PRG:0ED9 A0 00 + lda (ZpA0),y ; CPU:$CEDB PRG:0EDB B1 A0 + beq Label_CEEF ; CPU:$CEDD PRG:0EDD F0 10 + jsr SubCCB85 ; CPU:$CEDF PRG:0EDF 20 85 CB + lda Zp14 ; CPU:$CEE2 PRG:0EE2 A5 14 + sta ZpA0 ; CPU:$CEE4 PRG:0EE4 85 A0 + lda Zp15 ; CPU:$CEE6 PRG:0EE6 A5 15 + sta ZpA1 ; CPU:$CEE8 PRG:0EE8 85 A1 + dec Zp33 ; CPU:$CEEA PRG:0EEA C6 33 + bne Label_CED9 ; CPU:$CEEC PRG:0EEC D0 EB + rts ; CPU:$CEEE PRG:0EEE 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CEEF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CEEF: + ldy Zp35 ; CPU:$CEEF PRG:0EEF A4 35 + sty Zp1F ; CPU:$CEF1 PRG:0EF1 84 1F + iny ; CPU:$CEF3 PRG:0EF3 C8 + lda (Zp36),y ; CPU:$CEF4 PRG:0EF4 B1 36 + sta Zp1E ; CPU:$CEF6 PRG:0EF6 85 1E + sta Zp1D ; CPU:$CEF8 PRG:0EF8 85 1D + iny ; CPU:$CEFA PRG:0EFA C8 + lda (Zp36),y ; CPU:$CEFB PRG:0EFB B1 36 + cmp #$AA ; CPU:$CEFD PRG:0EFD C9 AA + beq Label_CF04 ; CPU:$CEFF PRG:0EFF F0 03 + sta Zp2E ; CPU:$CF01 PRG:0F01 85 2E + tya ; CPU:$CF03 PRG:0F03 98 +; ----------------------------------------------------------------------------- +; Routine: Label_CF04 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CF04: + sta Zp35 ; CPU:$CF04 PRG:0F04 85 35 + lda #$52 ; CPU:$CF06 PRG:0F06 A9 52 + sta Zp14 ; CPU:$CF08 PRG:0F08 85 14 + lda #$F4 ; CPU:$CF0A PRG:0F0A A9 F4 + sta Zp15 ; CPU:$CF0C PRG:0F0C 85 15 + lda Zp1E ; CPU:$CF0E PRG:0F0E A5 1E + beq Label_CF19 ; CPU:$CF10 PRG:0F10 F0 07 +; ----------------------------------------------------------------------------- +; Routine: Label_CF12 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CF12: + jsr AdvanceDispatchPointer ; CPU:$CF12 PRG:0F12 20 B4 CD + dec Zp1E ; CPU:$CF15 PRG:0F15 C6 1E + bne Label_CF12 ; CPU:$CF17 PRG:0F17 D0 F9 +; ----------------------------------------------------------------------------- +; Routine: Label_CF19 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CF19: + lda Zp33 ; CPU:$CF19 PRG:0F19 A5 33 + asl a ; CPU:$CF1B PRG:0F1B 0A + asl a ; CPU:$CF1C PRG:0F1C 0A + asl a ; CPU:$CF1D PRG:0F1D 0A + asl a ; CPU:$CF1E PRG:0F1E 0A + clc ; CPU:$CF1F PRG:0F1F 18 + adc #$40 ; CPU:$CF20 PRG:0F20 69 40 + tax ; CPU:$CF22 PRG:0F22 AA + ldy #$00 ; CPU:$CF23 PRG:0F23 A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_CF25 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CF25: + lda (Zp14),y ; CPU:$CF25 PRG:0F25 B1 14 + cpy #$0A ; CPU:$CF27 PRG:0F27 C0 0A + bne Label_CF2C ; CPU:$CF29 PRG:0F29 D0 01 + txa ; CPU:$CF2B PRG:0F2B 8A +; ----------------------------------------------------------------------------- +; Routine: Label_CF2C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CF2C: + sta (ZpA0),y ; CPU:$CF2C PRG:0F2C 91 A0 + iny ; CPU:$CF2E PRG:0F2E C8 + cpy #$20 ; CPU:$CF2F PRG:0F2F C0 20 + bne Label_CF25 ; CPU:$CF31 PRG:0F31 D0 F2 + lda Zp30 ; CPU:$CF33 PRG:0F33 A5 30 + beq Label_CF3B ; CPU:$CF35 PRG:0F35 F0 04 + lda #$01 ; CPU:$CF37 PRG:0F37 A9 01 + bne Label_CF53 ; CPU:$CF39 PRG:0F39 D0 18 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_CF3B: + lda Zp1F ; CPU:$CF3B PRG:0F3B A5 1F + cmp #$02 ; CPU:$CF3D PRG:0F3D C9 02 + bne Label_CF48 ; CPU:$CF3F PRG:0F3F D0 07 + lda $04F5 ; CPU:$CF41 PRG:0F41 AD F5 04 + eor #$03 ; CPU:$CF44 PRG:0F44 49 03 + bne Label_CF53 ; CPU:$CF46 PRG:0F46 D0 0B +; ----------------------------------------------------------------------------- +; Routine: Label_CF48 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CF48: + jsr TestRamFlagPair0500 ; CPU:$CF48 PRG:0F48 20 28 D3 + and #$01 ; CPU:$CF4B PRG:0F4B 29 01 + clc ; CPU:$CF4D PRG:0F4D 18 + adc #$01 ; CPU:$CF4E PRG:0F4E 69 01 + sta $04F5 ; CPU:$CF50 PRG:0F50 8D F5 04 +; ----------------------------------------------------------------------------- +; Routine: Label_CF53 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CF53: + ldx #$F0 ; CPU:$CF53 PRG:0F53 A2 F0 + cmp #$01 ; CPU:$CF55 PRG:0F55 C9 01 + beq Label_CF5B ; CPU:$CF57 PRG:0F57 F0 02 + ldx #$10 ; CPU:$CF59 PRG:0F59 A2 10 +; ----------------------------------------------------------------------------- +; Routine: Label_CF5B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CF5B: + ldy #$12 ; CPU:$CF5B PRG:0F5B A0 12 + sta (ZpA0),y ; CPU:$CF5D PRG:0F5D 91 A0 + txa ; CPU:$CF5F PRG:0F5F 8A + ldy #$09 ; CPU:$CF60 PRG:0F60 A0 09 + sta (ZpA0),y ; CPU:$CF62 PRG:0F62 91 A0 + inc Zp43 ; CPU:$CF64 PRG:0F64 E6 43 + rts ; CPU:$CF66 PRG:0F66 60 +; ----------------------------------------------------------------------------- +; Routine: SubCCF67 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCF67: + lda Zp71 ; CPU:$CF67 PRG:0F67 A5 71 + bne Label_CF88 ; CPU:$CF69 PRG:0F69 D0 1D + lda ZpC1 ; CPU:$CF6B PRG:0F6B A5 C1 + bne Label_CF88 ; CPU:$CF6D PRG:0F6D D0 19 + lda $05FF ; CPU:$CF6F PRG:0F6F AD FF 05 + bne Label_CF88 ; CPU:$CF72 PRG:0F72 D0 14 + lda $04C5 ; CPU:$CF74 PRG:0F74 AD C5 04 + bne Label_CF88 ; CPU:$CF77 PRG:0F77 D0 0F + ldx ZpBF ; CPU:$CF79 PRG:0F79 A6 BF + ldy #$01 ; CPU:$CF7B PRG:0F7B A0 01 + cpx #$01 ; CPU:$CF7D PRG:0F7D E0 01 + beq Label_CF83 ; CPU:$CF7F PRG:0F7F F0 02 + ldy #$06 ; CPU:$CF81 PRG:0F81 A0 06 +; ----------------------------------------------------------------------------- +; Routine: Label_CF83 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CF83: + lda $0074,y ; CPU:$CF83 PRG:0F83 B9 74 00 + beq Label_CF89 ; CPU:$CF86 PRG:0F86 F0 01 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_CF88: + rts ; CPU:$CF88 PRG:0F88 60 +; ----------------------------------------------------------------------------- +; Routine: Label_CF89 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CF89: + ldx #$00 ; CPU:$CF89 PRG:0F89 A2 00 +; ----------------------------------------------------------------------------- +; Routine: Label_CF8B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CF8B: + lda ZpC9 ; CPU:$CF8B PRG:0F8B A5 C9 + cmp $F574,x ; CPU:$CF8D PRG:0F8D DD 74 F5 + bne Label_CFA7 ; CPU:$CF90 PRG:0F90 D0 15 + lda ZpCA ; CPU:$CF92 PRG:0F92 A5 CA + inx ; CPU:$CF94 PRG:0F94 E8 + cmp $F574,x ; CPU:$CF95 PRG:0F95 DD 74 F5 + bne Label_CFA8 ; CPU:$CF98 PRG:0F98 D0 0E + cpx #$08 ; CPU:$CF9A PRG:0F9A E0 08 + bcc Label_CFC4 ; CPU:$CF9C PRG:0F9C 90 26 +; ----------------------------------------------------------------------------- +; Routine: Label_CF9E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CF9E: + ldx #$02 ; CPU:$CF9E PRG:0F9E A2 02 + lda #$E0 ; CPU:$CFA0 PRG:0FA0 A9 E0 + sta Zp12 ; CPU:$CFA2 PRG:0FA2 85 12 + jmp SubCCFCA ; CPU:$CFA4 PRG:0FA4 4C CA CF +; ----------------------------------------------------------------------------- +; Routine: Label_CFA7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CFA7: + inx ; CPU:$CFA7 PRG:0FA7 E8 +; ----------------------------------------------------------------------------- +; Routine: Label_CFA8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CFA8: + inx ; CPU:$CFA8 PRG:0FA8 E8 + cpx #$10 ; CPU:$CFA9 PRG:0FA9 E0 10 + bcc Label_CF8B ; CPU:$CFAB PRG:0FAB 90 DE + lda ZpCB ; CPU:$CFAD PRG:0FAD A5 CB + cmp #$FA ; CPU:$CFAF PRG:0FAF C9 FA + bcc Label_CFB6 ; CPU:$CFB1 PRG:0FB1 90 03 + jmp SubCD2DF ; CPU:$CFB3 PRG:0FB3 4C DF D2 +; ----------------------------------------------------------------------------- +; Routine: Label_CFB6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CFB6: + lda ZpC9 ; CPU:$CFB6 PRG:0FB6 A5 C9 + and #$1F ; CPU:$CFB8 PRG:0FB8 29 1F + beq Label_CF9E ; CPU:$CFBA PRG:0FBA F0 E2 + cmp #$1F ; CPU:$CFBC PRG:0FBC C9 1F + beq Label_CFC4 ; CPU:$CFBE PRG:0FBE F0 04 + ldx #$03 ; CPU:$CFC0 PRG:0FC0 A2 03 + bne Label_CFC6 ; CPU:$CFC2 PRG:0FC2 D0 02 +; ----------------------------------------------------------------------------- +; Routine: Label_CFC4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CFC4: + ldx #$01 ; CPU:$CFC4 PRG:0FC4 A2 01 +; ----------------------------------------------------------------------------- +; Routine: Label_CFC6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_CFC6: + lda #$DF ; CPU:$CFC6 PRG:0FC6 A9 DF + sta Zp12 ; CPU:$CFC8 PRG:0FC8 85 12 +; ----------------------------------------------------------------------------- +; Routine: SubCCFCA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCCFCA: + lda ZpCB ; CPU:$CFCA PRG:0FCA A5 CB + cmp #$A0 ; CPU:$CFCC PRG:0FCC C9 A0 + bcs Label_CF88 ; CPU:$CFCE PRG:0FCE B0 B8 + lda #$FF ; CPU:$CFD0 PRG:0FD0 A9 FF + sta Zp13 ; CPU:$CFD2 PRG:0FD2 85 13 + lda ZpCA ; CPU:$CFD4 PRG:0FD4 A5 CA + sta Zp15 ; CPU:$CFD6 PRG:0FD6 85 15 + lda ZpC9 ; CPU:$CFD8 PRG:0FD8 A5 C9 + sta Zp14 ; CPU:$CFDA PRG:0FDA 85 14 + lda #$01 ; CPU:$CFDC PRG:0FDC A9 01 + sta $0083,y ; CPU:$CFDE PRG:0FDE 99 83 00 + lda ZpBE ; CPU:$CFE1 PRG:0FE1 A5 BE + clc ; CPU:$CFE3 PRG:0FE3 18 + adc #$01 ; CPU:$CFE4 PRG:0FE4 69 01 + sta $0084,y ; CPU:$CFE6 PRG:0FE6 99 84 00 + lda ZpB9 ; CPU:$CFE9 PRG:0FE9 A5 B9 + sta $0085,y ; CPU:$CFEB PRG:0FEB 99 85 00 + jsr AdvanceDispatchPointer ; CPU:$CFEE PRG:0FEE 20 B4 CD + lda ZpCB ; CPU:$CFF1 PRG:0FF1 A5 CB + sec ; CPU:$CFF3 PRG:0FF3 38 + sbc #$93 ; CPU:$CFF4 PRG:0FF4 E9 93 + stx Zp00 ; CPU:$CFF6 PRG:0FF6 86 00 + asl a ; CPU:$CFF8 PRG:0FF8 0A + asl a ; CPU:$CFF9 PRG:0FF9 0A + asl a ; CPU:$CFFA PRG:0FFA 0A + asl a ; CPU:$CFFB PRG:0FFB 0A + ora Zp00 ; CPU:$CFFC PRG:0FFC 05 00 + sta $0074,y ; CPU:$CFFE PRG:0FFE 99 74 00 + dey ; CPU:$D001 PRG:1001 88 + lda #$00 ; CPU:$D002 PRG:1002 A9 00 + sta $0074,y ; CPU:$D004 PRG:1004 99 74 00 + iny ; CPU:$D007 PRG:1007 C8 + iny ; CPU:$D008 PRG:1008 C8 + sta $0074,y ; CPU:$D009 PRG:1009 99 74 00 + iny ; CPU:$D00C PRG:100C C8 + lda Zp14 ; CPU:$D00D PRG:100D A5 14 + sta $0074,y ; CPU:$D00F PRG:100F 99 74 00 + iny ; CPU:$D012 PRG:1012 C8 + lda Zp15 ; CPU:$D013 PRG:1013 A5 15 + sta $0074,y ; CPU:$D015 PRG:1015 99 74 00 + rts ; CPU:$D018 PRG:1018 60 +; ----------------------------------------------------------------------------- +; Routine: SubCD019 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD019: + lda ZpB8 ; CPU:$D019 PRG:1019 A5 B8 + ldy #$03 ; CPU:$D01B PRG:101B A0 03 + cmp #$50 ; CPU:$D01D PRG:101D C9 50 + bcc Label_D02C ; CPU:$D01F PRG:101F 90 0B + dey ; CPU:$D021 PRG:1021 88 + cmp #$80 ; CPU:$D022 PRG:1022 C9 80 + bcc Label_D02C ; CPU:$D024 PRG:1024 90 06 + dey ; CPU:$D026 PRG:1026 88 + cmp #$B0 ; CPU:$D027 PRG:1027 C9 B0 + bcc Label_D02C ; CPU:$D029 PRG:1029 90 01 + dey ; CPU:$D02B PRG:102B 88 +; ----------------------------------------------------------------------------- +; Routine: Label_D02C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D02C: + sty ZpBE ; CPU:$D02C PRG:102C 84 BE + rts ; CPU:$D02E PRG:102E 60 +; ----------------------------------------------------------------------------- +; Routine: SubCD02F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD02F: + lda #$01 ; CPU:$D02F PRG:102F A9 01 + sta Zp21 ; CPU:$D031 PRG:1031 85 21 + ldx Zp00 ; CPU:$D033 PRG:1033 A6 00 + jsr SubCD03F ; CPU:$D035 PRG:1035 20 3F D0 + lda Zp00 ; CPU:$D038 PRG:1038 A5 00 + lsr a ; CPU:$D03A PRG:103A 4A + lsr a ; CPU:$D03B PRG:103B 4A + lsr a ; CPU:$D03C PRG:103C 4A + lsr a ; CPU:$D03D PRG:103D 4A + tax ; CPU:$D03E PRG:103E AA +; ----------------------------------------------------------------------------- +; Routine: SubCD03F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD03F: + inx ; CPU:$D03F PRG:103F E8 + txa ; CPU:$D040 PRG:1040 8A + and #$0F ; CPU:$D041 PRG:1041 29 0F + cmp #$09 ; CPU:$D043 PRG:1043 C9 09 + bcs Label_D0B3 ; CPU:$D045 PRG:1045 B0 6C + asl a ; CPU:$D047 PRG:1047 0A + asl a ; CPU:$D048 PRG:1048 0A + tay ; CPU:$D049 PRG:1049 A8 + sta Zp02 ; CPU:$D04A PRG:104A 85 02 + ldx $0590 ; CPU:$D04C PRG:104C AE 90 05 + lda $F68D,y ; CPU:$D04F PRG:104F B9 8D F6 + sta $0591,x ; CPU:$D052 PRG:1052 9D 91 05 + jsr NextIndex ; CPU:$D055 PRG:1055 20 84 CE + iny ; CPU:$D058 PRG:1058 C8 + lda $F68D,y ; CPU:$D059 PRG:1059 B9 8D F6 + sta $0591,x ; CPU:$D05C PRG:105C 9D 91 05 + jsr NextIndex ; CPU:$D05F PRG:105F 20 84 CE + iny ; CPU:$D062 PRG:1062 C8 + lda $F68D,y ; CPU:$D063 PRG:1063 B9 8D F6 + and #$07 ; CPU:$D066 PRG:1066 29 07 + sta $0591,x ; CPU:$D068 PRG:1068 9D 91 05 + sta Zp01 ; CPU:$D06B PRG:106B 85 01 + txa ; CPU:$D06D PRG:106D 8A + sec ; CPU:$D06E PRG:106E 38 + adc Zp01 ; CPU:$D06F PRG:106F 65 01 + jsr SubCCE86 ; CPU:$D071 PRG:1071 20 86 CE + tax ; CPU:$D074 PRG:1074 AA + stx $0590 ; CPU:$D075 PRG:1075 8E 90 05 + lda #$00 ; CPU:$D078 PRG:1078 A9 00 + sta $0591,x ; CPU:$D07A PRG:107A 9D 91 05 + iny ; CPU:$D07D PRG:107D C8 + lda $F68D,y ; CPU:$D07E PRG:107E B9 8D F6 + sta Zp03 ; CPU:$D081 PRG:1081 85 03 +; ----------------------------------------------------------------------------- +; Routine: Label_D083 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D083: + dex ; CPU:$D083 PRG:1083 CA + lda $0090,y ; CPU:$D084 PRG:1084 B9 90 00 + and #$0F ; CPU:$D087 PRG:1087 29 0F + sta $0591,x ; CPU:$D089 PRG:1089 9D 91 05 + dec Zp01 ; CPU:$D08C PRG:108C C6 01 + beq Label_D0A2 ; CPU:$D08E PRG:108E F0 12 + dex ; CPU:$D090 PRG:1090 CA + lda $0090,y ; CPU:$D091 PRG:1091 B9 90 00 + and #$F0 ; CPU:$D094 PRG:1094 29 F0 + lsr a ; CPU:$D096 PRG:1096 4A + lsr a ; CPU:$D097 PRG:1097 4A + lsr a ; CPU:$D098 PRG:1098 4A + lsr a ; CPU:$D099 PRG:1099 4A + sta $0591,x ; CPU:$D09A PRG:109A 9D 91 05 + dey ; CPU:$D09D PRG:109D 88 + dec Zp01 ; CPU:$D09E PRG:109E C6 01 + bne Label_D083 ; CPU:$D0A0 PRG:10A0 D0 E1 +; ----------------------------------------------------------------------------- +; Routine: Label_D0A2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D0A2: + lda Zp03 ; CPU:$D0A2 PRG:10A2 A5 03 + and #$01 ; CPU:$D0A4 PRG:10A4 29 01 + beq Label_D0B3 ; CPU:$D0A6 PRG:10A6 F0 0B + ldy Zp02 ; CPU:$D0A8 PRG:10A8 A4 02 + clc ; CPU:$D0AA PRG:10AA 18 + lda $0090,y ; CPU:$D0AB PRG:10AB B9 90 00 + adc #$37 ; CPU:$D0AE PRG:10AE 69 37 + sta $0591,x ; CPU:$D0B0 PRG:10B0 9D 91 05 +; ----------------------------------------------------------------------------- +; Routine: Label_D0B3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D0B3: + rts ; CPU:$D0B3 PRG:10B3 60 +; ----------------------------------------------------------------------------- +; Routine: SubCD0B4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD0B4: + and #$07 ; CPU:$D0B4 PRG:10B4 29 07 + asl a ; CPU:$D0B6 PRG:10B6 0A + asl a ; CPU:$D0B7 PRG:10B7 0A + tax ; CPU:$D0B8 PRG:10B8 AA + lda Zp04 ; CPU:$D0B9 PRG:10B9 A5 04 + beq Label_D0E4 ; CPU:$D0BB PRG:10BB F0 27 + lda Zp94,x ; CPU:$D0BD PRG:10BD B5 94 + beq Label_D0E8 ; CPU:$D0BF PRG:10BF F0 27 +; ----------------------------------------------------------------------------- +; Routine: Label_D0C1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D0C1: + clc ; CPU:$D0C1 PRG:10C1 18 + lda Zp97,x ; CPU:$D0C2 PRG:10C2 B5 97 + sta Zp03 ; CPU:$D0C4 PRG:10C4 85 03 + lda Zp07 ; CPU:$D0C6 PRG:10C6 A5 07 + jsr SubCD139 ; CPU:$D0C8 PRG:10C8 20 39 D1 + sta Zp97,x ; CPU:$D0CB PRG:10CB 95 97 + lda Zp96,x ; CPU:$D0CD PRG:10CD B5 96 + sta Zp03 ; CPU:$D0CF PRG:10CF 85 03 + lda Zp06 ; CPU:$D0D1 PRG:10D1 A5 06 + jsr SubCD139 ; CPU:$D0D3 PRG:10D3 20 39 D1 + sta Zp96,x ; CPU:$D0D6 PRG:10D6 95 96 + lda Zp95,x ; CPU:$D0D8 PRG:10D8 B5 95 + sta Zp03 ; CPU:$D0DA PRG:10DA 85 03 + lda Zp05 ; CPU:$D0DC PRG:10DC A5 05 + jsr SubCD139 ; CPU:$D0DE PRG:10DE 20 39 D1 + sta Zp95,x ; CPU:$D0E1 PRG:10E1 95 95 + rts ; CPU:$D0E3 PRG:10E3 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D0E4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D0E4: + lda Zp94,x ; CPU:$D0E4 PRG:10E4 B5 94 + beq Label_D0C1 ; CPU:$D0E6 PRG:10E6 F0 D9 +; ----------------------------------------------------------------------------- +; Routine: Label_D0E8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D0E8: + sec ; CPU:$D0E8 PRG:10E8 38 + lda Zp97,x ; CPU:$D0E9 PRG:10E9 B5 97 + sta Zp03 ; CPU:$D0EB PRG:10EB 85 03 + lda Zp07 ; CPU:$D0ED PRG:10ED A5 07 + jsr AdjustDecimalColumns ; CPU:$D0EF PRG:10EF 20 5A D1 + sta Zp97,x ; CPU:$D0F2 PRG:10F2 95 97 + lda Zp96,x ; CPU:$D0F4 PRG:10F4 B5 96 + sta Zp03 ; CPU:$D0F6 PRG:10F6 85 03 + lda Zp06 ; CPU:$D0F8 PRG:10F8 A5 06 + jsr AdjustDecimalColumns ; CPU:$D0FA PRG:10FA 20 5A D1 + sta Zp96,x ; CPU:$D0FD PRG:10FD 95 96 + lda Zp95,x ; CPU:$D0FF PRG:10FF B5 95 + sta Zp03 ; CPU:$D101 PRG:1101 85 03 + lda Zp05 ; CPU:$D103 PRG:1103 A5 05 + jsr AdjustDecimalColumns ; CPU:$D105 PRG:1105 20 5A D1 + sta Zp95,x ; CPU:$D108 PRG:1108 95 95 + lda Zp95,x ; CPU:$D10A PRG:110A B5 95 + bne Label_D116 ; CPU:$D10C PRG:110C D0 08 + lda Zp96,x ; CPU:$D10E PRG:110E B5 96 + bne Label_D116 ; CPU:$D110 PRG:1110 D0 04 + lda Zp97,x ; CPU:$D112 PRG:1112 B5 97 + beq Label_D11C ; CPU:$D114 PRG:1114 F0 06 +; ----------------------------------------------------------------------------- +; Routine: Label_D116 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D116: + bcs Label_D138 ; CPU:$D116 PRG:1116 B0 20 + lda Zp94,x ; CPU:$D118 PRG:1118 B5 94 + eor #$FF ; CPU:$D11A PRG:111A 49 FF +; ----------------------------------------------------------------------------- +; Routine: Label_D11C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D11C: + sta Zp94,x ; CPU:$D11C PRG:111C 95 94 + sec ; CPU:$D11E PRG:111E 38 + lda #$00 ; CPU:$D11F PRG:111F A9 00 + sta Zp03 ; CPU:$D121 PRG:1121 85 03 + lda Zp97,x ; CPU:$D123 PRG:1123 B5 97 + jsr AdjustDecimalColumns ; CPU:$D125 PRG:1125 20 5A D1 + sta Zp97,x ; CPU:$D128 PRG:1128 95 97 + lda Zp96,x ; CPU:$D12A PRG:112A B5 96 + jsr AdjustDecimalColumns ; CPU:$D12C PRG:112C 20 5A D1 + sta Zp96,x ; CPU:$D12F PRG:112F 95 96 + lda Zp95,x ; CPU:$D131 PRG:1131 B5 95 + jsr AdjustDecimalColumns ; CPU:$D133 PRG:1133 20 5A D1 + sta Zp95,x ; CPU:$D136 PRG:1136 95 95 +; ----------------------------------------------------------------------------- +; Routine: Label_D138 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D138: + rts ; CPU:$D138 PRG:1138 60 +; ----------------------------------------------------------------------------- +; Routine: SubCD139 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD139: + jsr SubCD17C ; CPU:$D139 PRG:1139 20 7C D1 + adc Zp01 ; CPU:$D13C PRG:113C 65 01 + cmp #$0A ; CPU:$D13E PRG:113E C9 0A + bcc Label_D144 ; CPU:$D140 PRG:1140 90 02 + adc #$05 ; CPU:$D142 PRG:1142 69 05 +; ----------------------------------------------------------------------------- +; Routine: Label_D144 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D144: + clc ; CPU:$D144 PRG:1144 18 + adc Zp02 ; CPU:$D145 PRG:1145 65 02 + sta Zp02 ; CPU:$D147 PRG:1147 85 02 + lda Zp03 ; CPU:$D149 PRG:1149 A5 03 + and #$F0 ; CPU:$D14B PRG:114B 29 F0 + adc Zp02 ; CPU:$D14D PRG:114D 65 02 + bcc Label_D155 ; CPU:$D14F PRG:114F 90 04 +; ----------------------------------------------------------------------------- +; Routine: Label_D151 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D151: + adc #$5F ; CPU:$D151 PRG:1151 69 5F + sec ; CPU:$D153 PRG:1153 38 + rts ; CPU:$D154 PRG:1154 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D155 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D155: + cmp #$A0 ; CPU:$D155 PRG:1155 C9 A0 + bcs Label_D151 ; CPU:$D157 PRG:1157 B0 F8 + rts ; CPU:$D159 PRG:1159 60 +; ----------------------------------------------------------------------------- +; Routine: AdjustDecimalColumns +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +AdjustDecimalColumns: + jsr SubCD17C ; CPU:$D15A PRG:115A 20 7C D1 + sbc Zp01 ; CPU:$D15D PRG:115D E5 01 + sta Zp01 ; CPU:$D15F PRG:115F 85 01 + bcs Label_D16D ; CPU:$D161 PRG:1161 B0 0A + adc #$0A ; CPU:$D163 PRG:1163 69 0A + sta Zp01 ; CPU:$D165 PRG:1165 85 01 + lda Zp02 ; CPU:$D167 PRG:1167 A5 02 + adc #$0F ; CPU:$D169 PRG:1169 69 0F + sta Zp02 ; CPU:$D16B PRG:116B 85 02 +; ----------------------------------------------------------------------------- +; Routine: Label_D16D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D16D: + lda Zp03 ; CPU:$D16D PRG:116D A5 03 + and #$F0 ; CPU:$D16F PRG:116F 29 F0 + sec ; CPU:$D171 PRG:1171 38 + sbc Zp02 ; CPU:$D172 PRG:1172 E5 02 + bcs Label_D179 ; CPU:$D174 PRG:1174 B0 03 + adc #$A0 ; CPU:$D176 PRG:1176 69 A0 + clc ; CPU:$D178 PRG:1178 18 +; ----------------------------------------------------------------------------- +; Routine: Label_D179 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D179: + ora Zp01 ; CPU:$D179 PRG:1179 05 01 + rts ; CPU:$D17B PRG:117B 60 +; ----------------------------------------------------------------------------- +; Routine: SubCD17C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD17C: + pha ; CPU:$D17C PRG:117C 48 + and #$0F ; CPU:$D17D PRG:117D 29 0F + sta Zp01 ; CPU:$D17F PRG:117F 85 01 + pla ; CPU:$D181 PRG:1181 68 + and #$F0 ; CPU:$D182 PRG:1182 29 F0 + sta Zp02 ; CPU:$D184 PRG:1184 85 02 + lda Zp03 ; CPU:$D186 PRG:1186 A5 03 + and #$0F ; CPU:$D188 PRG:1188 29 0F + rts ; CPU:$D18A PRG:118A 60 +; ----------------------------------------------------------------------------- +; Routine: SubCD18B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD18B: + lda #$00 ; CPU:$D18B PRG:118B A9 00 + sta Zp04 ; CPU:$D18D PRG:118D 85 04 + clc ; CPU:$D18F PRG:118F 18 + lda Zp00 ; CPU:$D190 PRG:1190 A5 00 + adc #$10 ; CPU:$D192 PRG:1192 69 10 + and #$F0 ; CPU:$D194 PRG:1194 29 F0 + lsr a ; CPU:$D196 PRG:1196 4A + lsr a ; CPU:$D197 PRG:1197 4A + tay ; CPU:$D198 PRG:1198 A8 + lda Zp00 ; CPU:$D199 PRG:1199 A5 00 + and #$07 ; CPU:$D19B PRG:119B 29 07 + asl a ; CPU:$D19D PRG:119D 0A + asl a ; CPU:$D19E PRG:119E 0A + tax ; CPU:$D19F PRG:119F AA +; ----------------------------------------------------------------------------- +; Routine: Label_D1A0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D1A0: + lda $0090,y ; CPU:$D1A0 PRG:11A0 B9 90 00 + beq Label_D1F6 ; CPU:$D1A3 PRG:11A3 F0 51 + lda Zp94,x ; CPU:$D1A5 PRG:11A5 B5 94 + beq Label_D1CF ; CPU:$D1A7 PRG:11A7 F0 26 +; ----------------------------------------------------------------------------- +; Routine: Label_D1A9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D1A9: + sec ; CPU:$D1A9 PRG:11A9 38 + lda $0093,y ; CPU:$D1AA PRG:11AA B9 93 00 + sta Zp03 ; CPU:$D1AD PRG:11AD 85 03 + lda Zp97,x ; CPU:$D1AF PRG:11AF B5 97 + jsr AdjustDecimalColumns ; CPU:$D1B1 PRG:11B1 20 5A D1 + lda $0092,y ; CPU:$D1B4 PRG:11B4 B9 92 00 + sta Zp03 ; CPU:$D1B7 PRG:11B7 85 03 + lda Zp96,x ; CPU:$D1B9 PRG:11B9 B5 96 + jsr AdjustDecimalColumns ; CPU:$D1BB PRG:11BB 20 5A D1 + lda $0091,y ; CPU:$D1BE PRG:11BE B9 91 00 + sta Zp03 ; CPU:$D1C1 PRG:11C1 85 03 + lda Zp95,x ; CPU:$D1C3 PRG:11C3 B5 95 + jsr AdjustDecimalColumns ; CPU:$D1C5 PRG:11C5 20 5A D1 + bcs Label_D1FA ; CPU:$D1C8 PRG:11C8 B0 30 + lda $0090,y ; CPU:$D1CA PRG:11CA B9 90 00 + bne Label_D1FF ; CPU:$D1CD PRG:11CD D0 30 +; ----------------------------------------------------------------------------- +; Routine: Label_D1CF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D1CF: + lda #$FF ; CPU:$D1CF PRG:11CF A9 FF + sta Zp04 ; CPU:$D1D1 PRG:11D1 85 04 + sec ; CPU:$D1D3 PRG:11D3 38 +; ----------------------------------------------------------------------------- +; Routine: Label_D1D4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D1D4: + tya ; CPU:$D1D4 PRG:11D4 98 + bne Label_D1F5 ; CPU:$D1D5 PRG:11D5 D0 1E + bcc Label_D1E9 ; CPU:$D1D7 PRG:11D7 90 10 + lda Zp94,x ; CPU:$D1D9 PRG:11D9 B5 94 + sta Zp90 ; CPU:$D1DB PRG:11DB 85 90 + lda Zp95,x ; CPU:$D1DD PRG:11DD B5 95 + sta Zp91 ; CPU:$D1DF PRG:11DF 85 91 + lda Zp96,x ; CPU:$D1E1 PRG:11E1 B5 96 + sta Zp92 ; CPU:$D1E3 PRG:11E3 85 92 + lda Zp97,x ; CPU:$D1E5 PRG:11E5 B5 97 + sta Zp93 ; CPU:$D1E7 PRG:11E7 85 93 +; ----------------------------------------------------------------------------- +; Routine: Label_D1E9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D1E9: + lda Zp00 ; CPU:$D1E9 PRG:11E9 A5 00 + and #$08 ; CPU:$D1EB PRG:11EB 29 08 + beq Label_D1F5 ; CPU:$D1ED PRG:11ED F0 06 + dex ; CPU:$D1EF PRG:11EF CA + dex ; CPU:$D1F0 PRG:11F0 CA + dex ; CPU:$D1F1 PRG:11F1 CA + dex ; CPU:$D1F2 PRG:11F2 CA + bpl Label_D1A0 ; CPU:$D1F3 PRG:11F3 10 AB +; ----------------------------------------------------------------------------- +; Routine: Label_D1F5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D1F5: + rts ; CPU:$D1F5 PRG:11F5 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D1F6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D1F6: + lda Zp94,x ; CPU:$D1F6 PRG:11F6 B5 94 + beq Label_D1A9 ; CPU:$D1F8 PRG:11F8 F0 AF +; ----------------------------------------------------------------------------- +; Routine: Label_D1FA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D1FA: + lda $0090,y ; CPU:$D1FA PRG:11FA B9 90 00 + bne Label_D1CF ; CPU:$D1FD PRG:11FD D0 D0 +; ----------------------------------------------------------------------------- +; Routine: Label_D1FF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D1FF: + clc ; CPU:$D1FF PRG:11FF 18 + bcc Label_D1D4 ; CPU:$D200 PRG:1200 90 D2 +; ----------------------------------------------------------------------------- +; Routine: SubCD202 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD202: + lda Zp71 ; CPU:$D202 PRG:1202 A5 71 + bne Label_D217 ; CPU:$D204 PRG:1204 D0 11 + lda Zp2F ; CPU:$D206 PRG:1206 A5 2F + lsr a ; CPU:$D208 PRG:1208 4A + ldy #$00 ; CPU:$D209 PRG:1209 A0 00 + bcc Label_D20F ; CPU:$D20B PRG:120B 90 02 + ldy #$05 ; CPU:$D20D PRG:120D A0 05 +; ----------------------------------------------------------------------------- +; Routine: Label_D20F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D20F: + sty Zp05 ; CPU:$D20F PRG:120F 84 05 + iny ; CPU:$D211 PRG:1211 C8 + lda $0074,y ; CPU:$D212 PRG:1212 B9 74 00 + bne Label_D218 ; CPU:$D215 PRG:1215 D0 01 +; ----------------------------------------------------------------------------- +; Routine: Label_D217 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D217: + rts ; CPU:$D217 PRG:1217 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D218 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D218: + sta Zp10 ; CPU:$D218 PRG:1218 85 10 + and #$F0 ; CPU:$D21A PRG:121A 29 F0 + sta Zp00 ; CPU:$D21C PRG:121C 85 00 + lsr a ; CPU:$D21E PRG:121E 4A + lsr a ; CPU:$D21F PRG:121F 4A + lsr a ; CPU:$D220 PRG:1220 4A + clc ; CPU:$D221 PRG:1221 18 + adc Zp00 ; CPU:$D222 PRG:1222 65 00 + adc #$A0 ; CPU:$D224 PRG:1224 69 A0 + sta Zp01 ; CPU:$D226 PRG:1226 85 01 + iny ; CPU:$D228 PRG:1228 C8 + lda $0074,y ; CPU:$D229 PRG:1229 B9 74 00 + tax ; CPU:$D22C PRG:122C AA + clc ; CPU:$D22D PRG:122D 18 + adc #$01 ; CPU:$D22E PRG:122E 69 01 + sta $0074,y ; CPU:$D230 PRG:1230 99 74 00 + lda $F81C,x ; CPU:$D233 PRG:1233 BD 1C F8 + cmp #$AA ; CPU:$D236 PRG:1236 C9 AA + beq Label_D297 ; CPU:$D238 PRG:1238 F0 5D + asl a ; CPU:$D23A PRG:123A 0A + sta Zp00 ; CPU:$D23B PRG:123B 85 00 + asl a ; CPU:$D23D PRG:123D 0A + clc ; CPU:$D23E PRG:123E 18 + adc Zp00 ; CPU:$D23F PRG:123F 65 00 + adc Zp01 ; CPU:$D241 PRG:1241 65 01 + sta Zp11 ; CPU:$D243 PRG:1243 85 11 + lda Zp10 ; CPU:$D245 PRG:1245 A5 10 + and #$0F ; CPU:$D247 PRG:1247 29 0F + cmp #$01 ; CPU:$D249 PRG:1249 C9 01 + bne Label_D251 ; CPU:$D24B PRG:124B D0 04 + lda #$D8 ; CPU:$D24D PRG:124D A9 D8 + bne Label_D257 ; CPU:$D24F PRG:124F D0 06 +; ----------------------------------------------------------------------------- +; Routine: Label_D251 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D251: + cmp #$02 ; CPU:$D251 PRG:1251 C9 02 + bne Label_D25B ; CPU:$D253 PRG:1253 D0 06 + lda #$6C ; CPU:$D255 PRG:1255 A9 6C +; ----------------------------------------------------------------------------- +; Routine: Label_D257 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D257: + ldx #$22 ; CPU:$D257 PRG:1257 A2 22 + bne Label_D25F ; CPU:$D259 PRG:1259 D0 04 +; ----------------------------------------------------------------------------- +; Routine: Label_D25B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D25B: + lda #$FC ; CPU:$D25B PRG:125B A9 FC + ldx #$23 ; CPU:$D25D PRG:125D A2 23 +; ----------------------------------------------------------------------------- +; Routine: Label_D25F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D25F: + stx $0540 ; CPU:$D25F PRG:125F 8E 40 05 + sta Zp10 ; CPU:$D262 PRG:1262 85 10 + lda #$00 ; CPU:$D264 PRG:1264 A9 00 + sta Zp07 ; CPU:$D266 PRG:1266 85 07 + ldx #$00 ; CPU:$D268 PRG:1268 A2 00 +; ----------------------------------------------------------------------------- +; Routine: Label_D26A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D26A: + asl Zp10 ; CPU:$D26A PRG:126A 06 10 + bcc Label_D277 ; CPU:$D26C PRG:126C 90 09 + lda Zp07 ; CPU:$D26E PRG:126E A5 07 + clc ; CPU:$D270 PRG:1270 18 + adc Zp11 ; CPU:$D271 PRG:1271 65 11 + sta $0541,x ; CPU:$D273 PRG:1273 9D 41 05 + inx ; CPU:$D276 PRG:1276 E8 +; ----------------------------------------------------------------------------- +; Routine: Label_D277 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D277: + inc Zp07 ; CPU:$D277 PRG:1277 E6 07 + lda Zp07 ; CPU:$D279 PRG:1279 A5 07 + cmp #$06 ; CPU:$D27B PRG:127B C9 06 + bne Label_D26A ; CPU:$D27D PRG:127D D0 EB +; ----------------------------------------------------------------------------- +; Routine: SubCD27F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD27F: + iny ; CPU:$D27F PRG:127F C8 + lda $0074,y ; CPU:$D280 PRG:1280 B9 74 00 + sta Zp00 ; CPU:$D283 PRG:1283 85 00 + iny ; CPU:$D285 PRG:1285 C8 + lda $0074,y ; CPU:$D286 PRG:1286 B9 74 00 + sta Zp01 ; CPU:$D289 PRG:1289 85 01 + lda #$40 ; CPU:$D28B PRG:128B A9 40 + sta Zp02 ; CPU:$D28D PRG:128D 85 02 + lda #$05 ; CPU:$D28F PRG:128F A9 05 + sta Zp03 ; CPU:$D291 PRG:1291 85 03 + jsr ReturnOne ; CPU:$D293 PRG:1293 20 2C CE + rts ; CPU:$D296 PRG:1296 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D297 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D297: + lda #$00 ; CPU:$D297 PRG:1297 A9 00 + sta $0084,y ; CPU:$D299 PRG:1299 99 84 00 + lda Zp10 ; CPU:$D29C PRG:129C A5 10 + lsr a ; CPU:$D29E PRG:129E 4A + lsr a ; CPU:$D29F PRG:129F 4A + lsr a ; CPU:$D2A0 PRG:12A0 4A + lsr a ; CPU:$D2A1 PRG:12A1 4A + clc ; CPU:$D2A2 PRG:12A2 18 + adc #$93 ; CPU:$D2A3 PRG:12A3 69 93 + tax ; CPU:$D2A5 PRG:12A5 AA + lda #$24 ; CPU:$D2A6 PRG:12A6 A9 24 + sta $0541 ; CPU:$D2A8 PRG:12A8 8D 41 05 + sta $0542 ; CPU:$D2AB PRG:12AB 8D 42 05 + sta $0543 ; CPU:$D2AE PRG:12AE 8D 43 05 + lda Zp10 ; CPU:$D2B1 PRG:12B1 A5 10 + and #$0F ; CPU:$D2B3 PRG:12B3 29 0F + cmp #$03 ; CPU:$D2B5 PRG:12B5 C9 03 + bne Label_D2C7 ; CPU:$D2B7 PRG:12B7 D0 0E + txa ; CPU:$D2B9 PRG:12B9 8A + sta $0544 ; CPU:$D2BA PRG:12BA 8D 44 05 + sta $0545 ; CPU:$D2BD PRG:12BD 8D 45 05 + sta $0546 ; CPU:$D2C0 PRG:12C0 8D 46 05 + lda #$23 ; CPU:$D2C3 PRG:12C3 A9 23 + bne Label_D2D0 ; CPU:$D2C5 PRG:12C5 D0 09 +; ----------------------------------------------------------------------------- +; Routine: Label_D2C7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D2C7: + txa ; CPU:$D2C7 PRG:12C7 8A + sta $0543 ; CPU:$D2C8 PRG:12C8 8D 43 05 + sta $0544 ; CPU:$D2CB PRG:12CB 8D 44 05 + lda #$22 ; CPU:$D2CE PRG:12CE A9 22 +; ----------------------------------------------------------------------------- +; Routine: Label_D2D0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D2D0: + sta $0540 ; CPU:$D2D0 PRG:12D0 8D 40 05 + ldy Zp05 ; CPU:$D2D3 PRG:12D3 A4 05 + iny ; CPU:$D2D5 PRG:12D5 C8 + lda #$00 ; CPU:$D2D6 PRG:12D6 A9 00 + sta $0074,y ; CPU:$D2D8 PRG:12D8 99 74 00 + iny ; CPU:$D2DB PRG:12DB C8 + jmp SubCD27F ; CPU:$D2DC PRG:12DC 4C 7F D2 +; ----------------------------------------------------------------------------- +; Routine: SubCD2DF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD2DF: + lda Zp70 ; CPU:$D2DF PRG:12DF A5 70 + bne Label_D2E4 ; CPU:$D2E1 PRG:12E1 D0 01 + rts ; CPU:$D2E3 PRG:12E3 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D2E4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D2E4: + lda Zp71 ; CPU:$D2E4 PRG:12E4 A5 71 + beq Label_D2E9 ; CPU:$D2E6 PRG:12E6 F0 01 + rts ; CPU:$D2E8 PRG:12E8 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D2E9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D2E9: + lda #$0F ; CPU:$D2E9 PRG:12E9 A9 0F + sta Zp71 ; CPU:$D2EB PRG:12EB 85 71 + lda ZpBF ; CPU:$D2ED PRG:12ED A5 BF + sta Zp72 ; CPU:$D2EF PRG:12EF 85 72 + lda #$00 ; CPU:$D2F1 PRG:12F1 A9 00 + sta Zp2C ; CPU:$D2F3 PRG:12F3 85 2C + dec Zp70 ; CPU:$D2F5 PRG:12F5 C6 70 + jsr SubCD593 ; CPU:$D2F7 PRG:12F7 20 93 D5 + lda ZpFF ; CPU:$D2FA PRG:12FA A5 FF + ora #$02 ; CPU:$D2FC PRG:12FC 09 02 + sta ZpFF ; CPU:$D2FE PRG:12FE 85 FF + rts ; CPU:$D300 PRG:1300 60 +; ----------------------------------------------------------------------------- +; Routine: SubCD301 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD301: + lda Zp71 ; CPU:$D301 PRG:1301 A5 71 + bne Label_D306 ; CPU:$D303 PRG:1303 D0 01 + rts ; CPU:$D305 PRG:1305 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D306 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D306: + lda Zp2C ; CPU:$D306 PRG:1306 A5 2C + beq Label_D30B ; CPU:$D308 PRG:1308 F0 01 + rts ; CPU:$D30A PRG:130A 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D30B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D30B: + lda #$01 ; CPU:$D30B PRG:130B A9 01 + sta Zp2C ; CPU:$D30D PRG:130D 85 2C + dec Zp71 ; CPU:$D30F PRG:130F C6 71 + ldy #$01 ; CPU:$D311 PRG:1311 A0 01 + lda Zp71 ; CPU:$D313 PRG:1313 A5 71 + cmp #$08 ; CPU:$D315 PRG:1315 C9 08 + bcc Label_D31F ; CPU:$D317 PRG:1317 90 06 + ldy #$FF ; CPU:$D319 PRG:1319 A0 FF + ora #$F0 ; CPU:$D31B PRG:131B 09 F0 + eor #$FF ; CPU:$D31D PRG:131D 49 FF +; ----------------------------------------------------------------------------- +; Routine: Label_D31F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D31F: + clc ; CPU:$D31F PRG:131F 18 + adc Zp0D ; CPU:$D320 PRG:1320 65 0D + sta Zp0C ; CPU:$D322 PRG:1322 85 0C + sty $05F9 ; CPU:$D324 PRG:1324 8C F9 05 + rts ; CPU:$D327 PRG:1327 60 +; ----------------------------------------------------------------------------- +; Routine: TestRamFlagPair0500 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +TestRamFlagPair0500: + lda $0500 ; CPU:$D328 PRG:1328 AD 00 05 + and #$02 ; CPU:$D32B PRG:132B 29 02 + sta Zp07 ; CPU:$D32D PRG:132D 85 07 + lda $0501 ; CPU:$D32F PRG:132F AD 01 05 + and #$02 ; CPU:$D332 PRG:1332 29 02 + eor Zp07 ; CPU:$D334 PRG:1334 45 07 + clc ; CPU:$D336 PRG:1336 18 + beq Label_D33A ; CPU:$D337 PRG:1337 F0 01 + sec ; CPU:$D339 PRG:1339 38 +; ----------------------------------------------------------------------------- +; Routine: Label_D33A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D33A: + ror $0500 ; CPU:$D33A PRG:133A 6E 00 05 + ror $0501 ; CPU:$D33D PRG:133D 6E 01 05 + ror $0502 ; CPU:$D340 PRG:1340 6E 02 05 + ror $0503 ; CPU:$D343 PRG:1343 6E 03 05 + lda $0500 ; CPU:$D346 PRG:1346 AD 00 05 + rts ; CPU:$D349 PRG:1349 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D34A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D34A: + lda Zp2D ; CPU:$D34A PRG:134A A5 2D + bne Label_D3A7 ; CPU:$D34C PRG:134C D0 59 + lda #$00 ; CPU:$D34E PRG:134E A9 00 + sta Zp31 ; CPU:$D350 PRG:1350 85 31 + sta Zp41 ; CPU:$D352 PRG:1352 85 41 + lda #$03 ; CPU:$D354 PRG:1354 A9 03 + sta Zp70 ; CPU:$D356 PRG:1356 85 70 + ldx #$02 ; CPU:$D358 PRG:1358 A2 02 + ldy #$00 ; CPU:$D35A PRG:135A A0 00 + stx Zp48 ; CPU:$D35C PRG:135C 86 48 + sty Zp4A ; CPU:$D35E PRG:135E 84 4A + sty ZpAD ; CPU:$D360 PRG:1360 84 AD + lda Zp30 ; CPU:$D362 PRG:1362 A5 30 + beq Label_D36D ; CPU:$D364 PRG:1364 F0 07 + lda #$55 ; CPU:$D366 PRG:1366 A9 55 + sta Zp31 ; CPU:$D368 PRG:1368 85 31 + jmp SubCD37D ; CPU:$D36A PRG:136A 4C 7D D3 +; ----------------------------------------------------------------------------- +; Routine: Label_D36D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D36D: + lda Zp29 ; CPU:$D36D PRG:136D A5 29 + cmp #$02 ; CPU:$D36F PRG:136F C9 02 + bcs SubCD37D ; CPU:$D371 PRG:1371 B0 0A + sty Zp4C ; CPU:$D373 PRG:1373 84 4C + sty Zp9E ; CPU:$D375 PRG:1375 84 9E + ldy #$FF ; CPU:$D377 PRG:1377 A0 FF + lda #$00 ; CPU:$D379 PRG:1379 A9 00 + beq Label_D381 ; CPU:$D37B PRG:137B F0 04 +; ----------------------------------------------------------------------------- +; Routine: SubCD37D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD37D: + stx Zp4C ; CPU:$D37D PRG:137D 86 4C + lda #$02 ; CPU:$D37F PRG:137F A9 02 +; ----------------------------------------------------------------------------- +; Routine: Label_D381 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D381: + sty Zp4E ; CPU:$D381 PRG:1381 84 4E + sty ZpAE ; CPU:$D383 PRG:1383 84 AE + sta Zp39 ; CPU:$D385 PRG:1385 85 39 + lda #$00 ; CPU:$D387 PRG:1387 A9 00 + sta Zp49 ; CPU:$D389 PRG:1389 85 49 + sta Zp4D ; CPU:$D38B PRG:138B 85 4D + ldx #$07 ; CPU:$D38D PRG:138D A2 07 +; ----------------------------------------------------------------------------- +; Routine: Label_D38F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D38F: + sta Zp94,x ; CPU:$D38F PRG:138F 95 94 + dex ; CPU:$D391 PRG:1391 CA + bpl Label_D38F ; CPU:$D392 PRG:1392 10 FB + ldy #$00 ; CPU:$D394 PRG:1394 A0 00 + lda Zp29 ; CPU:$D396 PRG:1396 A5 29 + beq Label_D39F ; CPU:$D398 PRG:1398 F0 05 + cmp #$02 ; CPU:$D39A PRG:139A C9 02 + beq Label_D39F ; CPU:$D39C PRG:139C F0 01 + iny ; CPU:$D39E PRG:139E C8 +; ----------------------------------------------------------------------------- +; Routine: Label_D39F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D39F: + sty Zp3A ; CPU:$D39F PRG:139F 84 3A + lda #$01 ; CPU:$D3A1 PRG:13A1 A9 01 + sta Zp3F ; CPU:$D3A3 PRG:13A3 85 3F + inc Zp40 ; CPU:$D3A5 PRG:13A5 E6 40 +; ----------------------------------------------------------------------------- +; Routine: Label_D3A7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D3A7: + rts ; CPU:$D3A7 PRG:13A7 60 +; ---- data $D3A8-$D3E9 (66 bytes) ---- + .byte $A5, $2D, $D0, $FB, $A9, $00, $85, $49, $85, $4D, $85, $51, $85, $46, $8D, $FB ; CPU:$D3A8 PRG:13A8 A5 2D D0 FB A9 00 85 49 85 4D 85 51 85 46 8D FB + .byte $05, $8D, $FC, $05, $85, $43, $85, $44, $85, $45, $85, $46, $A2, $03, $95, $FC ; CPU:$D3B8 PRG:13B8 05 8D FC 05 85 43 85 44 85 45 85 46 A2 03 95 FC + .byte $CA, $10, $FB, $A5, $30, $D0, $26, $20, $0F, $D6, $20, $E6, $D5, $20, $EC, $D5 ; CPU:$D3C8 PRG:13C8 CA 10 FB A5 30 D0 26 20 0F D6 20 E6 D5 20 EC D5 + .byte $A5, $41, $C9, $01, $D0, $0F, $A9, $08, $85, $40, $A9, $18, $85, $2D, $A9, $01 ; CPU:$D3D8 PRG:13D8 A5 41 C9 01 D0 0F A9 08 85 40 A9 18 85 2D A9 01 + .byte $85, $FD ; CPU:$D3E8 PRG:13E8 85 FD +; ----------------------------------------------------------------------------- +; Routine: Label_D3EA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D3EA: + jmp SubCE13D ; CPU:$D3EA PRG:13EA 4C 3D E1 +; ---- data $D3ED-$D40A (30 bytes) ---- + .byte $A9, $02, $85, $FD, $A9, $0C, $85, $2D, $E6, $40, $D0, $F1, $20, $32, $E1, $20 ; CPU:$D3ED PRG:13ED A9 02 85 FD A9 0C 85 2D E6 40 D0 F1 20 32 E1 20 + .byte $20, $CA, $20, $2B, $CA, $20, $08, $D5, $20, $1D, $D6, $E6, $40, $60 ; CPU:$D3FD PRG:13FD 20 CA 20 2B CA 20 08 D5 20 1D D6 E6 40 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D40B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D40B: + jsr SubCE132 ; CPU:$D40B PRG:140B 20 32 E1 + jsr SubCCA20 ; CPU:$D40E PRG:140E 20 20 CA + jsr SubCCA2B ; CPU:$D411 PRG:1411 20 2B CA + ldx #$A5 ; CPU:$D414 PRG:1414 A2 A5 + ldy #$F0 ; CPU:$D416 PRG:1416 A0 F0 + jsr SubCD5D5 ; CPU:$D418 PRG:1418 20 D5 D5 + lda #$02 ; CPU:$D41B PRG:141B A9 02 + sta Zp3F ; CPU:$D41D PRG:141D 85 3F + lda #$01 ; CPU:$D41F PRG:141F A9 01 + sta Zp28 ; CPU:$D421 PRG:1421 85 28 + lda #$89 ; CPU:$D423 PRG:1423 A9 89 + sta Zp00 ; CPU:$D425 PRG:1425 85 00 + lda #$F6 ; CPU:$D427 PRG:1427 A9 F6 + sta Zp01 ; CPU:$D429 PRG:1429 85 01 + lda #$04 ; CPU:$D42B PRG:142B A9 04 + sta Zp02 ; CPU:$D42D PRG:142D 85 02 + jsr SubCCE16 ; CPU:$D42F PRG:142F 20 16 CE + inc Zp50 ; CPU:$D432 PRG:1432 E6 50 + ldy Zp52 ; CPU:$D434 PRG:1434 A4 52 + bne Label_D440 ; CPU:$D436 PRG:1436 D0 08 + ldy #$02 ; CPU:$D438 PRG:1438 A0 02 + sty Zp52 ; CPU:$D43A PRG:143A 84 52 + lda #$4F ; CPU:$D43C PRG:143C A9 4F + bne Label_D444 ; CPU:$D43E PRG:143E D0 04 +; ----------------------------------------------------------------------------- +; Routine: Label_D440 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D440: + dec Zp52 ; CPU:$D440 PRG:1440 C6 52 + lda #$25 ; CPU:$D442 PRG:1442 A9 25 +; ----------------------------------------------------------------------------- +; Routine: Label_D444 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D444: + sta Zp2D ; CPU:$D444 PRG:1444 85 2D + bne Label_D3EA ; CPU:$D446 PRG:1446 D0 A2 + lda Zp2D ; CPU:$D448 PRG:1448 A5 2D + bne Label_D450 ; CPU:$D44A PRG:144A D0 04 + lda #$00 ; CPU:$D44C PRG:144C A9 00 + sta Zp50 ; CPU:$D44E PRG:144E 85 50 +; ----------------------------------------------------------------------------- +; Routine: Label_D450 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D450: + rts ; CPU:$D450 PRG:1450 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D451 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D451: + lda Zp2D ; CPU:$D451 PRG:1451 A5 2D + bne Label_D459 ; CPU:$D453 PRG:1453 D0 04 + lda #$04 ; CPU:$D455 PRG:1455 A9 04 + bne Label_D47A ; CPU:$D457 PRG:1457 D0 21 +; ----------------------------------------------------------------------------- +; Routine: Label_D459 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D459: + jmp SubCE1F7 ; CPU:$D459 PRG:1459 4C F7 E1 +; ---- data $D45C-$D479 (30 bytes) ---- + .byte $A5, $2B, $F0, $0F, $C9, $0A, $D0, $18, $A5, $0A, $09, $10, $8D, $01, $20, $85 ; CPU:$D45C PRG:145C A5 2B F0 0F C9 0A D0 18 A5 0A 09 10 8D 01 20 85 + .byte $0A, $D0, $0D, $A2, $05, $B5, $5A, $95, $2A, $CA, $10, $F9, $A5, $3B ; CPU:$D46C PRG:146C 0A D0 0D A2 05 B5 5A 95 2A CA 10 F9 A5 3B +; ----------------------------------------------------------------------------- +; Routine: Label_D47A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D47A: + sta Zp40 ; CPU:$D47A PRG:147A 85 40 + rts ; CPU:$D47C PRG:147C 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D47D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D47D: + ldy Zp2D ; CPU:$D47D PRG:147D A4 2D + beq Label_D48E ; CPU:$D47F PRG:147F F0 0D + cpy #$4B ; CPU:$D481 PRG:1481 C0 4B + bne Label_D48D ; CPU:$D483 PRG:1483 D0 08 + lda #$80 ; CPU:$D485 PRG:1485 A9 80 + sta ZpFD ; CPU:$D487 PRG:1487 85 FD + ldy #$48 ; CPU:$D489 PRG:1489 A0 48 + sty Zp2D ; CPU:$D48B PRG:148B 84 2D +; ----------------------------------------------------------------------------- +; Routine: Label_D48D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D48D: + rts ; CPU:$D48D PRG:148D 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D48E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D48E: + inc Zp50 ; CPU:$D48E PRG:148E E6 50 + rts ; CPU:$D490 PRG:1490 60 +; ---- data $D491-$D4FD (109 bytes) ---- + .byte $E6, $50, $4C, $4A, $D3, $E6, $50, $4C, $4A, $E1, $E6, $50, $4C, $F9, $D3, $E6 ; CPU:$D491 PRG:1491 E6 50 4C 4A D3 E6 50 4C 4A E1 E6 50 4C F9 D3 E6 + .byte $50, $A9, $00, $85, $55, $85, $56, $85, $57, $85, $58, $4C, $A8, $D3, $A4, $56 ; CPU:$D4A1 PRG:14A1 50 A9 00 85 55 85 56 85 57 85 58 4C A8 D3 A4 56 + .byte $D0, $17, $A6, $55, $BD, $23, $F8, $C9, $AA, $F0, $3C, $85, $19, $E8, $BD, $23 ; CPU:$D4B1 PRG:14B1 D0 17 A6 55 BD 23 F8 C9 AA F0 3C 85 19 E8 BD 23 + .byte $F8, $85, $56, $E8, $86, $55, $4C, $D4, $D4, $88, $84, $56, $AD, $10, $03, $29 ; CPU:$D4C1 PRG:14C1 F8 85 56 E8 86 55 4C D4 D4 88 84 56 AD 10 03 29 + .byte $03, $85, $19, $A4, $58, $D0, $13, $A6, $57, $BD, $54, $F8, $85, $1B, $E8, $BD ; CPU:$D4D1 PRG:14D1 03 85 19 A4 58 D0 13 A6 57 BD 54 F8 85 1B E8 BD + .byte $54, $F8, $85, $58, $E8, $86, $57, $4C, $F5, $D4, $88, $84, $58, $AD, $30, $03 ; CPU:$D4E1 PRG:14E1 54 F8 85 58 E8 86 57 4C F5 D4 88 84 58 AD 30 03 + .byte $29, $03, $85, $1B, $4C, $A3, $C5, $A9, $05, $85, $2D, $E6, $50 ; CPU:$D4F1 PRG:14F1 29 03 85 1B 4C A3 C5 A9 05 85 2D E6 50 +; ----------------------------------------------------------------------------- +; Routine: SubCD4FE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD4FE: + lda #$00 ; CPU:$D4FE PRG:14FE A9 00 + ldx #$03 ; CPU:$D500 PRG:1500 A2 03 +; ----------------------------------------------------------------------------- +; Routine: Label_D502 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D502: + sta ZpFC,x ; CPU:$D502 PRG:1502 95 FC + dex ; CPU:$D504 PRG:1504 CA + bpl Label_D502 ; CPU:$D505 PRG:1505 10 FB + rts ; CPU:$D507 PRG:1507 60 +; ---- data $D508-$D56D (102 bytes) ---- + .byte $20, $3B, $CA, $A5, $32, $18, $69, $93, $85, $07, $A2, $00, $A0, $00, $84, $1C ; CPU:$D508 PRG:1508 20 3B CA A5 32 18 69 93 85 07 A2 00 A0 00 84 1C + .byte $A9, $03, $85, $02, $B9, $E7, $F1, $9D, $40, $05, $C8, $E8, $C6, $02, $D0, $F4 ; CPU:$D518 PRG:1518 A9 03 85 02 B9 E7 F1 9D 40 05 C8 E8 C6 02 D0 F4 + .byte $A5, $1C, $F0, $0E, $A9, $92, $9D, $40, $05, $E8, $A5, $1C, $C9, $02, $F0, $17 ; CPU:$D528 PRG:1528 A5 1C F0 0E A9 92 9D 40 05 E8 A5 1C C9 02 F0 17 + .byte $D0, $10, $B9, $E7, $F1, $85, $00, $A5, $07, $9D, $40, $05, $E8, $A5, $00, $D0 ; CPU:$D538 PRG:1538 D0 10 B9 E7 F1 85 00 A5 07 9D 40 05 E8 A5 00 D0 + .byte $CF, $C8, $E6, $1C, $4C, $18, $D5, $A9, $00, $9D, $40, $05, $A2, $40, $A0, $05 ; CPU:$D548 PRG:1548 CF C8 E6 1C 4C 18 D5 A9 00 9D 40 05 A2 40 A0 05 + .byte $20, $D5, $D5, $20, $8C, $D5, $20, $93, $D5, $20, $BE, $D5, $A9, $00, $A2, $09 ; CPU:$D558 PRG:1558 20 D5 D5 20 8C D5 20 93 D5 20 BE D5 A9 00 A2 09 + .byte $95, $74, $CA, $10, $FB, $60 ; CPU:$D568 PRG:1568 95 74 CA 10 FB 60 +; ----------------------------------------------------------------------------- +; Routine: SubCD56E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD56E: + lda Zp35 ; CPU:$D56E PRG:156E A5 35 + cmp #$AA ; CPU:$D570 PRG:1570 C9 AA + beq Label_D58B ; CPU:$D572 PRG:1572 F0 17 + cmp #$BB ; CPU:$D574 PRG:1574 C9 BB + beq Label_D58B ; CPU:$D576 PRG:1576 F0 13 + lda Zp2E ; CPU:$D578 PRG:1578 A5 2E + bne Label_D58B ; CPU:$D57A PRG:157A D0 0F + lda Zp41 ; CPU:$D57C PRG:157C A5 41 + cmp #$02 ; CPU:$D57E PRG:157E C9 02 + beq Label_D588 ; CPU:$D580 PRG:1580 F0 06 + lda Zp45 ; CPU:$D582 PRG:1582 A5 45 + cmp #$04 ; CPU:$D584 PRG:1584 C9 04 + bcs Label_D58B ; CPU:$D586 PRG:1586 B0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_D588 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D588: + jsr SubCCEC3 ; CPU:$D588 PRG:1588 20 C3 CE +; ----------------------------------------------------------------------------- +; Routine: Label_D58B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D58B: + rts ; CPU:$D58B PRG:158B 60 +; ---- data $D58C-$D592 (7 bytes) ---- + .byte $A2, $F5, $A0, $F4, $4C, $D5, $D5 ; CPU:$D58C PRG:158C A2 F5 A0 F4 4C D5 D5 +; ----------------------------------------------------------------------------- +; Routine: SubCD593 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD593: + lda Zp70 ; CPU:$D593 PRG:1593 A5 70 + asl a ; CPU:$D595 PRG:1595 0A + asl a ; CPU:$D596 PRG:1596 0A + clc ; CPU:$D597 PRG:1597 18 + adc Zp70 ; CPU:$D598 PRG:1598 65 70 + sta Zp12 ; CPU:$D59A PRG:159A 85 12 + lda #$00 ; CPU:$D59C PRG:159C A9 00 + sta Zp13 ; CPU:$D59E PRG:159E 85 13 + lda #$60 ; CPU:$D5A0 PRG:15A0 A9 60 + sta Zp14 ; CPU:$D5A2 PRG:15A2 85 14 + lda #$F5 ; CPU:$D5A4 PRG:15A4 A9 F5 + sta Zp15 ; CPU:$D5A6 PRG:15A6 85 15 + jsr AdvanceDispatchPointer ; CPU:$D5A8 PRG:15A8 20 B4 CD + lda #$AF ; CPU:$D5AB PRG:15AB A9 AF + sta Zp00 ; CPU:$D5AD PRG:15AD 85 00 + lda #$22 ; CPU:$D5AF PRG:15AF A9 22 + sta Zp01 ; CPU:$D5B1 PRG:15B1 85 01 + lda Zp14 ; CPU:$D5B3 PRG:15B3 A5 14 + sta Zp02 ; CPU:$D5B5 PRG:15B5 85 02 + lda Zp15 ; CPU:$D5B7 PRG:15B7 A5 15 + sta Zp03 ; CPU:$D5B9 PRG:15B9 85 03 + jmp ReturnOne ; CPU:$D5BB PRG:15BB 4C 2C CE +; ---- data $D5BE-$D5D4 (23 bytes) ---- + .byte $A2, $60, $A0, $F6, $20, $D5, $D5, $A9, $01, $85, $9D, $A5, $39, $F0, $18, $A9 ; CPU:$D5BE PRG:15BE A2 60 A0 F6 20 D5 D5 A9 01 85 9D A5 39 F0 18 A9 + .byte $01, $85, $9E, $A2, $6B, $A0, $F6 ; CPU:$D5CE PRG:15CE 01 85 9E A2 6B A0 F6 +; ----------------------------------------------------------------------------- +; Routine: SubCD5D5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD5D5: + stx Zp00 ; CPU:$D5D5 PRG:15D5 86 00 + sty Zp01 ; CPU:$D5D7 PRG:15D7 84 01 + jmp SubCCE00 ; CPU:$D5D9 PRG:15D9 4C 00 CE +; ----------------------------------------------------------------------------- +; Routine: SubCD5DC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD5DC: + lda #$00 ; CPU:$D5DC PRG:15DC A9 00 + sta Zp23 ; CPU:$D5DE PRG:15DE 85 23 + nop ; CPU:$D5E0 PRG:15E0 EA +; ----------------------------------------------------------------------------- +; Routine: Label_D5E1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D5E1: + lda Zp23 ; CPU:$D5E1 PRG:15E1 A5 23 + beq Label_D5E1 ; CPU:$D5E3 PRG:15E3 F0 FC + rts ; CPU:$D5E5 PRG:15E5 60 +; ----------------------------------------------------------------------------- +; Routine: SubCD5E6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD5E6: + ldx Zp48 ; CPU:$D5E6 PRG:15E6 A6 48 + ldy #$D0 ; CPU:$D5E8 PRG:15E8 A0 D0 + bne Label_D5F0 ; CPU:$D5EA PRG:15EA D0 04 +; ----------------------------------------------------------------------------- +; Routine: SubCD5EC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD5EC: + ldx Zp4C ; CPU:$D5EC PRG:15EC A6 4C + ldy #$DC ; CPU:$D5EE PRG:15EE A0 DC +; ----------------------------------------------------------------------------- +; Routine: Label_D5F0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D5F0: + lda Zp30 ; CPU:$D5F0 PRG:15F0 A5 30 + bne Label_D609 ; CPU:$D5F2 PRG:15F2 D0 15 + lda #$03 ; CPU:$D5F4 PRG:15F4 A9 03 + sta Zp1E ; CPU:$D5F6 PRG:15F6 85 1E + lda #$20 ; CPU:$D5F8 PRG:15F8 A9 20 + inx ; CPU:$D5FA PRG:15FA E8 +; ----------------------------------------------------------------------------- +; Routine: Label_D5FB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D5FB: + dex ; CPU:$D5FB PRG:15FB CA + beq Label_D60A ; CPU:$D5FC PRG:15FC F0 0C +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_D5FE: + sta $0200,y ; CPU:$D5FE PRG:15FE 99 00 02 + iny ; CPU:$D601 PRG:1601 C8 + iny ; CPU:$D602 PRG:1602 C8 + iny ; CPU:$D603 PRG:1603 C8 + iny ; CPU:$D604 PRG:1604 C8 + dec Zp1E ; CPU:$D605 PRG:1605 C6 1E + bne Label_D5FB ; CPU:$D607 PRG:1607 D0 F2 +; ----------------------------------------------------------------------------- +; Routine: Label_D609 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D609: + rts ; CPU:$D609 PRG:1609 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D60A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D60A: + lda #$F4 ; CPU:$D60A PRG:160A A9 F4 + inx ; CPU:$D60C PRG:160C E8 + bne Label_D5FE ; CPU:$D60D PRG:160D D0 EF + ldy #$00 ; CPU:$D60F PRG:160F A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_D611 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D611: + lda $F671,y ; CPU:$D611 PRG:1611 B9 71 F6 + sta $02D0,y ; CPU:$D614 PRG:1614 99 D0 02 + iny ; CPU:$D617 PRG:1617 C8 + cpy #$18 ; CPU:$D618 PRG:1618 C0 18 + bne Label_D611 ; CPU:$D61A PRG:161A D0 F5 + rts ; CPU:$D61C PRG:161C 60 +; ---- data $D61D-$D699 (125 bytes) ---- + .byte $A5, $30, $D0, $5D, $A9, $24, $85, $01, $A2, $00, $A5, $41, $29, $F0, $F0, $07 ; CPU:$D61D PRG:161D A5 30 D0 5D A9 24 85 01 A2 00 A5 41 29 F0 F0 07 + .byte $4A, $4A, $4A, $4A, $95, $00, $E8, $A5, $41, $29, $0F, $95, $00, $A0, $12, $B9 ; CPU:$D62D PRG:162D 4A 4A 4A 4A 95 00 E8 A5 41 29 0F 95 00 A0 12 B9 + .byte $22, $F7, $99, $40, $05, $88, $10, $F7, $A5, $00, $8D, $49, $05, $8D, $50, $05 ; CPU:$D63D PRG:163D 22 F7 99 40 05 88 10 F7 A5 00 8D 49 05 8D 50 05 + .byte $A5, $01, $8D, $4A, $05, $8D, $51, $05, $A9, $FF, $8D, $F1, $04, $A2, $40, $A0 ; CPU:$D64D PRG:164D A5 01 8D 4A 05 8D 51 05 A9 FF 8D F1 04 A2 40 A0 + .byte $05, $20, $D5, $D5, $AD, $B0, $04, $F0, $18, $A9, $F0, $8D, $F0, $04, $A2, $35 ; CPU:$D65D PRG:165D 05 20 D5 D5 AD B0 04 F0 18 A9 F0 8D F0 04 A2 35 + .byte $A0, $F7, $4C, $D5, $D5, $A9, $01, $85, $03, $18, $A5, $41, $20, $39, $D1, $85 ; CPU:$D66D PRG:166D A0 F7 4C D5 D5 A9 01 85 03 18 A5 41 20 39 D1 85 + .byte $41, $60, $A0, $1F, $A2, $1F, $A5, $4E, $D0, $08, $A2, $3F, $A5, $4A, $D0, $02 ; CPU:$D67D PRG:167D 41 60 A0 1F A2 1F A5 4E D0 08 A2 3F A5 4A D0 02 + .byte $A0, $3F, $BD, $EC, $F2, $9D, $00, $03, $CA, $88, $10, $F6, $60 ; CPU:$D68D PRG:168D A0 3F BD EC F2 9D 00 03 CA 88 10 F6 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D69A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D69A: + lda #$BA ; CPU:$D69A PRG:169A A9 BA + sta Zp14 ; CPU:$D69C PRG:169C 85 14 + lda #$F3 ; CPU:$D69E PRG:169E A9 F3 + sta Zp15 ; CPU:$D6A0 PRG:16A0 85 15 + lda Zp34 ; CPU:$D6A2 PRG:16A2 A5 34 + jsr SubCCC29 ; CPU:$D6A4 PRG:16A4 20 29 CC + lda Zp12 ; CPU:$D6A7 PRG:16A7 A5 12 + sta Zp36 ; CPU:$D6A9 PRG:16A9 85 36 + lda Zp13 ; CPU:$D6AB PRG:16AB A5 13 + sta Zp37 ; CPU:$D6AD PRG:16AD 85 37 + lda #$00 ; CPU:$D6AF PRG:16AF A9 00 + sta Zp35 ; CPU:$D6B1 PRG:16B1 85 35 + ldy #$00 ; CPU:$D6B3 PRG:16B3 A0 00 + lda (Zp36),y ; CPU:$D6B5 PRG:16B5 B1 36 + sta Zp2E ; CPU:$D6B7 PRG:16B7 85 2E + rts ; CPU:$D6B9 PRG:16B9 60 +; ----------------------------------------------------------------------------- +; Routine: SubCD6BA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD6BA: + lda ZpBF ; CPU:$D6BA PRG:16BA A5 BF + and #$0F ; CPU:$D6BC PRG:16BC 29 0F + bne Label_D710 ; CPU:$D6BE PRG:16BE D0 50 + lda ZpBF ; CPU:$D6C0 PRG:16C0 A5 BF + ldx #$84 ; CPU:$D6C2 PRG:16C2 A2 84 + ldy #$F5 ; CPU:$D6C4 PRG:16C4 A0 F5 + cmp #$10 ; CPU:$D6C6 PRG:16C6 C9 10 + beq Label_D6E6 ; CPU:$D6C8 PRG:16C8 F0 1C + ldx #$8C ; CPU:$D6CA PRG:16CA A2 8C + ldy #$F5 ; CPU:$D6CC PRG:16CC A0 F5 + cmp #$20 ; CPU:$D6CE PRG:16CE C9 20 + beq Label_D6E6 ; CPU:$D6D0 PRG:16D0 F0 14 + ldx #$96 ; CPU:$D6D2 PRG:16D2 A2 96 + ldy #$F5 ; CPU:$D6D4 PRG:16D4 A0 F5 + cmp #$30 ; CPU:$D6D6 PRG:16D6 C9 30 + beq Label_D6E6 ; CPU:$D6D8 PRG:16D8 F0 0C + ldx #$9E ; CPU:$D6DA PRG:16DA A2 9E + ldy #$F5 ; CPU:$D6DC PRG:16DC A0 F5 + cmp #$80 ; CPU:$D6DE PRG:16DE C9 80 + beq Label_D6E6 ; CPU:$D6E0 PRG:16E0 F0 04 + ldx #$A4 ; CPU:$D6E2 PRG:16E2 A2 A4 + ldy #$F5 ; CPU:$D6E4 PRG:16E4 A0 F5 +; ----------------------------------------------------------------------------- +; Routine: Label_D6E6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D6E6: + stx Zp06 ; CPU:$D6E6 PRG:16E6 86 06 + sty Zp07 ; CPU:$D6E8 PRG:16E8 84 07 + lda ZpC0 ; CPU:$D6EA PRG:16EA A5 C0 + bne Label_D6F1 ; CPU:$D6EC PRG:16EC D0 03 + jmp SubCD73C ; CPU:$D6EE PRG:16EE 4C 3C D7 +; ----------------------------------------------------------------------------- +; Routine: Label_D6F1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D6F1: + and #$0F ; CPU:$D6F1 PRG:16F1 29 0F + cmp #$02 ; CPU:$D6F3 PRG:16F3 C9 02 + bne Label_D6FA ; CPU:$D6F5 PRG:16F5 D0 03 + jmp SubCD7C2 ; CPU:$D6F7 PRG:16F7 4C C2 D7 +; ----------------------------------------------------------------------------- +; Routine: Label_D6FA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D6FA: + cmp #$03 ; CPU:$D6FA PRG:16FA C9 03 + bne Label_D701 ; CPU:$D6FC PRG:16FC D0 03 + jmp SubCD80E ; CPU:$D6FE PRG:16FE 4C 0E D8 +; ----------------------------------------------------------------------------- +; Routine: Label_D701 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D701: + cmp #$05 ; CPU:$D701 PRG:1701 C9 05 + bne Label_D708 ; CPU:$D703 PRG:1703 D0 03 + jmp SubCD855 ; CPU:$D705 PRG:1705 4C 55 D8 +; ----------------------------------------------------------------------------- +; Routine: Label_D708 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D708: + cmp #$06 ; CPU:$D708 PRG:1708 C9 06 + bne Label_D70F ; CPU:$D70A PRG:170A D0 03 + jmp SubCD885 ; CPU:$D70C PRG:170C 4C 85 D8 +; ----------------------------------------------------------------------------- +; Routine: Label_D70F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D70F: + rts ; CPU:$D70F PRG:170F 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D710 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D710: + lda ZpB1 ; CPU:$D710 PRG:1710 A5 B1 + and #$C0 ; CPU:$D712 PRG:1712 29 C0 + bne Label_D70F ; CPU:$D714 PRG:1714 D0 F9 + jsr CheckBF_LowNibble ; CPU:$D716 PRG:1716 20 0D D9 + cmp #$02 ; CPU:$D719 PRG:1719 C9 02 + bne Label_D70F ; CPU:$D71B PRG:171B D0 F2 + lda Zp00 ; CPU:$D71D PRG:171D A5 00 + sta ZpC1 ; CPU:$D71F PRG:171F 85 C1 + lda ZpB1 ; CPU:$D721 PRG:1721 A5 B1 + ora #$80 ; CPU:$D723 PRG:1723 09 80 + sta ZpB1 ; CPU:$D725 PRG:1725 85 B1 + lda #$AD ; CPU:$D727 PRG:1727 A9 AD + sta ZpBC ; CPU:$D729 PRG:1729 85 BC + lda #$F5 ; CPU:$D72B PRG:172B A9 F5 + sta ZpBD ; CPU:$D72D PRG:172D 85 BD + lda ZpB1 ; CPU:$D72F PRG:172F A5 B1 + and #$08 ; CPU:$D731 PRG:1731 29 08 + beq Label_D70F ; CPU:$D733 PRG:1733 F0 DA + lda #$00 ; CPU:$D735 PRG:1735 A9 00 + sta ZpBB ; CPU:$D737 PRG:1737 85 BB + jmp SubCC884 ; CPU:$D739 PRG:1739 4C 84 C8 +; ----------------------------------------------------------------------------- +; Routine: SubCD73C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD73C: + jsr CheckBF_LowNibble ; CPU:$D73C PRG:173C 20 0D D9 + cmp #$02 ; CPU:$D73F PRG:173F C9 02 + beq Label_D744 ; CPU:$D741 PRG:1741 F0 01 + rts ; CPU:$D743 PRG:1743 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D744 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D744: + lda ZpBF ; CPU:$D744 PRG:1744 A5 BF + cmp #$20 ; CPU:$D746 PRG:1746 C9 20 + bne Label_D767 ; CPU:$D748 PRG:1748 D0 1D + lda ZpB4 ; CPU:$D74A PRG:174A A5 B4 + cmp #$1A ; CPU:$D74C PRG:174C C9 1A + bcc Label_D753 ; CPU:$D74E PRG:174E 90 03 + jmp SubCD877 ; CPU:$D750 PRG:1750 4C 77 D8 +; ----------------------------------------------------------------------------- +; Routine: Label_D753 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D753: + lda #$1A ; CPU:$D753 PRG:1753 A9 1A + sta ZpB4 ; CPU:$D755 PRG:1755 85 B4 + inc ZpC4 ; CPU:$D757 PRG:1757 E6 C4 + jsr DispatchTableF393 ; CPU:$D759 PRG:1759 20 B9 CA + lda $05F8 ; CPU:$D75C PRG:175C AD F8 05 + and #$03 ; CPU:$D75F PRG:175F 29 03 + sta ZpC1 ; CPU:$D761 PRG:1761 85 C1 + lda #$04 ; CPU:$D763 PRG:1763 A9 04 + bne Label_D797 ; CPU:$D765 PRG:1765 D0 30 +; ----------------------------------------------------------------------------- +; Routine: Label_D767 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D767: + cmp #$40 ; CPU:$D767 PRG:1767 C9 40 + beq Label_D77F ; CPU:$D769 PRG:1769 F0 14 + cmp #$80 ; CPU:$D76B PRG:176B C9 80 + bne Label_D792 ; CPU:$D76D PRG:176D D0 23 + lda ZpFE ; CPU:$D76F PRG:176F A5 FE + ora #$01 ; CPU:$D771 PRG:1771 09 01 + sta ZpFE ; CPU:$D773 PRG:1773 85 FE + lda #$F4 ; CPU:$D775 PRG:1775 A9 F4 + sta $02B0 ; CPU:$D777 PRG:1777 8D B0 02 + sta $02B4 ; CPU:$D77A PRG:177A 8D B4 02 + bne Label_D785 ; CPU:$D77D PRG:177D D0 06 +; ----------------------------------------------------------------------------- +; Routine: Label_D77F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D77F: + lda ZpFE ; CPU:$D77F PRG:177F A5 FE + ora #$02 ; CPU:$D781 PRG:1781 09 02 + sta ZpFE ; CPU:$D783 PRG:1783 85 FE +; ----------------------------------------------------------------------------- +; Routine: Label_D785 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D785: + lda Zp9F ; CPU:$D785 PRG:1785 A5 9F + sta ZpCC ; CPU:$D787 PRG:1787 85 CC +; ----------------------------------------------------------------------------- +; Routine: SubCD789 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD789: + ldy #$04 ; CPU:$D789 PRG:1789 A0 04 + jsr InitSpritesOffscreen ; CPU:$D78B PRG:178B 20 C4 DF + lda #$06 ; CPU:$D78E PRG:178E A9 06 + bne Label_D797 ; CPU:$D790 PRG:1790 D0 05 +; ----------------------------------------------------------------------------- +; Routine: Label_D792 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D792: + jsr SubCEE82 ; CPU:$D792 PRG:1792 20 82 EE + lda #$01 ; CPU:$D795 PRG:1795 A9 01 +; ----------------------------------------------------------------------------- +; Routine: Label_D797 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D797: + ora Zp00 ; CPU:$D797 PRG:1797 05 00 + sta ZpC0 ; CPU:$D799 PRG:1799 85 C0 + ldy #$04 ; CPU:$D79B PRG:179B A0 04 +; ----------------------------------------------------------------------------- +; Routine: SubCD79D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD79D: + jsr SubCD9E0 ; CPU:$D79D PRG:179D 20 E0 D9 + lda ZpB1 ; CPU:$D7A0 PRG:17A0 A5 B1 + and #$3F ; CPU:$D7A2 PRG:17A2 29 3F + ora #$80 ; CPU:$D7A4 PRG:17A4 09 80 + sta ZpB1 ; CPU:$D7A6 PRG:17A6 85 B1 + ldy #$00 ; CPU:$D7A8 PRG:17A8 A0 00 +; ----------------------------------------------------------------------------- +; Routine: SubCD7AA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD7AA: + lda (Zp06),y ; CPU:$D7AA PRG:17AA B1 06 + sta ZpBC ; CPU:$D7AC PRG:17AC 85 BC + iny ; CPU:$D7AE PRG:17AE C8 + lda (Zp06),y ; CPU:$D7AF PRG:17AF B1 06 + sta ZpBD ; CPU:$D7B1 PRG:17B1 85 BD + lda ZpC0 ; CPU:$D7B3 PRG:17B3 A5 C0 + and #$0F ; CPU:$D7B5 PRG:17B5 29 0F + cmp #$01 ; CPU:$D7B7 PRG:17B7 C9 01 + bne Label_D7C1 ; CPU:$D7B9 PRG:17B9 D0 06 + lda ZpFF ; CPU:$D7BB PRG:17BB A5 FF + ora #$10 ; CPU:$D7BD PRG:17BD 09 10 + sta ZpFF ; CPU:$D7BF PRG:17BF 85 FF +; ----------------------------------------------------------------------------- +; Routine: Label_D7C1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D7C1: + rts ; CPU:$D7C1 PRG:17C1 60 +; ----------------------------------------------------------------------------- +; Routine: SubCD7C2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD7C2: + jsr CheckBF_LowNibble ; CPU:$D7C2 PRG:17C2 20 0D D9 + cmp #$01 ; CPU:$D7C5 PRG:17C5 C9 01 + beq Label_D7CE ; CPU:$D7C7 PRG:17C7 F0 05 + cmp #$02 ; CPU:$D7C9 PRG:17C9 C9 02 + beq Label_D7E4 ; CPU:$D7CB PRG:17CB F0 17 + rts ; CPU:$D7CD PRG:17CD 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D7CE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D7CE: + jsr SubCC9CB ; CPU:$D7CE PRG:17CE 20 CB C9 + lda #$03 ; CPU:$D7D1 PRG:17D1 A9 03 + sta ZpC0 ; CPU:$D7D3 PRG:17D3 85 C0 + lda ZpB1 ; CPU:$D7D5 PRG:17D5 A5 B1 + and #$BF ; CPU:$D7D7 PRG:17D7 29 BF + sta ZpB1 ; CPU:$D7D9 PRG:17D9 85 B1 + ldy #$02 ; CPU:$D7DB PRG:17DB A0 02 + jmp SubCD7AA ; CPU:$D7DD PRG:17DD 4C AA D7 +; ----------------------------------------------------------------------------- +; Routine: Label_D7E0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D7E0: + lda #$00 ; CPU:$D7E0 PRG:17E0 A9 00 + sta ZpB3 ; CPU:$D7E2 PRG:17E2 85 B3 +; ----------------------------------------------------------------------------- +; Routine: Label_D7E4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D7E4: + jsr SubCD9EA ; CPU:$D7E4 PRG:17E4 20 EA D9 + lda #$00 ; CPU:$D7E7 PRG:17E7 A9 00 + sta ZpB3 ; CPU:$D7E9 PRG:17E9 85 B3 + lda ZpBF ; CPU:$D7EB PRG:17EB A5 BF + cmp #$20 ; CPU:$D7ED PRG:17ED C9 20 + bne Label_D7FE ; CPU:$D7EF PRG:17EF D0 0D + lda #$10 ; CPU:$D7F1 PRG:17F1 A9 10 + sta ZpB4 ; CPU:$D7F3 PRG:17F3 85 B4 + lda ZpC4 ; CPU:$D7F5 PRG:17F5 A5 C4 + beq Label_D7FE ; CPU:$D7F7 PRG:17F7 F0 05 + dec ZpC4 ; CPU:$D7F9 PRG:17F9 C6 C4 + jsr DispatchTableF393 ; CPU:$D7FB PRG:17FB 20 B9 CA +; ----------------------------------------------------------------------------- +; Routine: Label_D7FE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D7FE: + ldy #$06 ; CPU:$D7FE PRG:17FE A0 06 + jsr SubCD79D ; CPU:$D800 PRG:1800 20 9D D7 + lda ZpC0 ; CPU:$D803 PRG:1803 A5 C0 + ora #$0F ; CPU:$D805 PRG:1805 09 0F + ora Zp00 ; CPU:$D807 PRG:1807 05 00 + sta ZpC0 ; CPU:$D809 PRG:1809 85 C0 + jmp SubCD851 ; CPU:$D80B PRG:180B 4C 51 D8 +; ----------------------------------------------------------------------------- +; Routine: SubCD80E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD80E: + jsr CheckBF_LowNibble ; CPU:$D80E PRG:180E 20 0D D9 + cmp #$02 ; CPU:$D811 PRG:1811 C9 02 + beq Label_D7E0 ; CPU:$D813 PRG:1813 F0 CB + jsr CheckZpB3Return ; CPU:$D815 PRG:1815 20 EB CA + jsr PushTablePointerDispatch ; CPU:$D818 PRG:1818 20 A0 CC + cmp #$FF ; CPU:$D81B PRG:181B C9 FF + beq Label_D831 ; CPU:$D81D PRG:181D F0 12 + cmp #$00 ; CPU:$D81F PRG:181F C9 00 + bne Label_D829 ; CPU:$D821 PRG:1821 D0 06 + jsr SubCD9C5 ; CPU:$D823 PRG:1823 20 C5 D9 + jsr PushTablePointerDispatch ; CPU:$D826 PRG:1826 20 A0 CC +; ----------------------------------------------------------------------------- +; Routine: Label_D829 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D829: + sta ZpB6 ; CPU:$D829 PRG:1829 85 B6 + jsr PushTablePointerDispatch ; CPU:$D82B PRG:182B 20 A0 CC + sta ZpB3 ; CPU:$D82E PRG:182E 85 B3 + rts ; CPU:$D830 PRG:1830 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D831 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D831: + inc ZpC4 ; CPU:$D831 PRG:1831 E6 C4 + jsr DispatchTableF393 ; CPU:$D833 PRG:1833 20 B9 CA + lda #$00 ; CPU:$D836 PRG:1836 A9 00 + sta ZpB3 ; CPU:$D838 PRG:1838 85 B3 + sta ZpC0 ; CPU:$D83A PRG:183A 85 C0 + ldy #$06 ; CPU:$D83C PRG:183C A0 06 + jsr SubCD9E0 ; CPU:$D83E PRG:183E 20 E0 D9 + lda ZpBF ; CPU:$D841 PRG:1841 A5 BF + cmp #$30 ; CPU:$D843 PRG:1843 C9 30 + beq SubCD851 ; CPU:$D845 PRG:1845 F0 0A + cmp #$20 ; CPU:$D847 PRG:1847 C9 20 + bne Label_D84F ; CPU:$D849 PRG:1849 D0 04 + lda #$10 ; CPU:$D84B PRG:184B A9 10 + sta ZpB4 ; CPU:$D84D PRG:184D 85 B4 +; ----------------------------------------------------------------------------- +; Routine: Label_D84F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D84F: + inc ZpBB ; CPU:$D84F PRG:184F E6 BB +; ----------------------------------------------------------------------------- +; Routine: SubCD851 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD851: + jsr SubCD9B6 ; CPU:$D851 PRG:1851 20 B6 D9 + rts ; CPU:$D854 PRG:1854 60 +; ----------------------------------------------------------------------------- +; Routine: SubCD855 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD855: + jsr CheckBF_LowNibble ; CPU:$D855 PRG:1855 20 0D D9 + cmp #$01 ; CPU:$D858 PRG:1858 C9 01 + beq Label_D861 ; CPU:$D85A PRG:185A F0 05 + cmp #$02 ; CPU:$D85C PRG:185C C9 02 + beq Label_D871 ; CPU:$D85E PRG:185E F0 11 + rts ; CPU:$D860 PRG:1860 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D861 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D861: + jsr SubCC9CB ; CPU:$D861 PRG:1861 20 CB C9 + lda ZpB1 ; CPU:$D864 PRG:1864 A5 B1 + and #$FC ; CPU:$D866 PRG:1866 29 FC + ora ZpC1 ; CPU:$D868 PRG:1868 05 C1 + sta ZpB1 ; CPU:$D86A PRG:186A 85 B1 + lda #$00 ; CPU:$D86C PRG:186C A9 00 + sta ZpC0 ; CPU:$D86E PRG:186E 85 C0 + rts ; CPU:$D870 PRG:1870 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D871 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D871: + lda ZpB1 ; CPU:$D871 PRG:1871 A5 B1 + and #$BF ; CPU:$D873 PRG:1873 29 BF + sta ZpB1 ; CPU:$D875 PRG:1875 85 B1 +; ----------------------------------------------------------------------------- +; Routine: SubCD877 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD877: + jsr SubCEE82 ; CPU:$D877 PRG:1877 20 82 EE + lda #$01 ; CPU:$D87A PRG:187A A9 01 + ora Zp00 ; CPU:$D87C PRG:187C 05 00 + sta ZpC0 ; CPU:$D87E PRG:187E 85 C0 + ldy #$08 ; CPU:$D880 PRG:1880 A0 08 + jmp SubCD79D ; CPU:$D882 PRG:1882 4C 9D D7 +; ----------------------------------------------------------------------------- +; Routine: SubCD885 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD885: + jsr PushTablePointerDispatch ; CPU:$D885 PRG:1885 20 A0 CC + cmp #$EE ; CPU:$D888 PRG:1888 C9 EE + beq Label_D8C1 ; CPU:$D88A PRG:188A F0 35 + cmp #$DD ; CPU:$D88C PRG:188C C9 DD + beq Label_D8AF ; CPU:$D88E PRG:188E F0 1F + cmp #$CC ; CPU:$D890 PRG:1890 C9 CC + beq Label_D89E ; CPU:$D892 PRG:1892 F0 0A + ldy Zp51 ; CPU:$D894 PRG:1894 A4 51 + bne Label_D89D ; CPU:$D896 PRG:1896 D0 05 + clc ; CPU:$D898 PRG:1898 18 + adc ZpB8 ; CPU:$D899 PRG:1899 65 B8 + sta ZpB8 ; CPU:$D89B PRG:189B 85 B8 +; ----------------------------------------------------------------------------- +; Routine: Label_D89D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D89D: + rts ; CPU:$D89D PRG:189D 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D89E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D89E: + jsr PushTablePointerDispatch ; CPU:$D89E PRG:189E 20 A0 CC + sta ZpB5 ; CPU:$D8A1 PRG:18A1 85 B5 + cmp #$05 ; CPU:$D8A3 PRG:18A3 C9 05 + bne SubCD885 ; CPU:$D8A5 PRG:18A5 D0 DE + ldy #$04 ; CPU:$D8A7 PRG:18A7 A0 04 + jsr InitSpritesOffscreen ; CPU:$D8A9 PRG:18A9 20 C4 DF + jmp SubCD885 ; CPU:$D8AC PRG:18AC 4C 85 D8 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_D8AF: + jsr PushTablePointerDispatch ; CPU:$D8AF PRG:18AF 20 A0 CC + sta ZpB6 ; CPU:$D8B2 PRG:18B2 85 B6 + cmp #$4D ; CPU:$D8B4 PRG:18B4 C9 4D + bne Label_D8C0 ; CPU:$D8B6 PRG:18B6 D0 08 + lda Zp51 ; CPU:$D8B8 PRG:18B8 A5 51 + bne SubCD904 ; CPU:$D8BA PRG:18BA D0 48 + lda #$02 ; CPU:$D8BC PRG:18BC A9 02 + sta ZpB7 ; CPU:$D8BE PRG:18BE 85 B7 +; ----------------------------------------------------------------------------- +; Routine: Label_D8C0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D8C0: + rts ; CPU:$D8C0 PRG:18C0 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D8C1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D8C1: + lda $04B0 ; CPU:$D8C1 PRG:18C1 AD B0 04 + bne SubCD904 ; CPU:$D8C4 PRG:18C4 D0 3E + lda Zp51 ; CPU:$D8C6 PRG:18C6 A5 51 + bne SubCD904 ; CPU:$D8C8 PRG:18C8 D0 3A + lda ZpB8 ; CPU:$D8CA PRG:18CA A5 B8 + clc ; CPU:$D8CC PRG:18CC 18 + adc #$0B ; CPU:$D8CD PRG:18CD 69 0B + tax ; CPU:$D8CF PRG:18CF AA + ldy ZpB9 ; CPU:$D8D0 PRG:18D0 A4 B9 + lda ZpCC ; CPU:$D8D2 PRG:18D2 A5 CC + sta Zp11 ; CPU:$D8D4 PRG:18D4 85 11 + lda ZpBF ; CPU:$D8D6 PRG:18D6 A5 BF + cmp #$80 ; CPU:$D8D8 PRG:18D8 C9 80 + beq Label_D8E5 ; CPU:$D8DA PRG:18DA F0 09 + lda #$00 ; CPU:$D8DC PRG:18DC A9 00 + jsr SubCEEE3 ; CPU:$D8DE PRG:18DE 20 E3 EE + ldy #$08 ; CPU:$D8E1 PRG:18E1 A0 08 + bne Label_D8F1 ; CPU:$D8E3 PRG:18E3 D0 0C +; ----------------------------------------------------------------------------- +; Routine: Label_D8E5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D8E5: + lda #$05 ; CPU:$D8E5 PRG:18E5 A9 05 + jsr SubCEEE3 ; CPU:$D8E7 PRG:18E7 20 E3 EE + lda #$00 ; CPU:$D8EA PRG:18EA A9 00 + sta $04C1 ; CPU:$D8EC PRG:18EC 8D C1 04 + ldy #$05 ; CPU:$D8EF PRG:18EF A0 05 +; ----------------------------------------------------------------------------- +; Routine: Label_D8F1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D8F1: + sty Zp00 ; CPU:$D8F1 PRG:18F1 84 00 + ldx ZpCC ; CPU:$D8F3 PRG:18F3 A6 CC + lda #$01 ; CPU:$D8F5 PRG:18F5 A9 01 + sta Zp9D,x ; CPU:$D8F7 PRG:18F7 95 9D + txa ; CPU:$D8F9 PRG:18F9 8A + ora #$08 ; CPU:$D8FA PRG:18FA 09 08 + sta Zp01 ; CPU:$D8FC PRG:18FC 85 01 + jsr InitZerosIfZp30Zero ; CPU:$D8FE PRG:18FE 20 83 DE + jmp SubCECA2 ; CPU:$D901 PRG:1901 4C A2 EC +; ----------------------------------------------------------------------------- +; Routine: SubCD904 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD904: + lda #$00 ; CPU:$D904 PRG:1904 A9 00 + sta ZpB0 ; CPU:$D906 PRG:1906 85 B0 + ldy #$04 ; CPU:$D908 PRG:1908 A0 04 + jmp InitSpritesOffscreen ; CPU:$D90A PRG:190A 4C C4 DF +; ----------------------------------------------------------------------------- +; Routine: CheckBF_LowNibble +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +CheckBF_LowNibble: + lda ZpBF ; CPU:$D90D PRG:190D A5 BF + and #$0F ; CPU:$D90F PRG:190F 29 0F + bne Label_D91A ; CPU:$D911 PRG:1911 D0 07 + lda ZpC2 ; CPU:$D913 PRG:1913 A5 C2 + beq Label_D91A ; CPU:$D915 PRG:1915 F0 03 + lda #$00 ; CPU:$D917 PRG:1917 A9 00 + rts ; CPU:$D919 PRG:1919 60 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_D91A: + lda Zp71 ; CPU:$D91A PRG:191A A5 71 + bne Label_D988 ; CPU:$D91C PRG:191C D0 6A + lda ZpCD ; CPU:$D91E PRG:191E A5 CD + jsr CheckRangeReturn012 ; CPU:$D920 PRG:1920 20 A4 CA + cmp #$02 ; CPU:$D923 PRG:1923 C9 02 + beq Label_D928 ; CPU:$D925 PRG:1925 F0 01 +; ----------------------------------------------------------------------------- +; Routine: Label_D927 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D927: + rts ; CPU:$D927 PRG:1927 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D928 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D928: + ldx ZpBE ; CPU:$D928 PRG:1928 A6 BE + ldy ZpB9 ; CPU:$D92A PRG:192A A4 B9 + jsr SubCEC67 ; CPU:$D92C PRG:192C 20 67 EC + jsr SubCD990 ; CPU:$D92F PRG:192F 20 90 D9 +; ----------------------------------------------------------------------------- +; Routine: Label_D932 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D932: + lda Zp00 ; CPU:$D932 PRG:1932 A5 00 + cmp #$30 ; CPU:$D934 PRG:1934 C9 30 + beq Label_D968 ; CPU:$D936 PRG:1936 F0 30 + lsr a ; CPU:$D938 PRG:1938 4A + lsr a ; CPU:$D939 PRG:1939 4A + lsr a ; CPU:$D93A PRG:193A 4A + lsr a ; CPU:$D93B PRG:193B 4A +; ----------------------------------------------------------------------------- +; Routine: SubCD93C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD93C: + sta Zp1E ; CPU:$D93C PRG:193C 85 1E + lda ZpB1 ; CPU:$D93E PRG:193E A5 B1 + sta $05F8 ; CPU:$D940 PRG:1940 8D F8 05 + and #$FC ; CPU:$D943 PRG:1943 29 FC + ora Zp1E ; CPU:$D945 PRG:1945 05 1E + sta ZpB1 ; CPU:$D947 PRG:1947 85 B1 +; ----------------------------------------------------------------------------- +; Routine: Label_D949 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D949: + lda ZpBF ; CPU:$D949 PRG:1949 A5 BF + and #$F0 ; CPU:$D94B PRG:194B 29 F0 + beq Label_D965 ; CPU:$D94D PRG:194D F0 16 + ldy ZpC8 ; CPU:$D94F PRG:194F A4 C8 + beq Label_D965 ; CPU:$D951 PRG:1951 F0 12 + cmp #$30 ; CPU:$D953 PRG:1953 C9 30 + beq Label_D961 ; CPU:$D955 PRG:1955 F0 0A + ldy #$03 ; CPU:$D957 PRG:1957 A0 03 + cmp #$20 ; CPU:$D959 PRG:1959 C9 20 + beq Label_D95F ; CPU:$D95B PRG:195B F0 02 + ldy #$06 ; CPU:$D95D PRG:195D A0 06 +; ----------------------------------------------------------------------------- +; Routine: Label_D95F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D95F: + sty ZpB5 ; CPU:$D95F PRG:195F 84 B5 +; ----------------------------------------------------------------------------- +; Routine: Label_D961 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D961: + lda #$00 ; CPU:$D961 PRG:1961 A9 00 + sta ZpC8 ; CPU:$D963 PRG:1963 85 C8 +; ----------------------------------------------------------------------------- +; Routine: Label_D965 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D965: + lda #$02 ; CPU:$D965 PRG:1965 A9 02 + rts ; CPU:$D967 PRG:1967 60 +; ----------------------------------------------------------------------------- +; Routine: Label_D968 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D968: + lda ZpBF ; CPU:$D968 PRG:1968 A5 BF + and #$0F ; CPU:$D96A PRG:196A 29 0F + bne Label_D949 ; CPU:$D96C PRG:196C D0 DB + lda ZpB1 ; CPU:$D96E PRG:196E A5 B1 + and #$03 ; CPU:$D970 PRG:1970 29 03 + beq SubCD93C ; CPU:$D972 PRG:1972 F0 C8 + eor #$03 ; CPU:$D974 PRG:1974 49 03 + jmp SubCD93C ; CPU:$D976 PRG:1976 4C 3C D9 +; ----------------------------------------------------------------------------- +; Routine: SubCD979 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD979: + lda ZpCD ; CPU:$D979 PRG:1979 A5 CD + jsr CheckRangeReturn012 ; CPU:$D97B PRG:197B 20 A4 CA + cmp #$00 ; CPU:$D97E PRG:197E C9 00 + beq Label_D927 ; CPU:$D980 PRG:1980 F0 A5 + lda #$30 ; CPU:$D982 PRG:1982 A9 30 + sta Zp00 ; CPU:$D984 PRG:1984 85 00 + bne Label_D932 ; CPU:$D986 PRG:1986 D0 AA +; ----------------------------------------------------------------------------- +; Routine: Label_D988 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D988: + ldy Zp72 ; CPU:$D988 PRG:1988 A4 72 + dey ; CPU:$D98A PRG:198A 88 + sty Zp9F ; CPU:$D98B PRG:198B 84 9F + jmp SubCD979 ; CPU:$D98D PRG:198D 4C 79 D9 +; ----------------------------------------------------------------------------- +; Routine: SubCD990 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD990: + lda Zp32 ; CPU:$D990 PRG:1990 A5 32 + asl a ; CPU:$D992 PRG:1992 0A + sta Zp00 ; CPU:$D993 PRG:1993 85 00 + asl a ; CPU:$D995 PRG:1995 0A + asl a ; CPU:$D996 PRG:1996 0A + asl a ; CPU:$D997 PRG:1997 0A + clc ; CPU:$D998 PRG:1998 18 + adc Zp00 ; CPU:$D999 PRG:1999 65 00 + adc #$A0 ; CPU:$D99B PRG:199B 69 A0 +; ----------------------------------------------------------------------------- +; Routine: Label_D99D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D99D: + ldy #$03 ; CPU:$D99D PRG:199D A0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_D99F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D99F: + dey ; CPU:$D99F PRG:199F 88 + cmp ZpCD ; CPU:$D9A0 PRG:19A0 C5 CD + beq Label_D9AD ; CPU:$D9A2 PRG:19A2 F0 09 + clc ; CPU:$D9A4 PRG:19A4 18 + adc #$01 ; CPU:$D9A5 PRG:19A5 69 01 + cpy #$00 ; CPU:$D9A7 PRG:19A7 C0 00 + bne Label_D99F ; CPU:$D9A9 PRG:19A9 D0 F4 + beq Label_D99D ; CPU:$D9AB PRG:19AB F0 F0 +; ----------------------------------------------------------------------------- +; Routine: Label_D9AD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D9AD: + lda $D9B3,y ; CPU:$D9AD PRG:19AD B9 B3 D9 + sta Zp00 ; CPU:$D9B0 PRG:19B0 85 00 + rts ; CPU:$D9B2 PRG:19B2 60 +; ---- data $D9B3-$D9B5 (3 bytes) ---- +; referenced by `lda $D9B3,y` at $D9AD (operand $D9B3 falls inside this region) + .byte $10, $30, $20 ; CPU:$D9B3 PRG:19B3 10 30 20 +; ----------------------------------------------------------------------------- +; Routine: SubCD9B6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD9B6: + pha ; CPU:$D9B6 PRG:19B6 48 +; ----------------------------------------------------------------------------- +; Routine: SubCD9B7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD9B7: + ldy ZpBB ; CPU:$D9B7 PRG:19B7 A4 BB + lda $F638,y ; CPU:$D9B9 PRG:19B9 B9 38 F6 + cmp #$FF ; CPU:$D9BC PRG:19BC C9 FF + bne Label_D9D4 ; CPU:$D9BE PRG:19BE D0 14 + dec ZpBB ; CPU:$D9C0 PRG:19C0 C6 BB + jmp SubCD9B7 ; CPU:$D9C2 PRG:19C2 4C B7 D9 +; ----------------------------------------------------------------------------- +; Routine: SubCD9C5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD9C5: + pha ; CPU:$D9C5 PRG:19C5 48 + ldy ZpBB ; CPU:$D9C6 PRG:19C6 A4 BB + iny ; CPU:$D9C8 PRG:19C8 C8 +; ----------------------------------------------------------------------------- +; Routine: SubCD9C9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD9C9: + lda $F638,y ; CPU:$D9C9 PRG:19C9 B9 38 F6 + cmp #$FF ; CPU:$D9CC PRG:19CC C9 FF + bne Label_D9D4 ; CPU:$D9CE PRG:19CE D0 04 + dey ; CPU:$D9D0 PRG:19D0 88 + jmp SubCD9C9 ; CPU:$D9D1 PRG:19D1 4C C9 D9 +; ----------------------------------------------------------------------------- +; Routine: Label_D9D4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_D9D4: + sta Zp1E ; CPU:$D9D4 PRG:19D4 85 1E + lda ZpB7 ; CPU:$D9D6 PRG:19D6 A5 B7 + and #$E0 ; CPU:$D9D8 PRG:19D8 29 E0 + ora Zp1E ; CPU:$D9DA PRG:19DA 05 1E + sta ZpB7 ; CPU:$D9DC PRG:19DC 85 B7 + pla ; CPU:$D9DE PRG:19DE 68 + rts ; CPU:$D9DF PRG:19DF 60 +; ----------------------------------------------------------------------------- +; Routine: SubCD9E0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD9E0: + lda (Zp06),y ; CPU:$D9E0 PRG:19E0 B1 06 + sta ZpB6 ; CPU:$D9E2 PRG:19E2 85 B6 + iny ; CPU:$D9E4 PRG:19E4 C8 + lda (Zp06),y ; CPU:$D9E5 PRG:19E5 B1 06 + sta ZpB5 ; CPU:$D9E7 PRG:19E7 85 B5 + rts ; CPU:$D9E9 PRG:19E9 60 +; ----------------------------------------------------------------------------- +; Routine: SubCD9EA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD9EA: + lda ZpB1 ; CPU:$D9EA PRG:19EA A5 B1 + ldy #$40 ; CPU:$D9EC PRG:19EC A0 40 + lsr a ; CPU:$D9EE PRG:19EE 4A + bcs Label_D9F3 ; CPU:$D9EF PRG:19EF B0 02 + ldy #$00 ; CPU:$D9F1 PRG:19F1 A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_D9F3: + sty Zp1E ; CPU:$D9F3 PRG:19F3 84 1E + lda ZpB7 ; CPU:$D9F5 PRG:19F5 A5 B7 + and #$BF ; CPU:$D9F7 PRG:19F7 29 BF + ora Zp1E ; CPU:$D9F9 PRG:19F9 05 1E + sta ZpB7 ; CPU:$D9FB PRG:19FB 85 B7 + rts ; CPU:$D9FD PRG:19FD 60 +; ----------------------------------------------------------------------------- +; Routine: SubCD9FE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCD9FE: + ldy ZpB9 ; CPU:$D9FE PRG:19FE A4 B9 + lda ZpC2 ; CPU:$DA00 PRG:1A00 A5 C2 + bne Label_DA61 ; CPU:$DA02 PRG:1A02 D0 5D + lda ZpBE ; CPU:$DA04 PRG:1A04 A5 BE + beq Label_DA09 ; CPU:$DA06 PRG:1A06 F0 01 + rts ; CPU:$DA08 PRG:1A08 60 +; ----------------------------------------------------------------------------- +; Routine: Label_DA09 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DA09: + lda ZpBF ; CPU:$DA09 PRG:1A09 A5 BF + cmp #$30 ; CPU:$DA0B PRG:1A0B C9 30 + bne Label_DA32 ; CPU:$DA0D PRG:1A0D D0 23 + lda ZpB1 ; CPU:$DA0F PRG:1A0F A5 B1 + and #$C0 ; CPU:$DA11 PRG:1A11 29 C0 + bne Label_DA1E ; CPU:$DA13 PRG:1A13 D0 09 + lda ZpB1 ; CPU:$DA15 PRG:1A15 A5 B1 + lsr a ; CPU:$DA17 PRG:1A17 4A + bcs Label_DA1F ; CPU:$DA18 PRG:1A18 B0 05 + cpy #$40 ; CPU:$DA1A PRG:1A1A C0 40 + bcc Label_DA24 ; CPU:$DA1C PRG:1A1C 90 06 +; ----------------------------------------------------------------------------- +; Routine: Label_DA1E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DA1E: + rts ; CPU:$DA1E PRG:1A1E 60 +; ----------------------------------------------------------------------------- +; Routine: Label_DA1F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DA1F: + cpy #$C0 ; CPU:$DA1F PRG:1A1F C0 C0 + bcs Label_DA24 ; CPU:$DA21 PRG:1A21 B0 01 + rts ; CPU:$DA23 PRG:1A23 60 +; ----------------------------------------------------------------------------- +; Routine: Label_DA24 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DA24: + lda ZpB1 ; CPU:$DA24 PRG:1A24 A5 B1 + ora #$80 ; CPU:$DA26 PRG:1A26 09 80 + sta ZpB1 ; CPU:$DA28 PRG:1A28 85 B1 + lda #$4D ; CPU:$DA2A PRG:1A2A A9 4D + ldy #$F6 ; CPU:$DA2C PRG:1A2C A0 F6 + ldx #$03 ; CPU:$DA2E PRG:1A2E A2 03 + bne Label_DA46 ; CPU:$DA30 PRG:1A30 D0 14 +; ----------------------------------------------------------------------------- +; Routine: Label_DA32 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DA32: + lda ZpB1 ; CPU:$DA32 PRG:1A32 A5 B1 + lsr a ; CPU:$DA34 PRG:1A34 4A + bcs Label_DA3C ; CPU:$DA35 PRG:1A35 B0 05 + cpy #$28 ; CPU:$DA37 PRG:1A37 C0 28 + bcc Label_DA40 ; CPU:$DA39 PRG:1A39 90 05 +; ----------------------------------------------------------------------------- +; Routine: Label_DA3B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DA3B: + rts ; CPU:$DA3B PRG:1A3B 60 +; ----------------------------------------------------------------------------- +; Routine: Label_DA3C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DA3C: + cpy #$D8 ; CPU:$DA3C PRG:1A3C C0 D8 + bcc Label_DA3B ; CPU:$DA3E PRG:1A3E 90 FB +; ----------------------------------------------------------------------------- +; Routine: Label_DA40 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DA40: + lda #$43 ; CPU:$DA40 PRG:1A40 A9 43 + ldy #$F6 ; CPU:$DA42 PRG:1A42 A0 F6 + ldx #$02 ; CPU:$DA44 PRG:1A44 A2 02 +; ----------------------------------------------------------------------------- +; Routine: Label_DA46 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DA46: + sta ZpBC ; CPU:$DA46 PRG:1A46 85 BC + sty ZpBD ; CPU:$DA48 PRG:1A48 84 BD + lda ZpB1 ; CPU:$DA4A PRG:1A4A A5 B1 + and #$03 ; CPU:$DA4C PRG:1A4C 29 03 + sta ZpC2 ; CPU:$DA4E PRG:1A4E 85 C2 + lda ZpB7 ; CPU:$DA50 PRG:1A50 A5 B7 + ora #$20 ; CPU:$DA52 PRG:1A52 09 20 + sta ZpB7 ; CPU:$DA54 PRG:1A54 85 B7 + stx ZpB2 ; CPU:$DA56 PRG:1A56 86 B2 + lda #$01 ; CPU:$DA58 PRG:1A58 A9 01 + sta ZpC5 ; CPU:$DA5A PRG:1A5A 85 C5 + lda #$00 ; CPU:$DA5C PRG:1A5C A9 00 + sta ZpC7 ; CPU:$DA5E PRG:1A5E 85 C7 + rts ; CPU:$DA60 PRG:1A60 60 +; ----------------------------------------------------------------------------- +; Routine: Label_DA61 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DA61: + bpl Label_DAA5 ; CPU:$DA61 PRG:1A61 10 42 + lsr a ; CPU:$DA63 PRG:1A63 4A + bcc Label_DA75 ; CPU:$DA64 PRG:1A64 90 0F + cpy #$38 ; CPU:$DA66 PRG:1A66 C0 38 + bcs Label_DA6D ; CPU:$DA68 PRG:1A68 B0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_DA6A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DA6A: + jmp SubCDB1E ; CPU:$DA6A PRG:1A6A 4C 1E DB +; ----------------------------------------------------------------------------- +; Routine: Label_DA6D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DA6D: + lda #$00 ; CPU:$DA6D PRG:1A6D A9 00 + sta $05FB ; CPU:$DA6F PRG:1A6F 8D FB 05 + jmp SubCDA7E ; CPU:$DA72 PRG:1A72 4C 7E DA +; ----------------------------------------------------------------------------- +; Routine: Label_DA75 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DA75: + cpy #$C8 ; CPU:$DA75 PRG:1A75 C0 C8 + bcs Label_DA6A ; CPU:$DA77 PRG:1A77 B0 F1 + lda #$00 ; CPU:$DA79 PRG:1A79 A9 00 + sta $05FC ; CPU:$DA7B PRG:1A7B 8D FC 05 +; ----------------------------------------------------------------------------- +; Routine: SubCDA7E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDA7E: + jsr SubCDB34 ; CPU:$DA7E PRG:1A7E 20 34 DB + jsr DispatchTableF393 ; CPU:$DA81 PRG:1A81 20 B9 CA + lda ZpB7 ; CPU:$DA84 PRG:1A84 A5 B7 + and #$DF ; CPU:$DA86 PRG:1A86 29 DF + sta ZpB7 ; CPU:$DA88 PRG:1A88 85 B7 + lda #$00 ; CPU:$DA8A PRG:1A8A A9 00 + sta ZpC2 ; CPU:$DA8C PRG:1A8C 85 C2 + lda ZpBF ; CPU:$DA8E PRG:1A8E A5 BF + cmp #$30 ; CPU:$DA90 PRG:1A90 C9 30 + bne Label_DAC0 ; CPU:$DA92 PRG:1A92 D0 2C + lda #$7B ; CPU:$DA94 PRG:1A94 A9 7B + ldy #$F3 ; CPU:$DA96 PRG:1A96 A0 F3 + sta ZpBC ; CPU:$DA98 PRG:1A98 85 BC + sty ZpBD ; CPU:$DA9A PRG:1A9A 84 BD + lda ZpB1 ; CPU:$DA9C PRG:1A9C A5 B1 + and #$3F ; CPU:$DA9E PRG:1A9E 29 3F + ora #$40 ; CPU:$DAA0 PRG:1AA0 09 40 + sta ZpB1 ; CPU:$DAA2 PRG:1AA2 85 B1 + rts ; CPU:$DAA4 PRG:1AA4 60 +; ----------------------------------------------------------------------------- +; Routine: Label_DAA5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DAA5: + jsr SubCDB1E ; CPU:$DAA5 PRG:1AA5 20 1E DB + jsr PushTablePointerDispatch ; CPU:$DAA8 PRG:1AA8 20 A0 CC + cmp #$AA ; CPU:$DAAB PRG:1AAB C9 AA + beq Label_DAC1 ; CPU:$DAAD PRG:1AAD F0 12 + tay ; CPU:$DAAF PRG:1AAF A8 + lda ZpBF ; CPU:$DAB0 PRG:1AB0 A5 BF + cmp #$30 ; CPU:$DAB2 PRG:1AB2 C9 30 + bne Label_DABA ; CPU:$DAB4 PRG:1AB4 D0 04 + lda ZpB3 ; CPU:$DAB6 PRG:1AB6 A5 B3 + bne Label_DAC0 ; CPU:$DAB8 PRG:1AB8 D0 06 +; ----------------------------------------------------------------------------- +; Routine: Label_DABA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DABA: + tya ; CPU:$DABA PRG:1ABA 98 + clc ; CPU:$DABB PRG:1ABB 18 + adc ZpB8 ; CPU:$DABC PRG:1ABC 65 B8 + sta ZpB8 ; CPU:$DABE PRG:1ABE 85 B8 +; ----------------------------------------------------------------------------- +; Routine: Label_DAC0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DAC0: + rts ; CPU:$DAC0 PRG:1AC0 60 +; ----------------------------------------------------------------------------- +; Routine: Label_DAC1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DAC1: + ldy ZpB9 ; CPU:$DAC1 PRG:1AC1 A4 B9 + lda ZpC2 ; CPU:$DAC3 PRG:1AC3 A5 C2 + lsr a ; CPU:$DAC5 PRG:1AC5 4A + bcs Label_DAE3 ; CPU:$DAC6 PRG:1AC6 B0 1B + cpy #$18 ; CPU:$DAC8 PRG:1AC8 C0 18 + bcs Label_DAC0 ; CPU:$DACA PRG:1ACA B0 F4 + lda #$10 ; CPU:$DACC PRG:1ACC A9 10 + sta ZpB9 ; CPU:$DACE PRG:1ACE 85 B9 + lda $05FB ; CPU:$DAD0 PRG:1AD0 AD FB 05 + bne Label_DB19 ; CPU:$DAD3 PRG:1AD3 D0 44 + jsr SubCDFD3 ; CPU:$DAD5 PRG:1AD5 20 D3 DF + lda #$01 ; CPU:$DAD8 PRG:1AD8 A9 01 + sta $05FB ; CPU:$DADA PRG:1ADA 8D FB 05 + lda #$28 ; CPU:$DADD PRG:1ADD A9 28 + ldy #$01 ; CPU:$DADF PRG:1ADF A0 01 + bne Label_DAFC ; CPU:$DAE1 PRG:1AE1 D0 19 +; ----------------------------------------------------------------------------- +; Routine: Label_DAE3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DAE3: + cpy #$E8 ; CPU:$DAE3 PRG:1AE3 C0 E8 + bcc Label_DAC0 ; CPU:$DAE5 PRG:1AE5 90 D9 + lda #$F0 ; CPU:$DAE7 PRG:1AE7 A9 F0 + sta ZpB9 ; CPU:$DAE9 PRG:1AE9 85 B9 + lda $05FC ; CPU:$DAEB PRG:1AEB AD FC 05 + bne Label_DB19 ; CPU:$DAEE PRG:1AEE D0 29 + jsr SubCDFD3 ; CPU:$DAF0 PRG:1AF0 20 D3 DF + lda #$01 ; CPU:$DAF3 PRG:1AF3 A9 01 + sta $05FC ; CPU:$DAF5 PRG:1AF5 8D FC 05 + lda #$D8 ; CPU:$DAF8 PRG:1AF8 A9 D8 + ldy #$02 ; CPU:$DAFA PRG:1AFA A0 02 +; ----------------------------------------------------------------------------- +; Routine: Label_DAFC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DAFC: + sta ZpB9 ; CPU:$DAFC PRG:1AFC 85 B9 + sty ZpB1 ; CPU:$DAFE PRG:1AFE 84 B1 + lda #$2C ; CPU:$DB00 PRG:1B00 A9 2C + sta ZpB8 ; CPU:$DB02 PRG:1B02 85 B8 + tya ; CPU:$DB04 PRG:1B04 98 + ora #$80 ; CPU:$DB05 PRG:1B05 09 80 + sta ZpC2 ; CPU:$DB07 PRG:1B07 85 C2 + lda #$03 ; CPU:$DB09 PRG:1B09 A9 03 + sta ZpB2 ; CPU:$DB0B PRG:1B0B 85 B2 + lda ZpBF ; CPU:$DB0D PRG:1B0D A5 BF + cmp #$30 ; CPU:$DB0F PRG:1B0F C9 30 + bne Label_DB18 ; CPU:$DB11 PRG:1B11 D0 05 + tya ; CPU:$DB13 PRG:1B13 98 + ora #$80 ; CPU:$DB14 PRG:1B14 09 80 + sta ZpB1 ; CPU:$DB16 PRG:1B16 85 B1 +; ----------------------------------------------------------------------------- +; Routine: Label_DB18 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DB18: + rts ; CPU:$DB18 PRG:1B18 60 +; ----------------------------------------------------------------------------- +; Routine: Label_DB19 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DB19: + lda #$F4 ; CPU:$DB19 PRG:1B19 A9 F4 + sta ZpB8 ; CPU:$DB1B PRG:1B1B 85 B8 + rts ; CPU:$DB1D PRG:1B1D 60 +; ----------------------------------------------------------------------------- +; Routine: SubCDB1E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDB1E: + pha ; CPU:$DB1E PRG:1B1E 48 + lda Zp71 ; CPU:$DB1F PRG:1B1F A5 71 + beq Label_DB2B ; CPU:$DB21 PRG:1B21 F0 08 + lda $05F9 ; CPU:$DB23 PRG:1B23 AD F9 05 + clc ; CPU:$DB26 PRG:1B26 18 + adc ZpB8 ; CPU:$DB27 PRG:1B27 65 B8 + sta ZpB8 ; CPU:$DB29 PRG:1B29 85 B8 +; ----------------------------------------------------------------------------- +; Routine: Label_DB2B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DB2B: + pla ; CPU:$DB2B PRG:1B2B 68 + rts ; CPU:$DB2C PRG:1B2C 60 +; ----------------------------------------------------------------------------- +; Routine: SubCDB2D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDB2D: + lda ZpC6 ; CPU:$DB2D PRG:1B2D A5 C6 + beq Label_DB33 ; CPU:$DB2F PRG:1B2F F0 02 + dec ZpC6 ; CPU:$DB31 PRG:1B31 C6 C6 +; ----------------------------------------------------------------------------- +; Routine: Label_DB33 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DB33: + rts ; CPU:$DB33 PRG:1B33 60 +; ----------------------------------------------------------------------------- +; Routine: SubCDB34 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDB34: + lda ZpBF ; CPU:$DB34 PRG:1B34 A5 BF + ldx #$10 ; CPU:$DB36 PRG:1B36 A2 10 + cmp #$10 ; CPU:$DB38 PRG:1B38 C9 10 + beq Label_DB4A ; CPU:$DB3A PRG:1B3A F0 0E + ldx #$20 ; CPU:$DB3C PRG:1B3C A2 20 + cmp #$20 ; CPU:$DB3E PRG:1B3E C9 20 + beq Label_DB4A ; CPU:$DB40 PRG:1B40 F0 08 + ldx #$40 ; CPU:$DB42 PRG:1B42 A2 40 + cmp #$30 ; CPU:$DB44 PRG:1B44 C9 30 + beq Label_DB4A ; CPU:$DB46 PRG:1B46 F0 02 + ldx #$08 ; CPU:$DB48 PRG:1B48 A2 08 +; ----------------------------------------------------------------------------- +; Routine: Label_DB4A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DB4A: + stx Zp1E ; CPU:$DB4A PRG:1B4A 86 1E + lda ZpFE ; CPU:$DB4C PRG:1B4C A5 FE + ora Zp1E ; CPU:$DB4E PRG:1B4E 05 1E + sta ZpFE ; CPU:$DB50 PRG:1B50 85 FE + rts ; CPU:$DB52 PRG:1B52 60 +; ----------------------------------------------------------------------------- +; Routine: SubCDB53 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDB53: + ldy Zp33 ; CPU:$DB53 PRG:1B53 A4 33 + dey ; CPU:$DB55 PRG:1B55 88 + beq Label_DB33 ; CPU:$DB56 PRG:1B56 F0 DB + sty Zp11 ; CPU:$DB58 PRG:1B58 84 11 + lda Zp2F ; CPU:$DB5A PRG:1B5A A5 2F + and #$01 ; CPU:$DB5C PRG:1B5C 29 01 + bne Label_DB6B ; CPU:$DB5E PRG:1B5E D0 0B + cpy #$03 ; CPU:$DB60 PRG:1B60 C0 03 + beq Label_DB6A ; CPU:$DB62 PRG:1B62 F0 06 + cpy #$04 ; CPU:$DB64 PRG:1B64 C0 04 + beq Label_DB6A ; CPU:$DB66 PRG:1B66 F0 02 + bne Label_DB73 ; CPU:$DB68 PRG:1B68 D0 09 +; ----------------------------------------------------------------------------- +; Routine: Label_DB6A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DB6A: + rts ; CPU:$DB6A PRG:1B6A 60 +; ----------------------------------------------------------------------------- +; Routine: Label_DB6B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DB6B: + cpy #$03 ; CPU:$DB6B PRG:1B6B C0 03 + beq Label_DB73 ; CPU:$DB6D PRG:1B6D F0 04 + cpy #$04 ; CPU:$DB6F PRG:1B6F C0 04 + bne Label_DB6A ; CPU:$DB71 PRG:1B71 D0 F7 +; ----------------------------------------------------------------------------- +; Routine: Label_DB73 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DB73: + lda ZpA0 ; CPU:$DB73 PRG:1B73 A5 A0 + sta Zp14 ; CPU:$DB75 PRG:1B75 85 14 + lda ZpA1 ; CPU:$DB77 PRG:1B77 A5 A1 + sta Zp15 ; CPU:$DB79 PRG:1B79 85 15 + lda ZpA2 ; CPU:$DB7B PRG:1B7B A5 A2 + clc ; CPU:$DB7D PRG:1B7D 18 + adc #$20 ; CPU:$DB7E PRG:1B7E 69 20 + sta Zp12 ; CPU:$DB80 PRG:1B80 85 12 + lda #$00 ; CPU:$DB82 PRG:1B82 A9 00 + sta Zp13 ; CPU:$DB84 PRG:1B84 85 13 + jsr AdvanceDispatchPointer ; CPU:$DB86 PRG:1B86 20 B4 CD + ldy #$05 ; CPU:$DB89 PRG:1B89 A0 05 + ldx #$07 ; CPU:$DB8B PRG:1B8B A2 07 + jsr SubCC44A ; CPU:$DB8D PRG:1B8D 20 4A C4 + and #$0F ; CPU:$DB90 PRG:1B90 29 0F + beq Label_DB6A ; CPU:$DB92 PRG:1B92 F0 D6 + sta Zp1F ; CPU:$DB94 PRG:1B94 85 1F + eor #$03 ; CPU:$DB96 PRG:1B96 49 03 + sta Zp1E ; CPU:$DB98 PRG:1B98 85 1E + lda ZpC0 ; CPU:$DB9A PRG:1B9A A5 C0 + ora ZpC2 ; CPU:$DB9C PRG:1B9C 05 C2 + ora ZpC8 ; CPU:$DB9E PRG:1B9E 05 C8 + bne Label_DBC6 ; CPU:$DBA0 PRG:1BA0 D0 24 + lda ZpBF ; CPU:$DBA2 PRG:1BA2 A5 BF + cmp #$80 ; CPU:$DBA4 PRG:1BA4 C9 80 + bne Label_DBAC ; CPU:$DBA6 PRG:1BA6 D0 04 + lda ZpC1 ; CPU:$DBA8 PRG:1BA8 A5 C1 + bne Label_DBC6 ; CPU:$DBAA PRG:1BAA D0 1A +; ----------------------------------------------------------------------------- +; Routine: Label_DBAC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DBAC: + ldy #$19 ; CPU:$DBAC PRG:1BAC A0 19 + lda (Zp14),y ; CPU:$DBAE PRG:1BAE B1 14 + bne Label_DBFE ; CPU:$DBB0 PRG:1BB0 D0 4C + lda ZpB1 ; CPU:$DBB2 PRG:1BB2 A5 B1 + and #$03 ; CPU:$DBB4 PRG:1BB4 29 03 + cmp Zp1E ; CPU:$DBB6 PRG:1BB6 C5 1E + beq Label_DBC6 ; CPU:$DBB8 PRG:1BB8 F0 0C + lda ZpB1 ; CPU:$DBBA PRG:1BBA A5 B1 + and #$FC ; CPU:$DBBC PRG:1BBC 29 FC + ora Zp1E ; CPU:$DBBE PRG:1BBE 05 1E + sta ZpB1 ; CPU:$DBC0 PRG:1BC0 85 B1 + lda #$01 ; CPU:$DBC2 PRG:1BC2 A9 01 + sta ZpC8 ; CPU:$DBC4 PRG:1BC4 85 C8 +; ----------------------------------------------------------------------------- +; Routine: Label_DBC6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DBC6: + ldy #$10 ; CPU:$DBC6 PRG:1BC6 A0 10 + lda (Zp14),y ; CPU:$DBC8 PRG:1BC8 B1 14 + ldy #$12 ; CPU:$DBCA PRG:1BCA A0 12 + ora (Zp14),y ; CPU:$DBCC PRG:1BCC 11 14 + ldy #$18 ; CPU:$DBCE PRG:1BCE A0 18 + ora (Zp14),y ; CPU:$DBD0 PRG:1BD0 11 14 + bne Label_DBFE ; CPU:$DBD2 PRG:1BD2 D0 2A + ldy #$0F ; CPU:$DBD4 PRG:1BD4 A0 0F + lda (Zp14),y ; CPU:$DBD6 PRG:1BD6 B1 14 + cmp #$80 ; CPU:$DBD8 PRG:1BD8 C9 80 + bne Label_DBE2 ; CPU:$DBDA PRG:1BDA D0 06 + ldy #$11 ; CPU:$DBDC PRG:1BDC A0 11 + lda (Zp14),y ; CPU:$DBDE PRG:1BDE B1 14 + bne Label_DBFE ; CPU:$DBE0 PRG:1BE0 D0 1C +; ----------------------------------------------------------------------------- +; Routine: Label_DBE2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DBE2: + lda ZpC9 ; CPU:$DBE2 PRG:1BE2 A5 C9 + bne Label_DBFE ; CPU:$DBE4 PRG:1BE4 D0 18 + ldy #$01 ; CPU:$DBE6 PRG:1BE6 A0 01 + lda (Zp14),y ; CPU:$DBE8 PRG:1BE8 B1 14 + and #$03 ; CPU:$DBEA PRG:1BEA 29 03 + cmp Zp1F ; CPU:$DBEC PRG:1BEC C5 1F + beq Label_DBFE ; CPU:$DBEE PRG:1BEE F0 0E + lda (Zp14),y ; CPU:$DBF0 PRG:1BF0 B1 14 + and #$FC ; CPU:$DBF2 PRG:1BF2 29 FC + ora Zp1F ; CPU:$DBF4 PRG:1BF4 05 1F + sta (Zp14),y ; CPU:$DBF6 PRG:1BF6 91 14 + ldy #$18 ; CPU:$DBF8 PRG:1BF8 A0 18 + lda #$01 ; CPU:$DBFA PRG:1BFA A9 01 + sta (Zp14),y ; CPU:$DBFC PRG:1BFC 91 14 +; ----------------------------------------------------------------------------- +; Routine: Label_DBFE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DBFE: + rts ; CPU:$DBFE PRG:1BFE 60 +; ----------------------------------------------------------------------------- +; Routine: SubCDBFF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDBFF: + lda ZpB3 ; CPU:$DBFF PRG:1BFF A5 B3 + bne Label_DBFE ; CPU:$DC01 PRG:1C01 D0 FB + ldx ZpC8 ; CPU:$DC03 PRG:1C03 A6 C8 + beq Label_DBFE ; CPU:$DC05 PRG:1C05 F0 F7 + lda ZpB1 ; CPU:$DC07 PRG:1C07 A5 B1 + and #$C0 ; CPU:$DC09 PRG:1C09 29 C0 + bne Label_DBFE ; CPU:$DC0B PRG:1C0B D0 F1 + lda ZpBF ; CPU:$DC0D PRG:1C0D A5 BF + cmp #$30 ; CPU:$DC0F PRG:1C0F C9 30 + beq Label_DC55 ; CPU:$DC11 PRG:1C11 F0 42 + ldy #$09 ; CPU:$DC13 PRG:1C13 A0 09 + cmp #$20 ; CPU:$DC15 PRG:1C15 C9 20 + beq Label_DC1F ; CPU:$DC17 PRG:1C17 F0 06 + ldy #$00 ; CPU:$DC19 PRG:1C19 A0 00 + cmp #$10 ; CPU:$DC1B PRG:1C1B C9 10 + bne Label_DC50 ; CPU:$DC1D PRG:1C1D D0 31 +; ----------------------------------------------------------------------------- +; Routine: Label_DC1F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DC1F: + dex ; CPU:$DC1F PRG:1C1F CA + txa ; CPU:$DC20 PRG:1C20 8A + sty Zp1E ; CPU:$DC21 PRG:1C21 84 1E + clc ; CPU:$DC23 PRG:1C23 18 + adc Zp1E ; CPU:$DC24 PRG:1C24 65 1E + tay ; CPU:$DC26 PRG:1C26 A8 + lda $F626,y ; CPU:$DC27 PRG:1C27 B9 26 F6 + cmp #$01 ; CPU:$DC2A PRG:1C2A C9 01 + beq Label_DC3B ; CPU:$DC2C PRG:1C2C F0 0D + cmp #$FF ; CPU:$DC2E PRG:1C2E C9 FF + beq Label_DC44 ; CPU:$DC30 PRG:1C30 F0 12 + sta ZpB6 ; CPU:$DC32 PRG:1C32 85 B6 + lda #$05 ; CPU:$DC34 PRG:1C34 A9 05 + sta ZpB5 ; CPU:$DC36 PRG:1C36 85 B5 +; ----------------------------------------------------------------------------- +; Routine: SubCDC38 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDC38: + inc ZpC8 ; CPU:$DC38 PRG:1C38 E6 C8 + rts ; CPU:$DC3A PRG:1C3A 60 +; ----------------------------------------------------------------------------- +; Routine: Label_DC3B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DC3B: + lda ZpB7 ; CPU:$DC3B PRG:1C3B A5 B7 + eor #$40 ; CPU:$DC3D PRG:1C3D 49 40 + sta ZpB7 ; CPU:$DC3F PRG:1C3F 85 B7 + jmp SubCDC38 ; CPU:$DC41 PRG:1C41 4C 38 DC +; ----------------------------------------------------------------------------- +; Routine: Label_DC44 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DC44: + lda ZpBF ; CPU:$DC44 PRG:1C44 A5 BF + ldy #$03 ; CPU:$DC46 PRG:1C46 A0 03 + cmp #$20 ; CPU:$DC48 PRG:1C48 C9 20 + beq Label_DC4E ; CPU:$DC4A PRG:1C4A F0 02 + ldy #$06 ; CPU:$DC4C PRG:1C4C A0 06 +; ----------------------------------------------------------------------------- +; Routine: Label_DC4E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DC4E: + sty ZpB5 ; CPU:$DC4E PRG:1C4E 84 B5 +; ----------------------------------------------------------------------------- +; Routine: Label_DC50 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DC50: + lda #$00 ; CPU:$DC50 PRG:1C50 A9 00 + sta ZpC8 ; CPU:$DC52 PRG:1C52 85 C8 + rts ; CPU:$DC54 PRG:1C54 60 +; ----------------------------------------------------------------------------- +; Routine: Label_DC55 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DC55: + cpx #$01 ; CPU:$DC55 PRG:1C55 E0 01 + bne Label_DC6E ; CPU:$DC57 PRG:1C57 D0 15 + lda #$7B ; CPU:$DC59 PRG:1C59 A9 7B + sta ZpBC ; CPU:$DC5B PRG:1C5B 85 BC + lda #$F3 ; CPU:$DC5D PRG:1C5D A9 F3 + sta ZpBD ; CPU:$DC5F PRG:1C5F 85 BD + lda ZpB1 ; CPU:$DC61 PRG:1C61 A5 B1 + and #$3F ; CPU:$DC63 PRG:1C63 29 3F + ora #$40 ; CPU:$DC65 PRG:1C65 09 40 + sta ZpB1 ; CPU:$DC67 PRG:1C67 85 B1 + lda #$02 ; CPU:$DC69 PRG:1C69 A9 02 + sta ZpC8 ; CPU:$DC6B PRG:1C6B 85 C8 + rts ; CPU:$DC6D PRG:1C6D 60 +; ----------------------------------------------------------------------------- +; Routine: Label_DC6E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DC6E: + lda ZpB1 ; CPU:$DC6E PRG:1C6E A5 B1 + and #$C0 ; CPU:$DC70 PRG:1C70 29 C0 + beq Label_DC50 ; CPU:$DC72 PRG:1C72 F0 DC + rts ; CPU:$DC74 PRG:1C74 60 +; ----------------------------------------------------------------------------- +; Routine: SubCDC75 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDC75: + lda #$40 ; CPU:$DC75 PRG:1C75 A9 40 + sta Zp14 ; CPU:$DC77 PRG:1C77 85 14 + lda #$03 ; CPU:$DC79 PRG:1C79 A9 03 + sta Zp15 ; CPU:$DC7B PRG:1C7B 85 15 + ldy #$08 ; CPU:$DC7D PRG:1C7D A0 08 + lda $04B0 ; CPU:$DC7F PRG:1C7F AD B0 04 + beq Label_DC86 ; CPU:$DC82 PRG:1C82 F0 02 + ldy #$0A ; CPU:$DC84 PRG:1C84 A0 0A +; ----------------------------------------------------------------------------- +; Routine: Label_DC86 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DC86: + sty Zp11 ; CPU:$DC86 PRG:1C86 84 11 + jsr SubCC446 ; CPU:$DC88 PRG:1C88 20 46 C4 + sta Zp1E ; CPU:$DC8B PRG:1C8B 85 1E + ora #$00 ; CPU:$DC8D PRG:1C8D 09 00 + bne Label_DC92 ; CPU:$DC8F PRG:1C8F D0 01 +; ----------------------------------------------------------------------------- +; Routine: Label_DC91 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DC91: + rts ; CPU:$DC91 PRG:1C91 60 +; ----------------------------------------------------------------------------- +; Routine: Label_DC92 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DC92: + lda ZpC6 ; CPU:$DC92 PRG:1C92 A5 C6 + bne Label_DC91 ; CPU:$DC94 PRG:1C94 D0 FB + ldy #$12 ; CPU:$DC96 PRG:1C96 A0 12 + lda (Zp14),y ; CPU:$DC98 PRG:1C98 B1 14 + bne Label_DC91 ; CPU:$DC9A PRG:1C9A D0 F5 + ldy #$19 ; CPU:$DC9C PRG:1C9C A0 19 + lda (Zp14),y ; CPU:$DC9E PRG:1C9E B1 14 + bne Label_DC91 ; CPU:$DCA0 PRG:1CA0 D0 EF + ldy #$0F ; CPU:$DCA2 PRG:1CA2 A0 0F + lda (Zp14),y ; CPU:$DCA4 PRG:1CA4 B1 14 + cmp #$F0 ; CPU:$DCA6 PRG:1CA6 C9 F0 + beq Label_DCB9 ; CPU:$DCA8 PRG:1CA8 F0 0F + cmp #$A0 ; CPU:$DCAA PRG:1CAA C9 A0 + beq Label_DCBC ; CPU:$DCAC PRG:1CAC F0 0E + cmp #$B0 ; CPU:$DCAE PRG:1CAE C9 B0 + beq Label_DCBF ; CPU:$DCB0 PRG:1CB0 F0 0D + cmp #$40 ; CPU:$DCB2 PRG:1CB2 C9 40 + bne Label_DCC2 ; CPU:$DCB4 PRG:1CB4 D0 0C + jmp SubCDDC7 ; CPU:$DCB6 PRG:1CB6 4C C7 DD +; ----------------------------------------------------------------------------- +; Routine: Label_DCB9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DCB9: + jmp SubCE29A ; CPU:$DCB9 PRG:1CB9 4C 9A E2 +; ----------------------------------------------------------------------------- +; Routine: Label_DCBC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DCBC: + jmp SubCE9B8 ; CPU:$DCBC PRG:1CBC 4C B8 E9 +; ----------------------------------------------------------------------------- +; Routine: Label_DCBF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DCBF: + jmp SubCE9B8 ; CPU:$DCBF PRG:1CBF 4C B8 E9 +; ----------------------------------------------------------------------------- +; Routine: Label_DCC2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DCC2: + ldy #$10 ; CPU:$DCC2 PRG:1CC2 A0 10 + lda (Zp14),y ; CPU:$DCC4 PRG:1CC4 B1 14 + and #$0F ; CPU:$DCC6 PRG:1CC6 29 0F + beq SubCDCCE ; CPU:$DCC8 PRG:1CC8 F0 04 + cmp #$04 ; CPU:$DCCA PRG:1CCA C9 04 + bcc Label_DD2C ; CPU:$DCCC PRG:1CCC 90 5E +; ----------------------------------------------------------------------------- +; Routine: SubCDCCE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDCCE: + lda #$00 ; CPU:$DCCE PRG:1CCE A9 00 + sta $05FF ; CPU:$DCD0 PRG:1CD0 8D FF 05 + ldy ZpBF ; CPU:$DCD3 PRG:1CD3 A4 BF + ldx #$00 ; CPU:$DCD5 PRG:1CD5 A2 00 + dey ; CPU:$DCD7 PRG:1CD7 88 + beq Label_DCDC ; CPU:$DCD8 PRG:1CD8 F0 02 + ldx #$04 ; CPU:$DCDA PRG:1CDA A2 04 +; ----------------------------------------------------------------------------- +; Routine: Label_DCDC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DCDC: + lda Zp48,x ; CPU:$DCDC PRG:1CDC B5 48 + beq Label_DCE5 ; CPU:$DCDE PRG:1CDE F0 05 + dec Zp48,x ; CPU:$DCE0 PRG:1CE0 D6 48 + jmp SubCDCEA ; CPU:$DCE2 PRG:1CE2 4C EA DC +; ----------------------------------------------------------------------------- +; Routine: Label_DCE5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DCE5: + inx ; CPU:$DCE5 PRG:1CE5 E8 + lda #$01 ; CPU:$DCE6 PRG:1CE6 A9 01 + sta Zp48,x ; CPU:$DCE8 PRG:1CE8 95 48 +; ----------------------------------------------------------------------------- +; Routine: SubCDCEA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDCEA: + lda #$10 ; CPU:$DCEA PRG:1CEA A9 10 + sta ZpC6 ; CPU:$DCEC PRG:1CEC 85 C6 + lda #$40 ; CPU:$DCEE PRG:1CEE A9 40 + sta ZpB3 ; CPU:$DCF0 PRG:1CF0 85 B3 + lda #$32 ; CPU:$DCF2 PRG:1CF2 A9 32 + sta ZpB6 ; CPU:$DCF4 PRG:1CF4 85 B6 + lda #$00 ; CPU:$DCF6 PRG:1CF6 A9 00 + sta ZpB5 ; CPU:$DCF8 PRG:1CF8 85 B5 + lda #$A9 ; CPU:$DCFA PRG:1CFA A9 A9 + ldy #$F6 ; CPU:$DCFC PRG:1CFC A0 F6 + sta ZpBC ; CPU:$DCFE PRG:1CFE 85 BC + sty ZpBD ; CPU:$DD00 PRG:1D00 84 BD + lda ZpFF ; CPU:$DD02 PRG:1D02 A5 FF + ora #$01 ; CPU:$DD04 PRG:1D04 09 01 + sta ZpFF ; CPU:$DD06 PRG:1D06 85 FF + lda Zp1E ; CPU:$DD08 PRG:1D08 A5 1E + ldy #$00 ; CPU:$DD0A PRG:1D0A A0 00 + lsr a ; CPU:$DD0C PRG:1D0C 4A + bcs Label_DD11 ; CPU:$DD0D PRG:1D0D B0 02 + ldy #$40 ; CPU:$DD0F PRG:1D0F A0 40 +; ----------------------------------------------------------------------------- +; Routine: Label_DD11 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DD11: + sty Zp1E ; CPU:$DD11 PRG:1D11 84 1E + ldy #$07 ; CPU:$DD13 PRG:1D13 A0 07 + lda (Zp14),y ; CPU:$DD15 PRG:1D15 B1 14 + and #$BF ; CPU:$DD17 PRG:1D17 29 BF + ora Zp1E ; CPU:$DD19 PRG:1D19 05 1E + sta (Zp14),y ; CPU:$DD1B PRG:1D1B 91 14 + ldy #$01 ; CPU:$DD1D PRG:1D1D A0 01 + lda (Zp14),y ; CPU:$DD1F PRG:1D1F B1 14 + eor #$03 ; CPU:$DD21 PRG:1D21 49 03 + sta (Zp14),y ; CPU:$DD23 PRG:1D23 91 14 + ldy #$03 ; CPU:$DD25 PRG:1D25 A0 03 + lda #$20 ; CPU:$DD27 PRG:1D27 A9 20 + sta (Zp14),y ; CPU:$DD29 PRG:1D29 91 14 + rts ; CPU:$DD2B PRG:1D2B 60 +; ----------------------------------------------------------------------------- +; Routine: Label_DD2C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DD2C: + lda Zp46 ; CPU:$DD2C PRG:1D2C A5 46 + beq Label_DD3C ; CPU:$DD2E PRG:1D2E F0 0C + lda #$00 ; CPU:$DD30 PRG:1D30 A9 00 + sta ZpFE ; CPU:$DD32 PRG:1D32 85 FE + sta ZpFD ; CPU:$DD34 PRG:1D34 85 FD + sta ZpFC ; CPU:$DD36 PRG:1D36 85 FC + lda #$04 ; CPU:$DD38 PRG:1D38 A9 04 + bne Label_DD40 ; CPU:$DD3A PRG:1D3A D0 04 +; ----------------------------------------------------------------------------- +; Routine: Label_DD3C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DD3C: + lda ZpFF ; CPU:$DD3C PRG:1D3C A5 FF + ora #$08 ; CPU:$DD3E PRG:1D3E 09 08 +; ----------------------------------------------------------------------------- +; Routine: Label_DD40 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DD40: + sta ZpFF ; CPU:$DD40 PRG:1D40 85 FF + lda #$10 ; CPU:$DD42 PRG:1D42 A9 10 + ldy #$19 ; CPU:$DD44 PRG:1D44 A0 19 + sta (Zp14),y ; CPU:$DD46 PRG:1D46 91 14 + lda #$E9 ; CPU:$DD48 PRG:1D48 A9 E9 + ldy #$0C ; CPU:$DD4A PRG:1D4A A0 0C + sta (Zp14),y ; CPU:$DD4C PRG:1D4C 91 14 + lda #$F7 ; CPU:$DD4E PRG:1D4E A9 F7 + iny ; CPU:$DD50 PRG:1D50 C8 + sta (Zp14),y ; CPU:$DD51 PRG:1D51 91 14 + lda ZpB1 ; CPU:$DD53 PRG:1D53 A5 B1 + and #$03 ; CPU:$DD55 PRG:1D55 29 03 + bne Label_DD5E ; CPU:$DD57 PRG:1D57 D0 05 + lda $05F7 ; CPU:$DD59 PRG:1D59 AD F7 05 + and #$0F ; CPU:$DD5C PRG:1D5C 29 0F +; ----------------------------------------------------------------------------- +; Routine: Label_DD5E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DD5E: + lsr a ; CPU:$DD5E PRG:1D5E 4A + bcs Label_DD65 ; CPU:$DD5F PRG:1D5F B0 04 + lda #$FF ; CPU:$DD61 PRG:1D61 A9 FF + bne Label_DD67 ; CPU:$DD63 PRG:1D63 D0 02 +; ----------------------------------------------------------------------------- +; Routine: Label_DD65 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DD65: + lda #$00 ; CPU:$DD65 PRG:1D65 A9 00 +; ----------------------------------------------------------------------------- +; Routine: Label_DD67 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DD67: + ldy #$15 ; CPU:$DD67 PRG:1D67 A0 15 + sta (Zp14),y ; CPU:$DD69 PRG:1D69 91 14 + ldy #$02 ; CPU:$DD6B PRG:1D6B A0 02 + lda #$01 ; CPU:$DD6D PRG:1D6D A9 01 + sta (Zp14),y ; CPU:$DD6F PRG:1D6F 91 14 + iny ; CPU:$DD71 PRG:1D71 C8 + sta (Zp14),y ; CPU:$DD72 PRG:1D72 91 14 + ldx #$02 ; CPU:$DD74 PRG:1D74 A2 02 + ldy ZpBF ; CPU:$DD76 PRG:1D76 A4 BF + dey ; CPU:$DD78 PRG:1D78 88 + sty Zp11 ; CPU:$DD79 PRG:1D79 84 11 + bne Label_DD7F ; CPU:$DD7B PRG:1D7B D0 02 + ldx #$00 ; CPU:$DD7D PRG:1D7D A2 00 +; ----------------------------------------------------------------------------- +; Routine: Label_DD7F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DD7F: + lda $04D0,x ; CPU:$DD7F PRG:1D7F BD D0 04 + bne Label_DD89 ; CPU:$DD82 PRG:1D82 D0 05 + lda #$00 ; CPU:$DD84 PRG:1D84 A9 00 + sta $04D1,x ; CPU:$DD86 PRG:1D86 9D D1 04 +; ----------------------------------------------------------------------------- +; Routine: Label_DD89 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DD89: + lda #$34 ; CPU:$DD89 PRG:1D89 A9 34 + sta $04D0,x ; CPU:$DD8B PRG:1D8B 9D D0 04 + lda $04D1,x ; CPU:$DD8E PRG:1D8E BD D1 04 + sta Zp1F ; CPU:$DD91 PRG:1D91 85 1F + cmp #$03 ; CPU:$DD93 PRG:1D93 C9 03 + beq Label_DD9A ; CPU:$DD95 PRG:1D95 F0 03 + inc $04D1,x ; CPU:$DD97 PRG:1D97 FE D1 04 +; ----------------------------------------------------------------------------- +; Routine: Label_DD9A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DD9A: + ldy #$08 ; CPU:$DD9A PRG:1D9A A0 08 + lda (Zp14),y ; CPU:$DD9C PRG:1D9C B1 14 + tax ; CPU:$DD9E PRG:1D9E AA + iny ; CPU:$DD9F PRG:1D9F C8 + lda (Zp14),y ; CPU:$DDA0 PRG:1DA0 B1 14 + tay ; CPU:$DDA2 PRG:1DA2 A8 + lda Zp1F ; CPU:$DDA3 PRG:1DA3 A5 1F + jsr SubCEEE3 ; CPU:$DDA5 PRG:1DA5 20 E3 EE + ldx Zp1F ; CPU:$DDA8 PRG:1DA8 A6 1F + lda $DDB0,x ; CPU:$DDAA PRG:1DAA BD B0 DD + jmp SubCDDB6 ; CPU:$DDAD PRG:1DAD 4C B6 DD +; ---- data $DDB0-$DDB5 (6 bytes) ---- +; referenced by `lda $DDB0,x` at $DDAA (operand $DDB0 falls inside this region) + .byte $08, $16, $24, $32, $A9, $08 ; CPU:$DDB0 PRG:1DB0 08 16 24 32 A9 08 +; ----------------------------------------------------------------------------- +; Routine: SubCDDB6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDDB6: + sta Zp00 ; CPU:$DDB6 PRG:1DB6 85 00 + ldx ZpBF ; CPU:$DDB8 PRG:1DB8 A6 BF + dex ; CPU:$DDBA PRG:1DBA CA + lda #$01 ; CPU:$DDBB PRG:1DBB A9 01 + sta Zp9D,x ; CPU:$DDBD PRG:1DBD 95 9D + txa ; CPU:$DDBF PRG:1DBF 8A + ora #$08 ; CPU:$DDC0 PRG:1DC0 09 08 + sta Zp01 ; CPU:$DDC2 PRG:1DC2 85 01 + jmp InitZerosIfZp30Zero ; CPU:$DDC4 PRG:1DC4 4C 83 DE +; ----------------------------------------------------------------------------- +; Routine: SubCDDC7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDDC7: + ldy #$10 ; CPU:$DDC7 PRG:1DC7 A0 10 + lda (Zp14),y ; CPU:$DDC9 PRG:1DC9 B1 14 + bne Label_DE04 ; CPU:$DDCB PRG:1DCB D0 37 + tya ; CPU:$DDCD PRG:1DCD 98 + ldy #$19 ; CPU:$DDCE PRG:1DCE A0 19 + sta (Zp14),y ; CPU:$DDD0 PRG:1DD0 91 14 + ldx ZpBF ; CPU:$DDD2 PRG:1DD2 A6 BF + dex ; CPU:$DDD4 PRG:1DD4 CA + txa ; CPU:$DDD5 PRG:1DD5 8A + ldy #$1C ; CPU:$DDD6 PRG:1DD6 A0 1C + sta (Zp14),y ; CPU:$DDD8 PRG:1DD8 91 14 + lda ZpFE ; CPU:$DDDA PRG:1DDA A5 FE + ora #$02 ; CPU:$DDDC PRG:1DDC 09 02 + bne Label_DE2C ; CPU:$DDDE PRG:1DDE D0 4C +; ----------------------------------------------------------------------------- +; Routine: SubCDDE0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDDE0: + lda ZpB3 ; CPU:$DDE0 PRG:1DE0 A5 B3 + cmp #$04 ; CPU:$DDE2 PRG:1DE2 C9 04 + bcs Label_DE04 ; CPU:$DDE4 PRG:1DE4 B0 1E + lda ZpC6 ; CPU:$DDE6 PRG:1DE6 A5 C6 + and #$F0 ; CPU:$DDE8 PRG:1DE8 29 F0 + cmp #$20 ; CPU:$DDEA PRG:1DEA C9 20 + beq SubCDE2F ; CPU:$DDEC PRG:1DEC F0 41 + lda #$38 ; CPU:$DDEE PRG:1DEE A9 38 + sta ZpB6 ; CPU:$DDF0 PRG:1DF0 85 B6 + jsr PushTablePointerDispatch ; CPU:$DDF2 PRG:1DF2 20 A0 CC + cmp #$AA ; CPU:$DDF5 PRG:1DF5 C9 AA + bne Label_DDFB ; CPU:$DDF7 PRG:1DF7 D0 02 + lda #$03 ; CPU:$DDF9 PRG:1DF9 A9 03 +; ----------------------------------------------------------------------------- +; Routine: Label_DDFB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DDFB: + clc ; CPU:$DDFB PRG:1DFB 18 + adc ZpB8 ; CPU:$DDFC PRG:1DFC 65 B8 + cmp #$E8 ; CPU:$DDFE PRG:1DFE C9 E8 + bcs Label_DE05 ; CPU:$DE00 PRG:1E00 B0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_DE02 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DE02: + sta ZpB8 ; CPU:$DE02 PRG:1E02 85 B8 +; ----------------------------------------------------------------------------- +; Routine: Label_DE04 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DE04: + rts ; CPU:$DE04 PRG:1E04 60 +; ----------------------------------------------------------------------------- +; Routine: Label_DE05 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DE05: + lda #$20 ; CPU:$DE05 PRG:1E05 A9 20 + sta ZpC6 ; CPU:$DE07 PRG:1E07 85 C6 + lda ZpBA ; CPU:$DE09 PRG:1E09 A5 BA + jsr SubCC3F5 ; CPU:$DE0B PRG:1E0B 20 F5 C3 +; ----------------------------------------------------------------------------- +; Routine: SubCDE0E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDE0E: + lda #$01 ; CPU:$DE0E PRG:1E0E A9 01 + sta ZpB5 ; CPU:$DE10 PRG:1E10 85 B5 + sta ZpB3 ; CPU:$DE12 PRG:1E12 85 B3 + lda #$38 ; CPU:$DE14 PRG:1E14 A9 38 + sta ZpB4 ; CPU:$DE16 PRG:1E16 85 B4 + lda #$05 ; CPU:$DE18 PRG:1E18 A9 05 + sta ZpB2 ; CPU:$DE1A PRG:1E1A 85 B2 + lda #$E0 ; CPU:$DE1C PRG:1E1C A9 E0 + sta ZpB8 ; CPU:$DE1E PRG:1E1E 85 B8 + lda #$03 ; CPU:$DE20 PRG:1E20 A9 03 + sta ZpB7 ; CPU:$DE22 PRG:1E22 85 B7 + lda Zp46 ; CPU:$DE24 PRG:1E24 A5 46 + bne Label_DE2E ; CPU:$DE26 PRG:1E26 D0 06 + lda ZpFE ; CPU:$DE28 PRG:1E28 A5 FE + ora #$80 ; CPU:$DE2A PRG:1E2A 09 80 +; ----------------------------------------------------------------------------- +; Routine: Label_DE2C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DE2C: + sta ZpFE ; CPU:$DE2C PRG:1E2C 85 FE +; ----------------------------------------------------------------------------- +; Routine: Label_DE2E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DE2E: + rts ; CPU:$DE2E PRG:1E2E 60 +; ----------------------------------------------------------------------------- +; Routine: SubCDE2F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDE2F: + jsr CheckZpB3Return ; CPU:$DE2F PRG:1E2F 20 EB CA + lda ZpB6 ; CPU:$DE32 PRG:1E32 A5 B6 + cmp #$BC ; CPU:$DE34 PRG:1E34 C9 BC + beq Label_DE3B ; CPU:$DE36 PRG:1E36 F0 03 + jmp LoadYFromZpB4 ; CPU:$DE38 PRG:1E38 4C A3 CE +; ----------------------------------------------------------------------------- +; Routine: Label_DE3B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DE3B: + ldy #$04 ; CPU:$DE3B PRG:1E3B A0 04 + jsr InitSpritesOffscreen ; CPU:$DE3D PRG:1E3D 20 C4 DF + lda ZpBF ; CPU:$DE40 PRG:1E40 A5 BF + and #$0F ; CPU:$DE42 PRG:1E42 29 0F + beq Label_DE4E ; CPU:$DE44 PRG:1E44 F0 08 + lda #$01 ; CPU:$DE46 PRG:1E46 A9 01 + sta ZpC6 ; CPU:$DE48 PRG:1E48 85 C6 + lda #$F4 ; CPU:$DE4A PRG:1E4A A9 F4 + bne Label_DE02 ; CPU:$DE4C PRG:1E4C D0 B4 +; ----------------------------------------------------------------------------- +; Routine: Label_DE4E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DE4E: + lda Zp51 ; CPU:$DE4E PRG:1E4E A5 51 + beq Label_DE57 ; CPU:$DE50 PRG:1E50 F0 05 + lda #$00 ; CPU:$DE52 PRG:1E52 A9 00 + sta ZpB0 ; CPU:$DE54 PRG:1E54 85 B0 + rts ; CPU:$DE56 PRG:1E56 60 +; ----------------------------------------------------------------------------- +; Routine: Label_DE57 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DE57: + ldx ZpBA ; CPU:$DE57 PRG:1E57 A6 BA + lda ZpB9 ; CPU:$DE59 PRG:1E59 A5 B9 + pha ; CPU:$DE5B PRG:1E5B 48 + ldy #$00 ; CPU:$DE5C PRG:1E5C A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_DE5E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DE5E: + lda $F6C8,y ; CPU:$DE5E PRG:1E5E B9 C8 F6 + sta $00B0,y ; CPU:$DE61 PRG:1E61 99 B0 00 + iny ; CPU:$DE64 PRG:1E64 C8 + cpy #$20 ; CPU:$DE65 PRG:1E65 C0 20 + bne Label_DE5E ; CPU:$DE67 PRG:1E67 D0 F5 + stx ZpBA ; CPU:$DE69 PRG:1E69 86 BA + pla ; CPU:$DE6B PRG:1E6B 68 + ldy #$01 ; CPU:$DE6C PRG:1E6C A0 01 + ldx #$F0 ; CPU:$DE6E PRG:1E6E A2 F0 + cmp #$80 ; CPU:$DE70 PRG:1E70 C9 80 + bcs Label_DE78 ; CPU:$DE72 PRG:1E72 B0 04 + ldy #$02 ; CPU:$DE74 PRG:1E74 A0 02 + ldx #$10 ; CPU:$DE76 PRG:1E76 A2 10 +; ----------------------------------------------------------------------------- +; Routine: Label_DE78 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DE78: + sty ZpC2 ; CPU:$DE78 PRG:1E78 84 C2 + sty ZpB1 ; CPU:$DE7A PRG:1E7A 84 B1 + stx ZpB9 ; CPU:$DE7C PRG:1E7C 86 B9 + ldy #$04 ; CPU:$DE7E PRG:1E7E A0 04 + jmp InitSpritesOffscreen ; CPU:$DE80 PRG:1E80 4C C4 DF +; ----------------------------------------------------------------------------- +; Routine: InitZerosIfZp30Zero +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +InitZerosIfZp30Zero: + lda Zp30 ; CPU:$DE83 PRG:1E83 A5 30 + bne Label_DEAE ; CPU:$DE85 PRG:1E85 D0 27 + ldx #$00 ; CPU:$DE87 PRG:1E87 A2 00 + stx Zp04 ; CPU:$DE89 PRG:1E89 86 04 + ldx #$00 ; CPU:$DE8B PRG:1E8B A2 00 + stx Zp05 ; CPU:$DE8D PRG:1E8D 86 05 + stx Zp06 ; CPU:$DE8F PRG:1E8F 86 06 + stx Zp07 ; CPU:$DE91 PRG:1E91 86 07 + lda Zp01 ; CPU:$DE93 PRG:1E93 A5 01 + and #$08 ; CPU:$DE95 PRG:1E95 29 08 + bne Label_DE9A ; CPU:$DE97 PRG:1E97 D0 01 + inx ; CPU:$DE99 PRG:1E99 E8 +; ----------------------------------------------------------------------------- +; Routine: Label_DE9A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DE9A: + lda Zp00 ; CPU:$DE9A PRG:1E9A A5 00 + sta Zp06,x ; CPU:$DE9C PRG:1E9C 95 06 + lda Zp01 ; CPU:$DE9E PRG:1E9E A5 01 + jmp SubCD0B4 ; CPU:$DEA0 PRG:1EA0 4C B4 D0 +; ----------------------------------------------------------------------------- +; Routine: SubCDEA3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDEA3: + ldx #$1F ; CPU:$DEA3 PRG:1EA3 A2 1F +; ----------------------------------------------------------------------------- +; Routine: Label_DEA5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DEA5: + lda $F2EC,y ; CPU:$DEA5 PRG:1EA5 B9 EC F2 + sta ZpB0,x ; CPU:$DEA8 PRG:1EA8 95 B0 + dey ; CPU:$DEAA PRG:1EAA 88 + dex ; CPU:$DEAB PRG:1EAB CA + bpl Label_DEA5 ; CPU:$DEAC PRG:1EAC 10 F7 +; ----------------------------------------------------------------------------- +; Routine: Label_DEAE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DEAE: + rts ; CPU:$DEAE PRG:1EAE 60 +; ----------------------------------------------------------------------------- +; Routine: SubCDEAF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDEAF: + lda ZpC9 ; CPU:$DEAF PRG:1EAF A5 C9 + and #$F0 ; CPU:$DEB1 PRG:1EB1 29 F0 + cmp #$20 ; CPU:$DEB3 PRG:1EB3 C9 20 + bne Label_DEBA ; CPU:$DEB5 PRG:1EB5 D0 03 + jmp SubCDE2F ; CPU:$DEB7 PRG:1EB7 4C 2F DE +; ----------------------------------------------------------------------------- +; Routine: Label_DEBA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DEBA: + jsr PushTablePointerDispatch ; CPU:$DEBA PRG:1EBA 20 A0 CC + cmp #$AA ; CPU:$DEBD PRG:1EBD C9 AA + bne Label_DEC3 ; CPU:$DEBF PRG:1EBF D0 02 + lda #$04 ; CPU:$DEC1 PRG:1EC1 A9 04 +; ----------------------------------------------------------------------------- +; Routine: Label_DEC3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DEC3: + clc ; CPU:$DEC3 PRG:1EC3 18 + adc ZpB8 ; CPU:$DEC4 PRG:1EC4 65 B8 + cmp #$E8 ; CPU:$DEC6 PRG:1EC6 C9 E8 + bcs Label_DEE0 ; CPU:$DEC8 PRG:1EC8 B0 16 + sta ZpB8 ; CPU:$DECA PRG:1ECA 85 B8 + jsr PushTablePointerDispatch ; CPU:$DECC PRG:1ECC 20 A0 CC + cmp #$AA ; CPU:$DECF PRG:1ECF C9 AA + beq Label_DEDF ; CPU:$DED1 PRG:1ED1 F0 0C + eor ZpC5 ; CPU:$DED3 PRG:1ED3 45 C5 + bpl Label_DEDA ; CPU:$DED5 PRG:1ED5 10 03 + clc ; CPU:$DED7 PRG:1ED7 18 + adc #$01 ; CPU:$DED8 PRG:1ED8 69 01 +; ----------------------------------------------------------------------------- +; Routine: Label_DEDA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DEDA: + clc ; CPU:$DEDA PRG:1EDA 18 + adc ZpB9 ; CPU:$DEDB PRG:1EDB 65 B9 + sta ZpB9 ; CPU:$DEDD PRG:1EDD 85 B9 +; ----------------------------------------------------------------------------- +; Routine: Label_DEDF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DEDF: + rts ; CPU:$DEDF PRG:1EDF 60 +; ----------------------------------------------------------------------------- +; Routine: Label_DEE0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DEE0: + lda #$20 ; CPU:$DEE0 PRG:1EE0 A9 20 + sta ZpC9 ; CPU:$DEE2 PRG:1EE2 85 C9 + ldy #$04 ; CPU:$DEE4 PRG:1EE4 A0 04 + jsr InitSpritesOffscreen ; CPU:$DEE6 PRG:1EE6 20 C4 DF + jmp SubCDE0E ; CPU:$DEE9 PRG:1EE9 4C 0E DE +; ----------------------------------------------------------------------------- +; Routine: SubCDEEC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDEEC: + lda ZpC6 ; CPU:$DEEC PRG:1EEC A5 C6 + ldy ZpBF ; CPU:$DEEE PRG:1EEE A4 BF + cmp #$01 ; CPU:$DEF0 PRG:1EF0 C9 01 + bne Label_DF37 ; CPU:$DEF2 PRG:1EF2 D0 43 + dey ; CPU:$DEF4 PRG:1EF4 88 + bne Label_DF24 ; CPU:$DEF5 PRG:1EF5 D0 2D + jsr SubCD5E6 ; CPU:$DEF7 PRG:1EF7 20 E6 D5 + lda Zp49 ; CPU:$DEFA PRG:1EFA A5 49 + beq Label_DF07 ; CPU:$DEFC PRG:1EFC F0 09 +; ----------------------------------------------------------------------------- +; Routine: Label_DEFE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DEFE: + lda #$00 ; CPU:$DEFE PRG:1EFE A9 00 + sta ZpB0 ; CPU:$DF00 PRG:1F00 85 B0 + ldy #$06 ; CPU:$DF02 PRG:1F02 A0 06 + jmp InitSpritesOffscreen ; CPU:$DF04 PRG:1F04 4C C4 DF +; ----------------------------------------------------------------------------- +; Routine: Label_DF07 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DF07: + ldy #$1F ; CPU:$DF07 PRG:1F07 A0 1F + jsr SubCDEA3 ; CPU:$DF09 PRG:1F09 20 A3 DE + jsr SubCDF9D ; CPU:$DF0C PRG:1F0C 20 9D DF + lda #$74 ; CPU:$DF0F PRG:1F0F A9 74 +; ----------------------------------------------------------------------------- +; Routine: Label_DF11 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DF11: + sta ZpB9 ; CPU:$DF11 PRG:1F11 85 B9 + lda #$09 ; CPU:$DF13 PRG:1F13 A9 09 + sta ZpB8 ; CPU:$DF15 PRG:1F15 85 B8 + lda #$02 ; CPU:$DF17 PRG:1F17 A9 02 + sta ZpC6 ; CPU:$DF19 PRG:1F19 85 C6 + lda ZpFD ; CPU:$DF1B PRG:1F1B A5 FD + ora #$10 ; CPU:$DF1D PRG:1F1D 09 10 + sta ZpFD ; CPU:$DF1F PRG:1F1F 85 FD + jmp SubCCEBA ; CPU:$DF21 PRG:1F21 4C BA CE +; ----------------------------------------------------------------------------- +; Routine: Label_DF24 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DF24: + jsr SubCD5EC ; CPU:$DF24 PRG:1F24 20 EC D5 + lda Zp4D ; CPU:$DF27 PRG:1F27 A5 4D + bne Label_DEFE ; CPU:$DF29 PRG:1F29 D0 D3 + ldy #$3F ; CPU:$DF2B PRG:1F2B A0 3F + jsr SubCDEA3 ; CPU:$DF2D PRG:1F2D 20 A3 DE + jsr SubCDFAC ; CPU:$DF30 PRG:1F30 20 AC DF + lda #$8C ; CPU:$DF33 PRG:1F33 A9 8C + bne Label_DF11 ; CPU:$DF35 PRG:1F35 D0 DA +; ----------------------------------------------------------------------------- +; Routine: Label_DF37 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DF37: + cmp #$02 ; CPU:$DF37 PRG:1F37 C9 02 + bne Label_DF60 ; CPU:$DF39 PRG:1F39 D0 25 + jsr CheckZpB3Return ; CPU:$DF3B PRG:1F3B 20 EB CA + inc ZpB8 ; CPU:$DF3E PRG:1F3E E6 B8 + jsr SubCDFB0 ; CPU:$DF40 PRG:1F40 20 B0 DF + inc $02C0,x ; CPU:$DF43 PRG:1F43 FE C0 02 + inc $02C4,x ; CPU:$DF46 PRG:1F46 FE C4 02 + lda ZpB8 ; CPU:$DF49 PRG:1F49 A5 B8 + cmp #$28 ; CPU:$DF4B PRG:1F4B C9 28 + beq Label_DF50 ; CPU:$DF4D PRG:1F4D F0 01 + rts ; CPU:$DF4F PRG:1F4F 60 +; ----------------------------------------------------------------------------- +; Routine: Label_DF50 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DF50: + lda #$04 ; CPU:$DF50 PRG:1F50 A9 04 + ldy ZpBF ; CPU:$DF52 PRG:1F52 A4 BF + dey ; CPU:$DF54 PRG:1F54 88 + beq Label_DF59 ; CPU:$DF55 PRG:1F55 F0 02 + lda #$08 ; CPU:$DF57 PRG:1F57 A9 08 +; ----------------------------------------------------------------------------- +; Routine: Label_DF59 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DF59: + sta ZpC6 ; CPU:$DF59 PRG:1F59 85 C6 +; ----------------------------------------------------------------------------- +; Routine: Label_DF5B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DF5B: + lda #$FF ; CPU:$DF5B PRG:1F5B A9 FF + sta ZpB3 ; CPU:$DF5D PRG:1F5D 85 B3 + rts ; CPU:$DF5F PRG:1F5F 60 +; ----------------------------------------------------------------------------- +; Routine: Label_DF60 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DF60: + lda ZpB1 ; CPU:$DF60 PRG:1F60 A5 B1 + beq Label_DF87 ; CPU:$DF62 PRG:1F62 F0 23 + bmi Label_DF6C ; CPU:$DF64 PRG:1F64 30 06 + and #$08 ; CPU:$DF66 PRG:1F66 29 08 + bne Label_DF87 ; CPU:$DF68 PRG:1F68 D0 1D + beq Label_DF72 ; CPU:$DF6A PRG:1F6A F0 06 +; ----------------------------------------------------------------------------- +; Routine: Label_DF6C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DF6C: + lda #$18 ; CPU:$DF6C PRG:1F6C A9 18 + sta ZpB6 ; CPU:$DF6E PRG:1F6E 85 B6 + bne Label_DF75 ; CPU:$DF70 PRG:1F70 D0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_DF72 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DF72: + jsr LoadYFromZpB4 ; CPU:$DF72 PRG:1F72 20 A3 CE +; ----------------------------------------------------------------------------- +; Routine: Label_DF75 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DF75: + lda #$00 ; CPU:$DF75 PRG:1F75 A9 00 + sta ZpC6 ; CPU:$DF77 PRG:1F77 85 C6 + sta ZpB3 ; CPU:$DF79 PRG:1F79 85 B3 + jsr SubCDFB0 ; CPU:$DF7B PRG:1F7B 20 B0 DF + lda #$F4 ; CPU:$DF7E PRG:1F7E A9 F4 + sta $02C0,x ; CPU:$DF80 PRG:1F80 9D C0 02 + sta $02C4,x ; CPU:$DF83 PRG:1F83 9D C4 02 +; ----------------------------------------------------------------------------- +; Routine: Label_DF86 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DF86: + rts ; CPU:$DF86 PRG:1F86 60 +; ----------------------------------------------------------------------------- +; Routine: Label_DF87 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DF87: + lda ZpB3 ; CPU:$DF87 PRG:1F87 A5 B3 + bne Label_DF86 ; CPU:$DF89 PRG:1F89 D0 FB + jsr SubCDFB0 ; CPU:$DF8B PRG:1F8B 20 B0 DF + lda $02C1,x ; CPU:$DF8E PRG:1F8E BD C1 02 + cmp #$CF ; CPU:$DF91 PRG:1F91 C9 CF + beq Label_DF75 ; CPU:$DF93 PRG:1F93 F0 E0 + inc $02C1,x ; CPU:$DF95 PRG:1F95 FE C1 02 + inc $02C5,x ; CPU:$DF98 PRG:1F98 FE C5 02 + bne Label_DF5B ; CPU:$DF9B PRG:1F9B D0 BE +; ----------------------------------------------------------------------------- +; Routine: SubCDF9D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDF9D: + ldy #$07 ; CPU:$DF9D PRG:1F9D A0 07 +; ----------------------------------------------------------------------------- +; Routine: Label_DF9F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DF9F: + ldx #$07 ; CPU:$DF9F PRG:1F9F A2 07 +; ----------------------------------------------------------------------------- +; Routine: Label_DFA1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DFA1: + lda $F699,y ; CPU:$DFA1 PRG:1FA1 B9 99 F6 + sta $02C0,y ; CPU:$DFA4 PRG:1FA4 99 C0 02 + dey ; CPU:$DFA7 PRG:1FA7 88 + dex ; CPU:$DFA8 PRG:1FA8 CA + bpl Label_DFA1 ; CPU:$DFA9 PRG:1FA9 10 F6 + rts ; CPU:$DFAB PRG:1FAB 60 +; ----------------------------------------------------------------------------- +; Routine: SubCDFAC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDFAC: + ldy #$0F ; CPU:$DFAC PRG:1FAC A0 0F + bne Label_DF9F ; CPU:$DFAE PRG:1FAE D0 EF +; ----------------------------------------------------------------------------- +; Routine: SubCDFB0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDFB0: + ldx #$08 ; CPU:$DFB0 PRG:1FB0 A2 08 + ldy ZpBF ; CPU:$DFB2 PRG:1FB2 A4 BF + dey ; CPU:$DFB4 PRG:1FB4 88 + bne Label_DFB9 ; CPU:$DFB5 PRG:1FB5 D0 02 + ldx #$00 ; CPU:$DFB7 PRG:1FB7 A2 00 +; ----------------------------------------------------------------------------- +; Routine: Label_DFB9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DFB9: + rts ; CPU:$DFB9 PRG:1FB9 60 +; ----------------------------------------------------------------------------- +; Routine: SubCDFBA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDFBA: + jsr SubCDFBD ; CPU:$DFBA PRG:1FBA 20 BD DF +; ----------------------------------------------------------------------------- +; Routine: SubCDFBD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDFBD: + inc $05FA ; CPU:$DFBD PRG:1FBD EE FA 05 + inc $05FA ; CPU:$DFC0 PRG:1FC0 EE FA 05 + rts ; CPU:$DFC3 PRG:1FC3 60 +; ----------------------------------------------------------------------------- +; Routine: InitSpritesOffscreen +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +InitSpritesOffscreen: + lda #$F4 ; CPU:$DFC4 PRG:1FC4 A9 F4 + ldx ZpBA ; CPU:$DFC6 PRG:1FC6 A6 BA +; ----------------------------------------------------------------------------- +; Routine: Label_DFC8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DFC8: + sta $0200,x ; CPU:$DFC8 PRG:1FC8 9D 00 02 + inx ; CPU:$DFCB PRG:1FCB E8 + inx ; CPU:$DFCC PRG:1FCC E8 + inx ; CPU:$DFCD PRG:1FCD E8 + inx ; CPU:$DFCE PRG:1FCE E8 + dey ; CPU:$DFCF PRG:1FCF 88 + bne Label_DFC8 ; CPU:$DFD0 PRG:1FD0 D0 F6 + rts ; CPU:$DFD2 PRG:1FD2 60 +; ----------------------------------------------------------------------------- +; Routine: SubCDFD3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDFD3: + lda ZpBF ; CPU:$DFD3 PRG:1FD3 A5 BF + cmp #$40 ; CPU:$DFD5 PRG:1FD5 C9 40 + bne Label_DFF7 ; CPU:$DFD7 PRG:1FD7 D0 1E + ldy #$00 ; CPU:$DFD9 PRG:1FD9 A0 00 + lda ZpC1 ; CPU:$DFDB PRG:1FDB A5 C1 + bne Label_DFF5 ; CPU:$DFDD PRG:1FDD D0 16 + pla ; CPU:$DFDF PRG:1FDF 68 + pla ; CPU:$DFE0 PRG:1FE0 68 + lda $04C0 ; CPU:$DFE1 PRG:1FE1 AD C0 04 + beq Label_DFEE ; CPU:$DFE4 PRG:1FE4 F0 08 + lda $04C1 ; CPU:$DFE6 PRG:1FE6 AD C1 04 + bne Label_DFEE ; CPU:$DFE9 PRG:1FE9 D0 03 + jmp SubCECAF ; CPU:$DFEB PRG:1FEB 4C AF EC +; ----------------------------------------------------------------------------- +; Routine: Label_DFEE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DFEE: + sty ZpB0 ; CPU:$DFEE PRG:1FEE 84 B0 + ldy #$02 ; CPU:$DFF0 PRG:1FF0 A0 02 + jmp InitSpritesOffscreen ; CPU:$DFF2 PRG:1FF2 4C C4 DF +; ----------------------------------------------------------------------------- +; Routine: Label_DFF5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DFF5: + sty ZpC1 ; CPU:$DFF5 PRG:1FF5 84 C1 +; ----------------------------------------------------------------------------- +; Routine: Label_DFF7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_DFF7: + rts ; CPU:$DFF7 PRG:1FF7 60 +; ----------------------------------------------------------------------------- +; Routine: SubCDFF8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCDFF8: + lda Zp21 ; CPU:$DFF8 PRG:1FF8 A5 21 + bne Label_DFF7 ; CPU:$DFFA PRG:1FFA D0 FB + lda $04C5 ; CPU:$DFFC PRG:1FFC AD C5 04 + bne Label_DFF7 ; CPU:$DFFF PRG:1FFF D0 F6 + ldx #$A8 ; CPU:$E001 PRG:2001 A2 A8 + ldy #$E0 ; CPU:$E003 PRG:2003 A0 E0 + lda $04F0 ; CPU:$E005 PRG:2005 AD F0 04 + beq Label_E00F ; CPU:$E008 PRG:2008 F0 05 + dec $04F0 ; CPU:$E00A PRG:200A CE F0 04 + beq Label_E049 ; CPU:$E00D PRG:200D F0 3A +; ----------------------------------------------------------------------------- +; Routine: Label_E00F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E00F: + lda $04F1 ; CPU:$E00F PRG:200F AD F1 04 + beq Label_E023 ; CPU:$E012 PRG:2012 F0 0F + dec $04F1 ; CPU:$E014 PRG:2014 CE F1 04 + bne Label_E023 ; CPU:$E017 PRG:2017 D0 0A + lda #$49 ; CPU:$E019 PRG:2019 A9 49 + sta Zp00 ; CPU:$E01B PRG:201B 85 00 + lda #$22 ; CPU:$E01D PRG:201D A9 22 + sta Zp01 ; CPU:$E01F PRG:201F 85 01 + bne Label_E051 ; CPU:$E021 PRG:2021 D0 2E +; ----------------------------------------------------------------------------- +; Routine: Label_E023 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E023: + ldx #$88 ; CPU:$E023 PRG:2023 A2 88 + ldy #$E0 ; CPU:$E025 PRG:2025 A0 E0 + lda Zp49 ; CPU:$E027 PRG:2027 A5 49 + beq Label_E058 ; CPU:$E029 PRG:2029 F0 2D + lda $0300 ; CPU:$E02B PRG:202B AD 00 03 + bne Label_E058 ; CPU:$E02E PRG:202E D0 28 + lda Zp39 ; CPU:$E030 PRG:2030 A5 39 + beq Label_E03C ; CPU:$E032 PRG:2032 F0 08 + lda Zp4E ; CPU:$E034 PRG:2034 A5 4E + bne Label_E03C ; CPU:$E036 PRG:2036 D0 04 + ldx #$78 ; CPU:$E038 PRG:2038 A2 78 + ldy #$E0 ; CPU:$E03A PRG:203A A0 E0 +; ----------------------------------------------------------------------------- +; Routine: Label_E03C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E03C: + lda #$00 ; CPU:$E03C PRG:203C A9 00 + sta Zp49 ; CPU:$E03E PRG:203E 85 49 + lda #$FF ; CPU:$E040 PRG:2040 A9 FF + sta Zp4A ; CPU:$E042 PRG:2042 85 4A +; ----------------------------------------------------------------------------- +; Routine: Label_E044 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E044: + lda #$FF ; CPU:$E044 PRG:2044 A9 FF + sta $04F0 ; CPU:$E046 PRG:2046 8D F0 04 +; ----------------------------------------------------------------------------- +; Routine: Label_E049 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E049: + lda #$89 ; CPU:$E049 PRG:2049 A9 89 + sta Zp00 ; CPU:$E04B PRG:204B 85 00 + lda #$21 ; CPU:$E04D PRG:204D A9 21 + sta Zp01 ; CPU:$E04F PRG:204F 85 01 +; ----------------------------------------------------------------------------- +; Routine: Label_E051 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E051: + stx Zp02 ; CPU:$E051 PRG:2051 86 02 + sty Zp03 ; CPU:$E053 PRG:2053 84 03 + jmp ReturnOne ; CPU:$E055 PRG:2055 4C 2C CE +; ----------------------------------------------------------------------------- +; Routine: Label_E058 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E058: + lda Zp4D ; CPU:$E058 PRG:2058 A5 4D + beq Label_E077 ; CPU:$E05A PRG:205A F0 1B + lda $0320 ; CPU:$E05C PRG:205C AD 20 03 + bne Label_E077 ; CPU:$E05F PRG:205F D0 16 + lda Zp39 ; CPU:$E061 PRG:2061 A5 39 + beq Label_E06D ; CPU:$E063 PRG:2063 F0 08 + lda Zp4A ; CPU:$E065 PRG:2065 A5 4A + bne Label_E06D ; CPU:$E067 PRG:2067 D0 04 + ldx #$98 ; CPU:$E069 PRG:2069 A2 98 + ldy #$E0 ; CPU:$E06B PRG:206B A0 E0 +; ----------------------------------------------------------------------------- +; Routine: Label_E06D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E06D: + lda #$00 ; CPU:$E06D PRG:206D A9 00 + sta Zp4D ; CPU:$E06F PRG:206F 85 4D + lda #$FF ; CPU:$E071 PRG:2071 A9 FF + sta Zp4E ; CPU:$E073 PRG:2073 85 4E + bne Label_E044 ; CPU:$E075 PRG:2075 D0 CD +; ----------------------------------------------------------------------------- +; Routine: Label_E077 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E077: + rts ; CPU:$E077 PRG:2077 60 +; ---- data $E078-$E128 (177 bytes) ---- + .byte $1F, $16, $0A, $1B, $12, $18, $24, $10, $0A, $16, $0E, $24, $18, $1F, $0E, $1B ; CPU:$E078 PRG:2078 1F 16 0A 1B 12 18 24 10 0A 16 0E 24 18 1F 0E 1B + .byte $1F, $24, $24, $24, $10, $0A, $16, $0E, $24, $18, $1F, $0E, $1B, $24, $24, $24 ; CPU:$E088 PRG:2088 1F 24 24 24 10 0A 16 0E 24 18 1F 0E 1B 24 24 24 + .byte $1F, $15, $1E, $12, $10, $12, $24, $10, $0A, $16, $0E, $24, $18, $1F, $0E, $1B ; CPU:$E098 PRG:2098 1F 15 1E 12 10 12 24 10 0A 16 0E 24 18 1F 0E 1B + .byte $1F, $24, $24, $24, $24, $24, $24, $24, $24, $24, $24, $24, $24, $24, $24, $24 ; CPU:$E0A8 PRG:20A8 1F 24 24 24 24 24 24 24 24 24 24 24 24 24 24 24 + .byte $A9, $03, $85, $01, $A9, $00, $85, $00, $A8, $20, $35, $CA, $A9, $04, $85, $01 ; CPU:$E0B8 PRG:20B8 A9 03 85 01 A9 00 85 00 A8 20 35 CA A9 04 85 01 + .byte $A9, $00, $85, $00, $A8, $4C, $35, $CA, $00, $00, $00, $00, $01, $00, $00, $00 ; CPU:$E0C8 PRG:20C8 A9 00 85 00 A8 4C 35 CA 00 00 00 00 01 00 00 00 + .byte $AA, $03, $20, $02, $01, $00, $00, $03, $01, $01, $00, $04, $02, $01, $01, $05 ; CPU:$E0D8 PRG:20D8 AA 03 20 02 01 00 00 03 01 01 00 04 02 01 01 05 + .byte $02, $01, $01, $AA, $04, $20, $06, $03, $02, $01, $07, $03, $02, $01, $08, $03 ; CPU:$E0E8 PRG:20E8 02 01 01 AA 04 20 06 03 02 01 07 03 02 01 08 03 + .byte $02, $02, $09, $03, $02, $02, $AA, $04, $15, $0A, $03, $03, $02, $07, $03, $03 ; CPU:$E0F8 PRG:20F8 02 02 09 03 02 02 AA 04 15 0A 03 03 02 07 03 03 + .byte $02, $09, $03, $03, $03, $09, $03, $03, $04, $AA, $04, $15, $0A, $03, $03, $04 ; CPU:$E108 PRG:2108 02 09 03 03 03 09 03 03 04 AA 04 15 0A 03 03 04 + .byte $07, $03, $03, $04, $09, $03, $03, $04, $09, $03, $03, $04, $FF, $0B, $00, $00 ; CPU:$E118 PRG:2118 07 03 03 04 09 03 03 04 09 03 03 04 FF 0B 00 00 + .byte $00 ; CPU:$E128 PRG:2128 00 +; ----------------------------------------------------------------------------- +; Routine: Label_E129 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E129: + lda Zp2D ; CPU:$E129 PRG:2129 A5 2D + bne Label_E131 ; CPU:$E12B PRG:212B D0 04 + lda Zp3B ; CPU:$E12D PRG:212D A5 3B + sta Zp40 ; CPU:$E12F PRG:212F 85 40 +; ----------------------------------------------------------------------------- +; Routine: Label_E131 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E131: + rts ; CPU:$E131 PRG:2131 60 +; ----------------------------------------------------------------------------- +; Routine: SubCE132 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE132: + jsr SubCD5DC ; CPU:$E132 PRG:2132 20 DC D5 + lda Zp0A ; CPU:$E135 PRG:2135 A5 0A + and #$E7 ; CPU:$E137 PRG:2137 29 E7 + sta $2001 ; CPU:$E139 PRG:2139 8D 01 20 + rts ; CPU:$E13C PRG:213C 60 +; ----------------------------------------------------------------------------- +; Routine: SubCE13D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE13D: + jsr SubCD5DC ; CPU:$E13D PRG:213D 20 DC D5 + lda Zp0A ; CPU:$E140 PRG:2140 A5 0A + ora #$18 ; CPU:$E142 PRG:2142 09 18 + sta $2001 ; CPU:$E144 PRG:2144 8D 01 20 + sta Zp0A ; CPU:$E147 PRG:2147 85 0A + rts ; CPU:$E149 PRG:2149 60 +; ---- data $E14A-$E1CD (132 bytes) ---- + .byte $20, $B8, $E0, $A6, $31, $BD, $D0, $E0, $C9, $AA, $D0, $32, $E8, $BD, $D0, $E0 ; CPU:$E14A PRG:214A 20 B8 E0 A6 31 BD D0 E0 C9 AA D0 32 E8 BD D0 E0 + .byte $85, $32, $E8, $BD, $D0, $E0, $8D, $B1, $04, $E8, $86, $31, $A5, $41, $C9, $07 ; CPU:$E15A PRG:215A 85 32 E8 BD D0 E0 8D B1 04 E8 86 31 A5 41 C9 07 + .byte $90, $04, $A9, $03, $85, $70, $A9, $BB, $85, $35, $20, $7F, $D6, $A9, $00, $8D ; CPU:$E16A PRG:216A 90 04 A9 03 85 70 A9 BB 85 35 20 7F D6 A9 00 8D + .byte $0A, $03, $A9, $18, $8D, $2A, $03, $A9, $01, $8D, $B0, $04, $D0, $3C, $C9, $FF ; CPU:$E17A PRG:217A 0A 03 A9 18 8D 2A 03 A9 01 8D B0 04 D0 3C C9 FF + .byte $D0, $04, $A2, $41, $D0, $BF, $BD, $D0, $E0, $85, $34, $E8, $BD, $D0, $E0, $85 ; CPU:$E18A PRG:218A D0 04 A2 41 D0 BF BD D0 E0 85 34 E8 BD D0 E0 85 + .byte $32, $E8, $A0, $01, $A5, $41, $C9, $08, $90, $03, $8C, $C0, $04, $BD, $D0, $E0 ; CPU:$E19A PRG:219A 32 E8 A0 01 A5 41 C9 08 90 03 8C C0 04 BD D0 E0 + .byte $8D, $F3, $04, $E8, $BD, $D0, $E0, $8D, $FC, $04, $E8, $86, $31, $A9, $00, $85 ; CPU:$E1AA PRG:21AA 8D F3 04 E8 BD D0 E0 8D FC 04 E8 86 31 A9 00 85 + .byte $35, $20, $7A, $E9, $20, $7F, $D6, $20, $9A, $D6, $20, $72, $D6, $20, $F9, $D3 ; CPU:$E1BA PRG:21BA 35 20 7A E9 20 7F D6 20 9A D6 20 72 D6 20 F9 D3 + .byte $A9, $02, $D0, $26 ; CPU:$E1CA PRG:21CA A9 02 D0 26 +; ----------------------------------------------------------------------------- +; Routine: SubCE1CE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE1CE: + lda Zp35 ; CPU:$E1CE PRG:21CE A5 35 + cmp #$AA ; CPU:$E1D0 PRG:21D0 C9 AA + bne Label_E1F6 ; CPU:$E1D2 PRG:21D2 D0 22 + lda Zp45 ; CPU:$E1D4 PRG:21D4 A5 45 + bne Label_E1F6 ; CPU:$E1D6 PRG:21D6 D0 1E + lda Zp2D ; CPU:$E1D8 PRG:21D8 A5 2D + bne Label_E1F6 ; CPU:$E1DA PRG:21DA D0 1A + ldy #$FF ; CPU:$E1DC PRG:21DC A0 FF + lda Zp49 ; CPU:$E1DE PRG:21DE A5 49 + beq Label_E1E4 ; CPU:$E1E0 PRG:21E0 F0 02 + sty Zp4A ; CPU:$E1E2 PRG:21E2 84 4A +; ----------------------------------------------------------------------------- +; Routine: Label_E1E4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E1E4: + lda Zp4D ; CPU:$E1E4 PRG:21E4 A5 4D + beq Label_E1EA ; CPU:$E1E6 PRG:21E6 F0 02 + sty Zp4E ; CPU:$E1E8 PRG:21E8 84 4E +; ----------------------------------------------------------------------------- +; Routine: Label_E1EA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E1EA: + lda #$10 ; CPU:$E1EA PRG:21EA A9 10 + sta Zp2D ; CPU:$E1EC PRG:21EC 85 2D + lda #$01 ; CPU:$E1EE PRG:21EE A9 01 + sta Zp3B ; CPU:$E1F0 PRG:21F0 85 3B + lda #$09 ; CPU:$E1F2 PRG:21F2 A9 09 + sta Zp40 ; CPU:$E1F4 PRG:21F4 85 40 +; ----------------------------------------------------------------------------- +; Routine: Label_E1F6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E1F6: + rts ; CPU:$E1F6 PRG:21F6 60 +; ----------------------------------------------------------------------------- +; Routine: SubCE1F7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE1F7: + lda Zp21 ; CPU:$E1F7 PRG:21F7 A5 21 + bne Label_E219 ; CPU:$E1F9 PRG:21F9 D0 1E + lda $04C5 ; CPU:$E1FB PRG:21FB AD C5 04 + bne Label_E219 ; CPU:$E1FE PRG:21FE D0 19 + ldy #$00 ; CPU:$E200 PRG:2200 A0 00 + lda Zp9D ; CPU:$E202 PRG:2202 A5 9D + beq Label_E20F ; CPU:$E204 PRG:2204 F0 09 + sty Zp9D ; CPU:$E206 PRG:2206 84 9D + lda #$F0 ; CPU:$E208 PRG:2208 A9 F0 +; ----------------------------------------------------------------------------- +; Routine: Label_E20A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E20A: + sta Zp00 ; CPU:$E20A PRG:220A 85 00 + jmp SubCD02F ; CPU:$E20C PRG:220C 4C 2F D0 +; ----------------------------------------------------------------------------- +; Routine: Label_E20F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E20F: + lda Zp9E ; CPU:$E20F PRG:220F A5 9E + beq Label_E219 ; CPU:$E211 PRG:2211 F0 06 + sty Zp9E ; CPU:$E213 PRG:2213 84 9E + lda #$F1 ; CPU:$E215 PRG:2215 A9 F1 + bne Label_E20A ; CPU:$E217 PRG:2217 D0 F1 +; ----------------------------------------------------------------------------- +; Routine: Label_E219 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E219: + rts ; CPU:$E219 PRG:2219 60 +; ----------------------------------------------------------------------------- +; Routine: SubCE21A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE21A: + lda #$F9 ; CPU:$E21A PRG:221A A9 F9 + sta Zp00 ; CPU:$E21C PRG:221C 85 00 + jsr SubCD18B ; CPU:$E21E PRG:221E 20 8B D1 + lda ZpAD ; CPU:$E221 PRG:2221 A5 AD + bne Label_E239 ; CPU:$E223 PRG:2223 D0 14 + lda Zp4A ; CPU:$E225 PRG:2225 A5 4A + bne Label_E239 ; CPU:$E227 PRG:2227 D0 10 + lda Zp95 ; CPU:$E229 PRG:2229 A5 95 + cmp #$02 ; CPU:$E22B PRG:222B C9 02 + bcc Label_E239 ; CPU:$E22D PRG:222D 90 0A + inc ZpAD ; CPU:$E22F PRG:222F E6 AD + inc Zp48 ; CPU:$E231 PRG:2231 E6 48 + jsr SubCD5E6 ; CPU:$E233 PRG:2233 20 E6 D5 + jmp SubCE24E ; CPU:$E236 PRG:2236 4C 4E E2 +; ----------------------------------------------------------------------------- +; Routine: Label_E239 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E239: + lda ZpAE ; CPU:$E239 PRG:2239 A5 AE + bne Label_E25F ; CPU:$E23B PRG:223B D0 22 + lda Zp4E ; CPU:$E23D PRG:223D A5 4E + bne Label_E25F ; CPU:$E23F PRG:223F D0 1E + lda Zp99 ; CPU:$E241 PRG:2241 A5 99 + cmp #$02 ; CPU:$E243 PRG:2243 C9 02 + bcc Label_E25F ; CPU:$E245 PRG:2245 90 18 + inc ZpAE ; CPU:$E247 PRG:2247 E6 AE + inc Zp4C ; CPU:$E249 PRG:2249 E6 4C + jsr SubCD5EC ; CPU:$E24B PRG:224B 20 EC D5 +; ----------------------------------------------------------------------------- +; Routine: SubCE24E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE24E: + lda Zp2D ; CPU:$E24E PRG:224E A5 2D + beq Label_E258 ; CPU:$E250 PRG:2250 F0 06 + lda #$01 ; CPU:$E252 PRG:2252 A9 01 + sta Zp54 ; CPU:$E254 PRG:2254 85 54 + bne Label_E25E ; CPU:$E256 PRG:2256 D0 06 +; ----------------------------------------------------------------------------- +; Routine: Label_E258 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E258: + lda ZpFD ; CPU:$E258 PRG:2258 A5 FD + ora #$08 ; CPU:$E25A PRG:225A 09 08 + sta ZpFD ; CPU:$E25C PRG:225C 85 FD +; ----------------------------------------------------------------------------- +; Routine: Label_E25E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E25E: + rts ; CPU:$E25E PRG:225E 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E25F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E25F: + lda Zp2D ; CPU:$E25F PRG:225F A5 2D + bne Label_E25E ; CPU:$E261 PRG:2261 D0 FB + lda Zp54 ; CPU:$E263 PRG:2263 A5 54 + beq Label_E25E ; CPU:$E265 PRG:2265 F0 F7 + lda #$00 ; CPU:$E267 PRG:2267 A9 00 + sta Zp54 ; CPU:$E269 PRG:2269 85 54 + beq Label_E258 ; CPU:$E26B PRG:226B F0 EB +; ----------------------------------------------------------------------------- +; Routine: SubCE26D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE26D: + lda Zp4A ; CPU:$E26D PRG:226D A5 4A + beq Label_E25E ; CPU:$E26F PRG:226F F0 ED + lda Zp4E ; CPU:$E271 PRG:2271 A5 4E + beq Label_E25E ; CPU:$E273 PRG:2273 F0 E9 + lda #$00 ; CPU:$E275 PRG:2275 A9 00 + sta Zp52 ; CPU:$E277 PRG:2277 85 52 + jsr SubCD4FE ; CPU:$E279 PRG:2279 20 FE D4 + lda #$40 ; CPU:$E27C PRG:227C A9 40 + sta ZpFD ; CPU:$E27E PRG:227E 85 FD + lda #$20 ; CPU:$E280 PRG:2280 A9 20 + sta Zp2D ; CPU:$E282 PRG:2282 85 2D + lda #$0B ; CPU:$E284 PRG:2284 A9 0B + sta Zp40 ; CPU:$E286 PRG:2286 85 40 + jmp SubCCA2B ; CPU:$E288 PRG:2288 4C 2B CA +; ---- data $E28B-$E299 (15 bytes) ---- + .byte $A5, $2D, $D0, $0A, $A9, $01, $85, $30, $85, $28, $A9, $00, $85, $50, $60 ; CPU:$E28B PRG:228B A5 2D D0 0A A9 01 85 30 85 28 A9 00 85 50 60 +; ----------------------------------------------------------------------------- +; Routine: SubCE29A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE29A: + ldy #$10 ; CPU:$E29A PRG:229A A0 10 + lda (Zp14),y ; CPU:$E29C PRG:229C B1 14 + bne Label_E2AA ; CPU:$E29E PRG:229E D0 0A + lda ZpBF ; CPU:$E2A0 PRG:22A0 A5 BF + sta (Zp14),y ; CPU:$E2A2 PRG:22A2 91 14 + lda ZpFE ; CPU:$E2A4 PRG:22A4 A5 FE + ora #$02 ; CPU:$E2A6 PRG:22A6 09 02 + sta ZpFE ; CPU:$E2A8 PRG:22A8 85 FE +; ----------------------------------------------------------------------------- +; Routine: Label_E2AA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E2AA: + rts ; CPU:$E2AA PRG:22AA 60 +; ----------------------------------------------------------------------------- +; Routine: SubCE2AB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE2AB: + lda $04B0 ; CPU:$E2AB PRG:22AB AD B0 04 + bne Label_E2B1 ; CPU:$E2AE PRG:22AE D0 01 + rts ; CPU:$E2B0 PRG:22B0 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E2B1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E2B1: + cmp #$01 ; CPU:$E2B1 PRG:22B1 C9 01 + bne Label_E329 ; CPU:$E2B3 PRG:22B3 D0 74 + lda #$40 ; CPU:$E2B5 PRG:22B5 A9 40 + sta Zp14 ; CPU:$E2B7 PRG:22B7 85 14 + lda #$03 ; CPU:$E2B9 PRG:22B9 A9 03 + sta Zp15 ; CPU:$E2BB PRG:22BB 85 15 + lda #$20 ; CPU:$E2BD PRG:22BD A9 20 + sta Zp12 ; CPU:$E2BF PRG:22BF 85 12 + lda #$00 ; CPU:$E2C1 PRG:22C1 A9 00 + sta Zp13 ; CPU:$E2C3 PRG:22C3 85 13 + lda #$0A ; CPU:$E2C5 PRG:22C5 A9 0A + sta Zp33 ; CPU:$E2C7 PRG:22C7 85 33 + ldx #$00 ; CPU:$E2C9 PRG:22C9 A2 00 + lda #$30 ; CPU:$E2CB PRG:22CB A9 30 + sta Zp11 ; CPU:$E2CD PRG:22CD 85 11 +; ----------------------------------------------------------------------------- +; Routine: Label_E2CF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E2CF: + ldy #$00 ; CPU:$E2CF PRG:22CF A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_E2D1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E2D1: + lda $E6C5,y ; CPU:$E2D1 PRG:22D1 B9 C5 E6 + cpy #$0A ; CPU:$E2D4 PRG:22D4 C0 0A + bne Label_E2E4 ; CPU:$E2D6 PRG:22D6 D0 0C + lda Zp11 ; CPU:$E2D8 PRG:22D8 A5 11 + pha ; CPU:$E2DA PRG:22DA 48 + clc ; CPU:$E2DB PRG:22DB 18 + adc #$10 ; CPU:$E2DC PRG:22DC 69 10 + sta Zp11 ; CPU:$E2DE PRG:22DE 85 11 + pla ; CPU:$E2E0 PRG:22E0 68 + jmp SubCE2FD ; CPU:$E2E1 PRG:22E1 4C FD E2 +; ----------------------------------------------------------------------------- +; Routine: Label_E2E4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E2E4: + cpy #$09 ; CPU:$E2E4 PRG:22E4 C0 09 + bne Label_E2ED ; CPU:$E2E6 PRG:22E6 D0 05 + lda $E6E5,x ; CPU:$E2E8 PRG:22E8 BD E5 E6 + bne SubCE2FD ; CPU:$E2EB PRG:22EB D0 10 +; ----------------------------------------------------------------------------- +; Routine: Label_E2ED +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E2ED: + cpy #$08 ; CPU:$E2ED PRG:22ED C0 08 + bne Label_E2F6 ; CPU:$E2EF PRG:22EF D0 05 + lda $E6E6,x ; CPU:$E2F1 PRG:22F1 BD E6 E6 + bne SubCE2FD ; CPU:$E2F4 PRG:22F4 D0 07 +; ----------------------------------------------------------------------------- +; Routine: Label_E2F6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E2F6: + cpy #$04 ; CPU:$E2F6 PRG:22F6 C0 04 + bne SubCE2FD ; CPU:$E2F8 PRG:22F8 D0 03 + lda $E6E7,x ; CPU:$E2FA PRG:22FA BD E7 E6 +; ----------------------------------------------------------------------------- +; Routine: SubCE2FD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE2FD: + sta (Zp14),y ; CPU:$E2FD PRG:22FD 91 14 + iny ; CPU:$E2FF PRG:22FF C8 + cpy #$20 ; CPU:$E300 PRG:2300 C0 20 + bne Label_E2D1 ; CPU:$E302 PRG:2302 D0 CD + inx ; CPU:$E304 PRG:2304 E8 + inx ; CPU:$E305 PRG:2305 E8 + inx ; CPU:$E306 PRG:2306 E8 + jsr AdvanceDispatchPointer ; CPU:$E307 PRG:2307 20 B4 CD + dec Zp33 ; CPU:$E30A PRG:230A C6 33 + bne Label_E2CF ; CPU:$E30C PRG:230C D0 C1 + lda #$00 ; CPU:$E30E PRG:230E A9 00 + sta $04B5 ; CPU:$E310 PRG:2310 8D B5 04 + sta $04B6 ; CPU:$E313 PRG:2313 8D B6 04 + lda #$40 ; CPU:$E316 PRG:2316 A9 40 + sta $04B3 ; CPU:$E318 PRG:2318 8D B3 04 + lda #$01 ; CPU:$E31B PRG:231B A9 01 + sta $04B2 ; CPU:$E31D PRG:231D 8D B2 04 + lda #$0A ; CPU:$E320 PRG:2320 A9 0A + sta $04BC ; CPU:$E322 PRG:2322 8D BC 04 + inc $04B0 ; CPU:$E325 PRG:2325 EE B0 04 + rts ; CPU:$E328 PRG:2328 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E329 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E329: + lda $04B2 ; CPU:$E329 PRG:2329 AD B2 04 + bne Label_E36C ; CPU:$E32C PRG:232C D0 3E + lda $04B1 ; CPU:$E32E PRG:232E AD B1 04 + bne Label_E34E ; CPU:$E331 PRG:2331 D0 1B +; ----------------------------------------------------------------------------- +; Routine: SubCE333 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE333: + lda #$01 ; CPU:$E333 PRG:2333 A9 01 + sta Zp51 ; CPU:$E335 PRG:2335 85 51 + lda #$00 ; CPU:$E337 PRG:2337 A9 00 + sta $04B0 ; CPU:$E339 PRG:2339 8D B0 04 + sta ZpFC ; CPU:$E33C PRG:233C 85 FC + sta $04B4 ; CPU:$E33E PRG:233E 8D B4 04 + lda #$10 ; CPU:$E341 PRG:2341 A9 10 + sta Zp2D ; CPU:$E343 PRG:2343 85 2D + lda #$06 ; CPU:$E345 PRG:2345 A9 06 + sta Zp3B ; CPU:$E347 PRG:2347 85 3B + lda #$09 ; CPU:$E349 PRG:2349 A9 09 + sta Zp40 ; CPU:$E34B PRG:234B 85 40 + rts ; CPU:$E34D PRG:234D 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E34E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E34E: + sta Zp03 ; CPU:$E34E PRG:234E 85 03 + cmp #$18 ; CPU:$E350 PRG:2350 C9 18 + beq Label_E358 ; CPU:$E352 PRG:2352 F0 04 + cmp #$13 ; CPU:$E354 PRG:2354 C9 13 + bne Label_E35C ; CPU:$E356 PRG:2356 D0 04 +; ----------------------------------------------------------------------------- +; Routine: Label_E358 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E358: + lda #$04 ; CPU:$E358 PRG:2358 A9 04 + sta ZpFC ; CPU:$E35A PRG:235A 85 FC +; ----------------------------------------------------------------------------- +; Routine: Label_E35C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E35C: + lda #$01 ; CPU:$E35C PRG:235C A9 01 + sec ; CPU:$E35E PRG:235E 38 + jsr AdjustDecimalColumns ; CPU:$E35F PRG:235F 20 5A D1 + sta $04B1 ; CPU:$E362 PRG:2362 8D B1 04 + lda #$09 ; CPU:$E365 PRG:2365 A9 09 + sta $04B2 ; CPU:$E367 PRG:2367 8D B2 04 + bne Label_E374 ; CPU:$E36A PRG:236A D0 08 +; ----------------------------------------------------------------------------- +; Routine: Label_E36C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E36C: + dec $04B3 ; CPU:$E36C PRG:236C CE B3 04 + bne Label_E3AE ; CPU:$E36F PRG:236F D0 3D + dec $04B2 ; CPU:$E371 PRG:2371 CE B2 04 +; ----------------------------------------------------------------------------- +; Routine: Label_E374 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E374: + lda #$06 ; CPU:$E374 PRG:2374 A9 06 + sta $04B3 ; CPU:$E376 PRG:2376 8D B3 04 + lda #$14 ; CPU:$E379 PRG:2379 A9 14 + sta $0540 ; CPU:$E37B PRG:237B 8D 40 05 + lda $04B1 ; CPU:$E37E PRG:237E AD B1 04 + lsr a ; CPU:$E381 PRG:2381 4A + lsr a ; CPU:$E382 PRG:2382 4A + lsr a ; CPU:$E383 PRG:2383 4A + lsr a ; CPU:$E384 PRG:2384 4A + sta $0541 ; CPU:$E385 PRG:2385 8D 41 05 + lda $04B1 ; CPU:$E388 PRG:2388 AD B1 04 + and #$0F ; CPU:$E38B PRG:238B 29 0F + sta $0542 ; CPU:$E38D PRG:238D 8D 42 05 + lda #$66 ; CPU:$E390 PRG:2390 A9 66 + sta $0543 ; CPU:$E392 PRG:2392 8D 43 05 + lda $04B2 ; CPU:$E395 PRG:2395 AD B2 04 + sta $0544 ; CPU:$E398 PRG:2398 8D 44 05 + lda #$AE ; CPU:$E39B PRG:239B A9 AE + sta Zp00 ; CPU:$E39D PRG:239D 85 00 + lda #$20 ; CPU:$E39F PRG:239F A9 20 + sta Zp01 ; CPU:$E3A1 PRG:23A1 85 01 + lda #$40 ; CPU:$E3A3 PRG:23A3 A9 40 + sta Zp02 ; CPU:$E3A5 PRG:23A5 85 02 + lda #$05 ; CPU:$E3A7 PRG:23A7 A9 05 + sta Zp03 ; CPU:$E3A9 PRG:23A9 85 03 + jsr ReturnOne ; CPU:$E3AB PRG:23AB 20 2C CE +; ----------------------------------------------------------------------------- +; Routine: Label_E3AE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E3AE: + ldx #$40 ; CPU:$E3AE PRG:23AE A2 40 + ldy #$03 ; CPU:$E3B0 PRG:23B0 A0 03 + lda Zp2F ; CPU:$E3B2 PRG:23B2 A5 2F + lsr a ; CPU:$E3B4 PRG:23B4 4A + bcc Label_E3BB ; CPU:$E3B5 PRG:23B5 90 04 + ldx #$E0 ; CPU:$E3B7 PRG:23B7 A2 E0 + ldy #$03 ; CPU:$E3B9 PRG:23B9 A0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_E3BB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E3BB: + stx ZpA0 ; CPU:$E3BB PRG:23BB 86 A0 + sty ZpA1 ; CPU:$E3BD PRG:23BD 84 A1 + lda #$05 ; CPU:$E3BF PRG:23BF A9 05 + sta Zp33 ; CPU:$E3C1 PRG:23C1 85 33 + lda #$00 ; CPU:$E3C3 PRG:23C3 A9 00 + sta ZpA2 ; CPU:$E3C5 PRG:23C5 85 A2 +; ----------------------------------------------------------------------------- +; Routine: Label_E3C7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E3C7: + jsr SubCCB9B ; CPU:$E3C7 PRG:23C7 20 9B CB + lda ZpB0 ; CPU:$E3CA PRG:23CA A5 B0 + beq SubCE3E3 ; CPU:$E3CC PRG:23CC F0 15 + lda ZpC0 ; CPU:$E3CE PRG:23CE A5 C0 + bne Label_E3F3 ; CPU:$E3D0 PRG:23D0 D0 21 + lda ZpB3 ; CPU:$E3D2 PRG:23D2 A5 B3 + bne Label_E3E0 ; CPU:$E3D4 PRG:23D4 D0 0A + lda ZpB2 ; CPU:$E3D6 PRG:23D6 A5 B2 + sta ZpB3 ; CPU:$E3D8 PRG:23D8 85 B3 + jsr SubCCE95 ; CPU:$E3DA PRG:23DA 20 95 CE +; ----------------------------------------------------------------------------- +; Routine: SubCE3DD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE3DD: + jsr SubCCBC4 ; CPU:$E3DD PRG:23DD 20 C4 CB +; ----------------------------------------------------------------------------- +; Routine: Label_E3E0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E3E0: + jsr SubCCBB6 ; CPU:$E3E0 PRG:23E0 20 B6 CB +; ----------------------------------------------------------------------------- +; Routine: SubCE3E3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE3E3: + jsr SubCCBAE ; CPU:$E3E3 PRG:23E3 20 AE CB + dec Zp33 ; CPU:$E3E6 PRG:23E6 C6 33 + bne Label_E3C7 ; CPU:$E3E8 PRG:23E8 D0 DD + lda $04BC ; CPU:$E3EA PRG:23EA AD BC 04 + bne Label_E3F2 ; CPU:$E3ED PRG:23ED D0 03 + jmp SubCE333 ; CPU:$E3EF PRG:23EF 4C 33 E3 +; ----------------------------------------------------------------------------- +; Routine: Label_E3F2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E3F2: + rts ; CPU:$E3F2 PRG:23F2 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E3F3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E3F3: + cmp #$08 ; CPU:$E3F3 PRG:23F3 C9 08 + beq SubCE41E ; CPU:$E3F5 PRG:23F5 F0 27 + cmp #$01 ; CPU:$E3F7 PRG:23F7 C9 01 + bne Label_E400 ; CPU:$E3F9 PRG:23F9 D0 05 + inc $04B5 ; CPU:$E3FB PRG:23FB EE B5 04 + bne Label_E403 ; CPU:$E3FE PRG:23FE D0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_E400 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E400: + inc $04B6 ; CPU:$E400 PRG:2400 EE B6 04 +; ----------------------------------------------------------------------------- +; Routine: Label_E403 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E403: + lda #$E8 ; CPU:$E403 PRG:2403 A9 E8 + sta ZpBC ; CPU:$E405 PRG:2405 85 BC + lda #$F6 ; CPU:$E407 PRG:2407 A9 F6 + sta ZpBD ; CPU:$E409 PRG:2409 85 BD + lda #$07 ; CPU:$E40B PRG:240B A9 07 + sta ZpB5 ; CPU:$E40D PRG:240D 85 B5 + ldy #$02 ; CPU:$E40F PRG:240F A0 02 + jsr InitSpritesOffscreen ; CPU:$E411 PRG:2411 20 C4 DF + lda #$08 ; CPU:$E414 PRG:2414 A9 08 + sta ZpC0 ; CPU:$E416 PRG:2416 85 C0 + lda #$9E ; CPU:$E418 PRG:2418 A9 9E + sta ZpB6 ; CPU:$E41A PRG:241A 85 B6 + bne Label_E3E0 ; CPU:$E41C PRG:241C D0 C2 +; ----------------------------------------------------------------------------- +; Routine: SubCE41E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE41E: + jsr PushTablePointerDispatch ; CPU:$E41E PRG:241E 20 A0 CC + cmp #$CC ; CPU:$E421 PRG:2421 C9 CC + beq Label_E42F ; CPU:$E423 PRG:2423 F0 0A + cmp #$DD ; CPU:$E425 PRG:2425 C9 DD + beq Label_E440 ; CPU:$E427 PRG:2427 F0 17 + cmp #$EE ; CPU:$E429 PRG:2429 C9 EE + beq Label_E448 ; CPU:$E42B PRG:242B F0 1B + bne SubCE3DD ; CPU:$E42D PRG:242D D0 AE +; ----------------------------------------------------------------------------- +; Routine: Label_E42F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E42F: + jsr PushTablePointerDispatch ; CPU:$E42F PRG:242F 20 A0 CC + sta ZpB5 ; CPU:$E432 PRG:2432 85 B5 + cmp #$05 ; CPU:$E434 PRG:2434 C9 05 + bne SubCE41E ; CPU:$E436 PRG:2436 D0 E6 + ldy #$04 ; CPU:$E438 PRG:2438 A0 04 + jsr InitSpritesOffscreen ; CPU:$E43A PRG:243A 20 C4 DF + jmp SubCE41E ; CPU:$E43D PRG:243D 4C 1E E4 +; ----------------------------------------------------------------------------- +; Routine: Label_E440 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E440: + jsr PushTablePointerDispatch ; CPU:$E440 PRG:2440 20 A0 CC + sta ZpB6 ; CPU:$E443 PRG:2443 85 B6 + jmp SubCE3DD ; CPU:$E445 PRG:2445 4C DD E3 +; ----------------------------------------------------------------------------- +; Routine: Label_E448 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E448: + dec $04BC ; CPU:$E448 PRG:2448 CE BC 04 + ldy #$04 ; CPU:$E44B PRG:244B A0 04 + jsr InitSpritesOffscreen ; CPU:$E44D PRG:244D 20 C4 DF + jmp SubCE3E3 ; CPU:$E450 PRG:2450 4C E3 E3 +; ---- data $E453-$E708 (694 bytes) ---- +; referenced by `lda $E6C5,y` at $E2D1 (operand $E6C5 falls inside this region) +; referenced by `lda $E6E5,x` at $E2E8 (operand $E6E5 falls inside this region) +; referenced by `lda $E6E6,x` at $E2F1 (operand $E6E6 falls inside this region) +; referenced by `lda $E6E7,x` at $E2FA (operand $E6E7 falls inside this region) + .byte $20, $F7, $E1, $AD, $B4, $04, $20, $9E, $CD, $64, $E4, $8A, $E4, $9A, $E4, $AA ; CPU:$E453 PRG:2453 20 F7 E1 AD B4 04 20 9E CD 64 E4 8A E4 9A E4 AA + .byte $E4, $20, $32, $E1, $20, $20, $CA, $20, $3B, $CA, $20, $2B, $CA, $20, $BE, $D5 ; CPU:$E463 PRG:2463 E4 20 32 E1 20 20 CA 20 3B CA 20 2B CA 20 BE D5 + .byte $20, $0F, $D6, $20, $E6, $D5, $20, $EC, $D5, $20, $3D, $E1, $A9, $00, $8D, $BA ; CPU:$E473 PRG:2473 20 0F D6 20 E6 D5 20 EC D5 20 3D E1 A9 00 8D BA + .byte $04, $85, $2B, $EE, $B4, $04, $60, $A5, $2B, $D0, $FB, $AD, $BA, $04, $20, $9E ; CPU:$E483 PRG:2483 04 85 2B EE B4 04 60 A5 2B D0 FB AD BA 04 20 9E + .byte $CD, $1A, $E5, $CE, $E5, $70, $E6, $A5, $2B, $D0, $EB, $AD, $BA, $04, $20, $9E ; CPU:$E493 PRG:2493 CD 1A E5 CE E5 70 E6 A5 2B D0 EB AD BA 04 20 9E + .byte $CD, $54, $E5, $46, $E6, $B8, $E6, $AD, $B5, $04, $18, $6D, $B6, $04, $A2, $BF ; CPU:$E4A3 PRG:24A3 CD 54 E5 46 E6 B8 E6 AD B5 04 18 6D B6 04 A2 BF + .byte $A0, $E5, $C9, $0A, $D0, $4D, $A2, $AD, $A0, $E5, $A5, $41, $C9, $07, $B0, $08 ; CPU:$E4B3 PRG:24B3 A0 E5 C9 0A D0 4D A2 AD A0 E5 A5 41 C9 07 B0 08 + .byte $A2, $B6, $A0, $E5, $A9, $30, $D0, $02, $A9, $50, $85, $1E, $86, $02, $84, $03 ; CPU:$E4C3 PRG:24C3 A2 B6 A0 E5 A9 30 D0 02 A9 50 85 1E 86 02 84 03 + .byte $A9, $D0, $85, $00, $A9, $22, $85, $01, $20, $2C, $CE, $A5, $1E, $85, $00, $A5 ; CPU:$E4D3 PRG:24D3 A9 D0 85 00 A9 22 85 01 20 2C CE A5 1E 85 00 A5 + .byte $4A, $D0, $07, $A9, $08, $85, $01, $20, $83, $DE, $A5, $4E, $D0, $0B, $A5, $1E ; CPU:$E4E3 PRG:24E3 4A D0 07 A9 08 85 01 20 83 DE A5 4E D0 0B A5 1E + .byte $85, $00, $A9, $09, $85, $01, $20, $83, $DE, $A2, $A4, $A0, $E5, $A5, $FD, $09 ; CPU:$E4F3 PRG:24F3 85 00 A9 09 85 01 20 83 DE A2 A4 A0 E5 A5 FD 09 + .byte $04, $85, $FD, $A9, $C7, $85, $00, $A9, $22, $85, $01, $86, $02, $84, $03, $20 ; CPU:$E503 PRG:2503 04 85 FD A9 C7 85 00 A9 22 85 01 86 02 84 03 20 + .byte $2C, $CE, $A9, $10, $4C, $EC, $E1, $A5, $4A, $F0, $04, $EE, $B4, $04, $60, $A9 ; CPU:$E513 PRG:2513 2C CE A9 10 4C EC E1 A5 4A F0 04 EE B4 04 60 A9 + .byte $17, $85, $1E, $A9, $27, $85, $00, $A9, $21, $A2, $68, $A0, $E5, $85, $01, $86 ; CPU:$E523 PRG:2523 17 85 1E A9 27 85 00 A9 21 A2 68 A0 E5 85 01 86 + .byte $02, $84, $03, $20, $2C, $CE, $A6, $1E, $A0, $17, $BD, $74, $E5, $9D, $00, $02 ; CPU:$E533 PRG:2533 02 84 03 20 2C CE A6 1E A0 17 BD 74 E5 9D 00 02 + .byte $CA, $88, $10, $F6, $EE, $BA, $04, $A9, $00, $8D, $BB, $04, $A9, $10, $85, $2B ; CPU:$E543 PRG:2543 CA 88 10 F6 EE BA 04 A9 00 8D BB 04 A9 10 85 2B + .byte $60, $A5, $4E, $D0, $C6, $A9, $2F, $85, $1E, $A9, $07, $85, $00, $A9, $22, $A2 ; CPU:$E553 PRG:2553 60 A5 4E D0 C6 A9 2F 85 1E A9 07 85 00 A9 22 A2 + .byte $6E, $A0, $E5, $D0, $C8, $15, $16, $0A, $1B, $12, $18, $15, $15, $1E, $12, $10 ; CPU:$E563 PRG:2563 6E A0 E5 D0 C8 15 16 0A 1B 12 18 15 15 1E 12 10 + .byte $12, $40, $13, $40, $20, $40, $12, $40, $28, $48, $15, $40, $20, $48, $14, $40 ; CPU:$E573 PRG:2573 12 40 13 40 20 40 12 40 28 48 15 40 20 48 14 40 + .byte $28, $50, $17, $40, $20, $50, $16, $40, $28, $78, $13, $41, $20, $78, $12, $41 ; CPU:$E583 PRG:2583 28 50 17 40 20 50 16 40 28 78 13 41 20 78 12 41 + .byte $28, $80, $15, $41, $20, $80, $14, $41, $28, $88, $17, $41, $20, $88, $16, $41 ; CPU:$E593 PRG:2593 28 80 15 41 20 80 14 41 28 88 17 41 20 88 16 41 + .byte $28, $18, $19, $0E, $1B, $0F, $0E, $0C, $1D, $67, $18, $05, $00, $00, $00, $19 ; CPU:$E5A3 PRG:25A3 28 18 19 0E 1B 0F 0E 0C 1D 67 18 05 00 00 00 19 + .byte $1D, $1C, $65, $18, $03, $00, $00, $00, $19, $1D, $1C, $65, $1E, $24, $24, $24 ; CPU:$E5B3 PRG:25B3 1D 1C 65 18 03 00 00 00 19 1D 1C 65 1E 24 24 24 + .byte $24, $24, $17, $18, $24, $0B, $18, $17, $1E, $1C, $26, $AD, $B5, $04, $F0, $66 ; CPU:$E5C3 PRG:25C3 24 24 17 18 24 0B 18 17 1E 1C 26 AD B5 04 F0 66 + .byte $CD, $BB, $04, $F0, $59, $AD, $BB, $04, $0A, $0A, $0A, $AA, $A0, $41, $AD, $B5 ; CPU:$E5D3 PRG:25D3 CD BB 04 F0 59 AD BB 04 0A 0A 0A AA A0 41 AD B5 + .byte $04, $C9, $06, $AD, $BB, $04, $90, $0B, $A0, $38, $C9, $05, $90, $05, $A0, $4A ; CPU:$E5E3 PRG:25E3 04 C9 06 AD BB 04 90 0B A0 38 C9 05 90 05 A0 4A + .byte $38, $E9, $05, $84, $1E, $0A, $0A, $85, $1F, $0A, $18, $65, $1F, $69, $70, $9D ; CPU:$E5F3 PRG:25F3 38 E9 05 84 1E 0A 0A 85 1F 0A 18 65 1F 69 70 9D + .byte $33, $02, $9D, $37, $02, $A9, $02, $9D, $32, $02, $9D, $36, $02, $A9, $A5, $9D ; CPU:$E603 PRG:2603 33 02 9D 37 02 A9 02 9D 32 02 9D 36 02 A9 A5 9D + .byte $31, $02, $A9, $A6, $9D, $35, $02, $A5, $1E, $9D, $30, $02, $18, $69, $08, $9D ; CPU:$E613 PRG:2613 31 02 A9 A6 9D 35 02 A5 1E 9D 30 02 18 69 08 9D + .byte $34, $02, $EE, $BB, $04, $A9, $0A, $85, $2B, $A9, $20, $85, $FD, $60, $EE, $BA ; CPU:$E623 PRG:2623 34 02 EE BB 04 A9 0A 85 2B A9 20 85 FD 60 EE BA + .byte $04, $A9, $10, $85, $2B, $60, $A9, $00, $8D, $BA, $04, $EE, $B4, $04, $A9, $10 ; CPU:$E633 PRG:2633 04 A9 10 85 2B 60 A9 00 8D BA 04 EE B4 04 A9 10 + .byte $85, $2B, $60, $AD, $B6, $04, $F0, $EE, $CD, $BB, $04, $F0, $E1, $AD, $BB, $04 ; CPU:$E643 PRG:2643 85 2B 60 AD B6 04 F0 EE CD BB 04 F0 E1 AD BB 04 + .byte $0A, $0A, $0A, $18, $69, $50, $AA, $A0, $79, $AD, $B6, $04, $C9, $06, $AD, $BB ; CPU:$E653 PRG:2653 0A 0A 0A 18 69 50 AA A0 79 AD B6 04 C9 06 AD BB + .byte $04, $90, $90, $A0, $70, $C9, $05, $90, $8A, $A0, $82, $B0, $83, $A9, $00, $85 ; CPU:$E663 PRG:2663 04 90 90 A0 70 C9 05 90 8A A0 82 B0 83 A9 00 85 + .byte $1F, $A2, $37, $A0, $21, $AD, $B5, $04, $85, $1E, $86, $00, $84, $01, $A9, $03 ; CPU:$E673 PRG:2673 1F A2 37 A0 21 AD B5 04 85 1E 86 00 84 01 A9 03 + .byte $85, $02, $A9, $E7, $85, $03, $20, $2C, $CE, $A9, $00, $85, $04, $85, $05, $85 ; CPU:$E683 PRG:2683 85 02 A9 E7 85 03 20 2C CE A9 00 85 04 85 05 85 + .byte $07, $A0, $08, $84, $03, $18, $20, $39, $D1, $90, $02, $E6, $05, $C6, $1E, $D0 ; CPU:$E693 PRG:2693 07 A0 08 84 03 18 20 39 D1 90 02 E6 05 C6 1E D0 + .byte $F4, $85, $06, $A5, $1F, $20, $B4, $D0, $A9, $20, $85, $2B, $A9, $00, $8D, $BA ; CPU:$E6A3 PRG:26A3 F4 85 06 A5 1F 20 B4 D0 A9 20 85 2B A9 00 8D BA + .byte $04, $EE, $B4, $04, $60, $A9, $01, $85, $1F, $A2, $17, $A0, $22, $AD, $B6, $04 ; CPU:$E6B3 PRG:26B3 04 EE B4 04 60 A9 01 85 1F A2 17 A0 22 AD B6 04 + .byte $D0, $B6, $01, $01, $03, $00, $2C, $05, $A5, $02, $00, $00, $00, $00, $00, $00 ; CPU:$E6C3 PRG:26C3 D0 B6 01 01 03 00 2C 05 A5 02 00 00 00 00 00 00 + .byte $00, $F0, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ; CPU:$E6D3 PRG:26D3 00 F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 + .byte $0F, $0F, $38, $24, $2C, $C8, $24, $2E, $18, $5A, $2D, $2C, $5A, $30, $D4, $5A ; CPU:$E6E3 PRG:26E3 0F 0F 38 24 2C C8 24 2E 18 5A 2D 2C 5A 30 D4 5A + .byte $30, $E8, $5A, $2D, $60, $8A, $2F, $A0, $8A, $2E, $28, $BA, $2D, $D8, $BA, $30 ; CPU:$E6F3 PRG:26F3 30 E8 5A 2D 60 8A 2F A0 8A 2E 28 BA 2D D8 BA 30 + .byte $15, $21, $24, $08, $00, $00 ; CPU:$E703 PRG:2703 15 21 24 08 00 00 +; ----------------------------------------------------------------------------- +; Routine: SubCE709 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE709: + lda $04D0 ; CPU:$E709 PRG:2709 AD D0 04 + beq Label_E711 ; CPU:$E70C PRG:270C F0 03 + dec $04D0 ; CPU:$E70E PRG:270E CE D0 04 +; ----------------------------------------------------------------------------- +; Routine: Label_E711 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E711: + lda $04D2 ; CPU:$E711 PRG:2711 AD D2 04 + beq Label_E719 ; CPU:$E714 PRG:2714 F0 03 + dec $04D2 ; CPU:$E716 PRG:2716 CE D2 04 +; ----------------------------------------------------------------------------- +; Routine: Label_E719 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E719: + inc Zp27 ; CPU:$E719 PRG:2719 E6 27 + lda Zp27 ; CPU:$E71B PRG:271B A5 27 + cmp #$3E ; CPU:$E71D PRG:271D C9 3E + bcc Label_E73D ; CPU:$E71F PRG:271F 90 1C + lda #$00 ; CPU:$E721 PRG:2721 A9 00 + sta Zp27 ; CPU:$E723 PRG:2723 85 27 + lda $04F3 ; CPU:$E725 PRG:2725 AD F3 04 + beq Label_E72D ; CPU:$E728 PRG:2728 F0 03 + dec $04F3 ; CPU:$E72A PRG:272A CE F3 04 +; ----------------------------------------------------------------------------- +; Routine: Label_E72D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E72D: + lda $04FC ; CPU:$E72D PRG:272D AD FC 04 + beq Label_E735 ; CPU:$E730 PRG:2730 F0 03 + dec $04FC ; CPU:$E732 PRG:2732 CE FC 04 +; ----------------------------------------------------------------------------- +; Routine: Label_E735 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E735: + lda $04FF ; CPU:$E735 PRG:2735 AD FF 04 + beq Label_E73D ; CPU:$E738 PRG:2738 F0 03 + dec $04FF ; CPU:$E73A PRG:273A CE FF 04 +; ----------------------------------------------------------------------------- +; Routine: Label_E73D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E73D: + rts ; CPU:$E73D PRG:273D 60 +; ----------------------------------------------------------------------------- +; Routine: SubCE73E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE73E: + lda $0300 ; CPU:$E73E PRG:273E AD 00 03 + beq Label_E768 ; CPU:$E741 PRG:2741 F0 25 + lda $0316 ; CPU:$E743 PRG:2743 AD 16 03 + bne Label_E768 ; CPU:$E746 PRG:2746 D0 20 + ldx #$00 ; CPU:$E748 PRG:2748 A2 00 + lda $030E ; CPU:$E74A PRG:274A AD 0E 03 +; ----------------------------------------------------------------------------- +; Routine: Label_E74D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E74D: + cmp $04F6,x ; CPU:$E74D PRG:274D DD F6 04 + bne Label_E769 ; CPU:$E750 PRG:2750 D0 17 + inc $04F7,x ; CPU:$E752 PRG:2752 FE F7 04 + ldy #$F0 ; CPU:$E755 PRG:2755 A0 F0 + lda Zp3A ; CPU:$E757 PRG:2757 A5 3A + beq Label_E75D ; CPU:$E759 PRG:2759 F0 02 + ldy #$3E ; CPU:$E75B PRG:275B A0 3E +; ----------------------------------------------------------------------------- +; Routine: Label_E75D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E75D: + tya ; CPU:$E75D PRG:275D 98 + cmp $04F7,x ; CPU:$E75E PRG:275E DD F7 04 + bcs Label_E768 ; CPU:$E761 PRG:2761 B0 05 + lda #$01 ; CPU:$E763 PRG:2763 A9 01 + sta $04F8,x ; CPU:$E765 PRG:2765 9D F8 04 +; ----------------------------------------------------------------------------- +; Routine: Label_E768 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E768: + rts ; CPU:$E768 PRG:2768 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E769 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E769: + sta $04F6,x ; CPU:$E769 PRG:2769 9D F6 04 + lda #$00 ; CPU:$E76C PRG:276C A9 00 + sta $04F7,x ; CPU:$E76E PRG:276E 9D F7 04 + rts ; CPU:$E771 PRG:2771 60 +; ----------------------------------------------------------------------------- +; Routine: SubCE772 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE772: + lda $0320 ; CPU:$E772 PRG:2772 AD 20 03 + beq Label_E768 ; CPU:$E775 PRG:2775 F0 F1 + lda $0336 ; CPU:$E777 PRG:2777 AD 36 03 + bne Label_E768 ; CPU:$E77A PRG:277A D0 EC + lda $032E ; CPU:$E77C PRG:277C AD 2E 03 + ldx #$03 ; CPU:$E77F PRG:277F A2 03 + bne Label_E74D ; CPU:$E781 PRG:2781 D0 CA +; ----------------------------------------------------------------------------- +; Routine: SubCE783 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE783: + ldx #$03 ; CPU:$E783 PRG:2783 A2 03 + ldy #$00 ; CPU:$E785 PRG:2785 A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_E787 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E787: + lda $04AC,x ; CPU:$E787 PRG:2787 BD AC 04 + sta $04A8,x ; CPU:$E78A PRG:278A 9D A8 04 + tya ; CPU:$E78D PRG:278D 98 + sta $04AC,x ; CPU:$E78E PRG:278E 9D AC 04 + dex ; CPU:$E791 PRG:2791 CA + bpl Label_E787 ; CPU:$E792 PRG:2792 10 F3 + rts ; CPU:$E794 PRG:2794 60 +; ----------------------------------------------------------------------------- +; Routine: SubCE795 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE795: + lda $04B0 ; CPU:$E795 PRG:2795 AD B0 04 + bne Label_E7AC ; CPU:$E798 PRG:2798 D0 12 + lda $04F3 ; CPU:$E79A PRG:279A AD F3 04 + beq Label_E7AD ; CPU:$E79D PRG:279D F0 0E + ldy Zp46 ; CPU:$E79F PRG:279F A4 46 + beq Label_E7AC ; CPU:$E7A1 PRG:27A1 F0 09 + cmp #$04 ; CPU:$E7A3 PRG:27A3 C9 04 + bcc Label_E7AC ; CPU:$E7A5 PRG:27A5 90 05 + lda #$04 ; CPU:$E7A7 PRG:27A7 A9 04 + sta $04F3 ; CPU:$E7A9 PRG:27A9 8D F3 04 +; ----------------------------------------------------------------------------- +; Routine: Label_E7AC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E7AC: + rts ; CPU:$E7AC PRG:27AC 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E7AD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E7AD: + lda $04BE ; CPU:$E7AD PRG:27AD AD BE 04 + bne Label_E7BD ; CPU:$E7B0 PRG:27B0 D0 0B + jsr SubCEEAD ; CPU:$E7B2 PRG:27B2 20 AD EE + jsr SubCE9A0 ; CPU:$E7B5 PRG:27B5 20 A0 E9 + lda #$01 ; CPU:$E7B8 PRG:27B8 A9 01 + sta $04BE ; CPU:$E7BA PRG:27BA 8D BE 04 +; ----------------------------------------------------------------------------- +; Routine: Label_E7BD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E7BD: + jsr SubCE73E ; CPU:$E7BD PRG:27BD 20 3E E7 + jsr SubCE772 ; CPU:$E7C0 PRG:27C0 20 72 E7 + lda $0430 ; CPU:$E7C3 PRG:27C3 AD 30 04 + beq Label_E7CB ; CPU:$E7C6 PRG:27C6 F0 03 + jmp SubCE86B ; CPU:$E7C8 PRG:27C8 4C 6B E8 +; ----------------------------------------------------------------------------- +; Routine: Label_E7CB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E7CB: + lda $0431 ; CPU:$E7CB PRG:27CB AD 31 04 + beq Label_E7D6 ; CPU:$E7CE PRG:27CE F0 06 + dec $0431 ; CPU:$E7D0 PRG:27D0 CE 31 04 + jmp SubCE805 ; CPU:$E7D3 PRG:27D3 4C 05 E8 +; ----------------------------------------------------------------------------- +; Routine: Label_E7D6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E7D6: + lda Zp51 ; CPU:$E7D6 PRG:27D6 A5 51 + bne SubCE805 ; CPU:$E7D8 PRG:27D8 D0 2B + lda $04F8 ; CPU:$E7DA PRG:27DA AD F8 04 + bne Label_E806 ; CPU:$E7DD PRG:27DD D0 27 + lda $04FB ; CPU:$E7DF PRG:27DF AD FB 04 + bne Label_E84A ; CPU:$E7E2 PRG:27E2 D0 66 +; ----------------------------------------------------------------------------- +; Routine: SubCE7E4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE7E4: + ldx $042A ; CPU:$E7E4 PRG:27E4 AE 2A 04 + lda $0428 ; CPU:$E7E7 PRG:27E7 AD 28 04 + clc ; CPU:$E7EA PRG:27EA 18 + adc #$FC ; CPU:$E7EB PRG:27EB 69 FC + sta $0200,x ; CPU:$E7ED PRG:27ED 9D 00 02 + lda $0426 ; CPU:$E7F0 PRG:27F0 AD 26 04 + sta $0201,x ; CPU:$E7F3 PRG:27F3 9D 01 02 + lda $0427 ; CPU:$E7F6 PRG:27F6 AD 27 04 + sta $0202,x ; CPU:$E7F9 PRG:27F9 9D 02 02 + lda $0429 ; CPU:$E7FC PRG:27FC AD 29 04 + clc ; CPU:$E7FF PRG:27FF 18 + adc #$FC ; CPU:$E800 PRG:2800 69 FC + sta $0203,x ; CPU:$E802 PRG:2802 9D 03 02 +; ----------------------------------------------------------------------------- +; Routine: SubCE805 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE805: + rts ; CPU:$E805 PRG:2805 60 +; ----------------------------------------------------------------------------- +; Routine: Label_E806 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E806: + ldx $030E ; CPU:$E806 PRG:2806 AE 0E 03 + lda $04A8,x ; CPU:$E809 PRG:2809 BD A8 04 + cmp #$08 ; CPU:$E80C PRG:280C C9 08 + bcs SubCE805 ; CPU:$E80E PRG:280E B0 F5 + lda #$00 ; CPU:$E810 PRG:2810 A9 00 + sta $04F8 ; CPU:$E812 PRG:2812 8D F8 04 + sta $04F7 ; CPU:$E815 PRG:2815 8D F7 04 + stx $042E ; CPU:$E818 PRG:2818 8E 2E 04 + lda $F0A1,x ; CPU:$E81B PRG:281B BD A1 F0 + sta $0428 ; CPU:$E81E PRG:281E 8D 28 04 + lda $0309 ; CPU:$E821 PRG:2821 AD 09 03 +; ----------------------------------------------------------------------------- +; Routine: SubCE824 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE824: + ldy #$18 ; CPU:$E824 PRG:2824 A0 18 + ldx #$01 ; CPU:$E826 PRG:2826 A2 01 + cmp #$80 ; CPU:$E828 PRG:2828 C9 80 + bcs Label_E830 ; CPU:$E82A PRG:282A B0 04 + ldy #$E8 ; CPU:$E82C PRG:282C A0 E8 + ldx #$02 ; CPU:$E82E PRG:282E A2 02 +; ----------------------------------------------------------------------------- +; Routine: Label_E830 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E830: + sty $0429 ; CPU:$E830 PRG:2830 8C 29 04 + stx $0421 ; CPU:$E833 PRG:2833 8E 21 04 + lda #$01 ; CPU:$E836 PRG:2836 A9 01 + sta $0430 ; CPU:$E838 PRG:2838 8D 30 04 + jsr ToggleZpFC_Bit3 ; CPU:$E83B PRG:283B 20 6D E9 + ldx #$DB ; CPU:$E83E PRG:283E A2 DB + ldy #$EF ; CPU:$E840 PRG:2840 A0 EF +; ----------------------------------------------------------------------------- +; Routine: SubCE842 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE842: + stx $042C ; CPU:$E842 PRG:2842 8E 2C 04 + sty $042D ; CPU:$E845 PRG:2845 8C 2D 04 + bne SubCE805 ; CPU:$E848 PRG:2848 D0 BB +; ----------------------------------------------------------------------------- +; Routine: Label_E84A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E84A: + ldx $032E ; CPU:$E84A PRG:284A AE 2E 03 + lda $04A8,x ; CPU:$E84D PRG:284D BD A8 04 + cmp #$08 ; CPU:$E850 PRG:2850 C9 08 + bcs SubCE805 ; CPU:$E852 PRG:2852 B0 B1 + stx $042E ; CPU:$E854 PRG:2854 8E 2E 04 + lda $F0A1,x ; CPU:$E857 PRG:2857 BD A1 F0 + sta $0428 ; CPU:$E85A PRG:285A 8D 28 04 + lda #$00 ; CPU:$E85D PRG:285D A9 00 + sta $04FB ; CPU:$E85F PRG:285F 8D FB 04 + sta $04FA ; CPU:$E862 PRG:2862 8D FA 04 + lda $0329 ; CPU:$E865 PRG:2865 AD 29 03 + jmp SubCE824 ; CPU:$E868 PRG:2868 4C 24 E8 +; ----------------------------------------------------------------------------- +; Routine: SubCE86B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE86B: + cmp #$01 ; CPU:$E86B PRG:286B C9 01 + bne Label_E893 ; CPU:$E86D PRG:286D D0 24 + jsr CheckFlagsReturnCarry ; CPU:$E86F PRG:286F 20 25 EA + bcc Label_E877 ; CPU:$E872 PRG:2872 90 03 + jmp SubCE952 ; CPU:$E874 PRG:2874 4C 52 E9 +; ----------------------------------------------------------------------------- +; Routine: Label_E877 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E877: + jsr SubCE9D3 ; CPU:$E877 PRG:2877 20 D3 E9 + cmp #$FF ; CPU:$E87A PRG:287A C9 FF + bne Label_E889 ; CPU:$E87C PRG:287C D0 0B + lda #$10 ; CPU:$E87E PRG:287E A9 10 + sta $0430 ; CPU:$E880 PRG:2880 8D 30 04 +; ----------------------------------------------------------------------------- +; Routine: SubCE883 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE883: + ldx #$1B ; CPU:$E883 PRG:2883 A2 1B + ldy #$F0 ; CPU:$E885 PRG:2885 A0 F0 + bne SubCE842 ; CPU:$E887 PRG:2887 D0 B9 +; ----------------------------------------------------------------------------- +; Routine: Label_E889 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E889: + cmp #$00 ; CPU:$E889 PRG:2889 C9 00 + beq Label_E890 ; CPU:$E88B PRG:288B F0 03 + sta $0426 ; CPU:$E88D PRG:288D 8D 26 04 +; ----------------------------------------------------------------------------- +; Routine: Label_E890 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E890: + jmp SubCE7E4 ; CPU:$E890 PRG:2890 4C E4 E7 +; ----------------------------------------------------------------------------- +; Routine: Label_E893 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E893: + cmp #$02 ; CPU:$E893 PRG:2893 C9 02 + bne Label_E8D3 ; CPU:$E895 PRG:2895 D0 3C + jsr SubCE9D3 ; CPU:$E897 PRG:2897 20 D3 E9 + cmp #$FF ; CPU:$E89A PRG:289A C9 FF + bne Label_E889 ; CPU:$E89C PRG:289C D0 EB + jsr SubCE973 ; CPU:$E89E PRG:289E 20 73 E9 + ldy #$00 ; CPU:$E8A1 PRG:28A1 A0 00 + sty $0430 ; CPU:$E8A3 PRG:28A3 8C 30 04 + dey ; CPU:$E8A6 PRG:28A6 88 + lda Zp3A ; CPU:$E8A7 PRG:28A7 A5 3A + beq Label_E8AD ; CPU:$E8A9 PRG:28A9 F0 02 + ldy #$80 ; CPU:$E8AB PRG:28AB A0 80 +; ----------------------------------------------------------------------------- +; Routine: Label_E8AD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E8AD: + sty $0431 ; CPU:$E8AD PRG:28AD 8C 31 04 + lda #$F4 ; CPU:$E8B0 PRG:28B0 A9 F4 + sta $0428 ; CPU:$E8B2 PRG:28B2 8D 28 04 + ldx $042A ; CPU:$E8B5 PRG:28B5 AE 2A 04 + sta $0200,x ; CPU:$E8B8 PRG:28B8 9D 00 02 + jmp SubCE805 ; CPU:$E8BB PRG:28BB 4C 05 E8 +; ----------------------------------------------------------------------------- +; Routine: SubCE8BE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE8BE: + lda #$02 ; CPU:$E8BE PRG:28BE A9 02 + sta Zp00 ; CPU:$E8C0 PRG:28C0 85 00 + ldx Zp9F ; CPU:$E8C2 PRG:28C2 A6 9F + lda #$01 ; CPU:$E8C4 PRG:28C4 A9 01 + sta Zp9D,x ; CPU:$E8C6 PRG:28C6 95 9D + txa ; CPU:$E8C8 PRG:28C8 8A + ora #$08 ; CPU:$E8C9 PRG:28C9 09 08 + sta Zp01 ; CPU:$E8CB PRG:28CB 85 01 + jsr InitZerosIfZp30Zero ; CPU:$E8CD PRG:28CD 20 83 DE +; ----------------------------------------------------------------------------- +; Routine: Label_E8D0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E8D0: + jmp SubCE952 ; CPU:$E8D0 PRG:28D0 4C 52 E9 +; ----------------------------------------------------------------------------- +; Routine: Label_E8D3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E8D3: + jsr CheckFlagsReturnCarry ; CPU:$E8D3 PRG:28D3 20 25 EA + bcs Label_E8D0 ; CPU:$E8D6 PRG:28D6 B0 F8 + ldx $042E ; CPU:$E8D8 PRG:28D8 AE 2E 04 + lda $04A8,x ; CPU:$E8DB PRG:28DB BD A8 04 + cmp #$09 ; CPU:$E8DE PRG:28DE C9 09 + bcs Label_E8D0 ; CPU:$E8E0 PRG:28E0 B0 EE + lda $0421 ; CPU:$E8E2 PRG:28E2 AD 21 04 + lsr a ; CPU:$E8E5 PRG:28E5 4A + bcs Label_E92E ; CPU:$E8E6 PRG:28E6 B0 46 + lda $0429 ; CPU:$E8E8 PRG:28E8 AD 29 04 + cmp #$10 ; CPU:$E8EB PRG:28EB C9 10 + bcs Label_E8F2 ; CPU:$E8ED PRG:28ED B0 03 + jmp SubCE952 ; CPU:$E8EF PRG:28EF 4C 52 E9 +; ----------------------------------------------------------------------------- +; Routine: Label_E8F2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E8F2: + jsr SubCE9D3 ; CPU:$E8F2 PRG:28F2 20 D3 E9 + cmp #$AA ; CPU:$E8F5 PRG:28F5 C9 AA + beq SubCE883 ; CPU:$E8F7 PRG:28F7 F0 8A + cmp #$BB ; CPU:$E8F9 PRG:28F9 C9 BB + bne Label_E907 ; CPU:$E8FB PRG:28FB D0 0A + jsr SubCE95E ; CPU:$E8FD PRG:28FD 20 5E E9 + bne Label_E905 ; CPU:$E900 PRG:2900 D0 03 + jmp SubCE8BE ; CPU:$E902 PRG:2902 4C BE E8 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_E905: + lda #$00 ; CPU:$E905 PRG:2905 A9 00 +; ----------------------------------------------------------------------------- +; Routine: Label_E907 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E907: + dec $0429 ; CPU:$E907 PRG:2907 CE 29 04 +; ----------------------------------------------------------------------------- +; Routine: Label_E90A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E90A: + clc ; CPU:$E90A PRG:290A 18 + adc $0428 ; CPU:$E90B PRG:290B 6D 28 04 + sta $0428 ; CPU:$E90E PRG:290E 8D 28 04 +; ----------------------------------------------------------------------------- +; Routine: SubCE911 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE911: + ldx $0424 ; CPU:$E911 PRG:2911 AE 24 04 + lda $F4B2,x ; CPU:$E914 PRG:2914 BD B2 F4 + cmp #$FF ; CPU:$E917 PRG:2917 C9 FF + bne Label_E925 ; CPU:$E919 PRG:2919 D0 0A + inx ; CPU:$E91B PRG:291B E8 + lda $F4B2,x ; CPU:$E91C PRG:291C BD B2 F4 + sta $0424 ; CPU:$E91F PRG:291F 8D 24 04 + jmp SubCE911 ; CPU:$E922 PRG:2922 4C 11 E9 +; ----------------------------------------------------------------------------- +; Routine: Label_E925 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E925: + sta $0426 ; CPU:$E925 PRG:2925 8D 26 04 + inc $0424 ; CPU:$E928 PRG:2928 EE 24 04 + jmp SubCE7E4 ; CPU:$E92B PRG:292B 4C E4 E7 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_E92E: + lda $0429 ; CPU:$E92E PRG:292E AD 29 04 + cmp #$F4 ; CPU:$E931 PRG:2931 C9 F4 + bcs SubCE952 ; CPU:$E933 PRG:2933 B0 1D + jsr SubCE9D3 ; CPU:$E935 PRG:2935 20 D3 E9 + cmp #$AA ; CPU:$E938 PRG:2938 C9 AA + beq Label_E948 ; CPU:$E93A PRG:293A F0 0C + cmp #$BB ; CPU:$E93C PRG:293C C9 BB + bne Label_E94D ; CPU:$E93E PRG:293E D0 0D + jsr SubCE95E ; CPU:$E940 PRG:2940 20 5E E9 + bne Label_E94B ; CPU:$E943 PRG:2943 D0 06 + jmp SubCE8BE ; CPU:$E945 PRG:2945 4C BE E8 +; ----------------------------------------------------------------------------- +; Routine: Label_E948 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E948: + jmp SubCE883 ; CPU:$E948 PRG:2948 4C 83 E8 +; ----------------------------------------------------------------------------- +; Routine: Label_E94B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E94B: + lda #$00 ; CPU:$E94B PRG:294B A9 00 +; ----------------------------------------------------------------------------- +; Routine: Label_E94D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E94D: + inc $0429 ; CPU:$E94D PRG:294D EE 29 04 + bne Label_E90A ; CPU:$E950 PRG:2950 D0 B8 +; ----------------------------------------------------------------------------- +; Routine: SubCE952 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE952: + lda #$02 ; CPU:$E952 PRG:2952 A9 02 + sta $0430 ; CPU:$E954 PRG:2954 8D 30 04 + ldx #$06 ; CPU:$E957 PRG:2957 A2 06 + ldy #$F0 ; CPU:$E959 PRG:2959 A0 F0 + jmp SubCE842 ; CPU:$E95B PRG:295B 4C 42 E8 +; ----------------------------------------------------------------------------- +; Routine: SubCE95E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE95E: + lda $0428 ; CPU:$E95E PRG:295E AD 28 04 + jsr SubCEEA5 ; CPU:$E961 PRG:2961 20 A5 EE + ldy $0429 ; CPU:$E964 PRG:2964 AC 29 04 + jsr SubCEC67 ; CPU:$E967 PRG:2967 20 67 EC + ora #$00 ; CPU:$E96A PRG:296A 09 00 + rts ; CPU:$E96C PRG:296C 60 +; ----------------------------------------------------------------------------- +; Routine: ToggleZpFC_Bit3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ToggleZpFC_Bit3: + lda ZpFC ; CPU:$E96D PRG:296D A5 FC + ora #$08 ; CPU:$E96F PRG:296F 09 08 + bne Label_E977 ; CPU:$E971 PRG:2971 D0 04 +; ----------------------------------------------------------------------------- +; Routine: SubCE973 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE973: + lda ZpFC ; CPU:$E973 PRG:2973 A5 FC + and #$F7 ; CPU:$E975 PRG:2975 29 F7 +; ----------------------------------------------------------------------------- +; Routine: Label_E977 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E977: + sta ZpFC ; CPU:$E977 PRG:2977 85 FC + rts ; CPU:$E979 PRG:2979 60 +; ---- data $E97A-$E99F (38 bytes) ---- + .byte $AD, $F3, $04, $A4, $3A, $F0, $03, $18, $69, $04, $AA, $BD, $81, $F0, $8D, $F3 ; CPU:$E97A PRG:297A AD F3 04 A4 3A F0 03 18 69 04 AA BD 81 F0 8D F3 + .byte $04, $AD, $FC, $04, $8D, $FD, $04, $C0, $00, $F0, $03, $18, $69, $04, $AA, $BD ; CPU:$E98A PRG:298A 04 AD FC 04 8D FD 04 C0 00 F0 03 18 69 04 AA BD + .byte $89, $F0, $8D, $FC, $04, $60 ; CPU:$E99A PRG:299A 89 F0 8D FC 04 60 +; ----------------------------------------------------------------------------- +; Routine: SubCE9A0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE9A0: + ldx #$1F ; CPU:$E9A0 PRG:29A0 A2 1F +; ----------------------------------------------------------------------------- +; Routine: Label_E9A2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E9A2: + lda $F061,x ; CPU:$E9A2 PRG:29A2 BD 61 F0 + sta $0420,x ; CPU:$E9A5 PRG:29A5 9D 20 04 + dex ; CPU:$E9A8 PRG:29A8 CA + bpl Label_E9A2 ; CPU:$E9A9 PRG:29A9 10 F7 + rts ; CPU:$E9AB PRG:29AB 60 +; ----------------------------------------------------------------------------- +; Routine: SubCE9AC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE9AC: + ldx #$1F ; CPU:$E9AC PRG:29AC A2 1F +; ----------------------------------------------------------------------------- +; Routine: Label_E9AE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E9AE: + lda $EFBB,x ; CPU:$E9AE PRG:29AE BD BB EF + sta $0340,x ; CPU:$E9B1 PRG:29B1 9D 40 03 + dex ; CPU:$E9B4 PRG:29B4 CA + bpl Label_E9AE ; CPU:$E9B5 PRG:29B5 10 F7 + rts ; CPU:$E9B7 PRG:29B7 60 +; ----------------------------------------------------------------------------- +; Routine: SubCE9B8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE9B8: + ldy #$10 ; CPU:$E9B8 PRG:29B8 A0 10 + lda (Zp14),y ; CPU:$E9BA PRG:29BA B1 14 + cmp #$10 ; CPU:$E9BC PRG:29BC C9 10 + bne Label_E9D2 ; CPU:$E9BE PRG:29BE D0 12 + lda #$02 ; CPU:$E9C0 PRG:29C0 A9 02 + sta (Zp14),y ; CPU:$E9C2 PRG:29C2 91 14 + ldy #$0C ; CPU:$E9C4 PRG:29C4 A0 0C + lda #$06 ; CPU:$E9C6 PRG:29C6 A9 06 + sta (Zp14),y ; CPU:$E9C8 PRG:29C8 91 14 + iny ; CPU:$E9CA PRG:29CA C8 + lda #$F0 ; CPU:$E9CB PRG:29CB A9 F0 + sta (Zp14),y ; CPU:$E9CD PRG:29CD 91 14 + jmp SubCDCCE ; CPU:$E9CF PRG:29CF 4C CE DC +; ----------------------------------------------------------------------------- +; Routine: Label_E9D2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E9D2: + rts ; CPU:$E9D2 PRG:29D2 60 +; ----------------------------------------------------------------------------- +; Routine: SubCE9D3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE9D3: + lda #$00 ; CPU:$E9D3 PRG:29D3 A9 00 + ldx $042C ; CPU:$E9D5 PRG:29D5 AE 2C 04 + ldy $042D ; CPU:$E9D8 PRG:29D8 AC 2D 04 + jsr SubCE9FA ; CPU:$E9DB PRG:29DB 20 FA E9 + cmp #$CC ; CPU:$E9DE PRG:29DE C9 CC + bne Label_E9E8 ; CPU:$E9E0 PRG:29E0 D0 06 + jsr ToggleZpFC_Bit3 ; CPU:$E9E2 PRG:29E2 20 6D E9 + jmp SubCE9D3 ; CPU:$E9E5 PRG:29E5 4C D3 E9 +; ----------------------------------------------------------------------------- +; Routine: Label_E9E8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_E9E8: + cmp #$DD ; CPU:$E9E8 PRG:29E8 C9 DD + bne Label_E9D2 ; CPU:$E9EA PRG:29EA D0 E6 + jsr SubCE973 ; CPU:$E9EC PRG:29EC 20 73 E9 + jmp SubCE9D3 ; CPU:$E9EF PRG:29EF 4C D3 E9 +; ----------------------------------------------------------------------------- +; Routine: SubCE9F2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE9F2: + lda #$01 ; CPU:$E9F2 PRG:29F2 A9 01 + ldx $034C ; CPU:$E9F4 PRG:29F4 AE 4C 03 + ldy $034D ; CPU:$E9F7 PRG:29F7 AC 4D 03 +; ----------------------------------------------------------------------------- +; Routine: SubCE9FA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCE9FA: + sta Zp1E ; CPU:$E9FA PRG:29FA 85 1E + stx Zp14 ; CPU:$E9FC PRG:29FC 86 14 + sty Zp15 ; CPU:$E9FE PRG:29FE 84 15 + ldy #$00 ; CPU:$EA00 PRG:2A00 A0 00 + lda (Zp14),y ; CPU:$EA02 PRG:2A02 B1 14 + sty Zp13 ; CPU:$EA04 PRG:2A04 84 13 + iny ; CPU:$EA06 PRG:2A06 C8 + sty Zp12 ; CPU:$EA07 PRG:2A07 84 12 + jsr AdvanceDispatchPointer ; CPU:$EA09 PRG:2A09 20 B4 CD + pha ; CPU:$EA0C PRG:2A0C 48 + ldx Zp14 ; CPU:$EA0D PRG:2A0D A6 14 + ldy Zp15 ; CPU:$EA0F PRG:2A0F A4 15 + lda Zp1E ; CPU:$EA11 PRG:2A11 A5 1E + bne Label_EA1D ; CPU:$EA13 PRG:2A13 D0 08 + stx $042C ; CPU:$EA15 PRG:2A15 8E 2C 04 + sty $042D ; CPU:$EA18 PRG:2A18 8C 2D 04 + pla ; CPU:$EA1B PRG:2A1B 68 + rts ; CPU:$EA1C PRG:2A1C 60 +; ----------------------------------------------------------------------------- +; Routine: Label_EA1D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EA1D: + stx $034C ; CPU:$EA1D PRG:2A1D 8E 4C 03 + sty $034D ; CPU:$EA20 PRG:2A20 8C 4D 03 + pla ; CPU:$EA23 PRG:2A23 68 + rts ; CPU:$EA24 PRG:2A24 60 +; ----------------------------------------------------------------------------- +; Routine: CheckFlagsReturnCarry +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +CheckFlagsReturnCarry: + lda Zp51 ; CPU:$EA25 PRG:2A25 A5 51 + bne Label_EA2F ; CPU:$EA27 PRG:2A27 D0 06 + lda Zp71 ; CPU:$EA29 PRG:2A29 A5 71 + bne Label_EA2F ; CPU:$EA2B PRG:2A2B D0 02 + clc ; CPU:$EA2D PRG:2A2D 18 + rts ; CPU:$EA2E PRG:2A2E 60 +; ----------------------------------------------------------------------------- +; Routine: Label_EA2F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EA2F: + sec ; CPU:$EA2F PRG:2A2F 38 + rts ; CPU:$EA30 PRG:2A30 60 +; ----------------------------------------------------------------------------- +; Routine: SubCEA31 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEA31: + lda $04B0 ; CPU:$EA31 PRG:2A31 AD B0 04 + beq Label_EA37 ; CPU:$EA34 PRG:2A34 F0 01 +; ----------------------------------------------------------------------------- +; Routine: Label_EA36 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EA36: + rts ; CPU:$EA36 PRG:2A36 60 +; ----------------------------------------------------------------------------- +; Routine: Label_EA37 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EA37: + lda $04FC ; CPU:$EA37 PRG:2A37 AD FC 04 + bne Label_EA36 ; CPU:$EA3A PRG:2A3A D0 FA + lda $04BF ; CPU:$EA3C PRG:2A3C AD BF 04 + bne Label_EA4C ; CPU:$EA3F PRG:2A3F D0 0B + jsr SubCEEAD ; CPU:$EA41 PRG:2A41 20 AD EE + jsr SubCE9AC ; CPU:$EA44 PRG:2A44 20 AC E9 + lda #$01 ; CPU:$EA47 PRG:2A47 A9 01 + sta $04BF ; CPU:$EA49 PRG:2A49 8D BF 04 +; ----------------------------------------------------------------------------- +; Routine: Label_EA4C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EA4C: + lda $0430 ; CPU:$EA4C PRG:2A4C AD 30 04 + bne Label_EA54 ; CPU:$EA4F PRG:2A4F D0 03 + jsr SubCE973 ; CPU:$EA51 PRG:2A51 20 73 E9 +; ----------------------------------------------------------------------------- +; Routine: Label_EA54 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EA54: + lda $0350 ; CPU:$EA54 PRG:2A54 AD 50 03 + cmp #$10 ; CPU:$EA57 PRG:2A57 C9 10 + beq Label_EA97 ; CPU:$EA59 PRG:2A59 F0 3C + cmp #$01 ; CPU:$EA5B PRG:2A5B C9 01 + beq Label_EA91 ; CPU:$EA5D PRG:2A5D F0 32 + cmp #$02 ; CPU:$EA5F PRG:2A5F C9 02 + beq Label_EA94 ; CPU:$EA61 PRG:2A61 F0 31 + lda #$28 ; CPU:$EA63 PRG:2A63 A9 28 + sta $0348 ; CPU:$EA65 PRG:2A65 8D 48 03 + lda #$50 ; CPU:$EA68 PRG:2A68 A9 50 + sta $0349 ; CPU:$EA6A PRG:2A6A 8D 49 03 + lda $0342 ; CPU:$EA6D PRG:2A6D AD 42 03 + bne Label_EA79 ; CPU:$EA70 PRG:2A70 D0 07 + lda #$02 ; CPU:$EA72 PRG:2A72 A9 02 + sta $0355 ; CPU:$EA74 PRG:2A74 8D 55 03 + bne Label_EA7C ; CPU:$EA77 PRG:2A77 D0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_EA79 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EA79: + dec $0342 ; CPU:$EA79 PRG:2A79 CE 42 03 +; ----------------------------------------------------------------------------- +; Routine: Label_EA7C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EA7C: + jsr CheckFlagsReturnCarry ; CPU:$EA7C PRG:2A7C 20 25 EA + bcs Label_EA90 ; CPU:$EA7F PRG:2A7F B0 0F + lda #$01 ; CPU:$EA81 PRG:2A81 A9 01 + ldx #$9D ; CPU:$EA83 PRG:2A83 A2 9D + ldy #$EF ; CPU:$EA85 PRG:2A85 A0 EF +; ----------------------------------------------------------------------------- +; Routine: SubCEA87 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEA87: + sta $0350 ; CPU:$EA87 PRG:2A87 8D 50 03 + stx $034C ; CPU:$EA8A PRG:2A8A 8E 4C 03 + sty $034D ; CPU:$EA8D PRG:2A8D 8C 4D 03 +; ----------------------------------------------------------------------------- +; Routine: Label_EA90 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EA90: + rts ; CPU:$EA90 PRG:2A90 60 +; ----------------------------------------------------------------------------- +; Routine: Label_EA91 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EA91: + jmp SubCEC14 ; CPU:$EA91 PRG:2A91 4C 14 EC +; ----------------------------------------------------------------------------- +; Routine: Label_EA94 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EA94: + jmp SubCEC30 ; CPU:$EA94 PRG:2A94 4C 30 EC +; ----------------------------------------------------------------------------- +; Routine: Label_EA97 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EA97: + jsr CheckFlagsReturnCarry ; CPU:$EA97 PRG:2A97 20 25 EA + bcc Label_EA9F ; CPU:$EA9A PRG:2A9A 90 03 + jmp SubCEBE9 ; CPU:$EA9C PRG:2A9C 4C E9 EB +; ----------------------------------------------------------------------------- +; Routine: Label_EA9F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EA9F: + lda $0348 ; CPU:$EA9F PRG:2A9F AD 48 03 + cmp #$18 ; CPU:$EAA2 PRG:2AA2 C9 18 + bcs Label_EABD ; CPU:$EAA4 PRG:2AA4 B0 17 + lda $04FF ; CPU:$EAA6 PRG:2AA6 AD FF 04 + bne Label_EAB5 ; CPU:$EAA9 PRG:2AA9 D0 0A + lda $0348 ; CPU:$EAAB PRG:2AAB AD 48 03 + cmp #$0C ; CPU:$EAAE PRG:2AAE C9 0C + bcs SubCEADF ; CPU:$EAB0 PRG:2AB0 B0 2D + jmp SubCEBE9 ; CPU:$EAB2 PRG:2AB2 4C E9 EB +; ----------------------------------------------------------------------------- +; Routine: Label_EAB5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EAB5: + lda #$01 ; CPU:$EAB5 PRG:2AB5 A9 01 +; ----------------------------------------------------------------------------- +; Routine: Label_EAB7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EAB7: + sta $0351 ; CPU:$EAB7 PRG:2AB7 8D 51 03 + jmp SubCEADF ; CPU:$EABA PRG:2ABA 4C DF EA +; ----------------------------------------------------------------------------- +; Routine: Label_EABD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EABD: + cmp #$D4 ; CPU:$EABD PRG:2ABD C9 D4 + bcc Label_EAC5 ; CPU:$EABF PRG:2ABF 90 04 + lda #$00 ; CPU:$EAC1 PRG:2AC1 A9 00 + beq Label_EAB7 ; CPU:$EAC3 PRG:2AC3 F0 F2 +; ----------------------------------------------------------------------------- +; Routine: Label_EAC5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EAC5: + lda $0349 ; CPU:$EAC5 PRG:2AC5 AD 49 03 + cmp #$0C ; CPU:$EAC8 PRG:2AC8 C9 0C + bcs Label_EAD3 ; CPU:$EACA PRG:2ACA B0 07 + jsr SubCEEBC ; CPU:$EACC PRG:2ACC 20 BC EE + lda #$00 ; CPU:$EACF PRG:2ACF A9 00 + beq Label_EADC ; CPU:$EAD1 PRG:2AD1 F0 09 +; ----------------------------------------------------------------------------- +; Routine: Label_EAD3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EAD3: + cmp #$F8 ; CPU:$EAD3 PRG:2AD3 C9 F8 + bcc Label_EAE2 ; CPU:$EAD5 PRG:2AD5 90 0B + jsr SubCEECC ; CPU:$EAD7 PRG:2AD7 20 CC EE + lda #$01 ; CPU:$EADA PRG:2ADA A9 01 +; ----------------------------------------------------------------------------- +; Routine: Label_EADC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EADC: + sta $0341 ; CPU:$EADC PRG:2ADC 8D 41 03 +; ----------------------------------------------------------------------------- +; Routine: SubCEADF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEADF: + jsr ToggleZpFC_Bit3 ; CPU:$EADF PRG:2ADF 20 6D E9 +; ----------------------------------------------------------------------------- +; Routine: Label_EAE2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EAE2: + lda $034B ; CPU:$EAE2 PRG:2AE2 AD 4B 03 + beq Label_EAED ; CPU:$EAE5 PRG:2AE5 F0 06 + dec $034B ; CPU:$EAE7 PRG:2AE7 CE 4B 03 + jmp SubCEB6B ; CPU:$EAEA PRG:2AEA 4C 6B EB +; ----------------------------------------------------------------------------- +; Routine: Label_EAED +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EAED: + lda $035B ; CPU:$EAED PRG:2AED AD 5B 03 + jsr CheckRangeReturn012 ; CPU:$EAF0 PRG:2AF0 20 A4 CA + cmp #$00 ; CPU:$EAF3 PRG:2AF3 C9 00 + beq SubCEB6B ; CPU:$EAF5 PRG:2AF5 F0 74 + cmp #$02 ; CPU:$EAF7 PRG:2AF7 C9 02 + bne Label_EB1C ; CPU:$EAF9 PRG:2AF9 D0 21 + lda $0348 ; CPU:$EAFB PRG:2AFB AD 48 03 + jsr SubCEEA5 ; CPU:$EAFE PRG:2AFE 20 A5 EE + ldy $0349 ; CPU:$EB01 PRG:2B01 AC 49 03 + jsr SubCEC67 ; CPU:$EB04 PRG:2B04 20 67 EC + lda #$10 ; CPU:$EB07 PRG:2B07 A9 10 + sta Zp00 ; CPU:$EB09 PRG:2B09 85 00 + ldx Zp9F ; CPU:$EB0B PRG:2B0B A6 9F + lda #$01 ; CPU:$EB0D PRG:2B0D A9 01 + sta Zp9D,x ; CPU:$EB0F PRG:2B0F 95 9D + txa ; CPU:$EB11 PRG:2B11 8A + ora #$08 ; CPU:$EB12 PRG:2B12 09 08 + sta Zp01 ; CPU:$EB14 PRG:2B14 85 01 + jsr InitZerosIfZp30Zero ; CPU:$EB16 PRG:2B16 20 83 DE + jmp SubCEBE9 ; CPU:$EB19 PRG:2B19 4C E9 EB +; ----------------------------------------------------------------------------- +; Routine: Label_EB1C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EB1C: + jsr ToggleZpFC_Bit3 ; CPU:$EB1C PRG:2B1C 20 6D E9 + jsr TestRamFlagPair0500 ; CPU:$EB1F PRG:2B1F 20 28 D3 + and #$01 ; CPU:$EB22 PRG:2B22 29 01 + clc ; CPU:$EB24 PRG:2B24 18 + adc $0343 ; CPU:$EB25 PRG:2B25 6D 43 03 + sta $0343 ; CPU:$EB28 PRG:2B28 8D 43 03 + lda #$08 ; CPU:$EB2B PRG:2B2B A9 08 + sta $034B ; CPU:$EB2D PRG:2B2D 8D 4B 03 + ldx #$00 ; CPU:$EB30 PRG:2B30 A2 00 +; ----------------------------------------------------------------------------- +; Routine: Label_EB32 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EB32: + lda $F574,x ; CPU:$EB32 PRG:2B32 BD 74 F5 + cmp $0357 ; CPU:$EB35 PRG:2B35 CD 57 03 + bne Label_EB42 ; CPU:$EB38 PRG:2B38 D0 08 + lda $F575,x ; CPU:$EB3A PRG:2B3A BD 75 F5 + cmp $0358 ; CPU:$EB3D PRG:2B3D CD 58 03 + beq Label_EB4A ; CPU:$EB40 PRG:2B40 F0 08 +; ----------------------------------------------------------------------------- +; Routine: Label_EB42 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EB42: + inx ; CPU:$EB42 PRG:2B42 E8 + inx ; CPU:$EB43 PRG:2B43 E8 + cpx #$10 ; CPU:$EB44 PRG:2B44 E0 10 + bne Label_EB32 ; CPU:$EB46 PRG:2B46 D0 EA + beq Label_EB53 ; CPU:$EB48 PRG:2B48 F0 09 +; ----------------------------------------------------------------------------- +; Routine: Label_EB4A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EB4A: + cpx #$08 ; CPU:$EB4A PRG:2B4A E0 08 + bcc Label_EB5E ; CPU:$EB4C PRG:2B4C 90 10 + lda $0341 ; CPU:$EB4E PRG:2B4E AD 41 03 + beq Label_EB63 ; CPU:$EB51 PRG:2B51 F0 10 +; ----------------------------------------------------------------------------- +; Routine: Label_EB53 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EB53: + lda $0351 ; CPU:$EB53 PRG:2B53 AD 51 03 + eor #$01 ; CPU:$EB56 PRG:2B56 49 01 + sta $0351 ; CPU:$EB58 PRG:2B58 8D 51 03 + jmp SubCEB6B ; CPU:$EB5B PRG:2B5B 4C 6B EB +; ----------------------------------------------------------------------------- +; Routine: Label_EB5E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EB5E: + lda $0341 ; CPU:$EB5E PRG:2B5E AD 41 03 + beq Label_EB53 ; CPU:$EB61 PRG:2B61 F0 F0 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_EB63: + lda $0341 ; CPU:$EB63 PRG:2B63 AD 41 03 + eor #$01 ; CPU:$EB66 PRG:2B66 49 01 + sta $0341 ; CPU:$EB68 PRG:2B68 8D 41 03 +; ----------------------------------------------------------------------------- +; Routine: SubCEB6B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEB6B: + ldy #$04 ; CPU:$EB6B PRG:2B6B A0 04 + lda $0341 ; CPU:$EB6D PRG:2B6D AD 41 03 + beq Label_EB74 ; CPU:$EB70 PRG:2B70 F0 02 + ldy #$FC ; CPU:$EB72 PRG:2B72 A0 FC +; ----------------------------------------------------------------------------- +; Routine: Label_EB74 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EB74: + tya ; CPU:$EB74 PRG:2B74 98 + clc ; CPU:$EB75 PRG:2B75 18 + adc $0349 ; CPU:$EB76 PRG:2B76 6D 49 03 + sta Zp00 ; CPU:$EB79 PRG:2B79 85 00 + ldy #$04 ; CPU:$EB7B PRG:2B7B A0 04 + lda $0351 ; CPU:$EB7D PRG:2B7D AD 51 03 + bne Label_EB84 ; CPU:$EB80 PRG:2B80 D0 02 + ldy #$FC ; CPU:$EB82 PRG:2B82 A0 FC +; ----------------------------------------------------------------------------- +; Routine: Label_EB84 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EB84: + tya ; CPU:$EB84 PRG:2B84 98 + clc ; CPU:$EB85 PRG:2B85 18 + adc $0348 ; CPU:$EB86 PRG:2B86 6D 48 03 + sta Zp01 ; CPU:$EB89 PRG:2B89 85 01 + jsr SubCCA7D ; CPU:$EB8B PRG:2B8B 20 7D CA + lda Zp00 ; CPU:$EB8E PRG:2B8E A5 00 + sta $0358 ; CPU:$EB90 PRG:2B90 8D 58 03 + sta $0528 ; CPU:$EB93 PRG:2B93 8D 28 05 + lda Zp01 ; CPU:$EB96 PRG:2B96 A5 01 + sta $0357 ; CPU:$EB98 PRG:2B98 8D 57 03 + sta $0529 ; CPU:$EB9B PRG:2B9B 8D 29 05 + lda $0343 ; CPU:$EB9E PRG:2B9E AD 43 03 + bne Label_EC13 ; CPU:$EBA1 PRG:2BA1 D0 70 + lda $0342 ; CPU:$EBA3 PRG:2BA3 AD 42 03 + sta $0343 ; CPU:$EBA6 PRG:2BA6 8D 43 03 + lda $0348 ; CPU:$EBA9 PRG:2BA9 AD 48 03 + ldy $0351 ; CPU:$EBAC PRG:2BAC AC 51 03 + bne Label_EBB8 ; CPU:$EBAF PRG:2BAF D0 07 + sec ; CPU:$EBB1 PRG:2BB1 38 + sbc $0355 ; CPU:$EBB2 PRG:2BB2 ED 55 03 + jmp SubCEBBC ; CPU:$EBB5 PRG:2BB5 4C BC EB +; ----------------------------------------------------------------------------- +; Routine: Label_EBB8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EBB8: + clc ; CPU:$EBB8 PRG:2BB8 18 + adc $0355 ; CPU:$EBB9 PRG:2BB9 6D 55 03 +; ----------------------------------------------------------------------------- +; Routine: SubCEBBC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEBBC: + sta $0348 ; CPU:$EBBC PRG:2BBC 8D 48 03 + lda $0341 ; CPU:$EBBF PRG:2BBF AD 41 03 + bne Label_EBC9 ; CPU:$EBC2 PRG:2BC2 D0 05 + inc $0349 ; CPU:$EBC4 PRG:2BC4 EE 49 03 + bne SubCEBCC ; CPU:$EBC7 PRG:2BC7 D0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_EBC9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EBC9: + dec $0349 ; CPU:$EBC9 PRG:2BC9 CE 49 03 +; ----------------------------------------------------------------------------- +; Routine: SubCEBCC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEBCC: + ldx $0344 ; CPU:$EBCC PRG:2BCC AE 44 03 + lda $F4B2,x ; CPU:$EBCF PRG:2BCF BD B2 F4 + cmp #$FF ; CPU:$EBD2 PRG:2BD2 C9 FF + bne Label_EBE0 ; CPU:$EBD4 PRG:2BD4 D0 0A + inx ; CPU:$EBD6 PRG:2BD6 E8 + lda $F4B2,x ; CPU:$EBD7 PRG:2BD7 BD B2 F4 + sta $0344 ; CPU:$EBDA PRG:2BDA 8D 44 03 + jmp SubCEBCC ; CPU:$EBDD PRG:2BDD 4C CC EB +; ----------------------------------------------------------------------------- +; Routine: Label_EBE0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EBE0: + sta $0346 ; CPU:$EBE0 PRG:2BE0 8D 46 03 + inc $0344 ; CPU:$EBE3 PRG:2BE3 EE 44 03 + jmp SubCEBF2 ; CPU:$EBE6 PRG:2BE6 4C F2 EB +; ----------------------------------------------------------------------------- +; Routine: SubCEBE9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEBE9: + lda #$02 ; CPU:$EBE9 PRG:2BE9 A9 02 + ldx #$06 ; CPU:$EBEB PRG:2BEB A2 06 + ldy #$F0 ; CPU:$EBED PRG:2BED A0 F0 + jmp SubCEA87 ; CPU:$EBEF PRG:2BEF 4C 87 EA +; ----------------------------------------------------------------------------- +; Routine: SubCEBF2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEBF2: + ldx $034A ; CPU:$EBF2 PRG:2BF2 AE 4A 03 + lda $0348 ; CPU:$EBF5 PRG:2BF5 AD 48 03 + clc ; CPU:$EBF8 PRG:2BF8 18 + adc #$FC ; CPU:$EBF9 PRG:2BF9 69 FC + sta $0200,x ; CPU:$EBFB PRG:2BFB 9D 00 02 + lda $0346 ; CPU:$EBFE PRG:2BFE AD 46 03 + sta $0201,x ; CPU:$EC01 PRG:2C01 9D 01 02 + lda $0347 ; CPU:$EC04 PRG:2C04 AD 47 03 + sta $0202,x ; CPU:$EC07 PRG:2C07 9D 02 02 + lda $0349 ; CPU:$EC0A PRG:2C0A AD 49 03 + clc ; CPU:$EC0D PRG:2C0D 18 + adc #$FC ; CPU:$EC0E PRG:2C0E 69 FC + sta $0203,x ; CPU:$EC10 PRG:2C10 9D 03 02 +; ----------------------------------------------------------------------------- +; Routine: Label_EC13 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EC13: + rts ; CPU:$EC13 PRG:2C13 60 +; ----------------------------------------------------------------------------- +; Routine: SubCEC14 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEC14: + jsr SubCE9F2 ; CPU:$EC14 PRG:2C14 20 F2 E9 + cmp #$FF ; CPU:$EC17 PRG:2C17 C9 FF + beq Label_EC25 ; CPU:$EC19 PRG:2C19 F0 0A +; ----------------------------------------------------------------------------- +; Routine: Label_EC1B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EC1B: + cmp #$00 ; CPU:$EC1B PRG:2C1B C9 00 + beq Label_EC13 ; CPU:$EC1D PRG:2C1D F0 F4 + sta $0346 ; CPU:$EC1F PRG:2C1F 8D 46 03 + jmp SubCEBF2 ; CPU:$EC22 PRG:2C22 4C F2 EB +; ----------------------------------------------------------------------------- +; Routine: Label_EC25 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EC25: + lda #$10 ; CPU:$EC25 PRG:2C25 A9 10 + sta $0350 ; CPU:$EC27 PRG:2C27 8D 50 03 + lda #$1E ; CPU:$EC2A PRG:2C2A A9 1E + sta $04FF ; CPU:$EC2C PRG:2C2C 8D FF 04 + rts ; CPU:$EC2F PRG:2C2F 60 +; ----------------------------------------------------------------------------- +; Routine: SubCEC30 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEC30: + jsr SubCE9F2 ; CPU:$EC30 PRG:2C30 20 F2 E9 + cmp #$FF ; CPU:$EC33 PRG:2C33 C9 FF + bne Label_EC1B ; CPU:$EC35 PRG:2C35 D0 E4 + ldx $034A ; CPU:$EC37 PRG:2C37 AE 4A 03 + lda #$F4 ; CPU:$EC3A PRG:2C3A A9 F4 + sta $0200,x ; CPU:$EC3C PRG:2C3C 9D 00 02 + lda #$00 ; CPU:$EC3F PRG:2C3F A9 00 + sta $0350 ; CPU:$EC41 PRG:2C41 8D 50 03 + lda $04FE ; CPU:$EC44 PRG:2C44 AD FE 04 + cmp #$02 ; CPU:$EC47 PRG:2C47 C9 02 + beq Label_EC51 ; CPU:$EC49 PRG:2C49 F0 06 + inc $04FE ; CPU:$EC4B PRG:2C4B EE FE 04 + lda $04FE ; CPU:$EC4E PRG:2C4E AD FE 04 +; ----------------------------------------------------------------------------- +; Routine: Label_EC51 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EC51: + lsr a ; CPU:$EC51 PRG:2C51 4A + lsr a ; CPU:$EC52 PRG:2C52 4A + lsr a ; CPU:$EC53 PRG:2C53 4A + ldy Zp3A ; CPU:$EC54 PRG:2C54 A4 3A + beq Label_EC5B ; CPU:$EC56 PRG:2C56 F0 03 + clc ; CPU:$EC58 PRG:2C58 18 + adc #$04 ; CPU:$EC59 PRG:2C59 69 04 +; ----------------------------------------------------------------------------- +; Routine: Label_EC5B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EC5B: + clc ; CPU:$EC5B PRG:2C5B 18 + adc $04FD ; CPU:$EC5C PRG:2C5C 6D FD 04 + tax ; CPU:$EC5F PRG:2C5F AA + lda $F089,x ; CPU:$EC60 PRG:2C60 BD 89 F0 + sta $04FC ; CPU:$EC63 PRG:2C63 8D FC 04 + rts ; CPU:$EC66 PRG:2C66 60 +; ----------------------------------------------------------------------------- +; Routine: SubCEC67 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEC67: + lda #$00 ; CPU:$EC67 PRG:2C67 A9 00 + sta Zp9F ; CPU:$EC69 PRG:2C69 85 9F + sty Zp1F ; CPU:$EC6B PRG:2C6B 84 1F + ldy #$00 ; CPU:$EC6D PRG:2C6D A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_EC6F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EC6F: + lda $0084,y ; CPU:$EC6F PRG:2C6F B9 84 00 + beq Label_EC91 ; CPU:$EC72 PRG:2C72 F0 1D + txa ; CPU:$EC74 PRG:2C74 8A + cmp $0085,y ; CPU:$EC75 PRG:2C75 D9 85 00 + bne Label_EC91 ; CPU:$EC78 PRG:2C78 D0 17 + lda Zp1F ; CPU:$EC7A PRG:2C7A A5 1F + sec ; CPU:$EC7C PRG:2C7C 38 + sbc #$10 ; CPU:$EC7D PRG:2C7D E9 10 + cmp $0086,y ; CPU:$EC7F PRG:2C7F D9 86 00 + bcs Label_EC91 ; CPU:$EC82 PRG:2C82 B0 0D + lda Zp1F ; CPU:$EC84 PRG:2C84 A5 1F + clc ; CPU:$EC86 PRG:2C86 18 + adc #$10 ; CPU:$EC87 PRG:2C87 69 10 + cmp $0086,y ; CPU:$EC89 PRG:2C89 D9 86 00 + bcc Label_EC91 ; CPU:$EC8C PRG:2C8C 90 03 + lda #$00 ; CPU:$EC8E PRG:2C8E A9 00 + rts ; CPU:$EC90 PRG:2C90 60 +; ----------------------------------------------------------------------------- +; Routine: Label_EC91 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EC91: + inc Zp9F ; CPU:$EC91 PRG:2C91 E6 9F + ldy #$05 ; CPU:$EC93 PRG:2C93 A0 05 + lda Zp9F ; CPU:$EC95 PRG:2C95 A5 9F + cmp #$02 ; CPU:$EC97 PRG:2C97 C9 02 + bne Label_EC6F ; CPU:$EC99 PRG:2C99 D0 D4 + lda #$00 ; CPU:$EC9B PRG:2C9B A9 00 + sta Zp9F ; CPU:$EC9D PRG:2C9D 85 9F + lda #$FF ; CPU:$EC9F PRG:2C9F A9 FF + rts ; CPU:$ECA1 PRG:2CA1 60 +; ----------------------------------------------------------------------------- +; Routine: SubCECA2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCECA2: + lda $04C0 ; CPU:$ECA2 PRG:2CA2 AD C0 04 + bne Label_ECAA ; CPU:$ECA5 PRG:2CA5 D0 03 +; ----------------------------------------------------------------------------- +; Routine: Label_ECA7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_ECA7: + jmp SubCD904 ; CPU:$ECA7 PRG:2CA7 4C 04 D9 +; ----------------------------------------------------------------------------- +; Routine: Label_ECAA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_ECAA: + lda $04C1 ; CPU:$ECAA PRG:2CAA AD C1 04 + bne Label_ECA7 ; CPU:$ECAD PRG:2CAD D0 F8 +; ----------------------------------------------------------------------------- +; Routine: SubCECAF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCECAF: + lda #$FF ; CPU:$ECAF PRG:2CAF A9 FF + sta $04C2 ; CPU:$ECB1 PRG:2CB1 8D C2 04 + lda #$01 ; CPU:$ECB4 PRG:2CB4 A9 01 + sta $04C1 ; CPU:$ECB6 PRG:2CB6 8D C1 04 + ldy ZpBA ; CPU:$ECB9 PRG:2CB9 A4 BA + ldx #$1F ; CPU:$ECBB PRG:2CBB A2 1F +; ----------------------------------------------------------------------------- +; Routine: Label_ECBD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_ECBD: + lda $ECCC,x ; CPU:$ECBD PRG:2CBD BD CC EC + sta ZpB0,x ; CPU:$ECC0 PRG:2CC0 95 B0 + dex ; CPU:$ECC2 PRG:2CC2 CA + bpl Label_ECBD ; CPU:$ECC3 PRG:2CC3 10 F8 + sty ZpBA ; CPU:$ECC5 PRG:2CC5 84 BA + ldy #$04 ; CPU:$ECC7 PRG:2CC7 A0 04 + jmp InitSpritesOffscreen ; CPU:$ECC9 PRG:2CC9 4C C4 DF +; ---- data $ECCC-$ECEB (32 bytes) ---- +; referenced by `lda $ECCC,x` at $ECBD (operand $ECCC falls inside this region) + .byte $01, $00, $02, $00, $33, $05, $8C, $23, $00, $00, $00, $00, $4C, $F6, $00, $80 ; CPU:$ECCC PRG:2CCC 01 00 02 00 33 05 8C 23 00 00 00 00 4C F6 00 80 + .byte $00, $00, $01, $0A, $02, $01, $00, $00, $00, $00, $00, $00, $00, $00, $04, $03 ; CPU:$ECDC PRG:2CDC 00 00 01 0A 02 01 00 00 00 00 00 00 00 00 04 03 +; ----------------------------------------------------------------------------- +; Routine: SubCECEC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCECEC: + lda ZpBF ; CPU:$ECEC PRG:2CEC A5 BF + cmp #$80 ; CPU:$ECEE PRG:2CEE C9 80 + beq Label_ECFB ; CPU:$ECF0 PRG:2CF0 F0 09 +; ----------------------------------------------------------------------------- +; Routine: Label_ECF2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_ECF2: + jmp SubCC6BF ; CPU:$ECF2 PRG:2CF2 4C BF C6 +; ---- data $ECF5-$ECFA (6 bytes) ---- + .byte $20, $BD, $DF, $4C, $5A, $C7 ; CPU:$ECF5 PRG:2CF5 20 BD DF 4C 5A C7 +; ----------------------------------------------------------------------------- +; Routine: Label_ECFB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_ECFB: + lda ZpC0 ; CPU:$ECFB PRG:2CFB A5 C0 + bne Label_ECF2 ; CPU:$ECFD PRG:2CFD D0 F3 + lda $04C2 ; CPU:$ECFF PRG:2CFF AD C2 04 + beq Label_ED20 ; CPU:$ED02 PRG:2D02 F0 1C + dec $04C2 ; CPU:$ED04 PRG:2D04 CE C2 04 + bne Label_ECF2 ; CPU:$ED07 PRG:2D07 D0 E9 + jsr TestRamFlagPair0500 ; CPU:$ED09 PRG:2D09 20 28 D3 + ldy #$01 ; CPU:$ED0C PRG:2D0C A0 01 + ldx #$F0 ; CPU:$ED0E PRG:2D0E A2 F0 + and #$01 ; CPU:$ED10 PRG:2D10 29 01 + beq Label_ED18 ; CPU:$ED12 PRG:2D12 F0 04 + ldy #$02 ; CPU:$ED14 PRG:2D14 A0 02 + ldx #$10 ; CPU:$ED16 PRG:2D16 A2 10 +; ----------------------------------------------------------------------------- +; Routine: Label_ED18 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_ED18: + sty ZpC2 ; CPU:$ED18 PRG:2D18 84 C2 + sty ZpB1 ; CPU:$ED1A PRG:2D1A 84 B1 + stx ZpB9 ; CPU:$ED1C PRG:2D1C 86 B9 + bne Label_ECF2 ; CPU:$ED1E PRG:2D1E D0 D2 +; ----------------------------------------------------------------------------- +; Routine: Label_ED20 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_ED20: + lda ZpC1 ; CPU:$ED20 PRG:2D20 A5 C1 + bne Label_ED6C ; CPU:$ED22 PRG:2D22 D0 48 + lda ZpB1 ; CPU:$ED24 PRG:2D24 A5 B1 + and #$C0 ; CPU:$ED26 PRG:2D26 29 C0 + bne Label_ECF2 ; CPU:$ED28 PRG:2D28 D0 C8 + ldy ZpB9 ; CPU:$ED2A PRG:2D2A A4 B9 + lda ZpBE ; CPU:$ED2C PRG:2D2C A5 BE + cmp #$01 ; CPU:$ED2E PRG:2D2E C9 01 + beq Label_ED40 ; CPU:$ED30 PRG:2D30 F0 0E + cmp #$02 ; CPU:$ED32 PRG:2D32 C9 02 + bne Label_ECF2 ; CPU:$ED34 PRG:2D34 D0 BC + cpy #$80 ; CPU:$ED36 PRG:2D36 C0 80 + bne Label_ECF2 ; CPU:$ED38 PRG:2D38 D0 B8 + lda #$00 ; CPU:$ED3A PRG:2D3A A9 00 + ldx #$00 ; CPU:$ED3C PRG:2D3C A2 00 + beq Label_ED50 ; CPU:$ED3E PRG:2D3E F0 10 +; ----------------------------------------------------------------------------- +; Routine: Label_ED40 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_ED40: + lda #$09 ; CPU:$ED40 PRG:2D40 A9 09 + ldx #$01 ; CPU:$ED42 PRG:2D42 A2 01 + cpy #$30 ; CPU:$ED44 PRG:2D44 C0 30 + beq Label_ED50 ; CPU:$ED46 PRG:2D46 F0 08 + cpy #$D0 ; CPU:$ED48 PRG:2D48 C0 D0 + bne Label_ECF2 ; CPU:$ED4A PRG:2D4A D0 A6 + lda #$10 ; CPU:$ED4C PRG:2D4C A9 10 + ldx #$02 ; CPU:$ED4E PRG:2D4E A2 02 +; ----------------------------------------------------------------------------- +; Routine: Label_ED50 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_ED50: + tay ; CPU:$ED50 PRG:2D50 A8 + lda $04CD,x ; CPU:$ED51 PRG:2D51 BD CD 04 + bne Label_ECF2 ; CPU:$ED54 PRG:2D54 D0 9C + lda #$01 ; CPU:$ED56 PRG:2D56 A9 01 + stx $04CC ; CPU:$ED58 PRG:2D58 8E CC 04 + tya ; CPU:$ED5B PRG:2D5B 98 + sta $04C6 ; CPU:$ED5C PRG:2D5C 8D C6 04 + lda #$00 ; CPU:$ED5F PRG:2D5F A9 00 + sta $04C5 ; CPU:$ED61 PRG:2D61 8D C5 04 + sta ZpB1 ; CPU:$ED64 PRG:2D64 85 B1 + lda #$80 ; CPU:$ED66 PRG:2D66 A9 80 + sta ZpC1 ; CPU:$ED68 PRG:2D68 85 C1 + bne Label_ECF2 ; CPU:$ED6A PRG:2D6A D0 86 +; ----------------------------------------------------------------------------- +; Routine: Label_ED6C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_ED6C: + dec ZpC1 ; CPU:$ED6C PRG:2D6C C6 C1 + beq Label_EDAC ; CPU:$ED6E PRG:2D6E F0 3C + lda ZpC1 ; CPU:$ED70 PRG:2D70 A5 C1 + ldy #$6A ; CPU:$ED72 PRG:2D72 A0 6A + cmp #$20 ; CPU:$ED74 PRG:2D74 C9 20 + beq Label_ED9C ; CPU:$ED76 PRG:2D76 F0 24 + cmp #$40 ; CPU:$ED78 PRG:2D78 C9 40 + bne SubCEDA9 ; CPU:$ED7A PRG:2D7A D0 2D + lda ZpB8 ; CPU:$ED7C PRG:2D7C A5 B8 + clc ; CPU:$ED7E PRG:2D7E 18 + adc #$07 ; CPU:$ED7F PRG:2D7F 69 07 + sta $02B0 ; CPU:$ED81 PRG:2D81 8D B0 02 + sta $02B4 ; CPU:$ED84 PRG:2D84 8D B4 02 + lda #$03 ; CPU:$ED87 PRG:2D87 A9 03 + sta $02B2 ; CPU:$ED89 PRG:2D89 8D B2 02 + sta $02B6 ; CPU:$ED8C PRG:2D8C 8D B6 02 + lda ZpB9 ; CPU:$ED8F PRG:2D8F A5 B9 + sta $02B7 ; CPU:$ED91 PRG:2D91 8D B7 02 + sec ; CPU:$ED94 PRG:2D94 38 + sbc #$08 ; CPU:$ED95 PRG:2D95 E9 08 + sta $02B3 ; CPU:$ED97 PRG:2D97 8D B3 02 + ldy #$68 ; CPU:$ED9A PRG:2D9A A0 68 +; ----------------------------------------------------------------------------- +; Routine: Label_ED9C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_ED9C: + sty $02B1 ; CPU:$ED9C PRG:2D9C 8C B1 02 + iny ; CPU:$ED9F PRG:2D9F C8 + sty $02B5 ; CPU:$EDA0 PRG:2DA0 8C B5 02 + lda ZpFE ; CPU:$EDA3 PRG:2DA3 A5 FE + ora #$04 ; CPU:$EDA5 PRG:2DA5 09 04 + sta ZpFE ; CPU:$EDA7 PRG:2DA7 85 FE +; ----------------------------------------------------------------------------- +; Routine: SubCEDA9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEDA9: + jmp SubCC6BF ; CPU:$EDA9 PRG:2DA9 4C BF C6 +; ----------------------------------------------------------------------------- +; Routine: Label_EDAC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EDAC: + lda Zp21 ; CPU:$EDAC PRG:2DAC A5 21 + bne Label_EDE7 ; CPU:$EDAE PRG:2DAE D0 37 + lda Zp75 ; CPU:$EDB0 PRG:2DB0 A5 75 + ora Zp7A ; CPU:$EDB2 PRG:2DB2 05 7A + bne Label_EDE7 ; CPU:$EDB4 PRG:2DB4 D0 31 + sta $04CA ; CPU:$EDB6 PRG:2DB6 8D CA 04 + ldy #$04 ; CPU:$EDB9 PRG:2DB9 A0 04 + jsr InitSpritesOffscreen ; CPU:$EDBB PRG:2DBB 20 C4 DF + jsr SubCEF50 ; CPU:$EDBE PRG:2DBE 20 50 EF + lda #$01 ; CPU:$EDC1 PRG:2DC1 A9 01 + sta $04C5 ; CPU:$EDC3 PRG:2DC3 8D C5 04 + ldx $04CC ; CPU:$EDC6 PRG:2DC6 AE CC 04 + sta $04CD,x ; CPU:$EDC9 PRG:2DC9 9D CD 04 + lda $04CD ; CPU:$EDCC PRG:2DCC AD CD 04 + and $04CE ; CPU:$EDCF PRG:2DCF 2D CE 04 + and $04CF ; CPU:$EDD2 PRG:2DD2 2D CF 04 + bne Label_EDDD ; CPU:$EDD5 PRG:2DD5 D0 06 + jsr SubCECAF ; CPU:$EDD7 PRG:2DD7 20 AF EC + jmp SubCEDA9 ; CPU:$EDDA PRG:2DDA 4C A9 ED +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_EDDD: + lda #$00 ; CPU:$EDDD PRG:2DDD A9 00 + sta $04C0 ; CPU:$EDDF PRG:2DDF 8D C0 04 + sta ZpB0 ; CPU:$EDE2 PRG:2DE2 85 B0 + jmp SubCC75A ; CPU:$EDE4 PRG:2DE4 4C 5A C7 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_EDE7: + inc ZpC1 ; CPU:$EDE7 PRG:2DE7 E6 C1 + bne SubCEDA9 ; CPU:$EDE9 PRG:2DE9 D0 BE +; ----------------------------------------------------------------------------- +; Routine: SubCEDEB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEDEB: + lda $04C5 ; CPU:$EDEB PRG:2DEB AD C5 04 + bne Label_EDF1 ; CPU:$EDEE PRG:2DEE D0 01 + rts ; CPU:$EDF0 PRG:2DF0 60 +; ----------------------------------------------------------------------------- +; Routine: Label_EDF1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EDF1: + lda $04CA ; CPU:$EDF1 PRG:2DF1 AD CA 04 + beq Label_EE1F ; CPU:$EDF4 PRG:2DF4 F0 29 + dec $04CA ; CPU:$EDF6 PRG:2DF6 CE CA 04 + lda $02B3 ; CPU:$EDF9 PRG:2DF9 AD B3 02 + beq Label_EE1E ; CPU:$EDFC PRG:2DFC F0 20 + cmp #$40 ; CPU:$EDFE PRG:2DFE C9 40 + beq Label_EE1E ; CPU:$EE00 PRG:2E00 F0 1C + cmp #$A0 ; CPU:$EE02 PRG:2E02 C9 A0 + beq Label_EE1E ; CPU:$EE04 PRG:2E04 F0 18 + dec $02B3 ; CPU:$EE06 PRG:2E06 CE B3 02 + dec $02B3 ; CPU:$EE09 PRG:2E09 CE B3 02 + dec $02B7 ; CPU:$EE0C PRG:2E0C CE B7 02 + dec $02B7 ; CPU:$EE0F PRG:2E0F CE B7 02 + inc $02BB ; CPU:$EE12 PRG:2E12 EE BB 02 + inc $02BB ; CPU:$EE15 PRG:2E15 EE BB 02 + inc $02BF ; CPU:$EE18 PRG:2E18 EE BF 02 + inc $02BF ; CPU:$EE1B PRG:2E1B EE BF 02 +; ----------------------------------------------------------------------------- +; Routine: Label_EE1E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EE1E: + rts ; CPU:$EE1E PRG:2E1E 60 +; ----------------------------------------------------------------------------- +; Routine: Label_EE1F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EE1F: + ldx $04C6 ; CPU:$EE1F PRG:2E1F AE C6 04 + lda $EE53,x ; CPU:$EE22 PRG:2E22 BD 53 EE + beq Label_EE40 ; CPU:$EE25 PRG:2E25 F0 19 + sta $04C9 ; CPU:$EE27 PRG:2E27 8D C9 04 + inx ; CPU:$EE2A PRG:2E2A E8 + lda $EE53,x ; CPU:$EE2B PRG:2E2B BD 53 EE + sta $04C8 ; CPU:$EE2E PRG:2E2E 8D C8 04 + lda #$01 ; CPU:$EE31 PRG:2E31 A9 01 + sta $04C7 ; CPU:$EE33 PRG:2E33 8D C7 04 + inx ; CPU:$EE36 PRG:2E36 E8 + stx $04C6 ; CPU:$EE37 PRG:2E37 8E C6 04 + lda #$08 ; CPU:$EE3A PRG:2E3A A9 08 + sta $04CA ; CPU:$EE3C PRG:2E3C 8D CA 04 + rts ; CPU:$EE3F PRG:2E3F 60 +; ----------------------------------------------------------------------------- +; Routine: Label_EE40 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EE40: + lda #$00 ; CPU:$EE40 PRG:2E40 A9 00 + sta $04C5 ; CPU:$EE42 PRG:2E42 8D C5 04 + sta $04C7 ; CPU:$EE45 PRG:2E45 8D C7 04 + lda #$F4 ; CPU:$EE48 PRG:2E48 A9 F4 + ldx #$0F ; CPU:$EE4A PRG:2E4A A2 0F +; ----------------------------------------------------------------------------- +; Routine: Label_EE4C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EE4C: + sta $02B0,x ; CPU:$EE4C PRG:2E4C 9D B0 02 + dex ; CPU:$EE4F PRG:2E4F CA + bpl Label_EE4C ; CPU:$EE50 PRG:2E50 10 FA + rts ; CPU:$EE52 PRG:2E52 60 +; ---- data $EE53-$EE69 (23 bytes) ---- +; referenced by `lda $EE53,x` at $EE22 (operand $EE53 falls inside this region) +; referenced by `lda $EE53,x` at $EE2B (operand $EE53 falls inside this region) + .byte $F7, $63, $F7, $6D, $F7, $7B, $F7, $8B, $00, $F7, $9B, $F7, $A4, $F7, $B3, $00 ; CPU:$EE53 PRG:2E53 F7 63 F7 6D F7 7B F7 8B 00 F7 9B F7 A4 F7 B3 00 + .byte $F7, $C2, $F7, $CB, $F7, $DA, $00 ; CPU:$EE63 PRG:2E63 F7 C2 F7 CB F7 DA 00 +; ----------------------------------------------------------------------------- +; Routine: SubCEE6A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEE6A: + lda $04C7 ; CPU:$EE6A PRG:2E6A AD C7 04 + beq Label_EE81 ; CPU:$EE6D PRG:2E6D F0 12 + lda $04C8 ; CPU:$EE6F PRG:2E6F AD C8 04 + sta Zp00 ; CPU:$EE72 PRG:2E72 85 00 + lda $04C9 ; CPU:$EE74 PRG:2E74 AD C9 04 + sta Zp01 ; CPU:$EE77 PRG:2E77 85 01 + jsr SubCCE00 ; CPU:$EE79 PRG:2E79 20 00 CE + lda #$00 ; CPU:$EE7C PRG:2E7C A9 00 + sta $04C7 ; CPU:$EE7E PRG:2E7E 8D C7 04 +; ----------------------------------------------------------------------------- +; Routine: Label_EE81 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EE81: + rts ; CPU:$EE81 PRG:2E81 60 +; ----------------------------------------------------------------------------- +; Routine: SubCEE82 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEE82: + lda Zp00 ; CPU:$EE82 PRG:2E82 A5 00 + pha ; CPU:$EE84 PRG:2E84 48 + lda Zp06 ; CPU:$EE85 PRG:2E85 A5 06 + pha ; CPU:$EE87 PRG:2E87 48 + lda Zp07 ; CPU:$EE88 PRG:2E88 A5 07 + pha ; CPU:$EE8A PRG:2E8A 48 + lda #$10 ; CPU:$EE8B PRG:2E8B A9 10 + sta Zp00 ; CPU:$EE8D PRG:2E8D 85 00 + ldx Zp9F ; CPU:$EE8F PRG:2E8F A6 9F + lda #$01 ; CPU:$EE91 PRG:2E91 A9 01 + sta Zp9D,x ; CPU:$EE93 PRG:2E93 95 9D + txa ; CPU:$EE95 PRG:2E95 8A + sta Zp01 ; CPU:$EE96 PRG:2E96 85 01 + jsr InitZerosIfZp30Zero ; CPU:$EE98 PRG:2E98 20 83 DE + pla ; CPU:$EE9B PRG:2E9B 68 + sta Zp07 ; CPU:$EE9C PRG:2E9C 85 07 + pla ; CPU:$EE9E PRG:2E9E 68 + sta Zp06 ; CPU:$EE9F PRG:2E9F 85 06 + pla ; CPU:$EEA1 PRG:2EA1 68 + sta Zp00 ; CPU:$EEA2 PRG:2EA2 85 00 + rts ; CPU:$EEA4 PRG:2EA4 60 +; ----------------------------------------------------------------------------- +; Routine: SubCEEA5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEEA5: + sta ZpB8 ; CPU:$EEA5 PRG:2EA5 85 B8 + jsr SubCD019 ; CPU:$EEA7 PRG:2EA7 20 19 D0 + ldx ZpBE ; CPU:$EEAA PRG:2EAA A6 BE + rts ; CPU:$EEAC PRG:2EAC 60 +; ----------------------------------------------------------------------------- +; Routine: SubCEEAD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEEAD: + lda Zp35 ; CPU:$EEAD PRG:2EAD A5 35 + cmp #$AA ; CPU:$EEAF PRG:2EAF C9 AA + bne Label_EEB9 ; CPU:$EEB1 PRG:2EB1 D0 06 + lda Zp45 ; CPU:$EEB3 PRG:2EB3 A5 45 + cmp #$04 ; CPU:$EEB5 PRG:2EB5 C9 04 + bcc Label_EEBB ; CPU:$EEB7 PRG:2EB7 90 02 +; ----------------------------------------------------------------------------- +; Routine: Label_EEB9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EEB9: + pla ; CPU:$EEB9 PRG:2EB9 68 + pla ; CPU:$EEBA PRG:2EBA 68 +; ----------------------------------------------------------------------------- +; Routine: Label_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. +; ----------------------------------------------------------------------------- +Label_EEBB: + rts ; CPU:$EEBB PRG:2EBB 60 +; ----------------------------------------------------------------------------- +; Routine: SubCEEBC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEEBC: + jsr TestRamFlagPair0500 ; CPU:$EEBC PRG:2EBC 20 28 D3 + and #$07 ; CPU:$EEBF PRG:2EBF 29 07 + clc ; CPU:$EEC1 PRG:2EC1 18 + adc $0349 ; CPU:$EEC2 PRG:2EC2 6D 49 03 + sta $0349 ; CPU:$EEC5 PRG:2EC5 8D 49 03 + inc $0348 ; CPU:$EEC8 PRG:2EC8 EE 48 03 + rts ; CPU:$EECB PRG:2ECB 60 +; ----------------------------------------------------------------------------- +; Routine: SubCEECC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEECC: + jsr TestRamFlagPair0500 ; CPU:$EECC PRG:2ECC 20 28 D3 + and #$03 ; CPU:$EECF PRG:2ECF 29 03 + sta Zp07 ; CPU:$EED1 PRG:2ED1 85 07 + lda $0349 ; CPU:$EED3 PRG:2ED3 AD 49 03 + sec ; CPU:$EED6 PRG:2ED6 38 + sbc Zp07 ; CPU:$EED7 PRG:2ED7 E5 07 + sta $0349 ; CPU:$EED9 PRG:2ED9 8D 49 03 + dec $0348 ; CPU:$EEDC PRG:2EDC CE 48 03 + dec $0348 ; CPU:$EEDF PRG:2EDF CE 48 03 + rts ; CPU:$EEE2 PRG:2EE2 60 +; ----------------------------------------------------------------------------- +; Routine: SubCEEE3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEEE3: + sta Zp1E ; CPU:$EEE3 PRG:2EE3 85 1E + txa ; CPU:$EEE5 PRG:2EE5 8A + sec ; CPU:$EEE6 PRG:2EE6 38 + ldx $04D5 ; CPU:$EEE7 PRG:2EE7 AE D5 04 + beq Label_EEEE ; CPU:$EEEA PRG:2EEA F0 02 + sbc #$08 ; CPU:$EEEC PRG:2EEC E9 08 +; ----------------------------------------------------------------------------- +; Routine: Label_EEEE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EEEE: + sbc #$18 ; CPU:$EEEE PRG:2EEE E9 18 + sta $02E8,x ; CPU:$EEF0 PRG:2EF0 9D E8 02 + sta $02EC,x ; CPU:$EEF3 PRG:2EF3 9D EC 02 + tya ; CPU:$EEF6 PRG:2EF6 98 + sec ; CPU:$EEF7 PRG:2EF7 38 + sbc #$08 ; CPU:$EEF8 PRG:2EF8 E9 08 + sta $02EB,x ; CPU:$EEFA PRG:2EFA 9D EB 02 + tya ; CPU:$EEFD PRG:2EFD 98 + sta $02EF,x ; CPU:$EEFE PRG:2EFE 9D EF 02 + ldy Zp1E ; CPU:$EF01 PRG:2F01 A4 1E + lda $EF97,y ; CPU:$EF03 PRG:2F03 B9 97 EF + sta $02E9,x ; CPU:$EF06 PRG:2F06 9D E9 02 + lda #$45 ; CPU:$EF09 PRG:2F09 A9 45 + sta $02ED,x ; CPU:$EF0B PRG:2F0B 9D ED 02 + ldy #$03 ; CPU:$EF0E PRG:2F0E A0 03 + lda Zp11 ; CPU:$EF10 PRG:2F10 A5 11 + beq Label_EF16 ; CPU:$EF12 PRG:2F12 F0 02 + ldy #$02 ; CPU:$EF14 PRG:2F14 A0 02 +; ----------------------------------------------------------------------------- +; Routine: Label_EF16 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EF16: + tya ; CPU:$EF16 PRG:2F16 98 + sta $02EA,x ; CPU:$EF17 PRG:2F17 9D EA 02 + sta $02EE,x ; CPU:$EF1A PRG:2F1A 9D EE 02 + ldx #$00 ; CPU:$EF1D PRG:2F1D A2 00 + ldy #$08 ; CPU:$EF1F PRG:2F1F A0 08 + lda $04D5 ; CPU:$EF21 PRG:2F21 AD D5 04 + beq Label_EF29 ; CPU:$EF24 PRG:2F24 F0 03 + inx ; CPU:$EF26 PRG:2F26 E8 + ldy #$00 ; CPU:$EF27 PRG:2F27 A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_EF29 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EF29: + lda #$40 ; CPU:$EF29 PRG:2F29 A9 40 + sta $04D6,x ; CPU:$EF2B PRG:2F2B 9D D6 04 + sty $04D5 ; CPU:$EF2E PRG:2F2E 8C D5 04 + rts ; CPU:$EF31 PRG:2F31 60 +; ----------------------------------------------------------------------------- +; Routine: SubCEF32 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEF32: + ldx #$00 ; CPU:$EF32 PRG:2F32 A2 00 + ldy #$00 ; CPU:$EF34 PRG:2F34 A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_EF36 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EF36: + lda $04D6,x ; CPU:$EF36 PRG:2F36 BD D6 04 + beq Label_EF48 ; CPU:$EF39 PRG:2F39 F0 0D + dec $04D6,x ; CPU:$EF3B PRG:2F3B DE D6 04 + bne Label_EF48 ; CPU:$EF3E PRG:2F3E D0 08 + lda #$F4 ; CPU:$EF40 PRG:2F40 A9 F4 + sta $02E8,y ; CPU:$EF42 PRG:2F42 99 E8 02 + sta $02EC,y ; CPU:$EF45 PRG:2F45 99 EC 02 +; ----------------------------------------------------------------------------- +; Routine: Label_EF48 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EF48: + ldy #$08 ; CPU:$EF48 PRG:2F48 A0 08 + inx ; CPU:$EF4A PRG:2F4A E8 + cpx #$02 ; CPU:$EF4B PRG:2F4B E0 02 + bne Label_EF36 ; CPU:$EF4D PRG:2F4D D0 E7 + rts ; CPU:$EF4F PRG:2F4F 60 +; ----------------------------------------------------------------------------- +; Routine: SubCEF50 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCEF50: + lda $04CC ; CPU:$EF50 PRG:2F50 AD CC 04 + asl a ; CPU:$EF53 PRG:2F53 0A + asl a ; CPU:$EF54 PRG:2F54 0A + asl a ; CPU:$EF55 PRG:2F55 0A + asl a ; CPU:$EF56 PRG:2F56 0A + tax ; CPU:$EF57 PRG:2F57 AA + ldy #$00 ; CPU:$EF58 PRG:2F58 A0 00 +; ----------------------------------------------------------------------------- +; Routine: Label_EF5A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_EF5A: + lda $EF67,x ; CPU:$EF5A PRG:2F5A BD 67 EF + sta $02B0,y ; CPU:$EF5D PRG:2F5D 99 B0 02 + inx ; CPU:$EF60 PRG:2F60 E8 + iny ; CPU:$EF61 PRG:2F61 C8 + cpy #$10 ; CPU:$EF62 PRG:2F62 C0 10 + bne Label_EF5A ; CPU:$EF64 PRG:2F64 D0 F4 + rts ; CPU:$EF66 PRG:2F66 60 +; ---- data $EF67-$F8A6 (2368 bytes) ---- +; referenced by `lda $F4B2,y` at $CEA5 (operand $F4B2 falls inside this region) +; referenced by `lda $F4B2,y` at $CEB2 (operand $F4B2 falls inside this region) +; referenced by `cmp $F574,x` at $CF8D (operand $F574 falls inside this region) +; referenced by `cmp $F574,x` at $CF95 (operand $F574 falls inside this region) +; referenced by `lda $F68D,y` at $D04F (operand $F68D falls inside this region) +; referenced by `lda $F68D,y` at $D059 (operand $F68D falls inside this region) +; ... and 23 further references from decoded code + .byte $77, $8A, $03, $70, $77, $8B, $03, $78, $77, $8B, $43, $80, $77, $8A, $43, $88 ; CPU:$EF67 PRG:2F67 77 8A 03 70 77 8B 03 78 77 8B 43 80 77 8A 43 88 + .byte $A7, $8A, $03, $20, $A7, $8B, $03, $28, $A7, $8B, $43, $30, $A7, $8A, $43, $38 ; CPU:$EF77 PRG:2F77 A7 8A 03 20 A7 8B 03 28 A7 8B 43 30 A7 8A 43 38 + .byte $A7, $8A, $03, $C0, $A7, $8B, $03, $C8, $A7, $8B, $43, $D0, $A7, $8A, $43, $D8 ; CPU:$EF87 PRG:2F87 A7 8A 03 C0 A7 8B 03 C8 A7 8B 43 D0 A7 8A 43 D8 + .byte $40, $42, $43, $44, $3E, $3F, $9C, $00, $9D, $00, $9F, $00, $00, $9D, $00, $9B ; CPU:$EF97 PRG:2F97 40 42 43 44 3E 3F 9C 00 9D 00 9F 00 00 9D 00 9B + .byte $00, $00, $92, $00, $00, $93, $00, $00, $94, $00, $00, $95, $00, $92, $00, $93 ; CPU:$EFA7 PRG:2FA7 00 00 92 00 00 93 00 00 94 00 00 95 00 92 00 93 + .byte $00, $94, $00, $FF, $01, $01, $03, $01, $3D, $07, $92, $02, $F4, $00, $04, $00 ; CPU:$EFB7 PRG:2FB7 00 94 00 FF 01 01 03 01 3D 07 92 02 F4 00 04 00 + .byte $00, $00, $00, $B0, $00, $01, $00, $00, $00, $01, $00, $00, $00, $00, $00, $00 ; CPU:$EFC7 PRG:2FC7 00 00 00 B0 00 01 00 00 00 01 00 00 00 00 00 00 + .byte $00, $00, $04, $04, $9C, $00, $9D, $00, $9F, $00, $9C, $00, $9D, $00, $9F, $00 ; CPU:$EFD7 PRG:2FD7 00 00 04 04 9C 00 9D 00 9F 00 9C 00 9D 00 9F 00 + .byte $9C, $00, $9D, $00, $9F, $00, $9C, $00, $9D, $00, $9F, $00, $9C, $00, $9D, $00 ; CPU:$EFE7 PRG:2FE7 9C 00 9D 00 9F 00 9C 00 9D 00 9F 00 9C 00 9D 00 + .byte $9F, $00, $9C, $00, $9D, $00, $9F, $00, $9C, $00, $9D, $00, $9B, $00, $FF, $9B ; CPU:$EFF7 PRG:2FF7 9F 00 9C 00 9D 00 9F 00 9C 00 9D 00 9B 00 FF 9B + .byte $00, $9C, $00, $9D, $00, $00, $9E, $00, $9F, $00, $9C, $00, $9D, $00, $00, $9E ; CPU:$F007 PRG:3007 00 9C 00 9D 00 00 9E 00 9F 00 9C 00 9D 00 00 9E + .byte $00, $9F, $00, $FF, $00, $00, $FF, $FF, $DD, $FF, $FE, $FE, $FD, $FE, $FE, $FF ; CPU:$F017 PRG:3017 00 9F 00 FF 00 00 FF FF DD FF FE FE FD FE FE FF + .byte $FF, $00, $FF, $00, $FF, $00, $00, $00, $01, $00, $01, $00, $01, $01, $02, $02 ; CPU:$F027 PRG:3027 FF 00 FF 00 FF 00 00 00 01 00 01 00 01 01 02 02 + .byte $03, $02, $02, $01, $CC, $01, $01, $00, $00, $BB, $00, $00, $FF, $00, $FF, $FF ; CPU:$F037 PRG:3037 03 02 02 01 CC 01 01 00 00 BB 00 00 FF 00 FF FF + .byte $DD, $FF, $FE, $FF, $FF, $FF, $FF, $00, $00, $00, $01, $01, $01, $02, $02, $01 ; CPU:$F047 PRG:3047 DD FF FE FF FF FF FF 00 00 00 01 01 01 02 02 01 + .byte $01, $CC, $01, $00, $01, $00, $00, $BB, $00, $AA, $01, $01, $00, $01, $3D, $07 ; CPU:$F057 PRG:3057 01 CC 01 00 01 00 00 BB 00 AA 01 01 00 01 3D 07 + .byte $92, $01, $F4, $00, $00, $00, $00, $00, $00, $A0, $00, $80, $00, $00, $00, $00 ; CPU:$F067 PRG:3067 92 01 F4 00 00 00 00 00 00 A0 00 80 00 00 00 00 + .byte $00, $00, $00, $00, $00, $00, $00, $00, $04, $04, $28, $1E, $0A, $05, $0F, $0A ; CPU:$F077 PRG:3077 00 00 00 00 00 00 00 00 04 04 28 1E 0A 05 0F 0A + .byte $07, $03, $32, $32, $28, $26, $1E, $1E, $1C, $12, $28, $28, $1C, $12, $1C, $1C ; CPU:$F087 PRG:3087 07 03 32 32 28 26 1E 1E 1C 12 28 28 1C 12 1C 1C + .byte $12, $0A, $1E, $14, $14, $12, $14, $12, $0A, $08, $CC, $9C, $6C, $3C, $20, $83 ; CPU:$F097 PRG:3097 12 0A 1E 14 14 12 14 12 0A 08 CC 9C 6C 3C 20 83 + .byte $02, $76, $7A, $20, $A3, $02, $77, $79, $20, $9A, $02, $7C, $7E, $20, $BA, $02 ; CPU:$F0A7 PRG:30A7 02 76 7A 20 A3 02 77 79 20 9A 02 7C 7E 20 BA 02 + .byte $7D, $7F, $21, $63, $02, $80, $82, $21, $83, $02, $81, $83, $21, $7A, $02, $84 ; CPU:$F0B7 PRG:30B7 7D 7F 21 63 02 80 82 21 83 02 81 83 21 7A 02 84 + .byte $86, $21, $9A, $02, $85, $87, $20, $85, $4A, $7B, $20, $90, $4A, $7B, $21, $85 ; CPU:$F0C7 PRG:30C7 86 21 9A 02 85 87 20 85 4A 7B 20 90 4A 7B 21 85 + .byte $4A, $89, $21, $90, $4A, $89, $20, $C3, $19, $78, $24, $24, $68, $69, $69, $6B ; CPU:$F0D7 PRG:30D7 4A 89 21 90 4A 89 20 C3 19 78 24 24 68 69 69 6B + .byte $69, $68, $69, $68, $6B, $69, $24, $68, $69, $68, $69, $6B, $69, $6B, $69, $24 ; CPU:$F0E7 PRG:30E7 69 68 69 68 6B 69 24 68 69 68 69 6B 69 6B 69 24 + .byte $24, $88, $20, $E6, $13, $68, $6A, $6A, $6E, $6A, $68, $6A, $68, $6E, $6A, $24 ; CPU:$F0F7 PRG:30F7 24 88 20 E6 13 68 6A 6A 6E 6A 68 6A 68 6E 6A 24 + .byte $68, $6A, $68, $6A, $6E, $6A, $6E, $71, $21, $06, $13, $68, $6A, $6A, $68, $6C ; CPU:$F107 PRG:3107 68 6A 68 6A 6E 6A 6E 71 21 06 13 68 6A 6A 68 6C + .byte $68, $6D, $68, $6E, $6A, $24, $68, $6D, $68, $6D, $6E, $6A, $6F, $69, $21, $26 ; CPU:$F117 PRG:3117 68 6D 68 6E 6A 24 68 6D 68 6D 6E 6A 6F 69 21 26 + .byte $13, $68, $6A, $6A, $6E, $6A, $68, $6A, $68, $6E, $6A, $24, $68, $6A, $68, $6A ; CPU:$F127 PRG:3127 13 68 6A 6A 6E 6A 68 6A 68 6E 6A 24 68 6A 68 6A + .byte $6E, $6A, $72, $6A, $21, $43, $19, $78, $24, $24, $68, $6A, $6A, $6E, $6A, $68 ; CPU:$F137 PRG:3137 6E 6A 72 6A 21 43 19 78 24 24 68 6A 6A 6E 6A 68 + .byte $6A, $68, $6F, $70, $24, $68, $70, $68, $6A, $6F, $70, $6F, $70, $73, $24, $88 ; CPU:$F147 PRG:3147 6A 68 6F 70 24 68 70 68 6A 6F 70 6F 70 73 24 88 + .byte $22, $09, $0F, $01, $24, $19, $15, $0A, $22, $0E, $1B, $24, $10, $0A, $16, $0E ; CPU:$F157 PRG:3157 22 09 0F 01 24 19 15 0A 22 0E 1B 24 10 0A 16 0E + .byte $24, $0A, $22, $49, $0F, $01, $24, $19, $15, $0A, $22, $0E, $1B, $24, $10, $0A ; CPU:$F167 PRG:3167 24 0A 22 49 0F 01 24 19 15 0A 22 0E 1B 24 10 0A + .byte $16, $0E, $24, $0B, $22, $89, $0F, $02, $24, $19, $15, $0A, $22, $0E, $1B, $24 ; CPU:$F177 PRG:3177 16 0E 24 0B 22 89 0F 02 24 19 15 0A 22 0E 1B 24 + .byte $10, $0A, $16, $0E, $24, $0A, $22, $C9, $0F, $02, $24, $19, $15, $0A, $22, $0E ; CPU:$F187 PRG:3187 10 0A 16 0E 24 0A 22 C9 0F 02 24 19 15 0A 22 0E + .byte $1B, $24, $10, $0A, $16, $0E, $24, $0B, $23, $05, $16, $25, $01, $09, $08, $03 ; CPU:$F197 PRG:3197 1B 24 10 0A 16 0E 24 0B 23 05 16 25 01 09 08 03 + .byte $24, $17, $12, $17, $1D, $0E, $17, $0D, $18, $24, $0C, $18, $28, $15, $1D, $0D ; CPU:$F1A7 PRG:31A7 24 17 12 17 1D 0E 17 0D 18 24 0C 18 28 15 1D 0D + .byte $26, $23, $4B, $0D, $16, $0A, $0D, $0E, $24, $12, $17, $24, $13, $0A, $19, $0A ; CPU:$F1B7 PRG:31B7 26 23 4B 0D 16 0A 0D 0E 24 12 17 24 13 0A 19 0A + .byte $17, $23, $C8, $0F, $AA, $2A, $0A, $0A, $0A, $0A, $8A, $00, $FF, $30, $00, $00 ; CPU:$F1C7 PRG:31C7 17 23 C8 0F AA 2A 0A 0A 0A 0A 8A 00 FF 30 00 00 + .byte $00, $00, $C0, $23, $D8, $48, $FF, $23, $E0, $50, $55, $23, $F0, $48, $AA, $00 ; CPU:$F1D7 PRG:31D7 00 00 C0 23 D8 48 FF 23 E0 50 55 23 F0 48 AA 00 + .byte $21, $20, $4E, $21, $32, $4E, $21, $E8, $50, $22, $00, $44, $22, $1C, $44, $22 ; CPU:$F1E7 PRG:31E7 21 20 4E 21 32 4E 21 E8 50 22 00 44 22 1C 44 22 + .byte $A0, $4C, $22, $B4, $4C, $00, $23, $60, $60, $23, $80, $60, $3F, $00, $20, $0F ; CPU:$F1F7 PRG:31F7 A0 4C 22 B4 4C 00 23 60 60 23 80 60 3F 00 20 0F + .byte $30, $2C, $12, $0F, $30, $29, $09, $0F, $30, $27, $18, $0F, $30, $26, $06, $0F ; CPU:$F207 PRG:3207 30 2C 12 0F 30 29 09 0F 30 27 18 0F 30 26 06 0F + .byte $16, $37, $12, $0F, $30, $27, $19, $0F, $30, $27, $16, $0F, $2C, $12, $25, $00 ; CPU:$F217 PRG:3217 16 37 12 0F 30 27 19 0F 30 27 16 0F 2C 12 25 00 + .byte $3F, $00, $14, $0F, $16, $16, $16, $0F, $27, $27, $27, $0F, $30, $2C, $12, $0F ; CPU:$F227 PRG:3227 3F 00 14 0F 16 16 16 0F 27 27 27 0F 30 2C 12 0F + .byte $30, $29, $19, $0F, $35, $35, $35, $00, $23, $C0, $10, $00, $00, $C0, $30, $00 ; CPU:$F237 PRG:3237 30 29 19 0F 35 35 35 00 23 C0 10 00 00 C0 30 00 + .byte $50, $00, $00, $55, $55, $00, $00, $00, $00, $55, $55, $23, $F0, $10, $F5, $FF ; CPU:$F247 PRG:3247 50 00 00 55 55 00 00 00 00 55 55 23 F0 10 F5 FF + .byte $FF, $FF, $FF, $FF, $FF, $F5, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $00, $23 ; CPU:$F257 PRG:3257 FF FF FF FF FF F5 FF FF FF FF FF FF FF FF 00 23 + .byte $D0, $58, $00, $23, $E8, $08, $50, $00, $00, $00, $00, $00, $00, $50, $00, $23 ; CPU:$F267 PRG:3267 D0 58 00 23 E8 08 50 00 00 00 00 00 00 50 00 23 + .byte $D0, $58, $AA, $23, $E8, $08, $5A, $AA, $AA, $00, $00, $AA, $AA, $5A, $00, $23 ; CPU:$F277 PRG:3277 D0 58 AA 23 E8 08 5A AA AA 00 00 AA AA 5A 00 23 + .byte $D0, $58, $FF, $23, $E8, $08, $5F, $FF, $FF, $00, $00, $FF, $FF, $5F, $00, $A6 ; CPU:$F287 PRG:3287 D0 58 FF 23 E8 08 5F FF FF 00 00 FF FF 5F 00 A6 + .byte $F2, $B9, $F2, $C6, $F2, $C6, $F2, $D0, $F2, $DA, $F2, $E1, $F2, $E8, $F2, $00 ; CPU:$F297 PRG:3297 F2 B9 F2 C6 F2 C6 F2 D0 F2 DA F2 E1 F2 E8 F2 00 + .byte $EF, $F8, $00, $EF, $00, $00, $F7, $F8, $00, $F7, $00, $00, $00, $F8, $00, $00 ; CPU:$F2A7 PRG:32A7 EF F8 00 EF 00 00 F7 F8 00 F7 00 00 00 F8 00 00 + .byte $00, $AA, $00, $F7, $F8, $00, $F7, $00, $00, $00, $F8, $00, $00, $00, $AA, $80 ; CPU:$F2B7 PRG:32B7 00 AA 00 F7 F8 00 F7 00 00 00 F8 00 00 00 AA 80 + .byte $F7, $F8, $01, $F7, $00, $00, $00, $FC, $AA, $00, $F7, $FC, $80, $00, $F8, $01 ; CPU:$F2C7 PRG:32C7 F7 F8 01 F7 00 00 00 FC AA 00 F7 FC 80 00 F8 01 + .byte $00, $00, $AA, $00, $F7, $FC, $00, $00, $FC, $AA, $00, $F7, $F8, $00, $00, $FC ; CPU:$F2D7 PRG:32D7 00 00 AA 00 F7 FC 00 00 FC AA 00 F7 F8 00 00 FC + .byte $AA, $00, $FC, $FC, $AA, $01, $00, $03, $00, $00, $00, $12, $40, $D0, $44, $10 ; CPU:$F2E7 PRG:32E7 AA 00 FC FC AA 01 00 03 00 00 00 12 40 D0 44 10 + .byte $00, $00, $00, $00, $01, $00, $00, $00, $00, $00, $01, $00, $00, $00, $00, $00 ; CPU:$F2F7 PRG:32F7 00 00 00 00 01 00 00 00 00 00 01 00 00 00 00 00 + .byte $00, $00, $00, $04, $04, $01, $00, $03, $00, $00, $00, $12, $01, $D0, $C4, $28 ; CPU:$F307 PRG:3307 00 00 00 04 04 01 00 03 00 00 00 12 01 D0 C4 28 + .byte $00, $00, $00, $00, $02, $00, $00, $00, $00, $00, $01, $00, $00, $00, $00, $00 ; CPU:$F317 PRG:3317 00 00 00 00 02 00 00 00 00 00 01 00 00 00 00 00 + .byte $00, $00, $00, $04, $04, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00, $00 ; CPU:$F327 PRG:3327 00 00 00 04 04 00 00 00 00 00 00 00 00 00 00 00 + .byte $00, $00, $00, $01, $00, $01, $00, $01, $01, $00, $01, $01, $02, $01, $02, $02 ; CPU:$F337 PRG:3337 00 00 00 01 00 01 00 01 01 00 01 01 02 01 02 02 + .byte $02, $02, $02, $02, $03, $03, $03, $03, $AA, $FC, $FC, $FC, $FC, $FC, $FC, $FC ; CPU:$F347 PRG:3347 02 02 02 02 03 03 03 03 AA FC FC FC FC FC FC FC + .byte $FD, $FD, $FE, $FE, $FE, $FE, $FE, $FE, $FF, $FE, $FF, $FF, $FF, $00, $FF, $FF ; CPU:$F357 PRG:3357 FD FD FE FE FE FE FE FE FF FE FF FF FF 00 FF FF + .byte $00, $FF, $00, $00, $00, $AA, $FE, $FE, $FE, $FF, $FF, $FF, $FF, $FF, $00, $FF ; CPU:$F367 PRG:3367 00 FF 00 00 00 AA FE FE FE FF FF FF FF FF 00 FF + .byte $00, $FF, $00, $AA, $00, $01, $00, $01, $00, $01, $01, $01, $02, $01, $01, $02 ; CPU:$F377 PRG:3377 00 FF 00 AA 00 01 00 01 00 01 01 01 02 01 01 02 + .byte $03, $03, $04, $04, $CC, $04, $CC, $CC, $CC, $04, $CC, $AA, $01, $03, $00, $01 ; CPU:$F387 PRG:3387 03 03 04 04 CC 04 CC CC CC 04 CC AA 01 03 00 01 + .byte $02, $00, $01, $01, $00, $AA, $01, $03, $00, $01, $02, $00, $01, $01, $FF, $AA ; CPU:$F397 PRG:3397 02 00 01 01 00 AA 01 03 00 01 02 00 01 01 FF AA + .byte $01, $02, $00, $01, $01, $FF, $01, $01, $FF, $01, $01, $00, $01, $01, $00, $01 ; CPU:$F3A7 PRG:33A7 01 02 00 01 01 FF 01 01 FF 01 01 00 01 01 00 01 + .byte $01, $01, $AA, $D2, $F3, $D9, $F3, $E4, $F3, $ED, $F3, $FA, $F3, $03, $F4, $0E ; CPU:$F3B7 PRG:33B7 01 01 AA D2 F3 D9 F3 E4 F3 ED F3 FA F3 03 F4 0E + .byte $F4, $19, $F4, $24, $F4, $31, $F4, $3E, $F4, $49, $F4, $05, $00, $12, $00, $1F ; CPU:$F3C7 PRG:33C7 F4 19 F4 24 F4 31 F4 3E F4 49 F4 05 00 12 00 1F + .byte $00, $AA, $05, $00, $12, $00, $1F, $00, $19, $00, $1F, $00, $AA, $05, $01, $0C ; CPU:$F3D7 PRG:33D7 00 AA 05 00 12 00 1F 00 19 00 1F 00 AA 05 01 0C + .byte $01, $2B, $01, $0C, $01, $AA, $03, $01, $0C, $01, $31, $00, $06, $00, $49, $01 ; CPU:$F3E7 PRG:33E7 01 2B 01 0C 01 AA 03 01 0C 01 31 00 06 00 49 01 + .byte $07, $01, $AA, $0C, $02, $0C, $02, $31, $02, $0C, $02, $AA, $0C, $02, $0C, $02 ; CPU:$F3F7 PRG:33F7 07 01 AA 0C 02 0C 02 31 02 0C 02 AA 0C 02 0C 02 + .byte $31, $01, $06, $01, $31, $02, $AA, $03, $00, $0C, $00, $31, $02, $06, $00, $31 ; CPU:$F407 PRG:3407 31 01 06 01 31 02 AA 03 00 0C 00 31 02 06 00 31 + .byte $00, $AA, $03, $01, $0C, $01, $31, $02, $06, $01, $31, $01, $AA, $0C, $02, $0C ; CPU:$F417 PRG:3417 00 AA 03 01 0C 01 31 02 06 01 31 01 AA 0C 02 0C + .byte $01, $31, $01, $06, $01, $31, $02, $12, $01, $AA, $03, $01, $0C, $01, $31, $01 ; CPU:$F427 PRG:3427 01 31 01 06 01 31 02 12 01 AA 03 01 0C 01 31 01 + .byte $06, $02, $31, $02, $12, $01, $AA, $03, $00, $0C, $00, $31, $01, $06, $00, $06 ; CPU:$F437 PRG:3437 06 02 31 02 12 01 AA 03 00 0C 00 31 01 06 00 06 + .byte $00, $AA, $01, $00, $05, $00, $40, $00, $FF, $00, $AA, $01, $00, $03, $00, $0A ; CPU:$F447 PRG:3447 00 AA 01 00 05 00 40 00 FF 00 AA 01 00 03 00 0A + .byte $06, $52, $21, $28, $00, $00, $00, $4C, $F6, $00, $10, $00, $00, $00, $0A, $00 ; CPU:$F457 PRG:3457 06 52 21 28 00 00 00 4C F6 00 10 00 00 00 0A 00 + .byte $01, $00, $00, $00, $00, $00, $00, $00, $00, $04, $06, $01, $00, $03, $00, $10 ; CPU:$F467 PRG:3467 01 00 00 00 00 00 00 00 00 04 06 01 00 03 00 10 + .byte $03, $6C, $22, $28, $00, $00, $04, $4C, $F6, $00, $20, $00, $00, $00, $14, $00 ; CPU:$F477 PRG:3477 03 6C 22 28 00 00 04 4C F6 00 20 00 00 00 14 00 + .byte $01, $00, $00, $00, $00, $00, $00, $00, $00, $05, $06, $01, $00, $03, $00, $24 ; CPU:$F487 PRG:3487 01 00 00 00 00 00 00 00 00 05 06 01 00 03 00 24 + .byte $03, $7D, $20, $28, $00, $00, $08, $4C, $F6, $00, $30, $00, $00, $00, $00, $00 ; CPU:$F497 PRG:3497 03 7D 20 28 00 00 08 4C F6 00 30 00 00 00 00 00 + .byte $01, $00, $00, $00, $00, $00, $00, $00, $00, $05, $06, $06, $0C, $00, $0C, $FF ; CPU:$F4A7 PRG:34A7 01 00 00 00 00 00 00 00 00 05 06 06 0C 00 0C FF + .byte $00, $26, $2C, $FF, $06, $52, $54, $52, $56, $FF, $0A, $6C, $6C, $6F, $6F, $6C ; CPU:$F4B7 PRG:34B7 00 26 2C FF 06 52 54 52 56 FF 0A 6C 6C 6F 6F 6C + .byte $6C, $72, $72, $FF, $10, $D0, $D0, $D3, $D3, $D0, $D0, $D6, $D6, $FF, $1A, $7D ; CPU:$F4C7 PRG:34C7 6C 72 72 FF 10 D0 D0 D3 D3 D0 D0 D6 D6 FF 1A 7D + .byte $7D, $80, $80, $83, $83, $FF, $24, $A1, $A3, $A5, $A7, $A9, $FF, $2C, $8C, $8E ; CPU:$F4D7 PRG:34D7 7D 80 80 83 83 FF 24 A1 A3 A5 A7 A9 FF 2C 8C 8E + .byte $90, $FF, $33, $B4, $B8, $BC, $FF, $38, $92, $93, $94, $95, $FF, $3D, $20, $82 ; CPU:$F4E7 PRG:34E7 90 FF 33 B4 B8 BC FF 38 92 93 94 95 FF 3D 20 82 + .byte $04, $52, $51, $3C, $50, $20, $A0, $06, $41, $57, $56, $55, $47, $54, $20, $C0 ; CPU:$F4F7 PRG:34F7 04 52 51 3C 50 20 A0 06 41 57 56 55 47 54 20 C0 + .byte $06, $46, $5C, $5B, $5A, $4C, $59, $20, $E0, $04, $49, $61, $49, $5F, $20, $9A ; CPU:$F507 PRG:3507 06 46 5C 5B 5A 4C 59 20 E0 04 49 61 49 5F 20 9A + .byte $04, $39, $3C, $3A, $3B, $20, $BA, $06, $3D, $47, $3E, $3F, $40, $41, $20, $DA ; CPU:$F517 PRG:3517 04 39 3C 3A 3B 20 BA 06 3D 47 3E 3F 40 41 20 DA + .byte $06, $42, $4C, $43, $44, $45, $46, $20, $FC, $04, $48, $49, $4A, $4B, $22, $E0 ; CPU:$F527 PRG:3527 06 42 4C 43 44 45 46 20 FC 04 48 49 4A 4B 22 E0 + .byte $04, $41, $41, $41, $57, $23, $00, $04, $46, $46, $46, $5C, $23, $20, $04, $4B ; CPU:$F537 PRG:3537 04 41 41 41 57 23 00 04 46 46 46 5C 23 20 04 4B + .byte $4B, $4B, $61, $22, $FC, $04, $40, $41, $41, $41, $23, $1C, $04, $45, $46, $46 ; CPU:$F547 PRG:3547 4B 4B 61 22 FC 04 40 41 41 41 23 1C 04 45 46 46 + .byte $46, $23, $3C, $04, $4A, $4B, $4B, $4B, $00, $22, $24, $24, $24, $24, $22, $FE ; CPU:$F557 PRG:3557 46 23 3C 04 4A 4B 4B 4B 00 22 24 24 24 24 22 FE + .byte $FF, $90, $91, $22, $FC, $FD, $8E, $8F, $22, $FA, $FB, $8C, $8D, $2D, $21, $F7 ; CPU:$F567 PRG:3567 FF 90 91 22 FC FD 8E 8F 22 FA FB 8C 8D 2D 21 F7 + .byte $21, $03, $22, $AB, $22, $32, $21, $E8, $21, $1C, $22, $B4, $22, $AA, $F5, $CA ; CPU:$F577 PRG:3577 21 03 22 AB 22 32 21 E8 21 1C 22 B4 22 AA F5 CA + .byte $F5, $58, $06, $52, $06, $AA, $F5, $EA, $F5, $D0, $03, $6C, $03, $D9, $04, $BD ; CPU:$F587 PRG:3587 F5 58 06 52 06 AA F5 EA F5 D0 03 6C 03 D9 04 BD + .byte $F5, $08, $F6, $E0, $04, $7D, $03, $0F, $F7, $00, $00, $E8, $04, $E8, $F6, $00 ; CPU:$F597 PRG:3597 F5 08 F6 E0 04 7D 03 0F F7 00 00 E8 04 E8 F6 00 + .byte $00, $46, $07, $FD, $FE, $FE, $FE, $FE, $FF, $FF, $FF, $FE, $00, $FF, $00, $FE ; CPU:$F5A7 PRG:35A7 00 46 07 FD FE FE FE FE FF FF FF FE 00 FF 00 FE + .byte $00, $FF, $00, $00, $00, $99, $FE, $FE, $FE, $FF, $FF, $FF, $00, $FF, $00, $FF ; CPU:$F5B7 PRG:35B7 00 FF 00 00 00 99 FE FE FE FF FF FF 00 FF 00 FF + .byte $00, $00, $99, $58, $40, $5A, $40, $58, $40, $5A, $30, $58, $30, $5A, $20, $58 ; CPU:$F5C7 PRG:35C7 00 00 99 58 40 5A 40 58 40 5A 30 58 30 5A 20 58 + .byte $20, $5A, $20, $58, $20, $5A, $18, $58, $10, $00, $5A, $10, $58, $10, $5A, $08 ; CPU:$F5D7 PRG:35D7 20 5A 20 58 20 5A 18 58 10 00 5A 10 58 10 5A 08 + .byte $58, $08, $FF, $D9, $40, $DC, $40, $D9, $40, $DC, $30, $D9, $30, $DC, $20, $D9 ; CPU:$F5E7 PRG:35E7 58 08 FF D9 40 DC 40 D9 40 DC 30 D9 30 DC 20 D9 + .byte $20, $DC, $20, $D9, $18, $DC, $10, $00, $D9, $10, $DC, $08, $D9, $08, $DC, $08 ; CPU:$F5F7 PRG:35F7 20 DC 20 D9 18 DC 10 00 D9 10 DC 08 D9 08 DC 08 + .byte $FF, $E0, $60, $E3, $40, $E0, $30, $E3, $20, $E0, $20, $E3, $18, $E0, $18, $E3 ; CPU:$F607 PRG:3607 FF E0 60 E3 40 E0 30 E3 20 E0 20 E3 18 E0 18 E3 + .byte $10, $E0, $10, $00, $E3, $08, $E0, $08, $E3, $08, $E0, $08, $E3, $04, $FF, $E6 ; CPU:$F617 PRG:3617 10 E0 10 00 E3 08 E0 08 E3 08 E0 08 E3 04 FF E6 + .byte $E6, $E6, $E6, $01, $E6, $E6, $E6, $FF, $75, $75, $75, $75, $01, $75, $75, $75 ; CPU:$F627 PRG:3627 E6 E6 E6 01 E6 E6 E6 FF 75 75 75 75 01 75 75 75 + .byte $FF, $01, $02, $03, $FF, $02, $01, $03, $FF, $00, $03, $FF, $FB, $FB, $FD, $FE ; CPU:$F637 PRG:3637 FF 01 02 03 FF 02 01 03 FF 00 03 FF FB FB FD FE + .byte $FE, $FF, $FF, $FF, $FF, $AA, $F7, $F8, $FA, $FB, $FC, $FD, $FE, $FE, $FE, $FE ; CPU:$F647 PRG:3647 FE FF FF FF FF AA F7 F8 FA FB FC FD FE FE FE FE + .byte $FE, $FF, $FF, $00, $FF, $00, $00, $FF, $AA, $20, $63, $01, $2A, $20, $6B, $03 ; CPU:$F657 PRG:3657 FE FF FF 00 FF 00 00 FF AA 20 63 01 2A 20 6B 03 + .byte $2B, $2C, $2D, $00, $20, $75, $02, $29, $2A, $00, $F4, $DF, $00, $40, $F4, $DF ; CPU:$F667 PRG:3667 2B 2C 2D 00 20 75 02 29 2A 00 F4 DF 00 40 F4 DF + .byte $00, $4C, $F4, $DF, $00, $58, $F4, $DF, $01, $A8, $F4, $DF, $01, $B4, $F4, $DF ; CPU:$F677 PRG:3677 00 4C F4 DF 00 58 F4 DF 01 A8 F4 DF 01 B4 F4 DF + .byte $01, $C0, $F4, $EE, $00, $38, $20, $6E, $06, $00, $20, $64, $06, $00, $20, $77 ; CPU:$F687 PRG:3687 01 C0 F4 EE 00 38 20 6E 06 00 20 64 06 00 20 77 + .byte $06, $00, $10, $CD, $03, $6C, $10, $CD, $43, $73, $10, $CD, $03, $84, $10, $CD ; CPU:$F697 PRG:3697 06 00 10 CD 03 6C 10 CD 43 73 10 CD 03 84 10 CD + .byte $43, $8B, $FD, $FE, $FE, $FE, $FF, $FF, $00, $FF, $00, $FF, $00, $FF, $00, $00 ; CPU:$F6A7 PRG:36A7 43 8B FD FE FE FE FF FF 00 FF 00 FF 00 FF 00 00 + .byte $00, $00, $00, $00, $01, $00, $01, $00, $01, $00, $01, $01, $02, $02, $02, $03 ; CPU:$F6B7 PRG:36B7 00 00 00 00 01 00 01 00 01 00 01 01 02 02 02 03 + .byte $AA, $01, $00, $02, $00, $2C, $05, $A1, $22, $00, $00, $00, $00, $4C, $F6, $00 ; CPU:$F6C7 PRG:36C7 AA 01 00 02 00 2C 05 A1 22 00 00 00 00 4C F6 00 + .byte $40, $00, $01, $00, $0A, $02, $01, $00, $00, $00, $00, $00, $00, $00, $00, $04 ; CPU:$F6D7 PRG:36D7 40 00 01 00 0A 02 01 00 00 00 00 00 00 00 00 04 + .byte $03, $FE, $FE, $FE, $FF, $DD, $47, $FF, $FF, $FF, $00, $DD, $48, $FF, $FF, $00 ; CPU:$F6E7 PRG:36E7 03 FE FE FE FF DD 47 FF FF FF 00 DD 48 FF FF 00 + .byte $FF, $CC, $01, $DD, $49, $00, $00, $00, $00, $00, $00, $CC, $05, $DD, $4D, $00 ; CPU:$F6F7 PRG:36F7 FF CC 01 DD 49 00 00 00 00 00 00 CC 05 DD 4D 00 + .byte $00, $00, $00, $00, $00, $00, $00, $EE, $FE, $FE, $FE, $FF, $DD, $EB, $FF, $FF ; CPU:$F707 PRG:3707 00 00 00 00 00 00 00 EE FE FE FE FF DD EB FF FF + .byte $FF, $00, $DD, $F0, $00, $00, $00, $00, $00, $00, $EE, $22, $4C, $08, $19, $11 ; CPU:$F717 PRG:3717 FF 00 DD F0 00 00 00 00 00 00 EE 22 4C 08 19 11 + .byte $0A, $1C, $0E, $24, $24, $24, $23, $41, $04, $19, $2E, $24, $24, $00, $21, $89 ; CPU:$F727 PRG:3727 0A 1C 0E 24 24 24 23 41 04 19 2E 24 24 00 21 89 + .byte $0F, $1D, $0E, $1C, $1D, $24, $22, $18, $1E, $1B, $24, $1C, $14, $12, $15, $15 ; CPU:$F737 PRG:3737 0F 1D 0E 1C 1D 24 22 18 1E 1B 24 1C 14 12 15 15 + .byte $20, $8D, $06, $30, $31, $31, $31, $31, $32, $20, $AD, $06, $33, $02, $00, $66 ; CPU:$F747 PRG:3747 20 8D 06 30 31 31 31 31 32 20 AD 06 33 02 00 66 + .byte $00, $34, $20, $CD, $06, $35, $36, $36, $36, $36, $37, $00, $21, $EE, $44, $97 ; CPU:$F757 PRG:3757 00 34 20 CD 06 35 36 36 36 36 37 00 21 EE 44 97 + .byte $23, $DB, $02, $20, $80, $00, $21, $EC, $42, $97, $21, $F2, $42, $97, $23, $DB ; CPU:$F767 PRG:3767 23 DB 02 20 80 00 21 EC 42 97 21 F2 42 97 23 DB + .byte $02, $00, $00, $00, $21, $EA, $42, $97, $21, $F4, $42, $97, $23, $DA, $04, $20 ; CPU:$F777 PRG:3777 02 00 00 00 21 EA 42 97 21 F4 42 97 23 DA 04 20 + .byte $00, $00, $80, $00, $21, $E8, $42, $97, $21, $F6, $42, $97, $23, $DA, $04, $00 ; CPU:$F787 PRG:3787 00 00 80 00 21 E8 42 97 21 F6 42 97 23 DA 04 00 + .byte $00, $00, $00, $00, $22, $A4, $44, $97, $23, $E9, $01, $50, $00, $22, $A2, $42 ; CPU:$F797 PRG:3797 00 00 00 00 22 A4 44 97 23 E9 01 50 00 22 A2 42 + .byte $97, $22, $A8, $42, $97, $23, $E8, $03, $52, $00, $08, $00, $22, $A0, $42, $97 ; CPU:$F7A7 PRG:37A7 97 22 A8 42 97 23 E8 03 52 00 08 00 22 A0 42 97 + .byte $22, $AA, $42, $97, $23, $E8, $03, $50, $00, $00, $00, $22, $B8, $44, $97, $23 ; CPU:$F7B7 PRG:37B7 22 AA 42 97 23 E8 03 50 00 00 00 22 B8 44 97 23 + .byte $EE, $01, $50, $00, $22, $B6, $42, $97, $22, $BC, $42, $97, $23, $ED, $03, $02 ; CPU:$F7C7 PRG:37C7 EE 01 50 00 22 B6 42 97 22 BC 42 97 23 ED 03 02 + .byte $00, $58, $00, $22, $B4, $42, $97, $22, $BE, $42, $97, $23, $ED, $03, $00, $00 ; CPU:$F7D7 PRG:37D7 00 58 00 22 B4 42 97 22 BE 42 97 23 ED 03 00 00 + .byte $50, $00, $00, $03, $FF, $03, $00, $03, $00, $03, $FF, $03, $01, $03, $01, $03 ; CPU:$F7E7 PRG:37E7 50 00 00 03 FF 03 00 03 00 03 FF 03 01 03 01 03 + .byte $00, $03, $01, $03, $02, $03, $02, $03, $02, $02, $02, $02, $03, $02, $03, $02 ; CPU:$F7F7 PRG:37F7 00 03 01 03 02 03 02 03 02 02 02 02 03 02 03 02 + .byte $03, $02, $03, $01, $03, $01, $03, $01, $03, $01, $04, $00, $04, $01, $04, $00 ; CPU:$F807 PRG:3807 03 02 03 01 03 01 03 01 03 01 04 00 04 01 04 00 + .byte $04, $01, $04, $01, $AA, $00, $01, $02, $02, $01, $00, $AA, $00, $5C, $01, $50 ; CPU:$F817 PRG:3817 04 01 04 01 AA 00 01 02 02 01 00 AA 00 5C 01 50 + .byte $00, $10, $02, $14, $82, $40, $00, $10, $01, $28, $00, $50, $80, $40, $02, $28 ; CPU:$F827 PRG:3827 00 10 02 14 82 40 00 10 01 28 00 50 80 40 02 28 + .byte $00, $14, $01, $10, $81, $40, $00, $48, $01, $30, $81, $30, $01, $10, $00, $10 ; CPU:$F837 PRG:3837 00 14 01 10 81 40 00 48 01 30 81 30 01 10 00 10 + .byte $02, $45, $82, $40, $02, $20, $00, $08, $01, $40, $81, $40, $AA, $00, $30, $02 ; CPU:$F847 PRG:3847 02 45 82 40 02 20 00 08 01 40 81 40 AA 00 30 02 + .byte $50, $00, $10, $01, $18, $81, $30, $81, $18, $00, $10, $02, $24, $82, $60, $82 ; CPU:$F857 PRG:3857 50 00 10 01 18 81 30 81 18 00 10 02 24 82 60 82 + .byte $40, $00, $08, $01, $24, $81, $40, $00, $18, $02, $10, $82, $40, $00, $40, $01 ; CPU:$F867 PRG:3867 40 00 08 01 24 81 40 00 18 02 10 82 40 00 40 01 + .byte $60, $00, $50, $01, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF, $FF ; CPU:$F877 PRG:3877 60 00 50 01 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:$F887 PRG:3887 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:$F897 PRG:3897 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF +; ----------------------------------------------------------------------------- +; Routine: SubCF8A7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCF8A7: + nop ; CPU:$F8A7 PRG:38A7 EA + nop ; CPU:$F8A8 PRG:38A8 EA + nop ; CPU:$F8A9 PRG:38A9 EA + nop ; CPU:$F8AA PRG:38AA EA + nop ; CPU:$F8AB PRG:38AB EA + nop ; CPU:$F8AC PRG:38AC EA + nop ; CPU:$F8AD PRG:38AD EA + lda #$C0 ; CPU:$F8AE PRG:38AE A9 C0 + sta $4017 ; CPU:$F8B0 PRG:38B0 8D 17 40 + jsr CheckSoundEnabled ; CPU:$F8B3 PRG:38B3 20 91 FA + lda #$00 ; CPU:$F8B6 PRG:38B6 A9 00 + sta ZpFF ; CPU:$F8B8 PRG:38B8 85 FF + sta ZpFE ; CPU:$F8BA PRG:38BA 85 FE + sta ZpFD ; CPU:$F8BC PRG:38BC 85 FD + sta $4011 ; CPU:$F8BE PRG:38BE 8D 11 40 + rts ; CPU:$F8C1 PRG:38C1 60 +; ----------------------------------------------------------------------------- +; Routine: AudioPulse1CtrlSetup +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +AudioPulse1CtrlSetup: + ldx #$90 ; CPU:$F8C2 PRG:38C2 A2 90 + bne StorePulse1Ctrl ; CPU:$F8C4 PRG:38C4 D0 05 +; ----------------------------------------------------------------------------- +; Routine: AudioPulse1SweepSet +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +AudioPulse1SweepSet: + ldy #$7F ; CPU:$F8C6 PRG:38C6 A0 7F +; ----------------------------------------------------------------------------- +; Routine: StorePulse1Sweep +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +StorePulse1Sweep: + sty $4001 ; CPU:$F8C8 PRG:38C8 8C 01 40 +; ----------------------------------------------------------------------------- +; Routine: StorePulse1Ctrl +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +StorePulse1Ctrl: + stx $4000 ; CPU:$F8CB PRG:38CB 8E 00 40 + rts ; CPU:$F8CE PRG:38CE 60 +; ----------------------------------------------------------------------------- +; Routine: SaveXYWritePulse2Freq +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SaveXYWritePulse2Freq: + stx ZpF1 ; CPU:$F8CF PRG:38CF 86 F1 + sty ZpF0 ; CPU:$F8D1 PRG:38D1 84 F0 + bne Pulse2FreqXZero ; CPU:$F8D3 PRG:38D3 D0 03 +; ----------------------------------------------------------------------------- +; Routine: SubCF8D5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCF8D5: + jsr StorePulse1Sweep ; CPU:$F8D5 PRG:38D5 20 C8 F8 +; ----------------------------------------------------------------------------- +; Routine: Pulse2FreqXZero +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Pulse2FreqXZero: + ldx #$00 ; CPU:$F8D8 PRG:38D8 A2 00 +; ----------------------------------------------------------------------------- +; Routine: WritePulse2Freq +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +WritePulse2Freq: + tay ; CPU:$F8DA PRG:38DA A8 + lda $F901,y ; CPU:$F8DB PRG:38DB B9 01 F9 + beq AudioReturn ; CPU:$F8DE PRG:38DE F0 0B + sta $4002,x ; CPU:$F8E0 PRG:38E0 9D 02 40 + lda $F900,y ; CPU:$F8E3 PRG:38E3 B9 00 F9 + ora #$08 ; CPU:$F8E6 PRG:38E6 09 08 + sta $4003,x ; CPU:$F8E8 PRG:38E8 9D 03 40 +; ----------------------------------------------------------------------------- +; Routine: AudioReturn +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +AudioReturn: + rts ; CPU:$F8EB PRG:38EB 60 +; ----------------------------------------------------------------------------- +; Routine: SubCF8EC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCF8EC: + jsr SubCF96D ; CPU:$F8EC PRG:38EC 20 6D F9 +; ----------------------------------------------------------------------------- +; Routine: Pulse2FreqXFour +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Pulse2FreqXFour: + ldx #$04 ; CPU:$F8EF PRG:38EF A2 04 + bne WritePulse2Freq ; CPU:$F8F1 PRG:38F1 D0 E7 +; ----------------------------------------------------------------------------- +; Routine: ProcessTriangleChannel +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ProcessTriangleChannel: + txa ; CPU:$F8F3 PRG:38F3 8A + and #$3E ; CPU:$F8F4 PRG:38F4 29 3E + ldx #$08 ; CPU:$F8F6 PRG:38F6 A2 08 + bne WritePulse2Freq ; CPU:$F8F8 PRG:38F8 D0 E0 + sta Zp85 ; CPU:$F8FA PRG:38FA 85 85 + sta Zp8D ; CPU:$F8FC PRG:38FC 85 8D + sta $018D ; CPU:$F8FE PRG:38FE 8D 8D 01 + cpy Zp00 ; CPU:$F901 PRG:3901 C4 00 + brk ; CPU:$F903 PRG:3903 00 +; ---- data $F904-$F96A (103 bytes) ---- +; referenced by `lda $F94E,y` at $F98E (operand $F94E falls inside this region) + .byte $00, $69, $00, $D4, $00, $C8, $00, $BD, $00, $B2, $00, $A8, $00, $9F, $00, $8D ; CPU:$F904 PRG:3904 00 69 00 D4 00 C8 00 BD 00 B2 00 A8 00 9F 00 8D + .byte $00, $85, $00, $7E, $00, $76, $00, $70, $01, $AB, $01, $7C, $01, $67, $01, $52 ; CPU:$F914 PRG:3914 00 85 00 7E 00 76 00 70 01 AB 01 7C 01 67 01 52 + .byte $01, $3F, $01, $1C, $01, $0C, $00, $FD, $00, $EE, $00, $E1, $03, $57, $02, $F9 ; CPU:$F924 PRG:3924 01 3F 01 1C 01 0C 00 FD 00 EE 00 E1 03 57 02 F9 + .byte $02, $A6, $02, $80, $02, $3A, $02, $1A, $01, $FC, $01, $DF, $06, $AE, $05, $F3 ; CPU:$F934 PRG:3934 02 A6 02 80 02 3A 02 1A 01 FC 01 DF 06 AE 05 F3 + .byte $05, $4D, $05, $01, $04, $75, $03, $89, $00, $53, $03, $07, $0E, $1C, $38, $15 ; CPU:$F944 PRG:3944 05 4D 05 01 04 75 03 89 00 53 03 07 0E 1C 38 15 + .byte $2A, $04, $08, $10, $20, $40, $18, $30, $06, $05, $0A, $14, $28, $50, $1E, $3C ; CPU:$F954 PRG:3954 2A 04 08 10 20 40 18 30 06 05 0A 14 28 50 1E 3C + .byte $04, $0B, $16, $2C, $58, $21, $07 ; CPU:$F964 PRG:3964 04 0B 16 2C 58 21 07 +; ----------------------------------------------------------------------------- +; Routine: SubCF96B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCF96B: + ldy #$7F ; CPU:$F96B PRG:396B A0 7F +; ----------------------------------------------------------------------------- +; Routine: SubCF96D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCF96D: + stx $4004 ; CPU:$F96D PRG:396D 8E 04 40 + sty $4005 ; CPU:$F970 PRG:3970 8C 05 40 + rts ; CPU:$F973 PRG:3973 60 +; ----------------------------------------------------------------------------- +; Routine: DivideYBy8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DivideYBy8: + tya ; CPU:$F974 PRG:3974 98 + lsr a ; CPU:$F975 PRG:3975 4A + lsr a ; CPU:$F976 PRG:3976 4A + lsr a ; CPU:$F977 PRG:3977 4A +; ----------------------------------------------------------------------------- +; Routine: SubCF978 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCF978: + lsr a ; CPU:$F978 PRG:3978 4A +; ----------------------------------------------------------------------------- +; Routine: YMinusXDiv8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +YMinusXDiv8: + lsr a ; CPU:$F979 PRG:3979 4A + sta Zp00 ; CPU:$F97A PRG:397A 85 00 + tya ; CPU:$F97C PRG:397C 98 + sec ; CPU:$F97D PRG:397D 38 + sbc Zp00 ; CPU:$F97E PRG:397E E5 00 + rts ; CPU:$F980 PRG:3980 60 +; ----------------------------------------------------------------------------- +; Routine: RotateBitsForTableLookup +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +RotateBitsForTableLookup: + tax ; CPU:$F981 PRG:3981 AA + ror a ; CPU:$F982 PRG:3982 6A + txa ; CPU:$F983 PRG:3983 8A + rol a ; CPU:$F984 PRG:3984 2A + rol a ; CPU:$F985 PRG:3985 2A + rol a ; CPU:$F986 PRG:3986 2A +; ----------------------------------------------------------------------------- +; Routine: LookupNoteTable +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +LookupNoteTable: + and #$07 ; CPU:$F987 PRG:3987 29 07 + clc ; CPU:$F989 PRG:3989 18 + adc $068D ; CPU:$F98A PRG:398A 6D 8D 06 + tay ; CPU:$F98D PRG:398D A8 + lda $F94E,y ; CPU:$F98E PRG:398E B9 4E F9 + rts ; CPU:$F991 PRG:3991 60 +; ---- data $F992-$F9A1 (16 bytes) ---- +; referenced by `lda $F99D,y` at $FA14 (operand $F99D falls inside this region) +; referenced by `ldy $F997,x` at $FA73 (operand $F997 falls inside this region) + .byte $8C, $84, $83, $8D, $8D, $83, $83, $8B, $8C, $83, $8B, $8C, $8A, $8A, $8B, $8B ; CPU:$F992 PRG:3992 8C 84 83 8D 8D 83 83 8B 8C 83 8B 8C 8A 8A 8B 8B +; ----------------------------------------------------------------------------- +; Routine: SetupAudioChannel +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupAudioChannel: + sty ZpF0 ; CPU:$F9A2 PRG:39A2 84 F0 + lda #$85 ; CPU:$F9A4 PRG:39A4 A9 85 + sta ZpF1 ; CPU:$F9A6 PRG:39A6 85 F1 + lda #$FE ; CPU:$F9A8 PRG:39A8 A9 FE + sta ZpF2 ; CPU:$F9AA PRG:39AA 85 F2 + ldx #$84 ; CPU:$F9AC PRG:39AC A2 84 + ldy #$8A ; CPU:$F9AE PRG:39AE A0 8A + lda #$2A ; CPU:$F9B0 PRG:39B0 A9 2A + jsr SubCF8D5 ; CPU:$F9B2 PRG:39B2 20 D5 F8 +; ----------------------------------------------------------------------------- +; Routine: DecayFrequencyEnvelope +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DecayFrequencyEnvelope: + dec ZpF1 ; CPU:$F9B5 PRG:39B5 C6 F1 + lda ZpF1 ; CPU:$F9B7 PRG:39B7 A5 F1 + bne Label_F9BE ; CPU:$F9B9 PRG:39B9 D0 03 + jmp ResetAudioChannel ; CPU:$F9BB PRG:39BB 4C EF FA +; ----------------------------------------------------------------------------- +; Routine: Label_F9BE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F9BE: + cmp #$40 ; CPU:$F9BE PRG:39BE C9 40 + beq Label_F9DD ; CPU:$F9C0 PRG:39C0 F0 1B + bcc Label_F9E3 ; CPU:$F9C2 PRG:39C2 90 1F + cmp #$78 ; CPU:$F9C4 PRG:39C4 C9 78 + bcc Label_F9D8 ; CPU:$F9C6 PRG:39C6 90 10 + lsr a ; CPU:$F9C8 PRG:39C8 4A + bcs Label_FA1B ; CPU:$F9C9 PRG:39C9 B0 50 + lda ZpF2 ; CPU:$F9CB PRG:39CB A5 F2 + tay ; CPU:$F9CD PRG:39CD A8 + jsr SubCF978 ; CPU:$F9CE PRG:39CE 20 78 F9 + sta ZpF2 ; CPU:$F9D1 PRG:39D1 85 F2 + sta $4002 ; CPU:$F9D3 PRG:39D3 8D 02 40 + bne Label_FA1B ; CPU:$F9D6 PRG:39D6 D0 43 +; ----------------------------------------------------------------------------- +; Routine: Label_F9D8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F9D8: + jsr AudioPulse1CtrlSetup ; CPU:$F9D8 PRG:39D8 20 C2 F8 + bne Label_FA1B ; CPU:$F9DB PRG:39DB D0 3E +; ----------------------------------------------------------------------------- +; Routine: Label_F9DD +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F9DD: + lda #$35 ; CPU:$F9DD PRG:39DD A9 35 + sta ZpF2 ; CPU:$F9DF PRG:39DF 85 F2 + bne Label_F9F2 ; CPU:$F9E1 PRG:39E1 D0 0F +; ----------------------------------------------------------------------------- +; Routine: Label_F9E3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F9E3: + ldx #$9C ; CPU:$F9E3 PRG:39E3 A2 9C + cmp #$18 ; CPU:$F9E5 PRG:39E5 C9 18 + bcs Label_F9ED ; CPU:$F9E7 PRG:39E7 B0 04 + lsr a ; CPU:$F9E9 PRG:39E9 4A + ora #$90 ; CPU:$F9EA PRG:39EA 09 90 + tax ; CPU:$F9EC PRG:39EC AA +; ----------------------------------------------------------------------------- +; Routine: Label_F9ED +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F9ED: + dec $06B7 ; CPU:$F9ED PRG:39ED CE B7 06 + bne Label_FA11 ; CPU:$F9F0 PRG:39F0 D0 1F +; ----------------------------------------------------------------------------- +; Routine: Label_F9F2 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_F9F2: + lda #$04 ; CPU:$F9F2 PRG:39F2 A9 04 + sta $06B7 ; CPU:$F9F4 PRG:39F4 8D B7 06 + lda ZpF2 ; CPU:$F9F7 PRG:39F7 A5 F2 + lsr a ; CPU:$F9F9 PRG:39F9 4A + lsr a ; CPU:$F9FA PRG:39FA 4A + lsr a ; CPU:$F9FB PRG:39FB 4A + lsr a ; CPU:$F9FC PRG:39FC 4A + sec ; CPU:$F9FD PRG:39FD 38 + adc ZpF2 ; CPU:$F9FE PRG:39FE 65 F2 + sta ZpF2 ; CPU:$FA00 PRG:3A00 85 F2 + asl a ; CPU:$FA02 PRG:3A02 0A + asl a ; CPU:$FA03 PRG:3A03 0A + sta $4002 ; CPU:$FA04 PRG:3A04 8D 02 40 + lda ZpF2 ; CPU:$FA07 PRG:3A07 A5 F2 + rol a ; CPU:$FA09 PRG:3A09 2A + rol a ; CPU:$FA0A PRG:3A0A 2A + rol a ; CPU:$FA0B PRG:3A0B 2A + and #$03 ; CPU:$FA0C PRG:3A0C 29 03 + sta $4003 ; CPU:$FA0E PRG:3A0E 8D 03 40 +; ----------------------------------------------------------------------------- +; Routine: Label_FA11 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA11: + ldy $06B7 ; CPU:$FA11 PRG:3A11 AC B7 06 + lda $F99D,y ; CPU:$FA14 PRG:3A14 B9 9D F9 + tay ; CPU:$FA17 PRG:3A17 A8 + jsr StorePulse1Sweep ; CPU:$FA18 PRG:3A18 20 C8 F8 +; ----------------------------------------------------------------------------- +; Routine: Label_FA1B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA1B: + jmp SubCFD27 ; CPU:$FA1B PRG:3A1B 4C 27 FD +; ----------------------------------------------------------------------------- +; Routine: SetupSoundChannel +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupSoundChannel: + sty ZpF0 ; CPU:$FA1E PRG:3A1E 84 F0 + lda #$14 ; CPU:$FA20 PRG:3A20 A9 14 + sta ZpF1 ; CPU:$FA22 PRG:3A22 85 F1 + ldx #$85 ; CPU:$FA24 PRG:3A24 A2 85 + ldy #$85 ; CPU:$FA26 PRG:3A26 A0 85 + lda #$30 ; CPU:$FA28 PRG:3A28 A9 30 + jsr SubCF8D5 ; CPU:$FA2A PRG:3A2A 20 D5 F8 +; ----------------------------------------------------------------------------- +; Routine: Label_FA2D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA2D: + lda ZpF1 ; CPU:$FA2D PRG:3A2D A5 F1 + cmp #$0D ; CPU:$FA2F PRG:3A2F C9 0D + bne Label_FA38 ; CPU:$FA31 PRG:3A31 D0 05 + lda #$30 ; CPU:$FA33 PRG:3A33 A9 30 + jsr Pulse2FreqXZero ; CPU:$FA35 PRG:3A35 20 D8 F8 +; ----------------------------------------------------------------------------- +; Routine: Label_FA38 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA38: + jmp DecayCounter ; CPU:$FA38 PRG:3A38 4C EB FA +; ----------------------------------------------------------------------------- +; Routine: Label_FA3B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA3B: + ldx #$6E ; CPU:$FA3B PRG:3A3B A2 6E + lda #$12 ; CPU:$FA3D PRG:3A3D A9 12 + jsr SaveXYWritePulse2Freq ; CPU:$FA3F PRG:3A3F 20 CF F8 + bne Label_FA5B ; CPU:$FA42 PRG:3A42 D0 17 +; ----------------------------------------------------------------------------- +; Routine: Label_FA44 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA44: + lda ZpF1 ; CPU:$FA44 PRG:3A44 A5 F1 + cmp #$50 ; CPU:$FA46 PRG:3A46 C9 50 + bcs Label_FA5F ; CPU:$FA48 PRG:3A48 B0 15 + cmp #$46 ; CPU:$FA4A PRG:3A4A C9 46 + bcs Label_FA71 ; CPU:$FA4C PRG:3A4C B0 23 + cmp #$37 ; CPU:$FA4E PRG:3A4E C9 37 + bcs Label_FA5F ; CPU:$FA50 PRG:3A50 B0 0D + bcc Label_FA71 ; CPU:$FA52 PRG:3A52 90 1D +; ----------------------------------------------------------------------------- +; Routine: Label_FA54 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA54: + ldx #$1E ; CPU:$FA54 PRG:3A54 A2 1E + lda #$06 ; CPU:$FA56 PRG:3A56 A9 06 + jsr SaveXYWritePulse2Freq ; CPU:$FA58 PRG:3A58 20 CF F8 +; ----------------------------------------------------------------------------- +; Routine: Label_FA5B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA5B: + lda #$06 ; CPU:$FA5B PRG:3A5B A9 06 + sta ZpF2 ; CPU:$FA5D PRG:3A5D 85 F2 +; ----------------------------------------------------------------------------- +; Routine: Label_FA5F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA5F: + ldx ZpF2 ; CPU:$FA5F PRG:3A5F A6 F2 + ldy $F991,x ; CPU:$FA61 PRG:3A61 BC 91 F9 + bne Label_FA76 ; CPU:$FA64 PRG:3A64 D0 10 +; ----------------------------------------------------------------------------- +; Routine: Label_FA66 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA66: + ldx #$10 ; CPU:$FA66 PRG:3A66 A2 10 + lda #$22 ; CPU:$FA68 PRG:3A68 A9 22 + jsr SaveXYWritePulse2Freq ; CPU:$FA6A PRG:3A6A 20 CF F8 + lda #$06 ; CPU:$FA6D PRG:3A6D A9 06 + sta ZpF2 ; CPU:$FA6F PRG:3A6F 85 F2 +; ----------------------------------------------------------------------------- +; Routine: Label_FA71 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA71: + ldx ZpF2 ; CPU:$FA71 PRG:3A71 A6 F2 + ldy $F997,x ; CPU:$FA73 PRG:3A73 BC 97 F9 +; ----------------------------------------------------------------------------- +; Routine: Label_FA76 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA76: + dec ZpF2 ; CPU:$FA76 PRG:3A76 C6 F2 + bne Label_FA7E ; CPU:$FA78 PRG:3A78 D0 04 + lda #$06 ; CPU:$FA7A PRG:3A7A A9 06 + sta ZpF2 ; CPU:$FA7C PRG:3A7C 85 F2 +; ----------------------------------------------------------------------------- +; Routine: Label_FA7E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA7E: + ldx #$9A ; CPU:$FA7E PRG:3A7E A2 9A + lda ZpF1 ; CPU:$FA80 PRG:3A80 A5 F1 + cmp #$0A ; CPU:$FA82 PRG:3A82 C9 0A + bcs Label_FAE8 ; CPU:$FA84 PRG:3A84 B0 62 + bcc Label_FAE5 ; CPU:$FA86 PRG:3A86 90 5D +; ----------------------------------------------------------------------------- +; Routine: Label_FA88 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA88: + jmp SetupAudioChannel ; CPU:$FA88 PRG:3A88 4C A2 F9 +; ----------------------------------------------------------------------------- +; Routine: Label_FA8B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA8B: + jmp DecayFrequencyEnvelope ; CPU:$FA8B PRG:3A8B 4C B5 F9 +; ----------------------------------------------------------------------------- +; Routine: Label_FA8E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FA8E: + jmp SetupSoundChannel ; CPU:$FA8E PRG:3A8E 4C 1E FA +; ----------------------------------------------------------------------------- +; Routine: CheckSoundEnabled +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +CheckSoundEnabled: + lda ZpFA ; CPU:$FA91 PRG:3A91 A5 FA + bne Label_FAD1 ; CPU:$FA93 PRG:3A93 D0 3C + ldy ZpFF ; CPU:$FA95 PRG:3A95 A4 FF + lda ZpF0 ; CPU:$FA97 PRG:3A97 A5 F0 + lsr a ; CPU:$FA99 PRG:3A99 4A + bcs Label_FA8B ; CPU:$FA9A PRG:3A9A B0 EF + lsr ZpFF ; CPU:$FA9C PRG:3A9C 46 FF + bcs Label_FA88 ; CPU:$FA9E PRG:3A9E B0 E8 + lsr a ; CPU:$FAA0 PRG:3AA0 4A + bcs Label_FA2D ; CPU:$FAA1 PRG:3AA1 B0 8A + lsr ZpFF ; CPU:$FAA3 PRG:3AA3 46 FF + bcs Label_FA8E ; CPU:$FAA5 PRG:3AA5 B0 E7 + lsr a ; CPU:$FAA7 PRG:3AA7 4A + bcs Label_FA44 ; CPU:$FAA8 PRG:3AA8 B0 9A + lsr ZpFF ; CPU:$FAAA PRG:3AAA 46 FF + bcs Label_FA3B ; CPU:$FAAC PRG:3AAC B0 8D + lsr ZpFF ; CPU:$FAAE PRG:3AAE 46 FF + bcs Label_FA54 ; CPU:$FAB0 PRG:3AB0 B0 A2 + lsr a ; CPU:$FAB2 PRG:3AB2 4A + bcs Label_FA5F ; CPU:$FAB3 PRG:3AB3 B0 AA + lsr a ; CPU:$FAB5 PRG:3AB5 4A + bcs Label_FA71 ; CPU:$FAB6 PRG:3AB6 B0 B9 + lsr ZpFF ; CPU:$FAB8 PRG:3AB8 46 FF + bcs Label_FA66 ; CPU:$FABA PRG:3ABA B0 AA + lsr a ; CPU:$FABC PRG:3ABC 4A + bcs Label_FADB ; CPU:$FABD PRG:3ABD B0 1C + lsr ZpFF ; CPU:$FABF PRG:3ABF 46 FF + bcs Label_FAD4 ; CPU:$FAC1 PRG:3AC1 B0 11 + lsr a ; CPU:$FAC3 PRG:3AC3 4A + bcs Label_FAFF ; CPU:$FAC4 PRG:3AC4 B0 39 + lsr ZpFF ; CPU:$FAC6 PRG:3AC6 46 FF + bcs Label_FAF8 ; CPU:$FAC8 PRG:3AC8 B0 2E + lsr a ; CPU:$FACA PRG:3ACA 4A + bcs Label_FB24 ; CPU:$FACB PRG:3ACB B0 57 + lsr ZpFF ; CPU:$FACD PRG:3ACD 46 FF + bcs Label_FB0F ; CPU:$FACF PRG:3ACF B0 3E +; ----------------------------------------------------------------------------- +; Routine: Label_FAD1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FAD1: + jmp SubCFCC9 ; CPU:$FAD1 PRG:3AD1 4C C9 FC +; ----------------------------------------------------------------------------- +; Routine: Label_FAD4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FAD4: + ldx #$11 ; CPU:$FAD4 PRG:3AD4 A2 11 + lda #$34 ; CPU:$FAD6 PRG:3AD6 A9 34 + jsr SaveXYWritePulse2Freq ; CPU:$FAD8 PRG:3AD8 20 CF F8 +; ----------------------------------------------------------------------------- +; Routine: Label_FADB +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FADB: + lda ZpF1 ; CPU:$FADB PRG:3ADB A5 F1 + ldy #$8C ; CPU:$FADD PRG:3ADD A0 8C + cmp #$08 ; CPU:$FADF PRG:3ADF C9 08 + bcc Label_FAE5 ; CPU:$FAE1 PRG:3AE1 90 02 + lda #$08 ; CPU:$FAE3 PRG:3AE3 A9 08 +; ----------------------------------------------------------------------------- +; Routine: Label_FAE5 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FAE5: + ora #$90 ; CPU:$FAE5 PRG:3AE5 09 90 + tax ; CPU:$FAE7 PRG:3AE7 AA +; ----------------------------------------------------------------------------- +; Routine: Label_FAE8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FAE8: + jsr StorePulse1Sweep ; CPU:$FAE8 PRG:3AE8 20 C8 F8 +; ----------------------------------------------------------------------------- +; Routine: DecayCounter +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +DecayCounter: + dec ZpF1 ; CPU:$FAEB PRG:3AEB C6 F1 + bne Label_FAD1 ; CPU:$FAED PRG:3AED D0 E2 +; ----------------------------------------------------------------------------- +; Routine: ResetAudioChannel +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ResetAudioChannel: + jsr AudioPulse1CtrlSetup ; CPU:$FAEF PRG:3AEF 20 C2 F8 + lda #$00 ; CPU:$FAF2 PRG:3AF2 A9 00 + sta ZpF0 ; CPU:$FAF4 PRG:3AF4 85 F0 + beq Label_FAD1 ; CPU:$FAF6 PRG:3AF6 F0 D9 +; ----------------------------------------------------------------------------- +; Routine: Label_FAF8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FAF8: + ldx #$09 ; CPU:$FAF8 PRG:3AF8 A2 09 + lda #$04 ; CPU:$FAFA PRG:3AFA A9 04 + jsr SaveXYWritePulse2Freq ; CPU:$FAFC PRG:3AFC 20 CF F8 +; ----------------------------------------------------------------------------- +; Routine: Label_FAFF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FAFF: + ldy #$84 ; CPU:$FAFF PRG:3AFF A0 84 + lda ZpF1 ; CPU:$FB01 PRG:3B01 A5 F1 + cmp #$04 ; CPU:$FB03 PRG:3B03 C9 04 + beq ResetAudioChannel ; CPU:$FB05 PRG:3B05 F0 E8 + cmp #$08 ; CPU:$FB07 PRG:3B07 C9 08 + bcs Label_FAE5 ; CPU:$FB09 PRG:3B09 B0 DA + ldy #$8B ; CPU:$FB0B PRG:3B0B A0 8B + bne Label_FAE5 ; CPU:$FB0D PRG:3B0D D0 D6 +; ----------------------------------------------------------------------------- +; Routine: Label_FB0F +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FB0F: + sty ZpF0 ; CPU:$FB0F PRG:3B0F 84 F0 + lda #$05 ; CPU:$FB11 PRG:3B11 A9 05 + sta ZpF1 ; CPU:$FB13 PRG:3B13 85 F1 + inc $06F0 ; CPU:$FB15 PRG:3B15 EE F0 06 + lda $06F0 ; CPU:$FB18 PRG:3B18 AD F0 06 + and #$07 ; CPU:$FB1B PRG:3B1B 29 07 + tay ; CPU:$FB1D PRG:3B1D A8 + lda $FB32,y ; CPU:$FB1E PRG:3B1E B9 32 FB + jsr Pulse2FreqXZero ; CPU:$FB21 PRG:3B21 20 D8 F8 +; ----------------------------------------------------------------------------- +; Routine: Label_FB24 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FB24: + lda ZpF1 ; CPU:$FB24 PRG:3B24 A5 F1 + ldy #$7F ; CPU:$FB26 PRG:3B26 A0 7F + ldx #$90 ; CPU:$FB28 PRG:3B28 A2 90 + cmp #$04 ; CPU:$FB2A PRG:3B2A C9 04 + bcs Label_FAE5 ; CPU:$FB2C PRG:3B2C B0 B7 + lda #$04 ; CPU:$FB2E PRG:3B2E A9 04 + bcc Label_FAE8 ; CPU:$FB30 PRG:3B30 90 B6 + rol Zp22 ; CPU:$FB32 PRG:3B32 26 22 + rol Zp22 ; CPU:$FB34 PRG:3B34 26 22 + rol Zp22 ; CPU:$FB36 PRG:3B36 26 22 + .byte $1C, $22, $83 ; CPU:$FB38 PRG:3B38 1C 22 83 -- nop $8322,x (undocumented; ca65 cannot encode) + sty Zp82 ; CPU:$FB3B PRG:3B3B 84 82 +; ---- data $FB3D-$FB3D (1 bytes) ---- + .byte $8E ; CPU:$FB3D PRG:3B3D 8E +; ----------------------------------------------------------------------------- +; Routine: SetupNoiseChannel +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SetupNoiseChannel: + sty ZpFB ; CPU:$FB3E PRG:3B3E 84 FB + lda #$60 ; CPU:$FB40 PRG:3B40 A9 60 + sta ZpF3 ; CPU:$FB42 PRG:3B42 85 F3 + lda #$19 ; CPU:$FB44 PRG:3B44 A9 19 + sta ZpF4 ; CPU:$FB46 PRG:3B46 85 F4 +; ----------------------------------------------------------------------------- +; Routine: ProcessNoiseChannel +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ProcessNoiseChannel: + lda ZpF3 ; CPU:$FB48 PRG:3B48 A5 F3 + and #$07 ; CPU:$FB4A PRG:3B4A 29 07 + bne Label_FB6C ; CPU:$FB4C PRG:3B4C D0 1E + lda ZpF4 ; CPU:$FB4E PRG:3B4E A5 F4 + and $0500 ; CPU:$FB50 PRG:3B50 2D 00 05 + lsr a ; CPU:$FB53 PRG:3B53 4A + lsr a ; CPU:$FB54 PRG:3B54 4A + clc ; CPU:$FB55 PRG:3B55 18 + adc ZpF4 ; CPU:$FB56 PRG:3B56 65 F4 + bcs Label_FB5C ; CPU:$FB58 PRG:3B58 B0 02 + sta ZpF4 ; CPU:$FB5A PRG:3B5A 85 F4 +; ----------------------------------------------------------------------------- +; Routine: Label_FB5C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FB5C: + lda ZpF4 ; CPU:$FB5C PRG:3B5C A5 F4 + rol a ; CPU:$FB5E PRG:3B5E 2A + rol a ; CPU:$FB5F PRG:3B5F 2A + rol a ; CPU:$FB60 PRG:3B60 2A + sta $4006 ; CPU:$FB61 PRG:3B61 8D 06 40 + rol a ; CPU:$FB64 PRG:3B64 2A + and #$07 ; CPU:$FB65 PRG:3B65 29 07 + ora #$08 ; CPU:$FB67 PRG:3B67 09 08 + sta $4007 ; CPU:$FB69 PRG:3B69 8D 07 40 +; ----------------------------------------------------------------------------- +; Routine: Label_FB6C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FB6C: + lda $0500 ; CPU:$FB6C PRG:3B6C AD 00 05 + and #$03 ; CPU:$FB6F PRG:3B6F 29 03 + lda $FB3A,y ; CPU:$FB71 PRG:3B71 B9 3A FB + sta $4005 ; CPU:$FB74 PRG:3B74 8D 05 40 + jmp SubCFCA7 ; CPU:$FB77 PRG:3B77 4C A7 FC +; ----------------------------------------------------------------------------- +; Routine: Label_FB7A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FB7A: + sty ZpFB ; CPU:$FB7A PRG:3B7A 84 FB + lda #$28 ; CPU:$FB7C PRG:3B7C A9 28 + sta ZpF3 ; CPU:$FB7E PRG:3B7E 85 F3 + lda #$FE ; CPU:$FB80 PRG:3B80 A9 FE + sta ZpF4 ; CPU:$FB82 PRG:3B82 85 F4 + jsr SubCF96B ; CPU:$FB84 PRG:3B84 20 6B F9 +; ----------------------------------------------------------------------------- +; Routine: Label_FB87 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FB87: + ldy ZpF4 ; CPU:$FB87 PRG:3B87 A4 F4 + lda ZpF3 ; CPU:$FB89 PRG:3B89 A5 F3 + and #$03 ; CPU:$FB8B PRG:3B8B 29 03 + beq Label_FB9A ; CPU:$FB8D PRG:3B8D F0 0B + cmp #$03 ; CPU:$FB8F PRG:3B8F C9 03 + beq Label_FBA0 ; CPU:$FB91 PRG:3B91 F0 0D + tya ; CPU:$FB93 PRG:3B93 98 + jsr YMinusXDiv8 ; CPU:$FB94 PRG:3B94 20 79 F9 + tay ; CPU:$FB97 PRG:3B97 A8 + bne Label_FBA0 ; CPU:$FB98 PRG:3B98 D0 06 +; ----------------------------------------------------------------------------- +; Routine: Label_FB9A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FB9A: + tya ; CPU:$FB9A PRG:3B9A 98 + jsr SubCF978 ; CPU:$FB9B PRG:3B9B 20 78 F9 + sta ZpF4 ; CPU:$FB9E PRG:3B9E 85 F4 +; ----------------------------------------------------------------------------- +; Routine: Label_FBA0 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FBA0: + tya ; CPU:$FBA0 PRG:3BA0 98 + clc ; CPU:$FBA1 PRG:3BA1 18 + rol a ; CPU:$FBA2 PRG:3BA2 2A + rol a ; CPU:$FBA3 PRG:3BA3 2A + sta $4006 ; CPU:$FBA4 PRG:3BA4 8D 06 40 + rol a ; CPU:$FBA7 PRG:3BA7 2A + sta $4007 ; CPU:$FBA8 PRG:3BA8 8D 07 40 + jmp SubCFCA7 ; CPU:$FBAB PRG:3BAB 4C A7 FC +; ----------------------------------------------------------------------------- +; Routine: Label_FBAE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FBAE: + sty ZpFB ; CPU:$FBAE PRG:3BAE 84 FB + lda #$1D ; CPU:$FBB0 PRG:3BB0 A9 1D + sta ZpF3 ; CPU:$FBB2 PRG:3BB2 85 F3 + lda #$08 ; CPU:$FBB4 PRG:3BB4 A9 08 + sta ZpF4 ; CPU:$FBB6 PRG:3BB6 85 F4 + lda #$1A ; CPU:$FBB8 PRG:3BB8 A9 1A + bne Label_FBC4 ; CPU:$FBBA PRG:3BBA D0 08 +; ----------------------------------------------------------------------------- +; Routine: Label_FBBC +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FBBC: + lda ZpF3 ; CPU:$FBBC PRG:3BBC A5 F3 + cmp #$1A ; CPU:$FBBE PRG:3BBE C9 1A + bne Label_FBC7 ; CPU:$FBC0 PRG:3BC0 D0 05 + lda #$4C ; CPU:$FBC2 PRG:3BC2 A9 4C +; ----------------------------------------------------------------------------- +; Routine: Label_FBC4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FBC4: + jsr Pulse2FreqXFour ; CPU:$FBC4 PRG:3BC4 20 EF F8 +; ----------------------------------------------------------------------------- +; Routine: Label_FBC7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FBC7: + ldx #$86 ; CPU:$FBC7 PRG:3BC7 A2 86 + dec ZpF4 ; CPU:$FBC9 PRG:3BC9 C6 F4 + bne Label_FBD3 ; CPU:$FBCB PRG:3BCB D0 06 + lda #$04 ; CPU:$FBCD PRG:3BCD A9 04 + sta ZpF4 ; CPU:$FBCF PRG:3BCF 85 F4 + ldx #$46 ; CPU:$FBD1 PRG:3BD1 A2 46 +; ----------------------------------------------------------------------------- +; Routine: Label_FBD3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FBD3: + jsr SubCF96B ; CPU:$FBD3 PRG:3BD3 20 6B F9 + bne SubCFC38 ; CPU:$FBD6 PRG:3BD6 D0 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FBD8 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FBD8: + sty ZpFB ; CPU:$FBD8 PRG:3BD8 84 FB + lda #$20 ; CPU:$FBDA PRG:3BDA A9 20 + sta ZpF3 ; CPU:$FBDC PRG:3BDC 85 F3 + ldx #$46 ; CPU:$FBDE PRG:3BDE A2 46 + ldy #$BE ; CPU:$FBE0 PRG:3BE0 A0 BE + lda #$10 ; CPU:$FBE2 PRG:3BE2 A9 10 + bne Label_FC35 ; CPU:$FBE4 PRG:3BE4 D0 4F +; ----------------------------------------------------------------------------- +; Routine: Label_FBE6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FBE6: + jmp SetupNoiseChannel ; CPU:$FBE6 PRG:3BE6 4C 3E FB +; ----------------------------------------------------------------------------- +; Routine: Label_FBE9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FBE9: + jmp ProcessNoiseChannel ; CPU:$FBE9 PRG:3BE9 4C 48 FB +; ----------------------------------------------------------------------------- +; Routine: ProcessNoiseEnvelope +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +ProcessNoiseEnvelope: + ldy ZpFE ; CPU:$FBEC PRG:3BEC A4 FE + lda ZpFB ; CPU:$FBEE PRG:3BEE A5 FB + lsr a ; CPU:$FBF0 PRG:3BF0 4A + bcs Label_FB87 ; CPU:$FBF1 PRG:3BF1 B0 94 + lsr ZpFE ; CPU:$FBF3 PRG:3BF3 46 FE + bcs Label_FB7A ; CPU:$FBF5 PRG:3BF5 B0 83 + lsr ZpFE ; CPU:$FBF7 PRG:3BF7 46 FE + bcs Label_FBAE ; CPU:$FBF9 PRG:3BF9 B0 B3 + lsr a ; CPU:$FBFB PRG:3BFB 4A + bcs Label_FBBC ; CPU:$FBFC PRG:3BFC B0 BE + lsr a ; CPU:$FBFE PRG:3BFE 4A + bcs Label_FBE9 ; CPU:$FBFF PRG:3BFF B0 E8 + lsr ZpFE ; CPU:$FC01 PRG:3C01 46 FE + bcs Label_FBE6 ; CPU:$FC03 PRG:3C03 B0 E1 + lsr ZpFE ; CPU:$FC05 PRG:3C05 46 FE + bcs Label_FBD8 ; CPU:$FC07 PRG:3C07 B0 CF + lsr a ; CPU:$FC09 PRG:3C09 4A + bcs SubCFC38 ; CPU:$FC0A PRG:3C0A B0 2C + lsr ZpFE ; CPU:$FC0C PRG:3C0C 46 FE + bcs Label_FC29 ; CPU:$FC0E PRG:3C0E B0 19 + lsr a ; CPU:$FC10 PRG:3C10 4A + bcs SubCFC38 ; CPU:$FC11 PRG:3C11 B0 25 + lsr ZpFE ; CPU:$FC13 PRG:3C13 46 FE + bcs Label_FC46 ; CPU:$FC15 PRG:3C15 B0 2F + lsr a ; CPU:$FC17 PRG:3C17 4A + bcs SubCFC38 ; CPU:$FC18 PRG:3C18 B0 1E + lsr ZpFE ; CPU:$FC1A PRG:3C1A 46 FE + bcs Label_FC54 ; CPU:$FC1C PRG:3C1C B0 36 + lsr a ; CPU:$FC1E PRG:3C1E 4A + bcs Label_FC5C ; CPU:$FC1F PRG:3C1F B0 3B + lsr ZpFE ; CPU:$FC21 PRG:3C21 46 FE + bcs Label_FC79 ; CPU:$FC23 PRG:3C23 B0 54 + lsr a ; CPU:$FC25 PRG:3C25 4A + bcs Label_FC88 ; CPU:$FC26 PRG:3C26 B0 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FC28 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FC28: + rts ; CPU:$FC28 PRG:3C28 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FC29 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FC29: + sty ZpFB ; CPU:$FC29 PRG:3C29 84 FB + lda #$18 ; CPU:$FC2B PRG:3C2B A9 18 + sta ZpF3 ; CPU:$FC2D PRG:3C2D 85 F3 + ldx #$44 ; CPU:$FC2F PRG:3C2F A2 44 + ldy #$86 ; CPU:$FC31 PRG:3C31 A0 86 + lda #$2A ; CPU:$FC33 PRG:3C33 A9 2A +; ----------------------------------------------------------------------------- +; Routine: Label_FC35 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FC35: + jsr SubCF8EC ; CPU:$FC35 PRG:3C35 20 EC F8 +; ----------------------------------------------------------------------------- +; Routine: SubCFC38 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCFC38: + dec ZpF3 ; CPU:$FC38 PRG:3C38 C6 F3 + bne Label_FC28 ; CPU:$FC3A PRG:3C3A D0 EC + lda #$00 ; CPU:$FC3C PRG:3C3C A9 00 + sta ZpFB ; CPU:$FC3E PRG:3C3E 85 FB + lda #$10 ; CPU:$FC40 PRG:3C40 A9 10 + sta $4004 ; CPU:$FC42 PRG:3C42 8D 04 40 + rts ; CPU:$FC45 PRG:3C45 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FC46 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FC46: + sty ZpFB ; CPU:$FC46 PRG:3C46 84 FB + lda #$14 ; CPU:$FC48 PRG:3C48 A9 14 + sta ZpF3 ; CPU:$FC4A PRG:3C4A 85 F3 + ldx #$A0 ; CPU:$FC4C PRG:3C4C A2 A0 + ldy #$9D ; CPU:$FC4E PRG:3C4E A0 9D + lda #$34 ; CPU:$FC50 PRG:3C50 A9 34 + bne Label_FC35 ; CPU:$FC52 PRG:3C52 D0 E1 +; ----------------------------------------------------------------------------- +; Routine: Label_FC54 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FC54: + sty ZpFB ; CPU:$FC54 PRG:3C54 84 FB + lda #$2A ; CPU:$FC56 PRG:3C56 A9 2A + sta ZpF3 ; CPU:$FC58 PRG:3C58 85 F3 + bne Label_FC60 ; CPU:$FC5A PRG:3C5A D0 04 +; ----------------------------------------------------------------------------- +; Routine: Label_FC5C +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FC5C: + dec ZpF4 ; CPU:$FC5C PRG:3C5C C6 F4 + bne Label_FC69 ; CPU:$FC5E PRG:3C5E D0 09 +; ----------------------------------------------------------------------------- +; Routine: Label_FC60 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FC60: + lda #$04 ; CPU:$FC60 PRG:3C60 A9 04 + jsr Pulse2FreqXFour ; CPU:$FC62 PRG:3C62 20 EF F8 + lda #$06 ; CPU:$FC65 PRG:3C65 A9 06 + sta ZpF4 ; CPU:$FC67 PRG:3C67 85 F4 +; ----------------------------------------------------------------------------- +; Routine: Label_FC69 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FC69: + ldy ZpF4 ; CPU:$FC69 PRG:3C69 A4 F4 + lda $F8F9,y ; CPU:$FC6B PRG:3C6B B9 F9 F8 + tay ; CPU:$FC6E PRG:3C6E A8 + ldx #$88 ; CPU:$FC6F PRG:3C6F A2 88 + stx $4004 ; CPU:$FC71 PRG:3C71 8E 04 40 + jsr SubCF96D ; CPU:$FC74 PRG:3C74 20 6D F9 + bne SubCFC38 ; CPU:$FC77 PRG:3C77 D0 BF +; ----------------------------------------------------------------------------- +; Routine: Label_FC79 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FC79: + sty ZpFB ; CPU:$FC79 PRG:3C79 84 FB + lda #$1C ; CPU:$FC7B PRG:3C7B A9 1C + sta ZpF3 ; CPU:$FC7D PRG:3C7D 85 F3 + lda #$1C ; CPU:$FC7F PRG:3C7F A9 1C + ldx #$95 ; CPU:$FC81 PRG:3C81 A2 95 + ldy #$95 ; CPU:$FC83 PRG:3C83 A0 95 + jsr SubCF8EC ; CPU:$FC85 PRG:3C85 20 EC F8 +; ----------------------------------------------------------------------------- +; Routine: Label_FC88 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FC88: + lda ZpF3 ; CPU:$FC88 PRG:3C88 A5 F3 + cmp #$17 ; CPU:$FC8A PRG:3C8A C9 17 + bcc Label_FC95 ; CPU:$FC8C PRG:3C8C 90 07 + bne SubCFC38 ; CPU:$FC8E PRG:3C8E D0 A8 + lda #$26 ; CPU:$FC90 PRG:3C90 A9 26 + jsr Pulse2FreqXFour ; CPU:$FC92 PRG:3C92 20 EF F8 +; ----------------------------------------------------------------------------- +; Routine: Label_FC95 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FC95: + ldy #$97 ; CPU:$FC95 PRG:3C95 A0 97 + lda ZpF3 ; CPU:$FC97 PRG:3C97 A5 F3 + cmp #$0E ; CPU:$FC99 PRG:3C99 C9 0E + bcs Label_FCA1 ; CPU:$FC9B PRG:3C9B B0 04 +; ----------------------------------------------------------------------------- +; Routine: Label_FC9D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FC9D: + lsr a ; CPU:$FC9D PRG:3C9D 4A + ora #$90 ; CPU:$FC9E PRG:3C9E 09 90 + tay ; CPU:$FCA0 PRG:3CA0 A8 +; ----------------------------------------------------------------------------- +; Routine: Label_FCA1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FCA1: + sty $4004 ; CPU:$FCA1 PRG:3CA1 8C 04 40 + jmp SubCFC38 ; CPU:$FCA4 PRG:3CA4 4C 38 FC +; ----------------------------------------------------------------------------- +; Routine: SubCFCA7 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCFCA7: + ldy #$9A ; CPU:$FCA7 PRG:3CA7 A0 9A + lda ZpF3 ; CPU:$FCA9 PRG:3CA9 A5 F3 + cmp #$14 ; CPU:$FCAB PRG:3CAB C9 14 + bcs Label_FCA1 ; CPU:$FCAD PRG:3CAD B0 F2 + bcc Label_FC9D ; CPU:$FCAF PRG:3CAF 90 EC +; ----------------------------------------------------------------------------- +; Routine: Label_FCB1 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FCB1: + lda #$08 ; CPU:$FCB1 PRG:3CB1 A9 08 + sta ZpF5 ; CPU:$FCB3 PRG:3CB3 85 F5 + lda #$08 ; CPU:$FCB5 PRG:3CB5 A9 08 + sta $4008 ; CPU:$FCB7 PRG:3CB7 8D 08 40 + lda #$34 ; CPU:$FCBA PRG:3CBA A9 34 + sta $400A ; CPU:$FCBC PRG:3CBC 8D 0A 40 + lda #$08 ; CPU:$FCBF PRG:3CBF A9 08 + sta $400B ; CPU:$FCC1 PRG:3CC1 8D 0B 40 +; ----------------------------------------------------------------------------- +; Routine: Label_FCC4 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FCC4: + dec ZpF5 ; CPU:$FCC4 PRG:3CC4 C6 F5 + jmp SubCFD27 ; CPU:$FCC6 PRG:3CC6 4C 27 FD +; ----------------------------------------------------------------------------- +; Routine: SubCFCC9 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCFCC9: + lda ZpF9 ; CPU:$FCC9 PRG:3CC9 A5 F9 + bne SubCFD27 ; CPU:$FCCB PRG:3CCB D0 5A + lda ZpFC ; CPU:$FCCD PRG:3CCD A5 FC + lsr a ; CPU:$FCCF PRG:3CCF 4A + lsr a ; CPU:$FCD0 PRG:3CD0 4A + ldx ZpF5 ; CPU:$FCD1 PRG:3CD1 A6 F5 + bne Label_FCC4 ; CPU:$FCD3 PRG:3CD3 D0 EF + lsr a ; CPU:$FCD5 PRG:3CD5 4A + bcs Label_FCB1 ; CPU:$FCD6 PRG:3CD6 B0 D9 + lsr a ; CPU:$FCD8 PRG:3CD8 4A + bcs Label_FCE3 ; CPU:$FCD9 PRG:3CD9 B0 08 + ldx $06C0 ; CPU:$FCDB PRG:3CDB AE C0 06 + bne Label_FCF3 ; CPU:$FCDE PRG:3CDE D0 13 + jmp SubCFD27 ; CPU:$FCE0 PRG:3CE0 4C 27 FD +; ----------------------------------------------------------------------------- +; Routine: Label_FCE3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FCE3: + lda #$0E ; CPU:$FCE3 PRG:3CE3 A9 0E + sta $06C0 ; CPU:$FCE5 PRG:3CE5 8D C0 06 + lda #$FE ; CPU:$FCE8 PRG:3CE8 A9 FE + sta ZpF6 ; CPU:$FCEA PRG:3CEA 85 F6 + lda #$08 ; CPU:$FCEC PRG:3CEC A9 08 + sta $4008 ; CPU:$FCEE PRG:3CEE 8D 08 40 + bne Label_FD0B ; CPU:$FCF1 PRG:3CF1 D0 18 +; ----------------------------------------------------------------------------- +; Routine: Label_FCF3 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FCF3: + dec $06C0 ; CPU:$FCF3 PRG:3CF3 CE C0 06 + lda $06C0 ; CPU:$FCF6 PRG:3CF6 AD C0 06 + cmp #$08 ; CPU:$FCF9 PRG:3CF9 C9 08 + bcs Label_FD0B ; CPU:$FCFB PRG:3CFB B0 0E + ldy ZpF6 ; CPU:$FCFD PRG:3CFD A4 F6 + jsr DivideYBy8 ; CPU:$FCFF PRG:3CFF 20 74 F9 + sta ZpF6 ; CPU:$FD02 PRG:3D02 85 F6 + lda $06C0 ; CPU:$FD04 PRG:3D04 AD C0 06 + and #$03 ; CPU:$FD07 PRG:3D07 29 03 + beq Label_FD1A ; CPU:$FD09 PRG:3D09 F0 0F +; ----------------------------------------------------------------------------- +; Routine: Label_FD0B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FD0B: + lda $0500 ; CPU:$FD0B PRG:3D0B AD 00 05 + lsr a ; CPU:$FD0E PRG:3D0E 4A + bcc Label_FD1A ; CPU:$FD0F PRG:3D0F 90 09 + lda ZpF6 ; CPU:$FD11 PRG:3D11 A5 F6 + clc ; CPU:$FD13 PRG:3D13 18 + rol a ; CPU:$FD14 PRG:3D14 2A + sta $400A ; CPU:$FD15 PRG:3D15 8D 0A 40 + bne Label_FD21 ; CPU:$FD18 PRG:3D18 D0 07 +; ----------------------------------------------------------------------------- +; Routine: Label_FD1A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FD1A: + lda ZpF6 ; CPU:$FD1A PRG:3D1A A5 F6 + rol a ; CPU:$FD1C PRG:3D1C 2A + rol a ; CPU:$FD1D PRG:3D1D 2A + sta $400A ; CPU:$FD1E PRG:3D1E 8D 0A 40 +; ----------------------------------------------------------------------------- +; Routine: Label_FD21 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FD21: + rol a ; CPU:$FD21 PRG:3D21 2A + and #$03 ; CPU:$FD22 PRG:3D22 29 03 + sta $400B ; CPU:$FD24 PRG:3D24 8D 0B 40 +; ----------------------------------------------------------------------------- +; Routine: SubCFD27 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +SubCFD27: + lda ZpFD ; CPU:$FD27 PRG:3D27 A5 FD + bne Label_FD33 ; CPU:$FD29 PRG:3D29 D0 08 + lda $06A2 ; CPU:$FD2B PRG:3D2B AD A2 06 + bne Label_FD78 ; CPU:$FD2E PRG:3D2E D0 48 + jmp ProcessNoiseEnvelope ; CPU:$FD30 PRG:3D30 4C EC FB +; ----------------------------------------------------------------------------- +; Routine: Label_FD33 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FD33: + ldy #$07 ; CPU:$FD33 PRG:3D33 A0 07 +; ----------------------------------------------------------------------------- +; Routine: Label_FD35 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FD35: + asl a ; CPU:$FD35 PRG:3D35 0A + bcs Label_FD3B ; CPU:$FD36 PRG:3D36 B0 03 + dey ; CPU:$FD38 PRG:3D38 88 + bne Label_FD35 ; CPU:$FD39 PRG:3D39 D0 FA +; ----------------------------------------------------------------------------- +; Routine: Label_FD3B +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FD3B: + inc $06A2 ; CPU:$FD3B PRG:3D3B EE A2 06 + sty $06F2 ; CPU:$FD3E PRG:3D3E 8C F2 06 + lda $FE64,y ; CPU:$FD41 PRG:3D41 B9 64 FE + tay ; CPU:$FD44 PRG:3D44 A8 + lda $FE64,y ; CPU:$FD45 PRG:3D45 B9 64 FE + sta $068D ; CPU:$FD48 PRG:3D48 8D 8D 06 + lda $FE65,y ; CPU:$FD4B PRG:3D4B B9 65 FE + sta ZpF7 ; CPU:$FD4E PRG:3D4E 85 F7 + lda $FE66,y ; CPU:$FD50 PRG:3D50 B9 66 FE + sta ZpF8 ; CPU:$FD53 PRG:3D53 85 F8 + lda $FE67,y ; CPU:$FD55 PRG:3D55 B9 67 FE + sta ZpF9 ; CPU:$FD58 PRG:3D58 85 F9 + lda $FE68,y ; CPU:$FD5A PRG:3D5A B9 68 FE + sta ZpFA ; CPU:$FD5D PRG:3D5D 85 FA + lda $FE69,y ; CPU:$FD5F PRG:3D5F B9 69 FE + sta $0686 ; CPU:$FD62 PRG:3D62 8D 86 06 + lda #$01 ; CPU:$FD65 PRG:3D65 A9 01 + sta $0695 ; CPU:$FD67 PRG:3D67 8D 95 06 + sta $0696 ; CPU:$FD6A PRG:3D6A 8D 96 06 + sta $0698 ; CPU:$FD6D PRG:3D6D 8D 98 06 + sta $069A ; CPU:$FD70 PRG:3D70 8D 9A 06 + ldy #$00 ; CPU:$FD73 PRG:3D73 A0 00 + sty $0682 ; CPU:$FD75 PRG:3D75 8C 82 06 +; ----------------------------------------------------------------------------- +; Routine: Label_FD78 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FD78: + ldy ZpFA ; CPU:$FD78 PRG:3D78 A4 FA + beq Label_FDAF ; CPU:$FD7A PRG:3D7A F0 33 + dec $0696 ; CPU:$FD7C PRG:3D7C CE 96 06 + bne Label_FDAF ; CPU:$FD7F PRG:3D7F D0 2E + inc ZpFA ; CPU:$FD81 PRG:3D81 E6 FA + lda (ZpF7),y ; CPU:$FD83 PRG:3D83 B1 F7 + beq Label_FDBE ; CPU:$FD85 PRG:3D85 F0 37 + bpl Label_FD95 ; CPU:$FD87 PRG:3D87 10 0C + jsr LookupNoteTable ; CPU:$FD89 PRG:3D89 20 87 F9 + sta $0691 ; CPU:$FD8C PRG:3D8C 8D 91 06 + ldy ZpFA ; CPU:$FD8F PRG:3D8F A4 FA + inc ZpFA ; CPU:$FD91 PRG:3D91 E6 FA + lda (ZpF7),y ; CPU:$FD93 PRG:3D93 B1 F7 +; ----------------------------------------------------------------------------- +; Routine: Label_FD95 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FD95: + jsr Pulse2FreqXZero ; CPU:$FD95 PRG:3D95 20 D8 F8 + bne Label_FD9E ; CPU:$FD98 PRG:3D98 D0 04 + ldx #$10 ; CPU:$FD9A PRG:3D9A A2 10 + bne Label_FDA6 ; CPU:$FD9C PRG:3D9C D0 08 +; ----------------------------------------------------------------------------- +; Routine: Label_FD9E +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FD9E: + ldx #$06 ; CPU:$FD9E PRG:3D9E A2 06 + lda ZpF9 ; CPU:$FDA0 PRG:3DA0 A5 F9 + bne Label_FDA6 ; CPU:$FDA2 PRG:3DA2 D0 02 + ldx #$86 ; CPU:$FDA4 PRG:3DA4 A2 86 +; ----------------------------------------------------------------------------- +; Routine: Label_FDA6 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FDA6: + jsr AudioPulse1SweepSet ; CPU:$FDA6 PRG:3DA6 20 C6 F8 + lda $0691 ; CPU:$FDA9 PRG:3DA9 AD 91 06 + sta $0696 ; CPU:$FDAC PRG:3DAC 8D 96 06 +; ----------------------------------------------------------------------------- +; Routine: Label_FDAF +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FDAF: + dec $0695 ; CPU:$FDAF PRG:3DAF CE 95 06 + bne Label_FE02 ; CPU:$FDB2 PRG:3DB2 D0 4E + ldy $0682 ; CPU:$FDB4 PRG:3DB4 AC 82 06 + inc $0682 ; CPU:$FDB7 PRG:3DB7 EE 82 06 + lda (ZpF7),y ; CPU:$FDBA PRG:3DBA B1 F7 + bne Label_FDDA ; CPU:$FDBC PRG:3DBC D0 1C +; ----------------------------------------------------------------------------- +; Routine: Label_FDBE +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FDBE: + jsr AudioPulse1CtrlSetup ; CPU:$FDBE PRG:3DBE 20 C2 F8 + lda #$00 ; CPU:$FDC1 PRG:3DC1 A9 00 + sta ZpFA ; CPU:$FDC3 PRG:3DC3 85 FA + sta ZpF9 ; CPU:$FDC5 PRG:3DC5 85 F9 + sta ZpF0 ; CPU:$FDC7 PRG:3DC7 85 F0 + sta ZpFB ; CPU:$FDC9 PRG:3DC9 85 FB + sta $06A2 ; CPU:$FDCB PRG:3DCB 8D A2 06 + sta $06C0 ; CPU:$FDCE PRG:3DCE 8D C0 06 + sta $4008 ; CPU:$FDD1 PRG:3DD1 8D 08 40 + lda #$10 ; CPU:$FDD4 PRG:3DD4 A9 10 + sta $4004 ; CPU:$FDD6 PRG:3DD6 8D 04 40 + rts ; CPU:$FDD9 PRG:3DD9 60 +; ----------------------------------------------------------------------------- +; Routine: Label_FDDA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FDDA: + jsr RotateBitsForTableLookup ; CPU:$FDDA PRG:3DDA 20 81 F9 + sta $0695 ; CPU:$FDDD PRG:3DDD 8D 95 06 + txa ; CPU:$FDE0 PRG:3DE0 8A + and #$3E ; CPU:$FDE1 PRG:3DE1 29 3E + jsr Pulse2FreqXFour ; CPU:$FDE3 PRG:3DE3 20 EF F8 + beq Label_FE02 ; CPU:$FDE6 PRG:3DE6 F0 1A + ldx #$9F ; CPU:$FDE8 PRG:3DE8 A2 9F + lda $06F2 ; CPU:$FDEA PRG:3DEA AD F2 06 + beq Label_FDFA ; CPU:$FDED PRG:3DED F0 0B + ldx #$87 ; CPU:$FDEF PRG:3DEF A2 87 + lda $0695 ; CPU:$FDF1 PRG:3DF1 AD 95 06 + cmp #$10 ; CPU:$FDF4 PRG:3DF4 C9 10 + bcs Label_FDFA ; CPU:$FDF6 PRG:3DF6 B0 02 + ldx #$84 ; CPU:$FDF8 PRG:3DF8 A2 84 +; ----------------------------------------------------------------------------- +; Routine: Label_FDFA +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FDFA: + stx $4004 ; CPU:$FDFA PRG:3DFA 8E 04 40 + lda #$7F ; CPU:$FDFD PRG:3DFD A9 7F + sta $4005 ; CPU:$FDFF PRG:3DFF 8D 05 40 +; ----------------------------------------------------------------------------- +; Routine: Label_FE02 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FE02: + ldy ZpF9 ; CPU:$FE02 PRG:3E02 A4 F9 + beq Label_FE2D ; CPU:$FE04 PRG:3E04 F0 27 + dec $0698 ; CPU:$FE06 PRG:3E06 CE 98 06 + bne Label_FE2D ; CPU:$FE09 PRG:3E09 D0 22 + inc ZpF9 ; CPU:$FE0B PRG:3E0B E6 F9 + lda (ZpF7),y ; CPU:$FE0D PRG:3E0D B1 F7 + jsr RotateBitsForTableLookup ; CPU:$FE0F PRG:3E0F 20 81 F9 + sta $0698 ; CPU:$FE12 PRG:3E12 8D 98 06 + clc ; CPU:$FE15 PRG:3E15 18 + adc #$FE ; CPU:$FE16 PRG:3E16 69 FE + asl a ; CPU:$FE18 PRG:3E18 0A + asl a ; CPU:$FE19 PRG:3E19 0A + cmp #$38 ; CPU:$FE1A PRG:3E1A C9 38 + bcc Label_FE20 ; CPU:$FE1C PRG:3E1C 90 02 + lda #$38 ; CPU:$FE1E PRG:3E1E A9 38 +; ----------------------------------------------------------------------------- +; Routine: Label_FE20 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FE20: + ldy $06F2 ; CPU:$FE20 PRG:3E20 AC F2 06 + bne Label_FE27 ; CPU:$FE23 PRG:3E23 D0 02 + lda #$FF ; CPU:$FE25 PRG:3E25 A9 FF +; ----------------------------------------------------------------------------- +; Routine: Label_FE27 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FE27: + sta $4008 ; CPU:$FE27 PRG:3E27 8D 08 40 + jsr ProcessTriangleChannel ; CPU:$FE2A PRG:3E2A 20 F3 F8 +; ----------------------------------------------------------------------------- +; Routine: Label_FE2D +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FE2D: + lda $06F2 ; CPU:$FE2D PRG:3E2D AD F2 06 + cmp #$07 ; CPU:$FE30 PRG:3E30 C9 07 + bne Label_FE63 ; CPU:$FE32 PRG:3E32 D0 2F + dec $069A ; CPU:$FE34 PRG:3E34 CE 9A 06 + bne Label_FE63 ; CPU:$FE37 PRG:3E37 D0 2A + ldy $0686 ; CPU:$FE39 PRG:3E39 AC 86 06 + inc $0686 ; CPU:$FE3C PRG:3E3C EE 86 06 + lda (ZpF7),y ; CPU:$FE3F PRG:3E3F B1 F7 + jsr RotateBitsForTableLookup ; CPU:$FE41 PRG:3E41 20 81 F9 + sta $069A ; CPU:$FE44 PRG:3E44 8D 9A 06 + txa ; CPU:$FE47 PRG:3E47 8A + and #$3E ; CPU:$FE48 PRG:3E48 29 3E + bne Label_FE54 ; CPU:$FE4A PRG:3E4A D0 08 + lda #$00 ; CPU:$FE4C PRG:3E4C A9 00 + ldx #$02 ; CPU:$FE4E PRG:3E4E A2 02 + ldy #$08 ; CPU:$FE50 PRG:3E50 A0 08 + bne Label_FE5A ; CPU:$FE52 PRG:3E52 D0 06 +; ----------------------------------------------------------------------------- +; Routine: Label_FE54 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FE54: + lda #$02 ; CPU:$FE54 PRG:3E54 A9 02 + ldx #$00 ; CPU:$FE56 PRG:3E56 A2 00 + ldy #$28 ; CPU:$FE58 PRG:3E58 A0 28 +; ----------------------------------------------------------------------------- +; Routine: Label_FE5A +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FE5A: + sta $400C ; CPU:$FE5A PRG:3E5A 8D 0C 40 + stx $400E ; CPU:$FE5D PRG:3E5D 8E 0E 40 + sty $400F ; CPU:$FE60 PRG:3E60 8C 0F 40 +; ----------------------------------------------------------------------------- +; Routine: Label_FE63 +; Global: Contextual control-flow entry identified from its parent routine and incoming branch usage. +; Local: Continues its parent routine along the condition or operation encoded in this label, +; then returns, branches again, or rejoins shared code as documented by the instructions. +; Parameters: Undetermined in Pass 1 unless implied by the caller. +; Returns: Undetermined in Pass 1; status flags and registers may carry results. +; Clobbers: Undetermined in Pass 1. +; ----------------------------------------------------------------------------- +Label_FE63: + rts ; CPU:$FE63 PRG:3E63 60 +; ---- data $FE64-$FFFF (412 bytes) ---- +; referenced by `lda $FE64,y` at $FD41 (operand $FE64 falls inside this region) +; referenced by `lda $FE64,y` at $FD45 (operand $FE64 falls inside this region) +; referenced by `lda $FE65,y` at $FD4B (operand $FE65 falls inside this region) +; referenced by `lda $FE66,y` at $FD50 (operand $FE66 falls inside this region) +; referenced by `lda $FE67,y` at $FD55 (operand $FE67 falls inside this region) +; referenced by `lda $FE68,y` at $FD5A (operand $FE68 falls inside this region) +; ... and 1 further references from decoded code + .byte $08, $0D, $12, $17, $1C, $21, $26, $2B, $0F, $95, $FE, $30, $00, $00, $D1, $FE ; CPU:$FE64 PRG:3E64 08 0D 12 17 1C 21 26 2B 0F 95 FE 30 00 00 D1 FE + .byte $00, $08, $00, $E6, $FE, $0A, $00, $0F, $F3, $FE, $00, $00, $07, $FC, $FE, $03 ; CPU:$FE74 PRG:3E74 00 08 00 E6 FE 0A 00 0F F3 FE 00 00 07 FC FE 03 + .byte $00, $00, $0B, $FF, $00, $00, $07, $0D, $FF, $18, $00, $16, $44, $FF, $1F, $38 ; CPU:$FE84 PRG:3E84 00 00 0B FF 00 00 07 0D FF 18 00 16 44 FF 1F 38 + .byte $7E, $5D, $78, $5D, $78, $5C, $78, $5C, $62, $E6, $65, $5E, $65, $5E, $64, $5E ; CPU:$FE94 PRG:3E94 7E 5D 78 5D 78 5C 78 5C 62 E6 65 5E 65 5E 64 5E + .byte $40, $5E, $F8, $00, $85, $06, $81, $26, $85, $06, $81, $26, $06, $26, $06, $0E ; CPU:$FEA4 PRG:3EA4 40 5E F8 00 85 06 81 26 85 06 81 26 06 26 06 0E + .byte $83, $12, $85, $10, $81, $0A, $85, $10, $81, $0A, $10, $0A, $2E, $0A, $83, $26 ; CPU:$FEB4 PRG:3EB4 83 12 85 10 81 0A 85 10 81 0A 10 0A 2E 0A 83 26 + .byte $00, $5D, $78, $5D, $78, $1D, $5F, $40, $5F, $40, $9E, $80, $F8, $6E, $6A, $A6 ; CPU:$FEC4 PRG:3EC4 00 5D 78 5D 78 1D 5F 40 5F 40 9E 80 F8 6E 6A A6 + .byte $A6, $A6, $AE, $07, $00, $82, $46, $38, $32, $4A, $48, $81, $40, $42, $44, $48 ; CPU:$FED4 PRG:3ED4 A6 A6 AE 07 00 82 46 38 32 4A 48 81 40 42 44 48 + .byte $84, $30, $66, $6E, $4A, $50, $52, $50, $4A, $6E, $27, $00, $E6, $DE, $39, $04 ; CPU:$FEE4 PRG:3EE4 84 30 66 6E 4A 50 52 50 4A 6E 27 00 E6 DE 39 04 + .byte $12, $04, $12, $04, $12, $04, $D2, $00, $83, $83, $00, $46, $46, $4E, $52, $42 ; CPU:$FEF4 PRG:3EF4 12 04 12 04 12 04 D2 00 83 83 00 46 46 4E 52 42 + .byte $4E, $12, $14, $16, $18, $1A, $05, $E6, $00, $2E, $46, $02, $AE, $6A, $67, $28 ; CPU:$FF04 PRG:3F04 4E 12 14 16 18 1A 05 E6 00 2E 46 02 AE 6A 67 28 + .byte $6A, $02, $A6, $64, $63, $9E, $A4, $6A, $47, $08, $4B, $02, $0C, $4F, $02, $07 ; CPU:$FF14 PRG:3F14 6A 02 A6 64 63 9E A4 6A 47 08 4B 02 0C 4F 02 07 + .byte $00, $86, $A6, $A2, $9C, $AA, $A2, $9C, $BC, $9E, $BC, $B6, $B2, $26, $24, $26 ; CPU:$FF24 PRG:3F24 00 86 A6 A2 9C AA A2 9C BC 9E BC B6 B2 26 24 26 + .byte $24, $A6, $22, $1E, $22, $1E, $A2, $1C, $00, $1C, $00, $1C, $00, $1C, $00, $1D ; CPU:$FF34 PRG:3F34 24 A6 22 1E 22 1E A2 1C 00 1C 00 1C 00 1C 00 1D + .byte $47, $EA, $42, $66, $AA, $AC, $6A, $A6, $47, $EA, $42, $66, $AA, $AC, $6A, $A6 ; CPU:$FF44 PRG:3F44 47 EA 42 66 AA AC 6A A6 47 EA 42 66 AA AC 6A A6 + .byte $6A, $AC, $86, $6C, $AA, $6C, $86, $8A, $46, $4A, $4E, $D0, $D2, $11, $00, $77 ; CPU:$FF54 PRG:3F54 6A AC 86 6C AA 6C 86 8A 46 4A 4E D0 D2 11 00 77 + .byte $76, $F6, $5D, $5C, $DC, $77, $76, $F6, $5D, $5C, $DC, $65, $64, $E4, $7F, $7E ; CPU:$FF64 PRG:3F64 76 F6 5D 5C DC 77 76 F6 5D 5C DC 65 64 E4 7F 7E + .byte $FE, $BE, $B6, $9C, $B8, $A4, $9C, $F6, $82, $2A, $81, $36, $82, $24, $81, $1C ; CPU:$FF74 PRG:3F74 FE BE B6 9C B8 A4 9C F6 82 2A 81 36 82 24 81 1C + .byte $1E, $20, $22, $24, $1C, $26, $1C, $24, $1C, $22, $82, $2A, $81, $36, $82, $24 ; CPU:$FF84 PRG:3F84 1E 20 22 24 1C 26 1C 24 1C 22 82 2A 81 36 82 24 + .byte $81, $1C, $1E, $24, $22, $24, $1C, $26, $1C, $24, $22, $1C, $24, $26, $1C, $2A ; CPU:$FF94 PRG:3F94 81 1C 1E 24 22 24 1C 26 1C 24 22 1C 24 26 1C 2A + .byte $24, $26, $1C, $24, $26, $2A, $24, $2C, $1E, $2A, $24, $2C, $0A, $2C, $06, $0A ; CPU:$FFA4 PRG:3FA4 24 26 1C 24 26 2A 24 2C 1E 2A 24 2C 0A 2C 06 0A + .byte $0E, $06, $0A, $0E, $80, $2E, $86, $06, $82, $3A, $81, $3C, $84, $36, $40, $44 ; CPU:$FFB4 PRG:3FB4 0E 06 0A 0E 80 2E 86 06 82 3A 81 3C 84 36 40 44 + .byte $44, $44, $40, $44, $40, $44, $40, $44, $44, $44, $40, $44, $40, $44, $40, $44 ; CPU:$FFC4 PRG:3FC4 44 44 40 44 40 44 40 44 44 44 40 44 40 44 40 44 + .byte $44, $44, $40, $44, $40, $44, $40, $44, $44, $44, $40, $44, $40, $44, $40, $44 ; CPU:$FFD4 PRG:3FD4 44 44 40 44 40 44 40 44 44 44 40 44 40 44 40 44 + .byte $44, $44, $40, $44, $44, $44, $40, $44, $44, $44, $40, $44, $44, $84, $84, $84 ; CPU:$FFE4 PRG:3FE4 44 44 40 44 44 44 40 44 44 44 40 44 44 84 84 84 + .byte $84, $84, $44, $44, $44, $05, $7D, $C0, $00, $C0, $00, $C0 ; CPU:$FFF4 PRG:3FF4 84 84 44 44 44 05 7D C0 00 C0 00 C0 diff --git a/_wip/Mario Bros (JU)/copilot/reconstructed.lbl b/_wip/Mario Bros (JU)/copilot/reconstructed.lbl index e69de29..56bf99a 100644 --- a/_wip/Mario Bros (JU)/copilot/reconstructed.lbl +++ b/_wip/Mario Bros (JU)/copilot/reconstructed.lbl @@ -0,0 +1,937 @@ +al 00FE5A .Label_FE5A +al 00FE54 .Label_FE54 +al 00FE63 .Label_FE63 +al 00FE27 .Label_FE27 +al 00FE20 .Label_FE20 +al 00FE2D .Label_FE2D +al 00FDFA .Label_FDFA +al 00FDDA .Label_FDDA +al 00FE02 .Label_FE02 +al 00FDA6 .Label_FDA6 +al 00FD9E .Label_FD9E +al 00FD95 .Label_FD95 +al 00FDBE .Label_FDBE +al 00FDAF .Label_FDAF +al 00FD3B .Label_FD3B +al 00FD35 .Label_FD35 +al 00FD78 .Label_FD78 +al 00FD33 .Label_FD33 +al 00FD21 .Label_FD21 +al 00FD1A .Label_FD1A +al 00FD0B .Label_FD0B +al 00FCF3 .Label_FCF3 +al 00FCE3 .Label_FCE3 +al 00FCC4 .Label_FCC4 +al 00FCB1 .Label_FCB1 +al 00FC9D .Label_FC9D +al 00FCA1 .Label_FCA1 +al 00FC95 .Label_FC95 +al 00FC69 .Label_FC69 +al 00FC60 .Label_FC60 +al 00FC28 .Label_FC28 +al 00FC88 .Label_FC88 +al 00FC79 .Label_FC79 +al 00FC5C .Label_FC5C +al 00FC54 .Label_FC54 +al 00FC46 .Label_FC46 +al 00FC29 .Label_FC29 +al 00FBEC .Label_FBEC +al 00FBE9 .Label_FBE9 +al 00FBE6 .Label_FBE6 +al 00FC35 .Label_FC35 +al 00FBD8 .Label_FBD8 +al 00FC38 .Label_FC38 +al 00FBD3 .Label_FBD3 +al 00FBC7 .Label_FBC7 +al 00FBBC .Label_FBBC +al 00FBC4 .Label_FBC4 +al 00FBAE .Label_FBAE +al 00FBA0 .Label_FBA0 +al 00FB9A .Label_FB9A +al 00FB87 .Label_FB87 +al 00FB7A .Label_FB7A +al 00FCA7 .Label_FCA7 +al 00FB5C .Label_FB5C +al 00FB6C .Label_FB6C +al 00FB48 .Label_FB48 +al 00FB3E .Label_FB3E +al 00FCC9 .Label_FCC9 +al 00FB0F .Label_FB0F +al 00FB24 .Label_FB24 +al 00FAF8 .Label_FAF8 +al 00FAFF .Label_FAFF +al 00FAD4 .Label_FAD4 +al 00FADB .Label_FADB +al 00FAD1 .Label_FAD1 +al 00FA8E .Label_FA8E +al 00FA8B .Label_FA8B +al 00FA88 .Label_FA88 +al 00FAE5 .Label_FAE5 +al 00FAE8 .Label_FAE8 +al 00FA7E .Label_FA7E +al 00FA66 .Label_FA66 +al 00FA76 .Label_FA76 +al 00FA54 .Label_FA54 +al 00FA71 .Label_FA71 +al 00FA5F .Label_FA5F +al 00FA44 .Label_FA44 +al 00FA5B .Label_FA5B +al 00FA3B .Label_FA3B +al 00FAEB .Label_FAEB +al 00FA38 .Label_FA38 +al 00FA2D .Label_FA2D +al 00FA1E .Label_FA1E +al 00FD27 .Label_FD27 +al 00FA11 .Label_FA11 +al 00F9ED .Label_F9ED +al 00F9F2 .Label_F9F2 +al 00FA1B .Label_FA1B +al 00F9D8 .Label_F9D8 +al 00F9E3 .Label_F9E3 +al 00F9DD .Label_F9DD +al 00FAEF .Label_FAEF +al 00F9BE .Label_F9BE +al 00F9B5 .Label_F9B5 +al 00F9A2 .Label_F9A2 +al 00F987 .Label_F987 +al 00F981 .Label_F981 +al 00F979 .Label_F979 +al 00F978 .Label_F978 +al 00F974 .Label_F974 +al 00F96B .Label_F96B +al 00F8F3 .Label_F8F3 +al 00F8EF .Label_F8EF +al 00F96D .Label_F96D +al 00F8EC .Label_F8EC +al 00F8EB .Label_F8EB +al 00F8DA .Label_F8DA +al 00F8D5 .Label_F8D5 +al 00F8D8 .Label_F8D8 +al 00F8CF .Label_F8CF +al 00F8C8 .Label_F8C8 +al 00F8C6 .Label_F8C6 +al 00F8CB .Label_F8CB +al 00F8C2 .Label_F8C2 +al 00FA91 .Label_FA91 +al 00EF5A .Label_EF5A +al 00EF48 .Label_EF48 +al 00EF36 .Label_EF36 +al 00EF29 .Label_EF29 +al 00EF16 .Label_EF16 +al 00EEEE .Label_EEEE +al 00EEBB .Label_EEBB +al 00EEB9 .Label_EEB9 +al 00EE81 .Label_EE81 +al 00EE4C .Label_EE4C +al 00EE40 .Label_EE40 +al 00EE1E .Label_EE1E +al 00EE1F .Label_EE1F +al 00EDF1 .Label_EDF1 +al 00EDDD .Label_EDDD +al 00EF50 .Label_EF50 +al 00EDE7 .Label_EDE7 +al 00EDA9 .Label_EDA9 +al 00ED9C .Label_ED9C +al 00EDAC .Label_EDAC +al 00ED50 .Label_ED50 +al 00ED40 .Label_ED40 +al 00ED6C .Label_ED6C +al 00ED18 .Label_ED18 +al 00ED20 .Label_ED20 +al 00ECF2 .Label_ECF2 +al 00ECFB .Label_ECFB +al 00ECBD .Label_ECBD +al 00ECA7 .Label_ECA7 +al 00ECAA .Label_ECAA +al 00EC91 .Label_EC91 +al 00EC6F .Label_EC6F +al 00EC5B .Label_EC5B +al 00EC51 .Label_EC51 +al 00EC1B .Label_EC1B +al 00EC25 .Label_EC25 +al 00EBF2 .Label_EBF2 +al 00EBE0 .Label_EBE0 +al 00EBCC .Label_EBCC +al 00EBC9 .Label_EBC9 +al 00EBBC .Label_EBBC +al 00EBB8 .Label_EBB8 +al 00EC13 .Label_EC13 +al 00EB84 .Label_EB84 +al 00EB74 .Label_EB74 +al 00EB63 .Label_EB63 +al 00EB5E .Label_EB5E +al 00EB53 .Label_EB53 +al 00EB4A .Label_EB4A +al 00EB42 .Label_EB42 +al 00EB32 .Label_EB32 +al 00EB1C .Label_EB1C +al 00EB6B .Label_EB6B +al 00EAED .Label_EAED +al 00EECC .Label_EECC +al 00EAE2 .Label_EAE2 +al 00EADC .Label_EADC +al 00EEBC .Label_EEBC +al 00EAD3 .Label_EAD3 +al 00EAC5 .Label_EAC5 +al 00EAB7 .Label_EAB7 +al 00EADF .Label_EADF +al 00EAB5 .Label_EAB5 +al 00EABD .Label_EABD +al 00EBE9 .Label_EBE9 +al 00EA9F .Label_EA9F +al 00EC30 .Label_EC30 +al 00EC14 .Label_EC14 +al 00EA87 .Label_EA87 +al 00EA90 .Label_EA90 +al 00EA7C .Label_EA7C +al 00EA79 .Label_EA79 +al 00EA94 .Label_EA94 +al 00EA91 .Label_EA91 +al 00EA97 .Label_EA97 +al 00EA54 .Label_EA54 +al 00EA4C .Label_EA4C +al 00EA36 .Label_EA36 +al 00EA37 .Label_EA37 +al 00EA2F .Label_EA2F +al 00EA1D .Label_EA1D +al 00E9F2 .Label_E9F2 +al 00E9E8 .Label_E9E8 +al 00E9FA .Label_E9FA +al 00E9D2 .Label_E9D2 +al 00E9AE .Label_E9AE +al 00E9AC .Label_E9AC +al 00E9A2 .Label_E9A2 +al 00E977 .Label_E977 +al 00EEA5 .Label_EEA5 +al 00E94B .Label_E94B +al 00E94D .Label_E94D +al 00E948 .Label_E948 +al 00E925 .Label_E925 +al 00E911 .Label_E911 +al 00E90A .Label_E90A +al 00E905 .Label_E905 +al 00E95E .Label_E95E +al 00E907 .Label_E907 +al 00E8F2 .Label_E8F2 +al 00E92E .Label_E92E +al 00E8D0 .Label_E8D0 +al 00E8BE .Label_E8BE +al 00E8AD .Label_E8AD +al 00E973 .Label_E973 +al 00E8D3 .Label_E8D3 +al 00E890 .Label_E890 +al 00E883 .Label_E883 +al 00E889 .Label_E889 +al 00E9D3 .Label_E9D3 +al 00E952 .Label_E952 +al 00E877 .Label_E877 +al 00EA25 .Label_EA25 +al 00E893 .Label_E893 +al 00E842 .Label_E842 +al 00E96D .Label_E96D +al 00E830 .Label_E830 +al 00E824 .Label_E824 +al 00E7E4 .Label_E7E4 +al 00E84A .Label_E84A +al 00E806 .Label_E806 +al 00E805 .Label_E805 +al 00E7D6 .Label_E7D6 +al 00E86B .Label_E86B +al 00E7CB .Label_E7CB +al 00E9A0 .Label_E9A0 +al 00EEAD .Label_EEAD +al 00E7BD .Label_E7BD +al 00E7AD .Label_E7AD +al 00E7AC .Label_E7AC +al 00E787 .Label_E787 +al 00E772 .Label_E772 +al 00E75D .Label_E75D +al 00E769 .Label_E769 +al 00E74D .Label_E74D +al 00E768 .Label_E768 +al 00E73E .Label_E73E +al 00E735 .Label_E735 +al 00E72D .Label_E72D +al 00E73D .Label_E73D +al 00E719 .Label_E719 +al 00E711 .Label_E711 +al 00E448 .Label_E448 +al 00E440 .Label_E440 +al 00E42F .Label_E42F +al 00E403 .Label_E403 +al 00E400 .Label_E400 +al 00E41E .Label_E41E +al 00E3F2 .Label_E3F2 +al 00E3DD .Label_E3DD +al 00E3E0 .Label_E3E0 +al 00E3F3 .Label_E3F3 +al 00E3E3 .Label_E3E3 +al 00E3C7 .Label_E3C7 +al 00E3BB .Label_E3BB +al 00E3AE .Label_E3AE +al 00E374 .Label_E374 +al 00E35C .Label_E35C +al 00E358 .Label_E358 +al 00E333 .Label_E333 +al 00E34E .Label_E34E +al 00E36C .Label_E36C +al 00E2F6 .Label_E2F6 +al 00E2ED .Label_E2ED +al 00E2FD .Label_E2FD +al 00E2E4 .Label_E2E4 +al 00E2D1 .Label_E2D1 +al 00E2CF .Label_E2CF +al 00E329 .Label_E329 +al 00E2B1 .Label_E2B1 +al 00E2AA .Label_E2AA +al 00E25E .Label_E25E +al 00E258 .Label_E258 +al 00E25F .Label_E25F +al 00E24E .Label_E24E +al 00E239 .Label_E239 +al 00E20A .Label_E20A +al 00E20F .Label_E20F +al 00E219 .Label_E219 +al 00E1EA .Label_E1EA +al 00E1E4 .Label_E1E4 +al 00E1F6 .Label_E1F6 +al 00E131 .Label_E131 +al 00E129 .Label_E129 +al 00E06D .Label_E06D +al 00E077 .Label_E077 +al 00E044 .Label_E044 +al 00E03C .Label_E03C +al 00E058 .Label_E058 +al 00E051 .Label_E051 +al 00E023 .Label_E023 +al 00E049 .Label_E049 +al 00E00F .Label_E00F +al 00ECAF .Label_ECAF +al 00DFEE .Label_DFEE +al 00DFF5 .Label_DFF5 +al 00DFF7 .Label_DFF7 +al 00DFC8 .Label_DFC8 +al 00DFB9 .Label_DFB9 +al 00DFA1 .Label_DFA1 +al 00DF9F .Label_DF9F +al 00DF86 .Label_DF86 +al 00DF75 .Label_DF75 +al 00DF72 .Label_DF72 +al 00DF6C .Label_DF6C +al 00DF87 .Label_DF87 +al 00DF5B .Label_DF5B +al 00DF59 .Label_DF59 +al 00DF50 .Label_DF50 +al 00DFB0 .Label_DFB0 +al 00DF60 .Label_DF60 +al 00DFAC .Label_DFAC +al 00DF11 .Label_DF11 +al 00DF9D .Label_DF9D +al 00DEFE .Label_DEFE +al 00DF07 .Label_DF07 +al 00DF24 .Label_DF24 +al 00DF37 .Label_DF37 +al 00DEDA .Label_DEDA +al 00DEDF .Label_DEDF +al 00DEE0 .Label_DEE0 +al 00DEC3 .Label_DEC3 +al 00DEBA .Label_DEBA +al 00DEA5 .Label_DEA5 +al 00DEA3 .Label_DEA3 +al 00DE9A .Label_DE9A +al 00DEAE .Label_DEAE +al 00DE78 .Label_DE78 +al 00DE5E .Label_DE5E +al 00DE57 .Label_DE57 +al 00DE4E .Label_DE4E +al 00DE3B .Label_DE3B +al 00DE2E .Label_DE2E +al 00DE0E .Label_DE0E +al 00DE02 .Label_DE02 +al 00DE05 .Label_DE05 +al 00DDFB .Label_DDFB +al 00DE2F .Label_DE2F +al 00DE2C .Label_DE2C +al 00DE04 .Label_DE04 +al 00DDB6 .Label_DDB6 +al 00DD9A .Label_DD9A +al 00DD89 .Label_DD89 +al 00DD7F .Label_DD7F +al 00DD67 .Label_DD67 +al 00DD65 .Label_DD65 +al 00DD5E .Label_DD5E +al 00DD40 .Label_DD40 +al 00DD3C .Label_DD3C +al 00DD11 .Label_DD11 +al 00DCEA .Label_DCEA +al 00DCE5 .Label_DCE5 +al 00DCDC .Label_DCDC +al 00DD2C .Label_DD2C +al 00DCCE .Label_DCCE +al 00E9B8 .Label_E9B8 +al 00E29A .Label_E29A +al 00DDC7 .Label_DDC7 +al 00DCC2 .Label_DCC2 +al 00DCBF .Label_DCBF +al 00DCBC .Label_DCBC +al 00DCB9 .Label_DCB9 +al 00DC91 .Label_DC91 +al 00DC92 .Label_DC92 +al 00DC86 .Label_DC86 +al 00DC6E .Label_DC6E +al 00DC4E .Label_DC4E +al 00DC38 .Label_DC38 +al 00DC44 .Label_DC44 +al 00DC3B .Label_DC3B +al 00DC50 .Label_DC50 +al 00DC1F .Label_DC1F +al 00DC55 .Label_DC55 +al 00DBE2 .Label_DBE2 +al 00DBFE .Label_DBFE +al 00DBAC .Label_DBAC +al 00DBC6 .Label_DBC6 +al 00DB73 .Label_DB73 +al 00DB6A .Label_DB6A +al 00DB6B .Label_DB6B +al 00DB4A .Label_DB4A +al 00DB33 .Label_DB33 +al 00DB2B .Label_DB2B +al 00DB18 .Label_DB18 +al 00DAFC .Label_DAFC +al 00DFD3 .Label_DFD3 +al 00DB19 .Label_DB19 +al 00DAE3 .Label_DAE3 +al 00DABA .Label_DABA +al 00DAC1 .Label_DAC1 +al 00DAC0 .Label_DAC0 +al 00DB34 .Label_DB34 +al 00DA7E .Label_DA7E +al 00DB1E .Label_DB1E +al 00DA6A .Label_DA6A +al 00DA6D .Label_DA6D +al 00DA75 .Label_DA75 +al 00DAA5 .Label_DAA5 +al 00DA3B .Label_DA3B +al 00DA40 .Label_DA40 +al 00DA3C .Label_DA3C +al 00DA46 .Label_DA46 +al 00DA24 .Label_DA24 +al 00DA1F .Label_DA1F +al 00DA1E .Label_DA1E +al 00DA32 .Label_DA32 +al 00DA09 .Label_DA09 +al 00DA61 .Label_DA61 +al 00D9F3 .Label_D9F3 +al 00D9C9 .Label_D9C9 +al 00D9D4 .Label_D9D4 +al 00D9B7 .Label_D9B7 +al 00D9AD .Label_D9AD +al 00D99F .Label_D99F +al 00D99D .Label_D99D +al 00D979 .Label_D979 +al 00D95F .Label_D95F +al 00D961 .Label_D961 +al 00D965 .Label_D965 +al 00D949 .Label_D949 +al 00D93C .Label_D93C +al 00D968 .Label_D968 +al 00D932 .Label_D932 +al 00D990 .Label_D990 +al 00EC67 .Label_EC67 +al 00D927 .Label_D927 +al 00D928 .Label_D928 +al 00D988 .Label_D988 +al 00D91A .Label_D91A +al 00ECA2 .Label_ECA2 +al 00DE83 .Label_DE83 +al 00D8F1 .Label_D8F1 +al 00EEE3 .Label_EEE3 +al 00D8E5 .Label_D8E5 +al 00D904 .Label_D904 +al 00D8C0 .Label_D8C0 +al 00D89D .Label_D89D +al 00D89E .Label_D89E +al 00D8AF .Label_D8AF +al 00D8C1 .Label_D8C1 +al 00D871 .Label_D871 +al 00D861 .Label_D861 +al 00D84F .Label_D84F +al 00D9C5 .Label_D9C5 +al 00D829 .Label_D829 +al 00D831 .Label_D831 +al 00D851 .Label_D851 +al 00D7FE .Label_D7FE +al 00D7E0 .Label_D7E0 +al 00D7E4 .Label_D7E4 +al 00D7CE .Label_D7CE +al 00D7C1 .Label_D7C1 +al 00D7AA .Label_D7AA +al 00D9E0 .Label_D9E0 +al 00D79D .Label_D79D +al 00EE82 .Label_EE82 +al 00DFC4 .InitSpritesOffscreen +al 00D785 .Label_D785 +al 00D792 .Label_D792 +al 00D77F .Label_D77F +al 00D797 .Label_D797 +al 00D877 .Label_D877 +al 00D753 .Label_D753 +al 00D767 .Label_D767 +al 00D744 .Label_D744 +al 00D90D .Label_D90D +al 00D885 .Label_D885 +al 00D70F .Label_D70F +al 00D855 .Label_D855 +al 00D708 .Label_D708 +al 00D80E .Label_D80E +al 00D701 .Label_D701 +al 00D7C2 .Label_D7C2 +al 00D6FA .Label_D6FA +al 00D73C .Label_D73C +al 00D6F1 .Label_D6F1 +al 00D6E6 .Label_D6E6 +al 00D710 .Label_D710 +al 00D69A .Label_D69A +al 00D611 .Label_D611 +al 00D5FE .Label_D5FE +al 00D60A .Label_D60A +al 00D5FB .Label_D5FB +al 00D609 .Label_D609 +al 00D5EC .Label_D5EC +al 00D5F0 .Label_D5F0 +al 00D5E6 .Label_D5E6 +al 00D5E1 .Label_D5E1 +al 00D5DC .Label_D5DC +al 00D588 .Label_D588 +al 00D58B .Label_D58B +al 00D502 .Label_D502 +al 00D48D .Label_D48D +al 00D48E .Label_D48E +al 00D47D .Label_D47D +al 00D47A .Label_D47A +al 00D459 .Label_D459 +al 00D451 .Label_D451 +al 00D450 .Label_D450 +al 00D444 .Label_D444 +al 00D440 .Label_D440 +al 00D5D5 .Label_D5D5 +al 00D40B .Label_D40B +al 00E13D .Label_E13D +al 00D3EA .Label_D3EA +al 00D39F .Label_D39F +al 00D38F .Label_D38F +al 00D381 .Label_D381 +al 00D37D .Label_D37D +al 00D36D .Label_D36D +al 00D3A7 .Label_D3A7 +al 00D34A .Label_D34A +al 00D33A .Label_D33A +al 00D31F .Label_D31F +al 00D30B .Label_D30B +al 00D306 .Label_D306 +al 00D593 .Label_D593 +al 00D2E9 .Label_D2E9 +al 00D2E4 .Label_D2E4 +al 00D2D0 .Label_D2D0 +al 00D2C7 .Label_D2C7 +al 00D27F .Label_D27F +al 00D277 .Label_D277 +al 00D26A .Label_D26A +al 00D25F .Label_D25F +al 00D25B .Label_D25B +al 00D257 .Label_D257 +al 00D251 .Label_D251 +al 00D297 .Label_D297 +al 00D218 .Label_D218 +al 00D20F .Label_D20F +al 00D217 .Label_D217 +al 00D1E9 .Label_D1E9 +al 00D1F5 .Label_D1F5 +al 00D1D4 .Label_D1D4 +al 00D1FF .Label_D1FF +al 00D1FA .Label_D1FA +al 00D1A9 .Label_D1A9 +al 00D1CF .Label_D1CF +al 00D1F6 .Label_D1F6 +al 00D1A0 .Label_D1A0 +al 00D18B .Label_D18B +al 00D179 .Label_D179 +al 00D16D .Label_D16D +al 00D151 .Label_D151 +al 00D155 .Label_D155 +al 00D144 .Label_D144 +al 00D17C .Label_D17C +al 00D138 .Label_D138 +al 00D11C .Label_D11C +al 00D116 .Label_D116 +al 00D15A .AdjustDecimalColumns +al 00D139 .Label_D139 +al 00D0C1 .Label_D0C1 +al 00D0E8 .Label_D0E8 +al 00D0E4 .Label_D0E4 +al 00D0B4 .Label_D0B4 +al 00D0A2 .Label_D0A2 +al 00D083 .Label_D083 +al 00D0B3 .Label_D0B3 +al 00D03F .Label_D03F +al 00D02F .Label_D02F +al 00D02C .Label_D02C +al 00CFC6 .Label_CFC6 +al 00D2DF .Label_D2DF +al 00CFB6 .Label_CFB6 +al 00CFCA .Label_CFCA +al 00CF9E .Label_CF9E +al 00CFC4 .Label_CFC4 +al 00CFA8 .Label_CFA8 +al 00CFA7 .Label_CFA7 +al 00CF8B .Label_CF8B +al 00CF89 .Label_CF89 +al 00CF83 .Label_CF83 +al 00CF88 .Label_CF88 +al 00CF5B .Label_CF5B +al 00CF48 .Label_CF48 +al 00CF53 .Label_CF53 +al 00CF3B .Label_CF3B +al 00CF2C .Label_CF2C +al 00CF25 .Label_CF25 +al 00CF12 .Label_CF12 +al 00CF19 .Label_CF19 +al 00CF04 .Label_CF04 +al 00CEEF .Label_CEEF +al 00CED9 .Label_CED9 +al 00CEC3 .Label_CEC3 +al 00CEB1 .Label_CEB1 +al 00CE94 .Label_CE94 +al 00CE86 .Label_CE86 +al 00CE5A .Label_CE5A +al 00CE84 .NextIndex +al 00CE43 .Label_CE43 +al 00CE2C .Label_CE2C +al 00CE23 .Label_CE23 +al 00CE18 .Label_CE18 +al 00CE16 .Label_CE16 +al 00CDEC .Label_CDEC +al 00CDE9 .Label_CDE9 +al 00CDE6 .Label_CDE6 +al 00CDDA .Label_CDDA +al 00CDC4 .Label_CDC4 +al 00CD9A .Label_CD9A +al 00CD94 .Label_CD94 +al 00CD81 .Label_CD81 +al 00CD68 .Label_CD68 +al 00CD52 .Label_CD52 +al 00CD2A .Label_CD2A +al 00CD1B .Label_CD1B +al 00CD34 .Label_CD34 +al 00CD42 .Label_CD42 +al 00CCFE .Label_CCFE +al 00CCD5 .Label_CCD5 +al 00CCD3 .Label_CCD3 +al 00CCC2 .Label_CCC2 +al 00CC8F .Label_CC8F +al 00CC84 .Label_CC84 +al 00CC5F .Label_CC5F +al 00CC54 .Label_CC54 +al 00CC4C .Label_CC4C +al 00CC22 .Label_CC22 +al 00CC13 .Label_CC13 +al 00CC0D .Label_CC0D +al 00CC1D .Label_CC1D +al 00CBE4 .Label_CBE4 +al 00CBE9 .Label_CBE9 +al 00CBDD .Label_CBDD +al 00CC29 .Label_CC29 +al 00CBC3 .Label_CBC3 +al 00CBB9 .Label_CBB9 +al 00CB9E .Label_CB9E +al 00CB85 .Label_CB85 +al 00CB6A .Label_CB6A +al 00CB65 .Label_CB65 +al 00CB84 .Label_CB84 +al 00CB38 .Label_CB38 +al 00CB50 .Label_CB50 +al 00CB48 .Label_CB48 +al 00CB40 .Label_CB40 +al 00CB29 .Label_CB29 +al 00CB18 .Label_CB18 +al 00CB08 .Label_CB08 +al 00CB4F .Label_CB4F +al 00CAF2 .Label_CAF2 +al 00CADE .Label_CADE +al 00CACC .Label_CACC +al 00CAB3 .Label_CAB3 +al 00CAB6 .Label_CAB6 +al 00CA7D .Label_CA7D +al 00CA77 .Label_CA77 +al 00CA73 .Label_CA73 +al 00CA65 .Label_CA65 +al 00CE00 .Label_CE00 +al 00CA5E .Label_CA5E +al 00CA35 .Label_CA35 +al 00CD43 .Label_CD43 +al 00CA20 .Label_CA20 +al 00CA22 .Label_CA22 +al 00CA18 .Label_CA18 +al 00CA15 .Label_CA15 +al 00CA0C .Label_CA0C +al 00C9FE .Label_C9FE +al 00C9F8 .Label_C9F8 +al 00C9DB .Label_C9DB +al 00C9F1 .Label_C9F1 +al 00C9D1 .Label_C9D1 +al 00C9CB .Label_C9CB +al 00C9BD .Label_C9BD +al 00C9D2 .Label_C9D2 +al 00C99E .Label_C99E +al 00C98E .Label_C98E +al 00C992 .Label_C992 +al 00CF67 .Label_CF67 +al 00C9DD .Label_C9DD +al 00C973 .Label_C973 +al 00C96F .Label_C96F +al 00C954 .Label_C954 +al 00C959 .Label_C959 +al 00D9EA .Label_D9EA +al 00C939 .Label_C939 +al 00C92C .Label_C92C +al 00C936 .Label_C936 +al 00C91D .Label_C91D +al 00C917 .Label_C917 +al 00C91C .Label_C91C +al 00C90A .Label_C90A +al 00CE95 .Label_CE95 +al 00C916 .Label_C916 +al 00C8F1 .Label_C8F1 +al 00C8F4 .Label_C8F4 +al 00CAEB .Label_CAEB +al 00CEA3 .Label_CEA3 +al 00C8DE .Label_C8DE +al 00C8D7 .Label_C8D7 +al 00C8E4 .Label_C8E4 +al 00C8CF .Label_C8CF +al 00C8C7 .Label_C8C7 +al 00C8B7 .Label_C8B7 +al 00C895 .Label_C895 +al 00C8A4 .Label_C8A4 +al 00CEBA .Label_CEBA +al 00C883 .Label_C883 +al 00C881 .Label_C881 +al 00C884 .Label_C884 +al 00C86C .Label_C86C +al 00C853 .Label_C853 +al 00C8B5 .Label_C8B5 +al 00C891 .Label_C891 +al 00C8AD .Label_C8AD +al 00C9E6 .Label_C9E6 +al 00C824 .Label_C824 +al 00C86F .Label_C86F +al 00C7F9 .Label_C7F9 +al 00C97D .Label_C97D +al 00C7EA .Label_C7EA +al 00CAA4 .Label_CAA4 +al 00C7F3 .Label_C7F3 +al 00C8D1 .Label_C8D1 +al 00C7DE .Label_C7DE +al 00C7DA .Label_C7DA +al 00C9A1 .Label_C9A1 +al 00C93A .Label_C93A +al 00C7CD .Label_C7CD +al 00C7CA .Label_C7CA +al 00C7C7 .Label_C7C7 +al 00CCA0 .PushTablePointerDispatch +al 00C7B3 .Label_C7B3 +al 00C797 .Label_C797 +al 00CE9C .Label_CE9C +al 00C792 .Label_C792 +al 00C7B7 .Label_C7B7 +al 00C770 .Label_C770 +al 00C775 .Label_C775 +al 00C781 .Label_C781 +al 00C782 .Label_C782 +al 00C75A .Label_C75A +al 00C758 .Label_C758 +al 00CC73 .Label_CC73 +al 00D9B6 .Label_D9B6 +al 00C727 .Label_C727 +al 00C73B .Label_C73B +al 00DB2D .Label_DB2D +al 00C708 .Label_C708 +al 00D9FE .Label_D9FE +al 00C6FC .Label_C6FC +al 00DBFF .Label_DBFF +al 00DB53 .Label_DB53 +al 00C747 .Label_C747 +al 00DEAF .Label_DEAF +al 00C744 .Label_C744 +al 00D789 .Label_D789 +al 00C6E0 .Label_C6E0 +al 00C6E9 .Label_C6E9 +al 00C6BF .Label_C6BF +al 00ECEC .Label_ECEC +al 00C6CD .Label_C6CD +al 00C6C9 .Label_C6C9 +al 00C6BC .Label_C6BC +al 00C75D .Label_C75D +al 00DFBD .Label_DFBD +al 00C697 .Label_C697 +al 00C686 .Label_C686 +al 00C66F .Label_C66F +al 00CBAE .Label_CBAE +al 00CBB6 .Label_CBB6 +al 00CBC4 .Label_CBC4 +al 00DC75 .Label_DC75 +al 00CC3F .Label_CC3F +al 00C785 .Label_C785 +al 00D6BA .Label_D6BA +al 00CAB9 .DispatchTableF393 +al 00C647 .Label_C647 +al 00C63F .Label_C63F +al 00C657 .Label_C657 +al 00DDE0 .Label_DDE0 +al 00DEEC .Label_DEEC +al 00C62C .Label_C62C +al 00C629 .Label_C629 +al 00C636 .Label_C636 +al 00D019 .Label_D019 +al 00C65D .Label_C65D +al 00DFBA .Label_DFBA +al 00C605 .Label_C605 +al 00CB9B .Label_CB9B +al 00C5F8 .Label_C5F8 +al 00EF32 .Label_EF32 +al 00E709 .Label_E709 +al 00E26D .Label_E26D +al 00E1CE .Label_E1CE +al 00DFF8 .Label_DFF8 +al 00E1F7 .Label_E1F7 +al 00E21A .Label_E21A +al 00E2AB .Label_E2AB +al 00EDEB .Label_EDEB +al 00E795 .Label_E795 +al 00EA31 .Label_EA31 +al 00E783 .Label_E783 +al 00C66A .Label_C66A +al 00C5DB .Label_C5DB +al 00D301 .Label_D301 +al 00D202 .Label_D202 +al 00D56E .Label_D56E +al 00C5A3 .JsrThunkTable +al 00C57E .Label_C57E +al 00C570 .Label_C570 +al 00C55C .Label_C55C +al 00C574 .Label_C574 +al 00C561 .Label_C561 +al 00C568 .Label_C568 +al 00C58E .Label_C58E +al 00E132 .Label_E132 +al 00D4FE .Label_D4FE +al 00C543 .Label_C543 +al 00CD9E .DispatchViaStackPointer +al 00C501 .Label_C501 +al 00C4D9 .Label_C4D9 +al 00C4D7 .Label_C4D7 +al 00C4F9 .Label_C4F9 +al 00C50B .Label_C50B +al 00C507 .Label_C507 +al 00C528 .Label_C528 +al 00CDB4 .AdvanceDispatchPointer +al 00C494 .Label_C494 +al 00C46E .Label_C46E +al 00C4AE .Label_C4AE +al 00C456 .Label_C456 +al 00C446 .Label_C446 +al 00C443 .Label_C443 +al 00C440 .Label_C440 +al 00C43C .Label_C43C +al 00C430 .Label_C430 +al 00C3D5 .Label_C3D5 +al 00C3DC .Label_C3DC +al 00C3C1 .Label_C3C1 +al 00C3B9 .Label_C3B9 +al 00C38B .Label_C38B +al 00C39D .Label_C39D +al 00C399 .Label_C399 +al 00C3A8 .Label_C3A8 +al 00C402 .Label_C402 +al 00C369 .Label_C369 +al 00C37A .Label_C37A +al 00C376 .Label_C376 +al 00C35A .Label_C35A +al 00C32E .Label_C32E +al 00C2FF .Label_C2FF +al 00C2F3 .Label_C2F3 +al 00C2CB .Label_C2CB +al 00C308 .Label_C308 +al 00C2B6 .Label_C2B6 +al 00C2BC .Label_C2BC +al 00C304 .Label_C304 +al 00C429 .Label_C429 +al 00C3C2 .Label_C3C2 +al 00C3E3 .Label_C3E3 +al 00C2A7 .Label_C2A7 +al 00C27B .Label_C27B +al 00C26E .Label_C26E +al 00C3F5 .Label_C3F5 +al 00C24B .Label_C24B +al 00C286 .Label_C286 +al 00C236 .Label_C236 +al 00C23C .Label_C23C +al 00C282 .Label_C282 +al 00C41F .Label_C41F +al 00C1FD .Label_C1FD +al 00C1EC .Label_C1EC +al 00C212 .Label_C212 +al 00C221 .Label_C221 +al 00C1CE .Label_C1CE +al 00C19F .Label_C19F +al 00C189 .Label_C189 +al 00C193 .Label_C193 +al 00C37D .Label_C37D +al 00C35B .Label_C35B +al 00C334 .Label_C334 +al 00C2AD .Label_C2AD +al 00C22D .Label_C22D +al 00C1C3 .Label_C1C3 +al 00C196 .Label_C196 +al 00C164 .Label_C164 +al 00C155 .Label_C155 +al 00C158 .Label_C158 +al 00C15B .Label_C15B +al 00C130 .Label_C130 +al 00C12E .Label_C12E +al 00C13E .Label_C13E +al 00C3A0 .Label_C3A0 +al 00C161 .Label_C161 +al 00C15E .Label_C15E +al 00C14F .Label_C14F +al 00C152 .Label_C152 +al 00C0F3 .Label_C0F3 +al 00C44A .Label_C44A +al 00C149 .NmiPhaseHandlerA +al 00C0C2 .Label_C0C2 +al 00C0BF .Label_C0BF +al 00C0B6 .NmiPhaseDispatch +al 00CAF7 .Label_CAF7 +al 00CCC5 .Label_CCC5 +al 00CE09 .Label_CE09 +al 00CA66 .Label_CA66 +al 00CCFF .Label_CCFF +al 00EE6A .Label_EE6A +al 00CB58 .Label_CB58 +al 00C0AC .Label_C0AC +al 00C07D .NmiHandler +al 00D328 .TestRamFlagPair0500 +al 00C077 .Label_C077 +al 00C06A .Label_C06A +al 00C4B8 .Label_C4B8 +al 00CD88 .Label_CD88 +al 00F8A7 .Label_F8A7 +al 00C060 .Label_C060 +al 00C05D .Label_C05D +al 00C04F .Label_C04F +al 00CA2B .Label_CA2B +al 00CA1B .Label_CA1B +al 00C02B .Label_C02B +al 00C01D .ClearRamPageLoop +al 00C002 .WaitVblank1 +al 00C000 .Reset diff --git a/_wip/Pyramid (U)/copilot/reconstructed.lbl b/_wip/Pyramid (U)/copilot/reconstructed.lbl index e69de29..2158b4a 100644 --- a/_wip/Pyramid (U)/copilot/reconstructed.lbl +++ b/_wip/Pyramid (U)/copilot/reconstructed.lbl @@ -0,0 +1,425 @@ +al 00FFFA .Label_FFFA +al 00FF74 .Label_FF74 +al 00FF69 .Label_FF69 +al 00FF67 .Label_FF67 +al 00FF57 .Label_FF57 +al 00FF50 .Label_FF50 +al 00FF4E .Label_FF4E +al 00FF4C .Label_FF4C +al 00FF49 .Label_FF49 +al 00FF3E .Label_FF3E +al 00FF2F .Label_FF2F +al 00FF00 .Label_FF00 +al 00F942 .Label_F942 +al 00F941 .Label_F941 +al 00F93C .Label_F93C +al 00F929 .Label_F929 +al 00F922 .Label_F922 +al 00F914 .Label_F914 +al 00F908 .Label_F908 +al 00F8EF .Label_F8EF +al 00F8D8 .Label_F8D8 +al 00F8C5 .Label_F8C5 +al 00F8BC .Label_F8BC +al 00F8C0 .Label_F8C0 +al 00F8B2 .Label_F8B2 +al 00F8AD .Label_F8AD +al 00F8A2 .Label_F8A2 +al 00F8C4 .Label_F8C4 +al 00F8DD .Label_F8DD +al 00F89A .Label_F89A +al 00F897 .Label_F897 +al 00F894 .Label_F894 +al 00F891 .Label_F891 +al 00EDBF .Label_EDBF +al 00EDB7 .Label_EDB7 +al 00ED6E .Label_ED6E +al 00E276 .Label_E276 +al 00E275 .Label_E275 +al 00E26F .Label_E26F +al 00E26E .Label_E26E +al 00E268 .Label_E268 +al 00E267 .Label_E267 +al 00E261 .Label_E261 +al 00E260 .Label_E260 +al 00E25A .Label_E25A +al 00E24F .Label_E24F +al 00E259 .Label_E259 +al 00E249 .Label_E249 +al 00E236 .Label_E236 +al 00E240 .Label_E240 +al 00E226 .Label_E226 +al 00E230 .Label_E230 +al 00E220 .Label_E220 +al 00E20B .Label_E20B +al 00E215 .Label_E215 +al 00E1FB .Label_E1FB +al 00E1E9 .Label_E1E9 +al 00E1D4 .Label_E1D4 +al 00E1B7 .Label_E1B7 +al 00E1A8 .Label_E1A8 +al 00E1A1 .Label_E1A1 +al 00E195 .Label_E195 +al 00E161 .Label_E161 +al 00E173 .Label_E173 +al 00E156 .Label_E156 +al 00E13E .Label_E13E +al 00E121 .Label_E121 +al 00E117 .Label_E117 +al 00E10E .Label_E10E +al 00E103 .Label_E103 +al 00E0FC .Label_E0FC +al 00E0F0 .Label_E0F0 +al 00E0BC .Label_E0BC +al 00E0CE .Label_E0CE +al 00E0B1 .Label_E0B1 +al 00E099 .Label_E099 +al 00E07C .Label_E07C +al 00E072 .Label_E072 +al 00E069 .Label_E069 +al 00E05E .Label_E05E +al 00E057 .Label_E057 +al 00E04B .Label_E04B +al 00E017 .Label_E017 +al 00E029 .Label_E029 +al 00E00C .Label_E00C +al 00DFD5 .Label_DFD5 +al 00DFF4 .Label_DFF4 +al 00DFBF .Label_DFBF +al 00DFB5 .Label_DFB5 +al 00DFAC .Label_DFAC +al 00DFA1 .Label_DFA1 +al 00DF9A .Label_DF9A +al 00DF89 .Label_DF89 +al 00DF8E .Label_DF8E +al 00DF80 .Label_DF80 +al 00DF3E .Label_DF3E +al 00DF30 .Label_DF30 +al 00DF29 .Label_DF29 +al 00DF14 .Label_DF14 +al 00DEFF .Label_DEFF +al 00DF0E .Label_DF0E +al 00DECB .Label_DECB +al 00DEBB .Label_DEBB +al 00DEA9 .Label_DEA9 +al 00DE9A .Label_DE9A +al 00D7F3 .Label_D7F3 +al 00D7EB .Label_D7EB +al 00D7E3 .Label_D7E3 +al 00D7D7 .Label_D7D7 +al 00D7C5 .Label_D7C5 +al 00D7B6 .Label_D7B6 +al 00D79D .Label_D79D +al 00D793 .Label_D793 +al 00D78A .Label_D78A +al 00D72E .Label_D72E +al 00D72D .Label_D72D +al 00D72C .Label_D72C +al 00D6FD .Label_D6FD +al 00D6F6 .Label_D6F6 +al 00D6E7 .Label_D6E7 +al 00D6D6 .Label_D6D6 +al 00D720 .Label_D720 +al 00D6C9 .Label_D6C9 +al 00D6BB .Label_D6BB +al 00D6B2 .Label_D6B2 +al 00D6AC .Label_D6AC +al 00D69C .Label_D69C +al 00D679 .Label_D679 +al 00D66D .Label_D66D +al 00D655 .Label_D655 +al 00D63B .Label_D63B +al 00D632 .Label_D632 +al 00D5D5 .Label_D5D5 +al 00D5CA .Label_D5CA +al 00D5AD .Label_D5AD +al 00D59A .Label_D59A +al 00D57A .Label_D57A +al 00D56B .Label_D56B +al 00D556 .Label_D556 +al 00D555 .Label_D555 +al 00D54A .Label_D54A +al 00D530 .Label_D530 +al 00D520 .Label_D520 +al 00D512 .Label_D512 +al 00D510 .Label_D510 +al 00D50A .Label_D50A +al 00D4EE .Label_D4EE +al 00D4C5 .Label_D4C5 +al 00D4BB .Label_D4BB +al 00D4B7 .Label_D4B7 +al 00D47F .Label_D47F +al 00D488 .Label_D488 +al 00D476 .Label_D476 +al 00D467 .Label_D467 +al 00D45E .Label_D45E +al 00D45A .Label_D45A +al 00D43E .Label_D43E +al 00D42E .Label_D42E +al 00D424 .Label_D424 +al 00D41D .Label_D41D +al 00D3BB .Label_D3BB +al 00D3B7 .Label_D3B7 +al 00D3B5 .Label_D3B5 +al 00D3A1 .Label_D3A1 +al 00D320 .Label_D320 +al 00D2ED .Label_D2ED +al 00D2BF .Label_D2BF +al 00D2AB .Label_D2AB +al 00D2A4 .Label_D2A4 +al 00D2A0 .Label_D2A0 +al 00D27F .Label_D27F +al 00D265 .Label_D265 +al 00D260 .Label_D260 +al 00D257 .Label_D257 +al 00D253 .Label_D253 +al 00D24A .Label_D24A +al 00D248 .Label_D248 +al 00D23A .Label_D23A +al 00D237 .Label_D237 +al 00D227 .Label_D227 +al 00D21C .Label_D21C +al 00D20E .Label_D20E +al 00D1FD .Label_D1FD +al 00D1EC .Label_D1EC +al 00D1D7 .Label_D1D7 +al 00D1BB .Label_D1BB +al 00D1B2 .Label_D1B2 +al 00D1AA .Label_D1AA +al 00D193 .Label_D193 +al 00D190 .Label_D190 +al 00D185 .Label_D185 +al 00D16A .Label_D16A +al 00D15E .Label_D15E +al 00D15B .Label_D15B +al 00D146 .Label_D146 +al 00D134 .Label_D134 +al 00D13C .Label_D13C +al 00D10D .Label_D10D +al 00D105 .Label_D105 +al 00D0F5 .Label_D0F5 +al 00D0F8 .Label_D0F8 +al 00D0DF .Label_D0DF +al 00D0D3 .Label_D0D3 +al 00D0C5 .Label_D0C5 +al 00D0C3 .Label_D0C3 +al 00D0B0 .Label_D0B0 +al 00D0AD .Label_D0AD +al 00D0AC .Label_D0AC +al 00D0A0 .Label_D0A0 +al 00D0B6 .Label_D0B6 +al 00D087 .Label_D087 +al 00D0B8 .Label_D0B8 +al 00D080 .Label_D080 +al 00D085 .Label_D085 +al 00D074 .Label_D074 +al 00D050 .Label_D050 +al 00D04A .Label_D04A +al 00D040 .Label_D040 +al 00D03D .Label_D03D +al 00D036 .Label_D036 +al 00D02A .Label_D02A +al 00D021 .Label_D021 +al 00CFFF .Label_CFFF +al 00CFFA .Label_CFFA +al 00D020 .Label_D020 +al 00CFC7 .Label_CFC7 +al 00CFC4 .Label_CFC4 +al 00CF90 .Label_CF90 +al 00CF74 .Label_CF74 +al 00CF67 .Label_CF67 +al 00CF98 .Label_CF98 +al 00CF55 .Label_CF55 +al 00CF29 .Label_CF29 +al 00CF35 .Label_CF35 +al 00CF14 .Label_CF14 +al 00CF10 .Label_CF10 +al 00CF0E .Label_CF0E +al 00CF02 .Label_CF02 +al 00CEF6 .Label_CEF6 +al 00CEEB .Label_CEEB +al 00CEE0 .Label_CEE0 +al 00CED6 .Label_CED6 +al 00CED3 .Label_CED3 +al 00CEA8 .Label_CEA8 +al 00CEA0 .Label_CEA0 +al 00CE96 .Label_CE96 +al 00CE9D .Label_CE9D +al 00CE7B .Label_CE7B +al 00CE78 .Label_CE78 +al 00CE66 .Label_CE66 +al 00CE5E .Label_CE5E +al 00CE54 .Label_CE54 +al 00CE5B .Label_CE5B +al 00CE35 .Label_CE35 +al 00CE32 .Label_CE32 +al 00CE22 .Label_CE22 +al 00CE1A .Label_CE1A +al 00CE17 .Label_CE17 +al 00CE14 .Label_CE14 +al 00CDDC .Label_CDDC +al 00CDC0 .Label_CDC0 +al 00CDBD .Label_CDBD +al 00CDAC .Label_CDAC +al 00CDA4 .Label_CDA4 +al 00CD97 .Label_CD97 +al 00CD8A .Label_CD8A +al 00CD85 .Label_CD85 +al 00CD80 .Label_CD80 +al 00CD75 .Label_CD75 +al 00CD72 .Label_CD72 +al 00CD43 .Label_CD43 +al 00CD27 .Label_CD27 +al 00CD24 .Label_CD24 +al 00CD23 .Label_CD23 +al 00CD18 .Label_CD18 +al 00CD07 .Label_CD07 +al 00CCEE .Label_CCEE +al 00CCE5 .Label_CCE5 +al 00CCCD .Label_CCCD +al 00CCB8 .Label_CCB8 +al 00CCB1 .Label_CCB1 +al 00CCA5 .Label_CCA5 +al 00CCA8 .Label_CCA8 +al 00CC90 .Label_CC90 +al 00CC8B .Label_CC8B +al 00CC73 .Label_CC73 +al 00CC56 .Label_CC56 +al 00CC5C .Label_CC5C +al 00CC71 .Label_CC71 +al 00CC3D .Label_CC3D +al 00CC11 .Label_CC11 +al 00CBF9 .Label_CBF9 +al 00CBE5 .Label_CBE5 +al 00CBC1 .Label_CBC1 +al 00CBDC .Label_CBDC +al 00CBAD .Label_CBAD +al 00CB99 .Label_CB99 +al 00CB82 .Label_CB82 +al 00CB6C .Label_CB6C +al 00CB68 .Label_CB68 +al 00CAF3 .Label_CAF3 +al 00CAAA .Label_CAAA +al 00CA80 .Label_CA80 +al 00CA41 .Label_CA41 +al 00CA97 .Label_CA97 +al 00CA68 .Label_CA68 +al 00CA32 .Label_CA32 +al 00CA61 .Label_CA61 +al 00CA1D .Label_CA1D +al 00C9A7 .Label_C9A7 +al 00C95A .Label_C95A +al 00C934 .Label_C934 +al 00C932 .Label_C932 +al 00C90D .Label_C90D +al 00C8D0 .Label_C8D0 +al 00C8F2 .Label_C8F2 +al 00C8A4 .Label_C8A4 +al 00C8B8 .Label_C8B8 +al 00C897 .Label_C897 +al 00C835 .Label_C835 +al 00C815 .Label_C815 +al 00C80A .Label_C80A +al 00C805 .Label_C805 +al 00C800 .Label_C800 +al 00C714 .Label_C714 +al 00C614 .Label_C614 +al 00C609 .Label_C609 +al 00C585 .Label_C585 +al 00C56D .Label_C56D +al 00C548 .Label_C548 +al 00C536 .Label_C536 +al 00C52E .Label_C52E +al 00C52A .Label_C52A +al 00C50A .Label_C50A +al 00C4FD .Label_C4FD +al 00C4EB .Label_C4EB +al 00C4E4 .Label_C4E4 +al 00C4D9 .Label_C4D9 +al 00C4D1 .Label_C4D1 +al 00C4C7 .Label_C4C7 +al 00C4C0 .Label_C4C0 +al 00C4B8 .Label_C4B8 +al 00C43E .Label_C43E +al 00C3FE .Label_C3FE +al 00C3FD .Label_C3FD +al 00C3FA .Label_C3FA +al 00C3F0 .Label_C3F0 +al 00C3EF .Label_C3EF +al 00C3EB .Label_C3EB +al 00C3E7 .Label_C3E7 +al 00C3E3 .Label_C3E3 +al 00C3D8 .Label_C3D8 +al 00C3C7 .Label_C3C7 +al 00C3B8 .Label_C3B8 +al 00C3A6 .Label_C3A6 +al 00C392 .Label_C392 +al 00C386 .Label_C386 +al 00C384 .Label_C384 +al 00C36D .Label_C36D +al 00C35F .Label_C35F +al 00C34A .Label_C34A +al 00C341 .Label_C341 +al 00C347 .Label_C347 +al 00C32C .Label_C32C +al 00C31B .Label_C31B +al 00C317 .Label_C317 +al 00C300 .Label_C300 +al 00C201 .Label_C201 +al 00C1FB .Label_C1FB +al 00C1F6 .Label_C1F6 +al 00C1EF .Label_C1EF +al 00C1EA .Label_C1EA +al 00C1E2 .Label_C1E2 +al 00C1D7 .Label_C1D7 +al 00C1D6 .Label_C1D6 +al 00C1D0 .Label_C1D0 +al 00C1C9 .Label_C1C9 +al 00C1C4 .Label_C1C4 +al 00C1C1 .Label_C1C1 +al 00C1BA .Label_C1BA +al 00C1B6 .Label_C1B6 +al 00C198 .Label_C198 +al 00C192 .Label_C192 +al 00C188 .Label_C188 +al 00C16A .Label_C16A +al 00C160 .Label_C160 +al 00C155 .Label_C155 +al 00C139 .Label_C139 +al 00C15B .Label_C15B +al 00C127 .Label_C127 +al 00C122 .Label_C122 +al 00C11B .Label_C11B +al 00C10D .Label_C10D +al 00C0FB .Label_C0FB +al 00C0ED .Label_C0ED +al 00C0DB .Label_C0DB +al 00C0CD .Label_C0CD +al 00C0B9 .Label_C0B9 +al 00C0AD .Label_C0AD +al 00C0A0 .Label_C0A0 +al 00C0B3 .Label_C0B3 +al 00C0A8 .Label_C0A8 +al 00C090 .Label_C090 +al 00C063 .Label_C063 +al 00C054 .Label_C054 +al 00C051 .Label_C051 +al 00C04E .Label_C04E +al 00C04B .Label_C04B +al 00C048 .Label_C048 +al 00C042 .Label_C042 +al 00C03F .Label_C03F +al 00C03C .Label_C03C +al 00C02A .Label_C02A +al 00C027 .Label_C027 +al 00C01E .Label_C01E +al 00C01B .Label_C01B +al 00C018 .Label_C018 +al 00C015 .Label_C015 +al 00C012 .Label_C012 +al 00C00F .Label_C00F +al 00C00C .Label_C00C +al 00C009 .Label_C009 +al 00C006 .Label_C006 +al 00C003 .Label_C003 +al 00C000 .Label_C000